@talkjs/web-components 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +1 -1
- package/default.cjs +117 -109
- package/default.css +1 -1
- package/default.d.ts +482 -251
- package/default.js +5297 -5123
- package/package.json +1 -1
package/default.cjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use client";"use strict";var Fc=e=>{throw TypeError(e)};var Bc=(e,t,n)=>t.has(e)||Fc("Cannot "+n);var ue=(e,t,n)=>(Bc(e,t,"read from private field"),n?n.call(e):t.get(e)),Fi=(e,t,n)=>t.has(e)?Fc("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ra=(e,t,n,r)=>(Bc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const TA=require("@talkjs/core"),Su=Object.freeze(Object.defineProperty({__proto__:null,get AfterMessages(){return WT},get AudioBlock(){return qT},get Avatar(){return rR},get BeforeMessages(){return GT},get ChatHeader(){return LT},get CompactMessageContent(){return XT},get ConversationImage(){return iR},get ConversationListItem(){return uR},get FileBlock(){return JT},get GroupChatImage(){return oR},get Icon(){return $T},get ImageBlock(){return ZT},get LocationBlock(){return QT},get Message(){return xT},get MessageActionMenu(){return BT},get MessageDivider(){return zT},get MessageField(){return UT},get MessageListFooter(){return YT},get MessageListHeader(){return MT},get RecordingPreview(){return jT},get ReferencedMessage(){return sR},get ReplyBar(){return aR},get TextBlock(){return tR},get TimeAgo(){return lR},get VideoBlock(){return eR},get VoiceBlock(){return nR},get VoiceRecorder(){return HT}},Symbol.toStringTag,{value:"Module"}));var bo,ot,rf,Ar,Uc,of,sf,af,Tu,Sl,Tl,lf,ao={},uf=[],RA=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,lo=Array.isArray;function cn(e,t){for(var n in t)e[n]=t[n];return e}function Rl(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Tt(e,t,n){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?bo.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return Ji(e,s,r,i,null)}function Ji(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++rf:i,__i:-1,__u:0};return i==null&&ot.vnode!=null&&ot.vnode(o),o}function cf(){return{current:null}}function Qt(e){return e.children}function We(e,t){this.props=e,this.context=t}function fi(e,t){if(t==null)return e.__?fi(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?fi(e):null}function df(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return df(e)}}function Il(e){(!e.__d&&(e.__d=!0)&&Ar.push(e)&&!gs.__r++||Uc!=ot.debounceRendering)&&((Uc=ot.debounceRendering)||of)(gs)}function gs(){for(var e,t,n,r,i,o,s,a=1;Ar.length;)Ar.length>a&&Ar.sort(sf),e=Ar.shift(),a=Ar.length,e.__d&&(n=void 0,r=void 0,i=(r=(t=e).__v).__e,o=[],s=[],t.__P&&((n=cn({},r)).__v=r.__v+1,ot.vnode&&ot.vnode(n),Ru(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,o,i==null?fi(r):i,!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,pf(o,n,s),r.__e=r.__=null,n.__e!=i&&df(n)));gs.__r=0}function Hc(e,t,n,r,i,o,s,a,l,c,u){var h,d,p,f,m,E,A,_=r&&r.__k||uf,g=t.length;for(l=function(v,S,I,R,y){var D,O,C,b,L,w=I.length,F=w,H=0;for(v.__k=new Array(y),D=0;D<y;D++)(O=S[D])!=null&&typeof O!="boolean"&&typeof O!="function"?(typeof O=="string"||typeof O=="number"||typeof O=="bigint"||O.constructor==String?O=v.__k[D]=Ji(null,O,null,null,null):lo(O)?O=v.__k[D]=Ji(Qt,{children:O},null,null,null):O.constructor==null&&O.__b>0?O=v.__k[D]=Ji(O.type,O.props,O.key,O.ref?O.ref:null,O.__v):v.__k[D]=O,b=D+H,O.__=v,O.__b=v.__b+1,C=null,(L=O.__i=IA(O,I,b,F))!=-1&&(F--,(C=I[L])&&(C.__u|=2)),C==null||C.__v==null?(L==-1&&(y>w?H--:y<w&&H++),typeof O.type!="function"&&(O.__u|=4)):L!=b&&(L==b-1?H--:L==b+1?H++:(L>b?H--:H++,O.__u|=4))):v.__k[D]=null;if(F)for(D=0;D<w;D++)(C=I[D])!=null&&!(2&C.__u)&&(C.__e==R&&(R=fi(C)),mf(C,C));return R}(n,t,_,l,g),h=0;h<g;h++)(p=n.__k[h])!=null&&(d=p.__i==-1?ao:_[p.__i]||ao,p.__i=h,E=Ru(e,p,d,i,o,s,a,l,c,u),f=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Iu(d.ref,null,p),u.push(p.ref,p.__c||f,p)),m==null&&f!=null&&(m=f),(A=!!(4&p.__u))||d.__k===p.__k?l=hf(p,l,e,A):typeof p.type=="function"&&E!==void 0?l=E:f&&(l=f.nextSibling),p.__u&=-7);return n.__e=m,l}function hf(e,t,n,r){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=hf(i[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=fi(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Ln(e,t){return t=t||[],e==null||typeof e=="boolean"||(lo(e)?e.some(function(n){Ln(n,t)}):t.push(e)),t}function IA(e,t,n,r){var i,o,s,a=e.key,l=e.type,c=t[n],u=c!=null&&!(2&c.__u);if(c===null&&a==null||u&&a==c.key&&l==c.type)return n;if(r>(u?1:0)){for(i=n-1,o=n+1;i>=0||o<t.length;)if((c=t[s=i>=0?i--:o++])!=null&&!(2&c.__u)&&a==c.key&&l==c.type)return s}return-1}function jc(e,t,n){t[0]=="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||RA.test(t)?n:n+"px"}function zo(e,t,n,r,i){var o,s;t:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||jc(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||jc(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(af,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=Tu,e.addEventListener(t,o?Tl:Sl,o)):e.removeEventListener(t,o?Tl:Sl,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 e)try{e[t]=n==null?"":n;break t}catch(a){}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function $c(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=Tu++;else if(t.t<n.u)return;return n(ot.event?ot.event(t):t)}}}function Ru(e,t,n,r,i,o,s,a,l,c){var u,h,d,p,f,m,E,A,_,g,v,S,I,R,y,D,O,C=t.type;if(t.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(u=ot.__b)&&u(t);t:if(typeof C=="function")try{if(A=t.props,_="prototype"in C&&C.prototype.render,g=(u=C.contextType)&&r[u.__c],v=u?g?g.props.value:u.__:r,n.__c?E=(h=t.__c=n.__c).__=h.__E:(_?t.__c=h=new C(A,v):(t.__c=h=new We(A,v),h.constructor=C,h.render=yA),g&&g.sub(h),h.state||(h.state={}),h.__n=r,d=h.__d=!0,h.__h=[],h._sb=[]),_&&h.__s==null&&(h.__s=h.state),_&&C.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=cn({},h.__s)),cn(h.__s,C.getDerivedStateFromProps(A,h.__s))),p=h.props,f=h.state,h.__v=t,d)_&&C.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),_&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(_&&C.getDerivedStateFromProps==null&&A!==p&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(A,v),t.__v==n.__v||!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(A,h.__s,v)===!1){for(t.__v!=n.__v&&(h.props=A,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(b){b&&(b.__=t)}),S=0;S<h._sb.length;S++)h.__h.push(h._sb[S]);h._sb=[],h.__h.length&&s.push(h);break t}h.componentWillUpdate!=null&&h.componentWillUpdate(A,h.__s,v),_&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(p,f,m)})}if(h.context=v,h.props=A,h.__P=e,h.__e=!1,I=ot.__r,R=0,_){for(h.state=h.__s,h.__d=!1,I&&I(t),u=h.render(h.props,h.state,h.context),y=0;y<h._sb.length;y++)h.__h.push(h._sb[y]);h._sb=[]}else do h.__d=!1,I&&I(t),u=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++R<25);h.state=h.__s,h.getChildContext!=null&&(r=cn(cn({},r),h.getChildContext())),_&&!d&&h.getSnapshotBeforeUpdate!=null&&(m=h.getSnapshotBeforeUpdate(p,f)),D=u,u!=null&&u.type===Qt&&u.key==null&&(D=ff(u.props.children)),a=Hc(e,lo(D)?D:[D],t,n,r,i,o,s,a,l,c),h.base=t.__e,t.__u&=-161,h.__h.length&&s.push(h),E&&(h.__E=h.__=null)}catch(b){if(t.__v=null,l||o!=null)if(b.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--;)Rl(o[O]);yl(t)}else t.__e=n.__e,t.__k=n.__k,b.then||yl(t);ot.__e(b,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=function(b,L,w,F,H,B,K,X,G){var W,St,tt,rt,it,bt,te,Gt=w.props||ao,Ot=L.props,Pt=L.type;if(Pt=="svg"?H="http://www.w3.org/2000/svg":Pt=="math"?H="http://www.w3.org/1998/Math/MathML":H||(H="http://www.w3.org/1999/xhtml"),B!=null){for(W=0;W<B.length;W++)if((it=B[W])&&"setAttribute"in it==!!Pt&&(Pt?it.localName==Pt:it.nodeType==3)){b=it,B[W]=null;break}}if(b==null){if(Pt==null)return document.createTextNode(Ot);b=document.createElementNS(H,Pt,Ot.is&&Ot),X&&(ot.__m&&ot.__m(L,B),X=!1),B=null}if(Pt==null)Gt===Ot||X&&b.data==Ot||(b.data=Ot);else{if(B=B&&bo.call(b.childNodes),!X&&B!=null)for(Gt={},W=0;W<b.attributes.length;W++)Gt[(it=b.attributes[W]).name]=it.value;for(W in Gt)if(it=Gt[W],W!="children"){if(W=="dangerouslySetInnerHTML")tt=it;else if(!(W in Ot)){if(W=="value"&&"defaultValue"in Ot||W=="checked"&&"defaultChecked"in Ot)continue;zo(b,W,null,it,H)}}for(W in Ot)it=Ot[W],W=="children"?rt=it:W=="dangerouslySetInnerHTML"?St=it:W=="value"?bt=it:W=="checked"?te=it:X&&typeof it!="function"||Gt[W]===it||zo(b,W,it,Gt[W],H);if(St)X||tt&&(St.__html==tt.__html||St.__html==b.innerHTML)||(b.innerHTML=St.__html),L.__k=[];else if(tt&&(b.innerHTML=""),Hc(L.type=="template"?b.content:b,lo(rt)?rt:[rt],L,w,F,Pt=="foreignObject"?"http://www.w3.org/1999/xhtml":H,B,K,B?B[0]:w.__k&&fi(w,0),X,G),B!=null)for(W=B.length;W--;)Rl(B[W]);X||(W="value",Pt=="progress"&&bt==null?b.removeAttribute("value"):bt!=null&&(bt!==b[W]||Pt=="progress"&&!bt||Pt=="option"&&bt!=Gt[W])&&zo(b,W,bt,Gt[W],H),W="checked",te!=null&&te!=b[W]&&zo(b,W,te,Gt[W],H))}return b}(n.__e,t,n,r,i,o,s,l,c);return(u=ot.diffed)&&u(t),128&t.__u?void 0:a}function yl(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(yl)}function pf(e,t,n){for(var r=0;r<n.length;r++)Iu(n[r],n[++r],n[++r]);ot.__c&&ot.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){ot.__e(o,i.__v)}})}function ff(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:lo(e)?e.map(ff):cn({},e)}function Iu(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){ot.__e(i,n)}}function mf(e,t,n){var r,i;if(ot.unmount&&ot.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Iu(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){ot.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&mf(r[i],t,n||typeof e.type!="function");n||Rl(e.__e),e.__c=e.__=e.__e=void 0}function yA(e,t,n){return this.constructor(e,n)}function uo(e,t,n){var r,i,o,s;t==document&&(t=document.documentElement),ot.__&&ot.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],Ru(t,e=(!r&&n||t).__k=Tt(Qt,null,[e]),i||ao,ao,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?bo.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),pf(o,e,s)}function Ef(e,t){uo(e,t,Ef)}function CA(e,t,n){var r,i,o,s,a=cn({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o]===void 0&&s!=null?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?bo.call(arguments,2):n),Ji(e.type,a,r||e.key,i||e.ref,null)}function Ci(e){function t(n){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,Il(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),n.children}return t.__c="__cC"+lf++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}bo=uf.slice,ot={__e:function(e,t,n,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(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},rf=0,We.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=cn({},this.state),typeof e=="function"&&(e=e(cn({},n),this.props)),e&&cn(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Il(this))},We.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Il(this))},We.prototype.render=Qt,Ar=[],of=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,sf=function(e,t){return e.__v.__b-t.__v.__b},gs.__r=0,af=/(PointerCapture)$|Capture$/i,Tu=0,Sl=$c(!1),Tl=$c(!0),lf=0;var NA=0;function P(e,t,n,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 c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--NA,__i:-1,__u:0,__source:i,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return ot.vnode&&ot.vnode(c),c}var xn,vt,Ia,Vc,mi=0,_f=[],wt=ot,zc=wt.__b,Yc=wt.__r,Gc=wt.diffed,Wc=wt.__c,Xc=wt.unmount,Kc=wt.__;function Hr(e,t){wt.__h&&wt.__h(vt,e,mi||t),mi=0;var n=vt.__H||(vt.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ct(e){return mi=1,Qs(Af,e)}function Qs(e,t,n){var r=Hr(xn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Af(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=vt,!vt.__f)){var i=function(a,l,c){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(d){return!!d.__c});if(u.every(function(d){return!d.__N}))return!o||o.call(this,a,l,c);var h=r.__c.props!==a;return u.forEach(function(d){if(d.__N){var p=d.__[0];d.__=d.__N,d.__N=void 0,p!==d.__[0]&&(h=!0)}}),o&&o.call(this,a,l,c)||h};vt.__f=!0;var o=vt.shouldComponentUpdate,s=vt.componentWillUpdate;vt.componentWillUpdate=function(a,l,c){if(this.__e){var u=o;o=void 0,i(a,l,c),o=u}s&&s.call(this,a,l,c)},vt.shouldComponentUpdate=i}return r.__N||r.__}function Z(e,t){var n=Hr(xn++,3);!wt.__s&&Nu(n.__H,t)&&(n.__=e,n.u=t,vt.__H.__h.push(n))}function Ne(e,t){var n=Hr(xn++,4);!wt.__s&&Nu(n.__H,t)&&(n.__=e,n.u=t,vt.__h.push(n))}function Q(e){return mi=5,lt(function(){return{current:e}},[])}function or(e,t,n){mi=6,Ne(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function lt(e,t){var n=Hr(xn++,7);return Nu(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function st(e,t){return mi=8,lt(function(){return e},t)}function sr(e){var t=vt.context[e.__c],n=Hr(xn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(vt)),t.props.value):e.__}function yu(e,t){wt.useDebugValue&&wt.useDebugValue(t?t(e):e)}function Cu(){var e=Hr(xn++,11);if(!e.__){for(var t=vt.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function bA(){for(var e;e=_f.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(is),e.__H.__h.forEach(Cl),e.__H.__h=[]}catch(t){e.__H.__h=[],wt.__e(t,e.__v)}}wt.__b=function(e){vt=null,zc&&zc(e)},wt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Kc&&Kc(e,t)},wt.__r=function(e){Yc&&Yc(e),xn=0;var t=(vt=e.__c).__H;t&&(Ia===vt?(t.__h=[],vt.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(is),t.__h.forEach(Cl),t.__h=[],xn=0)),Ia=vt},wt.diffed=function(e){Gc&&Gc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(_f.push(t)!==1&&Vc===wt.requestAnimationFrame||((Vc=wt.requestAnimationFrame)||kA)(bA)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ia=vt=null},wt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(is),n.__h=n.__h.filter(function(r){return!r.__||Cl(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],wt.__e(r,n.__v)}}),Wc&&Wc(e,t)},wt.unmount=function(e){Xc&&Xc(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{is(r)}catch(i){t=i}}),n.__H=void 0,t&&wt.__e(t,n.__v))};var qc=typeof requestAnimationFrame=="function";function kA(e){var t,n=function(){clearTimeout(r),qc&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);qc&&(t=requestAnimationFrame(n))}function is(e){var t=vt,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),vt=t}function Cl(e){var t=vt;e.__c=e.__(),vt=t}function Nu(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Af(e,t){return typeof t=="function"?t(e):t}function gf(e,t){for(var n in t)e[n]=t[n];return e}function Nl(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function bu(e,t){var n=t(),r=ct({t:{__:n,u:t}}),i=r[0].t,o=r[1];return Ne(function(){i.__=n,i.u=t,ya(i)&&o({t:i})},[e,n,t]),Z(function(){return ya(i)&&o({t:i}),e(function(){ya(i)&&o({t:i})})},[e]),n}function ya(e){var t,n,r=e.u,i=e.__;try{var o=r();return!((t=i)===(n=o)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch(s){return!0}}function ku(e){e()}function wu(e){return e}function Lu(){return[!1,ku]}var Pu=Ne;function Ds(e,t){this.props=e,this.context=t}function Fn(e,t){function n(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:Nl(this.props,i)}function r(i){return this.shouldComponentUpdate=n,Tt(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Ds.prototype=new We).isPureReactComponent=!0,Ds.prototype.shouldComponentUpdate=function(e,t){return Nl(this.props,e)||Nl(this.state,t)};var Jc=ot.__b;ot.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Jc&&Jc(e)};var wA=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function qe(e){function t(n){var r=gf({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=wA,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var Zc=function(e,t){return e==null?null:Ln(Ln(e).map(t))},Df={map:Zc,forEach:Zc,count:function(e){return e?Ln(e).length:0},only:function(e){var t=Ln(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Ln},LA=ot.__e;ot.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}LA(e,t,n,r)};var Qc=ot.unmount;function Of(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=gf({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Of(r,t,n)})),e}function vf(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return vf(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Zi(){this.__u=0,this.o=null,this.__b=null}function Sf(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Tf(e){var t,n,r,i=null;function o(s){if(t||(t=e()).then(function(a){a&&(i=a.default||a),r=!0},function(a){n=a,r=!0}),n)throw n;if(!r)throw t;return i?Tt(i,s):null}return o.displayName="Lazy",o.__f=!0,o}function Jr(){this.i=null,this.l=null}ot.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Qc&&Qc(e)},(Zi.prototype=new We).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Sf(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=vf(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Zi.prototype.componentWillUnmount=function(){this.o=[]},Zi.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Of(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Tt(Qt,null,e.fallback);return i&&(i.__u&=-33),[Tt(Qt,null,t.__a?null:e.children),i]};var td=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function PA(e){return this.getChildContext=function(){return e.context},e.children}function MA(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){uo(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,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)}}}uo(Tt(PA,{context:t.context},e.__v),t.v)}function Mu(e,t){var n=Tt(MA,{__v:e,h:t});return n.containerInfo=t,n}(Jr.prototype=new We).__a=function(e){var t=this,n=Sf(t.__v),r=t.l.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),td(t,e,r)):i()};n?n(o):o()}},Jr.prototype.render=function(e){this.i=null,this.l=new Map;var t=Ln(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},Jr.prototype.componentDidUpdate=Jr.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){td(e,n,t)})};var Rf=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,xA=/^(?: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]/,FA=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,BA=/[A-Z0-9]/g,UA=typeof document!="undefined",HA=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function xu(e,t,n){return t.__k==null&&(t.textContent=""),uo(e,t),typeof n=="function"&&n(),e?e.__c:null}function If(e,t,n){return Ef(e,t),typeof n=="function"&&n(),e?e.__c:null}We.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(We.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var ed=ot.event;function jA(){}function $A(){return this.cancelBubble}function VA(){return this.defaultPrevented}ot.event=function(e){return ed&&(e=ed(e)),e.persist=jA,e.isPropagationStopped=$A,e.isDefaultPrevented=VA,e.nativeEvent=e};var Fu,zA={enumerable:!1,configurable:!0,get:function(){return this.class}},nd=ot.vnode;ot.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||UA&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||HA(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":FA.test(s)&&(s=l):l=s="oninput":o&&xA.test(s)?s=s.replace(BA,"-$&").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=Ln(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Ln(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",zA)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=Rf,nd&&nd(e)};var rd=ot.__r;ot.__r=function(e){rd&&rd(e),Fu=e.__c};var id=ot.diffed;ot.diffed=function(e){id&&id(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Fu=null};var yf={ReactCurrentDispatcher:{current:{readContext:function(e){return Fu.__n[e.__c].props.value},useCallback:st,useContext:sr,useDebugValue:yu,useDeferredValue:wu,useEffect:Z,useId:Cu,useImperativeHandle:or,useInsertionEffect:Pu,useLayoutEffect:Ne,useMemo:lt,useReducer:Qs,useRef:Q,useState:ct,useSyncExternalStore:bu,useTransition:Lu}}};function Cf(e){return Tt.bind(null,e)}function ko(e){return!!e&&e.$$typeof===Rf}function Nf(e){return ko(e)&&e.type===Qt}function bf(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function kf(e){return ko(e)?CA.apply(null,arguments):e}function Bu(e){return!!e.__k&&(uo(null,e),!0)}function wf(e){return e&&(e.base||e.nodeType===1&&e)||null}var Lf=function(e,t){return e(t)},Uu=function(e,t){return e(t)},Pf=Qt,Mf=ko,Me={useState:ct,useId:Cu,useReducer:Qs,useEffect:Z,useLayoutEffect:Ne,useInsertionEffect:Pu,useTransition:Lu,useDeferredValue:wu,useSyncExternalStore:bu,startTransition:ku,useRef:Q,useImperativeHandle:or,useMemo:lt,useCallback:st,useContext:sr,useDebugValue:yu,version:"18.3.1",Children:Df,render:xu,hydrate:If,unmountComponentAtNode:Bu,createPortal:Mu,createElement:Tt,createContext:Ci,createFactory:Cf,cloneElement:kf,createRef:cf,Fragment:Qt,isValidElement:ko,isElement:Mf,isFragment:Nf,isMemo:bf,findDOMNode:wf,Component:We,PureComponent:Ds,memo:Fn,forwardRef:qe,flushSync:Uu,unstable_batchedUpdates:Lf,StrictMode:Pf,Suspense:Zi,SuspenseList:Jr,lazy:Tf,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:yf};const Hu=Object.freeze(Object.defineProperty({__proto__:null,Children:Df,Component:We,Fragment:Qt,PureComponent:Ds,StrictMode:Pf,Suspense:Zi,SuspenseList:Jr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:yf,cloneElement:kf,createContext:Ci,createElement:Tt,createFactory:Cf,createPortal:Mu,createRef:cf,default:Me,findDOMNode:wf,flushSync:Uu,forwardRef:qe,hydrate:If,isElement:Mf,isFragment:Nf,isMemo:bf,isValidElement:ko,lazy:Tf,memo:Fn,render:xu,startTransition:ku,unmountComponentAtNode:Bu,unstable_batchedUpdates:Lf,useCallback:st,useContext:sr,useDebugValue:yu,useDeferredValue:wu,useEffect:Z,useErrorBoundary:function(e){var t=Hr(xn++,10),n=ct();return t.__=e,vt.componentDidCatch||(vt.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:Cu,useImperativeHandle:or,useInsertionEffect:Pu,useLayoutEffect:Ne,useMemo:lt,useReducer:Qs,useRef:Q,useState:ct,useSyncExternalStore:bu,useTransition:Lu,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));var ju=Object.prototype.hasOwnProperty;function Yt(e){return Array.isArray(e)}function pn(e){return!(!e||typeof e!="object"||e instanceof Date||Yt(e))}function YA(e){return pn(e)&&e.constructor===Object}function at(e){return typeof e=="function"}function De(e){const t=typeof e;return e!==void 0&&(bl(e)||t!=="object"&&t!=="function")}function bl(e){return e instanceof Date}function xf(e){return typeof e=="boolean"}function dn(e){return e instanceof Promise}function Zt(e){return e instanceof Map||e instanceof WeakMap}function Bn(e){return e instanceof Set||e instanceof WeakSet}function Os(e){if(!e)return!1;if(Yt(e))return e.length===0;if(Zt(e)||Bn(e))return e.size===0;for(const t in e)if(ju.call(e,t))return!1;return!0}var GA=new Set(["boolean","string","number"]);function ta(e){return!!e.parent}var WA=Symbol.toPrimitive,XA=Symbol.iterator,Ei=Symbol("getNode"),ea=Symbol("delete"),Ff=Symbol("opaque"),KA=Symbol("plain"),$u=Symbol("optimized"),co=Symbol("linked"),Vt={pendingNodes:new Map,dirtyNodes:new Set};function ho(e){return e&&(e[Ff]||e.$$typeof)}function Bf(e){return e&&e[KA]}function Uf(e){return Yt(e)?"array":Zt(e)?"map":e instanceof Set?"set":"object"}function qA(e,t){return Zt(t)?{__LSType:"Map",value:Array.from(t.entries())}:t instanceof Set?{__LSType:"Set",value:Array.from(t)}:(Vt.replacer&&(t=Vt.replacer(e,t)),t)}var JA=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function ZA(e,t){if(t){if(typeof t=="string"&&JA.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)}Vt.reviver&&(t=Vt.reviver(e,t))}return t}function Hf(e){return e&&JSON.stringify(e,qA)}function jf(e){return e&&JSON.parse(e,ZA)}function $f(e){return jf(Hf(e))}function jt(e){return!!e&&!!e[Ei]}function wo(e){return e&&e[Ei]}function Vf(e,t,n,r,i){return r?e.add(n):i?e.set(t,n):e[t]=n,n}function Pn(e,t){var n;const r=(n=e.parent)!=null?n:e,i=e.parent?e.key:"_",o=t===ea;o&&(t=void 0);const s=e.parent?Vu(r):r.root,a=Bn(s),l=Zt(s),c=a?i:l?s.get(i):s[i],u=at(t);if((t=r.isAssigning||!u||at(c)?t:t(c))!==c)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:Vf(s,i,t,a,l)}finally{r.isSetting--}return{prevValue:c,newValue:t,parentValue:s}}var od=[];function Nt(e){let t=0,n=e;for(;ta(n);)od[t++]=n.key,n=n.parent;let r=e.root._;for(let i=t-1;r&&i>=0;i--){const o=od[i];r=o!=="size"&&Zt(r)?r.get(o):r[o]}return r}function nn(e,t,n){var r,i;let o=(r=e.children)==null?void 0:r.get(t);return o||(o={root:e.root,parent:e,key:t,lazy:!0,numListenersRecursive:0},((i=e.lazyFn)==null?void 0:i.length)===1&&(n=e.lazyFn.bind(e,t)),at(n)&&(o=Object.assign(()=>{},o),o.lazyFn=n),e.children||(e.children=new Map),e.children.set(t,o)),o}function Vu(e){let t=Nt(e);if(!t||at(t))if(ta(e)){const n=Vu(e.parent),r=Bn(n),i=Zt(n);t=Vf(n,e.key,{},r,i)}else t=e.root._={};return t}function zf(e,t){var n,r;let i=jt(e)?void 0:pn(e)?"id"in e?"id":"key"in e?"key":"_id"in e?"_id":"__id"in e?"__id":void 0:void 0;if(!i&&t.parent){const o=t.key+"_keyExtractor",s=(r=(n=t.functions)==null?void 0:n.get(o))!=null?r:Nt(t.parent)[t.key+"_keyExtractor"];s&&at(s)&&(i=s)}return i}function sd(e,t,n){e.functions||(e.functions=new Map),e.functions.set(t,n)}function Yf(e,t){return e===t||bl(e)&&bl(t)&&+e==+t}function kl(e,t,n,r){return t?void 0:e?r?Array.from(e):n?Array.from(e.keys()):Object.keys(e):[]}function QA(e,t){return e&&Object.defineProperty(e,t,{value:!0,enumerable:!1,writable:!0,configurable:!0}),e}var ad=function(e){return QA(e,Ff)};function Gf(e,t){var n;e.isPlain||!((n=e.parent)!=null&&n.isPlain)&&!Bf(t)||(e.isPlain=!0)}function fn(e,t,n,r){let i=e;return!jt(i)&&at(i)&&(i=n?i(n):i()),jt(i)&&!r?i.get(t):i}var Qi,tg=(e,t)=>e&&e[t];function Wf(e,t,n,r,i,o,s){let a,l=e;if(t.length>0){let c=o;for(let u=0;u<t.length;u++){a=t[u];const h=Zt(l);let d=l?h?l.get(a):l[a]:void 0;const p=c?h?c.get(a):c[a]:void 0;if(d===ea)return c&&(h?l.set(a,p):l[a]=p,s==null||s(t.slice(0,u+1),p)),e;if(d===void 0&&r===void 0&&u===t.length-1)return e;u<t.length-1&&d==null&&(d=zu(n[u]),Zt(l)?l.set(a,d):l[a]=d),u<t.length-1&&(l=d,c&&(c=p))}}return a===void 0?e=i==="merge"?vs(e,r):r:i==="merge"?l[a]=vs(l[a],r):Zt(l)?l.set(a,r):l[a]=r,e}function ld(e,t,n){let r=n;for(let i=0;i<e.length;i++){const o=e[i];r=r?r[o]:zu(t[i])}return r}function ud(e){return!(!e||(pn(e)||Yt(e))&&Os(e))}function zu(e){switch(e){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function eg(e,t,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=t;return Wf(e,r,s,o)}function vs(e,...t){if(De(e))return t[t.length-1];let n=Yt(e)?[...e]:{...e};for(let r=0;r<t.length;r++){const i=t[r];if(YA(i)||Yt(i)){const o=i;for(const s in o)ju.call(o,s)&&(o[s]instanceof Object&&!jt(o[s])&&Object.keys(o[s]).length>0?n[s]=vs(n[s]||(Yt(o[s])?[]:{}),o[s]):n[s]=o[s])}else n=i}return n}var Ss=0,Ca=!1,Na=!1,ii=new Map;function ng(){ii.size>0&&Ni(!0)}function Xf(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function rg(e,t){try{return function(n,r){for(let i=0;i<r.length;i++)n=eg(n,r[i]);return n}(e?$f(e):{},t)}catch(n){return}}function Yu(e,t){return function(){return rg(e,t)}}function po(e,t,n,r,i){const o=new Map;Ts(o,e,!!Vt.isLoadingLocal,!!Vt.isLoadingRemote,t,[],[],t,n,!0,r,i);const s=ii.get(e);s?s.prev===t?ii.delete(e):s.value=t:ii.set(e,{value:t,prev:n,level:r,whenOptimizedOnlyIf:i,isFromSync:!!Vt.isLoadingRemote,isFromPersist:!!Vt.isLoadingLocal}),o.size&&Kf(o,!0),Ss<=0&&qf()}function Ts(e,t,n,r,i,o,s,a,l,c,u,h){if(t.numListenersRecursive>0&&(function(d,p,f,m,E,A,_,g,v,S,I,R){if(S?p.listenersImmediate:p.listeners){const y={path:A,pathTypes:_,valueAtPath:g,prevAtPath:v},D=d.get(p);if(D&&A.length>0){const{changes:O}=D;Xf(O[0].path,y.path)||(O.push(y),D.level=Math.min(D.level,I),D.whenOptimizedOnlyIf||(D.whenOptimizedOnlyIf=R))}else d.set(p,{level:I,value:E,isFromSync:m,isFromPersist:f,whenOptimizedOnlyIf:R,changes:[y]})}}(e,t,n,r,i,o,s,a,l,c,u,h),t.linkedFromNodes))for(const d of t.linkedFromNodes)Ts(e,ig(d,o),n,r,a,[],[],a,l,c,0,h);if(t.parent){const d=t.parent;d&&Ts(e,d,n,r,Nt(d),[t.key].concat(o),[Uf(i)].concat(s),a,l,c,u+1,h)}}function Kf(e,t){const n=new Set;e.forEach(({changes:r,level:i,value:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},c)=>{const u=t?c.listenersImmediate:c.listeners;if(u){let h;const d=Array.from(u);for(let p=0;p<d.length;p++){const f=d[p],{track:m,noArgs:E,listener:A}=f;n.has(A)||(m===!0?i<=0:m!==$u||l&&i<=0)&&(E||h||(h={value:o,isFromPersist:s,isFromSync:a,getPrevious:Yu(o,r),changes:r}),m||n.add(A),A(h))}}})}function qf(){const e=Array.from(Vt.dirtyNodes);Vt.dirtyNodes.clear(),e.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const t=ii;ii=new Map;const n=new Map;t.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},c)=>{Ts(n,c,s,a,r,[],[],r,i,!1,o,l)}),n.size&&Kf(n,!1)}function _i(e){na();try{e()}finally{Ni()}}function na(){Ss++,Qi||(Qi=setTimeout(ng,0))}function Ni(e){(--Ss<=0||e)&&(Ca?Na=!0:(Qi&&(clearTimeout(Qi),Qi=void 0),Ss=0,Ca=!0,qf(),Ca=!1,Na&&(Na=!1,Ni(!0))))}function ig(e,t){let n=e;for(let r=0;r<t.length;r++)n=nn(n,t[r]);return n}function Gu(e,t,n,r,i){if(jt(e))return e;const o=dn(e);let s={root:{_:e},lazy:!0,numListenersRecursive:0};at(e)&&(s=Object.assign(()=>{},s),s.lazyFn=e);var a;const l=t||(a=e,GA.has(typeof a))?new i(s):r(s);return o&&(Pn(s,void 0),n(s,e)),l}var Zr=new WeakMap,Jf=[],Zf=[],Qf=[],Qr=0,wl=!1;function ba(e,t,n){const r=Zr.get(e);if(!r||!r.has(n))return;const i=r.get(n);i&&i.size!==0&&(Jf[Qr]=e,Zf[Qr]=t,Qf[Qr]=n,Qr++,wl||(wl=!0,queueMicrotask(og)))}var Bi={type:"listener-added",node:null,listener:void 0,timestamp:0};function og(){wl=!1;const e=typeof performance!="undefined"?performance.now():Date.now();Bi.timestamp=e;for(let t=0;t<Qr;t++){const n=Jf[t],r=Zf[t],i=Qf[t],o=Zr.get(n);if(!o)continue;const s=o.get(i);if(!s||s.size===0)continue;const a=n.listeners,l=n.listenersImmediate;if(!a&&!l)continue;let c=!1;if(c=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),c){Bi.type=i,Bi.node=n,Bi.listener=r;const u=Array.from(s);for(let h=0;h<u.length;h++)try{u[h](Bi)}catch(d){console.error(`Error in middleware handler for ${i}:`,d)}}}Qr=0}function rr(e,t,n={},r){var i;const{initial:o,immediate:s,noArgs:a}=n,{trackingType:l}=n;let c=s?e.listenersImmediate:e.listeners;c||(c=new Set,s?e.listenersImmediate=c:e.listeners=c);const u={listener:t,track:l,noArgs:a};if(c.add(u),o){const m=Nt(e);t({value:m,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:m,valueAtPath:m}],getPrevious:()=>{}})}let h;function d(m,E=t,A){if(!(r!=null&&r.has(m))){r||(r=new Set),r.add(A||e),E||(E=t);const _={trackingType:!0,...n};h=[...h||[],rr(m,E,_,r)]}}e.linkedToNode&&d(e.linkedToNode),(i=e.linkedFromNodes)==null||i.forEach(m=>d(m)),e.numListenersRecursive++;let p=e.parent,f=[e.key];for(;p;){if(p.linkedFromNodes)for(const m of p.linkedFromNodes)r!=null&&r.has(m)||d(m,sg(m,f,t),p);p.numListenersRecursive++,f=[p.key,...f],p=p.parent}return ba(e,u,"listener-added"),()=>{c.delete(u),h==null||h.forEach(E=>E());let m=e;for(;m;)m.numListenersRecursive--,m=m.parent;ba(e,u,"listener-removed"),c.size===0&&ba(e,void 0,"listeners-cleared")}}function sg(e,t,n){let r=ld(t,[],Nt(e));return function({value:i,isFromPersist:o,isFromSync:s}){const a=ld(t,[],i);a!==r&&n({value:a,isFromPersist:o,isFromSync:s,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:a}],getPrevious:()=>r}),r=a}}function cd(e,t,n,r){let i=[];return e==null||e.forEach(o=>{const{node:s,track:a}=o;i.push(rr(s,t,{trackingType:a,immediate:r,noArgs:n}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var ss=0,dd=[],ti={current:void 0};function as(e,t){if(ss){const n=ti.current;if(n){n.nodes||(n.nodes=new Map);const r=n.nodes.get(e);r?(r.track=r.track||t,r.num++):n.nodes.set(e,{node:e,track:t,num:1})}}}function tm(e,t,n,r,i,o){let s,a,l=t;dd.push(ti.current),ss++,ti.current={};const c=e&&fn(e,n,r,i==null?void 0:i.fromComputed),u=ti.current.nodes;return--ss<0&&(ss=0),ti.current=dd.pop(),r!=null&&r.cancel||(s=cd(u,l,!1,i==null?void 0:i.immediate),a=o?()=>(s==null||s(),s=cd(u,l),s):void 0),{nodes:u,value:c,dispose:s,resubscribe:a}}function Ee(e,t,n){let r,i;at(t)?r=t:n=t;let o=!1;const s={num:0},a=function(){if(o)return;s.onCleanup&&(s.onCleanup(),s.onCleanup=void 0),o=!0,na(),delete s.value,i==null||i();const{dispose:l,value:c,nodes:u}=tm(e,a,void 0,s,n);var h,d;i=l,s.value=c,s.nodes=u,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),Ni(),o=!1,!r||!(n!=null&&n.fromComputed)&&(!(s.num>0)&&(h=e)&&((d=h[Ei])!=null&&d.isEvent)||s.previous===s.value&&typeof s.value!="object")||r(s),s.previous=s.value,s.num++};return a(),()=>{var l,c;(l=s.onCleanup)==null||l.call(s),s.onCleanup=void 0,(c=s.onCleanupReaction)==null||c.call(s),s.onCleanupReaction=void 0,i==null||i()}}function em(e,t,n){if(dn(e))return t?e.then(t):e;const r=Yt(e);let i,o;return Ee(function(s){const a=r?e.map(l=>fn(l)):fn(e);if(!dn(a)){{let l=!0;if(Yt(a))for(let c=0;c<a.length;c++){let u=a[c];jt(u)?u=fn(u):at(u)&&(u=u()),l=l&&!!(n?ud(u):u)}else l=n?ud(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=t==null?void 0:t(i)}),dn(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 c=a(l);s(dn(c)?c.then(u=>u):c)}}else t=s})}function nm(e,t){return em(e,t,!1)}var ka=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),hd=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),ag=new Set(["filter","find"]),Ll=new Map,Pl=new Map([["get",ra],["set",Xe],["peek",bi],["onChange",rr],["assign",function(e,t){const n=ye(e);if(na(),De(e.root._)&&(e.root._={}),Zt(t)){const r=Nt(e);Zt(r)?t.forEach((i,o)=>r.set(o,i)):Xe(e,t)}else{e.isAssigning=(e.isAssigning||0)+1;try{Object.assign(n,t)}finally{e.isAssigning--}}return Ni(),n}],["delete",om],["toggle",function(e){const t=Nt(e);(t==null||xf(t))&&Xe(e,!t)}]]);function rm(e,t,n,...r){var i;if(n!=="push"||r.length!==1){const o=t.slice(),s=t[n].apply(t,r);if(e){const a=ta(e),l=a?e.key:"_";(a?Nt(e.parent):e.root)[l]=o,Ai((i=e.parent)!=null?i:e,l,t)}return s}Ai(e,t.length+"",r[0])}function Wu(e,t,n){var r,i,o;if(pn(t)&&ho(t)||pn(n)&&ho(n)){const S=t!==n;return S&&(e.listeners||e.listenersImmediate)&&po(e,t,n,0),S}const s=Yt(t);let a,l;const c=Zt(t),u=Bn(t),h=Zt(n),d=Bn(n),p=kl(t,s,c,u),f=kl(n,s,h,d),m=((r=p||t)==null?void 0:r.length)||0,E=((i=f||n)==null?void 0:i.length)||0;let A,_,g,v=!1;if(s&&Yt(n)){if(n.length>0){const S=n[0];if(S!==void 0&&(A=zf(S,e),A&&(_=at(A),a=new Map,l=[]),e.children))for(let I=0;I<n.length;I++){const R=n[I];if(R){const y=e.children.get(I+"");if(y&&(t[I]||pd(y,R),A)){const D=_?A(R):R[A];a.set(D,y)}}}}}else if(n&&(!t||pn(t))){const S=f.length;for(let I=0;I<S;I++){const R=f[I];if(!p.includes(R)){v=!0;const y=nn(e,R),D=h?n.get(R):n[R];D!==void 0&&pd(y,D)}}}if(t&&!De(t)){v=v||m!==E;const S=v;let I=!1;for(let R=0;R<m;R++){const y=s?R+"":p[R];let D=c?t.get(y):t[y];const O=h?n==null?void 0:n.get(y):n==null?void 0:n[y];let C=!Yf(D,O);if(C){const b=A&&D?_?A(D):D[A]:void 0,L=(o=e.children)==null?void 0:o.get(y);if(jt(D)){const F=wo(D);if((L==null?void 0:L.linkedToNode)===F){const B=Nt(F);c?t.set(y,B):t[y]=B;continue}const H=D;D=()=>H}let w=nn(e,y,D);if(w.lazy||!at(D)&&!jt(D)||(lm(w,D),kr(w)),s&&b!==void 0){const F=b!==void 0?a==null?void 0:a.get(b):void 0;if(F){if(F!==void 0&&F.key!==y){const H=n[F.key];S&&(w=F,e.children.delete(w.key),w.key=y,l.push([y,w])),I=!0,C=H!==D}}else v=!0}if(C)if(at(D)||jt(D))Di(e,y,D);else if(De(D))v=!0;else{const F=Wu(w,D,O);v=v||F,C=F}(C||s&&!S)&&(w.listeners||w.listenersImmediate)&&po(w,D,O,0,!S)}}if(l)for(let R=0;R<l.length;R++){const[y,D]=l[R];e.children.set(y,D)}g=v||I}else n!==void 0&&(g=!0);return g!=null&&g}function pd(e,t){var n,r;(n=e.linkedToNodeDispose)==null||n.call(e),(r=e.activatedObserveDispose)==null||r.call(e),De(t)||Wu(e,void 0,t),(e.listeners||e.listenersImmediate)&&po(e,void 0,t,0)}function ye(e,t,n){return t!==void 0&&(e=nn(e,t,n)),e.proxy||(e.proxy=new Proxy(e,im))}function Ml(){if(Vt.pendingNodes.size>0){const e=Array.from(Vt.pendingNodes.values());Vt.pendingNodes.clear(),e.forEach(t=>t())}}var im={get(e,t,n){var r,i;if(t===WA)throw new Error("[legend-state] observable is not a primitive.");if(t===Ei)return e;if(t==="apply"||t==="call"){const h=Nt(e);if(at(h))return h[t]}let o=kr(e,t==="get"||t==="peek");if(t===XA)return!o||De(o)?void 0:o[t];const s=e.linkedToNode||(o==null?void 0:o[Ei]);if(s&&t!=="onChange")return im.get(s,t,n);if(Zt(o)||Bn(o)){const h=function(d,p,f){const m=f==null?void 0:f[p];if(p==="size")return as(d,!0),f[p];if(at(m))return function(E,A,_){const g=arguments.length,v=f;if(p==="get"){if(g>0&&typeof E!="boolean"&&E!==$u)return ye(d,E)}else{if(p==="set")return g===2?Xe(nn(d,E),A):g===1&&Zt(f)&&Xe(d,E),ye(d);if(p==="delete"){if(g>0){const I=f.get?v.get(E):E;return om(d,E),I!==void 0}}else{if(p==="clear"){const I=Bn(v)?new Set(v):new Map(v),R=v.size;return v.clear(),void(R&&sm(d,f,I))}if(p==="add"){const I=new Set(f),R=f.add(E);return f.has(p)||po(d,R,I,0),ye(d)}}}const S=Pl.get(p);if(!S)return f[p](E,A);switch(g){case 0:return S(d);case 1:return S(d,E);case 2:return S(d,E,A);default:return S(d,E,A,_)}}}(e,t,o);if(h!==void 0)return h}const a=Pl.get(t);if(a)return t!=="get"&&t!=="peek"||Ml(),function(h,d,p){switch(arguments.length){case 0:return a(e);case 1:return a(e,h);case 2:return a(e,h,d);default:return a(e,h,d,p)}};const l=Ll.get(t);if(l)return l.get(e);let c=o==null?void 0:o[t];if(pn(o)&&ho(o))return c;const u=(r=e.functions)==null?void 0:r.get(t);if(u)return jt(u)?u:ye(e,t,u);if(c=function(h,d){if(h){const p=Object.getOwnPropertyDescriptor(h,d);return p!=null&&p.get&&(delete h[d],h[d]=p.set?function(f){at(f)&&(f={get:f});const m=function(){return{[co]:f}};return m.prototype[co]=f,m}({get:p.get,set:({value:f})=>p.set(f)}):p.get),h[d]}}(o,t),function(h){return h==null}(o)&&c===void 0&&(ka.has(t)||hd.has(t))&&(o=[],ka.has(t)&&Pn(e,o),c=o[t]),at(c)){if(Yt(o)){if(ka.has(t))return(...d)=>rm(e,o,t,...d);if(hd.has(t))return as(e,!0),function(d,p){const f=t==="reduce",m=f?(_,g,v,S)=>d(_,ye(e,v+"",g),v,S):(_,g,v)=>d(ye(e,g+"",_),g,v);if(f||!ag.has(t))return o[t](m,p);const E=t==="find",A=[];for(let _=0;_<o.length;_++)if(m(o[_],_,o)){const g=ye(e,_+"");if(E)return g;A.push(g)}return E?void 0:A}}Di(e,t,c);const h=(i=e.functions)==null?void 0:i.get(t);return h?ye(e,t,h):c.bind(o)}return De(c)&&t==="length"&&Yt(o)?(as(e,!0),c):ye(e,t)},getPrototypeOf(e){const t=Nt(e);return t!==null&&typeof t=="object"?Reflect.getPrototypeOf(t):null},ownKeys(e){kr(e);const t=ra(e,!0);if(De(t))return[];const n=t?Reflect.ownKeys(t):[];if(Yt(t)&&n[n.length-1]==="length"&&n.splice(n.length-1,1),at(e)){const r=Reflect.ownKeys(e);["caller","arguments","prototype"].forEach(i=>r.includes(i)&&n.push(i))}return n},getOwnPropertyDescriptor(e,t){if(t==="caller"||t==="arguments"||t==="prototype")return{configurable:!1,enumerable:!1};const n=Nt(e);if(De(n))return;const r=Reflect.getOwnPropertyDescriptor(n,t);return r?{...r,configurable:!0}:void 0},set(e,t,n){if(e.isSetting)return Reflect.set(e,t,n);if(e.isAssigning)return Ai(e,t,n),!0;const r=Ll.get(t);return!!r&&(r.set(e,n),!0)},deleteProperty:(e,t)=>!!e.isSetting&&Reflect.deleteProperty(e,t),has(e,t){const n=Nt(e);return Reflect.has(n,t)},apply(e,t,n){jt(t)&&(t=t.peek());const r=Nt(e),i=at(r)?r:e.lazyFn||e;return Reflect.apply(i,t,n)}};function Xe(e,t){e.parent?Ai(e.parent,e.key,t):Ai(e,"_",t)}function Ai(e,t,n,r){const i=!e.parent&&t==="_";Gf(e,n),!e.parent||Nt(e)||at(n)||Xe(e,{[t]:n});const o=i?e:nn(e,t,n);if(jt(n))Rs(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=Pn(o,n),c=De(a)||a instanceof Date||De(s)||s instanceof Date;if(!c){let d=o;do d.needsExtract=!0,d.recursivelyAutoActivated=!1;while(d=d.parent)}const u=!Yf(s,a),h=!u&&o.isComputing&&!c&&!o.isPlain;!u&&!h||o.isComputing&&o.isPlain&&e.numListenersRecursive===0||sm(e,s,a,o,l,c,i,r,h),Di(e,t,s)}}function om(e,t){t===void 0&&ta(e)&&(t=e.key,e=e.parent);const n=Nt(e);Yt(n)?rm(e,n,"splice",t,1):Ai(e,t!=null?t:"_",ea,-1)}function sm(e,t,n,r,i,o,s,a,l){r||(r=e),na(),o===void 0&&(o=De(t));let c,u,h=l||o,d=!1;(!o||n&&!De(n))&&(h=h||Wu(r,t,n),Yt(t)?c=t:(Zt(t)||Bn(t))&&(u=t)),Yt(i)?c=i:(Zt(i)||Bn(i))&&(u=i),c?d=(c==null?void 0:c.length)!==(n==null?void 0:n.length):u&&(d=(u==null?void 0:u.size)!==(n==null?void 0:n.size)),(o||!t||Os(t)&&!Os(n)?t!==n:h)&&po(o&&s?e:r,t,n,(a!=null?a:n===void 0)?-1:h?0:1,d),Ni()}function gi(e,t,n){const r=e.numGets=(e.numGets||0)+1;e.state||(e.state=Gu({isLoaded:!1},!1,gi,ye)),t.then(i=>{r>=(e.getNumResolved||0)&&(e.getNumResolved=e.numGets,n?n({value:i}):Xe(e,i),e.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{e.state.error.set(i)})}function Di(e,t,n){if(dn(n)){const r=nn(e,t);return gi(r,n),void Pn(r,void 0)}if(jt(n)){const r=()=>n;sd(e,t,r);const i=nn(e,t,r),o=bi(wo(n));return Rs(i,n),Pn(i,o),Nt(i)}if(typeof n=="function")return sd(e,t,n),t}function ra(e,t){return as(e,t?pn(t)?t.shallow:t:void 0),bi(e)}function bi(e){return kr(e,!0)}var Yo=!1;function kr(e,t){var n;if(Yo=!0,t&&((n=e.dirtyChildren)==null?void 0:n.size)){const i=Array.from(e.dirtyChildren);e.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&kr(o))}if(e.dirtyFn){const i=e.dirtyFn;e.dirtyFn=void 0,Vt.dirtyNodes.delete(e),i()}Yo=!1;let r=Nt(e);return e.root.isLoadingLocal||e.isPlain||(r=function(i,o,s){const a=o,l=i.lazy;if(l){const c=i.lazyFn;if(delete i.lazy,at(c))if(c.length===1)o={};else{if(i.parent){const u=Nt(i.parent);at(o)&&(u?delete u[i.key]:i.root._=void 0)}o=function(u,h){let d,p,f,m=!0;const E=h;let A,_,g=[];function v(){u.dirtyFn=_,Vt.dirtyNodes.add(u)}const S=Ee(()=>{var I,R,y,D;if(m)m=!1,at(Nt(u))&&Pn(u,void 0);else if(!Yo&&_&&function(w,F){if(!Yo&&!function(B){var K,X;let G=B,W=B.numListenersRecursive>0;for(;G&&!W;)((K=G.listeners)!=null&&K.size||(X=G.listenersImmediate)!=null&&X.size)&&(W=!0),G=G.parent;return W}(w)){F&&(w.dirtyFn=F);let B=w;for(;B;)B.dirtyChildren||(B.dirtyChildren=new Set),B.dirtyChildren.add(w),B=B.parent;return!0}}(u,_))return void(f=!0);let O=E(),C=!1;const b=jt(O);(b||u.linkedToNode)&&(C=b,O=Rs(u,O)),at(O)&&O.length===0&&(O=O());const L=b||O==null?void 0:O[co];if(L&&(u.activationState=L,O=void 0),f=!1,p=dn(O),u.activated){if(u.activationState){const w=u.activationState;(R=(I=u.state)==null?void 0:I.peek())!=null&&R.sync?(u.state.sync(),f=!0):O=(D=(y=w.get)==null?void 0:y.call(w))!=null?D:w.initial}}else{u.activated=!0;let w=lg;L!=null&&L.synced&&(w=Vt.activateSyncedNode,f=!0);const F=w(u,O);d=F.update;let H=F.value;!C&&jt(H)&&(H=Rs(u,H)),O=H!=null?H:L==null?void 0:L.initial}return f&&(A=O),p=p||dn(O),O},I=>{const{value:R,nodes:y,refresh:D}=I;if(_=D,!f){if(!p||!Vt.isLoadingRemote)if(p)if(u.activationState){const{initial:O}=u.activationState;R&&dn(R)&&gi(u,R,d),at(Nt(u))&&Pn(u,O!=null?O:void 0)}else u.activated&&(gi(u,R,d),at(Nt(u))&&Pn(u,void 0));else{A=R;const O=u.state.isLoaded.peek();!O&&at(R)||(u.isComputing=!0,Xe(u,R),u.isComputing=!1),O||u.state.assign({isLoaded:!0,error:void 0})}g.forEach(O=>O()),g=[],y==null||y.forEach(({node:O,track:C})=>{g.push(rr(O,v,{immediate:!0,trackingType:C}))})}I.cancel=!0},{fromComputed:!0});return u.activatedObserveDispose=()=>{S==null||S(),g.forEach(I=>I())},A}(i,c)}else jt(o)&&(o=Di(i.parent,i.key,o))}return Gf(i,o),!l&&!i.needsExtract||i.isPlain||jt(o)||De(o)||(s&&function(c,u){if(!u.recursivelyAutoActivated&&(pn(c)||Yt(c))&&!ho(c)){u.recursivelyAutoActivated=!0;const h=[];um(c,h,()=>{var p;let f=u;for(let m=0;m<h.length;m++){const E=h[m],A=(p=Nt(f))==null?void 0:p[E];f=nn(f,E,at(A)?A:void 0),kr(f)}return f})}}(o,i),i.parent&&Di(i.parent,i.key,a)),o}(e,r,!!t)),r}function am(e){var t,n;(t=e.activatedObserveDispose)==null||t.call(e),(n=e.linkedToNodeDispose)==null||n.call(e),e.activatedObserveDispose=e.linkedToNodeDispose=e.linkedToNode=void 0}function lm(e,t){am(e),e.lazyFn=t,e.lazy=!0}function lg(e,t){if(e.state||(e.state=Gu({isLoaded:!1},!1,gi,ye)),e.activationState){const{set:n,get:r,initial:i}=e.activationState;if((t=r==null?void 0:r())!=null&&t!==null||(t=i),n){let o,s=[],a=0;const l=c=>{if(s.length>0){let u,h,d,p=!1,f=!1;c?(u=c.changes,h=c.value,p=c.isFromPersist,f=c.isFromSync,d=c.getPrevious):(u=s,h=o,d=Yu(h,u)),s=[],o=void 0,Vt.pendingNodes.delete(e),a++;const m=a,E=()=>{m===a&&(e.isComputing=!0,n({value:h,changes:u,isFromPersist:p,isFromSync:f,getPrevious:d}),e.isComputing=!1)};em(e.state.isLoaded,E,!0)}};rr(e,({value:c,changes:u})=>{e.isComputing||(u.length>1||!at(u[0].prevAtPath))&&(o=c,s.length>0&&(u=u.filter(h=>!Xf(s[0].path,h.path))),s.push(...u),Vt.pendingNodes.set(e,l))},{immediate:!0}),rr(e,l)}}return{update:({value:n})=>{e.isComputing||(e.isComputing=!0,Xe(e,n),e.isComputing=!1)},value:t}}function Rs(e,t){var n;const r=t?wo(t):void 0;return r!==e&&(r==null?void 0:r.linkedToNode)!==e&&(e.linkedToNode=r,(n=e.linkedToNodeDispose)==null||n.call(e),r&&(r.linkedFromNodes||(r.linkedFromNodes=new Set),r.linkedFromNodes.add(e),e.linkedToNodeDispose=rr(r,()=>{at(t=kr(r))||Xe(e,t)},{initial:!0},new Set([e])))),t}function um(e,t,n){var r;if((pn(e)||Yt(e))&&!ho(e)&&!Bf(e)){for(const i in e)if(ju.call(e,i)){const o=e[i];if(jt(o)){const s=n();Di(s,i,o),delete s.lazy}else{const s=at(o)&&((r=o.prototype)==null?void 0:r[co]);if(s){const a=s.activate;(!a||a==="auto")&&bi(nn(n(),i,o))}}typeof o=="object"&&(t.push(i),um(o,t,n),t.pop())}}}var fd=["get","set","peek","onChange","toggle"];function oi(e){this._node=e;for(let t=0;t<fd.length;t++){const n=fd[t];this[n]=this[n].bind(this)}}function Go(e,t){oi.prototype[e]=function(...n){return t.call(this,this._node,...n)}}function Ut(e){return Gu(e,!1,gi,ye,oi)}Go("peek",e=>(Ml(),bi(e))),Go("get",(e,t)=>(Ml(),ra(e,t))),Go("set",Xe),Go("onChange",rr),Object.defineProperty(oi.prototype,Ei,{configurable:!0,get(){return this._node}}),oi.prototype.toggle=function(){const e=this.peek();(e==null||xf(e))&&this.set(!e)},oi.prototype.delete=function(){return this.set(void 0),this};var ia={createPreviousHandler:Yu,clone:$f,deactivateNode:am,deepMerge:vs,ensureNodeValue:Vu,findIDKey:zf,get:ra,getChildNode:nn,getKeys:kl,getNode:wo,getNodeValue:Nt,getPathType:Uf,getProxy:ye,getValueAtPath:function(e,t){return t.reduce(tg,e)},globalState:Vt,initializePathType:zu,ObservablePrimitiveClass:oi,observableProperties:Ll,observableFns:Pl,optimized:$u,peek:bi,reactivateNode:lm,registerMiddleware:function(e,t,n){let r=Zr.get(e);r||(r=new Map,Zr.set(e,r));let i=r.get(t);return i||(i=new Set,r.set(t,i)),i.add(n),()=>{const o=Zr.get(e);if(!o)return;const s=o.get(t);s&&(s.delete(n),s.size===0&&(o.delete(t),o.size===0&&Zr.delete(e)))}},safeParse:jf,safeStringify:Hf,set:Xe,setAtPath:Wf,setNodeValue:Pn,symbolLinked:co,symbolDelete:ea,tracking:ti},{globalState:md,observableProperties:ug,observableFns:cg,ObservablePrimitiveClass:Ed}=ia;class cm extends Error{}function _d(e,t){if(!e)throw new cm(t!=null?t:"Assertion failed")}const mt=Object.assign(_d,{is:function(e,t,n){return _d(t,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(e){throw new Error("Unreachable")},defined:function(e){if(e==null)throw new cm("Value is not defined")}});class oa{constructor(t={}){this._handlers=new Set,this._meta=t}meta(t){return new oa(t)}_emit(t,n){for(const r of this._handlers)r({level:t,data:n,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 Is=new oa,Qe=new oa;function Ad(e,t,n){return e.clearRect(0,0,100,100),e.fillStyle=n,e.fillText(t,0,0),e.getImageData(0,0,1,1).data.join(",")}function gd(e){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}(),n=Ad(t,e,"#fff"),r=Ad(t,e,"#000");return r===n&&!r.startsWith("0,0,0,")}const dg=Ci(null),wa={didCatch:!1,error:null};class dm extends We{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=wa}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:o,reason:"imperative-api"}),this.setState(wa)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;var o,s;r&&n.error!==null&&function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return a.length!==l.length||a.some((c,u)=>!Object.is(c,l[u]))}(t.resetKeys,i)&&((o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(wa))}render(){const{children:t,fallbackRender:n,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 n=="function")a=n(l);else if(r)a=Tt(r,l);else{if(i===void 0)throw s;a=i}}return Tt(dg.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var Wo=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Xu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Ku(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var hm={exports:{}},Dd={};const pm=Ku(Hu);var Oi=pm,hg=typeof Object.is=="function"?Object.is:function(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t},pg=Oi.useState,fg=Oi.useEffect,mg=Oi.useLayoutEffect,Eg=Oi.useDebugValue;function La(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hg(e,n)}catch(r){return!0}}var _g=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(e,t){return t()}:function(e,t){var n=t(),r=pg({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return mg(function(){i.value=n,i.getSnapshot=t,La(i)&&o({inst:i})},[e,n,t]),fg(function(){return La(i)&&o({inst:i}),e(function(){La(i)&&o({inst:i})})},[e]),Eg(n),n};Dd.useSyncExternalStore=Oi.useSyncExternalStore!==void 0?Oi.useSyncExternalStore:_g,hm.exports=Dd;var Ag=hm.exports,Od=!1,xl={inObserver:!1},vd=void 0,gg=()=>vd||(vd=Ci(null));function Sd(e){const t=nm(e);if(!Me.use)throw t;Me.use(t)}function dt(e,t){let n;if(xl.inObserver&&jt(e)&&!(t!=null&&t.suspense))return n=fn(e,t),t!=null&&t.suspense&&n===void 0&&Sd(e),n;try{const r=sr(gg()),i=lt(()=>function(l,c){let u,h,d,p,f,m,E=0;const A=()=>{h==null||h();const{value:g,dispose:v,resubscribe:S}=tm(p,_,l,void 0,void 0,!0);return h=v,d=S,g},_=({value:g})=>{if(c!=null&&c.peek()){const v=m;m=g,v===void 0&&nm(()=>!c.get(),()=>{const S=m;m=void 0,_({value:S})})}else{let v=l==null?void 0:l.skipCheck;if(!v){const S=A();(S!==f||!De(S)&&S===g)&&(v=!0)}v&&(E++,u==null||u())}};return{subscribe:g=>(u=g,!h&&d&&(h=d()),()=>{h==null||h(),h=void 0}),getVersion:()=>E,run:g=>(p=g,f=A())}}(t,r),[]),{subscribe:o,getVersion:s,run:a}=i;n=a(e),Ag.useSyncExternalStore(o,s,s)}catch(r){throw r}return t!=null&&t.suspense&&n===void 0&&Sd(e),n}var Td=typeof Symbol=="function"&&Symbol.for;function fm(e,t,n,r,i){const o=Td?Symbol.for("react.forward_ref"):qe(f=>null).$$typeof,s=Td?Symbol.for("react.memo"):Fn(f=>null).$$typeof;if(e.__legend_proxied)return e;let a=!1,l=!1,c=e;s&&c.$$typeof===s&&c.type&&(l=!0,c=c.type),o&&c.$$typeof===o&&(a=!0,c=c.render);const u=r?new Set(r):void 0,h={apply(f,m,E){if(n){const A=E[0],_={},g=Object.keys(A);for(let v=0;v<g.length;v++){const S=g[v],I=A[S],R=u&&u.has(S);if(S==="children"&&(at(I)||jt(I)))_[S]=dt(I,{skipCheck:!0});else if(R||S.startsWith("$")||S.endsWith("$")){const y=R?S:S.endsWith("$")?S.slice(0,-1):S.slice(1),D=i==null?void 0:i[y],O=D&&jt(I);if(_[y]=O&&(D!=null&&D.selector)?D.selector(_,I):dt(I),O&&(D.defaultValue!==void 0&&_[y]===void 0&&(_[y]=D.defaultValue),D.handler&&D.getValue)){const C=b=>{var L;I.set(D.getValue(b)),(L=A[D.handler])==null||L.call(A,b)};_[D.handler]=st(C,[A[D.handler],i])}R||delete _[S]}else _[S]===void 0&&(_[S]=I)}E[0]=_}return t?dt(()=>{xl.inObserver=!0;try{return Reflect.apply(f,m,E)}finally{xl.inObserver=!1}},{skipCheck:!0}):Reflect.apply(f,m,E)}},d=new Proxy(c,h);let p;return a?(p=qe(d),p.__legend_proxied=!0):p=d,t||l?Fn(p):p}var{findIDKey:Dg,getNode:Og,optimized:vg}=ia,Rd=new Map;function Fl({each:e,optimized:t,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!e)return null;const a=dt(()=>e.get(!t||vg));if(!n&&o){const c=Q();c.current=o,n=lt(()=>{return u=({item$:h,id:d})=>c.current(h,d),fm(u,!0);var u},[])}else if(n.$$typeof!==Symbol.for("react.memo")){let c=Rd.get(n);c||(c=Fn(n),Rd.set(n,c)),n=c}if(!a)return null;const l=[];if(Yt(a)){const c=a[0],u=Og(e),h=a.length,d=h>0?u&&Dg(c,u)||(c.id!==void 0?"id":c.key!==void 0?"key":void 0):void 0,p=at(d);for(let f=0;f<h;f++)if(a[f]){const m=a[f],E=(s=p?d(m):m[d])!=null?s:f,A=e[f],_={key:E,id:E,item$:A,item:A};l.push(Tt(n,r?Object.assign(_,r):_))}}else{const c=Zt(a),u=c?Array.from(a.keys()):Object.keys(a);i&&u.sort((h,d)=>i(c?a.get(h):a[h],c?a.get(d):a[d],h,d));for(let h=0;h<u.length;h++){const d=u[h];if(c?a.get(d):a[d]){const p=c?e.get(d):e[d],f={key:d,id:d,item$:p,item:p};l.push(Tt(n,r?Object.assign(f,r):f))}}}return l}Fn(function({children:e}){return dt(()=>fn(fn(e)),{skipCheck:!0})},(e,t)=>!t.scoped||e.children===t.children);var Id=new Map,yd=new Map;new Proxy({},{get(e,t){if(!e[t]){const n=Id.get(t)||t,r=qe((i,o)=>{const s={...i};return!o||!at(o)&&Os(o)||(s.ref=o),Tt(n,s)});e[t]=function(i,o,s){return fm(i,!1,!0,o,s)}(r,[],yd.get(t))}return e[t]}}),function(e){(function(t){if(Od)return;Od=!0;const n={value:{handler:"onChange",getValue:i=>i.target.value,defaultValue:""}},r=Object.assign({checked:{handler:"onChange",getValue:i=>i.target.checked}},n);t({binders:{input:r,textarea:n,select:n}})})(e)}(function({components:e,binders:t}){if(e)for(const n in e)Id.set(n,e[n]);if(t)for(const n in t)yd.set(n,t[n])});var Sg=(e,t)=>{{const n=Q({num:0});Z(()=>{var r;const{current:i}=n;i.num++;const o=()=>{i.dispose&&i.num<2&&(i.dispose(),i.dispose=void 0),i.num--};if(i.dispose!==void 0)return o;{const s=(r=e())!=null?r:null;if(s&&at(s))return i.dispose=s,()=>queueMicrotask(o)}},t)}};function mm(e){return Sg(()=>{const t=e();if(!dn(t))return t},[])}var Tg=mm;function Em(e){return mm(()=>e)}var Rg=Em,{deactivateNode:Ig}=ia;function He(e,t){var n;const r=Q({});r.current.value=e;const i=t?He(t):void 0;if(!((n=r.current)!=null&&n.obs$)){const o=i?at(e)&&e.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),fn(r.current.value)):e;r.current.obs$=Ut(o)}return i&&i.set(t),Em(()=>{const o=r.current.obs$;if(o){const s=wo(o);Ig(s)}}),r.current.obs$}function vi(e,t,n,r){let i;at(t)?i=t:Array.isArray(t)?(r=t,n=void 0):n=t,i&&Array.isArray(n)&&(r=n,n=void 0),r=r||(n==null?void 0:n.deps);const o=Q({}),s=r?He(r):void 0;o.current.selector=e,o.current.reaction=i,s&&s.set(r),Tg(()=>Ee(a=>{var l;return s==null||s.get(),fn((l=o.current)==null?void 0:l.selector,void 0,a)},a=>{var l,c;return(c=(l=o.current).reaction)==null?void 0:c.call(l,a)},n))}const[_m,be]=Dn(),[Am,Lo]=Dn(),[gm]=Dn(),[qu,Po]=Dn(),[yg,Cg]=Dn(),[Dm,gt]=Dn(),[Om,ki]=Dn(),[vm,Sm]=Dn(),[Tm,Ng]=Dn(),[bg,Ju]=Dn();function Dn(){const e=Ci(void 0);return[e,()=>{const t=sr(e);return mt(t!==void 0),t}]}const si={code:"en-US",name:"English (US)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/en.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json",translation:{YESTERDAY:"Yesterday",TODAY:"Today",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just now",LOCATION:"Location",CANCEL:"Cancel",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser notifications",DESKTOP_NOTIFICATIONS_ERROR:"Can't enable browser notifications because your browser actively blocks them. Try looking in the settings or using a different browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",ADD_REACTION:"Add reaction",AUTH_EXPIRED_OVERLAY_TITLE:"Your chat session has expired",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Refresh the page to continue",VOICE_MESSAGE:"Voice message",LEAVE_CONVERSATION:"Leave conversation",MARK_CONVERSATION_AS_UNREAD:"Mark as unread",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"hidden information",ARIA_LEAVE_SEARCH_MODE:"Leave search mode",ARIA_SEARCH_UP:"Search up",ARIA_SEARCH_DOWN:"Search down",ARIA_CLOSE_CHAT_POPUP:"Close the chat popup",ARIA_SEARCH_INSIDE_CONVERSATION:"Search inside this conversation",ARIA_SEARCH:"Search",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"set playback speed",ARIA_CANCEL_UPLOAD:"Cancel upload",ARIA_STOP_RECORDING:"Stop recording",ARIA_CANCEL_RECORDING:"Cancel recording",ARIA_INSERT_EMOJI:"Insert an emoji",ARIA_PLAY_AUDIO:"play audio",ARIA_PAUSE_AUDIO:"pause audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reactions with ${t}`,ARIA_MORE_ACTIONS:"More actions",ARIA_REPLYING_TO:(e,t)=>`Replying to ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Exit reply mode"}},Cd={ar:{code:"ar",name:"Arabic",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ar.js",emojiDataUrl:null,translation:{YESTERDAY:"الأمس",TODAY:"اليوم",DAYS:"يوم",HOURS:"ساعة",MINUTES:"دقيقة",JUST_NOW:"فقط الآن",LOCATION:"الموقع",CANCEL:"إلغاء",INBOX:"علبة الوارد",DESKTOP_NOTIFICATIONS:"إشعارات المتصفح",DESKTOP_NOTIFICATIONS_ERROR:"لا يمكن تمكين إشعارات المتصفح لأن متصفحك يمنعها بشكل نشط. جرّب البحث في الإعدادات أو استخدام متصفح آخر.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`إعلام ${e} التجريبي`,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:"رسالة صوتية",LEAVE_CONVERSATION:"الخروج من المحادثة",MARK_CONVERSATION_AS_UNREAD:"وضع علامة غير مقروءة",STATUS_INDICATOR_ONLINE:"نشط",STATUS_INDICATOR_OFFLINE:"بعيد",CONTACT_INFORMATION_HIDDEN:"المعلومات المخفية",ARIA_LEAVE_SEARCH_MODE:"الخروج من وضع البحث",ARIA_SEARCH_UP:"البحث لأعلى",ARIA_SEARCH_DOWN:"البحث لأسفل",ARIA_CLOSE_CHAT_POPUP:"إغلاق نافذة الدردشة",ARIA_SEARCH_INSIDE_CONVERSATION:"البحث داخل هذه المحادثة",ARIA_SEARCH:"بحث",ARIA_CHAT:"دردشة",ARIA_SET_PLAYBACK_SPEED:"تعيين سرعة التشغيل",ARIA_CANCEL_UPLOAD:"إلغاء الرفع",ARIA_STOP_RECORDING:"إيقاف التسجيل",ARIA_CANCEL_RECORDING:"إلغاء التسجيل",ARIA_INSERT_EMOJI:"إدراج رمز تعبيري",ARIA_PLAY_AUDIO:"تشغيل الصوت",ARIA_PAUSE_AUDIO:"إيقاف الصوت مؤقتاً",ARIA_REACTION_COUNT:(e,t)=>`${e} تفاعل مع ${t}`,ARIA_MORE_ACTIONS:"المزيد من الإجراءات",ARIA_REPLYING_TO:(e,t)=>`الرد على ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"الخروج من وضع الرد"}},bg:{code:"bg-BG",name:"Bulgarian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Вчера",TODAY:"Днес",DAYS:"Ден",HOURS:"Час",MINUTES:"m",JUST_NOW:"Току-що",LOCATION:"местоположението",CANCEL:"Откажи",INBOX:"Кутия",DESKTOP_NOTIFICATIONS:"Известия на браузъра",DESKTOP_NOTIFICATIONS_ERROR:"Не можете да активирате известията на браузъра, защото браузърът ви ги блокира активно. Опитайте да погледнете в настройките или да използвате друг браузър.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} демо известие`,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:"Маркирай като непрочетено",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Отсъстващ",ARIA_LEAVE_SEARCH_MODE:"Напусни режим на търсене",ARIA_SEARCH_UP:"Търси нагоре",ARIA_SEARCH_DOWN:"Търси надолу",ARIA_CLOSE_CHAT_POPUP:"Затвори прозореца за чат",ARIA_SEARCH_INSIDE_CONVERSATION:"Търси в този разговор",ARIA_SEARCH:"Търсене",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"задай скорост на възпроизвеждане",ARIA_CANCEL_UPLOAD:"Отмени качване",ARIA_STOP_RECORDING:"Спри запис",ARIA_CANCEL_RECORDING:"Отмени запис",ARIA_INSERT_EMOJI:"Вмъкни emoji",ARIA_PLAY_AUDIO:"възпроизведи аудио",ARIA_PAUSE_AUDIO:"паузирай аудио",ARIA_REACTION_COUNT:(e,t)=>`${e} реакции с ${t}`,ARIA_MORE_ACTIONS:"Още действия",ARIA_REPLYING_TO:(e,t)=>`Отговор на ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Излизане от режим на отговор"}},bs:{code:"bs-BA",name:"Bosnian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika se ne mogu omogućiti jer ih vaš preglednik aktivno blokira. Pokušajte pregledati postavke ili koristiti drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretrage",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor chata",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcija s ${t}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(e,t)=>`Odgovaranje korisniku ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},ca:{code:"ca-ES",name:"Catalan (ES)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ahir",TODAY:"Avui",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"ara mateix",LOCATION:"Ubicació",CANCEL:"Cancel·lar",INBOX:"Safata d'entrada",DESKTOP_NOTIFICATIONS:"Notificacions d'escriptori",DESKTOP_NOTIFICATIONS_ERROR:"No es poden habilitar les notificacions del navegador perquè el teu navegador les bloqueja activament. Prova de buscar a la configuració o utilitza un altre navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Notificació de demostració de ${e}`,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",ADD_REACTION:"Afegir reacció",VOICE_MESSAGE:"Missatge de veu",LEAVE_CONVERSATION:"Abandonar la conversa",MARK_CONVERSATION_AS_UNREAD:"marcar com no llegit",STATUS_INDICATOR_ONLINE:"Actiu",STATUS_INDICATOR_OFFLINE:"Absent",CONTACT_INFORMATION_HIDDEN:"informació oculta",AUTH_EXPIRED_OVERLAY_TITLE:"La teva sessió de xat ha caducat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualitza la pàgina per continuar",ARIA_LEAVE_SEARCH_MODE:"Sortir del mode de cerca",ARIA_SEARCH_UP:"Cercar cap amunt",ARIA_SEARCH_DOWN:"Cercar cap avall",ARIA_CLOSE_CHAT_POPUP:"Tancar la finestra de xat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cercar en aquesta conversa",ARIA_SEARCH:"Cercar",ARIA_CHAT:"Xat",ARIA_SET_PLAYBACK_SPEED:"establir velocitat de reproducció",ARIA_CANCEL_UPLOAD:"Cancel·lar la càrrega",ARIA_STOP_RECORDING:"Aturar l'enregistrament",ARIA_CANCEL_RECORDING:"Cancel·lar l'enregistrament",ARIA_INSERT_EMOJI:"Inserir un emoji",ARIA_PLAY_AUDIO:"reproduir àudio",ARIA_PAUSE_AUDIO:"pausar àudio",ARIA_REACTION_COUNT:(e,t)=>`${e} reaccions amb ${t}`,ARIA_MORE_ACTIONS:"Més accions",ARIA_REPLYING_TO:(e,t)=>`Responent a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sortir del mode de resposta"}},cs:{code:"cs-CZ",name:"Czech",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Včera",TODAY:"Dnes",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"právě teď",LOCATION:"Lokace",CANCEL:"Zrušit",INBOX:"Doručené",DESKTOP_NOTIFICATIONS:"Oznámení v prohlížeči",DESKTOP_NOTIFICATIONS_ERROR:"Nelze povolit notifikace prohlížeče, protože váš prohlížeč je aktivně blokuje. Zkuste se podívat na nastavení nebo zkuste použít jiný prohlížeč.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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é",STATUS_INDICATOR_ONLINE:"Aktivní",STATUS_INDICATOR_OFFLINE:"Nedostupný",ARIA_LEAVE_SEARCH_MODE:"Opustit režim vyhledávání",ARIA_SEARCH_UP:"Hledat nahoru",ARIA_SEARCH_DOWN:"Hledat dolů",ARIA_CLOSE_CHAT_POPUP:"Zavřít okno chatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Hledat v této konverzaci",ARIA_SEARCH:"Hledat",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"nastavit rychlost přehrávání",ARIA_CANCEL_UPLOAD:"Zrušit nahrávání",ARIA_STOP_RECORDING:"Zastavit nahrávání",ARIA_CANCEL_RECORDING:"Zrušit nahrávání",ARIA_INSERT_EMOJI:"Vložit emoji",ARIA_PLAY_AUDIO:"přehrát audio",ARIA_PAUSE_AUDIO:"pozastavit audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcí s ${t}`,ARIA_MORE_ACTIONS:"Další akce",ARIA_REPLYING_TO:(e,t)=>`Odpověď na ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Opustit režim odpovědi"}},da:{code:"da-DK",name:"Danish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/da/emojibase/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"t",MINUTES:"m",JUST_NOW:"lige nu",LOCATION:"Placering",CANCEL:"Annuller",INBOX:"Indbakke",DESKTOP_NOTIFICATIONS:"Browsermeddelelser",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Browsermeddelelser, fordi din browser aktivt blokerer dem. Prøv at kigge i indstillingerne eller benyt en anden browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Forlad søgemodus",ARIA_SEARCH_UP:"Søg opad",ARIA_SEARCH_DOWN:"Søg nedad",ARIA_CLOSE_CHAT_POPUP:"Luk chatvindue",ARIA_SEARCH_INSIDE_CONVERSATION:"Søg i denne samtale",ARIA_SEARCH:"Søg",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Indstil afspilningshastighed",ARIA_CANCEL_UPLOAD:"Annuller upload",ARIA_STOP_RECORDING:"Stop optagelse",ARIA_CANCEL_RECORDING:"Annuller optagelse",ARIA_INSERT_EMOJI:"Indsæt en emoji",ARIA_PLAY_AUDIO:"Afspil lyd",ARIA_PAUSE_AUDIO:"Pauser lyd",ARIA_REACTION_COUNT:(e,t)=>`${e} Reaktioner med ${t}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(e,t)=>`Svarer til ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Forlad svarstilstand"}},de:{code:"de-DE",name:"German",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/de.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/de/cldr/data.json",translation:{YESTERDAY:"Gestern",TODAY:"Heute",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"gerade jetzt",LOCATION:"Standort",CANCEL:"Abbrechen",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser-Benachrichtigungen",DESKTOP_NOTIFICATIONS_ERROR:"Browser-Benachrichtigungen können nicht aktiviert werden, da Ihr Browser sie aktiv blockiert. Versuchen Sie, in den Einstellungen nachzuschlagen oder einen anderen Browser zu verwenden.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Abwesend",ARIA_LEAVE_SEARCH_MODE:"Suchmodus verlassen",ARIA_SEARCH_UP:"Nach oben suchen",ARIA_SEARCH_DOWN:"Nach unten suchen",ARIA_CLOSE_CHAT_POPUP:"Chat-Popup schließen",ARIA_SEARCH_INSIDE_CONVERSATION:"In dieser Unterhaltung suchen",ARIA_SEARCH:"Suchen",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Wiedergabegeschwindigkeit einstellen",ARIA_CANCEL_UPLOAD:"Upload abbrechen",ARIA_STOP_RECORDING:"Aufnahme stoppen",ARIA_CANCEL_RECORDING:"Aufnahme abbrechen",ARIA_INSERT_EMOJI:"Emoji einfügen",ARIA_PLAY_AUDIO:"Audio abspielen",ARIA_PAUSE_AUDIO:"Audio pausieren",ARIA_REACTION_COUNT:(e,t)=>`${e} Reaktionen mit ${t}`,ARIA_MORE_ACTIONS:"Weitere Aktionen",ARIA_REPLYING_TO:(e,t)=>`Antworten an ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Antwortmodus verlassen"}},el:{code:"el-GR",name:"Greek (Greece)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Χθές",TODAY:"Σήμερα",DAYS:"Ημέρες",HOURS:"'Ωρες",MINUTES:"Λεπτά",JUST_NOW:"Μόλις τώρα",LOCATION:"Τοποθεσία",CANCEL:"Ακύρωση",INBOX:"Εισερχόμενα",DESKTOP_NOTIFICATIONS:"Ειδοποιήσεις περιηγητή",DESKTOP_NOTIFICATIONS_ERROR:"Δεν είναι δυνατή η ενεργοποίηση των ειδοποιήσεων του προγράμματος περιήγησης, επειδή το πρόγραμμα περιήγησης τις αποκλείει ενεργά. Δοκιμάστε να τσεκάρετε τις ρυθμίσεις ή να χρησιμοποιήσετε διαφορετικό πρόγραμμα περιήγησης.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} Δοκιμαστική επίδειξη`,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:"Επισήμανση ως μη αναγνωσμένα",STATUS_INDICATOR_ONLINE:"Ενεργός",STATUS_INDICATOR_OFFLINE:"Ανενεργός",ARIA_LEAVE_SEARCH_MODE:"Αποχώρηση από τη λειτουργία αναζήτησης",ARIA_SEARCH_UP:"Αναζήτηση προς τα πάνω",ARIA_SEARCH_DOWN:"Αναζήτηση προς τα κάτω",ARIA_CLOSE_CHAT_POPUP:"Κλείσιμο παραθύρου συνομιλίας",ARIA_SEARCH_INSIDE_CONVERSATION:"Αναζήτηση σε αυτή τη συνομιλία",ARIA_SEARCH:"Αναζήτηση",ARIA_CHAT:"Συνομιλία",ARIA_SET_PLAYBACK_SPEED:"ορισμός ταχύτητας αναπαραγωγής",ARIA_CANCEL_UPLOAD:"Ακύρωση φόρτωσης",ARIA_STOP_RECORDING:"Διακοπή εγγραφής",ARIA_CANCEL_RECORDING:"Ακύρωση εγγραφής",ARIA_INSERT_EMOJI:"Εισαγωγή emoji",ARIA_PLAY_AUDIO:"αναπαραγωγή ήχου",ARIA_PAUSE_AUDIO:"παύση ήχου",ARIA_REACTION_COUNT:(e,t)=>`${e} αντιδράσεις με ${t}`,ARIA_MORE_ACTIONS:"Περισσότερες ενέργειες",ARIA_REPLYING_TO:(e,t)=>`Απάντηση στον ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Έξοδος από τη λειτουργία απάντησης"}},en:si,es:{code:"es-ES",name:"Spanish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/es.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/es/cldr/data.json",translation:{YESTERDAY:"Ayer",TODAY:"Hoy",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"justo ahora",LOCATION:"Ubicación",CANCEL:"Cancelar",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificaciones del navigator",DESKTOP_NOTIFICATIONS_ERROR:"No se logró habilitar las notificaciones del navigador, comprueba que tu navegador no las esté bloqueando o intenta con otro navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Activo",STATUS_INDICATOR_OFFLINE:"Ausente",ARIA_LEAVE_SEARCH_MODE:"Salir del modo búsqueda",ARIA_SEARCH_UP:"Buscar hacia arriba",ARIA_SEARCH_DOWN:"Buscar hacia abajo",ARIA_CLOSE_CHAT_POPUP:"Cerrar la ventana de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Buscar en esta conversación",ARIA_SEARCH:"Buscar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"establecer velocidad de reproducción",ARIA_CANCEL_UPLOAD:"Cancelar envío",ARIA_STOP_RECORDING:"Detener grabación",ARIA_CANCEL_RECORDING:"Cancelar grabación",ARIA_INSERT_EMOJI:"Insertar un emoji",ARIA_PLAY_AUDIO:"reproducir audio",ARIA_PAUSE_AUDIO:"pausar audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reacciones con ${t}`,ARIA_MORE_ACTIONS:"Más acciones",ARIA_REPLYING_TO:(e,t)=>`Respondiendo a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Salir del modo respuesta"}},et:{code:"et-EE",name:"Estonian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/et/cldr/data.json",translation:{YESTERDAY:"Eile",TODAY:"Täna",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"Just nüüd",LOCATION:"Asukoht",CANCEL:"Katkesta",INBOX:"Postkast",DESKTOP_NOTIFICATIONS:"Veebibrauseri teated",DESKTOP_NOTIFICATIONS_ERROR:"Töölaua teatisi ei saa lubada, kuna Teie brauser blokeerib need aktiivselt. Proovige muuta seadeid või kasutada mõnda muud brauserit.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktiivne",STATUS_INDICATOR_OFFLINE:"Eemal",ARIA_LEAVE_SEARCH_MODE:"Välju otsingurežiimist",ARIA_SEARCH_UP:"Otsi üles",ARIA_SEARCH_DOWN:"Otsi alla",ARIA_CLOSE_CHAT_POPUP:"Sulge vestluse aken",ARIA_SEARCH_INSIDE_CONVERSATION:"Otsi sellest vestlusest",ARIA_SEARCH:"Otsi",ARIA_CHAT:"Vestlus",ARIA_SET_PLAYBACK_SPEED:"määra taasesituse kiirus",ARIA_CANCEL_UPLOAD:"Tühista üleslaadimine",ARIA_STOP_RECORDING:"Peata salvestamine",ARIA_CANCEL_RECORDING:"Tühista salvestamine",ARIA_INSERT_EMOJI:"Sisesta emoji",ARIA_PLAY_AUDIO:"esita heli",ARIA_PAUSE_AUDIO:"pausi heli",ARIA_REACTION_COUNT:(e,t)=>`${e} reaktsiooni (${t})`,ARIA_MORE_ACTIONS:"Rohkem toiminguid",ARIA_REPLYING_TO:(e,t)=>`Vastamine kasutajale ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Välju vastamisrežiimist"}},fa:{code:"fa",name:"Persian (Farsi)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fa.js",emojiDataUrl:null,translation:{YESTERDAY:"دیروز",TODAY:"امروز",DAYS:"روز",HOURS:"ساعت",MINUTES:"دقیقه",JUST_NOW:"هم اکنون",LOCATION:"مکان",CANCEL:"لغو",INBOX:"صندوق",DESKTOP_NOTIFICATIONS:"اطلاعیههای مرورگر",DESKTOP_NOTIFICATIONS_ERROR:"خطا در فعال سازی اعلان های مرورگر، مرورگر شما آنها را مسدود می کند سعی کنید تنظیمات مرورگر را تغییر دهید یا از یک مرورگر دیگر استفاده کنید.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`نوتیفیکیشن دمو ${e}`,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:"به عنوان خوانده نشده علامت گذاری کن",STATUS_INDICATOR_ONLINE:"فعال",STATUS_INDICATOR_OFFLINE:"غایب",ARIA_LEAVE_SEARCH_MODE:"خروج از حالت جستجو",ARIA_SEARCH_UP:"جستجوی بالا",ARIA_SEARCH_DOWN:"جستجوی پایین",ARIA_CLOSE_CHAT_POPUP:"بستن پنجره چت",ARIA_SEARCH_INSIDE_CONVERSATION:"جستجو در این گفتگو",ARIA_SEARCH:"جستجو",ARIA_CHAT:"چت",ARIA_SET_PLAYBACK_SPEED:"تنظیم سرعت پخش",ARIA_CANCEL_UPLOAD:"لغو آپلود",ARIA_STOP_RECORDING:"توقف ضبط",ARIA_CANCEL_RECORDING:"لغو ضبط",ARIA_INSERT_EMOJI:"درج ایموجی",ARIA_PLAY_AUDIO:"پخش صدا",ARIA_PAUSE_AUDIO:"مکث صدا",ARIA_REACTION_COUNT:(e,t)=>`${e} واکنش با ${t}`,ARIA_MORE_ACTIONS:"اقدامات بیشتر",ARIA_REPLYING_TO:(e,t)=>`در حال پاسخ به ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"خروج از حالت پاسخ"}},fi:{code:"fi-FI",name:"Finnish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fi/cldr/data.json",translation:{YESTERDAY:"Eilen",TODAY:"Tänään",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"juuri nyt",LOCATION:"Sijainti",CANCEL:"Peruuta",INBOX:"Saapuneet",DESKTOP_NOTIFICATIONS:"Selaimen ilmoitukset",DESKTOP_NOTIFICATIONS_ERROR:"Työpöydän ilmoituksia ei voitu kytkeä päälle, koska selaimesi estää ne aktiivisesti. Koeta tutkia sen asetuksia tai vaihda selainta.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktiivinen",STATUS_INDICATOR_OFFLINE:"Poissa",ARIA_LEAVE_SEARCH_MODE:"Poistu hakutilasta",ARIA_SEARCH_UP:"Hae ylöspäin",ARIA_SEARCH_DOWN:"Hae alaspäin",ARIA_CLOSE_CHAT_POPUP:"Sulje chat-ikkuna",ARIA_SEARCH_INSIDE_CONVERSATION:"Hae tästä keskustelusta",ARIA_SEARCH:"Hae",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"aseta toistonopeus",ARIA_CANCEL_UPLOAD:"Peruuta lähetys",ARIA_STOP_RECORDING:"Lopeta tallennus",ARIA_CANCEL_RECORDING:"Peruuta tallennus",ARIA_INSERT_EMOJI:"Lisää emoji",ARIA_PLAY_AUDIO:"toista ääni",ARIA_PAUSE_AUDIO:"keskeytä ääni",ARIA_REACTION_COUNT:(e,t)=>`${e} reaktiota (${t})`,ARIA_MORE_ACTIONS:"Lisää toimintoja",ARIA_REPLYING_TO:(e,t)=>`Vastataan käyttäjälle ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Poistu vastaustilasta"}},fr:{code:"fr-FR",name:"French",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fr.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fr/emojibase/data.json",translation:{YESTERDAY:"Hier",TODAY:"Aujourd'hui",DAYS:"j",HOURS:"h",MINUTES:"m",JUST_NOW:"maintenant",LOCATION:"Emplacement",CANCEL:"Annuler",INBOX:"Boîte de réception",DESKTOP_NOTIFICATIONS:"Notifications du navigateur",DESKTOP_NOTIFICATIONS_ERROR:"Impossible d'activer les notifications du navigateur car votre navigateur les bloque. Essayez de changer ses paramètres ou de changer de navigateur.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Notification de démonstration ${e}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si vous maintenez l'onglet ouvert dans votre navigateur vous verrez apparaître une alerte lorsque quelqu'un vous parlera.",SEND_BUTTON_TEXT:"Envoyer",ENTRYBOX_TEXT_LIMIT:"Seuls 10.000 caractères sont autorisés.",ENTRYBOX_PLACEHOLDER:"Écrivez un message...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cette conversation n'est plus active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Vous pouvez lire, mais pas envoyer de messages.",MESSAGELIST_LOADING_OLDER:"Chargement des anciens messages ...",MESSAGELIST_SHOW_OLDER:"Afficher les anciens messages",MESSAGELIST_NEW_MARKER:"Nouveau",MESSAGE_SENT_VIA_EMAIL:"Ce message a été envoyé par e-mail",YOU_MARKER:"vous",UPLOAD_IN_PROGRESS:"Envoi en cours...",UPLOAD_SEND_FILE:"Envoyer un fichier",UPLOAD_SHARE_LOCATION:"Partager mon emplacement",UPLOAD_ERROR:"Un problème est survenu lors de l'envoi: le fichier est peut-être non pris en charge ou trop volumineux.",SHARE_LOCATION_ERROR:"Impossible de partager votre emplacement: ",LOADING:"Chargement en cours...",HUB_EMPTY:"Votre historique de discussion apparaîtra ici",HUB_SHOW_EARLIER:"Afficher les conversations précédentes",INBOX_NO_CHATS_TITLE:"Aucune conversation pour l'instant!",INBOX_NO_CHATS_BODY:"Une fois que vous aurez eu une ou plusieurs conversations, elles apparaîtront ici.",ENABLE_TRANSLATION:"Traduire cette conversation en français",DISABLE_TRANSLATION:"Remontrer la conversation originale",SEARCH_PLACEHOLDER_TEXT:"Rechercher...",SEARCH_SEARCHING:"Recherche...",SEARCH_NO_RESULTS:"Aucun résultat trouvé",SEARCH_NO_MORE_RESULTS:"Il n’y a plus de résultats",CHAT_NOT_FOUND:"Conversation introuvable",DELETE_MESSAGE:"Supprimer le message",DELETION_EXPLANATION:"Si vous supprimez ce message, il disparaîtra pour tout le monde.",EDIT_MESSAGE:"Modifier le message",SAVE:"Enregistrer",EDITED_INDICATOR:"modifié",REPLY_TO_MESSAGE:"Répondre",ADD_REACTION:"Ajouter une réaction",AUTH_EXPIRED_OVERLAY_TITLE:"Votre session de chat a expiré",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualisez la page pour continuer",VOICE_MESSAGE:"Message vocal",CONTACT_INFORMATION_HIDDEN:"Informations masquées",LEAVE_CONVERSATION:"Quitter la conversation",MARK_CONVERSATION_AS_UNREAD:"Marquer comme non lu",STATUS_INDICATOR_ONLINE:"Actif",STATUS_INDICATOR_OFFLINE:"Absent",ARIA_LEAVE_SEARCH_MODE:"Quitter le mode recherche",ARIA_SEARCH_UP:"Rechercher vers le haut",ARIA_SEARCH_DOWN:"Rechercher vers le bas",ARIA_CLOSE_CHAT_POPUP:"Fermer la fenêtre de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Rechercher dans cette conversation",ARIA_SEARCH:"Rechercher",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"définir la vitesse de lecture",ARIA_CANCEL_UPLOAD:"Annuler l'envoi",ARIA_STOP_RECORDING:"Arrêter l'enregistrement",ARIA_CANCEL_RECORDING:"Annuler l'enregistrement",ARIA_INSERT_EMOJI:"Insérer un emoji",ARIA_PLAY_AUDIO:"lire l'audio",ARIA_PAUSE_AUDIO:"mettre en pause l'audio",ARIA_REACTION_COUNT:(e,t)=>`${e} réactions avec ${t}`,ARIA_MORE_ACTIONS:"Plus d'actions",ARIA_REPLYING_TO:(e,t)=>`Répondre à ${e} : ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Quitter le mode réponse"}},he:{code:"he-IL",name:"Hebrew",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"אתמול",TODAY:"היום",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"עכשיו",LOCATION:"מיקום",CANCEL:"בטל",INBOX:"דואר נכנס",DESKTOP_NOTIFICATIONS:"התראות דפדפן",DESKTOP_NOTIFICATIONS_ERROR:"לא ניתן להפעיל התראות במרועה דפדפן מכיוון שהדפדפן שלך חוסם אותן באופן פעיל. נסה להסתכל בהגדרות או להשתמש בדפדפן אחר.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} הודעה על הדגמה`,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:"סמן כלא נקרא",STATUS_INDICATOR_ONLINE:"פעיל",STATUS_INDICATOR_OFFLINE:"לא פעיל",ARIA_LEAVE_SEARCH_MODE:"צא ממצב חיפוש",ARIA_SEARCH_UP:"חפש למעלה",ARIA_SEARCH_DOWN:"חפש למטה",ARIA_CLOSE_CHAT_POPUP:"סגור חלון צ'אט",ARIA_SEARCH_INSIDE_CONVERSATION:"חפש בתוך השיחה הזו",ARIA_SEARCH:"חפש",ARIA_CHAT:"צ'אט",ARIA_SET_PLAYBACK_SPEED:"הגדר מהירות השמעה",ARIA_CANCEL_UPLOAD:"בטל העלאה",ARIA_STOP_RECORDING:"עצור הקלטה",ARIA_CANCEL_RECORDING:"בטל הקלטה",ARIA_INSERT_EMOJI:"הוסף אמוג'י",ARIA_PLAY_AUDIO:"נגן אודיו",ARIA_PAUSE_AUDIO:"השהה אודיו",ARIA_REACTION_COUNT:(e,t)=>`${e} תגובות עם ${t}`,ARIA_MORE_ACTIONS:"פעולות נוספות",ARIA_REPLYING_TO:(e,t)=>`משיב ל-${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"צא ממצב תשובה"}},hi:{code:"hi-IN",name:"Hindi (IN)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/hi.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hi/cldr/data.json",translation:{YESTERDAY:"कल",TODAY:"आज",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"अभी",LOCATION:"जगह",CANCEL:"रद्द करें",INBOX:"इनबॉक्स",DESKTOP_NOTIFICATIONS:"ब्राउज़र सूचनाएं",DESKTOP_NOTIFICATIONS_ERROR:"ब्राउज़र सूचनाएं सक्षम नहीं कर सकता क्योंकि आपका ब्राउज़र सक्रिय रूप से उन्हें ब्लॉक करता है। सेटिंग्स में देखने या एक अलग ब्राउज़र का उपयोग करने का प्रयास करें।",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} डेमो अधिसूचना`,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:"अपठित के रूप में चिह्नित करें",STATUS_INDICATOR_ONLINE:"सक्रिय",STATUS_INDICATOR_OFFLINE:"अनुपस्थित",ARIA_LEAVE_SEARCH_MODE:"खोज मोड से बाहर निकलें",ARIA_SEARCH_UP:"ऊपर खोजें",ARIA_SEARCH_DOWN:"नीचे खोजें",ARIA_CLOSE_CHAT_POPUP:"चैट विंडो बंद करें",ARIA_SEARCH_INSIDE_CONVERSATION:"इस बातचीत में खोजें",ARIA_SEARCH:"खोजें",ARIA_CHAT:"चैट",ARIA_SET_PLAYBACK_SPEED:"प्लेबैक गति सेट करें",ARIA_CANCEL_UPLOAD:"अपलोड रद्द करें",ARIA_STOP_RECORDING:"रिकॉर्डिंग रोकें",ARIA_CANCEL_RECORDING:"रिकॉर्डिंग रद्द करें",ARIA_INSERT_EMOJI:"इमोजी डालें",ARIA_PLAY_AUDIO:"ऑडियो चलाएं",ARIA_PAUSE_AUDIO:"ऑडियो रोकें",ARIA_REACTION_COUNT:(e,t)=>`${e} प्रतिक्रियाएं (${t})`,ARIA_MORE_ACTIONS:"अधिक कार्य",ARIA_REPLYING_TO:(e,t)=>`${e} को उत्तर दे रहे हैं: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"उत्तर मोड से बाहर निकलें"}},hr:{code:"hr-HR",name:"Croatian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika nisu omogućene jer ih vaš preglednik aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretraživanja",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor za chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcija s ${t}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(e,t)=>`Odgovaranje korisniku ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},hu:{code:"hu-HU",name:"Hungarian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hu/cldr/data.json",translation:{YESTERDAY:"Tegnap",TODAY:"Ma",DAYS:"n",HOURS:"ó",MINUTES:"p",JUST_NOW:"éppen most",LOCATION:"Helyszín",CANCEL:"Visszavonás",INBOX:"Postaláda",DESKTOP_NOTIFICATIONS:"Böngésző értesítések",DESKTOP_NOTIFICATIONS_ERROR:"Azért nem tudja bekapcsolni a böngésző értesítések funkciót, mert böngészője aktívan blokkolja azt. Tekintse meg a beállításokat vagy használjon másik böngészőt.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktív",STATUS_INDICATOR_OFFLINE:"Távol",ARIA_LEAVE_SEARCH_MODE:"Keresési mód elhagyása",ARIA_SEARCH_UP:"Keresés felfelé",ARIA_SEARCH_DOWN:"Keresés lefelé",ARIA_CLOSE_CHAT_POPUP:"Csevegő ablak bezárása",ARIA_SEARCH_INSIDE_CONVERSATION:"Keresés ebben a beszélgetésben",ARIA_SEARCH:"Keresés",ARIA_CHAT:"Csevegés",ARIA_SET_PLAYBACK_SPEED:"lejátszási sebesség beállítása",ARIA_CANCEL_UPLOAD:"Feltöltés megszakítása",ARIA_STOP_RECORDING:"Felvétel leállítása",ARIA_CANCEL_RECORDING:"Felvétel megszakítása",ARIA_INSERT_EMOJI:"Emoji beszúrása",ARIA_PLAY_AUDIO:"hang lejátszása",ARIA_PAUSE_AUDIO:"hang szüneteltetése",ARIA_REACTION_COUNT:(e,t)=>`${e} reakció (${t})`,ARIA_MORE_ACTIONS:"További műveletek",ARIA_REPLYING_TO:(e,t)=>`Válaszolás ${e} részére: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Kilépés a válasz módóból"}},id:{code:"id-ID",name:"Bahasa Indonesia",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/id.js",emojiDataUrl:null,translation:{YESTERDAY:"Kemarin",TODAY:"Hari ini",DAYS:"h",HOURS:"j",MINUTES:"m",JUST_NOW:"sekarang",LOCATION:"Lokasi",CANCEL:"Batal",INBOX:"Kotak Masuk",DESKTOP_NOTIFICATIONS:"Notifikasi peramban",DESKTOP_NOTIFICATIONS_ERROR:"Tidak dapat mengaktifkan pemberitahuan browser karena browser Anda secara aktif memblokir mereka. Coba cari di pengaturan atau menggunakan browser yang berbeda.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`pemberitahuan demo ${e}`,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",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Tidak aktif",ARIA_LEAVE_SEARCH_MODE:"Keluar dari mode pencarian",ARIA_SEARCH_UP:"Cari ke atas",ARIA_SEARCH_DOWN:"Cari ke bawah",ARIA_CLOSE_CHAT_POPUP:"Tutup jendela obrolan",ARIA_SEARCH_INSIDE_CONVERSATION:"Cari dalam percakapan ini",ARIA_SEARCH:"Cari",ARIA_CHAT:"Obrolan",ARIA_SET_PLAYBACK_SPEED:"atur kecepatan pemutaran",ARIA_CANCEL_UPLOAD:"Batalkan unggah",ARIA_STOP_RECORDING:"Hentikan perekaman",ARIA_CANCEL_RECORDING:"Batalkan perekaman",ARIA_INSERT_EMOJI:"Sisipkan emoji",ARIA_PLAY_AUDIO:"putar audio",ARIA_PAUSE_AUDIO:"jeda audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reaksi dengan ${t}`,ARIA_MORE_ACTIONS:"Tindakan lainnya",ARIA_REPLYING_TO:(e,t)=>`Membalas ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Keluar dari mode balasan"}},is:{code:"is-IS",name:"Íslenska",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Í gær",TODAY:"Í dag",DAYS:"dagar",HOURS:"klst.",MINUTES:"mín.",JUST_NOW:"núna",LOCATION:"Staðsetning",CANCEL:"Hætta við",INBOX:"Pósthólf",DESKTOP_NOTIFICATIONS:"Tilkynningar í vafra",DESKTOP_NOTIFICATIONS_ERROR:"Ekki er hægt að birta tilkynningar í vafra vegna þess að vafrinn sem þú notar hindrar það. Reyndu að leita að stillingum eða að nota annan vafra.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",ADD_REACTION:"Setja inn viðbrögð",AUTH_EXPIRED_OVERLAY_TITLE:"Spjallið hefur runnið út",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Endurnýjaðu síðuna til að halda áfram",VOICE_MESSAGE:"Raddskilaboð",LEAVE_CONVERSATION:"Skilja eftir skilaboð",MARK_CONVERSATION_AS_UNREAD:"Merkja sem ólesið",STATUS_INDICATOR_ONLINE:"Virk",STATUS_INDICATOR_OFFLINE:"Ekki við",CONTACT_INFORMATION_HIDDEN:"faldar upplýsingar",ARIA_LEAVE_SEARCH_MODE:"Hætta í leitastillingu",ARIA_SEARCH_UP:"Leita upp",ARIA_SEARCH_DOWN:"Leita niður",ARIA_CLOSE_CHAT_POPUP:"Loka spjallglugga",ARIA_SEARCH_INSIDE_CONVERSATION:"Leita í þessari samtal",ARIA_SEARCH:"Leita",ARIA_CHAT:"Spjall",ARIA_SET_PLAYBACK_SPEED:"stilla afspilunarhraða",ARIA_CANCEL_UPLOAD:"Hætta við upphleðslu",ARIA_STOP_RECORDING:"Stöðva upptöku",ARIA_CANCEL_RECORDING:"Hætta við upptöku",ARIA_INSERT_EMOJI:"Setja inn emoji",ARIA_PLAY_AUDIO:"spila hljóð",ARIA_PAUSE_AUDIO:"gera hlé á hljóði",ARIA_REACTION_COUNT:(e,t)=>`${e} viðbrögð með ${t}`,ARIA_MORE_ACTIONS:"Fleiri aðgerðir",ARIA_REPLYING_TO:(e,t)=>`Svara ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Hætta í svarmód"}},it:{code:"it-IT",name:"Italian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/it.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/it/cldr/data.json",translation:{YESTERDAY:"Ieri",TODAY:"Oggi",DAYS:"g",HOURS:"o",MINUTES:"m",JUST_NOW:"adesso",LOCATION:"Posizione",CANCEL:"Annulla",INBOX:"Posta in arrivo",DESKTOP_NOTIFICATIONS:"Notifiche browser",DESKTOP_NOTIFICATIONS_ERROR:"Impossibile abilitare le notifiche browser perché il browser le blocca attivamente. Prova a cercare le impostazioni o utilizzare un browser diverso.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",LEAVE_CONVERSATION:"Abbandona la conversazione",MARK_CONVERSATION_AS_UNREAD:"Segna come non letto",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informazioni nascoste",ARIA_LEAVE_SEARCH_MODE:"Esci dalla modalità ricerca",ARIA_SEARCH_UP:"Cerca in alto",ARIA_SEARCH_DOWN:"Cerca in basso",ARIA_CLOSE_CHAT_POPUP:"Chiudi la finestra di chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cerca in questa conversazione",ARIA_SEARCH:"Cerca",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"imposta velocità di riproduzione",ARIA_CANCEL_UPLOAD:"Annulla caricamento",ARIA_STOP_RECORDING:"Interrompi registrazione",ARIA_CANCEL_RECORDING:"Annulla registrazione",ARIA_INSERT_EMOJI:"Inserisci un'emoji",ARIA_PLAY_AUDIO:"riproduci audio",ARIA_PAUSE_AUDIO:"metti in pausa audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reazioni con ${t}`,ARIA_MORE_ACTIONS:"Altre azioni",ARIA_REPLYING_TO:(e,t)=>`Rispondendo a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Esci dalla modalità risposta"}},ja:{code:"ja-JP",name:"Japanese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ja.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ja/emojibase/data.json",translation:{YESTERDAY:"昨日",TODAY:"今日",DAYS:"日前",HOURS:"時間前",MINUTES:"分前",JUST_NOW:"たった今",LOCATION:"場所",CANCEL:"キャンセル",INBOX:"受信箱",DESKTOP_NOTIFICATIONS:"ブラウザの通知",DESKTOP_NOTIFICATIONS_ERROR:"ブラウザの通知はブロックされているため、ブラウザの通知を有効にできません。設定を確認するか、別のブラウザを使用してください。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} デモ通知`,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:"未読としてマーク",STATUS_INDICATOR_ONLINE:"アクティブ",STATUS_INDICATOR_OFFLINE:"退席中",ARIA_LEAVE_SEARCH_MODE:"検索モードを終了",ARIA_SEARCH_UP:"上に検索",ARIA_SEARCH_DOWN:"下に検索",ARIA_CLOSE_CHAT_POPUP:"チャットポップアップを閉じる",ARIA_SEARCH_INSIDE_CONVERSATION:"この会話内を検索",ARIA_SEARCH:"検索",ARIA_CHAT:"チャット",ARIA_SET_PLAYBACK_SPEED:"再生速度を設定",ARIA_CANCEL_UPLOAD:"アップロードをキャンセル",ARIA_STOP_RECORDING:"録音を停止",ARIA_CANCEL_RECORDING:"録音をキャンセル",ARIA_INSERT_EMOJI:"絵文字を挿入",ARIA_PLAY_AUDIO:"音声を再生",ARIA_PAUSE_AUDIO:"音声を一時停止",ARIA_REACTION_COUNT:(e,t)=>`${e}件のリアクション(${t})`,ARIA_MORE_ACTIONS:"その他の操作",ARIA_REPLYING_TO:(e,t)=>`${e}に返信: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"返信モードを終了"}},ka:{code:"ka-GE",name:"Georgian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"გუშინ",TODAY:"დღეს",DAYS:"დღ",HOURS:"სთ",MINUTES:"წთ",JUST_NOW:"ახლა",LOCATION:"ადგილმდებარეობა",CANCEL:"გაუქმება",INBOX:"მიღებული შეტყობინება",DESKTOP_NOTIFICATIONS:"ბრაუზერის შეტყობინებები",DESKTOP_NOTIFICATIONS_ERROR:"შეუძლებელია ბრაუზერის შეტკობინებების ჩართვა. ეს ბრაუზერი ბლოკავს მათ. სცადე ცვლილება ოპციებიდან ან გამოიყენე სხვა ბრაუზერი.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} შეტყობინებების დემო ვერსია`,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:"ხმოვანი შეტყობინება",LEAVE_CONVERSATION:"საუბრის დატოვება",MARK_CONVERSATION_AS_UNREAD:"წაუკითხავად მონიშვნა",STATUS_INDICATOR_ONLINE:"აქტიური",STATUS_INDICATOR_OFFLINE:"გამორთული",CONTACT_INFORMATION_HIDDEN:"ფარული ინფორმაცია",ARIA_LEAVE_SEARCH_MODE:"ძიების რეჟიმიდან გასვლა",ARIA_SEARCH_UP:"ძიება ზემოთ",ARIA_SEARCH_DOWN:"ძიება ქვემოთ",ARIA_CLOSE_CHAT_POPUP:"ჩეთის ფანჯრის დახურვა",ARIA_SEARCH_INSIDE_CONVERSATION:"ძიება ამ საუბარში",ARIA_SEARCH:"ძიება",ARIA_CHAT:"ჩეთი",ARIA_SET_PLAYBACK_SPEED:"გადახვევის სიჩქარის დაყენება",ARIA_CANCEL_UPLOAD:"ატვირთვის გაუქმება",ARIA_STOP_RECORDING:"ჩაწერის შეჩერება",ARIA_CANCEL_RECORDING:"ჩაწერის გაუქმება",ARIA_INSERT_EMOJI:"ემოჯის ჩასმა",ARIA_PLAY_AUDIO:"აუდიოს დაკვრა",ARIA_PAUSE_AUDIO:"აუდიოს შეჩერება",ARIA_REACTION_COUNT:(e,t)=>`${e} რეაქცია (${t})`,ARIA_MORE_ACTIONS:"მეტი ქმედება",ARIA_REPLYING_TO:(e,t)=>`პასუხი ${e}-ს: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"პასუხის რეჟიმიდან გასვლა"}},ko:{code:"ko-KR",name:"Korean (South Korea)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ko/cldr/data.json",translation:{YESTERDAY:"어제",TODAY:"오늘",DAYS:"일 전",HOURS:"시간 전",MINUTES:"분 전",JUST_NOW:"방금",LOCATION:"위치",CANCEL:"취소",INBOX:"대화 목록",DESKTOP_NOTIFICATIONS:"브라우저 알림",DESKTOP_NOTIFICATIONS_ERROR:"브라우저 알림을 표시할 수 없습니다. 브라우저 설정을 확인하거나 다른 브라우저를 사용해주세요.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 데모 알림`,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:"읽지 않은 상태로 표시",STATUS_INDICATOR_ONLINE:"활성",STATUS_INDICATOR_OFFLINE:"부재중",ARIA_LEAVE_SEARCH_MODE:"검색 모드 종료",ARIA_SEARCH_UP:"위로 검색",ARIA_SEARCH_DOWN:"아래로 검색",ARIA_CLOSE_CHAT_POPUP:"채팅 팝업 닫기",ARIA_SEARCH_INSIDE_CONVERSATION:"이 대화 내 검색",ARIA_SEARCH:"검색",ARIA_CHAT:"채팅",ARIA_SET_PLAYBACK_SPEED:"재생 속도 설정",ARIA_CANCEL_UPLOAD:"업로드 취소",ARIA_STOP_RECORDING:"녹음 중지",ARIA_CANCEL_RECORDING:"녹음 취소",ARIA_INSERT_EMOJI:"이모지 삽입",ARIA_PLAY_AUDIO:"오디오 재생",ARIA_PAUSE_AUDIO:"오디오 일시 정지",ARIA_REACTION_COUNT:(e,t)=>`${e}개 반응 (${t})`,ARIA_MORE_ACTIONS:"추가 작업",ARIA_REPLYING_TO:(e,t)=>`${e}에게 답장: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"답장 모드 종료"}},nb:{code:"nb-NO",name:"Norwegian (Bokmål)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nb/cldr/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"Nå",LOCATION:"Plassering",CANCEL:"Avbryt",INBOX:"Innboks",DESKTOP_NOTIFICATIONS:"Nettleservarsler",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Nettleservarsler fordi nettleseren din aktivt blokkerer dem. Prøv å se i innstillingene eller bruke en annen nettleser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Borte",ARIA_LEAVE_SEARCH_MODE:"Forlat søkemodus",ARIA_SEARCH_UP:"Søk oppover",ARIA_SEARCH_DOWN:"Søk nedover",ARIA_CLOSE_CHAT_POPUP:"Lukk chatvindu",ARIA_SEARCH_INSIDE_CONVERSATION:"Søk i denne samtalen",ARIA_SEARCH:"Søk",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"angi avspillingshastighet",ARIA_CANCEL_UPLOAD:"Avbryt opplasting",ARIA_STOP_RECORDING:"Stopp opptak",ARIA_CANCEL_RECORDING:"Avbryt opptak",ARIA_INSERT_EMOJI:"Sett inn en emoji",ARIA_PLAY_AUDIO:"spill av lyd",ARIA_PAUSE_AUDIO:"pause lyd",ARIA_REACTION_COUNT:(e,t)=>`${e} reaksjoner med ${t}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(e,t)=>`Svarer til ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avslutt svarmodus"}},nl:{code:"nl-NL",name:"Dutch",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/nl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nl/cldr/data.json",translation:{YESTERDAY:"Gisteren",TODAY:"Vandaag",DAYS:"d",HOURS:"u",MINUTES:"m",JUST_NOW:"zojuist",LOCATION:"Locatie",CANCEL:"Annuleren",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browsermeldingen",DESKTOP_NOTIFICATIONS_ERROR:"Browsermeldingen kunnen niet geactiveerd worden omdat de browser het blokkeert. Check de instellingen van je browser of probeer een andere browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",LEAVE_CONVERSATION:"Gesprek verlaten",MARK_CONVERSATION_AS_UNREAD:"Markeren als ongelezen",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"verborgen informatie",ARIA_LEAVE_SEARCH_MODE:"Zoekmodus verlaten",ARIA_SEARCH_UP:"Omhoog zoeken",ARIA_SEARCH_DOWN:"Omlaag zoeken",ARIA_CLOSE_CHAT_POPUP:"Chatvenster sluiten",ARIA_SEARCH_INSIDE_CONVERSATION:"Zoeken in dit gesprek",ARIA_SEARCH:"Zoeken",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Afspeelsnelheid instellen",ARIA_CANCEL_UPLOAD:"Upload annuleren",ARIA_STOP_RECORDING:"Opname stoppen",ARIA_CANCEL_RECORDING:"Opname annuleren",ARIA_INSERT_EMOJI:"Een emoji invoegen",ARIA_PLAY_AUDIO:"Audio afspelen",ARIA_PAUSE_AUDIO:"Audio pauzeren",ARIA_REACTION_COUNT:(e,t)=>`${e} Reacties met ${t}`,ARIA_MORE_ACTIONS:"Meer acties",ARIA_REPLYING_TO:(e,t)=>`Beantwoorden aan ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Verlaat antwoordmodus"}},pl:{code:"pl-PL",name:"Polish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pl/cldr/data.json",translation:{YESTERDAY:"Wczoraj",TODAY:"Dzisiaj",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"teraz",LOCATION:"Lokalizacja",CANCEL:"Anuluj",INBOX:"Skrzynka odbiorcza",DESKTOP_NOTIFICATIONS:"Powiadomienia",DESKTOP_NOTIFICATIONS_ERROR:"Nie można aktywować powiadomień, ponieważ twoja przeglądarka je blokuje. Proszę zmienić ustawienie lub spróbować innej przeglądarki.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktywny",STATUS_INDICATOR_OFFLINE:"Nieobecny",ARIA_LEAVE_SEARCH_MODE:"Wyjdź z trybu wyszukiwania",ARIA_SEARCH_UP:"Szukaj w górę",ARIA_SEARCH_DOWN:"Szukaj w dół",ARIA_CLOSE_CHAT_POPUP:"Zamknij okno czatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Szukaj w tej konwersacji",ARIA_SEARCH:"Szukaj",ARIA_CHAT:"Czat",ARIA_SET_PLAYBACK_SPEED:"ustaw prędkość odtwarzania",ARIA_CANCEL_UPLOAD:"Anuluj przesyłanie",ARIA_STOP_RECORDING:"Zatrzymaj nagrywanie",ARIA_CANCEL_RECORDING:"Anuluj nagrywanie",ARIA_INSERT_EMOJI:"Wstaw emoji",ARIA_PLAY_AUDIO:"odtwórz audio",ARIA_PAUSE_AUDIO:"wstrzymaj audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcji z ${t}`,ARIA_MORE_ACTIONS:"Więcej akcji",ARIA_REPLYING_TO:(e,t)=>`Odpowiadanie na ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Wyjdź z trybu odpowiedzi"}},pt:{code:"pt-BR",name:"Portuguese (Brazil)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pt_BR.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pt/cldr/data.json",translation:{YESTERDAY:"Ontem",TODAY:"Hoje",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"agora mesmo",LOCATION:"Localização",CANCEL:"Cancelar",INBOX:"Caixa de entrada",DESKTOP_NOTIFICATIONS:"Notificações do navegador",DESKTOP_NOTIFICATIONS_ERROR:"Não é possível ativar as notificações da navegador porque seu navegador as bloqueia. Tente procurar nas configurações ou usar um navegador diferente.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informação oculta",ARIA_LEAVE_SEARCH_MODE:"Sair do modo de pesquisa",ARIA_SEARCH_UP:"Pesquisar para cima",ARIA_SEARCH_DOWN:"Pesquisar para baixo",ARIA_CLOSE_CHAT_POPUP:"Fechar janela de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Pesquisar nesta conversa",ARIA_SEARCH:"Pesquisar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"definir velocidade de reprodução",ARIA_CANCEL_UPLOAD:"Cancelar envio",ARIA_STOP_RECORDING:"Parar gravação",ARIA_CANCEL_RECORDING:"Cancelar gravação",ARIA_INSERT_EMOJI:"Inserir um emoji",ARIA_PLAY_AUDIO:"reproduzir áudio",ARIA_PAUSE_AUDIO:"pausar áudio",ARIA_REACTION_COUNT:(e,t)=>`${e} reações com ${t}`,ARIA_MORE_ACTIONS:"Mais ações",ARIA_REPLYING_TO:(e,t)=>`Respondendo a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sair do modo de resposta"}},ro:{code:"ro-RO",name:"Romanian (Romania)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ieri",TODAY:"Astăzi",DAYS:"z",HOURS:"o",MINUTES:"m",JUST_NOW:"chiar acum",LOCATION:"Locație",CANCEL:"Anulare",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificări browser",DESKTOP_NOTIFICATIONS_ERROR:"Nu se pot activa notificări browser deoarece browserul dvs. le blochează în mod activ. Încercați să căutați în setări sau utilizând un alt browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Notificare de debit ${e}`,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",STATUS_INDICATOR_ONLINE:"Activ",STATUS_INDICATOR_OFFLINE:"Plecat",ARIA_LEAVE_SEARCH_MODE:"Părăsește modul de căutare",ARIA_SEARCH_UP:"Caută în sus",ARIA_SEARCH_DOWN:"Caută în jos",ARIA_CLOSE_CHAT_POPUP:"Închide fereastra de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Caută în această conversație",ARIA_SEARCH:"Caută",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"setează viteza de redare",ARIA_CANCEL_UPLOAD:"Anulează încărcarea",ARIA_STOP_RECORDING:"Oprește înregistrarea",ARIA_CANCEL_RECORDING:"Anulează înregistrarea",ARIA_INSERT_EMOJI:"Inserează un emoji",ARIA_PLAY_AUDIO:"redă audio",ARIA_PAUSE_AUDIO:"pauză audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reacții cu ${t}`,ARIA_MORE_ACTIONS:"Mai multe acțiuni",ARIA_REPLYING_TO:(e,t)=>`Răspuns la ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Părăsește modul de răspuns"}},ru:{code:"ru-RU",name:"Russian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ru_RU.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ru/emojibase/data.json",translation:{YESTERDAY:"Вчера",TODAY:"Сегодня",DAYS:"д",HOURS:"ч",MINUTES:"м",JUST_NOW:"только что",LOCATION:"Местоположение",CANCEL:"Отмена",INBOX:"Входящие",DESKTOP_NOTIFICATIONS:"Оповещения",DESKTOP_NOTIFICATIONS_ERROR:"Невозможно включить оповещения, потому что ваш браузер активно блокирует их. Проверьте ваши настройки или попробуйте другой браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} демо-оповещение`,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:"Отметить как непрочитанное",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Не в сети",ARIA_LEAVE_SEARCH_MODE:"Выйти из режима поиска",ARIA_SEARCH_UP:"Искать вверх",ARIA_SEARCH_DOWN:"Искать вниз",ARIA_CLOSE_CHAT_POPUP:"Закрыть окно чата",ARIA_SEARCH_INSIDE_CONVERSATION:"Искать в этом разговоре",ARIA_SEARCH:"Поиск",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"установить скорость воспроизведения",ARIA_CANCEL_UPLOAD:"Отменить загрузку",ARIA_STOP_RECORDING:"Остановить запись",ARIA_CANCEL_RECORDING:"Отменить запись",ARIA_INSERT_EMOJI:"Вставить эмодзи",ARIA_PLAY_AUDIO:"воспроизвести аудио",ARIA_PAUSE_AUDIO:"приостановить аудио",ARIA_REACTION_COUNT:(e,t)=>`${e} реакций с ${t}`,ARIA_MORE_ACTIONS:"Дополнительные действия",ARIA_REPLYING_TO:(e,t)=>`Ответ на ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Выйти из режима ответа"}},sq:{code:"sq-AL",name:"Albanian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Dje",TODAY:"Sot",DAYS:"d",HOURS:"o",MINUTES:"m",JUST_NOW:"Tani",LOCATION:"Pozicion",CANCEL:"Anulo",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Njoftimet e shfletuesit",DESKTOP_NOTIFICATIONS_ERROR:"Nuk mund të aktivizohen njoftimet në shfletues sepse shfletuesi juaj i bllokon ato në mënyrë aktive. Provoni të shikoni cilësimet ose përdorni një shfletues të ndryshëm.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Larg",ARIA_LEAVE_SEARCH_MODE:"Dil nga mënyra e kërkimit",ARIA_SEARCH_UP:"Kërko lart",ARIA_SEARCH_DOWN:"Kërko poshtë",ARIA_CLOSE_CHAT_POPUP:"Mbyll dritaren e bisedës",ARIA_SEARCH_INSIDE_CONVERSATION:"Kërko në këtë bisedë",ARIA_SEARCH:"Kërko",ARIA_CHAT:"Bisedë",ARIA_SET_PLAYBACK_SPEED:"vendos shpejtësinë e luajtjes",ARIA_CANCEL_UPLOAD:"Anulo ngarkimin",ARIA_STOP_RECORDING:"Ndalo regjistrimin",ARIA_CANCEL_RECORDING:"Anulo regjistrimin",ARIA_INSERT_EMOJI:"Fut një emoji",ARIA_PLAY_AUDIO:"luaj audio",ARIA_PAUSE_AUDIO:"pauzë audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reagime me ${t}`,ARIA_MORE_ACTIONS:"Më shumë veprime",ARIA_REPLYING_TO:(e,t)=>`Duke u përgjigjur ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Dil nga mënyra e përgjigjes"}},sr:{code:"sr-SP",name:"Serbian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Juče",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Browser Notifikacija",DESKTOP_NOTIFICATIONS_ERROR:"Browser notifikacije nisu omogućene jer ih vaš pregledač aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi pregledač.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Neaktivan",ARIA_LEAVE_SEARCH_MODE:"Напусти режим претраге",ARIA_SEARCH_UP:"Тражи горе",ARIA_SEARCH_DOWN:"Тражи доле",ARIA_CLOSE_CHAT_POPUP:"Затвори прозор ћаскања",ARIA_SEARCH_INSIDE_CONVERSATION:"Тражи у овом разговору",ARIA_SEARCH:"Тражи",ARIA_CHAT:"Ћаскање",ARIA_SET_PLAYBACK_SPEED:"постави брзину репродукције",ARIA_CANCEL_UPLOAD:"Откажи отпремање",ARIA_STOP_RECORDING:"Заустави снимање",ARIA_CANCEL_RECORDING:"Откажи снимање",ARIA_INSERT_EMOJI:"Уметни емоџи",ARIA_PLAY_AUDIO:"репродукуј аудио",ARIA_PAUSE_AUDIO:"паузирај аудио",ARIA_REACTION_COUNT:(e,t)=>`${e} реакција са ${t}`,ARIA_MORE_ACTIONS:"Више радњи",ARIA_REPLYING_TO:(e,t)=>`Одговарање кориснику ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},sv:{code:"sv-SE",name:"Swedish (Sweden)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/sv/emojibase/data.json",translation:{YESTERDAY:"Igår",TODAY:"Idag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just nu",LOCATION:"Plats",CANCEL:"Avbryt",INBOX:"Inkorg",DESKTOP_NOTIFICATIONS:"Webbläsarnotiser",DESKTOP_NOTIFICATIONS_ERROR:"Kan inte aktivera webbläsarnotiser eftersom din webbläsare aktivt blockerar dem. Se över inställningarna eller använd en annan webbläsare.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Avsluta sökläge",ARIA_SEARCH_UP:"Sök uppåt",ARIA_SEARCH_DOWN:"Sök nedåt",ARIA_CLOSE_CHAT_POPUP:"Stäng chattfönstret",ARIA_SEARCH_INSIDE_CONVERSATION:"Sök i denna konversation",ARIA_SEARCH:"Sök",ARIA_CHAT:"Chatt",ARIA_SET_PLAYBACK_SPEED:"Ställ in uppspelningshastighet",ARIA_CANCEL_UPLOAD:"Avbryt uppladdning",ARIA_STOP_RECORDING:"Stoppa inspelning",ARIA_CANCEL_RECORDING:"Avbryt inspelning",ARIA_INSERT_EMOJI:"Infoga en emoji",ARIA_PLAY_AUDIO:"Spela upp ljud",ARIA_PAUSE_AUDIO:"Pausa ljud",ARIA_REACTION_COUNT:(e,t)=>`${e} Reaktioner med ${t}`,ARIA_MORE_ACTIONS:"Fler åtgärder",ARIA_REPLYING_TO:(e,t)=>`Svarar på ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avsluta svarsläge"}},tr:{code:"tr-TR",name:"Turkish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/tr.js",emojiDataUrl:null,translation:{YESTERDAY:"Dün",TODAY:"Bugün",DAYS:"g",HOURS:"s",MINUTES:"d",JUST_NOW:"az önce",LOCATION:"Konum",CANCEL:"İptal",INBOX:"Gelen Kutusu",SEND_BUTTON_TEXT:"Gönder",ENTRYBOX_TEXT_LIMIT:"En fazla 10.000 karaktere izin veriliyor.",ENTRYBOX_PLACEHOLDER:"Bir şeyler söyle...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Bu konuşma artık aktif değil.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mesajları okuyabilirsiniz ancak mesaj gönderemezsiniz.",MESSAGELIST_LOADING_OLDER:"Eski mesajlar yükleniyor...",MESSAGELIST_SHOW_OLDER:"Eski mesajları göster",MESSAGELIST_NEW_MARKER:"Yeni",DESKTOP_NOTIFICATIONS:"Tarayıcı bildirimleri",DESKTOP_NOTIFICATIONS_ERROR:"Tarayıcınız aktif olarak engellediğinden tarayıcı bildirimlerini etkinleştiremiyoruz. Ayarları kontrol etmeyi veya farklı bir tarayıcı kullanmayı deneyebilirsiniz.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Uzakta",ARIA_LEAVE_SEARCH_MODE:"Arama modundan çık",ARIA_SEARCH_UP:"Yukarı ara",ARIA_SEARCH_DOWN:"Aşağı ara",ARIA_CLOSE_CHAT_POPUP:"Sohbet penceresini kapat",ARIA_SEARCH_INSIDE_CONVERSATION:"Bu konuşmada ara",ARIA_SEARCH:"Ara",ARIA_CHAT:"Sohbet",ARIA_SET_PLAYBACK_SPEED:"oynatma hızını ayarla",ARIA_CANCEL_UPLOAD:"Yüklemeyi iptal et",ARIA_STOP_RECORDING:"Kaydı durdur",ARIA_CANCEL_RECORDING:"Kaydı iptal et",ARIA_INSERT_EMOJI:"Emoji ekle",ARIA_PLAY_AUDIO:"sesi oynat",ARIA_PAUSE_AUDIO:"sesi duraklat",ARIA_REACTION_COUNT:(e,t)=>`${e} tepki (${t})`,ARIA_MORE_ACTIONS:"Daha fazla işlem",ARIA_REPLYING_TO:(e,t)=>`${e}'a yanıtlama: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Yanıt modundan çık"}},uk:{code:"uk-UA",name:"Ukrainian (Ukraine)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/uk/cldr/data.json",translation:{YESTERDAY:"Вчора",TODAY:"Сьогодні",DAYS:"d",HOURS:"h",MINUTES:"м",JUST_NOW:"просто зараз",LOCATION:"Місцезнаходження",CANCEL:"Скасувати",INBOX:"Вхідні",DESKTOP_NOTIFICATIONS:"Сповіщення в браузері",DESKTOP_NOTIFICATIONS_ERROR:"Неможливо ввімкнути сповіщення в браузері, оскільки ваш веб-переглядач активно їх блокує. Спробуйте переглянути налаштування або використовувати інший браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Демо-повідомлення про ${e}`,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:"Відзначити як непрочитане",STATUS_INDICATOR_ONLINE:"Активний",STATUS_INDICATOR_OFFLINE:"Відсутній",ARIA_LEAVE_SEARCH_MODE:"Вийти з режиму пошуку",ARIA_SEARCH_UP:"Шукати вгору",ARIA_SEARCH_DOWN:"Шукати вниз",ARIA_CLOSE_CHAT_POPUP:"Закрити вікно чату",ARIA_SEARCH_INSIDE_CONVERSATION:"Шукати в цій розмові",ARIA_SEARCH:"Пошук",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"встановити швидкість відтворення",ARIA_CANCEL_UPLOAD:"Скасувати завантаження",ARIA_STOP_RECORDING:"Зупинити запис",ARIA_CANCEL_RECORDING:"Скасувати запис",ARIA_INSERT_EMOJI:"Вставити емодзі",ARIA_PLAY_AUDIO:"відтворити аудіо",ARIA_PAUSE_AUDIO:"призупинити аудіо",ARIA_REACTION_COUNT:(e,t)=>`${e} реакцій з ${t}`,ARIA_MORE_ACTIONS:"Більше дій",ARIA_REPLYING_TO:(e,t)=>`Відповідь на ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Вийти з режиму відповіді"}},vi:{code:"vi-VN",name:"Vietnamese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/vi.js",emojiDataUrl:null,translation:{YESTERDAY:"Hôm qua",TODAY:"Hôm nay",DAYS:"ngày",HOURS:"giờ",MINUTES:"phút",JUST_NOW:"vừa xong",LOCATION:"Địa điểm",CANCEL:"Hủy",INBOX:"Hộp thư đến",DESKTOP_NOTIFICATIONS:"Thông báo trình duyệt",DESKTOP_NOTIFICATIONS_ERROR:"Không thể bật thông báo trên trình duyệt vì trình duyệt của bạn đang tắt chức năng này. Hãy thử tìm trong cài đặt trình duyệt hoặc sử dụng một trình duyệt khác.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Hoạt động",STATUS_INDICATOR_OFFLINE:"Vắng mặt",ARIA_LEAVE_SEARCH_MODE:"Thoát chế độ tìm kiếm",ARIA_SEARCH_UP:"Tìm kiếm lên trên",ARIA_SEARCH_DOWN:"Tìm kiếm xuống dưới",ARIA_CLOSE_CHAT_POPUP:"Đóng cửa sổ trò chuyện",ARIA_SEARCH_INSIDE_CONVERSATION:"Tìm kiếm trong cuộc trò chuyện này",ARIA_SEARCH:"Tìm kiếm",ARIA_CHAT:"Trò chuyện",ARIA_SET_PLAYBACK_SPEED:"đặt tốc độ phát",ARIA_CANCEL_UPLOAD:"Hủy tải lên",ARIA_STOP_RECORDING:"Dừng ghi âm",ARIA_CANCEL_RECORDING:"Hủy ghi âm",ARIA_INSERT_EMOJI:"Chèn biểu tượng cảm xúc",ARIA_PLAY_AUDIO:"phát âm thanh",ARIA_PAUSE_AUDIO:"tạm dừng âm thanh",ARIA_REACTION_COUNT:(e,t)=>`${e} phản ứng với ${t}`,ARIA_MORE_ACTIONS:"Thêm hành động",ARIA_REPLYING_TO:(e,t)=>`Đang trả lời ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Thoát chế độ trả lời"}},zh:{code:"zh-CN",name:"Chinese (Simplified)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh/emojibase/data.json",translation:{YESTERDAY:"昨天",TODAY:"今天",DAYS:"天",HOURS:"小时",MINUTES:"分钟",JUST_NOW:"刚才",LOCATION:"地点",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"浏览器通知",DESKTOP_NOTIFICATIONS_ERROR:"因浏览器设置为阻止,所以无法激活浏览器提醒。请去设置里查看或者尝试其他的浏览器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 演示提醒`,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:"标记为未读",STATUS_INDICATOR_ONLINE:"活跃",STATUS_INDICATOR_OFFLINE:"离开",ARIA_LEAVE_SEARCH_MODE:"退出搜索模式",ARIA_SEARCH_UP:"向上搜索",ARIA_SEARCH_DOWN:"向下搜索",ARIA_CLOSE_CHAT_POPUP:"关闭聊天弹窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此对话中搜索",ARIA_SEARCH:"搜索",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"设置播放速度",ARIA_CANCEL_UPLOAD:"取消上传",ARIA_STOP_RECORDING:"停止录音",ARIA_CANCEL_RECORDING:"取消录音",ARIA_INSERT_EMOJI:"插入表情符号",ARIA_PLAY_AUDIO:"播放音频",ARIA_PAUSE_AUDIO:"暂停音频",ARIA_REACTION_COUNT:(e,t)=>`${e}个反应(${t})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(e,t)=>`正在回复 ${e}:${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回复模式"}},zhTw:{code:"zh-TW",name:"Chinese (Traditional)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh-hant/cldr/data.json",translation:{YESTERDAY:"昨天",TODAY:"昨天",DAYS:"天",HOURS:"小時",MINUTES:"分",JUST_NOW:"現在",LOCATION:"地點",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"瀏覽器通知",DESKTOP_NOTIFICATIONS_ERROR:"無法啟用瀏覽器通知,因為您的瀏覽器主動阻止它們。 嘗試查看設置或使用其他瀏覽器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 演示通知`,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:"標記為未讀",STATUS_INDICATOR_ONLINE:"活躍",STATUS_INDICATOR_OFFLINE:"離開",ARIA_LEAVE_SEARCH_MODE:"離開搜尋模式",ARIA_SEARCH_UP:"向上搜尋",ARIA_SEARCH_DOWN:"向下搜尋",ARIA_CLOSE_CHAT_POPUP:"關閉聊天彈窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此對話中搜尋",ARIA_SEARCH:"搜尋",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"設定播放速度",ARIA_CANCEL_UPLOAD:"取消上傳",ARIA_STOP_RECORDING:"停止錄音",ARIA_CANCEL_RECORDING:"取消錄音",ARIA_INSERT_EMOJI:"插入表情符號",ARIA_PLAY_AUDIO:"播放音訊",ARIA_PAUSE_AUDIO:"暫停音訊",ARIA_REACTION_COUNT:(e,t)=>`${e}個反應(${t})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(e,t)=>`正在回覆 ${e}:${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回覆模式"}}},Rm=()=>{const e=document.createElement("canvas");e.width=e.height=1;const t=e.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},Nd=(e,t)=>{const n=Rm();return n.fillStyle=t,n.fillText(e,0,0),n.getImageData(0,0,1,1).data},kg=e=>!e.includes("")||Rm().measureText(e).width<160,wg=(e,t)=>{const n=[...e].join(",");return n===[...t].join(",")&&!n.startsWith("0,0,0,")};function Im(e){try{return function(t){const n=Nd(t,"#000"),r=Nd(t,"#fff"),i=kg(t);return n&&r&&i&&wg(n,r)}(e)}catch(t){return!0}}var nf;const ym=(nf=globalThis.window)!=null&&nf.document?function(){if(typeof window=="undefined"||window.E2E)return 16;const e={"":16,"🚶➡️":15.1,"🫨":15,"🫠":14,"😵💫":13.1,"🥲":13,"🧑🦰":12.1,"🥻":12,"🥰":11,"🤩":5,"👱♀️":4,"🤣":3,"👁️🗨️":2,"😀":1,"😐️":.7,"😃":.6};for(const[t,n]of Object.entries(e))if(Im(t))return n}():0;class Cm{constructor(t,n){this.currentUser$=Ut(null),this.app$=Ut(null),this.appId$=Ut(null),this.extUserId$=Ut(null),this.hasTokenFetcher$=Ut(!1),this.authTokenState$=Ut("idle"),this.themeCustom$=Ut(ad({value:void 0})),this.device$=Ut({supportsEmojiPicker:!!ym,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=Ut({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1}),this.locale$=Ut(()=>{var s,a;const r=this.extUserId$.get(),i=this.app$.appMetadata.defaultLocale.get(),o=this.currentUser$.locale.get();return(a=(s=r&&o)!=null?s:i)!=null?a:"en-US"}),this.translationData$=Ut(()=>function(r){const i=r.replace(/_/g,"-").toLowerCase(),o=Cd[i];if(o)return{strings:{...o.translation,locale:i},emojiPickerTranslationUrl:o.emojiPickerTranslationUrl,emojiDataUrl:o.emojiDataUrl};const s=i.slice(0,2),a=Cd[s];return a?{strings:{...a.translation,locale:s},emojiPickerTranslationUrl:a.emojiPickerTranslationUrl,emojiDataUrl:a.emojiDataUrl}:(Qe.warn(`User locale '${r}' not supported; falling back to English.`),{strings:{...si.translation,locale:"en-US"},emojiPickerTranslationUrl:si.emojiPickerTranslationUrl,emojiDataUrl:si.emojiDataUrl})}(this.locale$.get())),this.t$=Ut(()=>this.translationData$.strings.get()),_i(()=>{this.appId$.set(t),this.extUserId$.set(n)})}updateThemeCustom(t){this.themeCustom$.set(ad({value:t}))}}const Lg={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class Nm extends Cm{constructor(t,n){super(t,n),this.type="ChatboxStore",this.messageSubscription=null,this.readyForNewMessagesPromise=Promise.resolve(),this.participantSubscription=null,this.onlineSubscriptions={},this.state$=Ut({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 mt.defined(r),mt.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();mt.defined(r);const i=this.state$.userPermissions.get(),o={...Lg,...i},s={canReplyToMessage:$n(r.messages.reply,!0),canEditMessage:$n(r.messages.edit,!0),canDeleteMessage:$n(r.messages.delete,!0),canAddReaction:$n(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:$n(r.messages.reply,!1),canEditMessage:$n(r.messages.edit,!1),canDeleteMessage:$n(r.messages.delete,!1),canAddReaction:$n(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.referencedMessage$=Ut(()=>{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$=Ut(()=>{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],A=E==null?void 0:E.type;if(!E||A!=="file")return m;const _=E.size+","+E.filename,g=this.state$.localFileBlobUrls.child(r).child(_).url.get();return g?{...m,content:[{...E,url:g}]}:m});let c=null,u=0,h=!1;const d=[];for(const m of l){const E=new Date(m.createdAt),A=new Date(E).setHours(0,0,0,0),_=u&&A!==u,g=E.getTime()>i,v=!(!h||g||c!=null&&c.id.startsWith("ephemeral"));(v||_)&&d.push(new Bl({id:"border-before-"+m.id,isDayMarker:!!_,isReadMarker:!!v,timestamp:_?u:void 0})),d.push(m),h=g,u=A,c=m}return function(m,E){const A=[];let _=[];const g=Symbol("NO_KEY");let v=g;for(const S of m){const I=E(S);v===g||v===I?_.push(S):(A.push(_),_=[S]),v=I}return _.length!==0&&A.push(_),A}(d,m=>{var E;return m instanceof Bl?m.id:(E=m.sender)==null?void 0:E.id}).map(m=>(m.id=m.map(E=>E.id).join(","),m))})}storeTyping(t,n){this.state$.typing.child(t).set(n)}messagePermissions$(t){const n=this.currentUser$.get();if(!n)throw new Error("Unreachable");const r=t.content[0];return t.sender?n.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,n,r){_i(()=>{var l;const i=n.reduce((c,u)=>(c[u.id]=u,c),{}),o=this.state$.extCurrentConversationId.peek(),s=this.extUserId$.peek();mt(s&&o),this.state$.messages.child(t).set({state:n,lookup:i,loadedAll:r});const a=this.state$.ephemeralMessages.child(t);for(const c of n){const u=this.state$.ephemeralMessageIdMapping.child(t).child(c.id).peek();u&&a.child(u).delete();const h=c.content[0];if(((l=c.sender)==null?void 0:l.id)!==s||h.type!=="file")continue;const d=h.size+","+h.filename,p=this.state$.localFileBlobUrls.child(o).child(d);if(p.fetching.peek()!==!1)continue;const f=()=>{URL.revokeObjectURL(p.url.peek()),p.delete()};if(h.subtype==="image"){p.fetching.set(!0);const m=document.createElement("img");m.addEventListener("load",f,{once:!0}),m.src=h.url}else if(h.subtype==="video"){p.fetching.set(!0);const m=document.createElement("video");m.addEventListener("loadeddata",f,{once:!0}),m.src=h.url}else if(h.subtype==="audio"||h.subtype==="voice"){p.fetching.set(!0);const m=document.createElement("audio");m.addEventListener("loadeddata",f,{once:!0}),m.src=h.url}}})}}function $n(e,t){return e==="all"||e==="own"&&t||e==="other"&&!t}class Bl{constructor({id:t,isDayMarker:n,isReadMarker:r,timestamp:i}){this.id=t,this.isDayMarker=n,this.isReadMarker=r,this.timestamp=n?i:void 0}}function ln(e,t=!1){return function(n,r=!1){return n.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+ln(i.children)+"*";case"italic":return"_"+ln(i.children)+"_";case"strikethrough":return"~"+ln(i.children)+"~";case"blockquote":return ln(i.children).split(`
|
|
1
|
+
"use client";"use strict";var $c=e=>{throw TypeError(e)};var Vc=(e,t,n)=>t.has(e)||$c("Cannot "+n);var Wt=(e,t,n)=>(Vc(e,t,"read from private field"),n?n.call(e):t.get(e)),mr=(e,t,n)=>t.has(e)?$c("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ui=(e,t,n,r)=>(Vc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const kA=require("@talkjs/core"),Iu=Object.freeze(Object.defineProperty({__proto__:null,get AfterMessages(){return rR},get AudioBlock(){return aR},get Avatar(){return fR},get BeforeMessages(){return nR},get ChatHeader(){return VT},get CompactMessageContent(){return oR},get ConversationImage(){return mR},get ConversationListItem(){return OR},get FileBlock(){return lR},get GroupChatImage(){return ER},get Icon(){return ZT},get ImageBlock(){return uR},get LocationBlock(){return cR},get Message(){return GT},get MessageActionMenu(){return XT},get MessageDivider(){return tR},get MessageField(){return KT},get MessageListFooter(){return eR},get MessageListHeader(){return YT},get NoConversationSelected(){return iR},get RecordingPreview(){return JT},get ReferencedMessage(){return _R},get ReplyBar(){return AR},get TextBlock(){return dR},get TimeAgo(){return gR},get VideoBlock(){return hR},get VoiceBlock(){return pR},get VoiceRecorder(){return qT}},Symbol.toStringTag,{value:"Module"}));var Lo,st,cf,Dr,zc,df,hf,pf,yu,Rl,Il,ff,lo={},mf=[],wA=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,uo=Array.isArray;function pn(e,t){for(var n in t)e[n]=t[n];return e}function yl(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function Tt(e,t,n){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):n),typeof e=="function"&&e.defaultProps!=null)for(o in e.defaultProps)s[o]===void 0&&(s[o]=e.defaultProps[o]);return Zi(e,s,r,i,null)}function Zi(e,t,n,r,i){var o={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i==null?++cf:i,__i:-1,__u:0};return i==null&&st.vnode!=null&&st.vnode(o),o}function Ef(){return{current:null}}function qt(e){return e.children}function Xe(e,t){this.props=e,this.context=t}function _i(e,t){if(t==null)return e.__?_i(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?_i(e):null}function _f(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return _f(e)}}function Cl(e){(!e.__d&&(e.__d=!0)&&Dr.push(e)&&!vs.__r++||zc!=st.debounceRendering)&&((zc=st.debounceRendering)||df)(vs)}function vs(){for(var e,t,n,r,i,o,s,a=1;Dr.length;)Dr.length>a&&Dr.sort(hf),e=Dr.shift(),a=Dr.length,e.__d&&(n=void 0,r=void 0,i=(r=(t=e).__v).__e,o=[],s=[],t.__P&&((n=pn({},r)).__v=r.__v+1,st.vnode&&st.vnode(n),Cu(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[i]:null,o,i==null?_i(r):i,!!(32&r.__u),s),n.__v=r.__v,n.__.__k[n.__i]=n,gf(o,n,s),r.__e=r.__=null,n.__e!=i&&_f(n)));vs.__r=0}function Yc(e,t,n,r,i,o,s,a,l,c,u){var h,d,p,f,m,E,A,_=r&&r.__k||mf,g=t.length;for(l=function(D,S,I,T,C){var O,v,y,b,P,w=I.length,F=w,H=0;for(D.__k=new Array(C),O=0;O<C;O++)(v=S[O])!=null&&typeof v!="boolean"&&typeof v!="function"?(typeof v=="string"||typeof v=="number"||typeof v=="bigint"||v.constructor==String?v=D.__k[O]=Zi(null,v,null,null,null):uo(v)?v=D.__k[O]=Zi(qt,{children:v},null,null,null):v.constructor==null&&v.__b>0?v=D.__k[O]=Zi(v.type,v.props,v.key,v.ref?v.ref:null,v.__v):D.__k[O]=v,b=O+H,v.__=D,v.__b=D.__b+1,y=null,(P=v.__i=LA(v,I,b,F))!=-1&&(F--,(y=I[P])&&(y.__u|=2)),y==null||y.__v==null?(P==-1&&(C>w?H--:C<w&&H++),typeof v.type!="function"&&(v.__u|=4)):P!=b&&(P==b-1?H--:P==b+1?H++:(P>b?H--:H++,v.__u|=4))):D.__k[O]=null;if(F)for(O=0;O<w;O++)(y=I[O])!=null&&!(2&y.__u)&&(y.__e==T&&(T=_i(y)),Of(y,y));return T}(n,t,_,l,g),h=0;h<g;h++)(p=n.__k[h])!=null&&(d=p.__i==-1?lo:_[p.__i]||lo,p.__i=h,E=Cu(e,p,d,i,o,s,a,l,c,u),f=p.__e,p.ref&&d.ref!=p.ref&&(d.ref&&Nu(d.ref,null,p),u.push(p.ref,p.__c||f,p)),m==null&&f!=null&&(m=f),(A=!!(4&p.__u))||d.__k===p.__k?l=Af(p,l,e,A):typeof p.type=="function"&&E!==void 0?l=E:f&&(l=f.nextSibling),p.__u&=-7);return n.__e=m,l}function Af(e,t,n,r){var i,o;if(typeof e.type=="function"){for(i=e.__k,o=0;i&&o<i.length;o++)i[o]&&(i[o].__=e,t=Af(i[o],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=_i(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Mn(e,t){return t=t||[],e==null||typeof e=="boolean"||(uo(e)?e.some(function(n){Mn(n,t)}):t.push(e)),t}function LA(e,t,n,r){var i,o,s,a=e.key,l=e.type,c=t[n],u=c!=null&&!(2&c.__u);if(c===null&&a==null||u&&a==c.key&&l==c.type)return n;if(r>(u?1:0)){for(i=n-1,o=n+1;i>=0||o<t.length;)if((c=t[s=i>=0?i--:o++])!=null&&!(2&c.__u)&&a==c.key&&l==c.type)return s}return-1}function Gc(e,t,n){t[0]=="-"?e.setProperty(t,n==null?"":n):e[t]=n==null?"":typeof n!="number"||wA.test(t)?n:n+"px"}function Go(e,t,n,r,i){var o,s;t:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||Gc(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||Gc(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")o=t!=(t=t.replace(pf,"$1")),s=t.toLowerCase(),t=s in e||t=="onFocusOut"||t=="onFocusIn"?s.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+o]=n,n?r?n.u=r.u:(n.u=yu,e.addEventListener(t,o?Il:Rl,o)):e.removeEventListener(t,o?Il:Rl,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 e)try{e[t]=n==null?"":n;break t}catch(a){}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function Wc(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=yu++;else if(t.t<n.u)return;return n(st.event?st.event(t):t)}}}function Cu(e,t,n,r,i,o,s,a,l,c){var u,h,d,p,f,m,E,A,_,g,D,S,I,T,C,O,v,y=t.type;if(t.constructor!=null)return null;128&n.__u&&(l=!!(32&n.__u),o=[a=t.__e=n.__e]),(u=st.__b)&&u(t);t:if(typeof y=="function")try{if(A=t.props,_="prototype"in y&&y.prototype.render,g=(u=y.contextType)&&r[u.__c],D=u?g?g.props.value:u.__:r,n.__c?E=(h=t.__c=n.__c).__=h.__E:(_?t.__c=h=new y(A,D):(t.__c=h=new Xe(A,D),h.constructor=y,h.render=PA),g&&g.sub(h),h.state||(h.state={}),h.__n=r,d=h.__d=!0,h.__h=[],h._sb=[]),_&&h.__s==null&&(h.__s=h.state),_&&y.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=pn({},h.__s)),pn(h.__s,y.getDerivedStateFromProps(A,h.__s))),p=h.props,f=h.state,h.__v=t,d)_&&y.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),_&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(_&&y.getDerivedStateFromProps==null&&A!==p&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(A,D),t.__v==n.__v||!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(A,h.__s,D)===!1){for(t.__v!=n.__v&&(h.props=A,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(b){b&&(b.__=t)}),S=0;S<h._sb.length;S++)h.__h.push(h._sb[S]);h._sb=[],h.__h.length&&s.push(h);break t}h.componentWillUpdate!=null&&h.componentWillUpdate(A,h.__s,D),_&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(p,f,m)})}if(h.context=D,h.props=A,h.__P=e,h.__e=!1,I=st.__r,T=0,_){for(h.state=h.__s,h.__d=!1,I&&I(t),u=h.render(h.props,h.state,h.context),C=0;C<h._sb.length;C++)h.__h.push(h._sb[C]);h._sb=[]}else do h.__d=!1,I&&I(t),u=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++T<25);h.state=h.__s,h.getChildContext!=null&&(r=pn(pn({},r),h.getChildContext())),_&&!d&&h.getSnapshotBeforeUpdate!=null&&(m=h.getSnapshotBeforeUpdate(p,f)),O=u,u!=null&&u.type===qt&&u.key==null&&(O=Df(u.props.children)),a=Yc(e,uo(O)?O:[O],t,n,r,i,o,s,a,l,c),h.base=t.__e,t.__u&=-161,h.__h.length&&s.push(h),E&&(h.__E=h.__=null)}catch(b){if(t.__v=null,l||o!=null)if(b.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(v=o.length;v--;)yl(o[v]);Nl(t)}else t.__e=n.__e,t.__k=n.__k,b.then||Nl(t);st.__e(b,t,n)}else o==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):a=t.__e=function(b,P,w,F,H,B,K,W,X){var G,ht,tt,rt,ot,bt,ee,Gt=w.props||lo,vt=P.props,Pt=P.type;if(Pt=="svg"?H="http://www.w3.org/2000/svg":Pt=="math"?H="http://www.w3.org/1998/Math/MathML":H||(H="http://www.w3.org/1999/xhtml"),B!=null){for(G=0;G<B.length;G++)if((ot=B[G])&&"setAttribute"in ot==!!Pt&&(Pt?ot.localName==Pt:ot.nodeType==3)){b=ot,B[G]=null;break}}if(b==null){if(Pt==null)return document.createTextNode(vt);b=document.createElementNS(H,Pt,vt.is&&vt),W&&(st.__m&&st.__m(P,B),W=!1),B=null}if(Pt==null)Gt===vt||W&&b.data==vt||(b.data=vt);else{if(B=B&&Lo.call(b.childNodes),!W&&B!=null)for(Gt={},G=0;G<b.attributes.length;G++)Gt[(ot=b.attributes[G]).name]=ot.value;for(G in Gt)if(ot=Gt[G],G!="children"){if(G=="dangerouslySetInnerHTML")tt=ot;else if(!(G in vt)){if(G=="value"&&"defaultValue"in vt||G=="checked"&&"defaultChecked"in vt)continue;Go(b,G,null,ot,H)}}for(G in vt)ot=vt[G],G=="children"?rt=ot:G=="dangerouslySetInnerHTML"?ht=ot:G=="value"?bt=ot:G=="checked"?ee=ot:W&&typeof ot!="function"||Gt[G]===ot||Go(b,G,ot,Gt[G],H);if(ht)W||tt&&(ht.__html==tt.__html||ht.__html==b.innerHTML)||(b.innerHTML=ht.__html),P.__k=[];else if(tt&&(b.innerHTML=""),Yc(P.type=="template"?b.content:b,uo(rt)?rt:[rt],P,w,F,Pt=="foreignObject"?"http://www.w3.org/1999/xhtml":H,B,K,B?B[0]:w.__k&&_i(w,0),W,X),B!=null)for(G=B.length;G--;)yl(B[G]);W||(G="value",Pt=="progress"&&bt==null?b.removeAttribute("value"):bt!=null&&(bt!==b[G]||Pt=="progress"&&!bt||Pt=="option"&&bt!=Gt[G])&&Go(b,G,bt,Gt[G],H),G="checked",ee!=null&&ee!=b[G]&&Go(b,G,ee,Gt[G],H))}return b}(n.__e,t,n,r,i,o,s,l,c);return(u=st.diffed)&&u(t),128&t.__u?void 0:a}function Nl(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(Nl)}function gf(e,t,n){for(var r=0;r<n.length;r++)Nu(n[r],n[++r],n[++r]);st.__c&&st.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(o){o.call(i)})}catch(o){st.__e(o,i.__v)}})}function Df(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:uo(e)?e.map(Df):pn({},e)}function Nu(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(i){st.__e(i,n)}}function Of(e,t,n){var r,i;if(st.unmount&&st.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||Nu(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(o){st.__e(o,t)}r.base=r.__P=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Of(r[i],t,n||typeof e.type!="function");n||yl(e.__e),e.__c=e.__=e.__e=void 0}function PA(e,t,n){return this.constructor(e,n)}function co(e,t,n){var r,i,o,s;t==document&&(t=document.documentElement),st.__&&st.__(e,t),i=(r=typeof n=="function")?null:n&&n.__k||t.__k,o=[],s=[],Cu(t,e=(!r&&n||t).__k=Tt(qt,null,[e]),i||lo,lo,t.namespaceURI,!r&&n?[n]:i?null:t.firstChild?Lo.call(t.childNodes):null,o,!r&&n?n:i?i.__e:t.firstChild,r,s),gf(o,e,s)}function vf(e,t){co(e,t,vf)}function MA(e,t,n){var r,i,o,s,a=pn({},e.props);for(o in e.type&&e.type.defaultProps&&(s=e.type.defaultProps),t)o=="key"?r=t[o]:o=="ref"?i=t[o]:a[o]=t[o]===void 0&&s!=null?s[o]:t[o];return arguments.length>2&&(a.children=arguments.length>3?Lo.call(arguments,2):n),Zi(e.type,a,r||e.key,i||e.ref,null)}function Ni(e){function t(n){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,Cl(s)})},this.sub=function(o){r.add(o);var s=o.componentWillUnmount;o.componentWillUnmount=function(){r&&r.delete(o),s&&s.call(o)}}),n.children}return t.__c="__cC"+ff++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}Lo=mf.slice,st={__e:function(e,t,n,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(e)),s=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),s=i.__d),s)return i.__E=i}catch(a){e=a}throw e}},cf=0,Xe.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=pn({},this.state),typeof e=="function"&&(e=e(pn({},n),this.props)),e&&pn(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Cl(this))},Xe.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Cl(this))},Xe.prototype.render=qt,Dr=[],df=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,hf=function(e,t){return e.__v.__b-t.__v.__b},vs.__r=0,pf=/(PointerCapture)$|Capture$/i,yu=0,Rl=Wc(!1),Il=Wc(!0),ff=0;var xA=0;function L(e,t,n,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 c={type:e,props:l,key:n,ref:s,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--xA,__i:-1,__u:0,__source:i,__self:o};if(typeof e=="function"&&(s=e.defaultProps))for(a in s)l[a]===void 0&&(l[a]=s[a]);return st.vnode&&st.vnode(c),c}var Bn,St,Ca,Xc,Ai=0,Sf=[],wt=st,Kc=wt.__b,qc=wt.__r,Jc=wt.diffed,Zc=wt.__c,Qc=wt.unmount,td=wt.__;function Vr(e,t){wt.__h&&wt.__h(St,e,Ai||t),Ai=0;var n=St.__H||(St.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ut(e){return Ai=1,ea(Tf,e)}function ea(e,t,n){var r=Vr(Bn++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Tf(void 0,t),function(a){var l=r.__N?r.__N[0]:r.__[0],c=r.t(l,a);l!==c&&(r.__N=[c,r.__[1]],r.__c.setState({}))}],r.__c=St,!St.__f)){var i=function(a,l,c){if(!r.__c.__H)return!0;var u=r.__c.__H.__.filter(function(d){return!!d.__c});if(u.every(function(d){return!d.__N}))return!o||o.call(this,a,l,c);var h=r.__c.props!==a;return u.forEach(function(d){if(d.__N){var p=d.__[0];d.__=d.__N,d.__N=void 0,p!==d.__[0]&&(h=!0)}}),o&&o.call(this,a,l,c)||h};St.__f=!0;var o=St.shouldComponentUpdate,s=St.componentWillUpdate;St.componentWillUpdate=function(a,l,c){if(this.__e){var u=o;o=void 0,i(a,l,c),o=u}s&&s.call(this,a,l,c)},St.shouldComponentUpdate=i}return r.__N||r.__}function Z(e,t){var n=Vr(Bn++,3);!wt.__s&&ku(n.__H,t)&&(n.__=e,n.u=t,St.__H.__h.push(n))}function ve(e,t){var n=Vr(Bn++,4);!wt.__s&&ku(n.__H,t)&&(n.__=e,n.u=t,St.__h.push(n))}function Q(e){return Ai=5,at(function(){return{current:e}},[])}function jn(e,t,n){Ai=6,ve(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function at(e,t){var n=Vr(Bn++,7);return ku(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function it(e,t){return Ai=8,at(function(){return e},t)}function ar(e){var t=St.context[e.__c],n=Vr(Bn++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(St)),t.props.value):e.__}function bu(e,t){wt.useDebugValue&&wt.useDebugValue(t?t(e):e)}function na(){var e=Vr(Bn++,11);if(!e.__){for(var t=St.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function FA(){for(var e;e=Sf.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(as),e.__H.__h.forEach(bl),e.__H.__h=[]}catch(t){e.__H.__h=[],wt.__e(t,e.__v)}}wt.__b=function(e){St=null,Kc&&Kc(e)},wt.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),td&&td(e,t)},wt.__r=function(e){qc&&qc(e),Bn=0;var t=(St=e.__c).__H;t&&(Ca===St?(t.__h=[],St.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(as),t.__h.forEach(bl),t.__h=[],Bn=0)),Ca=St},wt.diffed=function(e){Jc&&Jc(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Sf.push(t)!==1&&Xc===wt.requestAnimationFrame||((Xc=wt.requestAnimationFrame)||BA)(FA)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),Ca=St=null},wt.__c=function(e,t){t.some(function(n){try{n.__h.forEach(as),n.__h=n.__h.filter(function(r){return!r.__||bl(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],wt.__e(r,n.__v)}}),Zc&&Zc(e,t)},wt.unmount=function(e){Qc&&Qc(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{as(r)}catch(i){t=i}}),n.__H=void 0,t&&wt.__e(t,n.__v))};var ed=typeof requestAnimationFrame=="function";function BA(e){var t,n=function(){clearTimeout(r),ed&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);ed&&(t=requestAnimationFrame(n))}function as(e){var t=St,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),St=t}function bl(e){var t=St;e.__c=e.__(),St=t}function ku(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function Tf(e,t){return typeof t=="function"?t(e):t}function Rf(e,t){for(var n in t)e[n]=t[n];return e}function kl(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function wu(e,t){var n=t(),r=ut({t:{__:n,u:t}}),i=r[0].t,o=r[1];return ve(function(){i.__=n,i.u=t,Na(i)&&o({t:i})},[e,n,t]),Z(function(){return Na(i)&&o({t:i}),e(function(){Na(i)&&o({t:i})})},[e]),n}function Na(e){var t,n,r=e.u,i=e.__;try{var o=r();return!((t=i)===(n=o)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch(s){return!0}}function Lu(e){e()}function Pu(e){return e}function Mu(){return[!1,Lu]}var xu=ve;function Ss(e,t){this.props=e,this.context=t}function Un(e,t){function n(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:kl(this.props,i)}function r(i){return this.shouldComponentUpdate=n,Tt(e,i)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Ss.prototype=new Xe).isPureReactComponent=!0,Ss.prototype.shouldComponentUpdate=function(e,t){return kl(this.props,e)||kl(this.state,t)};var nd=st.__b;st.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),nd&&nd(e)};var UA=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function je(e){function t(n){var r=Rf({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=UA,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var rd=function(e,t){return e==null?null:Mn(Mn(e).map(t))},If={map:rd,forEach:rd,count:function(e){return e?Mn(e).length:0},only:function(e){var t=Mn(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:Mn},HA=st.__e;st.__e=function(e,t,n,r){if(e.then){for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}HA(e,t,n,r)};var id=st.unmount;function yf(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=Rf({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return yf(r,t,n)})),e}function Cf(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Cf(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Qi(){this.__u=0,this.o=null,this.__b=null}function Nf(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function bf(e){var t,n,r,i=null;function o(s){if(t||(t=e()).then(function(a){a&&(i=a.default||a),r=!0},function(a){n=a,r=!0}),n)throw n;if(!r)throw t;return i?Tt(i,s):null}return o.displayName="Lazy",o.__f=!0,o}function ti(){this.i=null,this.l=null}st.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),id&&id(e)},(Qi.prototype=new Xe).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var i=Nf(r.__v),o=!1,s=function(){o||(o=!0,n.__R=null,i?i(a):a())};n.__R=s;var a=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=Cf(l,l.__c.__P,l.__c.__O)}var c;for(r.setState({__a:r.__b=null});c=r.o.pop();)c.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},Qi.prototype.componentWillUnmount=function(){this.o=[]},Qi.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=yf(this.__b,n,r.__O=r.__P)}this.__b=null}var i=t.__a&&Tt(qt,null,e.fallback);return i&&(i.__u&=-33),[Tt(qt,null,t.__a?null:e.children),i]};var od=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function jA(e){return this.getChildContext=function(){return e.context},e.children}function $A(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){co(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,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)}}}co(Tt(jA,{context:t.context},e.__v),t.v)}function Fu(e,t){var n=Tt($A,{__v:e,h:t});return n.containerInfo=t,n}(ti.prototype=new Xe).__a=function(e){var t=this,n=Nf(t.__v),r=t.l.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),od(t,e,r)):i()};n?n(o):o()}},ti.prototype.render=function(e){this.i=null,this.l=new Map;var t=Mn(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},ti.prototype.componentDidUpdate=ti.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){od(e,n,t)})};var kf=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,VA=/^(?: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]/,zA=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,YA=/[A-Z0-9]/g,GA=typeof document!="undefined",WA=function(e){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Bu(e,t,n){return t.__k==null&&(t.textContent=""),co(e,t),typeof n=="function"&&n(),e?e.__c:null}function wf(e,t,n){return vf(e,t),typeof n=="function"&&n(),e?e.__c:null}Xe.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(Xe.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var sd=st.event;function XA(){}function KA(){return this.cancelBubble}function qA(){return this.defaultPrevented}st.event=function(e){return sd&&(e=sd(e)),e.persist=XA,e.isPropagationStopped=KA,e.isDefaultPrevented=qA,e.nativeEvent=e};var Uu,JA={enumerable:!1,configurable:!0,get:function(){return this.class}},ad=st.vnode;st.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,i={},o=r.indexOf("-")===-1;for(var s in n){var a=n[s];if(!(s==="value"&&"defaultValue"in n&&a==null||GA&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var l=s.toLowerCase();s==="defaultValue"&&"value"in n&&n.value==null?s="value":s==="download"&&a===!0?a="":l==="translate"&&a==="no"?a=!1:l[0]==="o"&&l[1]==="n"?l==="ondoubleclick"?s="ondblclick":l!=="onchange"||r!=="input"&&r!=="textarea"||WA(n.type)?l==="onfocus"?s="onfocusin":l==="onblur"?s="onfocusout":zA.test(s)&&(s=l):l=s="oninput":o&&VA.test(s)?s=s.replace(YA,"-$&").toLowerCase():a===null&&(a=void 0),l==="oninput"&&i[s=l]&&(s="oninputCapture"),i[s]=a}}r=="select"&&i.multiple&&Array.isArray(i.value)&&(i.value=Mn(n.children).forEach(function(c){c.props.selected=i.value.indexOf(c.props.value)!=-1})),r=="select"&&i.defaultValue!=null&&(i.value=Mn(n.children).forEach(function(c){c.props.selected=i.multiple?i.defaultValue.indexOf(c.props.value)!=-1:i.defaultValue==c.props.value})),n.class&&!n.className?(i.class=n.class,Object.defineProperty(i,"className",JA)):(n.className&&!n.class||n.class&&n.className)&&(i.class=i.className=n.className),t.props=i}(e),e.$$typeof=kf,ad&&ad(e)};var ld=st.__r;st.__r=function(e){ld&&ld(e),Uu=e.__c};var ud=st.diffed;st.diffed=function(e){ud&&ud(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Uu=null};var Lf={ReactCurrentDispatcher:{current:{readContext:function(e){return Uu.__n[e.__c].props.value},useCallback:it,useContext:ar,useDebugValue:bu,useDeferredValue:Pu,useEffect:Z,useId:na,useImperativeHandle:jn,useInsertionEffect:xu,useLayoutEffect:ve,useMemo:at,useReducer:ea,useRef:Q,useState:ut,useSyncExternalStore:wu,useTransition:Mu}}};function Pf(e){return Tt.bind(null,e)}function Po(e){return!!e&&e.$$typeof===kf}function Mf(e){return Po(e)&&e.type===qt}function xf(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function Ff(e){return Po(e)?MA.apply(null,arguments):e}function Hu(e){return!!e.__k&&(co(null,e),!0)}function Bf(e){return e&&(e.base||e.nodeType===1&&e)||null}var Uf=function(e,t){return e(t)},ju=function(e,t){return e(t)},Hf=qt,jf=Po,Pe={useState:ut,useId:na,useReducer:ea,useEffect:Z,useLayoutEffect:ve,useInsertionEffect:xu,useTransition:Mu,useDeferredValue:Pu,useSyncExternalStore:wu,startTransition:Lu,useRef:Q,useImperativeHandle:jn,useMemo:at,useCallback:it,useContext:ar,useDebugValue:bu,version:"18.3.1",Children:If,render:Bu,hydrate:wf,unmountComponentAtNode:Hu,createPortal:Fu,createElement:Tt,createContext:Ni,createFactory:Pf,cloneElement:Ff,createRef:Ef,Fragment:qt,isValidElement:Po,isElement:jf,isFragment:Mf,isMemo:xf,findDOMNode:Bf,Component:Xe,PureComponent:Ss,memo:Un,forwardRef:je,flushSync:ju,unstable_batchedUpdates:Uf,StrictMode:Hf,Suspense:Qi,SuspenseList:ti,lazy:bf,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Lf};const $u=Object.freeze(Object.defineProperty({__proto__:null,Children:If,Component:Xe,Fragment:qt,PureComponent:Ss,StrictMode:Hf,Suspense:Qi,SuspenseList:ti,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Lf,cloneElement:Ff,createContext:Ni,createElement:Tt,createFactory:Pf,createPortal:Fu,createRef:Ef,default:Pe,findDOMNode:Bf,flushSync:ju,forwardRef:je,hydrate:wf,isElement:jf,isFragment:Mf,isMemo:xf,isValidElement:Po,lazy:bf,memo:Un,render:Bu,startTransition:Lu,unmountComponentAtNode:Hu,unstable_batchedUpdates:Uf,useCallback:it,useContext:ar,useDebugValue:bu,useDeferredValue:Pu,useEffect:Z,useErrorBoundary:function(e){var t=Vr(Bn++,10),n=ut();return t.__=e,St.componentDidCatch||(St.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]},useId:na,useImperativeHandle:jn,useInsertionEffect:xu,useLayoutEffect:ve,useMemo:at,useReducer:ea,useRef:Q,useState:ut,useSyncExternalStore:wu,useTransition:Mu,version:"18.3.1"},Symbol.toStringTag,{value:"Module"}));var Vu=Object.prototype.hasOwnProperty;function Yt(e){return Array.isArray(e)}function En(e){return!(!e||typeof e!="object"||e instanceof Date||Yt(e))}function ZA(e){return En(e)&&e.constructor===Object}function lt(e){return typeof e=="function"}function De(e){const t=typeof e;return e!==void 0&&(wl(e)||t!=="object"&&t!=="function")}function wl(e){return e instanceof Date}function $f(e){return typeof e=="boolean"}function fn(e){return e instanceof Promise}function te(e){return e instanceof Map||e instanceof WeakMap}function Hn(e){return e instanceof Set||e instanceof WeakSet}function Ts(e){if(!e)return!1;if(Yt(e))return e.length===0;if(te(e)||Hn(e))return e.size===0;for(const t in e)if(Vu.call(e,t))return!1;return!0}var QA=new Set(["boolean","string","number"]);function ra(e){return!!e.parent}var tg=Symbol.toPrimitive,eg=Symbol.iterator,gi=Symbol("getNode"),ia=Symbol("delete"),Vf=Symbol("opaque"),ng=Symbol("plain"),zu=Symbol("optimized"),ho=Symbol("linked"),Vt={pendingNodes:new Map,dirtyNodes:new Set};function po(e){return e&&(e[Vf]||e.$$typeof)}function zf(e){return e&&e[ng]}function Yf(e){return Yt(e)?"array":te(e)?"map":e instanceof Set?"set":"object"}function rg(e,t){return te(t)?{__LSType:"Map",value:Array.from(t.entries())}:t instanceof Set?{__LSType:"Set",value:Array.from(t)}:(Vt.replacer&&(t=Vt.replacer(e,t)),t)}var ig=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z$/;function og(e,t){if(t){if(typeof t=="string"&&ig.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)}Vt.reviver&&(t=Vt.reviver(e,t))}return t}function Gf(e){return e&&JSON.stringify(e,rg)}function Wf(e){return e&&JSON.parse(e,og)}function Xf(e){return Wf(Gf(e))}function jt(e){return!!e&&!!e[gi]}function Mo(e){return e&&e[gi]}function Kf(e,t,n,r,i){return r?e.add(n):i?e.set(t,n):e[t]=n,n}function xn(e,t){var n;const r=(n=e.parent)!=null?n:e,i=e.parent?e.key:"_",o=t===ia;o&&(t=void 0);const s=e.parent?Yu(r):r.root,a=Hn(s),l=te(s),c=a?i:l?s.get(i):s[i],u=lt(t);if((t=r.isAssigning||!u||lt(c)?t:t(c))!==c)try{r.isSetting=(r.isSetting||0)+1,o?l||a?s.delete(i):delete s[i]:Kf(s,i,t,a,l)}finally{r.isSetting--}return{prevValue:c,newValue:t,parentValue:s}}var cd=[];function Nt(e){let t=0,n=e;for(;ra(n);)cd[t++]=n.key,n=n.parent;let r=e.root._;for(let i=t-1;r&&i>=0;i--){const o=cd[i];r=o!=="size"&&te(r)?r.get(o):r[o]}return r}function rn(e,t,n){var r,i;let o=(r=e.children)==null?void 0:r.get(t);return o||(o={root:e.root,parent:e,key:t,lazy:!0,numListenersRecursive:0},((i=e.lazyFn)==null?void 0:i.length)===1&&(n=e.lazyFn.bind(e,t)),lt(n)&&(o=Object.assign(()=>{},o),o.lazyFn=n),e.children||(e.children=new Map),e.children.set(t,o)),o}function Yu(e){let t=Nt(e);if(!t||lt(t))if(ra(e)){const n=Yu(e.parent),r=Hn(n),i=te(n);t=Kf(n,e.key,{},r,i)}else t=e.root._={};return t}function qf(e,t){var n,r;let i=jt(e)?void 0:En(e)?"id"in e?"id":"key"in e?"key":"_id"in e?"_id":"__id"in e?"__id":void 0:void 0;if(!i&&t.parent){const o=t.key+"_keyExtractor",s=(r=(n=t.functions)==null?void 0:n.get(o))!=null?r:Nt(t.parent)[t.key+"_keyExtractor"];s&<(s)&&(i=s)}return i}function dd(e,t,n){e.functions||(e.functions=new Map),e.functions.set(t,n)}function Jf(e,t){return e===t||wl(e)&&wl(t)&&+e==+t}function Ll(e,t,n,r){return t?void 0:e?r?Array.from(e):n?Array.from(e.keys()):Object.keys(e):[]}function sg(e,t){return e&&Object.defineProperty(e,t,{value:!0,enumerable:!1,writable:!0,configurable:!0}),e}var hd=function(e){return sg(e,Vf)};function Zf(e,t){var n;e.isPlain||!((n=e.parent)!=null&&n.isPlain)&&!zf(t)||(e.isPlain=!0)}function _n(e,t,n,r){let i=e;return!jt(i)&<(i)&&(i=n?i(n):i()),jt(i)&&!r?i.get(t):i}var to,ag=(e,t)=>e&&e[t];function Qf(e,t,n,r,i,o,s){let a,l=e;if(t.length>0){let c=o;for(let u=0;u<t.length;u++){a=t[u];const h=te(l);let d=l?h?l.get(a):l[a]:void 0;const p=c?h?c.get(a):c[a]:void 0;if(d===ia)return c&&(h?l.set(a,p):l[a]=p,s==null||s(t.slice(0,u+1),p)),e;if(d===void 0&&r===void 0&&u===t.length-1)return e;u<t.length-1&&d==null&&(d=Gu(n[u]),te(l)?l.set(a,d):l[a]=d),u<t.length-1&&(l=d,c&&(c=p))}}return a===void 0?e=i==="merge"?Rs(e,r):r:i==="merge"?l[a]=Rs(l[a],r):te(l)?l.set(a,r):l[a]=r,e}function pd(e,t,n){let r=n;for(let i=0;i<e.length;i++){const o=e[i];r=r?r[o]:Gu(t[i])}return r}function fd(e){return!(!e||(En(e)||Yt(e))&&Ts(e))}function Gu(e){switch(e){case"array":return[];case"map":return new Map;case"set":return new Set;default:return{}}}function lg(e,t,n){const{path:r,valueAtPath:i,prevAtPath:o,pathTypes:s}=t;return Qf(e,r,s,o)}function Rs(e,...t){if(De(e))return t[t.length-1];let n=Yt(e)?[...e]:{...e};for(let r=0;r<t.length;r++){const i=t[r];if(ZA(i)||Yt(i)){const o=i;for(const s in o)Vu.call(o,s)&&(o[s]instanceof Object&&!jt(o[s])&&Object.keys(o[s]).length>0?n[s]=Rs(n[s]||(Yt(o[s])?[]:{}),o[s]):n[s]=o[s])}else n=i}return n}var Is=0,ba=!1,ka=!1,ai=new Map;function ug(){ai.size>0&&bi(!0)}function tm(e,t){for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function cg(e,t){try{return function(n,r){for(let i=0;i<r.length;i++)n=lg(n,r[i]);return n}(e?Xf(e):{},t)}catch(n){return}}function Wu(e,t){return function(){return cg(e,t)}}function fo(e,t,n,r,i){const o=new Map;ys(o,e,!!Vt.isLoadingLocal,!!Vt.isLoadingRemote,t,[],[],t,n,!0,r,i);const s=ai.get(e);s?s.prev===t?ai.delete(e):s.value=t:ai.set(e,{value:t,prev:n,level:r,whenOptimizedOnlyIf:i,isFromSync:!!Vt.isLoadingRemote,isFromPersist:!!Vt.isLoadingLocal}),o.size&&em(o,!0),Is<=0&&nm()}function ys(e,t,n,r,i,o,s,a,l,c,u,h){if(t.numListenersRecursive>0&&(function(d,p,f,m,E,A,_,g,D,S,I,T){if(S?p.listenersImmediate:p.listeners){const C={path:A,pathTypes:_,valueAtPath:g,prevAtPath:D},O=d.get(p);if(O&&A.length>0){const{changes:v}=O;tm(v[0].path,C.path)||(v.push(C),O.level=Math.min(O.level,I),O.whenOptimizedOnlyIf||(O.whenOptimizedOnlyIf=T))}else d.set(p,{level:I,value:E,isFromSync:m,isFromPersist:f,whenOptimizedOnlyIf:T,changes:[C]})}}(e,t,n,r,i,o,s,a,l,c,u,h),t.linkedFromNodes))for(const d of t.linkedFromNodes)ys(e,dg(d,o),n,r,a,[],[],a,l,c,0,h);if(t.parent){const d=t.parent;d&&ys(e,d,n,r,Nt(d),[t.key].concat(o),[Yf(i)].concat(s),a,l,c,u+1,h)}}function em(e,t){const n=new Set;e.forEach(({changes:r,level:i,value:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},c)=>{const u=t?c.listenersImmediate:c.listeners;if(u){let h;const d=Array.from(u);for(let p=0;p<d.length;p++){const f=d[p],{track:m,noArgs:E,listener:A}=f;n.has(A)||(m===!0?i<=0:m!==zu||l&&i<=0)&&(E||h||(h={value:o,isFromPersist:s,isFromSync:a,getPrevious:Wu(o,r),changes:r}),m||n.add(A),A(h))}}})}function nm(){const e=Array.from(Vt.dirtyNodes);Vt.dirtyNodes.clear(),e.forEach(r=>{const i=r.dirtyFn;i&&(r.dirtyFn=void 0,i())});const t=ai;ai=new Map;const n=new Map;t.forEach(({value:r,prev:i,level:o,isFromPersist:s,isFromSync:a,whenOptimizedOnlyIf:l},c)=>{ys(n,c,s,a,r,[],[],r,i,!1,o,l)}),n.size&&em(n,!1)}function yr(e){oa();try{e()}finally{bi()}}function oa(){Is++,to||(to=setTimeout(ug,0))}function bi(e){(--Is<=0||e)&&(ba?ka=!0:(to&&(clearTimeout(to),to=void 0),Is=0,ba=!0,nm(),ba=!1,ka&&(ka=!1,bi(!0))))}function dg(e,t){let n=e;for(let r=0;r<t.length;r++)n=rn(n,t[r]);return n}function Xu(e,t,n,r,i){if(jt(e))return e;const o=fn(e);let s={root:{_:e},lazy:!0,numListenersRecursive:0};lt(e)&&(s=Object.assign(()=>{},s),s.lazyFn=e);var a;const l=t||(a=e,QA.has(typeof a))?new i(s):r(s);return o&&(xn(s,void 0),n(s,e)),l}var ei=new WeakMap,rm=[],im=[],om=[],ni=0,Pl=!1;function wa(e,t,n){const r=ei.get(e);if(!r||!r.has(n))return;const i=r.get(n);i&&i.size!==0&&(rm[ni]=e,im[ni]=t,om[ni]=n,ni++,Pl||(Pl=!0,queueMicrotask(hg)))}var Hi={type:"listener-added",node:null,listener:void 0,timestamp:0};function hg(){Pl=!1;const e=typeof performance!="undefined"?performance.now():Date.now();Hi.timestamp=e;for(let t=0;t<ni;t++){const n=rm[t],r=im[t],i=om[t],o=ei.get(n);if(!o)continue;const s=o.get(i);if(!s||s.size===0)continue;const a=n.listeners,l=n.listenersImmediate;if(!a&&!l)continue;let c=!1;if(c=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),c){Hi.type=i,Hi.node=n,Hi.listener=r;const u=Array.from(s);for(let h=0;h<u.length;h++)try{u[h](Hi)}catch(d){console.error(`Error in middleware handler for ${i}:`,d)}}}ni=0}function or(e,t,n={},r){var i;const{initial:o,immediate:s,noArgs:a}=n,{trackingType:l}=n;let c=s?e.listenersImmediate:e.listeners;c||(c=new Set,s?e.listenersImmediate=c:e.listeners=c);const u={listener:t,track:l,noArgs:a};if(c.add(u),o){const m=Nt(e);t({value:m,isFromPersist:!0,isFromSync:!1,changes:[{path:[],pathTypes:[],prevAtPath:m,valueAtPath:m}],getPrevious:()=>{}})}let h;function d(m,E=t,A){if(!(r!=null&&r.has(m))){r||(r=new Set),r.add(A||e),E||(E=t);const _={trackingType:!0,...n};h=[...h||[],or(m,E,_,r)]}}e.linkedToNode&&d(e.linkedToNode),(i=e.linkedFromNodes)==null||i.forEach(m=>d(m)),e.numListenersRecursive++;let p=e.parent,f=[e.key];for(;p;){if(p.linkedFromNodes)for(const m of p.linkedFromNodes)r!=null&&r.has(m)||d(m,pg(m,f,t),p);p.numListenersRecursive++,f=[p.key,...f],p=p.parent}return wa(e,u,"listener-added"),()=>{c.delete(u),h==null||h.forEach(E=>E());let m=e;for(;m;)m.numListenersRecursive--,m=m.parent;wa(e,u,"listener-removed"),c.size===0&&wa(e,void 0,"listeners-cleared")}}function pg(e,t,n){let r=pd(t,[],Nt(e));return function({value:i,isFromPersist:o,isFromSync:s}){const a=pd(t,[],i);a!==r&&n({value:a,isFromPersist:o,isFromSync:s,changes:[{path:[],pathTypes:[],prevAtPath:r,valueAtPath:a}],getPrevious:()=>r}),r=a}}function md(e,t,n,r){let i=[];return e==null||e.forEach(o=>{const{node:s,track:a}=o;i.push(or(s,t,{trackingType:a,immediate:r,noArgs:n}))}),()=>{if(i){for(let o=0;o<i.length;o++)i[o]();i=void 0}}}var ls=0,Ed=[],ri={current:void 0};function us(e,t){if(ls){const n=ri.current;if(n){n.nodes||(n.nodes=new Map);const r=n.nodes.get(e);r?(r.track=r.track||t,r.num++):n.nodes.set(e,{node:e,track:t,num:1})}}}function sm(e,t,n,r,i,o){let s,a,l=t;Ed.push(ri.current),ls++,ri.current={};const c=e&&_n(e,n,r,i==null?void 0:i.fromComputed),u=ri.current.nodes;return--ls<0&&(ls=0),ri.current=Ed.pop(),r!=null&&r.cancel||(s=md(u,l,!1,i==null?void 0:i.immediate),a=o?()=>(s==null||s(),s=md(u,l),s):void 0),{nodes:u,value:c,dispose:s,resubscribe:a}}function We(e,t,n){let r,i;lt(t)?r=t:n=t;let o=!1;const s={num:0},a=function(){if(o)return;s.onCleanup&&(s.onCleanup(),s.onCleanup=void 0),o=!0,oa(),delete s.value,i==null||i();const{dispose:l,value:c,nodes:u}=sm(e,a,void 0,s,n);var h,d;i=l,s.value=c,s.nodes=u,s.refresh=a,s.onCleanupReaction&&(s.onCleanupReaction(),s.onCleanupReaction=void 0),bi(),o=!1,!r||!(n!=null&&n.fromComputed)&&(!(s.num>0)&&(h=e)&&((d=h[gi])!=null&&d.isEvent)||s.previous===s.value&&typeof s.value!="object")||r(s),s.previous=s.value,s.num++};return a(),()=>{var l,c;(l=s.onCleanup)==null||l.call(s),s.onCleanup=void 0,(c=s.onCleanupReaction)==null||c.call(s),s.onCleanupReaction=void 0,i==null||i()}}function am(e,t,n){if(fn(e))return t?e.then(t):e;const r=Yt(e);let i,o;return We(function(s){const a=r?e.map(l=>_n(l)):_n(e);if(!fn(a)){{let l=!0;if(Yt(a))for(let c=0;c<a.length;c++){let u=a[c];jt(u)?u=_n(u):lt(u)&&(u=u()),l=l&&!!(n?fd(u):u)}else l=n?fd(a):a;l&&(i=a,s.cancel=!0)}return i}i=a},function(){o=t==null?void 0:t(i)}),fn(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 c=a(l);s(fn(c)?c.then(u=>u):c)}}else t=s})}function Ku(e,t){return am(e,t,!1)}var La=new Set(["copyWithin","fill","from","pop","push","reverse","shift","sort","splice","unshift"]),_d=new Set(["every","filter","find","findIndex","flatMap","forEach","join","map","reduce","some"]),fg=new Set(["filter","find"]),Ml=new Map,xl=new Map([["get",sa],["set",Ke],["peek",ki],["onChange",or],["assign",function(e,t){const n=Ce(e);if(oa(),De(e.root._)&&(e.root._={}),te(t)){const r=Nt(e);te(r)?t.forEach((i,o)=>r.set(o,i)):Ke(e,t)}else{e.isAssigning=(e.isAssigning||0)+1;try{Object.assign(n,t)}finally{e.isAssigning--}}return bi(),n}],["delete",cm],["toggle",function(e){const t=Nt(e);(t==null||$f(t))&&Ke(e,!t)}]]);function lm(e,t,n,...r){var i;if(n!=="push"||r.length!==1){const o=t.slice(),s=t[n].apply(t,r);if(e){const a=ra(e),l=a?e.key:"_";(a?Nt(e.parent):e.root)[l]=o,Di((i=e.parent)!=null?i:e,l,t)}return s}Di(e,t.length+"",r[0])}function qu(e,t,n){var r,i,o;if(En(t)&&po(t)||En(n)&&po(n)){const S=t!==n;return S&&(e.listeners||e.listenersImmediate)&&fo(e,t,n,0),S}const s=Yt(t);let a,l;const c=te(t),u=Hn(t),h=te(n),d=Hn(n),p=Ll(t,s,c,u),f=Ll(n,s,h,d),m=((r=p||t)==null?void 0:r.length)||0,E=((i=f||n)==null?void 0:i.length)||0;let A,_,g,D=!1;if(s&&Yt(n)){if(n.length>0){const S=n[0];if(S!==void 0&&(A=qf(S,e),A&&(_=lt(A),a=new Map,l=[]),e.children))for(let I=0;I<n.length;I++){const T=n[I];if(T){const C=e.children.get(I+"");if(C&&(t[I]||Ad(C,T),A)){const O=_?A(T):T[A];a.set(O,C)}}}}}else if(n&&(!t||En(t))){const S=f.length;for(let I=0;I<S;I++){const T=f[I];if(!p.includes(T)){D=!0;const C=rn(e,T),O=h?n.get(T):n[T];O!==void 0&&Ad(C,O)}}}if(t&&!De(t)){D=D||m!==E;const S=D;let I=!1;for(let T=0;T<m;T++){const C=s?T+"":p[T];let O=c?t.get(C):t[C];const v=h?n==null?void 0:n.get(C):n==null?void 0:n[C];let y=!Jf(O,v);if(y){const b=A&&O?_?A(O):O[A]:void 0,P=(o=e.children)==null?void 0:o.get(C);if(jt(O)){const F=Mo(O);if((P==null?void 0:P.linkedToNode)===F){const B=Nt(F);c?t.set(C,B):t[C]=B;continue}const H=O;O=()=>H}let w=rn(e,C,O);if(w.lazy||!lt(O)&&!jt(O)||(pm(w,O),Pr(w)),s&&b!==void 0){const F=b!==void 0?a==null?void 0:a.get(b):void 0;if(F){if(F!==void 0&&F.key!==C){const H=n[F.key];S&&(w=F,e.children.delete(w.key),w.key=C,l.push([C,w])),I=!0,y=H!==O}}else D=!0}if(y)if(lt(O)||jt(O))vi(e,C,O);else if(De(O))D=!0;else{const F=qu(w,O,v);D=D||F,y=F}(y||s&&!S)&&(w.listeners||w.listenersImmediate)&&fo(w,O,v,0,!S)}}if(l)for(let T=0;T<l.length;T++){const[C,O]=l[T];e.children.set(C,O)}g=D||I}else n!==void 0&&(g=!0);return g!=null&&g}function Ad(e,t){var n,r;(n=e.linkedToNodeDispose)==null||n.call(e),(r=e.activatedObserveDispose)==null||r.call(e),De(t)||qu(e,void 0,t),(e.listeners||e.listenersImmediate)&&fo(e,void 0,t,0)}function Ce(e,t,n){return t!==void 0&&(e=rn(e,t,n)),e.proxy||(e.proxy=new Proxy(e,um))}function Fl(){if(Vt.pendingNodes.size>0){const e=Array.from(Vt.pendingNodes.values());Vt.pendingNodes.clear(),e.forEach(t=>t())}}var um={get(e,t,n){var r,i;if(t===tg)throw new Error("[legend-state] observable is not a primitive.");if(t===gi)return e;if(t==="apply"||t==="call"){const h=Nt(e);if(lt(h))return h[t]}let o=Pr(e,t==="get"||t==="peek");if(t===eg)return!o||De(o)?void 0:o[t];const s=e.linkedToNode||(o==null?void 0:o[gi]);if(s&&t!=="onChange")return um.get(s,t,n);if(te(o)||Hn(o)){const h=function(d,p,f){const m=f==null?void 0:f[p];if(p==="size")return us(d,!0),f[p];if(lt(m))return function(E,A,_){const g=arguments.length,D=f;if(p==="get"){if(g>0&&typeof E!="boolean"&&E!==zu)return Ce(d,E)}else{if(p==="set")return g===2?Ke(rn(d,E),A):g===1&&te(f)&&Ke(d,E),Ce(d);if(p==="delete"){if(g>0){const I=f.get?D.get(E):E;return cm(d,E),I!==void 0}}else{if(p==="clear"){const I=Hn(D)?new Set(D):new Map(D),T=D.size;return D.clear(),void(T&&dm(d,f,I))}if(p==="add"){const I=new Set(f),T=f.add(E);return f.has(p)||fo(d,T,I,0),Ce(d)}}}const S=xl.get(p);if(!S)return f[p](E,A);switch(g){case 0:return S(d);case 1:return S(d,E);case 2:return S(d,E,A);default:return S(d,E,A,_)}}}(e,t,o);if(h!==void 0)return h}const a=xl.get(t);if(a)return t!=="get"&&t!=="peek"||Fl(),function(h,d,p){switch(arguments.length){case 0:return a(e);case 1:return a(e,h);case 2:return a(e,h,d);default:return a(e,h,d,p)}};const l=Ml.get(t);if(l)return l.get(e);let c=o==null?void 0:o[t];if(En(o)&&po(o))return c;const u=(r=e.functions)==null?void 0:r.get(t);if(u)return jt(u)?u:Ce(e,t,u);if(c=function(h,d){if(h){const p=Object.getOwnPropertyDescriptor(h,d);return p!=null&&p.get&&(delete h[d],h[d]=p.set?function(f){lt(f)&&(f={get:f});const m=function(){return{[ho]:f}};return m.prototype[ho]=f,m}({get:p.get,set:({value:f})=>p.set(f)}):p.get),h[d]}}(o,t),function(h){return h==null}(o)&&c===void 0&&(La.has(t)||_d.has(t))&&(o=[],La.has(t)&&xn(e,o),c=o[t]),lt(c)){if(Yt(o)){if(La.has(t))return(...d)=>lm(e,o,t,...d);if(_d.has(t))return us(e,!0),function(d,p){const f=t==="reduce",m=f?(_,g,D,S)=>d(_,Ce(e,D+"",g),D,S):(_,g,D)=>d(Ce(e,g+"",_),g,D);if(f||!fg.has(t))return o[t](m,p);const E=t==="find",A=[];for(let _=0;_<o.length;_++)if(m(o[_],_,o)){const g=Ce(e,_+"");if(E)return g;A.push(g)}return E?void 0:A}}vi(e,t,c);const h=(i=e.functions)==null?void 0:i.get(t);return h?Ce(e,t,h):c.bind(o)}return De(c)&&t==="length"&&Yt(o)?(us(e,!0),c):Ce(e,t)},getPrototypeOf(e){const t=Nt(e);return t!==null&&typeof t=="object"?Reflect.getPrototypeOf(t):null},ownKeys(e){Pr(e);const t=sa(e,!0);if(De(t))return[];const n=t?Reflect.ownKeys(t):[];if(Yt(t)&&n[n.length-1]==="length"&&n.splice(n.length-1,1),lt(e)){const r=Reflect.ownKeys(e);["caller","arguments","prototype"].forEach(i=>r.includes(i)&&n.push(i))}return n},getOwnPropertyDescriptor(e,t){if(t==="caller"||t==="arguments"||t==="prototype")return{configurable:!1,enumerable:!1};const n=Nt(e);if(De(n))return;const r=Reflect.getOwnPropertyDescriptor(n,t);return r?{...r,configurable:!0}:void 0},set(e,t,n){if(e.isSetting)return Reflect.set(e,t,n);if(e.isAssigning)return Di(e,t,n),!0;const r=Ml.get(t);return!!r&&(r.set(e,n),!0)},deleteProperty:(e,t)=>!!e.isSetting&&Reflect.deleteProperty(e,t),has(e,t){const n=Nt(e);return Reflect.has(n,t)},apply(e,t,n){jt(t)&&(t=t.peek());const r=Nt(e),i=lt(r)?r:e.lazyFn||e;return Reflect.apply(i,t,n)}};function Ke(e,t){e.parent?Di(e.parent,e.key,t):Di(e,"_",t)}function Di(e,t,n,r){const i=!e.parent&&t==="_";Zf(e,n),!e.parent||Nt(e)||lt(n)||Ke(e,{[t]:n});const o=i?e:rn(e,t,n);if(jt(n))Cs(o,n);else{const{newValue:s,prevValue:a,parentValue:l}=xn(o,n),c=De(a)||a instanceof Date||De(s)||s instanceof Date;if(!c){let d=o;do d.needsExtract=!0,d.recursivelyAutoActivated=!1;while(d=d.parent)}const u=!Jf(s,a),h=!u&&o.isComputing&&!c&&!o.isPlain;!u&&!h||o.isComputing&&o.isPlain&&e.numListenersRecursive===0||dm(e,s,a,o,l,c,i,r,h),vi(e,t,s)}}function cm(e,t){t===void 0&&ra(e)&&(t=e.key,e=e.parent);const n=Nt(e);Yt(n)?lm(e,n,"splice",t,1):Di(e,t!=null?t:"_",ia,-1)}function dm(e,t,n,r,i,o,s,a,l){r||(r=e),oa(),o===void 0&&(o=De(t));let c,u,h=l||o,d=!1;(!o||n&&!De(n))&&(h=h||qu(r,t,n),Yt(t)?c=t:(te(t)||Hn(t))&&(u=t)),Yt(i)?c=i:(te(i)||Hn(i))&&(u=i),c?d=(c==null?void 0:c.length)!==(n==null?void 0:n.length):u&&(d=(u==null?void 0:u.size)!==(n==null?void 0:n.size)),(o||!t||Ts(t)&&!Ts(n)?t!==n:h)&&fo(o&&s?e:r,t,n,(a!=null?a:n===void 0)?-1:h?0:1,d),bi()}function Oi(e,t,n){const r=e.numGets=(e.numGets||0)+1;e.state||(e.state=Xu({isLoaded:!1},!1,Oi,Ce)),t.then(i=>{r>=(e.getNumResolved||0)&&(e.getNumResolved=e.numGets,n?n({value:i}):Ke(e,i),e.state.assign({isLoaded:!0,error:void 0}))}).catch(i=>{e.state.error.set(i)})}function vi(e,t,n){if(fn(n)){const r=rn(e,t);return Oi(r,n),void xn(r,void 0)}if(jt(n)){const r=()=>n;dd(e,t,r);const i=rn(e,t,r),o=ki(Mo(n));return Cs(i,n),xn(i,o),Nt(i)}if(typeof n=="function")return dd(e,t,n),t}function sa(e,t){return us(e,t?En(t)?t.shallow:t:void 0),ki(e)}function ki(e){return Pr(e,!0)}var Wo=!1;function Pr(e,t){var n;if(Wo=!0,t&&((n=e.dirtyChildren)==null?void 0:n.size)){const i=Array.from(e.dirtyChildren);e.dirtyChildren.clear(),i.forEach(o=>o.dirtyFn&&Pr(o))}if(e.dirtyFn){const i=e.dirtyFn;e.dirtyFn=void 0,Vt.dirtyNodes.delete(e),i()}Wo=!1;let r=Nt(e);return e.root.isLoadingLocal||e.isPlain||(r=function(i,o,s){const a=o,l=i.lazy;if(l){const c=i.lazyFn;if(delete i.lazy,lt(c))if(c.length===1)o={};else{if(i.parent){const u=Nt(i.parent);lt(o)&&(u?delete u[i.key]:i.root._=void 0)}o=function(u,h){let d,p,f,m=!0;const E=h;let A,_,g=[];function D(){u.dirtyFn=_,Vt.dirtyNodes.add(u)}const S=We(()=>{var I,T,C,O;if(m)m=!1,lt(Nt(u))&&xn(u,void 0);else if(!Wo&&_&&function(w,F){if(!Wo&&!function(B){var K,W;let X=B,G=B.numListenersRecursive>0;for(;X&&!G;)((K=X.listeners)!=null&&K.size||(W=X.listenersImmediate)!=null&&W.size)&&(G=!0),X=X.parent;return G}(w)){F&&(w.dirtyFn=F);let B=w;for(;B;)B.dirtyChildren||(B.dirtyChildren=new Set),B.dirtyChildren.add(w),B=B.parent;return!0}}(u,_))return void(f=!0);let v=E(),y=!1;const b=jt(v);(b||u.linkedToNode)&&(y=b,v=Cs(u,v)),lt(v)&&v.length===0&&(v=v());const P=b||v==null?void 0:v[ho];if(P&&(u.activationState=P,v=void 0),f=!1,p=fn(v),u.activated){if(u.activationState){const w=u.activationState;(T=(I=u.state)==null?void 0:I.peek())!=null&&T.sync?(u.state.sync(),f=!0):v=(O=(C=w.get)==null?void 0:C.call(w))!=null?O:w.initial}}else{u.activated=!0;let w=mg;P!=null&&P.synced&&(w=Vt.activateSyncedNode,f=!0);const F=w(u,v);d=F.update;let H=F.value;!y&&jt(H)&&(H=Cs(u,H)),v=H!=null?H:P==null?void 0:P.initial}return f&&(A=v),p=p||fn(v),v},I=>{const{value:T,nodes:C,refresh:O}=I;if(_=O,!f){if(!p||!Vt.isLoadingRemote)if(p)if(u.activationState){const{initial:v}=u.activationState;T&&fn(T)&&Oi(u,T,d),lt(Nt(u))&&xn(u,v!=null?v:void 0)}else u.activated&&(Oi(u,T,d),lt(Nt(u))&&xn(u,void 0));else{A=T;const v=u.state.isLoaded.peek();!v&<(T)||(u.isComputing=!0,Ke(u,T),u.isComputing=!1),v||u.state.assign({isLoaded:!0,error:void 0})}g.forEach(v=>v()),g=[],C==null||C.forEach(({node:v,track:y})=>{g.push(or(v,D,{immediate:!0,trackingType:y}))})}I.cancel=!0},{fromComputed:!0});return u.activatedObserveDispose=()=>{S==null||S(),g.forEach(I=>I())},A}(i,c)}else jt(o)&&(o=vi(i.parent,i.key,o))}return Zf(i,o),!l&&!i.needsExtract||i.isPlain||jt(o)||De(o)||(s&&function(c,u){if(!u.recursivelyAutoActivated&&(En(c)||Yt(c))&&!po(c)){u.recursivelyAutoActivated=!0;const h=[];fm(c,h,()=>{var p;let f=u;for(let m=0;m<h.length;m++){const E=h[m],A=(p=Nt(f))==null?void 0:p[E];f=rn(f,E,lt(A)?A:void 0),Pr(f)}return f})}}(o,i),i.parent&&vi(i.parent,i.key,a)),o}(e,r,!!t)),r}function hm(e){var t,n;(t=e.activatedObserveDispose)==null||t.call(e),(n=e.linkedToNodeDispose)==null||n.call(e),e.activatedObserveDispose=e.linkedToNodeDispose=e.linkedToNode=void 0}function pm(e,t){hm(e),e.lazyFn=t,e.lazy=!0}function mg(e,t){if(e.state||(e.state=Xu({isLoaded:!1},!1,Oi,Ce)),e.activationState){const{set:n,get:r,initial:i}=e.activationState;if((t=r==null?void 0:r())!=null&&t!==null||(t=i),n){let o,s=[],a=0;const l=c=>{if(s.length>0){let u,h,d,p=!1,f=!1;c?(u=c.changes,h=c.value,p=c.isFromPersist,f=c.isFromSync,d=c.getPrevious):(u=s,h=o,d=Wu(h,u)),s=[],o=void 0,Vt.pendingNodes.delete(e),a++;const m=a,E=()=>{m===a&&(e.isComputing=!0,n({value:h,changes:u,isFromPersist:p,isFromSync:f,getPrevious:d}),e.isComputing=!1)};am(e.state.isLoaded,E,!0)}};or(e,({value:c,changes:u})=>{e.isComputing||(u.length>1||!lt(u[0].prevAtPath))&&(o=c,s.length>0&&(u=u.filter(h=>!tm(s[0].path,h.path))),s.push(...u),Vt.pendingNodes.set(e,l))},{immediate:!0}),or(e,l)}}return{update:({value:n})=>{e.isComputing||(e.isComputing=!0,Ke(e,n),e.isComputing=!1)},value:t}}function Cs(e,t){var n;const r=t?Mo(t):void 0;return r!==e&&(r==null?void 0:r.linkedToNode)!==e&&(e.linkedToNode=r,(n=e.linkedToNodeDispose)==null||n.call(e),r&&(r.linkedFromNodes||(r.linkedFromNodes=new Set),r.linkedFromNodes.add(e),e.linkedToNodeDispose=or(r,()=>{lt(t=Pr(r))||Ke(e,t)},{initial:!0},new Set([e])))),t}function fm(e,t,n){var r;if((En(e)||Yt(e))&&!po(e)&&!zf(e)){for(const i in e)if(Vu.call(e,i)){const o=e[i];if(jt(o)){const s=n();vi(s,i,o),delete s.lazy}else{const s=lt(o)&&((r=o.prototype)==null?void 0:r[ho]);if(s){const a=s.activate;(!a||a==="auto")&&ki(rn(n(),i,o))}}typeof o=="object"&&(t.push(i),fm(o,t,n),t.pop())}}}var gd=["get","set","peek","onChange","toggle"];function li(e){this._node=e;for(let t=0;t<gd.length;t++){const n=gd[t];this[n]=this[n].bind(this)}}function Xo(e,t){li.prototype[e]=function(...n){return t.call(this,this._node,...n)}}function Ft(e){return Xu(e,!1,Oi,Ce,li)}Xo("peek",e=>(Fl(),ki(e))),Xo("get",(e,t)=>(Fl(),sa(e,t))),Xo("set",Ke),Xo("onChange",or),Object.defineProperty(li.prototype,gi,{configurable:!0,get(){return this._node}}),li.prototype.toggle=function(){const e=this.peek();(e==null||$f(e))&&this.set(!e)},li.prototype.delete=function(){return this.set(void 0),this};var aa={createPreviousHandler:Wu,clone:Xf,deactivateNode:hm,deepMerge:Rs,ensureNodeValue:Yu,findIDKey:qf,get:sa,getChildNode:rn,getKeys:Ll,getNode:Mo,getNodeValue:Nt,getPathType:Yf,getProxy:Ce,getValueAtPath:function(e,t){return t.reduce(ag,e)},globalState:Vt,initializePathType:Gu,ObservablePrimitiveClass:li,observableProperties:Ml,observableFns:xl,optimized:zu,peek:ki,reactivateNode:pm,registerMiddleware:function(e,t,n){let r=ei.get(e);r||(r=new Map,ei.set(e,r));let i=r.get(t);return i||(i=new Set,r.set(t,i)),i.add(n),()=>{const o=ei.get(e);if(!o)return;const s=o.get(t);s&&(s.delete(n),s.size===0&&(o.delete(t),o.size===0&&ei.delete(e)))}},safeParse:Wf,safeStringify:Gf,set:Ke,setAtPath:Qf,setNodeValue:xn,symbolLinked:ho,symbolDelete:ia,tracking:ri},{globalState:Dd,observableProperties:Eg,observableFns:_g,ObservablePrimitiveClass:Od}=aa;class la{constructor(t={}){this._handlers=new Set,this._meta=t}meta(t){return new la(t)}_emit(t,n){for(const r of this._handlers)r({level:t,data:n,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 Bl=new la,tn=new la;function vd(e,t,n){return e.clearRect(0,0,100,100),e.fillStyle=n,e.fillText(t,0,0),e.getImageData(0,0,1,1).data.join(",")}function Sd(e){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}(),n=vd(t,e,"#fff"),r=vd(t,e,"#000");return r===n&&!r.startsWith("0,0,0,")}const Ag=Ni(null),Pa={didCatch:!1,error:null};class mm extends Xe{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Pa}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(){const{error:t}=this.state;if(t!==null){for(var n,r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];(n=(r=this.props).onReset)===null||n===void 0||n.call(r,{args:o,reason:"imperative-api"}),this.setState(Pa)}}componentDidCatch(t,n){var r,i;(r=(i=this.props).onError)===null||r===void 0||r.call(i,t,n)}componentDidUpdate(t,n){const{didCatch:r}=this.state,{resetKeys:i}=this.props;var o,s;r&&n.error!==null&&function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return a.length!==l.length||a.some((c,u)=>!Object.is(c,l[u]))}(t.resetKeys,i)&&((o=(s=this.props).onReset)===null||o===void 0||o.call(s,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(Pa))}render(){const{children:t,fallbackRender:n,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 n=="function")a=n(l);else if(r)a=Tt(r,l);else{if(i===void 0)throw s;a=i}}return Tt(Ag.Provider,{value:{didCatch:o,error:s,resetErrorBoundary:this.resetErrorBoundary}},a)}}var Ko=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ju(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zu(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Em={exports:{}},Td={};const _m=Zu($u);var Si=_m,gg=typeof Object.is=="function"?Object.is:function(e,t){return e===t&&(e!==0||1/e==1/t)||e!=e&&t!=t},Dg=Si.useState,Og=Si.useEffect,vg=Si.useLayoutEffect,Sg=Si.useDebugValue;function Ma(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!gg(e,n)}catch(r){return!0}}var Tg=typeof window=="undefined"||window.document===void 0||window.document.createElement===void 0?function(e,t){return t()}:function(e,t){var n=t(),r=Dg({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return vg(function(){i.value=n,i.getSnapshot=t,Ma(i)&&o({inst:i})},[e,n,t]),Og(function(){return Ma(i)&&o({inst:i}),e(function(){Ma(i)&&o({inst:i})})},[e]),Sg(n),n};Td.useSyncExternalStore=Si.useSyncExternalStore!==void 0?Si.useSyncExternalStore:Tg,Em.exports=Td;var Rg=Em.exports,Rd=!1,Ul={inObserver:!1},Id=void 0,Ig=()=>Id||(Id=Ni(null));function yd(e){const t=Ku(e);if(!Pe.use)throw t;Pe.use(t)}function dt(e,t){let n;if(Ul.inObserver&&jt(e)&&!(t!=null&&t.suspense))return n=_n(e,t),t!=null&&t.suspense&&n===void 0&&yd(e),n;try{const r=ar(Ig()),i=at(()=>function(l,c){let u,h,d,p,f,m,E=0;const A=()=>{h==null||h();const{value:g,dispose:D,resubscribe:S}=sm(p,_,l,void 0,void 0,!0);return h=D,d=S,g},_=({value:g})=>{if(c!=null&&c.peek()){const D=m;m=g,D===void 0&&Ku(()=>!c.get(),()=>{const S=m;m=void 0,_({value:S})})}else{let D=l==null?void 0:l.skipCheck;if(!D){const S=A();(S!==f||!De(S)&&S===g)&&(D=!0)}D&&(E++,u==null||u())}};return{subscribe:g=>(u=g,!h&&d&&(h=d()),()=>{h==null||h(),h=void 0}),getVersion:()=>E,run:g=>(p=g,f=A())}}(t,r),[]),{subscribe:o,getVersion:s,run:a}=i;n=a(e),Rg.useSyncExternalStore(o,s,s)}catch(r){throw r}return t!=null&&t.suspense&&n===void 0&&yd(e),n}var Cd=typeof Symbol=="function"&&Symbol.for;function Am(e,t,n,r,i){const o=Cd?Symbol.for("react.forward_ref"):je(f=>null).$$typeof,s=Cd?Symbol.for("react.memo"):Un(f=>null).$$typeof;if(e.__legend_proxied)return e;let a=!1,l=!1,c=e;s&&c.$$typeof===s&&c.type&&(l=!0,c=c.type),o&&c.$$typeof===o&&(a=!0,c=c.render);const u=r?new Set(r):void 0,h={apply(f,m,E){if(n){const A=E[0],_={},g=Object.keys(A);for(let D=0;D<g.length;D++){const S=g[D],I=A[S],T=u&&u.has(S);if(S==="children"&&(lt(I)||jt(I)))_[S]=dt(I,{skipCheck:!0});else if(T||S.startsWith("$")||S.endsWith("$")){const C=T?S:S.endsWith("$")?S.slice(0,-1):S.slice(1),O=i==null?void 0:i[C],v=O&&jt(I);if(_[C]=v&&(O!=null&&O.selector)?O.selector(_,I):dt(I),v&&(O.defaultValue!==void 0&&_[C]===void 0&&(_[C]=O.defaultValue),O.handler&&O.getValue)){const y=b=>{var P;I.set(O.getValue(b)),(P=A[O.handler])==null||P.call(A,b)};_[O.handler]=it(y,[A[O.handler],i])}T||delete _[S]}else _[S]===void 0&&(_[S]=I)}E[0]=_}return t?dt(()=>{Ul.inObserver=!0;try{return Reflect.apply(f,m,E)}finally{Ul.inObserver=!1}},{skipCheck:!0}):Reflect.apply(f,m,E)}},d=new Proxy(c,h);let p;return a?(p=je(d),p.__legend_proxied=!0):p=d,t||l?Un(p):p}var{findIDKey:yg,getNode:Cg,optimized:Ng}=aa,Nd=new Map;function Hl({each:e,optimized:t,item:n,itemProps:r,sortValues:i,children:o}){var s;if(!e)return null;const a=dt(()=>e.get(!t||Ng));if(!n&&o){const c=Q();c.current=o,n=at(()=>{return u=({item$:h,id:d})=>c.current(h,d),Am(u,!0);var u},[])}else if(n.$$typeof!==Symbol.for("react.memo")){let c=Nd.get(n);c||(c=Un(n),Nd.set(n,c)),n=c}if(!a)return null;const l=[];if(Yt(a)){const c=a[0],u=Cg(e),h=a.length,d=h>0?u&&yg(c,u)||(c.id!==void 0?"id":c.key!==void 0?"key":void 0):void 0,p=lt(d);for(let f=0;f<h;f++)if(a[f]){const m=a[f],E=(s=p?d(m):m[d])!=null?s:f,A=e[f],_={key:E,id:E,item$:A,item:A};l.push(Tt(n,r?Object.assign(_,r):_))}}else{const c=te(a),u=c?Array.from(a.keys()):Object.keys(a);i&&u.sort((h,d)=>i(c?a.get(h):a[h],c?a.get(d):a[d],h,d));for(let h=0;h<u.length;h++){const d=u[h];if(c?a.get(d):a[d]){const p=c?e.get(d):e[d],f={key:d,id:d,item$:p,item:p};l.push(Tt(n,r?Object.assign(f,r):f))}}}return l}Un(function({children:e}){return dt(()=>_n(_n(e)),{skipCheck:!0})},(e,t)=>!t.scoped||e.children===t.children);var bd=new Map,kd=new Map;new Proxy({},{get(e,t){if(!e[t]){const n=bd.get(t)||t,r=je((i,o)=>{const s={...i};return!o||!lt(o)&&Ts(o)||(s.ref=o),Tt(n,s)});e[t]=function(i,o,s){return Am(i,!1,!0,o,s)}(r,[],kd.get(t))}return e[t]}}),function(e){(function(t){if(Rd)return;Rd=!0;const n={value:{handler:"onChange",getValue:i=>i.target.value,defaultValue:""}},r=Object.assign({checked:{handler:"onChange",getValue:i=>i.target.checked}},n);t({binders:{input:r,textarea:n,select:n}})})(e)}(function({components:e,binders:t}){if(e)for(const n in e)bd.set(n,e[n]);if(t)for(const n in t)kd.set(n,t[n])});var bg=(e,t)=>{{const n=Q({num:0});Z(()=>{var r;const{current:i}=n;i.num++;const o=()=>{i.dispose&&i.num<2&&(i.dispose(),i.dispose=void 0),i.num--};if(i.dispose!==void 0)return o;{const s=(r=e())!=null?r:null;if(s&<(s))return i.dispose=s,()=>queueMicrotask(o)}},t)}};function gm(e){return bg(()=>{const t=e();if(!fn(t))return t},[])}var kg=gm;function Dm(e){return gm(()=>e)}var wg=Dm,{deactivateNode:Lg}=aa;function Ue(e,t){var n;const r=Q({});r.current.value=e;const i=t?Ue(t):void 0;if(!((n=r.current)!=null&&n.obs$)){const o=i?lt(e)&&e.length===1?s=>(i.get(),r.current.value(s)):()=>(i.get(),_n(r.current.value)):e;r.current.obs$=Ft(o)}return i&&i.set(t),Dm(()=>{const o=r.current.obs$;if(o){const s=Mo(o);Lg(s)}}),r.current.obs$}function mo(e,t,n,r){let i;lt(t)?i=t:Array.isArray(t)?(r=t,n=void 0):n=t,i&&Array.isArray(n)&&(r=n,n=void 0),r=r||(n==null?void 0:n.deps);const o=Q({}),s=r?Ue(r):void 0;o.current.selector=e,o.current.reaction=i,s&&s.set(r),kg(()=>We(a=>{var l;return s==null||s.get(),_n((l=o.current)==null?void 0:l.selector,void 0,a)},a=>{var l,c;return(c=(l=o.current).reaction)==null?void 0:c.call(l,a)},n))}class Om extends Error{}function wd(e,t){if(!e)throw new Om(t!=null?t:"Assertion failed")}const mt=Object.assign(wd,{is:function(e,t,n){return wd(t,n)},unreachable:function(){throw new Error("Unreachable code")},never:function(e){throw new Error("Unreachable")},defined:function(e){if(e==null)throw new Om("Value is not defined")}}),[vm,he]=Sn(),[Sm,xo]=Sn(),[Tm]=Sn(),[Qu,wi]=Sn(),[Pg,Mg]=Sn(),[Rm,At]=Sn(),[Im,Li]=Sn(),[ym,Cm]=Sn(),[Nm,xg]=Sn(),[Fg,tc]=Sn();function Sn(){const e=Ni(void 0);return[e,()=>{const t=ar(e);return mt(t!==void 0),t}]}const ui={code:"en-US",name:"English (US)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/en.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/en/emojibase/data.json",translation:{YESTERDAY:"Yesterday",TODAY:"Today",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just now",LOCATION:"Location",CANCEL:"Cancel",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser notifications",DESKTOP_NOTIFICATIONS_ERROR:"Can't enable browser notifications because your browser actively blocks them. Try looking in the settings or using a different browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",ADD_REACTION:"Add reaction",AUTH_EXPIRED_OVERLAY_TITLE:"Your chat session has expired",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Refresh the page to continue",VOICE_MESSAGE:"Voice message",LEAVE_CONVERSATION:"Leave conversation",MARK_CONVERSATION_AS_UNREAD:"Mark as unread",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"hidden information",ARIA_LEAVE_SEARCH_MODE:"Leave search mode",ARIA_SEARCH_UP:"Search up",ARIA_SEARCH_DOWN:"Search down",ARIA_CLOSE_CHAT_POPUP:"Close the chat popup",ARIA_SEARCH_INSIDE_CONVERSATION:"Search inside this conversation",ARIA_SEARCH:"Search",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"set playback speed",ARIA_CANCEL_UPLOAD:"Cancel upload",ARIA_STOP_RECORDING:"Stop recording",ARIA_CANCEL_RECORDING:"Cancel recording",ARIA_INSERT_EMOJI:"Insert an emoji",ARIA_PLAY_AUDIO:"play audio",ARIA_PAUSE_AUDIO:"pause audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reactions with ${t}`,ARIA_MORE_ACTIONS:"More actions",ARIA_REPLYING_TO:(e,t)=>`Replying to ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Exit reply mode"}},Ld={ar:{code:"ar",name:"Arabic",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ar.js",emojiDataUrl:null,translation:{YESTERDAY:"الأمس",TODAY:"اليوم",DAYS:"يوم",HOURS:"ساعة",MINUTES:"دقيقة",JUST_NOW:"فقط الآن",LOCATION:"الموقع",CANCEL:"إلغاء",INBOX:"علبة الوارد",DESKTOP_NOTIFICATIONS:"إشعارات المتصفح",DESKTOP_NOTIFICATIONS_ERROR:"لا يمكن تمكين إشعارات المتصفح لأن متصفحك يمنعها بشكل نشط. جرّب البحث في الإعدادات أو استخدام متصفح آخر.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`إعلام ${e} التجريبي`,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:"رسالة صوتية",LEAVE_CONVERSATION:"الخروج من المحادثة",MARK_CONVERSATION_AS_UNREAD:"وضع علامة غير مقروءة",STATUS_INDICATOR_ONLINE:"نشط",STATUS_INDICATOR_OFFLINE:"بعيد",CONTACT_INFORMATION_HIDDEN:"المعلومات المخفية",ARIA_LEAVE_SEARCH_MODE:"الخروج من وضع البحث",ARIA_SEARCH_UP:"البحث لأعلى",ARIA_SEARCH_DOWN:"البحث لأسفل",ARIA_CLOSE_CHAT_POPUP:"إغلاق نافذة الدردشة",ARIA_SEARCH_INSIDE_CONVERSATION:"البحث داخل هذه المحادثة",ARIA_SEARCH:"بحث",ARIA_CHAT:"دردشة",ARIA_SET_PLAYBACK_SPEED:"تعيين سرعة التشغيل",ARIA_CANCEL_UPLOAD:"إلغاء الرفع",ARIA_STOP_RECORDING:"إيقاف التسجيل",ARIA_CANCEL_RECORDING:"إلغاء التسجيل",ARIA_INSERT_EMOJI:"إدراج رمز تعبيري",ARIA_PLAY_AUDIO:"تشغيل الصوت",ARIA_PAUSE_AUDIO:"إيقاف الصوت مؤقتاً",ARIA_REACTION_COUNT:(e,t)=>`${e} تفاعل مع ${t}`,ARIA_MORE_ACTIONS:"المزيد من الإجراءات",ARIA_REPLYING_TO:(e,t)=>`الرد على ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"الخروج من وضع الرد"}},bg:{code:"bg-BG",name:"Bulgarian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Вчера",TODAY:"Днес",DAYS:"Ден",HOURS:"Час",MINUTES:"m",JUST_NOW:"Току-що",LOCATION:"местоположението",CANCEL:"Откажи",INBOX:"Кутия",DESKTOP_NOTIFICATIONS:"Известия на браузъра",DESKTOP_NOTIFICATIONS_ERROR:"Не можете да активирате известията на браузъра, защото браузърът ви ги блокира активно. Опитайте да погледнете в настройките или да използвате друг браузър.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} демо известие`,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:"Маркирай като непрочетено",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Отсъстващ",ARIA_LEAVE_SEARCH_MODE:"Напусни режим на търсене",ARIA_SEARCH_UP:"Търси нагоре",ARIA_SEARCH_DOWN:"Търси надолу",ARIA_CLOSE_CHAT_POPUP:"Затвори прозореца за чат",ARIA_SEARCH_INSIDE_CONVERSATION:"Търси в този разговор",ARIA_SEARCH:"Търсене",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"задай скорост на възпроизвеждане",ARIA_CANCEL_UPLOAD:"Отмени качване",ARIA_STOP_RECORDING:"Спри запис",ARIA_CANCEL_RECORDING:"Отмени запис",ARIA_INSERT_EMOJI:"Вмъкни emoji",ARIA_PLAY_AUDIO:"възпроизведи аудио",ARIA_PAUSE_AUDIO:"паузирай аудио",ARIA_REACTION_COUNT:(e,t)=>`${e} реакции с ${t}`,ARIA_MORE_ACTIONS:"Още действия",ARIA_REPLYING_TO:(e,t)=>`Отговор на ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Излизане от режим на отговор"}},bs:{code:"bs-BA",name:"Bosnian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika se ne mogu omogućiti jer ih vaš preglednik aktivno blokira. Pokušajte pregledati postavke ili koristiti drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretrage",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor chata",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcija s ${t}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(e,t)=>`Odgovaranje korisniku ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},ca:{code:"ca-ES",name:"Catalan (ES)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ahir",TODAY:"Avui",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"ara mateix",LOCATION:"Ubicació",CANCEL:"Cancel·lar",INBOX:"Safata d'entrada",DESKTOP_NOTIFICATIONS:"Notificacions d'escriptori",DESKTOP_NOTIFICATIONS_ERROR:"No es poden habilitar les notificacions del navegador perquè el teu navegador les bloqueja activament. Prova de buscar a la configuració o utilitza un altre navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Notificació de demostració de ${e}`,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",ADD_REACTION:"Afegir reacció",VOICE_MESSAGE:"Missatge de veu",LEAVE_CONVERSATION:"Abandonar la conversa",MARK_CONVERSATION_AS_UNREAD:"marcar com no llegit",STATUS_INDICATOR_ONLINE:"Actiu",STATUS_INDICATOR_OFFLINE:"Absent",CONTACT_INFORMATION_HIDDEN:"informació oculta",AUTH_EXPIRED_OVERLAY_TITLE:"La teva sessió de xat ha caducat",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualitza la pàgina per continuar",ARIA_LEAVE_SEARCH_MODE:"Sortir del mode de cerca",ARIA_SEARCH_UP:"Cercar cap amunt",ARIA_SEARCH_DOWN:"Cercar cap avall",ARIA_CLOSE_CHAT_POPUP:"Tancar la finestra de xat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cercar en aquesta conversa",ARIA_SEARCH:"Cercar",ARIA_CHAT:"Xat",ARIA_SET_PLAYBACK_SPEED:"establir velocitat de reproducció",ARIA_CANCEL_UPLOAD:"Cancel·lar la càrrega",ARIA_STOP_RECORDING:"Aturar l'enregistrament",ARIA_CANCEL_RECORDING:"Cancel·lar l'enregistrament",ARIA_INSERT_EMOJI:"Inserir un emoji",ARIA_PLAY_AUDIO:"reproduir àudio",ARIA_PAUSE_AUDIO:"pausar àudio",ARIA_REACTION_COUNT:(e,t)=>`${e} reaccions amb ${t}`,ARIA_MORE_ACTIONS:"Més accions",ARIA_REPLYING_TO:(e,t)=>`Responent a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sortir del mode de resposta"}},cs:{code:"cs-CZ",name:"Czech",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Včera",TODAY:"Dnes",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"právě teď",LOCATION:"Lokace",CANCEL:"Zrušit",INBOX:"Doručené",DESKTOP_NOTIFICATIONS:"Oznámení v prohlížeči",DESKTOP_NOTIFICATIONS_ERROR:"Nelze povolit notifikace prohlížeče, protože váš prohlížeč je aktivně blokuje. Zkuste se podívat na nastavení nebo zkuste použít jiný prohlížeč.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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é",STATUS_INDICATOR_ONLINE:"Aktivní",STATUS_INDICATOR_OFFLINE:"Nedostupný",ARIA_LEAVE_SEARCH_MODE:"Opustit režim vyhledávání",ARIA_SEARCH_UP:"Hledat nahoru",ARIA_SEARCH_DOWN:"Hledat dolů",ARIA_CLOSE_CHAT_POPUP:"Zavřít okno chatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Hledat v této konverzaci",ARIA_SEARCH:"Hledat",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"nastavit rychlost přehrávání",ARIA_CANCEL_UPLOAD:"Zrušit nahrávání",ARIA_STOP_RECORDING:"Zastavit nahrávání",ARIA_CANCEL_RECORDING:"Zrušit nahrávání",ARIA_INSERT_EMOJI:"Vložit emoji",ARIA_PLAY_AUDIO:"přehrát audio",ARIA_PAUSE_AUDIO:"pozastavit audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcí s ${t}`,ARIA_MORE_ACTIONS:"Další akce",ARIA_REPLYING_TO:(e,t)=>`Odpověď na ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Opustit režim odpovědi"}},da:{code:"da-DK",name:"Danish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/da/emojibase/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"t",MINUTES:"m",JUST_NOW:"lige nu",LOCATION:"Placering",CANCEL:"Annuller",INBOX:"Indbakke",DESKTOP_NOTIFICATIONS:"Browsermeddelelser",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Browsermeddelelser, fordi din browser aktivt blokerer dem. Prøv at kigge i indstillingerne eller benyt en anden browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Forlad søgemodus",ARIA_SEARCH_UP:"Søg opad",ARIA_SEARCH_DOWN:"Søg nedad",ARIA_CLOSE_CHAT_POPUP:"Luk chatvindue",ARIA_SEARCH_INSIDE_CONVERSATION:"Søg i denne samtale",ARIA_SEARCH:"Søg",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Indstil afspilningshastighed",ARIA_CANCEL_UPLOAD:"Annuller upload",ARIA_STOP_RECORDING:"Stop optagelse",ARIA_CANCEL_RECORDING:"Annuller optagelse",ARIA_INSERT_EMOJI:"Indsæt en emoji",ARIA_PLAY_AUDIO:"Afspil lyd",ARIA_PAUSE_AUDIO:"Pauser lyd",ARIA_REACTION_COUNT:(e,t)=>`${e} Reaktioner med ${t}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(e,t)=>`Svarer til ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Forlad svarstilstand"}},de:{code:"de-DE",name:"German",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/de.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/de/cldr/data.json",translation:{YESTERDAY:"Gestern",TODAY:"Heute",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"gerade jetzt",LOCATION:"Standort",CANCEL:"Abbrechen",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browser-Benachrichtigungen",DESKTOP_NOTIFICATIONS_ERROR:"Browser-Benachrichtigungen können nicht aktiviert werden, da Ihr Browser sie aktiv blockiert. Versuchen Sie, in den Einstellungen nachzuschlagen oder einen anderen Browser zu verwenden.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Abwesend",ARIA_LEAVE_SEARCH_MODE:"Suchmodus verlassen",ARIA_SEARCH_UP:"Nach oben suchen",ARIA_SEARCH_DOWN:"Nach unten suchen",ARIA_CLOSE_CHAT_POPUP:"Chat-Popup schließen",ARIA_SEARCH_INSIDE_CONVERSATION:"In dieser Unterhaltung suchen",ARIA_SEARCH:"Suchen",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Wiedergabegeschwindigkeit einstellen",ARIA_CANCEL_UPLOAD:"Upload abbrechen",ARIA_STOP_RECORDING:"Aufnahme stoppen",ARIA_CANCEL_RECORDING:"Aufnahme abbrechen",ARIA_INSERT_EMOJI:"Emoji einfügen",ARIA_PLAY_AUDIO:"Audio abspielen",ARIA_PAUSE_AUDIO:"Audio pausieren",ARIA_REACTION_COUNT:(e,t)=>`${e} Reaktionen mit ${t}`,ARIA_MORE_ACTIONS:"Weitere Aktionen",ARIA_REPLYING_TO:(e,t)=>`Antworten an ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Antwortmodus verlassen"}},el:{code:"el-GR",name:"Greek (Greece)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Χθές",TODAY:"Σήμερα",DAYS:"Ημέρες",HOURS:"'Ωρες",MINUTES:"Λεπτά",JUST_NOW:"Μόλις τώρα",LOCATION:"Τοποθεσία",CANCEL:"Ακύρωση",INBOX:"Εισερχόμενα",DESKTOP_NOTIFICATIONS:"Ειδοποιήσεις περιηγητή",DESKTOP_NOTIFICATIONS_ERROR:"Δεν είναι δυνατή η ενεργοποίηση των ειδοποιήσεων του προγράμματος περιήγησης, επειδή το πρόγραμμα περιήγησης τις αποκλείει ενεργά. Δοκιμάστε να τσεκάρετε τις ρυθμίσεις ή να χρησιμοποιήσετε διαφορετικό πρόγραμμα περιήγησης.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} Δοκιμαστική επίδειξη`,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:"Επισήμανση ως μη αναγνωσμένα",STATUS_INDICATOR_ONLINE:"Ενεργός",STATUS_INDICATOR_OFFLINE:"Ανενεργός",ARIA_LEAVE_SEARCH_MODE:"Αποχώρηση από τη λειτουργία αναζήτησης",ARIA_SEARCH_UP:"Αναζήτηση προς τα πάνω",ARIA_SEARCH_DOWN:"Αναζήτηση προς τα κάτω",ARIA_CLOSE_CHAT_POPUP:"Κλείσιμο παραθύρου συνομιλίας",ARIA_SEARCH_INSIDE_CONVERSATION:"Αναζήτηση σε αυτή τη συνομιλία",ARIA_SEARCH:"Αναζήτηση",ARIA_CHAT:"Συνομιλία",ARIA_SET_PLAYBACK_SPEED:"ορισμός ταχύτητας αναπαραγωγής",ARIA_CANCEL_UPLOAD:"Ακύρωση φόρτωσης",ARIA_STOP_RECORDING:"Διακοπή εγγραφής",ARIA_CANCEL_RECORDING:"Ακύρωση εγγραφής",ARIA_INSERT_EMOJI:"Εισαγωγή emoji",ARIA_PLAY_AUDIO:"αναπαραγωγή ήχου",ARIA_PAUSE_AUDIO:"παύση ήχου",ARIA_REACTION_COUNT:(e,t)=>`${e} αντιδράσεις με ${t}`,ARIA_MORE_ACTIONS:"Περισσότερες ενέργειες",ARIA_REPLYING_TO:(e,t)=>`Απάντηση στον ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Έξοδος από τη λειτουργία απάντησης"}},en:ui,es:{code:"es-ES",name:"Spanish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/es.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/es/cldr/data.json",translation:{YESTERDAY:"Ayer",TODAY:"Hoy",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"justo ahora",LOCATION:"Ubicación",CANCEL:"Cancelar",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificaciones del navigator",DESKTOP_NOTIFICATIONS_ERROR:"No se logró habilitar las notificaciones del navigador, comprueba que tu navegador no las esté bloqueando o intenta con otro navegador.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Activo",STATUS_INDICATOR_OFFLINE:"Ausente",ARIA_LEAVE_SEARCH_MODE:"Salir del modo búsqueda",ARIA_SEARCH_UP:"Buscar hacia arriba",ARIA_SEARCH_DOWN:"Buscar hacia abajo",ARIA_CLOSE_CHAT_POPUP:"Cerrar la ventana de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Buscar en esta conversación",ARIA_SEARCH:"Buscar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"establecer velocidad de reproducción",ARIA_CANCEL_UPLOAD:"Cancelar envío",ARIA_STOP_RECORDING:"Detener grabación",ARIA_CANCEL_RECORDING:"Cancelar grabación",ARIA_INSERT_EMOJI:"Insertar un emoji",ARIA_PLAY_AUDIO:"reproducir audio",ARIA_PAUSE_AUDIO:"pausar audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reacciones con ${t}`,ARIA_MORE_ACTIONS:"Más acciones",ARIA_REPLYING_TO:(e,t)=>`Respondiendo a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Salir del modo respuesta"}},et:{code:"et-EE",name:"Estonian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/et/cldr/data.json",translation:{YESTERDAY:"Eile",TODAY:"Täna",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"Just nüüd",LOCATION:"Asukoht",CANCEL:"Katkesta",INBOX:"Postkast",DESKTOP_NOTIFICATIONS:"Veebibrauseri teated",DESKTOP_NOTIFICATIONS_ERROR:"Töölaua teatisi ei saa lubada, kuna Teie brauser blokeerib need aktiivselt. Proovige muuta seadeid või kasutada mõnda muud brauserit.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktiivne",STATUS_INDICATOR_OFFLINE:"Eemal",ARIA_LEAVE_SEARCH_MODE:"Välju otsingurežiimist",ARIA_SEARCH_UP:"Otsi üles",ARIA_SEARCH_DOWN:"Otsi alla",ARIA_CLOSE_CHAT_POPUP:"Sulge vestluse aken",ARIA_SEARCH_INSIDE_CONVERSATION:"Otsi sellest vestlusest",ARIA_SEARCH:"Otsi",ARIA_CHAT:"Vestlus",ARIA_SET_PLAYBACK_SPEED:"määra taasesituse kiirus",ARIA_CANCEL_UPLOAD:"Tühista üleslaadimine",ARIA_STOP_RECORDING:"Peata salvestamine",ARIA_CANCEL_RECORDING:"Tühista salvestamine",ARIA_INSERT_EMOJI:"Sisesta emoji",ARIA_PLAY_AUDIO:"esita heli",ARIA_PAUSE_AUDIO:"pausi heli",ARIA_REACTION_COUNT:(e,t)=>`${e} reaktsiooni (${t})`,ARIA_MORE_ACTIONS:"Rohkem toiminguid",ARIA_REPLYING_TO:(e,t)=>`Vastamine kasutajale ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Välju vastamisrežiimist"}},fa:{code:"fa",name:"Persian (Farsi)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fa.js",emojiDataUrl:null,translation:{YESTERDAY:"دیروز",TODAY:"امروز",DAYS:"روز",HOURS:"ساعت",MINUTES:"دقیقه",JUST_NOW:"هم اکنون",LOCATION:"مکان",CANCEL:"لغو",INBOX:"صندوق",DESKTOP_NOTIFICATIONS:"اطلاعیههای مرورگر",DESKTOP_NOTIFICATIONS_ERROR:"خطا در فعال سازی اعلان های مرورگر، مرورگر شما آنها را مسدود می کند سعی کنید تنظیمات مرورگر را تغییر دهید یا از یک مرورگر دیگر استفاده کنید.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`نوتیفیکیشن دمو ${e}`,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:"به عنوان خوانده نشده علامت گذاری کن",STATUS_INDICATOR_ONLINE:"فعال",STATUS_INDICATOR_OFFLINE:"غایب",ARIA_LEAVE_SEARCH_MODE:"خروج از حالت جستجو",ARIA_SEARCH_UP:"جستجوی بالا",ARIA_SEARCH_DOWN:"جستجوی پایین",ARIA_CLOSE_CHAT_POPUP:"بستن پنجره چت",ARIA_SEARCH_INSIDE_CONVERSATION:"جستجو در این گفتگو",ARIA_SEARCH:"جستجو",ARIA_CHAT:"چت",ARIA_SET_PLAYBACK_SPEED:"تنظیم سرعت پخش",ARIA_CANCEL_UPLOAD:"لغو آپلود",ARIA_STOP_RECORDING:"توقف ضبط",ARIA_CANCEL_RECORDING:"لغو ضبط",ARIA_INSERT_EMOJI:"درج ایموجی",ARIA_PLAY_AUDIO:"پخش صدا",ARIA_PAUSE_AUDIO:"مکث صدا",ARIA_REACTION_COUNT:(e,t)=>`${e} واکنش با ${t}`,ARIA_MORE_ACTIONS:"اقدامات بیشتر",ARIA_REPLYING_TO:(e,t)=>`در حال پاسخ به ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"خروج از حالت پاسخ"}},fi:{code:"fi-FI",name:"Finnish",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fi/cldr/data.json",translation:{YESTERDAY:"Eilen",TODAY:"Tänään",DAYS:"p",HOURS:"t",MINUTES:"m",JUST_NOW:"juuri nyt",LOCATION:"Sijainti",CANCEL:"Peruuta",INBOX:"Saapuneet",DESKTOP_NOTIFICATIONS:"Selaimen ilmoitukset",DESKTOP_NOTIFICATIONS_ERROR:"Työpöydän ilmoituksia ei voitu kytkeä päälle, koska selaimesi estää ne aktiivisesti. Koeta tutkia sen asetuksia tai vaihda selainta.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktiivinen",STATUS_INDICATOR_OFFLINE:"Poissa",ARIA_LEAVE_SEARCH_MODE:"Poistu hakutilasta",ARIA_SEARCH_UP:"Hae ylöspäin",ARIA_SEARCH_DOWN:"Hae alaspäin",ARIA_CLOSE_CHAT_POPUP:"Sulje chat-ikkuna",ARIA_SEARCH_INSIDE_CONVERSATION:"Hae tästä keskustelusta",ARIA_SEARCH:"Hae",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"aseta toistonopeus",ARIA_CANCEL_UPLOAD:"Peruuta lähetys",ARIA_STOP_RECORDING:"Lopeta tallennus",ARIA_CANCEL_RECORDING:"Peruuta tallennus",ARIA_INSERT_EMOJI:"Lisää emoji",ARIA_PLAY_AUDIO:"toista ääni",ARIA_PAUSE_AUDIO:"keskeytä ääni",ARIA_REACTION_COUNT:(e,t)=>`${e} reaktiota (${t})`,ARIA_MORE_ACTIONS:"Lisää toimintoja",ARIA_REPLYING_TO:(e,t)=>`Vastataan käyttäjälle ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Poistu vastaustilasta"}},fr:{code:"fr-FR",name:"French",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/fr.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/fr/emojibase/data.json",translation:{YESTERDAY:"Hier",TODAY:"Aujourd'hui",DAYS:"j",HOURS:"h",MINUTES:"m",JUST_NOW:"maintenant",LOCATION:"Emplacement",CANCEL:"Annuler",INBOX:"Boîte de réception",DESKTOP_NOTIFICATIONS:"Notifications du navigateur",DESKTOP_NOTIFICATIONS_ERROR:"Impossible d'activer les notifications du navigateur car votre navigateur les bloque. Essayez de changer ses paramètres ou de changer de navigateur.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Notification de démonstration ${e}`,DESKTOP_NOTIFICATIONS_DEMO_BODY:"Si vous maintenez l'onglet ouvert dans votre navigateur vous verrez apparaître une alerte lorsque quelqu'un vous parlera.",SEND_BUTTON_TEXT:"Envoyer",ENTRYBOX_TEXT_LIMIT:"Seuls 10.000 caractères sont autorisés.",ENTRYBOX_PLACEHOLDER:"Écrivez un message...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Cette conversation n'est plus active.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Vous pouvez lire, mais pas envoyer de messages.",MESSAGELIST_LOADING_OLDER:"Chargement des anciens messages ...",MESSAGELIST_SHOW_OLDER:"Afficher les anciens messages",MESSAGELIST_NEW_MARKER:"Nouveau",MESSAGE_SENT_VIA_EMAIL:"Ce message a été envoyé par e-mail",YOU_MARKER:"vous",UPLOAD_IN_PROGRESS:"Envoi en cours...",UPLOAD_SEND_FILE:"Envoyer un fichier",UPLOAD_SHARE_LOCATION:"Partager mon emplacement",UPLOAD_ERROR:"Un problème est survenu lors de l'envoi: le fichier est peut-être non pris en charge ou trop volumineux.",SHARE_LOCATION_ERROR:"Impossible de partager votre emplacement: ",LOADING:"Chargement en cours...",HUB_EMPTY:"Votre historique de discussion apparaîtra ici",HUB_SHOW_EARLIER:"Afficher les conversations précédentes",INBOX_NO_CHATS_TITLE:"Aucune conversation pour l'instant!",INBOX_NO_CHATS_BODY:"Une fois que vous aurez eu une ou plusieurs conversations, elles apparaîtront ici.",ENABLE_TRANSLATION:"Traduire cette conversation en français",DISABLE_TRANSLATION:"Remontrer la conversation originale",SEARCH_PLACEHOLDER_TEXT:"Rechercher...",SEARCH_SEARCHING:"Recherche...",SEARCH_NO_RESULTS:"Aucun résultat trouvé",SEARCH_NO_MORE_RESULTS:"Il n’y a plus de résultats",CHAT_NOT_FOUND:"Conversation introuvable",DELETE_MESSAGE:"Supprimer le message",DELETION_EXPLANATION:"Si vous supprimez ce message, il disparaîtra pour tout le monde.",EDIT_MESSAGE:"Modifier le message",SAVE:"Enregistrer",EDITED_INDICATOR:"modifié",REPLY_TO_MESSAGE:"Répondre",ADD_REACTION:"Ajouter une réaction",AUTH_EXPIRED_OVERLAY_TITLE:"Votre session de chat a expiré",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Actualisez la page pour continuer",VOICE_MESSAGE:"Message vocal",CONTACT_INFORMATION_HIDDEN:"Informations masquées",LEAVE_CONVERSATION:"Quitter la conversation",MARK_CONVERSATION_AS_UNREAD:"Marquer comme non lu",STATUS_INDICATOR_ONLINE:"Actif",STATUS_INDICATOR_OFFLINE:"Absent",ARIA_LEAVE_SEARCH_MODE:"Quitter le mode recherche",ARIA_SEARCH_UP:"Rechercher vers le haut",ARIA_SEARCH_DOWN:"Rechercher vers le bas",ARIA_CLOSE_CHAT_POPUP:"Fermer la fenêtre de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Rechercher dans cette conversation",ARIA_SEARCH:"Rechercher",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"définir la vitesse de lecture",ARIA_CANCEL_UPLOAD:"Annuler l'envoi",ARIA_STOP_RECORDING:"Arrêter l'enregistrement",ARIA_CANCEL_RECORDING:"Annuler l'enregistrement",ARIA_INSERT_EMOJI:"Insérer un emoji",ARIA_PLAY_AUDIO:"lire l'audio",ARIA_PAUSE_AUDIO:"mettre en pause l'audio",ARIA_REACTION_COUNT:(e,t)=>`${e} réactions avec ${t}`,ARIA_MORE_ACTIONS:"Plus d'actions",ARIA_REPLYING_TO:(e,t)=>`Répondre à ${e} : ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Quitter le mode réponse"}},he:{code:"he-IL",name:"Hebrew",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"אתמול",TODAY:"היום",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"עכשיו",LOCATION:"מיקום",CANCEL:"בטל",INBOX:"דואר נכנס",DESKTOP_NOTIFICATIONS:"התראות דפדפן",DESKTOP_NOTIFICATIONS_ERROR:"לא ניתן להפעיל התראות במרועה דפדפן מכיוון שהדפדפן שלך חוסם אותן באופן פעיל. נסה להסתכל בהגדרות או להשתמש בדפדפן אחר.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} הודעה על הדגמה`,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:"סמן כלא נקרא",STATUS_INDICATOR_ONLINE:"פעיל",STATUS_INDICATOR_OFFLINE:"לא פעיל",ARIA_LEAVE_SEARCH_MODE:"צא ממצב חיפוש",ARIA_SEARCH_UP:"חפש למעלה",ARIA_SEARCH_DOWN:"חפש למטה",ARIA_CLOSE_CHAT_POPUP:"סגור חלון צ'אט",ARIA_SEARCH_INSIDE_CONVERSATION:"חפש בתוך השיחה הזו",ARIA_SEARCH:"חפש",ARIA_CHAT:"צ'אט",ARIA_SET_PLAYBACK_SPEED:"הגדר מהירות השמעה",ARIA_CANCEL_UPLOAD:"בטל העלאה",ARIA_STOP_RECORDING:"עצור הקלטה",ARIA_CANCEL_RECORDING:"בטל הקלטה",ARIA_INSERT_EMOJI:"הוסף אמוג'י",ARIA_PLAY_AUDIO:"נגן אודיו",ARIA_PAUSE_AUDIO:"השהה אודיו",ARIA_REACTION_COUNT:(e,t)=>`${e} תגובות עם ${t}`,ARIA_MORE_ACTIONS:"פעולות נוספות",ARIA_REPLYING_TO:(e,t)=>`משיב ל-${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"צא ממצב תשובה"}},hi:{code:"hi-IN",name:"Hindi (IN)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/hi.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hi/cldr/data.json",translation:{YESTERDAY:"कल",TODAY:"आज",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"अभी",LOCATION:"जगह",CANCEL:"रद्द करें",INBOX:"इनबॉक्स",DESKTOP_NOTIFICATIONS:"ब्राउज़र सूचनाएं",DESKTOP_NOTIFICATIONS_ERROR:"ब्राउज़र सूचनाएं सक्षम नहीं कर सकता क्योंकि आपका ब्राउज़र सक्रिय रूप से उन्हें ब्लॉक करता है। सेटिंग्स में देखने या एक अलग ब्राउज़र का उपयोग करने का प्रयास करें।",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} डेमो अधिसूचना`,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:"अपठित के रूप में चिह्नित करें",STATUS_INDICATOR_ONLINE:"सक्रिय",STATUS_INDICATOR_OFFLINE:"अनुपस्थित",ARIA_LEAVE_SEARCH_MODE:"खोज मोड से बाहर निकलें",ARIA_SEARCH_UP:"ऊपर खोजें",ARIA_SEARCH_DOWN:"नीचे खोजें",ARIA_CLOSE_CHAT_POPUP:"चैट विंडो बंद करें",ARIA_SEARCH_INSIDE_CONVERSATION:"इस बातचीत में खोजें",ARIA_SEARCH:"खोजें",ARIA_CHAT:"चैट",ARIA_SET_PLAYBACK_SPEED:"प्लेबैक गति सेट करें",ARIA_CANCEL_UPLOAD:"अपलोड रद्द करें",ARIA_STOP_RECORDING:"रिकॉर्डिंग रोकें",ARIA_CANCEL_RECORDING:"रिकॉर्डिंग रद्द करें",ARIA_INSERT_EMOJI:"इमोजी डालें",ARIA_PLAY_AUDIO:"ऑडियो चलाएं",ARIA_PAUSE_AUDIO:"ऑडियो रोकें",ARIA_REACTION_COUNT:(e,t)=>`${e} प्रतिक्रियाएं (${t})`,ARIA_MORE_ACTIONS:"अधिक कार्य",ARIA_REPLYING_TO:(e,t)=>`${e} को उत्तर दे रहे हैं: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"उत्तर मोड से बाहर निकलें"}},hr:{code:"hr-HR",name:"Croatian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Jučer",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Obavijesti preglednika",DESKTOP_NOTIFICATIONS_ERROR:"Notifikacije preglednika nisu omogućene jer ih vaš preglednik aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi preglednik.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Odsutan",ARIA_LEAVE_SEARCH_MODE:"Napusti način pretraživanja",ARIA_SEARCH_UP:"Traži gore",ARIA_SEARCH_DOWN:"Traži dolje",ARIA_CLOSE_CHAT_POPUP:"Zatvori prozor za chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Traži u ovom razgovoru",ARIA_SEARCH:"Traži",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"postavi brzinu reprodukcije",ARIA_CANCEL_UPLOAD:"Otkaži učitavanje",ARIA_STOP_RECORDING:"Zaustavi snimanje",ARIA_CANCEL_RECORDING:"Otkaži snimanje",ARIA_INSERT_EMOJI:"Umetni emoji",ARIA_PLAY_AUDIO:"reproduciraj audio",ARIA_PAUSE_AUDIO:"pauziraj audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcija s ${t}`,ARIA_MORE_ACTIONS:"Više radnji",ARIA_REPLYING_TO:(e,t)=>`Odgovaranje korisniku ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},hu:{code:"hu-HU",name:"Hungarian",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/hu/cldr/data.json",translation:{YESTERDAY:"Tegnap",TODAY:"Ma",DAYS:"n",HOURS:"ó",MINUTES:"p",JUST_NOW:"éppen most",LOCATION:"Helyszín",CANCEL:"Visszavonás",INBOX:"Postaláda",DESKTOP_NOTIFICATIONS:"Böngésző értesítések",DESKTOP_NOTIFICATIONS_ERROR:"Azért nem tudja bekapcsolni a böngésző értesítések funkciót, mert böngészője aktívan blokkolja azt. Tekintse meg a beállításokat vagy használjon másik böngészőt.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktív",STATUS_INDICATOR_OFFLINE:"Távol",ARIA_LEAVE_SEARCH_MODE:"Keresési mód elhagyása",ARIA_SEARCH_UP:"Keresés felfelé",ARIA_SEARCH_DOWN:"Keresés lefelé",ARIA_CLOSE_CHAT_POPUP:"Csevegő ablak bezárása",ARIA_SEARCH_INSIDE_CONVERSATION:"Keresés ebben a beszélgetésben",ARIA_SEARCH:"Keresés",ARIA_CHAT:"Csevegés",ARIA_SET_PLAYBACK_SPEED:"lejátszási sebesség beállítása",ARIA_CANCEL_UPLOAD:"Feltöltés megszakítása",ARIA_STOP_RECORDING:"Felvétel leállítása",ARIA_CANCEL_RECORDING:"Felvétel megszakítása",ARIA_INSERT_EMOJI:"Emoji beszúrása",ARIA_PLAY_AUDIO:"hang lejátszása",ARIA_PAUSE_AUDIO:"hang szüneteltetése",ARIA_REACTION_COUNT:(e,t)=>`${e} reakció (${t})`,ARIA_MORE_ACTIONS:"További műveletek",ARIA_REPLYING_TO:(e,t)=>`Válaszolás ${e} részére: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Kilépés a válasz módóból"}},id:{code:"id-ID",name:"Bahasa Indonesia",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/id.js",emojiDataUrl:null,translation:{YESTERDAY:"Kemarin",TODAY:"Hari ini",DAYS:"h",HOURS:"j",MINUTES:"m",JUST_NOW:"sekarang",LOCATION:"Lokasi",CANCEL:"Batal",INBOX:"Kotak Masuk",DESKTOP_NOTIFICATIONS:"Notifikasi peramban",DESKTOP_NOTIFICATIONS_ERROR:"Tidak dapat mengaktifkan pemberitahuan browser karena browser Anda secara aktif memblokir mereka. Coba cari di pengaturan atau menggunakan browser yang berbeda.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`pemberitahuan demo ${e}`,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",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Tidak aktif",ARIA_LEAVE_SEARCH_MODE:"Keluar dari mode pencarian",ARIA_SEARCH_UP:"Cari ke atas",ARIA_SEARCH_DOWN:"Cari ke bawah",ARIA_CLOSE_CHAT_POPUP:"Tutup jendela obrolan",ARIA_SEARCH_INSIDE_CONVERSATION:"Cari dalam percakapan ini",ARIA_SEARCH:"Cari",ARIA_CHAT:"Obrolan",ARIA_SET_PLAYBACK_SPEED:"atur kecepatan pemutaran",ARIA_CANCEL_UPLOAD:"Batalkan unggah",ARIA_STOP_RECORDING:"Hentikan perekaman",ARIA_CANCEL_RECORDING:"Batalkan perekaman",ARIA_INSERT_EMOJI:"Sisipkan emoji",ARIA_PLAY_AUDIO:"putar audio",ARIA_PAUSE_AUDIO:"jeda audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reaksi dengan ${t}`,ARIA_MORE_ACTIONS:"Tindakan lainnya",ARIA_REPLYING_TO:(e,t)=>`Membalas ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Keluar dari mode balasan"}},is:{code:"is-IS",name:"Íslenska",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Í gær",TODAY:"Í dag",DAYS:"dagar",HOURS:"klst.",MINUTES:"mín.",JUST_NOW:"núna",LOCATION:"Staðsetning",CANCEL:"Hætta við",INBOX:"Pósthólf",DESKTOP_NOTIFICATIONS:"Tilkynningar í vafra",DESKTOP_NOTIFICATIONS_ERROR:"Ekki er hægt að birta tilkynningar í vafra vegna þess að vafrinn sem þú notar hindrar það. Reyndu að leita að stillingum eða að nota annan vafra.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",ADD_REACTION:"Setja inn viðbrögð",AUTH_EXPIRED_OVERLAY_TITLE:"Spjallið hefur runnið út",AUTH_EXPIRED_OVERLAY_DESCRIPTION:"Endurnýjaðu síðuna til að halda áfram",VOICE_MESSAGE:"Raddskilaboð",LEAVE_CONVERSATION:"Skilja eftir skilaboð",MARK_CONVERSATION_AS_UNREAD:"Merkja sem ólesið",STATUS_INDICATOR_ONLINE:"Virk",STATUS_INDICATOR_OFFLINE:"Ekki við",CONTACT_INFORMATION_HIDDEN:"faldar upplýsingar",ARIA_LEAVE_SEARCH_MODE:"Hætta í leitastillingu",ARIA_SEARCH_UP:"Leita upp",ARIA_SEARCH_DOWN:"Leita niður",ARIA_CLOSE_CHAT_POPUP:"Loka spjallglugga",ARIA_SEARCH_INSIDE_CONVERSATION:"Leita í þessari samtal",ARIA_SEARCH:"Leita",ARIA_CHAT:"Spjall",ARIA_SET_PLAYBACK_SPEED:"stilla afspilunarhraða",ARIA_CANCEL_UPLOAD:"Hætta við upphleðslu",ARIA_STOP_RECORDING:"Stöðva upptöku",ARIA_CANCEL_RECORDING:"Hætta við upptöku",ARIA_INSERT_EMOJI:"Setja inn emoji",ARIA_PLAY_AUDIO:"spila hljóð",ARIA_PAUSE_AUDIO:"gera hlé á hljóði",ARIA_REACTION_COUNT:(e,t)=>`${e} viðbrögð með ${t}`,ARIA_MORE_ACTIONS:"Fleiri aðgerðir",ARIA_REPLYING_TO:(e,t)=>`Svara ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Hætta í svarmód"}},it:{code:"it-IT",name:"Italian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/it.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/it/cldr/data.json",translation:{YESTERDAY:"Ieri",TODAY:"Oggi",DAYS:"g",HOURS:"o",MINUTES:"m",JUST_NOW:"adesso",LOCATION:"Posizione",CANCEL:"Annulla",INBOX:"Posta in arrivo",DESKTOP_NOTIFICATIONS:"Notifiche browser",DESKTOP_NOTIFICATIONS_ERROR:"Impossibile abilitare le notifiche browser perché il browser le blocca attivamente. Prova a cercare le impostazioni o utilizzare un browser diverso.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",LEAVE_CONVERSATION:"Abbandona la conversazione",MARK_CONVERSATION_AS_UNREAD:"Segna come non letto",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informazioni nascoste",ARIA_LEAVE_SEARCH_MODE:"Esci dalla modalità ricerca",ARIA_SEARCH_UP:"Cerca in alto",ARIA_SEARCH_DOWN:"Cerca in basso",ARIA_CLOSE_CHAT_POPUP:"Chiudi la finestra di chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Cerca in questa conversazione",ARIA_SEARCH:"Cerca",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"imposta velocità di riproduzione",ARIA_CANCEL_UPLOAD:"Annulla caricamento",ARIA_STOP_RECORDING:"Interrompi registrazione",ARIA_CANCEL_RECORDING:"Annulla registrazione",ARIA_INSERT_EMOJI:"Inserisci un'emoji",ARIA_PLAY_AUDIO:"riproduci audio",ARIA_PAUSE_AUDIO:"metti in pausa audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reazioni con ${t}`,ARIA_MORE_ACTIONS:"Altre azioni",ARIA_REPLYING_TO:(e,t)=>`Rispondendo a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Esci dalla modalità risposta"}},ja:{code:"ja-JP",name:"Japanese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ja.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ja/emojibase/data.json",translation:{YESTERDAY:"昨日",TODAY:"今日",DAYS:"日前",HOURS:"時間前",MINUTES:"分前",JUST_NOW:"たった今",LOCATION:"場所",CANCEL:"キャンセル",INBOX:"受信箱",DESKTOP_NOTIFICATIONS:"ブラウザの通知",DESKTOP_NOTIFICATIONS_ERROR:"ブラウザの通知はブロックされているため、ブラウザの通知を有効にできません。設定を確認するか、別のブラウザを使用してください。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} デモ通知`,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:"未読としてマーク",STATUS_INDICATOR_ONLINE:"アクティブ",STATUS_INDICATOR_OFFLINE:"退席中",ARIA_LEAVE_SEARCH_MODE:"検索モードを終了",ARIA_SEARCH_UP:"上に検索",ARIA_SEARCH_DOWN:"下に検索",ARIA_CLOSE_CHAT_POPUP:"チャットポップアップを閉じる",ARIA_SEARCH_INSIDE_CONVERSATION:"この会話内を検索",ARIA_SEARCH:"検索",ARIA_CHAT:"チャット",ARIA_SET_PLAYBACK_SPEED:"再生速度を設定",ARIA_CANCEL_UPLOAD:"アップロードをキャンセル",ARIA_STOP_RECORDING:"録音を停止",ARIA_CANCEL_RECORDING:"録音をキャンセル",ARIA_INSERT_EMOJI:"絵文字を挿入",ARIA_PLAY_AUDIO:"音声を再生",ARIA_PAUSE_AUDIO:"音声を一時停止",ARIA_REACTION_COUNT:(e,t)=>`${e}件のリアクション(${t})`,ARIA_MORE_ACTIONS:"その他の操作",ARIA_REPLYING_TO:(e,t)=>`${e}に返信: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"返信モードを終了"}},ka:{code:"ka-GE",name:"Georgian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"გუშინ",TODAY:"დღეს",DAYS:"დღ",HOURS:"სთ",MINUTES:"წთ",JUST_NOW:"ახლა",LOCATION:"ადგილმდებარეობა",CANCEL:"გაუქმება",INBOX:"მიღებული შეტყობინება",DESKTOP_NOTIFICATIONS:"ბრაუზერის შეტყობინებები",DESKTOP_NOTIFICATIONS_ERROR:"შეუძლებელია ბრაუზერის შეტკობინებების ჩართვა. ეს ბრაუზერი ბლოკავს მათ. სცადე ცვლილება ოპციებიდან ან გამოიყენე სხვა ბრაუზერი.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} შეტყობინებების დემო ვერსია`,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:"ხმოვანი შეტყობინება",LEAVE_CONVERSATION:"საუბრის დატოვება",MARK_CONVERSATION_AS_UNREAD:"წაუკითხავად მონიშვნა",STATUS_INDICATOR_ONLINE:"აქტიური",STATUS_INDICATOR_OFFLINE:"გამორთული",CONTACT_INFORMATION_HIDDEN:"ფარული ინფორმაცია",ARIA_LEAVE_SEARCH_MODE:"ძიების რეჟიმიდან გასვლა",ARIA_SEARCH_UP:"ძიება ზემოთ",ARIA_SEARCH_DOWN:"ძიება ქვემოთ",ARIA_CLOSE_CHAT_POPUP:"ჩეთის ფანჯრის დახურვა",ARIA_SEARCH_INSIDE_CONVERSATION:"ძიება ამ საუბარში",ARIA_SEARCH:"ძიება",ARIA_CHAT:"ჩეთი",ARIA_SET_PLAYBACK_SPEED:"გადახვევის სიჩქარის დაყენება",ARIA_CANCEL_UPLOAD:"ატვირთვის გაუქმება",ARIA_STOP_RECORDING:"ჩაწერის შეჩერება",ARIA_CANCEL_RECORDING:"ჩაწერის გაუქმება",ARIA_INSERT_EMOJI:"ემოჯის ჩასმა",ARIA_PLAY_AUDIO:"აუდიოს დაკვრა",ARIA_PAUSE_AUDIO:"აუდიოს შეჩერება",ARIA_REACTION_COUNT:(e,t)=>`${e} რეაქცია (${t})`,ARIA_MORE_ACTIONS:"მეტი ქმედება",ARIA_REPLYING_TO:(e,t)=>`პასუხი ${e}-ს: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"პასუხის რეჟიმიდან გასვლა"}},ko:{code:"ko-KR",name:"Korean (South Korea)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ko/cldr/data.json",translation:{YESTERDAY:"어제",TODAY:"오늘",DAYS:"일 전",HOURS:"시간 전",MINUTES:"분 전",JUST_NOW:"방금",LOCATION:"위치",CANCEL:"취소",INBOX:"대화 목록",DESKTOP_NOTIFICATIONS:"브라우저 알림",DESKTOP_NOTIFICATIONS_ERROR:"브라우저 알림을 표시할 수 없습니다. 브라우저 설정을 확인하거나 다른 브라우저를 사용해주세요.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 데모 알림`,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:"읽지 않은 상태로 표시",STATUS_INDICATOR_ONLINE:"활성",STATUS_INDICATOR_OFFLINE:"부재중",ARIA_LEAVE_SEARCH_MODE:"검색 모드 종료",ARIA_SEARCH_UP:"위로 검색",ARIA_SEARCH_DOWN:"아래로 검색",ARIA_CLOSE_CHAT_POPUP:"채팅 팝업 닫기",ARIA_SEARCH_INSIDE_CONVERSATION:"이 대화 내 검색",ARIA_SEARCH:"검색",ARIA_CHAT:"채팅",ARIA_SET_PLAYBACK_SPEED:"재생 속도 설정",ARIA_CANCEL_UPLOAD:"업로드 취소",ARIA_STOP_RECORDING:"녹음 중지",ARIA_CANCEL_RECORDING:"녹음 취소",ARIA_INSERT_EMOJI:"이모지 삽입",ARIA_PLAY_AUDIO:"오디오 재생",ARIA_PAUSE_AUDIO:"오디오 일시 정지",ARIA_REACTION_COUNT:(e,t)=>`${e}개 반응 (${t})`,ARIA_MORE_ACTIONS:"추가 작업",ARIA_REPLYING_TO:(e,t)=>`${e}에게 답장: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"답장 모드 종료"}},nb:{code:"nb-NO",name:"Norwegian (Bokmål)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nb/cldr/data.json",translation:{YESTERDAY:"I går",TODAY:"I dag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"Nå",LOCATION:"Plassering",CANCEL:"Avbryt",INBOX:"Innboks",DESKTOP_NOTIFICATIONS:"Nettleservarsler",DESKTOP_NOTIFICATIONS_ERROR:"Kan ikke aktivere Nettleservarsler fordi nettleseren din aktivt blokkerer dem. Prøv å se i innstillingene eller bruke en annen nettleser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Borte",ARIA_LEAVE_SEARCH_MODE:"Forlat søkemodus",ARIA_SEARCH_UP:"Søk oppover",ARIA_SEARCH_DOWN:"Søk nedover",ARIA_CLOSE_CHAT_POPUP:"Lukk chatvindu",ARIA_SEARCH_INSIDE_CONVERSATION:"Søk i denne samtalen",ARIA_SEARCH:"Søk",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"angi avspillingshastighet",ARIA_CANCEL_UPLOAD:"Avbryt opplasting",ARIA_STOP_RECORDING:"Stopp opptak",ARIA_CANCEL_RECORDING:"Avbryt opptak",ARIA_INSERT_EMOJI:"Sett inn en emoji",ARIA_PLAY_AUDIO:"spill av lyd",ARIA_PAUSE_AUDIO:"pause lyd",ARIA_REACTION_COUNT:(e,t)=>`${e} reaksjoner med ${t}`,ARIA_MORE_ACTIONS:"Flere handlinger",ARIA_REPLYING_TO:(e,t)=>`Svarer til ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avslutt svarmodus"}},nl:{code:"nl-NL",name:"Dutch",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/nl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/nl/cldr/data.json",translation:{YESTERDAY:"Gisteren",TODAY:"Vandaag",DAYS:"d",HOURS:"u",MINUTES:"m",JUST_NOW:"zojuist",LOCATION:"Locatie",CANCEL:"Annuleren",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Browsermeldingen",DESKTOP_NOTIFICATIONS_ERROR:"Browsermeldingen kunnen niet geactiveerd worden omdat de browser het blokkeert. Check de instellingen van je browser of probeer een andere browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",LEAVE_CONVERSATION:"Gesprek verlaten",MARK_CONVERSATION_AS_UNREAD:"Markeren als ongelezen",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"verborgen informatie",ARIA_LEAVE_SEARCH_MODE:"Zoekmodus verlaten",ARIA_SEARCH_UP:"Omhoog zoeken",ARIA_SEARCH_DOWN:"Omlaag zoeken",ARIA_CLOSE_CHAT_POPUP:"Chatvenster sluiten",ARIA_SEARCH_INSIDE_CONVERSATION:"Zoeken in dit gesprek",ARIA_SEARCH:"Zoeken",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"Afspeelsnelheid instellen",ARIA_CANCEL_UPLOAD:"Upload annuleren",ARIA_STOP_RECORDING:"Opname stoppen",ARIA_CANCEL_RECORDING:"Opname annuleren",ARIA_INSERT_EMOJI:"Een emoji invoegen",ARIA_PLAY_AUDIO:"Audio afspelen",ARIA_PAUSE_AUDIO:"Audio pauzeren",ARIA_REACTION_COUNT:(e,t)=>`${e} Reacties met ${t}`,ARIA_MORE_ACTIONS:"Meer acties",ARIA_REPLYING_TO:(e,t)=>`Beantwoorden aan ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Verlaat antwoordmodus"}},pl:{code:"pl-PL",name:"Polish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pl.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pl/cldr/data.json",translation:{YESTERDAY:"Wczoraj",TODAY:"Dzisiaj",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"teraz",LOCATION:"Lokalizacja",CANCEL:"Anuluj",INBOX:"Skrzynka odbiorcza",DESKTOP_NOTIFICATIONS:"Powiadomienia",DESKTOP_NOTIFICATIONS_ERROR:"Nie można aktywować powiadomień, ponieważ twoja przeglądarka je blokuje. Proszę zmienić ustawienie lub spróbować innej przeglądarki.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktywny",STATUS_INDICATOR_OFFLINE:"Nieobecny",ARIA_LEAVE_SEARCH_MODE:"Wyjdź z trybu wyszukiwania",ARIA_SEARCH_UP:"Szukaj w górę",ARIA_SEARCH_DOWN:"Szukaj w dół",ARIA_CLOSE_CHAT_POPUP:"Zamknij okno czatu",ARIA_SEARCH_INSIDE_CONVERSATION:"Szukaj w tej konwersacji",ARIA_SEARCH:"Szukaj",ARIA_CHAT:"Czat",ARIA_SET_PLAYBACK_SPEED:"ustaw prędkość odtwarzania",ARIA_CANCEL_UPLOAD:"Anuluj przesyłanie",ARIA_STOP_RECORDING:"Zatrzymaj nagrywanie",ARIA_CANCEL_RECORDING:"Anuluj nagrywanie",ARIA_INSERT_EMOJI:"Wstaw emoji",ARIA_PLAY_AUDIO:"odtwórz audio",ARIA_PAUSE_AUDIO:"wstrzymaj audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reakcji z ${t}`,ARIA_MORE_ACTIONS:"Więcej akcji",ARIA_REPLYING_TO:(e,t)=>`Odpowiadanie na ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Wyjdź z trybu odpowiedzi"}},pt:{code:"pt-BR",name:"Portuguese (Brazil)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/pt_BR.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/pt/cldr/data.json",translation:{YESTERDAY:"Ontem",TODAY:"Hoje",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"agora mesmo",LOCATION:"Localização",CANCEL:"Cancelar",INBOX:"Caixa de entrada",DESKTOP_NOTIFICATIONS:"Notificações do navegador",DESKTOP_NOTIFICATIONS_ERROR:"Não é possível ativar as notificações da navegador porque seu navegador as bloqueia. Tente procurar nas configurações ou usar um navegador diferente.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",CONTACT_INFORMATION_HIDDEN:"Informação oculta",ARIA_LEAVE_SEARCH_MODE:"Sair do modo de pesquisa",ARIA_SEARCH_UP:"Pesquisar para cima",ARIA_SEARCH_DOWN:"Pesquisar para baixo",ARIA_CLOSE_CHAT_POPUP:"Fechar janela de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Pesquisar nesta conversa",ARIA_SEARCH:"Pesquisar",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"definir velocidade de reprodução",ARIA_CANCEL_UPLOAD:"Cancelar envio",ARIA_STOP_RECORDING:"Parar gravação",ARIA_CANCEL_RECORDING:"Cancelar gravação",ARIA_INSERT_EMOJI:"Inserir um emoji",ARIA_PLAY_AUDIO:"reproduzir áudio",ARIA_PAUSE_AUDIO:"pausar áudio",ARIA_REACTION_COUNT:(e,t)=>`${e} reações com ${t}`,ARIA_MORE_ACTIONS:"Mais ações",ARIA_REPLYING_TO:(e,t)=>`Respondendo a ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Sair do modo de resposta"}},ro:{code:"ro-RO",name:"Romanian (Romania)",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Ieri",TODAY:"Astăzi",DAYS:"z",HOURS:"o",MINUTES:"m",JUST_NOW:"chiar acum",LOCATION:"Locație",CANCEL:"Anulare",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Notificări browser",DESKTOP_NOTIFICATIONS_ERROR:"Nu se pot activa notificări browser deoarece browserul dvs. le blochează în mod activ. Încercați să căutați în setări sau utilizând un alt browser.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Notificare de debit ${e}`,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",STATUS_INDICATOR_ONLINE:"Activ",STATUS_INDICATOR_OFFLINE:"Plecat",ARIA_LEAVE_SEARCH_MODE:"Părăsește modul de căutare",ARIA_SEARCH_UP:"Caută în sus",ARIA_SEARCH_DOWN:"Caută în jos",ARIA_CLOSE_CHAT_POPUP:"Închide fereastra de chat",ARIA_SEARCH_INSIDE_CONVERSATION:"Caută în această conversație",ARIA_SEARCH:"Caută",ARIA_CHAT:"Chat",ARIA_SET_PLAYBACK_SPEED:"setează viteza de redare",ARIA_CANCEL_UPLOAD:"Anulează încărcarea",ARIA_STOP_RECORDING:"Oprește înregistrarea",ARIA_CANCEL_RECORDING:"Anulează înregistrarea",ARIA_INSERT_EMOJI:"Inserează un emoji",ARIA_PLAY_AUDIO:"redă audio",ARIA_PAUSE_AUDIO:"pauză audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reacții cu ${t}`,ARIA_MORE_ACTIONS:"Mai multe acțiuni",ARIA_REPLYING_TO:(e,t)=>`Răspuns la ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Părăsește modul de răspuns"}},ru:{code:"ru-RU",name:"Russian",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/ru_RU.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/ru/emojibase/data.json",translation:{YESTERDAY:"Вчера",TODAY:"Сегодня",DAYS:"д",HOURS:"ч",MINUTES:"м",JUST_NOW:"только что",LOCATION:"Местоположение",CANCEL:"Отмена",INBOX:"Входящие",DESKTOP_NOTIFICATIONS:"Оповещения",DESKTOP_NOTIFICATIONS_ERROR:"Невозможно включить оповещения, потому что ваш браузер активно блокирует их. Проверьте ваши настройки или попробуйте другой браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} демо-оповещение`,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:"Отметить как непрочитанное",STATUS_INDICATOR_ONLINE:"Активен",STATUS_INDICATOR_OFFLINE:"Не в сети",ARIA_LEAVE_SEARCH_MODE:"Выйти из режима поиска",ARIA_SEARCH_UP:"Искать вверх",ARIA_SEARCH_DOWN:"Искать вниз",ARIA_CLOSE_CHAT_POPUP:"Закрыть окно чата",ARIA_SEARCH_INSIDE_CONVERSATION:"Искать в этом разговоре",ARIA_SEARCH:"Поиск",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"установить скорость воспроизведения",ARIA_CANCEL_UPLOAD:"Отменить загрузку",ARIA_STOP_RECORDING:"Остановить запись",ARIA_CANCEL_RECORDING:"Отменить запись",ARIA_INSERT_EMOJI:"Вставить эмодзи",ARIA_PLAY_AUDIO:"воспроизвести аудио",ARIA_PAUSE_AUDIO:"приостановить аудио",ARIA_REACTION_COUNT:(e,t)=>`${e} реакций с ${t}`,ARIA_MORE_ACTIONS:"Дополнительные действия",ARIA_REPLYING_TO:(e,t)=>`Ответ на ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Выйти из режима ответа"}},sq:{code:"sq-AL",name:"Albanian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Dje",TODAY:"Sot",DAYS:"d",HOURS:"o",MINUTES:"m",JUST_NOW:"Tani",LOCATION:"Pozicion",CANCEL:"Anulo",INBOX:"Inbox",DESKTOP_NOTIFICATIONS:"Njoftimet e shfletuesit",DESKTOP_NOTIFICATIONS_ERROR:"Nuk mund të aktivizohen njoftimet në shfletues sepse shfletuesi juaj i bllokon ato në mënyrë aktive. Provoni të shikoni cilësimet ose përdorni një shfletues të ndryshëm.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktiv",STATUS_INDICATOR_OFFLINE:"Larg",ARIA_LEAVE_SEARCH_MODE:"Dil nga mënyra e kërkimit",ARIA_SEARCH_UP:"Kërko lart",ARIA_SEARCH_DOWN:"Kërko poshtë",ARIA_CLOSE_CHAT_POPUP:"Mbyll dritaren e bisedës",ARIA_SEARCH_INSIDE_CONVERSATION:"Kërko në këtë bisedë",ARIA_SEARCH:"Kërko",ARIA_CHAT:"Bisedë",ARIA_SET_PLAYBACK_SPEED:"vendos shpejtësinë e luajtjes",ARIA_CANCEL_UPLOAD:"Anulo ngarkimin",ARIA_STOP_RECORDING:"Ndalo regjistrimin",ARIA_CANCEL_RECORDING:"Anulo regjistrimin",ARIA_INSERT_EMOJI:"Fut një emoji",ARIA_PLAY_AUDIO:"luaj audio",ARIA_PAUSE_AUDIO:"pauzë audio",ARIA_REACTION_COUNT:(e,t)=>`${e} reagime me ${t}`,ARIA_MORE_ACTIONS:"Më shumë veprime",ARIA_REPLYING_TO:(e,t)=>`Duke u përgjigjur ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Dil nga mënyra e përgjigjes"}},sr:{code:"sr-SP",name:"Serbian",emojiPickerTranslationUrl:null,emojiDataUrl:null,translation:{YESTERDAY:"Juče",TODAY:"Danas",DAYS:"d",HOURS:"s",MINUTES:"m",JUST_NOW:"Upravo sad",LOCATION:"Lokacija",CANCEL:"Otkaži",INBOX:"Pretinac",DESKTOP_NOTIFICATIONS:"Browser Notifikacija",DESKTOP_NOTIFICATIONS_ERROR:"Browser notifikacije nisu omogućene jer ih vaš pregledač aktivno blokira. Pokušajte pogledati postavke ili koristiti neki drugi pregledač.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktivan",STATUS_INDICATOR_OFFLINE:"Neaktivan",ARIA_LEAVE_SEARCH_MODE:"Напусти режим претраге",ARIA_SEARCH_UP:"Тражи горе",ARIA_SEARCH_DOWN:"Тражи доле",ARIA_CLOSE_CHAT_POPUP:"Затвори прозор ћаскања",ARIA_SEARCH_INSIDE_CONVERSATION:"Тражи у овом разговору",ARIA_SEARCH:"Тражи",ARIA_CHAT:"Ћаскање",ARIA_SET_PLAYBACK_SPEED:"постави брзину репродукције",ARIA_CANCEL_UPLOAD:"Откажи отпремање",ARIA_STOP_RECORDING:"Заустави снимање",ARIA_CANCEL_RECORDING:"Откажи снимање",ARIA_INSERT_EMOJI:"Уметни емоџи",ARIA_PLAY_AUDIO:"репродукуј аудио",ARIA_PAUSE_AUDIO:"паузирај аудио",ARIA_REACTION_COUNT:(e,t)=>`${e} реакција са ${t}`,ARIA_MORE_ACTIONS:"Више радњи",ARIA_REPLYING_TO:(e,t)=>`Одговарање кориснику ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Izađi iz moda odgovaranja"}},sv:{code:"sv-SE",name:"Swedish (Sweden)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/sv/emojibase/data.json",translation:{YESTERDAY:"Igår",TODAY:"Idag",DAYS:"d",HOURS:"h",MINUTES:"m",JUST_NOW:"just nu",LOCATION:"Plats",CANCEL:"Avbryt",INBOX:"Inkorg",DESKTOP_NOTIFICATIONS:"Webbläsarnotiser",DESKTOP_NOTIFICATIONS_ERROR:"Kan inte aktivera webbläsarnotiser eftersom din webbläsare aktivt blockerar dem. Se över inställningarna eller använd en annan webbläsare.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Online",STATUS_INDICATOR_OFFLINE:"Offline",ARIA_LEAVE_SEARCH_MODE:"Avsluta sökläge",ARIA_SEARCH_UP:"Sök uppåt",ARIA_SEARCH_DOWN:"Sök nedåt",ARIA_CLOSE_CHAT_POPUP:"Stäng chattfönstret",ARIA_SEARCH_INSIDE_CONVERSATION:"Sök i denna konversation",ARIA_SEARCH:"Sök",ARIA_CHAT:"Chatt",ARIA_SET_PLAYBACK_SPEED:"Ställ in uppspelningshastighet",ARIA_CANCEL_UPLOAD:"Avbryt uppladdning",ARIA_STOP_RECORDING:"Stoppa inspelning",ARIA_CANCEL_RECORDING:"Avbryt inspelning",ARIA_INSERT_EMOJI:"Infoga en emoji",ARIA_PLAY_AUDIO:"Spela upp ljud",ARIA_PAUSE_AUDIO:"Pausa ljud",ARIA_REACTION_COUNT:(e,t)=>`${e} Reaktioner med ${t}`,ARIA_MORE_ACTIONS:"Fler åtgärder",ARIA_REPLYING_TO:(e,t)=>`Svarar på ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Avsluta svarsläge"}},tr:{code:"tr-TR",name:"Turkish",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/tr.js",emojiDataUrl:null,translation:{YESTERDAY:"Dün",TODAY:"Bugün",DAYS:"g",HOURS:"s",MINUTES:"d",JUST_NOW:"az önce",LOCATION:"Konum",CANCEL:"İptal",INBOX:"Gelen Kutusu",SEND_BUTTON_TEXT:"Gönder",ENTRYBOX_TEXT_LIMIT:"En fazla 10.000 karaktere izin veriliyor.",ENTRYBOX_PLACEHOLDER:"Bir şeyler söyle...",ENTRYBOX_PLACEHOLDER_CHAT_CLOSED:"Bu konuşma artık aktif değil.",ENTRYBOX_PLACEHOLDER_CHAT_READONLY:"Mesajları okuyabilirsiniz ancak mesaj gönderemezsiniz.",MESSAGELIST_LOADING_OLDER:"Eski mesajlar yükleniyor...",MESSAGELIST_SHOW_OLDER:"Eski mesajları göster",MESSAGELIST_NEW_MARKER:"Yeni",DESKTOP_NOTIFICATIONS:"Tarayıcı bildirimleri",DESKTOP_NOTIFICATIONS_ERROR:"Tarayıcınız aktif olarak engellediğinden tarayıcı bildirimlerini etkinleştiremiyoruz. Ayarları kontrol etmeyi veya farklı bir tarayıcı kullanmayı deneyebilirsiniz.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Aktif",STATUS_INDICATOR_OFFLINE:"Uzakta",ARIA_LEAVE_SEARCH_MODE:"Arama modundan çık",ARIA_SEARCH_UP:"Yukarı ara",ARIA_SEARCH_DOWN:"Aşağı ara",ARIA_CLOSE_CHAT_POPUP:"Sohbet penceresini kapat",ARIA_SEARCH_INSIDE_CONVERSATION:"Bu konuşmada ara",ARIA_SEARCH:"Ara",ARIA_CHAT:"Sohbet",ARIA_SET_PLAYBACK_SPEED:"oynatma hızını ayarla",ARIA_CANCEL_UPLOAD:"Yüklemeyi iptal et",ARIA_STOP_RECORDING:"Kaydı durdur",ARIA_CANCEL_RECORDING:"Kaydı iptal et",ARIA_INSERT_EMOJI:"Emoji ekle",ARIA_PLAY_AUDIO:"sesi oynat",ARIA_PAUSE_AUDIO:"sesi duraklat",ARIA_REACTION_COUNT:(e,t)=>`${e} tepki (${t})`,ARIA_MORE_ACTIONS:"Daha fazla işlem",ARIA_REPLYING_TO:(e,t)=>`${e}'a yanıtlama: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Yanıt modundan çık"}},uk:{code:"uk-UA",name:"Ukrainian (Ukraine)",emojiPickerTranslationUrl:null,emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/uk/cldr/data.json",translation:{YESTERDAY:"Вчора",TODAY:"Сьогодні",DAYS:"d",HOURS:"h",MINUTES:"м",JUST_NOW:"просто зараз",LOCATION:"Місцезнаходження",CANCEL:"Скасувати",INBOX:"Вхідні",DESKTOP_NOTIFICATIONS:"Сповіщення в браузері",DESKTOP_NOTIFICATIONS_ERROR:"Неможливо ввімкнути сповіщення в браузері, оскільки ваш веб-переглядач активно їх блокує. Спробуйте переглянути налаштування або використовувати інший браузер.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`Демо-повідомлення про ${e}`,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:"Відзначити як непрочитане",STATUS_INDICATOR_ONLINE:"Активний",STATUS_INDICATOR_OFFLINE:"Відсутній",ARIA_LEAVE_SEARCH_MODE:"Вийти з режиму пошуку",ARIA_SEARCH_UP:"Шукати вгору",ARIA_SEARCH_DOWN:"Шукати вниз",ARIA_CLOSE_CHAT_POPUP:"Закрити вікно чату",ARIA_SEARCH_INSIDE_CONVERSATION:"Шукати в цій розмові",ARIA_SEARCH:"Пошук",ARIA_CHAT:"Чат",ARIA_SET_PLAYBACK_SPEED:"встановити швидкість відтворення",ARIA_CANCEL_UPLOAD:"Скасувати завантаження",ARIA_STOP_RECORDING:"Зупинити запис",ARIA_CANCEL_RECORDING:"Скасувати запис",ARIA_INSERT_EMOJI:"Вставити емодзі",ARIA_PLAY_AUDIO:"відтворити аудіо",ARIA_PAUSE_AUDIO:"призупинити аудіо",ARIA_REACTION_COUNT:(e,t)=>`${e} реакцій з ${t}`,ARIA_MORE_ACTIONS:"Більше дій",ARIA_REPLYING_TO:(e,t)=>`Відповідь на ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Вийти з режиму відповіді"}},vi:{code:"vi-VN",name:"Vietnamese",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/vi.js",emojiDataUrl:null,translation:{YESTERDAY:"Hôm qua",TODAY:"Hôm nay",DAYS:"ngày",HOURS:"giờ",MINUTES:"phút",JUST_NOW:"vừa xong",LOCATION:"Địa điểm",CANCEL:"Hủy",INBOX:"Hộp thư đến",DESKTOP_NOTIFICATIONS:"Thông báo trình duyệt",DESKTOP_NOTIFICATIONS_ERROR:"Không thể bật thông báo trên trình duyệt vì trình duyệt của bạn đang tắt chức năng này. Hãy thử tìm trong cài đặt trình duyệt hoặc sử dụng một trình duyệt khác.",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 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",STATUS_INDICATOR_ONLINE:"Hoạt động",STATUS_INDICATOR_OFFLINE:"Vắng mặt",ARIA_LEAVE_SEARCH_MODE:"Thoát chế độ tìm kiếm",ARIA_SEARCH_UP:"Tìm kiếm lên trên",ARIA_SEARCH_DOWN:"Tìm kiếm xuống dưới",ARIA_CLOSE_CHAT_POPUP:"Đóng cửa sổ trò chuyện",ARIA_SEARCH_INSIDE_CONVERSATION:"Tìm kiếm trong cuộc trò chuyện này",ARIA_SEARCH:"Tìm kiếm",ARIA_CHAT:"Trò chuyện",ARIA_SET_PLAYBACK_SPEED:"đặt tốc độ phát",ARIA_CANCEL_UPLOAD:"Hủy tải lên",ARIA_STOP_RECORDING:"Dừng ghi âm",ARIA_CANCEL_RECORDING:"Hủy ghi âm",ARIA_INSERT_EMOJI:"Chèn biểu tượng cảm xúc",ARIA_PLAY_AUDIO:"phát âm thanh",ARIA_PAUSE_AUDIO:"tạm dừng âm thanh",ARIA_REACTION_COUNT:(e,t)=>`${e} phản ứng với ${t}`,ARIA_MORE_ACTIONS:"Thêm hành động",ARIA_REPLYING_TO:(e,t)=>`Đang trả lời ${e}: ${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"Thoát chế độ trả lời"}},zh:{code:"zh-CN",name:"Chinese (Simplified)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh/emojibase/data.json",translation:{YESTERDAY:"昨天",TODAY:"今天",DAYS:"天",HOURS:"小时",MINUTES:"分钟",JUST_NOW:"刚才",LOCATION:"地点",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"浏览器通知",DESKTOP_NOTIFICATIONS_ERROR:"因浏览器设置为阻止,所以无法激活浏览器提醒。请去设置里查看或者尝试其他的浏览器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 演示提醒`,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:"标记为未读",STATUS_INDICATOR_ONLINE:"活跃",STATUS_INDICATOR_OFFLINE:"离开",ARIA_LEAVE_SEARCH_MODE:"退出搜索模式",ARIA_SEARCH_UP:"向上搜索",ARIA_SEARCH_DOWN:"向下搜索",ARIA_CLOSE_CHAT_POPUP:"关闭聊天弹窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此对话中搜索",ARIA_SEARCH:"搜索",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"设置播放速度",ARIA_CANCEL_UPLOAD:"取消上传",ARIA_STOP_RECORDING:"停止录音",ARIA_CANCEL_RECORDING:"取消录音",ARIA_INSERT_EMOJI:"插入表情符号",ARIA_PLAY_AUDIO:"播放音频",ARIA_PAUSE_AUDIO:"暂停音频",ARIA_REACTION_COUNT:(e,t)=>`${e}个反应(${t})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(e,t)=>`正在回复 ${e}:${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回复模式"}},zhTw:{code:"zh-TW",name:"Chinese (Traditional)",emojiPickerTranslationUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/i18n/zh_CN.js",emojiDataUrl:"https://cdn.jsdelivr.net/npm/emoji-picker-element-data@^1/zh-hant/cldr/data.json",translation:{YESTERDAY:"昨天",TODAY:"昨天",DAYS:"天",HOURS:"小時",MINUTES:"分",JUST_NOW:"現在",LOCATION:"地點",CANCEL:"取消",INBOX:"收件箱",DESKTOP_NOTIFICATIONS:"瀏覽器通知",DESKTOP_NOTIFICATIONS_ERROR:"無法啟用瀏覽器通知,因為您的瀏覽器主動阻止它們。 嘗試查看設置或使用其他瀏覽器。",DESKTOP_NOTIFICATIONS_DEMO_TITLE:e=>`${e} 演示通知`,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:"標記為未讀",STATUS_INDICATOR_ONLINE:"活躍",STATUS_INDICATOR_OFFLINE:"離開",ARIA_LEAVE_SEARCH_MODE:"離開搜尋模式",ARIA_SEARCH_UP:"向上搜尋",ARIA_SEARCH_DOWN:"向下搜尋",ARIA_CLOSE_CHAT_POPUP:"關閉聊天彈窗",ARIA_SEARCH_INSIDE_CONVERSATION:"在此對話中搜尋",ARIA_SEARCH:"搜尋",ARIA_CHAT:"聊天",ARIA_SET_PLAYBACK_SPEED:"設定播放速度",ARIA_CANCEL_UPLOAD:"取消上傳",ARIA_STOP_RECORDING:"停止錄音",ARIA_CANCEL_RECORDING:"取消錄音",ARIA_INSERT_EMOJI:"插入表情符號",ARIA_PLAY_AUDIO:"播放音訊",ARIA_PAUSE_AUDIO:"暫停音訊",ARIA_REACTION_COUNT:(e,t)=>`${e}個反應(${t})`,ARIA_MORE_ACTIONS:"更多操作",ARIA_REPLYING_TO:(e,t)=>`正在回覆 ${e}:${t}`,REPLY_MODE_LEAVE_ARIA_LABEL:"退出回覆模式"}}},bm=()=>{const e=document.createElement("canvas");e.width=e.height=1;const t=e.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},Pd=(e,t)=>{const n=bm();return n.fillStyle=t,n.fillText(e,0,0),n.getImageData(0,0,1,1).data},Bg=e=>!e.includes("")||bm().measureText(e).width<160,Ug=(e,t)=>{const n=[...e].join(",");return n===[...t].join(",")&&!n.startsWith("0,0,0,")};function km(e){try{return function(t){const n=Pd(t,"#000"),r=Pd(t,"#fff"),i=Bg(t);return n&&r&&i&&Ug(n,r)}(e)}catch(t){return!0}}var uf;const wm=(uf=globalThis.window)!=null&&uf.document?function(){if(typeof window=="undefined"||window.E2E||window.__talkjsE2E)return 16;const e={"":16,"🚶➡️":15.1,"🫨":15,"🫠":14,"😵💫":13.1,"🥲":13,"🧑🦰":12.1,"🥻":12,"🥰":11,"🤩":5,"👱♀️":4,"🤣":3,"👁️🗨️":2,"😀":1,"😐️":.7,"😃":.6};for(const[t,n]of Object.entries(e))if(km(t))return n}():0;class Lm{constructor(t,n){this.currentUser$=Ft(null),this.app$=Ft(null),this.appId$=Ft(null),this.extUserId$=Ft(null),this.hasTokenFetcher$=Ft(!1),this.authTokenState$=Ft("idle"),this.themeCustom$=Ft(hd({value:void 0})),this.device$=Ft({supportsEmojiPicker:!!wm,isMobile:typeof window!="undefined"&&/Mobi/i.test(window.navigator.userAgent)}),this.errors$=Ft({unknownUser:!1,wrongAppId:!1,serverError:!1}),this.locale$=Ft(()=>{var s,a;const r=this.extUserId$.get(),i=this.app$.appMetadata.defaultLocale.get(),o=this.currentUser$.locale.get();return(a=(s=r&&o)!=null?s:i)!=null?a:"en-US"}),this.translationData$=Ft(()=>function(r){const i=r.replace(/_/g,"-").toLowerCase(),o=Ld[i];if(o)return{strings:{...o.translation,locale:i},emojiPickerTranslationUrl:o.emojiPickerTranslationUrl,emojiDataUrl:o.emojiDataUrl};const s=i.slice(0,2),a=Ld[s];return a?{strings:{...a.translation,locale:s},emojiPickerTranslationUrl:a.emojiPickerTranslationUrl,emojiDataUrl:a.emojiDataUrl}:(tn.warn(`User locale '${r}' not supported; falling back to English.`),{strings:{...ui.translation,locale:"en-US"},emojiPickerTranslationUrl:ui.emojiPickerTranslationUrl,emojiDataUrl:ui.emojiDataUrl})}(this.locale$.get())),this.t$=Ft(()=>this.translationData$.strings.get()),yr(()=>{this.appId$.set(t),this.extUserId$.set(n)})}updateThemeCustom(t){this.themeCustom$.set(hd({value:t}))}}const Hg={canReplyToMessage:!1,canEditMessage:!1,canDeleteMessage:!1,canAddReaction:!1};class Pm extends Lm{constructor(t,n){super(t,n),this.type="ChatboxStore",this.messageSubscriptions={},this.readyForNewMessagesPromise=Promise.resolve(),this.newMessageMarker$=Ft(void 0),this.state$=Ft({loadingConversationId:null,currentConversationId:null,editor:{isEmpty:!0,isTyping:!1,atTextLimit:!1,characterCount:0,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0},referencedMessageId:null,editingMessageId:null,unknownConversations:{},conversations:{},messages:{},participants:{},typing:{},isUserConnected:{},ephemeralMessages:{},ephemeralMessageIdMapping:{},localFileBlobUrls:{},currentConversation:()=>{const r=this.state$.currentConversationId.get();return r&&this.state$.conversations.child(r).get()},userPermissions:()=>{const r=this.app$.role.general.get(),i=this.app$.role.permissions.get();return mt.defined(r),mt.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();mt.defined(r);const i=this.state$.userPermissions.get(),o={...Hg,...i},s={canReplyToMessage:zn(r.messages.reply,!0),canEditMessage:zn(r.messages.edit,!0),canDeleteMessage:zn(r.messages.delete,!0),canAddReaction:zn(r.messages.emojiReactions,!0),...i},a={...s,canEditMessage:!1},l={canReplyToMessage:zn(r.messages.reply,!1),canEditMessage:zn(r.messages.edit,!1),canDeleteMessage:zn(r.messages.delete,!1),canAddReaction:zn(r.messages.emojiReactions,!1),...i};return{system:o,own:s,ownWithoutEditing:a,other:l,otherWithoutEditing:{...l,canEditMessage:!1}}}}),this.referencedMessage$=Ft(()=>{const r=this.state$.currentConversationId.get(),i=this.state$.referencedMessageId.get();return r&&i?this.state$.messages.child(r).lookup.child(i).get():null}),this.chatItems$=Ft(()=>{var f,m,E;const r=this.state$.currentConversationId.get();if(!r)return[];const i=(f=this.newMessageMarker$.get())!=null?f:1/0,o=(m=this.state$.messages.child(r).state.get())!=null?m:[],s=Object.values((E=this.state$.ephemeralMessages.child(r).get())!=null?E:{}),a=s.length===0?o:s.concat(o).sort((A,_)=>_.createdAt-A.createdAt),l=a.map(A=>{const _=A.content[0],g=_==null?void 0:_.type;if(!_||g!=="file")return A;const D=_.size+","+_.filename,S=this.state$.localFileBlobUrls.child(r).child(D).url.get();return S?{...A,content:[{..._,url:S}]}:A});let c=null,u=0,h=!1;const d=[];for(const A of l){const _=new Date(A.createdAt),g=new Date(_).setHours(0,0,0,0),D=u&&g!==u,S=_.getTime()>i,I=!(!h||S||c!=null&&c.id.startsWith("ephemeral"));(I||D)&&d.push(new cs({id:"border-before-"+A.id,isDayMarker:!!D,isReadMarker:!!I,timestamp:D?u:void 0})),d.push(A),h=S,u=g,c=A}const p=this.extUserId$.peek();return function(A,_){const g=[];let D=[];const S=Symbol("NO_KEY");let I=S;for(const T of A){const C=_(T);I===S||I===C?D.push(T):(g.push(D),D=[T]),I=C}return D.length!==0&&g.push(D),g}(d,A=>{var _;return A instanceof cs?A.id:(_=A.sender)==null?void 0:_.id}).map(A=>{var g;const _=A[A.length-1];return{items:A,id:_.id,type:_ instanceof cs?"divider":_.sender?((g=_.sender)==null?void 0:g.id)===p?"own":"other":"system"}})})}storeTyping(t,n){this.state$.typing.child(t).set(n)}messagePermissions$(t){const n=this.currentUser$.get();if(!n)throw new Error("Unreachable");const r=t.content[0];return t.sender?n.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}canRenderUi(t){const n=this.app$.get(),r=this.currentUser$.get();if(t===null)return!!(n&&r);const i=this.state$.conversations.child(t).get(),o=this.state$.participants.child(t).get();return!!(n&&r&&i&&o)}storeMessages(t,n,r){yr(()=>{var a;const i=n.reduce((l,c)=>(l[c.id]=c,l),{}),o=this.extUserId$.peek();mt(o),this.state$.messages.child(t).set({state:n,lookup:i,loadedAll:r});const s=this.state$.ephemeralMessages.child(t);for(const l of n){const c=this.state$.ephemeralMessageIdMapping.child(t).child(l.id).peek();c&&s.child(c).delete();const u=l.content[0];if(((a=l.sender)==null?void 0:a.id)!==o||u.type!=="file")continue;const h=u.size+","+u.filename,d=this.state$.localFileBlobUrls.child(t).child(h);if(d.fetching.peek()!==!1)continue;const p=()=>{URL.revokeObjectURL(d.url.peek()),d.delete()};if(u.subtype==="image"){d.fetching.set(!0);const f=document.createElement("img");f.addEventListener("load",p,{once:!0}),f.src=u.url}else if(u.subtype==="video"){d.fetching.set(!0);const f=document.createElement("video");f.addEventListener("loadeddata",p,{once:!0}),f.src=u.url}else if(u.subtype==="audio"||u.subtype==="voice"){d.fetching.set(!0);const f=document.createElement("audio");f.addEventListener("loadeddata",p,{once:!0}),f.src=u.url}}})}}function zn(e,t){return e==="all"||e==="own"&&t||e==="other"&&!t}class cs{constructor({id:t,isDayMarker:n,isReadMarker:r,timestamp:i}){this.id=t,this.isDayMarker=n,this.isReadMarker=r,this.timestamp=n?i:void 0}}function dn(e,t=!1){return function(n,r=!1){return n.map(i=>{if(typeof i=="string")return i;switch(i.type){case"bold":return"*"+dn(i.children)+"*";case"italic":return"_"+dn(i.children)+"_";case"strikethrough":return"~"+dn(i.children)+"~";case"blockquote":return dn(i.children).split(`
|
|
2
2
|
`).map(o=>"> "+o).join(`
|
|
3
3
|
`)+`
|
|
4
4
|
`;case"autolink":case"autoLink":case"suppressed":case"emoji":return i.text;case"codeblock":case"codeBlock":return"```"+i.language+`
|
|
5
|
-
`+i.text+"```";case"codespan":case"codeSpan":return"```"+i.text+"```";case"mention":return r?`<!!mention:${i.id}|${i.text}>`:`@${i.text}`;case"customemoji":case"customEmoji":return r?`<!!customemoji:${i.text}>`:i.text;case"link":return`<${i.url}|${
|
|
6
|
-
`+
|
|
7
|
-
`}}).join("")}(e,t).trim()}class bd{constructor(t,n,r,i,o,s){this.send=n,this.attachFile=r,this.shareLocation=i,this.toggleEmojiPicker=o,this.recordVoiceMessage=s,this.isEmpty=t.isEmpty,this.isTyping=t.isTyping,this.atTextLimit=t.atTextLimit,this.characterCount=t.characterCount,this.showEmojiPicker=t.showEmojiPicker}}function ne(e){this.content=e}function bm(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i!=o){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=bm(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}else n+=i.nodeSize}}function km(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=e.child(--i),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let c=km(s.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}else n-=l,r-=l}}ne.prototype={constructor:ne,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new ne(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new ne(n)},addToStart:function(e,t){return new ne([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new ne(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new ne(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=ne.from(e)).size?new ne(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=ne.from(e)).size?new ne(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=ne.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},ne.from=function(e){if(e instanceof ne)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ne(t)};class Y{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],c=a+l.nodeSize;if(c>t&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,n-u),r,i+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",s=!0;return this.nodesBetween(t,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new Y(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>t&&((s<t||l>n)&&(a=a.isText?a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new Y(r,i)}cutByIndex(t,n){return t==n?Y.empty:t==0&&n==this.content.length?this:new Y(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new Y(i,o)}addToStart(t){return new Y([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Y(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return bm(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return km(this,t,n,r)}findIndex(t){if(t==0)return Xo(0,t);if(t==this.size)return Xo(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=t)return i==t?Xo(n+1,i):Xo(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Y.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Y(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Y.empty;let n,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)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new Y(n||t,r)}static from(t){if(!t)return Y.empty;if(t instanceof Y)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Y([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Y.empty=new Y([],0);const Pa={index:0,offset:0};function Xo(e,t){return Pa.index=e,Pa.offset=t,Pa}function ys(e,t){if(e===t)return!0;if(!e||typeof e!="object"||!t||typeof t!="object")return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!ys(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!ys(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class At{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,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))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&ys(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return At.none;if(t instanceof At)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}At.none=[];class Cs extends Error{}class J{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Lm(this.content,t+this.openStart,n);return r&&new J(r,this.openStart,this.openEnd)}removeBetween(t,n){return new J(wm(this.content,t+this.openStart,n+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,n){if(!n)return J.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new J(Y.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new J(t,r,i)}}function wm(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||o.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(wm(o.content,t-i-1,n-i-1)))}function Lm(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),s=e.maybeChild(i);if(o==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=Lm(s.content,t-o-1,n,s);return a&&e.replaceChild(i,s.copy(a))}function Pg(e,t,n){if(n.openStart>e.depth)throw new Cs("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Cs("Inconsistent open depths");return Pm(e,t,n,0)}function Pm(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=Pm(e,t,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:s,end:a}=function(l,c){let u=c.depth-l.openStart,h=c.node(u).copy(l.content);for(let d=u-1;d>=0;d--)h=c.node(d).copy(Y.from(h));return{start:h.resolveNoCache(l.openStart+u),end:h.resolveNoCache(h.content.size-l.openEnd-u)}}(n,e);return Ir(o,xm(e,s,a,t,r))}{let s=e.parent,a=s.content;return Ir(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}}return Ir(o,Ns(e,t,r))}function Mm(e,t){if(!t.type.compatibleContent(e.type))throw new Cs("Cannot join "+t.type.name+" onto "+e.type.name)}function Ul(e,t,n){let r=e.node(n);return Mm(r,t.node(n)),r}function Rr(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function to(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(Rr(e.nodeAfter,r),o++));for(let a=o;a<s;a++)Rr(i.child(a),r);t&&t.depth==n&&t.textOffset&&Rr(t.nodeBefore,r)}function Ir(e,t){return e.type.checkContent(t),e.copy(t)}function xm(e,t,n,r,i){let o=e.depth>i&&Ul(e,t,i+1),s=r.depth>i&&Ul(n,r,i+1),a=[];return to(null,e,i,a),o&&s&&t.index(i)==n.index(i)?(Mm(o,s),Rr(Ir(o,xm(e,t,n,r,i+1)),a)):(o&&Rr(Ir(o,Ns(e,t,i+1)),a),to(t,n,i,a),s&&Rr(Ir(s,Ns(n,r,i+1)),a)),to(r,null,i,a),new Y(a)}function Ns(e,t,n){let r=[];return to(null,e,n,r),e.depth>n&&Rr(Ir(Ul(e,t,n+1),Ns(e,t,n+1)),r),to(t,null,n,r),new Y(r)}J.empty=new J(Y.empty,0,0);class fo{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.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,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[3*n],i=n==0?0:this.path[3*n-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return At.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive!==!1||i&&o[s].isInSet(i.marks)||(o=o[s--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.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 n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){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)&&(!n||n(this.node(r))))return new Fg(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 n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new fo(n,r,o)}static resolveCached(t,n){let r=kd.get(t);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else kd.set(t,r=new Mg);let i=r.elts[r.i]=fo.resolve(t,n);return r.i=(r.i+1)%xg,i}}class Mg{constructor(){this.elts=[],this.i=0}}const xg=12,kd=new WeakMap;class Fg{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Bg=Object.create(null);let yr=class Hl{constructor(t,n,r,i=At.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||Y.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,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,n,r,i){return this.content.textBetween(t,n,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,n,r){return this.type==t&&ys(this.attrs,n||t.defaultAttrs||Bg)&&At.sameSet(this.marks,r||At.none)}copy(t=null){return t==this.content?this:new Hl(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new Hl(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return J.empty;let i=this.resolve(t),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,o.pos-a);return new J(l,i.depth-s,o.depth-s)}replace(t,n,r){return Pg(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return fo.resolveCached(this,t)}resolveNoCache(t){return fo.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),Fm(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=Y.empty,i=0,o=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),s=o&&o.matchFragment(this.content,n);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),this.type.checkAttrs(this.attrs);let t=At.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!At.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n 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(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=Y.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};yr.prototype.text=void 0;class bs extends yr{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Fm(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new bs(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new bs(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function Fm(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class wr{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Ug(t,n);if(r.next==null)return wr.empty;let i=Bm(r);r.next&&r.err("Unexpected trailing text");let o=function(s){let a=Object.create(null);return l(Ld(s,0));function l(c){let u=[];c.forEach(d=>{s[d].forEach(({term:p,to:f})=>{if(!p)return;let m;for(let E=0;E<u.length;E++)u[E][0]==p&&(m=u[E][1]);Ld(s,f).forEach(E=>{m||u.push([p,m=[]]),m.indexOf(E)==-1&&m.push(E)})})});let h=a[c.join(",")]=new wr(c.indexOf(s.length-1)>-1);for(let d=0;d<u.length;d++){let p=u[d][1].sort(Um);h.next.push({type:u[d][0],next:a[p.join(",")]||l(p)})}return h}}(function(s){let a=[[]];return u(h(s,0),l()),a;function l(){return a.push([])-1}function c(d,p,f){let m={term:f,to:p};return a[d].push(m),m}function u(d,p){d.forEach(f=>f.to=p)}function h(d,p){if(d.type=="choice")return d.exprs.reduce((f,m)=>f.concat(h(m,p)),[]);if(d.type!="seq"){if(d.type=="star"){let f=l();return c(p,f),u(h(d.expr,f),f),[c(f)]}if(d.type=="plus"){let f=l();return u(h(d.expr,p),f),u(h(d.expr,f),f),[c(f)]}if(d.type=="opt")return[c(p)].concat(h(d.expr,p));if(d.type=="range"){let f=p;for(let m=0;m<d.min;m++){let E=l();u(h(d.expr,f),E),f=E}if(d.max==-1)u(h(d.expr,f),f);else for(let m=d.min;m<d.max;m++){let E=l();c(f,E),u(h(d.expr,f),E),f=E}return[c(f)]}if(d.type=="name")return[c(p,void 0,d.value)];throw new Error("Unknown expr type")}for(let f=0;;f++){let m=h(d.exprs[f],p);if(f==d.exprs.length-1)return m;u(m,p=l())}}}(i));return function(s,a){for(let l=0,c=[s];l<c.length;l++){let u=c[l],h=!u.validEnd,d=[];for(let p=0;p<u.next.length;p++){let{type:f,next:m}=u.next[p];d.push(f.name),!h||f.isText||f.hasRequiredAttrs()||(h=!1),c.indexOf(m)==-1&&c.push(m)}h&&a.err("Only non-generatable nodes ("+d.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;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:n}=this.next[t];if(!n.isText&&!n.hasRequiredAttrs())return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];return function o(s,a){let l=s.matchFragment(t,r);if(l&&(!n||l.validEnd))return Y.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:h}=s.next[c];if(!u.isText&&!u.hasRequiredAttrs()&&i.indexOf(h)==-1){i.push(h);let d=o(h,a.concat(u));if(d)return d}}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 n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(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 n||i.type&&!l.validEnd||(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(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 n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}(this),t.map((n,r)=>{let i=r+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)i+=(o?", ":"")+n.next[o].type.name+"->"+t.indexOf(n.next[o].next);return i}).join(`
|
|
8
|
-
`)}}wr.empty=new wr(!0);class Ug{constructor(t,n){this.string=t,this.nodeTypes=n,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(e){let t=[];do t.push(Hg(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function Hg(e){let t=[];do t.push(jg(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function jg(e){let t=function(n){if(n.eat("(")){let r=Bm(n);return n.eat(")")||n.err("Missing closing paren"),r}if(!/\W/.test(n.next)){let r=function(i,o){let s=i.nodeTypes,a=s[o];if(a)return[a];let l=[];for(let c in s){let u=s[c];u.isInGroup(o)&&l.push(u)}return l.length==0&&i.err("No node type or group '"+o+"' found"),l}(n,n.next).map(i=>(n.inline==null?n.inline=i.isInline:n.inline!=i.isInline&&n.err("Mixing inline and block content"),{type:"name",value:i}));return n.pos++,r.length==1?r[0]:{type:"choice",exprs:r}}n.err("Unexpected token '"+n.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=$g(e,t)}return t}function wd(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function $g(e,t){let n=wd(e),r=n;return e.eat(",")&&(r=e.next!="}"?wd(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function Um(e,t){return t-e}function Ld(e,t){let n=[];return function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];a||n.indexOf(l)!=-1||r(l)}}(t),n.sort(Um)}function Hm(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function jm(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}n[r]=i}return n}function $m(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let o=e[i];o.validate&&o.validate(t[i])}}function Vm(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new Vg(e,r,t[r]);return n}let Pd=class zm{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Vm(t,r.attrs),this.defaultAttrs=Hm(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==wr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:jm(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new yr(this,this.computeAttrs(t),Y.from(n),At.setFrom(r))}createChecked(t=null,n,r){return n=Y.from(n),this.checkContent(n),new yr(this,this.computeAttrs(t),n,At.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),(n=Y.from(n)).size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(Y.empty,!0);return o?new yr(this,t,n.append(o),At.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.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)}`)}checkAttrs(t){$m(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:At.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,s)=>r[o]=new zm(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class Vg{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?function(i,o,s){let a=s.split("|");return l=>{let c=l===null?"null":typeof l;if(a.indexOf(c)<0)throw new RangeError(`Expected value of type ${a} for attribute ${o} on type ${i}, got ${c}`)}}(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class sa{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=Vm(t,i.attrs),this.excluded=null;let o=Hm(this.attrs);this.instance=o?new At(this,o):null}create(t=null){return!t&&this.instance?this.instance:new At(this,jm(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,s)=>r[o]=new sa(o,i++,n,s)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){$m(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}function Md(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],s=o;if(o)n.push(o);else for(let a in e.marks){let l=e.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class mo{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(function(o){return o.tag!=null}(i))this.tags.push(i);else if(function(o){return o.style!=null}(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=t.nodes[i.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new Bd(this,n,!1);return r.addAll(t,At.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Bd(this,n,!0);return r.addAll(t,At.none,n.from,n.to),J.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(Yg(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(t);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(t,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!r.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=Ud(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=Ud(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new mo(t,mo.schemaRules(t)))}}const Ym={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},zg={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},xd={ol:!0,ul:!0};function Fd(e,t,n){return t!=null?(t?1:0)|(t==="full"?2:0):e&&e.whitespace=="pre"?3:-5&n}class Ma{constructor(t,n,r,i,o,s){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=At.none,this.match=o||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Y.from(t));if(!n){let r,i=this.type.contentMatch;return(r=i.findWrapping(t.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(n)}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 n=Y.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Y.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!Ym.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Bd{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i,o=n.topNode,s=Fd(null,n.preserveWhitespace,0)|(r?4:0);i=o?new Ma(o.type,o.attrs,At.none,!0,n.topMatch||o.type.contentMatch,s):new Ma(r?null:t.schema.topNodeType,null,At.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top,o=2&i.options?"full":this.localPreserveWS||(1&i.options)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
9
|
-
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=t.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,o=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s,a=t.nodeName.toLowerCase();
|
|
10
|
-
`),n)}ignoreFallback(t,n){t.nodeName!="BR"||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(n=l.clearMark?n.filter(c=>!l.clearMark(c)):n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming!==!1)break;a=l}}return n}addElementByRule(t,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}o&&this.sync(a)&&this.open--}addAll(t,n,r,i){let o=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(s,n);this.findAtPoint(t,o)}findPlace(t,n,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],c=l.findWrapping(t);if(c&&(!i||i.length>c.length+a)&&(i=c,o=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(t,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(t.type));let s=At.none;for(let a of i.concat(t.marks))(o.type?o.type.allowsMarkType(a.type):Hd(a.type,t.type))&&(s=a.addToSet(s));return o.content.push(t.mark(s)),!0}return!1}enter(t,n,r,i){let o=this.findPlace(t.create(n),r,!1);return o&&(o=this.enterInner(t,n,r,!0,i)),o}enterInner(t,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=Fd(t,o,s.options);4&s.options&&s.content.length==0&&(a|=4);let l=At.none;return r=r.filter(c=>!(s.type?s.type.allowsMarkType(c.type):Hd(c.type,t))||(l=c.addToSet(l),!1)),this.nodes.push(new Ma(t,n,l,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(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 n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=1)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&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)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=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 c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Yg(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Ud(e){let t={};for(let n in e)t[n]=e[n];return t}function Hd(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==t||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}class wi{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=xa(n).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 c=s.marks[l];if(this.marks[c.type.name]){if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}else l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],u=this.serializeMark(c,s.isInline,n);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=ls(xa(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&ls(xa(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return ls(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new wi(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=jd(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return jd(t.marks)}}function jd(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function xa(e){return e.document||window.document}const $d=new WeakMap;function Gg(e){let t=$d.get(e);return t===void 0&&$d.set(e,t=function(n){let r=null;function i(o){if(o&&typeof o=="object")if(Array.isArray(o))if(typeof o[0]=="string")r||(r=[]),r.push(o);else for(let s=0;s<o.length;s++)i(o[s]);else for(let s in o)i(o[s])}return i(n),r}(e)),t}function ls(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i,o=t[0];if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Gg(r))&&i.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s,a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let l=n?e.createElementNS(n,o):e.createElement(o),c=t[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let h in c)if(c[h]!=null){let d=h.indexOf(" ");d>0?l.setAttributeNS(h.slice(0,d),h.slice(d+1),c[h]):h=="style"&&l.style?l.style.cssText=c[h]:l.setAttribute(h,c[h])}}for(let h=u;h<t.length;h++){let d=t[h];if(d===0){if(h<t.length-1||h>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:p,contentDOM:f}=ls(e,d,n,r);if(l.appendChild(p),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:l,contentDOM:s}}const Gm=Math.pow(2,16);function Wg(e,t){return e+t*Gm}function Vd(e){return 65535&e}class jl{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class xe{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&xe.empty)return xe.empty}recover(t){let n=0,r=Vd(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+n+function(i){return(i-(65535&i))/Gm}(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>t)break;let c=this.ranges[a+o],u=this.ranges[a+s],h=l+c;if(t<=h){let d=l+i+((c?t==l?-1:t==h?1:n:n)<0?0:u);if(r)return d;let p=t==(n<0?l:h)?null:Wg(a/3,t-l),f=t==l?2:t==h?1:4;return(n<0?t!=l:t!=h)&&(f|=8),new jl(d,f,p)}i+=u-c}return r?t+i:new jl(t+i,0,null)}touches(t,n){let r=0,i=Vd(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>t)break;let c=this.ranges[a+o];if(t<=l+c&&a==3*i)return!0;r+=this.ranges[a+s]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+n],u=this.ranges[i+r];t(a,a+c,l,l+u),o+=u-c}}invert(){return new xe(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?xe.empty:new xe(t<0?[0,-t,0]:[0,0,t])}}xe.empty=new xe([]);class Eo{constructor(t,n,r=0,i=t?t.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new Eo(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let i=t.getMirror(n);this.appendMap(t._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Eo;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o].mapResult(t,n);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 Fa=Object.create(null);class de{getMap(){return xe.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Fa[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Fa)throw new RangeError("Duplicate use of step JSON ID "+t);return Fa[t]=n,n.prototype.jsonID=t,n}}class zt{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new zt(t,null)}static fail(t){return new zt(null,t)}static fromReplace(t,n,r,i){try{return zt.ok(t.replace(n,r,i))}catch(o){if(o instanceof Cs)return zt.fail(o.message);throw o}}}function Zu(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(Zu(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return Y.fromArray(r)}class qn extends de{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new J(Zu(n.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),n.openStart,n.openEnd);return zt.fromReplace(t,this.from,this.to,o)}invert(){return new hn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new qn(n.pos,r.pos,this.mark)}merge(t){return t instanceof qn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new qn(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new qn(n.from,n.to,t.markFromJSON(n.mark))}}de.jsonID("addMark",qn);class hn extends de{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new J(Zu(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return zt.fromReplace(t,this.from,this.to,r)}invert(){return new qn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new hn(n.pos,r.pos,this.mark)}merge(t){return t instanceof hn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new hn(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new hn(n.from,n.to,t.markFromJSON(n.mark))}}de.jsonID("removeMark",hn);class Jn extends de{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return zt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return zt.fromReplace(t,this.pos,this.pos+1,new J(Y.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Jn(this.pos,n.marks[i]);return new Jn(this.pos,this.mark)}}return new Lr(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Jn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Jn(n.pos,t.markFromJSON(n.mark))}}de.jsonID("addNodeMark",Jn);class Lr extends de{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return zt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return zt.fromReplace(t,this.pos,this.pos+1,new J(Y.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new Jn(this.pos,this.mark):this}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Lr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Lr(n.pos,t.markFromJSON(n.mark))}}de.jsonID("removeNodeMark",Lr);class ie extends de{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&$l(t,this.from,this.to)?zt.fail("Structure replace would overwrite content"):zt.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new xe([this.from,this.to-this.from,this.slice.size])}invert(t){return new ie(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new ie(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(t){if(!(t instanceof ie)||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 n=this.slice.size+t.slice.size==0?J.empty:new J(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new ie(t.from,this.to,n,this.structure)}}{let n=this.slice.size+t.slice.size==0?J.empty:new J(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new ie(this.from,this.to+(t.to-t.from),n,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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new ie(n.from,n.to,J.fromJSON(t,n.slice),!!n.structure)}}de.jsonID("replace",ie);class Fe extends de{constructor(t,n,r,i,o,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&($l(t,this.from,this.gapFrom)||$l(t,this.gapTo,this.to)))return zt.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return zt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?zt.fromReplace(t,this.from,this.to,r):zt.fail("Content does not fit in gap")}getMap(){return new xe([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new Fe(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new Fe(n.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,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new Fe(n.from,n.to,n.gapFrom,n.gapTo,J.fromJSON(t,n.slice),n.insert,!!n.structure)}}function $l(e,t,n){let r=e.resolve(t),i=n-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 Ba(e,t,n,r=n.contentMatch,i=!0){let o=e.doc.nodeAt(t),s=[],a=t+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,h=r.matchType(c.type);if(h){r=h;for(let d=0;d<c.marks.length;d++)n.allowsMarkType(c.marks[d].type)||e.step(new hn(a,u,c.marks[d]));if(i&&c.isText&&n.whitespace!="pre"){let d,p,f=/\r?\n|\r/g;for(;d=f.exec(c.text);)p||(p=new J(Y.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new ie(a+d.index,a+d.index+d[0].length,p))}}else s.push(new ie(a,u,J.empty));a=u}if(!r.validEnd){let l=r.fillBefore(Y.empty,!0);e.replace(a,a,new J(l,0,0))}for(let l=s.length-1;l>=0;l--)e.step(s[l])}function Xg(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function Qu(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let o=e.$from.node(n),s=e.$from.index(n)+r,a=e.$to.indexAfter(n)-i;if(n<e.depth&&o.canReplace(s,a,t))return n;if(n==0||o.type.spec.isolating||!Xg(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function zd(e,t,n,r){t.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=e.mapping.slice(r).map(n+1+o+s.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function Yd(e,t,n,r){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+o);e.replaceWith(s,s+1,t.type.schema.text(`
|
|
11
|
-
`))}})}function us(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=n-2;c>o;c--,u--){let h=i.node(c),d=i.index(c);if(h.type.spec.isolating)return!1;let p=h.content.cutByIndex(d,h.childCount),f=r&&r[u+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let m=r&&r[u]||h;if(!h.canReplace(d+1,h.childCount)||!m.type.validContent(p))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function Gd(e,t){let n=e.resolve(t),r=n.index();return function(i,o){return!(!i||!o||i.isLeaf||!function(s,a){a.content.size||s.type.compatibleContent(a.type);let l=s.contentMatchAt(s.childCount),{linebreakReplacement:c}=s.type.schema;for(let u=0;u<a.childCount;u++){let h=a.child(u),d=h.type==c?s.type.schema.nodes.text:h.type;if(l=l.matchType(d),!l||!s.type.allowsMarks(h.marks))return!1}return l.validEnd}(i,o))}(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function tc(e,t,n=t,r=J.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return Wm(i,o,r)?new ie(t,n,r):new Kg(i,o,r).fit()}function Wm(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}de.jsonID("replaceAround",Fe);class Kg{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Y.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=Y.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=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 J(o,s,a);return t>-1?new Fe(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new ie(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=Ua(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:c,match:u}=this.frontier[a],h=null;if(n==1&&(s?u.matchType(s.type)||(h=u.fillBefore(Y.from(s),!1)):o&&c.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:h};if(n==2&&s&&(l=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:l};if(o&&u.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Ua(t,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new J(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=Ua(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new J(Vi(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new J(Vi(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-t,c=0,u=[],{match:h,type:d}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)u.push(i.child(m));h=h.matchFragment(i)}let p=a.size+t-(s.content.size-s.openEnd);for(;c<a.childCount;){let m=a.child(c),E=h.matchType(m.type);if(!E)break;c++,(c>1||l==0||m.content.size)&&(h=E,u.push(Xm(m.mark(d.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?p:-1)))}let f=c==a.childCount;f||(p=-1),this.placed=zi(this.placed,n,Y.from(u)),this.frontier[n].match=h,f&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,E=a;m<p;m++){let A=E.lastChild;this.frontier.push({type:A.type,match:A.contentMatchAt(A.childCount)}),E=A.content}this.unplaced=f?t==0?J.empty:new J(Vi(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new J(Vi(s.content,t,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,n=this.frontier[this.depth];if(!n.type.isTextblock||!Ha(this.$to,this.$to.depth,n.type,n.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 n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=Ha(t,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=Ha(t,a,c,l,!0);if(!u||u.childCount)continue t}return{depth:n,fit:s,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=zi(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.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,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=zi(this.placed,this.depth,Y.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(Y.empty,!0);t.childCount&&(this.placed=zi(this.placed,this.frontier.length,t))}}function Vi(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Vi(e.firstChild.content,t-1,n)))}function zi(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(zi(e.lastChild.content,t-1,n)))}function Ua(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Xm(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Xm(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Y.empty,!0)))),e.copy(r)}function Ha(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(l,c,u){for(let h=u;h<c.childCount;h++)if(!l.allowsMarks(c.child(h).marks))return!0;return!1}(n,o.content,s)?a:null}function qg(e){return e.spec.defining||e.spec.definingForContent}function Km(e,t,n,r,i){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(Km(o.content,t+1,n,r,o)))}if(t>r){let o=i.contentMatchAt(0),s=o.fillBefore(e).append(e);e=s.append(o.matchFragment(s).fillBefore(Y.empty,!0))}return e}function Wd(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let i=e.start(r);if(i<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(i==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==i-1)&&n.push(r)}return n}class ai extends de{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return zt.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return zt.fromReplace(t,this.pos,this.pos+1,new J(Y.from(i),0,n.isLeaf?0:1))}getMap(){return xe.empty}invert(t){return new ai(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new ai(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new ai(n.pos,n.attr,n.value)}}de.jsonID("attr",ai);class _o extends de{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return zt.ok(r)}getMap(){return xe.empty}invert(t){return new _o(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new _o(n.attr,n.value)}}de.jsonID("docAttr",_o);let Yi=class extends Error{};Yi=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(Yi.prototype=Object.create(Error.prototype)).constructor=Yi,Yi.prototype.name="TransformError";class Jg{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Eo}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Yi(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=J.empty){let i=tc(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new J(Y.from(r),0,0))}delete(t,n){return this.replace(t,n,J.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return function(i,o,s,a){if(!a.size)return i.deleteRange(o,s);let l=i.doc.resolve(o),c=i.doc.resolve(s);if(Wm(l,c,a))return i.step(new ie(o,s,a));let u=Wd(l,c);u[u.length-1]==0&&u.pop();let h=-(l.depth+1);u.unshift(h);for(let E=l.depth,A=l.pos-1;E>0;E--,A--){let _=l.node(E).type.spec;if(_.defining||_.definingAsContext||_.isolating)break;u.indexOf(E)>-1?h=E:l.before(E)==A&&u.splice(1,0,-E)}let d=u.indexOf(h),p=[],f=a.openStart;for(let E=a.content,A=0;;A++){let _=E.firstChild;if(p.push(_),A==a.openStart)break;E=_.content}for(let E=f-1;E>=0;E--){let A=p[E],_=qg(A.type);if(_&&!A.sameMarkup(l.node(Math.abs(h)-1)))f=E;else if(_||!A.type.isTextblock)break}for(let E=a.openStart;E>=0;E--){let A=(E+f+1)%(a.openStart+1),_=p[A];if(_)for(let g=0;g<u.length;g++){let v=u[(g+d)%u.length],S=!0;v<0&&(S=!1,v=-v);let I=l.node(v-1),R=l.index(v-1);if(I.canReplaceWith(R,R,_.type,_.marks))return i.replace(l.before(v),S?c.after(v):s,new J(Km(a.content,0,a.openStart,A),A,a.openEnd))}}let m=i.steps.length;for(let E=u.length-1;E>=0&&(i.replace(o,s,a),!(i.steps.length>m));E--){let A=u[E];A<0||(o=l.before(A),s=c.after(A))}}(this,t,n,r),this}replaceRangeWith(t,n,r){return function(i,o,s,a){if(!a.isInline&&o==s&&i.doc.resolve(o).parent.content.size){let l=function(c,u,h){let d=c.resolve(u);if(d.parent.canReplaceWith(d.index(),d.index(),h))return u;if(d.parentOffset==0)for(let p=d.depth-1;p>=0;p--){let f=d.index(p);if(d.node(p).canReplaceWith(f,f,h))return d.before(p+1);if(f>0)return null}if(d.parentOffset==d.parent.content.size)for(let p=d.depth-1;p>=0;p--){let f=d.indexAfter(p);if(d.node(p).canReplaceWith(f,f,h))return d.after(p+1);if(f<d.node(p).childCount)return null}return null}(i.doc,o,a.type);l!=null&&(o=s=l)}i.replaceRange(o,s,new J(Y.from(a),0,0))}(this,t,n,r),this}deleteRange(t,n){return function(r,i,o){let s=r.doc.resolve(i),a=r.doc.resolve(o),l=Wd(s,a);for(let c=0;c<l.length;c++){let u=l[c],h=c==l.length-1;if(h&&u==0||s.node(u).type.contentMatch.validEnd)return r.delete(s.start(u),a.end(u));if(u>0&&(h||s.node(u-1).canReplace(s.index(u-1),a.indexAfter(u-1))))return r.delete(s.before(u),a.after(u))}for(let c=1;c<=s.depth&&c<=a.depth;c++)if(i-s.start(c)==s.depth-c&&o>s.end(c)&&a.end(c)-o!=a.depth-c&&s.start(c-1)==a.start(c-1)&&s.node(c-1).canReplace(s.index(c-1),a.index(c-1)))return r.delete(s.before(c),o);r.delete(i,o)}(this,t,n),this}lift(t,n){return function(r,i,o){let{$from:s,$to:a,depth:l}=i,c=s.before(l+1),u=a.after(l+1),h=c,d=u,p=Y.empty,f=0;for(let A=l,_=!1;A>o;A--)_||s.index(A)>0?(_=!0,p=Y.from(s.node(A).copy(p)),f++):h--;let m=Y.empty,E=0;for(let A=l,_=!1;A>o;A--)_||a.after(A+1)<a.end(A)?(_=!0,m=Y.from(a.node(A).copy(m)),E++):d++;r.step(new Fe(h,d,c,u,new J(p.append(m),f,E),p.size-f,!0))}(this,t,n),this}join(t,n=1){return function(r,i,o){let s=null,{linebreakReplacement:a}=r.doc.type.schema,l=r.doc.resolve(i-o),c=l.node().type;if(a&&c.inlineContent){let p=c.whitespace=="pre",f=!!c.contentMatch.matchType(a);p&&!f?s=!1:!p&&f&&(s=!0)}let u=r.steps.length;if(s===!1){let p=r.doc.resolve(i+o);Yd(r,p.node(),p.before(),u)}c.inlineContent&&Ba(r,i+o-1,c,l.node().contentMatchAt(l.index()),s==null);let h=r.mapping.slice(u),d=h.map(i-o);if(r.step(new ie(d,h.map(i+o,-1),J.empty,!0)),s===!0){let p=r.doc.resolve(d);zd(r,p.node(),p.before(),r.steps.length)}}(this,t,n),this}wrap(t,n){return function(r,i,o){let s=Y.empty;for(let c=o.length-1;c>=0;c--){if(s.size){let u=o[c].type.contentMatch.matchFragment(s);if(!u||!u.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}s=Y.from(o[c].type.create(o[c].attrs,s))}let a=i.start,l=i.end;r.step(new Fe(a,l,a,l,new J(s,0,0),o.length,!0))}(this,t,n),this}setBlockType(t,n=t,r,i=null){return function(o,s,a,l,c){if(!l.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let u=o.steps.length;o.doc.nodesBetween(s,a,(h,d)=>{let p=typeof c=="function"?c(h):c;if(h.isTextblock&&!h.hasMarkup(l,p)&&function(f,m,E){let A=f.resolve(m),_=A.index();return A.parent.canReplaceWith(_,_+1,E)}(o.doc,o.mapping.slice(u).map(d),l)){let f=null;if(l.schema.linebreakReplacement){let _=l.whitespace=="pre",g=!!l.contentMatch.matchType(l.schema.linebreakReplacement);_&&!g?f=!1:!_&&g&&(f=!0)}f===!1&&Yd(o,h,d,u),Ba(o,o.mapping.slice(u).map(d,1),l,void 0,f===null);let m=o.mapping.slice(u),E=m.map(d,1),A=m.map(d+h.nodeSize,1);return o.step(new Fe(E,A,E+1,A-1,new J(Y.from(l.create(p,null,h.marks)),0,0),1,!0)),f===!0&&zd(o,h,d,u),!1}})}(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return function(o,s,a,l,c){let u=o.doc.nodeAt(s);if(!u)throw new RangeError("No node at given position");a||(a=u.type);let h=a.create(l,null,c||u.marks);if(u.isLeaf)return o.replaceWith(s,s+u.nodeSize,h);if(!a.validContent(u.content))throw new RangeError("Invalid content for node type "+a.name);o.step(new Fe(s,s+u.nodeSize,s+1,s+u.nodeSize-1,new J(Y.from(h),0,0),1,!0))}(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new ai(t,n,r)),this}setDocAttribute(t,n){return this.step(new _o(t,n)),this}addNodeMark(t,n){return this.step(new Jn(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof At)n.isInSet(r.marks)&&this.step(new Lr(t,n));else{let i,o=r.marks,s=[];for(;i=n.isInSet(o);)s.push(new Lr(t,i)),o=i.removeFromSet(o);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,r){return function(i,o,s=1,a){let l=i.doc.resolve(o),c=Y.empty,u=Y.empty;for(let h=l.depth,d=l.depth-s,p=s-1;h>d;h--,p--){c=Y.from(l.node(h).copy(c));let f=a&&a[p];u=Y.from(f?f.type.create(f.attrs,u):l.node(h).copy(u))}i.step(new ie(o,o,new J(c.append(u),s,s),!0))}(this,t,n,r),this}addMark(t,n,r){return function(i,o,s,a){let l,c,u=[],h=[];i.doc.nodesBetween(o,s,(d,p,f)=>{if(!d.isInline)return;let m=d.marks;if(!a.isInSet(m)&&f.type.allowsMarkType(a.type)){let E=Math.max(p,o),A=Math.min(p+d.nodeSize,s),_=a.addToSet(m);for(let g=0;g<m.length;g++)m[g].isInSet(_)||(l&&l.to==E&&l.mark.eq(m[g])?l.to=A:u.push(l=new hn(E,A,m[g])));c&&c.to==E?c.to=A:h.push(c=new qn(E,A,a))}}),u.forEach(d=>i.step(d)),h.forEach(d=>i.step(d))}(this,t,n,r),this}removeMark(t,n,r){return function(i,o,s,a){let l=[],c=0;i.doc.nodesBetween(o,s,(u,h)=>{if(!u.isInline)return;c++;let d=null;if(a instanceof sa){let p,f=u.marks;for(;p=a.isInSet(f);)(d||(d=[])).push(p),f=p.removeFromSet(f)}else a?a.isInSet(u.marks)&&(d=[a]):d=u.marks;if(d&&d.length){let p=Math.min(h+u.nodeSize,s);for(let f=0;f<d.length;f++){let m,E=d[f];for(let A=0;A<l.length;A++){let _=l[A];_.step==c-1&&E.eq(l[A].style)&&(m=_)}m?(m.to=p,m.step=c):l.push({style:E,from:Math.max(h,o),to:p,step:c})}}}),l.forEach(u=>i.step(new hn(u.from,u.to,u.style)))}(this,t,n,r),this}clearIncompatible(t,n,r){return Ba(this,t,n,r),this}}const ja=Object.create(null);class _t{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new Zg(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=J.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=t.mapping.slice(o);t.replaceRange(u.map(l.pos),u.map(c.pos),a?J.empty:n),a==0&&qd(t,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){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),c=l.map(s.pos),u=l.map(a.pos);o?t.deleteRange(c,u):(t.replaceRangeWith(c,u,n),qd(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new Et(t):Xr(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let o=t.depth-1;o>=0;o--){let s=n<0?Xr(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):Xr(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new je(t.node(0))}static atStart(t){return Xr(t,t,0,0,1)||new je(t)}static atEnd(t){return Xr(t,t,t.content.size,t.childCount,-1)||new je(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=ja[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in ja)throw new RangeError("Duplicate use of selection JSON ID "+t);return ja[t]=n,n.prototype.jsonID=t,n}getBookmark(){return Et.between(this.$anchor,this.$head).getBookmark()}}_t.prototype.visible=!0;class Zg{constructor(t,n){this.$from=t,this.$to=n}}let Xd=!1;function Kd(e){Xd||e.parent.inlineContent||(Xd=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class Et extends _t{constructor(t,n=t){Kd(t),Kd(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return _t.near(r);let i=t.resolve(n.map(this.anchor));return new Et(i.parent.inlineContent?i:r,r)}replace(t,n=J.empty){if(super.replace(t,n),n==J.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof Et&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new aa(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Et(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if(r&&!i||(r=i>=0?1:-1),!n.parent.inlineContent){let o=_t.findFrom(n,r,!0)||_t.findFrom(n,-r,!0);if(!o)return _t.near(n,r);n=o.$head}return t.parent.inlineContent||(i==0||(t=(_t.findFrom(t,-r,!0)||_t.findFrom(t,r,!0)).$anchor).pos<n.pos!=i<0)&&(t=n),new Et(t,n)}}_t.jsonID("text",Et);class aa{constructor(t,n){this.anchor=t,this.head=n}map(t){return new aa(t.map(this.anchor),t.map(this.head))}resolve(t){return Et.between(t.resolve(this.anchor),t.resolve(this.head))}}class nt extends _t{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=t.resolve(i);return r?_t.near(o):new nt(o)}content(){return new J(Y.from(this.node),0,0)}eq(t){return t instanceof nt&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new ec(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new nt(t.resolve(n.anchor))}static create(t,n){return new nt(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}nt.prototype.visible=!1,_t.jsonID("node",nt);class ec{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new aa(r,r):new ec(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&nt.isSelectable(r)?new nt(n):_t.near(n)}}class je extends _t{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=J.empty){if(n==J.empty){t.delete(0,t.doc.content.size);let r=_t.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new je(t)}map(t){return new je(t)}eq(t){return t instanceof je}getBookmark(){return Qg}}_t.jsonID("all",je);const Qg={map(){return this},resolve:e=>new je(e)};function Xr(e,t,n,r,i,o=!1){if(t.inlineContent)return Et.create(e,n);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&&nt.isSelectable(a))return nt.create(e,n-(i<0?a.nodeSize:0))}else{let l=Xr(e,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function qd(e,t,n){let r=e.steps.length-1;if(r<t)return;let i,o=e.steps[r];(o instanceof ie||o instanceof Fe)&&(e.mapping.maps[r].forEach((s,a,l,c)=>{i==null&&(i=c)}),e.setSelection(_t.near(e.doc.resolve(i),n)))}class tD extends Jg{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 At.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,n){super.addStep(t,n),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,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||At.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let i=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r==null?n:r,!t)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(t,o)),this.selection.empty||this.setSelection(_t.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,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 Jd(e,t){return t&&e?e.bind(t):e}class Gi{constructor(t,n,r){this.name=t,this.init=Jd(n.init,r),this.apply=Jd(n.apply,r)}}const eD=[new Gi("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new Gi("selection",{init:(e,t)=>e.selection||_t.atStart(t.doc),apply:e=>e.selection}),new Gi("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new Gi("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class $a{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=eD.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Gi(r.key,r.spec.state,r))})}}class ei{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,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[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,c=i?i[s].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",t),!i){i=[];for(let h=0;h<this.config.plugins.length;h++)i.push(h<s?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new ei(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(t,this[o.name],this,n)}return n}get tr(){return new tD(this)}static create(t){let n=new $a(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new ei(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(t,r);return r}reconfigure(t){let n=new $a(this.schema,t.plugins),r=n.fields,i=new ei(n);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 n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.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&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new $a(t.schema,t.plugins),o=new ei(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=yr.fromJSON(t.schema,n.doc);else if(s.name=="selection")o.selection=_t.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a))return void(o[s.name]=c.fromJSON.call(l,t,n[a],o))}o[s.name]=s.init(t,o)}}),o}}function qm(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=qm(i,t,{})),n[r]=i}return n}class la{constructor(t){this.spec=t,this.props={},t.props&&qm(t.props,this,this.props),this.key=t.key?t.key.key:Jm("plugin")}getState(t){return t[this.key]}}const Va=Object.create(null);function Jm(e){return e in Va?e+"$"+ ++Va[e]:(Va[e]=0,e+"$")}class ua{constructor(t="key"){this.key=Jm(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const oe=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Si=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let Vl=null;const Nn=function(e,t,n){let r=Vl||(Vl=document.createRange());return r.setEnd(e,n==null?e.nodeValue.length:n),r.setStart(e,t||0),r},Pr=function(e,t,n,r){return n&&(Zd(e,t,n,r,-1)||Zd(e,t,n,r,1))},nD=/^(img|br|input|textarea|hr)$/i;function Zd(e,t,n,r,i){for(var o;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Ge(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Ao(e)||nD.test(e.nodeName)||e.contentEditable=="false")return!1;t=oe(e)+(i<0?0:1),e=s}else{if(e.nodeType!=1)return!1;{let s=e.childNodes[t+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false"){if(!(!((o=s.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection))return!1;t+=i}else e=s,t=i<0?Ge(e):0}}}}function Ge(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Ao(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const ca=function(e){return e.focusNode&&Pr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function gr(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const An=typeof navigator!="undefined"?navigator:null,Qd=typeof document!="undefined"?document:null,ar=An&&An.userAgent||"",zl=/Edge\/(\d+)/.exec(ar),Zm=/MSIE \d/.exec(ar),Yl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ar),Ce=!!(Zm||Yl||zl),tr=Zm?document.documentMode:Yl?+Yl[1]:zl?+zl[1]:0,Ke=!Ce&&/gecko\/(\d+)/i.test(ar);Ke&&(/Firefox\/(\d+)/.exec(ar)||[0,0])[1];const Gl=!Ce&&/Chrome\/(\d+)/.exec(ar),Jt=!!Gl,Qm=Gl?+Gl[1]:0,se=!Ce&&!!An&&/Apple Computer/.test(An.vendor),Ti=se&&(/Mobile\/\w+/.test(ar)||!!An&&An.maxTouchPoints>2),Ye=Ti||!!An&&/Mac/.test(An.platform),tE=!!An&&/Win/.test(An.platform),wn=/Android \d/.test(ar),Mo=!!Qd&&"webkitFontSmoothing"in Qd.documentElement.style,rD=Mo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function iD(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function In(e,t){return typeof e=="number"?e:e[t]}function oD(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function th(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=Si(s);continue}let a=s,l=a==o.body,c=l?iD(o):oD(a),u=0,h=0;if(t.top<c.top+In(r,"top")?h=-(c.top-t.top+In(i,"top")):t.bottom>c.bottom-In(r,"bottom")&&(h=t.bottom-t.top>c.bottom-c.top?t.top+In(i,"top")-c.top:t.bottom-c.bottom+In(i,"bottom")),t.left<c.left+In(r,"left")?u=-(c.left-t.left+In(i,"left")):t.right>c.right-In(r,"right")&&(u=t.right-c.right+In(i,"right")),u||h)if(l)o.defaultView.scrollBy(u,h);else{let p=a.scrollLeft,f=a.scrollTop;h&&(a.scrollTop+=h),u&&(a.scrollLeft+=u);let m=a.scrollLeft-p,E=a.scrollTop-f;t={left:t.left-m,top:t.top-E,right:t.right-m,bottom:t.bottom-E}}let d=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(d))break;s=d=="absolute"?s.offsetParent:Si(s)}}function eh(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Si(r));return t}function nh(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let Yr=null;function eE(e,t){let n,r,i,o,s=2e8,a=0,l=t.top,c=t.top;for(let u=e.firstChild,h=0;u;u=u.nextSibling,h++){let d;if(u.nodeType==1)d=u.getClientRects();else{if(u.nodeType!=3)continue;d=Nn(u).getClientRects()}for(let p=0;p<d.length;p++){let f=d[p];if(f.top<=l&&f.bottom>=c){l=Math.max(f.bottom,l),c=Math.min(f.top,c);let m=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(m<s){n=u,s=m,r=m&&n.nodeType==3?{left:f.right<t.left?f.right:f.left,top:t.top}:t,u.nodeType==1&&m&&(a=h+(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=u,o={left:Math.max(f.left,Math.min(f.right,t.left)),top:f.top});!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(a=h+1)}}return!n&&i&&(n=i,r=o,s=0),n&&n.nodeType==3?function(u,h){let d,p=u.nodeValue.length,f=document.createRange();for(let m=0;m<p;m++){f.setEnd(u,m+1),f.setStart(u,m);let E=Vn(f,1);if(E.top!=E.bottom&&nc(h,E)){d={node:u,offset:m+(h.left>=(E.left+E.right)/2?1:0)};break}}return f.detach(),d||{node:u,offset:0}}(n,r):!n||s&&n.nodeType==1?{node:e,offset:a}:eE(n,r)}function nc(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function nE(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let s=e.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(nc(t,c))return nE(s,t,c)}}if((o=(o+1)%r)==i)break}return e}function sD(e,t){let n,r=e.dom.ownerDocument,i=0,o=function(c,u,h){if(c.caretPositionFromPoint)try{let d=c.caretPositionFromPoint(u,h);if(d)return{node:d.offsetNode,offset:Math.min(Ge(d.offsetNode),d.offset)}}catch(d){}if(c.caretRangeFromPoint){let d=c.caretRangeFromPoint(u,h);if(d)return{node:d.startContainer,offset:Math.min(Ge(d.startContainer),d.startOffset)}}}(r,t.left,t.top);o&&({node:n,offset:i}=o);let s,a=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!a||!e.dom.contains(a.nodeType!=1?a.parentNode:a)){let c=e.dom.getBoundingClientRect();if(!nc(t,c)||(a=nE(e.dom,t,c),!a))return null}if(se)for(let c=a;n&&c;c=Si(c))c.draggable&&(n=void 0);if(a=function(c,u){let h=c.parentNode;return h&&/^li$/i.test(h.nodeName)&&u.left<c.getBoundingClientRect().left?h:c}(a,t),n){if(Ke&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let u,h=n.childNodes[i];h.nodeName=="IMG"&&(u=h.getBoundingClientRect()).right<=t.left&&u.bottom>t.top&&i++}let c;Mo&&i&&n.nodeType==1&&(c=n.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&i--,n==e.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:i!=0&&n.nodeType==1&&n.childNodes[i-1].nodeName=="BR"||(s=function(u,h,d,p){let f=-1;for(let m=h,E=!1;m!=u.dom;){let A,_=u.docView.nearestDesc(m,!0);if(!_)return null;if(_.dom.nodeType==1&&(_.node.isBlock&&_.parent||!_.contentDOM)&&((A=_.dom.getBoundingClientRect()).width||A.height)&&(_.node.isBlock&&_.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(_.dom.nodeName)&&(!E&&A.left>p.left||A.top>p.top?f=_.posBefore:(!E&&A.right<p.left||A.bottom<p.top)&&(f=_.posAfter),E=!0),!_.contentDOM&&f<0&&!_.node.isText))return(_.node.isBlock?p.top<(A.top+A.bottom)/2:p.left<(A.left+A.right)/2)?_.posBefore:_.posAfter;m=_.dom.parentNode}return f>-1?f:u.docView.posFromDOM(h,d,-1)}(e,n,i,t))}s==null&&(s=function(c,u,h){let{node:d,offset:p}=eE(u,h),f=-1;if(d.nodeType==1&&!d.firstChild){let m=d.getBoundingClientRect();f=m.left!=m.right&&h.left>(m.left+m.right)/2?1:-1}return c.docView.posFromDOM(d,p,f)}(e,a,t));let l=e.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function rh(e){return e.top<e.bottom||e.left<e.right}function Vn(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(rh(r))return r}return Array.prototype.find.call(n,rh)||e.getBoundingClientRect()}const aD=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function rE(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=Mo||Ke;if(r.nodeType==3){if(!s||!aD.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let a=i,l=i,c=n<0?1:-1;return n<0&&!i?(l++,c=-1):n>=0&&i==r.nodeValue.length?(a--,c=1):n<0?a--:l++,Ui(Vn(Nn(r,a,l),c),c<0)}{let a=Vn(Nn(r,i,i),n);if(Ke&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=Vn(Nn(r,i-1,i-1),-1);if(l.top==a.top){let c=Vn(Nn(r,i,i+1),-1);if(c.top!=a.top)return Ui(c,c.left<l.left)}}return a}}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Ge(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return za(a.getBoundingClientRect(),!1)}if(o==null&&i<Ge(r)){let a=r.childNodes[i];if(a.nodeType==1)return za(a.getBoundingClientRect(),!0)}return za(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Ge(r))){let a=r.childNodes[i-1],l=a.nodeType==3?Nn(a,Ge(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return Ui(Vn(l,1),!1)}if(o==null&&i<Ge(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?Nn(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return Ui(Vn(l,-1),!0)}return Ui(Vn(r.nodeType==3?Nn(r):r,-n),n>=0)}function Ui(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function za(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function ih(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}const lD=/[\u0590-\u08ac]/;let oh=null,sh=null,ah=!1;function uD(e,t,n){return oh==t&&sh==n?ah:(oh=t,sh=n,ah=n=="up"||n=="down"?function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return ih(r,i,()=>{let{node:l}=r.docView.domFromPos(a.pos,o=="up"?-1:1);for(;;){let u=r.docView.nearestDesc(l,!0);if(!u)break;if(u.node.isBlock){l=u.contentDOM||u.dom;break}l=u.dom.parentNode}let c=rE(r,a.pos,1);for(let u=l.firstChild;u;u=u.nextSibling){let h;if(u.nodeType==1)h=u.getClientRects();else{if(u.nodeType!=3)continue;h=Nn(u,0,u.nodeValue.length).getClientRects()}for(let d=0;d<h.length;d++){let p=h[d];if(p.bottom>p.top+1&&(o=="up"?c.top-p.top>2*(p.bottom-c.top):p.bottom-c.bottom>2*(c.bottom-p.top)))return!1}}return!0})}(e,t,n):function(r,i,o){let{$head:s}=i.selection;if(!s.parent.isTextblock)return!1;let a=s.parentOffset,l=!a,c=a==s.parent.content.size,u=r.domSelection();return u?lD.test(s.parent.textContent)&&u.modify?ih(r,i,()=>{let{focusNode:h,focusOffset:d,anchorNode:p,anchorOffset:f}=r.domSelectionRange(),m=u.caretBidiLevel;u.modify("move",o,"character");let E=s.depth?r.docView.domAfterPos(s.before()):r.dom,{focusNode:A,focusOffset:_}=r.domSelectionRange(),g=A&&!E.contains(A.nodeType==1?A:A.parentNode)||h==A&&d==_;try{u.collapse(p,f),h&&(h!=p||d!=f)&&u.extend&&u.extend(h,d)}catch(v){}return m!=null&&(u.caretBidiLevel=m),g}):o=="left"||o=="backward"?l:c:s.pos==s.start()||s.pos==s.end()}(e,t,n))}class xo{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=0,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].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 n=0,r=this.posAtStart;;n++){let i=this.children[n];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,n,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[n-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[n];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=n>oe(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(n==0)for(let o=t;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==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,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let o,s=this.getDesc(i);if(s&&(!n||s.node)){if(!r||!(o=s.nodeDOM)||(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))return s;r=!1}}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==t&&o!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(t<o)return i.descAt(t-r-i.border);r=o}}domFromPos(t,n){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 oE){i=t-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof iE&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,o&&o.dom.parentNode!=this.contentDOM;r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?oe(o.dom)+1:0}}{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,o&&o.dom.parentNode!=this.contentDOM;r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?oe(o.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let l=this.children[a],c=s+l.size;if(i==-1&&t<=c){let u=s+l.border;if(t>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,u);t=s;for(let h=a;h>0;h--){let d=this.children[h-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){i=oe(d.dom)+1;break}t-=d.size}i==-1&&(i=0)}if(i>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let h=this.children[u];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){o=oe(h.dom);break}n+=h.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:t,to:n,fromOffset:i,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,i=!1){let o=Math.min(t,n),s=Math.max(t,n);for(let p=0,f=0;p<this.children.length;p++){let m=this.children[p],E=f+m.size;if(o>f&&s<E)return m.setSelection(t-f-m.border,n-f-m.border,r,i);f=E}let a=this.domFromPos(t,t?-1:1),l=n==t?a:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),h=!1;if((Ke||se)&&t==n){let{node:p,offset:f}=a;if(p.nodeType==3){if(h=!(!f||p.nodeValue[f-1]!=`
|
|
12
|
-
`),h&&f==p.nodeValue.length)for(let m,E=p;E;E=E.parentNode){if(m=E.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:oe(m)+1});break}let A=E.pmViewDesc;if(A&&A.node&&A.node.isBlock)break}}else{let m=p.childNodes[f-1];h=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(Ke&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let p=u.focusNode.childNodes[u.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||h&&se)&&Pr(a.node,a.offset,u.anchorNode,u.anchorOffset)&&Pr(l.node,l.offset,u.focusNode,u.focusOffset))return;let d=!1;if((c.extend||t==n)&&(!h||!Ke)){c.collapse(a.node,a.offset);try{t!=n&&c.extend(l.node,l.offset),d=!0}catch(p){}}if(!d){if(t>n){let f=a;a=l,l=f}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){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&&n>=r:t<s&&n>r){let a=r+o.border,l=s-o.border;if(t>=a&&n<=l)return this.dirty=t==r||n==s?2:1,void(t!=a||n!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-a,n-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=s}this.dirty=2}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?2:1;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}}class iE extends xo{constructor(t,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:i)),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==0&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return!!n&&n(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 ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class cD extends xo{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class Cr extends xo{constructor(t,n,r,i,o){super(t,[],r,i),this.mark=n,this.spec=o}static create(t,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return s&&s.dom||(s=wi.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new Cr(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=3&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=0){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}slice(t,n,r){let i=Cr.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=Xl(o,n,s,r)),t>0&&(o=Xl(o,0,t,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class er extends xo{constructor(t,n,r,i,o,s,a,l,c){super(t,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,o,s){let a,l=o.nodeViews[n.type.name],c=l&&l(n,o,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s,r,i),u=c&&c.dom,h=c&&c.contentDOM;if(n.isText)if(u){if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(n.text);else u||({dom:u,contentDOM:h}=wi.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));h||n.isText||u.nodeName=="BR"||(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let d=u;return u=lE(u,r,n),c?a=new dD(t,n,r,i,u,h||null,d,c,o,s+1):n.isText?new da(t,n,r,i,u,d,o):new er(t,n,r,i,u,h||null,d,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 n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Y.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,n,r){return this.dirty==0&&t.eq(this.node)&&ks(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,o=t.composing?this.localCompositionInfo(t,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new pD(this,s&&s.node,t);(function(c,u,h,d){let p=u.locals(c),f=0;if(p.length==0){for(let _=0;_<c.childCount;_++){let g=c.child(_);d(g,p,u.forChild(f,g),_),f+=g.nodeSize}return}let m=0,E=[],A=null;for(let _=0;;){let g,v,S,I;for(;m<p.length&&p[m].to==f;){let D=p[m++];D.widget&&(g?(v||(v=[g])).push(D):g=D)}if(g)if(v){v.sort(fD);for(let D=0;D<v.length;D++)h(v[D],_,!!A)}else h(g,_,!!A);if(A)I=-1,S=A,A=null;else{if(!(_<c.childCount))break;I=_,S=c.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 R=f+S.nodeSize;if(S.isText){let D=R;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<R&&(A=S.cut(D-f),S=S.cut(0,D-f),R=D,I=-1)}else for(;m<p.length&&p[m].to<R;)m++;let y=S.isInline&&!S.isLeaf?E.filter(D=>!D.inline):E.slice();d(S,y,u.forChild(f,S),I),f=R}})(this.node,this.innerDeco,(c,u,h)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,t,u):c.type.side>=0&&!h&&l.syncToMarks(u==this.node.childCount?At.none:this.node.child(u).marks,r,t,u),l.placeWidget(c,t,i)},(c,u,h,d)=>{let p;l.syncToMarks(c.marks,r,t,d),l.findNodeMatch(c,u,h,d)||a&&t.state.selection.from>i&&t.state.selection.to<i+c.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,u,h,p,t)||l.updateNextNode(c,u,h,t,d,i)||l.addNode(c,u,h,t,i),i+=c.nodeSize}),l.syncToMarks([],r,t,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==2)&&(s&&this.protectLocalComposition(t,s),sE(this.contentDOM,this.children,t),Ti&&function(c){if(c.nodeName=="UL"||c.nodeName=="OL"){let u=c.style.cssText;c.style.cssText=u+"; list-style: square !important",window.getComputedStyle(c).listStyle,c.style.cssText=u}}(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof Et)||r<n||i>n+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=function(l,c,u,h){for(let d=0,p=0;d<l.childCount&&p<=h;){let f=l.child(d++),m=p;if(p+=f.nodeSize,!f.isText)continue;let E=f.text;for(;d<l.childCount;){let A=l.child(d++);if(p+=A.nodeSize,!A.isText)break;E+=A.text}if(p>=u){if(p>=h&&E.slice(h-c.length-m,h-m)==c)return h-c.length;let A=m<h?E.lastIndexOf(c,h-m-1):-1;if(A>=0&&A+c.length+m>=u)return m+A;if(u==h&&E.length>=h+c.length-m&&E.slice(h-m,h-m+c.length)==c)return h}}return-1}(this.node.content,s,r-n,i-n);return a<0?null:{node:o,pos:a,text:s}}return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new cD(this,o,n,i);t.input.compositionNodes.push(s),this.children=Xl(this.children,r,r+i.length,t,s)}update(t,n,r,i){return!(this.dirty==3||!t.sameMarkup(this.node))&&(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(ks(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=aE(this.dom,this.nodeDOM,Wl(this.outerDeco,this.node,n),Wl(t,this.node,n)),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.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function lh(e,t,n,r,i){lE(r,t,e);let o=new er(void 0,e,t,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class da extends er{constructor(t,n,r,i,o,s,a){super(t,n,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,n,r,i){return!(this.dirty==3||this.dirty!=0&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(n),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 n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),o=document.createTextNode(i.text);return new da(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(t,n){super.markDirty(t,n),this.dom==this.nodeDOM||t!=0&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(t){return this.node.text==t}}class oE extends xo{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 dD extends er{constructor(t,n,r,i,o,s,a,l,c,u){super(t,n,r,i,o,s,a,c,u),this.spec=l}update(t,n,r,i){if(this.dirty==3)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let o=this.spec.update(t,n,r);return o&&this.updateInner(t,n,r,i),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,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 sE(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=uh(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof Cr){let l=r?r.previousSibling:e.lastChild;sE(s.contentDOM,s.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=uh(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const eo=function(e){e&&(this.nodeName=e)};eo.prototype=Object.create(null);const Or=[new eo];function Wl(e,t,n){if(e.length==0)return Or;let r=n?Or[0]:new eo,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&i.push(r=new eo(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new eo(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 aE(e,t,n,r){if(n==Or&&r==Or)return t;let i=t;for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=e&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=Or[0]),i=l}hD(i,a||Or[0],s)}return i}function hD(e,t,n){for(let r in t)r=="class"||r=="style"||r=="nodeName"||r in n||e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&e.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&e.classList.add(i[o]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r,i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;r=i.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function lE(e,t,n){return aE(e,e,Or,Wl(t,n,e.nodeType!=1))}function ks(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function uh(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class pD{constructor(t,n,r){this.lock=n,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,c=new Map,u=[];t:for(;l>0;){let h;for(;;)if(a){let p=s.children[a-1];if(!(p instanceof Cr)){h=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 d=h.node;if(d){if(d!=i.child(l-1))break;--l,c.set(h,l),u.push(h)}}return{index:l,matched:c,matches:u.reverse()}}(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r,i){let o=0,s=this.stack.length>>1,a=Math.min(s,t.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(t[o])&&t[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let l=-1,c=this.top.children.length;i<this.preMatch.index&&(c=Math.min(this.index+3,c));for(let u=this.index;u<c;u++){let h=this.top.children[u];if(h.matchesMark(t[s])&&!this.isLocked(h.dom)){l=u;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let u=Cr.create(this.top,t[s],n,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,r,i){let o,s=-1;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(t,n,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(t,n,r)&&!this.preMatch.matched.has(c)){s=a;break}}return!(s<0)&&(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(t,n,r,i,o){let s=this.top.children[i];return s.dirty==3&&s.dom==s.contentDOM&&(s.dirty=2),!!s.update(t,n,r,o)&&(this.destroyBetween(this.index,i),this.index++,!0)}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==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=n}}updateNextNode(t,n,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof er){let c=this.preMatch.matched.get(l);if(c!=null&&c!=o)return!1;let u,h=l.dom,d=this.isLocked(h)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=3&&ks(n,l.outerDeco));if(!d&&l.update(t,n,r,i))return this.destroyBetween(this.index,a),l.dom!=h&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(l,t,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=2,u.updateChildren(i,s+1),u.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,i,o,s){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!ks(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=er.create(this.top,n,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,n,r,i,o){let s=er.create(this.top,t,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,n,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 iE(this.top,t,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof Cr;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof da)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((se||Jt)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.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 oE(this.top,[],r,null);n!=this.top?n.children.push(i):n.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 fD(e,t){return e.type.side-t.type.side}function Xl(e,t,n,r,i){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,u=a+=l.size;c>=n||u<=t?o.push(l):(c<t&&o.push(l.slice(0,t-c,r)),i&&(o.push(i),i=void 0),u>n&&o.push(l.slice(n-c,l.size,r)))}return o}function rc(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(ca(n)){for(a=s;i&&!i.node;)i=i.parent;let h=i.node;if(i&&h.isAtom&&nt.isSelectable(h)&&i.parent&&(!h.isInline||!function(d,p,f){for(let m=p==0,E=p==Ge(d);m||E;){if(d==f)return!0;let A=oe(d);if(!(d=d.parentNode))return!1;m=m&&A==0,E=E&&A==Ge(d)}}(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;l=new nt(s==d?c:r.resolve(d))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let h=s,d=s;for(let p=0;p<n.rangeCount;p++){let f=n.getRangeAt(p);h=Math.min(h,e.docView.posFromDOM(f.startContainer,f.startOffset,1)),d=Math.max(d,e.docView.posFromDOM(f.endContainer,f.endOffset,-1))}if(h<0)return null;[a,s]=d==e.state.selection.anchor?[d,h]:[h,d],c=r.resolve(s)}else a=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let u=r.resolve(a);return l||(l=ic(e,u,c,t=="pointer"||e.state.selection.head<c.pos&&!o?1:-1)),l}function ch(e){return e.editable?e.hasFocus():cE(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Mn(e,t=!1){let n=e.state.selection;if(uE(e,n),ch(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Jt){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Pr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)(function(r){let i=r.domSelection();if(!i)return;let o=r.cursorWrapper.dom,s=o.nodeName=="IMG";s?i.collapse(o.parentNode,oe(o)+1):i.collapse(o,0),!s&&!r.state.selection.visible&&Ce&&tr<=11&&(o.disabled=!0,o.disabled=!1)})(e);else{let r,i,{anchor:o,head:s}=n;!dh||n instanceof Et||(n.$from.parent.inlineContent||(r=hh(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=hh(e,n.to))),e.docView.setSelection(o,s,e,t),dh&&(r&&ph(r),i&&ph(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(a){let l=a.dom.ownerDocument;l.removeEventListener("selectionchange",a.input.hideSelectionGuard);let c=a.domSelectionRange(),u=c.anchorNode,h=c.anchorOffset;l.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{c.anchorNode==u&&c.anchorOffset==h||(l.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{ch(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const dh=se||Jt&&Qm<63;function hh(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(se&&i&&i.contentEditable=="false")return Ya(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return Ya(i);if(o)return Ya(o)}}function Ya(e){return e.contentEditable="true",se&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function ph(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function uE(e,t){if(t instanceof nt){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(fh(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else fh(e)}function fh(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function ic(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||Et.between(t,n,r)}function mh(e){return!(e.editable&&!e.hasFocus())&&cE(e)}function cE(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Kl(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&&_t.findFrom(o,t)}function Yn(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Eh(e,t,n){let r=e.state.selection;if(!(r instanceof Et)){if(r instanceof nt&&r.node.isInline)return Yn(e,new Et(t>0?r.$to:r.$from));{let i=Kl(e.state,t);return!!i&&Yn(e,i)}}if(n.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=e.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return Yn(e,new Et(r.$anchor,s))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let i=Kl(e.state,t);return!!(i&&i instanceof nt)&&Yn(e,i)}if(!(Ye&&n.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=e.docView.descAt(a))&&!i.contentDOM)&&(nt.isSelectable(s)?Yn(e,new nt(t<0?e.state.doc.resolve(o.pos-s.nodeSize):o)):!!Mo&&Yn(e,new Et(e.state.doc.resolve(t<0?a:a+s.nodeSize))))}}function Ko(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Hi(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Gr(e,t){return t<0?function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=!1;for(Ke&&i.nodeType==1&&o<Ko(i)&&Hi(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let c=i.childNodes[o-1];if(Hi(c,-1))s=i,a=--o;else{if(c.nodeType!=3)break;i=c,o=i.nodeValue.length}}}else{if(_h(i))break;{let c=i.previousSibling;for(;c&&Hi(c,-1);)s=i.parentNode,a=oe(c),c=c.previousSibling;if(c)i=c,o=Ko(i);else{if(i=i.parentNode,i==n.dom)break;o=0}}}l?Ga(n,i,o):s&&Ga(n,s,a)}(e):function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=Ko(i);for(;;)if(o<l){if(i.nodeType!=1||!Hi(i.childNodes[o],1))break;s=i,a=++o}else{if(_h(i))break;{let c=i.nextSibling;for(;c&&Hi(c,1);)s=c.parentNode,a=oe(c)+1,c=c.nextSibling;if(c)i=c,o=0,l=Ko(i);else{if(i=i.parentNode,i==n.dom)break;o=l=0}}}s&&Ga(n,s,a)}(e)}function _h(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Ga(e,t,n){if(t.nodeType!=3){let o,s;(s=function(a,l){for(;a&&l==a.childNodes.length&&!Ao(a);)l=oe(a)+1,a=a.parentNode;for(;a&&l<a.childNodes.length;){let c=a.childNodes[l];if(c.nodeType==3)return c;if(c.nodeType==1&&c.contentEditable=="false")break;a=c,l=0}}(t,n))?(t=s,n=0):(o=function(a,l){for(;a&&!l&&!Ao(a);)l=oe(a),a=a.parentNode;for(;a&&l;){let c=a.childNodes[l-1];if(c.nodeType==3)return c;if(c.nodeType==1&&c.contentEditable=="false")break;l=(a=c).childNodes.length}}(t,n))&&(t=o,n=o.nodeValue.length)}let r=e.domSelection();if(!r)return;if(ca(r)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&Mn(e)},50)}function Ah(e,t){let n=e.state.doc.resolve(t);if(!Jt&&!tE&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let i=e.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<n.end()){let i=e.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(e.dom).direction=="rtl"?"rtl":"ltr"}function gh(e,t,n){let r=e.state.selection;if(r instanceof Et&&!r.empty||n.indexOf("s")>-1||Ye&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=Kl(e.state,t);if(s&&s instanceof nt)return Yn(e,s)}if(!i.parent.inlineContent){let s=t<0?i:o,a=r instanceof je?_t.near(s,t):_t.findFrom(s,t);return!!a&&Yn(e,a)}return!1}function Dh(e,t){if(!(e.state.selection instanceof Et))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=e.state.tr;return t<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),e.dispatch(s),!0}return!1}function Oh(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function mD(e,t){let n=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(n==8||Ye&&n==72&&r=="c")return Dh(e,-1)||Gr(e,-1);if(n==46&&!t.shiftKey||Ye&&n==68&&r=="c")return Dh(e,1)||Gr(e,1);if(n==13||n==27)return!0;if(n==37||Ye&&n==66&&r=="c"){let i=n==37?Ah(e,e.state.selection.from)=="ltr"?-1:1:-1;return Eh(e,i,r)||Gr(e,i)}if(n==39||Ye&&n==70&&r=="c"){let i=n==39?Ah(e,e.state.selection.from)=="ltr"?1:-1:1;return Eh(e,i,r)||Gr(e,i)}return n==38||Ye&&n==80&&r=="c"?gh(e,-1,r)||Gr(e,-1):n==40||Ye&&n==78&&r=="c"?function(i){if(!se||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;Oh(i,a,"true"),setTimeout(()=>Oh(i,a,"false"),20)}return!1}(e)||gh(e,1,r)||Gr(e,1):r==(Ye?"m":"c")&&(n==66||n==73||n==89||n==90)}function oc(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{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;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||wi.fromSchema(e.state.schema),a=EE(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,h=0;for(;u&&u.nodeType==1&&(c=mE[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let f=a.createElement(c[p]);for(;l.firstChild;)f.appendChild(l.firstChild);l.appendChild(f),h++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${o}${h?` -${h}`:""} ${JSON.stringify(n)}`);let d=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
|
|
5
|
+
`+i.text+"```";case"codespan":case"codeSpan":return"```"+i.text+"```";case"mention":return r?`<!!mention:${i.id}|${i.text}>`:`@${i.text}`;case"customemoji":case"customEmoji":return r?`<!!customemoji:${i.text}>`:i.text;case"link":return`<${i.url}|${dn(i.children)}>`;case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return function(o){const s=new URLSearchParams(o.params).toString(),a=s?o.action+"?"+s:o.action;return`<${o.type}:${a}|${dn(o.children)}>`}(i);case"bulletlist":case"bulletList":return`
|
|
6
|
+
`+dn(i.children);case"bulletpoint":case"bulletPoint":return"- "+dn(i.children)+`
|
|
7
|
+
`}}).join("")}(e,t).trim()}class Md{constructor(t,n,r,i,o,s){this.send=n,this.attachFile=r,this.shareLocation=i,this.toggleEmojiPicker=o,this.recordVoiceMessage=s,this.isEmpty=t.isEmpty,this.isTyping=t.isTyping,this.atTextLimit=t.atTextLimit,this.characterCount=t.characterCount,this.showEmojiPicker=t.showEmojiPicker}}function re(e){this.content=e}function Mm(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),o=t.child(r);if(i!=o){if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let s=0;i.text[s]==o.text[s];s++)n++;return n}if(i.content.size||o.content.size){let s=Mm(i.content,o.content,n+1);if(s!=null)return s}n+=i.nodeSize}else n+=i.nodeSize}}function xm(e,t,n,r){for(let i=e.childCount,o=t.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:r};let s=e.child(--i),a=t.child(--o),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let c=0,u=Math.min(s.text.length,a.text.length);for(;c<u&&s.text[s.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let c=xm(s.content,a.content,n-1,r-1);if(c)return c}n-=l,r-=l}else n-=l,r-=l}}re.prototype={constructor:re,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),o=r.content.slice();return i==-1?o.push(n||e,t):(o[i+1]=t,n&&(o[i]=n)),new re(o)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new re(n)},addToStart:function(e,t){return new re([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new re(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),o=r.find(e);return i.splice(o==-1?i.length:o,0,t,n),new re(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=re.from(e)).size?new re(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=re.from(e)).size?new re(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=re.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},re.from=function(e){if(e instanceof re)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new re(t)};class Y{constructor(t,n){if(this.content=t,this.size=n||0,n==null)for(let r=0;r<t.length;r++)this.size+=t[r].nodeSize}nodesBetween(t,n,r,i=0,o){for(let s=0,a=0;a<n;s++){let l=this.content[s],c=a+l.nodeSize;if(c>t&&r(l,i+a,o||null,s)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,t-u),Math.min(l.content.size,n-u),r,i+u)}a=c}}descendants(t){this.nodesBetween(0,this.size,t)}textBetween(t,n,r,i){let o="",s=!0;return this.nodesBetween(t,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(t,l)-l,n-l):a.isLeaf?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&r&&(s?s=!1:o+=r),o+=c},0),o}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),o=1);o<t.content.length;o++)i.push(t.content[o]);return new Y(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let o=0,s=0;s<n;o++){let a=this.content[o],l=s+a.nodeSize;l>t&&((s<t||l>n)&&(a=a.isText?a.cut(Math.max(0,t-s),Math.min(a.text.length,n-s)):a.cut(Math.max(0,t-s-1),Math.min(a.content.size,n-s-1))),r.push(a),i+=a.nodeSize),s=l}return new Y(r,i)}cutByIndex(t,n){return t==n?Y.empty:t==0&&n==this.content.length?this:new Y(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new Y(i,o)}addToStart(t){return new Y([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new Y(this.content.concat(t),this.size+t.nodeSize)}eq(t){if(this.content.length!=t.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(t.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(t){let n=this.content[t];if(!n)throw new RangeError("Index "+t+" out of range for "+this);return n}maybeChild(t){return this.content[t]||null}forEach(t){for(let n=0,r=0;n<this.content.length;n++){let i=this.content[n];t(i,r,n),r+=i.nodeSize}}findDiffStart(t,n=0){return Mm(this,t,n)}findDiffEnd(t,n=this.size,r=t.size){return xm(this,t,n,r)}findIndex(t){if(t==0)return qo(0,t);if(t==this.size)return qo(this.content.length,t);if(t>this.size||t<0)throw new RangeError(`Position ${t} outside of fragment (${this})`);for(let n=0,r=0;;n++){let i=r+this.child(n).nodeSize;if(i>=t)return i==t?qo(n+1,i):qo(n,r);r=i}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(t=>t.toJSON()):null}static fromJSON(t,n){if(!n)return Y.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Y(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return Y.empty;let n,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)?(n||(n=t.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new Y(n||t,r)}static from(t){if(!t)return Y.empty;if(t instanceof Y)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new Y([t],t.nodeSize);throw new RangeError("Can not convert "+t+" to a Fragment"+(t.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Y.empty=new Y([],0);const xa={index:0,offset:0};function qo(e,t){return xa.index=e,xa.offset=t,xa}function Ns(e,t){if(e===t)return!0;if(!e||typeof e!="object"||!t||typeof t!="object")return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!Ns(e[r],t[r]))return!1}else{for(let r in e)if(!(r in t)||!Ns(e[r],t[r]))return!1;for(let r in t)if(!(r in e))return!1}return!0}class Dt{constructor(t,n){this.type=t,this.attrs=n}addToSet(t){let n,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))n||(n=t.slice(0,i));else{if(o.type.excludes(this.type))return t;!r&&o.type.rank>this.type.rank&&(n||(n=t.slice(0,i)),n.push(this),r=!0),n&&n.push(o)}}return n||(n=t.slice()),r||n.push(this),n}removeFromSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return t.slice(0,n).concat(t.slice(n+1));return t}isInSet(t){for(let n=0;n<t.length;n++)if(this.eq(t[n]))return!0;return!1}eq(t){return this==t||this.type==t.type&&Ns(this.attrs,t.attrs)}toJSON(){let t={type:this.type.name};for(let n in this.attrs){t.attrs=this.attrs;break}return t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let r=t.marks[n.type];if(!r)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=r.create(n.attrs);return r.checkAttrs(i.attrs),i}static sameSet(t,n){if(t==n)return!0;if(t.length!=n.length)return!1;for(let r=0;r<t.length;r++)if(!t[r].eq(n[r]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return Dt.none;if(t instanceof Dt)return[t];let n=t.slice();return n.sort((r,i)=>r.type.rank-i.type.rank),n}}Dt.none=[];class bs extends Error{}class J{constructor(t,n,r){this.content=t,this.openStart=n,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Bm(this.content,t+this.openStart,n);return r&&new J(r,this.openStart,this.openEnd)}removeBetween(t,n){return new J(Fm(this.content,t+this.openStart,n+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,n){if(!n)return J.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new J(Y.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let o=t.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)r++;for(let o=t.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new J(t,r,i)}}function Fm(e,t,n){let{index:r,offset:i}=e.findIndex(t),o=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(i==t||o.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,o.copy(Fm(o.content,t-i-1,n-i-1)))}function Bm(e,t,n,r){let{index:i,offset:o}=e.findIndex(t),s=e.maybeChild(i);if(o==t||s.isText)return r&&!r.canReplace(i,i,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=Bm(s.content,t-o-1,n,s);return a&&e.replaceChild(i,s.copy(a))}function jg(e,t,n){if(n.openStart>e.depth)throw new bs("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new bs("Inconsistent open depths");return Um(e,t,n,0)}function Um(e,t,n,r){let i=e.index(r),o=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let s=Um(e,t,n,r+1);return o.copy(o.content.replaceChild(i,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:s,end:a}=function(l,c){let u=c.depth-l.openStart,h=c.node(u).copy(l.content);for(let d=u-1;d>=0;d--)h=c.node(d).copy(Y.from(h));return{start:h.resolveNoCache(l.openStart+u),end:h.resolveNoCache(h.content.size-l.openEnd-u)}}(n,e);return Nr(o,jm(e,s,a,t,r))}{let s=e.parent,a=s.content;return Nr(s,a.cut(0,e.parentOffset).append(n.content).append(a.cut(t.parentOffset)))}}return Nr(o,ks(e,t,r))}function Hm(e,t){if(!t.type.compatibleContent(e.type))throw new bs("Cannot join "+t.type.name+" onto "+e.type.name)}function jl(e,t,n){let r=e.node(n);return Hm(r,t.node(n)),r}function Cr(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function eo(e,t,n,r){let i=(t||e).node(n),o=0,s=t?t.index(n):i.childCount;e&&(o=e.index(n),e.depth>n?o++:e.textOffset&&(Cr(e.nodeAfter,r),o++));for(let a=o;a<s;a++)Cr(i.child(a),r);t&&t.depth==n&&t.textOffset&&Cr(t.nodeBefore,r)}function Nr(e,t){return e.type.checkContent(t),e.copy(t)}function jm(e,t,n,r,i){let o=e.depth>i&&jl(e,t,i+1),s=r.depth>i&&jl(n,r,i+1),a=[];return eo(null,e,i,a),o&&s&&t.index(i)==n.index(i)?(Hm(o,s),Cr(Nr(o,jm(e,t,n,r,i+1)),a)):(o&&Cr(Nr(o,ks(e,t,i+1)),a),eo(t,n,i,a),s&&Cr(Nr(s,ks(n,r,i+1)),a)),eo(r,null,i,a),new Y(a)}function ks(e,t,n){let r=[];return eo(null,e,n,r),e.depth>n&&Cr(Nr(jl(e,t,n+1),ks(e,t,n+1)),r),eo(t,null,n,r),new Y(r)}J.empty=new J(Y.empty,0,0);class Eo{constructor(t,n,r){this.pos=t,this.path=n,this.parentOffset=r,this.depth=n.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,n=this.index(this.depth);if(n==t.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=t.child(n);return r?t.child(n).cut(r):i}get nodeBefore(){let t=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(t).cut(0,n):t==0?null:this.parent.child(t-1)}posAtIndex(t,n){n=this.resolveDepth(n);let r=this.path[3*n],i=n==0?0:this.path[3*n-1]+1;for(let o=0;o<t;o++)i+=r.child(o).nodeSize;return i}marks(){let t=this.parent,n=this.index();if(t.content.size==0)return Dt.none;if(this.textOffset)return t.child(n).marks;let r=t.maybeChild(n-1),i=t.maybeChild(n);if(!r){let a=r;r=i,i=a}let o=r.marks;for(var s=0;s<o.length;s++)o[s].type.spec.inclusive!==!1||i&&o[s].isInSet(i.marks)||(o=o[s--].removeFromSet(o));return o}marksAcross(t){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let r=n.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 n=this.depth;n>0;n--)if(this.start(n)<=t&&this.end(n)>=t)return n;return 0}blockRange(t=this,n){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)&&(!n||n(this.node(r))))return new zg(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 n=1;n<=this.depth;n++)t+=(t?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return t+":"+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw new RangeError("Position "+n+" out of range");let r=[],i=0,o=n;for(let s=t;;){let{index:a,offset:l}=s.content.findIndex(o),c=o-l;if(r.push(s,a,i+l),!c||(s=s.child(a),s.isText))break;o=c-1,i+=l+1}return new Eo(n,r,o)}static resolveCached(t,n){let r=xd.get(t);if(r)for(let o=0;o<r.elts.length;o++){let s=r.elts[o];if(s.pos==n)return s}else xd.set(t,r=new $g);let i=r.elts[r.i]=Eo.resolve(t,n);return r.i=(r.i+1)%Vg,i}}class $g{constructor(){this.elts=[],this.i=0}}const Vg=12,xd=new WeakMap;class zg{constructor(t,n,r){this.$from=t,this.$to=n,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Yg=Object.create(null);let br=class $l{constructor(t,n,r,i=Dt.none){this.type=t,this.attrs=n,this.marks=i,this.content=r||Y.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(t){return this.content.child(t)}maybeChild(t){return this.content.maybeChild(t)}forEach(t){this.content.forEach(t)}nodesBetween(t,n,r,i=0){this.content.nodesBetween(t,n,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,n,r,i){return this.content.textBetween(t,n,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,n,r){return this.type==t&&Ns(this.attrs,n||t.defaultAttrs||Yg)&&Dt.sameSet(this.marks,r||Dt.none)}copy(t=null){return t==this.content?this:new $l(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new $l(this.type,this.attrs,this.content,t)}cut(t,n=this.content.size){return t==0&&n==this.content.size?this:this.copy(this.content.cut(t,n))}slice(t,n=this.content.size,r=!1){if(t==n)return J.empty;let i=this.resolve(t),o=this.resolve(n),s=r?0:i.sharedDepth(n),a=i.start(s),l=i.node(s).content.cut(i.pos-a,o.pos-a);return new J(l,i.depth-s,o.depth-s)}replace(t,n,r){return jg(this.resolve(t),this.resolve(n),r)}nodeAt(t){for(let n=this;;){let{index:r,offset:i}=n.content.findIndex(t);if(n=n.maybeChild(r),!n)return null;if(i==t||n.isText)return n;t-=i+1}}childAfter(t){let{index:n,offset:r}=this.content.findIndex(t);return{node:this.content.maybeChild(n),index:n,offset:r}}childBefore(t){if(t==0)return{node:null,index:0,offset:0};let{index:n,offset:r}=this.content.findIndex(t);if(r<t)return{node:this.content.child(n),index:n,offset:r};let i=this.content.child(n-1);return{node:i,index:n-1,offset:r-i.nodeSize}}resolve(t){return Eo.resolveCached(this,t)}resolveNoCache(t){return Eo.resolve(this,t)}rangeHasMark(t,n,r){let i=!1;return n>t&&this.nodesBetween(t,n,o=>(r.isInSet(o.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let t=this.type.name;return this.content.size&&(t+="("+this.content.toStringInner()+")"),$m(this.marks,t)}contentMatchAt(t){let n=this.type.contentMatch.matchFragment(this.content,0,t);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(t,n,r=Y.empty,i=0,o=r.childCount){let s=this.contentMatchAt(t).matchFragment(r,i,o),a=s&&s.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(r.child(l).marks))return!1;return!0}canReplaceWith(t,n,r,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(t).matchType(r),s=o&&o.matchFragment(this.content,n);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),this.type.checkAttrs(this.attrs);let t=Dt.none;for(let n=0;n<this.marks.length;n++){let r=this.marks[n];r.type.checkAttrs(r.attrs),t=r.addToSet(t)}if(!Dt.sameSet(t,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let t={type:this.type.name};for(let n 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(n=>n.toJSON())),t}static fromJSON(t,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let r;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=n.marks.map(t.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return t.text(n.text,r)}let i=Y.fromJSON(t,n.content),o=t.nodeType(n.type).create(n.attrs,i,r);return o.type.checkAttrs(o.attrs),o}};br.prototype.text=void 0;class ws extends br{constructor(t,n,r,i){if(super(t,n,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):$m(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(t,n){return this.text.slice(t,n)}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new ws(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new ws(this.type,this.attrs,t,this.marks)}cut(t=0,n=this.text.length){return t==0&&n==this.text.length?this:this.withText(this.text.slice(t,n))}eq(t){return this.sameMarkup(t)&&this.text==t.text}toJSON(){let t=super.toJSON();return t.text=this.text,t}}function $m(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class Mr{constructor(t){this.validEnd=t,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Gg(t,n);if(r.next==null)return Mr.empty;let i=Vm(r);r.next&&r.err("Unexpected trailing text");let o=function(s){let a=Object.create(null);return l(Bd(s,0));function l(c){let u=[];c.forEach(d=>{s[d].forEach(({term:p,to:f})=>{if(!p)return;let m;for(let E=0;E<u.length;E++)u[E][0]==p&&(m=u[E][1]);Bd(s,f).forEach(E=>{m||u.push([p,m=[]]),m.indexOf(E)==-1&&m.push(E)})})});let h=a[c.join(",")]=new Mr(c.indexOf(s.length-1)>-1);for(let d=0;d<u.length;d++){let p=u[d][1].sort(zm);h.next.push({type:u[d][0],next:a[p.join(",")]||l(p)})}return h}}(function(s){let a=[[]];return u(h(s,0),l()),a;function l(){return a.push([])-1}function c(d,p,f){let m={term:f,to:p};return a[d].push(m),m}function u(d,p){d.forEach(f=>f.to=p)}function h(d,p){if(d.type=="choice")return d.exprs.reduce((f,m)=>f.concat(h(m,p)),[]);if(d.type!="seq"){if(d.type=="star"){let f=l();return c(p,f),u(h(d.expr,f),f),[c(f)]}if(d.type=="plus"){let f=l();return u(h(d.expr,p),f),u(h(d.expr,f),f),[c(f)]}if(d.type=="opt")return[c(p)].concat(h(d.expr,p));if(d.type=="range"){let f=p;for(let m=0;m<d.min;m++){let E=l();u(h(d.expr,f),E),f=E}if(d.max==-1)u(h(d.expr,f),f);else for(let m=d.min;m<d.max;m++){let E=l();c(f,E),u(h(d.expr,f),E),f=E}return[c(f)]}if(d.type=="name")return[c(p,void 0,d.value)];throw new Error("Unknown expr type")}for(let f=0;;f++){let m=h(d.exprs[f],p);if(f==d.exprs.length-1)return m;u(m,p=l())}}}(i));return function(s,a){for(let l=0,c=[s];l<c.length;l++){let u=c[l],h=!u.validEnd,d=[];for(let p=0;p<u.next.length;p++){let{type:f,next:m}=u.next[p];d.push(f.name),!h||f.isText||f.hasRequiredAttrs()||(h=!1),c.indexOf(m)==-1&&c.push(m)}h&&a.err("Only non-generatable nodes ("+d.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,r),o}matchType(t){for(let n=0;n<this.next.length;n++)if(this.next[n].type==t)return this.next[n].next;return null}matchFragment(t,n=0,r=t.childCount){let i=this;for(let o=n;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:n}=this.next[t];if(!n.isText&&!n.hasRequiredAttrs())return n}return null}compatible(t){for(let n=0;n<this.next.length;n++)for(let r=0;r<t.next.length;r++)if(this.next[n].type==t.next[r].type)return!0;return!1}fillBefore(t,n=!1,r=0){let i=[this];return function o(s,a){let l=s.matchFragment(t,r);if(l&&(!n||l.validEnd))return Y.from(a.map(c=>c.createAndFill()));for(let c=0;c<s.next.length;c++){let{type:u,next:h}=s.next[c];if(!u.isText&&!u.hasRequiredAttrs()&&i.indexOf(h)==-1){i.push(h);let d=o(h,a.concat(u));if(d)return d}}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 n=this.computeWrapping(t);return this.wrapCache.push(t,n),n}computeWrapping(t){let n=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),o=i.match;if(o.matchType(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 n||i.type&&!l.validEnd||(r.push({match:a.contentMatch,type:a,via:i}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(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 n(r){t.push(r);for(let i=0;i<r.next.length;i++)t.indexOf(r.next[i].next)==-1&&n(r.next[i].next)}(this),t.map((n,r)=>{let i=r+(n.validEnd?"*":" ")+" ";for(let o=0;o<n.next.length;o++)i+=(o?", ":"")+n.next[o].type.name+"->"+t.indexOf(n.next[o].next);return i}).join(`
|
|
8
|
+
`)}}Mr.empty=new Mr(!0);class Gg{constructor(t,n){this.string=t,this.nodeTypes=n,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 Vm(e){let t=[];do t.push(Wg(e));while(e.eat("|"));return t.length==1?t[0]:{type:"choice",exprs:t}}function Wg(e){let t=[];do t.push(Xg(e));while(e.next&&e.next!=")"&&e.next!="|");return t.length==1?t[0]:{type:"seq",exprs:t}}function Xg(e){let t=function(n){if(n.eat("(")){let r=Vm(n);return n.eat(")")||n.err("Missing closing paren"),r}if(!/\W/.test(n.next)){let r=function(i,o){let s=i.nodeTypes,a=s[o];if(a)return[a];let l=[];for(let c in s){let u=s[c];u.isInGroup(o)&&l.push(u)}return l.length==0&&i.err("No node type or group '"+o+"' found"),l}(n,n.next).map(i=>(n.inline==null?n.inline=i.isInline:n.inline!=i.isInline&&n.err("Mixing inline and block content"),{type:"name",value:i}));return n.pos++,r.length==1?r[0]:{type:"choice",exprs:r}}n.err("Unexpected token '"+n.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=Kg(e,t)}return t}function Fd(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function Kg(e,t){let n=Fd(e),r=n;return e.eat(",")&&(r=e.next!="}"?Fd(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function zm(e,t){return t-e}function Bd(e,t){let n=[];return function r(i){let o=e[i];if(o.length==1&&!o[0].term)return r(o[0].to);n.push(i);for(let s=0;s<o.length;s++){let{term:a,to:l}=o[s];a||n.indexOf(l)!=-1||r(l)}}(t),n.sort(zm)}function Ym(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Gm(e,t){let n=Object.create(null);for(let r in e){let i=t&&t[r];if(i===void 0){let o=e[r];if(!o.hasDefault)throw new RangeError("No value supplied for attribute "+r);i=o.default}n[r]=i}return n}function Wm(e,t,n,r){for(let i in t)if(!(i in e))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in e){let o=e[i];o.validate&&o.validate(t[i])}}function Xm(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new qg(e,r,t[r]);return n}let Ud=class Km{constructor(t,n,r){this.name=t,this.schema=n,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=Xm(t,r.attrs),this.defaultAttrs=Ym(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==Mr.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(t){return this.groups.indexOf(t)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let t in this.attrs)if(this.attrs[t].isRequired)return!0;return!1}compatibleContent(t){return this==t||this.contentMatch.compatible(t.contentMatch)}computeAttrs(t){return!t&&this.defaultAttrs?this.defaultAttrs:Gm(this.attrs,t)}create(t=null,n,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new br(this,this.computeAttrs(t),Y.from(n),Dt.setFrom(r))}createChecked(t=null,n,r){return n=Y.from(n),this.checkContent(n),new br(this,this.computeAttrs(t),n,Dt.setFrom(r))}createAndFill(t=null,n,r){if(t=this.computeAttrs(t),(n=Y.from(n)).size){let s=this.contentMatch.fillBefore(n);if(!s)return null;n=s.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(Y.empty,!0);return o?new br(this,t,n.append(o),Dt.setFrom(r)):null}validContent(t){let n=this.contentMatch.matchFragment(t);if(!n||!n.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)}`)}checkAttrs(t){Wm(this.attrs,t,"node",this.name)}allowsMarkType(t){return this.markSet==null||this.markSet.indexOf(t)>-1}allowsMarks(t){if(this.markSet==null)return!0;for(let n=0;n<t.length;n++)if(!this.allowsMarkType(t[n].type))return!1;return!0}allowedMarks(t){if(this.markSet==null)return t;let n;for(let r=0;r<t.length;r++)this.allowsMarkType(t[r].type)?n&&n.push(t[r]):n||(n=t.slice(0,r));return n?n.length?n:Dt.none:t}static compile(t,n){let r=Object.create(null);t.forEach((o,s)=>r[o]=new Km(o,n,s));let i=n.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let o in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class qg{constructor(t,n,r){this.hasDefault=Object.prototype.hasOwnProperty.call(r,"default"),this.default=r.default,this.validate=typeof r.validate=="string"?function(i,o,s){let a=s.split("|");return l=>{let c=l===null?"null":typeof l;if(a.indexOf(c)<0)throw new RangeError(`Expected value of type ${a} for attribute ${o} on type ${i}, got ${c}`)}}(t,n,r.validate):r.validate}get isRequired(){return!this.hasDefault}}class ua{constructor(t,n,r,i){this.name=t,this.rank=n,this.schema=r,this.spec=i,this.attrs=Xm(t,i.attrs),this.excluded=null;let o=Ym(this.attrs);this.instance=o?new Dt(this,o):null}create(t=null){return!t&&this.instance?this.instance:new Dt(this,Gm(this.attrs,t))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((o,s)=>r[o]=new ua(o,i++,n,s)),r}removeFromSet(t){for(var n=0;n<t.length;n++)t[n].type==this&&(t=t.slice(0,n).concat(t.slice(n+1)),n--);return t}isInSet(t){for(let n=0;n<t.length;n++)if(t[n].type==this)return t[n]}checkAttrs(t){Wm(this.attrs,t,"mark",this.name)}excludes(t){return this.excluded.indexOf(t)>-1}}function Hd(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],o=e.marks[i],s=o;if(o)n.push(o);else for(let a in e.marks){let l=e.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(s=l)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class _o{constructor(t,n){this.schema=t,this.rules=n,this.tags=[],this.styles=[];let r=this.matchedStyles=[];n.forEach(i=>{if(function(o){return o.tag!=null}(i))this.tags.push(i);else if(function(o){return o.style!=null}(i)){let o=/[^=]*/.exec(i.style)[0];r.indexOf(o)<0&&r.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=t.nodes[i.node];return o.contentMatch.matchType(o)})}parse(t,n={}){let r=new Vd(this,n,!1);return r.addAll(t,Dt.none,n.from,n.to),r.finish()}parseSlice(t,n={}){let r=new Vd(this,n,!0);return r.addAll(t,Dt.none,n.from,n.to),J.maxOpen(r.finish())}matchTag(t,n,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(Zg(t,o.tag)&&(o.namespace===void 0||t.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let s=o.getAttrs(t);if(s===!1)continue;o.attrs=s||void 0}return o}}}matchStyle(t,n,r,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let s=this.styles[o],a=s.style;if(!(a.indexOf(t)!=0||s.context&&!r.matchesContext(s.context)||a.length>t.length&&(a.charCodeAt(t.length)!=61||a.slice(t.length+1)!=n))){if(s.getAttrs){let l=s.getAttrs(n);if(l===!1)continue;s.attrs=l||void 0}return s}}}static schemaRules(t){let n=[];function r(i){let o=i.priority==null?50:i.priority,s=0;for(;s<n.length;s++){let a=n[s];if((a.priority==null?50:a.priority)<o)break}n.splice(s,0,i)}for(let i in t.marks){let o=t.marks[i].spec.parseDOM;o&&o.forEach(s=>{r(s=zd(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=zd(s)),s.node||s.ignore||s.mark||(s.node=i)})}return n}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new _o(t,_o.schemaRules(t)))}}const qm={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},Jg={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},jd={ol:!0,ul:!0};function $d(e,t,n){return t!=null?(t?1:0)|(t==="full"?2:0):e&&e.whitespace=="pre"?3:-5&n}class Fa{constructor(t,n,r,i,o,s){this.type=t,this.attrs=n,this.marks=r,this.solid=i,this.options=s,this.content=[],this.activeMarks=Dt.none,this.match=o||(4&s?null:t.contentMatch)}findWrapping(t){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(Y.from(t));if(!n){let r,i=this.type.contentMatch;return(r=i.findWrapping(t.type))?(this.match=i,r):null}this.match=this.type.contentMatch.matchFragment(n)}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 n=Y.from(this.content);return!t&&this.match&&(n=n.append(this.match.fillBefore(Y.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(t){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:t.parentNode&&!qm.hasOwnProperty(t.parentNode.nodeName.toLowerCase())}}class Vd{constructor(t,n,r){this.parser=t,this.options=n,this.isOpen=r,this.open=0,this.localPreserveWS=!1;let i,o=n.topNode,s=$d(null,n.preserveWhitespace,0)|(r?4:0);i=o?new Fa(o.type,o.attrs,Dt.none,!0,n.topMatch||o.type.contentMatch,s):new Fa(r?null:t.schema.topNodeType,null,Dt.none,!0,null,s),this.nodes=[i],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(t,n){t.nodeType==3?this.addTextNode(t,n):t.nodeType==1&&this.addElement(t,n)}addTextNode(t,n){let r=t.nodeValue,i=this.top,o=2&i.options?"full":this.localPreserveWS||(1&i.options)>0,{schema:s}=this.parser;if(o==="full"||i.inlineContext(t)||/[^ \t\r\n\u000c]/.test(r)){if(o)if(o==="full")r=r.replace(/\r\n?/g,`
|
|
9
|
+
`);else if(s.linebreakReplacement&&/[\r\n]/.test(r)&&this.top.findWrapping(s.linebreakReplacement.create())){let a=r.split(/\r?\n|\r/);for(let l=0;l<a.length;l++)l&&this.insertNode(s.linebreakReplacement.create(),n,!0),a[l]&&this.insertNode(s.text(a[l]),n,!/\S/.test(a[l]));r=""}else r=r.replace(/\r?\n|\r/g," ");else if(r=r.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(r)&&this.open==this.nodes.length-1){let a=i.content[i.content.length-1],l=t.previousSibling;(!a||l&&l.nodeName=="BR"||a.isText&&/[ \t\r\n\u000c]$/.test(a.text))&&(r=r.slice(1))}r&&this.insertNode(s.text(r),n,!/\S/.test(r)),this.findInText(t)}else this.findInside(t)}addElement(t,n,r){let i=this.localPreserveWS,o=this.top;(t.tagName=="PRE"||/pre/.test(t.style&&t.style.whiteSpace))&&(this.localPreserveWS=!0);let s,a=t.nodeName.toLowerCase();jd.hasOwnProperty(a)&&this.parser.normalizeLists&&function(c){for(let u=c.firstChild,h=null;u;u=u.nextSibling){let d=u.nodeType==1?u.nodeName.toLowerCase():null;d&&jd.hasOwnProperty(d)&&h?(h.appendChild(u),u=h):d=="li"?h=u:d&&(h=null)}}(t);let l=this.options.ruleFromNode&&this.options.ruleFromNode(t)||(s=this.parser.matchTag(t,this,r));t:if(l?l.ignore:Jg.hasOwnProperty(a))this.findInside(t),this.ignoreFallback(t,n);else if(!l||l.skip||l.closeParent){l&&l.closeParent?this.open=Math.max(0,this.open-1):l&&l.skip.nodeType&&(t=l.skip);let c,u=this.needsBlock;if(qm.hasOwnProperty(a))o.content.length&&o.content[0].isInline&&this.open&&(this.open--,o=this.top),c=!0,o.type||(this.needsBlock=!0);else if(!t.firstChild){this.leafFallback(t,n);break t}let h=l&&l.skip?n:this.readStyles(t,n);h&&this.addAll(t,h),c&&this.sync(o),this.needsBlock=u}else{let c=this.readStyles(t,n);c&&this.addElementByRule(t,l,c,l.consuming===!1?s:void 0)}this.localPreserveWS=i}leafFallback(t,n){t.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(t.ownerDocument.createTextNode(`
|
|
10
|
+
`),n)}ignoreFallback(t,n){t.nodeName!="BR"||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"),n,!0)}readStyles(t,n){let r=t.style;if(r&&r.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],s=r.getPropertyValue(o);if(s)for(let a;;){let l=this.parser.matchStyle(o,s,this,a);if(!l)break;if(l.ignore)return null;if(n=l.clearMark?n.filter(c=>!l.clearMark(c)):n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming!==!1)break;a=l}}return n}addElementByRule(t,n,r,i){let o,s;if(n.node)if(s=this.parser.schema.nodes[n.node],s.isLeaf)this.insertNode(s.create(n.attrs),r,t.nodeName=="BR")||this.leafFallback(t,r);else{let l=this.enter(s,n.attrs||null,r,n.preserveWhitespace);l&&(o=!0,r=l)}else{let l=this.parser.schema.marks[n.mark];r=r.concat(l.create(n.attrs))}let a=this.top;if(s&&s.isLeaf)this.findInside(t);else if(i)this.addElement(t,r,i);else if(n.getContent)this.findInside(t),n.getContent(t,this.parser.schema).forEach(l=>this.insertNode(l,r,!1));else{let l=t;typeof n.contentElement=="string"?l=t.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(t):n.contentElement&&(l=n.contentElement),this.findAround(t,l,!0),this.addAll(l,r),this.findAround(t,l,!1)}o&&this.sync(a)&&this.open--}addAll(t,n,r,i){let o=r||0;for(let s=r?t.childNodes[r]:t.firstChild,a=i==null?null:t.childNodes[i];s!=a;s=s.nextSibling,++o)this.findAtPoint(t,o),this.addDOM(s,n);this.findAtPoint(t,o)}findPlace(t,n,r){let i,o;for(let s=this.open,a=0;s>=0;s--){let l=this.nodes[s],c=l.findWrapping(t);if(c&&(!i||i.length>c.length+a)&&(i=c,o=l,!c.length))break;if(l.solid){if(r)break;a+=2}}if(!i)return null;this.sync(o);for(let s=0;s<i.length;s++)n=this.enterInner(i[s],null,n,!1);return n}insertNode(t,n,r){if(t.isInline&&this.needsBlock&&!this.top.type){let o=this.textblockFromContext();o&&(n=this.enterInner(o,null,n))}let i=this.findPlace(t,n,r);if(i){this.closeExtra();let o=this.top;o.match&&(o.match=o.match.matchType(t.type));let s=Dt.none;for(let a of i.concat(t.marks))(o.type?o.type.allowsMarkType(a.type):Yd(a.type,t.type))&&(s=a.addToSet(s));return o.content.push(t.mark(s)),!0}return!1}enter(t,n,r,i){let o=this.findPlace(t.create(n),r,!1);return o&&(o=this.enterInner(t,n,r,!0,i)),o}enterInner(t,n,r,i=!1,o){this.closeExtra();let s=this.top;s.match=s.match&&s.match.matchType(t);let a=$d(t,o,s.options);4&s.options&&s.content.length==0&&(a|=4);let l=Dt.none;return r=r.filter(c=>!(s.type?s.type.allowsMarkType(c.type):Yd(c.type,t))||(l=c.addToSet(l),!1)),this.nodes.push(new Fa(t,n,l,i,null,a)),this.open++,r}closeExtra(t=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(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 n=this.open;n>=0;n--){if(this.nodes[n]==t)return this.open=n,!0;this.localPreserveWS&&(this.nodes[n].options|=1)}return!1}get currentPos(){this.closeExtra();let t=0;for(let n=this.open;n>=0;n--){let r=this.nodes[n].content;for(let i=r.length-1;i>=0;i--)t+=r[i].nodeSize;n&&t++}return t}findAtPoint(t,n){if(this.find)for(let r=0;r<this.find.length;r++)this.find[r].node==t&&this.find[r].offset==n&&(this.find[r].pos=this.currentPos)}findInside(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&t.nodeType==1&&t.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(t,n,r){if(t!=n&&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)&&n.compareDocumentPosition(this.find[i].node)&(r?2:4)&&(this.find[i].pos=this.currentPos)}findInText(t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==t&&(this.find[n].pos=this.currentPos-(t.nodeValue.length-this.find[n].offset))}matchesContext(t){if(t.indexOf("|")>-1)return t.split(/\s*\|\s*/).some(this.matchesContext,this);let n=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 c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(s(a-1,l))return!0;return!1}{let u=l>0||l==0&&i?this.nodes[l].type:r&&l>=o?r.node(l-o).type:null;if(!u||u.name!=c&&!u.isInGroup(c))return!1;l--}}return!0};return s(n.length-1,this.open)}textblockFromContext(){let t=this.options.context;if(t)for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.indexAfter(n)).defaultType;if(r&&r.isTextblock&&r.defaultAttrs)return r}for(let n in this.parser.schema.nodes){let r=this.parser.schema.nodes[n];if(r.isTextblock&&r.defaultAttrs)return r}}}function Zg(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function zd(e){let t={};for(let n in e)t[n]=e[n];return t}function Yd(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let o=[],s=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==t||o.indexOf(u)<0&&s(u))return!0}};if(s(i.contentMatch))return!0}}class Pi{constructor(t,n){this.nodes=t,this.marks=n}serializeFragment(t,n={},r){r||(r=Ba(n).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 c=s.marks[l];if(this.marks[c.type.name]){if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}else l++}for(;a<o.length;)i=o.pop()[1];for(;l<s.marks.length;){let c=s.marks[l++],u=this.serializeMark(c,s.isInline,n);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(s,n))}),r}serializeNodeInner(t,n){let{dom:r,contentDOM:i}=ds(Ba(n),this.nodes[t.type.name](t),null,t.attrs);if(i){if(t.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(t.content,n,i)}return r}serializeNode(t,n={}){let r=this.serializeNodeInner(t,n);for(let i=t.marks.length-1;i>=0;i--){let o=this.serializeMark(t.marks[i],t.isInline,n);o&&((o.contentDOM||o.dom).appendChild(r),r=o.dom)}return r}serializeMark(t,n,r={}){let i=this.marks[t.type.name];return i&&ds(Ba(r),i(t,n),null,t.attrs)}static renderSpec(t,n,r=null,i){return ds(t,n,r,i)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new Pi(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(t){let n=Gd(t.nodes);return n.text||(n.text=r=>r.text),n}static marksFromSchema(t){return Gd(t.marks)}}function Gd(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Ba(e){return e.document||window.document}const Wd=new WeakMap;function Qg(e){let t=Wd.get(e);return t===void 0&&Wd.set(e,t=function(n){let r=null;function i(o){if(o&&typeof o=="object")if(Array.isArray(o))if(typeof o[0]=="string")r||(r=[]),r.push(o);else for(let s=0;s<o.length;s++)i(o[s]);else for(let s in o)i(o[s])}return i(n),r}(e)),t}function ds(e,t,n,r){if(typeof t=="string")return{dom:e.createTextNode(t)};if(t.nodeType!=null)return{dom:t};if(t.dom&&t.dom.nodeType!=null)return t;let i,o=t[0];if(typeof o!="string")throw new RangeError("Invalid array passed to renderSpec");if(r&&(i=Qg(r))&&i.indexOf(t)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let s,a=o.indexOf(" ");a>0&&(n=o.slice(0,a),o=o.slice(a+1));let l=n?e.createElementNS(n,o):e.createElement(o),c=t[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let h in c)if(c[h]!=null){let d=h.indexOf(" ");d>0?l.setAttributeNS(h.slice(0,d),h.slice(d+1),c[h]):h=="style"&&l.style?l.style.cssText=c[h]:l.setAttribute(h,c[h])}}for(let h=u;h<t.length;h++){let d=t[h];if(d===0){if(h<t.length-1||h>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}{let{dom:p,contentDOM:f}=ds(e,d,n,r);if(l.appendChild(p),f){if(s)throw new RangeError("Multiple content holes");s=f}}}return{dom:l,contentDOM:s}}const Jm=Math.pow(2,16);function tD(e,t){return e+t*Jm}function Xd(e){return 65535&e}class Vl{constructor(t,n,r){this.pos=t,this.delInfo=n,this.recover=r}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class Me{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&Me.empty)return Me.empty}recover(t){let n=0,r=Xd(t);if(!this.inverted)for(let i=0;i<r;i++)n+=this.ranges[3*i+2]-this.ranges[3*i+1];return this.ranges[3*r]+n+function(i){return(i-(65535&i))/Jm}(t)}mapResult(t,n=1){return this._map(t,n,!1)}map(t,n=1){return this._map(t,n,!0)}_map(t,n,r){let i=0,o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>t)break;let c=this.ranges[a+o],u=this.ranges[a+s],h=l+c;if(t<=h){let d=l+i+((c?t==l?-1:t==h?1:n:n)<0?0:u);if(r)return d;let p=t==(n<0?l:h)?null:tD(a/3,t-l),f=t==l?2:t==h?1:4;return(n<0?t!=l:t!=h)&&(f|=8),new Vl(d,f,p)}i+=u-c}return r?t+i:new Vl(t+i,0,null)}touches(t,n){let r=0,i=Xd(n),o=this.inverted?2:1,s=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?r:0);if(l>t)break;let c=this.ranges[a+o];if(t<=l+c&&a==3*i)return!0;r+=this.ranges[a+s]-c}return!1}forEach(t){let n=this.inverted?2:1,r=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let s=this.ranges[i],a=s-(this.inverted?o:0),l=s+(this.inverted?0:o),c=this.ranges[i+n],u=this.ranges[i+r];t(a,a+c,l,l+u),o+=u-c}}invert(){return new Me(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(t){return t==0?Me.empty:new Me(t<0?[0,-t,0]:[0,0,t])}}Me.empty=new Me([]);class Ao{constructor(t,n,r=0,i=t?t.length:0){this.mirror=n,this.from=r,this.to=i,this._maps=t||[],this.ownData=!(t||n)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new Ao(this._maps,this.mirror,t,n)}appendMap(t,n){this.ownData||(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),this.ownData=!0),this.to=this._maps.push(t),n!=null&&this.setMirror(this._maps.length-1,n)}appendMapping(t){for(let n=0,r=this._maps.length;n<t._maps.length;n++){let i=t.getMirror(n);this.appendMap(t._maps[n],i!=null&&i<n?r+i:void 0)}}getMirror(t){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==t)return this.mirror[n+(n%2?-1:1)]}}setMirror(t,n){this.mirror||(this.mirror=[]),this.mirror.push(t,n)}appendMappingInverted(t){for(let n=t.maps.length-1,r=this._maps.length+t._maps.length;n>=0;n--){let i=t.getMirror(n);this.appendMap(t._maps[n].invert(),i!=null&&i>n?r-i-1:void 0)}}invert(){let t=new Ao;return t.appendMappingInverted(this),t}map(t,n=1){if(this.mirror)return this._map(t,n,!0);for(let r=this.from;r<this.to;r++)t=this._maps[r].map(t,n);return t}mapResult(t,n=1){return this._map(t,n,!1)}_map(t,n,r){let i=0;for(let o=this.from;o<this.to;o++){let s=this._maps[o].mapResult(t,n);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 Vl(t,i,null)}}const Ua=Object.create(null);class pe{getMap(){return Me.empty}merge(t){return null}static fromJSON(t,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let r=Ua[n.stepType];if(!r)throw new RangeError(`No step type ${n.stepType} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Ua)throw new RangeError("Duplicate use of step JSON ID "+t);return Ua[t]=n,n.prototype.jsonID=t,n}}class zt{constructor(t,n){this.doc=t,this.failed=n}static ok(t){return new zt(t,null)}static fail(t){return new zt(null,t)}static fromReplace(t,n,r,i){try{return zt.ok(t.replace(n,r,i))}catch(o){if(o instanceof bs)return zt.fail(o.message);throw o}}}function ec(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let o=e.child(i);o.content.size&&(o=o.copy(ec(o.content,t,o))),o.isInline&&(o=t(o,n,i)),r.push(o)}return Y.fromArray(r)}class Zn extends pe{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=t.resolve(this.from),i=r.node(r.sharedDepth(this.to)),o=new J(ec(n.content,(s,a)=>s.isAtom&&a.type.allowsMarkType(this.mark.type)?s.mark(this.mark.addToSet(s.marks)):s,i),n.openStart,n.openEnd);return zt.fromReplace(t,this.from,this.to,o)}invert(){return new mn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new Zn(n.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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Zn(n.from,n.to,t.markFromJSON(n.mark))}}pe.jsonID("addMark",Zn);class mn extends pe{constructor(t,n,r){super(),this.from=t,this.to=n,this.mark=r}apply(t){let n=t.slice(this.from,this.to),r=new J(ec(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),t),n.openStart,n.openEnd);return zt.fromReplace(t,this.from,this.to,r)}invert(){return new Zn(this.from,this.to,this.mark)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deleted&&r.deleted||n.pos>=r.pos?null:new mn(n.pos,r.pos,this.mark)}merge(t){return t instanceof mn&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new mn(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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new mn(n.from,n.to,t.markFromJSON(n.mark))}}pe.jsonID("removeMark",mn);class Qn extends pe{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return zt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return zt.fromReplace(t,this.pos,this.pos+1,new J(Y.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);if(n){let r=this.mark.addToSet(n.marks);if(r.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(r))return new Qn(this.pos,n.marks[i]);return new Qn(this.pos,this.mark)}}return new xr(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new Qn(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new Qn(n.pos,t.markFromJSON(n.mark))}}pe.jsonID("addNodeMark",Qn);class xr extends pe{constructor(t,n){super(),this.pos=t,this.mark=n}apply(t){let n=t.nodeAt(this.pos);if(!n)return zt.fail("No node at mark step's position");let r=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return zt.fromReplace(t,this.pos,this.pos+1,new J(Y.from(r),0,n.isLeaf?0:1))}invert(t){let n=t.nodeAt(this.pos);return n&&this.mark.isInSet(n.marks)?new Qn(this.pos,this.mark):this}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new xr(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new xr(n.pos,t.markFromJSON(n.mark))}}pe.jsonID("removeNodeMark",xr);class oe extends pe{constructor(t,n,r,i=!1){super(),this.from=t,this.to=n,this.slice=r,this.structure=i}apply(t){return this.structure&&zl(t,this.from,this.to)?zt.fail("Structure replace would overwrite content"):zt.fromReplace(t,this.from,this.to,this.slice)}getMap(){return new Me([this.from,this.to-this.from,this.slice.size])}invert(t){return new oe(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1);return n.deletedAcross&&r.deletedAcross?null:new oe(n.pos,Math.max(n.pos,r.pos),this.slice,this.structure)}merge(t){if(!(t instanceof oe)||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 n=this.slice.size+t.slice.size==0?J.empty:new J(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new oe(t.from,this.to,n,this.structure)}}{let n=this.slice.size+t.slice.size==0?J.empty:new J(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new oe(this.from,this.to+(t.to-t.from),n,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,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new oe(n.from,n.to,J.fromJSON(t,n.slice),!!n.structure)}}pe.jsonID("replace",oe);class xe extends pe{constructor(t,n,r,i,o,s,a=!1){super(),this.from=t,this.to=n,this.gapFrom=r,this.gapTo=i,this.slice=o,this.insert=s,this.structure=a}apply(t){if(this.structure&&(zl(t,this.from,this.gapFrom)||zl(t,this.gapTo,this.to)))return zt.fail("Structure gap-replace would overwrite content");let n=t.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return zt.fail("Gap is not a flat range");let r=this.slice.insertAt(this.insert,n.content);return r?zt.fromReplace(t,this.from,this.to,r):zt.fail("Content does not fit in gap")}getMap(){return new Me([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new xe(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),o=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||o>r.pos?null:new xe(n.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,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new xe(n.from,n.to,n.gapFrom,n.gapTo,J.fromJSON(t,n.slice),n.insert,!!n.structure)}}function zl(e,t,n){let r=e.resolve(t),i=n-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 Ha(e,t,n,r=n.contentMatch,i=!0){let o=e.doc.nodeAt(t),s=[],a=t+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,h=r.matchType(c.type);if(h){r=h;for(let d=0;d<c.marks.length;d++)n.allowsMarkType(c.marks[d].type)||e.step(new mn(a,u,c.marks[d]));if(i&&c.isText&&n.whitespace!="pre"){let d,p,f=/\r?\n|\r/g;for(;d=f.exec(c.text);)p||(p=new J(Y.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),s.push(new oe(a+d.index,a+d.index+d[0].length,p))}}else s.push(new oe(a,u,J.empty));a=u}if(!r.validEnd){let l=r.fillBefore(Y.empty,!0);e.replace(a,a,new J(l,0,0))}for(let l=s.length-1;l>=0;l--)e.step(s[l])}function eD(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function nc(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let o=e.$from.node(n),s=e.$from.index(n)+r,a=e.$to.indexAfter(n)-i;if(n<e.depth&&o.canReplace(s,a,t))return n;if(n==0||o.type.spec.isolating||!eD(o,s,a))break;s&&(r=1),a<o.childCount&&(i=1)}return null}function Kd(e,t,n,r){t.forEach((i,o)=>{if(i.isText){let s,a=/\r?\n|\r/g;for(;s=a.exec(i.text);){let l=e.mapping.slice(r).map(n+1+o+s.index);e.replaceWith(l,l+1,t.type.schema.linebreakReplacement.create())}}})}function qd(e,t,n,r){t.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let s=e.mapping.slice(r).map(n+1+o);e.replaceWith(s,s+1,t.type.schema.text(`
|
|
11
|
+
`))}})}function hs(e,t,n=1,r){let i=e.resolve(t),o=i.depth-n,s=r&&r[r.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!s.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=n-2;c>o;c--,u--){let h=i.node(c),d=i.index(c);if(h.type.spec.isolating)return!1;let p=h.content.cutByIndex(d,h.childCount),f=r&&r[u+1];f&&(p=p.replaceChild(0,f.type.create(f.attrs)));let m=r&&r[u]||h;if(!h.canReplace(d+1,h.childCount)||!m.type.validContent(p))return!1}let a=i.indexAfter(o),l=r&&r[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function Jd(e,t){let n=e.resolve(t),r=n.index();return function(i,o){return!(!i||!o||i.isLeaf||!function(s,a){a.content.size||s.type.compatibleContent(a.type);let l=s.contentMatchAt(s.childCount),{linebreakReplacement:c}=s.type.schema;for(let u=0;u<a.childCount;u++){let h=a.child(u),d=h.type==c?s.type.schema.nodes.text:h.type;if(l=l.matchType(d),!l||!s.type.allowsMarks(h.marks))return!1}return l.validEnd}(i,o))}(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function rc(e,t,n=t,r=J.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),o=e.resolve(n);return Zm(i,o,r)?new oe(t,n,r):new nD(i,o,r).fit()}function Zm(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}pe.jsonID("replaceAround",xe);class nD{constructor(t,n,r){this.$from=t,this.$to=n,this.unplaced=r,this.frontier=[],this.placed=Y.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=Y.from(t.node(i).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let t=this.mustMoveInline(),n=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 J(o,s,a);return t>-1?new xe(r.pos,t,this.$to.pos,this.$to.end(),l,n):l.size||r.pos!=this.$to.pos?new oe(r.pos,i.pos,l):null}findFittable(){let t=this.unplaced.openStart;for(let n=this.unplaced.content,r=0,i=this.unplaced.openEnd;r<t;r++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=r){t=r;break}n=o.content}for(let n=1;n<=2;n++)for(let r=n==1?t:this.unplaced.openStart;r>=0;r--){let i,o=null;r?(o=ja(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:c,match:u}=this.frontier[a],h=null;if(n==1&&(s?u.matchType(s.type)||(h=u.fillBefore(Y.from(s),!1)):o&&c.compatibleContent(o.type)))return{sliceDepth:r,frontierDepth:a,parent:o,inject:h};if(n==2&&s&&(l=u.findWrapping(s.type)))return{sliceDepth:r,frontierDepth:a,parent:o,wrap:l};if(o&&u.matchType(o.type))break}}}openMore(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=ja(t,n);return!(!i.childCount||i.firstChild.isLeaf)&&(this.unplaced=new J(t,n+1,Math.max(r,i.size+n>=t.size-r?n+1:0)),!0)}dropNode(){let{content:t,openStart:n,openEnd:r}=this.unplaced,i=ja(t,n);if(i.childCount<=1&&n>0){let o=t.size-n<=n+i.size;this.unplaced=new J(Yi(t,n-1,1),n-1,o?n-1:r)}else this.unplaced=new J(Yi(t,n,1),n,r)}placeNodes({sliceDepth:t,frontierDepth:n,parent:r,inject:i,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let s=this.unplaced,a=r?r.content:s.content,l=s.openStart-t,c=0,u=[],{match:h,type:d}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)u.push(i.child(m));h=h.matchFragment(i)}let p=a.size+t-(s.content.size-s.openEnd);for(;c<a.childCount;){let m=a.child(c),E=h.matchType(m.type);if(!E)break;c++,(c>1||l==0||m.content.size)&&(h=E,u.push(Qm(m.mark(d.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?p:-1)))}let f=c==a.childCount;f||(p=-1),this.placed=Gi(this.placed,n,Y.from(u)),this.frontier[n].match=h,f&&p<0&&r&&r.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,E=a;m<p;m++){let A=E.lastChild;this.frontier.push({type:A.type,match:A.contentMatchAt(A.childCount)}),E=A.content}this.unplaced=f?t==0?J.empty:new J(Yi(s.content,t-1,1),t-1,p<0?s.openEnd:t-1):new J(Yi(s.content,t,c),s.openStart,s.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let t,n=this.frontier[this.depth];if(!n.type.isTextblock||!$a(this.$to,this.$to.depth,n.type,n.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 n=Math.min(this.depth,t.depth);n>=0;n--){let{match:r,type:i}=this.frontier[n],o=n<t.depth&&t.end(n+1)==t.pos+(t.depth-(n+1)),s=$a(t,n,i,r,o);if(s){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=$a(t,a,c,l,!0);if(!u||u.childCount)continue t}return{depth:n,fit:s,move:o?t.doc.resolve(t.after(n+1)):t}}}}close(t){let n=this.findCloseLevel(t);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=Gi(this.placed,n.depth,n.fit)),t=n.move;for(let r=n.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,n=null,r){let i=this.frontier[this.depth];i.match=i.match.matchType(t),this.placed=Gi(this.placed,this.depth,Y.from(t.create(n,r))),this.frontier.push({type:t,match:t.contentMatch})}closeFrontierNode(){let t=this.frontier.pop().match.fillBefore(Y.empty,!0);t.childCount&&(this.placed=Gi(this.placed,this.frontier.length,t))}}function Yi(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Yi(e.firstChild.content,t-1,n)))}function Gi(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(Gi(e.lastChild.content,t-1,n)))}function ja(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Qm(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Qm(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Y.empty,!0)))),e.copy(r)}function $a(e,t,n,r,i){let o=e.node(t),s=i?e.indexAfter(t):e.index(t);if(s==o.childCount&&!n.compatibleContent(o.type))return null;let a=r.fillBefore(o.content,!0,s);return a&&!function(l,c,u){for(let h=u;h<c.childCount;h++)if(!l.allowsMarks(c.child(h).marks))return!0;return!1}(n,o.content,s)?a:null}function rD(e){return e.spec.defining||e.spec.definingForContent}function tE(e,t,n,r,i){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(tE(o.content,t+1,n,r,o)))}if(t>r){let o=i.contentMatchAt(0),s=o.fillBefore(e).append(e);e=s.append(o.matchFragment(s).fillBefore(Y.empty,!0))}return e}function Zd(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let i=e.start(r);if(i<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(i==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==i-1)&&n.push(r)}return n}class ci extends pe{constructor(t,n,r){super(),this.pos=t,this.attr=n,this.value=r}apply(t){let n=t.nodeAt(this.pos);if(!n)return zt.fail("No node at attribute step's position");let r=Object.create(null);for(let o in n.attrs)r[o]=n.attrs[o];r[this.attr]=this.value;let i=n.type.create(r,null,n.marks);return zt.fromReplace(t,this.pos,this.pos+1,new J(Y.from(i),0,n.isLeaf?0:1))}getMap(){return Me.empty}invert(t){return new ci(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new ci(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new ci(n.pos,n.attr,n.value)}}pe.jsonID("attr",ci);class go extends pe{constructor(t,n){super(),this.attr=t,this.value=n}apply(t){let n=Object.create(null);for(let i in t.attrs)n[i]=t.attrs[i];n[this.attr]=this.value;let r=t.type.create(n,t.content,t.marks);return zt.ok(r)}getMap(){return Me.empty}invert(t){return new go(this.attr,t.attrs[this.attr])}map(t){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new go(n.attr,n.value)}}pe.jsonID("docAttr",go);let Wi=class extends Error{};Wi=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(Wi.prototype=Object.create(Error.prototype)).constructor=Wi,Wi.prototype.name="TransformError";class iD{constructor(t){this.doc=t,this.steps=[],this.docs=[],this.mapping=new Ao}get before(){return this.docs.length?this.docs[0]:this.doc}step(t){let n=this.maybeStep(t);if(n.failed)throw new Wi(n.failed);return this}maybeStep(t){let n=t.apply(this.doc);return n.failed||this.addStep(t,n.doc),n}get docChanged(){return this.steps.length>0}addStep(t,n){this.docs.push(this.doc),this.steps.push(t),this.mapping.appendMap(t.getMap()),this.doc=n}replace(t,n=t,r=J.empty){let i=rc(this.doc,t,n,r);return i&&this.step(i),this}replaceWith(t,n,r){return this.replace(t,n,new J(Y.from(r),0,0))}delete(t,n){return this.replace(t,n,J.empty)}insert(t,n){return this.replaceWith(t,t,n)}replaceRange(t,n,r){return function(i,o,s,a){if(!a.size)return i.deleteRange(o,s);let l=i.doc.resolve(o),c=i.doc.resolve(s);if(Zm(l,c,a))return i.step(new oe(o,s,a));let u=Zd(l,c);u[u.length-1]==0&&u.pop();let h=-(l.depth+1);u.unshift(h);for(let E=l.depth,A=l.pos-1;E>0;E--,A--){let _=l.node(E).type.spec;if(_.defining||_.definingAsContext||_.isolating)break;u.indexOf(E)>-1?h=E:l.before(E)==A&&u.splice(1,0,-E)}let d=u.indexOf(h),p=[],f=a.openStart;for(let E=a.content,A=0;;A++){let _=E.firstChild;if(p.push(_),A==a.openStart)break;E=_.content}for(let E=f-1;E>=0;E--){let A=p[E],_=rD(A.type);if(_&&!A.sameMarkup(l.node(Math.abs(h)-1)))f=E;else if(_||!A.type.isTextblock)break}for(let E=a.openStart;E>=0;E--){let A=(E+f+1)%(a.openStart+1),_=p[A];if(_)for(let g=0;g<u.length;g++){let D=u[(g+d)%u.length],S=!0;D<0&&(S=!1,D=-D);let I=l.node(D-1),T=l.index(D-1);if(I.canReplaceWith(T,T,_.type,_.marks))return i.replace(l.before(D),S?c.after(D):s,new J(tE(a.content,0,a.openStart,A),A,a.openEnd))}}let m=i.steps.length;for(let E=u.length-1;E>=0&&(i.replace(o,s,a),!(i.steps.length>m));E--){let A=u[E];A<0||(o=l.before(A),s=c.after(A))}}(this,t,n,r),this}replaceRangeWith(t,n,r){return function(i,o,s,a){if(!a.isInline&&o==s&&i.doc.resolve(o).parent.content.size){let l=function(c,u,h){let d=c.resolve(u);if(d.parent.canReplaceWith(d.index(),d.index(),h))return u;if(d.parentOffset==0)for(let p=d.depth-1;p>=0;p--){let f=d.index(p);if(d.node(p).canReplaceWith(f,f,h))return d.before(p+1);if(f>0)return null}if(d.parentOffset==d.parent.content.size)for(let p=d.depth-1;p>=0;p--){let f=d.indexAfter(p);if(d.node(p).canReplaceWith(f,f,h))return d.after(p+1);if(f<d.node(p).childCount)return null}return null}(i.doc,o,a.type);l!=null&&(o=s=l)}i.replaceRange(o,s,new J(Y.from(a),0,0))}(this,t,n,r),this}deleteRange(t,n){return function(r,i,o){let s=r.doc.resolve(i),a=r.doc.resolve(o),l=Zd(s,a);for(let c=0;c<l.length;c++){let u=l[c],h=c==l.length-1;if(h&&u==0||s.node(u).type.contentMatch.validEnd)return r.delete(s.start(u),a.end(u));if(u>0&&(h||s.node(u-1).canReplace(s.index(u-1),a.indexAfter(u-1))))return r.delete(s.before(u),a.after(u))}for(let c=1;c<=s.depth&&c<=a.depth;c++)if(i-s.start(c)==s.depth-c&&o>s.end(c)&&a.end(c)-o!=a.depth-c&&s.start(c-1)==a.start(c-1)&&s.node(c-1).canReplace(s.index(c-1),a.index(c-1)))return r.delete(s.before(c),o);r.delete(i,o)}(this,t,n),this}lift(t,n){return function(r,i,o){let{$from:s,$to:a,depth:l}=i,c=s.before(l+1),u=a.after(l+1),h=c,d=u,p=Y.empty,f=0;for(let A=l,_=!1;A>o;A--)_||s.index(A)>0?(_=!0,p=Y.from(s.node(A).copy(p)),f++):h--;let m=Y.empty,E=0;for(let A=l,_=!1;A>o;A--)_||a.after(A+1)<a.end(A)?(_=!0,m=Y.from(a.node(A).copy(m)),E++):d++;r.step(new xe(h,d,c,u,new J(p.append(m),f,E),p.size-f,!0))}(this,t,n),this}join(t,n=1){return function(r,i,o){let s=null,{linebreakReplacement:a}=r.doc.type.schema,l=r.doc.resolve(i-o),c=l.node().type;if(a&&c.inlineContent){let p=c.whitespace=="pre",f=!!c.contentMatch.matchType(a);p&&!f?s=!1:!p&&f&&(s=!0)}let u=r.steps.length;if(s===!1){let p=r.doc.resolve(i+o);qd(r,p.node(),p.before(),u)}c.inlineContent&&Ha(r,i+o-1,c,l.node().contentMatchAt(l.index()),s==null);let h=r.mapping.slice(u),d=h.map(i-o);if(r.step(new oe(d,h.map(i+o,-1),J.empty,!0)),s===!0){let p=r.doc.resolve(d);Kd(r,p.node(),p.before(),r.steps.length)}}(this,t,n),this}wrap(t,n){return function(r,i,o){let s=Y.empty;for(let c=o.length-1;c>=0;c--){if(s.size){let u=o[c].type.contentMatch.matchFragment(s);if(!u||!u.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}s=Y.from(o[c].type.create(o[c].attrs,s))}let a=i.start,l=i.end;r.step(new xe(a,l,a,l,new J(s,0,0),o.length,!0))}(this,t,n),this}setBlockType(t,n=t,r,i=null){return function(o,s,a,l,c){if(!l.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let u=o.steps.length;o.doc.nodesBetween(s,a,(h,d)=>{let p=typeof c=="function"?c(h):c;if(h.isTextblock&&!h.hasMarkup(l,p)&&function(f,m,E){let A=f.resolve(m),_=A.index();return A.parent.canReplaceWith(_,_+1,E)}(o.doc,o.mapping.slice(u).map(d),l)){let f=null;if(l.schema.linebreakReplacement){let _=l.whitespace=="pre",g=!!l.contentMatch.matchType(l.schema.linebreakReplacement);_&&!g?f=!1:!_&&g&&(f=!0)}f===!1&&qd(o,h,d,u),Ha(o,o.mapping.slice(u).map(d,1),l,void 0,f===null);let m=o.mapping.slice(u),E=m.map(d,1),A=m.map(d+h.nodeSize,1);return o.step(new xe(E,A,E+1,A-1,new J(Y.from(l.create(p,null,h.marks)),0,0),1,!0)),f===!0&&Kd(o,h,d,u),!1}})}(this,t,n,r,i),this}setNodeMarkup(t,n,r=null,i){return function(o,s,a,l,c){let u=o.doc.nodeAt(s);if(!u)throw new RangeError("No node at given position");a||(a=u.type);let h=a.create(l,null,c||u.marks);if(u.isLeaf)return o.replaceWith(s,s+u.nodeSize,h);if(!a.validContent(u.content))throw new RangeError("Invalid content for node type "+a.name);o.step(new xe(s,s+u.nodeSize,s+1,s+u.nodeSize-1,new J(Y.from(h),0,0),1,!0))}(this,t,n,r,i),this}setNodeAttribute(t,n,r){return this.step(new ci(t,n,r)),this}setDocAttribute(t,n){return this.step(new go(t,n)),this}addNodeMark(t,n){return this.step(new Qn(t,n)),this}removeNodeMark(t,n){let r=this.doc.nodeAt(t);if(!r)throw new RangeError("No node at position "+t);if(n instanceof Dt)n.isInSet(r.marks)&&this.step(new xr(t,n));else{let i,o=r.marks,s=[];for(;i=n.isInSet(o);)s.push(new xr(t,i)),o=i.removeFromSet(o);for(let a=s.length-1;a>=0;a--)this.step(s[a])}return this}split(t,n=1,r){return function(i,o,s=1,a){let l=i.doc.resolve(o),c=Y.empty,u=Y.empty;for(let h=l.depth,d=l.depth-s,p=s-1;h>d;h--,p--){c=Y.from(l.node(h).copy(c));let f=a&&a[p];u=Y.from(f?f.type.create(f.attrs,u):l.node(h).copy(u))}i.step(new oe(o,o,new J(c.append(u),s,s),!0))}(this,t,n,r),this}addMark(t,n,r){return function(i,o,s,a){let l,c,u=[],h=[];i.doc.nodesBetween(o,s,(d,p,f)=>{if(!d.isInline)return;let m=d.marks;if(!a.isInSet(m)&&f.type.allowsMarkType(a.type)){let E=Math.max(p,o),A=Math.min(p+d.nodeSize,s),_=a.addToSet(m);for(let g=0;g<m.length;g++)m[g].isInSet(_)||(l&&l.to==E&&l.mark.eq(m[g])?l.to=A:u.push(l=new mn(E,A,m[g])));c&&c.to==E?c.to=A:h.push(c=new Zn(E,A,a))}}),u.forEach(d=>i.step(d)),h.forEach(d=>i.step(d))}(this,t,n,r),this}removeMark(t,n,r){return function(i,o,s,a){let l=[],c=0;i.doc.nodesBetween(o,s,(u,h)=>{if(!u.isInline)return;c++;let d=null;if(a instanceof ua){let p,f=u.marks;for(;p=a.isInSet(f);)(d||(d=[])).push(p),f=p.removeFromSet(f)}else a?a.isInSet(u.marks)&&(d=[a]):d=u.marks;if(d&&d.length){let p=Math.min(h+u.nodeSize,s);for(let f=0;f<d.length;f++){let m,E=d[f];for(let A=0;A<l.length;A++){let _=l[A];_.step==c-1&&E.eq(l[A].style)&&(m=_)}m?(m.to=p,m.step=c):l.push({style:E,from:Math.max(h,o),to:p,step:c})}}}),l.forEach(u=>i.step(new mn(u.from,u.to,u.style)))}(this,t,n,r),this}clearIncompatible(t,n,r){return Ha(this,t,n,r),this}}const Va=Object.create(null);class gt{constructor(t,n,r){this.$anchor=t,this.$head=n,this.ranges=r||[new oD(t.min(n),t.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let t=this.ranges;for(let n=0;n<t.length;n++)if(t[n].$from.pos!=t[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(t,n=J.empty){let r=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=r,r=r.lastChild;let o=t.steps.length,s=this.ranges;for(let a=0;a<s.length;a++){let{$from:l,$to:c}=s[a],u=t.mapping.slice(o);t.replaceRange(u.map(l.pos),u.map(c.pos),a?J.empty:n),a==0&&eh(t,o,(r?r.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(t,n){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),c=l.map(s.pos),u=l.map(a.pos);o?t.deleteRange(c,u):(t.replaceRangeWith(c,u,n),eh(t,r,n.isInline?-1:1))}}static findFrom(t,n,r=!1){let i=t.parent.inlineContent?new _t(t):Jr(t.node(0),t.parent,t.pos,t.index(),n,r);if(i)return i;for(let o=t.depth-1;o>=0;o--){let s=n<0?Jr(t.node(0),t.node(o),t.before(o+1),t.index(o),n,r):Jr(t.node(0),t.node(o),t.after(o+1),t.index(o)+1,n,r);if(s)return s}return null}static near(t,n=1){return this.findFrom(t,n)||this.findFrom(t,-n)||new He(t.node(0))}static atStart(t){return Jr(t,t,0,0,1)||new He(t)}static atEnd(t){return Jr(t,t,t.content.size,t.childCount,-1)||new He(t)}static fromJSON(t,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let r=Va[n.type];if(!r)throw new RangeError(`No selection type ${n.type} defined`);return r.fromJSON(t,n)}static jsonID(t,n){if(t in Va)throw new RangeError("Duplicate use of selection JSON ID "+t);return Va[t]=n,n.prototype.jsonID=t,n}getBookmark(){return _t.between(this.$anchor,this.$head).getBookmark()}}gt.prototype.visible=!0;class oD{constructor(t,n){this.$from=t,this.$to=n}}let Qd=!1;function th(e){Qd||e.parent.inlineContent||(Qd=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class _t extends gt{constructor(t,n=t){th(t),th(n),super(t,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return gt.near(r);let i=t.resolve(n.map(this.anchor));return new _t(i.parent.inlineContent?i:r,r)}replace(t,n=J.empty){if(super.replace(t,n),n==J.empty){let r=this.$from.marksAcross(this.$to);r&&t.ensureMarks(r)}}eq(t){return t instanceof _t&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new ca(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new _t(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){let i=t.resolve(n);return new this(i,r==n?i:t.resolve(r))}static between(t,n,r){let i=t.pos-n.pos;if(r&&!i||(r=i>=0?1:-1),!n.parent.inlineContent){let o=gt.findFrom(n,r,!0)||gt.findFrom(n,-r,!0);if(!o)return gt.near(n,r);n=o.$head}return t.parent.inlineContent||(i==0||(t=(gt.findFrom(t,-r,!0)||gt.findFrom(t,r,!0)).$anchor).pos<n.pos!=i<0)&&(t=n),new _t(t,n)}}gt.jsonID("text",_t);class ca{constructor(t,n){this.anchor=t,this.head=n}map(t){return new ca(t.map(this.anchor),t.map(this.head))}resolve(t){return _t.between(t.resolve(this.anchor),t.resolve(this.head))}}class nt extends gt{constructor(t){let n=t.nodeAfter,r=t.node(0).resolve(t.pos+n.nodeSize);super(t,r),this.node=n}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),o=t.resolve(i);return r?gt.near(o):new nt(o)}content(){return new J(Y.from(this.node),0,0)}eq(t){return t instanceof nt&&t.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new ic(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new nt(t.resolve(n.anchor))}static create(t,n){return new nt(t.resolve(n))}static isSelectable(t){return!t.isText&&t.type.spec.selectable!==!1}}nt.prototype.visible=!1,gt.jsonID("node",nt);class ic{constructor(t){this.anchor=t}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new ca(r,r):new ic(r)}resolve(t){let n=t.resolve(this.anchor),r=n.nodeAfter;return r&&nt.isSelectable(r)?new nt(n):gt.near(n)}}class He extends gt{constructor(t){super(t.resolve(0),t.resolve(t.content.size))}replace(t,n=J.empty){if(n==J.empty){t.delete(0,t.doc.content.size);let r=gt.atStart(t.doc);r.eq(t.selection)||t.setSelection(r)}else super.replace(t,n)}toJSON(){return{type:"all"}}static fromJSON(t){return new He(t)}map(t){return new He(t)}eq(t){return t instanceof He}getBookmark(){return sD}}gt.jsonID("all",He);const sD={map(){return this},resolve:e=>new He(e)};function Jr(e,t,n,r,i,o=!1){if(t.inlineContent)return _t.create(e,n);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&&nt.isSelectable(a))return nt.create(e,n-(i<0?a.nodeSize:0))}else{let l=Jr(e,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function eh(e,t,n){let r=e.steps.length-1;if(r<t)return;let i,o=e.steps[r];(o instanceof oe||o instanceof xe)&&(e.mapping.maps[r].forEach((s,a,l,c)=>{i==null&&(i=c)}),e.setSelection(gt.near(e.doc.resolve(i),n)))}class aD extends iD{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 Dt.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,n){super.addStep(t,n),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,n=!0){let r=this.selection;return n&&(t=t.mark(this.storedMarks||(r.empty?r.$from.marks():r.$from.marksAcross(r.$to)||Dt.none))),r.replaceWith(this,t),this}deleteSelection(){return this.selection.replace(this),this}insertText(t,n,r){let i=this.doc.type.schema;if(n==null)return t?this.replaceSelectionWith(i.text(t),!0):this.deleteSelection();{if(r==null&&(r=n),r=r==null?n:r,!t)return this.deleteRange(n,r);let o=this.storedMarks;if(!o){let s=this.doc.resolve(n);o=r==n?s.marks():s.marksAcross(this.doc.resolve(r))}return this.replaceRangeWith(n,r,i.text(t,o)),this.selection.empty||this.setSelection(gt.near(this.selection.$to)),this}}setMeta(t,n){return this.meta[typeof t=="string"?t:t.key]=n,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 nh(e,t){return t&&e?e.bind(t):e}class Xi{constructor(t,n,r){this.name=t,this.init=nh(n.init,r),this.apply=nh(n.apply,r)}}const lD=[new Xi("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new Xi("selection",{init:(e,t)=>e.selection||gt.atStart(t.doc),apply:e=>e.selection}),new Xi("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new Xi("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t})];class za{constructor(t,n){this.schema=t,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=lD.slice(),n&&n.forEach(r=>{if(this.pluginsByKey[r.key])throw new RangeError("Adding different instances of a keyed plugin ("+r.key+")");this.plugins.push(r),this.pluginsByKey[r.key]=r,r.spec.state&&this.fields.push(new Xi(r.key,r.spec.state,r))})}}class ii{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,n=-1){for(let r=0;r<this.config.plugins.length;r++)if(r!=n){let i=this.config.plugins[r];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,t,this))return!1}return!0}applyTransaction(t){if(!this.filterTransaction(t))return{state:this,transactions:[]};let n=[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,c=i?i[s].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,r);if(u&&r.filterTransaction(u,s)){if(u.setMeta("appendedTransaction",t),!i){i=[];for(let h=0;h<this.config.plugins.length;h++)i.push(h<s?{state:r,n:n.length}:{state:this,n:0})}n.push(u),r=r.applyInner(u),o=!0}i&&(i[s]={state:r,n:n.length})}}if(!o)return{state:r,transactions:n}}}applyInner(t){if(!t.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new ii(this.config),r=this.config.fields;for(let i=0;i<r.length;i++){let o=r[i];n[o.name]=o.apply(t,this[o.name],this,n)}return n}get tr(){return new aD(this)}static create(t){let n=new za(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new ii(n);for(let i=0;i<n.fields.length;i++)r[n.fields[i].name]=n.fields[i].init(t,r);return r}reconfigure(t){let n=new za(this.schema,t.plugins),r=n.fields,i=new ii(n);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 n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.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&&(n[r]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(t,n,r){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!t.schema)throw new RangeError("Required config field 'schema' missing");let i=new za(t.schema,t.plugins),o=new ii(i);return i.fields.forEach(s=>{if(s.name=="doc")o.doc=br.fromJSON(t.schema,n.doc);else if(s.name=="selection")o.selection=gt.fromJSON(o.doc,n.selection);else if(s.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let a in r){let l=r[a],c=l.spec.state;if(l.key==s.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a))return void(o[s.name]=c.fromJSON.call(l,t,n[a],o))}o[s.name]=s.init(t,o)}}),o}}function eE(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r=="handleDOMEvents"&&(i=eE(i,t,{})),n[r]=i}return n}class da{constructor(t){this.spec=t,this.props={},t.props&&eE(t.props,this,this.props),this.key=t.key?t.key.key:nE("plugin")}getState(t){return t[this.key]}}const Ya=Object.create(null);function nE(e){return e in Ya?e+"$"+ ++Ya[e]:(Ya[e]=0,e+"$")}class ha{constructor(t="key"){this.key=nE(t)}get(t){return t.config.pluginsByKey[this.key]}getState(t){return t[this.key]}}const se=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},Ti=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t};let Yl=null;const kn=function(e,t,n){let r=Yl||(Yl=document.createRange());return r.setEnd(e,n==null?e.nodeValue.length:n),r.setStart(e,t||0),r},Fr=function(e,t,n,r){return n&&(rh(e,t,n,r,-1)||rh(e,t,n,r,1))},uD=/^(img|br|input|textarea|hr)$/i;function rh(e,t,n,r,i){for(var o;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Ge(e))){let s=e.parentNode;if(!s||s.nodeType!=1||Do(e)||uD.test(e.nodeName)||e.contentEditable=="false")return!1;t=se(e)+(i<0?0:1),e=s}else{if(e.nodeType!=1)return!1;{let s=e.childNodes[t+(i<0?-1:0)];if(s.nodeType==1&&s.contentEditable=="false"){if(!(!((o=s.pmViewDesc)===null||o===void 0)&&o.ignoreForSelection))return!1;t+=i}else e=s,t=i<0?Ge(e):0}}}}function Ge(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Do(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const pa=function(e){return e.focusNode&&Fr(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function Or(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}const On=typeof navigator!="undefined"?navigator:null,ih=typeof document!="undefined"?document:null,lr=On&&On.userAgent||"",Gl=/Edge\/(\d+)/.exec(lr),rE=/MSIE \d/.exec(lr),Wl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(lr),be=!!(rE||Wl||Gl),nr=rE?document.documentMode:Wl?+Wl[1]:Gl?+Gl[1]:0,qe=!be&&/gecko\/(\d+)/i.test(lr);qe&&(/Firefox\/(\d+)/.exec(lr)||[0,0])[1];const Xl=!be&&/Chrome\/(\d+)/.exec(lr),Qt=!!Xl,iE=Xl?+Xl[1]:0,ae=!be&&!!On&&/Apple Computer/.test(On.vendor),Ri=ae&&(/Mobile\/\w+/.test(lr)||!!On&&On.maxTouchPoints>2),Ye=Ri||!!On&&/Mac/.test(On.platform),oE=!!On&&/Win/.test(On.platform),Pn=/Android \d/.test(lr),Fo=!!ih&&"webkitFontSmoothing"in ih.documentElement.style,cD=Fo?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function dD(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function Nn(e,t){return typeof e=="number"?e:e[t]}function hD(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function oh(e,t,n){let r=e.someProp("scrollThreshold")||0,i=e.someProp("scrollMargin")||5,o=e.dom.ownerDocument;for(let s=n||e.dom;s;){if(s.nodeType!=1){s=Ti(s);continue}let a=s,l=a==o.body,c=l?dD(o):hD(a),u=0,h=0;if(t.top<c.top+Nn(r,"top")?h=-(c.top-t.top+Nn(i,"top")):t.bottom>c.bottom-Nn(r,"bottom")&&(h=t.bottom-t.top>c.bottom-c.top?t.top+Nn(i,"top")-c.top:t.bottom-c.bottom+Nn(i,"bottom")),t.left<c.left+Nn(r,"left")?u=-(c.left-t.left+Nn(i,"left")):t.right>c.right-Nn(r,"right")&&(u=t.right-c.right+Nn(i,"right")),u||h)if(l)o.defaultView.scrollBy(u,h);else{let p=a.scrollLeft,f=a.scrollTop;h&&(a.scrollTop+=h),u&&(a.scrollLeft+=u);let m=a.scrollLeft-p,E=a.scrollTop-f;t={left:t.left-m,top:t.top-E,right:t.right-m,bottom:t.bottom-E}}let d=l?"fixed":getComputedStyle(s).position;if(/^(fixed|sticky)$/.test(d))break;s=d=="absolute"?s.offsetParent:Ti(s)}}function sh(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=Ti(r));return t}function ah(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:o}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=o&&(r.scrollLeft=o)}}let Xr=null;function sE(e,t){let n,r,i,o,s=2e8,a=0,l=t.top,c=t.top;for(let u=e.firstChild,h=0;u;u=u.nextSibling,h++){let d;if(u.nodeType==1)d=u.getClientRects();else{if(u.nodeType!=3)continue;d=kn(u).getClientRects()}for(let p=0;p<d.length;p++){let f=d[p];if(f.top<=l&&f.bottom>=c){l=Math.max(f.bottom,l),c=Math.min(f.top,c);let m=f.left>t.left?f.left-t.left:f.right<t.left?t.left-f.right:0;if(m<s){n=u,s=m,r=m&&n.nodeType==3?{left:f.right<t.left?f.right:f.left,top:t.top}:t,u.nodeType==1&&m&&(a=h+(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=u,o={left:Math.max(f.left,Math.min(f.right,t.left)),top:f.top});!n&&(t.left>=f.right&&t.top>=f.top||t.left>=f.left&&t.top>=f.bottom)&&(a=h+1)}}return!n&&i&&(n=i,r=o,s=0),n&&n.nodeType==3?function(u,h){let d,p=u.nodeValue.length,f=document.createRange();for(let m=0;m<p;m++){f.setEnd(u,m+1),f.setStart(u,m);let E=Yn(f,1);if(E.top!=E.bottom&&oc(h,E)){d={node:u,offset:m+(h.left>=(E.left+E.right)/2?1:0)};break}}return f.detach(),d||{node:u,offset:0}}(n,r):!n||s&&n.nodeType==1?{node:e,offset:a}:sE(n,r)}function oc(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function aE(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),o=i;;){let s=e.childNodes[o];if(s.nodeType==1){let a=s.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(oc(t,c))return aE(s,t,c)}}if((o=(o+1)%r)==i)break}return e}function pD(e,t){let n,r=e.dom.ownerDocument,i=0,o=function(c,u,h){if(c.caretPositionFromPoint)try{let d=c.caretPositionFromPoint(u,h);if(d)return{node:d.offsetNode,offset:Math.min(Ge(d.offsetNode),d.offset)}}catch(d){}if(c.caretRangeFromPoint){let d=c.caretRangeFromPoint(u,h);if(d)return{node:d.startContainer,offset:Math.min(Ge(d.startContainer),d.startOffset)}}}(r,t.left,t.top);o&&({node:n,offset:i}=o);let s,a=(e.root.elementFromPoint?e.root:r).elementFromPoint(t.left,t.top);if(!a||!e.dom.contains(a.nodeType!=1?a.parentNode:a)){let c=e.dom.getBoundingClientRect();if(!oc(t,c)||(a=aE(e.dom,t,c),!a))return null}if(ae)for(let c=a;n&&c;c=Ti(c))c.draggable&&(n=void 0);if(a=function(c,u){let h=c.parentNode;return h&&/^li$/i.test(h.nodeName)&&u.left<c.getBoundingClientRect().left?h:c}(a,t),n){if(qe&&n.nodeType==1&&(i=Math.min(i,n.childNodes.length),i<n.childNodes.length)){let u,h=n.childNodes[i];h.nodeName=="IMG"&&(u=h.getBoundingClientRect()).right<=t.left&&u.bottom>t.top&&i++}let c;Fo&&i&&n.nodeType==1&&(c=n.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=t.top&&i--,n==e.dom&&i==n.childNodes.length-1&&n.lastChild.nodeType==1&&t.top>n.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:i!=0&&n.nodeType==1&&n.childNodes[i-1].nodeName=="BR"||(s=function(u,h,d,p){let f=-1;for(let m=h,E=!1;m!=u.dom;){let A,_=u.docView.nearestDesc(m,!0);if(!_)return null;if(_.dom.nodeType==1&&(_.node.isBlock&&_.parent||!_.contentDOM)&&((A=_.dom.getBoundingClientRect()).width||A.height)&&(_.node.isBlock&&_.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(_.dom.nodeName)&&(!E&&A.left>p.left||A.top>p.top?f=_.posBefore:(!E&&A.right<p.left||A.bottom<p.top)&&(f=_.posAfter),E=!0),!_.contentDOM&&f<0&&!_.node.isText))return(_.node.isBlock?p.top<(A.top+A.bottom)/2:p.left<(A.left+A.right)/2)?_.posBefore:_.posAfter;m=_.dom.parentNode}return f>-1?f:u.docView.posFromDOM(h,d,-1)}(e,n,i,t))}s==null&&(s=function(c,u,h){let{node:d,offset:p}=sE(u,h),f=-1;if(d.nodeType==1&&!d.firstChild){let m=d.getBoundingClientRect();f=m.left!=m.right&&h.left>(m.left+m.right)/2?1:-1}return c.docView.posFromDOM(d,p,f)}(e,a,t));let l=e.docView.nearestDesc(a,!0);return{pos:s,inside:l?l.posAtStart-l.border:-1}}function lh(e){return e.top<e.bottom||e.left<e.right}function Yn(e,t){let n=e.getClientRects();if(n.length){let r=n[t<0?0:n.length-1];if(lh(r))return r}return Array.prototype.find.call(n,lh)||e.getBoundingClientRect()}const fD=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function lE(e,t,n){let{node:r,offset:i,atom:o}=e.docView.domFromPos(t,n<0?-1:1),s=Fo||qe;if(r.nodeType==3){if(!s||!fD.test(r.nodeValue)&&(n<0?i:i!=r.nodeValue.length)){let a=i,l=i,c=n<0?1:-1;return n<0&&!i?(l++,c=-1):n>=0&&i==r.nodeValue.length?(a--,c=1):n<0?a--:l++,ji(Yn(kn(r,a,l),c),c<0)}{let a=Yn(kn(r,i,i),n);if(qe&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let l=Yn(kn(r,i-1,i-1),-1);if(l.top==a.top){let c=Yn(kn(r,i,i+1),-1);if(c.top!=a.top)return ji(c,c.left<l.left)}}return a}}if(!e.state.doc.resolve(t-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Ge(r))){let a=r.childNodes[i-1];if(a.nodeType==1)return Ga(a.getBoundingClientRect(),!1)}if(o==null&&i<Ge(r)){let a=r.childNodes[i];if(a.nodeType==1)return Ga(a.getBoundingClientRect(),!0)}return Ga(r.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Ge(r))){let a=r.childNodes[i-1],l=a.nodeType==3?kn(a,Ge(a)-(s?0:1)):a.nodeType!=1||a.nodeName=="BR"&&a.nextSibling?null:a;if(l)return ji(Yn(l,1),!1)}if(o==null&&i<Ge(r)){let a=r.childNodes[i];for(;a.pmViewDesc&&a.pmViewDesc.ignoreForCoords;)a=a.nextSibling;let l=a?a.nodeType==3?kn(a,0,s?0:1):a.nodeType==1?a:null:null;if(l)return ji(Yn(l,-1),!0)}return ji(Yn(r.nodeType==3?kn(r):r,-n),n>=0)}function ji(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Ga(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function uh(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}const mD=/[\u0590-\u08ac]/;let ch=null,dh=null,hh=!1;function ED(e,t,n){return ch==t&&dh==n?hh:(ch=t,dh=n,hh=n=="up"||n=="down"?function(r,i,o){let s=i.selection,a=o=="up"?s.$from:s.$to;return uh(r,i,()=>{let{node:l}=r.docView.domFromPos(a.pos,o=="up"?-1:1);for(;;){let u=r.docView.nearestDesc(l,!0);if(!u)break;if(u.node.isBlock){l=u.contentDOM||u.dom;break}l=u.dom.parentNode}let c=lE(r,a.pos,1);for(let u=l.firstChild;u;u=u.nextSibling){let h;if(u.nodeType==1)h=u.getClientRects();else{if(u.nodeType!=3)continue;h=kn(u,0,u.nodeValue.length).getClientRects()}for(let d=0;d<h.length;d++){let p=h[d];if(p.bottom>p.top+1&&(o=="up"?c.top-p.top>2*(p.bottom-c.top):p.bottom-c.bottom>2*(c.bottom-p.top)))return!1}}return!0})}(e,t,n):function(r,i,o){let{$head:s}=i.selection;if(!s.parent.isTextblock)return!1;let a=s.parentOffset,l=!a,c=a==s.parent.content.size,u=r.domSelection();return u?mD.test(s.parent.textContent)&&u.modify?uh(r,i,()=>{let{focusNode:h,focusOffset:d,anchorNode:p,anchorOffset:f}=r.domSelectionRange(),m=u.caretBidiLevel;u.modify("move",o,"character");let E=s.depth?r.docView.domAfterPos(s.before()):r.dom,{focusNode:A,focusOffset:_}=r.domSelectionRange(),g=A&&!E.contains(A.nodeType==1?A:A.parentNode)||h==A&&d==_;try{u.collapse(p,f),h&&(h!=p||d!=f)&&u.extend&&u.extend(h,d)}catch(D){}return m!=null&&(u.caretBidiLevel=m),g}):o=="left"||o=="backward"?l:c:s.pos==s.start()||s.pos==s.end()}(e,t,n))}class Bo{constructor(t,n,r,i){this.parent=t,this.children=n,this.dom=r,this.contentDOM=i,this.dirty=0,r.pmViewDesc=this}matchesWidget(t){return!1}matchesMark(t){return!1}matchesNode(t,n,r){return!1}matchesHack(t){return!1}parseRule(){return null}stopEvent(t){return!1}get size(){let t=0;for(let n=0;n<this.children.length;n++)t+=this.children[n].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 n=0,r=this.posAtStart;;n++){let i=this.children[n];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,n,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[n-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[n];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=n>se(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(n==0)for(let o=t;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==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,n=!1){for(let r=!0,i=t;i;i=i.parentNode){let o,s=this.getDesc(i);if(s&&(!n||s.node)){if(!r||!(o=s.nodeDOM)||(o.nodeType==1?o.contains(t.nodeType==1?t:t.parentNode):o==t))return s;r=!1}}}getDesc(t){let n=t.pmViewDesc;for(let r=n;r;r=r.parent)if(r==this)return n}posFromDOM(t,n,r){for(let i=t;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(t,n,r)}return-1}descAt(t){for(let n=0,r=0;n<this.children.length;n++){let i=this.children[n],o=r+i.size;if(r==t&&o!=r){for(;!i.border&&i.children.length;)for(let s=0;s<i.children.length;s++){let a=i.children[s];if(a.size){i=a;break}}return i}if(t<o)return i.descAt(t-r-i.border);r=o}}domFromPos(t,n){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 cE){i=t-o;break}o=a}if(i)return this.children[r].domFromPos(i-this.children[r].border,n);for(let o;r&&!(o=this.children[r-1]).size&&o instanceof uE&&o.side>=0;r--);if(n<=0){let o,s=!0;for(;o=r?this.children[r-1]:null,o&&o.dom.parentNode!=this.contentDOM;r--,s=!1);return o&&n&&s&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?se(o.dom)+1:0}}{let o,s=!0;for(;o=r<this.children.length?this.children[r]:null,o&&o.dom.parentNode!=this.contentDOM;r++,s=!1);return o&&s&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?se(o.dom):this.contentDOM.childNodes.length}}}parseRange(t,n,r=0){if(this.children.length==0)return{node:this.contentDOM,from:t,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let s=r,a=0;;a++){let l=this.children[a],c=s+l.size;if(i==-1&&t<=c){let u=s+l.border;if(t>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(t,n,u);t=s;for(let h=a;h>0;h--){let d=this.children[h-1];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(1)){i=se(d.dom)+1;break}t-=d.size}i==-1&&(i=0)}if(i>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let h=this.children[u];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(-1)){o=se(h.dom);break}n+=h.size}o==-1&&(o=this.contentDOM.childNodes.length);break}s=c}return{node:this.contentDOM,from:t,to:n,fromOffset:i,toOffset:o}}emptyChildAt(t){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[t<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(t)}domAfterPos(t){let{node:n,offset:r}=this.domFromPos(t,0);if(n.nodeType!=1||r==n.childNodes.length)throw new RangeError("No node after pos "+t);return n.childNodes[r]}setSelection(t,n,r,i=!1){let o=Math.min(t,n),s=Math.max(t,n);for(let p=0,f=0;p<this.children.length;p++){let m=this.children[p],E=f+m.size;if(o>f&&s<E)return m.setSelection(t-f-m.border,n-f-m.border,r,i);f=E}let a=this.domFromPos(t,t?-1:1),l=n==t?a:this.domFromPos(n,n?-1:1),c=r.root.getSelection(),u=r.domSelectionRange(),h=!1;if((qe||ae)&&t==n){let{node:p,offset:f}=a;if(p.nodeType==3){if(h=!(!f||p.nodeValue[f-1]!=`
|
|
12
|
+
`),h&&f==p.nodeValue.length)for(let m,E=p;E;E=E.parentNode){if(m=E.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:se(m)+1});break}let A=E.pmViewDesc;if(A&&A.node&&A.node.isBlock)break}}else{let m=p.childNodes[f-1];h=m&&(m.nodeName=="BR"||m.contentEditable=="false")}}if(qe&&u.focusNode&&u.focusNode!=l.node&&u.focusNode.nodeType==1){let p=u.focusNode.childNodes[u.focusOffset];p&&p.contentEditable=="false"&&(i=!0)}if(!(i||h&&ae)&&Fr(a.node,a.offset,u.anchorNode,u.anchorOffset)&&Fr(l.node,l.offset,u.focusNode,u.focusOffset))return;let d=!1;if((c.extend||t==n)&&(!h||!qe)){c.collapse(a.node,a.offset);try{t!=n&&c.extend(l.node,l.offset),d=!0}catch(p){}}if(!d){if(t>n){let f=a;a=l,l=f}let p=document.createRange();p.setEnd(l.node,l.offset),p.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(p)}}ignoreMutation(t){return!this.contentDOM&&t.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(t,n){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&&n>=r:t<s&&n>r){let a=r+o.border,l=s-o.border;if(t>=a&&n<=l)return this.dirty=t==r||n==s?2:1,void(t!=a||n!=l||!o.contentLost&&o.dom.parentNode==this.contentDOM?o.markDirty(t-a,n-a):o.dirty=3);o.dirty=o.dom!=o.contentDOM||o.dom.parentNode!=this.contentDOM||o.children.length?3:2}r=s}this.dirty=2}markParentsDirty(){let t=1;for(let n=this.parent;n;n=n.parent,t++){let r=t==1?2:1;n.dirty<r&&(n.dirty=r)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(t){return!1}}class uE extends Bo{constructor(t,n,r,i){let o,s=n.type.toDOM;if(typeof s=="function"&&(s=s(r,()=>o?o.parent?o.parent.posBeforeChild(o):void 0:i)),!n.type.spec.raw){if(s.nodeType!=1){let a=document.createElement("span");a.appendChild(s),s=a}s.contentEditable="false",s.classList.add("ProseMirror-widget")}super(t,[],s,null),this.widget=n,this.widget=n,o=this}matchesWidget(t){return this.dirty==0&&t.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(t){let n=this.widget.spec.stopEvent;return!!n&&n(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 ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}}class _D extends Bo{constructor(t,n,r,i){super(t,[],n,null),this.textDOM=r,this.text=i}get size(){return this.text.length}localPosFromDOM(t,n){return t!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(t){return{node:this.textDOM,offset:t}}ignoreMutation(t){return t.type==="characterData"&&t.target.nodeValue==t.oldValue}}class kr extends Bo{constructor(t,n,r,i,o){super(t,[],r,i),this.mark=n,this.spec=o}static create(t,n,r,i){let o=i.nodeViews[n.type.name],s=o&&o(n,i,r);return s&&s.dom||(s=Pi.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new kr(t,n,s.dom,s.contentDOM||s.dom,s)}parseRule(){return 3&this.dirty||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(t){return this.dirty!=3&&this.mark.eq(t)}markDirty(t,n){if(super.markDirty(t,n),this.dirty!=0){let r=this.parent;for(;!r.node;)r=r.parent;r.dirty<this.dirty&&(r.dirty=this.dirty),this.dirty=0}}slice(t,n,r){let i=kr.create(this.parent,this.mark,!0,r),o=this.children,s=this.size;n<s&&(o=ql(o,n,s,r)),t>0&&(o=ql(o,0,t,r));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}ignoreMutation(t){return this.spec.ignoreMutation?this.spec.ignoreMutation(t):super.ignoreMutation(t)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}}class rr extends Bo{constructor(t,n,r,i,o,s,a,l,c){super(t,[],o,s),this.node=n,this.outerDeco=r,this.innerDeco=i,this.nodeDOM=a}static create(t,n,r,i,o,s){let a,l=o.nodeViews[n.type.name],c=l&&l(n,o,()=>a?a.parent?a.parent.posBeforeChild(a):void 0:s,r,i),u=c&&c.dom,h=c&&c.contentDOM;if(n.isText)if(u){if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u=document.createTextNode(n.text);else u||({dom:u,contentDOM:h}=Pi.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));h||n.isText||u.nodeName=="BR"||(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let d=u;return u=pE(u,r,n),c?a=new AD(t,n,r,i,u,h||null,d,c,o,s+1):n.isText?new fa(t,n,r,i,u,d,o):new rr(t,n,r,i,u,h||null,d,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 n=this.children.length-1;n>=0;n--){let r=this.children[n];if(this.dom.contains(r.dom.parentNode)){t.contentElement=r.dom.parentNode;break}}t.contentElement||(t.getContent=()=>Y.empty)}else t.contentElement=this.contentDOM;else t.getContent=()=>this.node.content;return t}matchesNode(t,n,r){return this.dirty==0&&t.eq(this.node)&&Ls(n,this.outerDeco)&&r.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(t,n){let r=this.node.inlineContent,i=n,o=t.composing?this.localCompositionInfo(t,n):null,s=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new DD(this,s&&s.node,t);(function(c,u,h,d){let p=u.locals(c),f=0;if(p.length==0){for(let _=0;_<c.childCount;_++){let g=c.child(_);d(g,p,u.forChild(f,g),_),f+=g.nodeSize}return}let m=0,E=[],A=null;for(let _=0;;){let g,D,S,I;for(;m<p.length&&p[m].to==f;){let O=p[m++];O.widget&&(g?(D||(D=[g])).push(O):g=O)}if(g)if(D){D.sort(OD);for(let O=0;O<D.length;O++)h(D[O],_,!!A)}else h(g,_,!!A);if(A)I=-1,S=A,A=null;else{if(!(_<c.childCount))break;I=_,S=c.child(_++)}for(let O=0;O<E.length;O++)E[O].to<=f&&E.splice(O--,1);for(;m<p.length&&p[m].from<=f&&p[m].to>f;)E.push(p[m++]);let T=f+S.nodeSize;if(S.isText){let O=T;m<p.length&&p[m].from<O&&(O=p[m].from);for(let v=0;v<E.length;v++)E[v].to<O&&(O=E[v].to);O<T&&(A=S.cut(O-f),S=S.cut(0,O-f),T=O,I=-1)}else for(;m<p.length&&p[m].to<T;)m++;let C=S.isInline&&!S.isLeaf?E.filter(O=>!O.inline):E.slice();d(S,C,u.forChild(f,S),I),f=T}})(this.node,this.innerDeco,(c,u,h)=>{c.spec.marks?l.syncToMarks(c.spec.marks,r,t,u):c.type.side>=0&&!h&&l.syncToMarks(u==this.node.childCount?Dt.none:this.node.child(u).marks,r,t,u),l.placeWidget(c,t,i)},(c,u,h,d)=>{let p;l.syncToMarks(c.marks,r,t,d),l.findNodeMatch(c,u,h,d)||a&&t.state.selection.from>i&&t.state.selection.to<i+c.nodeSize&&(p=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,u,h,p,t)||l.updateNextNode(c,u,h,t,d,i)||l.addNode(c,u,h,t,i),i+=c.nodeSize}),l.syncToMarks([],r,t,0),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==2)&&(s&&this.protectLocalComposition(t,s),dE(this.contentDOM,this.children,t),Ri&&function(c){if(c.nodeName=="UL"||c.nodeName=="OL"){let u=c.style.cssText;c.style.cssText=u+"; list-style: square !important",window.getComputedStyle(c).listStyle,c.style.cssText=u}}(this.dom))}localCompositionInfo(t,n){let{from:r,to:i}=t.state.selection;if(!(t.state.selection instanceof _t)||r<n||i>n+this.node.content.size)return null;let o=t.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let s=o.nodeValue,a=function(l,c,u,h){for(let d=0,p=0;d<l.childCount&&p<=h;){let f=l.child(d++),m=p;if(p+=f.nodeSize,!f.isText)continue;let E=f.text;for(;d<l.childCount;){let A=l.child(d++);if(p+=A.nodeSize,!A.isText)break;E+=A.text}if(p>=u){if(p>=h&&E.slice(h-c.length-m,h-m)==c)return h-c.length;let A=m<h?E.lastIndexOf(c,h-m-1):-1;if(A>=0&&A+c.length+m>=u)return m+A;if(u==h&&E.length>=h+c.length-m&&E.slice(h-m,h-m+c.length)==c)return h}}return-1}(this.node.content,s,r-n,i-n);return a<0?null:{node:o,pos:a,text:s}}return{node:o,pos:-1,text:""}}protectLocalComposition(t,{node:n,pos:r,text:i}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let s=new _D(this,o,n,i);t.input.compositionNodes.push(s),this.children=ql(this.children,r,r+i.length,t,s)}update(t,n,r,i){return!(this.dirty==3||!t.sameMarkup(this.node))&&(this.updateInner(t,n,r,i),!0)}updateInner(t,n,r,i){this.updateOuterDeco(n),this.node=t,this.innerDeco=r,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=0}updateOuterDeco(t){if(Ls(t,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,r=this.dom;this.dom=hE(this.dom,this.nodeDOM,Kl(this.outerDeco,this.node,n),Kl(t,this.node,n)),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.nodeDOM.draggable=!0))}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),!this.contentDOM&&this.node.type.spec.draggable||this.nodeDOM.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function ph(e,t,n,r,i){pE(r,t,e);let o=new rr(void 0,e,t,n,r,r,r,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class fa extends rr{constructor(t,n,r,i,o,s,a){super(t,n,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,n,r,i){return!(this.dirty==3||this.dirty!=0&&!this.inParent()||!t.sameMarkup(this.node))&&(this.updateOuterDeco(n),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 n=this.nodeDOM;n;n=n.parentNode)if(n==t)return!0;return!1}domFromPos(t){return{node:this.nodeDOM,offset:t}}localPosFromDOM(t,n,r){return t==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(t,n,r)}ignoreMutation(t){return t.type!="characterData"&&t.type!="selection"}slice(t,n,r){let i=this.node.cut(t,n),o=document.createTextNode(i.text);return new fa(this.parent,i,this.outerDeco,this.innerDeco,o,o,r)}markDirty(t,n){super.markDirty(t,n),this.dom==this.nodeDOM||t!=0&&n!=this.nodeDOM.nodeValue.length||(this.dirty=3)}get domAtom(){return!1}isText(t){return this.node.text==t}}class cE extends Bo{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 AD extends rr{constructor(t,n,r,i,o,s,a,l,c,u){super(t,n,r,i,o,s,a,c,u),this.spec=l}update(t,n,r,i){if(this.dirty==3)return!1;if(this.spec.update&&(this.node.type==t.type||this.spec.multiType)){let o=this.spec.update(t,n,r);return o&&this.updateInner(t,n,r,i),o}return!(!this.contentDOM&&!t.isLeaf)&&super.update(t,n,r,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(t,n,r,i){this.spec.setSelection?this.spec.setSelection(t,n,r.root):super.setSelection(t,n,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 dE(e,t,n){let r=e.firstChild,i=!1;for(let o=0;o<t.length;o++){let s=t[o],a=s.dom;if(a.parentNode==e){for(;a!=r;)r=fh(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(a,r);if(s instanceof kr){let l=r?r.previousSibling:e.lastChild;dE(s.contentDOM,s.children,n),r=l?l.nextSibling:e.firstChild}}for(;r;)r=fh(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}const no=function(e){e&&(this.nodeName=e)};no.prototype=Object.create(null);const Sr=[new no];function Kl(e,t,n){if(e.length==0)return Sr;let r=n?Sr[0]:new no,i=[r];for(let o=0;o<e.length;o++){let s=e[o].type.attrs;if(s){s.nodeName&&i.push(r=new no(s.nodeName));for(let a in s){let l=s[a];l!=null&&(n&&i.length==1&&i.push(r=new no(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 hE(e,t,n,r){if(n==Sr&&r==Sr)return t;let i=t;for(let o=0;o<r.length;o++){let s=r[o],a=n[o];if(o){let l;a&&a.nodeName==s.nodeName&&i!=e&&(l=i.parentNode)&&l.nodeName.toLowerCase()==s.nodeName||(l=document.createElement(s.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=Sr[0]),i=l}gD(i,a||Sr[0],s)}return i}function gD(e,t,n){for(let r in t)r=="class"||r=="style"||r=="nodeName"||r in n||e.removeAttribute(r);for(let r in n)r!="class"&&r!="style"&&r!="nodeName"&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<r.length;o++)i.indexOf(r[o])==-1&&e.classList.remove(r[o]);for(let o=0;o<i.length;o++)r.indexOf(i[o])==-1&&e.classList.add(i[o]);e.classList.length==0&&e.removeAttribute("class")}if(t.style!=n.style){if(t.style){let r,i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g;for(;r=i.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function pE(e,t,n){return hE(e,e,Sr,Kl(t,n,e.nodeType!=1))}function Ls(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function fh(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}class DD{constructor(t,n,r){this.lock=n,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,c=new Map,u=[];t:for(;l>0;){let h;for(;;)if(a){let p=s.children[a-1];if(!(p instanceof kr)){h=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 d=h.node;if(d){if(d!=i.child(l-1))break;--l,c.set(h,l),u.push(h)}}return{index:l,matched:c,matches:u.reverse()}}(t.node.content,t)}destroyBetween(t,n){if(t!=n){for(let r=t;r<n;r++)this.top.children[r].destroy();this.top.children.splice(t,n-t),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(t,n,r,i){let o=0,s=this.stack.length>>1,a=Math.min(s,t.length);for(;o<a&&(o==s-1?this.top:this.stack[o+1<<1]).matchesMark(t[o])&&t[o].type.spec.spanning!==!1;)o++;for(;o<s;)this.destroyRest(),this.top.dirty=0,this.index=this.stack.pop(),this.top=this.stack.pop(),s--;for(;s<t.length;){this.stack.push(this.top,this.index+1);let l=-1,c=this.top.children.length;i<this.preMatch.index&&(c=Math.min(this.index+3,c));for(let u=this.index;u<c;u++){let h=this.top.children[u];if(h.matchesMark(t[s])&&!this.isLocked(h.dom)){l=u;break}}if(l>-1)l>this.index&&(this.changed=!0,this.destroyBetween(this.index,l)),this.top=this.top.children[this.index];else{let u=kr.create(this.top,t[s],n,r);this.top.children.splice(this.index,0,u),this.top=u,this.changed=!0}this.index=0,s++}}findNodeMatch(t,n,r,i){let o,s=-1;if(i>=this.preMatch.index&&(o=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&o.matchesNode(t,n,r))s=this.top.children.indexOf(o,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(t,n,r)&&!this.preMatch.matched.has(c)){s=a;break}}return!(s<0)&&(this.destroyBetween(this.index,s),this.index++,!0)}updateNodeAt(t,n,r,i,o){let s=this.top.children[i];return s.dirty==3&&s.dom==s.contentDOM&&(s.dirty=2),!!s.update(t,n,r,o)&&(this.destroyBetween(this.index,i),this.index++,!0)}findIndexWithChild(t){for(;;){let n=t.parentNode;if(!n)return-1;if(n==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=n}}updateNextNode(t,n,r,i,o,s){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof rr){let c=this.preMatch.matched.get(l);if(c!=null&&c!=o)return!1;let u,h=l.dom,d=this.isLocked(h)&&!(t.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==t.text&&l.dirty!=3&&Ls(n,l.outerDeco));if(!d&&l.update(t,n,r,i))return this.destroyBetween(this.index,a),l.dom!=h&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(l,t,n,r,i,s)))return this.destroyBetween(this.index,a),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=2,u.updateChildren(i,s+1),u.dirty=0),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(t,n,r,i,o,s){if(t.dirty||n.isAtom||!t.children.length||!t.node.content.eq(n.content)||!Ls(r,t.outerDeco)||!i.eq(t.innerDeco))return null;let a=rr.create(this.top,n,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,n,r,i,o){let s=rr.create(this.top,t,n,r,i,o);s.contentDOM&&s.updateChildren(i,o+1),this.top.children.splice(this.index++,0,s),this.changed=!0}placeWidget(t,n,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 uE(this.top,t,n,r);this.top.children.splice(this.index++,0,o),this.changed=!0}else this.index++}addTextblockHacks(){let t=this.top.children[this.index-1],n=this.top;for(;t instanceof kr;)n=t,t=n.children[n.children.length-1];(!t||!(t instanceof fa)||/\n$/.test(t.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(t.node.text))&&((ae||Qt)&&t&&t.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(t,n){if(n==this.top&&this.index<n.children.length&&n.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 cE(this.top,[],r,null);n!=this.top?n.children.push(i):n.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 OD(e,t){return e.type.side-t.type.side}function ql(e,t,n,r,i){let o=[];for(let s=0,a=0;s<e.length;s++){let l=e[s],c=a,u=a+=l.size;c>=n||u<=t?o.push(l):(c<t&&o.push(l.slice(0,t-c,r)),i&&(o.push(i),i=void 0),u>n&&o.push(l.slice(n-c,l.size,r)))}return o}function sc(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),o=i&&i.size==0,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(pa(n)){for(a=s;i&&!i.node;)i=i.parent;let h=i.node;if(i&&h.isAtom&&nt.isSelectable(h)&&i.parent&&(!h.isInline||!function(d,p,f){for(let m=p==0,E=p==Ge(d);m||E;){if(d==f)return!0;let A=se(d);if(!(d=d.parentNode))return!1;m=m&&A==0,E=E&&A==Ge(d)}}(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;l=new nt(s==d?c:r.resolve(d))}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let h=s,d=s;for(let p=0;p<n.rangeCount;p++){let f=n.getRangeAt(p);h=Math.min(h,e.docView.posFromDOM(f.startContainer,f.startOffset,1)),d=Math.max(d,e.docView.posFromDOM(f.endContainer,f.endOffset,-1))}if(h<0)return null;[a,s]=d==e.state.selection.anchor?[d,h]:[h,d],c=r.resolve(s)}else a=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(a<0)return null}let u=r.resolve(a);return l||(l=ac(e,u,c,t=="pointer"||e.state.selection.head<c.pos&&!o?1:-1)),l}function mh(e){return e.editable?e.hasFocus():mE(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function Fn(e,t=!1){let n=e.state.selection;if(fE(e,n),mh(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Qt){let r=e.domSelectionRange(),i=e.domObserver.currentSelection;if(r.anchorNode&&i.anchorNode&&Fr(r.anchorNode,r.anchorOffset,i.anchorNode,i.anchorOffset))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}if(e.domObserver.disconnectSelection(),e.cursorWrapper)(function(r){let i=r.domSelection();if(!i)return;let o=r.cursorWrapper.dom,s=o.nodeName=="IMG";s?i.collapse(o.parentNode,se(o)+1):i.collapse(o,0),!s&&!r.state.selection.visible&&be&&nr<=11&&(o.disabled=!0,o.disabled=!1)})(e);else{let r,i,{anchor:o,head:s}=n;!Eh||n instanceof _t||(n.$from.parent.inlineContent||(r=_h(e,n.from)),n.empty||n.$from.parent.inlineContent||(i=_h(e,n.to))),e.docView.setSelection(o,s,e,t),Eh&&(r&&Ah(r),i&&Ah(i)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(a){let l=a.dom.ownerDocument;l.removeEventListener("selectionchange",a.input.hideSelectionGuard);let c=a.domSelectionRange(),u=c.anchorNode,h=c.anchorOffset;l.addEventListener("selectionchange",a.input.hideSelectionGuard=()=>{c.anchorNode==u&&c.anchorOffset==h||(l.removeEventListener("selectionchange",a.input.hideSelectionGuard),setTimeout(()=>{mh(a)&&!a.state.selection.visible||a.dom.classList.remove("ProseMirror-hideselection")},20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const Eh=ae||Qt&&iE<63;function _h(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,o=r?n.childNodes[r-1]:null;if(ae&&i&&i.contentEditable=="false")return Wa(i);if(!(i&&i.contentEditable!="false"||o&&o.contentEditable!="false")){if(i)return Wa(i);if(o)return Wa(o)}}function Wa(e){return e.contentEditable="true",ae&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function Ah(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function fE(e,t){if(t instanceof nt){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(gh(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else gh(e)}function gh(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function ac(e,t,n,r){return e.someProp("createSelectionBetween",i=>i(e,t,n))||_t.between(t,n,r)}function Dh(e){return!(e.editable&&!e.hasFocus())&&mE(e)}function mE(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return e.dom.contains(t.anchorNode.nodeType==3?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(t.focusNode.nodeType==3?t.focusNode.parentNode:t.focusNode))}catch(n){return!1}}function Jl(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),o=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return o&>.findFrom(o,t)}function Wn(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Oh(e,t,n){let r=e.state.selection;if(!(r instanceof _t)){if(r instanceof nt&&r.node.isInline)return Wn(e,new _t(t>0?r.$to:r.$from));{let i=Jl(e.state,t);return!!i&&Wn(e,i)}}if(n.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=e.state.doc.resolve(i.pos+o.nodeSize*(t<0?-1:1));return Wn(e,new _t(r.$anchor,s))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?"forward":"backward")){let i=Jl(e.state,t);return!!(i&&i instanceof nt)&&Wn(e,i)}if(!(Ye&&n.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=e.docView.descAt(a))&&!i.contentDOM)&&(nt.isSelectable(s)?Wn(e,new nt(t<0?e.state.doc.resolve(o.pos-s.nodeSize):o)):!!Fo&&Wn(e,new _t(e.state.doc.resolve(t<0?a:a+s.nodeSize))))}}function Jo(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function $i(e,t){let n=e.pmViewDesc;return n&&n.size==0&&(t<0||e.nextSibling||e.nodeName!="BR")}function Kr(e,t){return t<0?function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=!1;for(qe&&i.nodeType==1&&o<Jo(i)&&$i(i.childNodes[o],-1)&&(l=!0);;)if(o>0){if(i.nodeType!=1)break;{let c=i.childNodes[o-1];if($i(c,-1))s=i,a=--o;else{if(c.nodeType!=3)break;i=c,o=i.nodeValue.length}}}else{if(vh(i))break;{let c=i.previousSibling;for(;c&&$i(c,-1);)s=i.parentNode,a=se(c),c=c.previousSibling;if(c)i=c,o=Jo(i);else{if(i=i.parentNode,i==n.dom)break;o=0}}}l?Xa(n,i,o):s&&Xa(n,s,a)}(e):function(n){let r=n.domSelectionRange(),i=r.focusNode,o=r.focusOffset;if(!i)return;let s,a,l=Jo(i);for(;;)if(o<l){if(i.nodeType!=1||!$i(i.childNodes[o],1))break;s=i,a=++o}else{if(vh(i))break;{let c=i.nextSibling;for(;c&&$i(c,1);)s=c.parentNode,a=se(c)+1,c=c.nextSibling;if(c)i=c,o=0,l=Jo(i);else{if(i=i.parentNode,i==n.dom)break;o=l=0}}}s&&Xa(n,s,a)}(e)}function vh(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Xa(e,t,n){if(t.nodeType!=3){let o,s;(s=function(a,l){for(;a&&l==a.childNodes.length&&!Do(a);)l=se(a)+1,a=a.parentNode;for(;a&&l<a.childNodes.length;){let c=a.childNodes[l];if(c.nodeType==3)return c;if(c.nodeType==1&&c.contentEditable=="false")break;a=c,l=0}}(t,n))?(t=s,n=0):(o=function(a,l){for(;a&&!l&&!Do(a);)l=se(a),a=a.parentNode;for(;a&&l;){let c=a.childNodes[l-1];if(c.nodeType==3)return c;if(c.nodeType==1&&c.contentEditable=="false")break;l=(a=c).childNodes.length}}(t,n))&&(t=o,n=o.nodeValue.length)}let r=e.domSelection();if(!r)return;if(pa(r)){let o=document.createRange();o.setEnd(t,n),o.setStart(t,n),r.removeAllRanges(),r.addRange(o)}else r.extend&&r.extend(t,n);e.domObserver.setCurSelection();let{state:i}=e;setTimeout(()=>{e.state==i&&Fn(e)},50)}function Sh(e,t){let n=e.state.doc.resolve(t);if(!Qt&&!oE&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let i=e.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<n.end()){let i=e.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(e.dom).direction=="rtl"?"rtl":"ltr"}function Th(e,t,n){let r=e.state.selection;if(r instanceof _t&&!r.empty||n.indexOf("s")>-1||Ye&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let s=Jl(e.state,t);if(s&&s instanceof nt)return Wn(e,s)}if(!i.parent.inlineContent){let s=t<0?i:o,a=r instanceof He?gt.near(s,t):gt.findFrom(s,t);return!!a&&Wn(e,a)}return!1}function Rh(e,t){if(!(e.state.selection instanceof _t))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let o=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let s=e.state.tr;return t<0?s.delete(n.pos-o.nodeSize,n.pos):s.delete(n.pos,n.pos+o.nodeSize),e.dispatch(s),!0}return!1}function Ih(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function vD(e,t){let n=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(n==8||Ye&&n==72&&r=="c")return Rh(e,-1)||Kr(e,-1);if(n==46&&!t.shiftKey||Ye&&n==68&&r=="c")return Rh(e,1)||Kr(e,1);if(n==13||n==27)return!0;if(n==37||Ye&&n==66&&r=="c"){let i=n==37?Sh(e,e.state.selection.from)=="ltr"?-1:1:-1;return Oh(e,i,r)||Kr(e,i)}if(n==39||Ye&&n==70&&r=="c"){let i=n==39?Sh(e,e.state.selection.from)=="ltr"?1:-1:1;return Oh(e,i,r)||Kr(e,i)}return n==38||Ye&&n==80&&r=="c"?Th(e,-1,r)||Kr(e,-1):n==40||Ye&&n==78&&r=="c"?function(i){if(!ae||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;Ih(i,a,"true"),setTimeout(()=>Ih(i,a,"false"),20)}return!1}(e)||Th(e,1,r)||Kr(e,1):r==(Ye?"m":"c")&&(n==66||n==73||n==89||n==90)}function lc(e,t){e.someProp("transformCopied",p=>{t=p(t,e)});let n=[],{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;n.push(p.type.name,p.attrs!=p.type.defaultAttrs?p.attrs:null),r=p.content}let s=e.someProp("clipboardSerializer")||Pi.fromSchema(e.state.schema),a=OE(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,h=0;for(;u&&u.nodeType==1&&(c=DE[u.nodeName.toLowerCase()]);){for(let p=c.length-1;p>=0;p--){let f=a.createElement(c[p]);for(;l.firstChild;)f.appendChild(l.firstChild);l.appendChild(f),h++}u=l.firstChild}u&&u.nodeType==1&&u.setAttribute("data-pm-slice",`${i} ${o}${h?` -${h}`:""} ${JSON.stringify(n)}`);let d=e.someProp("clipboardTextSerializer",p=>p(t,e))||t.content.textBetween(0,t.content.size,`
|
|
13
13
|
|
|
14
|
-
`);return{dom:l,text:d,slice:t}}function
|
|
15
|
-
`))),0,0),e.someProp("transformPasted",d=>{s=d(s,e,!0)}),s;let h=e.someProp("clipboardTextParser",d=>d(t,i,r,e));if(h)s=h;else{let d=i.marks(),{schema:p}=e.state,f=wi.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,d)))})}}else e.someProp("transformPastedHTML",h=>{n=h(n,e)}),o=function(h){let d=/^(\s*<meta [^>]*>)*/.exec(h);d&&(h=h.slice(d[0].length));let p,f=EE().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(h);if((p=m&&mE[m[1].toLowerCase()])&&(h=p.map(E=>"<"+E+">").join("")+h+p.map(E=>"</"+E+">").reverse().join("")),f.innerHTML=function(E){let A=window.trustedTypes;return A?(Wa||(Wa=A.defaultPolicy||A.createPolicy("ProseMirrorClipboard",{createHTML:_=>_})),Wa.createHTML(E)):E}(h),p)for(let E=0;E<p.length;E++)f=f.querySelector(p[E])||f;return f}(n),Mo&&function(h){let d=h.querySelectorAll(Jt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let p=0;p<d.length;p++){let f=d[p];f.childNodes.length==1&&f.textContent==" "&&f.parentNode&&f.parentNode.replaceChild(h.ownerDocument.createTextNode(" "),f)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let h=+u[3];h>0;h--){let d=o.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;o=d}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||mo.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!u),context:i,ruleFromNode:d=>d.nodeName!="BR"||d.nextSibling||!d.parentNode||ED.test(d.parentNode.nodeName)?null:{ignore:!0}})),u)s=function(h,d){if(!h.size)return h;let p,f=h.content.firstChild.type.schema;try{p=JSON.parse(d)}catch(_){return h}let{content:m,openStart:E,openEnd:A}=h;for(let _=p.length-2;_>=0;_-=2){let g=f.nodes[p[_]];if(!g||g.hasRequiredAttrs())break;m=Y.from(g.create(p[_+1],m)),E++,A++}return new J(m,E,A)}(vh(s,+u[1],+u[2]),u[4]);else if(s=J.maxOpen(function(h,d){if(h.childCount<2)return h;for(let p=d.depth;p>=0;p--){let f,m=d.node(p).contentMatchAt(d.index(p)),E=[];if(h.forEach(A=>{if(!E)return;let _,g=m.findWrapping(A.type);if(!g)return E=null;if(_=E.length&&f.length&&pE(g,f,A,E[E.length-1],0))E[E.length-1]=_;else{E.length&&(E[E.length-1]=fE(E[E.length-1],f.length));let v=hE(A,g);E.push(v),m=m.matchType(v.type),f=g}}),E)return Y.from(E)}return h}(s.content,i),!0),s.openStart||s.openEnd){let h=0,d=0;for(let p=s.content.firstChild;h<s.openStart&&!p.type.spec.isolating;h++,p=p.firstChild);for(let p=s.content.lastChild;d<s.openEnd&&!p.type.spec.isolating;d++,p=p.lastChild);s=vh(s,h,d)}return e.someProp("transformPasted",h=>{s=h(s,e,l)}),s}const ED=/^(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 hE(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Y.from(e));return e}function pE(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=pE(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Y.from(hE(n,e,i+1))))}}function fE(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,fE(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Y.empty,!0);return e.copy(n.append(r))}function ql(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(o=0),i<r-1&&(a=ql(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Y.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function vh(e,t,n){return t<e.openStart&&(e=new J(ql(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new J(ql(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const mE={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 Sh=null;function EE(){return Sh||(Sh=document.implementation.createHTMLDocument("title"))}let Wa=null;const ge={},Oe={},_D={touchstart:!0,touchmove:!0};class AD{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function Zn(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Xa(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Jl(e,r))})}function Jl(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function gD(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function ws(e){return{left:e.clientX,top:e.clientY}}function sc(e,t,n,r,i){if(r==-1)return!1;let o=e.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(e.someProp(t,a=>s>o.depth?a(e,n,o.nodeAfter,o.before(s),i,!0):a(e,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function li(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function DD(e,t,n,r,i){return sc(e,"handleClickOn",t,n,r)||e.someProp("handleClick",o=>o(e,t,r))||(i?function(o,s){if(s==-1)return!1;let a,l,c=o.state.selection;c instanceof nt&&(a=c.node);let u=o.state.doc.resolve(s);for(let h=u.depth+1;h>0;h--){let d=h>u.depth?u.nodeAfter:u.node(h);if(nt.isSelectable(d)){l=a&&c.$from.depth>0&&h>=c.$from.depth&&u.before(c.$from.depth+1)==c.$from.pos?u.before(c.$from.depth):u.before(h);break}}return l!=null&&(li(o,nt.create(o.state.doc,l)),!0)}(e,n):function(o,s){if(s==-1)return!1;let a=o.state.doc.resolve(s),l=a.nodeAfter;return!!(l&&l.isAtom&&nt.isSelectable(l))&&(li(o,new nt(a)),!0)}(e,n))}function OD(e,t,n,r){return sc(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function vD(e,t,n,r){return sc(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||function(i,o,s){if(s.button!=0)return!1;let a=i.state.doc;if(o==-1)return!!a.inlineContent&&(li(i,Et.create(a,0,a.content.size)),!0);let l=a.resolve(o);for(let c=l.depth+1;c>0;c--){let u=c>l.depth?l.nodeAfter:l.node(c),h=l.before(c);if(u.inlineContent)li(i,Et.create(a,h+1,h+1+u.content.size));else{if(!nt.isSelectable(u))continue;li(i,nt.create(a,h))}return!0}}(e,n,r)}function Zl(e){return Ls(e)}Oe.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Th(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!wn||!Jt||n.keyCode!=13))if(n.keyCode!=229&&e.domObserver.forceFlush(),!Ti||n.keyCode!=13||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",r=>r(e,n))||mD(e,n)?n.preventDefault():Zn(e,"key");else{let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,gr(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},Oe.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},Oe.keypress=(e,t)=>{let n=t;if(Th(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ye&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n)))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof Et&&r.$from.sameParent(r.$to))){let i=String.fromCharCode(n.charCode),o=()=>e.state.tr.insertText(i).scrollIntoView();/[\r\n]/.test(i)||e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,i,o))||e.dispatch(o()),n.preventDefault()}};const _E=Ye?"metaKey":"ctrlKey";ge.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Zl(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&function(a,l){let c=l.x-a.clientX,u=l.y-a.clientY;return c*c+u*u<100}(n,e.input.lastClick)&&!n[_E]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o,button:n.button};let s=e.posAtCoords(ws(n));s&&(o=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new SD(e,s,n,!!r)):(o=="doubleClick"?OD:vD)(e,s.pos,s.inside,n)?n.preventDefault():Zn(e,"pointer"))};class SD{constructor(t,n,r,i){let o,s;if(this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[_E],this.allowDefault=r.shiftKey,n.inside>-1)o=t.state.doc.nodeAt(n.inside),s=n.inside;else{let u=t.state.doc.resolve(n.pos);o=u.parent,s=u.depth?u.before():0}const a=i?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=t.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof nt&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Ke||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)),Zn(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(()=>Mn(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(ws(t))),this.updateAllowDefault(t),this.allowDefault||!n?Zn(this.view,"pointer"):DD(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||se&&this.mightDrag&&!this.mightDrag.node.isAtom||Jt&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(li(this.view,_t.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):Zn(this.view,"pointer")}move(t){this.updateAllowDefault(t),Zn(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 Th(e,t){return!!e.composing||!!(se&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}ge.touchstart=e=>{e.input.lastTouch=Date.now(),Zl(e),Zn(e,"pointer")},ge.touchmove=e=>{e.input.lastTouch=Date.now(),Zn(e,"pointer")},ge.contextmenu=e=>Zl(e);const TD=wn?5e3:-1;function Rh(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Ls(e),t))}function AE(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function RD(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(i,o){for(;;){if(i.nodeType==3&&o)return i;if(i.nodeType==1&&o>0){if(i.contentEditable=="false")return null;o=Ge(i=i.childNodes[o-1])}else{if(!i.parentNode||Ao(i))return null;o=oe(i),i=i.parentNode}}}(t.focusNode,t.focusOffset),r=function(i,o){for(;;){if(i.nodeType==3&&o<i.nodeValue.length)return i;if(i.nodeType==1&&o<i.childNodes.length){if(i.contentEditable=="false")return null;i=i.childNodes[o],o=0}else{if(!i.parentNode||Ao(i))return null;o=oe(i)+1,i=i.parentNode}}}(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=e.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(s&&s.isText(n.nodeValue))return r}}return n||r}function Ls(e,t=!1){if(!(wn&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),AE(e),t||e.docView&&e.docView.dirty){let n=rc(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):!e.markCursor&&!t||r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.updateState(e.state):e.dispatch(e.state.tr.deleteSelection()),!0}return!1}}Oe.compositionstart=Oe.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof Et&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Jt&&tE&&function(r){let{focusNode:i,focusOffset:o}=r.domSelectionRange();if(!i||i.nodeType!=1||o>=i.childNodes.length)return!1;let s=i.childNodes[o];return s.nodeType==1&&s.contentEditable=="false"}(e)))e.markCursor=e.state.storedMarks||n.marks(),Ls(e,!0),e.markCursor=null;else if(Ls(e,!t.selection.empty),Ke&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}i=s,o=-1}}e.input.composing=!0}Rh(e,TD)},Oe.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,Rh(e,20))};const no=Ce&&tr<15||Ti&&rD<604;function ro(e,t,n,r,i){let o=dE(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,o||J.empty)))return!0;if(!o)return!1;let s=function(l){return l.openStart==0&&l.openEnd==0&&l.content.childCount==1?l.content.firstChild:null}(o),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function gE(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}ge.copy=Oe.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let o=no?null:n.clipboardData,s=r.content(),{dom:a,text:l}=oc(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(c,u){if(!c.dom.parentNode)return;let h=c.dom.parentNode.appendChild(document.createElement("div"));h.appendChild(u),h.style.cssText="position: fixed; left: -10000px; top: 10px";let d=getSelection(),p=document.createRange();p.selectNodeContents(u),c.dom.blur(),d.removeAllRanges(),d.addRange(p),setTimeout(()=>{h.parentNode&&h.parentNode.removeChild(h),c.focus()},50)}(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Oe.paste=(e,t)=>{let n=t;if(e.composing&&!wn)return;let r=no?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&ro(e,gE(r),r.getData("text/html"),i,n)?n.preventDefault():function(o,s){if(!o.dom.parentNode)return;let a=o.input.shiftKey||o.state.selection.$from.parent.type.spec.code,l=o.dom.parentNode.appendChild(document.createElement(a?"textarea":"div"));a||(l.contentEditable="true"),l.style.cssText="position: fixed; left: -10000px; top: 10px",l.focus();let c=o.input.shiftKey&&o.input.lastKeyCode!=45;setTimeout(()=>{o.focus(),l.parentNode&&l.parentNode.removeChild(l),a?ro(o,l.value,null,c,s):ro(o,l.textContent,l.innerHTML,c,s)},50)}(e,n)};class DE{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const ID=Ye?"altKey":"ctrlKey";function Ih(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n!=null?n:!t[ID]}ge.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i,o=e.state.selection,s=o.empty?null:e.posAtCoords(ws(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof nt?o.to-1:o.to))){if(r&&r.mightDrag)i=nt.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let h=e.docView.nearestDesc(n.target,!0);h&&h.node.type.spec.draggable&&h!=e.docView&&(i=nt.create(e.state.doc,h.posBefore))}}let a=(i||e.state.selection).content(),{dom:l,text:c,slice:u}=oc(e,a);(!n.dataTransfer.files.length||!Jt||Qm>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(no?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",no||n.dataTransfer.setData("text/plain",c),e.dragging=new DE(u,Ih(e,n),i)},ge.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},Oe.dragover=Oe.dragenter=(e,t)=>t.preventDefault(),Oe.drop=(e,t)=>{try{(function(n,r,i){if(!r.dataTransfer)return;let o=n.posAtCoords(ws(r));if(!o)return;let s=n.state.doc.resolve(o.pos),a=i&&i.slice;a?n.someProp("transformPasted",m=>{a=m(a,n,!1)}):a=dE(n,gE(r.dataTransfer),no?null:r.dataTransfer.getData("text/html"),!1,s);let l=!(!i||!Ih(n,r));if(n.someProp("handleDrop",m=>m(n,r,a||J.empty,l)))return void r.preventDefault();if(!a)return;r.preventDefault();let c=a?function(m,E,A){let _=m.resolve(E);if(!A.content.size)return E;let g=A.content;for(let v=0;v<A.openStart;v++)g=g.firstChild.content;for(let v=1;v<=(A.openStart==0&&A.size?2:1);v++)for(let S=_.depth;S>=0;S--){let I=S==_.depth?0:_.pos<=(_.start(S+1)+_.end(S+1))/2?-1:1,R=_.index(S)+(I>0?1:0),y=_.node(S),D=!1;if(v==1)D=y.canReplace(R,R,g);else{let O=y.contentMatchAt(R).findWrapping(g.firstChild.type);D=O&&y.canReplaceWith(R,R,O[0])}if(D)return I==0?_.pos:I<0?_.before(S+1):_.after(S+1)}return null}(n.state.doc,s.pos,a):s.pos;c==null&&(c=s.pos);let u=n.state.tr;if(l){let{node:m}=i;m?m.replace(u):u.deleteSelection()}let h=u.mapping.map(c),d=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,p=u.doc;if(d?u.replaceRangeWith(h,h,a.content.firstChild):u.replaceRange(h,h,a),u.doc.eq(p))return;let f=u.doc.resolve(h);if(d&&nt.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new nt(f));else{let m=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((E,A,_,g)=>m=g),u.setSelection(ic(n,f,u.doc.resolve(m)))}n.focus(),n.dispatch(u.setMeta("uiEvent","drop"))})(e,t,e.dragging)}finally{e.dragging=null}},ge.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Mn(e)},20))},ge.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},ge.beforeinput=(e,t)=>{if(Jt&&wn&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,gr(8,"Backspace")))))return;let{$cursor:r}=e.state.selection;r&&r.pos>0&&e.dispatch(e.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let e in Oe)ge[e]=Oe[e];function go(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class Ps{constructor(t,n){this.toDOM=t,this.spec=n||Nr,this.side=this.spec.side||0}map(t,n,r,i){let{pos:o,deleted:s}=t.mapResult(n.from+i,this.side<0?-1:1);return s?null:new Be(o-r,o-r,this)}valid(){return!0}eq(t){return this==t||t instanceof Ps&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&go(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class nr{constructor(t,n){this.attrs=t,this.spec=n||Nr}map(t,n,r,i){let o=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Be(o,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof nr&&go(this.attrs,t.attrs)&&go(this.spec,t.spec)}static is(t){return t.type instanceof nr}destroy(){}}class ac{constructor(t,n){this.attrs=t,this.spec=n||Nr}map(t,n,r,i){let o=t.mapResult(n.from+i,1);if(o.deleted)return null;let s=t.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Be(o.pos-r,s.pos-r,this)}valid(t,n){let r,{index:i,offset:o}=t.content.findIndex(n.from);return o==n.from&&!(r=t.child(i)).isText&&o+r.nodeSize==n.to}eq(t){return this==t||t instanceof ac&&go(this.attrs,t.attrs)&&go(this.spec,t.spec)}destroy(){}}class Be{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new Be(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new Be(t,t,new Ps(n,r))}static inline(t,n,r,i){return new Be(t,n,new nr(r,i))}static node(t,n,r,i){return new Be(t,n,new ac(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof nr}get widget(){return this.type instanceof Ps}}const Kr=[],Nr={};class $t{constructor(t,n){this.local=t.length?t:Kr,this.children=n.length?n:Kr}static create(t,n){return n.length?cs(n,t,0,Nr):ce}find(t,n,r){let i=[];return this.findInner(t==null?0:t,n==null?1e9:n,i,0,r),i}findInner(t,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&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]<n&&this.children[s+1]>t){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,i+a,o)}}map(t,n,r){return this==ce||t.maps.length==0?this:this.mapInner(t,n,0,0,r||Nr)}mapInner(t,n,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(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(a,l,c,u,h,d,p){let f=a.slice();for(let E=0,A=d;E<c.maps.length;E++){let _=0;c.maps[E].forEach((g,v,S,I)=>{let R=I-S-(v-g);for(let y=0;y<f.length;y+=3){let D=f[y+1];if(D<0||g>D+A-_)continue;let O=f[y]+A-_;v>=O?f[y+1]=g<=O?-2:-1:g>=A&&R&&(f[y]+=R,f[y+1]+=R)}_+=R}),A=c.maps[E].map(A,-1)}let m=!1;for(let E=0;E<f.length;E+=3)if(f[E+1]<0){if(f[E+1]==-2){m=!0,f[E+1]=-1;continue}let A=c.map(a[E]+d),_=A-h;if(_<0||_>=u.content.size){m=!0;continue}let g=c.map(a[E+1]+d,-1)-h,{index:v,offset:S}=u.content.findIndex(_),I=u.maybeChild(v);if(I&&S==_&&S+I.nodeSize==g){let R=f[E+2].mapInner(c,I,A+1,a[E]+d+1,p);R!=ce?(f[E]=_,f[E+1]=g,f[E+2]=R):(f[E+1]=-2,m=!0)}else m=!0}if(m){let E=function(_,g,v,S,I,R,y){function D(O,C){for(let b=0;b<O.local.length;b++){let L=O.local[b].map(S,I,C);L?v.push(L):y.onRemove&&y.onRemove(O.local[b].spec)}for(let b=0;b<O.children.length;b+=3)D(O.children[b+2],O.children[b]+C+1)}for(let O=0;O<_.length;O+=3)_[O+1]==-1&&D(_[O+2],g[O]+R+1);return v}(f,a,l,c,h,d,p),A=cs(E,u,0,p);l=A.local;for(let _=0;_<f.length;_+=3)f[_+1]<0&&(f.splice(_,3),_-=3);for(let _=0,g=0;_<A.children.length;_+=3){let v=A.children[_];for(;g<f.length&&f[g]<v;)g+=3;f.splice(g,0,A.children[_],A.children[_+1],A.children[_+2])}}return new $t(l.sort(vr),f)}(this.children,s||[],t,n,r,i,o):s?new $t(s.sort(vr),Kr):ce}add(t,n){return n.length?this==ce?$t.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,o=0;t.forEach((a,l)=>{let c,u=l+r;if(c=vE(n,a,u)){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,c,u+1):i.splice(o,0,l,l+a.nodeSize,cs(c,a,u+1,Nr)),o+=3}});let s=OE(o?SE(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new $t(s.length?this.local.concat(s).sort(vr):this.local,i||this.children)}remove(t){return t.length==0||this==ce?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,l=r[o+1]+n;for(let u,h=0;h<t.length;h++)(u=t[h])&&u.from>a&&u.to<l&&(t[h]=null,(s||(s=[])).push(u));if(!s)continue;r==this.children&&(r=this.children.slice());let c=r[o+2].removeInner(s,a+1);c!=ce?r[o+2]=c:(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,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new $t(i,r):ce}forChild(t,n){if(this==ce)return this;if(n.isLeaf)return $t.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+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof nr){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;c<u&&(i||(i=[])).push(l.copy(c,u))}}if(i){let a=new $t(i.sort(vr),Kr);return r?new Xn([a,r]):a}return r||ce}eq(t){if(this==t)return!0;if(!(t instanceof $t)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return lc(this.localsInner(t))}localsInner(t){if(this==ce)return Kr;if(t.inlineContent||!this.local.some(nr.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof nr||n.push(this.local[r]);return n}forEachSet(t){t(this)}}$t.empty=new $t([],[]),$t.removeOverlap=lc;const ce=$t.empty;class Xn{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,Nr));return Xn.from(r)}forChild(t,n){if(n.isLeaf)return $t.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(t,n);o!=ce&&(o instanceof Xn?r=r.concat(o.members):r.push(o))}return Xn.from(r)}eq(t){if(!(t instanceof Xn)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(t);if(o.length)if(n){r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}else n=o}return n?lc(r?n:n.sort(vr)):Kr}static from(t){switch(t.length){case 0:return ce;case 1:return t[0];default:return new Xn(t.every(n=>n instanceof $t)?t:t.reduce((n,r)=>n.concat(r instanceof $t?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function OE(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new Be(i.from+t,i.to+t,i.type))}return n}function vE(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let o,s=0;s<e.length;s++)(o=e[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),e[s]=null);return i}function SE(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function cs(e,t,n,r){let i=[],o=!1;t.forEach((a,l)=>{let c=vE(e,a,l+n);if(c){o=!0;let u=cs(c,a,n+l+1,r);u!=ce&&i.push(l,l+a.nodeSize,u)}});let s=OE(o?SE(e):e,-n).sort(vr);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 $t(s,i):ce}function vr(e,t){return e.from-t.from||e.to-t.to}function lc(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from!=r.from){o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),yh(t,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),yh(t,i+1,o.copy(r.to,o.to)))}}return t}function yh(e,t,n){for(;t<e.length&&vr(n,e[t])>0;)t++;e.splice(t,0,n)}function Ka(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=ce&&t.push(r)}),e.cursorWrapper&&t.push($t.create(e.state.doc,[e.cursorWrapper.deco])),Xn.from(t)}const yD={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},CD=Ce&&tr<=11;class ND{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 bD{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new ND,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);Ce&&tr<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():se&&t.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),CD&&(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,yD)),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 n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(mh(this.view)){if(this.suppressingSelectionUpdates)return Mn(this.view);if(Ce&&tr<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Pr(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 n,r=new Set;for(let o=t.focusNode;o;o=Si(o))r.add(o);for(let o=t.anchorNode;o;o=Si(o))if(r.has(o)){n=o;break}let i=n&&this.view.docView.nearestDesc(n);return i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let 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 n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&mh(t)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(t.editable)for(let u=0;u<n.length;u++){let h=this.registerMutation(n[u],l);h&&(o=o<0?h.from:Math.min(h.from,o),s=s<0?h.to:Math.max(h.to,s),h.typeOver&&(a=!0))}if(Ke&&l.length){let u=l.filter(h=>h.nodeName=="BR");if(u.length==2){let[h,d]=u;h.parentNode&&h.parentNode.parentNode==d.parentNode?d.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let d of u){let p=d.parentNode;!p||p.nodeName!="LI"||h&&kD(t,h)==p||d.remove()}}}else if((Jt||se)&&l.some(u=>u.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let u of l)if(u.nodeName=="BR"&&u.parentNode){let h=u.nextSibling;h&&h.nodeType==1&&h.contentEditable=="false"&&u.parentNode.removeChild(u)}}let c=null;o<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&ca(r)&&(c=rc(t))&&c.eq(_t.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Mn(t),this.currentSelection.set(r),t.scrollToSelection()):(o>-1||i)&&(o>-1&&(t.docView.markDirty(o,s),function(u){if(!Ch.has(u)&&(Ch.set(u,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(u.dom).whiteSpace)!==-1)){if(u.requiresGeckoHackNode=Ke,Nh)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."),Nh=!0}}(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,function(u,h){var d;let{focusNode:p,focusOffset:f}=u.domSelectionRange();for(let m of h)if(((d=m.parentNode)===null||d===void 0?void 0:d.nodeName)=="TR"){let E=m.nextSibling;for(;E&&E.nodeName!="TD"&&E.nodeName!="TH";)E=E.nextSibling;if(E){let A=E;for(;;){let _=A.firstChild;if(!_||_.nodeType!=1||_.contentEditable=="false"||/^(BR|IMG)$/.test(_.nodeName))break;A=_}A.insertBefore(m,A.firstChild),p==m&&u.domSelection().collapse(m,f)}else m.parentNode.removeChild(m)}}(t,l)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Mn(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.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 c=0;c<t.addedNodes.length;c++){let u=t.addedNodes[c];n.push(u),u.nodeType==3&&(this.lastChangedTextNode=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(Ce&&tr<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:u,nextSibling:h}=t.addedNodes[c];(!u||Array.prototype.indexOf.call(t.addedNodes,u)<0)&&(i=u),(!h||Array.prototype.indexOf.call(t.addedNodes,h)<0)&&(o=h)}let s=i&&i.parentNode==t.target?oe(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),l=o&&o.parentNode==t.target?oe(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}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let Ch=new WeakMap,Nh=!1;function bh(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Pr(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function kD(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function wD(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(se&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||se&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const LD=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function PD(e,t,n,r,i){let o=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let R=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,y=rc(e,R);if(y&&!e.state.selection.eq(y)){if(Jt&&wn&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",O=>O(e,gr(13,"Enter"))))return;let D=e.state.tr.setSelection(y);R=="pointer"?D.setMeta("pointer",!0):R=="key"&&D.scrollIntoView(),o&&D.setMeta("composition",o),e.dispatch(D)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l,c,u=e.state.selection,h=function(R,y,D){let O,{node:C,fromOffset:b,toOffset:L,from:w,to:F}=R.docView.parseRange(y,D),H=R.domSelectionRange(),B=H.anchorNode;if(B&&R.dom.contains(B.nodeType==1?B:B.parentNode)&&(O=[{node:B,offset:H.anchorOffset}],ca(H)||O.push({node:H.focusNode,offset:H.focusOffset})),Jt&&R.input.lastKeyCode===8)for(let tt=L;tt>b;tt--){let rt=C.childNodes[tt-1],it=rt.pmViewDesc;if(rt.nodeName=="BR"&&!it){L=tt;break}if(!it||it.size)break}let K=R.state.doc,X=R.someProp("domParser")||mo.fromSchema(R.state.schema),G=K.resolve(w),W=null,St=X.parse(C,{topNode:G.parent,topMatch:G.parent.contentMatchAt(G.index()),topOpen:!0,from:b,to:L,preserveWhitespace:G.parent.type.whitespace!="pre"||"full",findPositions:O,ruleFromNode:wD,context:G});if(O&&O[0].pos!=null){let tt=O[0].pos,rt=O[1]&&O[1].pos;rt==null&&(rt=tt),W={anchor:tt+w,head:rt+w}}return{doc:St,sel:W,from:w,to:F}}(e,t,n),d=e.state.doc,p=d.slice(h.from,h.to);e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(l=e.state.selection.to,c="end"):(l=e.state.selection.from,c="start"),e.input.lastKeyCode=null;let f=function(R,y,D,O,C){let b=R.findDiffStart(y,D);if(b==null)return null;let{a:L,b:w}=R.findDiffEnd(y,D+R.size,D+y.size);if(C=="end"&&(O-=L+Math.max(0,b-Math.min(L,w))-b),L<b&&R.size<y.size){let F=O<=b&&O>=L?b-O:0;b-=F,b&&b<y.size&&wh(y.textBetween(b-1,b+1))&&(b+=F?1:-1),w=b+(w-L),L=b}else if(w<b){let F=O<=b&&O>=w?b-O:0;b-=F,b&&b<R.size&&wh(R.textBetween(b-1,b+1))&&(b+=F?1:-1),L=b+(L-w),w=b}return{start:b,endA:L,endB:w}}(p.content,h.doc.content,h.from,l,c);if(f&&e.input.domChangeCount++,(Ti&&e.input.lastIOSEnter>Date.now()-225||wn)&&i.some(R=>R.nodeType==1&&!LD.test(R.nodeName))&&(!f||f.endA>=f.endB)&&e.someProp("handleKeyDown",R=>R(e,gr(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(!f){if(!(r&&u instanceof Et&&!u.empty&&u.$head.sameParent(u.$anchor))||e.composing||h.sel&&h.sel.anchor!=h.sel.head){if(h.sel){let R=kh(e,e.state.doc,h.sel);if(R&&!R.eq(e.state.selection)){let y=e.state.tr.setSelection(R);o&&y.setMeta("composition",o),e.dispatch(y)}}return}f={start:u.from,endA:u.to,endB:u.to}}e.state.selection.from<e.state.selection.to&&f.start==f.endB&&e.state.selection instanceof Et&&(f.start>e.state.selection.from&&f.start<=e.state.selection.from+2&&e.state.selection.from>=h.from?f.start=e.state.selection.from:f.endA<e.state.selection.to&&f.endA>=e.state.selection.to-2&&e.state.selection.to<=h.to&&(f.endB+=e.state.selection.to-f.endA,f.endA=e.state.selection.to)),Ce&&tr<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>h.from&&h.doc.textBetween(f.start-h.from-1,f.start-h.from+1)==" "&&(f.start--,f.endA--,f.endB--);let m=h.doc.resolveNoCache(f.start-h.from),E=h.doc.resolveNoCache(f.endB-h.from),A=d.resolve(f.start),_=m.sameParent(E)&&m.parent.inlineContent&&A.end()>=f.endA;if((Ti&&e.input.lastIOSEnter>Date.now()-225&&(!_||i.some(R=>R.nodeName=="DIV"||R.nodeName=="P"))||!_&&m.pos<h.doc.content.size&&(!m.sameParent(E)||!m.parent.inlineContent)&&m.pos<E.pos&&!/\S/.test(h.doc.textBetween(m.pos,E.pos,"","")))&&e.someProp("handleKeyDown",R=>R(e,gr(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>f.start&&function(R,y,D,O,C){if(D-y<=C.pos-O.pos||qa(O,!0,!1)<C.pos)return!1;let b=R.resolve(y);if(!O.parent.isTextblock){let w=b.nodeAfter;return w!=null&&D==y+w.nodeSize}if(b.parentOffset<b.parent.content.size||!b.parent.isTextblock)return!1;let L=R.resolve(qa(b,!0,!0));return!(!L.parent.isTextblock||L.pos>D||qa(L,!0,!1)<D)&&O.parent.content.cut(O.parentOffset).eq(L.parent.content)}(d,f.start,f.endA,m,E)&&e.someProp("handleKeyDown",R=>R(e,gr(8,"Backspace"))))return void(wn&&Jt&&e.domObserver.suppressSelectionUpdates());Jt&&f.endB==f.start&&(e.input.lastChromeDelete=Date.now()),wn&&!_&&m.start()!=E.start()&&E.parentOffset==0&&m.depth==E.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==f.endA&&(f.endB-=2,E=h.doc.resolveNoCache(f.endB-h.from),setTimeout(()=>{e.someProp("handleKeyDown",function(R){return R(e,gr(13,"Enter"))})},20));let g,v=f.start,S=f.endA,I=R=>{let y=R||e.state.tr.replace(v,S,h.doc.slice(f.start-h.from,f.endB-h.from));if(h.sel){let D=kh(e,y.doc,h.sel);D&&!(Jt&&e.composing&&D.empty&&(f.start!=f.endB||e.input.lastChromeDelete<Date.now()-100)&&(D.head==v||D.head==y.mapping.map(S)-1)||Ce&&D.empty&&D.head==v)&&y.setSelection(D)}return o&&y.setMeta("composition",o),y.scrollIntoView()};if(_)if(m.pos==E.pos){Ce&&tr<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Mn(e),20));let R=I(e.state.tr.delete(v,S)),y=d.resolve(f.start).marksAcross(d.resolve(f.endA));y&&R.ensureMarks(y),e.dispatch(R)}else if(f.endA==f.endB&&(g=function(R,y){let D,O,C,b=R.firstChild.marks,L=y.firstChild.marks,w=b,F=L;for(let B=0;B<L.length;B++)w=L[B].removeFromSet(w);for(let B=0;B<b.length;B++)F=b[B].removeFromSet(F);if(w.length==1&&F.length==0)O=w[0],D="add",C=B=>B.mark(O.addToSet(B.marks));else{if(w.length!=0||F.length!=1)return null;O=F[0],D="remove",C=B=>B.mark(O.removeFromSet(B.marks))}let H=[];for(let B=0;B<y.childCount;B++)H.push(C(y.child(B)));if(Y.from(H).eq(R))return{mark:O,type:D}}(m.parent.content.cut(m.parentOffset,E.parentOffset),A.parent.content.cut(A.parentOffset,f.endA-A.start())))){let R=I(e.state.tr);g.type=="add"?R.addMark(v,S,g.mark):R.removeMark(v,S,g.mark),e.dispatch(R)}else if(m.parent.child(m.index()).isText&&m.index()==E.index()-(E.textOffset?0:1)){let R=m.parent.textBetween(m.parentOffset,E.parentOffset),y=()=>I(e.state.tr.insertText(R,v,S));e.someProp("handleTextInput",D=>D(e,v,S,R,y))||e.dispatch(y())}else e.dispatch(I());else e.dispatch(I())}function kh(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:ic(e,t.resolve(n.anchor),t.resolve(n.head))}function qa(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let o=e.node(r).maybeChild(e.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function wh(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class TE{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new AD,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(Fh),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=Mh(this),Ph(this),this.nodeViews=xh(this),this.docView=lh(this.state.doc,Lh(this),Ka(this),this.dom,this),this.domObserver=new bD(this,(r,i,o,s)=>PD(this,r,i,o,s)),this.domObserver.start(),function(r){for(let i in ge){let o=ge[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!gD(r,s)||Jl(r,s)||!r.editable&&s.type in Oe||o(r,s)},_D[i]?{passive:!0}:void 0)}se&&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 n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&Xa(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach(Fh),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,o=!1,s=!1;t.storedMarks&&this.composing&&(AE(this),s=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=xh(this);(function(f,m){let E=0,A=0;for(let _ in f){if(f[_]!=m[_])return!0;E++}for(let _ in m)A++;return E!=A})(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&Xa(this),this.editable=Mh(this),Ph(this);let l=Ka(this),c=Lh(this),u=i.plugins==t.plugins||i.doc.eq(t.doc)?t.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",h=o||!this.docView.matchesNode(t.doc,c,l);!h&&t.selection.eq(i.selection)||(s=!0);let d=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&function(p){let f,m,E=p.dom.getBoundingClientRect(),A=Math.max(0,E.top);for(let _=(E.left+E.right)/2,g=A+1;g<Math.min(innerHeight,E.bottom);g+=5){let v=p.root.elementFromPoint(_,g);if(!v||v==p.dom||!p.dom.contains(v))continue;let S=v.getBoundingClientRect();if(S.top>=A-20){f=v,m=S.top;break}}return{refDOM:f,refTop:m,stack:eh(p.dom)}}(this);if(s){this.domObserver.stop();let p=h&&(Ce||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(h){let f=Jt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=RD(this)),!o&&this.docView.update(t.doc,c,l,this)||(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=lh(t.doc,c,l,this.dom,this)),!f||this.trackWrites&&this.dom.contains(this.trackWrites)||(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(f){let m=f.docView.domFromPos(f.state.selection.anchor,0),E=f.domSelectionRange();return Pr(m.node,m.offset,E.anchorNode,E.anchorOffset)}(this))?Mn(this,p):(uE(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),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():d&&function({refDOM:p,refTop:f,stack:m}){let E=p?p.getBoundingClientRect().top:0;nh(m,E==0?0:E-f)}(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(t&&this.dom.contains(t.nodeType==1?t:t.parentNode)&&!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof nt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&th(this,n.getBoundingClientRect(),t)}else th(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 n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}}updateDraggedNode(t,n){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-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new DE(t.slice,t.move,i<0?void 0:nt.create(this.state.doc,i))}someProp(t,n){let r,i=this._props&&this._props[t];if(i!=null&&(r=n?n(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(r=n?n(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[t];if(a!=null&&(r=n?n(a):a))return r}}hasFocus(){if(Ce){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(Yr)return t.focus(Yr);let n=eh(t);t.focus(Yr==null?{get preventScroll(){return Yr={preventScroll:!0},!0}}:void 0),Yr||(Yr=!1,nh(n,0))}(this.dom),Mn(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return sD(this,t)}coordsAtPos(t,n=1){return rE(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return uD(this,n||this.state,t)}pasteHTML(t,n){return ro(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return ro(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return oc(this,t)}destroy(){this.docView&&(function(t){t.domObserver.stop();for(let n in t.input.eventHandlers)t.dom.removeEventListener(n,t.input.eventHandlers[n]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ka(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Vl=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return function(n,r){Jl(n,r)||!ge[r.type]||!n.editable&&r.type in Oe||ge[r.type](n,r)}(this,t)}domSelectionRange(){let t=this.domSelection();return t?se&&this.root.nodeType===11&&function(n){let r=n.activeElement;for(;r&&r.shadowRoot;)r=r.shadowRoot.activeElement;return r}(this.dom.ownerDocument)==this.dom&&function(n,r){if(r.getComposedRanges){let s=r.getComposedRanges(n.root)[0];if(s)return bh(n,s)}let i;function o(s){s.preventDefault(),s.stopImmediatePropagation(),i=s.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",o,!0),i?bh(n,i):null}(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Lh(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:t[r]||r=="contenteditable"||r=="nodeName"||(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Be.node(0,e.state.doc.content.size,t)]}function Ph(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Be.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Mh(e){return!e.someProp("editable",t=>t(e.state)===!1)}function xh(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function Fh(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}TE.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};const Xt=new class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=ne.from(e.nodes),t.marks=ne.from(e.marks||{}),this.nodes=Pd.compile(this.spec.nodes,this),this.marks=sa.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let i=this.nodes[r],o=i.spec.content||"",s=i.spec.marks;if(i.contentMatch=n[o]||(n[o]=wr.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=s=="_"?null:s?Md(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==""?[]:Md(this,o.split(" "))}this.nodeFromJSON=r=>yr.fromJSON(this,r),this.markFromJSON=r=>At.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e=="string")e=this.nodeType(e);else{if(!(e instanceof Pd))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new bs(n,n.defaultAttrs,e,At.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);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:e=>["span",{"data-mention-id":e.attrs.id,class:"t-mention"},`@${e.attrs.name}`],parseDOM:[{tag:"span[data-mention-id]",getAttrs:e=>({id:e.dataset["mention-id"]})}]},customemoji:{group:"inline",inline:!0,attrs:{name:{},url:{}},content:"text*",selectable:!1,toDOM:e=>["img",{src:e.attrs.url,alt:e.attrs.name,"data-custom-emoji":e.attrs.name}],parseDOM:[{tag:"img[data-custom-emoji]",getAttrs:e=>{const t=e;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:e=>["span",{"data-emoji":e.attrs.emoji},e.attrs.emoji],parseDOM:[{tag:"span[data-emoji]",getAttrs:e=>({emoji:e.dataset.emoji})}]}}}),Ja=new ua("placeholder"),Bh=new la({key:Ja,props:{decorations(e){if(RE(e.doc))return;const t=e.doc.firstChild,n=Be.node(0,t.nodeSize,{class:"empty-node","data-placeholder":Ja.getState(e)});return $t.create(e.doc,[n])}},state:{init:()=>"",apply:(e,t)=>{var n;return(n=e.getMeta(Ja))!=null?n:t}}});function RE(e){return e.childCount!==1||e.firstChild.childCount!==0}for(var ir={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:"'"},Ms={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},MD=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),xD=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),re=0;re<10;re++)ir[48+re]=ir[96+re]=String(re);for(re=1;re<=24;re++)ir[re+111]="F"+re;for(re=65;re<=90;re++)ir[re]=String.fromCharCode(re+32),Ms[re]=String.fromCharCode(re);for(var Za in ir)Ms.hasOwnProperty(Za)||(Ms[Za]=ir[Za]);const FD=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function BD(e){let t,n,r,i,o=e.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))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);FD?i=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function Qa(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function Uh(e){return new la({props:{handleKeyDown:UD(e)}})}function UD(e){let t=function(n){let r=Object.create(null);for(let i in n)r[BD(i)]=n[i];return r}(e);return function(n,r){let i,o=function(a){var l=!(MD&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey||xD&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified")&&a.key||(a.shiftKey?Ms:ir)[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[Qa(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=t[Qa(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=ir[r.keyCode])&&i!=o){let a=t[Qa(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var xs=200,qt=function(){};qt.prototype.append=function(e){return e.length?(e=qt.from(e),!this.length&&e||e.length<xs&&this.leafAppend(e)||this.length<xs&&e.leafPrepend(this)||this.appendInner(e)):this},qt.prototype.prepend=function(e){return e.length?qt.from(e).append(this):this},qt.prototype.appendInner=function(e){return new HD(this,e)},qt.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?qt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},qt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},qt.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},qt.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(i,o){return r.push(e(i,o))},t,n),r},qt.from=function(e){return e instanceof qt?e:e&&e.length?new IE(e):qt.empty};var IE=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={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<=xs)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=xs)return new t(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(qt);qt.empty=new IE([]);var HD=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},t.prototype.forEachInner=function(n,r,i,o){var s=this.left.length;return!(r<s&&this.left.forEachInner(n,r,Math.min(i,s),o)===!1)&&!(i>s&&this.right.forEachInner(n,Math.max(r-s,0),Math.min(this.length,i)-s,o+s)===!1)&&void 0},t.prototype.forEachInvertedInner=function(n,r,i,o){var s=this.left.length;return!(r>s&&this.right.forEachInvertedInner(n,r-s,Math.max(i,s)-s,o+s)===!1)&&!(i<s&&this.left.forEachInvertedInner(n,Math.min(r,s),i,o)===!1)&&void 0},t.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(n,r):n>=i?this.right.slice(n-i,r-i):this.left.slice(n,i).append(this.right.slice(0,r-i))},t.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new t(r,this.right)},t.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new t(this.left,new t(this.right,n)):new t(this,n)},t}(qt);class Ze{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r,i,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}n&&(r=this.remapping(o,this.items.length),i=r.maps.length);let s,a,l=t.tr,c=[],u=[];return this.items.forEach((h,d)=>{if(!h.step)return r||(r=this.remapping(o,d+1),i=r.maps.length),i--,void u.push(h);if(r){u.push(new un(h.map));let p,f=h.step.map(r.slice(i));f&&l.maybeStep(f).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],c.push(new un(p,void 0,void 0,c.length+u.length))),i--,p&&r.appendMap(p,i)}else l.maybeStep(h.step);return h.selection?(s=r?h.selection.map(r.slice(i)):h.selection,a=new Ze(this.items.slice(0,o).append(u.reverse().concat(c)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:a,transform:l,selection:s}}addTransform(t,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let u=0;u<t.steps.length;u++){let h,d=t.steps[u].invert(t.docs[u]),p=new un(t.mapping.maps[u],d,n);(h=l&&l.merge(p))&&(p=h,u?o.pop():a=a.slice(0,a.length-1)),o.push(p),n&&(s++,n=void 0),i||(l=p)}let c=s-r.depth;return c>jD&&(a=function(u,h){let d;return u.forEach((p,f)=>{if(p.selection&&h--==0)return d=f,!1}),u.slice(d)}(a,c),s-=c),new Ze(a.append(o),s)}remapping(t,n){let r=new Eo;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,n),r}addMaps(t){return this.eventCount==0?this:new Ze(this.items.append(t.map(n=>new un(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(d=>{d.selection&&a--},i);let l=n;this.items.forEach(d=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let f=o.maps[p];if(d.step){let m=t.steps[p].invert(t.docs[p]),E=d.selection&&d.selection.map(o.slice(l+1,p));E&&a++,r.push(new un(f,m,E))}else r.push(new un(f))},i);let c=[];for(let d=n;d<s;d++)c.push(new un(o.maps[d]));let u=this.items.slice(0,i).append(c).append(r),h=new Ze(u,a);return h.emptyItemCount()>500&&(h=h.compress(this.items.length-r.length)),h}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.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(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=s.selection&&s.selection.map(n.slice(r));u&&o++;let h,d=new un(c.invert(),l,u),p=i.length-1;(h=i.length&&i[p].merge(d))?i[p]=h:i.push(d)}}else s.map&&r--},this.items.length,0),new Ze(qt.from(i.reverse()),o)}}Ze.empty=new Ze(qt.empty,0);class un{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new un(n.getMap().invert(),n,this.selection)}}}class zn{constructor(t,n,r,i,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const jD=20;function Hh(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,i,o,s)=>t.push(o,s));return t}function tl(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}let el=!1,jh=null;function ds(e){let t=e.plugins;if(jh!=t){el=!1,jh=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){el=!0;break}}return el}const Sr=new ua("history"),$D=new ua("closeHistory");function VD(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new la({key:Sr,state:{init:()=>new zn(Ze.empty,Ze.empty,null,0,-1),apply:(t,n,r)=>function(i,o,s,a){let l,c=s.getMeta(Sr);if(c)return c.historyState;s.getMeta($D)&&(i=new zn(i.done,i.undone,null,0,-1));let u=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(u&&u.getMeta(Sr))return u.getMeta(Sr).redo?new zn(i.done.addTransform(s,void 0,a,ds(o)),i.undone,Hh(s.mapping.maps),i.prevTime,i.prevComposition):new zn(i.done,i.undone.addTransform(s,void 0,a,ds(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||u&&u.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new zn(i.done.rebased(s,l),i.undone.rebased(s,l),tl(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new zn(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),tl(i.prevRanges,s.mapping),i.prevTime,i.prevComposition);{let h=s.getMeta("composition"),d=i.prevTime==0||!u&&i.prevComposition!=h&&(i.prevTime<(s.time||0)-a.newGroupDelay||!function(f,m){if(!m)return!1;if(!f.docChanged)return!0;let E=!1;return f.mapping.maps[0].forEach((A,_)=>{for(let g=0;g<m.length;g+=2)A<=m[g+1]&&_>=m[g]&&(E=!0)}),E}(s,i.prevRanges)),p=u?tl(i.prevRanges,s.mapping):Hh(s.mapping.maps);return new zn(i.done.addTransform(s,d?o.selection.getBookmark():void 0,a,ds(o)),Ze.empty,p,s.time,h==null?i.prevComposition:h)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?CE:r=="historyRedo"?NE:null;return!(!i||!t.editable)&&(n.preventDefault(),i(t.state,t.dispatch))}}}})}function yE(e,t){return(n,r)=>{let i=Sr.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let o=function(s,a,l){let c=ds(a),u=Sr.get(a).spec.config,h=(l?s.undone:s.done).popEvent(a,c);if(!h)return null;let d=h.selection.resolve(h.transform.doc),p=(l?s.done:s.undone).addTransform(h.transform,a.selection.getBookmark(),u,c),f=new zn(l?p:h.remaining,l?h.remaining:p,null,0,-1);return h.transform.setSelection(d).setMeta(Sr,{redo:l,historyState:f})}(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const CE=yE(!1,!0),NE=yE(!0,!0),bE=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Ri(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}function $h(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Vh(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function Ql(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const zD=(e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof nt&&e.selection.node.isBlock)return!(!n.parentOffset||!us(e.doc,n.pos)||(t&&t(e.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(t){let i=r.parentOffset==r.parent.content.size,o=e.tr;(e.selection instanceof Et||e.selection instanceof je)&&o.deleteSelection();let s=n.depth==0?null:Ql(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=us(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!us(o.doc,o.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(o.split(o.mapping.map(n.pos),1,a),!i&&!n.parentOffset&&n.parent.type!=s)){let c=o.mapping.map(n.before()),u=o.doc.resolve(c);s&&n.node(-1).canReplaceWith(u.index(),u.index()+1,s)&&o.setNodeMarkup(o.mapping.map(n.before()),s)}t(o.scrollIntoView())}return!0};function kE(e,t,n){let r,i,o=t.nodeBefore,s=t.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if(function(h,d,p){let f=d.nodeBefore,m=d.nodeAfter,E=d.index();return!(!(f&&m&&f.type.compatibleContent(m.type))||(!f.content.size&&d.parent.canReplace(E-1,E)?(p&&p(h.tr.delete(d.pos-f.nodeSize,d.pos).scrollIntoView()),0):!d.parent.canReplace(E,E+1)||!m.isTextblock&&!Gd(h.doc,d.pos)||(p&&p(h.tr.clearIncompatible(d.pos,f.type,f.contentMatchAt(f.childCount)).join(d.pos).scrollIntoView()),0)))}(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let h=t.pos+s.nodeSize,d=Y.empty;for(let m=r.length-1;m>=0;m--)d=Y.from(r[m].create(null,d));d=Y.from(o.copy(d));let p=e.tr.step(new Fe(t.pos-1,h,t.pos,h,new J(d,1,0),r.length,!0)),f=h+2*r.length;Gd(p.doc,f)&&p.join(f),n(p.scrollIntoView())}return!0}let l=_t.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&Qu(c);if(u!=null&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&Ri(s,"start",!0)&&Ri(o,"end")){let h=o,d=[];for(;d.push(h),!h.isTextblock;)h=h.lastChild;let p=s,f=1;for(;!p.isTextblock;p=p.firstChild)f++;if(h.canReplace(h.childCount,h.childCount,p.content)){if(n){let m=Y.empty;for(let E=d.length-1;E>=0;E--)m=Y.from(d[E].copy(m));n(e.tr.step(new Fe(t.pos-d.length,t.pos+s.nodeSize,t.pos+f,t.pos+s.nodeSize-f,new J(m,d.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function wE(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(Et.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}const YD=wE(-1),GD=wE(1);function uc(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let nl=uc(bE,(e,t,n)=>{let r=function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("backward",s):l.parentOffset>0)?null:l}(e,n);if(!r)return!1;let i=$h(r);if(!i){let s=r.blockRange(),a=s&&Qu(s);return a!=null&&(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&kE(e,i,t))return!0;if(r.parent.content.size==0&&(Ri(o,"end")||nt.isSelectable(o))){let s=tc(e.doc,r.before(),r.after(),J.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(Ri(o,"end")?_t.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):nt.create(a.doc,i.pos-o.nodeSize)),t(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0)},(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=$h(r)}let s=o&&o.nodeBefore;return!(!s||!nt.isSelectable(s))&&(t&&t(e.tr.setSelection(nt.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),zh=uc(bE,(e,t,n)=>{let r=function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("forward",s):l.parentOffset<l.parent.content.size)?null:l}(e,n);if(!r)return!1;let i=Vh(r);if(!i)return!1;let o=i.nodeAfter;if(kE(e,i,t))return!0;if(r.parent.content.size==0&&(Ri(o,"start")||nt.isSelectable(o))){let s=tc(e.doc,r.before(),r.after(),J.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(Ri(o,"start")?_t.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):nt.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)},(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=Vh(r)}let s=o&&o.nodeAfter;return!(!s||!nt.isSelectable(s))&&(t&&t(e.tr.setSelection(nt.create(e.doc,o.pos)).scrollIntoView()),!0)});const bn={Enter:uc((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(t&&t(e.tr.insertText(`
|
|
16
|
-
`).scrollIntoView()),!0)},(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof je||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=Ql(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=e.tr.insert(s,o.createAndFill());a.setSelection(Et.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(us(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&Qu(r);return i!=null&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},zD),"Mod-Enter":(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=Ql(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(_t.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},Backspace:nl,"Mod-Backspace":nl,"Shift-Backspace":nl,Delete:zh,"Mod-Delete":zh,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new je(e.doc))),!0)},LE={"Ctrl-h":bn.Backspace,"Alt-Backspace":bn["Mod-Backspace"],"Ctrl-d":bn.Delete,"Ctrl-Alt-Backspace":bn["Mod-Delete"],"Alt-Delete":bn["Mod-Delete"],"Alt-d":bn["Mod-Delete"],"Ctrl-a":YD,"Ctrl-e":GD};for(let e in bn)LE[e]=bn[e];const qo=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?LE:bn;function cc(e,t){return e.reduce((n,r,i)=>n.concat(t(r,i)),[])}var dc={};function WD(e){return String.fromCharCode(parseInt(e.slice(1),16))}Object.defineProperty(dc,"__esModule",{value:!0});var XD=dc.encode=function(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,WD))};function KD(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}dc.decode=function(e){return decodeURIComponent(Array.from(atob(e),KD).join(""))};const qD=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,JD=e=>e.split(qD).filter(t=>t).map(t=>t[0]).join("")||e[Symbol.iterator]().next().value||"";function PE(e){const t=function(n){let r=0;for(let i=0;i<n.length;i++)r=(r<<5)-r+n.charCodeAt(i),r&=r;return Math.abs(r)}(e)%Gh.length;return Gh[t]}function ha(e,t){const n=t.lastIndex;let r;const i=[];for(;(r=t.exec(e))!==null;)i.push(r),r[0]===""&&(t.lastIndex+=1);return t.lastIndex=n,i}function tu(e,t,n){let r=0;const i=[];for(const o of t)o.offset<r||(o.offset>r&&i.push(e.substring(r,o.offset)),i.push(...n(o)),r=o.offset+o.matchedText.length);return r<e.length&&i.push(e.substring(r)),i}function ME(e){try{return new URL(e).hostname}catch(t){return}}function Jo(e){const t=e.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1");return decodeURIComponent(t)}function Yh(e,t){return e.localeCompare(t,void 0,{usage:"search",sensitivity:"base"})===0}function ZD(e){return[...e.matchAll(/^|\s+/g)].map(n=>n.index+n[0].length).map(n=>e.substring(n))}const Gh=["#996666","#9A6E61","#8D7662","#8E775E","#948771","#8A8360","#888D65","#6F8E63","#749378","#678975","#779E86","#639A8F","#6D92A1","#65869F","#697E9A","#736C9F","#8C6495","#956387","#B05D54","#B16D52","#AF8751","#AC8A56","#B7A458","#B5B35C","#83AA5D","#4F9D5D","#5FA777","#66B58F","#5FB3AC","#589AAF","#4E7F9E","#456CAC","#6456B7","#714AB2","#9771B5","#C154C1","#B05E81","#B04C6A","#B94E48","#AF593E","#C5994B","#B8C25D","#87AB39","#4FA83D","#40A860","#41AA78","#3AB09E","#3FC1AA","#56B4BE","#3EABBF","#4682B4","#7A58C1","#9966CC","#C54B8C","#B44668","#AE4560","#A3807B","#AB917A","#ACA586","#A8AF8E","#9EA587","#8BA690","#7DA98D","#7CB0A1","#8BA9A5","#7CA1A6","#859FAF","#8D90A1","#A397B4","#AE809E","#C08081","#BB8983","#B19461","#B5A27F","#B8B56A","#9AB973","#7AC488","#7CB7BB","#80B3C4","#788BBA","#7A89B8","#9678B6","#CB8FA9","#B57281","#C6726B","#C88A65","#C2955D","#C8B568","#B9C46A","#74C365","#6FD0C5","#6093D1","#7666C6","#D06DA1"],io=(e,t,n=void 0)=>cc(e,r=>{if(typeof r=="string")return t(r,n);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return[{type:r.type,children:io(r.children,t,r.type)}];case"link":return[{type:r.type,url:r.url,children:io(r.children,t,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:io(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 Un(e,t){return n=>{const r=n;let i=0;const o=[];for(const s of ha(n,e)){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<n.length&&o.push(n.substring(i)),o}}function xE(e){return e.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const Wh="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var eu=(e=>(e[e.italic=1]="italic",e[e.strikethrough=2]="strikethrough",e[e.bold=4]="bold",e))(eu||{});const QD=[0,1,2,3,4,5,6].map(e=>{const t=[];return 1&e||t.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/),2&e||t.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/),4&e||t.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/),new RegExp(t.map(n=>n.source).join("|"),"g")}),tO={_:1,"*":4,"~":2};function eO(e){return FE(e,0)}function FE(e,t=0){const n=QD[t],r=n?function(i){const o=nO.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${Wh}])(?:${i.source})(?=[\\s${Wh}]|$)`,"g")),s=Un(o,a=>{const l=a[0][1],c=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:eu[tO[l]],children:[c]}]});return a=>{const[l,...c]=s(" "+a);return l.length>1&&c.unshift(l.substring(1)),c}}(n):()=>[e];return io(r(e),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?FE(i,t|eu[o]):[i])}const nO=function(){const e=function(){try{return new WeakMap}catch(t){const n={has:()=>!1,get:()=>{},set:()=>n};return n}}();return{getOrCompute(t,n){if(e.has(t))return e.get(t);const r=n();return e.set(t,r),r}}}();var nu=function(e,t){return nu=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},nu(e,t)};function Fo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}nu(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Wt=function(){return Wt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Wt.apply(this,arguments)};var rO=Object.prototype.hasOwnProperty;function ze(e){return typeof e=="boolean"}function fr(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function Mr(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var Zo=/\s+/,BE=function(){function e(t){t===void 0&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return e.prototype.setTagName=function(t){return this.tagName=t,this},e.prototype.getTagName=function(){return this.tagName},e.prototype.setAttr=function(t,n){return this.getAttrs()[t]=n,this},e.prototype.getAttr=function(t){return this.getAttrs()[t]},e.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},e.prototype.getAttrs=function(){return this.attrs},e.prototype.setClass=function(t){return this.setAttr("class",t)},e.prototype.addClass=function(t){for(var n,r=this.getClass(),i=r?r.split(Zo):[],o=t.split(Zo);n=o.shift();)i.indexOf(n)===-1&&i.push(n);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var n,r=this.getClass(),i=r?r.split(Zo):[],o=t.split(Zo);i.length&&(n=o.shift());){var s=i.indexOf(n);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(t){return(" "+this.getClass()+" ").indexOf(" "+t+" ")!==-1},e.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},e.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var t=this.getTagName(),n=this.buildAttrsStr();return["<",t,n=n?" "+n:"",">",this.getInnerHtml(),"</",t,">"].join("")},e.prototype.buildAttrsStr=function(){var t=this.getAttrs(),n=[];for(var r in t)rO.call(t,r)&&n.push(r+'="'+t[r]+'"');return n.join(" ")},e}();function Xh(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t}function rl(e,t,n){var r=t/2,i=Math.ceil(r),o=-1*Math.floor(r),s="";return o<0&&(s=e.substr(o)),e.substr(0,i)+n+s}var iO=function(){function e(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 e.prototype.build=function(t){return new BE({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},e.prototype.createAttrs=function(t){var n={href:t.getAnchorHref()},r=this.createCssClass(t);return r&&(n.class=r),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate.length&&this.truncate.length<t.getAnchorText().length&&(n.title=t.getAnchorHref()),n},e.prototype.createCssClass=function(t){var n=this.className;if(n){for(var r=[n],i=t.getCssClassSuffixes(),o=0,s=i.length;o<s;o++)r.push(n+"-"+i[o]);return r.join(" ")}return""},e.prototype.processAnchorText=function(t){return t=this.doTruncate(t)},e.prototype.doTruncate=function(t){var n=this.truncate;if(!n.length)return t;var r=n.length,i=n.location;return i==="smart"?function(o,s,a){var l,c;if(a==null?(a="…",c=3,l=8):(c=a.length,l=a.length),o.length<=s)return o;var u=s-c,h=function(_){var g={},v=_,S=v.match(/^([a-z]+):\/\//i);return S&&(g.scheme=S[1],v=v.slice(S[0].length)),(S=v.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(g.host=S[1],v=v.slice(S[0].length)),(S=v.match(/^\/(.*?)(?=(\?|#|$))/i))&&(g.path=S[1],v=v.slice(S[0].length)),(S=v.match(/^\?(.*?)(?=(#|$))/i))&&(g.query=S[1],v=v.slice(S[0].length)),(S=v.match(/^#(.*?)$/i))&&(g.fragment=S[1]),g}(o);if(h.query){var d=h.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);d&&(h.query=h.query.substr(0,d[1].length),o=Xh(h))}if(o.length<=s||(h.host&&(h.host=h.host.replace(/^www\./,""),o=Xh(h)),o.length<=s))return o;var p="";if(h.host&&(p+=h.host),p.length>=u)return h.host.length===s?(h.host.substr(0,s-c)+a).substr(0,u+l):rl(p,u,a).substr(0,u+l);var f="";if(h.path&&(f+="/"+h.path),h.query&&(f+="?"+h.query),f){if((p+f).length>=u)return(p+f).length==s?(p+f).substr(0,s):(p+rl(f,u-p.length,a)).substr(0,u+l);p+=f}if(h.fragment){var m="#"+h.fragment;if((p+m).length>=u)return(p+m).length==s?(p+m).substr(0,s):(p+rl(m,u-p.length,a)).substr(0,u+l);p+=m}if(h.scheme&&h.host){var E=h.scheme+"://";if((p+E).length<u)return(E+p).substr(0,s)}if(p.length<=s)return p;var A="";return u>0&&(A=p.substr(-1*Math.floor(u/2))),(p.substr(0,Math.ceil(u/2))+a+A).substr(0,u+l)}(t,r):i==="middle"?function(o,s,a){if(o.length<=s)return o;var l,c;a==null?(a="…",l=8,c=3):(l=a.length,c=a.length);var u=s-c,h="";return u>0&&(h=o.substr(-1*Math.floor(u/2))),(o.substr(0,Math.ceil(u/2))+a+h).substr(0,u+l)}(t,r):function(o,s,a){return function(l,c,u){var h;return l.length>c&&(u==null?(u="…",h=3):h=u.length,l=l.substring(0,c-h)+u),l}(o,s,a)}(t,r)},e}(),Bo=function(){function e(t){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(t){this.offset=t},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.type]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}();function Li(e){return e>=65&&e<=90||e>=97&&e<=122}function ae(e){return e>=48&&e<=57}function hc(e){return e==34||e==39}function jr(e){return e<8232?e<160?e>=9&&e<=13||e==32:e<5760?e==160:e==5760||e>=8192&&e<=8202:e<8287?e>=8232&&e<=8233||e==8239:e<12288?e==8287:e==12288||e==65279}function $r(e){return e<4800?e<2949?e<2451?e<1425?e<768?e<192?e<169?e<65?e>=48&&e<=57:e>=65&&e<=90||e>=97&&e<=122:e<181?e>=169&&e<=170||e==174:e==181||e==186:e<710?e<216?e>=192&&e<=214:e>=216&&e<=246||e>=248&&e<=705:e<748?e>=710&&e<=721||e>=736&&e<=740:e==748||e==750:e<910?e<895?e<886?e>=768&&e<=884:e>=886&&e<=887||e>=890&&e<=893:e<904?e==895||e==902:e>=904&&e<=906||e==908:e<1155?e<931?e>=910&&e<=929:e>=931&&e<=1013||e>=1015&&e<=1153:e<1369?e>=1155&&e<=1327||e>=1329&&e<=1366:e==1369||e>=1377&&e<=1415:e<1808?e<1552?e<1476?e<1471?e>=1425&&e<=1469:e==1471||e>=1473&&e<=1474:e<1488?e>=1476&&e<=1477||e==1479:e>=1488&&e<=1514||e>=1520&&e<=1522:e<1749?e<1568?e>=1552&&e<=1562:e>=1568&&e<=1641||e>=1646&&e<=1747:e<1770?e>=1749&&e<=1756||e>=1759&&e<=1768:e>=1770&&e<=1788||e==1791:e<2230?e<2042?e<1869?e>=1808&&e<=1866:e>=1869&&e<=1969||e>=1984&&e<=2037:e<2112?e==2042||e>=2048&&e<=2093:e>=2112&&e<=2139||e>=2208&&e<=2228:e<2406?e<2260?e>=2230&&e<=2237:e>=2260&&e<=2273||e>=2275&&e<=2403:e<2437?e>=2406&&e<=2415||e>=2417&&e<=2435:e>=2437&&e<=2444||e>=2447&&e<=2448:e<2693?e<2579?e<2519?e<2486?e<2474?e>=2451&&e<=2472:e>=2474&&e<=2480||e==2482:e<2503?e>=2486&&e<=2489||e>=2492&&e<=2500:e>=2503&&e<=2504||e>=2507&&e<=2510:e<2534?e<2524?e==2519:e>=2524&&e<=2525||e>=2527&&e<=2531:e<2565?e>=2534&&e<=2545||e>=2561&&e<=2563:e>=2565&&e<=2570||e>=2575&&e<=2576:e<2631?e<2613?e<2602?e>=2579&&e<=2600:e>=2602&&e<=2608||e>=2610&&e<=2611:e<2620?e>=2613&&e<=2614||e>=2616&&e<=2617:e==2620||e>=2622&&e<=2626:e<2649?e<2635?e>=2631&&e<=2632:e>=2635&&e<=2637||e==2641:e<2662?e>=2649&&e<=2652||e==2654:e>=2662&&e<=2677||e>=2689&&e<=2691:e<2821?e<2759?e<2730?e<2703?e>=2693&&e<=2701:e>=2703&&e<=2705||e>=2707&&e<=2728:e<2741?e>=2730&&e<=2736||e>=2738&&e<=2739:e>=2741&&e<=2745||e>=2748&&e<=2757:e<2784?e<2763?e>=2759&&e<=2761:e>=2763&&e<=2765||e==2768:e<2809?e>=2784&&e<=2787||e>=2790&&e<=2799:e==2809||e>=2817&&e<=2819:e<2887?e<2858?e<2831?e>=2821&&e<=2828:e>=2831&&e<=2832||e>=2835&&e<=2856:e<2869?e>=2858&&e<=2864||e>=2866&&e<=2867:e>=2869&&e<=2873||e>=2876&&e<=2884:e<2911?e<2902?e>=2887&&e<=2888||e>=2891&&e<=2893:e>=2902&&e<=2903||e>=2908&&e<=2909:e<2929?e>=2911&&e<=2915||e>=2918&&e<=2927:e==2929||e>=2946&&e<=2947:e<3517?e<3205?e<3046?e<2984?e<2969?e<2958?e>=2949&&e<=2954:e>=2958&&e<=2960||e>=2962&&e<=2965:e<2974?e>=2969&&e<=2970||e==2972:e>=2974&&e<=2975||e>=2979&&e<=2980:e<3014?e<2990?e>=2984&&e<=2986:e>=2990&&e<=3001||e>=3006&&e<=3010:e<3024?e>=3014&&e<=3016||e>=3018&&e<=3021:e==3024||e==3031:e<3142?e<3086?e<3072?e>=3046&&e<=3055:e>=3072&&e<=3075||e>=3077&&e<=3084:e<3114?e>=3086&&e<=3088||e>=3090&&e<=3112:e>=3114&&e<=3129||e>=3133&&e<=3140:e<3160?e<3146?e>=3142&&e<=3144:e>=3146&&e<=3149||e>=3157&&e<=3158:e<3174?e>=3160&&e<=3162||e>=3168&&e<=3171:e>=3174&&e<=3183||e>=3200&&e<=3203:e<3333?e<3274?e<3242?e<3214?e>=3205&&e<=3212:e>=3214&&e<=3216||e>=3218&&e<=3240:e<3260?e>=3242&&e<=3251||e>=3253&&e<=3257:e>=3260&&e<=3268||e>=3270&&e<=3272:e<3296?e<3285?e>=3274&&e<=3277:e>=3285&&e<=3286||e==3294:e<3313?e>=3296&&e<=3299||e>=3302&&e<=3311:e>=3313&&e<=3314||e>=3329&&e<=3331:e<3423?e<3389?e<3342?e>=3333&&e<=3340:e>=3342&&e<=3344||e>=3346&&e<=3386:e<3402?e>=3389&&e<=3396||e>=3398&&e<=3400:e>=3402&&e<=3406||e>=3412&&e<=3415:e<3458?e<3430?e>=3423&&e<=3427:e>=3430&&e<=3439||e>=3450&&e<=3455:e<3482?e>=3458&&e<=3459||e>=3461&&e<=3478:e>=3482&&e<=3505||e>=3507&&e<=3515:e<3804?e<3722?e<3570?e<3535?e<3520?e==3517:e>=3520&&e<=3526||e==3530:e<3544?e>=3535&&e<=3540||e==3542:e>=3544&&e<=3551||e>=3558&&e<=3567:e<3664?e<3585?e>=3570&&e<=3571:e>=3585&&e<=3642||e>=3648&&e<=3662:e<3716?e>=3664&&e<=3673||e>=3713&&e<=3714:e==3716||e>=3719&&e<=3720:e<3754?e<3737?e<3725?e==3722:e==3725||e>=3732&&e<=3735:e<3749?e>=3737&&e<=3743||e>=3745&&e<=3747:e==3749||e==3751:e<3776?e<3757?e>=3754&&e<=3755:e>=3757&&e<=3769||e>=3771&&e<=3773:e<3784?e>=3776&&e<=3780||e==3782:e>=3784&&e<=3789||e>=3792&&e<=3801:e<4176?e<3902?e<3872?e<3840?e>=3804&&e<=3807:e==3840||e>=3864&&e<=3865:e<3895?e>=3872&&e<=3881||e==3893:e==3895||e==3897:e<3974?e<3913?e>=3902&&e<=3911:e>=3913&&e<=3948||e>=3953&&e<=3972:e<4038?e>=3974&&e<=3991||e>=3993&&e<=4028:e==4038||e>=4096&&e<=4169:e<4688?e<4301?e<4256?e>=4176&&e<=4253:e>=4256&&e<=4293||e==4295:e<4348?e==4301||e>=4304&&e<=4346:e>=4348&&e<=4680||e>=4682&&e<=4685:e<4746?e<4698?e>=4688&&e<=4694||e==4696:e>=4698&&e<=4701||e>=4704&&e<=4744:e<4786?e>=4746&&e<=4749||e>=4752&&e<=4784:e>=4786&&e<=4789||e>=4792&&e<=4798:e<11035?e<7416?e<6176?e<5873?e<4992?e<4824?e<4802?e==4800:e>=4802&&e<=4805||e>=4808&&e<=4822:e<4888?e>=4824&&e<=4880||e>=4882&&e<=4885:e>=4888&&e<=4954||e>=4957&&e<=4959:e<5121?e<5024?e>=4992&&e<=5007:e>=5024&&e<=5109||e>=5112&&e<=5117:e<5761?e>=5121&&e<=5740||e>=5743&&e<=5759:e>=5761&&e<=5786||e>=5792&&e<=5866:e<6002?e<5920?e<5888?e>=5873&&e<=5880:e>=5888&&e<=5900||e>=5902&&e<=5908:e<5984?e>=5920&&e<=5940||e>=5952&&e<=5971:e>=5984&&e<=5996||e>=5998&&e<=6e3:e<6108?e<6016?e>=6002&&e<=6003:e>=6016&&e<=6099||e==6103:e<6155?e>=6108&&e<=6109||e>=6112&&e<=6121:e>=6155&&e<=6157||e>=6160&&e<=6169:e<6783?e<6512?e<6400?e<6272?e>=6176&&e<=6263:e>=6272&&e<=6314||e>=6320&&e<=6389:e<6448?e>=6400&&e<=6430||e>=6432&&e<=6443:e>=6448&&e<=6459||e>=6470&&e<=6509:e<6608?e<6528?e>=6512&&e<=6516:e>=6528&&e<=6571||e>=6576&&e<=6601:e<6688?e>=6608&&e<=6617||e>=6656&&e<=6683:e>=6688&&e<=6750||e>=6752&&e<=6780:e<7040?e<6832?e<6800?e>=6783&&e<=6793:e>=6800&&e<=6809||e==6823:e<6992?e>=6832&&e<=6846||e>=6912&&e<=6987:e>=6992&&e<=7001||e>=7019&&e<=7027:e<7245?e<7168?e>=7040&&e<=7155:e>=7168&&e<=7223||e>=7232&&e<=7241:e<7376?e>=7245&&e<=7293||e>=7296&&e<=7304:e>=7376&&e<=7378||e>=7380&&e<=7414:e<8450?e<8130?e<8025?e<7960?e<7424?e>=7416&&e<=7417:e>=7424&&e<=7669||e>=7675&&e<=7957:e<8008?e>=7960&&e<=7965||e>=7968&&e<=8005:e>=8008&&e<=8013||e>=8016&&e<=8023:e<8031?e<8027?e==8025:e==8027||e==8029:e<8118?e>=8031&&e<=8061||e>=8064&&e<=8116:e>=8118&&e<=8124||e==8126:e<8205?e<8150?e<8134?e>=8130&&e<=8132:e>=8134&&e<=8140||e>=8144&&e<=8147:e<8178?e>=8150&&e<=8155||e>=8160&&e<=8172:e>=8178&&e<=8180||e>=8182&&e<=8188:e<8305?e<8252?e==8205:e==8252||e==8265:e<8336?e==8305||e==8319:e>=8336&&e<=8348||e>=8400&&e<=8432:e<8579?e<8486?e<8469?e<8455?e==8450:e==8455||e>=8458&&e<=8467:e<8482?e==8469||e>=8473&&e<=8477:e==8482||e==8484:e<8495?e<8488?e==8486:e==8488||e>=8490&&e<=8493:e<8517?e>=8495&&e<=8505||e>=8508&&e<=8511:e>=8517&&e<=8521||e==8526:e<9410?e<9e3?e<8592?e>=8579&&e<=8580:e>=8592&&e<=8703||e>=8986&&e<=8987:e<9193?e==9e3||e==9167:e>=9193&&e<=9203||e>=9208&&e<=9210:e<9723?e<9654?e==9410||e>=9642&&e<=9643:e==9654||e==9664:e<10548?e>=9723&&e<=9726||e>=9728&&e<=10175:e>=10548&&e<=10549||e>=11013&&e<=11015:e<43259?e<12445?e<11688?e<11520?e<11264?e<11088?e>=11035&&e<=11036:e==11088||e==11093:e<11360?e>=11264&&e<=11310||e>=11312&&e<=11358:e>=11360&&e<=11492||e>=11499&&e<=11507:e<11568?e<11559?e>=11520&&e<=11557:e==11559||e==11565:e<11647?e>=11568&&e<=11623||e==11631:e>=11647&&e<=11670||e>=11680&&e<=11686:e<11744?e<11712?e<11696?e>=11688&&e<=11694:e>=11696&&e<=11702||e>=11704&&e<=11710:e<11728?e>=11712&&e<=11718||e>=11720&&e<=11726:e>=11728&&e<=11734||e>=11736&&e<=11742:e<12330?e<11823?e>=11744&&e<=11775:e==11823||e>=12293&&e<=12294:e<12353?e>=12330&&e<=12341||e>=12347&&e<=12349:e>=12353&&e<=12438||e>=12441&&e<=12442:e<42512?e<12951?e<12549?e<12449?e>=12445&&e<=12447:e>=12449&&e<=12538||e>=12540&&e<=12543:e<12704?e>=12549&&e<=12589||e>=12593&&e<=12686:e>=12704&&e<=12730||e>=12784&&e<=12799:e<19968?e<12953?e==12951:e==12953||e>=13312&&e<=19893:e<42192?e>=19968&&e<=40917||e>=40960&&e<=42124:e>=42192&&e<=42237||e>=42240&&e<=42508:e<42891?e<42623?e<42560?e>=42512&&e<=42539:e>=42560&&e<=42610||e>=42612&&e<=42621:e<42775?e>=42623&&e<=42725||e>=42736&&e<=42737:e>=42775&&e<=42783||e>=42786&&e<=42888:e<43072?e<42928?e>=42891&&e<=42926:e>=42928&&e<=42935||e>=42999&&e<=43047:e<43216?e>=43072&&e<=43123||e>=43136&&e<=43205:e>=43216&&e<=43225||e>=43232&&e<=43255:e<55243?e<43744?e<43488?e<43312?e<43261?e==43259:e==43261||e>=43264&&e<=43309:e<43392?e>=43312&&e<=43347||e>=43360&&e<=43388:e>=43392&&e<=43456||e>=43471&&e<=43481:e<43600?e<43520?e>=43488&&e<=43518:e>=43520&&e<=43574||e>=43584&&e<=43597:e<43642?e>=43600&&e<=43609||e>=43616&&e<=43638:e>=43642&&e<=43714||e>=43739&&e<=43741:e<43824?e<43785?e<43762?e>=43744&&e<=43759:e>=43762&&e<=43766||e>=43777&&e<=43782:e<43808?e>=43785&&e<=43790||e>=43793&&e<=43798:e>=43808&&e<=43814||e>=43816&&e<=43822:e<44012?e<43868?e>=43824&&e<=43866:e>=43868&&e<=43877||e>=43888&&e<=44010:e<44032?e>=44012&&e<=44013||e>=44016&&e<=44025:e>=44032&&e<=55203||e>=55216&&e<=55238:e<64848?e<64298?e<64112?e<55296?e>=55243&&e<=55291:e>=55296&&e<=57343||e>=63744&&e<=64109:e<64275?e>=64112&&e<=64217||e>=64256&&e<=64262:e>=64275&&e<=64279||e>=64285&&e<=64296:e<64320?e<64312?e>=64298&&e<=64310:e>=64312&&e<=64316||e==64318:e<64326?e>=64320&&e<=64321||e>=64323&&e<=64324:e>=64326&&e<=64433||e>=64467&&e<=64829:e<65296?e<65024?e<64914?e>=64848&&e<=64911:e>=64914&&e<=64967||e>=65008&&e<=65019:e<65136?e>=65024&&e<=65039||e>=65056&&e<=65071:e>=65136&&e<=65140||e>=65142&&e<=65276:e<65474?e<65345?e>=65296&&e<=65305||e>=65313&&e<=65338:e>=65345&&e<=65370||e>=65382&&e<=65470:e<65490?e>=65474&&e<=65479||e>=65482&&e<=65487:e>=65490&&e<=65495||e>=65498&&e<=65500}function UE(e){return e<58?e<44?e==33:e==44||e==46:e<63?e>=58&&e<=59:e==63||e==94}function oO(e){return e<91?e==40:e==91||e==123}function Kh(e){return e<93?e==41:e==93||e==125}var sO=/^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,HE=/https?:\/\//i,aO=new RegExp("^"+HE.source,"i"),lO=/^(javascript|vbscript):/i,uO=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,cO=/^(?:\/\/)?([^/#?:]+)/,Do=Li;function jE(e){return Li(e)||ae(e)||e===43||e===45||e===46}var lr=$r;function pc(e){return e===95||lr(e)}function $E(e){return $r(e)||function(t){return t<91?t<47?t>=35&&t<=43||t==45:t<61?t==47:t==61||t==64:t<95?t==91||t==93:t<123?t==95:t>=123&&t<=126||t==10003}(e)||UE(e)}function fc(e){return e===47||e===63||e===35}function qh(e){return sO.test(e.toLowerCase())}var dO=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,hO=/[:/?#]/,pO=/^(https?:\/\/)?(?:www\.)?/i,fO=/^\/\//,VE=function(e){function t(n){var r=e.call(this,n)||this;return r.type="url",r.url="",r.urlMatchType="scheme",r.protocolRelativeMatch=!1,r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.protocolPrepended=!1,r.urlMatchType=n.urlMatchType,r.url=n.url,r.protocolRelativeMatch=n.protocolRelativeMatch,r.stripPrefix=n.stripPrefix,r.stripTrailingSlash=n.stripTrailingSlash,r.decodePercentEncoding=n.decodePercentEncoding,r}return Fo(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var n=this.url;return this.protocolRelativeMatch||this.urlMatchType==="scheme"||this.protocolPrepended||(n=this.url="http://"+n,this.protocolPrepended=!0),n},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=n.replace(fO,"")),this.stripPrefix.scheme&&(n=n.replace(aO,"")),this.stripPrefix.www&&(n=function(r){return r.includes("www.")?r.replace(pO,"$1"):r}(n)),this.stripTrailingSlash&&(n=function(r){return r.charAt(r.length-1)==="/"&&(r=r.slice(0,-1)),r}(n)),this.decodePercentEncoding&&(n=function(r){var i=r.replace(/%(?:22|26|27|3C|3E)/gi,function(o){return o==="%22"?""":o==="%26"?"&":o==="%27"?"'":o==="%3C"||o==="%3c"?"<":">"});if(i.includes("%"))try{return decodeURIComponent(i)}catch(o){}return i}(n)),n},t}(Bo),mO=/^mailto:/i,zE=$r;function mc(e){return zE(e)||function(t){return t<47?t<42?t==33||t>=35&&t<=39:t>=42&&t<=43||t==45:t<63?t==47||t==61:t<94?t==63:t>=94&&t<=96||t>=123&&t<=126}(e)}var YE=function(e){function t(n){var r=e.call(this,n)||this;return r.type="email",r.email="",r.email=n.email,r}return Fo(t,e),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}(Bo);function GE(e){return e===95||$r(e)}var EO=["twitter","facebook","instagram","tiktok","youtube"],_O=function(e){function t(n){var r=e.call(this,n)||this;return r.type="hashtag",r.serviceName="twitter",r.hashtag="",r.serviceName=n.serviceName,r.hashtag=n.hashtag,r}return Fo(t,e),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 n=this.serviceName,r=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+r;case"facebook":return"https://www.facebook.com/hashtag/"+r;case"instagram":return"https://instagram.com/explore/tags/"+r;case"tiktok":return"https://www.tiktok.com/tag/"+r;case"youtube":return"https://youtube.com/hashtag/"+r;default:Mr(n)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},t}(Bo),AO={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function WE(e){return e===45||e===46||e===95||Li(e)||ae(e)}var gO=["twitter","instagram","soundcloud","tiktok","youtube"],DO=function(e){function t(n){var r=e.call(this,n)||this;return r.type="mention",r.serviceName="twitter",r.mention="",r.mention=n.mention,r.serviceName=n.serviceName,r}return Fo(t,e),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;case"tiktok":return"https://www.tiktok.com/@"+this.mention;case"youtube":return"https://youtube.com/@"+this.mention;default:Mr(this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},t}(Bo),OO=/[-. ()]/,vO=new RegExp("^".concat(/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/.source,"|").concat(/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source,"$"));function XE(e){return e===45||e===46||e===32}function Ec(e){return e===44||e===59}var SO=function(e){function t(n){var r=e.call(this,n)||this;return r.type="phone",r.number="",r.plusSign=!1,r.number=n.number,r.plusSign=n.plusSign,r}return Fo(t,e),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}(Bo),TO=function(){function e(t,n){this.charIdx=0,this.matches=[],this._stateMachines=[],this.schemeUrlMachinesCount=0,this.text=t,this.tagBuilder=n.tagBuilder,this.stripPrefix=n.stripPrefix,this.stripTrailingSlash=n.stripTrailingSlash,this.decodePercentEncoding=n.decodePercentEncoding,this.hashtagServiceName=n.hashtagServiceName,this.mentionServiceName=n.mentionServiceName}return Object.defineProperty(e.prototype,"stateMachines",{get:function(){return this._stateMachines},enumerable:!1,configurable:!0}),e.prototype.addMachine=function(t){this._stateMachines.push(t),Zh(t)&&this.schemeUrlMachinesCount++},e.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(n){return n!==t}),Zh(t)&&this.schemeUrlMachinesCount--},e.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},e}();function pa(e,t,n){var r=e.charIdx;if(n===35)e.addMachine({type:2,startIdx:r,state:28,acceptStateReached:!1});else if(n===64)e.addMachine(function(o,s){return{type:3,startIdx:o,state:s,acceptStateReached:!1}}(r,30));else if(n===47)e.addMachine(ru(r,11));else if(n===43)e.addMachine(il(r,37));else if(n===40)e.addMachine(il(r,32));else{if(ae(n)&&(e.addMachine(il(r,38)),e.addMachine(function(o,s){return{type:0,startIdx:o,state:s,acceptStateReached:!1,matchType:2,octetsEncountered:1}}(r,13))),zE(n)){var i=t.toLowerCase()==="m"?15:22;e.addMachine(function(o,s){return{type:1,startIdx:o,state:s,acceptStateReached:!1}}(r,i))}Do(n)&&e.addMachine(fa(r,0)),$r(n)&&e.addMachine(ru(r,5))}}function RO(e,t,n){n===58?t.state=2:n===45?t.state=1:jE(n)||e.removeMachine(t)}function IO(e,t,n){var r=e.charIdx;n===45||(n===47?(e.removeMachine(t),e.addMachine(ru(r,11))):jE(n)?t.state=0:e.removeMachine(t))}function yO(e,t,n){var r=e.charIdx;n===47?t.state=3:n===46?e.removeMachine(t):lr(n)?(t.state=5,Do(n)&&e.addMachine(fa(r,0))):e.removeMachine(t)}function CO(e,t,n){n===47?t.state=4:$E(n)?(t.state=10,t.acceptStateReached=!0):Lt(e,t)}function NO(e,t,n,r){r===47?(t.state=10,t.acceptStateReached=!0):lr(r)?(t.state=5,t.acceptStateReached=!0):e.removeMachine(t)}function bO(e,t,n){n===47?t.state=12:e.removeMachine(t)}function kO(e,t,n){lr(n)?t.state=5:e.removeMachine(t)}function wO(e,t,n){n===46?t.state=7:n===45?t.state=6:n===58?t.state=8:fc(n)?t.state=10:pc(n)||Lt(e,t)}function LO(e,t,n,r){r===45||(r===46?Lt(e,t):lr(r)?t.state=5:Lt(e,t))}function PO(e,t,n,r){r===46?Lt(e,t):lr(r)?(t.state=5,t.acceptStateReached=!0):Lt(e,t)}function MO(e,t,n){n===46?t.state=14:n===58?t.state=8:ae(n)||(fc(n)?t.state=10:$r(n)?e.removeMachine(t):Lt(e,t))}function xO(e,t,n){ae(n)?(t.octetsEncountered++,t.octetsEncountered===4&&(t.acceptStateReached=!0),t.state=13):Lt(e,t)}function FO(e,t,n){ae(n)?t.state=9:Lt(e,t)}function BO(e,t,n){ae(n)||(fc(n)?t.state=10:Lt(e,t))}function UO(e,t,n){$E(n)||Lt(e,t)}function HO(e,t,n,r){n.toLowerCase()==="a"?t.state=16:Vr(e,t,r)}function jO(e,t,n,r){n.toLowerCase()==="i"?t.state=17:Vr(e,t,r)}function $O(e,t,n,r){n.toLowerCase()==="l"?t.state=18:Vr(e,t,r)}function VO(e,t,n,r){n.toLowerCase()==="t"?t.state=19:Vr(e,t,r)}function zO(e,t,n,r){n.toLowerCase()==="o"?t.state=20:Vr(e,t,r)}function YO(e,t,n){n===58?t.state=21:Vr(e,t,n)}function GO(e,t,n){mc(n)?t.state=22:e.removeMachine(t)}function Vr(e,t,n){n===46?t.state=23:n===64?t.state=24:mc(n)?t.state=22:e.removeMachine(t)}function WO(e,t,n){n===46||n===64?e.removeMachine(t):mc(n)?t.state=22:e.removeMachine(t)}function XO(e,t,n){lr(n)?t.state=25:e.removeMachine(t)}function KO(e,t,n){n===46?t.state=27:n===45?t.state=26:pc(n)||Lt(e,t)}function qO(e,t,n){n===45||n===46?Lt(e,t):pc(n)?t.state=25:Lt(e,t)}function JO(e,t,n){n===46||n===45?Lt(e,t):lr(n)?(t.state=25,t.acceptStateReached=!0):Lt(e,t)}function ZO(e,t,n){GE(n)?(t.state=29,t.acceptStateReached=!0):e.removeMachine(t)}function QO(e,t,n){GE(n)||Lt(e,t)}function t0(e,t,n){WE(n)?(t.state=31,t.acceptStateReached=!0):e.removeMachine(t)}function e0(e,t,n){WE(n)||($r(n)?e.removeMachine(t):Lt(e,t))}function n0(e,t,n,r){ae(r)?t.state=38:(e.removeMachine(t),pa(e,n,r))}function r0(e,t,n,r){ae(r)?t.state=33:e.removeMachine(t),pa(e,n,r)}function i0(e,t,n){ae(n)?t.state=34:e.removeMachine(t)}function o0(e,t,n){ae(n)?t.state=35:e.removeMachine(t)}function s0(e,t,n){n===41?t.state=36:e.removeMachine(t)}function a0(e,t,n,r){ae(r)?t.state=38:XE(r)?t.state=39:e.removeMachine(t)}function l0(e,t,n,r){var i=e.charIdx;t.acceptStateReached=!0,Ec(r)?t.state=40:r===35?t.state=41:ae(r)||(r===40?t.state=32:XE(r)?t.state=39:(Lt(e,t),Do(r)&&e.addMachine(fa(i,0))))}function u0(e,t,n,r){ae(r)?t.state=38:r===40?t.state=32:(Lt(e,t),pa(e,n,r))}function c0(e,t,n){Ec(n)||(n===35?t.state=41:ae(n)?t.state=38:Lt(e,t))}function d0(e,t,n){Ec(n)?t.state=40:ae(n)?e.removeMachine(t):Lt(e,t)}function Lt(e,t){var n=e.matches,r=e.text,i=e.charIdx,o=e.tagBuilder,s=e.stripPrefix,a=e.stripTrailingSlash,l=e.decodePercentEncoding,c=e.hashtagServiceName,u=e.mentionServiceName;if(e.removeMachine(t),t.acceptStateReached){var h,d,p=t.startIdx,f=r.slice(t.startIdx,i);switch(f=function(A){for(var _={"(":0,"{":0,"[":0},g=0;g<A.length;g++){var v=A.charAt(g);oO(I=A.charCodeAt(g))?_[v]++:Kh(I)&&_[Jh[v]]--}for(var S=A.length-1;S>=0;){var I;if(v=A.charAt(S),Kh(I=A.charCodeAt(S))){var R=Jh[v];if(!(_[R]<0))break;_[R]++,S--}else{if(!UE(I))break;S--}}return A.slice(0,S+1)}(f),t.type){case 0:if(r.charCodeAt(t.startIdx-1)===64)return;switch(t.matchType){case 0:var m=HE.exec(f);if(m&&(p+=m.index,f=f.slice(m.index)),!function(A){if(lO.test(A))return!1;var _=A.match(uO);if(!_)return!1;var g=!!_[1],v=_[2];return!!g||!(v.indexOf(".")===-1||!/[A-Za-z]/.test(v))}(f))return;break;case 1:if(!function(A){var _=A.match(cO);if(!_)return!1;var g=_[0].split(".");return!(g.length<2||!qh(g[g.length-1]))}(f))return;break;case 2:if(d=f.split(hO,1)[0],!dO.test(d))return;break;default:Mr(t)}n.push(new VE({tagBuilder:o,matchedText:f,offset:p,urlMatchType:h0(t.matchType),url:f,protocolRelativeMatch:f.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:qh(f.split(".").pop())&&n.push(new YE({tagBuilder:o,matchedText:f,offset:p,email:f.replace(mO,"")}));break;case 2:f.length<=140&&n.push(new _O({tagBuilder:o,matchedText:f,offset:p,serviceName:c,hashtag:f.slice(1)}));break;case 3:(function(A,_){return AO[_].test(A)})(f,u)&&n.push(new DO({tagBuilder:o,matchedText:f,offset:p,serviceName:u,mention:f.slice(1)}));break;case 4:if(f=f.replace(/ +$/g,""),((h=f).charAt(0)==="+"||OO.test(h))&&vO.test(h)){var E=f.replace(/[^0-9,;#]/g,"");n.push(new SO({tagBuilder:o,matchedText:f,offset:p,number:E,plusSign:f.charAt(0)==="+"}))}break;default:Mr(t)}}}function h0(e){switch(e){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:Mr(e)}}var Jh={")":"(","}":"{","]":"["};function fa(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:0}}function ru(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:1}}function il(e,t){return{type:4,startIdx:e,state:t,acceptStateReached:!1}}function Zh(e){return e.type===0&&e.matchType===0}var mn=function(e){e===void 0&&(e={}),this.idx=e.idx!==void 0?e.idx:-1,this.type=e.type||"tag",this.name=e.name||"",this.isOpening=!!e.isOpening,this.isClosing=!!e.isClosing},_c=new mn,p0=function(e,t){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=_c,this.html=e,this.callbacks=t};function f0(e,t){t==="<"&&On(e)}function m0(e,t,n){t==="!"?e.state=13:t==="/"?(e.state=2,e.currentTag=new mn(Wt(Wt({},e.currentTag),{isClosing:!0}))):t==="<"?On(e):Li(n)?(e.state=3,e.currentTag=new mn(Wt(Wt({},e.currentTag),{isOpening:!0}))):(e.state=0,e.currentTag=_c)}function E0(e,t,n){jr(n)?(e.currentTag=new mn(Wt(Wt({},e.currentTag),{name:ol(e)})),e.state=4):t==="<"?On(e):t==="/"?(e.currentTag=new mn(Wt(Wt({},e.currentTag),{name:ol(e)})),e.state=12):t===">"?(e.currentTag=new mn(Wt(Wt({},e.currentTag),{name:ol(e)})),vn(e)):Li(n)||ae(n)||t===":"||Je(e)}function _0(e,t,n){t===">"?Je(e):Li(n)?e.state=3:Je(e)}function A0(e,t,n){jr(n)||(t==="/"?e.state=12:t===">"?vn(e):t==="<"?On(e):t==="="||hc(n)||function(r){return r>=0&&r<=31||r==127}(n)?Je(e):e.state=5)}function g0(e,t,n){jr(n)?e.state=6:t==="/"?e.state=12:t==="="?e.state=7:t===">"?vn(e):t==="<"?On(e):hc(n)&&Je(e)}function D0(e,t,n){jr(n)||(t==="/"?e.state=12:t==="="?e.state=7:t===">"?vn(e):t==="<"?On(e):hc(n)?Je(e):e.state=5)}function O0(e,t,n){jr(n)||(t==='"'?e.state=8:t==="'"?e.state=9:/[>=`]/.test(t)?Je(e):t==="<"?On(e):e.state=10)}function v0(e,t){t==='"'&&(e.state=11)}function S0(e,t){t==="'"&&(e.state=11)}function T0(e,t,n){jr(n)?e.state=4:t===">"?vn(e):t==="<"&&On(e)}function R0(e,t,n){jr(n)?e.state=4:t==="/"?e.state=12:t===">"?vn(e):t==="<"?On(e):(e.state=4,function(r){r.charIdx--}(e))}function I0(e,t){t===">"?(e.currentTag=new mn(Wt(Wt({},e.currentTag),{isClosing:!0})),vn(e)):Je(e)}function y0(e){var t=e.html,n=e.charIdx;t.slice(n,n+2)==="--"?(e.charIdx++,e.currentTag=new mn(Wt(Wt({},e.currentTag),{type:"comment"})),e.state=14):t.slice(n,n+7).toUpperCase()==="DOCTYPE"?(e.charIdx+=6,e.currentTag=new mn(Wt(Wt({},e.currentTag),{type:"doctype"})),e.state=20):Je(e)}function C0(e,t){t==="-"?e.state=15:t===">"?Je(e):e.state=16}function N0(e,t){t==="-"?e.state=18:t===">"?Je(e):e.state=16}function b0(e,t){t==="-"&&(e.state=17)}function k0(e,t){e.state=t==="-"?18:16}function w0(e,t){t===">"?vn(e):t==="!"?e.state=19:t==="-"||(e.state=16)}function L0(e,t){t==="-"?e.state=17:t===">"?vn(e):e.state=16}function P0(e,t){t===">"?vn(e):t==="<"&&On(e)}function Je(e){e.state=0,e.currentTag=_c}function On(e){e.state=1,e.currentTag=new mn({idx:e.charIdx})}function vn(e){var t=e.html.slice(e.currentDataIdx,e.currentTag.idx);t&&e.callbacks.onText(t,e.currentDataIdx);var n=e.currentTag;n.type==="comment"?e.callbacks.onComment(n.idx):n.type==="doctype"?e.callbacks.onDoctype(n.idx):(n.isOpening&&e.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&e.callbacks.onCloseTag(n.name,n.idx)),Je(e),e.currentDataIdx=e.charIdx+1}function ol(e){var t=e.currentTag.idx+(e.currentTag.isClosing?2:1);return e.html.slice(t,e.charIdx).toLowerCase()}var M0=function(){function e(t){t===void 0&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=function(o){return o==null&&(o=!0),ze(o)?{schemeMatches:o,tldMatches:o,ipV4Matches:o}:{schemeMatches:!ze(o.schemeMatches)||o.schemeMatches,tldMatches:!ze(o.tldMatches)||o.tldMatches,ipV4Matches:!ze(o.ipV4Matches)||o.ipV4Matches}}(t.urls),this.email=ze(t.email)?t.email:this.email,this.phone=ze(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=ze(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=function(o){return o==null&&(o=!0),ze(o)?{scheme:o,www:o}:{scheme:!ze(o.scheme)||o.scheme,www:!ze(o.www)||o.www}}(t.stripPrefix),this.stripTrailingSlash=ze(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=ze(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&gO.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var r,i=this.hashtag;if(i!==!1&&EO.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=typeof(r=t.truncate)=="number"?{length:r,location:"end"}:Wt({length:Number.POSITIVE_INFINITY,location:"end"},r),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,n){return new e(n).link(t)},e.parse=function(t,n){return new e(n).parse(t)},e.prototype.parse=function(t){var n=this,r=["a","style","script"],i=0,o=[];return function(s,a){for(var l=new p0(s,a),c=s.length;l.charIdx<c;){var u=s.charAt(l.charIdx),h=s.charCodeAt(l.charIdx);switch(l.state){case 0:f0(l,u);break;case 1:m0(l,u,h);break;case 2:_0(l,u,h);break;case 3:E0(l,u,h);break;case 4:A0(l,u,h);break;case 5:g0(l,u,h);break;case 6:D0(l,u,h);break;case 7:O0(l,u,h);break;case 8:v0(l,u);break;case 9:S0(l,u);break;case 10:T0(l,u,h);break;case 11:R0(l,u,h);break;case 12:I0(l,u);break;case 13:y0(l);break;case 14:C0(l,u);break;case 15:N0(l,u);break;case 16:b0(l,u);break;case 17:k0(l,u);break;case 18:w0(l,u);break;case 19:L0(l,u);break;case 20:P0(l,u);break;default:Mr(l.state)}l.charIdx++}l.currentDataIdx<l.charIdx&&function(d){var p=d.html.slice(d.currentDataIdx,d.charIdx);d.callbacks.onText(p,d.currentDataIdx),d.currentDataIdx=d.charIdx+1}(l)}(t,{onOpenTag:function(s){r.indexOf(s)>=0&&i++},onText:function(s,a){if(i===0){var l=s.split(/( | |<|<|>|>|"|"|')/gi),c=a;l.forEach(function(u,h){if(h%2==0){var d=n.parseText(u,c);o.push.apply(o,function(p,f,m){if(m||arguments.length===2)for(var E,A=0,_=f.length;A<_;A++)!E&&A in f||(E||(E=Array.prototype.slice.call(f,0,A)),E[A]=f[A]);return p.concat(E||Array.prototype.slice.call(f))}([],function(p,f){var m=typeof Symbol=="function"&&p[Symbol.iterator];if(!m)return p;var E,A,_=m.call(p),g=[];try{for(;(f===void 0||f-- >0)&&!(E=_.next()).done;)g.push(E.value)}catch(v){A={error:v}}finally{try{E&&!E.done&&(m=_.return)&&m.call(_)}finally{if(A)throw A.error}}return g}(d),!1))}c+=u.length})}},onCloseTag:function(s){r.indexOf(s)>=0&&(i=Math.max(i-1,0))},onComment:function(){},onDoctype:function(){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},e.prototype.compactMatches=function(t){t.sort(x0);for(var n=0;n<t.length-1;){var r=t[n],i=r.getOffset(),o=r.getMatchedText().length;if(n+1<t.length&&t[n+1].getOffset()===i){var s=t[n+1].getMatchedText().length>o?n:n+1;t.splice(s,1)}else n++}return t},e.prototype.removeUnwantedMatches=function(t){return this.hashtag||fr(t,function(n){return n.getType()==="hashtag"}),this.email||fr(t,function(n){return n.getType()==="email"}),this.phone||fr(t,function(n){return n.getType()==="phone"}),this.mention||fr(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||fr(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||fr(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||fr(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),t},e.prototype.parseText=function(t,n){n=n||0;for(var r=function(s,a){for(var l=new TO(s,a);l.charIdx<l.text.length;l.charIdx++){var c=s.charAt(l.charIdx),u=s.charCodeAt(l.charIdx);if(l.stateMachines.length===0)pa(l,c,u);else{for(var h=l.stateMachines.length-1;h>=0;h--){var d=l.stateMachines[h];switch(d.state){case 11:bO(l,d,u);break;case 12:kO(l,d,u);break;case 0:RO(l,d,u);break;case 1:IO(l,d,u);break;case 2:yO(l,d,u);break;case 3:CO(l,d,u);break;case 4:NO(l,d,0,u);break;case 5:wO(l,d,u);break;case 6:LO(l,d,0,u);break;case 7:PO(l,d,0,u);break;case 13:MO(l,d,u);break;case 14:xO(l,d,u);break;case 8:FO(l,d,u);break;case 9:BO(l,d,u);break;case 10:UO(l,d,u);break;case 15:HO(l,d,c,u);break;case 16:jO(l,d,c,u);break;case 17:$O(l,d,c,u);break;case 18:VO(l,d,c,u);break;case 19:zO(l,d,c,u);break;case 20:YO(l,d,u);break;case 21:GO(l,d,u);break;case 22:Vr(l,d,u);break;case 23:WO(l,d,u);break;case 24:XO(l,d,u);break;case 25:KO(l,d,u);break;case 26:qO(l,d,u);break;case 27:JO(l,d,u);break;case 28:ZO(l,d,u);break;case 29:QO(l,d,u);break;case 30:t0(l,d,u);break;case 31:e0(l,d,u);break;case 32:r0(l,d,c,u);break;case 33:i0(l,d,u);break;case 34:o0(l,d,u);break;case 35:s0(l,d,u);break;case 36:a0(l,d,0,u);break;case 37:n0(l,d,c,u);break;case 38:l0(l,d,0,u);break;case 39:u0(l,d,c,u);break;case 40:c0(l,d,u);break;case 41:d0(l,d,u);break;default:Mr(d.state)}}if(!l.hasSchemeUrlMachine()&&l.charIdx>0&&Do(u)){var p=l.text.charCodeAt(l.charIdx-1);Do(p)||l.addMachine(fa(l.charIdx,0))}}}for(var f=l.stateMachines.length-1;f>=0;f--)l.stateMachines.forEach(function(m){return Lt(l,m)});return l.matches}(t,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),i=0,o=r.length;i<o;i++)r[i].setOffset(n+r[i].getOffset());return r},e.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"<").replace(/>/g,">"));for(var n=this.parse(t),r=new Array(2*n.length+1),i=0,o=0,s=n.length;o<s;o++){var a=n[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("")},e.prototype.createMatchReturnVal=function(t){var n;return this.replaceFn&&(n=this.replaceFn.call(this.context,t)),typeof n=="string"?n:n===!1?t.getMatchedText():n instanceof BE?n.toAnchorString():t.buildTag().toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new iO({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version="4.1.5",e}();function x0(e,t){return e.getOffset()-t.getOffset()}function KE(e,t=e){return{type:"autolink",url:e,text:t}}const F0=()=>Un(/```([^]+?)```/g,([e,t])=>({type:"codespan",text:xE(t)})),B0=Un(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([e,t,n])=>function(r,i){return{type:"mention",id:r,text:i}}(decodeURIComponent(t),n)),U0=Un(/<!!customemoji:(.*?)>/gm,([e,t])=>function(n){return{type:"customemoji",text:n}}(t)),qE=Un(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([e,t,n])=>function(r,i=[]){return{type:"link",url:r,children:i}}(t,[n])),H0=Un(/<actionlink:([^|]+)[|]([^>]*)>/gi,([e,t,n])=>{const{action:r,params:i}=JE(t);return function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}}(r,i,[n])}),j0=Un(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([e,t,n])=>{const{action:r,params:i}=JE(t);return function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}}(r,i,[n])});function JE(e){const t=e.indexOf("?");return t===-1?{action:e,params:{}}:{action:e.slice(0,t),params:Object.fromEntries(new URLSearchParams(e.slice(t)))}}const $0=Un(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([e])=>function(t=[]){return{type:"bulletlist",children:t}}([e.startsWith(`
|
|
17
|
-
`)?e.slice(1):e])),
|
|
18
|
-
`);function t_(e,t={except:[]}){const n=function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:z0.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push($0,V0),s.includes("Mention")||o.singlelineSteps.push(B0),s.includes("CustomEmoji")||o.singlelineSteps.push(U0),s.includes("Codespan")||o.multilineSteps.push(F0()),s.includes("FormattedLink")||o.singlelineSteps.push(qE),s.includes("Actions")||(o.singlelineSteps.push(H0),o.singlelineSteps.push(j0)),s.includes("Wikitext")||o.singlelineSteps.push(eO),s.includes("Autolink")||o.singlelineSteps.push(QE,ZE),o}(t);let r=e_(e,n);return r=n_(r,!1),r}function e_(e,t){let n=[e];return n=al(n,t.multilineSteps),n=al(n,[Y0]),n=al(n,t.singlelineSteps),n=Ac(n),n}function al(e,t){return t.reduce((n,r)=>io(n,r),e)}function Ac(e){const t=[];let n=-1;for(const r of e)typeof r=="string"?typeof t[n]=="string"?t[n]+=r:t[++n]=r:t[++n]="children"in r?{...r,children:Ac(r.children)}:r;return t}function n_(e,t){const n=[];let r=[];for(let i=0;i<e.length;i++){const o=e[i];if(typeof o=="string")r.push(o);else if("children"in o){r.length>0&&(n.push(r.join("")),r=[]);const s=n_(o.children,t||o.type==="link"||o.type==="actionbutton"||o.type==="actionlink");n.push({...o,children:s})}else o.type==="autolink"&&t?r.push(o.text):(r.length>0&&(n.push(r.join("")),r=[]),n.push(o))}return r.length>0&&(n.push(r.join("")),r=[]),n}function G0(){let e,t=0;return n=>{const r=(o=Date.now())=>{if(window.clearTimeout(e),e=void 0,t=o,n.isDestroyed)return;const s=function(a){a=a.removeMark(0,a.doc.content.size,Xt.marks.bold),a=a.removeMark(0,a.doc.content.size,Xt.marks.italic),a=a.removeMark(0,a.doc.content.size,Xt.marks.strikethrough),a.doc.firstChild;const l=function(c){const u=[];let h,d="";return c.descendants((p,f)=>(p.isText?(d+=p.text,h!=null||(h=f)):d&&h!==void 0&&(u.push({text:d,pos:h}),d="",h=void 0),p.type!==Xt.nodes.mention)),d&&h!==void 0&&u.push({text:d,pos:h}),u}(a.doc);for(const{text:c,pos:u}of l){const h=t_(c,{only:["Wikitext"]});[a]=r_(a,u,h)}return a}(n.state.tr);n.dispatch(s)},i=Date.now();i-t<300?e||(e=window.setTimeout(r,300)):r(i)}}function r_(e,t,n,r=0,i=[]){for(const o of n)if(typeof o=="string"){for(const s of i)e.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=Xt.marks[o.type],a=[...i,s];[e,r]=r_(e,t,o.children,r,a),r+=1}else mt.unreachable();return[e,r]}function Qh(e){return(t,n)=>{if(!n)return!0;let r=t.tr;const i=Et.between(t.selection.$from,t.selection.$to);return r=r.replaceRangeWith(i.from,i.from,Xt.text(e,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,Xt.text(e,r.storedMarks)),r=r.setSelection(Et.near(r.doc.resolve(i.to+1))),n(r),!0}}function W0(e,t,n){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(h=>h.kind==="file"&&a[h.type]);if(l.length===0||o.types.includes("text/rtf"))return;const c=l[0];let u=c.getAsFile();if(!u.name){const h="image."+a[c.type];u=new File([u],h,{type:c.type,lastModified:Date.now()})}return u}(r);return i?n(i):function(o,s){const a=o.state.tr.insertText(s).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");o.dispatch(a)}(e,r.getData("text/plain")),!0}function tp(e){const{matcher:t,suggestionClass:n="ProseMirror-suggestion",onEnter:r=()=>!1,onChange:i=()=>!1,onExit:o=()=>!1,onKeyDown:s=()=>!1,debug:a=!1}=e;return new la({key:new ua("suggestions"),view(){return{update:(l,c)=>{const u=this.key.getState(c),h=this.key.getState(l.state);if(!u||!h)return;const d=u.active&&h.active&&u.range.from!==h.range.from,p=!u.active&&h.active,f=u.active&&!h.active,m=!p&&!f&&u.text!==h.text;(f||d)&&o({view:l,range:u.range,text:u.text}),m&&!d&&i({view:l,range:h.range,text:h.text}),(p||d)&&r({view:l,range:h.range,text:h.text})}}},state:{init:()=>({active:!1,range:{from:0,to:0},text:null}),apply(l,c){const{selection:u}=l,h={...c};if(u.from===u.to){(u.from<c.range.from||u.from>c.range.to)&&(h.active=!1);const d=u.$from,p=t(d);p?(h.active=!0,h.range=p.range,h.text=p.text):h.active=!1}else h.active=!1;return h.active||(h.range={from:0,to:0},h.text=null),h}},props:{handleKeyDown(l,c){var h;const u=this.getState(l.state);return!!(u!=null&&u.active)&&((h=s({view:l,event:c}))!=null?h:!1)},decorations(l){const c=this.getState(l);return c!=null&&c.active?$t.create(l.doc,[Be.inline(c.range.from,c.range.to,{nodeName:"span",class:n,style:a?"background: rgba(0, 0, 255, 0.05); color: blue; border: 2px solid blue;":void 0})]):null}}})}const ep=(e,t)=>n=>{var l;const r=(l=n.nodeBefore)==null?void 0:l.text;if(!r)return;const i=r.match(e);if(!i)return;const o=i[2],s=n.pos-o.length,a=n.pos;if(!n.doc.rangeHasMark(s,a,t.marks.literal))return{range:{from:s,to:a},text:o}},X0=/(^|\s)(:[^:\s]+:?)$/,K0=/(^|\s)(@[^@]*)$/;function i_({placeholder:e,disabled:t,className:n="",characterLimit:r,spellcheck:i}){const o=Lo(),s=Q(),a=Q(null);return Z(()=>(s.current=function(l,c,u,h,d){const p=ei.create({schema:Xt,plugins:[...d.filter(q0),VD(),Uh({...qo,"Mod-z":CE,"Mod-y":NE,"Mod-b":Qh("*"),"Mod-i":Qh("_"),"Mod-Enter":qo.Enter,"Shift-Enter":qo.Enter,Enter:u}),Uh({Enter:qo.Enter}),Bh]}),f=G0(),m=new TE(l,{handlePaste:(E,A,_)=>W0(E,A,h),clipboardTextSerializer(E){const A=[];return E.content.forEach(_=>{_&&A.push(xE(_.textContent))}),A.join()},state:p,dispatchTransaction(E){E=(E=E.removeStoredMark(Xt.marks.literal)).removeStoredMark(Xt.marks.emoji);const A=m.state.apply(E);m.state.doc.eq(A.doc)||c(new Fs(A.doc)),m.updateState(A),E.steps.some(_=>_ instanceof ie)&&f(m)}});return m}(a.current,l=>o.onChange(l),()=>!!o.onEnter&&(o.onEnter(),!0),l=>o.onPasteImage(l),[o.emojiSuggesterPlugin(),o.mentionsPlugin()]),o.setEditorView(s.current),()=>{var l;o.setEditorView(void 0),(l=s.current)==null||l.destroy()}),[o]),Z(()=>{var l;(l=s.current)==null||l.setProps({editable:()=>!t})},[t]),Z(()=>Ee(()=>{var l,c,u;return(u=s.current)==null?void 0:u.setProps({attributes:{spellcheck:String((c=(l=o.spellcheck$.get())!=null?l:i)!=null?c:!1),class:"t-text-input","aria-label":"Message Field",role:"textbox"}})}),[o,i]),Z(()=>Ee(()=>{var c;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(Bh,(c=o.placeholder$.get())!=null?c:e))}),[o,e]),Z(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),P("div",{className:`t-editor ${n}`,ref:a})}function np(e){if(e.startsWith(":"))throw new Error("Not implemented");{const t=Xt.marks.emoji.create({emoji:e});return Xt.text(e,[t])}}function rp(e,t){const n=encodeURIComponent(e);return Xt.nodes.mention.create({id:e,name:t},Xt.text(`<!!mention:${n}|${t}>`))}const Js=class Js{constructor(t){this.doc=t,this.size=this.doc.content.size,this.hasContent=RE(this.doc)}hasNonWhitespaceContent(){return this.hasContent&&function(t){let n=!1;return t.descendants(r=>!(r.isText&&r.text&&/\S/.test(r.text))||(n=!0,!1)),n}(this.doc)}asText(){return this.doc.textContent.replace(/\xa0/g," ")}};Js.EMPTY=new Js(Xt.topNodeType.create());let Fs=Js;function q0(e){return e!=null}class o_{constructor(t,n,r){this.state$=t,this.device$=n,this.userPermissions$=r,this.currentDoc=Fs.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$=Ut(),this.placeholder$=Ut()}setEditorView(t){this.editorView=t}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return tp({debug:!1,matcher:ep(X0,Xt),onEnter:t=>this.suggestEmoji(t.text,t.range),onChange:t=>this.suggestEmoji(t.text,t.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:t})=>{var n,r,i;return(i=(r=(n=this._suggesterKeydownHandlers).emoji)==null?void 0:r.call(n,t.key))!=null?i:!1}})}mentionsPlugin(){const t=this.userPermissions$.peek();if(mt.defined(t),t.canMention)return tp({debug:!1,matcher:ep(K0,Xt),onEnter:n=>this.suggestMention(n.text,n.range),onChange:n=>this.suggestMention(n.text,n.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:n})=>{var r,i,o;return(o=(i=(r=this._suggesterKeydownHandlers).mention)==null?void 0:i.call(r,n.key))!=null?o:!1}})}closeSuggester(){mt.defined(this._suggestionRange),function(t,n){const{from:r,to:i}=n,o=t.state.tr.addMark(r,i,Xt.marks.literal.create());t.dispatch(o)}(this.editorView,this._suggestionRange)}listenKeydown(t,n){this._suggesterKeydownHandlers[t]=n}onExitSuggester(){this._suggestionRange=void 0,this.state$.suggestEmojiQuery.set(void 0),this.state$.suggestMentionQuery.set(void 0)}suggestEmoji(t,n){t.length<2||(this._suggestionRange=n,this.state$.suggestEmojiQuery.set(t))}suggestMention(t,n){t.length<1||(this._suggestionRange=n,this.state$.suggestMentionQuery.set(t))}onPasteImage(t){mt.defined(this.uploadFile),this.uploadFile(t)}onChange(t){var r;this.currentDoc=t;const n=t.size>this.maxLength&&t.asText().length>this.maxLength;t.hasContent&&this.markAsTyping(),this.state$.assign({isTyping:t.hasContent,atTextLimit:n,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 n,r;t?(n=this.editorView)==null||n.dom.focus():(r=this.editorView)==null||r.focus()}setText(t){this.editorView&&function(n,r){const i=n.state.doc.content.size,o=r.split(/(<!!(?:mention|customemoji):.*?>)/g).filter(a=>a||a.length).map(a=>{const[l,c,u]=a.match(/<!!mention:(.*)\|(.*)>/)||[null];if(l&&c&&u)return rp(c,u);const[h,d]=a.match(/<!!customemoji:(.*?)>/)||[null];return h&&d?np(d):Xt.text(a)}),s=n.state.tr.replaceWith(0,i,o);n.dispatch(s)}(this.editorView,t)}typeText(t){this.editorView&&function(n,r,i="replace"){const o=n.state.doc.content.size,s=i=="insert"?n.state.tr.insertText(r):n.state.tr.insertText(r,0,o);n.dispatch(s)}(this.editorView,t,"insert")}getText(){return this.currentDoc.asText().trim()}clearText(){this.editorView&&function(t){const n=t.state.doc.content.size,r=t.state.tr.insertText("",0,n);t.dispatch(r)}(this.editorView)}selectEmoji(t){mt.defined(this.editorView),function(n,r,i){const o=np(r);if(i){const{from:a,to:l}=i,c=n.state.tr.deleteRange(a,l);n.dispatch(c)}const s=n.state.tr.replaceSelectionWith(o,!1);n.dispatch(s)}(this.editorView,t,this._suggestionRange),this.focus()}selectMention(t){mt.defined(this.editorView),function(n,r,i){const o=rp(r.id,r.name);let s=n.state.tr;if(i){const{from:a,to:l}=i;s=s.replaceRangeWith(a,l,o)}else s=s.replaceSelectionWith(o,!1);s=s.insertText(" "),n.dispatch(s)}(this.editorView,t,this._suggestionRange),this.focus()}}const J0=Symbol("no_render");function Pe(e){const t=He(!1),n=Q({_value:typeof e=="function"?e():e.peek(),get value(){return setTimeout(()=>{t.set(!0)}),n.current._value},set value(r){n.current._value=r}});return dt(()=>{if(!t.get())return J0;const r=typeof e=="function"?e():e.get();return n.current.value=r,r}),n.current}function Hn(){const e=Po(),t=gt(),n=Sm(),r=be(),i=Pe(t.app$.appMetadata),o=Pe(t.currentUser$),s=Pe(t.state$.currentConversation),a=Pe(t.t$),l=Pe(t.device$),c=Pe(t.themeCustom$),u=Pe(()=>t.state$.typing.child(t.state$.extCurrentConversationId.get()).get()),h=Pe(()=>t.state$.participants.child(t.state$.extCurrentConversationId.get()).get());return lt(()=>({session:e,store:t,chatbox:n,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 c.value.value},get typing(){return u.value},get participants(){return h.value}}),[i,n,s,o,l,t,a,r,c,u,h,e])}function s_(){const e=Po(),t=gt(),n=be(),r=Sm(),i=Pe(t.app$.appMetadata),o=Pe(t.currentUser$),s=Pe(t.t$),a=Pe(t.device$),l=Pe(t.themeCustom$);return lt(()=>({session:e,store:t,theme:n,conversationList:r,get app(){return i.value},get currentUser(){return o.value},get t(){return s.value},get device(){return a.value},get themeCustom(){return l.value.value}}),[i,r,o,a,e,t,s,n,l])}const Z0=(()=>{if(typeof window!="undefined"){let e;try{e=window.localStorage;const t="__storage_test__";return e.setItem(t,t),e.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")&&e&&e.length!==0}}return!1})(),me={};Z0?(me.setItem=window.localStorage.setItem.bind(window.localStorage),me.getItem=window.localStorage.getItem.bind(window.localStorage),me.removeItem=window.localStorage.removeItem.bind(window.localStorage),me.isSupported=!0):(me.setItem=function(){},me.getItem=function(){return null},me.removeItem=function(){},me.isSupported=!1),me.set=(e,t)=>me.setItem(e,JSON.stringify(t)),me.get=e=>JSON.parse(me.getItem(e)||"null");const iu="talkjs_drafts",Q0=function(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}(200,(e,t,n,r)=>{const i=a_(e,t,n),o=JSON.parse(me.getItem(iu)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,me.setItem(iu,JSON.stringify(o))}),a_=(e,t,n)=>`draft_${e}_${t}_${n}`;function Ae(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(c){try{l(r.next(c))}catch(u){o(u)}}function a(c){try{l(r.throw(c))}catch(u){o(u)}}function l(c){var u;c.done?i(c.value):(u=c.value,u instanceof n?u:new n(function(h){h(u)})).then(s,a)}l((r=r.apply(e,t||[])).next())})}let Uo=class{constructor(){this.listeners={}}on(e,t,n){if(this.listeners[e]||(this.listeners[e]=new Set),n==null?void 0:n.once){const r=(...i)=>{this.un(e,r),t(...i)};return this.listeners[e].add(r),()=>this.un(e,r)}return this.listeners[e].add(t),()=>this.un(e,t)}un(e,t){var n;(n=this.listeners[e])===null||n===void 0||n.delete(t)}once(e,t){return this.on(e,t,{once:!0})}unAll(){this.listeners={}}emit(e,...t){this.listeners[e]&&this.listeners[e].forEach(n=>n(...t))}};const Qo={decode:function(e,t){return Ae(this,void 0,void 0,function*(){const n=new AudioContext({sampleRate:t});try{return yield n.decodeAudioData(e)}finally{n.close()}})},createBuffer:function(e,t){if(!e||e.length===0)throw new Error("channelData must be a non-empty array");if(t<=0)throw new Error("duration must be greater than 0");if(typeof e[0]=="number"&&(e=[e]),!e[0]||e[0].length===0)throw new Error("channelData must contain non-empty channel arrays");(function(r){const i=r[0];if(i.some(o=>o>1||o<-1)){const o=i.length;let s=0;for(let a=0;a<o;a++){const l=Math.abs(i[a]);l>s&&(s=l)}for(const a of r)for(let l=0;l<o;l++)a[l]/=s}})(e);const n=e.map(r=>r instanceof Float32Array?r:Float32Array.from(r));return{duration:t,length:n[0].length,sampleRate:n[0].length/t,numberOfChannels:n.length,getChannelData:r=>{const i=n[r];if(!i)throw new Error(`Channel ${r} not found`);return i},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function l_(e,t){const n=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[r,i]of Object.entries(t))if(r==="children"&&i)for(const[o,s]of Object.entries(i))s instanceof Node?n.appendChild(s):typeof s=="string"?n.appendChild(document.createTextNode(s)):n.appendChild(l_(o,s));else r==="style"?Object.assign(n.style,i):r==="textContent"?n.textContent=i:n.setAttribute(r,i.toString());return n}function ip(e,t,n){const r=l_(e,t||{});return n==null||n.appendChild(r),r}var tv=Object.freeze({__proto__:null,createElement:ip,default:ip});const ev={fetchBlob:function(e,t,n){return Ae(this,void 0,void 0,function*(){const r=yield fetch(e,n);if(r.status>=400)throw new Error(`Failed to fetch ${e}: ${r.status} (${r.statusText})`);return function(i,o){Ae(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 c=u=>{l+=(u==null?void 0:u.length)||0;const h=Math.round(l/a*100);o(h)};try{for(;;){const u=yield s.read();if(u.done)break;c(u.value)}}catch(u){console.warn("Progress tracking error:",u)}})}(r.clone(),t),r.blob()})}};function Ht(e){let t=e;const n=new Set;return{get value(){return t},set(r){Object.is(t,r)||(t=r,n.forEach(i=>i(t)))},update(r){this.set(r(t))},subscribe:r=>(n.add(r),()=>n.delete(r))}}function Dr(e,t){const n=Ht(e());return t.forEach(r=>r.subscribe(()=>{const i=e();Object.is(n.value,i)||n.set(i)})),{get value(){return n.value},subscribe:r=>n.subscribe(r)}}function Gn(e,t){let n;const r=()=>{n&&(n(),n=void 0),n=e()},i=t.map(o=>o.subscribe(r));return r(),()=>{n&&(n(),n=void 0),i.forEach(o=>o())}}class nv extends Uo{get isPlayingSignal(){return this._isPlaying}get currentTimeSignal(){return this._currentTime}get durationSignal(){return this._duration}get volumeSignal(){return this._volume}get mutedSignal(){return this._muted}get playbackRateSignal(){return this._playbackRate}get seekingSignal(){return this._seeking}constructor(t){super(),this.isExternalMedia=!1,this.reactiveMediaEventCleanups=[],t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),this._isPlaying=Ht(!1),this._currentTime=Ht(0),this._duration=Ht(0),this._volume=Ht(this.media.volume),this._muted=Ht(this.media.muted),this._playbackRate=Ht(this.media.playbackRate||1),this._seeking=Ht(!1),this.setupReactiveMediaEvents(),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})}setupReactiveMediaEvents(){this.reactiveMediaEventCleanups.push(this.onMediaEvent("play",()=>{this._isPlaying.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("pause",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ended",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("timeupdate",()=>{this._currentTime.set(this.media.currentTime)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("durationchange",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("loadedmetadata",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeking",()=>{this._seeking.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeked",()=>{this._seeking.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("volumechange",()=>{this._volume.set(this.media.volume),this._muted.set(this.media.muted)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ratechange",()=>{this._playbackRate.set(this.media.playbackRate)}))}onMediaEvent(t,n,r){return this.media.addEventListener(t,n,r),()=>this.media.removeEventListener(t,n,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,n){const r=this.getSrc();if(t&&r===t)return;this.revokeSrc();const i=n instanceof Blob&&(this.canPlayType(n.type)||!t)?URL.createObjectURL(n):t;if(r&&this.media.removeAttribute("src"),i||t)try{this.media.src=i}catch(o){this.media.src=t}}destroy(){this.reactiveMediaEventCleanups.forEach(t=>t()),this.reactiveMediaEventCleanups=[],this.isExternalMedia||(this.media.pause(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(t){this.reactiveMediaEventCleanups.forEach(n=>n()),this.reactiveMediaEventCleanups=[],this.media=t,this.setupReactiveMediaEvents()}play(){return Ae(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(t){if(t instanceof DOMException&&t.name==="AbortError")return;throw t}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,n){n!=null&&(this.media.preservesPitch=n),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}function rv({maxTop:e,maxBottom:t,halfHeight:n,vScale:r,barMinHeight:i=0,barAlign:o}){let s=Math.round(e*n*r),a=s+Math.round(t*n*r)||1;return a<i&&(a=i,o||(s=a/2)),{topHeight:s,totalHeight:a}}function iv({barAlign:e,halfHeight:t,topHeight:n,totalHeight:r,canvasHeight:i}){return e==="top"?0:e==="bottom"?i-r:t-n}function op(e,t,n){const r=t-e.left,i=n-e.top;return[r/e.width,i/e.height]}function u_(e){return!!(e.barWidth||e.barGap||e.barAlign)}function sp(e,t){if(!u_(t))return e;const n=t.barWidth||.5,r=n+(t.barGap||n/2);return r===0?e:Math.floor(e/r)*r}function ap({scrollLeft:e,totalWidth:t,numCanvases:n}){if(t===0)return[0];const r=e/t,i=Math.floor(r*n);return[i-1,i,i+1]}function lp(e){const t=e._cleanup;typeof t=="function"&&t()}class ov extends Uo{constructor(t,n){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.dragStream=null,this.scrollStream=null,this.subscriptions=[],this.options=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"),n&&o.appendChild(n),this.initEvents()}parentFromOptionsContainer(t){let n;if(typeof t=="string"?n=document.querySelector(t):t instanceof HTMLElement&&(n=t),!n)throw new Error("Container not found");return n}initEvents(){this.wrapper.addEventListener("click",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=op(r,n.clientX,n.clientY);this.emit("click",i,o)}),this.wrapper.addEventListener("dblclick",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=op(r,n.clientX,n.clientY);this.emit("dblclick",i,o)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollStream=function(n){const r=Ht({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth}),i=Dr(()=>function(a){const{scrollLeft:l,scrollWidth:c,clientWidth:u}=a;if(c===0)return{startX:0,endX:1};const h=l/c,d=(l+u)/c;return{startX:Math.max(0,Math.min(1,h)),endX:Math.max(0,Math.min(1,d))}}(r.value),[r]),o=Dr(()=>function(a){return{left:a.scrollLeft,right:a.scrollLeft+a.clientWidth}}(r.value),[r]),s=()=>{r.set({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth})};return n.addEventListener("scroll",s,{passive:!0}),{scrollData:r,percentages:i,bounds:o,cleanup:()=>{n.removeEventListener("scroll",s),lp(r)}}}(this.scrollContainer);const t=Gn(()=>{const{startX:n,endX:r}=this.scrollStream.percentages.value,{left:i,right:o}=this.scrollStream.bounds.value;this.emit("scroll",n,r,i,o)},[this.scrollStream.percentages,this.scrollStream.bounds]);if(this.subscriptions.push(t),typeof ResizeObserver=="function"){const n=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{n().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(),this.emit("resize"))}initDrag(){if(this.dragStream)return;this.dragStream=function(n,r={}){const{threshold:i=3,mouseButton:o=0,touchDelay:s=100}=r,a=Ht(null),l=new Map,c=matchMedia("(pointer: coarse)").matches;let u=()=>{};const h=d=>{if(d.button!==o||(l.set(d.pointerId,d),l.size>1))return;let p=d.clientX,f=d.clientY,m=!1;const E=Date.now(),A=n.getBoundingClientRect(),{left:_,top:g}=A,v=D=>{if(D.defaultPrevented||l.size>1||c&&Date.now()-E<s)return;const O=D.clientX,C=D.clientY,b=O-p,L=C-f;(m||Math.abs(b)>i||Math.abs(L)>i)&&(D.preventDefault(),D.stopPropagation(),m||(a.set({type:"start",x:p-_,y:f-g}),m=!0),a.set({type:"move",x:O-_,y:C-g,deltaX:b,deltaY:L}),p=O,f=C)},S=D=>{if(l.delete(D.pointerId),m){const O=D.clientX,C=D.clientY;a.set({type:"end",x:O-_,y:C-g})}u()},I=D=>{l.delete(D.pointerId),D.relatedTarget&&D.relatedTarget!==document.documentElement||S(D)},R=D=>{m&&(D.stopPropagation(),D.preventDefault())},y=D=>{D.defaultPrevented||l.size>1||m&&D.preventDefault()};document.addEventListener("pointermove",v),document.addEventListener("pointerup",S),document.addEventListener("pointerout",I),document.addEventListener("pointercancel",I),document.addEventListener("touchmove",y,{passive:!1}),document.addEventListener("click",R,{capture:!0}),u=()=>{document.removeEventListener("pointermove",v),document.removeEventListener("pointerup",S),document.removeEventListener("pointerout",I),document.removeEventListener("pointercancel",I),document.removeEventListener("touchmove",y),setTimeout(()=>{document.removeEventListener("click",R,{capture:!0})},10)}};return n.addEventListener("pointerdown",h),{signal:a,cleanup:()=>{u(),n.removeEventListener("pointerdown",h),l.clear(),lp(a)}}}(this.wrapper);const t=Gn(()=>{const n=this.dragStream.signal.value;if(!n)return;const r=this.wrapper.getBoundingClientRect().width,i=(o=n.x/r)<0?0:o>1?1:o;var o;n.type==="start"?(this.isDragging=!0,this.emit("dragstart",i)):n.type==="move"?this.emit("drag",i):n.type==="end"&&(this.isDragging=!1,this.emit("dragend",i))},[this.dragStream.signal]);this.subscriptions.push(t)}initHtml(){const t=document.createElement("div"),n=t.attachShadow({mode:"open"}),r=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return n.innerHTML=`
|
|
14
|
+
`);return{dom:l,text:d,slice:t}}function EE(e,t,n,r,i){let o,s,a=i.parent.type.spec.code;if(!n&&!t)return null;let l=!!t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",d=>{t=d(t,a||r,e)}),a)return s=new J(Y.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
|
15
|
+
`))),0,0),e.someProp("transformPasted",d=>{s=d(s,e,!0)}),s;let h=e.someProp("clipboardTextParser",d=>d(t,i,r,e));if(h)s=h;else{let d=i.marks(),{schema:p}=e.state,f=Pi.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,d)))})}}else e.someProp("transformPastedHTML",h=>{n=h(n,e)}),o=function(h){let d=/^(\s*<meta [^>]*>)*/.exec(h);d&&(h=h.slice(d[0].length));let p,f=OE().createElement("div"),m=/<([a-z][^>\s]+)/i.exec(h);if((p=m&&DE[m[1].toLowerCase()])&&(h=p.map(E=>"<"+E+">").join("")+h+p.map(E=>"</"+E+">").reverse().join("")),f.innerHTML=function(E){let A=window.trustedTypes;return A?(Ka||(Ka=A.defaultPolicy||A.createPolicy("ProseMirrorClipboard",{createHTML:_=>_})),Ka.createHTML(E)):E}(h),p)for(let E=0;E<p.length;E++)f=f.querySelector(p[E])||f;return f}(n),Fo&&function(h){let d=h.querySelectorAll(Qt?"span:not([class]):not([style])":"span.Apple-converted-space");for(let p=0;p<d.length;p++){let f=d[p];f.childNodes.length==1&&f.textContent==" "&&f.parentNode&&f.parentNode.replaceChild(h.ownerDocument.createTextNode(" "),f)}}(o);let c=o&&o.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let h=+u[3];h>0;h--){let d=o.firstChild;for(;d&&d.nodeType!=1;)d=d.nextSibling;if(!d)break;o=d}if(s||(s=(e.someProp("clipboardParser")||e.someProp("domParser")||_o.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!(!l&&!u),context:i,ruleFromNode:d=>d.nodeName!="BR"||d.nextSibling||!d.parentNode||SD.test(d.parentNode.nodeName)?null:{ignore:!0}})),u)s=function(h,d){if(!h.size)return h;let p,f=h.content.firstChild.type.schema;try{p=JSON.parse(d)}catch(_){return h}let{content:m,openStart:E,openEnd:A}=h;for(let _=p.length-2;_>=0;_-=2){let g=f.nodes[p[_]];if(!g||g.hasRequiredAttrs())break;m=Y.from(g.create(p[_+1],m)),E++,A++}return new J(m,E,A)}(yh(s,+u[1],+u[2]),u[4]);else if(s=J.maxOpen(function(h,d){if(h.childCount<2)return h;for(let p=d.depth;p>=0;p--){let f,m=d.node(p).contentMatchAt(d.index(p)),E=[];if(h.forEach(A=>{if(!E)return;let _,g=m.findWrapping(A.type);if(!g)return E=null;if(_=E.length&&f.length&&AE(g,f,A,E[E.length-1],0))E[E.length-1]=_;else{E.length&&(E[E.length-1]=gE(E[E.length-1],f.length));let D=_E(A,g);E.push(D),m=m.matchType(D.type),f=g}}),E)return Y.from(E)}return h}(s.content,i),!0),s.openStart||s.openEnd){let h=0,d=0;for(let p=s.content.firstChild;h<s.openStart&&!p.type.spec.isolating;h++,p=p.firstChild);for(let p=s.content.lastChild;d<s.openEnd&&!p.type.spec.isolating;d++,p=p.lastChild);s=yh(s,h,d)}return e.someProp("transformPasted",h=>{s=h(s,e,l)}),s}const SD=/^(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 _E(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Y.from(e));return e}function AE(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let o=AE(e,t,n,r.lastChild,i+1);if(o)return r.copy(r.content.replaceChild(r.childCount-1,o));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(Y.from(_E(n,e,i+1))))}}function gE(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,gE(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Y.empty,!0);return e.copy(n.append(r))}function Zl(e,t,n,r,i,o){let s=t<0?e.firstChild:e.lastChild,a=s.content;return e.childCount>1&&(o=0),i<r-1&&(a=Zl(a,t,n,r,i+1,o)),i>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Y.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function yh(e,t,n){return t<e.openStart&&(e=new J(Zl(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new J(Zl(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const DE={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 Ch=null;function OE(){return Ch||(Ch=document.implementation.createHTMLDocument("title"))}let Ka=null;const ge={},Oe={},TD={touchstart:!0,touchmove:!0};class RD{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:"",button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function tr(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function qa(e){e.someProp("handleDOMEvents",t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=r=>Ql(e,r))})}function Ql(e,t){return e.someProp("handleDOMEvents",n=>{let r=n[t.type];return!!r&&(r(e,t)||t.defaultPrevented)})}function ID(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function Ps(e){return{left:e.clientX,top:e.clientY}}function uc(e,t,n,r,i){if(r==-1)return!1;let o=e.state.doc.resolve(r);for(let s=o.depth+1;s>0;s--)if(e.someProp(t,a=>s>o.depth?a(e,n,o.nodeAfter,o.before(s),i,!0):a(e,n,o.node(s),o.before(s),i,!1)))return!0;return!1}function di(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta("pointer",!0),e.dispatch(r)}function yD(e,t,n,r,i){return uc(e,"handleClickOn",t,n,r)||e.someProp("handleClick",o=>o(e,t,r))||(i?function(o,s){if(s==-1)return!1;let a,l,c=o.state.selection;c instanceof nt&&(a=c.node);let u=o.state.doc.resolve(s);for(let h=u.depth+1;h>0;h--){let d=h>u.depth?u.nodeAfter:u.node(h);if(nt.isSelectable(d)){l=a&&c.$from.depth>0&&h>=c.$from.depth&&u.before(c.$from.depth+1)==c.$from.pos?u.before(c.$from.depth):u.before(h);break}}return l!=null&&(di(o,nt.create(o.state.doc,l)),!0)}(e,n):function(o,s){if(s==-1)return!1;let a=o.state.doc.resolve(s),l=a.nodeAfter;return!!(l&&l.isAtom&&nt.isSelectable(l))&&(di(o,new nt(a)),!0)}(e,n))}function CD(e,t,n,r){return uc(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",i=>i(e,t,r))}function ND(e,t,n,r){return uc(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",i=>i(e,t,r))||function(i,o,s){if(s.button!=0)return!1;let a=i.state.doc;if(o==-1)return!!a.inlineContent&&(di(i,_t.create(a,0,a.content.size)),!0);let l=a.resolve(o);for(let c=l.depth+1;c>0;c--){let u=c>l.depth?l.nodeAfter:l.node(c),h=l.before(c);if(u.inlineContent)di(i,_t.create(a,h+1,h+1+u.content.size));else{if(!nt.isSelectable(u))continue;di(i,nt.create(a,h))}return!0}}(e,n,r)}function tu(e){return Ms(e)}Oe.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Nh(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!Pn||!Qt||n.keyCode!=13))if(n.keyCode!=229&&e.domObserver.forceFlush(),!Ri||n.keyCode!=13||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",r=>r(e,n))||vD(e,n)?n.preventDefault():tr(e,"key");else{let r=Date.now();e.input.lastIOSEnter=r,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==r&&(e.someProp("handleKeyDown",i=>i(e,Or(13,"Enter"))),e.input.lastIOSEnter=0)},200)}},Oe.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},Oe.keypress=(e,t)=>{let n=t;if(Nh(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||Ye&&n.metaKey)return;if(e.someProp("handleKeyPress",i=>i(e,n)))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof _t&&r.$from.sameParent(r.$to))){let i=String.fromCharCode(n.charCode),o=()=>e.state.tr.insertText(i).scrollIntoView();/[\r\n]/.test(i)||e.someProp("handleTextInput",s=>s(e,r.$from.pos,r.$to.pos,i,o))||e.dispatch(o()),n.preventDefault()}};const vE=Ye?"metaKey":"ctrlKey";ge.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=tu(e),i=Date.now(),o="singleClick";i-e.input.lastClick.time<500&&function(a,l){let c=l.x-a.clientX,u=l.y-a.clientY;return c*c+u*u<100}(n,e.input.lastClick)&&!n[vE]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type=="singleClick"?o="doubleClick":e.input.lastClick.type=="doubleClick"&&(o="tripleClick")),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o,button:n.button};let s=e.posAtCoords(Ps(n));s&&(o=="singleClick"?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new bD(e,s,n,!!r)):(o=="doubleClick"?CD:ND)(e,s.pos,s.inside,n)?n.preventDefault():tr(e,"pointer"))};class bD{constructor(t,n,r,i){let o,s;if(this.view=t,this.pos=n,this.event=r,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=t.state.doc,this.selectNode=!!r[vE],this.allowDefault=r.shiftKey,n.inside>-1)o=t.state.doc.nodeAt(n.inside),s=n.inside;else{let u=t.state.doc.resolve(n.pos);o=u.parent,s=u.depth?u.before():0}const a=i?null:r.target,l=a?t.docView.nearestDesc(a,!0):null;this.target=l&&l.nodeDOM.nodeType==1?l.nodeDOM:null;let{selection:c}=t.state;(r.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof nt&&c.from<=s&&c.to>s)&&(this.mightDrag={node:o,pos:s,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!qe||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)),tr(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(()=>Fn(this.view)),this.view.input.mouseDown=null}up(t){if(this.done(),!this.view.dom.contains(t.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(Ps(t))),this.updateAllowDefault(t),this.allowDefault||!n?tr(this.view,"pointer"):yD(this.view,n.pos,n.inside,t,this.selectNode)?t.preventDefault():t.button==0&&(this.flushed||ae&&this.mightDrag&&!this.mightDrag.node.isAtom||Qt&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(di(this.view,gt.near(this.view.state.doc.resolve(n.pos))),t.preventDefault()):tr(this.view,"pointer")}move(t){this.updateAllowDefault(t),tr(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 Nh(e,t){return!!e.composing||!!(ae&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}ge.touchstart=e=>{e.input.lastTouch=Date.now(),tu(e),tr(e,"pointer")},ge.touchmove=e=>{e.input.lastTouch=Date.now(),tr(e,"pointer")},ge.contextmenu=e=>tu(e);const kD=Pn?5e3:-1;function bh(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Ms(e),t))}function SE(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function wD(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=function(i,o){for(;;){if(i.nodeType==3&&o)return i;if(i.nodeType==1&&o>0){if(i.contentEditable=="false")return null;o=Ge(i=i.childNodes[o-1])}else{if(!i.parentNode||Do(i))return null;o=se(i),i=i.parentNode}}}(t.focusNode,t.focusOffset),r=function(i,o){for(;;){if(i.nodeType==3&&o<i.nodeValue.length)return i;if(i.nodeType==1&&o<i.childNodes.length){if(i.contentEditable=="false")return null;i=i.childNodes[o],o=0}else{if(!i.parentNode||Do(i))return null;o=se(i)+1,i=i.parentNode}}}(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let i=r.pmViewDesc,o=e.domObserver.lastChangedTextNode;if(n==o||r==o)return o;if(!i||!i.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let s=n.pmViewDesc;if(s&&s.isText(n.nodeValue))return r}}return n||r}function Ms(e,t=!1){if(!(Pn&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),SE(e),t||e.docView&&e.docView.dirty){let n=sc(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):!e.markCursor&&!t||r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.updateState(e.state):e.dispatch(e.state.tr.deleteSelection()),!0}return!1}}Oe.compositionstart=Oe.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof _t&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(r=>r.type.spec.inclusive===!1)||Qt&&oE&&function(r){let{focusNode:i,focusOffset:o}=r.domSelectionRange();if(!i||i.nodeType!=1||o>=i.childNodes.length)return!1;let s=i.childNodes[o];return s.nodeType==1&&s.contentEditable=="false"}(e)))e.markCursor=e.state.storedMarks||n.marks(),Ms(e,!0),e.markCursor=null;else if(Ms(e,!t.selection.empty),qe&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let r=e.domSelectionRange();for(let i=r.focusNode,o=r.focusOffset;i&&i.nodeType==1&&o!=0;){let s=o<0?i.lastChild:i.childNodes[o-1];if(!s)break;if(s.nodeType==3){let a=e.domSelection();a&&a.collapse(s,s.nodeValue.length);break}i=s,o=-1}}e.input.composing=!0}bh(e,kD)},Oe.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,bh(e,20))};const ro=be&&nr<15||Ri&&cD<604;function io(e,t,n,r,i){let o=EE(e,t,n,r,e.state.selection.$from);if(e.someProp("handlePaste",l=>l(e,i,o||J.empty)))return!0;if(!o)return!1;let s=function(l){return l.openStart==0&&l.openEnd==0&&l.content.childCount==1?l.content.firstChild:null}(o),a=s?e.state.tr.replaceSelectionWith(s,r):e.state.tr.replaceSelection(o);return e.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function TE(e){let t=e.getData("text/plain")||e.getData("Text");if(t)return t;let n=e.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}ge.copy=Oe.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type=="cut";if(r.empty)return;let o=ro?null:n.clipboardData,s=r.content(),{dom:a,text:l}=lc(e,s);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):function(c,u){if(!c.dom.parentNode)return;let h=c.dom.parentNode.appendChild(document.createElement("div"));h.appendChild(u),h.style.cssText="position: fixed; left: -10000px; top: 10px";let d=getSelection(),p=document.createRange();p.selectNodeContents(u),c.dom.blur(),d.removeAllRanges(),d.addRange(p),setTimeout(()=>{h.parentNode&&h.parentNode.removeChild(h),c.focus()},50)}(e,a),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Oe.paste=(e,t)=>{let n=t;if(e.composing&&!Pn)return;let r=ro?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&io(e,TE(r),r.getData("text/html"),i,n)?n.preventDefault():function(o,s){if(!o.dom.parentNode)return;let a=o.input.shiftKey||o.state.selection.$from.parent.type.spec.code,l=o.dom.parentNode.appendChild(document.createElement(a?"textarea":"div"));a||(l.contentEditable="true"),l.style.cssText="position: fixed; left: -10000px; top: 10px",l.focus();let c=o.input.shiftKey&&o.input.lastKeyCode!=45;setTimeout(()=>{o.focus(),l.parentNode&&l.parentNode.removeChild(l),a?io(o,l.value,null,c,s):io(o,l.textContent,l.innerHTML,c,s)},50)}(e,n)};class RE{constructor(t,n,r){this.slice=t,this.move=n,this.node=r}}const LD=Ye?"altKey":"ctrlKey";function kh(e,t){let n=e.someProp("dragCopies",r=>!r(t));return n!=null?n:!t[LD]}ge.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i,o=e.state.selection,s=o.empty?null:e.posAtCoords(Ps(n));if(!(s&&s.pos>=o.from&&s.pos<=(o instanceof nt?o.to-1:o.to))){if(r&&r.mightDrag)i=nt.create(e.state.doc,r.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let h=e.docView.nearestDesc(n.target,!0);h&&h.node.type.spec.draggable&&h!=e.docView&&(i=nt.create(e.state.doc,h.posBefore))}}let a=(i||e.state.selection).content(),{dom:l,text:c,slice:u}=lc(e,a);(!n.dataTransfer.files.length||!Qt||iE>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(ro?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",ro||n.dataTransfer.setData("text/plain",c),e.dragging=new RE(u,kh(e,n),i)},ge.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},Oe.dragover=Oe.dragenter=(e,t)=>t.preventDefault(),Oe.drop=(e,t)=>{try{(function(n,r,i){if(!r.dataTransfer)return;let o=n.posAtCoords(Ps(r));if(!o)return;let s=n.state.doc.resolve(o.pos),a=i&&i.slice;a?n.someProp("transformPasted",m=>{a=m(a,n,!1)}):a=EE(n,TE(r.dataTransfer),ro?null:r.dataTransfer.getData("text/html"),!1,s);let l=!(!i||!kh(n,r));if(n.someProp("handleDrop",m=>m(n,r,a||J.empty,l)))return void r.preventDefault();if(!a)return;r.preventDefault();let c=a?function(m,E,A){let _=m.resolve(E);if(!A.content.size)return E;let g=A.content;for(let D=0;D<A.openStart;D++)g=g.firstChild.content;for(let D=1;D<=(A.openStart==0&&A.size?2:1);D++)for(let S=_.depth;S>=0;S--){let I=S==_.depth?0:_.pos<=(_.start(S+1)+_.end(S+1))/2?-1:1,T=_.index(S)+(I>0?1:0),C=_.node(S),O=!1;if(D==1)O=C.canReplace(T,T,g);else{let v=C.contentMatchAt(T).findWrapping(g.firstChild.type);O=v&&C.canReplaceWith(T,T,v[0])}if(O)return I==0?_.pos:I<0?_.before(S+1):_.after(S+1)}return null}(n.state.doc,s.pos,a):s.pos;c==null&&(c=s.pos);let u=n.state.tr;if(l){let{node:m}=i;m?m.replace(u):u.deleteSelection()}let h=u.mapping.map(c),d=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,p=u.doc;if(d?u.replaceRangeWith(h,h,a.content.firstChild):u.replaceRange(h,h,a),u.doc.eq(p))return;let f=u.doc.resolve(h);if(d&&nt.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))u.setSelection(new nt(f));else{let m=u.mapping.map(c);u.mapping.maps[u.mapping.maps.length-1].forEach((E,A,_,g)=>m=g),u.setSelection(ac(n,f,u.doc.resolve(m)))}n.focus(),n.dispatch(u.setMeta("uiEvent","drop"))})(e,t,e.dragging)}finally{e.dragging=null}},ge.focus=e=>{e.input.lastFocus=Date.now(),e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout(()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelectionRange())&&Fn(e)},20))},ge.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},ge.beforeinput=(e,t)=>{if(Qt&&Pn&&t.inputType=="deleteContentBackward"){e.domObserver.flushSoon();let{domChangeCount:n}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=n||(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",i=>i(e,Or(8,"Backspace")))))return;let{$cursor:r}=e.state.selection;r&&r.pos>0&&e.dispatch(e.state.tr.delete(r.pos-1,r.pos).scrollIntoView())},50)}};for(let e in Oe)ge[e]=Oe[e];function Oo(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class xs{constructor(t,n){this.toDOM=t,this.spec=n||wr,this.side=this.spec.side||0}map(t,n,r,i){let{pos:o,deleted:s}=t.mapResult(n.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 xs&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&Oo(this.spec,t.spec))}destroy(t){this.spec.destroy&&this.spec.destroy(t)}}class ir{constructor(t,n){this.attrs=t,this.spec=n||wr}map(t,n,r,i){let o=t.map(n.from+i,this.spec.inclusiveStart?-1:1)-r,s=t.map(n.to+i,this.spec.inclusiveEnd?1:-1)-r;return o>=s?null:new Fe(o,s,this)}valid(t,n){return n.from<n.to}eq(t){return this==t||t instanceof ir&&Oo(this.attrs,t.attrs)&&Oo(this.spec,t.spec)}static is(t){return t.type instanceof ir}destroy(){}}class cc{constructor(t,n){this.attrs=t,this.spec=n||wr}map(t,n,r,i){let o=t.mapResult(n.from+i,1);if(o.deleted)return null;let s=t.mapResult(n.to+i,-1);return s.deleted||s.pos<=o.pos?null:new Fe(o.pos-r,s.pos-r,this)}valid(t,n){let r,{index:i,offset:o}=t.content.findIndex(n.from);return o==n.from&&!(r=t.child(i)).isText&&o+r.nodeSize==n.to}eq(t){return this==t||t instanceof cc&&Oo(this.attrs,t.attrs)&&Oo(this.spec,t.spec)}destroy(){}}class Fe{constructor(t,n,r){this.from=t,this.to=n,this.type=r}copy(t,n){return new Fe(t,n,this.type)}eq(t,n=0){return this.type.eq(t.type)&&this.from+n==t.from&&this.to+n==t.to}map(t,n,r){return this.type.map(t,this,n,r)}static widget(t,n,r){return new Fe(t,t,new xs(n,r))}static inline(t,n,r,i){return new Fe(t,n,new ir(r,i))}static node(t,n,r,i){return new Fe(t,n,new cc(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof ir}get widget(){return this.type instanceof xs}}const Zr=[],wr={};class $t{constructor(t,n){this.local=t.length?t:Zr,this.children=n.length?n:Zr}static create(t,n){return n.length?ps(n,t,0,wr):ce}find(t,n,r){let i=[];return this.findInner(t==null?0:t,n==null?1e9:n,i,0,r),i}findInner(t,n,r,i,o){for(let s=0;s<this.local.length;s++){let a=this.local[s];a.from<=n&&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]<n&&this.children[s+1]>t){let a=this.children[s]+1;this.children[s+2].findInner(t-a,n-a,r,i+a,o)}}map(t,n,r){return this==ce||t.maps.length==0?this:this.mapInner(t,n,0,0,r||wr)}mapInner(t,n,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(n,l)?(s||(s=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?function(a,l,c,u,h,d,p){let f=a.slice();for(let E=0,A=d;E<c.maps.length;E++){let _=0;c.maps[E].forEach((g,D,S,I)=>{let T=I-S-(D-g);for(let C=0;C<f.length;C+=3){let O=f[C+1];if(O<0||g>O+A-_)continue;let v=f[C]+A-_;D>=v?f[C+1]=g<=v?-2:-1:g>=A&&T&&(f[C]+=T,f[C+1]+=T)}_+=T}),A=c.maps[E].map(A,-1)}let m=!1;for(let E=0;E<f.length;E+=3)if(f[E+1]<0){if(f[E+1]==-2){m=!0,f[E+1]=-1;continue}let A=c.map(a[E]+d),_=A-h;if(_<0||_>=u.content.size){m=!0;continue}let g=c.map(a[E+1]+d,-1)-h,{index:D,offset:S}=u.content.findIndex(_),I=u.maybeChild(D);if(I&&S==_&&S+I.nodeSize==g){let T=f[E+2].mapInner(c,I,A+1,a[E]+d+1,p);T!=ce?(f[E]=_,f[E+1]=g,f[E+2]=T):(f[E+1]=-2,m=!0)}else m=!0}if(m){let E=function(_,g,D,S,I,T,C){function O(v,y){for(let b=0;b<v.local.length;b++){let P=v.local[b].map(S,I,y);P?D.push(P):C.onRemove&&C.onRemove(v.local[b].spec)}for(let b=0;b<v.children.length;b+=3)O(v.children[b+2],v.children[b]+y+1)}for(let v=0;v<_.length;v+=3)_[v+1]==-1&&O(_[v+2],g[v]+T+1);return D}(f,a,l,c,h,d,p),A=ps(E,u,0,p);l=A.local;for(let _=0;_<f.length;_+=3)f[_+1]<0&&(f.splice(_,3),_-=3);for(let _=0,g=0;_<A.children.length;_+=3){let D=A.children[_];for(;g<f.length&&f[g]<D;)g+=3;f.splice(g,0,A.children[_],A.children[_+1],A.children[_+2])}}return new $t(l.sort(Tr),f)}(this.children,s||[],t,n,r,i,o):s?new $t(s.sort(Tr),Zr):ce}add(t,n){return n.length?this==ce?$t.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,o=0;t.forEach((a,l)=>{let c,u=l+r;if(c=yE(n,a,u)){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,c,u+1):i.splice(o,0,l,l+a.nodeSize,ps(c,a,u+1,wr)),o+=3}});let s=IE(o?CE(n):n,-r);for(let a=0;a<s.length;a++)s[a].type.valid(t,s[a])||s.splice(a--,1);return new $t(s.length?this.local.concat(s).sort(Tr):this.local,i||this.children)}remove(t){return t.length==0||this==ce?this:this.removeInner(t,0)}removeInner(t,n){let r=this.children,i=this.local;for(let o=0;o<r.length;o+=3){let s,a=r[o]+n,l=r[o+1]+n;for(let u,h=0;h<t.length;h++)(u=t[h])&&u.from>a&&u.to<l&&(t[h]=null,(s||(s=[])).push(u));if(!s)continue;r==this.children&&(r=this.children.slice());let c=r[o+2].removeInner(s,a+1);c!=ce?r[o+2]=c:(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,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new $t(i,r):ce}forChild(t,n){if(this==ce)return this;if(n.isLeaf)return $t.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+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<s&&l.to>o&&l.type instanceof ir){let c=Math.max(o,l.from)-o,u=Math.min(s,l.to)-o;c<u&&(i||(i=[])).push(l.copy(c,u))}}if(i){let a=new $t(i.sort(Tr),Zr);return r?new qn([a,r]):a}return r||ce}eq(t){if(this==t)return!0;if(!(t instanceof $t)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(t.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=t.children[n]||this.children[n+1]!=t.children[n+1]||!this.children[n+2].eq(t.children[n+2]))return!1;return!0}locals(t){return dc(this.localsInner(t))}localsInner(t){if(this==ce)return Zr;if(t.inlineContent||!this.local.some(ir.is))return this.local;let n=[];for(let r=0;r<this.local.length;r++)this.local[r].type instanceof ir||n.push(this.local[r]);return n}forEachSet(t){t(this)}}$t.empty=new $t([],[]),$t.removeOverlap=dc;const ce=$t.empty;class qn{constructor(t){this.members=t}map(t,n){const r=this.members.map(i=>i.map(t,n,wr));return qn.from(r)}forChild(t,n){if(n.isLeaf)return $t.empty;let r=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(t,n);o!=ce&&(o instanceof qn?r=r.concat(o.members):r.push(o))}return qn.from(r)}eq(t){if(!(t instanceof qn)||t.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(t.members[n]))return!1;return!0}locals(t){let n,r=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(t);if(o.length)if(n){r&&(n=n.slice(),r=!1);for(let s=0;s<o.length;s++)n.push(o[s])}else n=o}return n?dc(r?n:n.sort(Tr)):Zr}static from(t){switch(t.length){case 0:return ce;case 1:return t[0];default:return new qn(t.every(n=>n instanceof $t)?t:t.reduce((n,r)=>n.concat(r instanceof $t?r:r.members),[]))}}forEachSet(t){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(t)}}function IE(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new Fe(i.from+t,i.to+t,i.type))}return n}function yE(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let o,s=0;s<e.length;s++)(o=e[s])&&o.from>n&&o.to<r&&((i||(i=[])).push(o),e[s]=null);return i}function CE(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function ps(e,t,n,r){let i=[],o=!1;t.forEach((a,l)=>{let c=yE(e,a,l+n);if(c){o=!0;let u=ps(c,a,n+l+1,r);u!=ce&&i.push(l,l+a.nodeSize,u)}});let s=IE(o?CE(e):e,-n).sort(Tr);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 $t(s,i):ce}function Tr(e,t){return e.from-t.from||e.to-t.to}function dc(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let o=t[i];if(o.from!=r.from){o.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,o.from),wh(t,i,r.copy(o.from,r.to)));break}o.to!=r.to&&(t==e&&(t=e.slice()),t[i]=o.copy(o.from,r.to),wh(t,i+1,o.copy(r.to,o.to)))}}return t}function wh(e,t,n){for(;t<e.length&&Tr(n,e[t])>0;)t++;e.splice(t,0,n)}function Ja(e){let t=[];return e.someProp("decorations",n=>{let r=n(e.state);r&&r!=ce&&t.push(r)}),e.cursorWrapper&&t.push($t.create(e.state.doc,[e.cursorWrapper.deco])),qn.from(t)}const PD={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},MD=be&&nr<=11;class xD{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 FD{constructor(t,n){this.view=t,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new xD,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(r=>{for(let i=0;i<r.length;i++)this.queue.push(r[i]);be&&nr<=11&&r.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():ae&&t.composing&&r.some(i=>i.type=="childList"&&i.target.nodeName=="TR")?(t.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),MD&&(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,PD)),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 n=0;n<t.length;n++)this.queue.push(t[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Dh(this.view)){if(this.suppressingSelectionUpdates)return Fn(this.view);if(be&&nr<=11&&!this.view.state.selection.empty){let t=this.view.domSelectionRange();if(t.focusNode&&Fr(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 n,r=new Set;for(let o=t.focusNode;o;o=Ti(o))r.add(o);for(let o=t.anchorNode;o;o=Ti(o))if(r.has(o)){n=o;break}let i=n&&this.view.docView.nearestDesc(n);return i&&i.ignoreMutation({type:"selection",target:n.nodeType==3?n.parentNode:n})?(this.setCurSelection(),!0):void 0}pendingRecords(){if(this.observer)for(let 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 n=this.pendingRecords();n.length&&(this.queue=[]);let r=t.domSelectionRange(),i=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(r)&&Dh(t)&&!this.ignoreSelectionChange(r),o=-1,s=-1,a=!1,l=[];if(t.editable)for(let u=0;u<n.length;u++){let h=this.registerMutation(n[u],l);h&&(o=o<0?h.from:Math.min(h.from,o),s=s<0?h.to:Math.max(h.to,s),h.typeOver&&(a=!0))}if(qe&&l.length){let u=l.filter(h=>h.nodeName=="BR");if(u.length==2){let[h,d]=u;h.parentNode&&h.parentNode.parentNode==d.parentNode?d.remove():h.remove()}else{let{focusNode:h}=this.currentSelection;for(let d of u){let p=d.parentNode;!p||p.nodeName!="LI"||h&&BD(t,h)==p||d.remove()}}}else if((Qt||ae)&&l.some(u=>u.nodeName=="BR")&&(t.input.lastKeyCode==8||t.input.lastKeyCode==46)){for(let u of l)if(u.nodeName=="BR"&&u.parentNode){let h=u.nextSibling;h&&h.nodeType==1&&h.contentEditable=="false"&&u.parentNode.removeChild(u)}}let c=null;o<0&&i&&t.input.lastFocus>Date.now()-200&&Math.max(t.input.lastTouch,t.input.lastClick.time)<Date.now()-300&&pa(r)&&(c=sc(t))&&c.eq(gt.near(t.state.doc.resolve(0),1))?(t.input.lastFocus=0,Fn(t),this.currentSelection.set(r),t.scrollToSelection()):(o>-1||i)&&(o>-1&&(t.docView.markDirty(o,s),function(u){if(!Lh.has(u)&&(Lh.set(u,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(u.dom).whiteSpace)!==-1)){if(u.requiresGeckoHackNode=qe,Ph)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."),Ph=!0}}(t)),t.input.badSafariComposition&&(t.input.badSafariComposition=!1,function(u,h){var d;let{focusNode:p,focusOffset:f}=u.domSelectionRange();for(let m of h)if(((d=m.parentNode)===null||d===void 0?void 0:d.nodeName)=="TR"){let E=m.nextSibling;for(;E&&E.nodeName!="TD"&&E.nodeName!="TH";)E=E.nextSibling;if(E){let A=E;for(;;){let _=A.firstChild;if(!_||_.nodeType!=1||_.contentEditable=="false"||/^(BR|IMG)$/.test(_.nodeName))break;A=_}A.insertBefore(m,A.firstChild),p==m&&u.domSelection().collapse(m,f)}else m.parentNode.removeChild(m)}}(t,l)),this.handleDOMChange(o,s,a,l),t.docView&&t.docView.dirty?t.updateState(t.state):this.currentSelection.eq(r)||Fn(t),this.currentSelection.set(r))}registerMutation(t,n){if(n.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 c=0;c<t.addedNodes.length;c++){let u=t.addedNodes[c];n.push(u),u.nodeType==3&&(this.lastChangedTextNode=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(be&&nr<=11&&t.addedNodes.length)for(let c=0;c<t.addedNodes.length;c++){let{previousSibling:u,nextSibling:h}=t.addedNodes[c];(!u||Array.prototype.indexOf.call(t.addedNodes,u)<0)&&(i=u),(!h||Array.prototype.indexOf.call(t.addedNodes,h)<0)&&(o=h)}let s=i&&i.parentNode==t.target?se(i)+1:0,a=r.localPosFromDOM(t.target,s,-1),l=o&&o.parentNode==t.target?se(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}:(this.lastChangedTextNode=t.target,{from:r.posAtStart,to:r.posAtEnd,typeOver:t.target.nodeValue==t.oldValue})}}let Lh=new WeakMap,Ph=!1;function Mh(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,o=t.endOffset,s=e.domAtPos(e.state.selection.anchor);return Fr(s.node,s.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function BD(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let r=e.docView.nearestDesc(n,!0);if(r&&r.node.isBlock)return n}return null}function UD(e){let t=e.pmViewDesc;if(t)return t.parseRule();if(e.nodeName=="BR"&&e.parentNode){if(ae&&/^(ul|ol)$/i.test(e.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}if(e.parentNode.lastChild==e||ae&&/^(tr|table)$/i.test(e.parentNode.nodeName))return{ignore:!0}}else if(e.nodeName=="IMG"&&e.getAttribute("mark-placeholder"))return{ignore:!0};return null}const HD=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function jD(e,t,n,r,i){let o=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let T=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,C=sc(e,T);if(C&&!e.state.selection.eq(C)){if(Qt&&Pn&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&e.someProp("handleKeyDown",v=>v(e,Or(13,"Enter"))))return;let O=e.state.tr.setSelection(C);T=="pointer"?O.setMeta("pointer",!0):T=="key"&&O.scrollIntoView(),o&&O.setMeta("composition",o),e.dispatch(O)}return}let s=e.state.doc.resolve(t),a=s.sharedDepth(n);t=s.before(a+1),n=e.state.doc.resolve(n).after(a+1);let l,c,u=e.state.selection,h=function(T,C,O){let v,{node:y,fromOffset:b,toOffset:P,from:w,to:F}=T.docView.parseRange(C,O),H=T.domSelectionRange(),B=H.anchorNode;if(B&&T.dom.contains(B.nodeType==1?B:B.parentNode)&&(v=[{node:B,offset:H.anchorOffset}],pa(H)||v.push({node:H.focusNode,offset:H.focusOffset})),Qt&&T.input.lastKeyCode===8)for(let tt=P;tt>b;tt--){let rt=y.childNodes[tt-1],ot=rt.pmViewDesc;if(rt.nodeName=="BR"&&!ot){P=tt;break}if(!ot||ot.size)break}let K=T.state.doc,W=T.someProp("domParser")||_o.fromSchema(T.state.schema),X=K.resolve(w),G=null,ht=W.parse(y,{topNode:X.parent,topMatch:X.parent.contentMatchAt(X.index()),topOpen:!0,from:b,to:P,preserveWhitespace:X.parent.type.whitespace!="pre"||"full",findPositions:v,ruleFromNode:UD,context:X});if(v&&v[0].pos!=null){let tt=v[0].pos,rt=v[1]&&v[1].pos;rt==null&&(rt=tt),G={anchor:tt+w,head:rt+w}}return{doc:ht,sel:G,from:w,to:F}}(e,t,n),d=e.state.doc,p=d.slice(h.from,h.to);e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(l=e.state.selection.to,c="end"):(l=e.state.selection.from,c="start"),e.input.lastKeyCode=null;let f=function(T,C,O,v,y){let b=T.findDiffStart(C,O);if(b==null)return null;let{a:P,b:w}=T.findDiffEnd(C,O+T.size,O+C.size);if(y=="end"&&(v-=P+Math.max(0,b-Math.min(P,w))-b),P<b&&T.size<C.size){let F=v<=b&&v>=P?b-v:0;b-=F,b&&b<C.size&&Fh(C.textBetween(b-1,b+1))&&(b+=F?1:-1),w=b+(w-P),P=b}else if(w<b){let F=v<=b&&v>=w?b-v:0;b-=F,b&&b<T.size&&Fh(T.textBetween(b-1,b+1))&&(b+=F?1:-1),P=b+(P-w),w=b}return{start:b,endA:P,endB:w}}(p.content,h.doc.content,h.from,l,c);if(f&&e.input.domChangeCount++,(Ri&&e.input.lastIOSEnter>Date.now()-225||Pn)&&i.some(T=>T.nodeType==1&&!HD.test(T.nodeName))&&(!f||f.endA>=f.endB)&&e.someProp("handleKeyDown",T=>T(e,Or(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(!f){if(!(r&&u instanceof _t&&!u.empty&&u.$head.sameParent(u.$anchor))||e.composing||h.sel&&h.sel.anchor!=h.sel.head){if(h.sel){let T=xh(e,e.state.doc,h.sel);if(T&&!T.eq(e.state.selection)){let C=e.state.tr.setSelection(T);o&&C.setMeta("composition",o),e.dispatch(C)}}return}f={start:u.from,endA:u.to,endB:u.to}}e.state.selection.from<e.state.selection.to&&f.start==f.endB&&e.state.selection instanceof _t&&(f.start>e.state.selection.from&&f.start<=e.state.selection.from+2&&e.state.selection.from>=h.from?f.start=e.state.selection.from:f.endA<e.state.selection.to&&f.endA>=e.state.selection.to-2&&e.state.selection.to<=h.to&&(f.endB+=e.state.selection.to-f.endA,f.endA=e.state.selection.to)),be&&nr<=11&&f.endB==f.start+1&&f.endA==f.start&&f.start>h.from&&h.doc.textBetween(f.start-h.from-1,f.start-h.from+1)==" "&&(f.start--,f.endA--,f.endB--);let m=h.doc.resolveNoCache(f.start-h.from),E=h.doc.resolveNoCache(f.endB-h.from),A=d.resolve(f.start),_=m.sameParent(E)&&m.parent.inlineContent&&A.end()>=f.endA;if((Ri&&e.input.lastIOSEnter>Date.now()-225&&(!_||i.some(T=>T.nodeName=="DIV"||T.nodeName=="P"))||!_&&m.pos<h.doc.content.size&&(!m.sameParent(E)||!m.parent.inlineContent)&&m.pos<E.pos&&!/\S/.test(h.doc.textBetween(m.pos,E.pos,"","")))&&e.someProp("handleKeyDown",T=>T(e,Or(13,"Enter"))))return void(e.input.lastIOSEnter=0);if(e.state.selection.anchor>f.start&&function(T,C,O,v,y){if(O-C<=y.pos-v.pos||Za(v,!0,!1)<y.pos)return!1;let b=T.resolve(C);if(!v.parent.isTextblock){let w=b.nodeAfter;return w!=null&&O==C+w.nodeSize}if(b.parentOffset<b.parent.content.size||!b.parent.isTextblock)return!1;let P=T.resolve(Za(b,!0,!0));return!(!P.parent.isTextblock||P.pos>O||Za(P,!0,!1)<O)&&v.parent.content.cut(v.parentOffset).eq(P.parent.content)}(d,f.start,f.endA,m,E)&&e.someProp("handleKeyDown",T=>T(e,Or(8,"Backspace"))))return void(Pn&&Qt&&e.domObserver.suppressSelectionUpdates());Qt&&f.endB==f.start&&(e.input.lastChromeDelete=Date.now()),Pn&&!_&&m.start()!=E.start()&&E.parentOffset==0&&m.depth==E.depth&&h.sel&&h.sel.anchor==h.sel.head&&h.sel.head==f.endA&&(f.endB-=2,E=h.doc.resolveNoCache(f.endB-h.from),setTimeout(()=>{e.someProp("handleKeyDown",function(T){return T(e,Or(13,"Enter"))})},20));let g,D=f.start,S=f.endA,I=T=>{let C=T||e.state.tr.replace(D,S,h.doc.slice(f.start-h.from,f.endB-h.from));if(h.sel){let O=xh(e,C.doc,h.sel);O&&!(Qt&&e.composing&&O.empty&&(f.start!=f.endB||e.input.lastChromeDelete<Date.now()-100)&&(O.head==D||O.head==C.mapping.map(S)-1)||be&&O.empty&&O.head==D)&&C.setSelection(O)}return o&&C.setMeta("composition",o),C.scrollIntoView()};if(_)if(m.pos==E.pos){be&&nr<=11&&m.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>Fn(e),20));let T=I(e.state.tr.delete(D,S)),C=d.resolve(f.start).marksAcross(d.resolve(f.endA));C&&T.ensureMarks(C),e.dispatch(T)}else if(f.endA==f.endB&&(g=function(T,C){let O,v,y,b=T.firstChild.marks,P=C.firstChild.marks,w=b,F=P;for(let B=0;B<P.length;B++)w=P[B].removeFromSet(w);for(let B=0;B<b.length;B++)F=b[B].removeFromSet(F);if(w.length==1&&F.length==0)v=w[0],O="add",y=B=>B.mark(v.addToSet(B.marks));else{if(w.length!=0||F.length!=1)return null;v=F[0],O="remove",y=B=>B.mark(v.removeFromSet(B.marks))}let H=[];for(let B=0;B<C.childCount;B++)H.push(y(C.child(B)));if(Y.from(H).eq(T))return{mark:v,type:O}}(m.parent.content.cut(m.parentOffset,E.parentOffset),A.parent.content.cut(A.parentOffset,f.endA-A.start())))){let T=I(e.state.tr);g.type=="add"?T.addMark(D,S,g.mark):T.removeMark(D,S,g.mark),e.dispatch(T)}else if(m.parent.child(m.index()).isText&&m.index()==E.index()-(E.textOffset?0:1)){let T=m.parent.textBetween(m.parentOffset,E.parentOffset),C=()=>I(e.state.tr.insertText(T,D,S));e.someProp("handleTextInput",O=>O(e,D,S,T,C))||e.dispatch(C())}else e.dispatch(I());else e.dispatch(I())}function xh(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:ac(e,t.resolve(n.anchor),t.resolve(n.head))}function Za(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let o=e.node(r).maybeChild(e.indexAfter(r));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function Fh(e){if(e.length!=2)return!1;let t=e.charCodeAt(0),n=e.charCodeAt(1);return t>=56320&&t<=57343&&n>=55296&&n<=56319}class NE{constructor(t,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new RD,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach($h),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=Hh(this),Uh(this),this.nodeViews=jh(this),this.docView=ph(this.state.doc,Bh(this),Ja(this),this.dom,this),this.domObserver=new FD(this,(r,i,o,s)=>jD(this,r,i,o,s)),this.domObserver.start(),function(r){for(let i in ge){let o=ge[i];r.dom.addEventListener(i,r.input.eventHandlers[i]=s=>{!ID(r,s)||Ql(r,s)||!r.editable&&s.type in Oe||o(r,s)},TD[i]?{passive:!0}:void 0)}ae&&r.dom.addEventListener("input",()=>null),qa(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 n in t)this._props[n]=t[n];this._props.state=this.state}return this._props}update(t){t.handleDOMEvents!=this._props.handleDOMEvents&&qa(this);let n=this._props;this._props=t,t.plugins&&(t.plugins.forEach($h),this.directPlugins=t.plugins),this.updateStateInner(t.state,n)}setProps(t){let n={};for(let r in this._props)n[r]=this._props[r];n.state=this.state;for(let r in t)n[r]=t[r];this.update(n)}updateState(t){this.updateStateInner(t,this._props)}updateStateInner(t,n){var r;let i=this.state,o=!1,s=!1;t.storedMarks&&this.composing&&(SE(this),s=!0),this.state=t;let a=i.plugins!=t.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let p=jh(this);(function(f,m){let E=0,A=0;for(let _ in f){if(f[_]!=m[_])return!0;E++}for(let _ in m)A++;return E!=A})(p,this.nodeViews)&&(this.nodeViews=p,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&qa(this),this.editable=Hh(this),Uh(this);let l=Ja(this),c=Bh(this),u=i.plugins==t.plugins||i.doc.eq(t.doc)?t.scrollToSelection>i.scrollToSelection?"to selection":"preserve":"reset",h=o||!this.docView.matchesNode(t.doc,c,l);!h&&t.selection.eq(i.selection)||(s=!0);let d=u=="preserve"&&s&&this.dom.style.overflowAnchor==null&&function(p){let f,m,E=p.dom.getBoundingClientRect(),A=Math.max(0,E.top);for(let _=(E.left+E.right)/2,g=A+1;g<Math.min(innerHeight,E.bottom);g+=5){let D=p.root.elementFromPoint(_,g);if(!D||D==p.dom||!p.dom.contains(D))continue;let S=D.getBoundingClientRect();if(S.top>=A-20){f=D,m=S.top;break}}return{refDOM:f,refTop:m,stack:sh(p.dom)}}(this);if(s){this.domObserver.stop();let p=h&&(be||Qt)&&!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(h){let f=Qt?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=wD(this)),!o&&this.docView.update(t.doc,c,l,this)||(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=ph(t.doc,c,l,this.dom,this)),!f||this.trackWrites&&this.dom.contains(this.trackWrites)||(p=!0)}p||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&function(f){let m=f.docView.domFromPos(f.state.selection.anchor,0),E=f.domSelectionRange();return Fr(m.node,m.offset,E.anchorNode,E.anchorOffset)}(this))?Fn(this,p):(fE(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),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():d&&function({refDOM:p,refTop:f,stack:m}){let E=p?p.getBoundingClientRect().top:0;ah(m,E==0?0:E-f)}(d)}scrollToSelection(){let t=this.domSelectionRange().focusNode;if(t&&this.dom.contains(t.nodeType==1?t:t.parentNode)&&!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof nt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&oh(this,n.getBoundingClientRect(),t)}else oh(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 n=0;n<this.pluginViews.length;n++){let r=this.pluginViews[n];r.update&&r.update(this,t)}else{this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let r=this.directPlugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let r=this.state.plugins[n];r.spec.view&&this.pluginViews.push(r.spec.view(this))}}}updateDraggedNode(t,n){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-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==r.node&&(i=o)}this.dragging=new RE(t.slice,t.move,i<0?void 0:nt.create(this.state.doc,i))}someProp(t,n){let r,i=this._props&&this._props[t];if(i!=null&&(r=n?n(i):i))return r;for(let s=0;s<this.directPlugins.length;s++){let a=this.directPlugins[s].props[t];if(a!=null&&(r=n?n(a):a))return r}let o=this.state.plugins;if(o)for(let s=0;s<o.length;s++){let a=o[s].props[t];if(a!=null&&(r=n?n(a):a))return r}}hasFocus(){if(be){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(Xr)return t.focus(Xr);let n=sh(t);t.focus(Xr==null?{get preventScroll(){return Xr={preventScroll:!0},!0}}:void 0),Xr||(Xr=!1,ah(n,0))}(this.dom),Fn(this),this.domObserver.start()}get root(){let t=this._root;if(t==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return t||document}updateRoot(){this._root=null}posAtCoords(t){return pD(this,t)}coordsAtPos(t,n=1){return lE(this,t,n)}domAtPos(t,n=0){return this.docView.domFromPos(t,n)}nodeDOM(t){let n=this.docView.descAt(t);return n?n.nodeDOM:null}posAtDOM(t,n,r=-1){let i=this.docView.posFromDOM(t,n,r);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(t,n){return ED(this,n||this.state,t)}pasteHTML(t,n){return io(this,"",t,!1,n||new ClipboardEvent("paste"))}pasteText(t,n){return io(this,t,null,!0,n||new ClipboardEvent("paste"))}serializeForClipboard(t){return lc(this,t)}destroy(){this.docView&&(function(t){t.domObserver.stop();for(let n in t.input.eventHandlers)t.dom.removeEventListener(n,t.input.eventHandlers[n]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],Ja(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Yl=null)}get isDestroyed(){return this.docView==null}dispatchEvent(t){return function(n,r){Ql(n,r)||!ge[r.type]||!n.editable&&r.type in Oe||ge[r.type](n,r)}(this,t)}domSelectionRange(){let t=this.domSelection();return t?ae&&this.root.nodeType===11&&function(n){let r=n.activeElement;for(;r&&r.shadowRoot;)r=r.shadowRoot.activeElement;return r}(this.dom.ownerDocument)==this.dom&&function(n,r){if(r.getComposedRanges){let s=r.getComposedRanges(n.root)[0];if(s)return Mh(n,s)}let i;function o(s){s.preventDefault(),s.stopImmediatePropagation(),i=s.getTargetRanges()[0]}return n.dom.addEventListener("beforeinput",o,!0),document.execCommand("indent"),n.dom.removeEventListener("beforeinput",o,!0),i?Mh(n,i):null}(this,t)||t:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function Bh(e){let t=Object.create(null);return t.class="ProseMirror",t.contenteditable=String(e.editable),e.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(e.state)),n)for(let r in n)r=="class"?t.class+=" "+n[r]:r=="style"?t.style=(t.style?t.style+";":"")+n[r]:t[r]||r=="contenteditable"||r=="nodeName"||(t[r]=String(n[r]))}),t.translate||(t.translate="no"),[Fe.node(0,e.state.doc.content.size,t)]}function Uh(e){if(e.markCursor){let t=document.createElement("img");t.className="ProseMirror-separator",t.setAttribute("mark-placeholder","true"),t.setAttribute("alt",""),e.cursorWrapper={dom:t,deco:Fe.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function Hh(e){return!e.someProp("editable",t=>t(e.state)===!1)}function jh(e){let t=Object.create(null);function n(r){for(let i in r)Object.prototype.hasOwnProperty.call(t,i)||(t[i]=r[i])}return e.someProp("nodeViews",n),e.someProp("markViews",n),t}function $h(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}NE.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};const Kt=new class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let r in e)t[r]=e[r];t.nodes=re.from(e.nodes),t.marks=re.from(e.marks||{}),this.nodes=Ud.compile(this.spec.nodes,this),this.marks=ua.compile(this.spec.marks,this);let n=Object.create(null);for(let r in this.nodes){if(r in this.marks)throw new RangeError(r+" can not be both a node and a mark");let i=this.nodes[r],o=i.spec.content||"",s=i.spec.marks;if(i.contentMatch=n[o]||(n[o]=Mr.parse(o,this.nodes)),i.inlineContent=i.contentMatch.inlineContent,i.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!i.isInline||!i.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=i}i.markSet=s=="_"?null:s?Hd(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==""?[]:Hd(this,o.split(" "))}this.nodeFromJSON=r=>br.fromJSON(this,r),this.markFromJSON=r=>Dt.fromJSON(this,r),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e=="string")e=this.nodeType(e);else{if(!(e instanceof Ud))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new ws(n,n.defaultAttrs,e,Dt.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);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:e=>["span",{"data-mention-id":e.attrs.id,class:"t-mention"},`@${e.attrs.name}`],parseDOM:[{tag:"span[data-mention-id]",getAttrs:e=>({id:e.dataset["mention-id"]})}]},customemoji:{group:"inline",inline:!0,attrs:{name:{},url:{}},content:"text*",selectable:!1,toDOM:e=>["img",{src:e.attrs.url,alt:e.attrs.name,"data-custom-emoji":e.attrs.name}],parseDOM:[{tag:"img[data-custom-emoji]",getAttrs:e=>{const t=e;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:e=>["span",{"data-emoji":e.attrs.emoji},e.attrs.emoji],parseDOM:[{tag:"span[data-emoji]",getAttrs:e=>({emoji:e.dataset.emoji})}]}}}),Qa=new ha("placeholder"),Vh=new da({key:Qa,props:{decorations(e){if(bE(e.doc))return;const t=e.doc.firstChild,n=Fe.node(0,t.nodeSize,{class:"empty-node","data-placeholder":Qa.getState(e)});return $t.create(e.doc,[n])}},state:{init:()=>"",apply:(e,t)=>{var n;return(n=e.getMeta(Qa))!=null?n:t}}});function bE(e){return e.childCount!==1||e.firstChild.childCount!==0}for(var sr={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:"'"},Fs={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},$D=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),VD=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ie=0;ie<10;ie++)sr[48+ie]=sr[96+ie]=String(ie);for(ie=1;ie<=24;ie++)sr[ie+111]="F"+ie;for(ie=65;ie<=90;ie++)sr[ie]=String.fromCharCode(ie+32),Fs[ie]=String.fromCharCode(ie);for(var tl in sr)Fs.hasOwnProperty(tl)||(Fs[tl]=sr[tl]);const zD=typeof navigator!="undefined"&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function YD(e){let t,n,r,i,o=e.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))n=!0;else if(/^s(hift)?$/i.test(l))r=!0;else{if(!/^mod$/i.test(l))throw new Error("Unrecognized modifier name: "+l);zD?i=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),i&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function el(e,t,n=!0){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),n&&t.shiftKey&&(e="Shift-"+e),e}function zh(e){return new da({props:{handleKeyDown:GD(e)}})}function GD(e){let t=function(n){let r=Object.create(null);for(let i in n)r[YD(i)]=n[i];return r}(e);return function(n,r){let i,o=function(a){var l=!($D&&a.metaKey&&a.shiftKey&&!a.ctrlKey&&!a.altKey||VD&&a.shiftKey&&a.key&&a.key.length==1||a.key=="Unidentified")&&a.key||(a.shiftKey?Fs:sr)[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[el(o,r)];if(s&&s(n.state,n.dispatch,n))return!0;if(o.length==1&&o!=" "){if(r.shiftKey){let a=t[el(o,r,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((r.shiftKey||r.altKey||r.metaKey||o.charCodeAt(0)>127)&&(i=sr[r.keyCode])&&i!=o){let a=t[el(i,r)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}var Bs=200,Zt=function(){};Zt.prototype.append=function(e){return e.length?(e=Zt.from(e),!this.length&&e||e.length<Bs&&this.leafAppend(e)||this.length<Bs&&e.leafPrepend(this)||this.appendInner(e)):this},Zt.prototype.prepend=function(e){return e.length?Zt.from(e).append(this):this},Zt.prototype.appendInner=function(e){return new WD(this,e)},Zt.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?Zt.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Zt.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Zt.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},Zt.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(i,o){return r.push(e(i,o))},t,n),r},Zt.from=function(e){return e instanceof Zt?e:e&&e.length?new kE(e):Zt.empty};var kE=function(e){function t(r){e.call(this),this.values=r}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={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<=Bs)return new t(this.values.concat(r.flatten()))},t.prototype.leafPrepend=function(r){if(this.length+r.length<=Bs)return new t(r.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Zt);Zt.empty=new kE([]);var WD=function(e){function t(n,r){e.call(this),this.left=n,this.right=r,this.length=n.length+r.length,this.depth=Math.max(n.depth,r.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(n){return n<this.left.length?this.left.get(n):this.right.get(n-this.left.length)},t.prototype.forEachInner=function(n,r,i,o){var s=this.left.length;return!(r<s&&this.left.forEachInner(n,r,Math.min(i,s),o)===!1)&&!(i>s&&this.right.forEachInner(n,Math.max(r-s,0),Math.min(this.length,i)-s,o+s)===!1)&&void 0},t.prototype.forEachInvertedInner=function(n,r,i,o){var s=this.left.length;return!(r>s&&this.right.forEachInvertedInner(n,r-s,Math.max(i,s)-s,o+s)===!1)&&!(i<s&&this.left.forEachInvertedInner(n,Math.min(r,s),i,o)===!1)&&void 0},t.prototype.sliceInner=function(n,r){if(n==0&&r==this.length)return this;var i=this.left.length;return r<=i?this.left.slice(n,r):n>=i?this.right.slice(n-i,r-i):this.left.slice(n,i).append(this.right.slice(0,r-i))},t.prototype.leafAppend=function(n){var r=this.right.leafAppend(n);if(r)return new t(this.left,r)},t.prototype.leafPrepend=function(n){var r=this.left.leafPrepend(n);if(r)return new t(r,this.right)},t.prototype.appendInner=function(n){return this.left.depth>=Math.max(this.right.depth,n.depth)+1?new t(this.left,new t(this.right,n)):new t(this,n)},t}(Zt);class Ze{constructor(t,n){this.items=t,this.eventCount=n}popEvent(t,n){if(this.eventCount==0)return null;let r,i,o=this.items.length;for(;;o--)if(this.items.get(o-1).selection){--o;break}n&&(r=this.remapping(o,this.items.length),i=r.maps.length);let s,a,l=t.tr,c=[],u=[];return this.items.forEach((h,d)=>{if(!h.step)return r||(r=this.remapping(o,d+1),i=r.maps.length),i--,void u.push(h);if(r){u.push(new hn(h.map));let p,f=h.step.map(r.slice(i));f&&l.maybeStep(f).doc&&(p=l.mapping.maps[l.mapping.maps.length-1],c.push(new hn(p,void 0,void 0,c.length+u.length))),i--,p&&r.appendMap(p,i)}else l.maybeStep(h.step);return h.selection?(s=r?h.selection.map(r.slice(i)):h.selection,a=new Ze(this.items.slice(0,o).append(u.reverse().concat(c)),this.eventCount-1),!1):void 0},this.items.length,0),{remaining:a,transform:l,selection:s}}addTransform(t,n,r,i){let o=[],s=this.eventCount,a=this.items,l=!i&&a.length?a.get(a.length-1):null;for(let u=0;u<t.steps.length;u++){let h,d=t.steps[u].invert(t.docs[u]),p=new hn(t.mapping.maps[u],d,n);(h=l&&l.merge(p))&&(p=h,u?o.pop():a=a.slice(0,a.length-1)),o.push(p),n&&(s++,n=void 0),i||(l=p)}let c=s-r.depth;return c>XD&&(a=function(u,h){let d;return u.forEach((p,f)=>{if(p.selection&&h--==0)return d=f,!1}),u.slice(d)}(a,c),s-=c),new Ze(a.append(o),s)}remapping(t,n){let r=new Ao;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,n),r}addMaps(t){return this.eventCount==0?this:new Ze(this.items.append(t.map(n=>new hn(n))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;let r=[],i=Math.max(0,this.items.length-n),o=t.mapping,s=t.steps.length,a=this.eventCount;this.items.forEach(d=>{d.selection&&a--},i);let l=n;this.items.forEach(d=>{let p=o.getMirror(--l);if(p==null)return;s=Math.min(s,p);let f=o.maps[p];if(d.step){let m=t.steps[p].invert(t.docs[p]),E=d.selection&&d.selection.map(o.slice(l+1,p));E&&a++,r.push(new hn(f,m,E))}else r.push(new hn(f))},i);let c=[];for(let d=n;d<s;d++)c.push(new hn(o.maps[d]));let u=this.items.slice(0,i).append(c).append(r),h=new Ze(u,a);return h.emptyItemCount()>500&&(h=h.compress(this.items.length-r.length)),h}emptyItemCount(){let t=0;return this.items.forEach(n=>{n.step||t++}),t}compress(t=this.items.length){let n=this.remapping(0,t),r=n.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(n.slice(r)),c=l&&l.getMap();if(r--,c&&n.appendMap(c,r),l){let u=s.selection&&s.selection.map(n.slice(r));u&&o++;let h,d=new hn(c.invert(),l,u),p=i.length-1;(h=i.length&&i[p].merge(d))?i[p]=h:i.push(d)}}else s.map&&r--},this.items.length,0),new Ze(Zt.from(i.reverse()),o)}}Ze.empty=new Ze(Zt.empty,0);class hn{constructor(t,n,r,i){this.map=t,this.step=n,this.selection=r,this.mirrorOffset=i}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new hn(n.getMap().invert(),n,this.selection)}}}class Gn{constructor(t,n,r,i,o){this.done=t,this.undone=n,this.prevRanges=r,this.prevTime=i,this.prevComposition=o}}const XD=20;function Yh(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((r,i,o,s)=>t.push(o,s));return t}function nl(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),o=t.map(e[r+1],-1);i<=o&&n.push(i,o)}return n}let rl=!1,Gh=null;function fs(e){let t=e.plugins;if(Gh!=t){rl=!1,Gh=t;for(let n=0;n<t.length;n++)if(t[n].spec.historyPreserveItems){rl=!0;break}}return rl}const Rr=new ha("history"),KD=new ha("closeHistory");function qD(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new da({key:Rr,state:{init:()=>new Gn(Ze.empty,Ze.empty,null,0,-1),apply:(t,n,r)=>function(i,o,s,a){let l,c=s.getMeta(Rr);if(c)return c.historyState;s.getMeta(KD)&&(i=new Gn(i.done,i.undone,null,0,-1));let u=s.getMeta("appendedTransaction");if(s.steps.length==0)return i;if(u&&u.getMeta(Rr))return u.getMeta(Rr).redo?new Gn(i.done.addTransform(s,void 0,a,fs(o)),i.undone,Yh(s.mapping.maps),i.prevTime,i.prevComposition):new Gn(i.done,i.undone.addTransform(s,void 0,a,fs(o)),null,i.prevTime,i.prevComposition);if(s.getMeta("addToHistory")===!1||u&&u.getMeta("addToHistory")===!1)return(l=s.getMeta("rebased"))?new Gn(i.done.rebased(s,l),i.undone.rebased(s,l),nl(i.prevRanges,s.mapping),i.prevTime,i.prevComposition):new Gn(i.done.addMaps(s.mapping.maps),i.undone.addMaps(s.mapping.maps),nl(i.prevRanges,s.mapping),i.prevTime,i.prevComposition);{let h=s.getMeta("composition"),d=i.prevTime==0||!u&&i.prevComposition!=h&&(i.prevTime<(s.time||0)-a.newGroupDelay||!function(f,m){if(!m)return!1;if(!f.docChanged)return!0;let E=!1;return f.mapping.maps[0].forEach((A,_)=>{for(let g=0;g<m.length;g+=2)A<=m[g+1]&&_>=m[g]&&(E=!0)}),E}(s,i.prevRanges)),p=u?nl(i.prevRanges,s.mapping):Yh(s.mapping.maps);return new Gn(i.done.addTransform(s,d?o.selection.getBookmark():void 0,a,fs(o)),Ze.empty,p,s.time,h==null?i.prevComposition:h)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(t,n){let r=n.inputType,i=r=="historyUndo"?LE:r=="historyRedo"?eu:null;return!(!i||!t.editable)&&(n.preventDefault(),i(t.state,t.dispatch))}}}})}function wE(e,t){return(n,r)=>{let i=Rr.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let o=function(s,a,l){let c=fs(a),u=Rr.get(a).spec.config,h=(l?s.undone:s.done).popEvent(a,c);if(!h)return null;let d=h.selection.resolve(h.transform.doc),p=(l?s.done:s.undone).addTransform(h.transform,a.selection.getBookmark(),u,c),f=new Gn(l?p:h.remaining,l?h.remaining:p,null,0,-1);return h.transform.setSelection(d).setMeta(Rr,{redo:l,historyState:f})}(i,n,e);o&&r(t?o.scrollIntoView():o)}return!0}}const LE=wE(!1,!0),eu=wE(!0,!0),PE=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Ii(e,t,n=!1){for(let r=e;r;r=t=="start"?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}function Wh(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Xh(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function nu(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const JD=(e,t)=>{let{$from:n,$to:r}=e.selection;if(e.selection instanceof nt&&e.selection.node.isBlock)return!(!n.parentOffset||!hs(e.doc,n.pos)||(t&&t(e.tr.split(n.pos).scrollIntoView()),0));if(!n.parent.isBlock)return!1;if(t){let i=r.parentOffset==r.parent.content.size,o=e.tr;(e.selection instanceof _t||e.selection instanceof He)&&o.deleteSelection();let s=n.depth==0?null:nu(n.node(-1).contentMatchAt(n.indexAfter(-1))),a=i&&s?[{type:s}]:void 0,l=hs(o.doc,o.mapping.map(n.pos),1,a);if(a||l||!hs(o.doc,o.mapping.map(n.pos),1,s?[{type:s}]:void 0)||(s&&(a=[{type:s}]),l=!0),l&&(o.split(o.mapping.map(n.pos),1,a),!i&&!n.parentOffset&&n.parent.type!=s)){let c=o.mapping.map(n.before()),u=o.doc.resolve(c);s&&n.node(-1).canReplaceWith(u.index(),u.index()+1,s)&&o.setNodeMarkup(o.mapping.map(n.before()),s)}t(o.scrollIntoView())}return!0};function ME(e,t,n){let r,i,o=t.nodeBefore,s=t.nodeAfter;if(o.type.spec.isolating||s.type.spec.isolating)return!1;if(function(h,d,p){let f=d.nodeBefore,m=d.nodeAfter,E=d.index();return!(!(f&&m&&f.type.compatibleContent(m.type))||(!f.content.size&&d.parent.canReplace(E-1,E)?(p&&p(h.tr.delete(d.pos-f.nodeSize,d.pos).scrollIntoView()),0):!d.parent.canReplace(E,E+1)||!m.isTextblock&&!Jd(h.doc,d.pos)||(p&&p(h.tr.clearIncompatible(d.pos,f.type,f.contentMatchAt(f.childCount)).join(d.pos).scrollIntoView()),0)))}(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(r=(i=o.contentMatchAt(o.childCount)).findWrapping(s.type))&&i.matchType(r[0]||s.type).validEnd){if(n){let h=t.pos+s.nodeSize,d=Y.empty;for(let m=r.length-1;m>=0;m--)d=Y.from(r[m].create(null,d));d=Y.from(o.copy(d));let p=e.tr.step(new xe(t.pos-1,h,t.pos,h,new J(d,1,0),r.length,!0)),f=h+2*r.length;Jd(p.doc,f)&&p.join(f),n(p.scrollIntoView())}return!0}let l=gt.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&nc(c);if(u!=null&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&Ii(s,"start",!0)&&Ii(o,"end")){let h=o,d=[];for(;d.push(h),!h.isTextblock;)h=h.lastChild;let p=s,f=1;for(;!p.isTextblock;p=p.firstChild)f++;if(h.canReplace(h.childCount,h.childCount,p.content)){if(n){let m=Y.empty;for(let E=d.length-1;E>=0;E--)m=Y.from(d[E].copy(m));n(e.tr.step(new xe(t.pos-d.length,t.pos+s.nodeSize,t.pos+f,t.pos+s.nodeSize-f,new J(m,d.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function xE(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return!!i.node(o).isTextblock&&(n&&n(t.tr.setSelection(_t.create(t.doc,e<0?i.start(o):i.end(o)))),!0)}}const ZD=xE(-1),QD=xE(1);function hc(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}let il=hc(PE,(e,t,n)=>{let r=function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("backward",s):l.parentOffset>0)?null:l}(e,n);if(!r)return!1;let i=Wh(r);if(!i){let s=r.blockRange(),a=s&&nc(s);return a!=null&&(t&&t(e.tr.lift(s,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(!o.type.spec.isolating&&ME(e,i,t))return!0;if(r.parent.content.size==0&&(Ii(o,"end")||nt.isSelectable(o))){let s=rc(e.doc,r.before(),r.after(),J.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(Ii(o,"end")?gt.findFrom(a.doc.resolve(a.mapping.map(i.pos,-1)),-1):nt.create(a.doc,i.pos-o.nodeSize)),t(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(t&&t(e.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0)},(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;o=Wh(r)}let s=o&&o.nodeBefore;return!(!s||!nt.isSelectable(s))&&(t&&t(e.tr.setSelection(nt.create(e.doc,o.pos-s.nodeSize)).scrollIntoView()),!0)}),Kh=hc(PE,(e,t,n)=>{let r=function(s,a){let{$cursor:l}=s.selection;return!l||(a?!a.endOfTextblock("forward",s):l.parentOffset<l.parent.content.size)?null:l}(e,n);if(!r)return!1;let i=Xh(r);if(!i)return!1;let o=i.nodeAfter;if(ME(e,i,t))return!0;if(r.parent.content.size==0&&(Ii(o,"start")||nt.isSelectable(o))){let s=rc(e.doc,r.before(),r.after(),J.empty);if(s&&s.slice.size<s.to-s.from){if(t){let a=e.tr.step(s);a.setSelection(Ii(o,"start")?gt.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):nt.create(a.doc,a.mapping.map(i.pos))),t(a.scrollIntoView())}return!0}}return!(!o.isAtom||i.depth!=r.depth-1)&&(t&&t(e.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0)},(e,t,n)=>{let{$head:r,empty:i}=e.selection,o=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;o=Xh(r)}let s=o&&o.nodeAfter;return!(!s||!nt.isSelectable(s))&&(t&&t(e.tr.setSelection(nt.create(e.doc,o.pos)).scrollIntoView()),!0)});const wn={Enter:hc((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r))&&(t&&t(e.tr.insertText(`
|
|
16
|
+
`).scrollIntoView()),!0)},(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof He||r.parent.inlineContent||i.parent.inlineContent)return!1;let o=nu(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=e.tr.insert(s,o.createAndFill());a.setSelection(_t.create(a.doc,s+1)),t(a.scrollIntoView())}return!0},(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(hs(e.doc,o))return t&&t(e.tr.split(o).scrollIntoView()),!0}let r=n.blockRange(),i=r&&nc(r);return i!=null&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)},JD),"Mod-Enter":(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),o=n.indexAfter(-1),s=nu(i.contentMatchAt(o));if(!s||!i.canReplaceWith(o,o,s))return!1;if(t){let a=n.after(),l=e.tr.replaceWith(a,a,s.createAndFill());l.setSelection(gt.near(l.doc.resolve(a),1)),t(l.scrollIntoView())}return!0},Backspace:il,"Mod-Backspace":il,"Shift-Backspace":il,Delete:Kh,"Mod-Delete":Kh,"Mod-a":(e,t)=>(t&&t(e.tr.setSelection(new He(e.doc))),!0)},FE={"Ctrl-h":wn.Backspace,"Alt-Backspace":wn["Mod-Backspace"],"Ctrl-d":wn.Delete,"Ctrl-Alt-Backspace":wn["Mod-Delete"],"Alt-Delete":wn["Mod-Delete"],"Alt-d":wn["Mod-Delete"],"Ctrl-a":ZD,"Ctrl-e":QD};for(let e in wn)FE[e]=wn[e];const Zo=(typeof navigator!="undefined"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!(typeof os=="undefined"||!os.platform)&&os.platform()=="darwin")?FE:wn;function pc(e,t){return e.reduce((n,r,i)=>n.concat(t(r,i)),[])}var fc={};function tO(e){return String.fromCharCode(parseInt(e.slice(1),16))}Object.defineProperty(fc,"__esModule",{value:!0});var eO=fc.encode=function(e){return btoa(encodeURIComponent(e).replace(/%[0-9A-F]{2}/g,tO))};function nO(e){return`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`}fc.decode=function(e){return decodeURIComponent(Array.from(atob(e),nO).join(""))};const rO=/[^a-zA-Z\u00C0-\u024F\u1E00-\u1EFF\u0400-\u044f\u0300-\u036e]+/,iO=e=>e.split(rO).filter(t=>t).map(t=>t[0]).join("")||e[Symbol.iterator]().next().value||"";function BE(e){const t=function(n){let r=0;for(let i=0;i<n.length;i++)r=(r<<5)-r+n.charCodeAt(i),r&=r;return Math.abs(r)}(e)%Jh.length;return Jh[t]}function ma(e,t){const n=t.lastIndex;let r;const i=[];for(;(r=t.exec(e))!==null;)i.push(r),r[0]===""&&(t.lastIndex+=1);return t.lastIndex=n,i}function ru(e,t,n){let r=0;const i=[];for(const o of t)o.offset<r||(o.offset>r&&i.push(e.substring(r,o.offset)),i.push(...n(o)),r=o.offset+o.matchedText.length);return r<e.length&&i.push(e.substring(r)),i}function UE(e){try{return new URL(e).hostname}catch(t){return}}function Qo(e){const t=e.replace(/%2F/g,"/").replace(/^.*?\/([^/]+?)(?:\?.*)?$/,"$1");return decodeURIComponent(t)}function qh(e,t){return e.localeCompare(t,void 0,{usage:"search",sensitivity:"base"})===0}function oO(e){return[...e.matchAll(/^|\s+/g)].map(n=>n.index+n[0].length).map(n=>e.substring(n))}const Jh=["#996666","#9A6E61","#8D7662","#8E775E","#948771","#8A8360","#888D65","#6F8E63","#749378","#678975","#779E86","#639A8F","#6D92A1","#65869F","#697E9A","#736C9F","#8C6495","#956387","#B05D54","#B16D52","#AF8751","#AC8A56","#B7A458","#B5B35C","#83AA5D","#4F9D5D","#5FA777","#66B58F","#5FB3AC","#589AAF","#4E7F9E","#456CAC","#6456B7","#714AB2","#9771B5","#C154C1","#B05E81","#B04C6A","#B94E48","#AF593E","#C5994B","#B8C25D","#87AB39","#4FA83D","#40A860","#41AA78","#3AB09E","#3FC1AA","#56B4BE","#3EABBF","#4682B4","#7A58C1","#9966CC","#C54B8C","#B44668","#AE4560","#A3807B","#AB917A","#ACA586","#A8AF8E","#9EA587","#8BA690","#7DA98D","#7CB0A1","#8BA9A5","#7CA1A6","#859FAF","#8D90A1","#A397B4","#AE809E","#C08081","#BB8983","#B19461","#B5A27F","#B8B56A","#9AB973","#7AC488","#7CB7BB","#80B3C4","#788BBA","#7A89B8","#9678B6","#CB8FA9","#B57281","#C6726B","#C88A65","#C2955D","#C8B568","#B9C46A","#74C365","#6FD0C5","#6093D1","#7666C6","#D06DA1"],oo=(e,t,n=void 0)=>pc(e,r=>{if(typeof r=="string")return t(r,n);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return[{type:r.type,children:oo(r.children,t,r.type)}];case"link":return[{type:r.type,url:r.url,children:oo(r.children,t,r.type)}];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return[{type:r.type,action:r.action,params:r.params,children:oo(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 $n(e,t){return n=>{const r=n;let i=0;const o=[];for(const s of ma(n,e)){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<n.length&&o.push(n.substring(i)),o}}function HE(e){return e.replace(/<!!mention:.*?\|([^>]*)>/gim,"@$1").replace(/<!!customemoji:(.*?)>/gim,"$1")}const Zh="’'()[]{}<>:,‒–—―…!.«»-‐?‘’“”;/⁄␠·&@*\\•^¤¢$€£¥₩₪†‡°¡¿¬#№%‰‱¶′§~¨_|¦⁂☞∴‽※".replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");var iu=(e=>(e[e.italic=1]="italic",e[e.strikethrough=2]="strikethrough",e[e.bold=4]="bold",e))(iu||{});const sO=[0,1,2,3,4,5,6].map(e=>{const t=[];return 1&e||t.push(/_([^\s_].*?[^\s_])_|_([^\s_])_/),2&e||t.push(/~([^\s~].*?[^\s~])~|~([^\s~])~/),4&e||t.push(/\*([^\s*].*?[^\s*])\*|\*([^\s*])\*/),new RegExp(t.map(n=>n.source).join("|"),"g")}),aO={_:1,"*":4,"~":2};function lO(e){return jE(e,0)}function jE(e,t=0){const n=sO[t],r=n?function(i){const o=uO.getOrCompute(i,()=>new RegExp(`(?:^|[\\s${Zh}])(?:${i.source})(?=[\\s${Zh}]|$)`,"g")),s=$n(o,a=>{const l=a[0][1],c=a[1]||a[2]||a[3]||a[4]||a[5]||a[6];return[" ",{type:iu[aO[l]],children:[c]}]});return a=>{const[l,...c]=s(" "+a);return l.length>1&&c.unshift(l.substring(1)),c}}(n):()=>[e];return oo(r(e),(i,o)=>o==="bold"||o==="italic"||o==="strikethrough"?jE(i,t|iu[o]):[i])}const uO=function(){const e=function(){try{return new WeakMap}catch(t){const n={has:()=>!1,get:()=>{},set:()=>n};return n}}();return{getOrCompute(t,n){if(e.has(t))return e.get(t);const r=n();return e.set(t,r),r}}}();var ou=function(e,t){return ou=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},ou(e,t)};function Uo(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}ou(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Xt=function(){return Xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Xt.apply(this,arguments)};var cO=Object.prototype.hasOwnProperty;function ze(e){return typeof e=="boolean"}function Er(e,t){for(var n=e.length-1;n>=0;n--)t(e[n])===!0&&e.splice(n,1)}function Br(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var ts=/\s+/,$E=function(){function e(t){t===void 0&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return e.prototype.setTagName=function(t){return this.tagName=t,this},e.prototype.getTagName=function(){return this.tagName},e.prototype.setAttr=function(t,n){return this.getAttrs()[t]=n,this},e.prototype.getAttr=function(t){return this.getAttrs()[t]},e.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},e.prototype.getAttrs=function(){return this.attrs},e.prototype.setClass=function(t){return this.setAttr("class",t)},e.prototype.addClass=function(t){for(var n,r=this.getClass(),i=r?r.split(ts):[],o=t.split(ts);n=o.shift();)i.indexOf(n)===-1&&i.push(n);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var n,r=this.getClass(),i=r?r.split(ts):[],o=t.split(ts);i.length&&(n=o.shift());){var s=i.indexOf(n);s!==-1&&i.splice(s,1)}return this.getAttrs().class=i.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(t){return(" "+this.getClass()+" ").indexOf(" "+t+" ")!==-1},e.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},e.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var t=this.getTagName(),n=this.buildAttrsStr();return["<",t,n=n?" "+n:"",">",this.getInnerHtml(),"</",t,">"].join("")},e.prototype.buildAttrsStr=function(){var t=this.getAttrs(),n=[];for(var r in t)cO.call(t,r)&&n.push(r+'="'+t[r]+'"');return n.join(" ")},e}();function Qh(e){var t="";return e.scheme&&e.host&&(t+=e.scheme+"://"),e.host&&(t+=e.host),e.path&&(t+="/"+e.path),e.query&&(t+="?"+e.query),e.fragment&&(t+="#"+e.fragment),t}function ol(e,t,n){var r=t/2,i=Math.ceil(r),o=-1*Math.floor(r),s="";return o<0&&(s=e.substr(o)),e.substr(0,i)+n+s}var dO=function(){function e(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 e.prototype.build=function(t){return new $E({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},e.prototype.createAttrs=function(t){var n={href:t.getAnchorHref()},r=this.createCssClass(t);return r&&(n.class=r),this.newWindow&&(n.target="_blank",n.rel="noopener noreferrer"),this.truncate.length&&this.truncate.length<t.getAnchorText().length&&(n.title=t.getAnchorHref()),n},e.prototype.createCssClass=function(t){var n=this.className;if(n){for(var r=[n],i=t.getCssClassSuffixes(),o=0,s=i.length;o<s;o++)r.push(n+"-"+i[o]);return r.join(" ")}return""},e.prototype.processAnchorText=function(t){return t=this.doTruncate(t)},e.prototype.doTruncate=function(t){var n=this.truncate;if(!n.length)return t;var r=n.length,i=n.location;return i==="smart"?function(o,s,a){var l,c;if(a==null?(a="…",c=3,l=8):(c=a.length,l=a.length),o.length<=s)return o;var u=s-c,h=function(_){var g={},D=_,S=D.match(/^([a-z]+):\/\//i);return S&&(g.scheme=S[1],D=D.slice(S[0].length)),(S=D.match(/^(.*?)(?=(\?|#|\/|$))/i))&&(g.host=S[1],D=D.slice(S[0].length)),(S=D.match(/^\/(.*?)(?=(\?|#|$))/i))&&(g.path=S[1],D=D.slice(S[0].length)),(S=D.match(/^\?(.*?)(?=(#|$))/i))&&(g.query=S[1],D=D.slice(S[0].length)),(S=D.match(/^#(.*?)$/i))&&(g.fragment=S[1]),g}(o);if(h.query){var d=h.query.match(/^(.*?)(?=(\?|#))(.*?)$/i);d&&(h.query=h.query.substr(0,d[1].length),o=Qh(h))}if(o.length<=s||(h.host&&(h.host=h.host.replace(/^www\./,""),o=Qh(h)),o.length<=s))return o;var p="";if(h.host&&(p+=h.host),p.length>=u)return h.host.length===s?(h.host.substr(0,s-c)+a).substr(0,u+l):ol(p,u,a).substr(0,u+l);var f="";if(h.path&&(f+="/"+h.path),h.query&&(f+="?"+h.query),f){if((p+f).length>=u)return(p+f).length==s?(p+f).substr(0,s):(p+ol(f,u-p.length,a)).substr(0,u+l);p+=f}if(h.fragment){var m="#"+h.fragment;if((p+m).length>=u)return(p+m).length==s?(p+m).substr(0,s):(p+ol(m,u-p.length,a)).substr(0,u+l);p+=m}if(h.scheme&&h.host){var E=h.scheme+"://";if((p+E).length<u)return(E+p).substr(0,s)}if(p.length<=s)return p;var A="";return u>0&&(A=p.substr(-1*Math.floor(u/2))),(p.substr(0,Math.ceil(u/2))+a+A).substr(0,u+l)}(t,r):i==="middle"?function(o,s,a){if(o.length<=s)return o;var l,c;a==null?(a="…",l=8,c=3):(l=a.length,c=a.length);var u=s-c,h="";return u>0&&(h=o.substr(-1*Math.floor(u/2))),(o.substr(0,Math.ceil(u/2))+a+h).substr(0,u+l)}(t,r):function(o,s,a){return function(l,c,u){var h;return l.length>c&&(u==null?(u="…",h=3):h=u.length,l=l.substring(0,c-h)+u),l}(o,s,a)}(t,r)},e}(),Ho=function(){function e(t){this._=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(t){this.offset=t},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.type]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}();function Mi(e){return e>=65&&e<=90||e>=97&&e<=122}function le(e){return e>=48&&e<=57}function mc(e){return e==34||e==39}function zr(e){return e<8232?e<160?e>=9&&e<=13||e==32:e<5760?e==160:e==5760||e>=8192&&e<=8202:e<8287?e>=8232&&e<=8233||e==8239:e<12288?e==8287:e==12288||e==65279}function Yr(e){return e<4800?e<2949?e<2451?e<1425?e<768?e<192?e<169?e<65?e>=48&&e<=57:e>=65&&e<=90||e>=97&&e<=122:e<181?e>=169&&e<=170||e==174:e==181||e==186:e<710?e<216?e>=192&&e<=214:e>=216&&e<=246||e>=248&&e<=705:e<748?e>=710&&e<=721||e>=736&&e<=740:e==748||e==750:e<910?e<895?e<886?e>=768&&e<=884:e>=886&&e<=887||e>=890&&e<=893:e<904?e==895||e==902:e>=904&&e<=906||e==908:e<1155?e<931?e>=910&&e<=929:e>=931&&e<=1013||e>=1015&&e<=1153:e<1369?e>=1155&&e<=1327||e>=1329&&e<=1366:e==1369||e>=1377&&e<=1415:e<1808?e<1552?e<1476?e<1471?e>=1425&&e<=1469:e==1471||e>=1473&&e<=1474:e<1488?e>=1476&&e<=1477||e==1479:e>=1488&&e<=1514||e>=1520&&e<=1522:e<1749?e<1568?e>=1552&&e<=1562:e>=1568&&e<=1641||e>=1646&&e<=1747:e<1770?e>=1749&&e<=1756||e>=1759&&e<=1768:e>=1770&&e<=1788||e==1791:e<2230?e<2042?e<1869?e>=1808&&e<=1866:e>=1869&&e<=1969||e>=1984&&e<=2037:e<2112?e==2042||e>=2048&&e<=2093:e>=2112&&e<=2139||e>=2208&&e<=2228:e<2406?e<2260?e>=2230&&e<=2237:e>=2260&&e<=2273||e>=2275&&e<=2403:e<2437?e>=2406&&e<=2415||e>=2417&&e<=2435:e>=2437&&e<=2444||e>=2447&&e<=2448:e<2693?e<2579?e<2519?e<2486?e<2474?e>=2451&&e<=2472:e>=2474&&e<=2480||e==2482:e<2503?e>=2486&&e<=2489||e>=2492&&e<=2500:e>=2503&&e<=2504||e>=2507&&e<=2510:e<2534?e<2524?e==2519:e>=2524&&e<=2525||e>=2527&&e<=2531:e<2565?e>=2534&&e<=2545||e>=2561&&e<=2563:e>=2565&&e<=2570||e>=2575&&e<=2576:e<2631?e<2613?e<2602?e>=2579&&e<=2600:e>=2602&&e<=2608||e>=2610&&e<=2611:e<2620?e>=2613&&e<=2614||e>=2616&&e<=2617:e==2620||e>=2622&&e<=2626:e<2649?e<2635?e>=2631&&e<=2632:e>=2635&&e<=2637||e==2641:e<2662?e>=2649&&e<=2652||e==2654:e>=2662&&e<=2677||e>=2689&&e<=2691:e<2821?e<2759?e<2730?e<2703?e>=2693&&e<=2701:e>=2703&&e<=2705||e>=2707&&e<=2728:e<2741?e>=2730&&e<=2736||e>=2738&&e<=2739:e>=2741&&e<=2745||e>=2748&&e<=2757:e<2784?e<2763?e>=2759&&e<=2761:e>=2763&&e<=2765||e==2768:e<2809?e>=2784&&e<=2787||e>=2790&&e<=2799:e==2809||e>=2817&&e<=2819:e<2887?e<2858?e<2831?e>=2821&&e<=2828:e>=2831&&e<=2832||e>=2835&&e<=2856:e<2869?e>=2858&&e<=2864||e>=2866&&e<=2867:e>=2869&&e<=2873||e>=2876&&e<=2884:e<2911?e<2902?e>=2887&&e<=2888||e>=2891&&e<=2893:e>=2902&&e<=2903||e>=2908&&e<=2909:e<2929?e>=2911&&e<=2915||e>=2918&&e<=2927:e==2929||e>=2946&&e<=2947:e<3517?e<3205?e<3046?e<2984?e<2969?e<2958?e>=2949&&e<=2954:e>=2958&&e<=2960||e>=2962&&e<=2965:e<2974?e>=2969&&e<=2970||e==2972:e>=2974&&e<=2975||e>=2979&&e<=2980:e<3014?e<2990?e>=2984&&e<=2986:e>=2990&&e<=3001||e>=3006&&e<=3010:e<3024?e>=3014&&e<=3016||e>=3018&&e<=3021:e==3024||e==3031:e<3142?e<3086?e<3072?e>=3046&&e<=3055:e>=3072&&e<=3075||e>=3077&&e<=3084:e<3114?e>=3086&&e<=3088||e>=3090&&e<=3112:e>=3114&&e<=3129||e>=3133&&e<=3140:e<3160?e<3146?e>=3142&&e<=3144:e>=3146&&e<=3149||e>=3157&&e<=3158:e<3174?e>=3160&&e<=3162||e>=3168&&e<=3171:e>=3174&&e<=3183||e>=3200&&e<=3203:e<3333?e<3274?e<3242?e<3214?e>=3205&&e<=3212:e>=3214&&e<=3216||e>=3218&&e<=3240:e<3260?e>=3242&&e<=3251||e>=3253&&e<=3257:e>=3260&&e<=3268||e>=3270&&e<=3272:e<3296?e<3285?e>=3274&&e<=3277:e>=3285&&e<=3286||e==3294:e<3313?e>=3296&&e<=3299||e>=3302&&e<=3311:e>=3313&&e<=3314||e>=3329&&e<=3331:e<3423?e<3389?e<3342?e>=3333&&e<=3340:e>=3342&&e<=3344||e>=3346&&e<=3386:e<3402?e>=3389&&e<=3396||e>=3398&&e<=3400:e>=3402&&e<=3406||e>=3412&&e<=3415:e<3458?e<3430?e>=3423&&e<=3427:e>=3430&&e<=3439||e>=3450&&e<=3455:e<3482?e>=3458&&e<=3459||e>=3461&&e<=3478:e>=3482&&e<=3505||e>=3507&&e<=3515:e<3804?e<3722?e<3570?e<3535?e<3520?e==3517:e>=3520&&e<=3526||e==3530:e<3544?e>=3535&&e<=3540||e==3542:e>=3544&&e<=3551||e>=3558&&e<=3567:e<3664?e<3585?e>=3570&&e<=3571:e>=3585&&e<=3642||e>=3648&&e<=3662:e<3716?e>=3664&&e<=3673||e>=3713&&e<=3714:e==3716||e>=3719&&e<=3720:e<3754?e<3737?e<3725?e==3722:e==3725||e>=3732&&e<=3735:e<3749?e>=3737&&e<=3743||e>=3745&&e<=3747:e==3749||e==3751:e<3776?e<3757?e>=3754&&e<=3755:e>=3757&&e<=3769||e>=3771&&e<=3773:e<3784?e>=3776&&e<=3780||e==3782:e>=3784&&e<=3789||e>=3792&&e<=3801:e<4176?e<3902?e<3872?e<3840?e>=3804&&e<=3807:e==3840||e>=3864&&e<=3865:e<3895?e>=3872&&e<=3881||e==3893:e==3895||e==3897:e<3974?e<3913?e>=3902&&e<=3911:e>=3913&&e<=3948||e>=3953&&e<=3972:e<4038?e>=3974&&e<=3991||e>=3993&&e<=4028:e==4038||e>=4096&&e<=4169:e<4688?e<4301?e<4256?e>=4176&&e<=4253:e>=4256&&e<=4293||e==4295:e<4348?e==4301||e>=4304&&e<=4346:e>=4348&&e<=4680||e>=4682&&e<=4685:e<4746?e<4698?e>=4688&&e<=4694||e==4696:e>=4698&&e<=4701||e>=4704&&e<=4744:e<4786?e>=4746&&e<=4749||e>=4752&&e<=4784:e>=4786&&e<=4789||e>=4792&&e<=4798:e<11035?e<7416?e<6176?e<5873?e<4992?e<4824?e<4802?e==4800:e>=4802&&e<=4805||e>=4808&&e<=4822:e<4888?e>=4824&&e<=4880||e>=4882&&e<=4885:e>=4888&&e<=4954||e>=4957&&e<=4959:e<5121?e<5024?e>=4992&&e<=5007:e>=5024&&e<=5109||e>=5112&&e<=5117:e<5761?e>=5121&&e<=5740||e>=5743&&e<=5759:e>=5761&&e<=5786||e>=5792&&e<=5866:e<6002?e<5920?e<5888?e>=5873&&e<=5880:e>=5888&&e<=5900||e>=5902&&e<=5908:e<5984?e>=5920&&e<=5940||e>=5952&&e<=5971:e>=5984&&e<=5996||e>=5998&&e<=6e3:e<6108?e<6016?e>=6002&&e<=6003:e>=6016&&e<=6099||e==6103:e<6155?e>=6108&&e<=6109||e>=6112&&e<=6121:e>=6155&&e<=6157||e>=6160&&e<=6169:e<6783?e<6512?e<6400?e<6272?e>=6176&&e<=6263:e>=6272&&e<=6314||e>=6320&&e<=6389:e<6448?e>=6400&&e<=6430||e>=6432&&e<=6443:e>=6448&&e<=6459||e>=6470&&e<=6509:e<6608?e<6528?e>=6512&&e<=6516:e>=6528&&e<=6571||e>=6576&&e<=6601:e<6688?e>=6608&&e<=6617||e>=6656&&e<=6683:e>=6688&&e<=6750||e>=6752&&e<=6780:e<7040?e<6832?e<6800?e>=6783&&e<=6793:e>=6800&&e<=6809||e==6823:e<6992?e>=6832&&e<=6846||e>=6912&&e<=6987:e>=6992&&e<=7001||e>=7019&&e<=7027:e<7245?e<7168?e>=7040&&e<=7155:e>=7168&&e<=7223||e>=7232&&e<=7241:e<7376?e>=7245&&e<=7293||e>=7296&&e<=7304:e>=7376&&e<=7378||e>=7380&&e<=7414:e<8450?e<8130?e<8025?e<7960?e<7424?e>=7416&&e<=7417:e>=7424&&e<=7669||e>=7675&&e<=7957:e<8008?e>=7960&&e<=7965||e>=7968&&e<=8005:e>=8008&&e<=8013||e>=8016&&e<=8023:e<8031?e<8027?e==8025:e==8027||e==8029:e<8118?e>=8031&&e<=8061||e>=8064&&e<=8116:e>=8118&&e<=8124||e==8126:e<8205?e<8150?e<8134?e>=8130&&e<=8132:e>=8134&&e<=8140||e>=8144&&e<=8147:e<8178?e>=8150&&e<=8155||e>=8160&&e<=8172:e>=8178&&e<=8180||e>=8182&&e<=8188:e<8305?e<8252?e==8205:e==8252||e==8265:e<8336?e==8305||e==8319:e>=8336&&e<=8348||e>=8400&&e<=8432:e<8579?e<8486?e<8469?e<8455?e==8450:e==8455||e>=8458&&e<=8467:e<8482?e==8469||e>=8473&&e<=8477:e==8482||e==8484:e<8495?e<8488?e==8486:e==8488||e>=8490&&e<=8493:e<8517?e>=8495&&e<=8505||e>=8508&&e<=8511:e>=8517&&e<=8521||e==8526:e<9410?e<9e3?e<8592?e>=8579&&e<=8580:e>=8592&&e<=8703||e>=8986&&e<=8987:e<9193?e==9e3||e==9167:e>=9193&&e<=9203||e>=9208&&e<=9210:e<9723?e<9654?e==9410||e>=9642&&e<=9643:e==9654||e==9664:e<10548?e>=9723&&e<=9726||e>=9728&&e<=10175:e>=10548&&e<=10549||e>=11013&&e<=11015:e<43259?e<12445?e<11688?e<11520?e<11264?e<11088?e>=11035&&e<=11036:e==11088||e==11093:e<11360?e>=11264&&e<=11310||e>=11312&&e<=11358:e>=11360&&e<=11492||e>=11499&&e<=11507:e<11568?e<11559?e>=11520&&e<=11557:e==11559||e==11565:e<11647?e>=11568&&e<=11623||e==11631:e>=11647&&e<=11670||e>=11680&&e<=11686:e<11744?e<11712?e<11696?e>=11688&&e<=11694:e>=11696&&e<=11702||e>=11704&&e<=11710:e<11728?e>=11712&&e<=11718||e>=11720&&e<=11726:e>=11728&&e<=11734||e>=11736&&e<=11742:e<12330?e<11823?e>=11744&&e<=11775:e==11823||e>=12293&&e<=12294:e<12353?e>=12330&&e<=12341||e>=12347&&e<=12349:e>=12353&&e<=12438||e>=12441&&e<=12442:e<42512?e<12951?e<12549?e<12449?e>=12445&&e<=12447:e>=12449&&e<=12538||e>=12540&&e<=12543:e<12704?e>=12549&&e<=12589||e>=12593&&e<=12686:e>=12704&&e<=12730||e>=12784&&e<=12799:e<19968?e<12953?e==12951:e==12953||e>=13312&&e<=19893:e<42192?e>=19968&&e<=40917||e>=40960&&e<=42124:e>=42192&&e<=42237||e>=42240&&e<=42508:e<42891?e<42623?e<42560?e>=42512&&e<=42539:e>=42560&&e<=42610||e>=42612&&e<=42621:e<42775?e>=42623&&e<=42725||e>=42736&&e<=42737:e>=42775&&e<=42783||e>=42786&&e<=42888:e<43072?e<42928?e>=42891&&e<=42926:e>=42928&&e<=42935||e>=42999&&e<=43047:e<43216?e>=43072&&e<=43123||e>=43136&&e<=43205:e>=43216&&e<=43225||e>=43232&&e<=43255:e<55243?e<43744?e<43488?e<43312?e<43261?e==43259:e==43261||e>=43264&&e<=43309:e<43392?e>=43312&&e<=43347||e>=43360&&e<=43388:e>=43392&&e<=43456||e>=43471&&e<=43481:e<43600?e<43520?e>=43488&&e<=43518:e>=43520&&e<=43574||e>=43584&&e<=43597:e<43642?e>=43600&&e<=43609||e>=43616&&e<=43638:e>=43642&&e<=43714||e>=43739&&e<=43741:e<43824?e<43785?e<43762?e>=43744&&e<=43759:e>=43762&&e<=43766||e>=43777&&e<=43782:e<43808?e>=43785&&e<=43790||e>=43793&&e<=43798:e>=43808&&e<=43814||e>=43816&&e<=43822:e<44012?e<43868?e>=43824&&e<=43866:e>=43868&&e<=43877||e>=43888&&e<=44010:e<44032?e>=44012&&e<=44013||e>=44016&&e<=44025:e>=44032&&e<=55203||e>=55216&&e<=55238:e<64848?e<64298?e<64112?e<55296?e>=55243&&e<=55291:e>=55296&&e<=57343||e>=63744&&e<=64109:e<64275?e>=64112&&e<=64217||e>=64256&&e<=64262:e>=64275&&e<=64279||e>=64285&&e<=64296:e<64320?e<64312?e>=64298&&e<=64310:e>=64312&&e<=64316||e==64318:e<64326?e>=64320&&e<=64321||e>=64323&&e<=64324:e>=64326&&e<=64433||e>=64467&&e<=64829:e<65296?e<65024?e<64914?e>=64848&&e<=64911:e>=64914&&e<=64967||e>=65008&&e<=65019:e<65136?e>=65024&&e<=65039||e>=65056&&e<=65071:e>=65136&&e<=65140||e>=65142&&e<=65276:e<65474?e<65345?e>=65296&&e<=65305||e>=65313&&e<=65338:e>=65345&&e<=65370||e>=65382&&e<=65470:e<65490?e>=65474&&e<=65479||e>=65482&&e<=65487:e>=65490&&e<=65495||e>=65498&&e<=65500}function VE(e){return e<58?e<44?e==33:e==44||e==46:e<63?e>=58&&e<=59:e==63||e==94}function hO(e){return e<91?e==40:e==91||e==123}function tp(e){return e<93?e==41:e==93||e==125}var pO=/^(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|travelersinsurance|vermögensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|vermögensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|சிங்கப்பூர்|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|موريتانيا|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|السعودية|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|banamex|bauhaus|bestbuy|booking|brother|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|yamaxun|youtube|zuerich|католик|البحرين|الجزائر|العليان|پاکستان|كاثوليك|இந்தியா|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kindle|kosher|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|nagoya|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|walter|webcam|xihuan|yachts|yandex|zappos|москва|онлайн|ابوظبي|ارامكو|الاردن|المغرب|امارات|فلسطين|مليسيا|भारतम्|இலங்கை|ファッション|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|loans|locus|lotte|lotto|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|ישראל|ایران|بازار|بھارت|سودان|سورية|همراه|भारोत|संगठन|বাংলা|భారత్|ഭാരതം|嘉里大酒店|aarp|able|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|дети|сайт|بارت|بيتك|ڀارت|تونس|شبكة|عراق|عمان|موقع|भारत|ভারত|ভাৰত|ਭਾਰਤ|ભારત|ଭାରତ|ಭಾರತ|ලංකා|アマゾン|グーグル|クラウド|ポイント|组织机构|電訊盈科|香格里拉|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|scb|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|бел|ком|қаз|мкд|мон|орг|рус|срб|укр|հայ|קום|عرب|قطر|كوم|مصر|कॉम|नेट|คอม|ไทย|ລາວ|ストア|セール|みんな|中文网|亚马逊|天主教|我爱你|新加坡|淡马锡|飞利浦|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|ελ|ευ|бг|ею|рф|გე|닷넷|닷컴|삼성|한국|コム|世界|中信|中国|中國|企业|佛山|信息|健康|八卦|公司|公益|台湾|台灣|商城|商店|商标|嘉里|在线|大拿|娱乐|家電|广东|微博|慈善|手机|招聘|政务|政府|新闻|时尚|書籍|机构|游戏|澳門|点看|移动|网址|网店|网站|网络|联通|谷歌|购物|通販|集团|食品|餐厅|香港)$/,zE=/https?:\/\//i,fO=new RegExp("^"+zE.source,"i"),mO=/^(javascript|vbscript):/i,EO=/^[A-Za-z][-.+A-Za-z0-9]*:(\/\/)?([^:/]*)/,_O=/^(?:\/\/)?([^/#?:]+)/,vo=Mi;function YE(e){return Mi(e)||le(e)||e===43||e===45||e===46}var ur=Yr;function Ec(e){return e===95||ur(e)}function GE(e){return Yr(e)||function(t){return t<91?t<47?t>=35&&t<=43||t==45:t<61?t==47:t==61||t==64:t<95?t==91||t==93:t<123?t==95:t>=123&&t<=126||t==10003}(e)||VE(e)}function _c(e){return e===47||e===63||e===35}function ep(e){return pO.test(e.toLowerCase())}var AO=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,gO=/[:/?#]/,DO=/^(https?:\/\/)?(?:www\.)?/i,OO=/^\/\//,WE=function(e){function t(n){var r=e.call(this,n)||this;return r.type="url",r.url="",r.urlMatchType="scheme",r.protocolRelativeMatch=!1,r.stripPrefix={scheme:!0,www:!0},r.stripTrailingSlash=!0,r.decodePercentEncoding=!0,r.protocolPrepended=!1,r.urlMatchType=n.urlMatchType,r.url=n.url,r.protocolRelativeMatch=n.protocolRelativeMatch,r.stripPrefix=n.stripPrefix,r.stripTrailingSlash=n.stripTrailingSlash,r.decodePercentEncoding=n.decodePercentEncoding,r}return Uo(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var n=this.url;return this.protocolRelativeMatch||this.urlMatchType==="scheme"||this.protocolPrepended||(n=this.url="http://"+n,this.protocolPrepended=!0),n},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var n=this.getMatchedText();return this.protocolRelativeMatch&&(n=n.replace(OO,"")),this.stripPrefix.scheme&&(n=n.replace(fO,"")),this.stripPrefix.www&&(n=function(r){return r.includes("www.")?r.replace(DO,"$1"):r}(n)),this.stripTrailingSlash&&(n=function(r){return r.charAt(r.length-1)==="/"&&(r=r.slice(0,-1)),r}(n)),this.decodePercentEncoding&&(n=function(r){var i=r.replace(/%(?:22|26|27|3C|3E)/gi,function(o){return o==="%22"?""":o==="%26"?"&":o==="%27"?"'":o==="%3C"||o==="%3c"?"<":">"});if(i.includes("%"))try{return decodeURIComponent(i)}catch(o){}return i}(n)),n},t}(Ho),vO=/^mailto:/i,XE=Yr;function Ac(e){return XE(e)||function(t){return t<47?t<42?t==33||t>=35&&t<=39:t>=42&&t<=43||t==45:t<63?t==47||t==61:t<94?t==63:t>=94&&t<=96||t>=123&&t<=126}(e)}var KE=function(e){function t(n){var r=e.call(this,n)||this;return r.type="email",r.email="",r.email=n.email,r}return Uo(t,e),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}(Ho);function qE(e){return e===95||Yr(e)}var SO=["twitter","facebook","instagram","tiktok","youtube"],TO=function(e){function t(n){var r=e.call(this,n)||this;return r.type="hashtag",r.serviceName="twitter",r.hashtag="",r.serviceName=n.serviceName,r.hashtag=n.hashtag,r}return Uo(t,e),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 n=this.serviceName,r=this.hashtag;switch(n){case"twitter":return"https://twitter.com/hashtag/"+r;case"facebook":return"https://www.facebook.com/hashtag/"+r;case"instagram":return"https://instagram.com/explore/tags/"+r;case"tiktok":return"https://www.tiktok.com/tag/"+r;case"youtube":return"https://youtube.com/hashtag/"+r;default:Br(n)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},t}(Ho),RO={twitter:/^@\w{1,15}$/,instagram:/^@[_\w]{1,30}$/,soundcloud:/^@[-a-z0-9_]{3,25}$/,tiktok:/^@[.\w]{1,23}[\w]$/,youtube:/^@[-.·\w]{3,30}$/};function JE(e){return e===45||e===46||e===95||Mi(e)||le(e)}var IO=["twitter","instagram","soundcloud","tiktok","youtube"],yO=function(e){function t(n){var r=e.call(this,n)||this;return r.type="mention",r.serviceName="twitter",r.mention="",r.mention=n.mention,r.serviceName=n.serviceName,r}return Uo(t,e),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;case"tiktok":return"https://www.tiktok.com/@"+this.mention;case"youtube":return"https://youtube.com/@"+this.mention;default:Br(this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var n=e.prototype.getCssClassSuffixes.call(this),r=this.getServiceName();return r&&n.push(r),n},t}(Ho),CO=/[-. ()]/,NO=new RegExp("^".concat(/(?:(?:(?:(\+)?\d{1,3}[-. ]?)?\(?\d{3}\)?[-. ]?\d{3}[-. ]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-. ]?(?:\d[-. ]?){6,12}\d+))([,;]+[0-9]+#?)*/.source,"|").concat(/(0([1-9]-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source,"$"));function ZE(e){return e===45||e===46||e===32}function gc(e){return e===44||e===59}var bO=function(e){function t(n){var r=e.call(this,n)||this;return r.type="phone",r.number="",r.plusSign=!1,r.number=n.number,r.plusSign=n.plusSign,r}return Uo(t,e),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}(Ho),kO=function(){function e(t,n){this.charIdx=0,this.matches=[],this._stateMachines=[],this.schemeUrlMachinesCount=0,this.text=t,this.tagBuilder=n.tagBuilder,this.stripPrefix=n.stripPrefix,this.stripTrailingSlash=n.stripTrailingSlash,this.decodePercentEncoding=n.decodePercentEncoding,this.hashtagServiceName=n.hashtagServiceName,this.mentionServiceName=n.mentionServiceName}return Object.defineProperty(e.prototype,"stateMachines",{get:function(){return this._stateMachines},enumerable:!1,configurable:!0}),e.prototype.addMachine=function(t){this._stateMachines.push(t),rp(t)&&this.schemeUrlMachinesCount++},e.prototype.removeMachine=function(t){this._stateMachines=this._stateMachines.filter(function(n){return n!==t}),rp(t)&&this.schemeUrlMachinesCount--},e.prototype.hasSchemeUrlMachine=function(){return this.schemeUrlMachinesCount>0},e}();function Ea(e,t,n){var r=e.charIdx;if(n===35)e.addMachine({type:2,startIdx:r,state:28,acceptStateReached:!1});else if(n===64)e.addMachine(function(o,s){return{type:3,startIdx:o,state:s,acceptStateReached:!1}}(r,30));else if(n===47)e.addMachine(su(r,11));else if(n===43)e.addMachine(sl(r,37));else if(n===40)e.addMachine(sl(r,32));else{if(le(n)&&(e.addMachine(sl(r,38)),e.addMachine(function(o,s){return{type:0,startIdx:o,state:s,acceptStateReached:!1,matchType:2,octetsEncountered:1}}(r,13))),XE(n)){var i=t.toLowerCase()==="m"?15:22;e.addMachine(function(o,s){return{type:1,startIdx:o,state:s,acceptStateReached:!1}}(r,i))}vo(n)&&e.addMachine(_a(r,0)),Yr(n)&&e.addMachine(su(r,5))}}function wO(e,t,n){n===58?t.state=2:n===45?t.state=1:YE(n)||e.removeMachine(t)}function LO(e,t,n){var r=e.charIdx;n===45||(n===47?(e.removeMachine(t),e.addMachine(su(r,11))):YE(n)?t.state=0:e.removeMachine(t))}function PO(e,t,n){var r=e.charIdx;n===47?t.state=3:n===46?e.removeMachine(t):ur(n)?(t.state=5,vo(n)&&e.addMachine(_a(r,0))):e.removeMachine(t)}function MO(e,t,n){n===47?t.state=4:GE(n)?(t.state=10,t.acceptStateReached=!0):Lt(e,t)}function xO(e,t,n,r){r===47?(t.state=10,t.acceptStateReached=!0):ur(r)?(t.state=5,t.acceptStateReached=!0):e.removeMachine(t)}function FO(e,t,n){n===47?t.state=12:e.removeMachine(t)}function BO(e,t,n){ur(n)?t.state=5:e.removeMachine(t)}function UO(e,t,n){n===46?t.state=7:n===45?t.state=6:n===58?t.state=8:_c(n)?t.state=10:Ec(n)||Lt(e,t)}function HO(e,t,n,r){r===45||(r===46?Lt(e,t):ur(r)?t.state=5:Lt(e,t))}function jO(e,t,n,r){r===46?Lt(e,t):ur(r)?(t.state=5,t.acceptStateReached=!0):Lt(e,t)}function $O(e,t,n){n===46?t.state=14:n===58?t.state=8:le(n)||(_c(n)?t.state=10:Yr(n)?e.removeMachine(t):Lt(e,t))}function VO(e,t,n){le(n)?(t.octetsEncountered++,t.octetsEncountered===4&&(t.acceptStateReached=!0),t.state=13):Lt(e,t)}function zO(e,t,n){le(n)?t.state=9:Lt(e,t)}function YO(e,t,n){le(n)||(_c(n)?t.state=10:Lt(e,t))}function GO(e,t,n){GE(n)||Lt(e,t)}function WO(e,t,n,r){n.toLowerCase()==="a"?t.state=16:Gr(e,t,r)}function XO(e,t,n,r){n.toLowerCase()==="i"?t.state=17:Gr(e,t,r)}function KO(e,t,n,r){n.toLowerCase()==="l"?t.state=18:Gr(e,t,r)}function qO(e,t,n,r){n.toLowerCase()==="t"?t.state=19:Gr(e,t,r)}function JO(e,t,n,r){n.toLowerCase()==="o"?t.state=20:Gr(e,t,r)}function ZO(e,t,n){n===58?t.state=21:Gr(e,t,n)}function QO(e,t,n){Ac(n)?t.state=22:e.removeMachine(t)}function Gr(e,t,n){n===46?t.state=23:n===64?t.state=24:Ac(n)?t.state=22:e.removeMachine(t)}function tv(e,t,n){n===46||n===64?e.removeMachine(t):Ac(n)?t.state=22:e.removeMachine(t)}function ev(e,t,n){ur(n)?t.state=25:e.removeMachine(t)}function nv(e,t,n){n===46?t.state=27:n===45?t.state=26:Ec(n)||Lt(e,t)}function rv(e,t,n){n===45||n===46?Lt(e,t):Ec(n)?t.state=25:Lt(e,t)}function iv(e,t,n){n===46||n===45?Lt(e,t):ur(n)?(t.state=25,t.acceptStateReached=!0):Lt(e,t)}function ov(e,t,n){qE(n)?(t.state=29,t.acceptStateReached=!0):e.removeMachine(t)}function sv(e,t,n){qE(n)||Lt(e,t)}function av(e,t,n){JE(n)?(t.state=31,t.acceptStateReached=!0):e.removeMachine(t)}function lv(e,t,n){JE(n)||(Yr(n)?e.removeMachine(t):Lt(e,t))}function uv(e,t,n,r){le(r)?t.state=38:(e.removeMachine(t),Ea(e,n,r))}function cv(e,t,n,r){le(r)?t.state=33:e.removeMachine(t),Ea(e,n,r)}function dv(e,t,n){le(n)?t.state=34:e.removeMachine(t)}function hv(e,t,n){le(n)?t.state=35:e.removeMachine(t)}function pv(e,t,n){n===41?t.state=36:e.removeMachine(t)}function fv(e,t,n,r){le(r)?t.state=38:ZE(r)?t.state=39:e.removeMachine(t)}function mv(e,t,n,r){var i=e.charIdx;t.acceptStateReached=!0,gc(r)?t.state=40:r===35?t.state=41:le(r)||(r===40?t.state=32:ZE(r)?t.state=39:(Lt(e,t),vo(r)&&e.addMachine(_a(i,0))))}function Ev(e,t,n,r){le(r)?t.state=38:r===40?t.state=32:(Lt(e,t),Ea(e,n,r))}function _v(e,t,n){gc(n)||(n===35?t.state=41:le(n)?t.state=38:Lt(e,t))}function Av(e,t,n){gc(n)?t.state=40:le(n)?e.removeMachine(t):Lt(e,t)}function Lt(e,t){var n=e.matches,r=e.text,i=e.charIdx,o=e.tagBuilder,s=e.stripPrefix,a=e.stripTrailingSlash,l=e.decodePercentEncoding,c=e.hashtagServiceName,u=e.mentionServiceName;if(e.removeMachine(t),t.acceptStateReached){var h,d,p=t.startIdx,f=r.slice(t.startIdx,i);switch(f=function(A){for(var _={"(":0,"{":0,"[":0},g=0;g<A.length;g++){var D=A.charAt(g);hO(I=A.charCodeAt(g))?_[D]++:tp(I)&&_[np[D]]--}for(var S=A.length-1;S>=0;){var I;if(D=A.charAt(S),tp(I=A.charCodeAt(S))){var T=np[D];if(!(_[T]<0))break;_[T]++,S--}else{if(!VE(I))break;S--}}return A.slice(0,S+1)}(f),t.type){case 0:if(r.charCodeAt(t.startIdx-1)===64)return;switch(t.matchType){case 0:var m=zE.exec(f);if(m&&(p+=m.index,f=f.slice(m.index)),!function(A){if(mO.test(A))return!1;var _=A.match(EO);if(!_)return!1;var g=!!_[1],D=_[2];return!!g||!(D.indexOf(".")===-1||!/[A-Za-z]/.test(D))}(f))return;break;case 1:if(!function(A){var _=A.match(_O);if(!_)return!1;var g=_[0].split(".");return!(g.length<2||!ep(g[g.length-1]))}(f))return;break;case 2:if(d=f.split(gO,1)[0],!AO.test(d))return;break;default:Br(t)}n.push(new WE({tagBuilder:o,matchedText:f,offset:p,urlMatchType:gv(t.matchType),url:f,protocolRelativeMatch:f.slice(0,2)==="//",stripPrefix:s,stripTrailingSlash:a,decodePercentEncoding:l}));break;case 1:ep(f.split(".").pop())&&n.push(new KE({tagBuilder:o,matchedText:f,offset:p,email:f.replace(vO,"")}));break;case 2:f.length<=140&&n.push(new TO({tagBuilder:o,matchedText:f,offset:p,serviceName:c,hashtag:f.slice(1)}));break;case 3:(function(A,_){return RO[_].test(A)})(f,u)&&n.push(new yO({tagBuilder:o,matchedText:f,offset:p,serviceName:u,mention:f.slice(1)}));break;case 4:if(f=f.replace(/ +$/g,""),((h=f).charAt(0)==="+"||CO.test(h))&&NO.test(h)){var E=f.replace(/[^0-9,;#]/g,"");n.push(new bO({tagBuilder:o,matchedText:f,offset:p,number:E,plusSign:f.charAt(0)==="+"}))}break;default:Br(t)}}}function gv(e){switch(e){case 0:return"scheme";case 1:return"tld";case 2:return"ipV4";default:Br(e)}}var np={")":"(","}":"{","]":"["};function _a(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:0}}function su(e,t){return{type:0,startIdx:e,state:t,acceptStateReached:!1,matchType:1}}function sl(e,t){return{type:4,startIdx:e,state:t,acceptStateReached:!1}}function rp(e){return e.type===0&&e.matchType===0}var An=function(e){e===void 0&&(e={}),this.idx=e.idx!==void 0?e.idx:-1,this.type=e.type||"tag",this.name=e.name||"",this.isOpening=!!e.isOpening,this.isClosing=!!e.isClosing},Dc=new An,Dv=function(e,t){this.charIdx=0,this.state=0,this.currentDataIdx=0,this.currentTag=Dc,this.html=e,this.callbacks=t};function Ov(e,t){t==="<"&&Tn(e)}function vv(e,t,n){t==="!"?e.state=13:t==="/"?(e.state=2,e.currentTag=new An(Xt(Xt({},e.currentTag),{isClosing:!0}))):t==="<"?Tn(e):Mi(n)?(e.state=3,e.currentTag=new An(Xt(Xt({},e.currentTag),{isOpening:!0}))):(e.state=0,e.currentTag=Dc)}function Sv(e,t,n){zr(n)?(e.currentTag=new An(Xt(Xt({},e.currentTag),{name:al(e)})),e.state=4):t==="<"?Tn(e):t==="/"?(e.currentTag=new An(Xt(Xt({},e.currentTag),{name:al(e)})),e.state=12):t===">"?(e.currentTag=new An(Xt(Xt({},e.currentTag),{name:al(e)})),Rn(e)):Mi(n)||le(n)||t===":"||Je(e)}function Tv(e,t,n){t===">"?Je(e):Mi(n)?e.state=3:Je(e)}function Rv(e,t,n){zr(n)||(t==="/"?e.state=12:t===">"?Rn(e):t==="<"?Tn(e):t==="="||mc(n)||function(r){return r>=0&&r<=31||r==127}(n)?Je(e):e.state=5)}function Iv(e,t,n){zr(n)?e.state=6:t==="/"?e.state=12:t==="="?e.state=7:t===">"?Rn(e):t==="<"?Tn(e):mc(n)&&Je(e)}function yv(e,t,n){zr(n)||(t==="/"?e.state=12:t==="="?e.state=7:t===">"?Rn(e):t==="<"?Tn(e):mc(n)?Je(e):e.state=5)}function Cv(e,t,n){zr(n)||(t==='"'?e.state=8:t==="'"?e.state=9:/[>=`]/.test(t)?Je(e):t==="<"?Tn(e):e.state=10)}function Nv(e,t){t==='"'&&(e.state=11)}function bv(e,t){t==="'"&&(e.state=11)}function kv(e,t,n){zr(n)?e.state=4:t===">"?Rn(e):t==="<"&&Tn(e)}function wv(e,t,n){zr(n)?e.state=4:t==="/"?e.state=12:t===">"?Rn(e):t==="<"?Tn(e):(e.state=4,function(r){r.charIdx--}(e))}function Lv(e,t){t===">"?(e.currentTag=new An(Xt(Xt({},e.currentTag),{isClosing:!0})),Rn(e)):Je(e)}function Pv(e){var t=e.html,n=e.charIdx;t.slice(n,n+2)==="--"?(e.charIdx++,e.currentTag=new An(Xt(Xt({},e.currentTag),{type:"comment"})),e.state=14):t.slice(n,n+7).toUpperCase()==="DOCTYPE"?(e.charIdx+=6,e.currentTag=new An(Xt(Xt({},e.currentTag),{type:"doctype"})),e.state=20):Je(e)}function Mv(e,t){t==="-"?e.state=15:t===">"?Je(e):e.state=16}function xv(e,t){t==="-"?e.state=18:t===">"?Je(e):e.state=16}function Fv(e,t){t==="-"&&(e.state=17)}function Bv(e,t){e.state=t==="-"?18:16}function Uv(e,t){t===">"?Rn(e):t==="!"?e.state=19:t==="-"||(e.state=16)}function Hv(e,t){t==="-"?e.state=17:t===">"?Rn(e):e.state=16}function jv(e,t){t===">"?Rn(e):t==="<"&&Tn(e)}function Je(e){e.state=0,e.currentTag=Dc}function Tn(e){e.state=1,e.currentTag=new An({idx:e.charIdx})}function Rn(e){var t=e.html.slice(e.currentDataIdx,e.currentTag.idx);t&&e.callbacks.onText(t,e.currentDataIdx);var n=e.currentTag;n.type==="comment"?e.callbacks.onComment(n.idx):n.type==="doctype"?e.callbacks.onDoctype(n.idx):(n.isOpening&&e.callbacks.onOpenTag(n.name,n.idx),n.isClosing&&e.callbacks.onCloseTag(n.name,n.idx)),Je(e),e.currentDataIdx=e.charIdx+1}function al(e){var t=e.currentTag.idx+(e.currentTag.isClosing?2:1);return e.html.slice(t,e.charIdx).toLowerCase()}var $v=function(){function e(t){t===void 0&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.tagBuilder=null,this.urls=function(o){return o==null&&(o=!0),ze(o)?{schemeMatches:o,tldMatches:o,ipV4Matches:o}:{schemeMatches:!ze(o.schemeMatches)||o.schemeMatches,tldMatches:!ze(o.tldMatches)||o.tldMatches,ipV4Matches:!ze(o.ipV4Matches)||o.ipV4Matches}}(t.urls),this.email=ze(t.email)?t.email:this.email,this.phone=ze(t.phone)?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow=ze(t.newWindow)?t.newWindow:this.newWindow,this.stripPrefix=function(o){return o==null&&(o=!0),ze(o)?{scheme:o,www:o}:{scheme:!ze(o.scheme)||o.scheme,www:!ze(o.www)||o.www}}(t.stripPrefix),this.stripTrailingSlash=ze(t.stripTrailingSlash)?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding=ze(t.decodePercentEncoding)?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var n=this.mention;if(n!==!1&&IO.indexOf(n)===-1)throw new Error("invalid `mention` cfg '".concat(n,"' - see docs"));var r,i=this.hashtag;if(i!==!1&&SO.indexOf(i)===-1)throw new Error("invalid `hashtag` cfg '".concat(i,"' - see docs"));this.truncate=typeof(r=t.truncate)=="number"?{length:r,location:"end"}:Xt({length:Number.POSITIVE_INFINITY,location:"end"},r),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,n){return new e(n).link(t)},e.parse=function(t,n){return new e(n).parse(t)},e.prototype.parse=function(t){var n=this,r=["a","style","script"],i=0,o=[];return function(s,a){for(var l=new Dv(s,a),c=s.length;l.charIdx<c;){var u=s.charAt(l.charIdx),h=s.charCodeAt(l.charIdx);switch(l.state){case 0:Ov(l,u);break;case 1:vv(l,u,h);break;case 2:Tv(l,u,h);break;case 3:Sv(l,u,h);break;case 4:Rv(l,u,h);break;case 5:Iv(l,u,h);break;case 6:yv(l,u,h);break;case 7:Cv(l,u,h);break;case 8:Nv(l,u);break;case 9:bv(l,u);break;case 10:kv(l,u,h);break;case 11:wv(l,u,h);break;case 12:Lv(l,u);break;case 13:Pv(l);break;case 14:Mv(l,u);break;case 15:xv(l,u);break;case 16:Fv(l,u);break;case 17:Bv(l,u);break;case 18:Uv(l,u);break;case 19:Hv(l,u);break;case 20:jv(l,u);break;default:Br(l.state)}l.charIdx++}l.currentDataIdx<l.charIdx&&function(d){var p=d.html.slice(d.currentDataIdx,d.charIdx);d.callbacks.onText(p,d.currentDataIdx),d.currentDataIdx=d.charIdx+1}(l)}(t,{onOpenTag:function(s){r.indexOf(s)>=0&&i++},onText:function(s,a){if(i===0){var l=s.split(/( | |<|<|>|>|"|"|')/gi),c=a;l.forEach(function(u,h){if(h%2==0){var d=n.parseText(u,c);o.push.apply(o,function(p,f,m){if(m||arguments.length===2)for(var E,A=0,_=f.length;A<_;A++)!E&&A in f||(E||(E=Array.prototype.slice.call(f,0,A)),E[A]=f[A]);return p.concat(E||Array.prototype.slice.call(f))}([],function(p,f){var m=typeof Symbol=="function"&&p[Symbol.iterator];if(!m)return p;var E,A,_=m.call(p),g=[];try{for(;(f===void 0||f-- >0)&&!(E=_.next()).done;)g.push(E.value)}catch(D){A={error:D}}finally{try{E&&!E.done&&(m=_.return)&&m.call(_)}finally{if(A)throw A.error}}return g}(d),!1))}c+=u.length})}},onCloseTag:function(s){r.indexOf(s)>=0&&(i=Math.max(i-1,0))},onComment:function(){},onDoctype:function(){}}),o=this.compactMatches(o),o=this.removeUnwantedMatches(o)},e.prototype.compactMatches=function(t){t.sort(Vv);for(var n=0;n<t.length-1;){var r=t[n],i=r.getOffset(),o=r.getMatchedText().length;if(n+1<t.length&&t[n+1].getOffset()===i){var s=t[n+1].getMatchedText().length>o?n:n+1;t.splice(s,1)}else n++}return t},e.prototype.removeUnwantedMatches=function(t){return this.hashtag||Er(t,function(n){return n.getType()==="hashtag"}),this.email||Er(t,function(n){return n.getType()==="email"}),this.phone||Er(t,function(n){return n.getType()==="phone"}),this.mention||Er(t,function(n){return n.getType()==="mention"}),this.urls.schemeMatches||Er(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="scheme"}),this.urls.tldMatches||Er(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="tld"}),this.urls.ipV4Matches||Er(t,function(n){return n.getType()==="url"&&n.getUrlMatchType()==="ipV4"}),t},e.prototype.parseText=function(t,n){n=n||0;for(var r=function(s,a){for(var l=new kO(s,a);l.charIdx<l.text.length;l.charIdx++){var c=s.charAt(l.charIdx),u=s.charCodeAt(l.charIdx);if(l.stateMachines.length===0)Ea(l,c,u);else{for(var h=l.stateMachines.length-1;h>=0;h--){var d=l.stateMachines[h];switch(d.state){case 11:FO(l,d,u);break;case 12:BO(l,d,u);break;case 0:wO(l,d,u);break;case 1:LO(l,d,u);break;case 2:PO(l,d,u);break;case 3:MO(l,d,u);break;case 4:xO(l,d,0,u);break;case 5:UO(l,d,u);break;case 6:HO(l,d,0,u);break;case 7:jO(l,d,0,u);break;case 13:$O(l,d,u);break;case 14:VO(l,d,u);break;case 8:zO(l,d,u);break;case 9:YO(l,d,u);break;case 10:GO(l,d,u);break;case 15:WO(l,d,c,u);break;case 16:XO(l,d,c,u);break;case 17:KO(l,d,c,u);break;case 18:qO(l,d,c,u);break;case 19:JO(l,d,c,u);break;case 20:ZO(l,d,u);break;case 21:QO(l,d,u);break;case 22:Gr(l,d,u);break;case 23:tv(l,d,u);break;case 24:ev(l,d,u);break;case 25:nv(l,d,u);break;case 26:rv(l,d,u);break;case 27:iv(l,d,u);break;case 28:ov(l,d,u);break;case 29:sv(l,d,u);break;case 30:av(l,d,u);break;case 31:lv(l,d,u);break;case 32:cv(l,d,c,u);break;case 33:dv(l,d,u);break;case 34:hv(l,d,u);break;case 35:pv(l,d,u);break;case 36:fv(l,d,0,u);break;case 37:uv(l,d,c,u);break;case 38:mv(l,d,0,u);break;case 39:Ev(l,d,c,u);break;case 40:_v(l,d,u);break;case 41:Av(l,d,u);break;default:Br(d.state)}}if(!l.hasSchemeUrlMachine()&&l.charIdx>0&&vo(u)){var p=l.text.charCodeAt(l.charIdx-1);vo(p)||l.addMachine(_a(l.charIdx,0))}}}for(var f=l.stateMachines.length-1;f>=0;f--)l.stateMachines.forEach(function(m){return Lt(l,m)});return l.matches}(t,{tagBuilder:this.getTagBuilder(),stripPrefix:this.stripPrefix,stripTrailingSlash:this.stripTrailingSlash,decodePercentEncoding:this.decodePercentEncoding,hashtagServiceName:this.hashtag,mentionServiceName:this.mention||"twitter"}),i=0,o=r.length;i<o;i++)r[i].setOffset(n+r[i].getOffset());return r},e.prototype.link=function(t){if(!t)return"";this.sanitizeHtml&&(t=t.replace(/</g,"<").replace(/>/g,">"));for(var n=this.parse(t),r=new Array(2*n.length+1),i=0,o=0,s=n.length;o<s;o++){var a=n[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("")},e.prototype.createMatchReturnVal=function(t){var n;return this.replaceFn&&(n=this.replaceFn.call(this.context,t)),typeof n=="string"?n:n===!1?t.getMatchedText():n instanceof $E?n.toAnchorString():t.buildTag().toAnchorString()},e.prototype.getTagBuilder=function(){var t=this.tagBuilder;return t||(t=this.tagBuilder=new dO({newWindow:this.newWindow,truncate:this.truncate,className:this.className})),t},e.version="4.1.5",e}();function Vv(e,t){return e.getOffset()-t.getOffset()}function QE(e,t=e){return{type:"autolink",url:e,text:t}}const zv=()=>$n(/```([^]+?)```/g,([e,t])=>({type:"codespan",text:HE(t)})),Yv=$n(/<!!mention:([^>\s]*?)\|(.*?)>/gm,([e,t,n])=>function(r,i){return{type:"mention",id:r,text:i}}(decodeURIComponent(t),n)),Gv=$n(/<!!customemoji:(.*?)>/gm,([e,t])=>function(n){return{type:"customemoji",text:n}}(t)),t_=$n(/<((?:https?|mailto):.*?)\|(.*?)>/gi,([e,t,n])=>function(r,i=[]){return{type:"link",url:r,children:i}}(t,[n])),Wv=$n(/<actionlink:([^|]+)[|]([^>]*)>/gi,([e,t,n])=>{const{action:r,params:i}=e_(t);return function(o,s,a=[]){return{type:"actionlink",action:o,params:s,children:a}}(r,i,[n])}),Xv=$n(/<actionbutton:([^|]+)[|]([^>]*)>/gi,([e,t,n])=>{const{action:r,params:i}=e_(t);return function(o,s,a=[]){return{type:"actionbutton",action:o,params:s,children:a}}(r,i,[n])});function e_(e){const t=e.indexOf("?");return t===-1?{action:e,params:{}}:{action:e.slice(0,t),params:Object.fromEntries(new URLSearchParams(e.slice(t)))}}const Kv=$n(/(?:^|\n)(?:\s*[-*+]\s+[^\n]+(?:\n|$))+/g,([e])=>function(t=[]){return{type:"bulletlist",children:t}}([e.startsWith(`
|
|
17
|
+
`)?e.slice(1):e])),qv=$n(/^\s*[-*+]\s+([^\n]+)(?:\n|$)/gm,([e,t])=>({type:"bulletpoint",children:[t]})),n_=e=>{const t=/(?:^|[^-:/\w])([(+]?[0-9](?:[-_+ ().]?[0-9]){5,11}[0-9])(?:[^-:/\w]|$)/g,n=/^(\d{4})-(\d{4})$/;let r=0;const i=[];for(const o of ma(e,t)){const s=o[0],a=o[1],l=a.match(n);if(l&&Number(l[1])<Number(l[2]))continue;const c=s.startsWith(a)?o.index:o.index+1;c-r>0&&i.push(e.substring(r,c));const u=QE("tel:"+a.replace(/[^0-9+]/g,""),a);i.push(u),r=c+a.length}return r<e.length&&i.push(e.substring(r)),i},r_=e=>t_(e).flatMap(t=>typeof t=="string"?ll(t):["<",...ll(t.url),...ll("|"+t.children[0]+">")]),ll=e=>{const t=$v.parse(e,{urls:!0,email:!0,phone:!1,hashtag:!1,mention:!1}),n=[];let r=0;for(const i of t){const o=i.getOffset(),s=i.getMatchedText(),a=s.length;let l=s;i instanceof KE?l="mailto:"+i.getEmail():i instanceof WE&&(l=i.getUrl()),o>r&&n.push(e.substring(r,o)),n.push(QE(l,s)),r=o+a}return r<e.length&&n.push(e.substring(r)),n},Jv=["Codeblock","Codespan","FormattedLink","Wikitext","Autolink","Actions","Mention","Mention","BulletPoint","CustomEmoji"],Zv=function(e){const t=RegExp(`[^${e}]+${e}?|${e}`,"g");return n=>Array.from(n.match(t)||[])}(`
|
|
18
|
+
`);function i_(e,t={except:[]}){const n=function(i={except:[]}){var a;const o={multilineSteps:[],singlelineSteps:[]},s=(a=i.except)!=null?a:Jv.filter(l=>!i.only.includes(l));return s.includes("BulletPoint")||o.multilineSteps.push(Kv,qv),s.includes("Mention")||o.singlelineSteps.push(Yv),s.includes("CustomEmoji")||o.singlelineSteps.push(Gv),s.includes("Codespan")||o.multilineSteps.push(zv()),s.includes("FormattedLink")||o.singlelineSteps.push(t_),s.includes("Actions")||(o.singlelineSteps.push(Wv),o.singlelineSteps.push(Xv)),s.includes("Wikitext")||o.singlelineSteps.push(lO),s.includes("Autolink")||o.singlelineSteps.push(r_,n_),o}(t);let r=s_(e,n);return r=a_(r,!1),r}function o_(e){return i_(e,{except:["FormattedLink","Actions"]})}function s_(e,t){let n=[e];return n=ul(n,t.multilineSteps),n=ul(n,[Zv]),n=ul(n,t.singlelineSteps),n=Oc(n),n}function ul(e,t){return t.reduce((n,r)=>oo(n,r),e)}function Oc(e){const t=[];let n=-1;for(const r of e)typeof r=="string"?typeof t[n]=="string"?t[n]+=r:t[++n]=r:t[++n]="children"in r?{...r,children:Oc(r.children)}:r;return t}function a_(e,t){const n=[];let r=[];for(let i=0;i<e.length;i++){const o=e[i];if(typeof o=="string")r.push(o);else if("children"in o){r.length>0&&(n.push(r.join("")),r=[]);const s=a_(o.children,t||o.type==="link"||o.type==="actionbutton"||o.type==="actionlink");n.push({...o,children:s})}else o.type==="autolink"&&t?r.push(o.text):(r.length>0&&(n.push(r.join("")),r=[]),n.push(o))}return r.length>0&&(n.push(r.join("")),r=[]),n}function Qv(){let e,t=0;return n=>{const r=(o=Date.now())=>{if(window.clearTimeout(e),e=void 0,t=o,n.isDestroyed)return;const s=function(a){a=a.removeMark(0,a.doc.content.size,Kt.marks.bold),a=a.removeMark(0,a.doc.content.size,Kt.marks.italic),a=a.removeMark(0,a.doc.content.size,Kt.marks.strikethrough),a.doc.firstChild;const l=function(c){const u=[];let h,d="";return c.descendants((p,f)=>(p.isText?(d+=p.text,h!=null||(h=f)):d&&h!==void 0&&(u.push({text:d,pos:h}),d="",h=void 0),p.type!==Kt.nodes.mention)),d&&h!==void 0&&u.push({text:d,pos:h}),u}(a.doc);for(const{text:c,pos:u}of l){const h=i_(c,{only:["Wikitext"]});[a]=l_(a,u,h)}return a}(n.state.tr);n.dispatch(s)},i=Date.now();i-t<300?e||(e=window.setTimeout(r,300)):r(i)}}function l_(e,t,n,r=0,i=[]){for(const o of n)if(typeof o=="string"){for(const s of i)e.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=Kt.marks[o.type],a=[...i,s];[e,r]=l_(e,t,o.children,r,a),r+=1}else mt.unreachable();return[e,r]}function ip(e){return(t,n)=>{if(!n)return!0;let r=t.tr;const i=_t.between(t.selection.$from,t.selection.$to);return r=r.replaceRangeWith(i.from,i.from,Kt.text(e,r.storedMarks)),r=r.replaceRangeWith(i.to+1,i.to+1,Kt.text(e,r.storedMarks)),r=r.setSelection(_t.near(r.doc.resolve(i.to+1))),n(r),!0}}function t0(e,t,n){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(h=>h.kind==="file"&&a[h.type]);if(l.length===0||o.types.includes("text/rtf"))return;const c=l[0];let u=c.getAsFile();if(!u.name){const h="image."+a[c.type];u=new File([u],h,{type:c.type,lastModified:Date.now()})}return u}(r);return i?n(i):function(o,s){const a=o.state.tr.insertText(s).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");o.dispatch(a)}(e,r.getData("text/plain")),!0}function op(e){const{matcher:t,suggestionClass:n="ProseMirror-suggestion",onEnter:r=()=>!1,onChange:i=()=>!1,onExit:o=()=>!1,onKeyDown:s=()=>!1,debug:a=!1}=e;return new da({key:new ha("suggestions"),view(){return{update:(l,c)=>{const u=this.key.getState(c),h=this.key.getState(l.state);if(!u||!h)return;const d=u.active&&h.active&&u.range.from!==h.range.from,p=!u.active&&h.active,f=u.active&&!h.active,m=!p&&!f&&u.text!==h.text;(f||d)&&o({view:l,range:u.range,text:u.text}),m&&!d&&i({view:l,range:h.range,text:h.text}),(p||d)&&r({view:l,range:h.range,text:h.text})}}},state:{init:()=>({active:!1,range:{from:0,to:0},text:null}),apply(l,c){const{selection:u}=l,h={...c};if(u.from===u.to){(u.from<c.range.from||u.from>c.range.to)&&(h.active=!1);const d=u.$from,p=t(d);p?(h.active=!0,h.range=p.range,h.text=p.text):h.active=!1}else h.active=!1;return h.active||(h.range={from:0,to:0},h.text=null),h}},props:{handleKeyDown(l,c){var h;const u=this.getState(l.state);return!!(u!=null&&u.active)&&((h=s({view:l,event:c}))!=null?h:!1)},decorations(l){const c=this.getState(l);return c!=null&&c.active?$t.create(l.doc,[Fe.inline(c.range.from,c.range.to,{nodeName:"span",class:n,style:a?"background: rgba(0, 0, 255, 0.05); color: blue; border: 2px solid blue;":void 0})]):null}}})}const sp=(e,t)=>n=>{var l;const r=(l=n.nodeBefore)==null?void 0:l.text;if(!r)return;const i=r.match(e);if(!i)return;const o=i[2],s=n.pos-o.length,a=n.pos;if(!n.doc.rangeHasMark(s,a,t.marks.literal))return{range:{from:s,to:a},text:o}},e0=/(^|\s)(:[^:\s]+:?)$/,n0=/(^|\s)(@[^@]*)$/;function u_({placeholder:e,disabled:t,className:n="",characterLimit:r,spellcheck:i}){const o=xo(),s=Q(),a=Q(null);return Z(()=>(s.current=function(l,c,u,h,d){const p=ii.create({schema:Kt,plugins:[...d.filter(r0),qD(),zh({...Zo,"Mod-z":LE,"Mod-y":eu,"Mod-Shift-z":eu,"Mod-b":ip("*"),"Mod-i":ip("_"),"Mod-Enter":Zo.Enter,"Shift-Enter":Zo.Enter,Enter:u}),zh({Enter:Zo.Enter}),Vh]}),f=Qv(),m=new NE(l,{handlePaste:(E,A,_)=>t0(E,A,h),clipboardTextSerializer(E){const A=[];return E.content.forEach(_=>{_&&A.push(HE(_.textContent))}),A.join()},state:p,dispatchTransaction(E){E=(E=E.removeStoredMark(Kt.marks.literal)).removeStoredMark(Kt.marks.emoji);const A=m.state.apply(E);m.state.doc.eq(A.doc)||c(new Us(A.doc)),m.updateState(A),E.steps.some(_=>_ instanceof oe)&&f(m)}});return m}(a.current,l=>o.onChange(l),()=>!!o.onEnter&&(o.onEnter(),!0),l=>o.onPasteImage(l),[o.emojiSuggesterPlugin(),o.mentionsPlugin()]),o.setEditorView(s.current),()=>{var l;o.setEditorView(void 0),(l=s.current)==null||l.destroy()}),[o]),Z(()=>{var l;(l=s.current)==null||l.setProps({editable:()=>!t})},[t]),Z(()=>We(()=>{var l,c,u;return(u=s.current)==null?void 0:u.setProps({attributes:{spellcheck:String((c=(l=o.spellcheck$.get())!=null?l:i)!=null?c:!1),class:"t-text-input","aria-label":"Message Field",role:"textbox"}})}),[o,i]),Z(()=>We(()=>{var c;const l=s.current;l==null||l.dispatch(l.state.tr.setMeta(Vh,(c=o.placeholder$.get())!=null?c:e))}),[o,e]),Z(()=>{r&&Number.isInteger(r)&&o.setMaxLength(r)},[r,o]),L("div",{className:`t-editor ${n}`,ref:a})}function ap(e){if(e.startsWith(":"))throw new Error("Not implemented");{const t=Kt.marks.emoji.create({emoji:e});return Kt.text(e,[t])}}function lp(e,t){const n=encodeURIComponent(e);return Kt.nodes.mention.create({id:e,name:t},Kt.text(`<!!mention:${n}|${t}>`))}const Qs=class Qs{constructor(t){this.doc=t,this.size=this.doc.content.size,this.hasContent=bE(this.doc)}hasNonWhitespaceContent(){return this.hasContent&&function(t){let n=!1;return t.descendants(r=>!(r.isText&&r.text&&/\S/.test(r.text))||(n=!0,!1)),n}(this.doc)}asText(){return this.doc.textContent.replace(/\xa0/g," ")}};Qs.EMPTY=new Qs(Kt.topNodeType.create());let Us=Qs;function r0(e){return e!=null}class c_{constructor(t,n,r){this.state$=t,this.device$=n,this.userPermissions$=r,this.currentDoc=Us.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$=Ft(),this.placeholder$=Ft()}setEditorView(t){this.editorView=t}emojiSuggesterPlugin(){if(this.device$.peek().supportsEmojiPicker)return op({debug:!1,matcher:sp(e0,Kt),onEnter:t=>this.suggestEmoji(t.text,t.range),onChange:t=>this.suggestEmoji(t.text,t.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:t})=>{var n,r,i;return(i=(r=(n=this._suggesterKeydownHandlers).emoji)==null?void 0:r.call(n,t.key))!=null?i:!1}})}mentionsPlugin(){const t=this.userPermissions$.peek();if(mt.defined(t),t.canMention)return op({debug:!1,matcher:sp(n0,Kt),onEnter:n=>this.suggestMention(n.text,n.range),onChange:n=>this.suggestMention(n.text,n.range),onExit:()=>this.onExitSuggester(),onKeyDown:({event:n})=>{var r,i,o;return(o=(i=(r=this._suggesterKeydownHandlers).mention)==null?void 0:i.call(r,n.key))!=null?o:!1}})}closeSuggester(){mt.defined(this._suggestionRange),function(t,n){const{from:r,to:i}=n,o=t.state.tr.addMark(r,i,Kt.marks.literal.create());t.dispatch(o)}(this.editorView,this._suggestionRange)}listenKeydown(t,n){this._suggesterKeydownHandlers[t]=n}onExitSuggester(){this._suggestionRange=void 0,this.state$.suggestEmojiQuery.set(void 0),this.state$.suggestMentionQuery.set(void 0)}suggestEmoji(t,n){t.length<2||(this._suggestionRange=n,this.state$.suggestEmojiQuery.set(t))}suggestMention(t,n){t.length<1||(this._suggestionRange=n,this.state$.suggestMentionQuery.set(t))}onPasteImage(t){mt.defined(this.uploadFile),this.uploadFile(t)}onChange(t){var r;this.currentDoc=t;const n=t.size>this.maxLength&&t.asText().length>this.maxLength;t.hasContent&&this.markAsTyping(),this.state$.assign({isTyping:t.hasContent,atTextLimit:n,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 n,r;t?(n=this.editorView)==null||n.dom.focus():(r=this.editorView)==null||r.focus()}setText(t){this.editorView&&function(n,r){const i=n.state.doc.content.size,o=r.split(/(<!!(?:mention|customemoji):.*?>)/g).filter(a=>a||a.length).map(a=>{const[l,c,u]=a.match(/<!!mention:(.*)\|(.*)>/)||[null];if(l&&c&&u)return lp(c,u);const[h,d]=a.match(/<!!customemoji:(.*?)>/)||[null];return h&&d?ap(d):Kt.text(a)}),s=n.state.tr.replaceWith(0,i,o);n.dispatch(s)}(this.editorView,t)}typeText(t){this.editorView&&function(n,r,i="replace"){const o=n.state.doc.content.size,s=i=="insert"?n.state.tr.insertText(r):n.state.tr.insertText(r,0,o);n.dispatch(s)}(this.editorView,t,"insert")}getText(){return this.currentDoc.asText().trim()}clearText(){this.editorView&&function(t){const n=t.state.doc.content.size,r=t.state.tr.insertText("",0,n);t.dispatch(r)}(this.editorView)}selectEmoji(t){mt.defined(this.editorView),function(n,r,i){const o=ap(r);if(i){const{from:a,to:l}=i,c=n.state.tr.deleteRange(a,l);n.dispatch(c)}const s=n.state.tr.replaceSelectionWith(o,!1);n.dispatch(s)}(this.editorView,t,this._suggestionRange),this.focus()}selectMention(t){mt.defined(this.editorView),function(n,r,i){const o=lp(r.id,r.name);let s=n.state.tr;if(i){const{from:a,to:l}=i;s=s.replaceRangeWith(a,l,o)}else s=s.replaceSelectionWith(o,!1);s=s.insertText(" "),n.dispatch(s)}(this.editorView,t,this._suggestionRange),this.focus()}}const i0=Symbol("no_render");function Ne(e){const t=Ue(!1),n=Q({_value:typeof e=="function"?e():e.peek(),get value(){return setTimeout(()=>{t.set(!0)}),n.current._value},set value(r){n.current._value=r}});return dt(()=>{if(!t.get())return i0;const r=typeof e=="function"?e():e.get();return n.current.value=r,r}),n.current}function on(){const e=wi(),t=At(),n=Cm(),r=he(),i=Ne(t.app$.appMetadata),o=Ne(t.currentUser$),s=Ne(t.state$.currentConversation),a=Ne(t.state$.currentConversationId),l=Ne(t.t$),c=Ne(t.device$),u=Ne(t.themeCustom$),h=Ne(()=>{var f;const p=t.state$.currentConversationId.get();return(f=p&&t.state$.typing.child(p).get())!=null?f:{many:!1,users:[]}}),d=Ne(()=>{const p=t.state$.currentConversationId.get();return p&&t.state$.participants.child(p).get()});return at(()=>({session:e,store:t,chatbox:n,theme:r,get app(){return i.value},get currentUser(){return o.value},get conversation(){return s.value},get conversationId(){return a.value},get t(){return l.value},get device(){return c.value},get themeCustom(){return u.value.value},get typing(){return h.value},get participants(){return d.value}}),[i,n,s,a,o,c,t,l,r,u,h,d,e])}function d_(){const e=wi(),t=At(),n=he(),r=Cm(),i=Ne(t.app$.appMetadata),o=Ne(t.currentUser$),s=Ne(t.t$),a=Ne(t.device$),l=Ne(t.themeCustom$);return at(()=>({session:e,store:t,theme:n,conversationList:r,get app(){return i.value},get currentUser(){return o.value},get t(){return s.value},get device(){return a.value},get themeCustom(){return l.value.value}}),[i,r,o,a,e,t,s,n,l])}const o0=(()=>{if(typeof window!="undefined"){let e;try{e=window.localStorage;const t="__storage_test__";return e.setItem(t,t),e.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")&&e&&e.length!==0}}return!1})(),_e={};o0?(_e.setItem=window.localStorage.setItem.bind(window.localStorage),_e.getItem=window.localStorage.getItem.bind(window.localStorage),_e.removeItem=window.localStorage.removeItem.bind(window.localStorage),_e.isSupported=!0):(_e.setItem=function(){},_e.getItem=function(){return null},_e.removeItem=function(){},_e.isSupported=!1),_e.set=(e,t)=>_e.setItem(e,JSON.stringify(t)),_e.get=e=>JSON.parse(_e.getItem(e)||"null");const au="talkjs_drafts",s0=function(e,t){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>t(...r),e)}}(200,(e,t,n,r)=>{const i=h_(e,t,n),o=JSON.parse(_e.getItem(au)||"{}"),s=r();s.match(/^\s*$/)?delete o[i]:o[i]=s,_e.setItem(au,JSON.stringify(o))}),h_=(e,t,n)=>`draft_${e}_${t}_${n}`;function Ae(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(c){try{l(r.next(c))}catch(u){o(u)}}function a(c){try{l(r.throw(c))}catch(u){o(u)}}function l(c){var u;c.done?i(c.value):(u=c.value,u instanceof n?u:new n(function(h){h(u)})).then(s,a)}l((r=r.apply(e,t||[])).next())})}let jo=class{constructor(){this.listeners={}}on(e,t,n){if(this.listeners[e]||(this.listeners[e]=new Set),n==null?void 0:n.once){const r=(...i)=>{this.un(e,r),t(...i)};return this.listeners[e].add(r),()=>this.un(e,r)}return this.listeners[e].add(t),()=>this.un(e,t)}un(e,t){var n;(n=this.listeners[e])===null||n===void 0||n.delete(t)}once(e,t){return this.on(e,t,{once:!0})}unAll(){this.listeners={}}emit(e,...t){this.listeners[e]&&this.listeners[e].forEach(n=>n(...t))}};const es={decode:function(e,t){return Ae(this,void 0,void 0,function*(){const n=new AudioContext({sampleRate:t});try{return yield n.decodeAudioData(e)}finally{n.close()}})},createBuffer:function(e,t){if(!e||e.length===0)throw new Error("channelData must be a non-empty array");if(t<=0)throw new Error("duration must be greater than 0");if(typeof e[0]=="number"&&(e=[e]),!e[0]||e[0].length===0)throw new Error("channelData must contain non-empty channel arrays");(function(r){const i=r[0];if(i.some(o=>o>1||o<-1)){const o=i.length;let s=0;for(let a=0;a<o;a++){const l=Math.abs(i[a]);l>s&&(s=l)}for(const a of r)for(let l=0;l<o;l++)a[l]/=s}})(e);const n=e.map(r=>r instanceof Float32Array?r:Float32Array.from(r));return{duration:t,length:n[0].length,sampleRate:n[0].length/t,numberOfChannels:n.length,getChannelData:r=>{const i=n[r];if(!i)throw new Error(`Channel ${r} not found`);return i},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function p_(e,t){const n=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[r,i]of Object.entries(t))if(r==="children"&&i)for(const[o,s]of Object.entries(i))s instanceof Node?n.appendChild(s):typeof s=="string"?n.appendChild(document.createTextNode(s)):n.appendChild(p_(o,s));else r==="style"?Object.assign(n.style,i):r==="textContent"?n.textContent=i:n.setAttribute(r,i.toString());return n}function up(e,t,n){const r=p_(e,t||{});return n==null||n.appendChild(r),r}var a0=Object.freeze({__proto__:null,createElement:up,default:up});const l0={fetchBlob:function(e,t,n){return Ae(this,void 0,void 0,function*(){const r=yield fetch(e,n);if(r.status>=400)throw new Error(`Failed to fetch ${e}: ${r.status} (${r.statusText})`);return function(i,o){Ae(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 c=u=>{l+=(u==null?void 0:u.length)||0;const h=Math.round(l/a*100);o(h)};try{for(;;){const u=yield s.read();if(u.done)break;c(u.value)}}catch(u){console.warn("Progress tracking error:",u)}})}(r.clone(),t),r.blob()})}};function Ht(e){let t=e;const n=new Set;return{get value(){return t},set(r){Object.is(t,r)||(t=r,n.forEach(i=>i(t)))},update(r){this.set(r(t))},subscribe:r=>(n.add(r),()=>n.delete(r))}}function vr(e,t){const n=Ht(e());return t.forEach(r=>r.subscribe(()=>{const i=e();Object.is(n.value,i)||n.set(i)})),{get value(){return n.value},subscribe:r=>n.subscribe(r)}}function Xn(e,t){let n;const r=()=>{n&&(n(),n=void 0),n=e()},i=t.map(o=>o.subscribe(r));return r(),()=>{n&&(n(),n=void 0),i.forEach(o=>o())}}class u0 extends jo{get isPlayingSignal(){return this._isPlaying}get currentTimeSignal(){return this._currentTime}get durationSignal(){return this._duration}get volumeSignal(){return this._volume}get mutedSignal(){return this._muted}get playbackRateSignal(){return this._playbackRate}get seekingSignal(){return this._seeking}constructor(t){super(),this.isExternalMedia=!1,this.reactiveMediaEventCleanups=[],t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),this._isPlaying=Ht(!1),this._currentTime=Ht(0),this._duration=Ht(0),this._volume=Ht(this.media.volume),this._muted=Ht(this.media.muted),this._playbackRate=Ht(this.media.playbackRate||1),this._seeking=Ht(!1),this.setupReactiveMediaEvents(),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})}setupReactiveMediaEvents(){this.reactiveMediaEventCleanups.push(this.onMediaEvent("play",()=>{this._isPlaying.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("pause",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ended",()=>{this._isPlaying.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("timeupdate",()=>{this._currentTime.set(this.media.currentTime)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("durationchange",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("loadedmetadata",()=>{this._duration.set(this.media.duration||0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeking",()=>{this._seeking.set(!0)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("seeked",()=>{this._seeking.set(!1)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("volumechange",()=>{this._volume.set(this.media.volume),this._muted.set(this.media.muted)})),this.reactiveMediaEventCleanups.push(this.onMediaEvent("ratechange",()=>{this._playbackRate.set(this.media.playbackRate)}))}onMediaEvent(t,n,r){return this.media.addEventListener(t,n,r),()=>this.media.removeEventListener(t,n,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,n){const r=this.getSrc();if(t&&r===t)return;this.revokeSrc();const i=n instanceof Blob&&(this.canPlayType(n.type)||!t)?URL.createObjectURL(n):t;if(r&&this.media.removeAttribute("src"),i||t)try{this.media.src=i}catch(o){this.media.src=t}}destroy(){this.reactiveMediaEventCleanups.forEach(t=>t()),this.reactiveMediaEventCleanups=[],this.isExternalMedia||(this.media.pause(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(t){this.reactiveMediaEventCleanups.forEach(n=>n()),this.reactiveMediaEventCleanups=[],this.media=t,this.setupReactiveMediaEvents()}play(){return Ae(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(t){if(t instanceof DOMException&&t.name==="AbortError")return;throw t}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,n){n!=null&&(this.media.preservesPitch=n),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}function c0({maxTop:e,maxBottom:t,halfHeight:n,vScale:r,barMinHeight:i=0,barAlign:o}){let s=Math.round(e*n*r),a=s+Math.round(t*n*r)||1;return a<i&&(a=i,o||(s=a/2)),{topHeight:s,totalHeight:a}}function d0({barAlign:e,halfHeight:t,topHeight:n,totalHeight:r,canvasHeight:i}){return e==="top"?0:e==="bottom"?i-r:t-n}function cp(e,t,n){const r=t-e.left,i=n-e.top;return[r/e.width,i/e.height]}function f_(e){return!!(e.barWidth||e.barGap||e.barAlign)}function dp(e,t){if(!f_(t))return e;const n=t.barWidth||.5,r=n+(t.barGap||n/2);return r===0?e:Math.floor(e/r)*r}function hp({scrollLeft:e,totalWidth:t,numCanvases:n}){if(t===0)return[0];const r=e/t,i=Math.floor(r*n);return[i-1,i,i+1]}function pp(e){const t=e._cleanup;typeof t=="function"&&t()}class h0 extends jo{constructor(t,n){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.dragStream=null,this.scrollStream=null,this.subscriptions=[],this.options=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"),n&&o.appendChild(n),this.initEvents()}parentFromOptionsContainer(t){let n;if(typeof t=="string"?n=document.querySelector(t):t instanceof HTMLElement&&(n=t),!n)throw new Error("Container not found");return n}initEvents(){this.wrapper.addEventListener("click",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=cp(r,n.clientX,n.clientY);this.emit("click",i,o)}),this.wrapper.addEventListener("dblclick",n=>{const r=this.wrapper.getBoundingClientRect(),[i,o]=cp(r,n.clientX,n.clientY);this.emit("dblclick",i,o)}),this.options.dragToSeek!==!0&&typeof this.options.dragToSeek!="object"||this.initDrag(),this.scrollStream=function(n){const r=Ht({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth}),i=vr(()=>function(a){const{scrollLeft:l,scrollWidth:c,clientWidth:u}=a;if(c===0)return{startX:0,endX:1};const h=l/c,d=(l+u)/c;return{startX:Math.max(0,Math.min(1,h)),endX:Math.max(0,Math.min(1,d))}}(r.value),[r]),o=vr(()=>function(a){return{left:a.scrollLeft,right:a.scrollLeft+a.clientWidth}}(r.value),[r]),s=()=>{r.set({scrollLeft:n.scrollLeft,scrollWidth:n.scrollWidth,clientWidth:n.clientWidth})};return n.addEventListener("scroll",s,{passive:!0}),{scrollData:r,percentages:i,bounds:o,cleanup:()=>{n.removeEventListener("scroll",s),pp(r)}}}(this.scrollContainer);const t=Xn(()=>{const{startX:n,endX:r}=this.scrollStream.percentages.value,{left:i,right:o}=this.scrollStream.bounds.value;this.emit("scroll",n,r,i,o)},[this.scrollStream.percentages,this.scrollStream.bounds]);if(this.subscriptions.push(t),typeof ResizeObserver=="function"){const n=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{n().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(),this.emit("resize"))}initDrag(){if(this.dragStream)return;this.dragStream=function(n,r={}){const{threshold:i=3,mouseButton:o=0,touchDelay:s=100}=r,a=Ht(null),l=new Map,c=matchMedia("(pointer: coarse)").matches;let u=()=>{};const h=d=>{if(d.button!==o||(l.set(d.pointerId,d),l.size>1))return;let p=d.clientX,f=d.clientY,m=!1;const E=Date.now(),A=n.getBoundingClientRect(),{left:_,top:g}=A,D=O=>{if(O.defaultPrevented||l.size>1||c&&Date.now()-E<s)return;const v=O.clientX,y=O.clientY,b=v-p,P=y-f;(m||Math.abs(b)>i||Math.abs(P)>i)&&(O.preventDefault(),O.stopPropagation(),m||(a.set({type:"start",x:p-_,y:f-g}),m=!0),a.set({type:"move",x:v-_,y:y-g,deltaX:b,deltaY:P}),p=v,f=y)},S=O=>{if(l.delete(O.pointerId),m){const v=O.clientX,y=O.clientY;a.set({type:"end",x:v-_,y:y-g})}u()},I=O=>{l.delete(O.pointerId),O.relatedTarget&&O.relatedTarget!==document.documentElement||S(O)},T=O=>{m&&(O.stopPropagation(),O.preventDefault())},C=O=>{O.defaultPrevented||l.size>1||m&&O.preventDefault()};document.addEventListener("pointermove",D),document.addEventListener("pointerup",S),document.addEventListener("pointerout",I),document.addEventListener("pointercancel",I),document.addEventListener("touchmove",C,{passive:!1}),document.addEventListener("click",T,{capture:!0}),u=()=>{document.removeEventListener("pointermove",D),document.removeEventListener("pointerup",S),document.removeEventListener("pointerout",I),document.removeEventListener("pointercancel",I),document.removeEventListener("touchmove",C),setTimeout(()=>{document.removeEventListener("click",T,{capture:!0})},10)}};return n.addEventListener("pointerdown",h),{signal:a,cleanup:()=>{u(),n.removeEventListener("pointerdown",h),l.clear(),pp(a)}}}(this.wrapper);const t=Xn(()=>{const n=this.dragStream.signal.value;if(!n)return;const r=this.wrapper.getBoundingClientRect().width,i=(o=n.x/r)<0?0:o>1?1:o;var o;n.type==="start"?(this.isDragging=!0,this.emit("dragstart",i)):n.type==="move"?this.emit("drag",i):n.type==="end"&&(this.isDragging=!1,this.emit("dragend",i))},[this.dragStream.signal]);this.subscriptions.push(t)}initHtml(){const t=document.createElement("div"),n=t.attachShadow({mode:"open"}),r=this.options.cspNonce&&typeof this.options.cspNonce=="string"?this.options.cspNonce.replace(/"/g,""):"";return n.innerHTML=`
|
|
19
19
|
<style${r?` nonce="${r}"`:""}>
|
|
20
20
|
:host {
|
|
21
21
|
user-select: none;
|
|
@@ -88,21 +88,21 @@
|
|
|
88
88
|
<div class="cursor" part="cursor"></div>
|
|
89
89
|
</div>
|
|
90
90
|
</div>
|
|
91
|
-
`,[t,n]}setOptions(t){if(this.options.container!==t.container){const n=this.parentFromOptionsContainer(t.container);n.appendChild(this.container),this.parent=n}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:n}=this.scrollContainer,r=n*t;this.setScroll(r)}destroy(){var t;this.subscriptions.forEach(n=>n()),this.container.remove(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),(t=this.unsubscribeOnScroll)===null||t===void 0||t.forEach(n=>n()),this.unsubscribeOnScroll=[],this.dragStream&&(this.dragStream.cleanup(),this.dragStream=null),this.scrollStream&&(this.scrollStream.cleanup(),this.scrollStream=null)}createDelay(t=10){let n,r;const i=()=>{n&&(clearTimeout(n),n=void 0),r&&(r(),r=void 0)};return this.timeouts.push(i),()=>new Promise((o,s)=>{i(),r=s,n=setTimeout(()=>{n=void 0,r=void 0,o()},t)})}getHeight(t,n){var r;const i=((r=this.audioData)===null||r===void 0?void 0:r.numberOfChannels)||1;return function({optionsHeight:o,optionsSplitChannels:s,parentHeight:a,numberOfChannels:l,defaultHeight:c=128}){if(o==null)return c;const u=Number(o);if(!isNaN(u))return u;if(o==="auto"){const h=a||c;return s!=null&&s.every(d=>!d.overlay)?h/l:h}return c}({optionsHeight:t,optionsSplitChannels:n,parentHeight:this.parent.clientHeight,numberOfChannels:i,defaultHeight:128})}convertColorValues(t,n){return function(r,i,o){if(!Array.isArray(r))return r||"";if(r.length===0)return"#999";if(r.length<2)return r[0]||"";const s=document.createElement("canvas"),a=s.getContext("2d"),l=o!=null?o:s.height*i,c=a.createLinearGradient(0,0,0,l||i),u=1/(r.length-1);return r.forEach((h,d)=>{c.addColorStop(d*u,h)}),c}(t,this.getPixelRatio(),n==null?void 0:n.canvas.height)}getPixelRatio(){return t=window.devicePixelRatio,Math.max(1,t||1);var t}renderBarWaveform(t,n,r,i){const{width:o,height:s}=r.canvas,{halfHeight:a,barWidth:l,barRadius:c,barIndexScale:u,barSpacing:h,barMinHeight:d}=function({width:f,height:m,length:E,options:A,pixelRatio:_}){const g=m/2,v=A.barWidth?A.barWidth*_:1,S=A.barGap?A.barGap*_:A.barWidth?v/2:0,I=v+S||1;return{halfHeight:g,barWidth:v,barGap:S,barRadius:A.barRadius||0,barMinHeight:A.barMinHeight?A.barMinHeight*_:0,barIndexScale:E>0?f/I/E:0,barSpacing:I}}({width:o,height:s,length:(t[0]||[]).length,options:n,pixelRatio:this.getPixelRatio()}),p=function({channelData:f,barIndexScale:m,barSpacing:E,barWidth:A,halfHeight:_,vScale:g,canvasHeight:v,barAlign:S,barMinHeight:I}){const R=f[0]||[],y=f[1]||R,D=R.length,O=[];let C=0,b=0,L=0;for(let w=0;w<=D;w++){const F=Math.round(w*m);if(F>C){const{topHeight:K,totalHeight:X}=rv({maxTop:b,maxBottom:L,halfHeight:_,vScale:g,barMinHeight:I,barAlign:S}),G=iv({barAlign:S,halfHeight:_,topHeight:K,totalHeight:X,canvasHeight:v});O.push({x:C*E,y:G,width:A,height:X}),C=F,b=0,L=0}const H=Math.abs(R[w]||0),B=Math.abs(y[w]||0);H>b&&(b=H),B>L&&(L=B)}return O}({channelData:t,barIndexScale:u,barSpacing:h,barWidth:l,halfHeight:a,vScale:i,canvasHeight:s,barAlign:n.barAlign,barMinHeight:d});r.beginPath();for(const f of p)c&&"roundRect"in r?r.roundRect(f.x,f.y,f.width,f.height,c):r.rect(f.x,f.y,f.width,f.height);r.fill(),r.closePath()}renderLineWaveform(t,n,r,i){const{width:o,height:s}=r.canvas,a=function({channelData:l,width:c,height:u,vScale:h}){const d=u/2,p=l[0]||[];return[p,l[1]||p].map((f,m)=>{const E=f.length,A=E?c/E:0,_=d,g=m===0?-1:1,v=[{x:0,y:_}];let S=0,I=0;for(let R=0;R<=E;R++){const y=Math.round(R*A);if(y>S){const O=_+(Math.round(I*d*h)||1)*g;v.push({x:S,y:O}),S=y,I=0}const D=Math.abs(f[R]||0);D>I&&(I=D)}return v.push({x:S,y:_}),v})}({channelData:t,width:o,height:s,vScale:i});r.beginPath();for(const l of a)if(l.length){r.moveTo(l[0].x,l[0].y);for(let c=1;c<l.length;c++){const u=l[c];r.lineTo(u.x,u.y)}}r.fill(),r.closePath()}renderWaveform(t,n,r){if(r.fillStyle=this.convertColorValues(n.waveColor,r),n.renderFunction)return void n.renderFunction(t,r);const i=function({channelData:o,barHeight:s,normalize:a,maxPeak:l}){var c;const u=s||1;if(!a)return u;const h=o[0];if(!h||h.length===0)return u;let d=l!=null?l:0;if(!l)for(let p=0;p<h.length;p++){const f=(c=h[p])!==null&&c!==void 0?c:0,m=Math.abs(f);m>d&&(d=m)}return d?u/d:u}({channelData:t,barHeight:n.barHeight,normalize:n.normalize,maxPeak:n.maxPeak});u_(n)?this.renderBarWaveform(t,n,r,i):this.renderLineWaveform(t,n,r,i)}renderSingleCanvas(t,n,r,i,o,s,a){const l=this.getPixelRatio(),c=document.createElement("canvas");c.width=Math.round(r*l),c.height=Math.round(i*l),c.style.width=`${r}px`,c.style.height=`${i}px`,c.style.left=`${Math.round(o)}px`,s.appendChild(c);const u=c.getContext("2d");if(n.renderFunction?(u.fillStyle=this.convertColorValues(n.waveColor,u),n.renderFunction(t,u)):this.renderWaveform(t,n,u),c.width>0&&c.height>0){const h=c.cloneNode(),d=h.getContext("2d");d.drawImage(c,0,0),d.globalCompositeOperation="source-in",d.fillStyle=this.convertColorValues(n.progressColor,d),d.fillRect(0,0,c.width,c.height),a.appendChild(h)}}renderMultiCanvas(t,n,r,i,o,s){const a=this.getPixelRatio(),{clientWidth:l}=this.scrollContainer,c=r/a,u=function({clientWidth:f,totalWidth:m,options:E}){return sp(Math.min(8e3,f,m),E)}({clientWidth:l,totalWidth:c,options:n});let h={};if(u===0)return;const d=f=>{if(f<0||f>=p||h[f])return;h[f]=!0;const m=f*u;let E=Math.min(c-m,u);if(E=sp(E,n),E<=0)return;const A=function({channelData:_,offset:g,clampedWidth:v,totalWidth:S}){return _.map(I=>{const R=Math.floor(g/S*I.length),y=Math.floor((g+v)/S*I.length);return I.slice(R,y)})}({channelData:t,offset:m,clampedWidth:E,totalWidth:c});this.renderSingleCanvas(A,n,E,i,m,o,s)},p=Math.ceil(c/u);if(this.isScrollable){if(ap({scrollLeft:this.scrollContainer.scrollLeft,totalWidth:c,numCanvases:p}).forEach(f=>d(f)),p>1){const f=this.on("scroll",()=>{const{scrollLeft:m}=this.scrollContainer;Object.keys(h).length>10&&(o.innerHTML="",s.innerHTML="",h={}),ap({scrollLeft:m,totalWidth:c,numCanvases:p}).forEach(E=>d(E))});this.unsubscribeOnScroll.push(f)}}else for(let f=0;f<p;f++)d(f)}renderChannel(t,n,r,i){var{overlay:o}=n,s=function(u,h){var d={};for(var p in u)Object.prototype.hasOwnProperty.call(u,p)&&h.indexOf(p)<0&&(d[p]=u[p]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(p=Object.getOwnPropertySymbols(u);f<p.length;f++)h.indexOf(p[f])<0&&Object.prototype.propertyIsEnumerable.call(u,p[f])&&(d[p[f]]=u[p[f]])}return d}(n,["overlay"]);const a=document.createElement("div"),l=this.getHeight(s.height,s.splitChannels);a.style.height=`${l}px`,o&&i>0&&(a.style.marginTop=`-${l}px`),this.canvasWrapper.style.minHeight=`${l}px`,this.canvasWrapper.appendChild(a);const c=a.cloneNode();this.progressWrapper.appendChild(c),this.renderMultiCanvas(t,s,r,l,a,c)}render(t){return Ae(this,void 0,void 0,function*(){var n;this.timeouts.forEach(c=>c()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const r=this.getPixelRatio(),i=this.scrollContainer.clientWidth,{scrollWidth:o,isScrollable:s,useParentWidth:a,width:l}=function({duration:c,minPxPerSec:u=0,parentWidth:h,fillParent:d,pixelRatio:p}){const f=Math.ceil(c*u),m=f>h,E=!!(d&&!m);return{scrollWidth:f,isScrollable:m,useParentWidth:E,width:(E?h:f)*p}}({duration:t.duration,minPxPerSec:this.options.minPxPerSec||0,parentWidth:i,fillParent:this.options.fillParent,pixelRatio:r});if(this.isScrollable=s,this.wrapper.style.width=a?"100%":`${o}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=t,this.emit("render"),this.options.splitChannels)for(let c=0;c<t.numberOfChannels;c++){const u=Object.assign(Object.assign({},this.options),(n=this.options.splitChannels)===null||n===void 0?void 0:n[c]);this.renderChannel([t.getChannelData(c)],u,l,c)}else{const c=[t.getChannelData(0)];t.numberOfChannels>1&&c.push(t.getChannelData(1)),this.renderChannel(c,this.options,l,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(r=>r()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:t}=this.scrollContainer,{right:n}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&t!==this.scrollContainer.scrollWidth){const{right:r}=this.progressWrapper.getBoundingClientRect(),i=function(o){const s=2*o;return(s<0?Math.floor(s):Math.ceil(s))/2}(r-n);this.scrollContainer.scrollLeft+=i}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,n=!1){const{scrollLeft:r,scrollWidth:i,clientWidth:o}=this.scrollContainer,s=t*i,a=r,l=r+o,c=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?c:0));const u=s-r-c;n&&this.options.autoCenter&&u>0&&(this.scrollContainer.scrollLeft+=u)}}renderProgress(t,n){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=this.options.cursorWidth?`translateX(-${t*this.options.cursorWidth}px)`:"",this.isScrollable&&this.options.autoScroll&&this.audioData&&this.audioData.duration>0&&this.scrollIntoView(t,n)}exportImage(t,n,r){return Ae(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,n));return Promise.resolve(o)}return Promise.all(Array.from(i).map(o=>new Promise((s,a)=>{o.toBlob(l=>{l?s(l):a(new Error("Could not export image"))},t,n)})))})}}class sv extends Uo{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const t=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(t))};t()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}class ll extends Uo{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 Ae(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(n=>{if(n.status>=400)throw new Error(`Failed to fetch ${t}: ${n.status} (${n.statusText})`);return n.arrayBuffer()}).then(n=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(n)).then(n=>{this.currentSrc===t&&(this.buffer=n,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}).catch(n=>{console.error("WebAudioPlayer load error:",n)})}_play(){if(!this.paused)return;this.paused=!1,this.bufferNode&&(this.bufferNode.onended=null,this.bufferNode.disconnect()),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let t=this.playedDuration*this._playbackRate;(t>=this.duration||t<0)&&(t=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,t),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var t;this.paused=!0,(t=this.bufferNode)===null||t===void 0||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return Ae(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){const n=t-this.currentTime,r=this.bufferNode;r==null||r.stop(this.audioContext.currentTime+n),r==null||r.addEventListener("ended",()=>{r===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(t){return Ae(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 n=!this.paused;n&&this._pause(),this.playedDuration=t/this._playbackRate,n&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,n;return(t=this._duration)!==null&&t!==void 0?t:((n=this.buffer)===null||n===void 0?void 0:n.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 n=this.buffer.numberOfChannels;for(let r=0;r<n;r++)t.push(this.buffer.getChannelData(r));return t}removeAttribute(t){switch(t){case"src":this.src="";break;case"playbackRate":this.playbackRate=0;break;case"currentTime":this.currentTime=0;break;case"duration":this.duration=0;break;case"volume":this.volume=0;break;case"muted":this.muted=!1}}}const av={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class Oo extends nv{static create(t){return new Oo(t)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(t){const n=t.media||(t.backend==="WebAudio"?new ll:void 0);super({media:n,mediaControls:t.mediaControls,autoplay:t.autoplay,playbackRate:t.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.reactiveCleanups=[],this.options=Object.assign({},av,t);const{state:r,actions:i}=function(a){var l,c,u,h,d,p;const f=(l=a==null?void 0:a.currentTime)!==null&&l!==void 0?l:Ht(0),m=(c=a==null?void 0:a.duration)!==null&&c!==void 0?c:Ht(0),E=(u=a==null?void 0:a.isPlaying)!==null&&u!==void 0?u:Ht(!1),A=(h=a==null?void 0:a.isSeeking)!==null&&h!==void 0?h:Ht(!1),_=(d=a==null?void 0:a.volume)!==null&&d!==void 0?d:Ht(1),g=(p=a==null?void 0:a.playbackRate)!==null&&p!==void 0?p:Ht(1),v=Ht(null),S=Ht(null),I=Ht(""),R=Ht(0),y=Ht(0),D=Dr(()=>!E.value,[E]),O=Dr(()=>v.value!==null,[v]),C=Dr(()=>O.value&&m.value>0,[O,m]),b=Dr(()=>f.value,[f]),L=Dr(()=>m.value>0?f.value/m.value:0,[f,m]);return{state:{currentTime:f,duration:m,isPlaying:E,isPaused:D,isSeeking:A,volume:_,playbackRate:g,audioBuffer:v,peaks:S,url:I,zoom:R,scrollPosition:y,canPlay:O,isReady:C,progress:b,progressPercent:L},actions:{setCurrentTime:w=>{const F=Math.max(0,Math.min(m.value||1/0,w));f.set(F)},setDuration:w=>{m.set(Math.max(0,w))},setPlaying:w=>{E.set(w)},setSeeking:w=>{A.set(w)},setVolume:w=>{const F=Math.max(0,Math.min(1,w));_.set(F)},setPlaybackRate:w=>{const F=Math.max(.1,Math.min(16,w));g.set(F)},setAudioBuffer:w=>{v.set(w),w&&m.set(w.duration)},setPeaks:w=>{S.set(w)},setUrl:w=>{I.set(w)},setZoom:w=>{R.set(Math.max(0,w))},setScrollPosition:w=>{y.set(Math.max(0,w))}}}}({isPlaying:this.isPlayingSignal,currentTime:this.currentTimeSignal,duration:this.durationSignal,volume:this.volumeSignal,playbackRate:this.playbackRateSignal,isSeeking:this.seekingSignal});this.wavesurferState=r,this.wavesurferActions=i,this.timer=new sv;const o=n?void 0:this.getMediaElement();this.renderer=new ov(this.options,o),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initReactiveState(),this.initPlugins();const s=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:a,duration:l}=this.options;(s||a&&l)&&this.load(s,a,l).catch(c=>{this.emit("error",c instanceof Error?c:new Error(String(c)))})})}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),this.stopAtPosition!=null&&this.isPlaying()&&t>=this.stopAtPosition&&this.pause()}}))}initReactiveState(){this.reactiveCleanups.push(function(t,n){const r=[];r.push(Gn(()=>{const s=t.isPlaying.value;n.emit(s?"play":"pause")},[t.isPlaying])),r.push(Gn(()=>{const s=t.currentTime.value;n.emit("timeupdate",s),t.isPlaying.value&&n.emit("audioprocess",s)},[t.currentTime,t.isPlaying])),r.push(Gn(()=>{t.isSeeking.value&&n.emit("seeking",t.currentTime.value)},[t.isSeeking,t.currentTime]));let i=!1;r.push(Gn(()=>{t.isReady.value&&!i&&(i=!0,n.emit("ready",t.duration.value))},[t.isReady,t.duration]));let o=!1;return r.push(Gn(()=>{const s=t.isPlaying.value,a=t.currentTime.value,l=t.duration.value,c=l>0&&a>=l;o&&!s&&c&&n.emit("finish"),o=s&&c},[t.isPlaying,t.currentTime,t.duration])),r.push(Gn(()=>{const s=t.zoom.value;s>0&&n.emit("zoom",s)},[t.zoom])),()=>{r.forEach(s=>s())}}(this.wavesurferState,{emit:this.emit.bind(this)}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const t=this.updateProgress();this.emit("timeupdate",t)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("emptied",()=>{this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("ended",()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",()=>{var t;this.emit("error",(t=this.getMediaElement().error)!==null&&t!==void 0?t:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(t,n)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,n))}),this.renderer.on("dblclick",(t,n)=>{this.emit("dblclick",t,n)}),this.renderer.on("scroll",(t,n,r,i)=>{const o=this.getDuration();this.emit("scroll",t*o,n*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)}),this.renderer.on("resize",()=>{this.emit("resize")}));{let t;const n=this.renderer.on("drag",r=>{var i;if(!this.options.interact)return;this.renderer.renderProgress(r),clearTimeout(t);let o=0;const s=this.options.dragToSeek;this.isPlaying()?o=0:s===!0?o=200:s&&typeof s=="object"&&(o=(i=s.debounceTime)!==null&&i!==void 0?i:200),t=setTimeout(()=>{this.seekTo(r)},o),this.emit("interaction",r*this.getDuration()),this.emit("drag",r)});this.subscriptions.push(()=>{clearTimeout(t),n()})}}initPlugins(){var t;!((t=this.options.plugins)===null||t===void 0)&&t.length&&this.options.plugins.forEach(n=>{this.registerPlugin(n)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(t=>t()),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),t.duration&&!t.peaks&&(this.decodedData=Qo.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=Qo.createBuffer(t.peaks,t.duration)),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),t.mediaControls!=null&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){if(this.plugins.includes(t))return t;t._init(this),this.plugins.push(t);const n=t.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==t),this.subscriptions=this.subscriptions.filter(r=>r!==n)});return this.subscriptions.push(n),t}unregisterPlugin(t){this.plugins=this.plugins.filter(n=>n!==t),t.destroy()}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const n=t/this.getDuration();this.renderer.setScrollPercentage(n)}getActivePlugins(){return this.plugins}loadAudio(t,n,r,i){return Ae(this,void 0,void 0,function*(){var o;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,(o=this.abortController)===null||o===void 0||o.abort(),this.abortController=null,!n&&!r){const a=this.options.fetchParams||{};window.AbortController&&!a.signal&&(this.abortController=new AbortController,a.signal=this.abortController.signal);const l=u=>this.emit("loading",u);n=yield ev.fetchBlob(t,l,a);const c=this.options.blobMimeType;c&&(n=new Blob([n],{type:c}))}this.setSrc(t,n);const s=yield new Promise(a=>{const l=i||this.getDuration();l?a(l):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>a(this.getDuration()),{once:!0}))});if(!t&&!n){const a=this.getMediaElement();a instanceof ll&&(a.duration=s)}if(r)this.decodedData=Qo.createBuffer(r,s||0);else if(n){const a=yield n.arrayBuffer();this.decodedData=yield Qo.decode(a,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(t,n,r){return Ae(this,void 0,void 0,function*(){try{return yield this.loadAudio(t,void 0,n,r)}catch(i){throw this.emit("error",i),i}})}loadBlob(t,n,r){return Ae(this,void 0,void 0,function*(){try{return yield this.loadAudio("",t,n,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:n=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=[],c=a.length/n;for(let u=0;u<n;u++){const h=a.slice(Math.floor(u*c),Math.ceil((u+1)*c));let d=0;for(let p=0;p<h.length;p++){const f=h[p];Math.abs(f)>Math.abs(d)&&(d=f)}l.push(Math.round(d*r)/r)}o.push(l)}return o}getDuration(){let 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){this.stopAtPosition=null,super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const n=this.getDuration()*t;this.setTime(n)}play(t,n){const r=Object.create(null,{play:{get:()=>super.play}});return Ae(this,void 0,void 0,function*(){t!=null&&this.setTime(t);const i=yield r.play.call(this);return n!=null&&(this.media instanceof ll?this.media.stopAt(n):this.stopAtPosition=n),i})}playPause(){return Ae(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 Ae(this,arguments,void 0,function*(t="image/png",n=1,r="dataURL"){return this.renderer.exportImage(t,n,r)})}destroy(){var t;this.emit("destroy"),(t=this.abortController)===null||t===void 0||t.abort(),this.plugins.forEach(n=>n.destroy()),this.subscriptions.forEach(n=>n()),this.unsubscribePlayerEvents(),this.reactiveCleanups.forEach(n=>n()),this.reactiveCleanups=[],this.timer.destroy(),this.renderer.destroy(),super.destroy()}}Oo.BasePlugin=class extends Uo{constructor(e){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=e}onInit(){}_init(e){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}},Oo.dom=tv;var c_=function(e,t,n,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,n[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=e.apply(a,c_(e,a,n,["",null])),r.push(i),a[0]?t[0]|=2:(t[o-2]=0,t[o]=i)):r.push(a)}return r},up=new Map;function lv(e){var t=up.get(this);return t||(t=new Map,up.set(this,t)),(t=c_(this,t.get(e)||(t.set(e,t=function(n){for(var r,i,o=1,s="",a="",l=[0],c=function(d){o===1&&(d||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,d,s):o===3&&(d||s)?(l.push(3,d,s),o=2):o===2&&s==="..."&&d?l.push(4,d,0):o===2&&s&&!d?l.push(5,0,!0,s):o>=5&&((s||!d&&o===5)&&(l.push(o,0,s,i),o=6),d&&(l.push(o,d,0,i),o=6)),s=""},u=0;u<n.length;u++){u&&(o===1&&c(),c(u));for(var h=0;h<n[u].length;h++)r=n[u][h],o===1?r==="<"?(c(),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===">"?(c(),o=1):o&&(r==="="?(o=5,i=s,s=""):r==="/"&&(o<5||n[u][h+1]===">")?(c(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
|
|
92
|
-
`||r==="\r"?(c(),o=2):s+=r),o===3&&s==="!--"&&(o=4,l=l[0])}return c(),l}(e)),t),arguments,[])).length>1?t:t[0]}const uv={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAs_WXNLlj31EHJI_Lw8siO2B3ZJLUzBH0"},cv=function(e){return uv[e]}("TALK_GMK");function d_(e,t=10){const n=sr(qu),[r,i]=ct([]);return Z(()=>{const o=n.conversation(e).subscribeParticipants(s=>i(s!=null?s:[]));return t>10&&o.connected.then(async()=>{for(;o.state.type==="active"&&!o.state.loadedAll&&o.state.latestSnapshot!==null&&o.state.latestSnapshot.length<t;){const s=Math.min(t-o.state.latestSnapshot.length,50);await o.loadMore(s)}}),()=>{o.unsubscribe()}},[e,n,t]),r}const h_=/^\/.*[^\\]\/[im]*$/;function cp(e){return h_.test(e)?!Bs(e).test(""):!1}function Bs(e){const t=e.match(/^\/(.*[^\\])\/(.*)$/);if(!t)throw new Error(`Expected ${e} to be a (non-empty) regex`);let n=t[2]||"";return n=n.replace(/[^im]/g,"")+"g",new RegExp(t[1],n)}function p_(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+t+"$","i")}function dv(e,t){const n=ME(t),r=p_(e);return n!==void 0&&r.test(n)}const hv=/^[]/g;function f_(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function ou(e,t){!e()&&!t&&(t=e.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/,"`$1`")+" was not true")}(e=>{function t(r){}function n(r,i){(function(o,s){switch(s){case"undefined":return o===void 0;case String:return typeof o=="string"||o instanceof String;case Boolean:return typeof o=="boolean"||o instanceof Boolean;case Number:return typeof o=="number"||o instanceof Number;default:return o instanceof s}})(r,i)||(i.name,String(r))}e.defined=t,e.has=function(r,i){r[i]},e.is=n,e.equals=function(r,i){},e.oneOf=function(r,i){i.includes(r)||JSON.stringify(i)},e.isArray=function(r,i){n(r,Array),r&&r.length>0&&n(r[0],i)},e.optional=function(r,i){r!==void 0&&n(r,i)},e.falsy=function(r){},e.never=function(r){}})(ou||(ou={}));const ui=ou,pv=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"),fv=/\uFE0F/g,mv="";function Ev(e){if(e===":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("-")}((n=e).indexOf(mv)<0?n.replace(fv,""):n);var n;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${t}.svg`}class m_{constructor({mode:t,allowedHostnames:n,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:c,replacement:u}){if(ui.oneOf(t,["all","otherOnly","off"]),this.mode=t,this.suppressLinks=a!==!1,this.suppressEmailAddresses=l!==!1,this.suppressPhoneNumbers=c!==!1,this.allowedHostnames=n||[],this.allowedPhoneNrs=(r||[]).filter(h=>h).map(h=>h.replace(/[^0-9]/g,"")),this.allowedMatches=(i||[]).filter(cp).map(h=>Bs(h)),this.forbiddenMatches=(o||[]).filter(cp).map(h=>Bs(h)),s){const h=s.split(`
|
|
93
|
-
`).map(d=>d.trim().toLowerCase()).filter(d=>d.length>0&&!d.startsWith("#")).map(d=>f_(d));h.length&&this.forbiddenMatches.push(new RegExp(`\\b(${h.join("|")})\\b`,"gi"))}ui(()=>this.allowedMatches.every(h=>h.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),ui(()=>this.forbiddenMatches.every(h=>h.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 gc(e){var n,r,i,o,s,a,l,c,u,h,d,p,f;let t="";return e.t&&(t=`(${e.t("CONTACT_INFORMATION_HIDDEN")})`),{formattedLinks:(n=e.formattedLinks)!=null?n:"plaintext",markup:(r=e.markup)!=null?r:!1,useFallbackMentions:(i=e.useFallbackMentions)!=null?i:!1,sameTabLinkRules:(o=e.sameTabLinkRules)!=null?o:[],enableEmojiImageFallback:(s=e.enableEmojiImageFallback)!=null?s:!1,highlight:(a=e.highlight)!=null?a:[],contactInfo:(l=e.contactInfo)!=null?l:!1,suppression:(c=e.suppression)!=null?c:new m_({mode:"off"}),contactInfoHiddenText:(d=(h=e.contactInfoHiddenText)!=null?h:(u=e.suppression)==null?void 0:u.replacement)!=null?d:t,customEmojiUrls:(p=e.customEmojiUrls)!=null?p:{},enableActions:(f=e.enableActions)!=null?f:!0}}function _v({id:e,text:t}){var i;const n=gt(),r=dt(()=>{var a;if(n.type==="ConversationListStore")return;const o=n.state$.extCurrentConversationId.get(),s=o&&n.state$.participants.child(o).get();return(a=s==null?void 0:s.find(l=>l.user.id===e))==null?void 0:a.user});return P("span",{className:"t-mention","t-is-current-user":dt(n.extUserId$)===e?"":void 0,children:`@${(i=r==null?void 0:r.name)!=null?i:t}`})}function Av({message:e,type:t,action:n,params:r,children:i}){const o=ki(),s=st(l=>{l.preventDefault(),o.triggerMessageAction(e,n,r)},[o,e,n,r]),a={"t-action":n,onClick:s};return t==="actionButton"?P("button",{...a,type:"button",children:i}):P("a",{...a,href:"#",children:i})}function xr(e,t){const n=e.flatMap(r=>{if(typeof r=="string")return ul(r,t.highlight);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return gv(r,t);case"bulletlist":case"bulletList":return[Tt("ul",null,...xr(r.children,t))];case"autolink":case"autoLink":case"link":return Ov(r,t);case"codeblock":case"codeBlock":return[P("code",{"data-language":r.language,children:ul(r.text,t.highlight)})];case"codespan":case"codeSpan":return P("code",{children:ul((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),t.highlight)});case"mention":return ui.falsy(t.useFallbackMentions),P(_v,{id:r.id,text:r.text},r.id);case"suppressed":return[P("i",{children:t.contactInfoHiddenText})];case"emoji":return t.enableEmojiImageFallback?[P(Dv,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return vv(r,t);case"customemoji":case"customEmoji":return r.text;default:ui.never(r)}var i});return n.every(r=>typeof r=="string")?[n.join("")]:n}function ul(e,t){if(t.length===0)return[e];const n=function(i){const o=i.map(a=>a.trim()).filter(a=>a);if(o.length===0)return hv;const s=o.map(f_).join("|");return new RegExp(s,"gi")}(t),r=ha(e,n).map(i=>({offset:i.index,matchedText:i[0]}));return tu(e,r,({matchedText:i})=>[P("span",{className:"highlighted-text",children:i})])}const gv=(e,t)=>[Tt({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[e.type],null,...xr(e.children,t))];function Dv({unicode:e}){const[t,n]=ct(()=>e!==":arslan:");return Z(()=>{t&&!Im(e)&&n(!1)},[]),t?P("span",{className:"t-emoji",children:e}):P("img",{className:"t-emoji",src:Ev(e),alt:e})}const Ov=(e,t)=>{const n="children"in e?e.children:[e.text];switch(t.formattedLinks){case"link":return[Tt("a",{target:function(r,i){for(const o of r)if(h_.test(o)){if(Bs(o).test(i))return"_top"}else if(dv(o,i))return"_top";return"_blank"}(t.sameTabLinkRules,e.url),href:e.url,rel:"noreferrer"},...xr(n,t))];case"plaintext":return"children"in e&&e.children.every(r=>typeof r=="string")?[e.children.join("")]:[Tt(Qt,null,...xr(n,t))];default:ui.never(t.formattedLinks)}},vv=(e,t)=>t.enableActions?[Tt(Av,{type:e.type==="actionlink"?"actionLink":e.type==="actionbutton"?"actionButton":e.type,action:e.action,params:e.params,message:t.message},...xr(e.children,t))]:"children"in e&&e.children.every(n=>typeof n=="string")?[e.children.join("")]:[Tt(Qt,null,...xr(e.children,t))];function Sv(e,t){return hs(e,gc(t))}function hs(e,t){return e.flatMap(n=>{if(typeof n=="string"){let r=[n];return r=cl(r,i=>function(o,s){const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,c=cc(a,u=>ha(o,u)).filter(([u])=>!l.some(h=>u.match(h)!==null)).map(u=>({offset:u.index,matchedText:u[0]}));return tu(o,c,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])}(i,t)),r=cl(r,i=>function(o){return tu(o,function(s){const a=[];let l;for(;l=pv.exec(s);){const c=l[0],u=l.index;a.push({offset:u,matchedText:c})}return a}(o),s=>[{type:"emoji",text:s.matchedText}])}(i)),r=cl(r,i=>function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(QE),s.suppression.suppressPhoneNumbers&&a.push(ZE),a.length===0)return[o];const l=e_(o,{multilineSteps:[],singlelineSteps:a}),c=l.map(u=>typeof u=="string"?u:dp(u.url,s.suppression)?u.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return Ac(c)}(i,t)),r}switch(n.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return{type:n.type,children:hs(n.children,t)};case"codespan":case"codeSpan":case"codeblock":case"codeBlock":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return n;case"mention":return{type:"mention",id:n.id,text:n.text};case"autolink":case"autoLink":return function(r,i){return i.contactInfo==="link"?r:i.contactInfo==="suppress"?dp(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text}(n,t);case"link":return{type:"link",url:n.url,children:hs(n.children,t)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:n.type,action:n.action,params:n.params,children:hs(n.children,t)}}})}function cl(e,t){return cc(e,n=>typeof n=="string"?t(n):[n])}function dp(e,t){if(t.allowedMatches.some(n=>e.match(n)!==null))return!0;if(t.forbiddenMatches.some(n=>e.match(n)!==null))return!1;if(e.startsWith("mailto:")){const n=e.substring(7).replace(/^.*@/,"");return!t.suppressEmailAddresses||hp(t.allowedHostnames,n)}if(e.startsWith("tel:")){const n=e.substring(4).replace(/[^0-9]/g,"");return!t.suppressPhoneNumbers||t.allowedPhoneNrs.some(r=>n.endsWith(r))}{const n=ME(e);return!t.suppressLinks||!n||hp(t.allowedHostnames,n)}}function hp(e,t){for(const n of e)if(p_(n).test(t))return!0;return!1}function Dc({block:e,nonInteractive:t,message:n,className:r=""}){const i=!t,{nodes:o,roleOptions:s}=function(l,c){var _;const u=gt(),h=dt(u.app$.role);mt.defined(h);const d=c.type==="UserMessage",p=((_=c.sender)==null?void 0:_.id)===u.extUserId$.peek(),f=h.suppressContactInfo,m=d&&f.shouldSuppress({isContentBySender:p}),E=Sv(l.children,{contactInfo:m?"suppress":"link",suppression:f}),A={sameTabLinkRules:h.sameTabLinkRules,contactInfoHiddenText:h.suppressContactInfo.replacement||`(${u.t$.peek().CONTACT_INFORMATION_HIDDEN})`};return{nodes:E,roleOptions:A}}(e,n),a=function(l,c={},u){return xr(l,{...gc(c),message:u})}(o,{enableEmojiImageFallback:!0,formattedLinks:i?"link":"plaintext",enableActions:i,...s},n);return Tt("span",{className:`t-text ${r}`},...a)}function E_(e){const t=be(),n=gt(),{className:r="",...i}=e,o=dt(()=>n.state$.messages.child(n.state$.extCurrentConversationId.get()).lookup.child(e.message.id).content.child(0).url.get());return P("div",{className:`t-message-content ${r}`,children:e.message.content.map(s=>{var a;return P(Tv,{block:s,theme:t,downloadUrl:o,...i},e.message.createdAt+((a=e.message.editedAt)!=null?a:0))})})}function Tv({common:e,block:t,message:n,theme:r,downloadUrl:i}){const o=function(s,a){switch(a.type){case"text":return s.TextBlock;case"location":return s.LocationBlock;case"file":switch(a.subtype){case"image":return s.ImageBlock;case"video":return s.VideoBlock;case"voice":return s.VoiceBlock;case"audio":return s.AudioBlock;default:return s.FileBlock}default:mt.never(a)}}(r,t);return P(o,{block:t,common:e,message:n,downloadUrl:i})}const Rv=27;function Ho(e,t,n=!0){const r=st(o=>{o.keyCode===Rv&&e()},[e]),i=st(o=>{o.target.closest(t)===null&&e(o)},[t,e]);Z(()=>{if(n)return window.addEventListener("keydown",r,!0),document.addEventListener("mousedown",i,!0),()=>{window.removeEventListener("keydown",r,!0),document.removeEventListener("mousedown",i,!0)}},[r,i,n])}const Iv=".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 Us(e){return P(gt()instanceof Nm?yv:Cv,{...e})}function yv(e){const t=be(),n=Hn();return P(t.Icon,{common:n,...e})}function Cv(e){const t=be(),n=s_();return P(t.Icon,{common:n,...e})}function Oc(){return P(Us,{type:"spinner","aria-label":dt(gt().t$).LOADING,className:"t-loading-icon"})}const __={"emoji-picker-element":"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/+esm","mpegts.js":"https://cdn.jsdelivr.net/npm/mpegts.js@1.7.3","opus-media-recorder-wasm":"https://cdn.jsdelivr.net/npm/opus-media-recorder@0.8.0/WebMOpusEncoder.wasm"};async function Nv(e,t){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=e!=null?e:si.emojiPickerTranslationUrl,r=__["emoji-picker-element"],[i,o]=await Promise.all([su(r),su(n)]),s=t!=null?t:si.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(n){return Is.error("Failed to load emoji picker:",n),new Promise(()=>{})}}async function su(e){return import(e).catch(()=>new Function("url","return import(url)")(e)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function vc(){const e=gt(),[t,n]=ct();return function(r,i,o,s){let a;at(i)?a=i:Array.isArray(i)?(s=i,o=void 0):o=i,a&&Array.isArray(o)&&(s=o,o=void 0);const l=(s=s||(o==null?void 0:o.deps))?He(s):void 0,c=Q({});c.current.selector=r,c.current.reaction=a,l&&l.set(s),c.current.dispose||(c.current.dispose=Ee(u=>{var h;return l==null||l.get(),fn((h=c.current)==null?void 0:h.selector,void 0,u)},u=>{var h,d;return(d=(h=c.current).reaction)==null?void 0:d.call(h,u)},o)),Rg(()=>{var u,h;(h=(u=c.current)==null?void 0:u.dispose)==null||h.call(u)}),c.current.dispose}(()=>{const r=e.translationData$.get();e.app$.get()&&e.currentUser$.get()&&r&&function(i,o){const s=JSON.stringify([i,o]);if(dl[s])return dl[s];const a=Nv(i,o);return dl[s]=a,a}(r.emojiPickerTranslationUrl,r.emojiDataUrl).then(i=>n({value:i}))},[]),t}const dl={};function Sc(e){const{onClose:t,onEmojiSelected:n}=Ng(),r=Q(null),i=dt(gt().t$),o=vc();return Z(()=>{if(!o)return;mt.defined(r.current);const s=r.current,a=s.shadowRoot;(function(u,h){const d=document.createElement("style");d.textContent=h,u.appendChild(d)})(a,Iv);const l=u=>{var d;const h=(d=u.detail.unicode)!=null?d:u.detail.name;n(h)};function c(u){u.pointerType==="mouse"&&(a.querySelector("section").dataset.hasMouse="true")}return s.addEventListener("emoji-click",l),s.addEventListener("pointermove",c,{once:!0}),s.i18n=o.value.i18n,()=>{s.removeEventListener("emoji-click",l),s.removeEventListener("pointermove",c)}},[o,n]),Z(()=>{var s;o&&r.current&&((s=r.current.shadowRoot.getElementById("search"))==null||s.focus())},[o]),Ho(()=>t(),".t-emoji-picker"),P("div",o?{className:"t-emoji-picker",children:P("emoji-picker",{locale:i.locale,ref:r,class:e.colorScheme,"data-source":o.value.dataSource})}:{className:"t-emoji-picker","t-loading":"",children:P(Oc,{})})}function A_({messageId:e,colorScheme:t}){const{closePopover:n}=Ju(),r=ki();return P("div",{className:"t-reaction-picker",children:P(Tm.Provider,{value:{onClose:n,onEmojiSelected:i=>{r.addReaction(e,i),n()}},children:P(Sc,{colorScheme:t})})})}function au(){return au=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},au.apply(null,arguments)}function g_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lu(e,t){return lu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},lu(e,t)}function D_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,lu(e,t)}function O_(){}function v_(){}v_.resetWarningCache=O_;function pp(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}(function(){function e(r,i,o,s,a,l){if(l!=="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"){var c=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 c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:v_,resetWarningCache:O_};n.PropTypes=n})();const fp=!1,S_=Me.createContext(null);var Wi="unmounted",mr="exited",Er="entering",qr="entered",uu="exiting",yn=function(e){function t(r,i){var o;o=e.call(this,r,i)||this;var s,a=i&&!i.isMounting?r.enter:r.appear;return o.appearStatus=null,r.in?a?(s=mr,o.appearStatus=Er):s=qr:s=r.unmountOnExit||r.mountOnEnter?Wi:mr,o.state={status:s},o.nextCallback=null,o}D_(t,e),t.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Wi?{status:mr}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var o=this.state.status;this.props.in?o!==Er&&o!==qr&&(i=Er):o!==Er&&o!==qr||(i=uu)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r,i,o,s=this.props.timeout;return r=i=o=s,s!=null&&typeof s!="number"&&(r=s.exit,i=s.enter,o=s.appear!==void 0?s.appear:i),{exit:r,enter:i,appear:o}},n.updateStatus=function(r,i){r===void 0&&(r=!1),i!==null?(this.cancelNextCallback(),i===Er?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===mr&&this.setState({status:Wi})},n.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[Me.findDOMNode(this),s],l=a[0],c=a[1],u=this.getTimeouts(),h=s?u.appear:u.enter;!r&&!o||fp?this.safeSetState({status:qr},function(){i.props.onEntered(l)}):(this.props.onEnter(l,c),this.safeSetState({status:Er},function(){i.props.onEntering(l,c),i.onTransitionEnd(h,function(){i.safeSetState({status:qr},function(){i.props.onEntered(l,c)})})}))},n.performExit=function(){var r=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:Me.findDOMNode(this);i&&!fp?(this.props.onExit(s),this.safeSetState({status:uu},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:mr},function(){r.props.onExited(s)})})})):this.safeSetState({status:mr},function(){r.props.onExited(s)})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,r(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:Me.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],c=a[1];this.props.addEndListener(l,c)}r!=null&&setTimeout(this.nextCallback,r)}else setTimeout(this.nextCallback,0)},n.render=function(){var r=this.state.status;if(r===Wi)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=g_(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Me.createElement(S_.Provider,{value:null},typeof o=="function"?o(r,s):Me.cloneElement(Me.Children.only(o),s))},t}(Me.Component);function Wr(){}yn.contextType=S_,yn.propTypes={},yn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:Wr,onEntering:Wr,onEntered:Wr,onExit:Wr,onExiting:Wr,onExited:Wr},yn.UNMOUNTED=Wi,yn.EXITED=mr,yn.ENTERING=Er,yn.ENTERED=qr,yn.EXITING=uu;var hl=function(e,t){return e&&t&&t.split(" ").forEach(function(n){return i=n,void((r=e).classList?r.classList.remove(i):typeof r.className=="string"?r.className=pp(r.className,i):r.setAttribute("class",pp(r.className&&r.className.baseVal||"",i)));var r,i})},cu=function(e){function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=e.call.apply(e,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var c=r.resolveArguments(a,l),u=c[0],h=c[1];r.removeClasses(u,"exit"),r.addClass(u,h?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var c=r.resolveArguments(a,l),u=c[0],h=c[1]?"appear":"enter";r.addClass(u,h,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var c=r.resolveArguments(a,l),u=c[0],h=c[1]?"appear":"enter";r.removeClasses(u,h),r.addClass(u,h,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a)[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,c=typeof l=="string",u=c?(c&&l?l+"-":"")+a:l[a];return{baseClassName:u,activeClassName:c?u+"-active":l[a+"Active"],doneClassName:c?u+"-done":l[a+"Done"]}},r}D_(t,e);var n=t.prototype;return n.addClass=function(r,i,o){var s=this.getClassNames(i)[o+"ClassName"],a=this.getClassNames("enter").doneClassName;i==="appear"&&o==="done"&&a&&(s+=" "+a),o==="active"&&r&&r.scrollTop,s&&(this.appliedClasses[i][o]=s,function(l,c){l&&c&&c.split(" ").forEach(function(u){return d=u,void((h=l).classList?h.classList.add(d):function(p,f){return p.classList?!!f&&p.classList.contains(f):(" "+(p.className.baseVal||p.className)+" ").indexOf(" "+f+" ")!==-1}(h,d)||(typeof h.className=="string"?h.className=h.className+" "+d:h.setAttribute("class",(h.className&&h.className.baseVal||"")+" "+d)));var h,d})}(r,s))},n.removeClasses=function(r,i){var o=this.appliedClasses[i],s=o.base,a=o.active,l=o.done;this.appliedClasses[i]={},s&&hl(r,s),a&&hl(r,a),l&&hl(r,l)},n.render=function(){var r=this.props;r.classNames;var i=g_(r,["classNames"]);return Me.createElement(yn,au({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Me.Component);cu.defaultProps={classNames:""},cu.propTypes={};const bv={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function T_(e,{focused:t,setFocused:n,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(r===0)return!1;const a=u=>{var h,d,p;h=0,d=u,p=r-1,u=Math.max(h,Math.min(d,p)),n(u)},[l,c]=bv[i];switch(e){case l:return a(t-1),!0;case c:return a(t+1),!0;case" ":return!!s&&s();case"Enter":case"Tab":return o(),!0}return!1}function R_({focused:e,setFocused:t,buttonId:n}){Ne(()=>{var a;const s=n(e);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[e,n]);const r=st(s=>{const a=s.currentTarget.dataset.index;t(+a)},[t]),i=lt(()=>({role:"menu","aria-activedescendant":n(e)}),[e,n]),o=st(s=>({onMouseMove:r,id:n(s),"data-index":s}),[r,n]);return{containerProps:i,itemProps:o}}function I_(e){const[t,n]=ct([]),[r,i]=ct([]),[o,s]=ct(0),[a,l]=ct(0),c=vc(),u=lt(()=>(c==null?void 0:c.value)&&new c.value.Database({dataSource:c.value.dataSource}),[c]),h=Lo(),d=dt(h.state$.suggestEmojiQuery);Z(()=>{u&&(d?async function(){const _=await u.getPreferredSkinTone();l(_);let g=await u.getEmojiBySearchQuery(d);if(g=g.filter(v=>v.url||function(S){return S.version<=ym&&!wv.includes(S.unicode)}(v)),function(v,S){S.sort((I,R)=>{var O,C;const y=(O=I.shortcodes)==null?void 0:O.find(b=>b.startsWith(v)),D=(C=R.shortcodes)==null?void 0:C.find(b=>b.startsWith(v));return y&&!D?-1:!y&&D?1:y&&D?y.length-D.length:0})}(d.substring(1),g),s(0),n(g),g.length>0&&i(g),d.endsWith(":")){const v=d.slice(1,-1),S=g.find(I=>{var R;return(R=I.shortcodes)==null?void 0:R.includes(v)});S&&h.selectEmoji(Xi(S,_))}}():n([]))},[d,h,u]);const p=st(_=>{const g=t[_];return g&&"emoji-button-"+Xi(g,a)},[t,a]),{containerProps:f,itemProps:m}=R_({focused:o,setFocused:s,buttonId:p}),E=t.length>0;Ho(()=>h.closeSuggester(),".t-emoji-suggest-bar",E),Z(()=>{if(E)return h.listenKeydown("emoji",_=>T_(_,{dir:"ltr",focused:o,setFocused:s,itemCount:t.length,onConfirm(){const g=t[o];mt.defined(g),h.selectEmoji(Xi(g,a))}})),()=>{h.listenKeydown("emoji",void 0)};h.listenKeydown("emoji",void 0)},[h,t,o,E,a]);const A=Q(null);return P(cu,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:A,children:P("div",{className:"t-emoji-suggest-bar",ref:A,...f,children:r.map((_,g)=>P(kv,{emoji:_,skinTone:a,focused:g===o,onSelect:v=>h.selectEmoji(v),...m(g)},Xi(_,a)))})})}function Xi(e,t){return du(e)?y_(e,t):e.name}function du(e){return!!e.unicode}function kv(e){var l;const{emoji:t,focused:n,skinTone:r,onSelect:i,...o}=e,s=((l=t.shortcodes)!=null?l:[]).join(", "),a=du(t)?[t.unicode,s].join(", "):s;return P("button",{"t-focused":n?"":void 0,title:s,"aria-label":a,onClick:()=>i(Xi(t,r)),...o,children:du(t)?y_(t,r):null})}function y_(e,t){var r,i;const n=(r=e.skins)==null?void 0:r.find(o=>o.tone===t);return(i=n==null?void 0:n.unicode)!=null?i:e.unicode}const wv=["🏻","🏼","🏽","🏾","🏿"],Lv=["top","right","bottom","left"],Hs=Math.min,br=Math.max,js=Math.round,ts=Math.floor,En=e=>({x:e,y:e}),Pv={left:"right",right:"left",bottom:"top",top:"bottom"},Mv={start:"end",end:"start"};function mp(e,t,n){return br(e,Hs(t,n))}function ma(e,t){return typeof e=="function"?e(t):e}function Ii(e){return e.split("-")[0]}function Tc(e){return e.split("-")[1]}function C_(e){return e==="x"?"y":"x"}function N_(e){return e==="y"?"height":"width"}const xv=new Set(["top","bottom"]);function Tr(e){return xv.has(Ii(e))?"y":"x"}function b_(e){return C_(Tr(e))}function hu(e){return e.replace(/start|end/g,t=>Mv[t])}const Ep=["left","right"],_p=["right","left"],Fv=["top","bottom"],Bv=["bottom","top"];function Uv(e,t,n,r){const i=Tc(e);let o=function(s,a,l){switch(s){case"top":case"bottom":return l?a?_p:Ep:a?Ep:_p;case"left":case"right":return a?Fv:Bv;default:return[]}}(Ii(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(hu)))),o}function es(e){return e.replace(/left|right|bottom|top/g,t=>Pv[t])}function $s(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Ap(e,t,n){let{reference:r,floating:i}=e;const o=Tr(t),s=b_(t),a=N_(s),l=Ii(t),c=o==="y",u=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,d=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-i.width,y:h};break;default:p={x:r.x,y:r.y}}switch(Tc(t)){case"start":p[s]-=d*(n&&c?-1:1);break;case"end":p[s]+=d*(n&&c?-1:1)}return p}async function Vs(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:d=!1,padding:p=0}=ma(t,e),f=function(S){return typeof S!="number"?function(I){return{top:0,right:0,bottom:0,left:0,...I}}(S):{top:S,right:S,bottom:S,left:S}}(p),m=a[d?h==="floating"?"reference":"floating":h],E=$s(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(m)))==null||n?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),A=h==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),g=await(o.isElement==null?void 0:o.isElement(_))&&await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1},v=$s(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:_,strategy:l}):A);return{top:(E.top-v.top+f.top)/g.y,bottom:(v.bottom-E.bottom+f.bottom)/g.y,left:(E.left-v.left+f.left)/g.x,right:(v.right-E.right+f.right)/g.x}}function gp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Dp(e){return Lv.some(t=>e[t]>=0)}function Ea(){return typeof window!="undefined"}function yi(e){return Rc(e)?(e.nodeName||"").toLowerCase():"#document"}function Ue(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function _n(e){var t;return(t=(Rc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Rc(e){return!!Ea()&&(e instanceof Node||e instanceof Ue(e).Node)}function tn(e){return!!Ea()&&(e instanceof Element||e instanceof Ue(e).Element)}function gn(e){return!!Ea()&&(e instanceof HTMLElement||e instanceof Ue(e).HTMLElement)}function pu(e){return!(!Ea()||typeof ShadowRoot=="undefined")&&(e instanceof ShadowRoot||e instanceof Ue(e).ShadowRoot)}const Hv=new Set(["inline","contents"]);function vo(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=en(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Hv.has(i)}const jv=new Set(["table","td","th"]);function $v(e){return jv.has(yi(e))}const Vv=[":popover-open",":modal"];function zs(e){return Vv.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const zv=["transform","translate","scale","rotate","perspective"],Yv=["transform","translate","scale","rotate","perspective","filter"],Gv=["paint","layout","strict","content"];function fu(e){const t=Ic(),n=tn(e)?en(e):e;return zv.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||Yv.some(r=>(n.willChange||"").includes(r))||Gv.some(r=>(n.contain||"").includes(r))}function Ic(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Wv=new Set(["html","body","#document"]);function ci(e){return Wv.has(yi(e))}function en(e){return Ue(e).getComputedStyle(e)}function _a(e){return tn(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qn(e){if(yi(e)==="html")return e;const t=e.assignedSlot||e.parentNode||pu(e)&&e.host||_n(e);return pu(t)?t.host:t}function k_(e){const t=Qn(e);return ci(t)?e.ownerDocument?e.ownerDocument.body:e.body:gn(t)&&vo(t)?t:k_(t)}function So(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=k_(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=Ue(i);if(o){const a=mu(s);return t.concat(s,s.visualViewport||[],vo(i)?i:[],a&&n?So(a):[])}return t.concat(i,So(i,[],n))}function mu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function w_(e){const t=en(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=gn(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=js(n)!==o||js(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function yc(e){return tn(e)?e:e.contextElement}function di(e){const t=yc(e);if(!gn(t))return En(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=w_(t);let s=(o?js(n.width):n.width)/r,a=(o?js(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Xv=En(0);function L_(e){const t=Ue(e);return Ic()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Xv}function Fr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=yc(e);let s=En(1);t&&(r?tn(r)&&(s=di(r)):s=di(e));const a=function(d,p,f){return p===void 0&&(p=!1),!(!f||p&&f!==Ue(d))&&p}(o,n,r)?L_(o):En(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,h=i.height/s.y;if(o){const d=Ue(o),p=r&&tn(r)?Ue(r):r;let f=d,m=mu(f);for(;m&&r&&p!==f;){const E=di(m),A=m.getBoundingClientRect(),_=en(m),g=A.left+(m.clientLeft+parseFloat(_.paddingLeft))*E.x,v=A.top+(m.clientTop+parseFloat(_.paddingTop))*E.y;l*=E.x,c*=E.y,u*=E.x,h*=E.y,l+=g,c+=v,f=Ue(m),m=mu(f)}}return $s({width:u,height:h,x:l,y:c})}function Ys(e,t){const n=_a(e).scrollLeft;return t?t.left+n:Fr(_n(e)).left+n}function P_(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ys(e,n),y:n.top+t.scrollTop}}const Kv=new Set(["absolute","fixed"]);function Op(e,t,n){let r;if(t==="viewport")r=function(i,o){const s=Ue(i),a=_n(i),l=s.visualViewport;let c=a.clientWidth,u=a.clientHeight,h=0,d=0;if(l){c=l.width,u=l.height;const f=Ic();(!f||f&&o==="fixed")&&(h=l.offsetLeft,d=l.offsetTop)}const p=Ys(a);if(p<=0){const f=a.ownerDocument,m=f.body,E=getComputedStyle(m),A=f.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,_=Math.abs(a.clientWidth-m.clientWidth-A);_<=25&&(c-=_)}else p<=25&&(c+=p);return{width:c,height:u,x:h,y:d}}(e,n);else if(t==="document")r=function(i){const o=_n(i),s=_a(i),a=i.ownerDocument.body,l=br(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),c=br(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let u=-s.scrollLeft+Ys(i);const h=-s.scrollTop;return en(a).direction==="rtl"&&(u+=br(o.clientWidth,a.clientWidth)-l),{width:l,height:c,x:u,y:h}}(_n(e));else if(tn(t))r=function(i,o){const s=Fr(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,c=gn(i)?di(i):En(1);return{width:i.clientWidth*c.x,height:i.clientHeight*c.y,x:l*c.x,y:a*c.y}}(t,n);else{const i=L_(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return $s(r)}function M_(e,t){const n=Qn(e);return!(n===t||!tn(n)||ci(n))&&(en(n).position==="fixed"||M_(n,t))}function qv(e,t,n){const r=gn(t),i=_n(t),o=n==="fixed",s=Fr(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=En(0);function c(){l.x=Ys(i)}if(r||!r&&!o)if((yi(t)!=="body"||vo(i))&&(a=_a(t)),r){const h=Fr(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&c();o&&!r&&i&&c();const u=!i||r||o?En(0):P_(i,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function pl(e){return en(e).position==="static"}function vp(e,t){if(!gn(e)||en(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return _n(e)===n&&(n=n.ownerDocument.body),n}function Sp(e,t){const n=Ue(e);if(zs(e))return n;if(!gn(e)){let i=Qn(e);for(;i&&!ci(i);){if(tn(i)&&!pl(i))return i;i=Qn(i)}return n}let r=vp(e,t);for(;r&&$v(r)&&pl(r);)r=vp(r,t);return r&&ci(r)&&pl(r)&&!fu(r)?n:r||function(i){let o=Qn(i);for(;gn(o)&&!ci(o);){if(fu(o))return o;if(zs(o))return null;o=Qn(o)}return null}(e)||n}const Jv={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=_n(r),a=!!t&&zs(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=En(1);const u=En(0),h=gn(r);if((h||!h&&!o)&&((yi(r)!=="body"||vo(s))&&(l=_a(r)),gn(r))){const p=Fr(r);c=di(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const d=!s||h||o?En(0):P_(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}},getDocumentElement:_n,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=n==="clippingAncestors"?zs(t)?[]:function(c,u){const h=u.get(c);if(h)return h;let d=So(c,[],!1).filter(E=>tn(E)&&yi(E)!=="body"),p=null;const f=en(c).position==="fixed";let m=f?Qn(c):c;for(;tn(m)&&!ci(m);){const E=en(m),A=fu(m);A||E.position!=="fixed"||(p=null),(f?!A&&!p:!A&&E.position==="static"&&p&&Kv.has(p.position)||vo(m)&&!A&&M_(c,m))?d=d.filter(_=>_!==m):p=E,m=Qn(m)}return u.set(c,d),d}(t,this._c):[].concat(n),s=[...o,r],a=s[0],l=s.reduce((c,u)=>{const h=Op(t,u,i);return c.top=br(h.top,c.top),c.right=Hs(h.right,c.right),c.bottom=Hs(h.bottom,c.bottom),c.left=br(h.left,c.left),c},Op(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Sp,getElementRects:async function(e){const t=this.getOffsetParent||Sp,n=this.getDimensions,r=await n(e.floating);return{reference:qv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=w_(e);return{width:t,height:n}},getScale:di,isElement:tn,isRTL:function(e){return en(e).direction==="rtl"}};function Tp(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Zv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=yc(e),u=i||o?[...c?So(c):[],...So(t)]:[];u.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const h=c&&a?function(E,A){let _,g=null;const v=_n(E);function S(){var I;clearTimeout(_),(I=g)==null||I.disconnect(),g=null}return function I(R,y){R===void 0&&(R=!1),y===void 0&&(y=1),S();const D=E.getBoundingClientRect(),{left:O,top:C,width:b,height:L}=D;if(R||A(),!b||!L)return;const w={rootMargin:-ts(C)+"px "+-ts(v.clientWidth-(O+b))+"px "+-ts(v.clientHeight-(C+L))+"px "+-ts(O)+"px",threshold:br(0,Hs(1,y))||1};let F=!0;function H(B){const K=B[0].intersectionRatio;if(K!==y){if(!F)return I();K?I(!1,K):_=setTimeout(()=>{I(!1,1e-7)},1e3)}K!==1||Tp(D,E.getBoundingClientRect())||I(),F=!1}try{g=new IntersectionObserver(H,{...w,root:v.ownerDocument})}catch(B){g=new IntersectionObserver(H,w)}g.observe(E)}(!0),S}(c,n):null;let d,p=-1,f=null;s&&(f=new ResizeObserver(E=>{let[A]=E;A&&A.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var _;(_=f)==null||_.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m=l?Fr(e):null;return l&&function E(){const A=Fr(e);m&&!Tp(m,A)&&n(),m=A,d=requestAnimationFrame(E)}(),n(),()=>{var E;u.forEach(A=>{i&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),h==null||h(),(E=f)==null||E.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const Qv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:E=>{let{x:A,y:_}=E;return{x:A,y:_}}},...l}=ma(e,t),c={x:n,y:r},u=await Vs(t,l),h=Tr(Ii(i)),d=C_(h);let p=c[d],f=c[h];if(o){const E=d==="y"?"bottom":"right";p=mp(p+u[d==="y"?"top":"left"],p,p-u[E])}if(s){const E=h==="y"?"bottom":"right";f=mp(f+u[h==="y"?"top":"left"],f,f-u[E])}const m=a.fn({...t,[d]:p,[h]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:o,[h]:s}}}}}},tS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...E}=ma(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const A=Ii(i),_=Tr(a),g=Ii(a)===a,v=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=d||(g||!m?[es(a)]:function(w){const F=es(w);return[hu(w),F,hu(F)]}(a)),I=f!=="none";!d&&I&&S.push(...Uv(a,m,f,v));const R=[a,...S],y=await Vs(t,E),D=[];let O=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&D.push(y[A]),h){const w=function(F,H,B){B===void 0&&(B=!1);const K=Tc(F),X=b_(F),G=N_(X);let W=X==="x"?K===(B?"end":"start")?"right":"left":K==="start"?"bottom":"top";return H.reference[G]>H.floating[G]&&(W=es(W)),[W,es(W)]}(i,s,v);D.push(y[w[0]],y[w[1]])}if(O=[...O,{placement:i,overflows:D}],!D.every(w=>w<=0)){var C,b;const w=(((C=o.flip)==null?void 0:C.index)||0)+1,F=R[w];if(F&&(!(h==="alignment"&&_!==Tr(F))||O.every(B=>Tr(B.placement)!==_||B.overflows[0]>0)))return{data:{index:w,overflows:O},reset:{placement:F}};let H=(b=O.filter(B=>B.overflows[0]<=0).sort((B,K)=>B.overflows[1]-K.overflows[1])[0])==null?void 0:b.placement;if(!H)switch(p){case"bestFit":{var L;const B=(L=O.filter(K=>{if(I){const X=Tr(K.placement);return X===_||X==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(X=>X>0).reduce((X,G)=>X+G,0)]).sort((K,X)=>K[1]-X[1])[0])==null?void 0:L[0];B&&(H=B);break}case"initialPlacement":H=a}if(i!==H)return{reset:{placement:H}}}return{}}}},eS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=ma(e,t);switch(r){case"referenceHidden":{const o=gp(await Vs(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Dp(o)}}}case"escaped":{const o=gp(await Vs(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Dp(o)}}}default:return{}}}}},nS=(e,t,n)=>{const r=new Map,i={platform:Jv,...n},o={...i.platform,_c:r};return(async(s,a,l)=>{const{placement:c="bottom",strategy:u="absolute",middleware:h=[],platform:d}=l,p=h.filter(Boolean),f=await(d.isRTL==null?void 0:d.isRTL(a));let m=await d.getElementRects({reference:s,floating:a,strategy:u}),{x:E,y:A}=Ap(m,c,f),_=c,g={},v=0;for(let S=0;S<p.length;S++){const{name:I,fn:R}=p[S],{x:y,y:D,data:O,reset:C}=await R({x:E,y:A,initialPlacement:c,placement:_,strategy:u,middlewareData:g,rects:m,platform:d,elements:{reference:s,floating:a}});E=y!=null?y:E,A=D!=null?D:A,g={...g,[I]:{...g[I],...O}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(_=C.placement),C.rects&&(m=C.rects===!0?await d.getElementRects({reference:s,floating:a,strategy:u}):C.rects),{x:E,y:A}=Ap(m,_,f)),S=-1)}return{x:E,y:A,placement:_,strategy:u,middlewareData:g}})(e,t,{...i,platform:o})};var ps=typeof document!="undefined"?Ne:function(){};function Gs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Gs(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if((o!=="_owner"||!e.$$typeof)&&!Gs(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function x_(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Rp(e,t){const n=x_(e);return Math.round(t*n)/n}function fl(e){const t=Q(e);return ps(()=>{t.current=e}),t}const rS=(e,t)=>({...Qv(e),options:[e,t]}),iS=(e,t)=>({...tS(e),options:[e,t]}),oS=(e,t)=>({...eS(e),options:[e,t]});var F_=["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])"],Ws=F_.join(","),B_=typeof Element=="undefined",Br=B_?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,fs=!B_&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},To=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert");return r===""||r==="true"||t&&e&&To(e.parentNode)},U_=function(e,t,n){if(To(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Ws));return t&&Br.call(e,Ws)&&r.unshift(e),r=r.filter(n)},Xs=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!To(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=Xs(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{Br.call(o,Ws)&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),u=!To(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&u){var h=Xs(c===!0?o.children:c.children,!0,n);n.flatten?r.push.apply(r,h):r.push({scopeParent:o,candidates:h})}else i.unshift.apply(i,o.children)}}return r},H_=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Kn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"}(e))&&!H_(e)?0:e.tabIndex},sS=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},j_=function(e){return e.tagName==="INPUT"},aS=function(e){return function(t){return j_(t)&&t.type==="radio"}(e)&&!function(t){if(!t.name)return!0;var n,r=t.form||fs(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")n=i(window.CSS.escape(t.name));else try{n=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]}(n,t.form);return!o||o===t}(e)},Ip=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},lS=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility==="hidden")return!0;var i=Br.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Br.call(i,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return Ip(e)}else{if(typeof r=="function"){for(var o=e;e;){var s=e.parentElement,a=fs(e);if(s&&!s.shadowRoot&&r(s)===!0)return Ip(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=o}if(function(l){var c,u,h,d,p=l&&fs(l),f=(c=p)===null||c===void 0?void 0:c.host,m=!1;if(p&&p!==l)for(m=!!((u=f)!==null&&u!==void 0&&(h=u.ownerDocument)!==null&&h!==void 0&&h.contains(f)||l!=null&&(d=l.ownerDocument)!==null&&d!==void 0&&d.contains(l));!m&&f;){var E,A,_;m=!((A=f=(E=p=fs(f))===null||E===void 0?void 0:E.host)===null||A===void 0||(_=A.ownerDocument)===null||_===void 0||!_.contains(f))}return m}(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}return!1},Ks=function(e,t){return!(t.disabled||To(t)||function(n){return j_(n)&&n.type==="hidden"}(t)||lS(t,e)||function(n){return n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(r){return r.tagName==="SUMMARY"})}(t)||function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var r=n.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var o=r.children.item(i);if(o.tagName==="LEGEND")return!!Br.call(r,"fieldset[disabled] *")||!o.contains(n)}return!0}r=r.parentElement}return!1}(t))},Eu=function(e,t){return!(aS(t)||Kn(t)<0||!Ks(e,t))},uS=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},$_=function(e){var t=[],n=[];return e.forEach(function(r,i){var o=!!r.scopeParent,s=o?r.scopeParent:r,a=function(c,u){var h=Kn(c);return h<0&&u&&!H_(c)?0:h}(s,o),l=o?$_(r.candidates):s;a===0?o?t.push.apply(t,l):t.push(s):n.push({documentOrder:i,tabIndex:a,item:r,isScope:o,content:l})}),n.sort(sS).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},Aa=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Xs([e],t.includeContainer,{filter:Eu.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:uS}):U_(e,t.includeContainer,Eu.bind(null,t)),$_(n)},Cc=function(e,t){return(t=t||{}).getShadowRoot?Xs([e],t.includeContainer,{filter:Ks.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):U_(e,t.includeContainer,Ks.bind(null,t))},_r=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Br.call(e,Ws)!==!1&&Eu(t,e)},cS=F_.concat("iframe").join(","),ms=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Br.call(e,cS)!==!1&&Ks(t,e)};const dS=Object.freeze(Object.defineProperty({__proto__:null,focusable:Cc,getTabIndex:Kn,isFocusable:ms,isTabbable:_r,tabbable:Aa},Symbol.toStringTag,{value:"Module"}));function _u(e){return(e==null?void 0:e.ownerDocument)||document}var oo=typeof document!="undefined"?Ne:function(){};const V_=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function yp(e,t){const n=Aa(e,V_()),r=n.length;if(r===0)return;const i=function(s){let a=s.activeElement;for(;((l=a)==null||(l=l.shadowRoot)==null?void 0:l.activeElement)!=null;){var l;a=a.shadowRoot.activeElement}return a}(_u(e)),o=n.indexOf(i);return n[o===-1?t===1?0:r-1:o+t]}function ml(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!function(i,o){if(!i||!o)return!1;const s=o.getRootNode==null?void 0:o.getRootNode();if(i.contains(o))return!0;if(s&&pu(s)){let a=o;for(;a;){if(i===a)return!0;a=a.parentNode||a.host}}return!1}(n,r)}function hS(e){Aa(e,V_()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function Cp(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}const pS={...Hu};let Np=!1,fS=0;const bp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+fS++,mS=pS.useId||function(){const[e,t]=ct(()=>Np?bp():void 0);return oo(()=>{e==null&&t(bp())},[]),Z(()=>{Np=!0},[]),e};function z_(e){return"data-floating-ui-"+e}const Y_={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},kp=qe(function(e,t){const[n,r]=ct();return oo(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]),P("span",{...e,ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[z_("focus-guard")]:"",style:Y_})}),G_=Ci(null),wp=z_("portal");function ES(e){const{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,o=function(m){m===void 0&&(m={});const{id:E,root:A}=m,_=mS(),g=_S(),[v,S]=ct(null),I=Q(null);return oo(()=>()=>{v==null||v.remove(),queueMicrotask(()=>{I.current=null})},[v]),oo(()=>{if(!_||I.current)return;const R=E?document.getElementById(E):null;if(!R)return;const y=document.createElement("div");y.id=_,y.setAttribute(wp,""),R.appendChild(y),I.current=y,S(y)},[E,_]),oo(()=>{if(A===null||!_||I.current)return;let R=A||(g==null?void 0:g.portalNode);R&&!Rc(R)&&(R=R.current),R=R||document.body;let y=null;E&&(y=document.createElement("div"),y.id=E,R.appendChild(y));const D=document.createElement("div");D.id=_,D.setAttribute(wp,""),R=y||R,R.appendChild(D),I.current=D,S(D)},[E,A,_,g]),v}({id:n,root:r}),[s,a]=ct(null),l=Q(null),c=Q(null),u=Q(null),h=Q(null),d=s==null?void 0:s.modal,p=s==null?void 0:s.open,f=!!s&&!s.modal&&s.open&&i&&!(!r&&!o);return Z(()=>{if(o&&i&&!d)return o.addEventListener("focusin",m,!0),o.addEventListener("focusout",m,!0),()=>{o.removeEventListener("focusin",m,!0),o.removeEventListener("focusout",m,!0)};function m(E){o&&ml(E)&&(E.type==="focusin"?Cp:hS)(o)}},[o,i,d]),Z(()=>{o&&(p||Cp(o))},[p,o]),P(G_.Provider,{value:lt(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:h,portalNode:o,setFocusManagerState:a}),[i,o]),children:[f&&o&&P(kp,{"data-type":"outside",ref:l,onFocus:m=>{if(ml(m,o)){var E;(E=u.current)==null||E.focus()}else{const _=s?s.domReference:null,g=yp(_u(A=_).body,-1)||A;g==null||g.focus()}var A}}),f&&o&&P("span",{"aria-owns":o.id,style:Y_}),o&&Mu(t,o),f&&o&&P(kp,{"data-type":"outside",ref:c,onFocus:m=>{if(ml(m,o)){var E;(E=h.current)==null||E.focus()}else{const _=s?s.domReference:null,g=yp(_u(A=_).body,1)||A;g==null||g.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,m.nativeEvent,"focus-out"))}var A}})]})}const _S=()=>sr(G_);var W_={exports:{}};function Au(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Lp(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=X_(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
94
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||n.return==null||n.return()}finally{if(a)throw o}}}}function
|
|
95
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function X_(e,t){if(e){if(typeof e=="string")return Au(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Au(e,t):void 0}}var kn={getActiveTrap:function(e){return(e==null?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){t!==kn.getActiveTrap(e)&&kn.pauseTrap(e);var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),kn.unpauseTrap(e)},pauseTrap:function(e){var t=kn.getActiveTrap(e);t==null||t._setPausedState(!0)},unpauseTrap:function(e){var t=kn.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},so=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},DS=function(e){return so(e)&&!e.shiftKey},OS=function(e){return so(e)&&e.shiftKey},xp=function(e){return setTimeout(e,0)},ji=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return typeof e=="function"?e.apply(void 0,n):e},ns=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},vS=[];const SS=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:function(e,t){var n,r=(t==null?void 0:t.document)||document,i=(t==null?void 0:t.trapStack)||vS,o=Mp({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:DS,isKeyBackward:OS},t),s={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadyInert:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a=function(D,O,C){return D&&D[O]!==void 0?D[O]:o[C||O]},l=function(D,O){var C=typeof(O==null?void 0:O.composedPath)=="function"?O.composedPath():void 0;return s.containerGroups.findIndex(function(b){var L=b.container,w=b.tabbableNodes;return L.contains(D)||(C==null?void 0:C.includes(L))||w.find(function(F){return F===D})})},c=function(D){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},C=O.hasFallback,b=C!==void 0&&C,L=O.params,w=L===void 0?[]:L,F=o[D];if(typeof F=="function"&&(F=F.apply(void 0,gS(w))),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 H=F;if(typeof F=="string"){try{H=r.querySelector(F)}catch(B){throw new Error("`".concat(D,'` appears to be an invalid selector; error="').concat(B.message,'"'))}if(!H&&!b)throw new Error("`".concat(D,"` as selector refers to no known node"))}return H},u=function(){var D=c("initialFocus",{hasFallback:!0});if(D===!1)return!1;if(D===void 0||D&&!ms(D,o.tabbableOptions))if(l(r.activeElement)>=0)D=r.activeElement;else{var O=s.tabbableGroups[0];D=O&&O.firstTabbableNode||c("fallbackFocus")}else D===null&&(D=c("fallbackFocus"));if(!D)throw new Error("Your focus-trap needs to have at least one focusable element");return D},h=function(){if(s.containerGroups=s.containers.map(function(D){var O=Aa(D,o.tabbableOptions),C=Cc(D,o.tabbableOptions),b=O.length>0?O[0]:void 0,L=O.length>0?O[O.length-1]:void 0,w=C.find(function(B){return _r(B)}),F=C.slice().reverse().find(function(B){return _r(B)}),H=!!O.find(function(B){return Kn(B)>0});return{container:D,tabbableNodes:O,focusableNodes:C,posTabIndexesFound:H,firstTabbableNode:b,lastTabbableNode:L,firstDomTabbableNode:w,lastDomTabbableNode:F,nextTabbableNode:function(B){var K=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],X=O.indexOf(B);return X<0?K?C.slice(C.indexOf(B)+1).find(function(G){return _r(G)}):C.slice(0,C.indexOf(B)).reverse().find(function(G){return _r(G)}):O[X+(K?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(D){return D.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(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.")},d=function(D){var O=D.activeElement;if(O)return O.shadowRoot&&O.shadowRoot.activeElement!==null?d(O.shadowRoot):O},p=function(D){D!==!1&&D!==d(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(u()))},f=function(D){var O=c("setReturnFocus",{params:[D]});return O||O!==!1&&D},m=function(D){var O=D.target,C=D.event,b=D.isBackward,L=b!==void 0&&b;O=O||ns(C),h();var w=null;if(s.tabbableGroups.length>0){var F=l(O,C),H=F>=0?s.containerGroups[F]:void 0;if(F<0)w=L?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(L){var B=s.tabbableGroups.findIndex(function(tt){var rt=tt.firstTabbableNode;return O===rt});if(B<0&&(H.container===O||ms(O,o.tabbableOptions)&&!_r(O,o.tabbableOptions)&&!H.nextTabbableNode(O,!1))&&(B=F),B>=0){var K=B===0?s.tabbableGroups.length-1:B-1,X=s.tabbableGroups[K];w=Kn(O)>=0?X.lastTabbableNode:X.lastDomTabbableNode}else so(C)||(w=H.nextTabbableNode(O,!1))}else{var G=s.tabbableGroups.findIndex(function(tt){var rt=tt.lastTabbableNode;return O===rt});if(G<0&&(H.container===O||ms(O,o.tabbableOptions)&&!_r(O,o.tabbableOptions)&&!H.nextTabbableNode(O))&&(G=F),G>=0){var W=G===s.tabbableGroups.length-1?0:G+1,St=s.tabbableGroups[W];w=Kn(O)>=0?St.firstTabbableNode:St.firstDomTabbableNode}else so(C)||(w=H.nextTabbableNode(O))}}else w=c("fallbackFocus");return w},E=function(D){var O=ns(D);l(O,D)>=0||(ji(o.clickOutsideDeactivates,D)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):ji(o.allowOutsideClick,D)||D.preventDefault())},A=function(D){var O=ns(D),C=l(O,D)>=0;if(C||O instanceof Document)C&&(s.mostRecentlyFocusedNode=O);else{var b;D.stopImmediatePropagation();var L=!0;if(s.mostRecentlyFocusedNode)if(Kn(s.mostRecentlyFocusedNode)>0){var w=l(s.mostRecentlyFocusedNode),F=s.containerGroups[w].tabbableNodes;if(F.length>0){var H=F.findIndex(function(B){return B===s.mostRecentlyFocusedNode});H>=0&&(o.isKeyForward(s.recentNavEvent)?H+1<F.length&&(b=F[H+1],L=!1):H-1>=0&&(b=F[H-1],L=!1))}}else s.containerGroups.some(function(B){return B.tabbableNodes.some(function(K){return Kn(K)>0})})||(L=!1);else L=!1;L&&(b=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),p(b||s.mostRecentlyFocusedNode||u())}s.recentNavEvent=void 0},_=function(D){(o.isKeyForward(D)||o.isKeyBackward(D))&&function(O){var C=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=O;var b=m({event:O,isBackward:C});b&&(so(O)&&O.preventDefault(),p(b))}(D,o.isKeyBackward(D))},g=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)&&ji(o.escapeDeactivates,D)!==!1&&(D.preventDefault(),n.deactivate())},v=function(D){var O=ns(D);l(O,D)>=0||ji(o.clickOutsideDeactivates,D)||ji(o.allowOutsideClick,D)||(D.preventDefault(),D.stopImmediatePropagation())},S=function(){if(s.active)return kn.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?xp(function(){p(u())}):p(u()),r.addEventListener("focusin",A,!0),r.addEventListener("mousedown",E,{capture:!0,passive:!1}),r.addEventListener("touchstart",E,{capture:!0,passive:!1}),r.addEventListener("click",v,{capture:!0,passive:!1}),r.addEventListener("keydown",_,{capture:!0,passive:!1}),r.addEventListener("keydown",g),n},I=function(){if(s.active)return r.removeEventListener("focusin",A,!0),r.removeEventListener("mousedown",E,!0),r.removeEventListener("touchstart",E,!0),r.removeEventListener("click",v,!0),r.removeEventListener("keydown",_,!0),r.removeEventListener("keydown",g),n},R=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(D){D.some(function(O){return Array.from(O.removedNodes).some(function(C){return C===s.mostRecentlyFocusedNode})})&&p(u())}):void 0,y=function(){R&&(R.disconnect(),s.active&&!s.paused&&s.containers.map(function(D){R.observe(D,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(D){if(s.active)return this;var O=a(D,"onActivate"),C=a(D,"onPostActivate"),b=a(D,"checkCanFocusTrap"),L=kn.getActiveTrap(i),w=!1;L&&!L.paused&&(L._setSubtreeIsolation(!1),w=!0);try{b||h(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=d(r),O==null||O();var F=function(){b&&h(),S(),y(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),C==null||C()};if(b)return b(s.containers.concat()).then(F,F),this;F()}catch(H){throw L===kn.getActiveTrap(i)&&w&&L._setSubtreeIsolation(!0),H}return this},deactivate:function(D){if(!s.active)return this;var O=Mp({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},D);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),I(),s.active=!1,s.paused=!1,y(),kn.deactivateTrap(i,n);var C=a(O,"onDeactivate"),b=a(O,"onPostDeactivate"),L=a(O,"checkCanReturnFocus"),w=a(O,"returnFocus","returnFocusOnDeactivate");C==null||C();var F=function(){xp(function(){w&&p(f(s.nodeFocusedBeforeActivation)),b==null||b()})};return w&&L?(L(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(C){return typeof C=="string"?r.querySelector(C):C}),o.isolateSubtrees&&function(C){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var b,L=new Set,w=new Set,F=Lp(C);try{for(F.s();!(b=F.n()).done;){var H=b.value;L.add(H);for(var B=typeof ShadowRoot!="undefined"&&H.getRootNode()instanceof ShadowRoot,K=H;K;){L.add(K);var X=K.parentElement,G=[];X?G=X.children:!X&&B&&(G=K.getRootNode().children,X=K.getRootNode().host,B=typeof ShadowRoot!="undefined"&&X.getRootNode()instanceof ShadowRoot);var W,St=Lp(G);try{for(St.s();!(W=St.n()).done;){var tt=W.value;w.add(tt)}}catch(rt){St.e(rt)}finally{St.f()}K=X}}}catch(rt){F.e(rt)}finally{F.f()}L.forEach(function(rt){w.delete(rt)}),s.adjacentElements=w}(s.containers),s.active&&(h(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),y(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(D,O){if(s.paused===D)return this;if(s.paused=D,D){var C=a(O,"onPause"),b=a(O,"onPostPause");C==null||C(),I(),y(),n._setSubtreeIsolation(!1),b==null||b()}else{var L=a(O,"onUnpause"),w=a(O,"onPostUnpause");L==null||L(),n._setSubtreeIsolation(!0),h(),S(),y(),w==null||w()}return this}},_setSubtreeIsolation:{value:function(D){o.isolateSubtrees&&s.adjacentElements.forEach(function(O){D?((O.inert||O.hasAttribute("inert"))&&s.alreadyInert.add(O),O.inert=!0):s.alreadyInert.has(O)||(O.inert=!1)})}}}),n.updateContainerElements(e),n}},Symbol.toStringTag,{value:"Module"})),TS=Ku(SS),RS=Ku(dS);function hi(e){return hi=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},hi(e)}var El,_l;function IS(e,t,n){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,q_(s.key),s)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function yS(e,t,n){return t=qs(t),function(r,i){if(i&&(hi(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)}(e,K_()?Reflect.construct(t,n||[],qs(e).constructor):t.apply(e,n))}function K_(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(K_=function(){return!!e})()}function qs(e){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qs(e)}function gu(e,t){return gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},gu(e,t)}function q_(e){var t=function(n,r){if(hi(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r);if(hi(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return hi(t)=="symbol"?t:t+""}var Ki=pm,CS=TS.createFocusTrap,NS=RS.isFocusable,bS=parseInt((El=(_l=/^(\d+)\./.exec(Ki.version))===null||_l===void 0?void 0:_l[1])!==null&&El!==void 0?El:0,10),Du=function(){function e(t){var n;(function(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")})(this,e),function(o,s,a){(s=q_(s))in o?Object.defineProperty(o,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[s]=a}(n=yS(this,e,[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,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];a=a.apply(void 0,c)}if(a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error("`".concat(o,"` was specified but was not a node, or did not return a node"))}var h,d=a;if(typeof a=="string"&&!(d=(h=this.getDocument())===null||h===void 0?void 0:h.querySelector(a)))throw new Error("`".concat(o,"` as selector refers to no known node"));return d}),n.handleDeactivate=n.handleDeactivate.bind(n),n.handlePostDeactivate=n.handlePostDeactivate.bind(n),n.handleClickOutsideDeactivates=n.handleClickOutsideDeactivates.bind(n),n.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:n.handleDeactivate,onPostDeactivate:n.handlePostDeactivate,clickOutsideDeactivates:n.handleClickOutsideDeactivates},n.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var r=t.focusTrapOptions;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i!=="returnFocusOnDeactivate"&&i!=="onDeactivate"&&i!=="onPostDeactivate"&&i!=="checkCanReturnFocus"&&i!=="clickOutsideDeactivates"?n.internalOptions[i]=r[i]:n.originalOptions[i]=r[i]);return n.outsideClick=null,n.focusTrapElements=t.containerElements||[],n.updatePreviousElement(),n}return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&gu(t,n)}(e,Ki.Component),IS(e,[{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 n=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,t):this.originalOptions.clickOutsideDeactivates;return n&&(this.outsideClick={target:t.target,allowDeactivation:n}),n}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var t=this,n=function(){var r=t.getReturnFocusNode(),i=!(!t.originalOptions.returnFocusOnDeactivate||r==null||!r.focus||t.outsideClick&&(!t.outsideClick.allowDeactivation||NS(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(n,n):n()}},{key:"setupFocusTrap",value:function(){this.focusTrap?this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()):this.focusTrapElements.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(t){if(this.focusTrap){t.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var n=!t.active&&this.props.active,r=t.active&&!this.props.active,i=!t.paused&&this.props.paused,o=t.paused&&!this.props.paused;if(n&&(this.updatePreviousElement(),this.focusTrap.activate()),r)return void this.deactivateTrap();i&&this.focusTrap.pause(),o&&this.focusTrap.unpause()}else 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,n=this.props.children?Ki.Children.only(this.props.children):void 0;if(n){if(n.type&&n.type===Ki.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return Ki.cloneElement(n,{ref:function(r){var i=t.props.containerElements;n&&(bS>=19?typeof n.props.ref=="function"?n.props.ref(r):n.props.ref&&(n.props.ref.current=r):typeof n.ref=="function"?n.ref(r):n.ref&&(n.ref.current=r)),t.focusTrapElements=i||[r]}})}return null}}])}();Du.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:CS},W_.exports=Du;var kS=W_.exports.FocusTrap=Du;function J_(e){var A,_;const{children:t,preferredPlacement:n="top-start",anchorElement:r,boundaryElement:i,trapFocus:o=!1,initialFocus:s,portal:a,...l}=e,{anchor:c,boundary:u}=lt(()=>({anchor:Fp(r),boundary:i?Fp(i):void 0}),[r,i]);let h=[];u&&(h=[iS({boundary:u,fallbackPlacements:["top-start","top-end","bottom-start","bottom-end","top","bottom"]}),rS({boundary:u,padding:8}),oS({boundary:u})]);const{refs:d,floatingStyles:p,middlewareData:f}=function(g){g===void 0&&(g={});const{placement:v="bottom",strategy:S="absolute",middleware:I=[],platform:R,elements:{reference:y,floating:D}={},transform:O=!0,whileElementsMounted:C,open:b}=g,[L,w]=ct({x:0,y:0,strategy:S,placement:v,middlewareData:{},isPositioned:!1}),[F,H]=ct(I);Gs(F,I)||H(I);const[B,K]=ct(null),[X,G]=ct(null),W=st(ut=>{ut!==it.current&&(it.current=ut,K(ut))},[]),St=st(ut=>{ut!==bt.current&&(bt.current=ut,G(ut))},[]),tt=y||B,rt=D||X,it=Q(null),bt=Q(null),te=Q(L),Gt=C!=null,Ot=fl(C),Pt=fl(R),ve=fl(b),ft=st(()=>{if(!it.current||!bt.current)return;const ut={placement:v,strategy:S,middleware:F};Pt.current&&(ut.platform=Pt.current),nS(it.current,bt.current,ut).then(pe=>{const It={...pe,isPositioned:ve.current!==!1};Mt.current&&!Gs(te.current,It)&&(te.current=It,Uu(()=>{w(It)}))})},[F,v,S,Pt,ve]);ps(()=>{b===!1&&te.current.isPositioned&&(te.current.isPositioned=!1,w(ut=>({...ut,isPositioned:!1})))},[b]);const Mt=Q(!1);ps(()=>(Mt.current=!0,()=>{Mt.current=!1}),[]),ps(()=>{if(tt&&(it.current=tt),rt&&(bt.current=rt),tt&&rt){if(Ot.current)return Ot.current(tt,rt,ft);ft()}},[tt,rt,ft,Ot,Gt]);const Rt=lt(()=>({reference:it,floating:bt,setReference:W,setFloating:St}),[W,St]),he=lt(()=>({reference:tt,floating:rt}),[tt,rt]),$e=lt(()=>{const ut={position:S,left:0,top:0};if(!he.floating)return ut;const pe=Rp(he.floating,L.x),It=Rp(he.floating,L.y);return O?{...ut,transform:"translate("+pe+"px, "+It+"px)",...x_(he.floating)>=1.5&&{willChange:"transform"}}:{position:S,left:pe,top:It}},[S,O,he.floating,L.x,L.y]);return lt(()=>({...L,update:ft,refs:Rt,elements:he,floatingStyles:$e}),[L,ft,Rt,he,$e])}({placement:n,middleware:h,whileElementsMounted:Zv});Ne(()=>{c&&d.setReference(c)},[d,c]);const m=o?P(kS,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",tabbableOptions:{getShadowRoot:!0}},children:P("div",{children:[t,P("span",{className:"t-fallback-focus",tabIndex:-1})]})}):t,E=P("div",{ref:d.setFloating,style:{...p,zIndex:1e3,visibility:(A=f.hide)!=null&&A.referenceHidden?"hidden":"visible"},...l,children:m});if(a){const g=(_=u||c)==null?void 0:_.closest("[t-menu-boundary='root']");return P(ES,{root:g,children:E})}return E}function Fp(e){return typeof e=="string"?document.querySelector(e):e}function Z_(e){const t=gt(),n=Lo(),r=dt(n.state$.suggestMentionQuery),i=d_(dt(t.state$.extCurrentConversationId),r?1e3:0),o=lt(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=ct(0),l=lt(()=>Object.fromEntries(o.map(E=>[E.id,ZD(E.name)])),[o]),c=lt(()=>{if(!r)return[];const E=Bp(r);return E===""?o:o.filter(A=>l[A.id].some(_=>function(g,v){return Yh(g.substring(0,v.length),v)}(_,E)))},[r,o,l]),u=Q(void 0);Z(()=>{if(u.current){const E=c.findIndex(A=>A.id===u.current);a(E===-1?0:E)}},[c]),Z(()=>{var E;u.current=(E=c[s])==null?void 0:E.id},[s,c]);const h=st(E=>{var _;const A=(_=c[E])==null?void 0:_.id;return A&&"mention-button-"+A},[c]),{containerProps:d,itemProps:p}=R_({focused:s,setFocused:a,buttonId:h});if(Z(()=>{if(c.length!==0)return n.listenKeydown("mention",E=>T_(E,{dir:"ttb",focused:s,setFocused:a,itemCount:c.length,onSpace(){if(r){const A=c[s];if(Yh(A.name,Bp(r)))return n.selectMention(A),!0}return!1},onConfirm(){const A=c[s];n.selectMention(A)}})),()=>{n.listenKeydown("mention",void 0)}},[n,s,c,r]),Ho(()=>n.closeSuggester(),".t-mention-suggest-list",c.length>0),c.length===0)return null;const f=document.querySelector(".ProseMirror-suggestion");let m;if(f){let E=f.getBoundingClientRect();m={getBoundingClientRect(){const A=f.getBoundingClientRect();return A.width>0&&(E=A),E}}}return P(J_,{className:"t-mention-suggest-list",...d,anchorElement:m,children:c.map((E,A)=>P(wS,{user:E,isFocused:A===s,onSelect:()=>n.selectMention(E),...p(A)},E.id))})}const wS=Fn(function(e){const{user:t,isFocused:n,onSelect:r,...i}=e;return P("button",{className:n?"focused":"",onClick:()=>r(t.id),...i,children:t.name})});function Bp(e){return mt(e[0]==="@"),e.substring(1)}function Up(e,t,n){const r=Cc(e),i=r.indexOf(t);return i===-1?null:r[i+n]||null}const LS=qe(function(e,t){const{children:n,triggerElement:r}=e,{closePopover:i}=Ju(),o=Q(null);or(t,()=>o.current),Z(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=st(a=>{(function(l,c,u,h){var E;const d=c.querySelectorAll("[t-menu-item]"),p=document.activeElement;if(!p||!p.hasAttribute("t-menu-item")&&!p.hasAttribute("t-menu"))return;const f=Array.from(d).indexOf(p);let m;switch(l.key){case"ArrowDown":m=Math.min(f+1,d.length-1);break;case"ArrowUp":m=Math.max(f-1,0),f===-1&&(m=d.length-1);break;case"Home":m=0;break;case"End":m=d.length-1;break;case"Tab":{const A=u.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),_=l.shiftKey?Up(A,u,-1):function(g,v){return Up(g,v,1)}(A,u);return _==null||_.focus(),void h()}default:return}(E=d[m])==null||E.focus()})(a,o.current,r,i)},[i,r]);return P("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:n})});function ni(e){const{popoverComponent:t,popoverProps:n,children:r,type:i="popover",initialFocus:o,portal:s,...a}=e,[l,c]=ct(void 0),u=Q(null),[h,d]=ct(!1);Ho(st(f=>{var m,E;f&&((m=u.current)!=null&&m.contains(f.target))||(d(!1),(E=u.current)==null||E.focus())},[]),"[t-popover-content]",h);const p=i==="menu"?P(LS,{triggerElement:u.current,children:P(t,{...n})}):P(t,{...n});return P(bg.Provider,{value:{closePopover:()=>d(!1)},children:[P(PS,{...a,"aria-haspopup":i==="menu"?"menu":"true","aria-expanded":h,onTrigger:()=>d(f=>!f),ref:f=>(m=>{var A;const E=(A=m==null?void 0:m.closest("[t-menu-boundary]"))!=null?A:void 0;u.current=m,c(E)})(f),children:r}),h&&P(J_,{portal:s,"t-popover-content":"",anchorElement:u.current,boundaryElement:l,preferredPlacement:"bottom-start",trapFocus:i==="popover",initialFocus:i==="menu"?"t-menu":o,role:i==="menu"?void 0:"dialog",children:p})]})}const PS=qe(function(e,t){const{onTrigger:n,...r}=e,i=st(o=>{o.key!=="Enter"&&o.key!==" "||n()},[n]);return P("button",{...r,ref:t,onClick:n,onKeyDown:i})});function Wn(e){const{onSelect:t,...n}=e,{closePopover:r}=Ju(),i=st(o=>{o.key!=="Enter"&&o.key!==" "||(r(),t==null||t())},[t,r]);return P("div",{tabIndex:-1,role:"menuitem",onClick:st(()=>{r(),t==null||t()},[r,t]),onKeyDown:i,"t-menu-item":"",...n})}const MS={barHeight:4,barRadius:2,barGap:2,barWidth:2,height:24},Al={state:null,duration:0,recordingUrl:void 0,uploadState:"done",fileToken:void 0},Q_=new WeakMap;function tA({className:e,voiceRecorder:t}){const n=Q_.get(t);return n?P("div",{className:e,style:{shapeRendering:"crispEdges"},ref:n}):(Qe.warn("Can only use Waveform component if a voice recorder is active"),null)}function eA(e){return PE(e)}function Ur(e){var t;return(t=e.photoUrl)!=null?t:function(n,r){const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
96
|
-
<rect x="0" y="0" width="100" height="100" fill="${PE(n)}"/>
|
|
97
|
-
<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>
|
|
98
|
-
</svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+XD(i)}(e.id,JD(e.name))}function jo(e){return e<1024?e+" B":e<1048576?Math.floor(e/1024)+" KB":e<1073741824?Math.floor(e/1048576)+" MB":e<1099511627776?Math.floor(e/1073741824)+" GB":Math.floor(e/1099511627776)+" TB"}function Nc({latitude:e,longitude:t}){const n=e+","+t;return{imageUrl:`https://maps.googleapis.com/maps/api/staticmap?center=${n}&zoom=15&size=300x200&scale=2&maptype=roadmap&markers=${n}&key=${cv}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function nA(e,t){const[n,r]=ct({long:"",short:""});return Ne(()=>{let i,o=!0;const s=()=>{const l=Date.now(),c=function(u,h,d){const p=u-h;let f,m,E;const A=new Date(h),_={month:"short",day:"numeric"};if(p<jp)return{changeTimeout:5e3,short:d.JUST_NOW,long:d.JUST_NOW};if(p<$p)f=jp,m="MINUTES",E=d.MINUTES;else if(p<Vp)f=$p,m="HOURS",E=d.HOURS;else{if(!(p<xS)){if(A.getFullYear()===new Date(u).getFullYear()){const v=A.toLocaleDateString(d.locale,_);return{changeTimeout:void 0,short:v,long:v}}{const v=A.toLocaleDateString(d.locale,{..._,year:"numeric"});return{changeTimeout:void 0,short:v,long:v}}}f=Vp,m="DAYS",E=d.DAYS}const g=Math.floor(p/f);return{changeTimeout:f,short:g+E,long:FS(g,m.toLowerCase(),d.locale)}}(l,e>l?l-2e3:e,t);return r(c),c},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,e]),n}function ga(e){e=Math.floor(e);const t=Math.floor(e/3600);e%=3600;const n=Math.floor(e/60);e%=60;const r=o=>o.toString().padStart(2,"0");let i=`${r(n)}:${r(e)}`;return t>0&&(i=`${r(t)}:${i}`),i}const Hp=864e5;function rA(e,t){const n=Date.now(),r=(i=e,o=n,Math.floor((o-i)/Hp));var i,o;if(r<0||r===0)return t.TODAY;if(r===1)return t.YESTERDAY;const s={weekday:"long"},a=new Date(e);if(r<7)return a.toLocaleDateString(t.locale,s);const l=new Date(n);return function(u,h){return Math.floor((h-u)/(365*Hp))}(l.setFullYear(l.getFullYear()-1),e)===0?a.toLocaleDateString(t.locale,{...s,month:"long",day:"numeric"}):a.toLocaleDateString(t.locale,{...s,year:"numeric",month:"long",day:"numeric"})}const jp=6e4,$p=36e5,Vp=864e5,xS=6048e5;function FS(e,t,n){return new Intl.RelativeTimeFormat(n).format(-e,t)}function U(e,...t){const n=lv.bind(Tt)(e,...t);return Array.isArray(n)?Tt(Qt,{},...n):n}function Da(e,t=10){return d_(e,Math.min(t,100))}function iA(e){var i,o,s,a,l,c,u,h;if(!e.container)return;const t=getComputedStyle(e.container),n=(i=Ro.parse(t.color))!=null?i:new Ro(255,255,255,1),r=n.withAlpha(n.alpha/2);return Oo.create({...e,barGap:(o=e.barGap)!=null?o:2,barRadius:(s=e.barRadius)!=null?s:0,barWidth:(a=e.barWidth)!=null?a:2,barHeight:e.barHeight,hideScrollbar:!0,cursorWidth:(l=e.cursorWidth)!=null?l:0,cursorColor:e.cursorColor,height:(c=e.height)!=null?c:24,progressColor:(u=e.progressColor)!=null?u:r.toRgbaString(),waveColor:(h=e.waveColor)!=null?h:r.toRgbaString()})}function $o({src:e,onError:t,filename:n,className:r=""}){const i=Q(null),o=Q(),s=Q(),[a,l]=ct(!1),[c,u]=ct(0),[h,d]=ct(1),p=Q(),[f,m]=ct(!1),E=dt(gt().t$);Z(()=>{o.current=new Audio;const g=new URL(e),v=g.protocol==="blob:"&&g.searchParams.has("name"),S={normalize:!0,height:v?24:50,container:i.current};function I(){const O=o.current;if(!O)return;const C=O.error;(C.message!=="Media failed to load"||O.paused)&&(C.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(O.load(),l(!1)):(m(!0),l(!1),t==null||t()))}let R=n!=null?n:"";v&&(R=g.searchParams.get("name"),g.searchParams.delete("name"));const y=R.slice(R.lastIndexOf(".")+1);if(function(O){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(O)}(R)&&y==="webm"&&!o.current.canPlayType("audio/webm;codecs=opus"))S.backend="WebAudio",s.current=new Audio("data:audio/mp3;base64,//MkxAAHiAICWABElBeKPL/RANb2w+yiT1g/gTok//lP/W/l3h8QO/OCdCqCW2Cw//MkxAQHkAIWUAhEmAQXWUOFW2dxPu//9mr60ElY5sseQ+xxesmHKtZr7bsqqX2L//MkxAgFwAYiQAhEAC2hq22d3///9FTV6tA36JdgBJoOGgc+7qvqej5Zu7/7uI9l//MkxBQHAAYi8AhEAO193vt9KGOq+6qcT7hhfN5FTInmwk8RkqKImTM55pRQHQSq//MkxBsGkgoIAABHhTACIJLf99nVI///yuW1uBqWfEu7CgNPWGpUadBmZ////4sL//MkxCMHMAH9iABEmAsKioqKigsLCwtVTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVV//MkxCkECAUYCAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"),s.current.controls=!1;else{const O=o.current;O.addEventListener("error",I),O.preservesPitch=!0,S.url=g.toString(),S.media=O}p.current=iA(S);const D=p.current;return D.on("finish",()=>{o.current.loop=!0,l(!1)}),D.on("ready",O=>u(Math.trunc(O))),D.on("timeupdate",O=>u(Math.trunc(O))),S.backend==="WebAudio"&&D.load(g.toString()).catch(()=>{m(!0),l(!1),t==null||t()}),()=>{var O,C;(O=o.current)==null||O.pause(),(C=o.current)==null||C.removeEventListener("error",I),o.current=void 0,D.destroy(),p.current=void 0}},[e,n,t]);const A=st(()=>{var g;if(p.current.options.backend==="WebAudio")p.current.isPlaying()||s.current.play(),p.current.playPause(),l((g=p.current.isPlaying())!=null?g:!1);else{const v=o.current;v.paused?v.play():v.pause(),v.loop=!1,!v.paused&&v.ended&&(v.load(),v.play()),l(!v.paused)}},[]),_=st(g=>{p.current.setPlaybackRate(g),d(g)},[]);return P("div",f?{}:{className:`t-audio-player ${r}`,children:[P("button",{onClick:A,children:P(Us,{className:"t-play-pause-icon",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})}),P("div",{className:"t-waveform",ref:i}),P("div",{className:"t-duration",children:ga(c)}),P(ni,{type:"menu",portal:!0,popoverComponent:US,popoverProps:{playbackSpeed:h,selectPlaybackSpeed:_},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[h,"x",P(Us,{type:"updown",className:"t-up-down-icon","aria-hidden":!0})]})]})}const BS=[.25,.5,.75,1,1.25,1.5,2];function US({playbackSpeed:e,selectPlaybackSpeed:t}){return P("div",{className:"t-playback-speed-menu",children:[P("div",{className:"t-heading",children:"Playback Speed"}),BS.map(n=>P(Wn,{className:"t-menu-item",onSelect:()=>t(n),children:[P("span",{className:"t-playback-checkmark",children:e===n?"✓ ":""}),n,"x"]},n))]})}const HS=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,jS=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class Ro{constructor(t,n,r,i){this.red=t,this.green=n,this.blue=r,this.alpha=i}static parse(t){var r;const n=(r=t.match(HS))!=null?r:t.match(jS);if(n){const[i,o,s,a,l="1"]=n;return new Ro(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(t){return new Ro(this.red,this.green,this.blue,t)}toRgbaString(){const{red:t,green:n,blue:r,alpha:i}=this;return i!==1?`rgba(${t}, ${n}, ${r}, ${i})`:`rgb(${t}, ${n}, ${r})`}}function gl(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(c){try{l(r.next(c))}catch(u){o(u)}}function a(c){try{l(r.throw(c))}catch(u){o(u)}}function l(c){var u;c.done?i(c.value):(u=c.value,u instanceof n?u:new n(function(h){h(u)})).then(s,a)}l((r=r.apply(e,[])).next())})}class oA{constructor(){this.listeners={}}on(t,n,r){if(this.listeners[t]||(this.listeners[t]=new Set),r==null?void 0:r.once){const i=(...o)=>{this.un(t,i),n(...o)};return this.listeners[t].add(i),()=>this.un(t,i)}return this.listeners[t].add(n),()=>this.un(t,n)}un(t,n){var r;(r=this.listeners[t])===null||r===void 0||r.delete(n)}once(t,n){return this.on(t,n,{once:!0})}unAll(){this.listeners={}}emit(t,...n){this.listeners[t]&&this.listeners[t].forEach(r=>r(...n))}}class $S extends oA{constructor(t){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=t}onInit(){}_init(t){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(t=>t()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}}class VS extends oA{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const t=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(t))};t()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}const zS=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];class bc extends $S{constructor(t){var n,r,i,o,s,a;super(Object.assign(Object.assign({},t),{audioBitsPerSecond:(n=t.audioBitsPerSecond)!==null&&n!==void 0?n:128e3,scrollingWaveform:(r=t.scrollingWaveform)!==null&&r!==void 0&&r,scrollingWaveformWindow:(i=t.scrollingWaveformWindow)!==null&&i!==void 0?i:5,continuousWaveform:(o=t.continuousWaveform)!==null&&o!==void 0&&o,renderRecordedAudio:(s=t.renderRecordedAudio)===null||s===void 0||s,mediaRecorderTimeslice:(a=t.mediaRecorderTimeslice)!==null&&a!==void 0?a:void 0})),this.stream=null,this.mediaRecorder=null,this.dataWindow=null,this.isWaveformPaused=!1,this.lastStartTime=0,this.lastDuration=0,this.duration=0,this.micStream=null,this.recordedBlobUrl=null,this.timer=new VS,this.subscriptions.push(this.timer.on("tick",()=>{const l=performance.now()-this.lastStartTime;this.duration=this.isPaused()?this.duration:this.lastDuration+l,this.emit("record-progress",this.duration)}))}static create(t){return new bc(t||{})}renderMicStream(t){var n;const r=new AudioContext,i=r.createMediaStreamSource(t),o=r.createAnalyser();i.connect(o),(this.options.continuousWaveform||this.options.scrollingWaveform)&&(o.fftSize=32);const s=o.frequencyBinCount,a=new Float32Array(s);let l=0;this.wavesurfer&&((n=this.originalOptions)!==null&&n!==void 0||(this.originalOptions=Object.assign({},this.wavesurfer.options)),this.wavesurfer.options.interact=!1,this.options.scrollingWaveform&&(this.wavesurfer.options.cursorWidth=0,this.wavesurfer.options.normalize=!0,this.wavesurfer.options.maxPeak=1));const c=setInterval(()=>{var u,h,d,p;if(!this.isWaveformPaused){if(o.getFloatTimeDomainData(a),this.options.scrollingWaveform){const f=Math.floor(100*(this.options.scrollingWaveformWindow||0));let m=0;for(let A=0;A<s;A++){const _=Math.abs(a[A]);_>m&&(m=_)}this.dataWindow||(this.dataWindow=new Float32Array(f));const E=new Float32Array(f);if(this.dataWindow&&this.dataWindow.length>0){const A=f-1,_=this.dataWindow.slice(-A);E.set(_,0)}E[f-1]=m,this.dataWindow=E}else if(this.options.continuousWaveform){if(!this.dataWindow){const m=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):((h=(u=this.wavesurfer)===null||u===void 0?void 0:u.getWidth())!==null&&h!==void 0?h:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(m)}let f=0;for(let m=0;m<s;m++){const E=Math.abs(a[m]);E>f&&(f=E)}if(l+1>this.dataWindow.length){const m=new Float32Array(2*this.dataWindow.length);m.set(this.dataWindow,0),this.dataWindow=m}this.dataWindow[l]=f,l++}else this.dataWindow=a;if(this.wavesurfer){const f=((p=(d=this.dataWindow)===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:f).then(()=>{this.wavesurfer&&this.options.continuousWaveform&&(this.wavesurfer.setTime(this.getDuration()/1e3),this.wavesurfer.options.minPxPerSec||this.wavesurfer.setOptions({minPxPerSec:this.wavesurfer.getWidth()/this.wavesurfer.getDuration()}))}).catch(m=>{console.error("Error rendering real-time recording data:",m)})}}},10);return{onDestroy:()=>{clearInterval(c),i==null||i.disconnect(),r==null||r.close()},onEnd:()=>{this.isWaveformPaused=!0,this.stopMic()}}}startMic(t){return gl(this,0,void 0,function*(){let n;this.micStream&&this.stopMic();try{n=yield navigator.mediaDevices.getUserMedia({audio:t==null||t})}catch(i){throw new Error("Error accessing the microphone: "+i.message)}const r=this.renderMicStream(n);return this.micStream=r,this.unsubscribeDestroy=this.once("destroy",r.onDestroy),this.unsubscribeRecordEnd=this.once("record-end",r.onEnd),this.stream=n,n})}stopMic(){var t,n,r;(t=this.micStream)===null||t===void 0||t.onDestroy(),(n=this.unsubscribeDestroy)===null||n===void 0||n.call(this),(r=this.unsubscribeRecordEnd)===null||r===void 0||r.call(this),this.micStream=null,this.unsubscribeDestroy=void 0,this.unsubscribeRecordEnd=void 0,this.stream&&(this.stream.getTracks().forEach(i=>i.stop()),this.stream=null,this.mediaRecorder=null)}startRecording(t){return gl(this,0,void 0,function*(){const n=this.stream||(yield this.startMic(t));this.dataWindow=null;const r=this.mediaRecorder||new MediaRecorder(n,{mimeType:this.options.mimeType||zS.find(s=>MediaRecorder.isTypeSupported(s)),audioBitsPerSecond:this.options.audioBitsPerSecond});this.mediaRecorder=r,this.stopRecording();const i=[];r.ondataavailable=s=>{s.data.size>0&&i.push(s.data),this.emit("record-data-available",s.data)};const o=s=>{var a;const l=new Blob(i,{type:r.mimeType});this.emit(s,l),this.options.renderRecordedAudio&&(this.applyOriginalOptionsIfNeeded(),this.recordedBlobUrl&&URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=URL.createObjectURL(l),(a=this.wavesurfer)===null||a===void 0||a.load(this.recordedBlobUrl))};r.onpause=()=>o("record-pause"),r.onstop=()=>o("record-end"),r.start(this.options.mediaRecorderTimeslice),this.lastStartTime=performance.now(),this.lastDuration=0,this.duration=0,this.isWaveformPaused=!1,this.timer.start(),this.emit("record-start")})}getDuration(){return this.duration}isRecording(){var t;return((t=this.mediaRecorder)===null||t===void 0?void 0:t.state)==="recording"}isPaused(){var t;return((t=this.mediaRecorder)===null||t===void 0?void 0:t.state)==="paused"}isActive(){var t;return((t=this.mediaRecorder)===null||t===void 0?void 0:t.state)!=="inactive"}stopRecording(){var t;this.isActive()&&((t=this.mediaRecorder)===null||t===void 0||t.stop(),this.timer.stop())}pauseRecording(){var t,n;this.isRecording()&&(this.isWaveformPaused=!0,(t=this.mediaRecorder)===null||t===void 0||t.requestData(),(n=this.mediaRecorder)===null||n===void 0||n.pause(),this.timer.stop(),this.lastDuration=this.duration)}resumeRecording(){var t;this.isPaused()&&(this.isWaveformPaused=!1,(t=this.mediaRecorder)===null||t===void 0||t.resume(),this.timer.start(),this.lastStartTime=performance.now(),this.emit("record-resume"))}static getAvailableAudioDevices(){return gl(this,0,void 0,function*(){return navigator.mediaDevices.enumerateDevices().then(t=>t.filter(n=>n.kind==="audioinput"))})}destroy(){this.applyOriginalOptionsIfNeeded(),super.destroy(),this.stopRecording(),this.stopMic(),this.recordedBlobUrl&&(URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=null)}applyOriginalOptionsIfNeeded(){this.wavesurfer&&this.originalOptions&&(this.wavesurfer.setOptions(this.originalOptions),delete this.originalOptions)}}var sA={exports:{}};sA.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=0)}([function(e,t,n){(function(r){function i(v){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S})(v)}function o(v,S){return function(I){if(Array.isArray(I))return I}(v)||function(I,R){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(I)){var y=[],D=!0,O=!1,C=void 0;try{for(var b,L=I[Symbol.iterator]();!(D=(b=L.next()).done)&&(y.push(b.value),!R||y.length!==R);D=!0);}catch(w){O=!0,C=w}finally{try{D||L.return==null||L.return()}finally{if(O)throw C}}return y}}(v,S)||function(I,R){if(I){if(typeof I=="string")return s(I,R);var y=Object.prototype.toString.call(I).slice(8,-1);return y==="Object"&&I.constructor&&(y=I.constructor.name),y==="Map"||y==="Set"?Array.from(I):y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(y)?s(I,R):void 0}}(v,S)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
99
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function s(v,S){(S==null||S>v.length)&&(S=v.length);for(var I=0,R=new Array(S);I<S;I++)R[I]=v[I];return R}function a(v,S){if(!(v instanceof S))throw new TypeError("Cannot call a class as a function")}function l(v,S){for(var I=0;I<S.length;I++){var R=S[I];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(v,R.key,R)}}function c(v,S){return(c=Object.setPrototypeOf||function(I,R){return I.__proto__=R,I})(v,S)}function u(v){var S=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(I){return!1}}();return function(){var I,R=d(v);if(S){var y=d(this).constructor;I=Reflect.construct(R,arguments,y)}else I=R.apply(this,arguments);return h(this,I)}}function h(v,S){return!S||i(S)!=="object"&&typeof S!="function"?function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(v):S}function d(v){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)})(v)}var p,f=n(2),m=f.EventTarget,E=f.defineEventAttribute,A=(0,n(3).detect)(),_=r.AudioContext||r.webkitAudioContext,g=function(v){(function(O,C){if(typeof C!="function"&&C!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(C&&C.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),C&&c(O,C)})(D,v);var S,I,R,y=u(D);function D(O){var C,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(this,D);var w=b.mimeType,F=b.audioBitsPerSecond,H=(b.videoBitsPerSecond,b.bitsPerSecond),B=L.encoderWorkerFactory,K=L.OggOpusEncoderWasmPath,X=L.WebMOpusEncoderWasmPath;if((C=y.call(this))._stream=O,C._state="inactive",C._mimeType=w||"",C._audioBitsPerSecond=F||H,C.workerState="inactive",!D.isTypeSupported(C._mimeType))throw new TypeError("invalid arguments, a MIME Type is not supported");switch(D._parseType(C._mimeType).subtype){case"wave":case"wav":C._mimeType="audio/wave";break;case"webm":C._mimeType="audio/webm";break;case"ogg":C._mimeType="audio/ogg";break;default:switch(A&&A.name){case"chrome":case"edge":default:C._mimeType="audio/webm";break;case"firefox":C._mimeType="audio/ogg";break;case"ios":case"safari":C._mimeType="audio/wave"}}switch(C._mimeType){case"audio/wave":C._wasmPath="";break;case"audio/webm":C._wasmPath=X||"";break;case"audio/ogg":C._wasmPath=K||"";break;default:throw new Error("Internal Error: Unexpected MIME Type: ".concat(C._mimeType))}var G="";return document.currentScript?G=document.currentScript.src:self.location&&(G=self.location.href),G=G.substr(0,G.lastIndexOf("/"))+"/encoderWorker.umd.js",typeof D.encoderWorker=="function"&&(G=URL.createObjectURL(new Blob(["(".concat(D.encoderWorker,")()")]))),C._workerFactory=typeof B=="function"?B:function(W){return new Worker(G)},C._spawnWorker(),C}return S=D,R=[{key:"isTypeSupported",value:function(O){if(typeof O=="string"&&!O)return!0;try{var C=D._parseType(O),b=C.type,L=C.subtype,w=C.codec}catch(F){return!1}if(b!=="audio"||L!=="ogg"&&L!=="webm"&&L!=="wave"&&L!=="wav")return!1;switch(L){case"ogg":case"webm":if(w!=="opus"&&w)return!1;break;case"wave":case"wav":if(w)return!1}return!0}},{key:"_parseType",value:function(O){try{var C=o(O.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/),5),b=C[1],L=C[2],w=C[4]}catch(F){return typeof O!="string"||O?null:{type:"",subtype:"",codec:""}}return{type:b,subtype:L,codec:w}}}],(I=[{key:"_spawnWorker",value:function(){var O=this;this.worker=this._workerFactory(),this.worker.onmessage=function(C){return O._onmessageFromWorker(C)},this.worker.onerror=function(C){return O._onerrorFromWorker(C)},this._postMessageToWorker("loadEncoder",{mimeType:this._mimeType,wasmPath:this._wasmPath})}},{key:"_postMessageToWorker",value:function(O){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};switch(O){case"loadEncoder":var b=C.mimeType,L=C.wasmPath;this.worker.postMessage({command:O,mimeType:b,wasmPath:L});break;case"init":var w=C.sampleRate,F=C.channelCount,H=C.bitsPerSecond;this.worker.postMessage({command:O,sampleRate:w,channelCount:F,bitsPerSecond:H}),this.workerState="encoding",this.source.connect(this.processor),this.processor.connect(this.context.destination);var B=new r.Event("start");this.dispatchEvent(B);break;case"pushInputData":var K=C.channelBuffers,X=C.length,G=C.duration;this.worker.postMessage({command:O,channelBuffers:K,length:X,duration:G});break;case"getEncodedData":case"done":this.worker.postMessage({command:O});break;default:throw new Error("Internal Error: Incorrect postMessage requested.")}}},{key:"_onmessageFromWorker",value:function(O){var C,b=O.data,L=b.command,w=b.buffers;switch(L){case"readyToInit":var F=this.sampleRate,H=this.channelCount;this.workerState="readyToInit",this.state==="recording"&&this._postMessageToWorker("init",{sampleRate:F,channelCount:H,bitsPerSecond:this.audioBitsPerSecond});break;case"encodedData":case"lastEncodedData":var B=new Blob(w,{type:this._mimeType});(C=new r.Event("dataavailable")).data=B,this.dispatchEvent(C),L==="lastEncodedData"&&(C=new r.Event("stop"),this.dispatchEvent(C),this.workerState="closed")}}},{key:"_onerrorFromWorker",value:function(O){this.source.disconnect(),this.processor.disconnect(),this.worker.terminate(),this.workerState="closed";var C=["FileName: "+O.filename,"LineNumber: "+O.lineno,"Message: "+O.message].join(" - "),b=new r.Event("error");b.name="UnknownError",b.message=C,this.dispatchEvent(b)}},{key:"_enableAudioProcessCallback",value:function(O){var C=this,b=0;this.processor.onaudioprocess=function(L){for(var w=L.inputBuffer,F=(L.playbackTime,w.sampleRate,w.length),H=w.duration,B=w.numberOfChannels,K=new Array(B),X=0;X<B;X++)K[X]=w.getChannelData(X);var G={channelBuffers:K,length:F,duration:H};C._postMessageToWorker("pushInputData",G),(b+=H)>=O&&(C._postMessageToWorker("getEncodedData"),b=0)}}},{key:"start",value:function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.MAX_SAFE_INTEGER;if(this.state!=="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must be inactive.");if(O<0)throw new TypeError("invalid arguments, timeslice should be 0 or higher.");O/=1e3,this.workerState==="closed"&&this._spawnWorker(),this.context=new _;var C=this.stream.getAudioTracks();if(!C[0])throw new Error("DOMException: UnkownError, media track not found.");if(this.channelCount=C[0].getSettings().channelCount||1,this.sampleRate=this.context.sampleRate,this.source=this.context.createMediaStreamSource(this.stream),this.processor=this.context.createScriptProcessor(4096,this.channelCount,this.channelCount),this._state="recording",this._enableAudioProcessCallback(O),this.workerState==="readyToInit"){var b=this.sampleRate,L=this.channelCount;this._postMessageToWorker("init",{sampleRate:b,channelCount:L,bitsPerSecond:this.audioBitsPerSecond})}}},{key:"stop",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect(),this.context.close(),this._postMessageToWorker("done"),this._state="inactive"}},{key:"pause",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect();var O=new r.Event("pause");this.dispatchEvent(O),this._state="paused"}},{key:"resume",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.connect(this.processor),this.processor.connect(this.context.destination);var O=new r.Event("resume");this.dispatchEvent(O),this._state="recording"}},{key:"requestData",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this._postMessageToWorker("getEncodedData")}},{key:"stream",get:function(){return this._stream}},{key:"mimeType",get:function(){return this._mimeType}},{key:"state",get:function(){return this._state}},{key:"videoBitsPerSecond",get:function(){}},{key:"audioBitsPerSecond",get:function(){return this._audioBitsPerSecond}}])&&l(S.prototype,I),R&&l(S,R),D}(m);["start","stop","dataavailable","pause","resume","error"].forEach(function(v){return E(g.prototype,v)}),A&&A.name==="edge"&&(p=Worker.prototype.postMessage,Worker.prototype.postMessage=function(v){p.apply(this,[v])}),e.exports=g}).call(this,n(1))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){n.r(t),n.d(t,"defineEventAttribute",function(){return m}),n.d(t,"EventTarget",function(){return A});const r=new WeakMap,i=new WeakMap;function o(_){const g=r.get(_);return console.assert(g!=null,"'this' is expected an Event object, but got",_),g}function s(_,g){r.set(this,{eventTarget:_,event:g,eventPhase:2,currentTarget:_,canceled:!1,stopped:!1,passiveListener:null,timeStamp:g.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const v=Object.keys(g);for(let S=0;S<v.length;++S){const I=v[S];I in this||Object.defineProperty(this,I,a(I))}}function a(_){return{get(){return o(this).event[_]},set(g){o(this).event[_]=g},configurable:!0,enumerable:!0}}function l(_){return{value(){const g=o(this).event;return g[_].apply(g,arguments)},configurable:!0,enumerable:!0}}function c(_){if(_==null||_===Object.prototype)return s;let g=i.get(_);return g==null&&(g=function(v,S){const I=Object.keys(S);if(I.length===0)return v;function R(y,D){v.call(this,y,D)}R.prototype=Object.create(v.prototype,{constructor:{value:R,configurable:!0,writable:!0}});for(let y=0;y<I.length;++y){const D=I[y];if(!(D in v.prototype)){const O=typeof Object.getOwnPropertyDescriptor(S,D).value=="function";Object.defineProperty(R.prototype,D,O?l(D):a(D))}}return R}(c(Object.getPrototypeOf(_)),_),i.set(_,g)),g}function u(_){return o(_).stopped}function h(_,g){o(_).passiveListener=g}s.prototype={get type(){return o(this).event.type},get target(){return o(this).eventTarget},get currentTarget(){return o(this).currentTarget},composedPath(){const _=o(this).currentTarget;return _==null?[]:[_]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return o(this).eventPhase},stopPropagation(){const _=o(this);typeof _.event.stopPropagation=="function"&&_.event.stopPropagation()},stopImmediatePropagation(){const _=o(this);_.stopped=!0,typeof _.event.stopImmediatePropagation=="function"&&_.event.stopImmediatePropagation()},get bubbles(){return!!o(this).event.bubbles},get cancelable(){return!!o(this).event.cancelable},preventDefault(){const _=o(this);_.passiveListener==null?_.event.cancelable&&(_.canceled=!0,typeof _.event.preventDefault=="function"&&_.event.preventDefault()):console.warn("Event#preventDefault() was called from a passive listener:",_.passiveListener)},get defaultPrevented(){return o(this).canceled},get composed(){return!!o(this).event.composed},get timeStamp(){return o(this).timeStamp}},Object.defineProperty(s.prototype,"constructor",{value:s,configurable:!0,writable:!0}),typeof window!="undefined"&&window.Event!==void 0&&(Object.setPrototypeOf(s.prototype,window.Event.prototype),i.set(window.Event.prototype,s));const d=new WeakMap;function p(_){return _!==null&&typeof _=="object"}function f(_){const g=d.get(_);if(g==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return g}function m(_,g){Object.defineProperty(_,"on"+g,function(v){return{get(){let S=f(this).get(v);for(;S!=null;){if(S.listenerType===3)return S.listener;S=S.next}return null},set(S){typeof S=="function"||p(S)||(S=null);const I=f(this);let R=null,y=I.get(v);for(;y!=null;)y.listenerType===3?R!==null?R.next=y.next:y.next!==null?I.set(v,y.next):I.delete(v):R=y,y=y.next;if(S!==null){const D={listener:S,listenerType:3,passive:!1,once:!1,next:null};R===null?I.set(v,D):R.next=D}},configurable:!0,enumerable:!0}}(g))}function E(_){function g(){A.call(this)}g.prototype=Object.create(A.prototype,{constructor:{value:g,configurable:!0,writable:!0}});for(let v=0;v<_.length;++v)m(g.prototype,_[v]);return g}function A(){if(!(this instanceof A)){if(arguments.length===1&&Array.isArray(arguments[0]))return E(arguments[0]);if(arguments.length>0){const _=new Array(arguments.length);for(let g=0;g<arguments.length;++g)_[g]=arguments[g];return E(_)}throw new TypeError("Cannot call a class as a function")}d.set(this,new Map)}A.prototype={addEventListener(_,g,v){if(g==null)return!1;if(typeof g!="function"&&!p(g))throw new TypeError("'listener' should be a function or an object.");const S=f(this),I=p(v),R=(I?v.capture:v)?1:2,y={listener:g,listenerType:R,passive:I&&!!v.passive,once:I&&!!v.once,next:null};let D=S.get(_);if(D===void 0)return S.set(_,y),!0;let O=null;for(;D!=null;){if(D.listener===g&&D.listenerType===R)return!1;O=D,D=D.next}return O.next=y,!0},removeEventListener(_,g,v){if(g==null)return!1;const S=f(this),I=(p(v)?v.capture:v)?1:2;let R=null,y=S.get(_);for(;y!=null;){if(y.listener===g&&y.listenerType===I)return R!==null?R.next=y.next:y.next!==null?S.set(_,y.next):S.delete(_),!0;R=y,y=y.next}return!1},dispatchEvent(_){if(_==null||typeof _.type!="string")throw new TypeError('"event.type" should be a string.');const g=f(this),v=_.type;let S=g.get(v);if(S==null)return!0;const I=function(y,D){return new(c(Object.getPrototypeOf(D)))(y,D)}(this,_);let R=null;for(;S!=null;){if(S.once?R!==null?R.next=S.next:S.next!==null?g.set(v,S.next):g.delete(v):R=S,h(I,S.passive?S.listener:null),typeof S.listener=="function")try{S.listener.call(this,I)}catch(y){typeof console!="undefined"&&typeof console.error=="function"&&console.error(y)}else S.listenerType!==3&&typeof S.listener.handleEvent=="function"&&S.listener.handleEvent(I);if(u(I))break;S=S.next}return h(I,null),function(y,D){o(y).eventPhase=D}(I,0),function(y,D){o(y).currentTarget=D}(I,null),!I.defaultPrevented}},Object.defineProperty(A.prototype,"constructor",{value:A,configurable:!0,writable:!0}),typeof window!="undefined"&&window.EventTarget!==void 0&&Object.setPrototypeOf(A.prototype,window.EventTarget.prototype),t.default=A},function(e,t,n){(function(r){var i=this&&this.__spreadArrays||function(){for(var p=0,f=0,m=arguments.length;f<m;f++)p+=arguments[f].length;var E=Array(p),A=0;for(f=0;f<m;f++)for(var _=arguments[f],g=0,v=_.length;g<v;g++,A++)E[A]=_[g];return E};Object.defineProperty(t,"__esModule",{value:!0});var o=function(p,f,m){this.name=p,this.version=f,this.os=m};t.BrowserInfo=o;var s=function(p){this.version=p,this.name="node",this.os=r.platform};t.NodeInfo=s;var a=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};t.BotInfo=a;var l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/Edg\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],c=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function u(p){var f=p!==""&&l.reduce(function(_,g){var v=g[0],S=g[1];if(_)return _;var I=S.exec(p);return!!I&&[v,I]},!1);if(!f)return null;var m=f[0],E=f[1];if(m==="searchbot")return new a;var A=E[1]&&E[1].split(/[._]/).slice(0,3);return A?A.length<3&&(A=i(A,function(_){for(var g=[],v=0;v<_;v++)g.push("0");return g}(3-A.length))):A=[],new o(m,A.join("."),h(p))}function h(p){for(var f=0,m=c.length;f<m;f++){var E=c[f],A=E[0];if(E[1].test(p))return A}return null}function d(){return r!==void 0&&r.version?new s(r.version.slice(1)):null}t.detect=function(p){return p?u(p):typeof navigator!="undefined"?u(navigator.userAgent):d()},t.parseUserAgent=u,t.detectOS=h,t.getNodeVersion=d}).call(this,n(4))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(E){if(n===setTimeout)return setTimeout(E,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(E,0);try{return n(E,0)}catch(A){try{return n.call(null,E,0)}catch(_){return n.call(this,E,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch(E){n=o}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch(E){r=s}})();var l,c=[],u=!1,h=-1;function d(){u&&l&&(u=!1,l.length?c=l.concat(c):h=-1,c.length&&p())}function p(){if(!u){var E=a(d);u=!0;for(var A=c.length;A;){for(l=c,c=[];++h<A;)l&&l[h].run();h=-1,A=c.length}l=null,u=!1,function(_){if(r===clearTimeout)return clearTimeout(_);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(_);try{r(_)}catch(g){try{return r.call(null,_)}catch(v){return r.call(this,_)}}}(E)}}function f(E,A){this.fun=E,this.array=A}function m(){}i.nextTick=function(E){var A=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)A[_-1]=arguments[_];c.push(new f(E,A)),c.length!==1||u||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(E){return[]},i.binding=function(E){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(E){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}]);const YS=Xu(sA.exports);var zp,Dl,aA={exports:{}};zp=aA,typeof OpusMediaRecorder!="undefined"&&OpusMediaRecorder,Dl=function(){return function(){(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=5)})([function(e,t,n){(function(r){function i(a,l){for(var c=0,u=a.length-1;u>=0;u--){var h=a[u];h==="."?a.splice(u,1):h===".."?(a.splice(u,1),c++):c&&(a.splice(u,1),c--)}if(l)for(;c--;c)a.unshift("..");return a}function o(a,l){if(a.filter)return a.filter(l);for(var c=[],u=0;u<a.length;u++)l(a[u],u,a)&&c.push(a[u]);return c}t.resolve=function(){for(var a="",l=!1,c=arguments.length-1;c>=-1&&!l;c--){var u=c>=0?arguments[c]:r.cwd();if(typeof u!="string")throw new TypeError("Arguments to path.resolve must be strings");u&&(a=u+"/"+a,l=u.charAt(0)==="/")}return(l?"/":"")+(a=i(o(a.split("/"),function(h){return!!h}),!l).join("/"))||"."},t.normalize=function(a){var l=t.isAbsolute(a),c=s(a,-1)==="/";return(a=i(o(a.split("/"),function(u){return!!u}),!l).join("/"))||l||(a="."),a&&c&&(a+="/"),(l?"/":"")+a},t.isAbsolute=function(a){return a.charAt(0)==="/"},t.join=function(){var a=Array.prototype.slice.call(arguments,0);return t.normalize(o(a,function(l,c){if(typeof l!="string")throw new TypeError("Arguments to path.join must be strings");return l}).join("/"))},t.relative=function(a,l){function c(E){for(var A=0;A<E.length&&E[A]==="";A++);for(var _=E.length-1;_>=0&&E[_]==="";_--);return A>_?[]:E.slice(A,_-A+1)}a=t.resolve(a).substr(1),l=t.resolve(l).substr(1);for(var u=c(a.split("/")),h=c(l.split("/")),d=Math.min(u.length,h.length),p=d,f=0;f<d;f++)if(u[f]!==h[f]){p=f;break}var m=[];for(f=p;f<u.length;f++)m.push("..");return(m=m.concat(h.slice(p))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(a){if(typeof a!="string"&&(a+=""),a.length===0)return".";for(var l=a.charCodeAt(0),c=l===47,u=-1,h=!0,d=a.length-1;d>=1;--d)if((l=a.charCodeAt(d))===47){if(!h){u=d;break}}else h=!1;return u===-1?c?"/":".":c&&u===1?"/":a.slice(0,u)},t.basename=function(a,l){var c=function(u){typeof u!="string"&&(u+="");var h,d=0,p=-1,f=!0;for(h=u.length-1;h>=0;--h)if(u.charCodeAt(h)===47){if(!f){d=h+1;break}}else p===-1&&(f=!1,p=h+1);return p===-1?"":u.slice(d,p)}(a);return l&&c.substr(-1*l.length)===l&&(c=c.substr(0,c.length-l.length)),c},t.extname=function(a){typeof a!="string"&&(a+="");for(var l=-1,c=0,u=-1,h=!0,d=0,p=a.length-1;p>=0;--p){var f=a.charCodeAt(p);if(f!==47)u===-1&&(h=!1,u=p+1),f===46?l===-1?l=p:d!==1&&(d=1):l!==-1&&(d=-1);else if(!h){c=p+1;break}}return l===-1||u===-1||d===0||d===1&&l===u-1&&l===c+1?"":a.slice(l,u)};var s="ab".substr(-1)==="b"?function(a,l,c){return a.substr(l,c)}:function(a,l,c){return l<0&&(l=a.length+l),a.substr(l,c)}}).call(this,n(2))},function(e,t){function n(A){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _})(A)}function r(A,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(_&&_.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),_&&i(A,_)}function i(A,_){return(i=Object.setPrototypeOf||function(g,v){return g.__proto__=v,g})(A,_)}function o(A){var _=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(g){return!1}}();return function(){var g,v=a(A);if(_){var S=a(this).constructor;g=Reflect.construct(v,arguments,S)}else g=v.apply(this,arguments);return s(this,g)}}function s(A,_){return!_||n(_)!=="object"&&typeof _!="function"?function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(A):_}function a(A){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)})(A)}function l(A,_){if(!(A instanceof _))throw new TypeError("Cannot call a class as a function")}function c(A,_,g){return _&&function(v,S){for(var I=0;I<S.length;I++){var R=S[I];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(v,R.key,R)}}(A.prototype,_),A}var u=function(){function A(_,g,v,S){switch(l(this,A),this._size=g,this._module=_,this._size){case 1:this._heapArray=v?this._module.HEAP8:this._module.HEAPU8;break;case 2:this._heapArray=v?this._module.HEAP16:this._module.HEAPU16;break;case 4:this._heapArray=v?this._module.HEAP32:this._module.HEAPU32;break;default:this._heapArray=this._module.HEAPU8}S&&(this._size=4,this._heapArray=this._module.HEAPF32),this._pointer=this._module._malloc(g)}return c(A,[{key:"free",value:function(){this._module._free(this.pointer)}},{key:"pointer",get:function(){return this._pointer}},{key:"value",get:function(){var _=0;switch(this._size){case 2:_=1;break;case 4:_=2;break;default:throw new Error("Pointer can be only deferenced as integer-sized")}return this._heapArray[this.pointer>>_]},set:function(_){var g=0;switch(this._size){case 2:g=1;break;case 4:g=2;break;default:throw new Error("Pointer can be only deferenced as integer-sized")}this._heapArray[this.pointer>>g]=_}}]),A}(),h=function(A){r(g,A);var _=o(g);function g(v,S){var I;return l(this,g),I=_.call(this,v,4,!0,!1),S!==void 0&&(I.value=S),I}return g}(u),d=function(A){r(g,A);var _=o(g);function g(v,S){var I;return l(this,g),I=_.call(this,v,4,!1,!1),S!==void 0&&(I.value=S),I}return g}(u),p=function(A){r(g,A);var _=o(g);function g(v,S,I,R,y){var D;l(this,g),D=_.call(this,v,S*I,R,y);var O=0;switch(I){case 1:D._heapArray=R?D._module.HEAP8:D._module.HEAPU8,O=0;break;case 2:D._heapArray=R?D._module.HEAP16:D._module.HEAPU16,O=1;break;case 4:D._heapArray=R?D._module.HEAP32:D._module.HEAPU32,O=2;break;default:throw new Error("Unit size must be an integer-size")}y&&(D._heapArray=D._module.HEAPF32,O=2);var C=D._pointer>>O;return D._buffer=D._heapArray.subarray(C,C+S),D._length=S,D}return c(g,[{key:"set",value:function(v,S){this._buffer.set(v,S)}},{key:"subarray",value:function(v,S){return this._buffer.subarray(v,S)}},{key:"length",get:function(){return this._length}}]),g}(u),f=function(A){r(g,A);var _=o(g);function g(v,S){return l(this,g),_.call(this,v,S,4,!0,!0)}return g}(p),m=function(A){r(g,A);var _=o(g);function g(v,S){return l(this,g),_.call(this,v,S,1,!1,!1)}return g}(p),E=function(){function A(_){l(this,A),this._module=_}return c(A,[{key:"mallocInt32",value:function(_){return new h(this._module,_)}},{key:"mallocUint32",value:function(_){return new d(this._module,_)}},{key:"mallocUint8Buffer",value:function(_){return new m(this._module,_)}},{key:"mallocFloat32Buffer",value:function(_){return new f(this._module,_)}}]),A}();e.exports={writeString:function(A,_,g){for(var v=0;v<g.length;v++)A.setUint8(_+v,g.charCodeAt(v))},EmscriptenMemoryAllocator:E}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(E){if(n===setTimeout)return setTimeout(E,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(E,0);try{return n(E,0)}catch(A){try{return n.call(null,E,0)}catch(_){return n.call(this,E,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch(E){n=o}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch(E){r=s}})();var l,c=[],u=!1,h=-1;function d(){u&&l&&(u=!1,l.length?c=l.concat(c):h=-1,c.length&&p())}function p(){if(!u){var E=a(d);u=!0;for(var A=c.length;A;){for(l=c,c=[];++h<A;)l&&l[h].run();h=-1,A=c.length}l=null,u=!1,function(_){if(r===clearTimeout)return clearTimeout(_);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(_);try{r(_)}catch(g){try{return r.call(null,_)}catch(v){return r.call(this,_)}}}(E)}}function f(E,A){this.fun=E,this.array=A}function m(){}i.nextTick=function(E){var A=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)A[_-1]=arguments[_];c.push(new f(E,A)),c.length!==1||u||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(E){return[]},i.binding=function(E){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(E){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){e.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},function(e,t){},function(e,t,n){function r(i){var o,s=n(6),a=n(7),l=n(8);i.onmessage=function(c){var u=c.data.command;switch(u){case"loadEncoder":var h,d=c.data,p=d.mimeType,f=d.wasmPath;switch(p){case"audio/wav":case"audio/wave":h=s;break;case"audio/webm":h=a;break;case"audio/ogg":h=l}var m={};f&&(m.locateFile=function(y,D){return y.match(/.wasm/)?f:D+y}),h(m).then(function(y){o=y,self.postMessage({command:"readyToInit"})});break;case"init":var E=c.data,A=E.sampleRate,_=E.channelCount,g=E.bitsPerSecond;o.init(A,_,g);break;case"pushInputData":for(var v=c.data,S=v.channelBuffers,I=(v.length,v.duration,0);I<S.length;I++)S[I]=new Float32Array(S[I].buffer);o.encode(S);break;case"getEncodedData":case"done":u==="done"&&o.close();var R=o.flush();self.postMessage({command:u==="done"?"lastEncodedData":"encodedData",buffers:R},R),u==="done"&&self.close()}}}typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&r(self),e.exports=r},function(e,t,n){function r(a,l){(l==null||l>a.length)&&(l=a.length);for(var c=0,u=new Array(l);c<l;c++)u[c]=a[c];return u}var i=n(1).writeString,o=Int16Array.BYTES_PER_ELEMENT,s=function(){function a(c,u,h){(function(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")})(this,a),this.config={inputSampleRate:c,channelCount:u},this.encodedBuffers=[]}var l;return(l=[{key:"encode",value:function(c){for(var u=c[0].length,h=new ArrayBuffer(u*o*this.config.channelCount),d=new DataView(h),p=0;p<this.config.channelCount;p++)for(var f=c[p],m=0;m<u;m++){var E=32767*f[m]|0;E>32767?E=32767:E<-32768&&(E=-32768);var A=(m*this.config.channelCount+p)*o;d.setInt16(A,0|E,!0)}this.encodedBuffers.push(h)}},{key:"getHeader",value:function(){var c=this.encodedBuffers.reduce(function(d,p){return d+p.byteLength},0),u=new ArrayBuffer(44),h=new DataView(u);return i(h,0,"RIFF"),h.setUint32(4,36+c,!0),i(h,8,"WAVE"),i(h,12,"fmt "),h.setUint32(16,16,!0),h.setUint16(20,1,!0),h.setUint16(22,this.config.channelCount,!0),h.setUint32(24,this.config.inputSampleRate,!0),h.setUint32(28,this.config.inputSampleRate*o*this.config.channelCount,!0),h.setUint16(32,o*this.config.channelCount,!0),h.setUint16(34,8*o,!0),i(h,36,"data"),h.setUint32(40,c,!0),u}}])&&function(c,u){for(var h=0;h<u.length;h++){var d=u[h];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(c,d.key,d)}}(a.prototype,l),a}();e.exports=function(a){return new Promise(function(l,c){(a=a!==void 0&&a||{}).init=function(u,h,d){a.encoder=new s(u,h,d)},a.encode=function(u){a.encoder.encode(u)},a.flush=function(){var u=a.encoder.getHeader(),h=a.encoder.encodedBuffers.splice(0,a.encoder.encodedBuffers.length);return[u].concat(function(d){return function(p){if(Array.isArray(p))return r(p)}(d)||function(p){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(p))return Array.from(p)}(d)||function(p,f){if(p){if(typeof p=="string")return r(p,f);var m=Object.prototype.toString.call(p).slice(8,-1);return m==="Object"&&p.constructor&&(m=p.constructor.name),m==="Map"||m==="Set"?Array.from(p):m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m)?r(p,f):void 0}}(d)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
100
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(h))},a.close=function(){},l(a)})}},function(e,t,n){(function(r,i,o,s){var a;function l(d){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}function c(d,p,f){return p&&function(m,E){for(var A=0;A<E.length;A++){var _=E[A];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}(d.prototype,p),d}var u,h=(u=(u=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0)||r,function(d){d=(d=d||{})!==void 0?d:{};var p=n(1).EmscriptenMemoryAllocator,f=48e3,m=function(){function T(N,M){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;(function(z,V){if(!(z instanceof V))throw new TypeError("Cannot call a class as a function")})(this,T),this.config={inputSampleRate:N,channelCount:M},this.memory=new p(d),this._opus_encoder_create=d._opus_encoder_create,this._opus_encoder_ctl=d._opus_encoder_ctl,this._opus_encode_float=d._opus_encode_float,this._opus_encoder_destroy=d._opus_encoder_destroy,this._speex_resampler_init=d._speex_resampler_init,this._speex_resampler_process_interleaved_float=d._speex_resampler_process_interleaved_float,this._speex_resampler_destroy=d._speex_resampler_destroy,this._container=new d.Container,this._container.init(f,M,Math.floor(4294967295*Math.random())),this.OpusInitCodec(f,M,$),this.SpeexInitResampler(N,f,M),this.inputSamplesPerChannel=20*N/1e3,this.outputSamplePerChannel=960,this.inputBufferIndex=0,this.mInputBuffer=this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel*M),this.mResampledBuffer=this.memory.mallocFloat32Buffer(this.outputSamplePerChannel*M),this.mOutputBuffer=this.memory.mallocUint8Buffer(4e3),this.interleavedBuffers=M!==1?new Float32Array(4096*M):void 0}return c(T,[{key:"encode",value:function(N){for(var M=this.interleave(N),$=0;$<M.length;){var z=Math.min(this.mInputBuffer.length-this.inputBufferIndex,M.length-$);if(this.mInputBuffer.set(M.subarray($,$+z),this.inputBufferIndex),this.inputBufferIndex+=z,this.inputBufferIndex>=this.mInputBuffer.length){var V=this.memory.mallocUint32(this.inputSamplesPerChannel),et=this.memory.mallocUint32(this.outputSamplePerChannel),Ct=this._speex_resampler_process_interleaved_float(this.resampler,this.mInputBuffer.pointer,V.pointer,this.mResampledBuffer.pointer,et.pointer);if(V.free(),et.free(),Ct!==0)throw new Error("Resampling error.");var xt=this._opus_encode_float(this.encoder,this.mResampledBuffer.pointer,this.outputSamplePerChannel,this.mOutputBuffer.pointer,this.mOutputBuffer.length);if(xt<0)throw new Error("Opus encoding error.");this._container.writeFrame(this.mOutputBuffer.pointer,xt,this.outputSamplePerChannel),this.inputBufferIndex=0}$+=z}}},{key:"close",value:function(){for(var N=this.config.channelCount,M=[],$=0;$<N;++$)M.push(new Float32Array(4096-this.inputBufferIndex/N));this.encode(M),d.destroy(this._container),this.mInputBuffer.free(),this.mResampledBuffer.free(),this.mOutputBuffer.free(),this._opus_encoder_destroy(this.encoder),this._speex_resampler_destroy(this.resampler)}},{key:"interleave",value:function(N){var M=N.length;if(M===1)return N[0];for(var $=0;$<M;$++)for(var z=N[$],V=0;V<z.length;V++)this.interleavedBuffers[V*M+$]=z[V];return this.interleavedBuffers}},{key:"OpusInitCodec",value:function(N,M){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,z=this.memory.mallocUint32(void 0);this.encoder=this._opus_encoder_create(N,M,2049,z.pointer);var V=z.value;if(z.free(),V!==0)throw new Error("Opus encodor initialization failed.");$&&this.OpusSetOpusControl(4002,$)}},{key:"OpusSetOpusControl",value:function(N,M){var $=this.memory.mallocInt32(M);this._opus_encoder_ctl(this.encoder,N,$.pointer),$.free()}},{key:"SpeexInitResampler",value:function(N,M,$){var z=this.memory.mallocUint32(void 0);this.resampler=this._speex_resampler_init($,N,M,6,z.pointer);var V=z.value;if(z.free(),V!==0)throw new Error("Initializing resampler failed.")}}]),T}();d.init=function(T,N,M){d.encodedBuffers=[],d.encoder=new m(T,N,M)},d.encode=function(T){d.encoder.encode(T)},d.flush=function(){return d.encodedBuffers.splice(0,d.encodedBuffers.length)},d.close=function(){d.encoder.close()};var E,A,_,g,v,S={};for(E in d)d.hasOwnProperty(E)&&(S[E]=d[E]);A=(typeof window=="undefined"?"undefined":l(window))==="object",_=typeof importScripts=="function",g=(i===void 0?"undefined":l(i))==="object"&&l(i.versions)==="object"&&typeof i.versions.node=="string",v=!A&&!g&&!_;var I,R,y,D,O="";g?(O=_?n(0).dirname(O)+"/":o+"/",I=function(T,N){return y||(y=n(4)),D||(D=n(0)),T=D.normalize(T),y.readFileSync(T,N?null:"utf8")},R=function(T){var N=I(T,!0);return N.buffer||(N=new Uint8Array(N)),B(N.buffer),N},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),i.argv.slice(2),i.on("uncaughtException",function(T){if(!(T instanceof pr))throw T}),i.on("unhandledRejection",Rt),d.inspect=function(){return"[Emscripten Module object]"}):v?(typeof read!="undefined"&&(I=function(T){return read(T)}),R=function(T){var N;return typeof readbuffer=="function"?new Uint8Array(readbuffer(T)):(B(l(N=read(T,"binary"))==="object"),N)},typeof scriptArgs!="undefined"&&scriptArgs,typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(A||_)&&(_?O=self.location.href:document.currentScript&&(O=document.currentScript.src),u&&(O=u),O=O.indexOf("blob:")!==0?O.substr(0,O.lastIndexOf("/")+1):"",I=function(T){var N=new XMLHttpRequest;return N.open("GET",T,!1),N.send(null),N.responseText},_&&(R=function(T){var N=new XMLHttpRequest;return N.open("GET",T,!1),N.responseType="arraybuffer",N.send(null),new Uint8Array(N.response)}));var C,b,L=d.print||console.log.bind(console),w=d.printErr||console.warn.bind(console);for(E in S)S.hasOwnProperty(E)&&(d[E]=S[E]);S=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit,d.wasmBinary&&(C=d.wasmBinary),d.noExitRuntime&&d.noExitRuntime,(typeof WebAssembly=="undefined"?"undefined":l(WebAssembly))!=="object"&&w("no native wasm support detected");var F=new WebAssembly.Table({initial:60,maximum:60,element:"anyfunc"}),H=!1;function B(T,N){T||Rt("Assertion failed: "+N)}var K,X,G,W=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function St(T,N,M){for(var $=N+M,z=N;T[z]&&!(z>=$);)++z;if(z-N>16&&T.subarray&&W)return W.decode(T.subarray(N,z));for(var V="";N<z;){var et=T[N++];if(128&et){var Ct=63&T[N++];if((224&et)!=192){var xt=63&T[N++];if((et=(240&et)==224?(15&et)<<12|Ct<<6|xt:(7&et)<<18|Ct<<12|xt<<6|63&T[N++])<65536)V+=String.fromCharCode(et);else{var Tn=et-65536;V+=String.fromCharCode(55296|Tn>>10,56320|1023&Tn)}}else V+=String.fromCharCode((31&et)<<6|Ct)}else V+=String.fromCharCode(et)}return V}function tt(T,N){return T?St(X,T,N):""}typeof TextDecoder!="undefined"&&new TextDecoder("utf-16le");var rt=d.INITIAL_MEMORY||16777216;function it(T){for(;T.length>0;){var N=T.shift();if(typeof N!="function"){var M=N.func;typeof M=="number"?N.arg===void 0?d.dynCall_v(M):d.dynCall_vi(M,N.arg):M(N.arg===void 0?null:N.arg)}else N()}}(b=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:rt/65536,maximum:rt/65536}))&&(K=b.buffer),rt=K.byteLength,function(T){K=T,d.HEAP8=new Int8Array(T),d.HEAP16=new Int16Array(T),d.HEAP32=G=new Int32Array(T),d.HEAPU8=X=new Uint8Array(T),d.HEAPU16=new Uint16Array(T),d.HEAPU32=new Uint32Array(T),d.HEAPF32=new Float32Array(T),d.HEAPF64=new Float64Array(T)}(K),G[11496]=5289024;var bt=[],te=[],Gt=[],Ot=[];function Pt(T){bt.unshift(T)}function ve(T){Ot.unshift(T)}var ft=0,Mt=null;function Rt(T){throw d.onAbort&&d.onAbort(T),L(T+=""),w(T),H=!0,T="abort("+T+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(T)}d.preloadedImages={},d.preloadedAudios={};var he="data:application/octet-stream;base64,";function $e(T){return String.prototype.startsWith?T.startsWith(he):T.indexOf(he)===0}var ut="WebMOpusEncoder.wasm";function pe(){try{if(C)return new Uint8Array(C);if(R)return R(ut);throw"both async and sync fetching of the wasm failed"}catch(T){Rt(T)}}$e(ut)||(ut=function(T){return d.locateFile?d.locateFile(T,O):O+T}(ut)),te.push({func:function(){ur()}});var It={mappings:{},buffers:[null,[],[]],printChar:function(T,N){var M=It.buffers[T];N===0||N===10?((T===1?L:w)(St(M,0)),M.length=0):M.push(N)},varargs:void 0,get:function(){return It.varargs+=4,G[It.varargs-4>>2]},getStr:function(T){return tt(T)},get64:function(T,N){return T}},Pi={a:function(T,N,M,$){Rt("Assertion failed: "+tt(T)+", at: "+[N?tt(N):"unknown filename",M,$?tt($):"unknown function"])},e:function(T,N,M){return It.varargs=M,0},h:function(T,N,M){It.varargs=M},g:function(T,N,M){return It.varargs=M,0},b:function(){Rt()},m:function(T,N){var M=new Uint8Array(d.HEAPU8.buffer,T,N);d.encodedBuffers.push(new Uint8Array(M).buffer)},k:function(T,N,M){X.copyWithin(T,N,N+M)},l:function(T){Rt("OOM")},c:function(T){return 0},f:function(T,N,M,$){var z=It.getStreamFromFD(T),V=It.doReadv(z,N,M);return G[$>>2]=V,0},j:function(T,N,M,$,z){},d:function(T,N,M,$){for(var z=0,V=0;V<M;V++){for(var et=G[N+8*V>>2],Ct=G[N+(8*V+4)>>2],xt=0;xt<Ct;xt++)It.printChar(T,X[et+xt]);z+=Ct}return G[$>>2]=z,0},memory:b,table:F,i:function(T){var N=Date.now()/1e3|0;return T&&(G[T>>2]=N),N}},rn=function(){var T={a:Pi};function N(z,V){var et=z.exports;d.asm=et,function(){if(ft--,d.monitorRunDependencies&&d.monitorRunDependencies(ft),ft==0&&Mt){var Ct=Mt;Mt=null,Ct()}}()}function M(z){N(z.instance)}function $(z){return(C||!A&&!_||typeof fetch!="function"?new Promise(function(V,et){V(pe())}):fetch(ut,{credentials:"same-origin"}).then(function(V){if(!V.ok)throw"failed to load wasm binary file at '"+ut+"'";return V.arrayBuffer()}).catch(function(){return pe()})).then(function(V){return WebAssembly.instantiate(V,T)}).then(z,function(V){w("failed to asynchronously prepare wasm: "+V),Rt(V)})}if(ft++,d.monitorRunDependencies&&d.monitorRunDependencies(ft),d.instantiateWasm)try{return d.instantiateWasm(T,N)}catch(z){return w("Module.instantiateWasm callback failed with error: "+z),!1}return function(){if(C||typeof WebAssembly.instantiateStreaming!="function"||$e(ut)||typeof fetch!="function")return $(M);fetch(ut,{credentials:"same-origin"}).then(function(z){return WebAssembly.instantiateStreaming(z,T).then(M,function(V){w("wasm streaming compile failed: "+V),w("falling back to ArrayBuffer instantiation"),$(M)})})}(),{}}();d.asm=rn;var Se,ur=d.___wasm_call_ctors=function(){return(ur=d.___wasm_call_ctors=d.asm.n).apply(null,arguments)},cr=(d.___em_js__emscriptenPushBuffer=function(){return(d.___em_js__emscriptenPushBuffer=d.asm.o).apply(null,arguments)},d._emscripten_bind_VoidPtr___destroy___0=function(){return(cr=d._emscripten_bind_VoidPtr___destroy___0=d.asm.p).apply(null,arguments)}),jn=d._emscripten_bind_Container_Container_0=function(){return(jn=d._emscripten_bind_Container_Container_0=d.asm.q).apply(null,arguments)},dr=d._emscripten_bind_Container_init_3=function(){return(dr=d._emscripten_bind_Container_init_3=d.asm.r).apply(null,arguments)},hr=d._emscripten_bind_Container_writeFrame_3=function(){return(hr=d._emscripten_bind_Container_writeFrame_3=d.asm.s).apply(null,arguments)},on=d._emscripten_bind_Container___destroy___0=function(){return(on=d._emscripten_bind_Container___destroy___0=d.asm.t).apply(null,arguments)};function pr(T){this.name="ExitStatus",this.message="Program terminated with exit("+T+")",this.status=T}function sn(T){function N(){Se||(Se=!0,d.calledRun=!0,H||(it(te),it(Gt),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)ve(d.postRun.shift());it(Ot)}()))}ft>0||(function(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)Pt(d.preRun.shift());it(bt)}(),ft>0||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),N()},1)):N()))}if(d._opus_encoder_create=function(){return(d._opus_encoder_create=d.asm.u).apply(null,arguments)},d._opus_encode_float=function(){return(d._opus_encode_float=d.asm.v).apply(null,arguments)},d._opus_encoder_ctl=function(){return(d._opus_encoder_ctl=d.asm.w).apply(null,arguments)},d._opus_encoder_destroy=function(){return(d._opus_encoder_destroy=d.asm.x).apply(null,arguments)},d._speex_resampler_init=function(){return(d._speex_resampler_init=d.asm.y).apply(null,arguments)},d._speex_resampler_destroy=function(){return(d._speex_resampler_destroy=d.asm.z).apply(null,arguments)},d._speex_resampler_process_interleaved_float=function(){return(d._speex_resampler_process_interleaved_float=d.asm.A).apply(null,arguments)},d._free=function(){return(d._free=d.asm.B).apply(null,arguments)},d._malloc=function(){return(d._malloc=d.asm.C).apply(null,arguments)},d.dynCall_vi=function(){return(d.dynCall_vi=d.asm.D).apply(null,arguments)},d.dynCall_v=function(){return(d.dynCall_v=d.asm.E).apply(null,arguments)},d.asm=rn,d.then=function(T){if(Se)T(d);else{var N=d.onRuntimeInitialized;d.onRuntimeInitialized=function(){N&&N(),T(d)}}return d},Mt=function T(){Se||sn(),Se||(Mt=T)},d.run=sn,d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Dt(){}function ke(T){return(T||Dt).__cache__}function Sn(T,N){var M=ke(N),$=M[T];return $||(($=Object.create((N||Dt).prototype)).ptr=T,M[T]=$)}function yt(){throw"cannot construct a VoidPtr, no constructor in IDL"}function ht(){this.ptr=jn(),ke(ht)[this.ptr]=this}return sn(),Dt.prototype=Object.create(Dt.prototype),Dt.prototype.constructor=Dt,Dt.prototype.__class__=Dt,Dt.__cache__={},d.WrapperObject=Dt,d.getCache=ke,d.wrapPointer=Sn,d.castObject=function(T,N){return Sn(T.ptr,N)},d.NULL=Sn(0),d.destroy=function(T){if(!T.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";T.__destroy__(),delete ke(T.__class__)[T.ptr]},d.compare=function(T,N){return T.ptr===N.ptr},d.getPointer=function(T){return T.ptr},d.getClass=function(T){return T.__class__},yt.prototype=Object.create(Dt.prototype),yt.prototype.constructor=yt,yt.prototype.__class__=yt,yt.__cache__={},d.VoidPtr=yt,yt.prototype.__destroy__=yt.prototype.__destroy__=function(){var T=this.ptr;cr(T)},ht.prototype=Object.create(Dt.prototype),ht.prototype.constructor=ht,ht.prototype.__class__=ht,ht.__cache__={},d.Container=ht,ht.prototype.init=ht.prototype.init=function(T,N,M){var $=this.ptr;T&&l(T)==="object"&&(T=T.ptr),N&&l(N)==="object"&&(N=N.ptr),M&&l(M)==="object"&&(M=M.ptr),dr($,T,N,M)},ht.prototype.writeFrame=ht.prototype.writeFrame=function(T,N,M){var $=this.ptr;T&&l(T)==="object"&&(T=T.ptr),N&&l(N)==="object"&&(N=N.ptr),M&&l(M)==="object"&&(M=M.ptr),hr($,T,N,M)},ht.prototype.__destroy__=ht.prototype.__destroy__=function(){var T=this.ptr;on(T)},d});l(t)==="object"&&l(s)==="object"?s.exports=h:(a=function(){return h}.apply(t,[]))===void 0||(s.exports=a)}).call(this,"/index.js",n(2),"/",n(3)(e))},function(e,t,n){(function(r,i,o,s){var a;function l(d){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}function c(d,p,f){return p&&function(m,E){for(var A=0;A<E.length;A++){var _=E[A];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}(d.prototype,p),d}var u,h=(u=(u=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0)||r,function(d){d=(d=d||{})!==void 0?d:{};var p=n(1).EmscriptenMemoryAllocator,f=48e3,m=function(){function T(N,M){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;(function(z,V){if(!(z instanceof V))throw new TypeError("Cannot call a class as a function")})(this,T),this.config={inputSampleRate:N,channelCount:M},this.memory=new p(d),this._opus_encoder_create=d._opus_encoder_create,this._opus_encoder_ctl=d._opus_encoder_ctl,this._opus_encode_float=d._opus_encode_float,this._opus_encoder_destroy=d._opus_encoder_destroy,this._speex_resampler_init=d._speex_resampler_init,this._speex_resampler_process_interleaved_float=d._speex_resampler_process_interleaved_float,this._speex_resampler_destroy=d._speex_resampler_destroy,this._container=new d.Container,this._container.init(f,M,Math.floor(4294967295*Math.random())),this.OpusInitCodec(f,M,$),this.SpeexInitResampler(N,f,M),this.inputSamplesPerChannel=20*N/1e3,this.outputSamplePerChannel=960,this.inputBufferIndex=0,this.mInputBuffer=this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel*M),this.mResampledBuffer=this.memory.mallocFloat32Buffer(this.outputSamplePerChannel*M),this.mOutputBuffer=this.memory.mallocUint8Buffer(4e3),this.interleavedBuffers=M!==1?new Float32Array(4096*M):void 0}return c(T,[{key:"encode",value:function(N){for(var M=this.interleave(N),$=0;$<M.length;){var z=Math.min(this.mInputBuffer.length-this.inputBufferIndex,M.length-$);if(this.mInputBuffer.set(M.subarray($,$+z),this.inputBufferIndex),this.inputBufferIndex+=z,this.inputBufferIndex>=this.mInputBuffer.length){var V=this.memory.mallocUint32(this.inputSamplesPerChannel),et=this.memory.mallocUint32(this.outputSamplePerChannel),Ct=this._speex_resampler_process_interleaved_float(this.resampler,this.mInputBuffer.pointer,V.pointer,this.mResampledBuffer.pointer,et.pointer);if(V.free(),et.free(),Ct!==0)throw new Error("Resampling error.");var xt=this._opus_encode_float(this.encoder,this.mResampledBuffer.pointer,this.outputSamplePerChannel,this.mOutputBuffer.pointer,this.mOutputBuffer.length);if(xt<0)throw new Error("Opus encoding error.");this._container.writeFrame(this.mOutputBuffer.pointer,xt,this.outputSamplePerChannel),this.inputBufferIndex=0}$+=z}}},{key:"close",value:function(){for(var N=this.config.channelCount,M=[],$=0;$<N;++$)M.push(new Float32Array(4096-this.inputBufferIndex/N));this.encode(M),d.destroy(this._container),this.mInputBuffer.free(),this.mResampledBuffer.free(),this.mOutputBuffer.free(),this._opus_encoder_destroy(this.encoder),this._speex_resampler_destroy(this.resampler)}},{key:"interleave",value:function(N){var M=N.length;if(M===1)return N[0];for(var $=0;$<M;$++)for(var z=N[$],V=0;V<z.length;V++)this.interleavedBuffers[V*M+$]=z[V];return this.interleavedBuffers}},{key:"OpusInitCodec",value:function(N,M){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,z=this.memory.mallocUint32(void 0);this.encoder=this._opus_encoder_create(N,M,2049,z.pointer);var V=z.value;if(z.free(),V!==0)throw new Error("Opus encodor initialization failed.");$&&this.OpusSetOpusControl(4002,$)}},{key:"OpusSetOpusControl",value:function(N,M){var $=this.memory.mallocInt32(M);this._opus_encoder_ctl(this.encoder,N,$.pointer),$.free()}},{key:"SpeexInitResampler",value:function(N,M,$){var z=this.memory.mallocUint32(void 0);this.resampler=this._speex_resampler_init($,N,M,6,z.pointer);var V=z.value;if(z.free(),V!==0)throw new Error("Initializing resampler failed.")}}]),T}();d.init=function(T,N,M){d.encodedBuffers=[],d.encoder=new m(T,N,M)},d.encode=function(T){d.encoder.encode(T)},d.flush=function(){return d.encodedBuffers.splice(0,d.encodedBuffers.length)},d.close=function(){d.encoder.close()};var E,A,_,g,v,S={};for(E in d)d.hasOwnProperty(E)&&(S[E]=d[E]);A=(typeof window=="undefined"?"undefined":l(window))==="object",_=typeof importScripts=="function",g=(i===void 0?"undefined":l(i))==="object"&&l(i.versions)==="object"&&typeof i.versions.node=="string",v=!A&&!g&&!_;var I,R,y,D,O="";g?(O=_?n(0).dirname(O)+"/":o+"/",I=function(T,N){return y||(y=n(4)),D||(D=n(0)),T=D.normalize(T),y.readFileSync(T,N?null:"utf8")},R=function(T){var N=I(T,!0);return N.buffer||(N=new Uint8Array(N)),B(N.buffer),N},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),i.argv.slice(2),i.on("uncaughtException",function(T){if(!(T instanceof pr))throw T}),i.on("unhandledRejection",Rt),d.inspect=function(){return"[Emscripten Module object]"}):v?(typeof read!="undefined"&&(I=function(T){return read(T)}),R=function(T){var N;return typeof readbuffer=="function"?new Uint8Array(readbuffer(T)):(B(l(N=read(T,"binary"))==="object"),N)},typeof scriptArgs!="undefined"&&scriptArgs,typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(A||_)&&(_?O=self.location.href:document.currentScript&&(O=document.currentScript.src),u&&(O=u),O=O.indexOf("blob:")!==0?O.substr(0,O.lastIndexOf("/")+1):"",I=function(T){var N=new XMLHttpRequest;return N.open("GET",T,!1),N.send(null),N.responseText},_&&(R=function(T){var N=new XMLHttpRequest;return N.open("GET",T,!1),N.responseType="arraybuffer",N.send(null),new Uint8Array(N.response)}));var C,b,L=d.print||console.log.bind(console),w=d.printErr||console.warn.bind(console);for(E in S)S.hasOwnProperty(E)&&(d[E]=S[E]);S=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit,d.wasmBinary&&(C=d.wasmBinary),d.noExitRuntime&&d.noExitRuntime,(typeof WebAssembly=="undefined"?"undefined":l(WebAssembly))!=="object"&&w("no native wasm support detected");var F=new WebAssembly.Table({initial:36,maximum:36,element:"anyfunc"}),H=!1;function B(T,N){T||Rt("Assertion failed: "+N)}var K,X,G,W=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function St(T,N,M){for(var $=N+M,z=N;T[z]&&!(z>=$);)++z;if(z-N>16&&T.subarray&&W)return W.decode(T.subarray(N,z));for(var V="";N<z;){var et=T[N++];if(128&et){var Ct=63&T[N++];if((224&et)!=192){var xt=63&T[N++];if((et=(240&et)==224?(15&et)<<12|Ct<<6|xt:(7&et)<<18|Ct<<12|xt<<6|63&T[N++])<65536)V+=String.fromCharCode(et);else{var Tn=et-65536;V+=String.fromCharCode(55296|Tn>>10,56320|1023&Tn)}}else V+=String.fromCharCode((31&et)<<6|Ct)}else V+=String.fromCharCode(et)}return V}function tt(T,N){return T?St(X,T,N):""}typeof TextDecoder!="undefined"&&new TextDecoder("utf-16le");var rt=d.INITIAL_MEMORY||16777216;function it(T){for(;T.length>0;){var N=T.shift();if(typeof N!="function"){var M=N.func;typeof M=="number"?N.arg===void 0?d.dynCall_v(M):d.dynCall_vi(M,N.arg):M(N.arg===void 0?null:N.arg)}else N()}}(b=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:rt/65536,maximum:rt/65536}))&&(K=b.buffer),rt=K.byteLength,function(T){K=T,d.HEAP8=new Int8Array(T),d.HEAP16=new Int16Array(T),d.HEAP32=G=new Int32Array(T),d.HEAPU8=X=new Uint8Array(T),d.HEAPU16=new Uint16Array(T),d.HEAPU32=new Uint32Array(T),d.HEAPF32=new Float32Array(T),d.HEAPF64=new Float64Array(T)}(K),G[11672]=5289728;var bt=[],te=[],Gt=[],Ot=[];function Pt(T){bt.unshift(T)}function ve(T){Ot.unshift(T)}var ft=0,Mt=null;function Rt(T){throw d.onAbort&&d.onAbort(T),L(T+=""),w(T),H=!0,T="abort("+T+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(T)}d.preloadedImages={},d.preloadedAudios={};var he="data:application/octet-stream;base64,";function $e(T){return String.prototype.startsWith?T.startsWith(he):T.indexOf(he)===0}var ut="OggOpusEncoder.wasm";function pe(){try{if(C)return new Uint8Array(C);if(R)return R(ut);throw"both async and sync fetching of the wasm failed"}catch(T){Rt(T)}}$e(ut)||(ut=function(T){return d.locateFile?d.locateFile(T,O):O+T}(ut)),te.push({func:function(){ur()}});var It={mappings:{},buffers:[null,[],[]],printChar:function(T,N){var M=It.buffers[T];N===0||N===10?((T===1?L:w)(St(M,0)),M.length=0):M.push(N)},varargs:void 0,get:function(){return It.varargs+=4,G[It.varargs-4>>2]},getStr:function(T){return tt(T)},get64:function(T,N){return T}},Pi={a:function(T,N,M,$){Rt("Assertion failed: "+tt(T)+", at: "+[N?tt(N):"unknown filename",M,$?tt($):"unknown function"])},c:function(){Rt()},d:function(T,N){var M=new Uint8Array(d.HEAPU8.buffer,T,N);d.encodedBuffers.push(new Uint8Array(M).buffer)},f:function(T,N,M){X.copyWithin(T,N,N+M)},g:function(T){Rt("OOM")},h:function(T){return 0},e:function(T,N,M,$,z){},b:function(T,N,M,$){for(var z=0,V=0;V<M;V++){for(var et=G[N+8*V>>2],Ct=G[N+(8*V+4)>>2],xt=0;xt<Ct;xt++)It.printChar(T,X[et+xt]);z+=Ct}return G[$>>2]=z,0},memory:b,table:F},rn=function(){var T={a:Pi};function N(z,V){var et=z.exports;d.asm=et,function(){if(ft--,d.monitorRunDependencies&&d.monitorRunDependencies(ft),ft==0&&Mt){var Ct=Mt;Mt=null,Ct()}}()}function M(z){N(z.instance)}function $(z){return(C||!A&&!_||typeof fetch!="function"?new Promise(function(V,et){V(pe())}):fetch(ut,{credentials:"same-origin"}).then(function(V){if(!V.ok)throw"failed to load wasm binary file at '"+ut+"'";return V.arrayBuffer()}).catch(function(){return pe()})).then(function(V){return WebAssembly.instantiate(V,T)}).then(z,function(V){w("failed to asynchronously prepare wasm: "+V),Rt(V)})}if(ft++,d.monitorRunDependencies&&d.monitorRunDependencies(ft),d.instantiateWasm)try{return d.instantiateWasm(T,N)}catch(z){return w("Module.instantiateWasm callback failed with error: "+z),!1}return function(){if(C||typeof WebAssembly.instantiateStreaming!="function"||$e(ut)||typeof fetch!="function")return $(M);fetch(ut,{credentials:"same-origin"}).then(function(z){return WebAssembly.instantiateStreaming(z,T).then(M,function(V){w("wasm streaming compile failed: "+V),w("falling back to ArrayBuffer instantiation"),$(M)})})}(),{}}();d.asm=rn;var Se,ur=d.___wasm_call_ctors=function(){return(ur=d.___wasm_call_ctors=d.asm.i).apply(null,arguments)},cr=(d.___em_js__emscriptenPushBuffer=function(){return(d.___em_js__emscriptenPushBuffer=d.asm.j).apply(null,arguments)},d._emscripten_bind_VoidPtr___destroy___0=function(){return(cr=d._emscripten_bind_VoidPtr___destroy___0=d.asm.k).apply(null,arguments)}),jn=d._emscripten_bind_Container_Container_0=function(){return(jn=d._emscripten_bind_Container_Container_0=d.asm.l).apply(null,arguments)},dr=d._emscripten_bind_Container_init_3=function(){return(dr=d._emscripten_bind_Container_init_3=d.asm.m).apply(null,arguments)},hr=d._emscripten_bind_Container_writeFrame_3=function(){return(hr=d._emscripten_bind_Container_writeFrame_3=d.asm.n).apply(null,arguments)},on=d._emscripten_bind_Container___destroy___0=function(){return(on=d._emscripten_bind_Container___destroy___0=d.asm.o).apply(null,arguments)};function pr(T){this.name="ExitStatus",this.message="Program terminated with exit("+T+")",this.status=T}function sn(T){function N(){Se||(Se=!0,d.calledRun=!0,H||(it(te),it(Gt),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)ve(d.postRun.shift());it(Ot)}()))}ft>0||(function(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)Pt(d.preRun.shift());it(bt)}(),ft>0||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),N()},1)):N()))}if(d._opus_encoder_create=function(){return(d._opus_encoder_create=d.asm.p).apply(null,arguments)},d._opus_encode_float=function(){return(d._opus_encode_float=d.asm.q).apply(null,arguments)},d._opus_encoder_ctl=function(){return(d._opus_encoder_ctl=d.asm.r).apply(null,arguments)},d._opus_encoder_destroy=function(){return(d._opus_encoder_destroy=d.asm.s).apply(null,arguments)},d._malloc=function(){return(d._malloc=d.asm.t).apply(null,arguments)},d._free=function(){return(d._free=d.asm.u).apply(null,arguments)},d._speex_resampler_init=function(){return(d._speex_resampler_init=d.asm.v).apply(null,arguments)},d._speex_resampler_destroy=function(){return(d._speex_resampler_destroy=d.asm.w).apply(null,arguments)},d._speex_resampler_process_interleaved_float=function(){return(d._speex_resampler_process_interleaved_float=d.asm.x).apply(null,arguments)},d.dynCall_vi=function(){return(d.dynCall_vi=d.asm.y).apply(null,arguments)},d.dynCall_v=function(){return(d.dynCall_v=d.asm.z).apply(null,arguments)},d.asm=rn,d.then=function(T){if(Se)T(d);else{var N=d.onRuntimeInitialized;d.onRuntimeInitialized=function(){N&&N(),T(d)}}return d},Mt=function T(){Se||sn(),Se||(Mt=T)},d.run=sn,d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Dt(){}function ke(T){return(T||Dt).__cache__}function Sn(T,N){var M=ke(N),$=M[T];return $||(($=Object.create((N||Dt).prototype)).ptr=T,M[T]=$)}function yt(){throw"cannot construct a VoidPtr, no constructor in IDL"}function ht(){this.ptr=jn(),ke(ht)[this.ptr]=this}return sn(),Dt.prototype=Object.create(Dt.prototype),Dt.prototype.constructor=Dt,Dt.prototype.__class__=Dt,Dt.__cache__={},d.WrapperObject=Dt,d.getCache=ke,d.wrapPointer=Sn,d.castObject=function(T,N){return Sn(T.ptr,N)},d.NULL=Sn(0),d.destroy=function(T){if(!T.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";T.__destroy__(),delete ke(T.__class__)[T.ptr]},d.compare=function(T,N){return T.ptr===N.ptr},d.getPointer=function(T){return T.ptr},d.getClass=function(T){return T.__class__},yt.prototype=Object.create(Dt.prototype),yt.prototype.constructor=yt,yt.prototype.__class__=yt,yt.__cache__={},d.VoidPtr=yt,yt.prototype.__destroy__=yt.prototype.__destroy__=function(){var T=this.ptr;cr(T)},ht.prototype=Object.create(Dt.prototype),ht.prototype.constructor=ht,ht.prototype.__class__=ht,ht.__cache__={},d.Container=ht,ht.prototype.init=ht.prototype.init=function(T,N,M){var $=this.ptr;T&&l(T)==="object"&&(T=T.ptr),N&&l(N)==="object"&&(N=N.ptr),M&&l(M)==="object"&&(M=M.ptr),dr($,T,N,M)},ht.prototype.writeFrame=ht.prototype.writeFrame=function(T,N,M){var $=this.ptr;T&&l(T)==="object"&&(T=T.ptr),N&&l(N)==="object"&&(N=N.ptr),M&&l(M)==="object"&&(M=M.ptr),hr($,T,N,M)},ht.prototype.__destroy__=ht.prototype.__destroy__=function(){var T=this.ptr;on(T)},d});l(t)==="object"&&l(s)==="object"?s.exports=h:(a=function(){return h}.apply(t,[]))===void 0||(s.exports=a)}).call(this,"/index.js",n(2),"/",n(3)(e))}])}},typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope?Dl()():zp.exports=Dl();const GS=Xu(aA.exports);let lA;const Es="audio/webm;codecs=opus";function WS(e){const t=Q(),n=Q(),r=Q(),i=Q(!1),o=e.mediaRecorder;Z(()=>{e.recordingState==="recording"?s():o.current&&e.recordingState===null&&(i.current=!0,o.current.stop())},[e.recordingState]);const s=async()=>{var l;n.current=bc.create({scrollingWaveform:!0,scrollingWaveformWindow:10}),t.current=iA({...e.wavesurferOptions,interact:!1,barHeight:(l=e.wavesurferOptions.barHeight)!=null?l:4,plugins:[n.current],container:e.wavesurferContainer.current});const a=await n.current.startMic();MediaRecorder&&MediaRecorder.isTypeSupported(Es)?o.current=new MediaRecorder(a,{mimeType:Es}):typeof window!="undefined"&&(o.current=new YS(a,{mimeType:Es},{encoderWorkerFactory:()=>new GS,WebMOpusEncoderWasmPath:lA})),o.current.onstart=()=>r.current=Date.now(),o.current.ondataavailable=c=>{var u;if(!i.current){const h=Date.now(),d=Math.floor((h-r.current)/1e3),p=new File([c.data],`talkjs_audio_message_${h}_${d}.webm`,{type:"audio/webm"});e.onSendRecording(p,d)}i.current=!1,o.current=void 0,(u=t.current)==null||u.destroy(),t.current=void 0,n.current=void 0},o.current.start()};return null}function uA(e){const t=be(),n=gt(),r=Hn(),i=dt(n.referencedMessage$),o=dt(n.state$.userPermissions),s=Lo(),{sendMessage:a}=Cg(),{voiceRecorder:l,recordVoiceMessage:c,voiceRecorderControlsProps:u}=function(){const p=gt(),f=ki(),m=He({...Al}),{state:E,duration:A,recordingUrl:_,uploadState:g,fileToken:v}=dt(m),S=Q(void 0),I=Q(null),R=Q(),y=st(()=>{m.assign({state:"recording",duration:0}),R.current=setInterval(()=>{m.duration.set(L=>L+1)},1e3)},[m]),D=st(()=>{var L;R.current&&(clearInterval(R.current),R.current=void 0),(L=S.current)==null||L.stop()},[]),O=st(()=>{R.current&&(clearInterval(R.current),R.current=void 0),m.assign(Al)},[m]),C=st((L,w)=>{const F=URL.createObjectURL(new Blob([L])),H=L.size+","+L.name;p.state$.localFileBlobUrls.child(p.state$.extCurrentConversationId.peek()).child(H).set({url:F,fetching:!1});const B={duration:w,filename:L.name};p.latestFileUpload={type:"voice",file:L,metadata:B,temporaryBlobUrl:F},m.assign({state:"previewing",uploadState:"pending",recordingUrl:F+"?name="+L.name}),f.uploadVoice(L,B).then(K=>{m.assign({uploadState:"done",fileToken:K})})},[f,m,p]),b=st(()=>{v&&f.sendFileMessage({fileToken:v}),m.assign(Al)},[f,v,m]);return{voiceRecorder:lt(()=>{if(!E)return;const L={state:E,duration:A,recordingUrl:_,uploadState:g,stop:D,cancel:O,send:b};return Q_.set(L,I),L},[E,A,_,g,D,O,b]),recordVoiceMessage:y,voiceRecorderControlsProps:lt(()=>({onSendRecording:C,recordingState:E,mediaRecorder:S,wavesurferOptions:MS,wavesurferContainer:I}),[C,E])}}(),h=dt(He(()=>{const p=s.state$.get();return e.editMessageId===void 0?new bd(p,a,e.attachFile,e.shareLocation,s.toggleEmojiPicker,c):new bd(p,e.onEditMessage,()=>{},()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,e.attachFile,e.editMessageId,e.onEditMessage,e.shareLocation,a])),d=st(p=>s.setText(p),[s]);return function({appId:p,conversationId:f,meId:m,setText:E,enabled:A}){const _=lt(()=>a_(f,m,p),[p,f,m]);Z(()=>{var v;if(!_||!A)return;const g=(v=JSON.parse(me.getItem(iu)||"{}")[_])!=null?v:"";E(g)},[_,A,E])}({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:d,enabled:!e.editMessageId}),P(Tm.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:p=>s.selectEmoji(p)},children:[P(WS,{...u}),P(t.MessageField,{common:r,referencedMessage:i,permissions:o,editor:h,voiceRecorder:l,editMessageId:e.editMessageId})]})}function XS({message:e}){const t=gt(),n=ki(),r=dt(t.state$.editingMessageId),i=lt(()=>ln(e.content[0].children),[e]),o=He({isEmpty:i.length===0,isTyping:!1,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=lt(()=>new o_(o,t.device$,t.state$.userPermissions),[o,t]),a=st(async()=>{const l=s.state$;if(l.isEmpty.peek()||l.atTextLimit.peek())return;const c=s.getText();c&&await n.editMessage(e.id,{text:c}),t.state$.editingMessageId.set(null)},[t,n,s,e.id]);return Z(()=>{s.onEnter=a},[s,a]),Z(()=>{s.focus(),s.setText(ln(e.content[0].children,!0))},[s,e]),P(Am.Provider,{value:s,children:P(uA,{editMessageId:r,onEditMessage:a})})}function KS(){const e=be(),t=Hn();return P(e.MessageListFooter,{common:t})}function qS(e){const t=be(),n=Hn();return P(t.MessageDivider,{common:n,...e})}function JS({message:e}){const t=be(),n=gt(),r=Hn(),[i,o]=ct("sent");return vi(s=>{if(e.id.startsWith("ephemeral-"))return o("sending");const a=n.state$.currentConversation.everyoneReadUntil.get();return a!==void 0?e.createdAt<=a?o("everyoneRead"):o("sent"):void 0}),P(t.Message,{common:r,message:e,messageStatus:i,permissions:n.messagePermissions$(e).get()})}function ZS(){const e=be(),t=Hn();return P(e.BeforeMessages,{common:t})}function QS(){const e=be(),t=Hn();return P(e.AfterMessages,{common:t})}function tT({extConversationId:e}){const t=Po(),n=gt(),r=ki(),i=Q(!0),o=Q(null),s=dt(()=>!!n.state$.messages.child(e).loadedAll.get());Ne(()=>{i.current=o.current.scrollTop>-30}),Z(()=>{i.current&&(o.current.scrollTop=0)}),Z(()=>{const u=new IntersectionObserver(h=>n.state$.visibility.isInView.set(h[0].isIntersecting),{threshold:.9});return u.observe(o.current),()=>u.disconnect()},[n]),Z(()=>{const u=()=>n.state$.visibility.tabFocused.set(!document.hidden);return document.addEventListener("visibilitychange",u),()=>document.removeEventListener("visibilitychange",u)},[n]);const[a,l]=ct(!1);Z(()=>{l(!1);const u=n.state$.currentConversation.peek();(u==null?void 0:u.isUnread)===!0&&t.conversation(e).markAsRead().catch(h=>{Is.warn("Could not mark conversation as read",h)})},[e,t,n]),vi(u=>{if(!o.current)return;const h=n.state$.currentConversation.get(),d=!(!h||!h.isUnread),p=h==null?void 0:h.unreadMessageCount;if(d&&p===0)return void l(!0);if(d&&a)return;if(!d)return void l(!1);const f=n.state$.visibility.tabFocused.get(),m=n.state$.visibility.isInView.get(),E=function(A){if(A.checkVisibility)return A.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const _=window.getComputedStyle(A),g=_.visibility,v=_.opacity;return!(A.getClientRects().length===0||g==="hidden"||v==="0")}}(o.current);return f&&m&&E?t.conversation(h.id).markAsRead():void 0});const c=st(u=>{const h=u.currentTarget;h.scrollHeight-h.clientHeight+h.scrollTop<90&&n.messageSubscription&&n.messageSubscription.loadMore(10)},[n.messageSubscription]);return P("div",{className:"t-message-list",ref:o,"t-menu-boundary":"",onScroll:c,children:[P(QS,{}),P(Fl,{each:n.chatItems$,children:u=>P("div",{className:"t-message-group",children:P(Fl,{each:u,item:eT,itemProps:{controller:r,extConversationId:e}})})}),s&&P(ZS,{})]})}function eT({item$:e}){const t=gt(),n=dt(e),r=dt(t.state$.editingMessageId);return n instanceof Bl?P(qS,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?P(XS,{message:n}):P(JS,{message:n})}typeof window=="undefined"||MediaRecorder&&MediaRecorder.isTypeSupported(Es)||async function(){return(await su(__["opus-media-recorder-wasm"])).default}().then(e=>lA=e);const nT=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function Oa({appId:e,chatboxState:t}){const n=e.charAt(0)==="t"||nT.has(e);return Z(()=>{switch(t.type){case"auth-failed":Qe.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":Qe.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":Qe.error(t.error);break;case"wrong-app-id":Qe.error(`Could not find given appId: "${t.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:mt.never(t)}},[t]),P("div",{className:"t-panel t-error-panel",children:[P("span",{className:"t-heading",children:"Something went wrong."}),P("p",{children:"Please reload the page and try again."}),P("p",n?{style:{fontStyle:"italic"},children:["Developer note: check your browser's developer tools console for messages that may help solve the problem.",P("br",{}),P("small",{children:"This message only shows up in test mode."})]}:{className:"text-balance",children:"If things keep not working, do not hesitate to get in touch with us."})]})}function rT(){return P("div",{className:"t-panel t-error-panel",children:P("span",{className:"t-heading",style:{fontStyle:"italic"},children:dt(gt().t$).CHAT_NOT_FOUND})})}function cA(){return P("div",{className:"t-panel t-loading-panel",children:P(Oc,{})})}function dA(){const e=dt(gt().t$);return P("div",{className:"t-panel t-error-panel",children:[P("span",{className:"t-heading",style:{fontStyle:"italic"},children:e.AUTH_EXPIRED_OVERLAY_TITLE}),P("p",{children:e.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}const iT=()=>!0;async function kc(e,t,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=iT}){return t().catch(async s=>{if(i&&i(`[TalkJS] Retries left: ${e}. Error: ${JSON.stringify(s)}.`),e===0||!await o(s))throw s;const a=1e3*n*1.2,l=Math.min(1e3*r,a),c=l*(1-(u=.05)+2*Math.random()*u);var u,h;return(h=c,h<=0?Promise.resolve():new Promise(d=>setTimeout(d,h))).then(()=>kc(e-1,t,{initialDelay:c/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function Io(){const e={},t=new Promise(function(n,r){e.resolve=n,e.reject=r});return e.promise=t,e}function oT(e,t,n){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermissionCallback:i}=sr(gm);return st(async()=>{function o(u){u==="denied"&&i({type:e})}if(!r||!await async function(u){if(!("permissions"in navigator))return!1;try{return(await navigator.permissions.query({name:u})).state==="prompt"}catch(h){return!1}}(e))return t(u=>{o(u)});const s=Io(),a=Io(),l={type:e,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(u){Qe.error("Your beforeBrowserPermissionPrompt callback threw an error: ",u),a.resolve({cancelled:!0})}const{cancelled:c}=await a.promise;return c?void 0:t(u=>{s.resolve(u),o(u)})},[r,i,e,t,...n])}function sT({onClose:e}){const t=gt(),n=ki(),r=Po(),[i,o]=ct(null),s=st(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:c,upload:u}=await async function(m,E){const A=m.name;if(function(S){return/\.(mp4|ts|mov|webm|ogv)$/i.test(S)}(m.name)){const S=await Ol("video",m,y=>({width:y.videoWidth,height:y.videoHeight,duration:y.duration,filename:A})),I=E.uploadVideo(m,S),R=function(y){switch(y.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:I,upload:{type:"video",file:m,metadata:S,temporaryBlobUrl:URL.createObjectURL(new Blob([m],{type:R}))}}}if(function(S){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(S)}(m.name)){const S=await Ol("audio",m,I=>({duration:I.duration,filename:A}));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 Ol("img",m,I=>({width:I.naturalWidth,height:I.naturalHeight,filename:A}));return{uploadPromise:E.uploadImage(m,S),upload:{type:"image",file:m,metadata:S,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}const _={filename:A},g=E.uploadFile(m,_),v=URL.createObjectURL(new Blob([m]));return{uploadPromise:g,upload:{type:"file",file:m,metadata:_,temporaryBlobUrl:v}}}(l,r),h=u.file.size+","+u.file.name;t.state$.localFileBlobUrls.child(t.state$.extCurrentConversationId.peek()).child(h).set({url:u.temporaryBlobUrl,fetching:!1}),t.latestFileUpload=u;const d=Io(),p={upload:u,closePreview:d.resolve,uploaded:!1,errored:!1};let f;o(p);try{f=await Yp(c,d.promise),o({...p,uploaded:!0})}catch(m){if(m===Ou)return;Qe.warn("File upload failed",m.toString()),o(E=>({...E,errored:!0}))}if(await d.promise==="cancel")return;mt.defined(f),n.sendFileMessage({fileToken:f})}finally{e(),o(null)}},[n,r,o,t,e]),a=oT("geolocation",async l=>{try{const c=Io(),u={upload:{type:"location",location:void 0},uploaded:!1,closePreview:c.resolve,errored:!1};o(u);const{permissionResult:h,location:d}=await Yp(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"})})}),c.promise);if(l(h),!d||(o({...u,upload:{type:"location",location:d},uploaded:!0}),await c.promise==="cancel"))return;n.sendLocationMessage({location:d})}catch(c){if(c===Ou)return;throw c}finally{e(),o(null)}},[n,o,e]);return{attachFile:s,shareLocation:a,uploadState:i}}const Ou=Symbol("cancelled");function Yp(e,t){return Promise.race([e,t.then(()=>Promise.reject(Ou))])}async function Ol(e,t,n){const r=document.createElement(e);try{return r.src=URL.createObjectURL(t),await new Promise((i,o)=>{const s=e==="img"?"load":"loadedmetadata";r.addEventListener(s,()=>{try{i(n(r))}catch(a){o(a)}},{once:!0})})}finally{URL.revokeObjectURL(r.src)}}function hA({children:e,className:t,...n}){return P("div",{className:"t-attach-overlay "+t,...n,children:e})}function aT({uploadState:e}){const{uploaded:t,errored:n}=e;Ho(()=>e.closePreview("cancel"),".t-upload-preview");const r=Q(null);Z(()=>{t&&r.current.focus()},[t]);const i=dt(gt().t$);return P(hA,{className:"t-upload-preview",children:P("div",{className:"t-preview",children:[!n&&P(lT,{upload:e.upload,uploaded:t}),n&&P("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),P("div",{className:"t-send-row",children:[P("button",{className:"t-cancel",onClick:()=>e.closePreview("cancel"),children:i.CANCEL}),!n&&t&&P("button",{className:"t-confirm-send test__confirm-upload-button",onClick:()=>e.closePreview("send"),ref:r,children:i.SEND_BUTTON_TEXT})]})]})})}function lT({upload:e,uploaded:t}){const n=dt(gt().t$);return e.type!=="location"?P(Qt,{children:[P(cT,{upload:e}),P(dT,{upload:e,uploaded:t,t:n})]}):t?P(uT,{location:e.location}):P("div",{className:"t-loading",children:P(Oc,{})})}function uT({location:e}){const{imageUrl:t,linkUrl:n}=Nc(e);return P("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(t)}) center center / cover no-repeat`}})}const cT=Fn(function({upload:e}){let t=null;const n=e.file;if(e.type==="video"){const r=/[.]ts/i.test(n.name)?"mpegts":"native";t=P("div",{className:"video-container",children:P(hT,{src:e.temporaryBlobUrl,videoType:r,playsInline:!0,controls:!0,preload:"auto"})})}else e.type==="image"?t=P("div",{className:"t-img-container",children:P("img",{src:e.temporaryBlobUrl})}):e.type==="audio"&&(t=P($o,{src:e.temporaryBlobUrl,filename:n.name}));return t}),dT=Fn(function({uploaded:e,upload:t,t:n}){let r;r=e?t.metadata.filename:n.UPLOAD_IN_PROGRESS;let i="",o="";return t.type==="file"&&(i="is-file",e&&(o="file-block")),P("div",{className:`t-filename-row ${i}`,children:P("div",{className:o,children:r})})});function hT(e){const{videoType:t,...n}=e;return P("video",{...n})}function pT(){const e=be(),t=gt(),n=Hn(),r=dt(t.state$.isUserConnected),i=dt(t.state$.userPermissions);return P(e.ChatHeader,{common:n,isUserConnected:r,permissions:i})}function fT(){const e=be(),t=Hn();return P(e.MessageListHeader,{common:t})}function mT({appId:e,chatHeaderVisible:t,messageFieldVisible:n}){const r=Lo(),i=function(){const m=gt(),E=He(()=>{const g=m.extUserId$.get(),v=m.errors$.get(),S=m.authTokenState$.get(),I=g&&m.currentUser$.get(),R=m.state$.currentConversation.get(),y=m.state$.extCurrentConversationId.get(),D=y&&m.state$.participants.child(y).get(),O=y&&m.state$.typing.child(y).get(),C=m.app$.get();return v.serverError?"server-error":v.wrongAppId?"wrong-app-id":S==="loading"||S==="idle"?"loading-token":S==="invalid"?"invalid-token":S==="expired"?"expired-token":S==="valid"?v.unknownUser?"unknown-user":v.unknownConversation?"loading-conv-failed":I&&R&&D&&C&&O?"loaded":"loading-data":void mt.unreachable()}),A=He({type:"loading"});vi(g=>{const v=E.get(),S=m.state$.extCurrentConversationId.peek(),I=m.extUserId$.peek(),R=m.appId$.peek();function y(D){A.set({type:"loading"});const O=setTimeout(()=>{A.set(D)},5e3);return()=>clearTimeout(O)}switch(v){case"invalid-token":A.set({type:"auth-failed"});break;case"expired-token":A.set({type:"expired-token"});break;case"wrong-app-id":A.set({type:"wrong-app-id",appId:R});break;case"server-error":A.set({type:"server-error"});break;case"loading-data":case"loading-token":A.set({type:"loading"});break;case"loaded":A.set({type:"loaded",conversationId:S,userId:I});break;case"loading-conv-failed":g.onCleanup=y({type:"inaccessible-conversation",userId:I,conversationId:S});break;case"unknown-user":g.onCleanup=y({type:"unknown-user",userId:I});break;default:mt.never(v)}});const _=He({type:"loading"});return vi(g=>{if(A.type.get()==="loading"){_.set({type:"invisible-loading"});const v=setTimeout(()=>{_.set({type:"loading"})},1e3);g.onCleanup=()=>{clearTimeout(v)}}else _.set(A.get())}),dt(_)}(),{attachFile:o,shareLocation:s,uploadState:a}=sT({onClose:()=>r.focus()});Z(()=>{r.uploadFile=o},[r,o]);const[l,c]=ct(!1),u=gt(),h=dt(()=>u.app$.get()?u.state$.userPermissions.canShareFile.get():void 0),d=st(m=>{o(m.dataTransfer.files[0]),m.preventDefault(),c(!1)},[o]),p=st(m=>{m.preventDefault(),c(!0)},[]),f=st(m=>{m.preventDefault(),c(!1)},[]);return vc(),i.type==="invisible-loading"?P(Qt,{}):i.type==="loading"?P(cA,{}):i.type==="inaccessible-conversation"?P(rT,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?P(Oa,{appId:e,chatboxState:i}):i.type=="expired-token"?P(dA,{}):i.type==="loaded"?P("div",{className:"t-chatbox-content",onDragOver:h?p:void 0,onDragLeave:h?f:void 0,onDrop:h?d:void 0,"t-menu-boundary":"root",children:[t&&P(pT,{}),P(fT,{}),P(tT,{extConversationId:i.conversationId}),P(KS,{}),n&&P(uA,{attachFile:o,shareLocation:s}),a&&P(aT,{uploadState:a}),l&&P(hA,{className:"t-drop-overlay",children:P(Us,{type:"attach"})})]}):P(Qt,{})}function ET(e,t){return e.map(r=>function(i,o){if(i.type==="text")return function(s,a){const l=gc(a);return _s(s,l)}(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${Jo(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${Jo(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${Jo(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,`📎 ${Jo(i.url)}`):i.type==="location"?"📍":""}(r,t)).join(`
|
|
91
|
+
`,[t,n]}setOptions(t){if(this.options.container!==t.container){const n=this.parentFromOptionsContainer(t.container);n.appendChild(this.container),this.parent=n}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:n}=this.scrollContainer,r=n*t;this.setScroll(r)}destroy(){var t;this.subscriptions.forEach(n=>n()),this.container.remove(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),(t=this.unsubscribeOnScroll)===null||t===void 0||t.forEach(n=>n()),this.unsubscribeOnScroll=[],this.dragStream&&(this.dragStream.cleanup(),this.dragStream=null),this.scrollStream&&(this.scrollStream.cleanup(),this.scrollStream=null)}createDelay(t=10){let n,r;const i=()=>{n&&(clearTimeout(n),n=void 0),r&&(r(),r=void 0)};return this.timeouts.push(i),()=>new Promise((o,s)=>{i(),r=s,n=setTimeout(()=>{n=void 0,r=void 0,o()},t)})}getHeight(t,n){var r;const i=((r=this.audioData)===null||r===void 0?void 0:r.numberOfChannels)||1;return function({optionsHeight:o,optionsSplitChannels:s,parentHeight:a,numberOfChannels:l,defaultHeight:c=128}){if(o==null)return c;const u=Number(o);if(!isNaN(u))return u;if(o==="auto"){const h=a||c;return s!=null&&s.every(d=>!d.overlay)?h/l:h}return c}({optionsHeight:t,optionsSplitChannels:n,parentHeight:this.parent.clientHeight,numberOfChannels:i,defaultHeight:128})}convertColorValues(t,n){return function(r,i,o){if(!Array.isArray(r))return r||"";if(r.length===0)return"#999";if(r.length<2)return r[0]||"";const s=document.createElement("canvas"),a=s.getContext("2d"),l=o!=null?o:s.height*i,c=a.createLinearGradient(0,0,0,l||i),u=1/(r.length-1);return r.forEach((h,d)=>{c.addColorStop(d*u,h)}),c}(t,this.getPixelRatio(),n==null?void 0:n.canvas.height)}getPixelRatio(){return t=window.devicePixelRatio,Math.max(1,t||1);var t}renderBarWaveform(t,n,r,i){const{width:o,height:s}=r.canvas,{halfHeight:a,barWidth:l,barRadius:c,barIndexScale:u,barSpacing:h,barMinHeight:d}=function({width:f,height:m,length:E,options:A,pixelRatio:_}){const g=m/2,D=A.barWidth?A.barWidth*_:1,S=A.barGap?A.barGap*_:A.barWidth?D/2:0,I=D+S||1;return{halfHeight:g,barWidth:D,barGap:S,barRadius:A.barRadius||0,barMinHeight:A.barMinHeight?A.barMinHeight*_:0,barIndexScale:E>0?f/I/E:0,barSpacing:I}}({width:o,height:s,length:(t[0]||[]).length,options:n,pixelRatio:this.getPixelRatio()}),p=function({channelData:f,barIndexScale:m,barSpacing:E,barWidth:A,halfHeight:_,vScale:g,canvasHeight:D,barAlign:S,barMinHeight:I}){const T=f[0]||[],C=f[1]||T,O=T.length,v=[];let y=0,b=0,P=0;for(let w=0;w<=O;w++){const F=Math.round(w*m);if(F>y){const{topHeight:K,totalHeight:W}=c0({maxTop:b,maxBottom:P,halfHeight:_,vScale:g,barMinHeight:I,barAlign:S}),X=d0({barAlign:S,halfHeight:_,topHeight:K,totalHeight:W,canvasHeight:D});v.push({x:y*E,y:X,width:A,height:W}),y=F,b=0,P=0}const H=Math.abs(T[w]||0),B=Math.abs(C[w]||0);H>b&&(b=H),B>P&&(P=B)}return v}({channelData:t,barIndexScale:u,barSpacing:h,barWidth:l,halfHeight:a,vScale:i,canvasHeight:s,barAlign:n.barAlign,barMinHeight:d});r.beginPath();for(const f of p)c&&"roundRect"in r?r.roundRect(f.x,f.y,f.width,f.height,c):r.rect(f.x,f.y,f.width,f.height);r.fill(),r.closePath()}renderLineWaveform(t,n,r,i){const{width:o,height:s}=r.canvas,a=function({channelData:l,width:c,height:u,vScale:h}){const d=u/2,p=l[0]||[];return[p,l[1]||p].map((f,m)=>{const E=f.length,A=E?c/E:0,_=d,g=m===0?-1:1,D=[{x:0,y:_}];let S=0,I=0;for(let T=0;T<=E;T++){const C=Math.round(T*A);if(C>S){const v=_+(Math.round(I*d*h)||1)*g;D.push({x:S,y:v}),S=C,I=0}const O=Math.abs(f[T]||0);O>I&&(I=O)}return D.push({x:S,y:_}),D})}({channelData:t,width:o,height:s,vScale:i});r.beginPath();for(const l of a)if(l.length){r.moveTo(l[0].x,l[0].y);for(let c=1;c<l.length;c++){const u=l[c];r.lineTo(u.x,u.y)}}r.fill(),r.closePath()}renderWaveform(t,n,r){if(r.fillStyle=this.convertColorValues(n.waveColor,r),n.renderFunction)return void n.renderFunction(t,r);const i=function({channelData:o,barHeight:s,normalize:a,maxPeak:l}){var c;const u=s||1;if(!a)return u;const h=o[0];if(!h||h.length===0)return u;let d=l!=null?l:0;if(!l)for(let p=0;p<h.length;p++){const f=(c=h[p])!==null&&c!==void 0?c:0,m=Math.abs(f);m>d&&(d=m)}return d?u/d:u}({channelData:t,barHeight:n.barHeight,normalize:n.normalize,maxPeak:n.maxPeak});f_(n)?this.renderBarWaveform(t,n,r,i):this.renderLineWaveform(t,n,r,i)}renderSingleCanvas(t,n,r,i,o,s,a){const l=this.getPixelRatio(),c=document.createElement("canvas");c.width=Math.round(r*l),c.height=Math.round(i*l),c.style.width=`${r}px`,c.style.height=`${i}px`,c.style.left=`${Math.round(o)}px`,s.appendChild(c);const u=c.getContext("2d");if(n.renderFunction?(u.fillStyle=this.convertColorValues(n.waveColor,u),n.renderFunction(t,u)):this.renderWaveform(t,n,u),c.width>0&&c.height>0){const h=c.cloneNode(),d=h.getContext("2d");d.drawImage(c,0,0),d.globalCompositeOperation="source-in",d.fillStyle=this.convertColorValues(n.progressColor,d),d.fillRect(0,0,c.width,c.height),a.appendChild(h)}}renderMultiCanvas(t,n,r,i,o,s){const a=this.getPixelRatio(),{clientWidth:l}=this.scrollContainer,c=r/a,u=function({clientWidth:f,totalWidth:m,options:E}){return dp(Math.min(8e3,f,m),E)}({clientWidth:l,totalWidth:c,options:n});let h={};if(u===0)return;const d=f=>{if(f<0||f>=p||h[f])return;h[f]=!0;const m=f*u;let E=Math.min(c-m,u);if(E=dp(E,n),E<=0)return;const A=function({channelData:_,offset:g,clampedWidth:D,totalWidth:S}){return _.map(I=>{const T=Math.floor(g/S*I.length),C=Math.floor((g+D)/S*I.length);return I.slice(T,C)})}({channelData:t,offset:m,clampedWidth:E,totalWidth:c});this.renderSingleCanvas(A,n,E,i,m,o,s)},p=Math.ceil(c/u);if(this.isScrollable){if(hp({scrollLeft:this.scrollContainer.scrollLeft,totalWidth:c,numCanvases:p}).forEach(f=>d(f)),p>1){const f=this.on("scroll",()=>{const{scrollLeft:m}=this.scrollContainer;Object.keys(h).length>10&&(o.innerHTML="",s.innerHTML="",h={}),hp({scrollLeft:m,totalWidth:c,numCanvases:p}).forEach(E=>d(E))});this.unsubscribeOnScroll.push(f)}}else for(let f=0;f<p;f++)d(f)}renderChannel(t,n,r,i){var{overlay:o}=n,s=function(u,h){var d={};for(var p in u)Object.prototype.hasOwnProperty.call(u,p)&&h.indexOf(p)<0&&(d[p]=u[p]);if(u!=null&&typeof Object.getOwnPropertySymbols=="function"){var f=0;for(p=Object.getOwnPropertySymbols(u);f<p.length;f++)h.indexOf(p[f])<0&&Object.prototype.propertyIsEnumerable.call(u,p[f])&&(d[p[f]]=u[p[f]])}return d}(n,["overlay"]);const a=document.createElement("div"),l=this.getHeight(s.height,s.splitChannels);a.style.height=`${l}px`,o&&i>0&&(a.style.marginTop=`-${l}px`),this.canvasWrapper.style.minHeight=`${l}px`,this.canvasWrapper.appendChild(a);const c=a.cloneNode();this.progressWrapper.appendChild(c),this.renderMultiCanvas(t,s,r,l,a,c)}render(t){return Ae(this,void 0,void 0,function*(){var n;this.timeouts.forEach(c=>c()),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",this.options.width!=null&&(this.scrollContainer.style.width=typeof this.options.width=="number"?`${this.options.width}px`:this.options.width);const r=this.getPixelRatio(),i=this.scrollContainer.clientWidth,{scrollWidth:o,isScrollable:s,useParentWidth:a,width:l}=function({duration:c,minPxPerSec:u=0,parentWidth:h,fillParent:d,pixelRatio:p}){const f=Math.ceil(c*u),m=f>h,E=!!(d&&!m);return{scrollWidth:f,isScrollable:m,useParentWidth:E,width:(E?h:f)*p}}({duration:t.duration,minPxPerSec:this.options.minPxPerSec||0,parentWidth:i,fillParent:this.options.fillParent,pixelRatio:r});if(this.isScrollable=s,this.wrapper.style.width=a?"100%":`${o}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=t,this.emit("render"),this.options.splitChannels)for(let c=0;c<t.numberOfChannels;c++){const u=Object.assign(Object.assign({},this.options),(n=this.options.splitChannels)===null||n===void 0?void 0:n[c]);this.renderChannel([t.getChannelData(c)],u,l,c)}else{const c=[t.getChannelData(0)];t.numberOfChannels>1&&c.push(t.getChannelData(1)),this.renderChannel(c,this.options,l,0)}Promise.resolve().then(()=>this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(r=>r()),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:t}=this.scrollContainer,{right:n}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&t!==this.scrollContainer.scrollWidth){const{right:r}=this.progressWrapper.getBoundingClientRect(),i=function(o){const s=2*o;return(s<0?Math.floor(s):Math.ceil(s))/2}(r-n);this.scrollContainer.scrollLeft+=i}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,n=!1){const{scrollLeft:r,scrollWidth:i,clientWidth:o}=this.scrollContainer,s=t*i,a=r,l=r+o,c=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?c:0));const u=s-r-c;n&&this.options.autoCenter&&u>0&&(this.scrollContainer.scrollLeft+=u)}}renderProgress(t,n){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=this.options.cursorWidth?`translateX(-${t*this.options.cursorWidth}px)`:"",this.isScrollable&&this.options.autoScroll&&this.audioData&&this.audioData.duration>0&&this.scrollIntoView(t,n)}exportImage(t,n,r){return Ae(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,n));return Promise.resolve(o)}return Promise.all(Array.from(i).map(o=>new Promise((s,a)=>{o.toBlob(l=>{l?s(l):a(new Error("Could not export image"))},t,n)})))})}}class p0 extends jo{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const t=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(t))};t()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}class cl extends jo{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 Ae(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(n=>{if(n.status>=400)throw new Error(`Failed to fetch ${t}: ${n.status} (${n.statusText})`);return n.arrayBuffer()}).then(n=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(n)).then(n=>{this.currentSrc===t&&(this.buffer=n,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}).catch(n=>{console.error("WebAudioPlayer load error:",n)})}_play(){if(!this.paused)return;this.paused=!1,this.bufferNode&&(this.bufferNode.onended=null,this.bufferNode.disconnect()),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let t=this.playedDuration*this._playbackRate;(t>=this.duration||t<0)&&(t=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,t),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var t;this.paused=!0,(t=this.bufferNode)===null||t===void 0||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return Ae(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){const n=t-this.currentTime,r=this.bufferNode;r==null||r.stop(this.audioContext.currentTime+n),r==null||r.addEventListener("ended",()=>{r===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(t){return Ae(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 n=!this.paused;n&&this._pause(),this.playedDuration=t/this._playbackRate,n&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,n;return(t=this._duration)!==null&&t!==void 0?t:((n=this.buffer)===null||n===void 0?void 0:n.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 n=this.buffer.numberOfChannels;for(let r=0;r<n;r++)t.push(this.buffer.getChannelData(r));return t}removeAttribute(t){switch(t){case"src":this.src="";break;case"playbackRate":this.playbackRate=0;break;case"currentTime":this.currentTime=0;break;case"duration":this.duration=0;break;case"volume":this.volume=0;break;case"muted":this.muted=!1}}}const f0={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class So extends u0{static create(t){return new So(t)}getState(){return this.wavesurferState}getRenderer(){return this.renderer}constructor(t){const n=t.media||(t.backend==="WebAudio"?new cl:void 0);super({media:n,mediaControls:t.mediaControls,autoplay:t.autoplay,playbackRate:t.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.reactiveCleanups=[],this.options=Object.assign({},f0,t);const{state:r,actions:i}=function(a){var l,c,u,h,d,p;const f=(l=a==null?void 0:a.currentTime)!==null&&l!==void 0?l:Ht(0),m=(c=a==null?void 0:a.duration)!==null&&c!==void 0?c:Ht(0),E=(u=a==null?void 0:a.isPlaying)!==null&&u!==void 0?u:Ht(!1),A=(h=a==null?void 0:a.isSeeking)!==null&&h!==void 0?h:Ht(!1),_=(d=a==null?void 0:a.volume)!==null&&d!==void 0?d:Ht(1),g=(p=a==null?void 0:a.playbackRate)!==null&&p!==void 0?p:Ht(1),D=Ht(null),S=Ht(null),I=Ht(""),T=Ht(0),C=Ht(0),O=vr(()=>!E.value,[E]),v=vr(()=>D.value!==null,[D]),y=vr(()=>v.value&&m.value>0,[v,m]),b=vr(()=>f.value,[f]),P=vr(()=>m.value>0?f.value/m.value:0,[f,m]);return{state:{currentTime:f,duration:m,isPlaying:E,isPaused:O,isSeeking:A,volume:_,playbackRate:g,audioBuffer:D,peaks:S,url:I,zoom:T,scrollPosition:C,canPlay:v,isReady:y,progress:b,progressPercent:P},actions:{setCurrentTime:w=>{const F=Math.max(0,Math.min(m.value||1/0,w));f.set(F)},setDuration:w=>{m.set(Math.max(0,w))},setPlaying:w=>{E.set(w)},setSeeking:w=>{A.set(w)},setVolume:w=>{const F=Math.max(0,Math.min(1,w));_.set(F)},setPlaybackRate:w=>{const F=Math.max(.1,Math.min(16,w));g.set(F)},setAudioBuffer:w=>{D.set(w),w&&m.set(w.duration)},setPeaks:w=>{S.set(w)},setUrl:w=>{I.set(w)},setZoom:w=>{T.set(Math.max(0,w))},setScrollPosition:w=>{C.set(Math.max(0,w))}}}}({isPlaying:this.isPlayingSignal,currentTime:this.currentTimeSignal,duration:this.durationSignal,volume:this.volumeSignal,playbackRate:this.playbackRateSignal,isSeeking:this.seekingSignal});this.wavesurferState=r,this.wavesurferActions=i,this.timer=new p0;const o=n?void 0:this.getMediaElement();this.renderer=new h0(this.options,o),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initReactiveState(),this.initPlugins();const s=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");const{peaks:a,duration:l}=this.options;(s||a&&l)&&this.load(s,a,l).catch(c=>{this.emit("error",c instanceof Error?c:new Error(String(c)))})})}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),this.stopAtPosition!=null&&this.isPlaying()&&t>=this.stopAtPosition&&this.pause()}}))}initReactiveState(){this.reactiveCleanups.push(function(t,n){const r=[];r.push(Xn(()=>{const s=t.isPlaying.value;n.emit(s?"play":"pause")},[t.isPlaying])),r.push(Xn(()=>{const s=t.currentTime.value;n.emit("timeupdate",s),t.isPlaying.value&&n.emit("audioprocess",s)},[t.currentTime,t.isPlaying])),r.push(Xn(()=>{t.isSeeking.value&&n.emit("seeking",t.currentTime.value)},[t.isSeeking,t.currentTime]));let i=!1;r.push(Xn(()=>{t.isReady.value&&!i&&(i=!0,n.emit("ready",t.duration.value))},[t.isReady,t.duration]));let o=!1;return r.push(Xn(()=>{const s=t.isPlaying.value,a=t.currentTime.value,l=t.duration.value,c=l>0&&a>=l;o&&!s&&c&&n.emit("finish"),o=s&&c},[t.isPlaying,t.currentTime,t.duration])),r.push(Xn(()=>{const s=t.zoom.value;s>0&&n.emit("zoom",s)},[t.zoom])),()=>{r.forEach(s=>s())}}(this.wavesurferState,{emit:this.emit.bind(this)}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{const t=this.updateProgress();this.emit("timeupdate",t)}),this.onMediaEvent("play",()=>{this.emit("play"),this.timer.start()}),this.onMediaEvent("pause",()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("emptied",()=>{this.timer.stop(),this.stopAtPosition=null}),this.onMediaEvent("ended",()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null}),this.onMediaEvent("seeking",()=>{this.emit("seeking",this.getCurrentTime())}),this.onMediaEvent("error",()=>{var t;this.emit("error",(t=this.getMediaElement().error)!==null&&t!==void 0?t:new Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(t,n)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,n))}),this.renderer.on("dblclick",(t,n)=>{this.emit("dblclick",t,n)}),this.renderer.on("scroll",(t,n,r,i)=>{const o=this.getDuration();this.emit("scroll",t*o,n*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)}),this.renderer.on("resize",()=>{this.emit("resize")}));{let t;const n=this.renderer.on("drag",r=>{var i;if(!this.options.interact)return;this.renderer.renderProgress(r),clearTimeout(t);let o=0;const s=this.options.dragToSeek;this.isPlaying()?o=0:s===!0?o=200:s&&typeof s=="object"&&(o=(i=s.debounceTime)!==null&&i!==void 0?i:200),t=setTimeout(()=>{this.seekTo(r)},o),this.emit("interaction",r*this.getDuration()),this.emit("drag",r)});this.subscriptions.push(()=>{clearTimeout(t),n()})}}initPlugins(){var t;!((t=this.options.plugins)===null||t===void 0)&&t.length&&this.options.plugins.forEach(n=>{this.registerPlugin(n)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(t=>t()),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),t.duration&&!t.peaks&&(this.decodedData=es.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=es.createBuffer(t.peaks,t.duration)),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),t.mediaControls!=null&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){if(this.plugins.includes(t))return t;t._init(this),this.plugins.push(t);const n=t.once("destroy",()=>{this.plugins=this.plugins.filter(r=>r!==t),this.subscriptions=this.subscriptions.filter(r=>r!==n)});return this.subscriptions.push(n),t}unregisterPlugin(t){this.plugins=this.plugins.filter(n=>n!==t),t.destroy()}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){const n=t/this.getDuration();this.renderer.setScrollPercentage(n)}getActivePlugins(){return this.plugins}loadAudio(t,n,r,i){return Ae(this,void 0,void 0,function*(){var o;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,(o=this.abortController)===null||o===void 0||o.abort(),this.abortController=null,!n&&!r){const a=this.options.fetchParams||{};window.AbortController&&!a.signal&&(this.abortController=new AbortController,a.signal=this.abortController.signal);const l=u=>this.emit("loading",u);n=yield l0.fetchBlob(t,l,a);const c=this.options.blobMimeType;c&&(n=new Blob([n],{type:c}))}this.setSrc(t,n);const s=yield new Promise(a=>{const l=i||this.getDuration();l?a(l):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>a(this.getDuration()),{once:!0}))});if(!t&&!n){const a=this.getMediaElement();a instanceof cl&&(a.duration=s)}if(r)this.decodedData=es.createBuffer(r,s||0);else if(n){const a=yield n.arrayBuffer();this.decodedData=yield es.decode(a,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(t,n,r){return Ae(this,void 0,void 0,function*(){try{return yield this.loadAudio(t,void 0,n,r)}catch(i){throw this.emit("error",i),i}})}loadBlob(t,n,r){return Ae(this,void 0,void 0,function*(){try{return yield this.loadAudio("",t,n,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:n=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=[],c=a.length/n;for(let u=0;u<n;u++){const h=a.slice(Math.floor(u*c),Math.ceil((u+1)*c));let d=0;for(let p=0;p<h.length;p++){const f=h[p];Math.abs(f)>Math.abs(d)&&(d=f)}l.push(Math.round(d*r)/r)}o.push(l)}return o}getDuration(){let 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){this.stopAtPosition=null,super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){const n=this.getDuration()*t;this.setTime(n)}play(t,n){const r=Object.create(null,{play:{get:()=>super.play}});return Ae(this,void 0,void 0,function*(){t!=null&&this.setTime(t);const i=yield r.play.call(this);return n!=null&&(this.media instanceof cl?this.media.stopAt(n):this.stopAtPosition=n),i})}playPause(){return Ae(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 Ae(this,arguments,void 0,function*(t="image/png",n=1,r="dataURL"){return this.renderer.exportImage(t,n,r)})}destroy(){var t;this.emit("destroy"),(t=this.abortController)===null||t===void 0||t.abort(),this.plugins.forEach(n=>n.destroy()),this.subscriptions.forEach(n=>n()),this.unsubscribePlayerEvents(),this.reactiveCleanups.forEach(n=>n()),this.reactiveCleanups=[],this.timer.destroy(),this.renderer.destroy(),super.destroy()}}So.BasePlugin=class extends jo{constructor(e){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=e}onInit(){}_init(e){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(e=>e()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}},So.dom=a0;var m_=function(e,t,n,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,n[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=e.apply(a,m_(e,a,n,["",null])),r.push(i),a[0]?t[0]|=2:(t[o-2]=0,t[o]=i)):r.push(a)}return r},fp=new Map;function m0(e){var t=fp.get(this);return t||(t=new Map,fp.set(this,t)),(t=m_(this,t.get(e)||(t.set(e,t=function(n){for(var r,i,o=1,s="",a="",l=[0],c=function(d){o===1&&(d||(s=s.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?l.push(0,d,s):o===3&&(d||s)?(l.push(3,d,s),o=2):o===2&&s==="..."&&d?l.push(4,d,0):o===2&&s&&!d?l.push(5,0,!0,s):o>=5&&((s||!d&&o===5)&&(l.push(o,0,s,i),o=6),d&&(l.push(o,d,0,i),o=6)),s=""},u=0;u<n.length;u++){u&&(o===1&&c(),c(u));for(var h=0;h<n[u].length;h++)r=n[u][h],o===1?r==="<"?(c(),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===">"?(c(),o=1):o&&(r==="="?(o=5,i=s,s=""):r==="/"&&(o<5||n[u][h+1]===">")?(c(),o===3&&(l=l[0]),o=l,(l=l[0]).push(2,0,o),o=0):r===" "||r===" "||r===`
|
|
92
|
+
`||r==="\r"?(c(),o=2):s+=r),o===3&&s==="!--"&&(o=4,l=l[0])}return c(),l}(e)),t),arguments,[])).length>1?t:t[0]}const E0={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,TALK_GMK:"AIzaSyAs_WXNLlj31EHJI_Lw8siO2B3ZJLUzBH0"},_0=function(e){return E0[e]}("TALK_GMK");function E_(e,t=10){const n=ar(Qu),[r,i]=ut([]);return Z(()=>{const o=n.conversation(e).subscribeParticipants(s=>i(s!=null?s:[]));return t>10&&o.connected.then(async()=>{for(;o.state.type==="active"&&!o.state.loadedAll&&o.state.latestSnapshot!==null&&o.state.latestSnapshot.length<t;){const s=Math.min(t-o.state.latestSnapshot.length,50);await o.loadMore(s)}}),()=>{o.unsubscribe()}},[e,n,t]),r}const __=/^\/.*[^\\]\/[im]*$/;function mp(e){return __.test(e)?!Hs(e).test(""):!1}function Hs(e){const t=e.match(/^\/(.*[^\\])\/(.*)$/);if(!t)throw new Error(`Expected ${e} to be a (non-empty) regex`);let n=t[2]||"";return n=n.replace(/[^im]/g,"")+"g",new RegExp(t[1],n)}function A_(e){const t=e.replace(/\./g,"\\.").replace(/\*/g,".*");return new RegExp("^"+t+"$","i")}function A0(e,t){const n=UE(t),r=A_(e);return n!==void 0&&r.test(n)}const g0=/^[]/g;function g_(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function lu(e,t){!e()&&!t&&(t=e.toString().replace(/^function\s*\(\)\s*\{\s*return\s*(.*);\s*\}\s*$/,"`$1`")+" was not true")}(e=>{function t(r){}function n(r,i){(function(o,s){switch(s){case"undefined":return o===void 0;case String:return typeof o=="string"||o instanceof String;case Boolean:return typeof o=="boolean"||o instanceof Boolean;case Number:return typeof o=="number"||o instanceof Number;default:return o instanceof s}})(r,i)||(i.name,String(r))}e.defined=t,e.has=function(r,i){r[i]},e.is=n,e.equals=function(r,i){},e.oneOf=function(r,i){i.includes(r)||JSON.stringify(i)},e.isArray=function(r,i){n(r,Array),r&&r.length>0&&n(r[0],i)},e.optional=function(r,i){r!==void 0&&n(r,i)},e.falsy=function(r){},e.never=function(r){}})(lu||(lu={}));const hi=lu,D0=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"),O0=/\uFE0F/g,v0="";function S0(e){if(e===":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("-")}((n=e).indexOf(v0)<0?n.replace(O0,""):n);var n;return`https://cdn.jsdelivr.net/gh/twitter/twemoji@14.0.2/assets/svg/${t}.svg`}class D_{constructor({mode:t,allowedHostnames:n,allowedPhoneNrs:r,allowedMatches:i,forbiddenMatches:o,forbiddenWords:s,suppressLinks:a,suppressEmailAddresses:l,suppressPhoneNumbers:c,replacement:u}){if(hi.oneOf(t,["all","otherOnly","off"]),this.mode=t,this.suppressLinks=a!==!1,this.suppressEmailAddresses=l!==!1,this.suppressPhoneNumbers=c!==!1,this.allowedHostnames=n||[],this.allowedPhoneNrs=(r||[]).filter(h=>h).map(h=>h.replace(/[^0-9]/g,"")),this.allowedMatches=(i||[]).filter(mp).map(h=>Hs(h)),this.forbiddenMatches=(o||[]).filter(mp).map(h=>Hs(h)),s){const h=s.split(`
|
|
93
|
+
`).map(d=>d.trim().toLowerCase()).filter(d=>d.length>0&&!d.startsWith("#")).map(d=>g_(d));h.length&&this.forbiddenMatches.push(new RegExp(`\\b(${h.join("|")})\\b`,"gi"))}hi(()=>this.allowedMatches.every(h=>h.flags.includes("g")),"All regexes in `suppressContactInfo.allowedMatches` must be global. Check `allowedMatches`!"),hi(()=>this.forbiddenMatches.every(h=>h.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 vc(e){var n,r,i,o,s,a,l,c,u,h,d,p,f;let t="";return e.t&&(t=`(${e.t("CONTACT_INFORMATION_HIDDEN")})`),{formattedLinks:(n=e.formattedLinks)!=null?n:"plaintext",markup:(r=e.markup)!=null?r:!1,useFallbackMentions:(i=e.useFallbackMentions)!=null?i:!1,sameTabLinkRules:(o=e.sameTabLinkRules)!=null?o:[],enableEmojiImageFallback:(s=e.enableEmojiImageFallback)!=null?s:!1,highlight:(a=e.highlight)!=null?a:[],contactInfo:(l=e.contactInfo)!=null?l:!1,suppression:(c=e.suppression)!=null?c:new D_({mode:"off"}),contactInfoHiddenText:(d=(h=e.contactInfoHiddenText)!=null?h:(u=e.suppression)==null?void 0:u.replacement)!=null?d:t,customEmojiUrls:(p=e.customEmojiUrls)!=null?p:{},enableActions:(f=e.enableActions)!=null?f:!0}}function T0({id:e,text:t}){var i;const n=At(),r=dt(()=>{var a;if(n.type==="ConversationListStore")return;const o=n.state$.currentConversationId.get(),s=o&&n.state$.participants.child(o).get();return(a=s==null?void 0:s.find(l=>l.user.id===e))==null?void 0:a.user});return L("span",{className:"t-mention","t-is-current-user":dt(n.extUserId$)===e?"":void 0,children:`@${(i=r==null?void 0:r.name)!=null?i:t}`})}function R0({message:e,type:t,action:n,params:r,children:i}){const o=Li(),s=it(l=>{l.preventDefault(),o.triggerMessageAction(e,n,r)},[o,e,n,r]),a={"t-action":n,onClick:s};return t==="actionButton"?L("button",{...a,type:"button",children:i}):L("a",{...a,href:"#",children:i})}function Ur(e,t){const n=e.flatMap(r=>{if(typeof r=="string")return dl(r,t.highlight);switch(r.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletpoint":case"bulletPoint":return I0(r,t);case"bulletlist":case"bulletList":return[Tt("ul",null,...Ur(r.children,t))];case"autolink":case"autoLink":case"link":return C0(r,t);case"codeblock":case"codeBlock":return[L("code",{"data-language":r.language,children:dl(r.text,t.highlight)})];case"codespan":case"codeSpan":return L("code",{children:dl((i=r.text,i.replace(/^\s*\n/m,"").replace(/\n\s*$/m,"")),t.highlight)});case"mention":return hi.falsy(t.useFallbackMentions),L(T0,{id:r.id,text:r.text},r.id);case"suppressed":return[L("i",{children:t.contactInfoHiddenText})];case"emoji":return t.enableEmojiImageFallback?[L(y0,{unicode:r.text})]:[r.text];case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return N0(r,t);case"customemoji":case"customEmoji":return r.text;default:hi.never(r)}var i});return n.every(r=>typeof r=="string")?[n.join("")]:n}function dl(e,t){if(t.length===0)return[e];const n=function(i){const o=i.map(a=>a.trim()).filter(a=>a);if(o.length===0)return g0;const s=o.map(g_).join("|");return new RegExp(s,"gi")}(t),r=ma(e,n).map(i=>({offset:i.index,matchedText:i[0]}));return ru(e,r,({matchedText:i})=>[L("span",{className:"highlighted-text",children:i})])}const I0=(e,t)=>[Tt({bold:"strong",italic:"em",strikethrough:"del",blockquote:"blockquote",bulletpoint:"li",bulletPoint:"li"}[e.type],null,...Ur(e.children,t))];function y0({unicode:e}){const[t,n]=ut(()=>e!==":arslan:");return Z(()=>{t&&!km(e)&&n(!1)},[]),t?L("span",{className:"t-emoji",children:e}):L("img",{className:"t-emoji",src:S0(e),alt:e})}const C0=(e,t)=>{const n="children"in e?e.children:[e.text];switch(t.formattedLinks){case"link":return[Tt("a",{target:function(r,i){for(const o of r)if(__.test(o)){if(Hs(o).test(i))return"_top"}else if(A0(o,i))return"_top";return"_blank"}(t.sameTabLinkRules,e.url),href:e.url,rel:"noreferrer"},...Ur(n,t))];case"plaintext":return"children"in e&&e.children.every(r=>typeof r=="string")?[e.children.join("")]:[Tt(qt,null,...Ur(n,t))];default:hi.never(t.formattedLinks)}},N0=(e,t)=>t.enableActions?[Tt(R0,{type:e.type==="actionlink"?"actionLink":e.type==="actionbutton"?"actionButton":e.type,action:e.action,params:e.params,message:t.message},...Ur(e.children,t))]:"children"in e&&e.children.every(n=>typeof n=="string")?[e.children.join("")]:[Tt(qt,null,...Ur(e.children,t))];function b0(e,t){return ms(e,vc(t))}function ms(e,t){return e.flatMap(n=>{if(typeof n=="string"){let r=[n];return r=hl(r,i=>function(o,s){const{suppression:{forbiddenMatches:a,allowedMatches:l}}=s,c=pc(a,u=>ma(o,u)).filter(([u])=>!l.some(h=>u.match(h)!==null)).map(u=>({offset:u.index,matchedText:u[0]}));return ru(o,c,()=>[{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}])}(i,t)),r=hl(r,i=>function(o){return ru(o,function(s){const a=[];let l;for(;l=D0.exec(s);){const c=l[0],u=l.index;a.push({offset:u,matchedText:c})}return a}(o),s=>[{type:"emoji",text:s.matchedText}])}(i)),r=hl(r,i=>function(o,s){if(s.contactInfo!=="suppress")return[o];const a=[];if((s.suppression.suppressEmailAddresses||s.suppression.suppressLinks)&&a.push(r_),s.suppression.suppressPhoneNumbers&&a.push(n_),a.length===0)return[o];const l=s_(o,{multilineSteps:[],singlelineSteps:a}),c=l.map(u=>typeof u=="string"?u:Ep(u.url,s.suppression)?u.text:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"});return Oc(c)}(i,t)),r}switch(n.type){case"bold":case"italic":case"strikethrough":case"blockquote":case"bulletlist":case"bulletList":case"bulletpoint":case"bulletPoint":return{type:n.type,children:ms(n.children,t)};case"codespan":case"codeSpan":case"codeblock":case"codeBlock":case"suppressed":case"emoji":case"customemoji":case"customEmoji":return n;case"mention":return{type:"mention",id:n.id,text:n.text};case"autolink":case"autoLink":return function(r,i){return i.contactInfo==="link"?r:i.contactInfo==="suppress"?Ep(r.url,i.suppression)?r:{type:"suppressed",text:"CONTACT_INFORMATION_HIDDEN"}:r.text}(n,t);case"link":return{type:"link",url:n.url,children:ms(n.children,t)};case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return{type:n.type,action:n.action,params:n.params,children:ms(n.children,t)}}})}function hl(e,t){return pc(e,n=>typeof n=="string"?t(n):[n])}function Ep(e,t){if(t.allowedMatches.some(n=>e.match(n)!==null))return!0;if(t.forbiddenMatches.some(n=>e.match(n)!==null))return!1;if(e.startsWith("mailto:")){const n=e.substring(7).replace(/^.*@/,"");return!t.suppressEmailAddresses||_p(t.allowedHostnames,n)}if(e.startsWith("tel:")){const n=e.substring(4).replace(/[^0-9]/g,"");return!t.suppressPhoneNumbers||t.allowedPhoneNrs.some(r=>n.endsWith(r))}{const n=UE(e);return!t.suppressLinks||!n||_p(t.allowedHostnames,n)}}function _p(e,t){for(const n of e)if(A_(n).test(t))return!0;return!1}function Sc({block:e,nonInteractive:t,message:n,className:r=""}){const i=!t,{nodes:o,roleOptions:s}=function(l,c){var _;const u=At(),h=dt(u.app$.role);mt.defined(h);const d=c.type==="UserMessage",p=((_=c.sender)==null?void 0:_.id)===u.extUserId$.peek(),f=h.suppressContactInfo,m=d&&f.shouldSuppress({isContentBySender:p}),E=b0(l.children,{contactInfo:m?"suppress":"link",suppression:f}),A={sameTabLinkRules:h.sameTabLinkRules,contactInfoHiddenText:h.suppressContactInfo.replacement||`(${u.t$.peek().CONTACT_INFORMATION_HIDDEN})`};return{nodes:E,roleOptions:A}}(e,n),a=function(l,c={},u){return Ur(l,{...vc(c),message:u})}(o,{enableEmojiImageFallback:!0,formattedLinks:i?"link":"plaintext",enableActions:i,...s},n);return Tt("span",{className:`t-text ${r}`},...a)}function O_(e){const t=he(),n=At(),{className:r="",...i}=e,o=dt(()=>n.state$.messages.child(e.common.conversation.id).lookup.child(e.message.id).content.child(0).url.get());return L("div",{className:`t-message-content ${r}`,children:e.message.content.map(s=>{var a;return L(k0,{block:s,theme:t,downloadUrl:o,...i},e.message.createdAt+((a=e.message.editedAt)!=null?a:0))})})}function k0({common:e,block:t,message:n,theme:r,downloadUrl:i}){const o=function(s,a){switch(a.type){case"text":return s.TextBlock;case"location":return s.LocationBlock;case"file":switch(a.subtype){case"image":return s.ImageBlock;case"video":return s.VideoBlock;case"voice":return s.VoiceBlock;case"audio":return s.AudioBlock;default:return s.FileBlock}default:mt.never(a)}}(r,t);return L(o,{block:t,common:e,message:n,downloadUrl:i})}const w0=27;function $o(e,t,n=!0){const r=it(o=>{o.keyCode===w0&&e()},[e]),i=it(o=>{o.target.closest(t)===null&&e(o)},[t,e]);Z(()=>{if(n)return window.addEventListener("keydown",r,!0),document.addEventListener("mousedown",i,!0),()=>{window.removeEventListener("keydown",r,!0),document.removeEventListener("mousedown",i,!0)}},[r,i,n])}const L0=".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 js(e){return L(At()instanceof Pm?P0:M0,{...e})}function P0(e){const t=he(),n=on();return L(t.Icon,{common:n,...e})}function M0(e){const t=he(),n=d_();return L(t.Icon,{common:n,...e})}function Tc(){return L(js,{type:"spinner","aria-label":dt(At().t$).LOADING,className:"t-loading-icon"})}const v_={"emoji-picker-element":"https://cdn.jsdelivr.net/npm/emoji-picker-element@1.26.3/+esm","mpegts.js":"https://cdn.jsdelivr.net/npm/mpegts.js@1.7.3","opus-media-recorder-wasm":"https://cdn.jsdelivr.net/npm/opus-media-recorder@0.8.0/WebMOpusEncoder.wasm"};async function x0(e,t){if(typeof window=="undefined"||window.document===void 0)return new Promise(()=>{});try{const n=e!=null?e:ui.emojiPickerTranslationUrl,r=v_["emoji-picker-element"],[i,o]=await Promise.all([uu(r),uu(n)]),s=t!=null?t:ui.emojiDataUrl,a={...i,i18n:o.default,dataSource:s};return await new a.Database({dataSource:s}).ready(),a}catch(n){return Bl.error("Failed to load emoji picker:",n),new Promise(()=>{})}}async function uu(e){return import(e).catch(()=>new Function("url","return import(url)")(e)).catch(()=>{throw new Error("Cannot dynamically import module in this environment")})}function Rc(){const e=At(),[t,n]=ut();return function(r,i,o,s){let a;lt(i)?a=i:Array.isArray(i)?(s=i,o=void 0):o=i,a&&Array.isArray(o)&&(s=o,o=void 0);const l=(s=s||(o==null?void 0:o.deps))?Ue(s):void 0,c=Q({});c.current.selector=r,c.current.reaction=a,l&&l.set(s),c.current.dispose||(c.current.dispose=We(u=>{var h;return l==null||l.get(),_n((h=c.current)==null?void 0:h.selector,void 0,u)},u=>{var h,d;return(d=(h=c.current).reaction)==null?void 0:d.call(h,u)},o)),wg(()=>{var u,h;(h=(u=c.current)==null?void 0:u.dispose)==null||h.call(u)}),c.current.dispose}(()=>{const r=e.translationData$.get();e.app$.get()&&e.currentUser$.get()&&r&&function(i,o){const s=JSON.stringify([i,o]);if(pl[s])return pl[s];const a=x0(i,o);return pl[s]=a,a}(r.emojiPickerTranslationUrl,r.emojiDataUrl).then(i=>n({value:i}))},[]),t}const pl={};function Ic(e){const{onClose:t,onEmojiSelected:n}=xg(),r=Q(null),i=dt(At().t$),o=Rc();return Z(()=>{if(!o)return;mt.defined(r.current);const s=r.current,a=s.shadowRoot;(function(u,h){const d=document.createElement("style");d.textContent=h,u.appendChild(d)})(a,L0);const l=u=>{var d;const h=(d=u.detail.unicode)!=null?d:u.detail.name;n(h)};function c(u){u.pointerType==="mouse"&&(a.querySelector("section").dataset.hasMouse="true")}return s.addEventListener("emoji-click",l),s.addEventListener("pointermove",c,{once:!0}),s.i18n=o.value.i18n,()=>{s.removeEventListener("emoji-click",l),s.removeEventListener("pointermove",c)}},[o,n]),Z(()=>{var s;o&&r.current&&((s=r.current.shadowRoot.getElementById("search"))==null||s.focus())},[o]),$o(()=>t(),".t-emoji-picker"),L("div",o?{className:"t-emoji-picker",children:L("emoji-picker",{locale:i.locale,ref:r,class:e.colorScheme,"data-source":o.value.dataSource})}:{className:"t-emoji-picker","t-loading":"",children:L(Tc,{})})}function S_({messageId:e,colorScheme:t}){const{closePopover:n}=tc(),r=Li();return L("div",{className:"t-reaction-picker",children:L(Nm.Provider,{value:{onClose:n,onEmojiSelected:i=>{r.addReaction(e,i),n()}},children:L(Ic,{colorScheme:t})})})}function cu(){return cu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},cu.apply(null,arguments)}function T_(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function du(e,t){return du=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},du(e,t)}function R_(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,du(e,t)}function I_(){}function y_(){}y_.resetWarningCache=I_;function Ap(e,t){return e.replace(new RegExp("(^|\\s)"+t+"(?:\\s|$)","g"),"$1").replace(/\s+/g," ").replace(/^\s*|\s*$/g,"")}(function(){function e(r,i,o,s,a,l){if(l!=="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"){var c=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 c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:y_,resetWarningCache:I_};n.PropTypes=n})();const gp=!1,C_=Pe.createContext(null);var Ki="unmounted",_r="exited",Ar="entering",Qr="entered",hu="exiting",bn=function(e){function t(r,i){var o;o=e.call(this,r,i)||this;var s,a=i&&!i.isMounting?r.enter:r.appear;return o.appearStatus=null,r.in?a?(s=_r,o.appearStatus=Ar):s=Qr:s=r.unmountOnExit||r.mountOnEnter?Ki:_r,o.state={status:s},o.nextCallback=null,o}R_(t,e),t.getDerivedStateFromProps=function(r,i){return r.in&&i.status===Ki?{status:_r}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(r){var i=null;if(r!==this.props){var o=this.state.status;this.props.in?o!==Ar&&o!==Qr&&(i=Ar):o!==Ar&&o!==Qr||(i=hu)}this.updateStatus(!1,i)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var r,i,o,s=this.props.timeout;return r=i=o=s,s!=null&&typeof s!="number"&&(r=s.exit,i=s.enter,o=s.appear!==void 0?s.appear:i),{exit:r,enter:i,appear:o}},n.updateStatus=function(r,i){r===void 0&&(r=!1),i!==null?(this.cancelNextCallback(),i===Ar?this.performEnter(r):this.performExit()):this.props.unmountOnExit&&this.state.status===_r&&this.setState({status:Ki})},n.performEnter=function(r){var i=this,o=this.props.enter,s=this.context?this.context.isMounting:r,a=this.props.nodeRef?[s]:[Pe.findDOMNode(this),s],l=a[0],c=a[1],u=this.getTimeouts(),h=s?u.appear:u.enter;!r&&!o||gp?this.safeSetState({status:Qr},function(){i.props.onEntered(l)}):(this.props.onEnter(l,c),this.safeSetState({status:Ar},function(){i.props.onEntering(l,c),i.onTransitionEnd(h,function(){i.safeSetState({status:Qr},function(){i.props.onEntered(l,c)})})}))},n.performExit=function(){var r=this,i=this.props.exit,o=this.getTimeouts(),s=this.props.nodeRef?void 0:Pe.findDOMNode(this);i&&!gp?(this.props.onExit(s),this.safeSetState({status:hu},function(){r.props.onExiting(s),r.onTransitionEnd(o.exit,function(){r.safeSetState({status:_r},function(){r.props.onExited(s)})})})):this.safeSetState({status:_r},function(){r.props.onExited(s)})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(r,i){i=this.setNextCallback(i),this.setState(r,i)},n.setNextCallback=function(r){var i=this,o=!0;return this.nextCallback=function(s){o&&(o=!1,i.nextCallback=null,r(s))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(r,i){this.setNextCallback(i);var o=this.props.nodeRef?this.props.nodeRef.current:Pe.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],c=a[1];this.props.addEndListener(l,c)}r!=null&&setTimeout(this.nextCallback,r)}else setTimeout(this.nextCallback,0)},n.render=function(){var r=this.state.status;if(r===Ki)return null;var i=this.props,o=i.children;i.in,i.mountOnEnter,i.unmountOnExit,i.appear,i.enter,i.exit,i.timeout,i.addEndListener,i.onEnter,i.onEntering,i.onEntered,i.onExit,i.onExiting,i.onExited,i.nodeRef;var s=T_(i,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return Pe.createElement(C_.Provider,{value:null},typeof o=="function"?o(r,s):Pe.cloneElement(Pe.Children.only(o),s))},t}(Pe.Component);function qr(){}bn.contextType=C_,bn.propTypes={},bn.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:qr,onEntering:qr,onEntered:qr,onExit:qr,onExiting:qr,onExited:qr},bn.UNMOUNTED=Ki,bn.EXITED=_r,bn.ENTERING=Ar,bn.ENTERED=Qr,bn.EXITING=hu;var fl=function(e,t){return e&&t&&t.split(" ").forEach(function(n){return i=n,void((r=e).classList?r.classList.remove(i):typeof r.className=="string"?r.className=Ap(r.className,i):r.setAttribute("class",Ap(r.className&&r.className.baseVal||"",i)));var r,i})},pu=function(e){function t(){for(var r,i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(r=e.call.apply(e,[this].concat(o))||this).appliedClasses={appear:{},enter:{},exit:{}},r.onEnter=function(a,l){var c=r.resolveArguments(a,l),u=c[0],h=c[1];r.removeClasses(u,"exit"),r.addClass(u,h?"appear":"enter","base"),r.props.onEnter&&r.props.onEnter(a,l)},r.onEntering=function(a,l){var c=r.resolveArguments(a,l),u=c[0],h=c[1]?"appear":"enter";r.addClass(u,h,"active"),r.props.onEntering&&r.props.onEntering(a,l)},r.onEntered=function(a,l){var c=r.resolveArguments(a,l),u=c[0],h=c[1]?"appear":"enter";r.removeClasses(u,h),r.addClass(u,h,"done"),r.props.onEntered&&r.props.onEntered(a,l)},r.onExit=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"appear"),r.removeClasses(l,"enter"),r.addClass(l,"exit","base"),r.props.onExit&&r.props.onExit(a)},r.onExiting=function(a){var l=r.resolveArguments(a)[0];r.addClass(l,"exit","active"),r.props.onExiting&&r.props.onExiting(a)},r.onExited=function(a){var l=r.resolveArguments(a)[0];r.removeClasses(l,"exit"),r.addClass(l,"exit","done"),r.props.onExited&&r.props.onExited(a)},r.resolveArguments=function(a,l){return r.props.nodeRef?[r.props.nodeRef.current,a]:[a,l]},r.getClassNames=function(a){var l=r.props.classNames,c=typeof l=="string",u=c?(c&&l?l+"-":"")+a:l[a];return{baseClassName:u,activeClassName:c?u+"-active":l[a+"Active"],doneClassName:c?u+"-done":l[a+"Done"]}},r}R_(t,e);var n=t.prototype;return n.addClass=function(r,i,o){var s=this.getClassNames(i)[o+"ClassName"],a=this.getClassNames("enter").doneClassName;i==="appear"&&o==="done"&&a&&(s+=" "+a),o==="active"&&r&&r.scrollTop,s&&(this.appliedClasses[i][o]=s,function(l,c){l&&c&&c.split(" ").forEach(function(u){return d=u,void((h=l).classList?h.classList.add(d):function(p,f){return p.classList?!!f&&p.classList.contains(f):(" "+(p.className.baseVal||p.className)+" ").indexOf(" "+f+" ")!==-1}(h,d)||(typeof h.className=="string"?h.className=h.className+" "+d:h.setAttribute("class",(h.className&&h.className.baseVal||"")+" "+d)));var h,d})}(r,s))},n.removeClasses=function(r,i){var o=this.appliedClasses[i],s=o.base,a=o.active,l=o.done;this.appliedClasses[i]={},s&&fl(r,s),a&&fl(r,a),l&&fl(r,l)},n.render=function(){var r=this.props;r.classNames;var i=T_(r,["classNames"]);return Pe.createElement(bn,cu({},i,{onEnter:this.onEnter,onEntered:this.onEntered,onEntering:this.onEntering,onExit:this.onExit,onExiting:this.onExiting,onExited:this.onExited}))},t}(Pe.Component);pu.defaultProps={classNames:""},pu.propTypes={};const F0={ltr:["ArrowLeft","ArrowRight"],rtl:["ArrowRight","ArrowLeft"],ttb:["ArrowUp","ArrowDown"]};function N_(e,{focused:t,setFocused:n,itemCount:r,dir:i,onConfirm:o,onSpace:s}){if(r===0)return!1;const a=u=>{var h,d,p;h=0,d=u,p=r-1,u=Math.max(h,Math.min(d,p)),n(u)},[l,c]=F0[i];switch(e){case l:return a(t-1),!0;case c:return a(t+1),!0;case" ":return!!s&&s();case"Enter":case"Tab":return o(),!0}return!1}function b_({focused:e,setFocused:t,buttonId:n}){ve(()=>{var a;const s=n(e);s&&((a=document.getElementById(s))==null||a.scrollIntoView({block:"nearest"}))},[e,n]);const r=it(s=>{const a=s.currentTarget.dataset.index;t(+a)},[t]),i=at(()=>({role:"menu","aria-activedescendant":n(e)}),[e,n]),o=it(s=>({onMouseMove:r,id:n(s),"data-index":s}),[r,n]);return{containerProps:i,itemProps:o}}function k_(e){const[t,n]=ut([]),[r,i]=ut([]),[o,s]=ut(0),[a,l]=ut(0),c=Rc(),u=at(()=>(c==null?void 0:c.value)&&new c.value.Database({dataSource:c.value.dataSource}),[c]),h=xo(),d=dt(h.state$.suggestEmojiQuery);Z(()=>{u&&(d?async function(){const _=await u.getPreferredSkinTone();l(_);let g=await u.getEmojiBySearchQuery(d);if(g=g.filter(D=>D.url||function(S){return S.version<=wm&&!U0.includes(S.unicode)}(D)),function(D,S){S.sort((I,T)=>{var v,y;const C=(v=I.shortcodes)==null?void 0:v.find(b=>b.startsWith(D)),O=(y=T.shortcodes)==null?void 0:y.find(b=>b.startsWith(D));return C&&!O?-1:!C&&O?1:C&&O?C.length-O.length:0})}(d.substring(1),g),s(0),n(g),g.length>0&&i(g),d.endsWith(":")){const D=d.slice(1,-1),S=g.find(I=>{var T;return(T=I.shortcodes)==null?void 0:T.includes(D)});S&&h.selectEmoji(qi(S,_))}}():n([]))},[d,h,u]);const p=it(_=>{const g=t[_];return g&&"emoji-button-"+qi(g,a)},[t,a]),{containerProps:f,itemProps:m}=b_({focused:o,setFocused:s,buttonId:p}),E=t.length>0;$o(()=>h.closeSuggester(),".t-emoji-suggest-bar",E),Z(()=>{if(E)return h.listenKeydown("emoji",_=>N_(_,{dir:"ltr",focused:o,setFocused:s,itemCount:t.length,onConfirm(){const g=t[o];mt.defined(g),h.selectEmoji(qi(g,a))}})),()=>{h.listenKeydown("emoji",void 0)};h.listenKeydown("emoji",void 0)},[h,t,o,E,a]);const A=Q(null);return L(pu,{in:E,timeout:100,classNames:"slide",mountOnEnter:!0,unmountOnExit:!0,nodeRef:A,children:L("div",{className:"t-emoji-suggest-bar",ref:A,...f,children:r.map((_,g)=>L(B0,{emoji:_,skinTone:a,focused:g===o,onSelect:D=>h.selectEmoji(D),...m(g)},qi(_,a)))})})}function qi(e,t){return fu(e)?w_(e,t):e.name}function fu(e){return!!e.unicode}function B0(e){var l;const{emoji:t,focused:n,skinTone:r,onSelect:i,...o}=e,s=((l=t.shortcodes)!=null?l:[]).join(", "),a=fu(t)?[t.unicode,s].join(", "):s;return L("button",{"t-focused":n?"":void 0,title:s,"aria-label":a,onClick:()=>i(qi(t,r)),...o,children:fu(t)?w_(t,r):null})}function w_(e,t){var r,i;const n=(r=e.skins)==null?void 0:r.find(o=>o.tone===t);return(i=n==null?void 0:n.unicode)!=null?i:e.unicode}const U0=["🏻","🏼","🏽","🏾","🏿"],H0=["top","right","bottom","left"],$s=Math.min,Lr=Math.max,Vs=Math.round,ns=Math.floor,gn=e=>({x:e,y:e}),j0={left:"right",right:"left",bottom:"top",top:"bottom"},$0={start:"end",end:"start"};function Dp(e,t,n){return Lr(e,$s(t,n))}function Aa(e,t){return typeof e=="function"?e(t):e}function yi(e){return e.split("-")[0]}function yc(e){return e.split("-")[1]}function L_(e){return e==="x"?"y":"x"}function P_(e){return e==="y"?"height":"width"}const V0=new Set(["top","bottom"]);function Ir(e){return V0.has(yi(e))?"y":"x"}function M_(e){return L_(Ir(e))}function mu(e){return e.replace(/start|end/g,t=>$0[t])}const Op=["left","right"],vp=["right","left"],z0=["top","bottom"],Y0=["bottom","top"];function G0(e,t,n,r){const i=yc(e);let o=function(s,a,l){switch(s){case"top":case"bottom":return l?a?vp:Op:a?Op:vp;case"left":case"right":return a?z0:Y0;default:return[]}}(yi(e),n==="start",r);return i&&(o=o.map(s=>s+"-"+i),t&&(o=o.concat(o.map(mu)))),o}function rs(e){return e.replace(/left|right|bottom|top/g,t=>j0[t])}function zs(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Sp(e,t,n){let{reference:r,floating:i}=e;const o=Ir(t),s=M_(t),a=P_(s),l=yi(t),c=o==="y",u=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,d=r[a]/2-i[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-i.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:h};break;case"left":p={x:r.x-i.width,y:h};break;default:p={x:r.x,y:r.y}}switch(yc(t)){case"start":p[s]-=d*(n&&c?-1:1);break;case"end":p[s]+=d*(n&&c?-1:1)}return p}async function Ys(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:d=!1,padding:p=0}=Aa(t,e),f=function(S){return typeof S!="number"?function(I){return{top:0,right:0,bottom:0,left:0,...I}}(S):{top:S,right:S,bottom:S,left:S}}(p),m=a[d?h==="floating"?"reference":"floating":h],E=zs(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(m)))==null||n?m:m.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),A=h==="floating"?{x:r,y:i,width:s.floating.width,height:s.floating.height}:s.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),g=await(o.isElement==null?void 0:o.isElement(_))&&await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1},D=zs(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:A,offsetParent:_,strategy:l}):A);return{top:(E.top-D.top+f.top)/g.y,bottom:(D.bottom-E.bottom+f.bottom)/g.y,left:(E.left-D.left+f.left)/g.x,right:(D.right-E.right+f.right)/g.x}}function Tp(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Rp(e){return H0.some(t=>e[t]>=0)}function ga(){return typeof window!="undefined"}function Ci(e){return Cc(e)?(e.nodeName||"").toLowerCase():"#document"}function Be(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Dn(e){var t;return(t=(Cc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Cc(e){return!!ga()&&(e instanceof Node||e instanceof Be(e).Node)}function en(e){return!!ga()&&(e instanceof Element||e instanceof Be(e).Element)}function vn(e){return!!ga()&&(e instanceof HTMLElement||e instanceof Be(e).HTMLElement)}function Eu(e){return!(!ga()||typeof ShadowRoot=="undefined")&&(e instanceof ShadowRoot||e instanceof Be(e).ShadowRoot)}const W0=new Set(["inline","contents"]);function To(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=nn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!W0.has(i)}const X0=new Set(["table","td","th"]);function K0(e){return X0.has(Ci(e))}const q0=[":popover-open",":modal"];function Gs(e){return q0.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const J0=["transform","translate","scale","rotate","perspective"],Z0=["transform","translate","scale","rotate","perspective","filter"],Q0=["paint","layout","strict","content"];function _u(e){const t=Nc(),n=en(e)?nn(e):e;return J0.some(r=>!!n[r]&&n[r]!=="none")||!!n.containerType&&n.containerType!=="normal"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||Z0.some(r=>(n.willChange||"").includes(r))||Q0.some(r=>(n.contain||"").includes(r))}function Nc(){return!(typeof CSS=="undefined"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const tS=new Set(["html","body","#document"]);function pi(e){return tS.has(Ci(e))}function nn(e){return Be(e).getComputedStyle(e)}function Da(e){return en(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function er(e){if(Ci(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Eu(e)&&e.host||Dn(e);return Eu(t)?t.host:t}function x_(e){const t=er(e);return pi(t)?e.ownerDocument?e.ownerDocument.body:e.body:vn(t)&&To(t)?t:x_(t)}function Ro(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=x_(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),s=Be(i);if(o){const a=Au(s);return t.concat(s,s.visualViewport||[],To(i)?i:[],a&&n?Ro(a):[])}return t.concat(i,Ro(i,[],n))}function Au(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function F_(e){const t=nn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=vn(e),o=i?e.offsetWidth:n,s=i?e.offsetHeight:r,a=Vs(n)!==o||Vs(r)!==s;return a&&(n=o,r=s),{width:n,height:r,$:a}}function bc(e){return en(e)?e:e.contextElement}function fi(e){const t=bc(e);if(!vn(t))return gn(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=F_(t);let s=(o?Vs(n.width):n.width)/r,a=(o?Vs(n.height):n.height)/i;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const eS=gn(0);function B_(e){const t=Be(e);return Nc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eS}function Hr(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=bc(e);let s=gn(1);t&&(r?en(r)&&(s=fi(r)):s=fi(e));const a=function(d,p,f){return p===void 0&&(p=!1),!(!f||p&&f!==Be(d))&&p}(o,n,r)?B_(o):gn(0);let l=(i.left+a.x)/s.x,c=(i.top+a.y)/s.y,u=i.width/s.x,h=i.height/s.y;if(o){const d=Be(o),p=r&&en(r)?Be(r):r;let f=d,m=Au(f);for(;m&&r&&p!==f;){const E=fi(m),A=m.getBoundingClientRect(),_=nn(m),g=A.left+(m.clientLeft+parseFloat(_.paddingLeft))*E.x,D=A.top+(m.clientTop+parseFloat(_.paddingTop))*E.y;l*=E.x,c*=E.y,u*=E.x,h*=E.y,l+=g,c+=D,f=Be(m),m=Au(f)}}return zs({width:u,height:h,x:l,y:c})}function Ws(e,t){const n=Da(e).scrollLeft;return t?t.left+n:Hr(Dn(e)).left+n}function U_(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ws(e,n),y:n.top+t.scrollTop}}const nS=new Set(["absolute","fixed"]);function Ip(e,t,n){let r;if(t==="viewport")r=function(i,o){const s=Be(i),a=Dn(i),l=s.visualViewport;let c=a.clientWidth,u=a.clientHeight,h=0,d=0;if(l){c=l.width,u=l.height;const f=Nc();(!f||f&&o==="fixed")&&(h=l.offsetLeft,d=l.offsetTop)}const p=Ws(a);if(p<=0){const f=a.ownerDocument,m=f.body,E=getComputedStyle(m),A=f.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,_=Math.abs(a.clientWidth-m.clientWidth-A);_<=25&&(c-=_)}else p<=25&&(c+=p);return{width:c,height:u,x:h,y:d}}(e,n);else if(t==="document")r=function(i){const o=Dn(i),s=Da(i),a=i.ownerDocument.body,l=Lr(o.scrollWidth,o.clientWidth,a.scrollWidth,a.clientWidth),c=Lr(o.scrollHeight,o.clientHeight,a.scrollHeight,a.clientHeight);let u=-s.scrollLeft+Ws(i);const h=-s.scrollTop;return nn(a).direction==="rtl"&&(u+=Lr(o.clientWidth,a.clientWidth)-l),{width:l,height:c,x:u,y:h}}(Dn(e));else if(en(t))r=function(i,o){const s=Hr(i,!0,o==="fixed"),a=s.top+i.clientTop,l=s.left+i.clientLeft,c=vn(i)?fi(i):gn(1);return{width:i.clientWidth*c.x,height:i.clientHeight*c.y,x:l*c.x,y:a*c.y}}(t,n);else{const i=B_(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return zs(r)}function H_(e,t){const n=er(e);return!(n===t||!en(n)||pi(n))&&(nn(n).position==="fixed"||H_(n,t))}function rS(e,t,n){const r=vn(t),i=Dn(t),o=n==="fixed",s=Hr(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const l=gn(0);function c(){l.x=Ws(i)}if(r||!r&&!o)if((Ci(t)!=="body"||To(i))&&(a=Da(t)),r){const h=Hr(t,!0,o,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&c();o&&!r&&i&&c();const u=!i||r||o?gn(0):U_(i,a);return{x:s.left+a.scrollLeft-l.x-u.x,y:s.top+a.scrollTop-l.y-u.y,width:s.width,height:s.height}}function ml(e){return nn(e).position==="static"}function yp(e,t){if(!vn(e)||nn(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Dn(e)===n&&(n=n.ownerDocument.body),n}function Cp(e,t){const n=Be(e);if(Gs(e))return n;if(!vn(e)){let i=er(e);for(;i&&!pi(i);){if(en(i)&&!ml(i))return i;i=er(i)}return n}let r=yp(e,t);for(;r&&K0(r)&&ml(r);)r=yp(r,t);return r&&pi(r)&&ml(r)&&!_u(r)?n:r||function(i){let o=er(i);for(;vn(o)&&!pi(o);){if(_u(o))return o;if(Gs(o))return null;o=er(o)}return null}(e)||n}const iS={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",s=Dn(r),a=!!t&&Gs(t.floating);if(r===s||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=gn(1);const u=gn(0),h=vn(r);if((h||!h&&!o)&&((Ci(r)!=="body"||To(s))&&(l=Da(r)),vn(r))){const p=Hr(r);c=fi(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const d=!s||h||o?gn(0):U_(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}},getDocumentElement:Dn,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=n==="clippingAncestors"?Gs(t)?[]:function(c,u){const h=u.get(c);if(h)return h;let d=Ro(c,[],!1).filter(E=>en(E)&&Ci(E)!=="body"),p=null;const f=nn(c).position==="fixed";let m=f?er(c):c;for(;en(m)&&!pi(m);){const E=nn(m),A=_u(m);A||E.position!=="fixed"||(p=null),(f?!A&&!p:!A&&E.position==="static"&&p&&nS.has(p.position)||To(m)&&!A&&H_(c,m))?d=d.filter(_=>_!==m):p=E,m=er(m)}return u.set(c,d),d}(t,this._c):[].concat(n),s=[...o,r],a=s[0],l=s.reduce((c,u)=>{const h=Ip(t,u,i);return c.top=Lr(h.top,c.top),c.right=$s(h.right,c.right),c.bottom=$s(h.bottom,c.bottom),c.left=Lr(h.left,c.left),c},Ip(t,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},getOffsetParent:Cp,getElementRects:async function(e){const t=this.getOffsetParent||Cp,n=this.getDimensions,r=await n(e.floating);return{reference:rS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=F_(e);return{width:t,height:n}},getScale:fi,isElement:en,isRTL:function(e){return nn(e).direction==="rtl"}};function Np(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function oS(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=bc(e),u=i||o?[...c?Ro(c):[],...Ro(t)]:[];u.forEach(E=>{i&&E.addEventListener("scroll",n,{passive:!0}),o&&E.addEventListener("resize",n)});const h=c&&a?function(E,A){let _,g=null;const D=Dn(E);function S(){var I;clearTimeout(_),(I=g)==null||I.disconnect(),g=null}return function I(T,C){T===void 0&&(T=!1),C===void 0&&(C=1),S();const O=E.getBoundingClientRect(),{left:v,top:y,width:b,height:P}=O;if(T||A(),!b||!P)return;const w={rootMargin:-ns(y)+"px "+-ns(D.clientWidth-(v+b))+"px "+-ns(D.clientHeight-(y+P))+"px "+-ns(v)+"px",threshold:Lr(0,$s(1,C))||1};let F=!0;function H(B){const K=B[0].intersectionRatio;if(K!==C){if(!F)return I();K?I(!1,K):_=setTimeout(()=>{I(!1,1e-7)},1e3)}K!==1||Np(O,E.getBoundingClientRect())||I(),F=!1}try{g=new IntersectionObserver(H,{...w,root:D.ownerDocument})}catch(B){g=new IntersectionObserver(H,w)}g.observe(E)}(!0),S}(c,n):null;let d,p=-1,f=null;s&&(f=new ResizeObserver(E=>{let[A]=E;A&&A.target===c&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var _;(_=f)==null||_.observe(t)})),n()}),c&&!l&&f.observe(c),f.observe(t));let m=l?Hr(e):null;return l&&function E(){const A=Hr(e);m&&!Np(m,A)&&n(),m=A,d=requestAnimationFrame(E)}(),n(),()=>{var E;u.forEach(A=>{i&&A.removeEventListener("scroll",n),o&&A.removeEventListener("resize",n)}),h==null||h(),(E=f)==null||E.disconnect(),f=null,l&&cancelAnimationFrame(d)}}const sS=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:a={fn:E=>{let{x:A,y:_}=E;return{x:A,y:_}}},...l}=Aa(e,t),c={x:n,y:r},u=await Ys(t,l),h=Ir(yi(i)),d=L_(h);let p=c[d],f=c[h];if(o){const E=d==="y"?"bottom":"right";p=Dp(p+u[d==="y"?"top":"left"],p,p-u[E])}if(s){const E=h==="y"?"bottom":"right";f=Dp(f+u[h==="y"?"top":"left"],f,f-u[E])}const m=a.fn({...t,[d]:p,[h]:f});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:o,[h]:s}}}}}},aS=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:f="none",flipAlignment:m=!0,...E}=Aa(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const A=yi(i),_=Ir(a),g=yi(a)===a,D=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=d||(g||!m?[rs(a)]:function(w){const F=rs(w);return[mu(w),F,mu(F)]}(a)),I=f!=="none";!d&&I&&S.push(...G0(a,m,f,D));const T=[a,...S],C=await Ys(t,E),O=[];let v=((r=o.flip)==null?void 0:r.overflows)||[];if(u&&O.push(C[A]),h){const w=function(F,H,B){B===void 0&&(B=!1);const K=yc(F),W=M_(F),X=P_(W);let G=W==="x"?K===(B?"end":"start")?"right":"left":K==="start"?"bottom":"top";return H.reference[X]>H.floating[X]&&(G=rs(G)),[G,rs(G)]}(i,s,D);O.push(C[w[0]],C[w[1]])}if(v=[...v,{placement:i,overflows:O}],!O.every(w=>w<=0)){var y,b;const w=(((y=o.flip)==null?void 0:y.index)||0)+1,F=T[w];if(F&&(!(h==="alignment"&&_!==Ir(F))||v.every(B=>Ir(B.placement)!==_||B.overflows[0]>0)))return{data:{index:w,overflows:v},reset:{placement:F}};let H=(b=v.filter(B=>B.overflows[0]<=0).sort((B,K)=>B.overflows[1]-K.overflows[1])[0])==null?void 0:b.placement;if(!H)switch(p){case"bestFit":{var P;const B=(P=v.filter(K=>{if(I){const W=Ir(K.placement);return W===_||W==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(W=>W>0).reduce((W,X)=>W+X,0)]).sort((K,W)=>K[1]-W[1])[0])==null?void 0:P[0];B&&(H=B);break}case"initialPlacement":H=a}if(i!==H)return{reset:{placement:H}}}return{}}}},lS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=Aa(e,t);switch(r){case"referenceHidden":{const o=Tp(await Ys(t,{...i,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:Rp(o)}}}case"escaped":{const o=Tp(await Ys(t,{...i,altBoundary:!0}),n.floating);return{data:{escapedOffsets:o,escaped:Rp(o)}}}default:return{}}}}},uS=(e,t,n)=>{const r=new Map,i={platform:iS,...n},o={...i.platform,_c:r};return(async(s,a,l)=>{const{placement:c="bottom",strategy:u="absolute",middleware:h=[],platform:d}=l,p=h.filter(Boolean),f=await(d.isRTL==null?void 0:d.isRTL(a));let m=await d.getElementRects({reference:s,floating:a,strategy:u}),{x:E,y:A}=Sp(m,c,f),_=c,g={},D=0;for(let S=0;S<p.length;S++){const{name:I,fn:T}=p[S],{x:C,y:O,data:v,reset:y}=await T({x:E,y:A,initialPlacement:c,placement:_,strategy:u,middlewareData:g,rects:m,platform:d,elements:{reference:s,floating:a}});E=C!=null?C:E,A=O!=null?O:A,g={...g,[I]:{...g[I],...v}},y&&D<=50&&(D++,typeof y=="object"&&(y.placement&&(_=y.placement),y.rects&&(m=y.rects===!0?await d.getElementRects({reference:s,floating:a,strategy:u}):y.rects),{x:E,y:A}=Sp(m,_,f)),S=-1)}return{x:E,y:A,placement:_,strategy:u,middlewareData:g}})(e,t,{...i,platform:o})};var Es=typeof document!="undefined"?ve:function(){};function Xs(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Xs(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if((o!=="_owner"||!e.$$typeof)&&!Xs(e[o],t[o]))return!1}return!0}return e!=e&&t!=t}function j_(e){return typeof window=="undefined"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bp(e,t){const n=j_(e);return Math.round(t*n)/n}function El(e){const t=Q(e);return Es(()=>{t.current=e}),t}const cS=(e,t)=>({...sS(e),options:[e,t]}),dS=(e,t)=>({...aS(e),options:[e,t]}),hS=(e,t)=>({...lS(e),options:[e,t]});var $_=["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=$_.join(","),V_=typeof Element=="undefined",jr=V_?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_s=!V_&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Io=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert");return r===""||r==="true"||t&&e&&Io(e.parentNode)},z_=function(e,t,n){if(Io(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Ks));return t&&jr.call(e,Ks)&&r.unshift(e),r=r.filter(n)},qs=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!Io(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),a=s.length?s:o.children,l=qs(a,!0,n);n.flatten?r.push.apply(r,l):r.push({scopeParent:o,candidates:l})}else{jr.call(o,Ks)&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var c=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),u=!Io(c,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(c&&u){var h=qs(c===!0?o.children:c.children,!0,n);n.flatten?r.push.apply(r,h):r.push({scopeParent:o,candidates:h})}else i.unshift.apply(i,o.children)}}return r},Y_=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Jn=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"}(e))&&!Y_(e)?0:e.tabIndex},pS=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},G_=function(e){return e.tagName==="INPUT"},fS=function(e){return function(t){return G_(t)&&t.type==="radio"}(e)&&!function(t){if(!t.name)return!0;var n,r=t.form||_s(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")n=i(window.CSS.escape(t.name));else try{n=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]}(n,t.form);return!o||o===t}(e)},kp=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},mS=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e)return!e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if(getComputedStyle(e).visibility==="hidden")return!0;var i=jr.call(e,"details>summary:first-of-type")?e.parentElement:e;if(jr.call(i,"details:not([open]) *"))return!0;if(n&&n!=="full"&&n!=="full-native"&&n!=="legacy-full"){if(n==="non-zero-area")return kp(e)}else{if(typeof r=="function"){for(var o=e;e;){var s=e.parentElement,a=_s(e);if(s&&!s.shadowRoot&&r(s)===!0)return kp(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=o}if(function(l){var c,u,h,d,p=l&&_s(l),f=(c=p)===null||c===void 0?void 0:c.host,m=!1;if(p&&p!==l)for(m=!!((u=f)!==null&&u!==void 0&&(h=u.ownerDocument)!==null&&h!==void 0&&h.contains(f)||l!=null&&(d=l.ownerDocument)!==null&&d!==void 0&&d.contains(l));!m&&f;){var E,A,_;m=!((A=f=(E=p=_s(f))===null||E===void 0?void 0:E.host)===null||A===void 0||(_=A.ownerDocument)===null||_===void 0||!_.contains(f))}return m}(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}return!1},Js=function(e,t){return!(t.disabled||Io(t)||function(n){return G_(n)&&n.type==="hidden"}(t)||mS(t,e)||function(n){return n.tagName==="DETAILS"&&Array.prototype.slice.apply(n.children).some(function(r){return r.tagName==="SUMMARY"})}(t)||function(n){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(n.tagName))for(var r=n.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var i=0;i<r.children.length;i++){var o=r.children.item(i);if(o.tagName==="LEGEND")return!!jr.call(r,"fieldset[disabled] *")||!o.contains(n)}return!0}r=r.parentElement}return!1}(t))},gu=function(e,t){return!(fS(t)||Jn(t)<0||!Js(e,t))},ES=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},W_=function(e){var t=[],n=[];return e.forEach(function(r,i){var o=!!r.scopeParent,s=o?r.scopeParent:r,a=function(c,u){var h=Jn(c);return h<0&&u&&!Y_(c)?0:h}(s,o),l=o?W_(r.candidates):s;a===0?o?t.push.apply(t,l):t.push(s):n.push({documentOrder:i,tabIndex:a,item:r,isScope:o,content:l})}),n.sort(pS).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},Oa=function(e,t){var n;return n=(t=t||{}).getShadowRoot?qs([e],t.includeContainer,{filter:gu.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ES}):z_(e,t.includeContainer,gu.bind(null,t)),W_(n)},kc=function(e,t){return(t=t||{}).getShadowRoot?qs([e],t.includeContainer,{filter:Js.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):z_(e,t.includeContainer,Js.bind(null,t))},gr=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return jr.call(e,Ks)!==!1&&gu(t,e)},_S=$_.concat("iframe").join(","),As=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return jr.call(e,_S)!==!1&&Js(t,e)};const AS=Object.freeze(Object.defineProperty({__proto__:null,focusable:kc,getTabIndex:Jn,isFocusable:As,isTabbable:gr,tabbable:Oa},Symbol.toStringTag,{value:"Module"}));function Du(e){return(e==null?void 0:e.ownerDocument)||document}var so=typeof document!="undefined"?ve:function(){};const X_=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function wp(e,t){const n=Oa(e,X_()),r=n.length;if(r===0)return;const i=function(s){let a=s.activeElement;for(;((l=a)==null||(l=l.shadowRoot)==null?void 0:l.activeElement)!=null;){var l;a=a.shadowRoot.activeElement}return a}(Du(e)),o=n.indexOf(i);return n[o===-1?t===1?0:r-1:o+t]}function _l(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!function(i,o){if(!i||!o)return!1;const s=o.getRootNode==null?void 0:o.getRootNode();if(i.contains(o))return!0;if(s&&Eu(s)){let a=o;for(;a;){if(i===a)return!0;a=a.parentNode||a.host}}return!1}(n,r)}function gS(e){Oa(e,X_()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function Lp(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}const DS={...$u};let Pp=!1,OS=0;const Mp=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+OS++,vS=DS.useId||function(){const[e,t]=ut(()=>Pp?Mp():void 0);return so(()=>{e==null&&t(Mp())},[]),Z(()=>{Pp=!0},[]),e};function K_(e){return"data-floating-ui-"+e}const q_={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},xp=je(function(e,t){const[n,r]=ut();return so(()=>{/apple/i.test(navigator.vendor)&&r("button")},[]),L("span",{...e,ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[K_("focus-guard")]:"",style:q_})}),J_=Ni(null),Fp=K_("portal");function SS(e){const{children:t,id:n,root:r,preserveTabOrder:i=!0}=e,o=function(m){m===void 0&&(m={});const{id:E,root:A}=m,_=vS(),g=TS(),[D,S]=ut(null),I=Q(null);return so(()=>()=>{D==null||D.remove(),queueMicrotask(()=>{I.current=null})},[D]),so(()=>{if(!_||I.current)return;const T=E?document.getElementById(E):null;if(!T)return;const C=document.createElement("div");C.id=_,C.setAttribute(Fp,""),T.appendChild(C),I.current=C,S(C)},[E,_]),so(()=>{if(A===null||!_||I.current)return;let T=A||(g==null?void 0:g.portalNode);T&&!Cc(T)&&(T=T.current),T=T||document.body;let C=null;E&&(C=document.createElement("div"),C.id=E,T.appendChild(C));const O=document.createElement("div");O.id=_,O.setAttribute(Fp,""),T=C||T,T.appendChild(O),I.current=O,S(O)},[E,A,_,g]),D}({id:n,root:r}),[s,a]=ut(null),l=Q(null),c=Q(null),u=Q(null),h=Q(null),d=s==null?void 0:s.modal,p=s==null?void 0:s.open,f=!!s&&!s.modal&&s.open&&i&&!(!r&&!o);return Z(()=>{if(o&&i&&!d)return o.addEventListener("focusin",m,!0),o.addEventListener("focusout",m,!0),()=>{o.removeEventListener("focusin",m,!0),o.removeEventListener("focusout",m,!0)};function m(E){o&&_l(E)&&(E.type==="focusin"?Lp:gS)(o)}},[o,i,d]),Z(()=>{o&&(p||Lp(o))},[p,o]),L(J_.Provider,{value:at(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:h,portalNode:o,setFocusManagerState:a}),[i,o]),children:[f&&o&&L(xp,{"data-type":"outside",ref:l,onFocus:m=>{if(_l(m,o)){var E;(E=u.current)==null||E.focus()}else{const _=s?s.domReference:null,g=wp(Du(A=_).body,-1)||A;g==null||g.focus()}var A}}),f&&o&&L("span",{"aria-owns":o.id,style:q_}),o&&Fu(t,o),f&&o&&L(xp,{"data-type":"outside",ref:c,onFocus:m=>{if(_l(m,o)){var E;(E=h.current)==null||E.focus()}else{const _=s?s.domReference:null,g=wp(Du(A=_).body,1)||A;g==null||g.focus(),s!=null&&s.closeOnFocusOut&&(s==null||s.onOpenChange(!1,m.nativeEvent,"focus-out"))}var A}})]})}const TS=()=>ar(J_);var Z_={exports:{}};function Ou(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Bp(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Q_(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
94
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return s=l.done,l},e:function(l){a=!0,o=l},f:function(){try{s||n.return==null||n.return()}finally{if(a)throw o}}}}function RS(e,t,n){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 e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Up(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Hp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Up(Object(n),!0).forEach(function(r){RS(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Up(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function IS(e){return function(t){if(Array.isArray(t))return Ou(t)}(e)||function(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}(e)||Q_(e)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
95
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Q_(e,t){if(e){if(typeof e=="string")return Ou(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ou(e,t):void 0}}var Ln={getActiveTrap:function(e){return(e==null?void 0:e.length)>0?e[e.length-1]:null},activateTrap:function(e,t){t!==Ln.getActiveTrap(e)&&Ln.pauseTrap(e);var n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),Ln.unpauseTrap(e)},pauseTrap:function(e){var t=Ln.getActiveTrap(e);t==null||t._setPausedState(!0)},unpauseTrap:function(e){var t=Ln.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},ao=function(e){return(e==null?void 0:e.key)==="Tab"||(e==null?void 0:e.keyCode)===9},yS=function(e){return ao(e)&&!e.shiftKey},CS=function(e){return ao(e)&&e.shiftKey},jp=function(e){return setTimeout(e,0)},Vi=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return typeof e=="function"?e.apply(void 0,n):e},is=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},NS=[];const bS=Object.freeze(Object.defineProperty({__proto__:null,createFocusTrap:function(e,t){var n,r=(t==null?void 0:t.document)||document,i=(t==null?void 0:t.trapStack)||NS,o=Hp({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isolateSubtrees:!1,isKeyForward:yS,isKeyBackward:CS},t),s={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadyInert:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},a=function(O,v,y){return O&&O[v]!==void 0?O[v]:o[y||v]},l=function(O,v){var y=typeof(v==null?void 0:v.composedPath)=="function"?v.composedPath():void 0;return s.containerGroups.findIndex(function(b){var P=b.container,w=b.tabbableNodes;return P.contains(O)||(y==null?void 0:y.includes(P))||w.find(function(F){return F===O})})},c=function(O){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.hasFallback,b=y!==void 0&&y,P=v.params,w=P===void 0?[]:P,F=o[O];if(typeof F=="function"&&(F=F.apply(void 0,IS(w))),F===!0&&(F=void 0),!F){if(F===void 0||F===!1)return F;throw new Error("`".concat(O,"` was specified but was not a node, or did not return a node"))}var H=F;if(typeof F=="string"){try{H=r.querySelector(F)}catch(B){throw new Error("`".concat(O,'` appears to be an invalid selector; error="').concat(B.message,'"'))}if(!H&&!b)throw new Error("`".concat(O,"` as selector refers to no known node"))}return H},u=function(){var O=c("initialFocus",{hasFallback:!0});if(O===!1)return!1;if(O===void 0||O&&!As(O,o.tabbableOptions))if(l(r.activeElement)>=0)O=r.activeElement;else{var v=s.tabbableGroups[0];O=v&&v.firstTabbableNode||c("fallbackFocus")}else O===null&&(O=c("fallbackFocus"));if(!O)throw new Error("Your focus-trap needs to have at least one focusable element");return O},h=function(){if(s.containerGroups=s.containers.map(function(O){var v=Oa(O,o.tabbableOptions),y=kc(O,o.tabbableOptions),b=v.length>0?v[0]:void 0,P=v.length>0?v[v.length-1]:void 0,w=y.find(function(B){return gr(B)}),F=y.slice().reverse().find(function(B){return gr(B)}),H=!!v.find(function(B){return Jn(B)>0});return{container:O,tabbableNodes:v,focusableNodes:y,posTabIndexesFound:H,firstTabbableNode:b,lastTabbableNode:P,firstDomTabbableNode:w,lastDomTabbableNode:F,nextTabbableNode:function(B){var K=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],W=v.indexOf(B);return W<0?K?y.slice(y.indexOf(B)+1).find(function(X){return gr(X)}):y.slice(0,y.indexOf(B)).reverse().find(function(X){return gr(X)}):v[W+(K?1:-1)]}}}),s.tabbableGroups=s.containerGroups.filter(function(O){return O.tabbableNodes.length>0}),s.tabbableGroups.length<=0&&!c("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(s.containerGroups.find(function(O){return O.posTabIndexesFound})&&s.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},d=function(O){var v=O.activeElement;if(v)return v.shadowRoot&&v.shadowRoot.activeElement!==null?d(v.shadowRoot):v},p=function(O){O!==!1&&O!==d(document)&&(O&&O.focus?(O.focus({preventScroll:!!o.preventScroll}),s.mostRecentlyFocusedNode=O,function(v){return v.tagName&&v.tagName.toLowerCase()==="input"&&typeof v.select=="function"}(O)&&O.select()):p(u()))},f=function(O){var v=c("setReturnFocus",{params:[O]});return v||v!==!1&&O},m=function(O){var v=O.target,y=O.event,b=O.isBackward,P=b!==void 0&&b;v=v||is(y),h();var w=null;if(s.tabbableGroups.length>0){var F=l(v,y),H=F>=0?s.containerGroups[F]:void 0;if(F<0)w=P?s.tabbableGroups[s.tabbableGroups.length-1].lastTabbableNode:s.tabbableGroups[0].firstTabbableNode;else if(P){var B=s.tabbableGroups.findIndex(function(tt){var rt=tt.firstTabbableNode;return v===rt});if(B<0&&(H.container===v||As(v,o.tabbableOptions)&&!gr(v,o.tabbableOptions)&&!H.nextTabbableNode(v,!1))&&(B=F),B>=0){var K=B===0?s.tabbableGroups.length-1:B-1,W=s.tabbableGroups[K];w=Jn(v)>=0?W.lastTabbableNode:W.lastDomTabbableNode}else ao(y)||(w=H.nextTabbableNode(v,!1))}else{var X=s.tabbableGroups.findIndex(function(tt){var rt=tt.lastTabbableNode;return v===rt});if(X<0&&(H.container===v||As(v,o.tabbableOptions)&&!gr(v,o.tabbableOptions)&&!H.nextTabbableNode(v))&&(X=F),X>=0){var G=X===s.tabbableGroups.length-1?0:X+1,ht=s.tabbableGroups[G];w=Jn(v)>=0?ht.firstTabbableNode:ht.firstDomTabbableNode}else ao(y)||(w=H.nextTabbableNode(v))}}else w=c("fallbackFocus");return w},E=function(O){var v=is(O);l(v,O)>=0||(Vi(o.clickOutsideDeactivates,O)?n.deactivate({returnFocus:o.returnFocusOnDeactivate}):Vi(o.allowOutsideClick,O)||O.preventDefault())},A=function(O){var v=is(O),y=l(v,O)>=0;if(y||v instanceof Document)y&&(s.mostRecentlyFocusedNode=v);else{var b;O.stopImmediatePropagation();var P=!0;if(s.mostRecentlyFocusedNode)if(Jn(s.mostRecentlyFocusedNode)>0){var w=l(s.mostRecentlyFocusedNode),F=s.containerGroups[w].tabbableNodes;if(F.length>0){var H=F.findIndex(function(B){return B===s.mostRecentlyFocusedNode});H>=0&&(o.isKeyForward(s.recentNavEvent)?H+1<F.length&&(b=F[H+1],P=!1):H-1>=0&&(b=F[H-1],P=!1))}}else s.containerGroups.some(function(B){return B.tabbableNodes.some(function(K){return Jn(K)>0})})||(P=!1);else P=!1;P&&(b=m({target:s.mostRecentlyFocusedNode,isBackward:o.isKeyBackward(s.recentNavEvent)})),p(b||s.mostRecentlyFocusedNode||u())}s.recentNavEvent=void 0},_=function(O){(o.isKeyForward(O)||o.isKeyBackward(O))&&function(v){var y=arguments.length>1&&arguments[1]!==void 0&&arguments[1];s.recentNavEvent=v;var b=m({event:v,isBackward:y});b&&(ao(v)&&v.preventDefault(),p(b))}(O,o.isKeyBackward(O))},g=function(O){(function(v){return(v==null?void 0:v.key)==="Escape"||(v==null?void 0:v.key)==="Esc"||(v==null?void 0:v.keyCode)===27})(O)&&Vi(o.escapeDeactivates,O)!==!1&&(O.preventDefault(),n.deactivate())},D=function(O){var v=is(O);l(v,O)>=0||Vi(o.clickOutsideDeactivates,O)||Vi(o.allowOutsideClick,O)||(O.preventDefault(),O.stopImmediatePropagation())},S=function(){if(s.active)return Ln.activateTrap(i,n),s.delayInitialFocusTimer=o.delayInitialFocus?jp(function(){p(u())}):p(u()),r.addEventListener("focusin",A,!0),r.addEventListener("mousedown",E,{capture:!0,passive:!1}),r.addEventListener("touchstart",E,{capture:!0,passive:!1}),r.addEventListener("click",D,{capture:!0,passive:!1}),r.addEventListener("keydown",_,{capture:!0,passive:!1}),r.addEventListener("keydown",g),n},I=function(){if(s.active)return r.removeEventListener("focusin",A,!0),r.removeEventListener("mousedown",E,!0),r.removeEventListener("touchstart",E,!0),r.removeEventListener("click",D,!0),r.removeEventListener("keydown",_,!0),r.removeEventListener("keydown",g),n},T=typeof window!="undefined"&&"MutationObserver"in window?new MutationObserver(function(O){O.some(function(v){return Array.from(v.removedNodes).some(function(y){return y===s.mostRecentlyFocusedNode})})&&p(u())}):void 0,C=function(){T&&(T.disconnect(),s.active&&!s.paused&&s.containers.map(function(O){T.observe(O,{subtree:!0,childList:!0})}))};return n={get active(){return s.active},get paused(){return s.paused},activate:function(O){if(s.active)return this;var v=a(O,"onActivate"),y=a(O,"onPostActivate"),b=a(O,"checkCanFocusTrap"),P=Ln.getActiveTrap(i),w=!1;P&&!P.paused&&(P._setSubtreeIsolation(!1),w=!0);try{b||h(),s.active=!0,s.paused=!1,s.nodeFocusedBeforeActivation=d(r),v==null||v();var F=function(){b&&h(),S(),C(),o.isolateSubtrees&&n._setSubtreeIsolation(!0),y==null||y()};if(b)return b(s.containers.concat()).then(F,F),this;F()}catch(H){throw P===Ln.getActiveTrap(i)&&w&&P._setSubtreeIsolation(!0),H}return this},deactivate:function(O){if(!s.active)return this;var v=Hp({onDeactivate:o.onDeactivate,onPostDeactivate:o.onPostDeactivate,checkCanReturnFocus:o.checkCanReturnFocus},O);clearTimeout(s.delayInitialFocusTimer),s.delayInitialFocusTimer=void 0,s.paused||n._setSubtreeIsolation(!1),s.alreadyInert.clear(),I(),s.active=!1,s.paused=!1,C(),Ln.deactivateTrap(i,n);var y=a(v,"onDeactivate"),b=a(v,"onPostDeactivate"),P=a(v,"checkCanReturnFocus"),w=a(v,"returnFocus","returnFocusOnDeactivate");y==null||y();var F=function(){jp(function(){w&&p(f(s.nodeFocusedBeforeActivation)),b==null||b()})};return w&&P?(P(f(s.nodeFocusedBeforeActivation)).then(F,F),this):(F(),this)},pause:function(O){return s.active?(s.manuallyPaused=!0,this._setPausedState(!0,O)):this},unpause:function(O){return s.active?(s.manuallyPaused=!1,i[i.length-1]!==this?this:this._setPausedState(!1,O)):this},updateContainerElements:function(O){var v=[].concat(O).filter(Boolean);return s.containers=v.map(function(y){return typeof y=="string"?r.querySelector(y):y}),o.isolateSubtrees&&function(y){s.active&&!s.paused&&n._setSubtreeIsolation(!1),s.adjacentElements.clear(),s.alreadyInert.clear();var b,P=new Set,w=new Set,F=Bp(y);try{for(F.s();!(b=F.n()).done;){var H=b.value;P.add(H);for(var B=typeof ShadowRoot!="undefined"&&H.getRootNode()instanceof ShadowRoot,K=H;K;){P.add(K);var W=K.parentElement,X=[];W?X=W.children:!W&&B&&(X=K.getRootNode().children,W=K.getRootNode().host,B=typeof ShadowRoot!="undefined"&&W.getRootNode()instanceof ShadowRoot);var G,ht=Bp(X);try{for(ht.s();!(G=ht.n()).done;){var tt=G.value;w.add(tt)}}catch(rt){ht.e(rt)}finally{ht.f()}K=W}}}catch(rt){F.e(rt)}finally{F.f()}P.forEach(function(rt){w.delete(rt)}),s.adjacentElements=w}(s.containers),s.active&&(h(),o.isolateSubtrees&&!s.paused&&n._setSubtreeIsolation(!0)),C(),this}},Object.defineProperties(n,{_isManuallyPaused:{value:function(){return s.manuallyPaused}},_setPausedState:{value:function(O,v){if(s.paused===O)return this;if(s.paused=O,O){var y=a(v,"onPause"),b=a(v,"onPostPause");y==null||y(),I(),C(),n._setSubtreeIsolation(!1),b==null||b()}else{var P=a(v,"onUnpause"),w=a(v,"onPostUnpause");P==null||P(),n._setSubtreeIsolation(!0),h(),S(),C(),w==null||w()}return this}},_setSubtreeIsolation:{value:function(O){o.isolateSubtrees&&s.adjacentElements.forEach(function(v){O?((v.inert||v.hasAttribute("inert"))&&s.alreadyInert.add(v),v.inert=!0):s.alreadyInert.has(v)||(v.inert=!1)})}}}),n.updateContainerElements(e),n}},Symbol.toStringTag,{value:"Module"})),kS=Zu(bS),wS=Zu(AS);function mi(e){return mi=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},mi(e)}var Al,gl;function LS(e,t,n){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,eA(s.key),s)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PS(e,t,n){return t=Zs(t),function(r,i){if(i&&(mi(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)}(e,tA()?Reflect.construct(t,n||[],Zs(e).constructor):t.apply(e,n))}function tA(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(tA=function(){return!!e})()}function Zs(e){return Zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zs(e)}function vu(e,t){return vu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},vu(e,t)}function eA(e){var t=function(n,r){if(mi(n)!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,r);if(mi(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(n)}(e,"string");return mi(t)=="symbol"?t:t+""}var Ji=_m,MS=kS.createFocusTrap,xS=wS.isFocusable,FS=parseInt((Al=(gl=/^(\d+)\./.exec(Ji.version))===null||gl===void 0?void 0:gl[1])!==null&&Al!==void 0?Al:0,10),Su=function(){function e(t){var n;(function(o,s){if(!(o instanceof s))throw new TypeError("Cannot call a class as a function")})(this,e),function(o,s,a){(s=eA(s))in o?Object.defineProperty(o,s,{value:a,enumerable:!0,configurable:!0,writable:!0}):o[s]=a}(n=PS(this,e,[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,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];a=a.apply(void 0,c)}if(a===!0&&(a=void 0),!a){if(a===void 0||a===!1)return a;throw new Error("`".concat(o,"` was specified but was not a node, or did not return a node"))}var h,d=a;if(typeof a=="string"&&!(d=(h=this.getDocument())===null||h===void 0?void 0:h.querySelector(a)))throw new Error("`".concat(o,"` as selector refers to no known node"));return d}),n.handleDeactivate=n.handleDeactivate.bind(n),n.handlePostDeactivate=n.handlePostDeactivate.bind(n),n.handleClickOutsideDeactivates=n.handleClickOutsideDeactivates.bind(n),n.internalOptions={returnFocusOnDeactivate:!1,checkCanReturnFocus:null,onDeactivate:n.handleDeactivate,onPostDeactivate:n.handlePostDeactivate,clickOutsideDeactivates:n.handleClickOutsideDeactivates},n.originalOptions={returnFocusOnDeactivate:!0,onDeactivate:null,onPostDeactivate:null,checkCanReturnFocus:null,clickOutsideDeactivates:!1};var r=t.focusTrapOptions;for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(i!=="returnFocusOnDeactivate"&&i!=="onDeactivate"&&i!=="onPostDeactivate"&&i!=="checkCanReturnFocus"&&i!=="clickOutsideDeactivates"?n.internalOptions[i]=r[i]:n.originalOptions[i]=r[i]);return n.outsideClick=null,n.focusTrapElements=t.containerElements||[],n.updatePreviousElement(),n}return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(n&&n.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),n&&vu(t,n)}(e,Ji.Component),LS(e,[{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 n=typeof this.originalOptions.clickOutsideDeactivates=="function"?this.originalOptions.clickOutsideDeactivates.call(null,t):this.originalOptions.clickOutsideDeactivates;return n&&(this.outsideClick={target:t.target,allowDeactivation:n}),n}},{key:"handleDeactivate",value:function(){this.originalOptions.onDeactivate&&this.originalOptions.onDeactivate.call(null),this.deactivateTrap()}},{key:"handlePostDeactivate",value:function(){var t=this,n=function(){var r=t.getReturnFocusNode(),i=!(!t.originalOptions.returnFocusOnDeactivate||r==null||!r.focus||t.outsideClick&&(!t.outsideClick.allowDeactivation||xS(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(n,n):n()}},{key:"setupFocusTrap",value:function(){this.focusTrap?this.props.active&&!this.focusTrap.active&&(this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause()):this.focusTrapElements.some(Boolean)&&(this.focusTrap=this.props._createFocusTrap(this.focusTrapElements,this.internalOptions),this.props.active&&this.focusTrap.activate(),this.props.paused&&this.focusTrap.pause())}},{key:"componentDidMount",value:function(){this.props.active&&this.setupFocusTrap()}},{key:"componentDidUpdate",value:function(t){if(this.focusTrap){t.containerElements!==this.props.containerElements&&this.focusTrap.updateContainerElements(this.props.containerElements);var n=!t.active&&this.props.active,r=t.active&&!this.props.active,i=!t.paused&&this.props.paused,o=t.paused&&!this.props.paused;if(n&&(this.updatePreviousElement(),this.focusTrap.activate()),r)return void this.deactivateTrap();i&&this.focusTrap.pause(),o&&this.focusTrap.unpause()}else 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,n=this.props.children?Ji.Children.only(this.props.children):void 0;if(n){if(n.type&&n.type===Ji.Fragment)throw new Error("A focus-trap cannot use a Fragment as its child container. Try replacing it with a <div> element.");return Ji.cloneElement(n,{ref:function(r){var i=t.props.containerElements;n&&(FS>=19?typeof n.props.ref=="function"?n.props.ref(r):n.props.ref&&(n.props.ref.current=r):typeof n.ref=="function"?n.ref(r):n.ref&&(n.ref.current=r)),t.focusTrapElements=i||[r]}})}return null}}])}();Su.defaultProps={active:!0,paused:!1,focusTrapOptions:{},_createFocusTrap:MS},Z_.exports=Su;var BS=Z_.exports.FocusTrap=Su;function nA(e){var A,_;const{children:t,preferredPlacement:n="top-start",anchorElement:r,boundaryElement:i,trapFocus:o=!1,initialFocus:s,portal:a,...l}=e,{anchor:c,boundary:u}=at(()=>({anchor:$p(r),boundary:i?$p(i):void 0}),[r,i]);let h=[];u&&(h=[dS({boundary:u,fallbackPlacements:["top-start","top-end","bottom-start","bottom-end","top","bottom"]}),cS({boundary:u,padding:8}),hS({boundary:u})]);const{refs:d,floatingStyles:p,middlewareData:f}=function(g){g===void 0&&(g={});const{placement:D="bottom",strategy:S="absolute",middleware:I=[],platform:T,elements:{reference:C,floating:O}={},transform:v=!0,whileElementsMounted:y,open:b}=g,[P,w]=ut({x:0,y:0,strategy:S,placement:D,middlewareData:{},isPositioned:!1}),[F,H]=ut(I);Xs(F,I)||H(I);const[B,K]=ut(null),[W,X]=ut(null),G=it(ct=>{ct!==ot.current&&(ot.current=ct,K(ct))},[]),ht=it(ct=>{ct!==bt.current&&(bt.current=ct,X(ct))},[]),tt=C||B,rt=O||W,ot=Q(null),bt=Q(null),ee=Q(P),Gt=y!=null,vt=El(y),Pt=El(T),Se=El(b),Et=it(()=>{if(!ot.current||!bt.current)return;const ct={placement:D,strategy:S,middleware:F};Pt.current&&(ct.platform=Pt.current),uS(ot.current,bt.current,ct).then(me=>{const It={...me,isPositioned:Se.current!==!1};Mt.current&&!Xs(ee.current,It)&&(ee.current=It,ju(()=>{w(It)}))})},[F,D,S,Pt,Se]);Es(()=>{b===!1&&ee.current.isPositioned&&(ee.current.isPositioned=!1,w(ct=>({...ct,isPositioned:!1})))},[b]);const Mt=Q(!1);Es(()=>(Mt.current=!0,()=>{Mt.current=!1}),[]),Es(()=>{if(tt&&(ot.current=tt),rt&&(bt.current=rt),tt&&rt){if(vt.current)return vt.current(tt,rt,Et);Et()}},[tt,rt,Et,vt,Gt]);const Rt=at(()=>({reference:ot,floating:bt,setReference:G,setFloating:ht}),[G,ht]),fe=at(()=>({reference:tt,floating:rt}),[tt,rt]),$e=at(()=>{const ct={position:S,left:0,top:0};if(!fe.floating)return ct;const me=bp(fe.floating,P.x),It=bp(fe.floating,P.y);return v?{...ct,transform:"translate("+me+"px, "+It+"px)",...j_(fe.floating)>=1.5&&{willChange:"transform"}}:{position:S,left:me,top:It}},[S,v,fe.floating,P.x,P.y]);return at(()=>({...P,update:Et,refs:Rt,elements:fe,floatingStyles:$e}),[P,Et,Rt,fe,$e])}({placement:n,middleware:h,whileElementsMounted:oS});ve(()=>{c&&d.setReference(c)},[d,c]);const m=o?L(BS,{focusTrapOptions:{initialFocus:s,fallbackFocus:".t-fallback-focus",tabbableOptions:{getShadowRoot:!0}},children:L("div",{children:[t,L("span",{className:"t-fallback-focus",tabIndex:-1})]})}):t,E=L("div",{ref:d.setFloating,style:{...p,zIndex:1e3,visibility:(A=f.hide)!=null&&A.referenceHidden?"hidden":"visible"},...l,children:m});if(a){const g=(_=u||c)==null?void 0:_.closest("[t-menu-boundary='root']");return L(SS,{root:g,children:E})}return E}function $p(e){return typeof e=="string"?document.querySelector(e):e}function rA(e){const t=At(),n=xo(),r=dt(n.state$.suggestMentionQuery),i=E_(dt(t.state$.currentConversationId),r?1e3:0),o=at(()=>(i!=null?i:[]).map(E=>E.user),[i]),[s,a]=ut(0),l=at(()=>Object.fromEntries(o.map(E=>[E.id,oO(E.name)])),[o]),c=at(()=>{if(!r)return[];const E=Vp(r);return E===""?o:o.filter(A=>l[A.id].some(_=>function(g,D){return qh(g.substring(0,D.length),D)}(_,E)))},[r,o,l]),u=Q(void 0);Z(()=>{if(u.current){const E=c.findIndex(A=>A.id===u.current);a(E===-1?0:E)}},[c]),Z(()=>{var E;u.current=(E=c[s])==null?void 0:E.id},[s,c]);const h=it(E=>{var _;const A=(_=c[E])==null?void 0:_.id;return A&&"mention-button-"+A},[c]),{containerProps:d,itemProps:p}=b_({focused:s,setFocused:a,buttonId:h});if(Z(()=>{if(c.length!==0)return n.listenKeydown("mention",E=>N_(E,{dir:"ttb",focused:s,setFocused:a,itemCount:c.length,onSpace(){if(r){const A=c[s];if(qh(A.name,Vp(r)))return n.selectMention(A),!0}return!1},onConfirm(){const A=c[s];n.selectMention(A)}})),()=>{n.listenKeydown("mention",void 0)}},[n,s,c,r]),$o(()=>n.closeSuggester(),".t-mention-suggest-list",c.length>0),c.length===0)return null;const f=document.querySelector(".ProseMirror-suggestion");let m;if(f){let E=f.getBoundingClientRect();m={getBoundingClientRect(){const A=f.getBoundingClientRect();return A.width>0&&(E=A),E}}}return L(nA,{className:"t-mention-suggest-list",...d,anchorElement:m,children:c.map((E,A)=>L(US,{user:E,isFocused:A===s,onSelect:()=>n.selectMention(E),...p(A)},E.id))})}const US=Un(function(e){const{user:t,isFocused:n,onSelect:r,...i}=e;return L("button",{className:n?"focused":"",onClick:()=>r(t.id),...i,children:t.name})});function Vp(e){return mt(e[0]==="@"),e.substring(1)}function zp(e,t,n){const r=kc(e),i=r.indexOf(t);return i===-1?null:r[i+n]||null}const HS=je(function(e,t){const{children:n,triggerElement:r}=e,{closePopover:i}=tc(),o=Q(null);jn(t,()=>o.current),Z(()=>{var a;(a=o.current)==null||a.focus()},[]);const s=it(a=>{(function(l,c,u,h){var E;const d=c.querySelectorAll("[t-menu-item]"),p=document.activeElement;if(!p||!p.hasAttribute("t-menu-item")&&!p.hasAttribute("t-menu"))return;const f=Array.from(d).indexOf(p);let m;switch(l.key){case"ArrowDown":m=Math.min(f+1,d.length-1);break;case"ArrowUp":m=Math.max(f-1,0),f===-1&&(m=d.length-1);break;case"Home":m=0;break;case"End":m=d.length-1;break;case"Tab":{const A=u.closest("t-chatbox,t-conversation-list,.t-chatbox,.t-conversation-list"),_=l.shiftKey?zp(A,u,-1):function(g,D){return zp(g,D,1)}(A,u);return _==null||_.focus(),void h()}default:return}(E=d[m])==null||E.focus()})(a,o.current,r,i)},[i,r]);return L("div",{"t-menu":"",role:"menu",tabIndex:-1,ref:o,onKeyDown:s,children:n})});function oi(e){const{popoverComponent:t,popoverProps:n,children:r,type:i="popover",initialFocus:o,portal:s,...a}=e,[l,c]=ut(void 0),u=Q(null),[h,d]=ut(!1);$o(it(f=>{var m,E;f&&((m=u.current)!=null&&m.contains(f.target))||(d(!1),(E=u.current)==null||E.focus())},[]),"[t-popover-content]",h);const p=i==="menu"?L(HS,{triggerElement:u.current,children:L(t,{...n})}):L(t,{...n});return L(Fg.Provider,{value:{closePopover:()=>d(!1)},children:[L(jS,{...a,"aria-haspopup":i==="menu"?"menu":"true","aria-expanded":h,onTrigger:()=>d(f=>!f),ref:f=>(m=>{var A;const E=(A=m==null?void 0:m.closest("[t-menu-boundary]"))!=null?A:void 0;u.current=m,c(E)})(f),children:r}),h&&L(nA,{portal:s,"t-popover-content":"",anchorElement:u.current,boundaryElement:l,preferredPlacement:"bottom-start",trapFocus:i==="popover",initialFocus:i==="menu"?"t-menu":o,role:i==="menu"?void 0:"dialog",children:p})]})}const jS=je(function(e,t){const{onTrigger:n,...r}=e,i=it(o=>{o.key!=="Enter"&&o.key!==" "||n()},[n]);return L("button",{...r,ref:t,onClick:n,onKeyDown:i})});function Kn(e){const{onSelect:t,...n}=e,{closePopover:r}=tc(),i=it(o=>{o.key!=="Enter"&&o.key!==" "||(r(),t==null||t())},[t,r]);return L("div",{tabIndex:-1,role:"menuitem",onClick:it(()=>{r(),t==null||t()},[r,t]),onKeyDown:i,"t-menu-item":"",...n})}const $S={barHeight:4,barRadius:2,barGap:2,barWidth:2,height:24},Dl={state:null,duration:0,recordingUrl:void 0,uploadState:"done",fileToken:void 0},iA=new WeakMap;function oA({className:e,voiceRecorder:t}){const n=iA.get(t);return n?L("div",{className:e,style:{shapeRendering:"crispEdges"},ref:n}):(tn.warn("Can only use Waveform component if a voice recorder is active"),null)}function sA(e,t){return e.map(r=>function(i,o){if(i.type==="text")return function(s,a){const l=vc(a);return gs(s,l)}(i.children,o);if(i.type==="file"&&i.subtype==="video")return`🎥 ${Qo(i.url)}`;if(i.type==="file"&&i.subtype==="image")return`📷 ${Qo(i.url)}`;if(i.type==="file"&&i.subtype==="audio")return`🎧 ${Qo(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,`📎 ${Qo(i.url)}`):i.type==="location"?"📍":""}(r,t)).join(`
|
|
101
96
|
|
|
102
|
-
`)}function
|
|
103
|
-
`+
|
|
104
|
-
`;case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"emoji":case"customemoji":case"customEmoji":return n.text;case"suppressed":return t.contactInfoHiddenText;case"mention":return`@${n.text}`}}).join("")}
|
|
105
|
-
`);try{return JSON.stringify(i)}catch(o){return String(i)}}(t);super(r),this.userMessage=n!=null?n:r,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}}const yo=console;class gT{constructor(t,n,r,i){this.apiUrls=t,this.appId=n,this.sessionId=r,this.authProvider=i,this._lastPutPromise=Promise.resolve()}async get(t,n={}){const r=this.endpointUrl(t,n),i=await $i(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(t,n){await this._lastPutPromise;const r=$i(()=>this._doPut(t,n));return this._lastPutPromise=r,r}put(t,n,r){const i=()=>this._doPut(t,n);return r?Wp(i,r):$i(i,{retries:5})}post(t,n,r){const i=()=>this._doPost(t,n);return r?Wp(i,r):$i(i,{retries:5})}delete(t,n={}){return $i(()=>this._doDelete(t,n),{retries:11})}endpointUrl(t,n={}){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(n))r.searchParams.set(i,o);return r}async _doPut(t,n){const r=this.endpointUrl(t),i=await this.fetchWithReauth(r,{method:"PUT",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doPost(t,n){const r=this.endpointUrl(t),i=await this.fetchWithReauth(r,{method:"POST",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doDelete(t,n){const r=this.endpointUrl(t,n),i=await this.fetchWithReauth(r,{method:"DELETE"});return await this.handleResponse(i,r)}async handleResponse(t,n){if(t.status>=300){if(t.status===404)throw Is.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new vl("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 Is.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${n} with token ${r}.`),new vl("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 vl(r)}{const r=await t.text();throw new Error(`Got non-success response (${r}) from the server for url: ${n}.`)}}return await t.json()}async fetchWithReauth(t,n){function r(s){const a={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${s}`};return fetch(t,{...n,headers:a})}const i=await this.authProvider.getToken(),o=await r(i);return o.status!==401?o:(yo.error(`401 error from ${n==null?void 0:n.method} ${t}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function fA(e){return!e.userMessage}function $i(e,{retries:t=30}={}){return kc(t,e,{shouldRetry:fA,log:yo.warn.bind(yo),maxDelay:30,initialDelay:.2})}async function Wp(e,t){try{return await e()}catch(r){if(!fA(r))throw r}let n=!1;return t.then(()=>{n=!0}),kc(1e3,e,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:yo.warn.bind(yo)})}var vu={exports:{}};(function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[s]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var u=typeof Wo=="object"&&Wo&&Wo.Object===Object&&Wo,h=typeof self=="object"&&self&&self.Object===Object&&self,d=u||h||Function("return this")(),p=t&&!t.nodeType&&t,f=p&&e&&!e.nodeType&&e,m=f&&f.exports===p,E=m&&u.process,A=function(){try{var k=f&&f.require&&f.require("util").types;return k||E&&E.binding&&E.binding("util")}catch(x){}}(),_=A&&A.isTypedArray,g,v=Array.prototype,S=Function.prototype,I=Object.prototype,R=d["__core-js_shared__"],y=S.toString,D=I.hasOwnProperty,O=(g=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",C=I.toString,b=y.call(Object),L=RegExp("^"+y.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=m?d.Buffer:void 0,F=d.Symbol,H=d.Uint8Array;w&&w.allocUnsafe;var B,K,X=(B=Object.getPrototypeOf,K=Object,function(k){return B(K(k))}),G=Object.create,W=I.propertyIsEnumerable,St=v.splice,tt=F?F.toStringTag:void 0,rt=function(){try{var k=pr(Object,"defineProperty");return k({},"",{}),k}catch(x){}}(),it=w?w.isBuffer:void 0,bt=Math.max,te=Date.now,Gt=pr(d,"Map"),Ot=pr(Object,"create"),Pt=function(){function k(){}return function(x){if(!V(x))return{};if(G)return G(x);k.prototype=x;var j=new k;return k.prototype=void 0,j}}();function ve(k){var x=-1,j=k==null?0:k.length;for(this.clear();++x<j;){var q=k[x];this.set(q[0],q[1])}}function ft(k){var x=-1,j=k==null?0:k.length;for(this.clear();++x<j;){var q=k[x];this.set(q[0],q[1])}}function Mt(k){var x=-1,j=k==null?0:k.length;for(this.clear();++x<j;){var q=k[x];this.set(q[0],q[1])}}function Rt(k){var x=this.__data__=new ft(k);this.size=x.size}function he(k,x){var j=T(k),q=!j&&ht(k),pt=!j&&!q&&M(k),Ft=!j&&!q&&!pt&&Ct(k),kt=j||q||pt||Ft,fe=kt?function(ee,Rn){for(var Re=-1,zr=Array(ee);++Re<ee;)zr[Re]=Rn(Re);return zr}(k.length,String):[],Te=fe.length;for(var Bt in k)kt&&(Bt=="length"||pt&&(Bt=="offset"||Bt=="parent")||Ft&&(Bt=="buffer"||Bt=="byteLength"||Bt=="byteOffset")||sn(Bt,Te))||fe.push(Bt);return fe}function $e(k,x,j){(j!==void 0&&!yt(k[x],j)||j===void 0&&!(x in k))&&It(k,x,j)}function ut(k,x,j){var q=k[x];D.call(k,x)&&yt(q,j)&&(j!==void 0||x in k)||It(k,x,j)}function pe(k,x){for(var j=k.length;j--;)if(yt(k[j][0],x))return j;return-1}function It(k,x,j){x=="__proto__"&&rt?rt(k,x,{configurable:!0,enumerable:!0,value:j,writable:!0}):k[x]=j}ve.prototype.clear=function(){this.__data__=Ot?Ot(null):{},this.size=0},ve.prototype.delete=function(k){var x=this.has(k)&&delete this.__data__[k];return this.size-=x?1:0,x},ve.prototype.get=function(k){var x=this.__data__;if(Ot){var j=x[k];return j===n?void 0:j}return D.call(x,k)?x[k]:void 0},ve.prototype.has=function(k){var x=this.__data__;return Ot?x[k]!==void 0:D.call(x,k)},ve.prototype.set=function(k,x){var j=this.__data__;return this.size+=this.has(k)?0:1,j[k]=Ot&&x===void 0?n:x,this},ft.prototype.clear=function(){this.__data__=[],this.size=0},ft.prototype.delete=function(k){var x=this.__data__,j=pe(x,k);return!(j<0)&&(j==x.length-1?x.pop():St.call(x,j,1),--this.size,!0)},ft.prototype.get=function(k){var x=this.__data__,j=pe(x,k);return j<0?void 0:x[j][1]},ft.prototype.has=function(k){return pe(this.__data__,k)>-1},ft.prototype.set=function(k,x){var j=this.__data__,q=pe(j,k);return q<0?(++this.size,j.push([k,x])):j[q][1]=x,this},Mt.prototype.clear=function(){this.size=0,this.__data__={hash:new ve,map:new(Gt||ft),string:new ve}},Mt.prototype.delete=function(k){var x=on(this,k).delete(k);return this.size-=x?1:0,x},Mt.prototype.get=function(k){return on(this,k).get(k)},Mt.prototype.has=function(k){return on(this,k).has(k)},Mt.prototype.set=function(k,x){var j=on(this,k),q=j.size;return j.set(k,x),this.size+=j.size==q?0:1,this},Rt.prototype.clear=function(){this.__data__=new ft,this.size=0},Rt.prototype.delete=function(k){var x=this.__data__,j=x.delete(k);return this.size=x.size,j},Rt.prototype.get=function(k){return this.__data__.get(k)},Rt.prototype.has=function(k){return this.__data__.has(k)},Rt.prototype.set=function(k,x){var j=this.__data__;if(j instanceof ft){var q=j.__data__;if(!Gt||q.length<199)return q.push([k,x]),this.size=++j.size,this;j=this.__data__=new Mt(q)}return j.set(k,x),this.size=j.size,this};var Pi=function(k,x,j){for(var q=-1,pt=Object(k),Ft=j(k),kt=Ft.length;kt--;){var fe=Ft[++q];if(x(pt[fe],fe,pt)===!1)break}return k};function rn(k){return k==null?k===void 0?"[object Undefined]":"[object Null]":tt&&tt in Object(k)?function(x){var j=D.call(x,tt),q=x[tt];try{x[tt]=void 0;var pt=!0}catch(kt){}var Ft=C.call(x);return pt&&(j?x[tt]=q:delete x[tt]),Ft}(k):function(x){return C.call(x)}(k)}function Se(k){return et(k)&&rn(k)==i}function ur(k){return!(!V(k)||function(x){return!!O&&O in x}(k))&&($(k)?L:a).test(function(x){if(x!=null){try{return y.call(x)}catch(j){}try{return x+""}catch(j){}}return""}(k))}function cr(k){if(!V(k))return function(pt){var Ft=[];if(pt!=null)for(var kt in Object(pt))Ft.push(kt);return Ft}(k);var x=Dt(k),j=[];for(var q in k)(q!="constructor"||!x&&D.call(k,q))&&j.push(q);return j}function jn(k,x,j,q,pt){k!==x&&Pi(x,function(Ft,kt){if(pt||(pt=new Rt),V(Ft))(function(Te,Bt,ee,Rn,Re,zr,Mi){var an=ke(Te,ee),Ie=ke(Bt,ee),Lc=Mi.get(Ie);if(Lc)return void $e(Te,ee,Lc);var we=zr?zr(an,Ie,ee+"",Te,Bt,Mi):void 0,xi=we===void 0;if(xi){var va=T(Ie),Sa=!va&&M(Ie),Pc=!va&&!Sa&&Ct(Ie);we=Ie,va||Sa||Pc?T(an)?we=an:et(Mc=an)&&N(Mc)?we=function(Kt,Ve){var le=-1,Le=Kt.length;for(Ve||(Ve=Array(Le));++le<Le;)Ve[le]=Kt[le];return Ve}(an):Sa?(xi=!1,we=Ie.slice()):Pc?(xi=!1,we=function(Kt){var Ve=(le=Kt.buffer,Le=new le.constructor(le.byteLength),new H(Le).set(new H(le)),Le),le,Le;return new Kt.constructor(Ve,Kt.byteOffset,Kt.length)}(Ie)):we=[]:function(Kt){if(!et(Kt)||rn(Kt)!=s)return!1;var Ve=X(Kt);if(Ve===null)return!0;var le=D.call(Ve,"constructor")&&Ve.constructor;return typeof le=="function"&&le instanceof le&&y.call(le)==b}(Ie)||ht(Ie)?(we=an,ht(an)?we=function(Kt){return function(Ve,le,Le){var vA=!Le;Le||(Le={});for(var xc=-1,SA=le.length;++xc<SA;){var Ta=le[xc],Vo=void 0;Vo===void 0&&(Vo=Ve[Ta]),vA?It(Le,Ta,Vo):ut(Le,Ta,Vo)}return Le}(Kt,xt(Kt))}(an):V(an)&&!$(an)||(we=function(Kt){return typeof Kt.constructor!="function"||Dt(Kt)?{}:Pt(X(Kt))}(Ie))):xi=!1}var Mc;xi&&(Mi.set(Ie,we),Re(we,Ie,Rn,zr,Mi),Mi.delete(Ie)),$e(Te,ee,we)})(k,x,kt,j,jn,q,pt);else{var fe=q?q(ke(k,kt),Ft,kt+"",k,x,pt):void 0;fe===void 0&&(fe=Ft),$e(k,kt,fe)}},xt)}function dr(k,x){return Sn(function(j,q,pt){return q=bt(q===void 0?j.length-1:q,0),function(){for(var Ft=arguments,kt=-1,fe=bt(Ft.length-q,0),Te=Array(fe);++kt<fe;)Te[kt]=Ft[q+kt];kt=-1;for(var Bt=Array(q+1);++kt<q;)Bt[kt]=Ft[kt];return Bt[q]=pt(Te),function(ee,Rn,Re){switch(Re.length){case 0:return ee.call(Rn);case 1:return ee.call(Rn,Re[0]);case 2:return ee.call(Rn,Re[0],Re[1]);case 3:return ee.call(Rn,Re[0],Re[1],Re[2])}return ee.apply(Rn,Re)}(j,this,Bt)}}(k,x,wc),k+"")}var hr=rt?function(k,x){return rt(k,"toString",{configurable:!0,enumerable:!1,value:(j=x,function(){return j}),writable:!0});var j}:wc;function on(k,x){var j,q,pt=k.__data__;return((q=typeof(j=x))=="string"||q=="number"||q=="symbol"||q=="boolean"?j!=="__proto__":j===null)?pt[typeof x=="string"?"string":"hash"]:pt.map}function pr(k,x){var j=function(q,pt){return q==null?void 0:q[pt]}(k,x);return ur(j)?j:void 0}function sn(k,x){var j=typeof k;return!!(x=x==null?r:x)&&(j=="number"||j!="symbol"&&l.test(k))&&k>-1&&k%1==0&&k<x}function Dt(k){var x=k&&k.constructor;return k===(typeof x=="function"&&x.prototype||I)}function ke(k,x){if((x!=="constructor"||typeof k[x]!="function")&&x!="__proto__")return k[x]}var Sn=function(k){var x=0,j=0;return function(){var q=te(),pt=16-(q-j);if(j=q,pt>0){if(++x>=800)return arguments[0]}else x=0;return k.apply(void 0,arguments)}}(hr);function yt(k,x){return k===x||k!=k&&x!=x}var ht=Se(function(){return arguments}())?Se:function(k){return et(k)&&D.call(k,"callee")&&!W.call(k,"callee")},T=Array.isArray;function N(k){return k!=null&&z(k.length)&&!$(k)}var M=it||function(){return!1};function $(k){if(!V(k))return!1;var x=rn(k);return x==o||x=="[object GeneratorFunction]"||x=="[object AsyncFunction]"||x=="[object Proxy]"}function z(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=r}function V(k){var x=typeof k;return k!=null&&(x=="object"||x=="function")}function et(k){return k!=null&&typeof k=="object"}var Ct=_?function(k){return function(x){return k(x)}}(_):function(k){return et(k)&&z(k.length)&&!!c[rn(k)]};function xt(k){return N(k)?he(k):cr(k)}var Tn,OA=(Tn=function(k,x,j){jn(k,x,j)},dr(function(k,x){var j=-1,q=x.length,pt=q>1?x[q-1]:void 0,Ft=q>2?x[2]:void 0;for(pt=Tn.length>3&&typeof pt=="function"?(q--,pt):void 0,Ft&&function(fe,Te,Bt){if(!V(Bt))return!1;var ee=typeof Te;return!!(ee=="number"?N(Bt)&&sn(Te,Bt.length):ee=="string"&&Te in Bt)&&yt(Bt[Te],fe)}(x[0],x[1],Ft)&&(pt=q<3?void 0:pt,q=1),k=Object(k);++j<q;){var kt=x[j];kt&&Tn(k,kt,j,pt)}return k}));function wc(k){return k}e.exports=OA})(vu,vu.exports);const DT=Xu(vu.exports);class OT{constructor(t,n,r,i){this.backendRestClient=new gT(t,n,r,i)}async getApp(t){return function(n){const r=function(s,a){const l={general:{enableFileTransfers:a.includes("file_sharing"),enableLocation:a.includes("location_sharing"),enableMentions:!1,showTypingIndicators:!0,enablePresence:!1,enableVoiceRecording:!1},theme:{version:"v2",name:"default"},permissions:{messages:{delete:"own",edit:"own",reply:"all",emojiReactions:"all"},messagesCustom:{},conversations:{leave:"none",markAsUnread:"none"},conversationsCustom:{}},generalNotificationSettings:{timeout:"15"},emailSettings:{enabled:!0,subject:"{{sender.name}} wants to chat with you on {{app.name}}",replySeparator:"--- Write ABOVE THIS LINE to post a reply via email ---",unsubscribeText:"Unsubscribe from all chat emails",senderName:"{{sender.name}} (via {{app.name}})",header:`Hi {{recipient.name}},
|
|
97
|
+
`)}function gs(e,t){return e.flatMap(n=>{if(typeof n=="string")return n;switch(n.type){case"blockquote":case"bold":case"italic":case"strikethrough":case"link":case"actionlink":case"actionLink":case"actionbutton":case"actionButton":return gs(n.children,t);case"bulletlist":case"bulletList":return`
|
|
98
|
+
`+gs(n.children,t);case"bulletpoint":case"bulletPoint":return"- "+gs(n.children,t)+`
|
|
99
|
+
`;case"autolink":case"autoLink":case"codeblock":case"codeBlock":case"codespan":case"codeSpan":case"emoji":case"customemoji":case"customEmoji":return n.text;case"suppressed":return t.contactInfoHiddenText;case"mention":return`@${n.text}`}}).join("")}function aA(e){var h,d,p;const{sender:t}=e,n=wi(),r=on(),i=he(),[o,s]=ut(t&&typeof t=="object"?t:null);Z(()=>{typeof t=="string"&&n.user(t).get().then(s)},[n,t]);const a="virtual-message-"+na(),[l,c]=at(()=>{var m,E;const f=(E=e.content)!=null?E:[{type:"text",children:o_((m=e.text)!=null?m:"")}];return[f,sA(f,{})]},[e.content,e.text]);if(t&&!o)return null;const u={id:a,type:o?"UserMessage":"SystemMessage",sender:o,custom:(h=e.custom)!=null?h:{},createdAt:(d=e.createdAt)!=null?d:-1,editedAt:null,referencedMessage:null,origin:"web",plaintext:c,content:l,reactions:[]};return L(i.Message,{common:r,message:u,messageStatus:(p=e.status)!=null?p:"virtual",permissions:{showTypingIndicator:!1,canShareFile:!1,canShareLocation:!1,canMention:!1,showOnlineStatus:!1,canSendVoiceMessage:!1,canLeaveConversation:!1,canMarkConversationAsUnread:!1,canDeleteMessage:!1,canReplyToMessage:!1,canAddReaction:!1,canEditMessage:!1}})}function lA(e){return BE(e)}function $r(e){var t;return(t=e.photoUrl)!=null?t:function(n,r){const i=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
|
|
100
|
+
<rect x="0" y="0" width="100" height="100" fill="${BE(n)}"/>
|
|
101
|
+
<text x="50%" y="54%" dominant-baseline="middle" font-size="34" font-family="San Francisco, Segoe UI, Helvetica Neue, Arial, Helvetica, sans-serif" fill="#fff" text-anchor="middle">${r}</text>
|
|
102
|
+
</svg>`.replace(/\s+/g," ");return"data:image/svg+xml;base64,"+eO(i)}(e.id,iO(e.name))}function Vo(e){return e<1024?e+" B":e<1048576?Math.floor(e/1024)+" KB":e<1073741824?Math.floor(e/1048576)+" MB":e<1099511627776?Math.floor(e/1073741824)+" GB":Math.floor(e/1099511627776)+" TB"}function wc({latitude:e,longitude:t}){const n=e+","+t;return{imageUrl:`https://maps.googleapis.com/maps/api/staticmap?center=${n}&zoom=15&size=300x200&scale=2&maptype=roadmap&markers=${n}&key=${_0}`,linkUrl:`https://maps.google.com/maps?q=${n}&z=15`}}function uA(e,t){const[n,r]=ut({long:"",short:""});return ve(()=>{let i,o=!0;const s=()=>{const l=Date.now(),c=function(u,h,d){const p=u-h;let f,m,E;const A=new Date(h),_={month:"short",day:"numeric"};if(p<Gp)return{changeTimeout:5e3,short:d.JUST_NOW,long:d.JUST_NOW};if(p<Wp)f=Gp,m="MINUTES",E=d.MINUTES;else if(p<Xp)f=Wp,m="HOURS",E=d.HOURS;else{if(!(p<VS)){if(A.getFullYear()===new Date(u).getFullYear()){const D=A.toLocaleDateString(d.locale,_);return{changeTimeout:void 0,short:D,long:D}}{const D=A.toLocaleDateString(d.locale,{..._,year:"numeric"});return{changeTimeout:void 0,short:D,long:D}}}f=Xp,m="DAYS",E=d.DAYS}const g=Math.floor(p/f);return{changeTimeout:f,short:g+E,long:zS(g,m.toLowerCase(),d.locale)}}(l,e>l?l-2e3:e,t);return r(c),c},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,e]),n}function va(e){e=Math.floor(e);const t=Math.floor(e/3600);e%=3600;const n=Math.floor(e/60);e%=60;const r=o=>o.toString().padStart(2,"0");let i=`${r(n)}:${r(e)}`;return t>0&&(i=`${r(t)}:${i}`),i}const Yp=864e5;function cA(e,t){const n=Date.now(),r=(i=e,o=n,Math.floor((o-i)/Yp));var i,o;if(r<0||r===0)return t.TODAY;if(r===1)return t.YESTERDAY;const s={weekday:"long"},a=new Date(e);if(r<7)return a.toLocaleDateString(t.locale,s);const l=new Date(n);return function(u,h){return Math.floor((h-u)/(365*Yp))}(l.setFullYear(l.getFullYear()-1),e)===0?a.toLocaleDateString(t.locale,{...s,month:"long",day:"numeric"}):a.toLocaleDateString(t.locale,{...s,year:"numeric",month:"long",day:"numeric"})}const Gp=6e4,Wp=36e5,Xp=864e5,VS=6048e5;function zS(e,t,n){return new Intl.RelativeTimeFormat(n).format(-e,t)}function U(e,...t){const n=m0.bind(Tt)(e,...t);return Array.isArray(n)?Tt(qt,{},...n):n}function Sa(e,t=10){return E_(e,Math.min(t,100))}function dA(e){var i,o,s,a,l,c,u,h;if(!e.container)return;const t=getComputedStyle(e.container),n=(i=yo.parse(t.color))!=null?i:new yo(255,255,255,1),r=n.withAlpha(n.alpha/2);return So.create({...e,barGap:(o=e.barGap)!=null?o:2,barRadius:(s=e.barRadius)!=null?s:0,barWidth:(a=e.barWidth)!=null?a:2,barHeight:e.barHeight,hideScrollbar:!0,cursorWidth:(l=e.cursorWidth)!=null?l:0,cursorColor:e.cursorColor,height:(c=e.height)!=null?c:24,progressColor:(u=e.progressColor)!=null?u:r.toRgbaString(),waveColor:(h=e.waveColor)!=null?h:r.toRgbaString()})}function zo({src:e,onError:t,filename:n,className:r=""}){const i=Q(null),o=Q(),s=Q(),[a,l]=ut(!1),[c,u]=ut(0),[h,d]=ut(1),p=Q(),[f,m]=ut(!1),E=dt(At().t$);Z(()=>{o.current=new Audio;const g=new URL(e),D=g.protocol==="blob:"&&g.searchParams.has("name"),S={normalize:!0,height:D?24:50,container:i.current};function I(){const v=o.current;if(!v)return;const y=v.error;(y.message!=="Media failed to load"||v.paused)&&(y.message==="PIPELINE_ERROR_READ: FFmpegDemuxer: demuxer seek failed"?(v.load(),l(!1)):(m(!0),l(!1),t==null||t()))}let T=n!=null?n:"";D&&(T=g.searchParams.get("name"),g.searchParams.delete("name"));const C=T.slice(T.lastIndexOf(".")+1);if(function(v){return/(?:^|\/)talkjs_audio_message_[0-9]+_([0-9]+)[.](?:mp3|webm)$/.test(v)}(T)&&C==="webm"&&!o.current.canPlayType("audio/webm;codecs=opus"))S.backend="WebAudio",s.current=new Audio("data:audio/mp3;base64,//MkxAAHiAICWABElBeKPL/RANb2w+yiT1g/gTok//lP/W/l3h8QO/OCdCqCW2Cw//MkxAQHkAIWUAhEmAQXWUOFW2dxPu//9mr60ElY5sseQ+xxesmHKtZr7bsqqX2L//MkxAgFwAYiQAhEAC2hq22d3///9FTV6tA36JdgBJoOGgc+7qvqej5Zu7/7uI9l//MkxBQHAAYi8AhEAO193vt9KGOq+6qcT7hhfN5FTInmwk8RkqKImTM55pRQHQSq//MkxBsGkgoIAABHhTACIJLf99nVI///yuW1uBqWfEu7CgNPWGpUadBmZ////4sL//MkxCMHMAH9iABEmAsKioqKigsLCwtVTEFNRTMuOTkuNVVVVVVVVVVVVVVVVVVV//MkxCkECAUYCAAAAFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"),s.current.controls=!1;else{const v=o.current;v.addEventListener("error",I),v.preservesPitch=!0,S.url=g.toString(),S.media=v}p.current=dA(S);const O=p.current;return O.on("finish",()=>{o.current.loop=!0,l(!1)}),O.on("ready",v=>u(Math.trunc(v))),O.on("timeupdate",v=>u(Math.trunc(v))),S.backend==="WebAudio"&&O.load(g.toString()).catch(()=>{m(!0),l(!1),t==null||t()}),()=>{var v,y;(v=o.current)==null||v.pause(),(y=o.current)==null||y.removeEventListener("error",I),o.current=void 0,O.destroy(),p.current=void 0}},[e,n,t]);const A=it(()=>{var g;if(p.current.options.backend==="WebAudio")p.current.isPlaying()||s.current.play(),p.current.playPause(),l((g=p.current.isPlaying())!=null?g:!1);else{const D=o.current;D.paused?D.play():D.pause(),D.loop=!1,!D.paused&&D.ended&&(D.load(),D.play()),l(!D.paused)}},[]),_=it(g=>{p.current.setPlaybackRate(g),d(g)},[]);return L("div",f?{}:{className:`t-audio-player ${r}`,children:[L("button",{onClick:A,children:L(js,{className:"t-play-pause-icon",type:a?"pause":"play","aria-label":a?E.ARIA_PAUSE_AUDIO:E.ARIA_PLAY_AUDIO})}),L("div",{className:"t-waveform",ref:i}),L("div",{className:"t-duration",children:va(c)}),L(oi,{type:"menu",portal:!0,popoverComponent:GS,popoverProps:{playbackSpeed:h,selectPlaybackSpeed:_},className:"t-playback-speed","aria-label":E.ARIA_SET_PLAYBACK_SPEED,children:[h,"x",L(js,{type:"updown",className:"t-up-down-icon","aria-hidden":!0})]})]})}const YS=[.25,.5,.75,1,1.25,1.5,2];function GS({playbackSpeed:e,selectPlaybackSpeed:t}){return L("div",{className:"t-playback-speed-menu",children:[L("div",{className:"t-heading",children:"Playback Speed"}),YS.map(n=>L(Kn,{className:"t-menu-item",onSelect:()=>t(n),children:[L("span",{className:"t-playback-checkmark",children:e===n?"✓ ":""}),n,"x"]},n))]})}const WS=/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)$/,XS=/^rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)$/;class yo{constructor(t,n,r,i){this.red=t,this.green=n,this.blue=r,this.alpha=i}static parse(t){var r;const n=(r=t.match(WS))!=null?r:t.match(XS);if(n){const[i,o,s,a,l="1"]=n;return new yo(Number(o),Number(s),Number(a),Number(l))}return null}withAlpha(t){return new yo(this.red,this.green,this.blue,t)}toRgbaString(){const{red:t,green:n,blue:r,alpha:i}=this;return i!==1?`rgba(${t}, ${n}, ${r}, ${i})`:`rgb(${t}, ${n}, ${r})`}}function Ol(e,t,n,r){return new(n||(n=Promise))(function(i,o){function s(c){try{l(r.next(c))}catch(u){o(u)}}function a(c){try{l(r.throw(c))}catch(u){o(u)}}function l(c){var u;c.done?i(c.value):(u=c.value,u instanceof n?u:new n(function(h){h(u)})).then(s,a)}l((r=r.apply(e,[])).next())})}class hA{constructor(){this.listeners={}}on(t,n,r){if(this.listeners[t]||(this.listeners[t]=new Set),r==null?void 0:r.once){const i=(...o)=>{this.un(t,i),n(...o)};return this.listeners[t].add(i),()=>this.un(t,i)}return this.listeners[t].add(n),()=>this.un(t,n)}un(t,n){var r;(r=this.listeners[t])===null||r===void 0||r.delete(n)}once(t,n){return this.on(t,n,{once:!0})}unAll(){this.listeners={}}emit(t,...n){this.listeners[t]&&this.listeners[t].forEach(r=>r(...n))}}class KS extends hA{constructor(t){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=t}onInit(){}_init(t){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(t=>t()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}}class qS extends hA{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;const t=()=>{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(t))};t()}stop(){this.isRunning=!1,this.animationFrameId!==null&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}const JS=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];class Lc extends KS{constructor(t){var n,r,i,o,s,a;super(Object.assign(Object.assign({},t),{audioBitsPerSecond:(n=t.audioBitsPerSecond)!==null&&n!==void 0?n:128e3,scrollingWaveform:(r=t.scrollingWaveform)!==null&&r!==void 0&&r,scrollingWaveformWindow:(i=t.scrollingWaveformWindow)!==null&&i!==void 0?i:5,continuousWaveform:(o=t.continuousWaveform)!==null&&o!==void 0&&o,renderRecordedAudio:(s=t.renderRecordedAudio)===null||s===void 0||s,mediaRecorderTimeslice:(a=t.mediaRecorderTimeslice)!==null&&a!==void 0?a:void 0})),this.stream=null,this.mediaRecorder=null,this.dataWindow=null,this.isWaveformPaused=!1,this.lastStartTime=0,this.lastDuration=0,this.duration=0,this.micStream=null,this.recordedBlobUrl=null,this.timer=new qS,this.subscriptions.push(this.timer.on("tick",()=>{const l=performance.now()-this.lastStartTime;this.duration=this.isPaused()?this.duration:this.lastDuration+l,this.emit("record-progress",this.duration)}))}static create(t){return new Lc(t||{})}renderMicStream(t){var n;const r=new AudioContext,i=r.createMediaStreamSource(t),o=r.createAnalyser();i.connect(o),(this.options.continuousWaveform||this.options.scrollingWaveform)&&(o.fftSize=32);const s=o.frequencyBinCount,a=new Float32Array(s);let l=0;this.wavesurfer&&((n=this.originalOptions)!==null&&n!==void 0||(this.originalOptions=Object.assign({},this.wavesurfer.options)),this.wavesurfer.options.interact=!1,this.options.scrollingWaveform&&(this.wavesurfer.options.cursorWidth=0,this.wavesurfer.options.normalize=!0,this.wavesurfer.options.maxPeak=1));const c=setInterval(()=>{var u,h,d,p;if(!this.isWaveformPaused){if(o.getFloatTimeDomainData(a),this.options.scrollingWaveform){const f=Math.floor(100*(this.options.scrollingWaveformWindow||0));let m=0;for(let A=0;A<s;A++){const _=Math.abs(a[A]);_>m&&(m=_)}this.dataWindow||(this.dataWindow=new Float32Array(f));const E=new Float32Array(f);if(this.dataWindow&&this.dataWindow.length>0){const A=f-1,_=this.dataWindow.slice(-A);E.set(_,0)}E[f-1]=m,this.dataWindow=E}else if(this.options.continuousWaveform){if(!this.dataWindow){const m=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):((h=(u=this.wavesurfer)===null||u===void 0?void 0:u.getWidth())!==null&&h!==void 0?h:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(m)}let f=0;for(let m=0;m<s;m++){const E=Math.abs(a[m]);E>f&&(f=E)}if(l+1>this.dataWindow.length){const m=new Float32Array(2*this.dataWindow.length);m.set(this.dataWindow,0),this.dataWindow=m}this.dataWindow[l]=f,l++}else this.dataWindow=a;if(this.wavesurfer){const f=((p=(d=this.dataWindow)===null||d===void 0?void 0:d.length)!==null&&p!==void 0?p:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:f).then(()=>{this.wavesurfer&&this.options.continuousWaveform&&(this.wavesurfer.setTime(this.getDuration()/1e3),this.wavesurfer.options.minPxPerSec||this.wavesurfer.setOptions({minPxPerSec:this.wavesurfer.getWidth()/this.wavesurfer.getDuration()}))}).catch(m=>{console.error("Error rendering real-time recording data:",m)})}}},10);return{onDestroy:()=>{clearInterval(c),i==null||i.disconnect(),r==null||r.close()},onEnd:()=>{this.isWaveformPaused=!0,this.stopMic()}}}startMic(t){return Ol(this,0,void 0,function*(){let n;this.micStream&&this.stopMic();try{n=yield navigator.mediaDevices.getUserMedia({audio:t==null||t})}catch(i){throw new Error("Error accessing the microphone: "+i.message)}const r=this.renderMicStream(n);return this.micStream=r,this.unsubscribeDestroy=this.once("destroy",r.onDestroy),this.unsubscribeRecordEnd=this.once("record-end",r.onEnd),this.stream=n,n})}stopMic(){var t,n,r;(t=this.micStream)===null||t===void 0||t.onDestroy(),(n=this.unsubscribeDestroy)===null||n===void 0||n.call(this),(r=this.unsubscribeRecordEnd)===null||r===void 0||r.call(this),this.micStream=null,this.unsubscribeDestroy=void 0,this.unsubscribeRecordEnd=void 0,this.stream&&(this.stream.getTracks().forEach(i=>i.stop()),this.stream=null,this.mediaRecorder=null)}startRecording(t){return Ol(this,0,void 0,function*(){const n=this.stream||(yield this.startMic(t));this.dataWindow=null;const r=this.mediaRecorder||new MediaRecorder(n,{mimeType:this.options.mimeType||JS.find(s=>MediaRecorder.isTypeSupported(s)),audioBitsPerSecond:this.options.audioBitsPerSecond});this.mediaRecorder=r,this.stopRecording();const i=[];r.ondataavailable=s=>{s.data.size>0&&i.push(s.data),this.emit("record-data-available",s.data)};const o=s=>{var a;const l=new Blob(i,{type:r.mimeType});this.emit(s,l),this.options.renderRecordedAudio&&(this.applyOriginalOptionsIfNeeded(),this.recordedBlobUrl&&URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=URL.createObjectURL(l),(a=this.wavesurfer)===null||a===void 0||a.load(this.recordedBlobUrl))};r.onpause=()=>o("record-pause"),r.onstop=()=>o("record-end"),r.start(this.options.mediaRecorderTimeslice),this.lastStartTime=performance.now(),this.lastDuration=0,this.duration=0,this.isWaveformPaused=!1,this.timer.start(),this.emit("record-start")})}getDuration(){return this.duration}isRecording(){var t;return((t=this.mediaRecorder)===null||t===void 0?void 0:t.state)==="recording"}isPaused(){var t;return((t=this.mediaRecorder)===null||t===void 0?void 0:t.state)==="paused"}isActive(){var t;return((t=this.mediaRecorder)===null||t===void 0?void 0:t.state)!=="inactive"}stopRecording(){var t;this.isActive()&&((t=this.mediaRecorder)===null||t===void 0||t.stop(),this.timer.stop())}pauseRecording(){var t,n;this.isRecording()&&(this.isWaveformPaused=!0,(t=this.mediaRecorder)===null||t===void 0||t.requestData(),(n=this.mediaRecorder)===null||n===void 0||n.pause(),this.timer.stop(),this.lastDuration=this.duration)}resumeRecording(){var t;this.isPaused()&&(this.isWaveformPaused=!1,(t=this.mediaRecorder)===null||t===void 0||t.resume(),this.timer.start(),this.lastStartTime=performance.now(),this.emit("record-resume"))}static getAvailableAudioDevices(){return Ol(this,0,void 0,function*(){return navigator.mediaDevices.enumerateDevices().then(t=>t.filter(n=>n.kind==="audioinput"))})}destroy(){this.applyOriginalOptionsIfNeeded(),super.destroy(),this.stopRecording(),this.stopMic(),this.recordedBlobUrl&&(URL.revokeObjectURL(this.recordedBlobUrl),this.recordedBlobUrl=null)}applyOriginalOptionsIfNeeded(){this.wavesurfer&&this.originalOptions&&(this.wavesurfer.setOptions(this.originalOptions),delete this.originalOptions)}}var pA={exports:{}};pA.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=0)}([function(e,t,n){(function(r){function i(D){return(i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S})(D)}function o(D,S){return function(I){if(Array.isArray(I))return I}(D)||function(I,T){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(I)){var C=[],O=!0,v=!1,y=void 0;try{for(var b,P=I[Symbol.iterator]();!(O=(b=P.next()).done)&&(C.push(b.value),!T||C.length!==T);O=!0);}catch(w){v=!0,y=w}finally{try{O||P.return==null||P.return()}finally{if(v)throw y}}return C}}(D,S)||function(I,T){if(I){if(typeof I=="string")return s(I,T);var C=Object.prototype.toString.call(I).slice(8,-1);return C==="Object"&&I.constructor&&(C=I.constructor.name),C==="Map"||C==="Set"?Array.from(I):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?s(I,T):void 0}}(D,S)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
103
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function s(D,S){(S==null||S>D.length)&&(S=D.length);for(var I=0,T=new Array(S);I<S;I++)T[I]=D[I];return T}function a(D,S){if(!(D instanceof S))throw new TypeError("Cannot call a class as a function")}function l(D,S){for(var I=0;I<S.length;I++){var T=S[I];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(D,T.key,T)}}function c(D,S){return(c=Object.setPrototypeOf||function(I,T){return I.__proto__=T,I})(D,S)}function u(D){var S=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(I){return!1}}();return function(){var I,T=d(D);if(S){var C=d(this).constructor;I=Reflect.construct(T,arguments,C)}else I=T.apply(this,arguments);return h(this,I)}}function h(D,S){return!S||i(S)!=="object"&&typeof S!="function"?function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(D):S}function d(D){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(S){return S.__proto__||Object.getPrototypeOf(S)})(D)}var p,f=n(2),m=f.EventTarget,E=f.defineEventAttribute,A=(0,n(3).detect)(),_=r.AudioContext||r.webkitAudioContext,g=function(D){(function(v,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");v.prototype=Object.create(y&&y.prototype,{constructor:{value:v,writable:!0,configurable:!0}}),y&&c(v,y)})(O,D);var S,I,T,C=u(O);function O(v){var y,b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},P=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};a(this,O);var w=b.mimeType,F=b.audioBitsPerSecond,H=(b.videoBitsPerSecond,b.bitsPerSecond),B=P.encoderWorkerFactory,K=P.OggOpusEncoderWasmPath,W=P.WebMOpusEncoderWasmPath;if((y=C.call(this))._stream=v,y._state="inactive",y._mimeType=w||"",y._audioBitsPerSecond=F||H,y.workerState="inactive",!O.isTypeSupported(y._mimeType))throw new TypeError("invalid arguments, a MIME Type is not supported");switch(O._parseType(y._mimeType).subtype){case"wave":case"wav":y._mimeType="audio/wave";break;case"webm":y._mimeType="audio/webm";break;case"ogg":y._mimeType="audio/ogg";break;default:switch(A&&A.name){case"chrome":case"edge":default:y._mimeType="audio/webm";break;case"firefox":y._mimeType="audio/ogg";break;case"ios":case"safari":y._mimeType="audio/wave"}}switch(y._mimeType){case"audio/wave":y._wasmPath="";break;case"audio/webm":y._wasmPath=W||"";break;case"audio/ogg":y._wasmPath=K||"";break;default:throw new Error("Internal Error: Unexpected MIME Type: ".concat(y._mimeType))}var X="";return document.currentScript?X=document.currentScript.src:self.location&&(X=self.location.href),X=X.substr(0,X.lastIndexOf("/"))+"/encoderWorker.umd.js",typeof O.encoderWorker=="function"&&(X=URL.createObjectURL(new Blob(["(".concat(O.encoderWorker,")()")]))),y._workerFactory=typeof B=="function"?B:function(G){return new Worker(X)},y._spawnWorker(),y}return S=O,T=[{key:"isTypeSupported",value:function(v){if(typeof v=="string"&&!v)return!0;try{var y=O._parseType(v),b=y.type,P=y.subtype,w=y.codec}catch(F){return!1}if(b!=="audio"||P!=="ogg"&&P!=="webm"&&P!=="wave"&&P!=="wav")return!1;switch(P){case"ogg":case"webm":if(w!=="opus"&&w)return!1;break;case"wave":case"wav":if(w)return!1}return!0}},{key:"_parseType",value:function(v){try{var y=o(v.match(/^(\w+)\/(\w+)(;\s*codecs=(\w+))?$/),5),b=y[1],P=y[2],w=y[4]}catch(F){return typeof v!="string"||v?null:{type:"",subtype:"",codec:""}}return{type:b,subtype:P,codec:w}}}],(I=[{key:"_spawnWorker",value:function(){var v=this;this.worker=this._workerFactory(),this.worker.onmessage=function(y){return v._onmessageFromWorker(y)},this.worker.onerror=function(y){return v._onerrorFromWorker(y)},this._postMessageToWorker("loadEncoder",{mimeType:this._mimeType,wasmPath:this._wasmPath})}},{key:"_postMessageToWorker",value:function(v){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};switch(v){case"loadEncoder":var b=y.mimeType,P=y.wasmPath;this.worker.postMessage({command:v,mimeType:b,wasmPath:P});break;case"init":var w=y.sampleRate,F=y.channelCount,H=y.bitsPerSecond;this.worker.postMessage({command:v,sampleRate:w,channelCount:F,bitsPerSecond:H}),this.workerState="encoding",this.source.connect(this.processor),this.processor.connect(this.context.destination);var B=new r.Event("start");this.dispatchEvent(B);break;case"pushInputData":var K=y.channelBuffers,W=y.length,X=y.duration;this.worker.postMessage({command:v,channelBuffers:K,length:W,duration:X});break;case"getEncodedData":case"done":this.worker.postMessage({command:v});break;default:throw new Error("Internal Error: Incorrect postMessage requested.")}}},{key:"_onmessageFromWorker",value:function(v){var y,b=v.data,P=b.command,w=b.buffers;switch(P){case"readyToInit":var F=this.sampleRate,H=this.channelCount;this.workerState="readyToInit",this.state==="recording"&&this._postMessageToWorker("init",{sampleRate:F,channelCount:H,bitsPerSecond:this.audioBitsPerSecond});break;case"encodedData":case"lastEncodedData":var B=new Blob(w,{type:this._mimeType});(y=new r.Event("dataavailable")).data=B,this.dispatchEvent(y),P==="lastEncodedData"&&(y=new r.Event("stop"),this.dispatchEvent(y),this.workerState="closed")}}},{key:"_onerrorFromWorker",value:function(v){this.source.disconnect(),this.processor.disconnect(),this.worker.terminate(),this.workerState="closed";var y=["FileName: "+v.filename,"LineNumber: "+v.lineno,"Message: "+v.message].join(" - "),b=new r.Event("error");b.name="UnknownError",b.message=y,this.dispatchEvent(b)}},{key:"_enableAudioProcessCallback",value:function(v){var y=this,b=0;this.processor.onaudioprocess=function(P){for(var w=P.inputBuffer,F=(P.playbackTime,w.sampleRate,w.length),H=w.duration,B=w.numberOfChannels,K=new Array(B),W=0;W<B;W++)K[W]=w.getChannelData(W);var X={channelBuffers:K,length:F,duration:H};y._postMessageToWorker("pushInputData",X),(b+=H)>=v&&(y._postMessageToWorker("getEncodedData"),b=0)}}},{key:"start",value:function(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Number.MAX_SAFE_INTEGER;if(this.state!=="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must be inactive.");if(v<0)throw new TypeError("invalid arguments, timeslice should be 0 or higher.");v/=1e3,this.workerState==="closed"&&this._spawnWorker(),this.context=new _;var y=this.stream.getAudioTracks();if(!y[0])throw new Error("DOMException: UnkownError, media track not found.");if(this.channelCount=y[0].getSettings().channelCount||1,this.sampleRate=this.context.sampleRate,this.source=this.context.createMediaStreamSource(this.stream),this.processor=this.context.createScriptProcessor(4096,this.channelCount,this.channelCount),this._state="recording",this._enableAudioProcessCallback(v),this.workerState==="readyToInit"){var b=this.sampleRate,P=this.channelCount;this._postMessageToWorker("init",{sampleRate:b,channelCount:P,bitsPerSecond:this.audioBitsPerSecond})}}},{key:"stop",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect(),this.context.close(),this._postMessageToWorker("done"),this._state="inactive"}},{key:"pause",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.disconnect(),this.processor.disconnect();var v=new r.Event("pause");this.dispatchEvent(v),this._state="paused"}},{key:"resume",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this.source.connect(this.processor),this.processor.connect(this.context.destination);var v=new r.Event("resume");this.dispatchEvent(v),this._state="recording"}},{key:"requestData",value:function(){if(this.state==="inactive")throw new Error("DOMException: INVALID_STATE_ERR, state must NOT be inactive.");this._postMessageToWorker("getEncodedData")}},{key:"stream",get:function(){return this._stream}},{key:"mimeType",get:function(){return this._mimeType}},{key:"state",get:function(){return this._state}},{key:"videoBitsPerSecond",get:function(){}},{key:"audioBitsPerSecond",get:function(){return this._audioBitsPerSecond}}])&&l(S.prototype,I),T&&l(S,T),O}(m);["start","stop","dataavailable","pause","resume","error"].forEach(function(D){return E(g.prototype,D)}),A&&A.name==="edge"&&(p=Worker.prototype.postMessage,Worker.prototype.postMessage=function(D){p.apply(this,[D])}),e.exports=g}).call(this,n(1))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){typeof window=="object"&&(n=window)}e.exports=n},function(e,t,n){n.r(t),n.d(t,"defineEventAttribute",function(){return m}),n.d(t,"EventTarget",function(){return A});const r=new WeakMap,i=new WeakMap;function o(_){const g=r.get(_);return console.assert(g!=null,"'this' is expected an Event object, but got",_),g}function s(_,g){r.set(this,{eventTarget:_,event:g,eventPhase:2,currentTarget:_,canceled:!1,stopped:!1,passiveListener:null,timeStamp:g.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const D=Object.keys(g);for(let S=0;S<D.length;++S){const I=D[S];I in this||Object.defineProperty(this,I,a(I))}}function a(_){return{get(){return o(this).event[_]},set(g){o(this).event[_]=g},configurable:!0,enumerable:!0}}function l(_){return{value(){const g=o(this).event;return g[_].apply(g,arguments)},configurable:!0,enumerable:!0}}function c(_){if(_==null||_===Object.prototype)return s;let g=i.get(_);return g==null&&(g=function(D,S){const I=Object.keys(S);if(I.length===0)return D;function T(C,O){D.call(this,C,O)}T.prototype=Object.create(D.prototype,{constructor:{value:T,configurable:!0,writable:!0}});for(let C=0;C<I.length;++C){const O=I[C];if(!(O in D.prototype)){const v=typeof Object.getOwnPropertyDescriptor(S,O).value=="function";Object.defineProperty(T.prototype,O,v?l(O):a(O))}}return T}(c(Object.getPrototypeOf(_)),_),i.set(_,g)),g}function u(_){return o(_).stopped}function h(_,g){o(_).passiveListener=g}s.prototype={get type(){return o(this).event.type},get target(){return o(this).eventTarget},get currentTarget(){return o(this).currentTarget},composedPath(){const _=o(this).currentTarget;return _==null?[]:[_]},get NONE(){return 0},get CAPTURING_PHASE(){return 1},get AT_TARGET(){return 2},get BUBBLING_PHASE(){return 3},get eventPhase(){return o(this).eventPhase},stopPropagation(){const _=o(this);typeof _.event.stopPropagation=="function"&&_.event.stopPropagation()},stopImmediatePropagation(){const _=o(this);_.stopped=!0,typeof _.event.stopImmediatePropagation=="function"&&_.event.stopImmediatePropagation()},get bubbles(){return!!o(this).event.bubbles},get cancelable(){return!!o(this).event.cancelable},preventDefault(){const _=o(this);_.passiveListener==null?_.event.cancelable&&(_.canceled=!0,typeof _.event.preventDefault=="function"&&_.event.preventDefault()):console.warn("Event#preventDefault() was called from a passive listener:",_.passiveListener)},get defaultPrevented(){return o(this).canceled},get composed(){return!!o(this).event.composed},get timeStamp(){return o(this).timeStamp}},Object.defineProperty(s.prototype,"constructor",{value:s,configurable:!0,writable:!0}),typeof window!="undefined"&&window.Event!==void 0&&(Object.setPrototypeOf(s.prototype,window.Event.prototype),i.set(window.Event.prototype,s));const d=new WeakMap;function p(_){return _!==null&&typeof _=="object"}function f(_){const g=d.get(_);if(g==null)throw new TypeError("'this' is expected an EventTarget object, but got another value.");return g}function m(_,g){Object.defineProperty(_,"on"+g,function(D){return{get(){let S=f(this).get(D);for(;S!=null;){if(S.listenerType===3)return S.listener;S=S.next}return null},set(S){typeof S=="function"||p(S)||(S=null);const I=f(this);let T=null,C=I.get(D);for(;C!=null;)C.listenerType===3?T!==null?T.next=C.next:C.next!==null?I.set(D,C.next):I.delete(D):T=C,C=C.next;if(S!==null){const O={listener:S,listenerType:3,passive:!1,once:!1,next:null};T===null?I.set(D,O):T.next=O}},configurable:!0,enumerable:!0}}(g))}function E(_){function g(){A.call(this)}g.prototype=Object.create(A.prototype,{constructor:{value:g,configurable:!0,writable:!0}});for(let D=0;D<_.length;++D)m(g.prototype,_[D]);return g}function A(){if(!(this instanceof A)){if(arguments.length===1&&Array.isArray(arguments[0]))return E(arguments[0]);if(arguments.length>0){const _=new Array(arguments.length);for(let g=0;g<arguments.length;++g)_[g]=arguments[g];return E(_)}throw new TypeError("Cannot call a class as a function")}d.set(this,new Map)}A.prototype={addEventListener(_,g,D){if(g==null)return!1;if(typeof g!="function"&&!p(g))throw new TypeError("'listener' should be a function or an object.");const S=f(this),I=p(D),T=(I?D.capture:D)?1:2,C={listener:g,listenerType:T,passive:I&&!!D.passive,once:I&&!!D.once,next:null};let O=S.get(_);if(O===void 0)return S.set(_,C),!0;let v=null;for(;O!=null;){if(O.listener===g&&O.listenerType===T)return!1;v=O,O=O.next}return v.next=C,!0},removeEventListener(_,g,D){if(g==null)return!1;const S=f(this),I=(p(D)?D.capture:D)?1:2;let T=null,C=S.get(_);for(;C!=null;){if(C.listener===g&&C.listenerType===I)return T!==null?T.next=C.next:C.next!==null?S.set(_,C.next):S.delete(_),!0;T=C,C=C.next}return!1},dispatchEvent(_){if(_==null||typeof _.type!="string")throw new TypeError('"event.type" should be a string.');const g=f(this),D=_.type;let S=g.get(D);if(S==null)return!0;const I=function(C,O){return new(c(Object.getPrototypeOf(O)))(C,O)}(this,_);let T=null;for(;S!=null;){if(S.once?T!==null?T.next=S.next:S.next!==null?g.set(D,S.next):g.delete(D):T=S,h(I,S.passive?S.listener:null),typeof S.listener=="function")try{S.listener.call(this,I)}catch(C){typeof console!="undefined"&&typeof console.error=="function"&&console.error(C)}else S.listenerType!==3&&typeof S.listener.handleEvent=="function"&&S.listener.handleEvent(I);if(u(I))break;S=S.next}return h(I,null),function(C,O){o(C).eventPhase=O}(I,0),function(C,O){o(C).currentTarget=O}(I,null),!I.defaultPrevented}},Object.defineProperty(A.prototype,"constructor",{value:A,configurable:!0,writable:!0}),typeof window!="undefined"&&window.EventTarget!==void 0&&Object.setPrototypeOf(A.prototype,window.EventTarget.prototype),t.default=A},function(e,t,n){(function(r){var i=this&&this.__spreadArrays||function(){for(var p=0,f=0,m=arguments.length;f<m;f++)p+=arguments[f].length;var E=Array(p),A=0;for(f=0;f<m;f++)for(var _=arguments[f],g=0,D=_.length;g<D;g++,A++)E[A]=_[g];return E};Object.defineProperty(t,"__esModule",{value:!0});var o=function(p,f,m){this.name=p,this.version=f,this.os=m};t.BrowserInfo=o;var s=function(p){this.version=p,this.name="node",this.os=r.platform};t.NodeInfo=s;var a=function(){this.bot=!0,this.name="bot",this.version=null,this.os=null};t.BotInfo=a;var l=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["vivaldi",/Vivaldi\/([0-9\.]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/Edg\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FBAV\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],c=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/],["Search Bot",/(nuhk)|(Googlebot)|(Yammybot)|(Openbot)|(Slurp)|(MSNBot)|(Ask Jeeves\/Teoma)|(ia_archiver)/]];function u(p){var f=p!==""&&l.reduce(function(_,g){var D=g[0],S=g[1];if(_)return _;var I=S.exec(p);return!!I&&[D,I]},!1);if(!f)return null;var m=f[0],E=f[1];if(m==="searchbot")return new a;var A=E[1]&&E[1].split(/[._]/).slice(0,3);return A?A.length<3&&(A=i(A,function(_){for(var g=[],D=0;D<_;D++)g.push("0");return g}(3-A.length))):A=[],new o(m,A.join("."),h(p))}function h(p){for(var f=0,m=c.length;f<m;f++){var E=c[f],A=E[0];if(E[1].test(p))return A}return null}function d(){return r!==void 0&&r.version?new s(r.version.slice(1)):null}t.detect=function(p){return p?u(p):typeof navigator!="undefined"?u(navigator.userAgent):d()},t.parseUserAgent=u,t.detectOS=h,t.getNodeVersion=d}).call(this,n(4))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(E){if(n===setTimeout)return setTimeout(E,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(E,0);try{return n(E,0)}catch(A){try{return n.call(null,E,0)}catch(_){return n.call(this,E,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch(E){n=o}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch(E){r=s}})();var l,c=[],u=!1,h=-1;function d(){u&&l&&(u=!1,l.length?c=l.concat(c):h=-1,c.length&&p())}function p(){if(!u){var E=a(d);u=!0;for(var A=c.length;A;){for(l=c,c=[];++h<A;)l&&l[h].run();h=-1,A=c.length}l=null,u=!1,function(_){if(r===clearTimeout)return clearTimeout(_);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(_);try{r(_)}catch(g){try{return r.call(null,_)}catch(D){return r.call(this,_)}}}(E)}}function f(E,A){this.fun=E,this.array=A}function m(){}i.nextTick=function(E){var A=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)A[_-1]=arguments[_];c.push(new f(E,A)),c.length!==1||u||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(E){return[]},i.binding=function(E){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(E){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}}]);const ZS=Ju(pA.exports);var Kp,vl,fA={exports:{}};Kp=fA,typeof OpusMediaRecorder!="undefined"&&OpusMediaRecorder,vl=function(){return function(){(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(r,i,o){n.o(r,i)||Object.defineProperty(r,i,{enumerable:!0,get:o})},n.r=function(r){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.t=function(r,i){if(1&i&&(r=n(r)),8&i||4&i&&typeof r=="object"&&r&&r.__esModule)return r;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&i&&typeof r!="string")for(var s in r)n.d(o,s,function(a){return r[a]}.bind(null,s));return o},n.n=function(r){var i=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(i,"a",i),i},n.o=function(r,i){return Object.prototype.hasOwnProperty.call(r,i)},n.p="",n(n.s=5)})([function(e,t,n){(function(r){function i(a,l){for(var c=0,u=a.length-1;u>=0;u--){var h=a[u];h==="."?a.splice(u,1):h===".."?(a.splice(u,1),c++):c&&(a.splice(u,1),c--)}if(l)for(;c--;c)a.unshift("..");return a}function o(a,l){if(a.filter)return a.filter(l);for(var c=[],u=0;u<a.length;u++)l(a[u],u,a)&&c.push(a[u]);return c}t.resolve=function(){for(var a="",l=!1,c=arguments.length-1;c>=-1&&!l;c--){var u=c>=0?arguments[c]:r.cwd();if(typeof u!="string")throw new TypeError("Arguments to path.resolve must be strings");u&&(a=u+"/"+a,l=u.charAt(0)==="/")}return(l?"/":"")+(a=i(o(a.split("/"),function(h){return!!h}),!l).join("/"))||"."},t.normalize=function(a){var l=t.isAbsolute(a),c=s(a,-1)==="/";return(a=i(o(a.split("/"),function(u){return!!u}),!l).join("/"))||l||(a="."),a&&c&&(a+="/"),(l?"/":"")+a},t.isAbsolute=function(a){return a.charAt(0)==="/"},t.join=function(){var a=Array.prototype.slice.call(arguments,0);return t.normalize(o(a,function(l,c){if(typeof l!="string")throw new TypeError("Arguments to path.join must be strings");return l}).join("/"))},t.relative=function(a,l){function c(E){for(var A=0;A<E.length&&E[A]==="";A++);for(var _=E.length-1;_>=0&&E[_]==="";_--);return A>_?[]:E.slice(A,_-A+1)}a=t.resolve(a).substr(1),l=t.resolve(l).substr(1);for(var u=c(a.split("/")),h=c(l.split("/")),d=Math.min(u.length,h.length),p=d,f=0;f<d;f++)if(u[f]!==h[f]){p=f;break}var m=[];for(f=p;f<u.length;f++)m.push("..");return(m=m.concat(h.slice(p))).join("/")},t.sep="/",t.delimiter=":",t.dirname=function(a){if(typeof a!="string"&&(a+=""),a.length===0)return".";for(var l=a.charCodeAt(0),c=l===47,u=-1,h=!0,d=a.length-1;d>=1;--d)if((l=a.charCodeAt(d))===47){if(!h){u=d;break}}else h=!1;return u===-1?c?"/":".":c&&u===1?"/":a.slice(0,u)},t.basename=function(a,l){var c=function(u){typeof u!="string"&&(u+="");var h,d=0,p=-1,f=!0;for(h=u.length-1;h>=0;--h)if(u.charCodeAt(h)===47){if(!f){d=h+1;break}}else p===-1&&(f=!1,p=h+1);return p===-1?"":u.slice(d,p)}(a);return l&&c.substr(-1*l.length)===l&&(c=c.substr(0,c.length-l.length)),c},t.extname=function(a){typeof a!="string"&&(a+="");for(var l=-1,c=0,u=-1,h=!0,d=0,p=a.length-1;p>=0;--p){var f=a.charCodeAt(p);if(f!==47)u===-1&&(h=!1,u=p+1),f===46?l===-1?l=p:d!==1&&(d=1):l!==-1&&(d=-1);else if(!h){c=p+1;break}}return l===-1||u===-1||d===0||d===1&&l===u-1&&l===c+1?"":a.slice(l,u)};var s="ab".substr(-1)==="b"?function(a,l,c){return a.substr(l,c)}:function(a,l,c){return l<0&&(l=a.length+l),a.substr(l,c)}}).call(this,n(2))},function(e,t){function n(A){return(n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _})(A)}function r(A,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");A.prototype=Object.create(_&&_.prototype,{constructor:{value:A,writable:!0,configurable:!0}}),_&&i(A,_)}function i(A,_){return(i=Object.setPrototypeOf||function(g,D){return g.__proto__=D,g})(A,_)}function o(A){var _=function(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(g){return!1}}();return function(){var g,D=a(A);if(_){var S=a(this).constructor;g=Reflect.construct(D,arguments,S)}else g=D.apply(this,arguments);return s(this,g)}}function s(A,_){return!_||n(_)!=="object"&&typeof _!="function"?function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(A):_}function a(A){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(_){return _.__proto__||Object.getPrototypeOf(_)})(A)}function l(A,_){if(!(A instanceof _))throw new TypeError("Cannot call a class as a function")}function c(A,_,g){return _&&function(D,S){for(var I=0;I<S.length;I++){var T=S[I];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(D,T.key,T)}}(A.prototype,_),A}var u=function(){function A(_,g,D,S){switch(l(this,A),this._size=g,this._module=_,this._size){case 1:this._heapArray=D?this._module.HEAP8:this._module.HEAPU8;break;case 2:this._heapArray=D?this._module.HEAP16:this._module.HEAPU16;break;case 4:this._heapArray=D?this._module.HEAP32:this._module.HEAPU32;break;default:this._heapArray=this._module.HEAPU8}S&&(this._size=4,this._heapArray=this._module.HEAPF32),this._pointer=this._module._malloc(g)}return c(A,[{key:"free",value:function(){this._module._free(this.pointer)}},{key:"pointer",get:function(){return this._pointer}},{key:"value",get:function(){var _=0;switch(this._size){case 2:_=1;break;case 4:_=2;break;default:throw new Error("Pointer can be only deferenced as integer-sized")}return this._heapArray[this.pointer>>_]},set:function(_){var g=0;switch(this._size){case 2:g=1;break;case 4:g=2;break;default:throw new Error("Pointer can be only deferenced as integer-sized")}this._heapArray[this.pointer>>g]=_}}]),A}(),h=function(A){r(g,A);var _=o(g);function g(D,S){var I;return l(this,g),I=_.call(this,D,4,!0,!1),S!==void 0&&(I.value=S),I}return g}(u),d=function(A){r(g,A);var _=o(g);function g(D,S){var I;return l(this,g),I=_.call(this,D,4,!1,!1),S!==void 0&&(I.value=S),I}return g}(u),p=function(A){r(g,A);var _=o(g);function g(D,S,I,T,C){var O;l(this,g),O=_.call(this,D,S*I,T,C);var v=0;switch(I){case 1:O._heapArray=T?O._module.HEAP8:O._module.HEAPU8,v=0;break;case 2:O._heapArray=T?O._module.HEAP16:O._module.HEAPU16,v=1;break;case 4:O._heapArray=T?O._module.HEAP32:O._module.HEAPU32,v=2;break;default:throw new Error("Unit size must be an integer-size")}C&&(O._heapArray=O._module.HEAPF32,v=2);var y=O._pointer>>v;return O._buffer=O._heapArray.subarray(y,y+S),O._length=S,O}return c(g,[{key:"set",value:function(D,S){this._buffer.set(D,S)}},{key:"subarray",value:function(D,S){return this._buffer.subarray(D,S)}},{key:"length",get:function(){return this._length}}]),g}(u),f=function(A){r(g,A);var _=o(g);function g(D,S){return l(this,g),_.call(this,D,S,4,!0,!0)}return g}(p),m=function(A){r(g,A);var _=o(g);function g(D,S){return l(this,g),_.call(this,D,S,1,!1,!1)}return g}(p),E=function(){function A(_){l(this,A),this._module=_}return c(A,[{key:"mallocInt32",value:function(_){return new h(this._module,_)}},{key:"mallocUint32",value:function(_){return new d(this._module,_)}},{key:"mallocUint8Buffer",value:function(_){return new m(this._module,_)}},{key:"mallocFloat32Buffer",value:function(_){return new f(this._module,_)}}]),A}();e.exports={writeString:function(A,_,g){for(var D=0;D<g.length;D++)A.setUint8(_+D,g.charCodeAt(D))},EmscriptenMemoryAllocator:E}},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(E){if(n===setTimeout)return setTimeout(E,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(E,0);try{return n(E,0)}catch(A){try{return n.call(null,E,0)}catch(_){return n.call(this,E,0)}}}(function(){try{n=typeof setTimeout=="function"?setTimeout:o}catch(E){n=o}try{r=typeof clearTimeout=="function"?clearTimeout:s}catch(E){r=s}})();var l,c=[],u=!1,h=-1;function d(){u&&l&&(u=!1,l.length?c=l.concat(c):h=-1,c.length&&p())}function p(){if(!u){var E=a(d);u=!0;for(var A=c.length;A;){for(l=c,c=[];++h<A;)l&&l[h].run();h=-1,A=c.length}l=null,u=!1,function(_){if(r===clearTimeout)return clearTimeout(_);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(_);try{r(_)}catch(g){try{return r.call(null,_)}catch(D){return r.call(this,_)}}}(E)}}function f(E,A){this.fun=E,this.array=A}function m(){}i.nextTick=function(E){var A=new Array(arguments.length-1);if(arguments.length>1)for(var _=1;_<arguments.length;_++)A[_-1]=arguments[_];c.push(new f(E,A)),c.length!==1||u||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(E){return[]},i.binding=function(E){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(E){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(e,t){e.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}},function(e,t){},function(e,t,n){function r(i){var o,s=n(6),a=n(7),l=n(8);i.onmessage=function(c){var u=c.data.command;switch(u){case"loadEncoder":var h,d=c.data,p=d.mimeType,f=d.wasmPath;switch(p){case"audio/wav":case"audio/wave":h=s;break;case"audio/webm":h=a;break;case"audio/ogg":h=l}var m={};f&&(m.locateFile=function(C,O){return C.match(/.wasm/)?f:O+C}),h(m).then(function(C){o=C,self.postMessage({command:"readyToInit"})});break;case"init":var E=c.data,A=E.sampleRate,_=E.channelCount,g=E.bitsPerSecond;o.init(A,_,g);break;case"pushInputData":for(var D=c.data,S=D.channelBuffers,I=(D.length,D.duration,0);I<S.length;I++)S[I]=new Float32Array(S[I].buffer);o.encode(S);break;case"getEncodedData":case"done":u==="done"&&o.close();var T=o.flush();self.postMessage({command:u==="done"?"lastEncodedData":"encodedData",buffers:T},T),u==="done"&&self.close()}}}typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&r(self),e.exports=r},function(e,t,n){function r(a,l){(l==null||l>a.length)&&(l=a.length);for(var c=0,u=new Array(l);c<l;c++)u[c]=a[c];return u}var i=n(1).writeString,o=Int16Array.BYTES_PER_ELEMENT,s=function(){function a(c,u,h){(function(d,p){if(!(d instanceof p))throw new TypeError("Cannot call a class as a function")})(this,a),this.config={inputSampleRate:c,channelCount:u},this.encodedBuffers=[]}var l;return(l=[{key:"encode",value:function(c){for(var u=c[0].length,h=new ArrayBuffer(u*o*this.config.channelCount),d=new DataView(h),p=0;p<this.config.channelCount;p++)for(var f=c[p],m=0;m<u;m++){var E=32767*f[m]|0;E>32767?E=32767:E<-32768&&(E=-32768);var A=(m*this.config.channelCount+p)*o;d.setInt16(A,0|E,!0)}this.encodedBuffers.push(h)}},{key:"getHeader",value:function(){var c=this.encodedBuffers.reduce(function(d,p){return d+p.byteLength},0),u=new ArrayBuffer(44),h=new DataView(u);return i(h,0,"RIFF"),h.setUint32(4,36+c,!0),i(h,8,"WAVE"),i(h,12,"fmt "),h.setUint32(16,16,!0),h.setUint16(20,1,!0),h.setUint16(22,this.config.channelCount,!0),h.setUint32(24,this.config.inputSampleRate,!0),h.setUint32(28,this.config.inputSampleRate*o*this.config.channelCount,!0),h.setUint16(32,o*this.config.channelCount,!0),h.setUint16(34,8*o,!0),i(h,36,"data"),h.setUint32(40,c,!0),u}}])&&function(c,u){for(var h=0;h<u.length;h++){var d=u[h];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(c,d.key,d)}}(a.prototype,l),a}();e.exports=function(a){return new Promise(function(l,c){(a=a!==void 0&&a||{}).init=function(u,h,d){a.encoder=new s(u,h,d)},a.encode=function(u){a.encoder.encode(u)},a.flush=function(){var u=a.encoder.getHeader(),h=a.encoder.encodedBuffers.splice(0,a.encoder.encodedBuffers.length);return[u].concat(function(d){return function(p){if(Array.isArray(p))return r(p)}(d)||function(p){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(p))return Array.from(p)}(d)||function(p,f){if(p){if(typeof p=="string")return r(p,f);var m=Object.prototype.toString.call(p).slice(8,-1);return m==="Object"&&p.constructor&&(m=p.constructor.name),m==="Map"||m==="Set"?Array.from(p):m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m)?r(p,f):void 0}}(d)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
104
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}(h))},a.close=function(){},l(a)})}},function(e,t,n){(function(r,i,o,s){var a;function l(d){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}function c(d,p,f){return p&&function(m,E){for(var A=0;A<E.length;A++){var _=E[A];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}(d.prototype,p),d}var u,h=(u=(u=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0)||r,function(d){d=(d=d||{})!==void 0?d:{};var p=n(1).EmscriptenMemoryAllocator,f=48e3,m=function(){function R(N,M){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;(function(z,V){if(!(z instanceof V))throw new TypeError("Cannot call a class as a function")})(this,R),this.config={inputSampleRate:N,channelCount:M},this.memory=new p(d),this._opus_encoder_create=d._opus_encoder_create,this._opus_encoder_ctl=d._opus_encoder_ctl,this._opus_encode_float=d._opus_encode_float,this._opus_encoder_destroy=d._opus_encoder_destroy,this._speex_resampler_init=d._speex_resampler_init,this._speex_resampler_process_interleaved_float=d._speex_resampler_process_interleaved_float,this._speex_resampler_destroy=d._speex_resampler_destroy,this._container=new d.Container,this._container.init(f,M,Math.floor(4294967295*Math.random())),this.OpusInitCodec(f,M,$),this.SpeexInitResampler(N,f,M),this.inputSamplesPerChannel=20*N/1e3,this.outputSamplePerChannel=960,this.inputBufferIndex=0,this.mInputBuffer=this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel*M),this.mResampledBuffer=this.memory.mallocFloat32Buffer(this.outputSamplePerChannel*M),this.mOutputBuffer=this.memory.mallocUint8Buffer(4e3),this.interleavedBuffers=M!==1?new Float32Array(4096*M):void 0}return c(R,[{key:"encode",value:function(N){for(var M=this.interleave(N),$=0;$<M.length;){var z=Math.min(this.mInputBuffer.length-this.inputBufferIndex,M.length-$);if(this.mInputBuffer.set(M.subarray($,$+z),this.inputBufferIndex),this.inputBufferIndex+=z,this.inputBufferIndex>=this.mInputBuffer.length){var V=this.memory.mallocUint32(this.inputSamplesPerChannel),et=this.memory.mallocUint32(this.outputSamplePerChannel),Ct=this._speex_resampler_process_interleaved_float(this.resampler,this.mInputBuffer.pointer,V.pointer,this.mResampledBuffer.pointer,et.pointer);if(V.free(),et.free(),Ct!==0)throw new Error("Resampling error.");var xt=this._opus_encode_float(this.encoder,this.mResampledBuffer.pointer,this.outputSamplePerChannel,this.mOutputBuffer.pointer,this.mOutputBuffer.length);if(xt<0)throw new Error("Opus encoding error.");this._container.writeFrame(this.mOutputBuffer.pointer,xt,this.outputSamplePerChannel),this.inputBufferIndex=0}$+=z}}},{key:"close",value:function(){for(var N=this.config.channelCount,M=[],$=0;$<N;++$)M.push(new Float32Array(4096-this.inputBufferIndex/N));this.encode(M),d.destroy(this._container),this.mInputBuffer.free(),this.mResampledBuffer.free(),this.mOutputBuffer.free(),this._opus_encoder_destroy(this.encoder),this._speex_resampler_destroy(this.resampler)}},{key:"interleave",value:function(N){var M=N.length;if(M===1)return N[0];for(var $=0;$<M;$++)for(var z=N[$],V=0;V<z.length;V++)this.interleavedBuffers[V*M+$]=z[V];return this.interleavedBuffers}},{key:"OpusInitCodec",value:function(N,M){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,z=this.memory.mallocUint32(void 0);this.encoder=this._opus_encoder_create(N,M,2049,z.pointer);var V=z.value;if(z.free(),V!==0)throw new Error("Opus encodor initialization failed.");$&&this.OpusSetOpusControl(4002,$)}},{key:"OpusSetOpusControl",value:function(N,M){var $=this.memory.mallocInt32(M);this._opus_encoder_ctl(this.encoder,N,$.pointer),$.free()}},{key:"SpeexInitResampler",value:function(N,M,$){var z=this.memory.mallocUint32(void 0);this.resampler=this._speex_resampler_init($,N,M,6,z.pointer);var V=z.value;if(z.free(),V!==0)throw new Error("Initializing resampler failed.")}}]),R}();d.init=function(R,N,M){d.encodedBuffers=[],d.encoder=new m(R,N,M)},d.encode=function(R){d.encoder.encode(R)},d.flush=function(){return d.encodedBuffers.splice(0,d.encodedBuffers.length)},d.close=function(){d.encoder.close()};var E,A,_,g,D,S={};for(E in d)d.hasOwnProperty(E)&&(S[E]=d[E]);A=(typeof window=="undefined"?"undefined":l(window))==="object",_=typeof importScripts=="function",g=(i===void 0?"undefined":l(i))==="object"&&l(i.versions)==="object"&&typeof i.versions.node=="string",D=!A&&!g&&!_;var I,T,C,O,v="";g?(v=_?n(0).dirname(v)+"/":o+"/",I=function(R,N){return C||(C=n(4)),O||(O=n(0)),R=O.normalize(R),C.readFileSync(R,N?null:"utf8")},T=function(R){var N=I(R,!0);return N.buffer||(N=new Uint8Array(N)),B(N.buffer),N},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),i.argv.slice(2),i.on("uncaughtException",function(R){if(!(R instanceof fr))throw R}),i.on("unhandledRejection",Rt),d.inspect=function(){return"[Emscripten Module object]"}):D?(typeof read!="undefined"&&(I=function(R){return read(R)}),T=function(R){var N;return typeof readbuffer=="function"?new Uint8Array(readbuffer(R)):(B(l(N=read(R,"binary"))==="object"),N)},typeof scriptArgs!="undefined"&&scriptArgs,typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(A||_)&&(_?v=self.location.href:document.currentScript&&(v=document.currentScript.src),u&&(v=u),v=v.indexOf("blob:")!==0?v.substr(0,v.lastIndexOf("/")+1):"",I=function(R){var N=new XMLHttpRequest;return N.open("GET",R,!1),N.send(null),N.responseText},_&&(T=function(R){var N=new XMLHttpRequest;return N.open("GET",R,!1),N.responseType="arraybuffer",N.send(null),new Uint8Array(N.response)}));var y,b,P=d.print||console.log.bind(console),w=d.printErr||console.warn.bind(console);for(E in S)S.hasOwnProperty(E)&&(d[E]=S[E]);S=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit,d.wasmBinary&&(y=d.wasmBinary),d.noExitRuntime&&d.noExitRuntime,(typeof WebAssembly=="undefined"?"undefined":l(WebAssembly))!=="object"&&w("no native wasm support detected");var F=new WebAssembly.Table({initial:60,maximum:60,element:"anyfunc"}),H=!1;function B(R,N){R||Rt("Assertion failed: "+N)}var K,W,X,G=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function ht(R,N,M){for(var $=N+M,z=N;R[z]&&!(z>=$);)++z;if(z-N>16&&R.subarray&&G)return G.decode(R.subarray(N,z));for(var V="";N<z;){var et=R[N++];if(128&et){var Ct=63&R[N++];if((224&et)!=192){var xt=63&R[N++];if((et=(240&et)==224?(15&et)<<12|Ct<<6|xt:(7&et)<<18|Ct<<12|xt<<6|63&R[N++])<65536)V+=String.fromCharCode(et);else{var yn=et-65536;V+=String.fromCharCode(55296|yn>>10,56320|1023&yn)}}else V+=String.fromCharCode((31&et)<<6|Ct)}else V+=String.fromCharCode(et)}return V}function tt(R,N){return R?ht(W,R,N):""}typeof TextDecoder!="undefined"&&new TextDecoder("utf-16le");var rt=d.INITIAL_MEMORY||16777216;function ot(R){for(;R.length>0;){var N=R.shift();if(typeof N!="function"){var M=N.func;typeof M=="number"?N.arg===void 0?d.dynCall_v(M):d.dynCall_vi(M,N.arg):M(N.arg===void 0?null:N.arg)}else N()}}(b=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:rt/65536,maximum:rt/65536}))&&(K=b.buffer),rt=K.byteLength,function(R){K=R,d.HEAP8=new Int8Array(R),d.HEAP16=new Int16Array(R),d.HEAP32=X=new Int32Array(R),d.HEAPU8=W=new Uint8Array(R),d.HEAPU16=new Uint16Array(R),d.HEAPU32=new Uint32Array(R),d.HEAPF32=new Float32Array(R),d.HEAPF64=new Float64Array(R)}(K),X[11496]=5289024;var bt=[],ee=[],Gt=[],vt=[];function Pt(R){bt.unshift(R)}function Se(R){vt.unshift(R)}var Et=0,Mt=null;function Rt(R){throw d.onAbort&&d.onAbort(R),P(R+=""),w(R),H=!0,R="abort("+R+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(R)}d.preloadedImages={},d.preloadedAudios={};var fe="data:application/octet-stream;base64,";function $e(R){return String.prototype.startsWith?R.startsWith(fe):R.indexOf(fe)===0}var ct="WebMOpusEncoder.wasm";function me(){try{if(y)return new Uint8Array(y);if(T)return T(ct);throw"both async and sync fetching of the wasm failed"}catch(R){Rt(R)}}$e(ct)||(ct=function(R){return d.locateFile?d.locateFile(R,v):v+R}(ct)),ee.push({func:function(){cr()}});var It={mappings:{},buffers:[null,[],[]],printChar:function(R,N){var M=It.buffers[R];N===0||N===10?((R===1?P:w)(ht(M,0)),M.length=0):M.push(N)},varargs:void 0,get:function(){return It.varargs+=4,X[It.varargs-4>>2]},getStr:function(R){return tt(R)},get64:function(R,N){return R}},xi={a:function(R,N,M,$){Rt("Assertion failed: "+tt(R)+", at: "+[N?tt(N):"unknown filename",M,$?tt($):"unknown function"])},e:function(R,N,M){return It.varargs=M,0},h:function(R,N,M){It.varargs=M},g:function(R,N,M){return It.varargs=M,0},b:function(){Rt()},m:function(R,N){var M=new Uint8Array(d.HEAPU8.buffer,R,N);d.encodedBuffers.push(new Uint8Array(M).buffer)},k:function(R,N,M){W.copyWithin(R,N,N+M)},l:function(R){Rt("OOM")},c:function(R){return 0},f:function(R,N,M,$){var z=It.getStreamFromFD(R),V=It.doReadv(z,N,M);return X[$>>2]=V,0},j:function(R,N,M,$,z){},d:function(R,N,M,$){for(var z=0,V=0;V<M;V++){for(var et=X[N+8*V>>2],Ct=X[N+(8*V+4)>>2],xt=0;xt<Ct;xt++)It.printChar(R,W[et+xt]);z+=Ct}return X[$>>2]=z,0},memory:b,table:F,i:function(R){var N=Date.now()/1e3|0;return R&&(X[R>>2]=N),N}},sn=function(){var R={a:xi};function N(z,V){var et=z.exports;d.asm=et,function(){if(Et--,d.monitorRunDependencies&&d.monitorRunDependencies(Et),Et==0&&Mt){var Ct=Mt;Mt=null,Ct()}}()}function M(z){N(z.instance)}function $(z){return(y||!A&&!_||typeof fetch!="function"?new Promise(function(V,et){V(me())}):fetch(ct,{credentials:"same-origin"}).then(function(V){if(!V.ok)throw"failed to load wasm binary file at '"+ct+"'";return V.arrayBuffer()}).catch(function(){return me()})).then(function(V){return WebAssembly.instantiate(V,R)}).then(z,function(V){w("failed to asynchronously prepare wasm: "+V),Rt(V)})}if(Et++,d.monitorRunDependencies&&d.monitorRunDependencies(Et),d.instantiateWasm)try{return d.instantiateWasm(R,N)}catch(z){return w("Module.instantiateWasm callback failed with error: "+z),!1}return function(){if(y||typeof WebAssembly.instantiateStreaming!="function"||$e(ct)||typeof fetch!="function")return $(M);fetch(ct,{credentials:"same-origin"}).then(function(z){return WebAssembly.instantiateStreaming(z,R).then(M,function(V){w("wasm streaming compile failed: "+V),w("falling back to ArrayBuffer instantiation"),$(M)})})}(),{}}();d.asm=sn;var Te,cr=d.___wasm_call_ctors=function(){return(cr=d.___wasm_call_ctors=d.asm.n).apply(null,arguments)},dr=(d.___em_js__emscriptenPushBuffer=function(){return(d.___em_js__emscriptenPushBuffer=d.asm.o).apply(null,arguments)},d._emscripten_bind_VoidPtr___destroy___0=function(){return(dr=d._emscripten_bind_VoidPtr___destroy___0=d.asm.p).apply(null,arguments)}),Vn=d._emscripten_bind_Container_Container_0=function(){return(Vn=d._emscripten_bind_Container_Container_0=d.asm.q).apply(null,arguments)},hr=d._emscripten_bind_Container_init_3=function(){return(hr=d._emscripten_bind_Container_init_3=d.asm.r).apply(null,arguments)},pr=d._emscripten_bind_Container_writeFrame_3=function(){return(pr=d._emscripten_bind_Container_writeFrame_3=d.asm.s).apply(null,arguments)},an=d._emscripten_bind_Container___destroy___0=function(){return(an=d._emscripten_bind_Container___destroy___0=d.asm.t).apply(null,arguments)};function fr(R){this.name="ExitStatus",this.message="Program terminated with exit("+R+")",this.status=R}function ln(R){function N(){Te||(Te=!0,d.calledRun=!0,H||(ot(ee),ot(Gt),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)Se(d.postRun.shift());ot(vt)}()))}Et>0||(function(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)Pt(d.preRun.shift());ot(bt)}(),Et>0||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),N()},1)):N()))}if(d._opus_encoder_create=function(){return(d._opus_encoder_create=d.asm.u).apply(null,arguments)},d._opus_encode_float=function(){return(d._opus_encode_float=d.asm.v).apply(null,arguments)},d._opus_encoder_ctl=function(){return(d._opus_encoder_ctl=d.asm.w).apply(null,arguments)},d._opus_encoder_destroy=function(){return(d._opus_encoder_destroy=d.asm.x).apply(null,arguments)},d._speex_resampler_init=function(){return(d._speex_resampler_init=d.asm.y).apply(null,arguments)},d._speex_resampler_destroy=function(){return(d._speex_resampler_destroy=d.asm.z).apply(null,arguments)},d._speex_resampler_process_interleaved_float=function(){return(d._speex_resampler_process_interleaved_float=d.asm.A).apply(null,arguments)},d._free=function(){return(d._free=d.asm.B).apply(null,arguments)},d._malloc=function(){return(d._malloc=d.asm.C).apply(null,arguments)},d.dynCall_vi=function(){return(d.dynCall_vi=d.asm.D).apply(null,arguments)},d.dynCall_v=function(){return(d.dynCall_v=d.asm.E).apply(null,arguments)},d.asm=sn,d.then=function(R){if(Te)R(d);else{var N=d.onRuntimeInitialized;d.onRuntimeInitialized=function(){N&&N(),R(d)}}return d},Mt=function R(){Te||ln(),Te||(Mt=R)},d.run=ln,d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Ot(){}function ke(R){return(R||Ot).__cache__}function In(R,N){var M=ke(N),$=M[R];return $||(($=Object.create((N||Ot).prototype)).ptr=R,M[R]=$)}function yt(){throw"cannot construct a VoidPtr, no constructor in IDL"}function pt(){this.ptr=Vn(),ke(pt)[this.ptr]=this}return ln(),Ot.prototype=Object.create(Ot.prototype),Ot.prototype.constructor=Ot,Ot.prototype.__class__=Ot,Ot.__cache__={},d.WrapperObject=Ot,d.getCache=ke,d.wrapPointer=In,d.castObject=function(R,N){return In(R.ptr,N)},d.NULL=In(0),d.destroy=function(R){if(!R.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";R.__destroy__(),delete ke(R.__class__)[R.ptr]},d.compare=function(R,N){return R.ptr===N.ptr},d.getPointer=function(R){return R.ptr},d.getClass=function(R){return R.__class__},yt.prototype=Object.create(Ot.prototype),yt.prototype.constructor=yt,yt.prototype.__class__=yt,yt.__cache__={},d.VoidPtr=yt,yt.prototype.__destroy__=yt.prototype.__destroy__=function(){var R=this.ptr;dr(R)},pt.prototype=Object.create(Ot.prototype),pt.prototype.constructor=pt,pt.prototype.__class__=pt,pt.__cache__={},d.Container=pt,pt.prototype.init=pt.prototype.init=function(R,N,M){var $=this.ptr;R&&l(R)==="object"&&(R=R.ptr),N&&l(N)==="object"&&(N=N.ptr),M&&l(M)==="object"&&(M=M.ptr),hr($,R,N,M)},pt.prototype.writeFrame=pt.prototype.writeFrame=function(R,N,M){var $=this.ptr;R&&l(R)==="object"&&(R=R.ptr),N&&l(N)==="object"&&(N=N.ptr),M&&l(M)==="object"&&(M=M.ptr),pr($,R,N,M)},pt.prototype.__destroy__=pt.prototype.__destroy__=function(){var R=this.ptr;an(R)},d});l(t)==="object"&&l(s)==="object"?s.exports=h:(a=function(){return h}.apply(t,[]))===void 0||(s.exports=a)}).call(this,"/index.js",n(2),"/",n(3)(e))},function(e,t,n){(function(r,i,o,s){var a;function l(d){return(l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(p){return typeof p}:function(p){return p&&typeof Symbol=="function"&&p.constructor===Symbol&&p!==Symbol.prototype?"symbol":typeof p})(d)}function c(d,p,f){return p&&function(m,E){for(var A=0;A<E.length;A++){var _=E[A];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(m,_.key,_)}}(d.prototype,p),d}var u,h=(u=(u=typeof document!="undefined"&&document.currentScript?document.currentScript.src:void 0)||r,function(d){d=(d=d||{})!==void 0?d:{};var p=n(1).EmscriptenMemoryAllocator,f=48e3,m=function(){function R(N,M){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;(function(z,V){if(!(z instanceof V))throw new TypeError("Cannot call a class as a function")})(this,R),this.config={inputSampleRate:N,channelCount:M},this.memory=new p(d),this._opus_encoder_create=d._opus_encoder_create,this._opus_encoder_ctl=d._opus_encoder_ctl,this._opus_encode_float=d._opus_encode_float,this._opus_encoder_destroy=d._opus_encoder_destroy,this._speex_resampler_init=d._speex_resampler_init,this._speex_resampler_process_interleaved_float=d._speex_resampler_process_interleaved_float,this._speex_resampler_destroy=d._speex_resampler_destroy,this._container=new d.Container,this._container.init(f,M,Math.floor(4294967295*Math.random())),this.OpusInitCodec(f,M,$),this.SpeexInitResampler(N,f,M),this.inputSamplesPerChannel=20*N/1e3,this.outputSamplePerChannel=960,this.inputBufferIndex=0,this.mInputBuffer=this.memory.mallocFloat32Buffer(this.inputSamplesPerChannel*M),this.mResampledBuffer=this.memory.mallocFloat32Buffer(this.outputSamplePerChannel*M),this.mOutputBuffer=this.memory.mallocUint8Buffer(4e3),this.interleavedBuffers=M!==1?new Float32Array(4096*M):void 0}return c(R,[{key:"encode",value:function(N){for(var M=this.interleave(N),$=0;$<M.length;){var z=Math.min(this.mInputBuffer.length-this.inputBufferIndex,M.length-$);if(this.mInputBuffer.set(M.subarray($,$+z),this.inputBufferIndex),this.inputBufferIndex+=z,this.inputBufferIndex>=this.mInputBuffer.length){var V=this.memory.mallocUint32(this.inputSamplesPerChannel),et=this.memory.mallocUint32(this.outputSamplePerChannel),Ct=this._speex_resampler_process_interleaved_float(this.resampler,this.mInputBuffer.pointer,V.pointer,this.mResampledBuffer.pointer,et.pointer);if(V.free(),et.free(),Ct!==0)throw new Error("Resampling error.");var xt=this._opus_encode_float(this.encoder,this.mResampledBuffer.pointer,this.outputSamplePerChannel,this.mOutputBuffer.pointer,this.mOutputBuffer.length);if(xt<0)throw new Error("Opus encoding error.");this._container.writeFrame(this.mOutputBuffer.pointer,xt,this.outputSamplePerChannel),this.inputBufferIndex=0}$+=z}}},{key:"close",value:function(){for(var N=this.config.channelCount,M=[],$=0;$<N;++$)M.push(new Float32Array(4096-this.inputBufferIndex/N));this.encode(M),d.destroy(this._container),this.mInputBuffer.free(),this.mResampledBuffer.free(),this.mOutputBuffer.free(),this._opus_encoder_destroy(this.encoder),this._speex_resampler_destroy(this.resampler)}},{key:"interleave",value:function(N){var M=N.length;if(M===1)return N[0];for(var $=0;$<M;$++)for(var z=N[$],V=0;V<z.length;V++)this.interleavedBuffers[V*M+$]=z[V];return this.interleavedBuffers}},{key:"OpusInitCodec",value:function(N,M){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,z=this.memory.mallocUint32(void 0);this.encoder=this._opus_encoder_create(N,M,2049,z.pointer);var V=z.value;if(z.free(),V!==0)throw new Error("Opus encodor initialization failed.");$&&this.OpusSetOpusControl(4002,$)}},{key:"OpusSetOpusControl",value:function(N,M){var $=this.memory.mallocInt32(M);this._opus_encoder_ctl(this.encoder,N,$.pointer),$.free()}},{key:"SpeexInitResampler",value:function(N,M,$){var z=this.memory.mallocUint32(void 0);this.resampler=this._speex_resampler_init($,N,M,6,z.pointer);var V=z.value;if(z.free(),V!==0)throw new Error("Initializing resampler failed.")}}]),R}();d.init=function(R,N,M){d.encodedBuffers=[],d.encoder=new m(R,N,M)},d.encode=function(R){d.encoder.encode(R)},d.flush=function(){return d.encodedBuffers.splice(0,d.encodedBuffers.length)},d.close=function(){d.encoder.close()};var E,A,_,g,D,S={};for(E in d)d.hasOwnProperty(E)&&(S[E]=d[E]);A=(typeof window=="undefined"?"undefined":l(window))==="object",_=typeof importScripts=="function",g=(i===void 0?"undefined":l(i))==="object"&&l(i.versions)==="object"&&typeof i.versions.node=="string",D=!A&&!g&&!_;var I,T,C,O,v="";g?(v=_?n(0).dirname(v)+"/":o+"/",I=function(R,N){return C||(C=n(4)),O||(O=n(0)),R=O.normalize(R),C.readFileSync(R,N?null:"utf8")},T=function(R){var N=I(R,!0);return N.buffer||(N=new Uint8Array(N)),B(N.buffer),N},i.argv.length>1&&i.argv[1].replace(/\\/g,"/"),i.argv.slice(2),i.on("uncaughtException",function(R){if(!(R instanceof fr))throw R}),i.on("unhandledRejection",Rt),d.inspect=function(){return"[Emscripten Module object]"}):D?(typeof read!="undefined"&&(I=function(R){return read(R)}),T=function(R){var N;return typeof readbuffer=="function"?new Uint8Array(readbuffer(R)):(B(l(N=read(R,"binary"))==="object"),N)},typeof scriptArgs!="undefined"&&scriptArgs,typeof print!="undefined"&&(typeof console=="undefined"&&(console={}),console.log=print,console.warn=console.error=typeof printErr!="undefined"?printErr:print)):(A||_)&&(_?v=self.location.href:document.currentScript&&(v=document.currentScript.src),u&&(v=u),v=v.indexOf("blob:")!==0?v.substr(0,v.lastIndexOf("/")+1):"",I=function(R){var N=new XMLHttpRequest;return N.open("GET",R,!1),N.send(null),N.responseText},_&&(T=function(R){var N=new XMLHttpRequest;return N.open("GET",R,!1),N.responseType="arraybuffer",N.send(null),new Uint8Array(N.response)}));var y,b,P=d.print||console.log.bind(console),w=d.printErr||console.warn.bind(console);for(E in S)S.hasOwnProperty(E)&&(d[E]=S[E]);S=null,d.arguments&&d.arguments,d.thisProgram&&d.thisProgram,d.quit&&d.quit,d.wasmBinary&&(y=d.wasmBinary),d.noExitRuntime&&d.noExitRuntime,(typeof WebAssembly=="undefined"?"undefined":l(WebAssembly))!=="object"&&w("no native wasm support detected");var F=new WebAssembly.Table({initial:36,maximum:36,element:"anyfunc"}),H=!1;function B(R,N){R||Rt("Assertion failed: "+N)}var K,W,X,G=typeof TextDecoder!="undefined"?new TextDecoder("utf8"):void 0;function ht(R,N,M){for(var $=N+M,z=N;R[z]&&!(z>=$);)++z;if(z-N>16&&R.subarray&&G)return G.decode(R.subarray(N,z));for(var V="";N<z;){var et=R[N++];if(128&et){var Ct=63&R[N++];if((224&et)!=192){var xt=63&R[N++];if((et=(240&et)==224?(15&et)<<12|Ct<<6|xt:(7&et)<<18|Ct<<12|xt<<6|63&R[N++])<65536)V+=String.fromCharCode(et);else{var yn=et-65536;V+=String.fromCharCode(55296|yn>>10,56320|1023&yn)}}else V+=String.fromCharCode((31&et)<<6|Ct)}else V+=String.fromCharCode(et)}return V}function tt(R,N){return R?ht(W,R,N):""}typeof TextDecoder!="undefined"&&new TextDecoder("utf-16le");var rt=d.INITIAL_MEMORY||16777216;function ot(R){for(;R.length>0;){var N=R.shift();if(typeof N!="function"){var M=N.func;typeof M=="number"?N.arg===void 0?d.dynCall_v(M):d.dynCall_vi(M,N.arg):M(N.arg===void 0?null:N.arg)}else N()}}(b=d.wasmMemory?d.wasmMemory:new WebAssembly.Memory({initial:rt/65536,maximum:rt/65536}))&&(K=b.buffer),rt=K.byteLength,function(R){K=R,d.HEAP8=new Int8Array(R),d.HEAP16=new Int16Array(R),d.HEAP32=X=new Int32Array(R),d.HEAPU8=W=new Uint8Array(R),d.HEAPU16=new Uint16Array(R),d.HEAPU32=new Uint32Array(R),d.HEAPF32=new Float32Array(R),d.HEAPF64=new Float64Array(R)}(K),X[11672]=5289728;var bt=[],ee=[],Gt=[],vt=[];function Pt(R){bt.unshift(R)}function Se(R){vt.unshift(R)}var Et=0,Mt=null;function Rt(R){throw d.onAbort&&d.onAbort(R),P(R+=""),w(R),H=!0,R="abort("+R+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(R)}d.preloadedImages={},d.preloadedAudios={};var fe="data:application/octet-stream;base64,";function $e(R){return String.prototype.startsWith?R.startsWith(fe):R.indexOf(fe)===0}var ct="OggOpusEncoder.wasm";function me(){try{if(y)return new Uint8Array(y);if(T)return T(ct);throw"both async and sync fetching of the wasm failed"}catch(R){Rt(R)}}$e(ct)||(ct=function(R){return d.locateFile?d.locateFile(R,v):v+R}(ct)),ee.push({func:function(){cr()}});var It={mappings:{},buffers:[null,[],[]],printChar:function(R,N){var M=It.buffers[R];N===0||N===10?((R===1?P:w)(ht(M,0)),M.length=0):M.push(N)},varargs:void 0,get:function(){return It.varargs+=4,X[It.varargs-4>>2]},getStr:function(R){return tt(R)},get64:function(R,N){return R}},xi={a:function(R,N,M,$){Rt("Assertion failed: "+tt(R)+", at: "+[N?tt(N):"unknown filename",M,$?tt($):"unknown function"])},c:function(){Rt()},d:function(R,N){var M=new Uint8Array(d.HEAPU8.buffer,R,N);d.encodedBuffers.push(new Uint8Array(M).buffer)},f:function(R,N,M){W.copyWithin(R,N,N+M)},g:function(R){Rt("OOM")},h:function(R){return 0},e:function(R,N,M,$,z){},b:function(R,N,M,$){for(var z=0,V=0;V<M;V++){for(var et=X[N+8*V>>2],Ct=X[N+(8*V+4)>>2],xt=0;xt<Ct;xt++)It.printChar(R,W[et+xt]);z+=Ct}return X[$>>2]=z,0},memory:b,table:F},sn=function(){var R={a:xi};function N(z,V){var et=z.exports;d.asm=et,function(){if(Et--,d.monitorRunDependencies&&d.monitorRunDependencies(Et),Et==0&&Mt){var Ct=Mt;Mt=null,Ct()}}()}function M(z){N(z.instance)}function $(z){return(y||!A&&!_||typeof fetch!="function"?new Promise(function(V,et){V(me())}):fetch(ct,{credentials:"same-origin"}).then(function(V){if(!V.ok)throw"failed to load wasm binary file at '"+ct+"'";return V.arrayBuffer()}).catch(function(){return me()})).then(function(V){return WebAssembly.instantiate(V,R)}).then(z,function(V){w("failed to asynchronously prepare wasm: "+V),Rt(V)})}if(Et++,d.monitorRunDependencies&&d.monitorRunDependencies(Et),d.instantiateWasm)try{return d.instantiateWasm(R,N)}catch(z){return w("Module.instantiateWasm callback failed with error: "+z),!1}return function(){if(y||typeof WebAssembly.instantiateStreaming!="function"||$e(ct)||typeof fetch!="function")return $(M);fetch(ct,{credentials:"same-origin"}).then(function(z){return WebAssembly.instantiateStreaming(z,R).then(M,function(V){w("wasm streaming compile failed: "+V),w("falling back to ArrayBuffer instantiation"),$(M)})})}(),{}}();d.asm=sn;var Te,cr=d.___wasm_call_ctors=function(){return(cr=d.___wasm_call_ctors=d.asm.i).apply(null,arguments)},dr=(d.___em_js__emscriptenPushBuffer=function(){return(d.___em_js__emscriptenPushBuffer=d.asm.j).apply(null,arguments)},d._emscripten_bind_VoidPtr___destroy___0=function(){return(dr=d._emscripten_bind_VoidPtr___destroy___0=d.asm.k).apply(null,arguments)}),Vn=d._emscripten_bind_Container_Container_0=function(){return(Vn=d._emscripten_bind_Container_Container_0=d.asm.l).apply(null,arguments)},hr=d._emscripten_bind_Container_init_3=function(){return(hr=d._emscripten_bind_Container_init_3=d.asm.m).apply(null,arguments)},pr=d._emscripten_bind_Container_writeFrame_3=function(){return(pr=d._emscripten_bind_Container_writeFrame_3=d.asm.n).apply(null,arguments)},an=d._emscripten_bind_Container___destroy___0=function(){return(an=d._emscripten_bind_Container___destroy___0=d.asm.o).apply(null,arguments)};function fr(R){this.name="ExitStatus",this.message="Program terminated with exit("+R+")",this.status=R}function ln(R){function N(){Te||(Te=!0,d.calledRun=!0,H||(ot(ee),ot(Gt),d.onRuntimeInitialized&&d.onRuntimeInitialized(),function(){if(d.postRun)for(typeof d.postRun=="function"&&(d.postRun=[d.postRun]);d.postRun.length;)Se(d.postRun.shift());ot(vt)}()))}Et>0||(function(){if(d.preRun)for(typeof d.preRun=="function"&&(d.preRun=[d.preRun]);d.preRun.length;)Pt(d.preRun.shift());ot(bt)}(),Et>0||(d.setStatus?(d.setStatus("Running..."),setTimeout(function(){setTimeout(function(){d.setStatus("")},1),N()},1)):N()))}if(d._opus_encoder_create=function(){return(d._opus_encoder_create=d.asm.p).apply(null,arguments)},d._opus_encode_float=function(){return(d._opus_encode_float=d.asm.q).apply(null,arguments)},d._opus_encoder_ctl=function(){return(d._opus_encoder_ctl=d.asm.r).apply(null,arguments)},d._opus_encoder_destroy=function(){return(d._opus_encoder_destroy=d.asm.s).apply(null,arguments)},d._malloc=function(){return(d._malloc=d.asm.t).apply(null,arguments)},d._free=function(){return(d._free=d.asm.u).apply(null,arguments)},d._speex_resampler_init=function(){return(d._speex_resampler_init=d.asm.v).apply(null,arguments)},d._speex_resampler_destroy=function(){return(d._speex_resampler_destroy=d.asm.w).apply(null,arguments)},d._speex_resampler_process_interleaved_float=function(){return(d._speex_resampler_process_interleaved_float=d.asm.x).apply(null,arguments)},d.dynCall_vi=function(){return(d.dynCall_vi=d.asm.y).apply(null,arguments)},d.dynCall_v=function(){return(d.dynCall_v=d.asm.z).apply(null,arguments)},d.asm=sn,d.then=function(R){if(Te)R(d);else{var N=d.onRuntimeInitialized;d.onRuntimeInitialized=function(){N&&N(),R(d)}}return d},Mt=function R(){Te||ln(),Te||(Mt=R)},d.run=ln,d.preInit)for(typeof d.preInit=="function"&&(d.preInit=[d.preInit]);d.preInit.length>0;)d.preInit.pop()();function Ot(){}function ke(R){return(R||Ot).__cache__}function In(R,N){var M=ke(N),$=M[R];return $||(($=Object.create((N||Ot).prototype)).ptr=R,M[R]=$)}function yt(){throw"cannot construct a VoidPtr, no constructor in IDL"}function pt(){this.ptr=Vn(),ke(pt)[this.ptr]=this}return ln(),Ot.prototype=Object.create(Ot.prototype),Ot.prototype.constructor=Ot,Ot.prototype.__class__=Ot,Ot.__cache__={},d.WrapperObject=Ot,d.getCache=ke,d.wrapPointer=In,d.castObject=function(R,N){return In(R.ptr,N)},d.NULL=In(0),d.destroy=function(R){if(!R.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";R.__destroy__(),delete ke(R.__class__)[R.ptr]},d.compare=function(R,N){return R.ptr===N.ptr},d.getPointer=function(R){return R.ptr},d.getClass=function(R){return R.__class__},yt.prototype=Object.create(Ot.prototype),yt.prototype.constructor=yt,yt.prototype.__class__=yt,yt.__cache__={},d.VoidPtr=yt,yt.prototype.__destroy__=yt.prototype.__destroy__=function(){var R=this.ptr;dr(R)},pt.prototype=Object.create(Ot.prototype),pt.prototype.constructor=pt,pt.prototype.__class__=pt,pt.__cache__={},d.Container=pt,pt.prototype.init=pt.prototype.init=function(R,N,M){var $=this.ptr;R&&l(R)==="object"&&(R=R.ptr),N&&l(N)==="object"&&(N=N.ptr),M&&l(M)==="object"&&(M=M.ptr),hr($,R,N,M)},pt.prototype.writeFrame=pt.prototype.writeFrame=function(R,N,M){var $=this.ptr;R&&l(R)==="object"&&(R=R.ptr),N&&l(N)==="object"&&(N=N.ptr),M&&l(M)==="object"&&(M=M.ptr),pr($,R,N,M)},pt.prototype.__destroy__=pt.prototype.__destroy__=function(){var R=this.ptr;an(R)},d});l(t)==="object"&&l(s)==="object"?s.exports=h:(a=function(){return h}.apply(t,[]))===void 0||(s.exports=a)}).call(this,"/index.js",n(2),"/",n(3)(e))}])}},typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope?vl()():Kp.exports=vl();const QS=Ju(fA.exports);let mA;const Ds="audio/webm;codecs=opus";function tT(e){const t=Q(),n=Q(),r=Q(),i=Q(!1),o=e.mediaRecorder;Z(()=>{e.recordingState==="recording"?s():o.current&&e.recordingState===null&&(i.current=!0,o.current.stop())},[e.recordingState]);const s=async()=>{var l;n.current=Lc.create({scrollingWaveform:!0,scrollingWaveformWindow:10}),t.current=dA({...e.wavesurferOptions,interact:!1,barHeight:(l=e.wavesurferOptions.barHeight)!=null?l:4,plugins:[n.current],container:e.wavesurferContainer.current});const a=await n.current.startMic();MediaRecorder&&MediaRecorder.isTypeSupported(Ds)?o.current=new MediaRecorder(a,{mimeType:Ds}):typeof window!="undefined"&&(o.current=new ZS(a,{mimeType:Ds},{encoderWorkerFactory:()=>new QS,WebMOpusEncoderWasmPath:mA})),o.current.onstart=()=>r.current=Date.now(),o.current.ondataavailable=c=>{var u;if(!i.current){const h=Date.now(),d=Math.floor((h-r.current)/1e3),p=new File([c.data],`talkjs_audio_message_${h}_${d}.webm`,{type:"audio/webm"});e.onSendRecording(p,d)}i.current=!1,o.current=void 0,(u=t.current)==null||u.destroy(),t.current=void 0,n.current=void 0},o.current.start()};return null}function EA(e){const t=he(),n=At(),r=on(),i=dt(n.referencedMessage$),o=dt(n.state$.userPermissions),s=xo(),{sendMessage:a}=Mg(),{voiceRecorder:l,recordVoiceMessage:c,voiceRecorderControlsProps:u}=function(){const p=At(),f=Li(),m=Ue({...Dl}),{state:E,duration:A,recordingUrl:_,uploadState:g,fileToken:D}=dt(m),S=Q(void 0),I=Q(null),T=Q(),C=it(()=>{m.assign({state:"recording",duration:0}),T.current=setInterval(()=>{m.duration.set(P=>P+1)},1e3)},[m]),O=it(()=>{var P;T.current&&(clearInterval(T.current),T.current=void 0),(P=S.current)==null||P.stop()},[]),v=it(()=>{T.current&&(clearInterval(T.current),T.current=void 0),m.assign(Dl)},[m]),y=it((P,w)=>{const F=URL.createObjectURL(new Blob([P])),H=P.size+","+P.name;p.state$.localFileBlobUrls.child(p.state$.currentConversationId.peek()).child(H).set({url:F,fetching:!1});const B={duration:w,filename:P.name};p.latestFileUpload={type:"voice",file:P,metadata:B,temporaryBlobUrl:F},m.assign({state:"previewing",uploadState:"pending",recordingUrl:F+"?name="+P.name}),f.uploadVoice(P,B).then(K=>{m.assign({uploadState:"done",fileToken:K})})},[f,m,p]),b=it(()=>{D&&f.sendFileMessage({fileToken:D}),m.assign(Dl)},[f,D,m]);return{voiceRecorder:at(()=>{if(!E)return;const P={state:E,duration:A,recordingUrl:_,uploadState:g,stop:O,cancel:v,send:b};return iA.set(P,I),P},[E,A,_,g,O,v,b]),recordVoiceMessage:C,voiceRecorderControlsProps:at(()=>({onSendRecording:y,recordingState:E,mediaRecorder:S,wavesurferOptions:$S,wavesurferContainer:I}),[y,E])}}(),h=dt(Ue(()=>{const p=s.state$.get();return e.editMessageId===void 0?new Md(p,a,e.attachFile,e.shareLocation,s.toggleEmojiPicker,c):new Md(p,e.onEditMessage,()=>{},()=>{},()=>{},()=>{})},[s.state$,s.toggleEmojiPicker,e.attachFile,e.editMessageId,e.onEditMessage,e.shareLocation,a])),d=it(p=>s.setText(p),[s]);return function({appId:p,conversationId:f,meId:m,setText:E,enabled:A}){const _=at(()=>h_(f,m,p),[p,f,m]);Z(()=>{var D;if(!_||!A)return;const g=(D=JSON.parse(_e.getItem(au)||"{}")[_])!=null?D:"";E(g)},[_,A,E])}({appId:r.app.id,conversationId:r.conversation.id,meId:r.currentUser.id,setText:d,enabled:!e.editMessageId}),L(Nm.Provider,{value:{onClose:()=>s.toggleEmojiPicker(!1),onEmojiSelected:p=>s.selectEmoji(p)},children:[L(tT,{...u}),L(t.MessageField,{common:r,referencedMessage:i,permissions:o,editor:h,voiceRecorder:l,editMessageId:e.editMessageId})]})}function eT({message:e}){const t=At(),n=Li(),r=dt(t.state$.editingMessageId),i=at(()=>dn(e.content[0].children),[e]),o=Ue({isEmpty:i.length===0,isTyping:!1,atTextLimit:!1,characterCount:i.length,showEmojiPicker:!1,suggestEmojiQuery:void 0,suggestMentionQuery:void 0}),s=at(()=>new c_(o,t.device$,t.state$.userPermissions),[o,t]),a=it(async()=>{const l=s.state$;if(l.isEmpty.peek()||l.atTextLimit.peek())return;const c=s.getText();c&&await n.editMessage(e.id,{text:c}),t.state$.editingMessageId.set(null)},[t,n,s,e.id]);return Z(()=>{s.onEnter=a},[s,a]),Z(()=>{s.focus(),s.setText(dn(e.content[0].children,!0))},[s,e]),L(Sm.Provider,{value:s,children:L(EA,{editMessageId:r,onEditMessage:a})})}function nT(e){const t=he(),n=on();return L(t.MessageDivider,{common:n,...e})}function rT({message:e}){const t=he(),n=At(),r=on(),[i,o]=ut("sent");return mo(s=>{if(e.id.startsWith("ephemeral-"))return o("sending");const a=n.state$.currentConversation.everyoneReadUntil.get();return a!==void 0?e.createdAt<=a?o("everyoneRead"):o("sent"):void 0}),L(t.Message,{common:r,message:e,messageStatus:i,permissions:n.messagePermissions$(e).get()})}function iT(){const e=he(),t=on();return L(e.BeforeMessages,{common:t})}function oT(){const e=he(),t=on();return L(e.AfterMessages,{common:t})}function sT(e){const t=At(),n=wi();Z(()=>function(r,i,o){const s=r.state$.currentConversation;let a=!1;function l(){if(!a){const E=r.state$.currentConversationId.peek();mt.defined(E),i.conversation(E).markAsRead()}}function c(){r.newMessageMarker$.peek()||r.newMessageMarker$.set(s.readUntil.peek())}function u(){s.isUnread.get()&&s.unreadMessageCount.peek()===0&&(a=!0,c())}let h=null;function d(){var D;const E=r.state$.currentConversation.lastMessage.id.get(),A=r.state$.currentConversationId.peek(),_=A!==h;if(h=A,_&&(p.stop(),a=!1,r.newMessageMarker$.set(void 0)),!E||!A)return;s.isUnread.peek()&&(o()?(_&&c(),l()):(c(),p.start())),((D=s.lastMessage.sender)==null?void 0:D.id.peek())===r.extUserId$.peek()&&(r.newMessageMarker$.set(void 0),a=!1)}const p={handle:void 0,start(){this.handle||(this.handle=setInterval(()=>this.tick(),2e3))},tick(){o()&&(l(),this.stop())},stop(){clearInterval(this.handle),this.handle=void 0}};window.__talkjsE2E&&(window.__talkjsE2E.foregroundCheck=()=>{mt.defined(p.handle),p.tick()});const f=We(u),m=We(d);return()=>{r.newMessageMarker$.set(void 0),f(),m(),p.stop()}}(t,n,e),[t,n,e])}function aT({conversationId:e}){const t=At(),n=Li(),r=Q(!0),i=Q(null),o=dt(()=>!!t.state$.messages.child(e).loadedAll.get());sT(it(()=>{if(!i.current)return!1;const a=!document.hidden,l=function(h){if(h.checkVisibility)return h.checkVisibility({contentVisibilityAuto:!0,opacityProperty:!0,visibilityProperty:!0,checkOpacity:!0,checkVisibilityCSS:!0});{const d=window.getComputedStyle(h),p=d.visibility,f=d.opacity;return!(h.getClientRects().length===0||p==="hidden"||f==="0")}}(i.current),c=i.current.getBoundingClientRect(),u=c.top<window.innerHeight&&c.bottom>0&&c.left<window.innerWidth&&c.right>0;return a&&l&&u},[])),ve(()=>{r.current=i.current.scrollTop>-30}),Z(()=>{r.current&&(i.current.scrollTop=0)});const s=it(a=>{const l=a.currentTarget,c=l.scrollHeight-l.clientHeight+l.scrollTop,u=t.messageSubscriptions[e];c<90&&u&&u.loadMore(10)},[t.messageSubscriptions,e]);return L("div",{className:"t-message-list",ref:i,"t-menu-boundary":"",onScroll:s,children:[L(oT,{}),L(Hl,{each:t.chatItems$,children:a=>L("div",{className:"t-message-group","t-group-type":a.type.get(),children:L(Hl,{each:a.items,item:lT,itemProps:{controller:n,extConversationId:e}})},a.id.get())}),o&&L(iT,{})]})}function lT({item$:e}){const t=At(),n=dt(e),r=dt(t.state$.editingMessageId);return n instanceof cs?L(nT,{timestamp:n.timestamp,isReadMarker:n.isReadMarker,isDayMarker:n.isDayMarker}):r===n.id?L(eT,{message:n}):L(rT,{message:n})}typeof window=="undefined"||MediaRecorder&&MediaRecorder.isTypeSupported(Ds)||async function(){return(await uu(v_["opus-media-recorder-wasm"])).default}().then(e=>mA=e);const uT=new Set(["ByV39eoc","B1FxElnd","aW4c49tW","qGfuGtx","SbERe5ee","ilaVEa15","FOlWOSaH","dao5gGmT","DLUgAhzL","fqXFumr6","FtiWHMYT","66iWOyWt","1375amYi","mWbJgzpt","jO7GqAvL","SkFIKxo5","2z4ILc3y","aDr8oPL1","Hku1c4Pt"]);function Ta({appId:e,chatboxState:t}){const n=e.charAt(0)==="t"||uT.has(e);return Z(()=>{switch(t.type){case"auth-failed":tn.error("Could not authenticate user. Check if you are authenticating correctly.");break;case"unknown-user":tn.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":tn.error(t.error);break;case"wrong-app-id":tn.error(`Could not find given appId: "${t.appId}". You can find your appId on https://talkjs.com/dashboard.`);break;case"server-error":break;default:mt.never(t)}},[t]),L("div",{className:"t-panel t-error-panel",children:[L("span",{className:"t-heading",children:"Something went wrong."}),L("p",{children:"Please reload the page and try again."}),L("p",n?{style:{fontStyle:"italic"},children:["Developer note: check your browser's developer tools console for messages that may help solve the problem.",L("br",{}),L("small",{children:"This message only shows up in test mode."})]}:{className:"text-balance",children:"If things keep not working, do not hesitate to get in touch with us."})]})}function cT(){return L("div",{className:"t-panel t-error-panel",children:L("span",{className:"t-heading",style:{fontStyle:"italic"},children:dt(At().t$).CHAT_NOT_FOUND})})}function _A(){return L("div",{className:"t-panel t-loading-panel",children:L(Tc,{})})}function AA(){const e=dt(At().t$);return L("div",{className:"t-panel t-error-panel",children:[L("span",{className:"t-heading",style:{fontStyle:"italic"},children:e.AUTH_EXPIRED_OVERLAY_TITLE}),L("p",{children:e.AUTH_EXPIRED_OVERLAY_DESCRIPTION})]})}const dT=()=>!0;async function Pc(e,t,{initialDelay:n,maxDelay:r,log:i,shouldRetry:o=dT}){return t().catch(async s=>{if(i&&i(`[TalkJS] Retries left: ${e}. Error: ${JSON.stringify(s)}.`),e===0||!await o(s))throw s;const a=1e3*n*1.2,l=Math.min(1e3*r,a),c=l*(1-(u=.05)+2*Math.random()*u);var u,h;return(h=c,h<=0?Promise.resolve():new Promise(d=>setTimeout(d,h))).then(()=>Pc(e-1,t,{initialDelay:c/1e3,maxDelay:r,log:i,shouldRetry:o}))})}function Co(){const e={},t=new Promise(function(n,r){e.resolve=n,e.reject=r});return e.promise=t,e}function hT(e,t,n){const{beforeBrowserPermissionPrompt:r,onMissingBrowserPermissionCallback:i}=ar(Tm);return it(async()=>{function o(u){u==="denied"&&i({type:e})}if(!r||!await async function(u){if(!("permissions"in navigator))return!1;try{return(await navigator.permissions.query({name:u})).state==="prompt"}catch(h){return!1}}(e))return t(u=>{o(u)});const s=Co(),a=Co(),l={type:e,showPrompt:async()=>(a.resolve({cancelled:!1}),await s.promise),cancel:()=>{a.resolve({cancelled:!0})}};try{r(l)}catch(u){tn.error("Your beforeBrowserPermissionPrompt callback threw an error: ",u),a.resolve({cancelled:!0})}const{cancelled:c}=await a.promise;return c?void 0:t(u=>{s.resolve(u),o(u)})},[r,i,e,t,...n])}function pT({onClose:e}){const t=At(),n=Li(),r=wi(),[i,o]=ut(null),s=it(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:c,upload:u}=await async function(m,E){const A=m.name;if(function(S){return/\.(mp4|ts|mov|webm|ogv)$/i.test(S)}(m.name)){const S=await Sl("video",m,C=>({width:C.videoWidth,height:C.videoHeight,duration:C.duration,filename:A})),I=E.uploadVideo(m,S),T=function(C){switch(C.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:I,upload:{type:"video",file:m,metadata:S,temporaryBlobUrl:URL.createObjectURL(new Blob([m],{type:T}))}}}if(function(S){return/\.(mp3|m4a|ogg|oga|opus|flac|wav)$/i.test(S)}(m.name)){const S=await Sl("audio",m,I=>({duration:I.duration,filename:A}));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 Sl("img",m,I=>({width:I.naturalWidth,height:I.naturalHeight,filename:A}));return{uploadPromise:E.uploadImage(m,S),upload:{type:"image",file:m,metadata:S,temporaryBlobUrl:URL.createObjectURL(new Blob([m]))}}}const _={filename:A},g=E.uploadFile(m,_),D=URL.createObjectURL(new Blob([m]));return{uploadPromise:g,upload:{type:"file",file:m,metadata:_,temporaryBlobUrl:D}}}(l,r),h=u.file.size+","+u.file.name;t.state$.localFileBlobUrls.child(t.state$.currentConversationId.peek()).child(h).set({url:u.temporaryBlobUrl,fetching:!1}),t.latestFileUpload=u;const d=Co(),p={upload:u,closePreview:d.resolve,uploaded:!1,errored:!1};let f;o(p);try{f=await qp(c,d.promise),o({...p,uploaded:!0})}catch(m){if(m===Tu)return;tn.warn("File upload failed",m.toString()),o(E=>({...E,errored:!0}))}if(await d.promise==="cancel")return;mt.defined(f),n.sendFileMessage({fileToken:f})}finally{e(),o(null)}},[n,r,o,t,e]),a=hT("geolocation",async l=>{try{const c=Co(),u={upload:{type:"location",location:void 0},uploaded:!1,closePreview:c.resolve,errored:!1};o(u);const{permissionResult:h,location:d}=await qp(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"})})}),c.promise);if(l(h),!d||(o({...u,upload:{type:"location",location:d},uploaded:!0}),await c.promise==="cancel"))return;n.sendLocationMessage({location:d})}catch(c){if(c===Tu)return;throw c}finally{e(),o(null)}},[n,o,e]);return{attachFile:s,shareLocation:a,uploadState:i}}const Tu=Symbol("cancelled");function qp(e,t){return Promise.race([e,t.then(()=>Promise.reject(Tu))])}async function Sl(e,t,n){const r=document.createElement(e);try{return r.src=URL.createObjectURL(t),await new Promise((i,o)=>{const s=e==="img"?"load":"loadedmetadata";r.addEventListener(s,()=>{try{i(n(r))}catch(a){o(a)}},{once:!0})})}finally{URL.revokeObjectURL(r.src)}}function gA({children:e,className:t,...n}){return L("div",{className:"t-attach-overlay "+t,...n,children:e})}function fT({uploadState:e}){const{uploaded:t,errored:n}=e;$o(()=>e.closePreview("cancel"),".t-upload-preview");const r=Q(null);Z(()=>{t&&r.current.focus()},[t]);const i=dt(At().t$);return L(gA,{className:"t-upload-preview",children:L("div",{className:"t-preview",children:[!n&&L(mT,{upload:e.upload,uploaded:t}),n&&L("div",{className:"t-error-row",children:i.UPLOAD_ERROR}),L("div",{className:"t-send-row",children:[L("button",{className:"t-cancel",onClick:()=>e.closePreview("cancel"),children:i.CANCEL}),!n&&t&&L("button",{className:"t-confirm-send test__confirm-upload-button",onClick:()=>e.closePreview("send"),ref:r,children:i.SEND_BUTTON_TEXT})]})]})})}function mT({upload:e,uploaded:t}){const n=dt(At().t$);return e.type!=="location"?L(qt,{children:[L(_T,{upload:e}),L(AT,{upload:e,uploaded:t,t:n})]}):t?L(ET,{location:e.location}):L("div",{className:"t-loading",children:L(Tc,{})})}function ET({location:e}){const{imageUrl:t,linkUrl:n}=wc(e);return L("a",{href:n,target:"_blank",rel:"noreferrer",className:"t-location-upload-preview",style:{background:`url(${JSON.stringify(t)}) center center / cover no-repeat`}})}const _T=Un(function({upload:e}){let t=null;const n=e.file;if(e.type==="video"){const r=/[.]ts/i.test(n.name)?"mpegts":"native";t=L("div",{className:"video-container",children:L(gT,{src:e.temporaryBlobUrl,videoType:r,playsInline:!0,controls:!0,preload:"auto"})})}else e.type==="image"?t=L("div",{className:"t-img-container",children:L("img",{src:e.temporaryBlobUrl})}):e.type==="audio"&&(t=L(zo,{src:e.temporaryBlobUrl,filename:n.name}));return t}),AT=Un(function({uploaded:e,upload:t,t:n}){let r;r=e?t.metadata.filename:n.UPLOAD_IN_PROGRESS;let i="",o="";return t.type==="file"&&(i="is-file",e&&(o="file-block")),L("div",{className:`t-filename-row ${i}`,children:L("div",{className:o,children:r})})});function gT(e){const{videoType:t,...n}=e;return L("video",{...n})}function DT(){var o;const e=he(),t=At(),n=on(),r=(o=dt(()=>t.state$.isUserConnected.child(t.state$.currentConversationId.get())))!=null?o:{},i=dt(t.state$.userPermissions);return L(e.ChatHeader,{common:n,isUserConnected:r,permissions:i})}function OT(){const e=he(),t=on();return L(e.MessageListHeader,{common:t})}function vT(){const e=he(),t=on();return L(e.MessageListFooter,{common:t})}function ST(){const e=he(),t=on();return L(e.NoConversationSelected,{common:t})}function TT({appId:e,chatHeaderVisible:t,messageFieldVisible:n}){const r=xo(),i=function(){const m=At(),E=Ue(()=>{const g=m.errors$.get(),D=m.authTokenState$.get(),S=m.state$.loadingConversationId.get(),I=m.state$.currentConversationId.get();return g.serverError?"server-error":g.wrongAppId?"wrong-app-id":D==="loading"||D==="idle"?"loading-token":D==="invalid"?"invalid-token":D==="expired"?"expired-token":D==="valid"?g.unknownUser?"unknown-user":S&&m.state$.unknownConversations.child(S).get()?"loading-conv-failed":m.canRenderUi(S)||I!==S&&m.canRenderUi(I)?"loaded":"loading-data":void mt.unreachable()}),A=Ue({type:"loading"});mo(g=>{const D=E.get(),S=m.state$.currentConversationId.get(),I=m.extUserId$.get(),T=m.appId$.get();function C(O){A.set({type:"loading"});const v=setTimeout(()=>{A.set(O)},5e3);return()=>clearTimeout(v)}switch(D){case"invalid-token":A.set({type:"auth-failed"});break;case"expired-token":A.set({type:"expired-token"});break;case"wrong-app-id":A.set({type:"wrong-app-id",appId:T});break;case"server-error":A.set({type:"server-error"});break;case"loading-data":case"loading-token":A.set({type:"loading"});break;case"loaded":A.set({type:"loaded",conversationId:S,userId:I});break;case"loading-conv-failed":g.onCleanup=C({type:"inaccessible-conversation",userId:I,conversationId:S});break;case"unknown-user":g.onCleanup=C({type:"unknown-user",userId:I});break;default:mt.never(D)}});const _=Ue({type:"loading"});return mo(g=>{if(A.type.get()==="loading"){_.set({type:"invisible-loading"});const D=setTimeout(()=>{_.set({type:"loading"})},1e3);g.onCleanup=()=>{clearTimeout(D)}}else _.set(A.get())}),dt(_)}(),{attachFile:o,shareLocation:s,uploadState:a}=pT({onClose:()=>r.focus()});Z(()=>{r.uploadFile=o},[r,o]);const[l,c]=ut(!1),u=At(),h=dt(()=>u.app$.get()?u.state$.userPermissions.canShareFile.get():void 0),d=it(m=>{o(m.dataTransfer.files[0]),m.preventDefault(),c(!1)},[o]),p=it(m=>{m.preventDefault(),c(!0)},[]),f=it(m=>{m.preventDefault(),c(!1)},[]);return Rc(),i.type==="invisible-loading"?L(qt,{}):i.type==="loading"?L(_A,{}):i.type==="inaccessible-conversation"?L(cT,{}):i.type==="unknown-user"||i.type==="auth-failed"||i.type==="wrong-app-id"||i.type==="server-error"||i.type==="unexpected-error"?L(Ta,{appId:e,chatboxState:i}):i.type=="expired-token"?L(AA,{}):i.type==="loaded"?i.conversationId===null?L(ST,{}):L("div",{className:"t-chatbox-content",onDragOver:h?p:void 0,onDragLeave:h?f:void 0,onDrop:h?d:void 0,"t-menu-boundary":"root",children:[t&&L(DT,{}),L(OT,{}),L(aT,{conversationId:i.conversationId}),L(vT,{}),n&&L(EA,{attachFile:o,shareLocation:s}),a&&L(fT,{uploadState:a}),l&&L(gA,{className:"t-drop-overlay",children:L(js,{type:"attach"})})]}):L(qt,{})}const ss=new Uint8Array(31);function DA(){if(globalThis.crypto!==void 0)crypto.getRandomValues(ss);else for(let t=0;t<ss.length;t++)ss[t]=Math.floor(256*Math.random());let e=0;return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,t=>(+t^ss[e++]&15>>+t/4).toString(16))}class RT{constructor(t,n,r,i,o,s,a){this.store=t,this.talkSession=n,this.editorInternals=r,this.onSendMessage=i,this.onDeleteMessage=o,this.onMessageAction=s,this.onBackButtonClick=a}async deleteMessage(t){const n=this.store.state$.currentConversationId.peek();if(!n)return;const r=this.store.state$.messages.child(n).lookup.child(t).peek(),i=this.talkSession.conversation(n).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$.currentConversationId.peek()&&this.store.state$.editingMessageId.set(t)}async editMessage(t,n){const r=this.store.state$.currentConversationId.peek();r&&await this.talkSession.conversation(r).message(t).edit(n)}setReferencedMessage(t){this.store.state$.currentConversationId.peek()&&(this.store.state$.referencedMessageId.set(t),setTimeout(()=>this.editorInternals.focus({skipProseMirrorStuff:!0}),100))}async sendMessage(t){const n=this.store.state$.currentConversationId.peek();if(!n)return;const r=await async function(s,a){var m,E,A,_,g;const l=s.state$.currentConversationId.peek(),c=s.state$.messages.child(l),u=typeof a.referencedMessage=="string"?c.lookup.child(a.referencedMessage).peek():await((E=(m=a.referencedMessage)==null?void 0:m.get())!=null?E:null),h=u&&{...u,type:"UserMessage",sender:u.sender,referencedMessageId:(_=(A=u.referencedMessage)==null?void 0:A.id)!=null?_:null};h&&delete h.referencedMessage;const d=s.latestFileUpload,p="content"in a?[Jp(d,a.content[0])]:[IT(a.text)],f="text"in a?a.text:sA(a.content.map(D=>Jp(d,D)),{});return{id:"ephemeral-"+DA(),type:"UserMessage",sender:s.currentUser$.peek(),createdAt:Date.now(),editedAt:null,custom:(g=a.custom)!=null?g:{},origin:"web",referencedMessage:h,reactions:[],content:p,plaintext:f}}(this.store,t);this.store.state$.ephemeralMessages.child(n).child(r.id).set(r);const i=Co();this.store.readyForNewMessagesPromise=i.promise;const o=await this.talkSession.conversation(n).send(t);this.store.state$.ephemeralMessageIdMapping.child(n).child(o.id).set(r.id),i.resolve(),this.onSendMessage({message:await o.get(),currentUser:this.store.currentUser$.peek(),conversation:this.store.state$.currentConversation.peek()})}sendFileMessage(t){const n={type:"file",fileToken:t.fileToken};return this.sendMessage({content:[n],custom:t.custom})}async uploadVoice(t,n){return await this.talkSession.uploadVoice(t,n)}sendLocationMessage(t){const n={type:"location",latitude:t.location.latitude,longitude:t.location.longitude};return this.sendMessage({content:[n],custom:t.custom})}markAsTyping(){const t=this.store.state$.currentConversationId.peek();t&&this.talkSession.conversation(t).markAsTyping()}async toggleReaction(t,n){typeof n!="string"&&(n=n.emoji);const r=this.store.state$.currentConversationId.peek();if(!r)return;const i=this.store.state$.messages.child(r).lookup.child(t).peek().reactions.find(s=>s.emoji===n),o=this._getReactionRef(t,n);i!=null&&i.currentUserReacted?await o.remove():await o.add()}async addReaction(t,n){this.store.state$.currentConversationId.peek()&&await this._getReactionRef(t,n).add()}triggerMessageAction(t,n,r){const i=this.store.state$.currentConversation.peek();i&&(typeof t=="string"&&(t=this.store.state$.messages.child(i.id).lookup.child(t).peek()),this.onMessageAction({action:n,params:r,message:t,conversation:i}))}clickBackButton(){const t=this.store.currentUser$.peek();mt.defined(t),this.onBackButtonClick({currentUser:t})}storeDraft(t){const n=this.store.state$.currentConversationId.peek(),r=this.store.currentUser$.peek(),i=this.store.appId$.peek();n&&r&&i&&s0(n,r.id,i,t)}_getReactionRef(t,n){const r=this.store.state$.currentConversationId.peek();return this.talkSession.conversation(r).message(t).reaction(n)}}const IT=e=>({type:"text",children:o_(e)});function Jp(e,t){switch(t.type){case"text":case"location":return t;case"file":return function(n,r){return{type:"file",subtype:n.type==="file"?void 0:n.type,...n.metadata,size:n.file.size,filename:n.file.name,fileToken:r.fileToken,url:n.temporaryBlobUrl}}(e,t)}}class Tl extends Error{constructor(t,n){const r=function(i){if(typeof i=="string")return i;if(Array.isArray(i))return i.join(`
|
|
105
|
+
`);try{return JSON.stringify(i)}catch(o){return String(i)}}(t);super(r),this.userMessage=n!=null?n:r,Object.setPrototypeOf&&Object.setPrototypeOf(this,new.target.prototype)}}const No=console;class yT{constructor(t,n,r,i){this.apiUrls=t,this.appId=n,this.sessionId=r,this.authProvider=i,this._lastPutPromise=Promise.resolve()}async get(t,n={}){const r=this.endpointUrl(t,n),i=await zi(()=>this.fetchWithReauth(r),{retries:11});return await this.handleResponse(i,r)}async queuedPut(t,n){await this._lastPutPromise;const r=zi(()=>this._doPut(t,n));return this._lastPutPromise=r,r}put(t,n,r){const i=()=>this._doPut(t,n);return r?Zp(i,r):zi(i,{retries:5})}post(t,n,r){const i=()=>this._doPost(t,n);return r?Zp(i,r):zi(i,{retries:5})}delete(t,n={}){return zi(()=>this._doDelete(t,n),{retries:11})}endpointUrl(t,n={}){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(n))r.searchParams.set(i,o);return r}async _doPut(t,n){const r=this.endpointUrl(t),i=await this.fetchWithReauth(r,{method:"PUT",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doPost(t,n){const r=this.endpointUrl(t),i=await this.fetchWithReauth(r,{method:"POST",body:JSON.stringify(n)});return await this.handleResponse(i,r)}async _doDelete(t,n){const r=this.endpointUrl(t,n),i=await this.fetchWithReauth(r,{method:"DELETE"});return await this.handleResponse(i,r)}async handleResponse(t,n){if(t.status>=300){if(t.status===404)throw Bl.error(`[${this.appId}][BackendRestClient] Couldn't find resource.`),new Tl("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 Bl.error(`[${this.appId}][BackendRestClient] Couldn't authenticate ${n} with token ${r}.`),new Tl("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 Tl(r)}{const r=await t.text();throw new Error(`Got non-success response (${r}) from the server for url: ${n}.`)}}return await t.json()}async fetchWithReauth(t,n){function r(s){const a={Accept:"application/json","Content-Type":"application/json",Authorization:`Bearer ${s}`};return fetch(t,{...n,headers:a})}const i=await this.authProvider.getToken(),o=await r(i);return o.status!==401?o:(No.error(`401 error from ${n==null?void 0:n.method} ${t}, ${i}`),this.authProvider.refreshToken(),r(await this.authProvider.getToken()))}}function OA(e){return!e.userMessage}function zi(e,{retries:t=30}={}){return Pc(t,e,{shouldRetry:OA,log:No.warn.bind(No),maxDelay:30,initialDelay:.2})}async function Zp(e,t){try{return await e()}catch(r){if(!OA(r))throw r}let n=!1;return t.then(()=>{n=!0}),Pc(1e3,e,{initialDelay:.2,maxDelay:30,shouldRetry:()=>!n,log:No.warn.bind(No)})}var Ru={exports:{}};(function(e,t){var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,l=/^(?:0|[1-9]\d*)$/,c={};c["[object Float32Array]"]=c["[object Float64Array]"]=c["[object Int8Array]"]=c["[object Int16Array]"]=c["[object Int32Array]"]=c["[object Uint8Array]"]=c["[object Uint8ClampedArray]"]=c["[object Uint16Array]"]=c["[object Uint32Array]"]=!0,c[i]=c["[object Array]"]=c["[object ArrayBuffer]"]=c["[object Boolean]"]=c["[object DataView]"]=c["[object Date]"]=c["[object Error]"]=c[o]=c["[object Map]"]=c["[object Number]"]=c[s]=c["[object RegExp]"]=c["[object Set]"]=c["[object String]"]=c["[object WeakMap]"]=!1;var u=typeof Ko=="object"&&Ko&&Ko.Object===Object&&Ko,h=typeof self=="object"&&self&&self.Object===Object&&self,d=u||h||Function("return this")(),p=t&&!t.nodeType&&t,f=p&&e&&!e.nodeType&&e,m=f&&f.exports===p,E=m&&u.process,A=function(){try{var k=f&&f.require&&f.require("util").types;return k||E&&E.binding&&E.binding("util")}catch(x){}}(),_=A&&A.isTypedArray,g,D=Array.prototype,S=Function.prototype,I=Object.prototype,T=d["__core-js_shared__"],C=S.toString,O=I.hasOwnProperty,v=(g=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+g:"",y=I.toString,b=C.call(Object),P=RegExp("^"+C.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),w=m?d.Buffer:void 0,F=d.Symbol,H=d.Uint8Array;w&&w.allocUnsafe;var B,K,W=(B=Object.getPrototypeOf,K=Object,function(k){return B(K(k))}),X=Object.create,G=I.propertyIsEnumerable,ht=D.splice,tt=F?F.toStringTag:void 0,rt=function(){try{var k=fr(Object,"defineProperty");return k({},"",{}),k}catch(x){}}(),ot=w?w.isBuffer:void 0,bt=Math.max,ee=Date.now,Gt=fr(d,"Map"),vt=fr(Object,"create"),Pt=function(){function k(){}return function(x){if(!V(x))return{};if(X)return X(x);k.prototype=x;var j=new k;return k.prototype=void 0,j}}();function Se(k){var x=-1,j=k==null?0:k.length;for(this.clear();++x<j;){var q=k[x];this.set(q[0],q[1])}}function Et(k){var x=-1,j=k==null?0:k.length;for(this.clear();++x<j;){var q=k[x];this.set(q[0],q[1])}}function Mt(k){var x=-1,j=k==null?0:k.length;for(this.clear();++x<j;){var q=k[x];this.set(q[0],q[1])}}function Rt(k){var x=this.__data__=new Et(k);this.size=x.size}function fe(k,x){var j=R(k),q=!j&&pt(k),ft=!j&&!q&&M(k),Bt=!j&&!q&&!ft&&Ct(k),kt=j||q||ft||Bt,Ee=kt?function(ne,Cn){for(var Ie=-1,Wr=Array(ne);++Ie<ne;)Wr[Ie]=Cn(Ie);return Wr}(k.length,String):[],Re=Ee.length;for(var Ut in k)kt&&(Ut=="length"||ft&&(Ut=="offset"||Ut=="parent")||Bt&&(Ut=="buffer"||Ut=="byteLength"||Ut=="byteOffset")||ln(Ut,Re))||Ee.push(Ut);return Ee}function $e(k,x,j){(j!==void 0&&!yt(k[x],j)||j===void 0&&!(x in k))&&It(k,x,j)}function ct(k,x,j){var q=k[x];O.call(k,x)&&yt(q,j)&&(j!==void 0||x in k)||It(k,x,j)}function me(k,x){for(var j=k.length;j--;)if(yt(k[j][0],x))return j;return-1}function It(k,x,j){x=="__proto__"&&rt?rt(k,x,{configurable:!0,enumerable:!0,value:j,writable:!0}):k[x]=j}Se.prototype.clear=function(){this.__data__=vt?vt(null):{},this.size=0},Se.prototype.delete=function(k){var x=this.has(k)&&delete this.__data__[k];return this.size-=x?1:0,x},Se.prototype.get=function(k){var x=this.__data__;if(vt){var j=x[k];return j===n?void 0:j}return O.call(x,k)?x[k]:void 0},Se.prototype.has=function(k){var x=this.__data__;return vt?x[k]!==void 0:O.call(x,k)},Se.prototype.set=function(k,x){var j=this.__data__;return this.size+=this.has(k)?0:1,j[k]=vt&&x===void 0?n:x,this},Et.prototype.clear=function(){this.__data__=[],this.size=0},Et.prototype.delete=function(k){var x=this.__data__,j=me(x,k);return!(j<0)&&(j==x.length-1?x.pop():ht.call(x,j,1),--this.size,!0)},Et.prototype.get=function(k){var x=this.__data__,j=me(x,k);return j<0?void 0:x[j][1]},Et.prototype.has=function(k){return me(this.__data__,k)>-1},Et.prototype.set=function(k,x){var j=this.__data__,q=me(j,k);return q<0?(++this.size,j.push([k,x])):j[q][1]=x,this},Mt.prototype.clear=function(){this.size=0,this.__data__={hash:new Se,map:new(Gt||Et),string:new Se}},Mt.prototype.delete=function(k){var x=an(this,k).delete(k);return this.size-=x?1:0,x},Mt.prototype.get=function(k){return an(this,k).get(k)},Mt.prototype.has=function(k){return an(this,k).has(k)},Mt.prototype.set=function(k,x){var j=an(this,k),q=j.size;return j.set(k,x),this.size+=j.size==q?0:1,this},Rt.prototype.clear=function(){this.__data__=new Et,this.size=0},Rt.prototype.delete=function(k){var x=this.__data__,j=x.delete(k);return this.size=x.size,j},Rt.prototype.get=function(k){return this.__data__.get(k)},Rt.prototype.has=function(k){return this.__data__.has(k)},Rt.prototype.set=function(k,x){var j=this.__data__;if(j instanceof Et){var q=j.__data__;if(!Gt||q.length<199)return q.push([k,x]),this.size=++j.size,this;j=this.__data__=new Mt(q)}return j.set(k,x),this.size=j.size,this};var xi=function(k,x,j){for(var q=-1,ft=Object(k),Bt=j(k),kt=Bt.length;kt--;){var Ee=Bt[++q];if(x(ft[Ee],Ee,ft)===!1)break}return k};function sn(k){return k==null?k===void 0?"[object Undefined]":"[object Null]":tt&&tt in Object(k)?function(x){var j=O.call(x,tt),q=x[tt];try{x[tt]=void 0;var ft=!0}catch(kt){}var Bt=y.call(x);return ft&&(j?x[tt]=q:delete x[tt]),Bt}(k):function(x){return y.call(x)}(k)}function Te(k){return et(k)&&sn(k)==i}function cr(k){return!(!V(k)||function(x){return!!v&&v in x}(k))&&($(k)?P:a).test(function(x){if(x!=null){try{return C.call(x)}catch(j){}try{return x+""}catch(j){}}return""}(k))}function dr(k){if(!V(k))return function(ft){var Bt=[];if(ft!=null)for(var kt in Object(ft))Bt.push(kt);return Bt}(k);var x=Ot(k),j=[];for(var q in k)(q!="constructor"||!x&&O.call(k,q))&&j.push(q);return j}function Vn(k,x,j,q,ft){k!==x&&xi(x,function(Bt,kt){if(ft||(ft=new Rt),V(Bt))(function(Re,Ut,ne,Cn,Ie,Wr,Fi){var un=ke(Re,ne),ye=ke(Ut,ne),Bc=Fi.get(ye);if(Bc)return void $e(Re,ne,Bc);var we=Wr?Wr(un,ye,ne+"",Re,Ut,Fi):void 0,Bi=we===void 0;if(Bi){var Ra=R(ye),Ia=!Ra&&M(ye),Uc=!Ra&&!Ia&&Ct(ye);we=ye,Ra||Ia||Uc?R(un)?we=un:et(Hc=un)&&N(Hc)?we=function(Jt,Ve){var ue=-1,Le=Jt.length;for(Ve||(Ve=Array(Le));++ue<Le;)Ve[ue]=Jt[ue];return Ve}(un):Ia?(Bi=!1,we=ye.slice()):Uc?(Bi=!1,we=function(Jt){var Ve=(ue=Jt.buffer,Le=new ue.constructor(ue.byteLength),new H(Le).set(new H(ue)),Le),ue,Le;return new Jt.constructor(Ve,Jt.byteOffset,Jt.length)}(ye)):we=[]:function(Jt){if(!et(Jt)||sn(Jt)!=s)return!1;var Ve=W(Jt);if(Ve===null)return!0;var ue=O.call(Ve,"constructor")&&Ve.constructor;return typeof ue=="function"&&ue instanceof ue&&C.call(ue)==b}(ye)||pt(ye)?(we=un,pt(un)?we=function(Jt){return function(Ve,ue,Le){var NA=!Le;Le||(Le={});for(var jc=-1,bA=ue.length;++jc<bA;){var ya=ue[jc],Yo=void 0;Yo===void 0&&(Yo=Ve[ya]),NA?It(Le,ya,Yo):ct(Le,ya,Yo)}return Le}(Jt,xt(Jt))}(un):V(un)&&!$(un)||(we=function(Jt){return typeof Jt.constructor!="function"||Ot(Jt)?{}:Pt(W(Jt))}(ye))):Bi=!1}var Hc;Bi&&(Fi.set(ye,we),Ie(we,ye,Cn,Wr,Fi),Fi.delete(ye)),$e(Re,ne,we)})(k,x,kt,j,Vn,q,ft);else{var Ee=q?q(ke(k,kt),Bt,kt+"",k,x,ft):void 0;Ee===void 0&&(Ee=Bt),$e(k,kt,Ee)}},xt)}function hr(k,x){return In(function(j,q,ft){return q=bt(q===void 0?j.length-1:q,0),function(){for(var Bt=arguments,kt=-1,Ee=bt(Bt.length-q,0),Re=Array(Ee);++kt<Ee;)Re[kt]=Bt[q+kt];kt=-1;for(var Ut=Array(q+1);++kt<q;)Ut[kt]=Bt[kt];return Ut[q]=ft(Re),function(ne,Cn,Ie){switch(Ie.length){case 0:return ne.call(Cn);case 1:return ne.call(Cn,Ie[0]);case 2:return ne.call(Cn,Ie[0],Ie[1]);case 3:return ne.call(Cn,Ie[0],Ie[1],Ie[2])}return ne.apply(Cn,Ie)}(j,this,Ut)}}(k,x,Fc),k+"")}var pr=rt?function(k,x){return rt(k,"toString",{configurable:!0,enumerable:!1,value:(j=x,function(){return j}),writable:!0});var j}:Fc;function an(k,x){var j,q,ft=k.__data__;return((q=typeof(j=x))=="string"||q=="number"||q=="symbol"||q=="boolean"?j!=="__proto__":j===null)?ft[typeof x=="string"?"string":"hash"]:ft.map}function fr(k,x){var j=function(q,ft){return q==null?void 0:q[ft]}(k,x);return cr(j)?j:void 0}function ln(k,x){var j=typeof k;return!!(x=x==null?r:x)&&(j=="number"||j!="symbol"&&l.test(k))&&k>-1&&k%1==0&&k<x}function Ot(k){var x=k&&k.constructor;return k===(typeof x=="function"&&x.prototype||I)}function ke(k,x){if((x!=="constructor"||typeof k[x]!="function")&&x!="__proto__")return k[x]}var In=function(k){var x=0,j=0;return function(){var q=ee(),ft=16-(q-j);if(j=q,ft>0){if(++x>=800)return arguments[0]}else x=0;return k.apply(void 0,arguments)}}(pr);function yt(k,x){return k===x||k!=k&&x!=x}var pt=Te(function(){return arguments}())?Te:function(k){return et(k)&&O.call(k,"callee")&&!G.call(k,"callee")},R=Array.isArray;function N(k){return k!=null&&z(k.length)&&!$(k)}var M=ot||function(){return!1};function $(k){if(!V(k))return!1;var x=sn(k);return x==o||x=="[object GeneratorFunction]"||x=="[object AsyncFunction]"||x=="[object Proxy]"}function z(k){return typeof k=="number"&&k>-1&&k%1==0&&k<=r}function V(k){var x=typeof k;return k!=null&&(x=="object"||x=="function")}function et(k){return k!=null&&typeof k=="object"}var Ct=_?function(k){return function(x){return k(x)}}(_):function(k){return et(k)&&z(k.length)&&!!c[sn(k)]};function xt(k){return N(k)?fe(k):dr(k)}var yn,CA=(yn=function(k,x,j){Vn(k,x,j)},hr(function(k,x){var j=-1,q=x.length,ft=q>1?x[q-1]:void 0,Bt=q>2?x[2]:void 0;for(ft=yn.length>3&&typeof ft=="function"?(q--,ft):void 0,Bt&&function(Ee,Re,Ut){if(!V(Ut))return!1;var ne=typeof Re;return!!(ne=="number"?N(Ut)&&ln(Re,Ut.length):ne=="string"&&Re in Ut)&&yt(Ut[Re],Ee)}(x[0],x[1],Bt)&&(ft=q<3?void 0:ft,q=1),k=Object(k);++j<q;){var kt=x[j];kt&&yn(k,kt,j,ft)}return k}));function Fc(k){return k}e.exports=CA})(Ru,Ru.exports);const CT=Ju(Ru.exports);class NT{constructor(t,n,r,i){this.backendRestClient=new yT(t,n,r,i)}async getApp(t){return function(n){const r=function(s,a){const l={general:{enableFileTransfers:a.includes("file_sharing"),enableLocation:a.includes("location_sharing"),enableMentions:!1,showTypingIndicators:!0,enablePresence:!1,enableVoiceRecording:!1},theme:{version:"v2",name:"default"},permissions:{messages:{delete:"own",edit:"own",reply:"all",emojiReactions:"all"},messagesCustom:{},conversations:{leave:"none",markAsUnread:"none"},conversationsCustom:{}},generalNotificationSettings:{timeout:"15"},emailSettings:{enabled:!0,subject:"{{sender.name}} wants to chat with you on {{app.name}}",replySeparator:"--- Write ABOVE THIS LINE to post a reply via email ---",unsubscribeText:"Unsubscribe from all chat emails",senderName:"{{sender.name}} (via {{app.name}})",header:`Hi {{recipient.name}},
|
|
106
106
|
{{sender.name}} wants to chat with you on {{app.name}}:`,includeMessages:!0,inboxUrl:"{{app.custom.websiteUrl}}",inboxLinkText:"Join the chat",footer:`On behalf of {{sender.name}},
|
|
107
107
|
The {{app.name}} team`,enableReplyToEmail:a.includes("reply_via_email"),emailThemeType:a.includes("email_templates")?"custom":"standard",emailTheme:"default_email",emailAttachmentMode:"enabledExcludingImages",htmlTemplate:`<div>
|
|
108
108
|
Hi {{recipient.name}}, <br/>
|
|
@@ -126,38 +126,46 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
126
126
|
{{app.custom.websiteUrl}} Join the chat
|
|
127
127
|
|
|
128
128
|
On behalf of {{sender.name}},
|
|
129
|
-
The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),smsTemplate:'({{app.name}}) {{sender.name}}: "{{messages}}". Reply here: {{app.custom.websiteUrl}}',maximumSegments:"1",enableAutoOptOutText:!1,optOutText:"To stop receiving these messages, reply STOP."},suppressContactInfo:JSON.stringify({mode:"off",suppressLinks:!0,suppressEmailAddresses:!0,suppressPhoneNumbers:!0}),sameTabLinkRules:[]};return DT(l,s)}(n.configuration,n.features),i=JSON.parse(r.suppressContactInfo),o={...r,suppressContactInfo:new m_(i)};return{appMetadata:{...n.appMetadata,id:n.appMetadata.id},features:n.features,role:o}}(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 ri{constructor(t,n,r){this.realtimeWsApiUrl=t,this.internalHttpApiUrl=n,this.restApiHttpUrl=r}getBokensUrl(t,n,r){return this.internalHttpApiUrl+`/${t}/bokens/${encodeURIComponent(n)}?signature=${encodeURIComponent(r!=null?r:"")}`}getRealtimeWsUrl(t,n,r,i,o){const s=encodeURIComponent(n);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 n=new ri("wss://realtime.talkjs.com/v1","https://app.talkjs.com/api/v0","https://api.talkjs.com/v1");if(!t)return n;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)?n:new ri(`wss://realtime-${o}.talkjs.com/v1`,`https://app-${o}.talkjs.com/api/v0`,`https://api-${o}.talkjs.com/v1`)}return n}return t.includes("localhost")||t.includes("localtest.me")||/^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(t)?new ri(`ws://${t}/public_api/v1`,`http://${t}/api/v0`,`http://${t}/public_api/v1`):new ri(`wss://${t}/public_api/v1`,`https://${t}/api/v0`,`https://${t}/public_api/v1`)}}function Xp(e){return Object.keys(e)}class Co{static subscribeToConversationListData(t,n,r){const i=new Co(t,n,r),o=[i.listenForErrors(),i.listenForAuth(),i.listenForUserAndApp(),i.listenForConversations()];return()=>{o.forEach(s=>s())}}static subscribeToChatboxData(t,n,r){const i=new Co(t,n,r),o=[i.listenForErrors(),i.listenForAuth(),i.listenForUserAndApp(),i.listenForMessages(),i.listenForParticipants(),i.listenForCurrentConversation(),i.listenForTyping(),i.listenForPresence()];return()=>{o.forEach(s=>s())}}constructor(t,n,r){this.store=t,this.session=n,this.restApi=r}listenForErrors(){const{store:t,session:n}=this;return Ee(r=>{t.errors$.assign({unknownConversation:!1,unknownUser:!1,wrongAppId:!1,serverError:!1});const i=n.onError(l=>{Qe.error(l.message),t.errors$.serverError.set(!0)}),o=n.currentUser.subscribe(l=>{t.errors$.unknownUser.set(l===null)}),s=t.type==="ChatboxStore"?t.state$.extCurrentConversationId.get():null,a=s&&n.conversation(s).subscribe(l=>{t.errors$.unknownConversation.set(l===null)});r.onCleanup=()=>{i.unsubscribe(),o.unsubscribe(),a==null||a.unsubscribe()}})}listenForAuth(){const{store:t,session:n}=this;return Ee(r=>{let i=!0;const o=t.hasTokenFetcher$.get();t.authTokenState$.peek()!=="loading"&&t.authTokenState$.set("loading"),n._authProvider.getToken().then(()=>{i&&t.authTokenState$.set("valid")});const s=n._authProvider.onTokenRefreshFailed(()=>{i&&t.authTokenState$.set(o?"invalid":"expired")});r.onCleanup=()=>{i=!1,s()}})}listenForUserAndApp(){const{store:t,session:n,restApi:r}=this;return Ee(i=>{let o=!0,s=null;const a=n.currentUser.subscribe(async l=>{if(o&&l&&(t.currentUser$.set(l),l.role!==s)){s=l.role;const c=await r.getApp(l.role);if(!o)return;t.app$.set(c)}});i.onCleanup=()=>{o=!1,a.unsubscribe()}})}listenForConversations(){const{store:t,session:n}=this;return mt(t.type==="ConversationListStore"),Ee(r=>{const i=n.subscribeConversations(o=>{_i(()=>{t.conversationsArray$.set(o);const s={};for(const a of o)s[a.id]=a;t.conversationsMap$.set(s)})});t.conversationListSubscription=i,r.onCleanup=()=>{i.unsubscribe(),t.conversationListSubscription=null}})}listenForMessages(){const{store:t,session:n}=this;return mt(t.type==="ChatboxStore"),Ee(r=>{let i=!0;const o=t.state$.extCurrentConversationId.get(),s=o&&n.conversation(o).subscribeMessages(async(a,l)=>{i&&a&&(await t.readyForNewMessagesPromise,t.storeMessages(o,a,l))});t.messageSubscription=s,r.onCleanup=()=>{i=!1,s==null||s.unsubscribe(),t.messageSubscription=null}})}listenForParticipants(){const{store:t,session:n}=this;return mt(t.type==="ChatboxStore"),Ee(r=>{let i=!0;const o=t.state$.extCurrentConversationId.get(),s=o&&n.conversation(o).subscribeParticipants(a=>{i&&a&&t.state$.participants.child(o).set(a)});t.participantSubscription=s,r.onCleanup=()=>{i=!1,s==null||s.unsubscribe(),t.participantSubscription=null}})}listenForCurrentConversation(){const{store:t,session:n}=this;return mt(t.type==="ChatboxStore"),Ee(r=>{let i=!0;const o=t.state$.extCurrentConversationId.get(),s=o&&n.conversation(o).subscribe(async a=>{i&&a&&t.state$.currentConversation.set(a)});r.onCleanup=()=>{i=!1,s==null||s.unsubscribe()}})}listenForTyping(){const{store:t,session:n}=this;return mt(t.type==="ChatboxStore"),Ee(r=>{let i=!0;const o=t.state$.extCurrentConversationId.get(),s=o&&n.conversation(o).subscribeTyping(a=>{i&&a&&t.storeTyping(o,a)});r.onCleanup=()=>{i=!1,s==null||s.unsubscribe()}})}listenForPresence(){const{store:t,session:n}=this;return mt(t.type==="ChatboxStore"),Ee(r=>{const i=t.state$.extCurrentConversationId.get(),o=i&&t.state$.participants.child(i).onChange(({value:s})=>{if(!s)return;const a=new Set;for(const l of s)a.add(l.user.id);_i(()=>{var l;for(const c of Xp(t.onlineSubscriptions))a.has(c)||((l=t.onlineSubscriptions[c])==null||l.unsubscribe(),delete t.onlineSubscriptions[c],t.state$.isUserConnected.child(c).set(!1))});for(const l of a)t.onlineSubscriptions[l]||(t.onlineSubscriptions[l]=n.user(l).subscribeOnline(c=>{c&&t.state$.isUserConnected.child(l).set(c.isConnected)}))},{initial:!0});r.onCleanup=()=>{o==null||o();for(const s of Xp(t.onlineSubscriptions))t.onlineSubscriptions[s].unsubscribe();t.onlineSubscriptions={},t.state$.isUserConnected.set({})}})}}function mA(e,t){const n=t.appId,r=t.userId,i=Q(void 0),o=lt(()=>{const c=i.current,u=typeof c!=typeof t.tokenFetcher?t.tokenFetcher:c;return i.current=u,u},[t.tokenFetcher]);Ne(()=>{e.updateThemeCustom(t.themeCustom)},[e,t.themeCustom]);const s=lt(()=>pA(),[t.appId,t.userId,t.token,o]);Z(()=>{e.hasTokenFetcher$.set(!!o)},[e,o]);const a=TA.getTalkSession({host:t.host,appId:n,userId:r,token:t.token,tokenFetcher:o}),l=lt(()=>{const c=ri.fromHost(t.host);return new OT(c,n,s,a._authProvider)},[n,s,a,t.host]);return Z(()=>e.type==="ChatboxStore"?Co.subscribeToChatboxData(e,a,l):Co.subscribeToConversationListData(e,a,l),[e,a,l]),{session:a,restApi:l}}function qi(e,t,n){const r=Q(e),i=Q(n);return Ne(()=>{r.current=e,i.current=n}),st(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 c of l){const u=new Event(c);Object.assign(u,a),s.dispatchEvent(u)}}(t,o,i.current)},[t])}function EA(e){Z(()=>{const t=window,n=e.current;if(t.cordova&&n){const r=i=>{i.target instanceof HTMLAnchorElement&&(i.preventDefault(),function(o){const s=window;s.cordova.InAppBrowser?s.cordova.InAppBrowser.open(o,"_system"):window.open(o,"_system","location=yes")}(i.target.href))};return n.addEventListener("click",r),()=>n.removeEventListener("click",r)}},[e])}function _A(){const[e,t]=ct(!0);return Z(()=>{t(!1)},[]),e}const vT=qe(function(e,t){var R,y;const{onSendMessage:n,onDeleteMessage:r,onMessageAction:i,beforeBrowserPermissionPrompt:o,onMissingBrowserPermission:s,messageFieldPlaceholder:a,messageFieldSpellcheck:l,__hostElement:c}=e;Z(()=>{var D;(D=e.__internalOnLoaded)==null||D.call(e)},[]);const u=_A(),h=Q(c!=null?c:null);EA(h);const d=qi(r,c,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),p=qi(n,c,["sendMessage","send-message","sendmessage","SendMessage"]),f=qi(i,c,["messageAction","message-action","messageaction","MessageAction"]),m={beforeBrowserPermissionPrompt:o,onMissingBrowserPermissionCallback:qi(s,c,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])},{store:E,controller:A,editorInternals:_,session:g}=function(D,O,C,b){const L=lt(()=>new Nm(D.appId,D.userId),[]),{session:w}=mA(L,D),F=lt(()=>new o_(L.state$.editor,L.device$,L.state$.userPermissions),[L]),H=lt(()=>new _T(L,w,F,O,C,b),[w,L,F,O,C,b]);return F.controller=H,Z(()=>{_i(()=>{L.state$.extCurrentConversationId.set(D.conversationId),L.state$.currentConversation.set(null),L.state$.referencedMessageId.set(null)})},[L,D.conversationId]),{store:L,controller:H,editorInternals:F,session:w}}(e,p,d,f),v=st(async()=>{const D=_.state$;if(D.isEmpty.peek()||D.atTextLimit.peek())return;const O=_.getText(),C=E.state$.referencedMessageId.peek();C&&A.setReferencedMessage(null),_.clearText(),E.state$.editor.showEmojiPicker.set(!1),await A.sendMessage({text:O,referencedMessage:C!=null?C:void 0})},[A,_,E]);Z(()=>{var O;const D=(O=e.enterSendsMessage)!=null?O:!0;_.onEnter=D?v:void 0},[_,e.enterSendsMessage,v]),Z(()=>{_.spellcheck$.set(l)},[_,l]),Z(()=>{_.placeholder$.set(a)},[_,a]),or(t,()=>({controller:A,editorInternals:_}));const S=st(({error:D})=>P(Oa,{appId:e.appId,chatboxState:{type:"unexpected-error",error:D}}),[e.appId]),I=u?null:P(dm,{fallbackRender:S,children:P(Am.Provider,{value:_,children:P(Dm.Provider,{value:E,children:P(_m.Provider,{value:e.theme,children:P(gm.Provider,{value:m,children:P(Om.Provider,{value:A,children:P(qu.Provider,{value:g,children:P(yg.Provider,{value:{sendMessage:v},children:P(mT,{appId:e.appId,chatHeaderVisible:(R=e.chatHeaderVisible)!=null?R:!0,messageFieldVisible:(y=e.messageFieldVisible)!=null?y:!0})})})})})})})})});return c?I:P("div",{className:"t-chatbox"+(e.className?` ${e.className}`:""),style:e.style,ref:h,children:I})});(function(e="Twemoji Country Flags",t="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&gd("😊")&&!gd("🇨🇭")){const n=document.createElement("style");return n.textContent=`@font-face {
|
|
129
|
+
The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),smsTemplate:'({{app.name}}) {{sender.name}}: "{{messages}}". Reply here: {{app.custom.websiteUrl}}',maximumSegments:"1",enableAutoOptOutText:!1,optOutText:"To stop receiving these messages, reply STOP."},suppressContactInfo:JSON.stringify({mode:"off",suppressLinks:!0,suppressEmailAddresses:!0,suppressPhoneNumbers:!0}),sameTabLinkRules:[]};return CT(l,s)}(n.configuration,n.features),i=JSON.parse(r.suppressContactInfo),o={...r,suppressContactInfo:new D_(i)};return{appMetadata:{...n.appMetadata,id:n.appMetadata.id},features:n.features,role:o}}(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 si{constructor(t,n,r){this.realtimeWsApiUrl=t,this.internalHttpApiUrl=n,this.restApiHttpUrl=r}getBokensUrl(t,n,r){return this.internalHttpApiUrl+`/${t}/bokens/${encodeURIComponent(n)}?signature=${encodeURIComponent(r!=null?r:"")}`}getRealtimeWsUrl(t,n,r,i,o){const s=encodeURIComponent(n);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 n=new si("wss://realtime.talkjs.com/v1","https://app.talkjs.com/api/v0","https://api.talkjs.com/v1");if(!t)return n;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)?n:new si(`wss://realtime-${o}.talkjs.com/v1`,`https://app-${o}.talkjs.com/api/v0`,`https://api-${o}.talkjs.com/v1`)}return n}return t.includes("localhost")||t.includes("localtest.me")||/^\d+\.\d+\.\d+\.\d+(:\d+)?$/.test(t)?new si(`ws://${t}/public_api/v1`,`http://${t}/api/v0`,`http://${t}/public_api/v1`):new si(`wss://${t}/public_api/v1`,`https://${t}/api/v0`,`https://${t}/public_api/v1`)}}function Qp(e){return Object.values(e)}class bT{constructor(t,n,r){this.subscribedConversations={},this.store=t,this.session=n,this.restApi=r}subscribeToConversationListData(){const t=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),this.listenForConversations()];return()=>t.forEach(n=>n())}subscribeToChatboxData(){const t=[this.listenForErrors(),this.listenForAuth(),this.listenForUserAndApp(),()=>this.unsubscribeAllConversations()];return()=>t.forEach(n=>n())}listenForErrors(){const{store:t,session:n}=this;t.errors$.assign({unknownUser:!1,wrongAppId:!1,serverError:!1});const r=n.onError(o=>{tn.error(o.message),t.errors$.serverError.set(!0)}),i=n.currentUser.subscribe(o=>{t.errors$.unknownUser.set(o===null)});return()=>{r.unsubscribe(),i.unsubscribe()}}listenForAuth(){const{store:t,session:n}=this;return We(r=>{let i=!0;const o=t.hasTokenFetcher$.get();t.authTokenState$.peek()!=="loading"&&t.authTokenState$.set("loading"),n._authProvider.getToken().then(()=>{i&&t.authTokenState$.set("valid")});const s=n._authProvider.onTokenRefreshFailed(()=>{i&&t.authTokenState$.set(o?"invalid":"expired")});r.onCleanup=()=>{i=!1,s()}})}listenForUserAndApp(){const{store:t,session:n,restApi:r}=this;return We(i=>{let o=!0,s=null;const a=n.currentUser.subscribe(async l=>{if(o&&l&&(t.currentUser$.set(l),l.role!==s)){s=l.role;const c=await r.getApp(l.role);if(!o)return;t.app$.set(c)}});i.onCleanup=()=>{o=!1,a.unsubscribe()}})}listenForConversations(){const{store:t,session:n}=this;return mt(t.type==="ConversationListStore"),We(r=>{const i=n.subscribeConversations(o=>{yr(()=>{t.conversationsArray$.set(o);const s={};for(const a of o)s[a.id]=a;t.conversationsMap$.set(s)})});t.conversationListSubscription=i,r.onCleanup=()=>{i.unsubscribe(),t.conversationListSubscription=null}})}subscribeTypingAndPresence(t){var r;if((r=this.unsubscribeTypingAndPresence)==null||r.call(this),!t)return;const n=[this.listenForTyping(t),this.listenForPresence(t)];this.unsubscribeTypingAndPresence=()=>{n.forEach(i=>i()),this.unsubscribeTypingAndPresence=void 0}}subscribeConversation(t){if(this.subscribedConversations[t])return void(this.subscribedConversations[t].touchedAt=Date.now());const n=[this.listenForConversation(t),this.listenForMessages(t),this.listenForParticipants(t)];this.subscribedConversations[t]={unsubscribe:()=>{n.forEach(i=>i()),delete this.subscribedConversations[t]},touchedAt:Date.now()};const r=Qp(this.subscribedConversations);r.length>10&&function(o,s){return o.reduce((a,l)=>l[s]<a[s]?l:a,o[0])}(r,"touchedAt").unsubscribe()}unsubscribeAllConversations(){var t;for(const n of Qp(this.subscribedConversations))n.unsubscribe();(t=this.unsubscribeTypingAndPresence)==null||t.call(this),this.subscribedConversations={}}listenForMessages(t){const{store:n,session:r}=this;mt(n.type==="ChatboxStore");const i=r.conversation(t).subscribeMessages(async(o,s)=>{o&&(await n.readyForNewMessagesPromise,n.storeMessages(t,o,s))});return n.messageSubscriptions[t]=i,()=>i==null?void 0:i.unsubscribe()}listenForParticipants(t){const{store:n,session:r}=this;mt(n.type==="ChatboxStore");const i=r.conversation(t).subscribeParticipants(o=>{o&&n.state$.participants.child(t).set(o)});return()=>i==null?void 0:i.unsubscribe()}listenForConversation(t){const{store:n,session:r}=this;mt(n.type==="ChatboxStore");const i=r.conversation(t).subscribe(async o=>{yr(()=>{o?(n.state$.unknownConversations.child(t).delete(),n.state$.conversations.child(t).set(o)):(n.state$.conversations.child(t).delete(),n.state$.unknownConversations.child(t).set(!0))})});return()=>i==null?void 0:i.unsubscribe()}listenForTyping(t){const{store:n,session:r}=this;mt(n.type==="ChatboxStore");const i=r.conversation(t).subscribeTyping(o=>{o&&n.storeTyping(t,o)});return()=>i==null?void 0:i.unsubscribe()}listenForPresence(t){const{store:n,session:r}=this;mt(n.type==="ChatboxStore");const i=n.state$.participants.child(t),o=n.state$.isUserConnected.child(t),s=We(a=>{var u;const l=((u=i.get())!=null?u:[]).map(({user:h})=>h.id),c=l.map(h=>r.user(h).subscribeOnline(d=>{var p;o.child(h).set((p=d==null?void 0:d.isConnected)!=null?p:!1)}));yr(()=>{var f;const h=new Set(l),d=(p=(f=o.peek())!=null?f:{},Object.keys(p));var p;for(const m of d)h.has(m)||o.child(m).delete()}),a.onCleanup=()=>{c.forEach(h=>h.unsubscribe())}});return()=>{s==null||s(),n.state$.isUserConnected.child(t).delete(),o.delete()}}}function vA(e,t){const n=t.appId,r=t.userId,i=Q(void 0),o=at(()=>{const u=i.current,h=typeof u!=typeof t.tokenFetcher?t.tokenFetcher:u;return i.current=h,h},[t.tokenFetcher]);ve(()=>{e.updateThemeCustom(t.themeCustom)},[e,t.themeCustom]);const s=at(()=>DA(),[t.appId,t.userId,t.token,o]);Z(()=>{e.hasTokenFetcher$.set(!!o)},[e,o]);const a=kA.getTalkSession({host:t.host,appId:n,userId:r,token:t.token,tokenFetcher:o}),l=at(()=>{const u=si.fromHost(t.host);return new NT(u,n,s,a._authProvider)},[n,s,a,t.host]),c=at(()=>new bT(e,a,l),[e,a,l]);return{session:a,restApi:l,fetcher:c}}function Qe(e,t,n){const r=Q(e),i=Q(n);return ve(()=>{r.current=e,i.current=n}),it(o=>{r.current&&r.current(o),t&&function(s,a,l){for(const c of l){const u=new Event(c);Object.assign(u,a),s.dispatchEvent(u)}}(t,o,i.current)},[t])}function SA(e){Z(()=>{const t=window,n=e.current;if(t.cordova&&n){const r=i=>{i.target instanceof HTMLAnchorElement&&(i.preventDefault(),function(o){const s=window;s.cordova.InAppBrowser?s.cordova.InAppBrowser.open(o,"_system"):window.open(o,"_system","location=yes")}(i.target.href))};return n.addEventListener("click",r),()=>n.removeEventListener("click",r)}},[e])}function TA(){const[e,t]=ut(!0);return Z(()=>{t(!1)},[]),e}const kT=je(function(e,t){var O,v;const{onSendMessage:n,onDeleteMessage:r,onMessageAction:i,onBackButtonClick:o,beforeBrowserPermissionPrompt:s,onMissingBrowserPermission:a,messageFieldPlaceholder:l,messageFieldSpellcheck:c,__hostElement:u}=e;Z(()=>{var y;(y=e.__internalOnLoaded)==null||y.call(e)},[]);const h=TA(),d=Q(u!=null?u:null);SA(d);const p=Qe(r,u,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),f=Qe(n,u,["sendMessage","send-message","sendmessage","SendMessage"]),m=Qe(i,u,["messageAction","message-action","messageaction","MessageAction"]),E=Qe(o,u,["backButtonClick","back-button-click","backbuttonclick","BackButtonClick"]),A={beforeBrowserPermissionPrompt:s,onMissingBrowserPermissionCallback:Qe(a,u,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"])},{store:_,controller:g,editorInternals:D,session:S}=function(y,b,P,w,F){const H=at(()=>new Pm(y.appId,y.userId),[]),{session:B,fetcher:K}=vA(H,y);Z(()=>{const G=K.subscribeToChatboxData();return()=>G()},[K]);const W=at(()=>new c_(H.state$.editor,H.device$,H.state$.userPermissions),[H]),X=at(()=>new RT(H,B,W,b,P,w,F),[B,H,W,b,P,w,F]);return W.controller=X,Z(()=>{let G=!0;const ht=y.conversationId||null;return H.state$.loadingConversationId.set(ht),ht&&K.subscribeConversation(ht),K.subscribeTypingAndPresence(ht),Ku(()=>H.canRenderUi(ht)).then(()=>{G&&yr(()=>{H.state$.currentConversationId.set(ht),H.state$.referencedMessageId.set(null)})}),()=>{G=!1}},[H,K,y.conversationId]),{store:H,controller:X,editorInternals:W,session:B}}(e,f,p,m,E),I=it(async()=>{const y=D.state$;if(y.isEmpty.peek()||y.atTextLimit.peek())return;const b=D.getText(),P=_.state$.referencedMessageId.peek();P&&g.setReferencedMessage(null),D.clearText(),_.state$.editor.showEmojiPicker.set(!1),await g.sendMessage({text:b,referencedMessage:P!=null?P:void 0})},[g,D,_]);Z(()=>{var b;const y=(b=e.enterSendsMessage)!=null?b:!0;D.onEnter=y?I:void 0},[D,e.enterSendsMessage,I]),Z(()=>{D.spellcheck$.set(c)},[D,c]),Z(()=>{D.placeholder$.set(l)},[D,l]),jn(t,()=>({controller:g,editorInternals:D}));const T=it(({error:y})=>L(Ta,{appId:e.appId,chatboxState:{type:"unexpected-error",error:y}}),[e.appId]),C=h?null:L(mm,{fallbackRender:T,children:L(Sm.Provider,{value:D,children:L(Rm.Provider,{value:_,children:L(vm.Provider,{value:e.theme,children:L(Tm.Provider,{value:A,children:L(Im.Provider,{value:g,children:L(Qu.Provider,{value:S,children:L(Pg.Provider,{value:{sendMessage:I},children:L(TT,{appId:e.appId,chatHeaderVisible:(O=e.chatHeaderVisible)!=null?O:!0,messageFieldVisible:(v=e.messageFieldVisible)!=null?v:!0})})})})})})})})});return u?C:L("div",{className:"t-chatbox"+(e.className?` ${e.className}`:""),style:e.style,ref:d,children:C})});(function(e="Twemoji Country Flags",t="https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1/dist/TwemojiCountryFlags.woff2"){if(typeof window<"u"&&Sd("😊")&&!Sd("🇨🇭")){const n=document.createElement("style");return n.textContent=`@font-face {
|
|
130
130
|
font-family: "${e}";
|
|
131
131
|
unicode-range: U+1F1E6-1F1FF, U+1F3F4, U+E0062-E0063, U+E0065, U+E0067,
|
|
132
132
|
U+E006C, U+E006E, U+E0073-E0074, U+E0077, U+E007F;
|
|
133
133
|
src: url('${t}') format('woff2');
|
|
134
134
|
font-display: swap;
|
|
135
|
-
}`,document.head.appendChild(n),!0}})(),function({observableFunctions:e,observableProperties:t,jsonReplacer:n,jsonReviver:r}){if(e)for(const i in e){const o=e[i];
|
|
135
|
+
}`,document.head.appendChild(n),!0}})(),function({observableFunctions:e,observableProperties:t,jsonReplacer:n,jsonReviver:r}){if(e)for(const i in e){const o=e[i];_g.set(i,o),Od.prototype[i]=function(...s){return o.call(this,this._node,...s)}}if(t)for(const i in t){const o=t[i];Eg.set(i,o),Object.defineProperty(Od.prototype,i,{configurable:!0,get(){return o.get.call(this,this._node)},set(s){return o.set.call(this,this._node,s)}})}n&&(Dd.replacer=n),r&&(Dd.reviver=r)}({observableFunctions:{child:(e,t)=>aa.getProxy(e,t)}}),tn.registerHandler(({level:e,data:t})=>{console[e]("[TalkJS]",...t)});const RA=je(function(e,t){const n=Q(null),r=at(()=>new wT(n),[]);jn(t,()=>r,[r]);const{theme:i,...o}=e,s=at(()=>({...Iu,...i!=null?i:{}}),[i]),a=`chatbox|${e.userId}|${e.appId}`;return L(ym.Provider,{value:r,children:Tt(kT,{...o,key:a,theme:s,ref:n})})});var Ei,de,cn,Os;class wT{constructor(t){mr(this,de);mr(this,Ei);Ui(this,Ei,t)}deleteMessage(t){return Wt(this,de,cn).deleteMessage(t)}setEditing(t){Wt(this,de,cn).setEditing(t)}editMessage(t,n){return Wt(this,de,cn).editMessage(t,n)}sendMessage(t){return Wt(this,de,cn).sendMessage(t)}sendFileMessage(t){return Wt(this,de,cn).sendFileMessage(t)}sendLocationMessage(t){return Wt(this,de,cn).sendLocationMessage(t)}setReferencedMessage(t){Wt(this,de,cn).setReferencedMessage(t)}toggleReaction(t,n){return Wt(this,de,cn).toggleReaction(t,n)}getMessageFieldText(){return Wt(this,de,Os).getText()}setMessageFieldText(t){Wt(this,de,Os).setText(t)}focusMessageField(){Wt(this,de,Os).focus()}clickBackButton(){Wt(this,de,cn).clickBackButton()}}Ei=new WeakMap,de=new WeakSet,cn=function(){return Wt(this,Ei).current.controller},Os=function(){return Wt(this,Ei).current.editorInternals};function LT({conversation:e}){const t=At(),n=wi(),r=he(),i=d_(),o=dt(t.extCurrentConversationId$),[s,a]=ut([]);return Z(()=>{const l=n.conversation(e.id).subscribeParticipants(async c=>{c&&a(c)});return()=>l.unsubscribe()},[n,e.id]),s?L(r.ConversationListItem,{common:i,conversation:e,participants:s,isSelected:o===e.id}):null}function PT(){const e=At(),t=Q(null);Z(()=>{let r=!0;const i=t.current;return async function(){var s;let o=0;for(;r&&e.conversationListSubscription&&i.scrollHeight===i.clientHeight&&o<2;)await((s=e.conversationListSubscription)==null?void 0:s.loadMore(20)),o+=1}(),()=>{r=!1}},[e]);const n=it(r=>{const i=r.currentTarget;i.scrollHeight-i.clientHeight-i.scrollTop<15&&e.conversationListSubscription&&e.conversationListSubscription.loadMore(20)},[e]);return L("div",{className:"t-conversation-list-scrollable",ref:t,"t-menu-boundary":"root",onScroll:n,children:L(Hl,{each:e.conversationsArray$,children:r=>L(LT,{conversation:r.get()})})})}function MT({appId:e}){At();const t=function(){const n=At(),r=Ue(()=>{const s=n.currentUser$.get(),a=n.app$.get(),l=n.errors$.get(),c=n.authTokenState$.get();return l.serverError?"server-error":l.wrongAppId?"wrong-app-id":c==="loading"||c==="idle"?"loading-token":c==="invalid"?"invalid-token":c==="expired"?"expired-token":c==="valid"?l.unknownUser?"unknown-user":s&&a?"loaded":"loading-data":void mt.unreachable()}),i=Ue({type:"loading"});mo(s=>{const a=r.get(),l=n.extUserId$.peek(),c=n.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:c});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:n.currentUser$.peek()});break;case"unknown-user":s.onCleanup=function(u){i.set({type:"loading"});const h=setTimeout(()=>{i.set(u)},5e3);return()=>clearTimeout(h)}({type:"unknown-user",userId:l});break;default:mt.never(a)}});const o=Ue({type:"loading"});return mo(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())}),dt(o)}();return t.type==="invisible-loading"?L(qt,{}):t.type==="loading"?L(_A,{}):t.type==="unknown-user"||t.type==="auth-failed"||t.type==="wrong-app-id"||t.type==="server-error"||t.type==="unexpected-error"?L(Ta,{appId:e,chatboxState:t}):t.type=="expired-token"?L(AA,{}):t.type==="loaded"?L(PT,{}):L(qt,{})}class xT extends Lm{constructor(){super(...arguments),this.type="ConversationListStore",this.conversationListSubscription=null,this.extCurrentConversationId$=Ft(null),this.conversationsArray$=Ft([]),this.conversationsMap$=Ft({})}}class FT{constructor(t,n){this.store=t,this.onSelectConversation=n}selectConversation(t){if(t===this.store.extCurrentConversationId$.peek())return;this.store.extCurrentConversationId$.set(t);const n={currentUser:this.store.currentUser$.peek(),conversation:t&&this.store.conversationsMap$.child(t).peek()};this.onSelectConversation(n)}}const BT=je(function(e,t){const{__hostElement:n,onSelectConversation:r}=e;Z(()=>{var f;(f=e.__internalOnLoaded)==null||f.call(e)},[]);const i=TA(),o=Q(n!=null?n:null);SA(o);const s=Qe(r,n,["selectConversation","select-conversation","selectconversation","SelectConversation"]),a=at(()=>new xT(e.appId,e.userId),[]);Z(()=>{yr(()=>{a.extUserId$.set(e.userId),a.appId$.set(e.appId)})},[a,e.appId,e.userId]);const{session:l,fetcher:c}=vA(a,e);Z(()=>{const f=c.subscribeToConversationListData();return()=>f()},[c]);const u=at(()=>new FT(a,s),[a,s]),h=Q(void 0);Z(()=>{e.selectedConversationId!==h.current&&(h.current=e.selectedConversationId,a.extCurrentConversationId$.set(e.selectedConversationId||null))},[a,e.selectedConversationId]),Z(()=>{const f=e.__hostElement;if(f)return a.extCurrentConversationId$.onChange(({value:m})=>{f.selectedConversationId=m})},[a,e.__hostElement]),jn(t,()=>({controller:u}));const d=it(({error:f})=>L(Ta,{appId:e.appId,chatboxState:{type:"unexpected-error",error:f}}),[e.appId]),p=i?null:L(mm,{fallbackRender:d,children:L(Rm.Provider,{value:a,children:L(vm.Provider,{value:e.theme,children:L(Im.Provider,{value:u,children:L(Qu.Provider,{value:l,children:L(MT,{appId:e.appId})})})})})});return n?p:L("div",{className:"t-conversation-list"+(e.className?` ${e.className}`:""),style:e.style,ref:o,children:p})});var bo,ta,IA;class UT{constructor(t){mr(this,ta);mr(this,bo);Ui(this,bo,t)}selectConversation(t){Wt(this,ta,IA).selectConversation(t)}}bo=new WeakMap,ta=new WeakSet,IA=function(){return Wt(this,bo).current.controller};const yA=je(function(e,t){const n=Q(null),r=at(()=>new UT(n),[]);jn(t,()=>r,[r]);const{theme:i,...o}=e,s=at(()=>({...Iu,...i!=null?i:{}}),[i]),a=`conversation-list|${e.userId}|${e.appId}`;return L(ym.Provider,{value:r,children:Tt(BT,{...o,key:a,theme:s,ref:n})})});function HT(e){const{selectedConversationId:t,chatboxProps:n,conversationListProps:r,style:i,__hostElement:o}=e,{onDeleteMessage:s,onSendMessage:a,onMessageAction:l,onMissingBrowserPermission:c,...u}=n,{onSelectConversation:h,...d}=r,[p,f]=ut(t||null);Z(()=>{f(t||null)},[t]);const m=Qe(s,o,["deleteMessage","delete-message","deletemessage","DeleteMessage"]),E=Qe(a,o,["sendMessage","send-message","sendmessage","SendMessage"]),A=Qe(l,o,["messageAction","message-action","messageaction","MessageAction"]),_=Qe(c,o,["browserPermissionDenied","browser-permission-denied","browserpermissiondenied","BrowserPermissionDenied"]),g=Qe(h,o,["selectConversation","select-conversation","selectconversation","SelectConversation"]),D=it(y=>{var b,P;f((P=(b=y.conversation)==null?void 0:b.id)!=null?P:null),g(y)},[g]);Z(()=>{var y;(y=e.__internalOnLoaded)==null||y.call(e)},[]);const S=Q(o!=null?o:null),[I,T]=ut(void 0);ve(()=>{var P;const y=(P=e.mobileBreakPoint)!=null?P:700,b=new ResizeObserver(w=>{const F=w[0].contentRect.width;T(F>=y)});return b.observe(S.current),()=>b.disconnect()},[e.mobileBreakPoint]);const C=it(y=>{f(null),g({conversation:null,currentUser:y.currentUser})},[g]),O=p?"chatbox":"conversation-list";Z(()=>{o&&(I?o.removeAttribute("t-mobile-inbox"):o.setAttribute("t-mobile-inbox",O))},[I,o,O]);const v=I===void 0?null:L(qt,{children:[L(yA,{...d,onSelectConversation:D,selectedConversationId:p!=null?p:void 0}),L(RA,{...u,onDeleteMessage:m,onSendMessage:E,onMessageAction:A,onMissingBrowserPermission:_,onBackButtonClick:C,conversationId:p})]});if(o)return v;{const y="t-inbox"+(e.className?` ${e.className}`:"");return L("div",{ref:S,style:i,className:y,"t-mobile-inbox":I?void 0:O,children:v})}}var ko,wo;class jT{constructor(t,n){mr(this,ko);mr(this,wo);Ui(this,ko,t),Ui(this,wo,n)}get chatbox(){return Wt(this,ko).current}selectConversation(t){var n;(n=Wt(this,wo).current)==null||n.selectConversation(t)}}ko=new WeakMap,wo=new WeakMap;const $T=je(function(e,t){const n=Q(null),r=Q(null),i=at(()=>new jT(n,r),[]);jn(t,()=>i,[i]);const{theme:o,appId:s,userId:a,__hostElement:l,__internalOnLoaded:c,beforeBrowserPermissionPrompt:u,chatHeaderVisible:h,className:d,style:p,enterSendsMessage:f,messageFieldVisible:m,messageFieldSpellcheck:E,messageFieldPlaceholder:A,onDeleteMessage:_,onSendMessage:g,onMessageAction:D,onMissingBrowserPermission:S,onSelectConversation:I,themeCustom:T,host:C,selectedConversationId:O,mobileBreakPoint:v}=e;return L(HT,{style:p,className:d,selectedConversationId:O,chatboxProps:{appId:s,userId:a,theme:o,host:C,enterSendsMessage:f,chatHeaderVisible:h,messageFieldVisible:m,messageFieldSpellcheck:E,messageFieldPlaceholder:A,beforeBrowserPermissionPrompt:u,onDeleteMessage:_,onSendMessage:g,onMessageAction:D,onMissingBrowserPermission:S,themeCustom:T,ref:n},conversationListProps:{appId:s,userId:a,theme:o,host:C,onSelectConversation:I,themeCustom:T,ref:r},mobileBreakPoint:v,__hostElement:l,__internalOnLoaded:c},`inbox|${e.userId}|${e.appId}`)});function VT(e){const{conversation:t,theme:n,chatbox:r,t:i}=e.common,{ConversationImage:o}=n,s=Sa(t.id,10);return U`
|
|
136
136
|
<div className="t-theme-chat-header">
|
|
137
137
|
<div className="t-inner">
|
|
138
138
|
<div className="t-content">
|
|
139
|
+
<button
|
|
140
|
+
className="t-back-button"
|
|
141
|
+
aria-label=${i.INBOX}
|
|
142
|
+
title=${i.INBOX}
|
|
143
|
+
onClick=${()=>r.clickBackButton()}
|
|
144
|
+
>
|
|
145
|
+
<${n.Icon} type="chevronLeft" common=${e.common} />
|
|
146
|
+
</button>
|
|
139
147
|
<div className="t-image">
|
|
140
|
-
<${
|
|
148
|
+
<${o}
|
|
141
149
|
conversation=${t}
|
|
142
|
-
participants=${
|
|
150
|
+
participants=${s}
|
|
143
151
|
common=${e.common}
|
|
144
152
|
/>
|
|
145
153
|
</div>
|
|
146
154
|
|
|
147
155
|
<div className="t-info">
|
|
148
|
-
<${
|
|
156
|
+
<${zT} ...${e} />
|
|
149
157
|
</div>
|
|
150
158
|
</div>
|
|
151
159
|
</div>
|
|
152
160
|
</div>
|
|
153
|
-
`}function
|
|
161
|
+
`}function zT(e){const{common:t}=e;return t.conversation.subject?U`
|
|
154
162
|
<div className="t-title">${t.conversation.subject}</div>
|
|
155
163
|
<div className="t-subtitle">
|
|
156
|
-
<${
|
|
164
|
+
<${tf} ...${e} />
|
|
157
165
|
</div>
|
|
158
166
|
`:U`<div className="t-title">
|
|
159
|
-
<${
|
|
160
|
-
</div>`}function
|
|
167
|
+
<${tf} ...${e} />
|
|
168
|
+
</div>`}function tf({common:e,isUserConnected:t,permissions:n}){const{participants:r}=e,i=r.filter(({user:s})=>s.id!==e.currentUser.id),o=i.length===0?r:i;return n.showOnlineStatus?U`
|
|
161
169
|
<span className="t-participants">
|
|
162
170
|
${o.map(({user:s})=>U`
|
|
163
171
|
<span className="t-participant" key=${s.id}>
|
|
@@ -169,15 +177,16 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
169
177
|
</span>
|
|
170
178
|
`)}
|
|
171
179
|
</span>
|
|
172
|
-
`:U`<span className="t-participants">${o.map(({user:s})=>s.name).join(", ")}</span>`}function
|
|
180
|
+
`:U`<span className="t-participants">${o.map(({user:s})=>s.name).join(", ")}</span>`}function YT({common:e}){return null}function GT(e){const{message:t,messageStatus:n,permissions:r,common:i}=e,{currentUser:o,theme:s,chatbox:a,conversationId:l,t:c}=i,{Avatar:u,Icon:h,ReferencedMessage:d,TimeAgo:p,MessageActionMenu:f}=s,m=Sa(l,3).length>=3,E=t.sender,A=(E==null?void 0:E.id)!==o.id&&m,_=t.referencedMessage,g=r.canReplyToMessage||r.canDeleteMessage;let D;return D=E?E.id===o.id?"currentUser":"other":"system",U`
|
|
173
181
|
<div
|
|
174
182
|
className="t-theme-message"
|
|
175
|
-
t-sender=${
|
|
183
|
+
t-sender=${D}
|
|
176
184
|
t-message-id=${t.id}
|
|
185
|
+
t-status=${n}
|
|
177
186
|
>
|
|
178
187
|
<div className="t-message-row">
|
|
179
188
|
${E&&U`<${u}
|
|
180
|
-
photoUrl=${
|
|
189
|
+
photoUrl=${$r(E)}
|
|
181
190
|
common=${i}
|
|
182
191
|
/>`}
|
|
183
192
|
|
|
@@ -185,7 +194,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
185
194
|
<!-- in group chats, show the message sender name in a random color -->
|
|
186
195
|
${E&&A&&U`<div
|
|
187
196
|
className="t-message-sender-name"
|
|
188
|
-
style=${{color:
|
|
197
|
+
style=${{color:lA(E.id)}}
|
|
189
198
|
>
|
|
190
199
|
${E.name}
|
|
191
200
|
</div>`}
|
|
@@ -194,7 +203,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
194
203
|
common=${i}
|
|
195
204
|
/>`}
|
|
196
205
|
|
|
197
|
-
<${
|
|
206
|
+
<${O_}
|
|
198
207
|
common=${i}
|
|
199
208
|
message=${t}
|
|
200
209
|
messageStatus=${n}
|
|
@@ -202,31 +211,30 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
202
211
|
|
|
203
212
|
<div className="t-message-status">
|
|
204
213
|
<${p} timestamp=${t.createdAt} common=${i} />
|
|
205
|
-
${
|
|
214
|
+
${D=="currentUser"&&U`<${WT} ...${e} />`}
|
|
206
215
|
</div>
|
|
207
216
|
</div>
|
|
208
217
|
|
|
209
218
|
${g&&U`
|
|
210
|
-
<${
|
|
219
|
+
<${oi}
|
|
211
220
|
type="menu"
|
|
212
|
-
t-message-status=${n}
|
|
213
221
|
popoverComponent=${f}
|
|
214
222
|
popoverProps=${{message:t,permissions:r,common:i}}
|
|
215
223
|
className="t-message-action-menu-button"
|
|
216
224
|
aria-label=${c.ARIA_MORE_ACTIONS}
|
|
217
225
|
>
|
|
218
226
|
<${h} className="t-action-menu-icon" type="horizontalDots" />
|
|
219
|
-
</${
|
|
227
|
+
</${oi}>
|
|
220
228
|
`}
|
|
221
229
|
${r.canAddReaction&&U`
|
|
222
|
-
<${
|
|
230
|
+
<${oi}
|
|
223
231
|
className="t-add-reaction-button"
|
|
224
|
-
popoverComponent=${
|
|
232
|
+
popoverComponent=${S_}
|
|
225
233
|
popoverProps=${{messageId:t.id,colorScheme:"light"}}
|
|
226
234
|
aria-label=${c.ADD_REACTION}
|
|
227
235
|
>
|
|
228
236
|
<${h} type="addEmoji" />
|
|
229
|
-
</${
|
|
237
|
+
</${oi}>
|
|
230
238
|
`}
|
|
231
239
|
</div>
|
|
232
240
|
|
|
@@ -249,7 +257,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
249
257
|
</div>
|
|
250
258
|
`}
|
|
251
259
|
</div>
|
|
252
|
-
`}function
|
|
260
|
+
`}function WT({messageStatus:e,common:t}){const{Icon:n}=t.theme;return e==="virtual"?null:e==="sending"?U`
|
|
253
261
|
<span className="t-status-icon">
|
|
254
262
|
<${n}
|
|
255
263
|
type="spinner"
|
|
@@ -257,31 +265,31 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
257
265
|
common=${t}
|
|
258
266
|
/>
|
|
259
267
|
</span>
|
|
260
|
-
`:e==="sent"?U`<span className="t-status-icon">✓</span>`:e==="everyoneRead"?U`<span className="t-status-icon">✓✓</span>`:null}function
|
|
268
|
+
`:e==="sent"?U`<span className="t-status-icon">✓</span>`:e==="everyoneRead"?U`<span className="t-status-icon">✓✓</span>`:null}function XT(e){const{message:t,permissions:n,common:r}=e,{chatbox:i,t:o}=r;return U` <div className="t-theme-message-action-menu">
|
|
261
269
|
${n.canReplyToMessage&&U`
|
|
262
|
-
<${
|
|
270
|
+
<${Kn} className="t-menu-item" onSelect=${()=>i.setReferencedMessage(t.id)}>
|
|
263
271
|
${o.REPLY_TO_MESSAGE}
|
|
264
|
-
</${
|
|
272
|
+
</${Kn}>
|
|
265
273
|
`}
|
|
266
274
|
${n.canEditMessage&&U`
|
|
267
|
-
<${
|
|
275
|
+
<${Kn} className="t-menu-item" onSelect=${()=>i.setEditing(t.id)}>
|
|
268
276
|
${o.EDIT_MESSAGE}
|
|
269
|
-
</${
|
|
277
|
+
</${Kn}>
|
|
270
278
|
`}
|
|
271
279
|
${n.canDeleteMessage&&U`
|
|
272
|
-
<${
|
|
280
|
+
<${Kn} className="t-menu-item t-danger" onSelect=${()=>i.deleteMessage(t.id)}>
|
|
273
281
|
${o.DELETE_MESSAGE}
|
|
274
|
-
</${
|
|
282
|
+
</${Kn}>
|
|
275
283
|
`}
|
|
276
|
-
</div>`}function
|
|
284
|
+
</div>`}function KT(e){const{common:t,referencedMessage:n,editor:r,voiceRecorder:i,permissions:o,editMessageId:s}=e,{chatbox:a,device:l,conversation:c,t:u,theme:h}=t,{ReplyBar:d,Icon:p,VoiceRecorder:f,RecordingPreview:m}=h,E=s?"edit":"send",A=E==="edit"&&!r.atTextLimit&&r.characterCount>0,_=E==="send"&&r.isEmpty&&o.canShareLocation,g=E==="send"&&r.isEmpty&&o.canShareFile,D=E==="send"&&l.supportsEmojiPicker&&!l.isMobile,S=E==="send"&&r.isEmpty&&o.canSendVoiceMessage;return U`
|
|
277
285
|
<div className="t-theme-message-field" t-mode=${E}>
|
|
278
286
|
${r.showEmojiPicker&&U`
|
|
279
287
|
<div className="t-emoji-picker-wrapper">
|
|
280
|
-
<${
|
|
288
|
+
<${Ic} colorScheme="light" />
|
|
281
289
|
</div>
|
|
282
290
|
`}
|
|
283
|
-
<${
|
|
284
|
-
<${
|
|
291
|
+
<${k_} />
|
|
292
|
+
<${rA} />
|
|
285
293
|
|
|
286
294
|
${n&&U`<${d}
|
|
287
295
|
common=${t}
|
|
@@ -311,7 +319,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
311
319
|
`)}
|
|
312
320
|
${!i&&c.access==="ReadWrite"&&U`
|
|
313
321
|
<div className="t-textbox-column">
|
|
314
|
-
<${
|
|
322
|
+
<${u_} placeholder=${u.ENTRYBOX_PLACEHOLDER} />
|
|
315
323
|
|
|
316
324
|
<div className="t-button-overlay">
|
|
317
325
|
${_&&U`<button
|
|
@@ -332,7 +340,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
332
340
|
>
|
|
333
341
|
<${p} type="attach" common=${t} />
|
|
334
342
|
</button>`}
|
|
335
|
-
${
|
|
343
|
+
${D&&U`<button
|
|
336
344
|
className="t-emoji-button"
|
|
337
345
|
t-kind="icon-button"
|
|
338
346
|
aria-label=${u.ARIA_INSERT_EMOJI}
|
|
@@ -389,7 +397,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
389
397
|
</div>
|
|
390
398
|
</div>
|
|
391
399
|
</div>
|
|
392
|
-
`}function
|
|
400
|
+
`}function qT(e){const{common:t,voiceRecorder:n}=e,{t:r,theme:i}=t,{Icon:o}=i;return U`
|
|
393
401
|
<div className="t-theme-voice-recorder">
|
|
394
402
|
<button
|
|
395
403
|
className="t-close-button"
|
|
@@ -402,9 +410,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
402
410
|
</button>
|
|
403
411
|
|
|
404
412
|
<div className="t-textbox-column t-waveform-wrapper">
|
|
405
|
-
<${
|
|
413
|
+
<${oA} className="t-waveform" voiceRecorder=${n} />
|
|
406
414
|
<span className="t-duration"
|
|
407
|
-
>${
|
|
415
|
+
>${va(n.duration)}</span
|
|
408
416
|
>
|
|
409
417
|
</div>
|
|
410
418
|
|
|
@@ -420,7 +428,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
420
428
|
</button>
|
|
421
429
|
</div>
|
|
422
430
|
</div>
|
|
423
|
-
`}function
|
|
431
|
+
`}function JT(e){const{common:t,voiceRecorder:n}=e,{t:r,theme:i}=t,{Icon:o}=i;return U`
|
|
424
432
|
<div className="t-theme-recording-preview">
|
|
425
433
|
<button
|
|
426
434
|
className="t-close-button"
|
|
@@ -433,7 +441,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
433
441
|
</button>
|
|
434
442
|
|
|
435
443
|
<div className="t-textbox-column">
|
|
436
|
-
<${
|
|
444
|
+
<${zo} src=${n.recordingUrl} />
|
|
437
445
|
</div>
|
|
438
446
|
|
|
439
447
|
${n.uploadState==="pending"&&U`
|
|
@@ -457,7 +465,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
457
465
|
</div>
|
|
458
466
|
`}
|
|
459
467
|
</div>
|
|
460
|
-
`}function
|
|
468
|
+
`}function ZT({className:e="",type:t}){return U`<${QT[t]} className=${`t-theme-icon ${e}`} />`}const QT={attach:function({className:e}){return U`
|
|
461
469
|
<svg
|
|
462
470
|
className=${e}
|
|
463
471
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -475,7 +483,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
475
483
|
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"
|
|
476
484
|
></path>
|
|
477
485
|
</svg>
|
|
478
|
-
`},chevronLeft:
|
|
486
|
+
`},chevronLeft:ef,left:ef,chevronRight:nf,right:nf,chevronUp:rf,up:rf,chevronDown:of,down:of,close:function({className:e}){return U`
|
|
479
487
|
<svg
|
|
480
488
|
className=${e}
|
|
481
489
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1039,7 +1047,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1039
1047
|
<line x1="19" y1="12" x2="5" y2="12"></line>
|
|
1040
1048
|
<polyline points="12 19 5 12 12 5"></polyline>
|
|
1041
1049
|
</svg>
|
|
1042
|
-
`}};function
|
|
1050
|
+
`}};function ef({className:e}){return U`
|
|
1043
1051
|
<svg
|
|
1044
1052
|
className=${e}
|
|
1045
1053
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1053,7 +1061,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1053
1061
|
>
|
|
1054
1062
|
<polyline fill="none" points="15 6 9 12 15 18"></polyline>
|
|
1055
1063
|
</svg>
|
|
1056
|
-
`}function
|
|
1064
|
+
`}function nf({className:e}){return U`
|
|
1057
1065
|
<svg
|
|
1058
1066
|
className=${e}
|
|
1059
1067
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1067,7 +1075,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1067
1075
|
>
|
|
1068
1076
|
<polyline fill="none" points="9 6 15 12 9 18"></polyline>
|
|
1069
1077
|
</svg>
|
|
1070
|
-
`}function
|
|
1078
|
+
`}function rf({className:e}){return U`
|
|
1071
1079
|
<svg
|
|
1072
1080
|
className=${e}
|
|
1073
1081
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1082,7 +1090,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1082
1090
|
>
|
|
1083
1091
|
<polyline fill="none" points="18 15 12 9 6 15"></polyline>
|
|
1084
1092
|
</svg>
|
|
1085
|
-
`}function
|
|
1093
|
+
`}function of({className:e}){return U`
|
|
1086
1094
|
<svg
|
|
1087
1095
|
className=${e}
|
|
1088
1096
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -1097,13 +1105,13 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1097
1105
|
>
|
|
1098
1106
|
<polyline fill="none" points="6 9 12 15 18 9"></polyline>
|
|
1099
1107
|
</svg>
|
|
1100
|
-
`}function
|
|
1108
|
+
`}function tR(e){const{timestamp:t,isReadMarker:n,isDayMarker:r,common:i}=e,{t:o}=i;return U`
|
|
1101
1109
|
<div className="t-message-divider">
|
|
1102
1110
|
<div className="t-line" t-side="left">
|
|
1103
1111
|
<div className="t-line-segment" />
|
|
1104
1112
|
</div>
|
|
1105
1113
|
${r&&U`
|
|
1106
|
-
<span className="t-day-marker">${
|
|
1114
|
+
<span className="t-day-marker">${cA(t,o)}</span>
|
|
1107
1115
|
`}
|
|
1108
1116
|
<div className="t-line" t-side="right">
|
|
1109
1117
|
<div className="t-line-segment" />
|
|
@@ -1112,9 +1120,9 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1112
1120
|
`}
|
|
1113
1121
|
</div>
|
|
1114
1122
|
</div>
|
|
1115
|
-
`}function
|
|
1123
|
+
`}function eR({common:e}){return null}function nR({common:e}){const t=e.conversation.welcomeMessages;if(t.length===0)return null;const n=t.map((r,i)=>U`<${aA} key=${i} text=${r} />`);return U`<div className="t-message-group">${n.reverse()}</div>`}function rR({common:e}){const{typing:t,theme:n}=e,{Avatar:r}=n,{users:i,many:o}=t;if(!o&&i.length===0)return null;const s=o?U`<div className="t-theme-avatar">5+</div>`:i.slice(0,2).map(a=>U`<${r}
|
|
1116
1124
|
key=${a.id}
|
|
1117
|
-
photoUrl=${
|
|
1125
|
+
photoUrl=${$r(a)}
|
|
1118
1126
|
common=${e}
|
|
1119
1127
|
/>`);return U`
|
|
1120
1128
|
<div
|
|
@@ -1134,11 +1142,11 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1134
1142
|
</div>
|
|
1135
1143
|
</div>
|
|
1136
1144
|
</div>
|
|
1137
|
-
`}function
|
|
1145
|
+
`}function iR({common:e}){return null}function oR(e){return U`
|
|
1138
1146
|
<span className="t-theme-compact-message-content">
|
|
1139
|
-
<${
|
|
1147
|
+
<${sR} ...${e} />
|
|
1140
1148
|
</span>
|
|
1141
|
-
`}function
|
|
1149
|
+
`}function sR({message:e,common:t}){var s;const n=e.content[0],{theme:r,t:i}=t,{Icon:o}=r;if(n.type==="text")return U`<${Sc}
|
|
1142
1150
|
block=${n}
|
|
1143
1151
|
message=${e}
|
|
1144
1152
|
nonInteractive
|
|
@@ -1153,13 +1161,13 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1153
1161
|
${n.filename}
|
|
1154
1162
|
`;if(n.subtype==="voice")return U`
|
|
1155
1163
|
<${o} type="microphone" common=${t} />
|
|
1156
|
-
${i.VOICE_MESSAGE} (${
|
|
1164
|
+
${i.VOICE_MESSAGE} (${va((s=n.duration)!=null?s:0)})
|
|
1157
1165
|
`;if(n.subtype===void 0)return U`
|
|
1158
1166
|
<${o} type="attachment" common=${t} />
|
|
1159
1167
|
${n.filename}
|
|
1160
|
-
`}return null}function
|
|
1168
|
+
`}return null}function aR({block:e,downloadUrl:t,common:n}){const{Icon:r}=n.theme;return U`
|
|
1161
1169
|
<div className="t-theme-audio-block">
|
|
1162
|
-
<${
|
|
1170
|
+
<${zo} src=${e.url} filename=${e.filename} />
|
|
1163
1171
|
|
|
1164
1172
|
<a className="t-body-text" href=${t} target="_blank">
|
|
1165
1173
|
<${r}
|
|
@@ -1168,10 +1176,10 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1168
1176
|
common=${n}
|
|
1169
1177
|
/>
|
|
1170
1178
|
<span className="t-filename">${e.filename}</span>
|
|
1171
|
-
<span className="t-filesize"> (${
|
|
1179
|
+
<span className="t-filesize"> (${Vo(e.size)})</span>
|
|
1172
1180
|
</a>
|
|
1173
1181
|
</div>
|
|
1174
|
-
`}function
|
|
1182
|
+
`}function lR({block:e,downloadUrl:t,common:n}){const{Icon:r}=n.theme;return U`
|
|
1175
1183
|
<div className="t-theme-file-block">
|
|
1176
1184
|
<a className="t-body-text" href=${t} target="_blank">
|
|
1177
1185
|
<${r}
|
|
@@ -1180,10 +1188,10 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1180
1188
|
common=${n}
|
|
1181
1189
|
/>
|
|
1182
1190
|
<span className="t-filename">${e.filename}</span>
|
|
1183
|
-
<span className="t-filesize"> (${
|
|
1191
|
+
<span className="t-filesize"> (${Vo(e.size)})</span>
|
|
1184
1192
|
</a>
|
|
1185
1193
|
</div>
|
|
1186
|
-
`}function
|
|
1194
|
+
`}function uR({block:e,downloadUrl:t,common:n}){const{Icon:r}=n.theme,i={"--img-w":e.width||1,"--img-h":e.height||1};return U`
|
|
1187
1195
|
<div className="t-theme-image-block">
|
|
1188
1196
|
<a
|
|
1189
1197
|
href=${e.url}
|
|
@@ -1199,10 +1207,10 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1199
1207
|
<a href=${t} className="t-body-text" target="_blank">
|
|
1200
1208
|
<${r} className="download-icon" type="download" common=${n} />
|
|
1201
1209
|
<span>${e.filename}</span>
|
|
1202
|
-
<span className="t-filesize"> (${
|
|
1210
|
+
<span className="t-filesize"> (${Vo(e.size)})</span>
|
|
1203
1211
|
</a>
|
|
1204
1212
|
</div>
|
|
1205
|
-
`}function
|
|
1213
|
+
`}function cR({block:e}){const{imageUrl:t,linkUrl:n}=wc(e);return U`
|
|
1206
1214
|
<div className="t-theme-location-block">
|
|
1207
1215
|
<a
|
|
1208
1216
|
href=${n}
|
|
@@ -1217,11 +1225,11 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1217
1225
|
>
|
|
1218
1226
|
</span>
|
|
1219
1227
|
</div>
|
|
1220
|
-
`}function
|
|
1228
|
+
`}function dR({block:e,message:t}){return U`
|
|
1221
1229
|
<div className="t-theme-text-block">
|
|
1222
|
-
<${
|
|
1230
|
+
<${Sc} block=${e} message=${t} />
|
|
1223
1231
|
</div>
|
|
1224
|
-
`}function
|
|
1232
|
+
`}function hR({block:e,downloadUrl:t,common:n}){const{Icon:r}=n.theme;return U`
|
|
1225
1233
|
<div className="t-theme-video-block">
|
|
1226
1234
|
<div className="t-video-wrapper">
|
|
1227
1235
|
<div className="t-root" style=${{"--video-w":e.width||1,"--video-h":e.height||1}}>
|
|
@@ -1240,38 +1248,38 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1240
1248
|
<a href=${t} className="t-body-text" target="_blank">
|
|
1241
1249
|
<${r} className="download-icon" type="download" common=${n} />
|
|
1242
1250
|
<span>${e.filename}</span>
|
|
1243
|
-
<span className="t-filesize"> (${
|
|
1251
|
+
<span className="t-filesize"> (${Vo(e.size)})</span>
|
|
1244
1252
|
</a>
|
|
1245
1253
|
</div>
|
|
1246
|
-
`}function
|
|
1254
|
+
`}function pR({block:e}){return U`<${zo}
|
|
1247
1255
|
className="t-theme-voice-block"
|
|
1248
1256
|
src=${e.url}
|
|
1249
1257
|
filename=${e.filename}
|
|
1250
|
-
/>`}function
|
|
1258
|
+
/>`}function fR({photoUrl:e}){return U`
|
|
1251
1259
|
<div
|
|
1252
1260
|
className="t-theme-avatar"
|
|
1253
1261
|
style=${{backgroundImage:`url(${e})`}}
|
|
1254
1262
|
/>
|
|
1255
|
-
`}function
|
|
1263
|
+
`}function mR({common:e,conversation:t,participants:n}){const{currentUser:r,theme:i}=e,{Avatar:o,GroupChatImage:s}=i;return t.photoUrl?U`<${o}
|
|
1256
1264
|
photoUrl=${t.photoUrl}
|
|
1257
1265
|
common=${e}
|
|
1258
1266
|
/>`:n.length===0?null:n.length===1?U`<${o}
|
|
1259
|
-
photoUrl=${
|
|
1267
|
+
photoUrl=${$r(r)}
|
|
1260
1268
|
common=${e}
|
|
1261
1269
|
/>`:n.length===2?U`<${o}
|
|
1262
|
-
photoUrl=${
|
|
1270
|
+
photoUrl=${$r(n[0].user.id===r.id?n[1].user:n[0].user)}
|
|
1263
1271
|
common=${e}
|
|
1264
1272
|
/>`:U`
|
|
1265
1273
|
<${s} participants=${n} common=${e} />
|
|
1266
|
-
`}function
|
|
1274
|
+
`}function ER({participants:e}){return U`
|
|
1267
1275
|
<div className="t-theme-group-chat-image">
|
|
1268
1276
|
<div
|
|
1269
1277
|
className="t-mini-avatar"
|
|
1270
|
-
style=${{backgroundImage:`url("${
|
|
1278
|
+
style=${{backgroundImage:`url("${$r(e[0].user)}")`}}
|
|
1271
1279
|
></div>
|
|
1272
1280
|
<div
|
|
1273
1281
|
className="t-mini-avatar"
|
|
1274
|
-
style=${{backgroundImage:`url("${
|
|
1282
|
+
style=${{backgroundImage:`url("${$r(e[1].user)}")`}}
|
|
1275
1283
|
></div>
|
|
1276
1284
|
${e.length>2&&U`<svg
|
|
1277
1285
|
className="t-counter"
|
|
@@ -1311,7 +1319,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1311
1319
|
</text>
|
|
1312
1320
|
</svg>`}
|
|
1313
1321
|
</div>
|
|
1314
|
-
`}function
|
|
1322
|
+
`}function _R({referencedMessage:e,common:t}){const{theme:n}=t,{CompactMessageContent:r}=n;return U`
|
|
1315
1323
|
<div className="t-theme-referenced-message">
|
|
1316
1324
|
<div className="t-sender-name">${e.sender.name}</div>
|
|
1317
1325
|
<div className="t-content">
|
|
@@ -1321,7 +1329,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1321
1329
|
/>
|
|
1322
1330
|
</div>
|
|
1323
1331
|
</div>
|
|
1324
|
-
`}function
|
|
1332
|
+
`}function AR(e){const{common:t,referencedMessage:n}=e,{chatbox:r,t:i,theme:o}=t,{Icon:s,CompactMessageContent:a}=o;return U`
|
|
1325
1333
|
<div className="t-theme-reply-bar">
|
|
1326
1334
|
<${s} className="t-reply-icon" type="reply" common=${t} />
|
|
1327
1335
|
|
|
@@ -1344,7 +1352,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1344
1352
|
<${s} className="t-close-icon" type="close" common=${t} />
|
|
1345
1353
|
</button>
|
|
1346
1354
|
</div>
|
|
1347
|
-
`}function
|
|
1355
|
+
`}function gR(e){return e.timestamp===-1?null:U`<${DR} ...${e} />`}function DR({timestamp:e,common:t}){const{t:n}=t,r=new Date(e).toLocaleString(n.locale,{weekday:"short",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),i=uA(e,n);return U`
|
|
1348
1356
|
<span className="t-theme-time-ago">
|
|
1349
1357
|
<span
|
|
1350
1358
|
role="time"
|
|
@@ -1354,7 +1362,7 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1354
1362
|
${i.short}
|
|
1355
1363
|
</span>
|
|
1356
1364
|
</span>
|
|
1357
|
-
`}function
|
|
1365
|
+
`}function OR(e){var _,g,D;const{common:t,conversation:n,isSelected:r}=e,{currentUser:i,theme:o,conversationList:s}=t,{TimeAgo:a,ConversationImage:l,CompactMessageContent:c}=o,{lastMessage:u}=n,h=Sa(n.id,10),d=h.length>=3,p=(_=u==null?void 0:u.sender)==null?void 0:_.name,f=(g=u==null?void 0:u.editedAt)!=null?g:u==null?void 0:u.createdAt,m=h.filter(S=>S.user.id!==i.id),E=m.length?m:h,A=(D=n.subject)!=null?D:E.map(S=>S.user.name).join(", ");return U`
|
|
1358
1366
|
<div
|
|
1359
1367
|
className="t-theme-conversation-list-item"
|
|
1360
1368
|
t-unread=${n.unreadMessageCount?"":void 0}
|
|
@@ -1390,11 +1398,11 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1390
1398
|
</div>
|
|
1391
1399
|
`}
|
|
1392
1400
|
|
|
1393
|
-
<${
|
|
1401
|
+
<${vR} ...${e} />
|
|
1394
1402
|
</div>
|
|
1395
1403
|
</div>
|
|
1396
1404
|
</div>
|
|
1397
|
-
`}function
|
|
1405
|
+
`}function vR({conversation:e}){const{isUnread:t,unreadMessageCount:n}=e;return t?n===0?U`<div className="t-unread-generic-dot" />`:n>999?U`
|
|
1398
1406
|
<div className="t-unread-dot">
|
|
1399
1407
|
<span>999+</span>
|
|
1400
1408
|
</div>
|
|
@@ -1402,4 +1410,4 @@ The {{app.name}} team`},smsSettings:{enabled:a.includes("sms_notifications"),sms
|
|
|
1402
1410
|
<div className="t-unread-dot">
|
|
1403
1411
|
<span>${n}</span>
|
|
1404
1412
|
</div>
|
|
1405
|
-
`:null}const
|
|
1413
|
+
`:null}const SR=new Promise(e=>{typeof document!="undefined"&&document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(void 0)});function Mc(e,t,n,r){const i=new Map,o=[],s=[];for(const[h,d]of(a=n,Object.entries(a))){const p=[h,h.toLowerCase(),TR(h)];for(const f of p)i.set(f,h);["string","boolean","number"].includes(d.type)&&o.push(...p),d.required!==!1&&s.push(h)}var a;const u=class u extends HTMLElement{constructor(){super(),this._renderRequested=!1,this._props={},this._renderRoot=null,this._ref={current:null};for(const[d,p]of i)if(Object.hasOwnProperty.call(this,d)){const f=this[d];this.updateProp(p,f),delete this[d]}else this.hasAttribute(d)&&this.syncAttributeToProp(d)}updateProp(d,p){const{type:f}=n[d];if(f==="boolean"&&typeof p=="string"?p=p!=="false":f==="number"&&typeof p=="string"&&(p=Number(p)),p===void 0){const m=d in this._props;return delete this._props[d],m}{const m=this._props[d]!==p;return this._props[d]=p,m}}syncAttributeToProp(d){const p=i.get(d);mt(p,`Attribute "${d}" should have matching prop`);const f=this.getAttribute(d);return this.updateProp(p,f)}async requestRender(){this.isConnected&&!this._renderRequested&&(this._renderRequested=!0,this._renderRequested=await!1,this.render())}render(){var d;this._renderRoot||(this._renderRoot=(d=this,{render:function(A){Bu(A,d)},unmount:function(){Hu(d)}}));const p=s.filter(A=>!(A in this._props));if(p.length>0)return r(p),void this._renderRoot.render(null);const f=Object.assign({},this._props),m=A=>{const _=[...Object.getOwnPropertyNames(A.current),...Object.getOwnPropertyNames(Object.getPrototypeOf(A.current))];for(const g of _)g!=="constructor"&&(typeof A.current[g]=="function"?this[g]=(...D)=>A.current[g](...D):Object.defineProperty(this,g,{enumerable:!0,get:()=>A.current[g]}))},E=e;this._renderRoot.render(L(E,{...f,ref:this._ref,__hostElement:this,__internalOnLoaded:()=>{m(this._ref)}}))}async connectedCallback(){await SR;for(const d of o)this.hasAttribute(d)&&this.syncAttributeToProp(d);this.requestRender()}disconnectedCallback(){this._renderRoot&&setTimeout(()=>{this._renderRoot&&(this._renderRoot.unmount(),this._renderRoot=null)})}attributeChangedCallback(d,p,f){p!==f&&this.syncAttributeToProp(d)&&this.requestRender()}};u.observedAttributes=o;let l=u;const c={};for(const[h,d]of i)c[h]={set(p){this.updateProp(d,p)&&this.requestRender()},get(){return this._props[d]}};return Object.defineProperties(l.prototype,c),Object.defineProperty(l,"name",{value:t}),l}function TR(e){return e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase())}function xc(e,t){const n=JSON.stringify(t).replace(",",", ");tn.error(`Could not initialize ${e} because the following required props are missing: ${n}.`)}const sf=Mc(RA,"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}},e=>xc("<t-chatbox>",e)),af=Mc(yA,"ConversationListElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},selectedConversationId:{type:"string",required:!1},theme:{type:"object",required:!1},token:{type:"string",required:!1},tokenFetcher:{type:"function",required:!1},host:{type:"string",required:!1},onSelectConversation:{type:"function",required:!1},themeCustom:{type:"object",required:!1}},e=>xc("<t-conversation-list>",e)),lf=Mc($T,"InboxElement",{__internalOnLoaded:{type:"function",required:!1},appId:{type:"string"},userId:{type:"string"},selectedConversationId:{type:"string",required:!1},mobileBreakPoint:{type:"number",required:!1},theme:{type:"object",required:!1},host:{type:"string",required:!1},enterSendsMessage:{type:"boolean",required:!1},chatHeaderVisible:{type:"boolean",required:!1},messageFieldVisible:{type:"boolean",required:!1},messageFieldSpellcheck:{type:"boolean",required:!1},messageFieldPlaceholder:{type:"string",required:!1},onSendMessage:{type:"function",required:!1},onDeleteMessage:{type:"function",required:!1},onMessageAction:{type:"function",required:!1},beforeBrowserPermissionPrompt:{type:"function",required:!1},onMissingBrowserPermission:{type:"function",required:!1},onSelectConversation:{type:"function",required:!1},themeCustom:{type:"object",required:!1}},e=>xc("<t-inbox>",e)),RR=Iu;customElements.get("t-chatbox")||customElements.define("t-chatbox",sf),customElements.get("t-conversation-list")||customElements.define("t-conversation-list",af),customElements.get("t-inbox")||customElements.define("t-inbox",lf),exports.AudioPlayer=zo,exports.ChatboxElement=sf,exports.ConversationListElement=af,exports.Editor=u_,exports.EmojiPicker=Ic,exports.EmojiSuggestBar=k_,exports.InboxElement=lf,exports.MentionSuggestList=rA,exports.MenuItem=Kn,exports.MessageContent=O_,exports.PopoverButton=oi,exports.Preact=$u,exports.ReactionPicker=S_,exports.Text=Sc,exports.VirtualMessage=aA,exports.Waveform=oA,exports.defaultTheme=RR,exports.formatDuration=va,exports.formatFilesize=Vo,exports.getGoogleMapsUrls=wc,exports.getPhotoUrlWithFallback=$r,exports.getRandomColor=lA,exports.html=U,exports.useParticipants=Sa,exports.useTimeAgo=uA,exports.userFriendlyDate=cA;
|