!function(ae,le,e){"use strict";var ce=function(n,r,o){var i;return function(){if(i){if(!o)return;clearTimeout(i)}var e=this,t=arguments;i=setTimeout(function(){i=null,n.apply(e,t)},r)}},ue=function(e,t,n,r){e.addEventListener(t,n,!!r)},se=function(e,t,n,r){e.removeEventListener(t,n,!!r)},fe=function(e){e.preventDefault(),e.stopPropagation()},pe=function(e,t,n){for(var r=n?t.parentNode:t;r;){if(r===e)return!0;r=r.parentNode}return!1},de=function(e){var t=e.nodeName;return"IMG"==t||"PICTURE"==t||"SVG"==t||"VIDEO"==t||"AUDIO"==t||"IFRAME"==t||"MAP"==t||"OBJECT"==t||"EMBED"==t},he=function(e){var t=ae.getSelection();return 0<t.rangeCount?t.getRangeAt(0):null},Ae=function(e,t){if(t){var n=ae.getSelection();n.removeAllRanges(),n.addRange(t)}},ge=function(e){return!!ae.getSelection().isCollapsed},ve=function(){var e=ae.getSelection();if(!e.isCollapsed)try{e.collapseToEnd()}catch(e){}},me=function(e,t){var n=ae.getSelection();if(pe(e,n.anchorNode)&&pe(e,n.focusNode))return!0;if(!t)return!1;var r=le.createRange();return r.selectNodeContents(e),r.collapse(!1),n.removeAllRanges(),n.addRange(r),!0},t=function(e,t){var f,n=t.toolbar,r=t.buttons,u=t.selectionbuttons,l=t.suggester,c=t.interceptenter,o=!!t.hijackmenu,p="string"==typeof e?le.querySelector(e):e,i=p.querySelector("textarea"),s={},d="top"==n,a="bottom"==n,h="demand"==n,A=function(e,t){e.classList?e.classList.add(t):e.className+=" "+t},g=function(e,t){e.classList&&e.classList.remove(t)},v=p.querySelector("[contenteditable=true]");if(!v){(v=le.createElement("div")).setAttribute("contentEditable","true");var m=i.placeholder;m&&v.setAttribute("data-placeholder",m),p.insertBefore(v,p.firstChild)}var E=null,b=function(){E&&clearTimeout(E),E=null,A(p,"focus"),h&&A(p,"focused")},w=function(){E||le.activeElement==v||(E=setTimeout(function(){E=null,g(p,"focus")},50))};ue(v,"focus",b),ue(v,"blur",w),i&&i.form&&ue(i.form,"reset",w);var C=function(e,o){var i=le.createElement("input");i.placeholder="www.example.com",o&&(i.value=o.href),i.autofocus=!0,o&&ue(i,"input",function(e){var t=i.value.trim();t&&(o.href=t)}),ue(i,"keydown",function(e){if("Enter"==("key"in e?e.key:13==(e.which||e.keyCode)?"Enter":"")){var t=i.value.trim();if(o);else if(t){var n=t;if(/^[a-z0-9]+:\/\//.test(t)||(n="http://"+t),f.getSelectedHTML())f.insertLink(n);else{var r=function(e){return e.replace(/[&<>"]/g,function(e){return{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"}[e]||e})};f.insertHTML('<a href="'+r(n)+'">'+r(t)+"</a>")}}f.closePopup().collapseSelection(),v.focus()}}),A(e,"hyperlink"),e.appendChild(i),ae.setTimeout(function(){i.focus(),b()},1)},B=function(e,n){var t=function(e,t,n){var r,o,i,a,l,c,u,s;switch(c=n*(1-t),u=n*(1-(l=6*e-(a=Math.floor(6*e)))*t),s=n*(1-(1-l)*t),a%6){case 0:r=n,o=s,i=c;break;case 1:r=u,o=n,i=c;break;case 2:r=c,o=n,i=s;break;case 3:r=c,o=u,i=n;break;case 4:r=s,o=c,i=n;break;case 5:r=n,o=c,i=u}var f=Math.floor(255*r).toString(16),p=Math.floor(255*o).toString(16),d=Math.floor(255*i).toString(16);return"#"+(f.length<2?"0":"")+f+(p.length<2?"0":"")+p+(d.length<2?"0":"")+d},r=le.createElement("table");r.style.borderCollapse="collapse";for(var o=1;o<15;++o){for(var i=le.createElement("tr"),a=0;a<25;++a){var l;if(24==a){var c=Math.floor(255/13*(14-o)).toString(16),u=(c.length<2?"0":"")+c;l="#"+u+u+u}else{l=t(a/24,o<=8?o/8:1,8<o?(16-o)/8:1)}var s=le.createElement("td");s.style.backgroundColor=l,s.title=l,ue(s,"click",function(e){var t=this.title;n?f.forecolor(t).closePopup().collapseSelection():f.highlight(t).closePopup().collapseSelection(),fe(e)}),i.appendChild(s)}r.appendChild(i)}A(e,"palette"),e.appendChild(r)},k=function(t,l){if(67108864<t.size)l();else{var n=le.createElement("img");n.onload=function(){if(2==n.width&&3==n.height)return(e=new FileReader).onload=function(e){l(t.type,e.target.result)},e.onerror=function(e){l()},void e.readAsDataURL(t);var e,s=function(a){var e=new FileReader;e.onload=function(e){if(!a||1==a||8<a)return l(t.type,e.target.result);var i=new Image;i.onload=function(){var e=i.naturalWidth||i.width,t=i.naturalHeight||i.height,n=le.createElement("canvas"),r=n.getContext("2d");switch(n.width=4<a?t:e,n.height=4<a?e:t,a){case 2:r.transform(-1,0,0,1,e,0);break;case 3:r.transform(-1,0,0,-1,e,t);break;case 4:r.transform(1,0,0,-1,0,t);break;case 5:r.transform(0,1,1,0,0,0);break;case 6:r.transform(0,1,-1,0,t,0);break;case 7:r.transform(0,-1,-1,0,t,e);break;case 8:r.transform(0,-1,1,0,0,e)}r.drawImage(i,0,0,e,t);var o=n.toDataURL("image/jpeg",.99);l("image/jpeg",o)},i.src=e.target.result},e.onerror=function(e){l()},e.readAsDataURL(t)};if(!ae.DataView)return s();(e=new FileReader).onload=function(e){var t=e.target.result,n=new DataView(t);if(65496!=n.getUint16(0,!1))return s();for(var r=n.byteLength,o=2;o<r;){if(n.getUint16(o+2,!1)<=8)return s();var i=n.getUint16(o,!1);if(o+=2,65505==i){if(1165519206!=n.getUint32(o+=2,!1))return s();var a=18761==n.getUint16(o+=6,!1);o+=n.getUint32(o+4,a);var l=n.getUint16(o,a);o+=2;for(var c=0;c<l;++c)if(274==n.getUint16(o+12*c,a)){var u=n.getUint16(o+12*c+8,a);return s(u)}}else{if(65280!=(65280&i))break;o+=n.getUint16(o,!1)}}return s()},e.onerror=function(e){l()},e.readAsArrayBuffer(t)},n.src="data:image/jpeg;base64,/9j/4QAiRXhpZgAATU0AKgAAAAgAAQESAAMAAAABAAYAAAAAAAD/2wCEAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAf/AABEIAAIAAwMBEQACEQEDEQH/xABRAAEAAAAAAAAAAAAAAAAAAAAKEAEBAQADAQEAAAAAAAAAAAAGBQQDCAkCBwEBAAAAAAAAAAAAAAAAAAAAABEBAAAAAAAAAAAAAAAAAAAAAP/aAAwDAQACEQMRAD8AG8T9NfSMEVMhQvoP3fFiRZ+MTHDifa/95OFSZU5OzRzxkyejv8ciEfhSceSXGjS8eSdLnZc2HDm4M3BxcXwH/9k="}};function S(r,o){for(var i=[],a=0,e=0;e<r.length;++e)!function(n){k(r[n],function(e,t){for(i[n]=function(){t&&o(e,t)};a in i;)i[a](),a++;a==r.length&&(i=null)})}(e)}var y,L=function(e,t,n){for(var r=p,o=r.offsetParent;r;){if("static"!=getComputedStyle(r).position)break;t+=r.offsetLeft,n+=r.offsetTop,r=(o=r).offsetParent}o.appendChild(e);var i=o.getBoundingClientRect(),a=le.documentElement,l=Math.min(ae.innerWidth,Math.max(a.offsetWidth,a.scrollWidth)),c=ae.innerHeight,u=e.offsetWidth,s=e.offsetHeight;i.left+t<1?t=1-i.left:i.left+t+u>l-1&&(t=Math.max(1-i.left,l-1-i.left-u)),i.top+n<1?n=1-i.top:i.top+n+s>c-1&&(n=Math.max(1-i.top,c-1-i.top-s)),e.style.left=parseInt(t)+"px",e.style.top=parseInt(n)+"px"},Q=null,R=function(e,t,n,r){var o=f.activePopup();for(o&&Q===t?(g(o,"animate-down"),g(o,"animate-up")):(o=f.openPopup(),A(o,"wysiwyg-popup"),A(o,e?"animate-down":"animate-up"),Q=t);o.firstChild;)o.removeChild(o.firstChild);return n(o,r),o},M=function(e,t,n,r){var o=R(!!d,t,n,r),i=p.getBoundingClientRect(),a=e.getBoundingClientRect(),l=a.left-i.left+parseInt(e.offsetWidth/2)-parseInt(o.offsetWidth/2),c=a.top-i.top;d?c+=e.offsetHeight:c-=o.offsetHeight,L(o,l,c)},T=function(e,t){var n=p.getBoundingClientRect(),r=v.getBoundingClientRect(),o=t.left+parseInt(t.width/2)-parseInt(e.offsetWidth/2)+r.left-n.left,i=t.top+t.height+r.top-n.top;L(e,o,i)},H=function(e,t,n,r){var o=R(!0,t,n,r);T(o,e)},P=null,D=null,N=function(o,i,e,c){e.forEach(function(a){if(a instanceof HTMLElement)return o.appendChild(a),ue(a,"focus",b),void ue(a,"blur",w);var l=le.createElement("button");if(A(l,"btn"),"icon"in a){var e=le.implementation.createHTMLDocument("");e.body.innerHTML=a.icon;for(var t=e.body.firstChild;null!==t;t=t.nextSibling)l.appendChild(t)}if("attr"in a)for(var n in a.attr)l.setAttribute(n,a.attr[n]);ue(l,"focus",b),ue(l,"blur",w);var r=null;"click"in a?r=function(){a.click(f,l)}:"popup"in a?r=function(){var e=function(e){a.popup(f,e,l)};i?H(i,e.toString(),e):M(l,e.toString(),e)}:"browse"in a||"dataurl"in a?r=function(){f.closePopup().collapseSelection();var o=le.createElement("input");o.type="file",o.multiple=!0,o.style.display="none",ue(o,"change",function(e){var t="dataurl"in a;if(e.target.files)if("browse"in a)for(var n=i.target.files,r=0;r<n.length;++r)a.browse(f,o,n[r],l);else S(i.target.files,function(e,t){a.dataurl(f,e,t,l)});else t=!0;t&&o.parentNode.removeChild(o),fe(e)}),p.appendChild(o);var i=le.createEvent("MouseEvents");i.initEvent("click",!0,!1),o.dispatchEvent(i)}:"action"in a&&(r=function(){switch(a.action){case"link":i?H(i,"link",C,D):M(l,"link",C,D);break;case"bold":f.bold().closePopup().collapseSelection();break;case"italic":f.italic().closePopup().collapseSelection();break;case"underline":f.underline().closePopup().collapseSelection();break;case"strikethrough":f.strikethrough().closePopup().collapseSelection();break;case"colortext":i?H(i,"colortext",B,!0):M(l,"colortext",B,!0);break;case"colorfill":i?H(i,"colorfill",B,!1):M(l,"colorfill",B,!1);break;case"subscript":f.subscript().closePopup().collapseSelection();break;case"superscript":f.superscript().closePopup().collapseSelection();break;case"orderedlist":f.orderedList().closePopup().collapseSelection();break;case"unorderedlist":f.unorderedList().closePopup().collapseSelection();break;case"clearformat":f.removeFormat().closePopup().collapseSelection()}}),l.onclick=function(e){r&&r(),fe(e)},o.appendChild(l),"hotkey"in a&&r&&c&&(c[a.hotkey.toLowerCase()]=r)})},I=null,x=1,U=null,O=function(e){e&&f.expandSelection(I.length,0).insertHTML(e),U=I=null,x+=1,f.closePopup()},F=ce(function(){if(I){var t=x;l(I,function(e){P&&t==x&&(U=null,e?H(P,"suggestion",function(n){e.forEach(function(t){var e=le.createElement("div");A(e,"suggestion"),e.innerHTML=t.label,ue(e,"click",function(e){O(t.insert),fe(e)}),n.appendChild(e),null===U&&(U=t.insert)})}):O())})||O()}},100,!0),W=function(e,n,t,r){if(P=e?n||P:null,D=null,n)if(e&&null!==I){var o=f.activePopup();o&&(g(o,"animate-down"),g(o,"animate-up"),T(o,n))}else{for(var i=0;i<t.length;++i){var a=t[i],l=a.closest||function(e){for(var t=this;t;){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;if(n&&n.call(t,e))return t;t=t.parentElement}return null};if(D=l.call(a,"a"))break}var c=!0;r||(u?e?c=!1:t.forEach(function(e){de(e)&&(c=!1)}):c=!1),c?H(n,"selection",function(e){var t=le.createElement("div");A(t,"toolbar"),e.appendChild(t),N(t,n,u)}):O()}else O()},X=function(){b()},j=function(){O(),w()},z=null,_=null;if(i){!v.innerHTML&&i.value&&(v.innerHTML=i.value);var q=v.innerHTML;if(z=function(){var e=v.innerHTML;e.match(/^<br[/ ]*>$/i)&&(e=v.innerHTML=""),e!=q&&(i.value=e,q=e)},ue(v,"focus",function(){var e=le.createEvent("Event");e.initEvent("focus",!1,!1),i.dispatchEvent(e)}),ue(v,"blur",function(){z();var e=le.createEvent("Event");e.initEvent("blur",!1,!1),i.dispatchEvent(e)}),_=ce(z,250,!0),ue(v,"input",_),ue(v,"propertychange",_),ue(v,"textInput",_),ue(v,"paste",_),ue(v,"cut",_),ue(v,"drop",_),ae.MutationObserver)new MutationObserver(_).observe(v,{attributes:!0,childList:!0,characterData:!0,subtree:!0});var K=i.form;K&&ue(K,"reset",function(){v.innerHTML="",_(),y(!0),g(p,"focused")})}var V=null,Y=null;Y=ce(function(e,t,n){var r=ge(),o=function(e){var t=ae.getSelection();if(!t.rangeCount)return[];for(var n=[],r=0;r<t.rangeCount;++r)for(var o=(c=t.getRangeAt(r)).startContainer,i=c.endContainer;o;){if(o!=e){var a=!1;if(t.containsNode)a=t.containsNode(o,!0);else{var l=le.createRange();for(l.selectNodeContents(o),r=0;r<t.rangeCount;++r){var c;if(0<=(c=t.getRangeAt(r)).compareBoundaryPoints(c.END_TO_START,l)&&c.compareBoundaryPoints(c.START_TO_END,l)<=0){a=!0;break}}}a&&n.push(o)}o=function(e,t){if(e.firstChild)return e.firstChild;for(;e;){if(e==t)return null;if(e.nextSibling)return e.nextSibling;e=e.parentNode}return null}(o,o==i?i:e)}return 0==n.length&&pe(e,t.focusNode)&&t.focusNode!=e&&n.push(t.focusNode),n}(v),i=null===e||null===t?null:{left:e,top:t,width:0,height:0},a=function(){var e=ae.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).cloneRange();if((o=t.getBoundingClientRect())&&o.left&&o.top&&o.right&&o.bottom)return{left:parseInt(o.left),top:parseInt(o.top),width:parseInt(o.right-o.left),height:parseInt(o.bottom-o.top)};for(var n=t.getClientRects?t.getClientRects():[],r=0;r<n.length;++r){var o;if((o=n[r]).left&&o.top&&o.right&&o.bottom)return{left:parseInt(o.left),top:parseInt(o.top),width:parseInt(o.right-o.left),height:parseInt(o.bottom-o.top)}}return!1}();if(a&&(i=a),i){var l=v.getBoundingClientRect();i.left-=parseInt(l.left),i.top-=parseInt(l.top),i.left<0&&(i.left=0),i.top<0&&(i.top=0),i.width>v.offsetWidth&&(i.width=v.offsetWidth),i.height>v.offsetHeight&&(i.height=v.offsetHeight)}else if(o.length)for(var c=0;c<o.length;++c){var u=o[c];if(u.nodeType==Node.ELEMENT_NODE){i={left:u.offsetLeft,top:u.offsetTop,width:u.offsetWidth,height:u.offsetHeight};break}}W(r,i,o,n)},1);var G=null,Z=function(e){var t=e.target||e.srcElement;t.nodeType==Node.TEXT_NODE&&(t=t.parentNode),pe(G,t)||J()},J=function(){G&&(G.parentNode.removeChild(G),se(ae,"mousedown",Z,!(G=null)),j())};function $(e){if("key"in e){var t=e.key;switch(t){case"Spacebar":return" ";case"Left":return"ArrowLeft";case"Up":return"ArrowUp";case"Right":return"ArrowRight";case"Down":return"ArrowDown";case"Esc":return"Escape"}return t}switch(e.which||e.keyCode){case 8:return"Backspace";case 13:return"Enter";case 27:return"Escape";case 33:return"PageUp";case 34:return"PageDown";case 35:return"End";case 36:return"Home";case 37:return"ArrowLeft";case 38:return"ArrowUp";case 39:return"ArrowRight";case 40:return"ArrowDown"}return String.fromCharCode(e.which||e.keyCode||e.charCode)}ue(v,"keydown",function(e){var t=$(e),n=e.shiftKey||!1,r=e.altKey||!1,o=e.ctrlKey||!1,i=e.metaKey||!1;if(c&&"Enter"==t&&!n&&!r&&!o&&!i&&(f.sync(),c()))return f.closePopup(),void fe(e);if(1==t.length&&!n&&!r&&o&&!i){var a=t.toLowerCase();if(s[a])return s[a](),void fe(e)}!l||function(e){switch(e){case"Backspace":if(I&&(I=I.slice(0,-1)),!I)return O(),!0;break;case"Enter":if(U)return O(U),!1;case"Escape":case"PageUp":case"PageDown":case"End":case"Home":case"ArrowLeft":case"ArrowUp":case"ArrowRight":case"ArrowDown":if(I)return O(),!0}return F(),!0}(t)?V&&(V=he()):fe(e)}),ue(v,"keypress",function(e){var t,n=$(e);if(!l||(1==(t=n).length&&(I||(I=""),I+=t),F(),1)){if(V&&(V=he()),Y&&Y(null,null,!1),_)switch(n){case"PageUp":case"PageDown":case"End":case"Home":case"ArrowLeft":case"ArrowUp":case"ArrowRight":case"ArrowDown":break;default:_()}}else fe(e)}),ue(v,"keyup",function(e){V&&(V=he()),Y&&Y(null,null,!1)});var ee=function(e,t){var n=null,r=null;e.clientX&&e.clientY?(n=e.clientX,r=e.clientY):e.pageX&&e.pageY&&(n=e.pageX-ae.pageXOffset,r=e.pageY-ae.pageYOffset),e.which&&3==e.which?t=!0:e.button&&2==e.button&&(t=!0),se(ae,"mouseup",ee),V&&(V=he()),!o&&t||Y&&Y(n,r,t)},te=null;ue(v,"mousedown",function(e){se(ae,"mouseup",ee),ue(ae,"mouseup",ee),te=e.target}),ue(v,"mouseup",function(e){var t=e.target;if(t&&t.nodeType==Node.ELEMENT_NODE&&t===te&&de(t)&&pe(v,t,!0)){var n=ae.getSelection(),r=le.createRange();r.setStartBefore(t),r.setEndAfter(t),n.removeAllRanges(),n.addRange(r)}ee(e),_&&_()}),ue(v,"dblclick",function(e){ee(e)}),ue(v,"selectionchange",function(e){ee(e)}),o&&ue(v,"contextmenu",function(e){ee(e,!0),fe(e)});var ne=function(e,t,n){if(Ae(0,V),v.focus(),!me(v,n))return!1;try{return!(le.queryCommandSupported&&!le.queryCommandSupported(e))&&le.execCommand(e,!1,t)}catch(e){}return!1};function re(e){if(!e)return!1;var t=[];if(e.items)for(var n=e.items,r=0;r<n.length;++r){var o=n[r];if(o.type.match(/^image\//)){var i=o.getAsFile();t.push(i)}}else if(e.files){var a=e.files;for(r=0;r<a.length;++r)t.push(a[r])}return!!t.length&&(S(t,function(e,t){ne("insertImage",t)}),!0)}if(ue(v,"paste",function(e){re(e.clipboardData)&&fe(e)}),ue(v,"drop",function(e){re(e.dataTransfer)&&fe(e)}),y=function(e){_&&_(),e?(ve(),V=null):V&&(V=he())},f={sync:function(){return z&&z(),this},getHTML:function(){return v.innerHTML},setHTML:function(e){return v.innerHTML=e||"",y(!0),this},getSelectedHTML:function(){return Ae(0,V),me(v)?function(e){if(ge())return null;var t=ae.getSelection();if(t.rangeCount){for(var n=le.createElement("div"),r=t.rangeCount,o=0;o<r;++o){var i=t.getRangeAt(o).cloneContents();n.appendChild(i)}return n.innerHTML}return null}():null},collapseSelection:function(){return ve(),V=null,this},expandSelection:function(e,t){return Ae(0,V),me(v)&&(function(e,t,n){var r=ae.getSelection();if(r.modify){for(var o=0;o<t;++o)r.modify("extend","backward","character");for(o=0;o<n;++o)r.modify("extend","forward","character")}else{var i=r.getRangeAt(0);i.setStart(i.startContainer,i.startOffset-t),i.setEnd(i.endContainer,i.endOffset+n),r.removeAllRanges(),r.addRange(i)}}(0,e,t),V=he()),this},openPopup:function(){return V||(V=he()),function(){if(G)return G;ue(ae,"mousedown",Z,!0),G=le.createElement("DIV");var e=v.parentNode,t=v.nextSibling;return t?e.insertBefore(G,t):e.appendChild(G),X(),G}()},activePopup:function(){return G},closePopup:function(){return J(),this},removeFormat:function(){return ne("removeFormat"),ne("unlink"),y(),this},bold:function(){return ne("bold"),y(),this},italic:function(){return ne("italic"),y(),this},underline:function(){return ne("underline"),y(),this},strikethrough:function(){return ne("strikeThrough"),y(),this},forecolor:function(e){return ne("foreColor",e),y(),this},highlight:function(e){return ne("hiliteColor",e)||ne("backColor",e),y(),this},fontName:function(e){return ne("fontName",e),y(),this},fontSize:function(e){return ne("fontSize",e),y(),this},subscript:function(){return ne("subscript"),y(),this},superscript:function(){return ne("superscript"),y(),this},insertLink:function(e){return ne("createLink",e),y(!0),this},insertImage:function(e){return ne("insertImage",e,!0),y(!0),this},insertHTML:function(e){return ne("insertHTML",e,!0)||(Ae(0,V),me(v,!0),function(e,t){var n=ae.getSelection();if(n.getRangeAt&&n.rangeCount){var r=n.getRangeAt(0),o=le.createElement("div");o.innerHTML=t;for(var i,a,l=le.createDocumentFragment();i=o.firstChild;)a=l.appendChild(i);pe(e,r.commonAncestorContainer)?(r.deleteContents(),r.insertNode(l)):e.appendChild(l),a&&((r=r.cloneRange()).setStartAfter(a),r.collapse(!0),n.removeAllRanges(),n.addRange(r))}}(v,e)),y(!0),this},orderedList:function(){return ne("insertOrderedList"),y(),this},unorderedList:function(){return ne("insertUnorderedList"),y(),this}},r){var oe=le.createElement("div");if(A(oe,"toolbar"),d)A(oe,"toolbar-top"),p.insertBefore(oe,p.firstChild);else if(a)A(oe,"toolbar-bottom"),p.appendChild(oe);else{var ie=le.createElement("div");A(ie,"toolbar-auto"),p.appendChild(ie),ie.appendChild(oe)}N(oe,null,r,s)}return f};"undefined"!=typeof module&&void 0!==module.exports?module.exports=t:ae.wysiwyg=t}(window,document);
!function(t){"loading"!=document.readyState?t(window,document):document.addEventListener("DOMContentLoaded",(function(e){t(window,document)}))}((function(t,e){"use strict";var n={plural:function(t){return 1==t?"one":"other"},digits:null,"year-one":"{#} year ago","year-other":"{#} years ago","year+one":"in {#} year","year+other":"in {#} years","month-one":"{#} month ago","month-other":"{#} months ago","month+one":"in {#} month","month+other":"in {#} months","week-one":"{#} week ago","week-other":"{#} weeks ago","week+one":"in {#} week","week+other":"in {#} weeks","day-one":"{#} day ago","day-other":"{#} days ago","day+one":"in {#} day","day+other":"in {#} days","hour-one":"{#} hour ago","hour-other":"{#} hours ago","hour+one":"in {#} hour","hour+other":"in {#} hours","minute-one":"{#} minute ago","minute-other":"{#} minutes ago","minute+one":"in {#} minute","minute+other":"in {#} minutes","second-one":"{#} second ago","second-other":"{#} seconds ago","second+one":"in {#} second","second+other":"in {#} seconds"},i={image:"Insert image",attach:"Attach files",smileys:"Smilies",link:"Insert link",bold:"Bold",italic:"Italic",underline:"Underline",striketrough:"Strikethrough",textcolor:"Text color",backcolor:"Background color",clear:"Clear format"},a={submit:"Submit",placeholder:"Write message",videochat:"Video chat",groupchat:"Group conversation",groupjoin:"Invite user",groupleave:"Leave conversation",clear:"Delete conversation",enlarge:"Enlarge",close:"Close",description:"Description"},o=t.init||{},r=o.i18n||{},l=o.language||"",c=o.synchronizer||"",u=o.quiesced||null,s=new Date,f=e.documentElement,h=e.body,d=t.navigator;function p(){for(var t=1;t<arguments.length;++t)for(var e in arguments[t])arguments[t].hasOwnProperty(e)&&(arguments[0][e]=arguments[t][e]);return arguments[0]}var v=p(n,r.datetime||{}),m=p(i,r.wysiwyg||{}),g=p(a,r.chat||{}),w=[];function y(t){if(null!==w){t&&w.push(t);var n=e.createElement("script");n.type="text/javascript",n.src="/static/player.tg.js",n.async=!0,n.readyState?n.onreadystatechange=function(){"loaded"!=n.readyState&&"complete"!=n.readyState||(n.onreadystatechange=null,i())}:n.onload=i,e.head.appendChild(n)}else t();function i(){null!==w&&(w.forEach((function(t){t()})),w=null)}}function b(){if(t.performance){if(performance.now)return performance.now();if(performance.webkitNow)return performance.webkitNow();if(performance.mozNow)return performance.mozNow();if(performance.msNow)return performance.msNow()}return(new Date).getTime()}function x(e,n,i){var a=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(e){t.setTimeout((function(){e(b())}),1e3/60)};function o(t){return t<.5?function(t){return Math.pow(t,2)}(2*t)/2:function(t){return 1-Math.abs(Math.pow(t-1,2))}(2*t-1)/2+.5}var r=b();a((function t(l){var c=(l-r)/e;if(c>=1)i();else{var u=o(c);n(u),a(t)}}))}var k=0;function M(){return k+++";"+(new Date).getTime().toString(36)+";"+b().toString(36)+";"+Math.random().toString(36).substring(2)}var E={};function C(e,n){var i=null;if(t.WeakMap)E.has(e)&&(i=E.get(e));else{if(!("_id"in e))return null;i=E[e._id]}return i&&n in i?i[n]:null}function z(e,n,i){if(t.WeakMap)if(E.has(e))E.get(e)[n]=i;else{var a={};a[n]=i,E.set(e,a)}else"_id"in e||(e._id=M()),e._id in E||(E[e._id]={}),E[e._id][n]=i}function T(t,e,n){var i;return function(){if(i){if(!n)return;clearTimeout(i)}var a=this,o=arguments;i=setTimeout((function(){i=null,t.apply(a,o)}),e)}}function H(t,e,n,i){(Array.isArray(e)?e:[e]).forEach((function(e){t.addEventListener(e,n,!!i)}))}function S(t,e,n,i){(Array.isArray(e)?e:[e]).forEach((function(e){t.removeEventListener(e,n,!!i)}))}function A(t,n){var i;"function"==typeof Event?i=new Event(n,{bubbles:!1,cancelable:!0}):(i=e.createEvent("Event")).initEvent(n,!1,!0),t.dispatchEvent(i)}function L(t){t.stopPropagation(),t.preventDefault()}function B(t,e,n){var i=n?t.querySelector(n):t;i&&(i.classList?i.classList.add(e):i.setAttribute("class",e))}function I(t,e){return t.classList.contains(e)}function P(t,e){t.classList.remove(e)}function O(t,e,n){for(var i=n?e.parentNode:e;i;){if(i===t)return!0;i=i.parentNode}return!1}function N(t,e){return t.hasAttribute(e)}function R(t,e){return t.getAttribute(e)}function V(t,e){var n=t.getAttribute(e);return n?JSON.parse(n):null}function D(t,e,n){t.setAttribute(e,n)}function W(t,e){t.removeAttribute(e)}function q(t,e){(Array.isArray(e)?e:[e]).forEach((function(e){e&&t.appendChild(e)}))}function U(t,n,i){var a=e.createElement(t);if(n)for(var o in n)n.hasOwnProperty(o)&&D(a,o,n[o]);return i&&("string"==typeof i?a.innerHTML=i:q(a,i)),a}function j(t){return e.createTextNode(t)}function F(t){(Array.isArray(t)?t:[t]).forEach((function(t){var e=t.parentNode;e&&e.removeChild(t)}))}function X(t,e){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];t.style[n]=i,i||t.style.removeProperty(n)}}function Y(t,e,n){if(n&&t.matches(e))return t;if("closest"in t)return t.closest(e);var i=t;do{if(i.matches(e))return i;i=i.parentNode}while(null!==i&&i.nodeType===Node.ELEMENT_NODE);return null}function G(t,e){var n=[];t.matches(e)&&n.unshift(t);for(var i=t.querySelectorAll(e),a=0;a<i.length;++a)n.push(i[a]);return n}function J(t,e){for(var n=[],i=0;i<t.children.length;++i){var a=t.children[i];e&&!a.matches(e)||n.push(a)}return n}function Q(t,e){for(var n=t.nextElementSibling;null!==n;){if(!e||n.matches(e))return n;n=n.nextElementSibling}return null}function _(t,e){for(var n=t.previousElementSibling;null!==n;){if(!e||n.matches(e))return n;n=n.previousElementSibling}return null}function K(t,e){for(var n=[],i=t.firstChild;null!==i;i=i.nextSibling)e&&!i.matches(e)||n.push(i);return F(n),n}function $(t){return t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Z(){var e=t.innerWidth,n=t.innerHeight;return"ontouchstart"in t&&(e<=650&&n<=900||e<=900&&n<=650)}function tt(t){return t&&"rtl"==(t.dir||"").toLowerCase()}t.WeakMap&&(E=new WeakMap),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector);var et=[];function nt(e,n){var i,a="",o=t.URLSearchParams?t.URLSearchParams:null,r=o&&"a=1"===new o({a:1}).toString(),l=o&&"+"===new o("s=%2B").get("s"),c=!o||((i=new o).append("s"," &"),"s=+%26"===i.toString());if(o&&r&&l&&c){a=new o(e).toString()}else{if(e instanceof FormData)return null;for(var u in e)e.hasOwnProperty(u)&&(a+=(""==a?"":"&")+encodeURIComponent(u)+"="+encodeURIComponent(e[u]))}return(n||"")+"/"+(""!=a?"?"+a:"")}function it(n){var i=null,a=t.URL||t.webkitURL;if("function"==typeof a){var o=new a(n);if(!o)return null;i=(o.pathname||"/")+o.search}else{var r=e.createElement("a");r.href=n,i=("/"!==r.pathname.charAt(0)?"/":"")+r.pathname+r.search}return i.match(/^\/language\/[0-9A-Za-z]{25}$/i)&&(i="/"),i}function at(t,o,r,u,s,f,h){var d={};if("object"==typeof r)for(var w in r)r.hasOwnProperty(w)&&(d[w]=r[w]);"language"in d?l=d.language:l&&(d.language=l),c&&!("synchronizer"in d)&&(d.synchronizer=c);var y,b=t?"POST":"GET",x="/";if(o instanceof FormData)y=o,"string"==typeof r&&(x=r);else if(o){for(var w in(y=new FormData(o)).has&&y.delete&&G(o,"input[data-fileupload],textarea[data-fileupload]").forEach((function(t){var e=R(t,"name");if(e&&y.has(e)){var n=t.value;if(n&&!(n.length<1048576)){y.delete(e);var i=new Blob([n],{type:"text/html"});y.append(e,i,"document.html")}}})),"function"==typeof r&&r(y),d)if(d.hasOwnProperty(w)){(y.has?y.has(w):0!=G(o,"[name='"+w+"']").length)||y.append(w,d[w])}if(!t)(k=nt(y))&&k.length<4096?(x=k,y=void 0):b="POST"}else if(t||"string"!=typeof r){var k,M=!1;if(!t)(k=nt(d)).length<4096&&(x=k,M=!0);if(!M){for(var w in y=new FormData,d)d.hasOwnProperty(w)&&y.append(w,d[w]);b="POST"}}else x=r;var E=new XMLHttpRequest;return E.open(b,x,!0),E.responseType="application/json"==h?"json":"text",E.setRequestHeader("Accept",h||"text/html,*/*;q=0.9"),E.onload=function(){if(200==E.status)if(u)if(h)u(E.response);else{var t=null;try{var o=new DOMParser;o&&(t=o.parseFromString(E.response,"text/html"))}catch(C){}t||((t=e.implementation.createHTMLDocument("")).documentElement.innerHTML=E.response),G(t.head,"script:not([src])").forEach((function(t){var e=t.textContent;if(e){var o=new Function(e+";return init;")();if(o){o.language&&(l=o.language),o.synchronizer&&(c=o.synchronizer);var r=o.i18n||{};r.datetime&&(v=p(n,r.datetime)),r.wysiwyg&&(m=p(i,r.wysiwyg)),r.chat&&(g=p(a,r.chat))}}}));var r=null;G(t.head,"link[rel=canonical]").forEach((function(t){if(!r){var e=R(t,"href");e&&(r=it(e))}}));var f=t.body,d=G(f,"header"),w=G(f,"main"),y=G(f,".content aside"),b=G(f,"footer"),x=G(f,".nav-back"),k=G(f,".nav-next"),M=function(t){if(0==t.length)return null;var e=J(t[0]);return 0==e.length?null:e};u({document:t,rtl:tt(t.documentElement),title:t.title||null,url:r||null,body:f,header:M(d),main:M(w),aside:M(y),footer:M(b),back:0!=x.length?x.shift():null,next:0!=k.length?k.shift():null})}else;else s&&s()},E.onerror=function(t){s&&s()},t||(E.timeout=3e4),E.ontimeout=function(t){s&&s()},E.withCredentials=!0,E.upload&&f&&(E.upload.onprogress=function(t){f(t.loaded,t.total)}),E.send(y),function(){E.abort()}}function ot(){var t=null;return function(e,n,i,a,o,r,l){return t&&t(),t=at(e,n,i,(function(e){t=null,a&&a(e)}),(function(){t=null,o&&o()}),r,l),function(){t&&t(),t=null}}}H(t,["scroll","resize","orientationchange"],(function(){et.forEach((function(t){t()}))}));var rt=null,lt=null,ct=!1;var ut=[];function st(t,e){ut.push([t,e])}function ft(t,e){ut.forEach((function(n){var i=n[0];G(t,i).forEach((function(t){var a="init:"+i;C(t,a)||(z(t,a,!0),n[1](t,e))}))}))}var ht=t.innerWidth-Math.min(f.offsetWidth,t.innerWidth);ht&&f.style.setProperty("--scrollbar",ht+"px");var dt=0,pt=[];function vt(){(dt+=1)>1||(B(f,"lock"),f.offsetWidth,pt.forEach((function(t){t()})))}function mt(){0!=dt&&0==(dt-=1)&&(P(f,"lock"),X(h,{paddingLeft:null,paddingRight:null}))}function gt(t,e,n,i){var a=Array.isArray(n)?n:[n];"prepend"!=e&&"after"!=e||a.reverse(),a.forEach((function(n){switch(e){case"before":t.parentNode.insertBefore(n,t);break;case"prepend":t.insertBefore(n,t.firstChild);break;case"append":t.appendChild(n);break;case"after":t.parentNode.insertBefore(n,t.nextSibling)}ft(n,!0),i&&(B(n,"fade-in"),setTimeout((function(){P(n,"fade-in")}),1e3))}))}function wt(e,n){var i=e.getBoundingClientRect(),a=f.clientWidth||t.innerWidth,o=(f.clientHeight||t.innerHeight)*(n||1),r=i.top<=o&&i.top+i.height>=0,l=i.left<=a&&i.left+i.width>=0;return r&&l}st("input#login,input#aside",(function(t){H(t,"change",(function(e){t.checked?vt():mt()}))}));var yt=T((function(){G(f,"[data-unveil]").forEach((function(t){bt(t)}))}),50);function bt(t){if(!Y(t,".window")){var e=Y(t,"[data-scroll]");if(wt(e||t,1.2)){if(e){var n=t.offsetTop-e.scrollTop-(t.offsetParent===e.offsetParent?e.offsetTop:0),i=t.offsetHeight,a=e.offsetHeight,o=1*a/3;if(n+i+o<0)return;if(n>a+o)return}if(!C(t,"unveil")){z(t,"unveil",!0);var r=V(t,"data-unveil");r&&at(!1,null,r,(function(n){var i=null;if(e&&!t.previousElementSibling){i=e.scrollTop;var a=getComputedStyle(t);i-=t.offsetHeight+parseInt(a.marginTop)+parseInt(a.marginBottom)}var o=n.header||n.main;o&&gt(t,"before",o,!0),null!==i&&(o.forEach((function(t){var e=getComputedStyle(t);i+=t.offsetHeight+parseInt(e.marginTop)+parseInt(e.marginBottom)})),e.scrollTop=Math.max(i,0)),F(t),yt()}))}}}}et.push(yt),st("[data-scroll]",(function(t){J(t,".active").forEach((function(e){var n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),a=i.top-n.top-Math.max((n.height-i.height)/2,0);t.scrollTop=a})),H(t,"scroll",yt)})),st("[data-unveil]",(function(t){bt(t)}));var xt,kt,Mt=null;function Et(e){if(kt&&(clearTimeout(kt),kt=null),!0===e||!1===e){if(!Mt)return;return!1===e?(F(Mt),void(Mt=null)):(X(Mt,{transform:"translate3d(0%,0,0)",transition:"none",opacity:1}),Mt.offsetWidth,void(kt=setTimeout((function(){X(Mt,{transition:"all 400ms",opacity:0}),Mt.offsetWidth,kt=setTimeout((function(){F(Mt),Mt=null}),400)}),200)))}function n(){xt+=(1-xt)/11*Math.random(),Mt.offsetWidth,X(Mt,{transform:"translate3d("+-100*(1-xt)+"%,0,0)",transition:"all 350ms"})}Mt||(X(Mt=U("div",{class:"nanoscope"}),{transform:"translate3d(-100%,0,0)",opacity:1}),q(h,Mt)),xt=0,n(),kt=t.setInterval(n,200)}var Ct=ot(),zt=null;function Tt(t,e,n){zt&&zt(),Et();var i=Ct(!1,null,t,(function(t){Et(!0),e&&e(t)}),(function(t){Et(!1),n&&n()}));return function(){i(),Et(!1)}}var Ht={},St="",At=null,Lt=[];function Bt(t){var e=!1;if(G(f,"input#login:checked,input#aside:checked").reverse().forEach((function(t){t.checked=null,e=!0,mt()})),e&&t)return[!0];var n=[];return Lt.forEach((function(i){e&&t||(n.push(i.modal),i.close(),e=!0)})),Lt=[],n}function It(n,i,a,o,r,l){var c=!!At,u=c?At.modal.scrollTop:t.pageYOffset,s=Bt();function d(t){G(t,"video,audio").forEach((function(t){try{t.pause(),t.currentTime=0}catch(e){}}))}var p=J(h,":not(.nanoscope):not(.window):not(.notification)"),v=[],m=null;p.forEach((function(t){if(v.push(t),c&&t===At.modal)(m=K(At.overlay,":not(.nav-close)")).forEach((function(t){d(t)}));else if(!c||"obsolete"==l){if(c&&t===At.modal)return;if(-1!=s.indexOf(t))return;F(t),d(t)}})),St in Ht||(Ht[St]={});var g=Ht[St];if(g.url||(g.url=it(t.location.href)),g.rtl||(g.rtl=tt(f)),g.title||(g.title=e.title),g.elements=v,g.scroll=u,c&&"open"!=l&&(g.overlay=m),c&&"obsolete"==l&&(At&&At.close(!0),At=null),i){var w="object"==typeof i?i:null,y=a||(w?nt(w):"/"),b=r||"";n in Ht||(Ht[n]={});var x=Ht[n];x.param||(x.param=w),x.url||(x.url=y),x.rtl||(x.rtl=o),x.title||(x.title=b),x.prev||(x.prev=St),b&&(e.title=b);var k={key:n,param:w};t.history.pushState(k,b,y)}St=n}function Pt(t,e,n){var i=null;if(G(f,"input#login").forEach((function(t){i=t})),i){var a=U("div",{class:t},e),o=U("div",{class:"modal"},a);H(o,"click",(function(t){O(a,t.target)||c()}));var r=null;H(o,"touchstart",(function(t){1===t.targetTouches.length&&(r=t.targetTouches[0].clientY)})),H(o,"touchmove",(function(t){if(1===t.targetTouches.length){var e=t.targetTouches[0].clientY-r;0===o.scrollTop&&e>0&&t.preventDefault(),o.scrollHeight-o.scrollTop<=o.clientHeight&&e<0&&t.preventDefault()}})),gt(i,"before",o),vt(),o.offsetWidth,B(o,"open");var l=!1;return z(o,"close",(function(){c()})),H(o,["scroll","resize","orientationchange"],yt),{modal:o,overlay:a,close:c}}function c(t){l||(l=!0,n&&n(t),mt(),P(o,"open"),setTimeout((function(){o&&(F(o),o=null)}),600))}}function Ot(t){At=Pt("overlay",null,(function(e){if(t&&t(),!e){for(var n={},i=St;i in Ht&&(n=Ht[i],i==St||"overlay"in Ht[i]);i=Ht[i].prev);var a=n.param||!0;It(M(),a,n.url,n.rtl,n.title,"close")}At=null}));var e=U("button"),n=U("div",{class:"nav-close"},e);H(e,"click",(function(t){L(t),this.blur(),At.close()})),q(At.overlay,n)}function Nt(t){for(var e=[],n=t.body.firstChild;null!==n;n=n.nextSibling)n.nodeType==Node.ELEMENT_NODE&&e.unshift(n);e.forEach((function(t){gt(h,"prepend",t,!1)})),t.rtl?D(f,"dir","rtl"):W(f,"dir")}function Rt(e){Tt(e,(function(n){It(M(),e,n.url,n.rtl,n.title,"obsolete"),Nt(n),t.scroll(0,0)}))}"state"in t.history&&(St=(t.history.state||{}).key||""),H(t,"popstate",(function(n){var i=n.state,a=null===i?"":i.key;if(a in Ht){var o=Ht[a];It(a,null,o.url,o.rtl,o.title,null),o.rtl?D(f,"dir","rtl"):W(f,"dir"),e.title=o.title,At&&!("overlay"in o)&&(At&&At.close(!0),At=null),o.elements.slice().reverse().forEach((function(t){h.insertBefore(t,h.firstChild)})),"overlay"in o?(At||Ot(),q(At.overlay,o.overlay),At.modal.scrollTop=o.scroll):t.scroll(0,o.scroll)}else{Tt(i&&"param"in i?i.param:(t.location.pathname||"/")+t.location.search,(function(e){It(a,null,e.url,e.rtl,e.title,null),Nt(e),t.scroll(0,0)}))}})),st("[data-load]",(function(t){var e=V(t,"data-load");e&&H(t,"click",(function(t){L(t),this.blur(),Rt(e)}))}));var Vt=null;function Dt(t,e){if(At||!e){var n=null;At||(Ot((function(){Vt&&Vt(),Vt=null})),n=U("div",{class:"unveil"},"<hr>"),q(At.overlay,n)),Vt=Tt(t,(function(e){if(!e.header&&!e.main)return At.close(),void(At=null);n&&F(n),It(M(),t,e.url,e.rtl,e.title,n?"open":null);var i=At.overlay;if(e.header&&(gt(i,"append",U("div",{class:"header"},e.header),!1),B(i,"wide")),e.main&&e.aside){var a=U("div",{class:"main"},e.main),o=U("div",{class:"aside"},e.aside);gt(i,"append",U("div",{class:"content"},[a,o]),!1),!e.header&&e.aside&&B(i,"wide")}else if(e.main){gt(i,"append",a=U("div",{class:"main"},e.main),!1)}e.back&&gt(i,"append",e.back,!1),e.next&&gt(i,"append",e.next,!1),At.modal.scrollTop=0,setTimeout((function(){At.modal.focus()}))}),(function(){At&&(At.close(),At=null)}))}else Rt(t)}function Wt(t){var e=null;return G(f,"input#login+.modal .overlay .footer label.button[for=login]").forEach((function(n){var i=U("button",{class:"button"},j(n.textContent));H(i,"click",(function(e){L(e),this.blur(),t.close()})),e=U("div",{class:"footer"},i),q(t.overlay,e)})),e}function qt(t,e){var n=U("div",{class:"unveil"},"<hr>"),i=Pt("overlay dialog",n,(function(){var t=Lt.indexOf(i);-1!=t&&Lt.splice(t,1),i=null,zt=null}));Lt.push(i);var a=U("button"),o=U("div",{class:"nav-close"},a);q(i.modal,o);var r=Wt(i);Tt(t,(function(t){if(i)if(t.header||t.main){if(t.main&&1==t.main.length&&!t.header&&!t.aside){var a=t.main.slice().shift();G(a,"form > .alert-success").forEach((function(t){P(t,"alert-success"),B(i.overlay,"success")})),G(a,"form > .alert-danger").forEach((function(t){P(t,"alert-danger"),B(i.overlay,"danger")}))}t.header&&B(i.overlay,"wide");var o=t.header||t.main;if(gt(n,"before",o,!1),F(n),r){var l=null,c=o.filter((function(t){return t.matches("form")}));1==c.length&&G(c.shift(),"button[type=submit]").forEach((function(t){l=t})),l&&(l.parentNode.insertBefore(r,l),q(r,l))}e&&e(i)}else i.close()}),(function(){i&&i.close()})),zt=i.close}function Ut(t,e){var n=Pt("overlay "+e,t,(function(){var t=Lt.indexOf(n);-1!=t&&Lt.splice(t,1)}));Lt.push(n);var i=U("button"),a=U("div",{class:"nav-close"},i);return q(n.modal,a),"input"!=e&&Wt(n),n.close}function jt(t,e,n,i){var a=R(t,"method"),o=R(t,"enctype")||"",r="POST"==a.toUpperCase(),l=null,c=null;function u(t){l?(F(l),l=null):Et(t)}r&&"multipart/form-data"==o.toLowerCase()?(c=U("progress",{max:"1.0",value:"0.0"}),q(t,l=U("div",{class:"cover"},c))):Et(),at(r,t,e,(function(t){u(!0),n&&n(t)}),(function(){u(),i&&i()}),(function(t,e){c&&D(c,"value",t/e)}))}st("[data-post]",(function(t){var e=V(t,"data-post");e&&H(t,"click",(function(t){L(t),this.blur(),Dt(e)}))})),st("[data-album]",(function(t){var e=V(t,"data-album");e&&H(t,"click",(function(t){L(t),this.blur(),Dt(e,!0)}))})),st("[data-dialog]",(function(t){var e=V(t,"data-dialog");e&&H(t,"click",(function(t){L(t),this.blur(),qt(e)}))})),st("[data-alert]",(function(t){var e=R(t,"data-alert");H(t,"click",(function(t){L(t),this.blur(),Ut(e,"danger")}))})),t.setInterval((function(){var t=new Date;G(f,"[data-datetime]").forEach((function(e){var n=R(e,"datetime"),i=R(e,"data-datetime");if(n){var a=C(e,"datetime"),o=t.getTime()-(a||s).getTime(),r=new Date(n),l=r.getTime(),c=60*r.getTimezoneOffset()*1e3,u=parseInt(i),f=function(t,e){var n=t.getTime()<e.getTime(),i=parseInt(Math.abs(t.getTime()-e.getTime())/1e3),a=Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),o=Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()),r=parseInt(Math.abs(a-o)/864e5);function l(t,e){var i=parseInt(e),a=t+(n&&0!=i?"+":"-")+i;return a in v?v[a]:null}function c(t,e){var i=parseInt(e),a=v.plural(i),o=t+(n&&0!=i?"+":"-")+a;if(o in v){var r=v.digits?i.toString().replace(/[0-9]/g,(function(t){return v.digits[+t]})):i;return v[o].replace("{#}",r)}return null}function u(t,e){var n=l(t,e);return n||(c(t,e)||null)}if(i<60&&(s=l("second",0)))return s;if(i<3600)return u("minute",Math.max((i+20)/60,1));if(i<43200)return u("hour",Math.max((i+1200)/3600,1));if(t.getUTCDate()==e.getUTCDate()&&i<86400)return u("hour",Math.max((i+1200)/3600,1));if(r<6){var s;if(s=l("day",Math.max(r,1)))return s;var f=null;switch(e.getUTCDay()){case 0:f="sunday";break;case 1:f="monday";break;case 2:f="tuesday";break;case 3:f="wednesday";break;case 4:f="thursday";break;case 5:f="friday";break;case 6:f="saturday"}var h=f+(n?"+1":"-1");return h in v?v[h]:c("day",Math.max(r,1))||null}return r<14||t.getUTCMonth()==e.getUTCMonth()&&r<28?u("week",Math.max(r/7,1)):r<360?u("month",Math.max(r/30,1)):u("year",Math.max(r/365,1))}(new Date(l+u+o-c),new Date(l-c));f&&e.textContent!=f&&(e.textContent=f)}}))}),3e4),st("[data-datetime]",(function(t,e){e&&z(t,"datetime",new Date)}));var Ft=!1,Xt=e.createElement("canvas");if(Xt.toDataURL&&0==Xt.toDataURL("image/webp").indexOf("data:image/webp"))Ft=!0;else{var Yt=new Image;Yt.onload=function(){Ft=Yt.width>0&&Yt.height>0},Yt.src="data:image/webp;base64,UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"}function Gt(t,e,n,i,a){if(!Ft&&!i&&!a)return t;var o=t;return i&&(o+="?crop="+parseInt(i.x)+"x"+parseInt(i.y)+":"+parseInt(i.x+i.w)+"x"+parseInt(i.y+i.h)),a&&(o+=(i?"&":"?")+"size="+parseInt(a.w)+"x"+parseInt(a.h)),Ft&&(o+=(i||a?"&":"?")+"format=webp"),o}st("[data-scale]",(function(e){var n=V(e,"data-scale"),i=R(e,"src"),a=parseInt(R(e,"width")),o=parseInt(R(e,"height"));if(!(n&&"svg"==n.type||n&&"webp"==n.type&&n.animation&&Ft)){var r=e.parentNode,l=r.offsetWidth,c=r.offsetHeight,u=a/o,s=l/c;if(l&&c){var f=null;if(u<.97*s||u>1.03*s){var h=e.style.marginTop,d=e.style.marginBottom,p=e.style.marginLeft,v=e.style.marginRight;if(h||d||u<s){var m=h?parseFloat(h.replace(",",".").replace("%","")):0;f={x:0,y:Math.round(a*Math.abs(m/100)),w:a,h:Math.round(a/s)}}else if(p||v||u>s){m=p?parseFloat(p.replace(",",".").replace("%","")):0;f={x:Math.round(a*Math.abs(m/100)*s/u),y:0,w:Math.round(o*s),h:o}}}var g=parseInt(Math.min(t.devicePixelRatio||1,1.5)*l),w=[64,128,256,512,768,1024,1536,2048,3072,4096].filter((function(t){return t>=Math.min(g,4096)}))[0],y=parseInt(Math.round(w/s));D(e,"src",Gt(i,0,0,f,{w:w,h:y})),D(e,"width",w),D(e,"height",y),X(e,{width:null,height:null,marginTop:null,marginBottom:null,marginLeft:null,marginRight:null})}}})),H(e,"keydown",(function(t){var n=!1,i=e.activeElement;i&&(i.matches("input")||i.matches("textarea")||Y(i,"form"))&&(n=!0);var a=G(f,".dropdown.open");if(0!=a.length)if("Escape"==t.key)a.forEach((function(e){L(t),P(e,"open")}));else if(!n&&("ArrowDown"==t.key||"ArrowUp"==t.key)){L(t);var o=G(f,".dropdown :focus");if(0==o.length)return;var r=Y(o[0],"li",!0);if(r)"ArrowDown"==t.key?r=Q(r):"ArrowUp"==t.key&&(r=_(r));else{var l=G(a[0],"li");0!=l.length&&(r=l[0])}if(!r)return;var c=G(r,"a");0!=c.length&&c[0].focus()}"Escape"==t.key&&(0!=Bt(!0).length&&L(t));var u=G(f,".book");if(0!=u.length&&!n){var s=C(u[0],"book");s&&("ArrowLeft"==t.key?(L(t),s.back()):"ArrowRight"==t.key&&(L(t),s.next()))}})),H(e,["mousedown","touchstart"],(function(t){G(f,".dropdown.open").forEach((function(e){O(e,t.target)||P(e,"open")}))})),st(".dropdown",(function(e){B(e,"lock"),function(e){H(e,"click",(function(){if(I(e,"open"))P(e,"open");else{var n=e.querySelector("ul");if(n&&(X(n,{display:"none",marginLeft:null,marginTop:null}),n.offsetHeight,X(n,{display:null}),n.offsetHeight),B(e,"open"),n&&n.offsetParent){var i=n.offsetParent.getBoundingClientRect(),a=i.left,o=i.top,r=Y(e,".scrollbox,[data-scroll]"),l=f.clientWidth||t.innerWidth,c=f.clientHeight||t.innerHeight;if(r){var u=r.getBoundingClientRect();a-=u.left,o-=u.top,l=u.width-(ht||0),c=u.height}var s=n.offsetWidth,h=n.offsetHeight,d=a+n.offsetLeft-s/2,p=o+n.offsetTop,v=d+s;(d<1||v>l-1)&&0!=t.getComputedStyle(n).transform.match(/-?\d+\.?\d*/g)[4]&&X(n,{marginLeft:(d<1?1-d:Math.max(1-d,l-1-v))+"px"});var m=p+h;m>c-1&&X(n,{marginTop:Math.max(1-p,c-1-m)+"px"})}}}),!0)}(e)}));var Jt=null;function Qt(e,n){var i=null,a=null,o=null;function r(){if(i){var t=i;i=null,a&&a(),a=null,o&&o(),o=null,P(t,"open"),setTimeout((function(){F(t)}),1e3),Jt==r&&(Jt=null)}}function l(l,s){a&&a(),a=null,o&&o(),o=null;a=at(!1,null,n,(function(n){a=null,function(n,a,o){Jt&&Jt(),Jt=r;for(var l=Y(e,"h6")||Y(e,"button")||e,s=l;s&&!I(s,"modal");s=s.parentElement)"hidden"==t.getComputedStyle(s).overflow&&(l=s);var d=(l.offsetParent||h).getBoundingClientRect(),p=e.getBoundingClientRect(),v=p.left-d.left+p.width/2;H(i=U("div",{class:"popup",style:"left:"+v+"px;top:"+(p.top-d.top+p.height)+"px"},n),"mousemove",c),H(i,"mouseleave",u),l.parentNode.insertBefore(i,l.nextSibling),G(i,"[data-popup]").forEach((function(t){W(t,"data-popup")})),ft(i,!0);var m=i.offsetWidth,g=i.offsetHeight,w=f.clientWidth||t.innerWidth,y=f.clientHeight||t.innerHeight;d.left+v+m/2>=w-5&&(v=w-5-(d.left+m/2),i.style.left=v+"px"),d.left+v<=m/2+5&&(v=m/2+5-d.left,i.style.left=v+"px"),p.top>g+5&&p.top+p.height+g>y-5&&(i.style.top="",i.style.bottom=d.bottom-p.bottom+p.height+"px",i.style.transformOrigin="bottom left"),i.offsetWidth,B(i,"open")}(n.main)}),(function(){a=null,Jt=null})),Jt&&Jt(),Jt=a}function c(t){if(o&&o(),o=null,!i&&!Y(e,"button:focus")){var n=setTimeout((function(){l(t.clientX,t.clientY)}),200);a&&a(),a=function(){clearTimeout(n)},Jt&&Jt(),Jt=a}}function u(t){a&&a(),a=null;var e=setTimeout(r,100);o&&o(),o=function(){clearTimeout(e)}}H(e,"mousemove",c),H(e,["mouseleave","click"],u)}function _t(t,n){var i=Y(t,"form");if(i){var a=0!=G(t,"div[contenteditable=true]").length,o="chat"==n?"bottom":"attachment"==n&&a?"demand":"top";""!=n&&"image"!=n||B(t,"document");var r=[],l=[],c=G(i,"button[type=submit][hidden]");if(1==c.length){var u=c.shift();W(u,"hidden"),r.push(u)}if("image"==n||"attachment"==n||"chat"==n){var s={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4.86 8.86l-3 3.87L9 13.14 6 17h12l-3.86-5.14z"/></svg>',dataurl:function(t,e,n,i){e.match(/^image/i)&&t.insertHTML(' <img src="'+n+'"> <br><br> ')},attr:{title:m.image}};r.push(s)}var f=null;if(("attachment"==n||"chat"==n)&&i.matches("[enctype='multipart/form-data']")){var h=null,d=1,p=[];s={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6h-1.5z"/></svg>',browse:function(t,e,n,i){e.name="attachment-"+d++,p.push(e),i.style.position="relative",h?h.textContent=(parseInt(h.textContent)+1).toString():(X(h=U("div",void 0,j("1")),{position:"absolute",top:"0",right:"0",fontSize:"0.6em",padding:"1px 2px",color:"white",backgroundColor:"#fa3e3e",borderRadius:"2px"}),q(i,h))},attr:{title:m.attach}};r.push(s),f=function(){h&&F(h),h=null,p.forEach((function(t){F(t)})),p=[]}}var v={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"/></svg>',popup:function(e,n,i){var a=t.offsetWidth;X(n,{display:"inline-block",maxWidth:parseInt(8*a/9)+"px",padding:"0.5rem",textAlign:"center",whiteSpace:"normal"}),n.unselectable=!0;[{codepoint:128522,name:"4RuIJgjWX7tW3Nq"},{codepoint:128521,name:"GbR6dagmegwZCRW"},{codepoint:128519,name:"JoIom9MkoGa57ZS"},{codepoint:128556,name:"G1egYiliHrLsiFy"},{codepoint:128514,name:"IFZKy582r9FUeRo"},{codepoint:129322,name:"VJajAagvI4WRohO"},{codepoint:128525,name:"7gkwflWenrEnzTw"},{codepoint:128526,name:"kwAIh2E9zHvGx7s"},{codepoint:129303,name:"6Tf9f2kr4KojlLy"},{codepoint:129325,name:"wsWYEkBkguzBnt4"},{codepoint:128536,name:"CVAyR1zXzZKRDgK0"},{codepoint:129395,name:"yPb7kojQo7OU6RC"},{codepoint:129396,name:"HSwTnahyrrLKZ5K"},{codepoint:129297,name:"QYQGtEb1657vux8"},{codepoint:129393,name:"reQegbWKUuwpKQm"},{codepoint:128564,name:"F50ouepDakRrCLS"},{codepoint:129296,name:"IBXsiFD1PH2iQe0"},{codepoint:128562,name:"LcmjsjPJIUzpRv8"},{codepoint:128561,name:"PDEyM6GShRcNzRc"},{codepoint:129402,name:"P6YU1EUgrYy98qu"},{codepoint:128557,name:"MK81N0DhVzA6beQ"},{codepoint:129323,name:"cJFM9fapUVCB4VW"},{codepoint:129300,name:"yZFl9byATXyZJ5FW"},{codepoint:129317,name:"l7gy0MPFPOwlt3c"},{codepoint:128555,name:"PHXGAWQ72xTjgq0"},{codepoint:128548,name:"bTYzatuG4UbtJyO"},{codepoint:128545,name:"4aZLO3v3dJyTqQz"},{codepoint:128567,name:"QzfXxtb9surV8kA"},{codepoint:129326,name:"GwKSkl37ETy8oQy"},{codepoint:129298,name:"PJjlPWxFy2J6mQY"},{codepoint:129301,name:"LdwmvCwC0F4lszK"},{codepoint:129397,name:"7AOPpgdrPqR9LOS"},{codepoint:129398,name:"b6qANWGFcXPvIoW"}].forEach((function(t,i){0!=i&&q(n,j(" "));var a="/emoji/"+t.name+"?unicode12",o=String.fromCodePoint?String.fromCodePoint(t.codepoint):"",r=U("img",{src:a,class:"emoji",width:64,height:64,alt:o,unselectable:!0});H(r,"click",(function(){var t=' <img class="emoji" src="'+$(a)+'" width="64" height="64" alt="'+o+'"> ';e.insertHTML(t)})),q(n,r)}))},attr:{title:m.smileys}};r.push(v);var g={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',action:"link",attr:{title:m.link}};r.push(g),l.push(g);var w={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z"/></svg>',action:"bold",hotkey:"b",attr:{title:m.bold}};"chat"!=n&&r.push(w),l.push(w);var y={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4h-8z"/></svg>',action:"italic",hotkey:"i",attr:{title:m.italic}};"chat"!=n&&r.push(y),l.push(y);var b={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z"/></svg>',action:"underline",hotkey:"u",attr:{title:m.underline}};"chat"!=n&&r.push(b),l.push(b);var x={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M7.24 8.75c-.26-.48-.39-1.03-.39-1.67 0-.61.13-1.16.4-1.67.26-.5.63-.93 1.11-1.29.48-.35 1.05-.63 1.7-.83.66-.19 1.39-.29 2.18-.29.81 0 1.54.11 2.21.34.66.22 1.23.54 1.69.94.47.4.83.88 1.08 1.43s.38 1.15.38 1.81h-3.01c0-.31-.05-.59-.15-.85-.09-.27-.24-.49-.44-.68-.2-.19-.45-.33-.75-.44-.3-.1-.66-.16-1.06-.16-.39 0-.74.04-1.03.13s-.53.21-.72.36c-.19.16-.34.34-.44.55-.1.21-.15.43-.15.66 0 .48.25.88.74 1.21.38.25.77.48 1.41.7H7.39c-.05-.08-.11-.17-.15-.25zM21 12v-2H3v2h9.62c.18.07.4.14.55.2.37.17.66.34.87.51s.35.36.43.57c.07.2.11.43.11.69 0 .23-.05.45-.14.66-.09.2-.23.38-.42.53-.19.15-.42.26-.71.35-.29.08-.63.13-1.01.13-.43 0-.83-.04-1.18-.13s-.66-.23-.91-.42c-.25-.19-.45-.44-.59-.75s-.25-.76-.25-1.21H6.4c0 .55.08 1.13.24 1.58s.37.85.65 1.21c.28.35.6.66.98.92.37.26.78.48 1.22.65.44.17.9.3 1.38.39.48.08.96.13 1.44.13.8 0 1.53-.09 2.18-.28s1.21-.45 1.67-.79c.46-.34.82-.77 1.07-1.27s.38-1.07.38-1.71c0-.6-.1-1.14-.31-1.61-.05-.11-.11-.23-.17-.33H21V12z"/></svg>',action:"strikethrough",hotkey:"s",attr:{title:m.striketrough}};"chat"!=n&&r.push(x),l.push(x);var k={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-opacity=".36" d="M0 20h24v4H0v-4z"/><path d="M11 3L5.5 17h2.25l1.12-3h6.25l1.12 3h2.25L13 3h-2zm-1.38 9L12 5.67 14.38 12H9.62z"/></svg>',action:"colortext",attr:{title:m.textcolor}};"chat"!=n&&r.push(k),l.push(k);var M={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.56 8.94L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10L10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5z"/><path fill-opacity=".36" d="M0 20h24v4H0v-4z"/></svg>',action:"colorfill",attr:{title:m.backcolor}};"chat"!=n&&r.push(M),l.push(M);var E={icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20 8V5H6.39l3 3h1.83l-.55 1.28 2.09 2.1L14.21 8zM3.41 4.86L2 6.27l6.97 6.97L6.5 19h3l1.57-3.66L16.73 21l1.41-1.41z"/></svg>',action:"clearformat",attr:{title:m.clear}};"chat"!=n&&r.push(E);var C=ot(),z=null,T=null;"chat"==n&&(z=function(){return A(i,"submit"),e.activeElement&&O(t,e.activeElement)&&(T=e.activeElement).blur(),!0});var S=wysiwyg(t,{toolbar:o,buttons:r,selectionbuttons:l,suggester:function(t,e){if("@"!=t[0])return!1;if(t.length<=2)return!0;var n={suggestion:t.substring(1),users:""};return C(!1,void 0,n,(function(n){var i=n.main||[];if(0!=i.length){for(var a=[],o=0;o<5&&o<i.length;++o){var r=i[o],l=R(r,"data-id");if(l){var c=G(r,"cite");if(0!=c.length){var u=G(c[0],"svg");0!=u.length&&F(u);var s=c[0].textContent;if(s){var f=s,h=new RegExp("^("+t.substring(1).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+")(.*)$","i");h.test(f)&&(f=f.replace(h,"$1<b>$2</b>")),f="<cite>"+f+(0!=u.length?u[0].outerHTML:"")+"</cite>";var d=G(r,"figure>img,figure>svg");0!=d.length&&(f='<span class="icon">'+d[0].outerHTML+"</span>"+f),a.push({label:f,insert:'&nbsp;<a href="/user/'+$(l)+'">@'+$(s)+"</a>&nbsp; "})}}}}e(a)}else e(null)})),!0},interceptenter:z,hijackmenu:!1});return ft(t,!0),H(i,"reset",(function(){T?T.focus():"chat"!=n&&e.activeElement&&O(t,e.activeElement)&&e.activeElement.blur(),f&&f()})),""!=n&&"image"!=n||G(t,"textarea[required]").forEach((function(t){t.setCustomValidity&&H(t,"blur",(function(e){var n=!0;if(N(t,"required"))try{var i=new DOMParser;if(i){var a=i.parseFromString(t.value,"text/html");n=0!=(a&&a.body.textContent||"").replace(/\s+/g,"").length||0!=G(a.body,"img[src^=/emoji/][alt]").length}}catch(e){}t.setCustomValidity(n?"":String.fromCharCode(160))}))})),S}}function Kt(t,e,n){var i=G(f,".notification");0!=i.length?i=i.shift():(i=U("div",{class:"notification"}),q(h,i));var a=U("div",null,t);"success"==e?B(a,"success"):"danger"==e&&B(a,"danger");var o=U("span",{class:"close"});q(a,o);for(var r,l=0,c=i.firstChild;null!==c;c=c.nextSibling)C(c,"timeout")||(l+=1,r=c);l>=3&&A(r,"click"),gt(i,"prepend",a,!0);var u=null;function s(){clearTimeout(u),a&&(B(a,"fade-out"),setTimeout((function(){a&&(F(a),a=null)}),1e3))}H(a,"click",s),G(a,"a").forEach((function(t){H(t,"click",s)})),H(o,"click",(function(t){L(t),s()})),n&&(u=setTimeout(s,5e3),z(a,"timeout",!0),H(a,"mouseover",(function(){u&&(clearTimeout(u),u=null)})),H(a,["mouseout","mouseleave"],(function(t){t.target==a&&(u||(u=setTimeout(s,5e3)))})))}function $t(t,e){if(!t)return[];var n=t.filter((function(t){if(e&&t.matches("data")){var n=V(t,"value");return n&&e(n),!1}return!0}));return 1!=n.length?n:n.filter((function(t){return t.matches(".alert-success")?(P(t,"alert-success"),Kt(t,"success",!0),!1):!t.matches(".alert-danger")||(P(t,"alert-danger"),Ut(t,"danger"),!1)}))}function Zt(t,e,n,i){var a=[],o=!1;(n||[]).forEach((function(e){if(e.matches("data")){var n=V(e,"value");return n&&n.chat&&(t.chat=n.chat),void(n&&(t.previous=n))}if(!o){var i=V(e,"data-texting");if(i){if(-1!=t.textings.indexOf(i.id))return void(o=!0);t.textings.push(i.id)}a.unshift(e)}}));var r=t.scroll.scrollTop;if(e){gt(e,"before",a,!0);var l=getComputedStyle(e);r-=e.offsetHeight+parseInt(l.marginTop)+parseInt(l.marginBottom)}else gt(t.list,"append",a,!0);a.forEach((function(t){var e=getComputedStyle(t);r+=t.offsetHeight+parseInt(e.marginTop)+parseInt(e.marginBottom)})),t.scroll.scrollTop=Math.max(r,0)}et.push((function(){Jt&&(Jt(),Jt=null)})),st("[data-popup]",(function(t){var e=V(t,"data-popup");e&&Qt(t,e)})),st("[data-wysiwyg]",(function(t){var e=R(t,"data-wysiwyg");setTimeout((function(){_t(t,"document"==e?"image":"posting"==e?"attachment":"")}))}));var te={};function ee(n,i,a,o,r,l,c,u,s){if(Z())Rt(n?{chat:n}:{chat:"",user:a});else{var d=i?"g:"+i:a?"u:"+a:n?"c:"+n:null;if(d){if(d in te)return!(dt=te[d]).chat&&n&&(dt.chat=n),r&&B(dt.title,"unread"),Zt(dt,null,c),void(u&&(dt.previous=u.previous));var v,m,w,y=U("button",{class:"muted",title:g.videochat},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20.526 8.149a1 1 0 00-.973-.044L17 9.382V8c0-1.103-.897-2-2-2H6c-1.103 0-2 .897-2 2v8c0 1.104.897 2 2 2h9c1.103 0 2-.896 2-2v-1.382l2.553 1.276a.992.992 0 00.973-.043c.294-.183.474-.504.474-.851V9c0-.347-.18-.668-.474-.851z"/></svg>');i?(m=U("button",{class:"muted",title:g.groupjoin},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M8.002 16.006c-2.205 0-4-1.795-4-4s1.795-4 4-4 4 1.795 4 4-1.794 4-4 4zm0-6a2 2 0 10.001 4.001 2 2 0 00-.001-4.001zM16.002 24.006h-16v-1c0-3.533 3.289-6 8-6s8 2.467 8 6v1zm-13.841-2h11.684c-.599-1.808-2.834-3-5.842-3s-5.244 1.192-5.842 3zM22.002 7.006h-3v-3h-2v3h-3v2h3v3h2v-3h3z"/></svg>'),w=U("button",{class:"muted",title:g.groupleave},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M18 22H7c-1.103 0-2-.897-2-2v-3h2v3h11V4H7v3H5V4c0-1.102.897-2 2-2h11c1.103 0 2 .898 2 2v16c0 1.103-.897 2-2 2z"/><path d="M11.707 7.292l-1.414 1.416L12.59 11H4v2h8.582l-2.29 2.294 1.416 1.412 4.706-4.715z"/></svg>')):v=U("button",{class:"muted",title:g.groupchat},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M18.001 13c.825 0 1.5.676 1.5 1.5s-.675 1.5-1.5 1.5-1.5-.676-1.5-1.5.675-1.5 1.5-1.5zM20.001 22h-4v-3a2 2 0 014 0v3zM12.001 13c.825 0 1.5.676 1.5 1.5s-.675 1.5-1.5 1.5-1.5-.676-1.5-1.5.675-1.5 1.5-1.5zM14.001 22h-4v-3a2 2 0 014 0v3zM6.001 13c.825 0 1.5.676 1.5 1.5s-.675 1.5-1.5 1.5-1.5-.676-1.5-1.5.675-1.5 1.5-1.5zM8.001 22h-4v-3a2 2 0 014 0v3zM21.376 11.781l-9.375-7.5-9.376 7.5-1.249-1.562 10.625-8.5 10.624 8.5z"/></svg>');var b=U("button",{class:"muted",title:g.enlarge},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16 12V9a1 1 0 00-1-1H5a1 1 0 00-1 1v3h2v-2h3v6.92c.328.047.66.08 1 .08s.672-.033 1-.08V10h3v2h2zM11 20.949c-.33.03-.663.051-1 .051s-.67-.021-1-.051V22H7v2h6v-2h-2v-1.051z"/><path d="M22.707 22.293l-5.442-5.441A9.956 9.956 0 0020 10c0-5.514-4.486-10-10-10S0 4.486 0 10c0 5.515 4.486 10 10 10a9.937 9.937 0 005.752-1.833l5.541 5.54 1.414-1.414zM2 10c0-4.411 3.589-8 8-8s8 3.589 8 8-3.589 8-8 8-8-3.589-8-8z"/></svg>'),x=U("button",{class:"muted",title:g.clear},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M2 20h20v2H2zM6.292 18.707c.182.181.432.293.708.293h6c.276 0 .526-.112.708-.293L21 11.414c.78-.779.78-2.048 0-2.828L15.414 3a2.001 2.001 0 00-2.828 0L3 12.586c-.78.78-.78 2.049 0 2.828l3.292 3.293zM10 8.414L15.586 14l-3 3H7.414l-3-3L10 8.414z"/></svg>'),k=U("button",{class:"muted",title:g.close},'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M20.749 4.707l-1.415-1.414-7.292 7.293-7.293-7.293-1.415 1.414L10.627 12l-7.293 7.293 1.415 1.414 7.293-7.293 7.292 7.293 1.415-1.414L13.456 12z"/></svg>'),M=U("h6",{class:"col-spare"},o),E=U("div",{class:"title cols"},[M,y,v,m,w,b,x,k]);r&&B(E,"unread");var N,R=null,D=null,W=null,q=null;if(s){var J=U("span",{class:"contenteditable","data-placeholder":g.placeholder});H(q=U("button",{class:"wysiwyg"},[J]),"click",(function(t){L(t),this.blur(),Ut(s,"danger")}))}else{var Q,_,K=U("input",{type:"hidden",name:"chat",value:n||""}),$=U("input",{type:"hidden",name:"chatwindow",value:""}),tt=U("input",{type:"hidden",name:"request",value:"texting"});i&&(Q=U("input",{type:"hidden",name:"name",value:i})),a&&(_=U("input",{type:"hidden",name:"user",value:a}));J=U("div",{contenteditable:!0,"data-placeholder":g.placeholder});W=U("textarea",{name:"texting-text",cols:100,rows:1,required:!0,spellcheck:!1,"data-fileupload":""}),D=U("div",{class:"wysiwyg"},[J,W]);var et=U("button",{type:"submit",hidden:!0},g.submit);R=U("form",{method:"POST",action:"/",acceptCharset:"UTF-8",enctype:"multipart/form-data"},[K,$,tt,Q,_,D,et])}c||(N=U("a",{class:"unveil"},"<hr>"));var nt=U("div",{class:"history"},N),it=U("div",{class:"scrollbox"},nt),ot=U("div",{class:"window"},[E,it,R,q]);gt(h,"append",ot,!1);var ut=null;D&&(ut=_t(D,"chat"));var st=f.clientHeight||t.innerHeight,ft=ot.offsetHeight,ht=it.offsetHeight;ft>st&&X(it,{maxHeight:parseInt(st-(ft-ht))+"px"}),te[d]={chat:n,user:a,name:i,textings:c||[],previous:u?u.previous:null,win:ot,title:E,scroll:it,list:nt};var dt=te[d];if(mt(),l&&yt(),y&&H(y,"click",(function(t){fe(!0,(function(){return new Promise((function(t,e){at(!0,null,dt.chat?{chat:dt.chat,request:"record"}:{chat:"",user:a,request:"record"},(function(n){var i=!1;$t(n.main,(function(e){t(e),i=!0})),i||e()}),(function(){e()}))}))}))})),v&&H(v,"click",(function(t){L(t),this.blur();var e=null,n=U("input",{type:"text",size:"100",required:"required"}),i=U("label",void 0,[j(g.description),n]),o=U("button",{type:"button",class:"button submit"},g.submit),r=U("legend",void 0,g.groupchat),l=U("fieldset",void 0,[r,i,o]),c=U("form",{method:"GET",action:"/"},[l]);H(c,"submit",(function(t){L(t);var i=n.value.trim();i&&(ee(null,i,a,i),e())})),H(o,"click",(function(t){L(t),this.blur(),A(c,"submit")})),e=Ut(c,"input")})),m&&H(m,"click",(function(t){L(t),this.blur(),dt.chat&&qt({chat:dt.chat,request:"join"})})),w&&H(w,"click",(function(t){L(t),this.blur(),dt.chat&&qt({chat:dt.chat,request:"leave"},(function(t){G(t.overlay,"form").forEach((function(t){H(t,"submit",wt)}))}))})),H(x,"click",(function(t){L(t),this.blur(),dt.chat&&qt({chat:dt.chat,request:"clear"},(function(t){G(t.overlay,"form").forEach((function(t){H(t,"submit",wt)}))}))})),H(b,"click",(function(t){L(t),this.blur(),wt(),Rt(n?{chat:n}:{chat:"",user:a})})),H(k,"click",(function(t){L(t),this.blur(),yt(),wt()})),W){var pt=!1;H(W,"focus",(function(){pt||yt(),pt=!1})),H(W,"blur",(function(){var t=e.activeElement;pt=D&&t&&O(D,t)}))}if(D&&H(D,["click","input","change"],yt),H(it,"wheel",yt),R&&H(R,"submit",(function(t){if(L(t),ut){var n=e.implementation.createHTMLDocument("");if(n.body.innerHTML=ut.getHTML(),0==(n.body.textContent||"").replace(/[\r\n ]/g,"").length&&0==G(n.body,"a,figure,img,svg,picture,video,audio,iframe").length)return}var i=p({window:""},dt.previous||{});jt(R,i,(function(t){A(R,"reset");var e=$t(t.main);0!=e.length&&(Zt(dt,null,e),le())}))})),N)bt(N,i?{chat:"",name:i,window:""}:a?{chat:"",user:a,window:""}:{chat:n,window:""});else c&&(Zt(dt,null,c),le());var vt=T((function(){G(it,"[data-unveil]").forEach((function(t){var e=t.offsetTop-it.scrollTop,n=t.offsetHeight,i=it.offsetHeight,a=1*i/3;if(!(e+n+a<0||e>i+a||C(t,"unveil"))){z(t,"unveil",!0);var o=V(t,"data-unveil");o&&(o.window="",bt(t,o))}}))}),50);H(it,"scroll",vt),H(E,"mousedown",(function(e){if(e.preventDefault(),O(E,e.target)&&!Y(e.target,"button",!0)){z(ot,"moved",!0);var n=ot.getBoundingClientRect(),i=e.clientX-n.left,a=e.clientY-n.top,o=null;H(f,["mousemove","touchmove"],r),H(f,["mouseup","touchend"],(function t(e){S(f,["mousemove","touchmove"],r),S(f,["mouseup","touchend"],t)}))}function r(e){o||(o=setTimeout((function(){o=null;var n=f.clientWidth||t.innerWidth,r=f.clientHeight||t.innerHeight,l=ot.offsetWidth,c=ot.offsetHeight,u=n-l-Math.min(Math.max(parseInt(e.clientX-i),0),n-l),s=r-c-Math.min(Math.max(parseInt(e.clientY-a),0),r-c);X(ot,{right:u+"px",bottom:s+"px"})}),50))}}))}}function mt(){var t=G(f,".window").filter((function(t){return!C(t,"moved")})),e=10;t.forEach((function(t){X(t,{right:e+"px",bottom:"10px"}),e+=t.offsetWidth+10}))}function wt(){F(dt.win),delete te[d],le(),mt()}function yt(){if(t.clearInterval(lt),ct&&(e.title=rt),I(E,"unread")){P(E,"unread");var n=dt.chat?{chat:dt.chat}:{chat:"",user:a};(function(e){if(!ne||ne.readyState!=t.WebSocket.OPEN)return!1;var n=JSON.stringify(e);return ne.send(n),!0})(n)||at(!1,null,n)}}function bt(t,e){at(!1,null,e,(function(e){e.main&&(Zt(dt,t,e.main),le()),F(t)}),(function(){F(t)}))}}st("[data-chat]",(function(t){var e=V(t,"data-chat");e&&H(t,"click",(function(t){L(t),this.blur(),Bt(),ee(e.chat,e.name,e.user,e.caption,!1,!0,null,null,e.blocked)}))}));var ne=null,ie=null,ae=null,oe={};function re(n){var i={synchronizer:c};n&&(i.quiesced=n);var a=nt(i,("http:"==location.protocol?"ws://":"wss://")+location.hostname+(location.port?":"+location.port:"")),o=new WebSocket(a,"html");o&&(H(o,"open",(function(t){ne=o,H(e,"visibilitychange",ue),le(!0)})),H(o,"message",(function(n){var i=JSON.parse(n.data);function a(t){var n=e.implementation.createHTMLDocument("");return n.body.innerHTML=t,n.body.firstChild}Array.isArray(i)&&i.reverse().forEach((function(n){if("kind"in n)if("record"==n.kind)fe(!1,n);else if("chat"==n.kind){var i=null,o={};n.users.slice(1).forEach((function(t){i||(i=t.id),o[t.id]=t.name}));var r=[];if(n.textings.forEach((function(i){var l;i.user in o&&n.unread&&(l="("+n.unread+") "+o[i.user],rt||(rt=e.title),ct=!1,t.clearInterval(lt),lt=t.setInterval((function(){e.title=ct?rt:l,ct=!ct}),2e3));var c=a(i.html);r.push(c)})),n.unveil){var l=a(n.unveil);r.push(l)}ee(n.id,n.name,i,n.caption,!!n.unread,!1,r,n.paging)}else if("notification"==n.kind){if(n.id in oe)return;oe[n.id]=!0,Kt(l=a(n.html))}}))})),H(o,"close",(function(t){ne=null,ae=null;var e=!1;switch(t.code){case 1012:case 1013:e=!0}e&&null===ie&&setTimeout((function(){re()}),1e3)})),H(o,"error",(function(t){ne=null,ae=null,S(e,"visibilitychange",ue)})))}function le(e){if(!ne||ne.readyState!=t.WebSocket.OPEN)return!1;var n=[];for(var i in te)if(te.hasOwnProperty(i)){var a=te[i];a.previous&&n.push({kind:"subscription",pagination:a.previous.pagination})}if(!e||0!=n.length){var o=JSON.stringify(n);ae!==o&&(ae=o,ne.send(o))}}var ce=null;function ue(){if(clearTimeout(ce),ce=null,"hidden"==e.visibilityState)ne&&(ce=t.setTimeout((function(){ne&&(ne.close(1e3,"quiesce"),ne=null,ae=null,ie=new Date)}),6e4));else if(null!==ie){var n=(new Date).getTime()-ie.getTime();ie=null,re(n)}}function se(t,e,n,i,a,o,r){var l=!1,c=null,u=null,s=null,f={},h=null,p=null,v=null,m=null,g=null,w={},b="Browser does not supported real time video";if(d.mediaDevices&&d.mediaDevices.getUserMedia){y((function(){if(!l){try{c=new mediasoup.Device}catch(z){return void r(b)}e?t().then((function(t){var i=C(t);g&&e().then((function(){g&&x().then((function(t){u=t,g?(n(t),i(t)):E()})).catch((function(t){M()}))})).catch((function(){M()}))})).catch((function(t){r()})):x().then((function(e){u=e,l?E():(n(e),t().then(C).catch((function(t){E(),r()})))})).catch((function(t){r(t)}));var y=!1}function x(){var t={video:{width:{min:320,ideal:768,max:1280},height:{min:180,ideal:432,max:720}},audio:{}},e=d.mediaDevices.getSupportedConstraints();return e.aspectRatio&&(t.video.aspectRatio=16/9),e.frameRate&&(t.video.frameRate={max:30}),e.facingMode&&(t.video.facingMode="user"),e.channelCount&&(t.audio.channelCount=2),e.echoCancellation&&(t.audio.echoCancellation=!0),e.autoGainControl&&(t.audio.autoGainControl=!0),e.noiseSuppression&&(t.audio.noiseSuppression=!0),new Promise((function(e,n){d.mediaDevices.getUserMedia(t).then((function(t){0==t.getVideoTracks().length&&0==t.getAudioTracks().length?n():e(t)})).catch((function(t){n(t.message)}))}))}function E(){u&&(u.getTracks().forEach((function(t){t.stop()})),u=null)}function C(t){function e(t){var e=[];0!=t.getVideoTracks().length&&e.push("video"),0!=t.getAudioTracks().length&&e.push("audio"),k("transport",{record:1==e.length?e[0]:e}).then((function(e){var n={id:e.transport,iceParameters:e["ice-parameters"],iceCandidates:e["ice-candidates"],dtlsParameters:e["dtls-parameters"]};(h=c.createSendTransport(n)).on("connect",(function(t,e,i){k("connect",{transport:n.id,"dtls-parameters":t.dtlsParameters}).then((function(t){t.error?i():e()}))})),h.on("produce",(function(t,e,i){k("produce",{transport:n.id,kind:t.kind,"rtp-parameters":t.rtpParameters}).then((function(t){t.error?i():e({id:t.producer})}))})),h.on("connectionstatechange",(function(t){switch(t){case"new":case"connecting":case"connected":case"disconnected":default:break;case"closed":case"failed":M()}})),0!=t.getVideoTracks().length&&h.produce({track:t.getVideoTracks()[0]}).then((function(t){p=t})),0!=t.getAudioTracks().length&&h.produce({track:t.getAudioTracks()[0]}).then((function(t){v=t}))}))}var n=[],l=!1,d=[],b={};function x(t,e,o,r,u){function s(){n.forEach((function(t){var e=t.producer,n=t.peer,o=t.user,r=t.params;k("consume",{transport:m.id,producer:e,"rtp-capabilities":c.rtpCapabilities}).then((function(t){m.consume({producerId:e,id:t.consumer,kind:t.kind,rtpParameters:t["rtp-parameters"],type:t.type,producerPaused:t["producer-paused"]}).then((function(t){t.on("trackended",(function(){n in b&&(delete b[n][e],0==Object.keys(b[n]).length&&delete b[n]),n in b||n in f||(f[n]=!0,a(n,o,r))}));var l=function(){k("resume",{consumer:t.id}).then((function(e){t.resume(),n in b?b[n].addTrack(t.track):(b[n]=new MediaStream([t.track]),i(b[n],n,o,r))}))};"connected"!==m.connectionState?d.push(l):l()}))}))})),n=[]}t&&n.push({producer:t,kind:e,peer:o,user:r,params:u}),c.loaded&&0!=n.length&&(m?s():l||(l=!0,k("transport").then((function(t){var e={id:t.transport,iceParameters:t["ice-parameters"],iceCandidates:t["ice-candidates"],dtlsParameters:t["dtls-parameters"]};(m=c.createRecvTransport(e)).on("connect",(function(t,n,i){k("connect",{transport:e.id,"dtls-parameters":t.dtlsParameters}).then((function(t){t.error?i():n()}))})),m.on("connectionstatechange",(function(t){if("connected"===t){for(var e in d)d.hasOwnProperty(e)&&d[e]();d=[]}else"closed"!==t&&"failed"!==t&&"disconnected"!==t||M()})),s()}))))}return H(g=new WebSocket(t),"open",(function(t){})),H(g,"close",(function(t){h&&h.close(),h=null,p=null,v=null,m&&m.close(),m=null,c=null,g=null,E(),r()})),H(g,"error",(function(t){g=null})),H(g,"message",(function(t){var n=JSON.parse(t.data);if(n.transaction){var i=w[n.transaction];if(!i)return;i.resolve(n)}else if(c)switch(n.request){case"setup":if(s=n.peer,n.user,!c.loaded){var r=n["rtp-capabilities"];r.headerExtensions=r.headerExtensions.filter((function(t){return"urn:3gpp:video-orientation"!==t.uri})),c.load({routerRtpCapabilities:r}).then((function(){u?e(u):y=!0,x()}))}break;case"hangup":n.peer in f||(f[n.peer]=!0,a(n.peer,n.user,n.params));break;case"associate":x(n.producer,n.kind,n.peer,n.user,n.params);break;case"dissociate":n.peer in b&&(delete b[n.peer][n.producer],0==Object.keys(b[n.peer]).length&&delete b[n.peer]),n.peer in b||n.peer in f||(f[n.peer]=!0,a(n.peer,n.user,n.params));break;case"stats":if(n.peers){var l={},h={};for(var d in n.peers)if(n.peers.hasOwnProperty(d)){var m=n.peers[d];d==s||"video"in m&&p&&m.video.producer==p.id||"audio"in m&&v&&m.audio.producer==v.id?l=m:h[d]=m}o(l,h)}}})),function(t){y&&e(t)}}}));var x=0;return M}function k(t,e){var n={request:t};for(var i in e||{})e.hasOwnProperty(i)&&(n[i]=e[i]);x+=1,n.transaction=x;var a=JSON.stringify(n);return g.send(a),new Promise((function(t,e){w[n.transaction]={resolve:t,reject:e,payload:n}}))}function M(){l=!0,g&&(h?k("disconnect",{transport:h.id}).then((function(t){t.error,g.close()})):g.close())}r(b)}function fe(e,n){var i=null;function a(){var e=t.AudioContext||t.webkitAudioContext||t.mozAudioContext;if(e){var n=new e,a=n.createOscillator(),r=n.createOscillator();a.frequency.value=400,r.frequency.value=450;var l=n.createGain();l.gain.value=0;var c=n.createBiquadFilter();c.type="lowpass",c.frequency.value=8e3,a.connect(l),r.connect(l),l.connect(c),c.connect(n.destination),a.start(0),r.start(0);for(var u=n.sampleRate,s=3*u,f=n.createBuffer(1,s,u),h=f.getChannelData(0),d=0;d<s;++d)(d/u>0&&d/u<.4||d/u>.6&&d/u<1)&&(h[d]=.75);var p=n.createBufferSource();p.buffer=f,p.loop=!0,p.connect(l.gain),p.start(0),o(),i=function(){a.stop(0),r.stop(0),p.stop(0)}}}function o(){i&&(i(),i=null)}var r=n,l=null,c={},u=!1,s=null,f=null,h=null;function d(){s&&s(),s=null,f=null,h=null}function p(){l||(l=Pt("meeting",null,(function(){d()})));var t=l.overlay,n=t.clientWidth||t.offsetWidth,i=t.clientHeight||t.offsetHeight,a=null,o=null,r=!1,p=0;for(var v in c)c.hasOwnProperty(v)&&(p+=1);2==p&&"cam"in c&&(p=1,r=!0);for(var m=1;m<=p;++m){var g=Math.min(n/m,i/p*m/9*16);(!a||o<g)&&(a=m,o=g)}var w=[],y=[];for(var b in c)if(c.hasOwnProperty(b)){var x=c[b];if(r&&"cam"==b)y.push(x.video);else{var k=U("figure",{style:"width:"+parseInt(o/n*100)+"%;"},x.video);if("cam"==b)y.push(k);else{if("name"in x.params){var M=U("div",{class:"bottomleft shaded"});M.textContent=x.params.name,q(k,M)}w.push(k)}}}for(;t.firstChild;)t.removeChild(t.firstChild);var E=w.concat(y);for(var C in E)E.hasOwnProperty(C)&&q(t,E[C]);var z=e||u?null:U("button",{class:"answer muted"}),T=U("button",{class:"hangup muted"}),S=U("div",{class:u?"keypad":"keypad dialup"},[z,T]);q(t,S),z&&!u&&H(z,"click",(function(t){L(t),u=!0,z&&F(z),P(S,"dialup"),f&&f(),f=null,h=null})),H(T,"click",(function(t){L(t),h?h():s&&s(),s=null,f=null,h=null}))}function v(t,e,n,i,a){var o=U("video",{playsinline:!0,autoplay:!0});o.srcObject=t,e&&(o.muted=!0,o.style.transform="scaleX(-1)"),c[n]={video:o,user:i,params:a||{}},p();var r=o.play();void 0!==r&&r.then((function(){})).catch((function(t){e||(o.muted=!0,o.play().then((function(){})).catch((function(t){})))}))}var m=null;function g(t){if(t!==m){null!==m&&m in c&&P(c[m].video,"speaking");var e=0;for(var n in c)c.hasOwnProperty(n)&&(e+=1);e>=3&&t in c&&B(c[t].video,"speaking"),m=t}}s=se((function(){return new Promise((function(t,e){function n(){var e=("http:"==location.protocol?"ws://":"wss://")+r.host+(r.port?":"+r.port:"")+(r.path||"/")+r.upload+"/"+r.user.id+"?name="+encodeURIComponent(r.user.name);t(e)}"function"==typeof r?r().then((function(t){a(),r=t,n()})).catch(e):n()}))}),e?null:function(){return new Promise((function(t,e){u?t():(f=t,h=e)}))},(function(t){for(var n in e||o(),c)c.hasOwnProperty(n)&&c[n].video.muted&&(c[n].video.muted=!1);v(t,!0,"cam")}),(function(t,n,i,l){if(e&&(o(),u=!0),e||a(),!e&&!u&&i&&r.user.id==i)return d();v(t,!1,n,i,l)}),(function(t,n,i){return t in c&&delete c[t],e||u||!n||r.user.id!=n?0==Object.keys(c).filter((function(t){return t&&"cam"!=t})).length?d():void p():d()}),(function(t,e){if(t.audio&&null!==t.audio.volume)g("cam");else for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];"audio"in i&&null!==i.audio.volume&&g(n)}}),(function(t){o(),l&&l.close(),t&&Ut($(t),"danger")}))}function he(t,e,n){function i(e){A(t,"reset");var i=$t(e.main,(function(e){z(t,"pagination",e)}));0!=i.length&&gt(t,n,i,!0)}H(t,"submit",(function(n){L(n);var a=C(t,"pagination"),o=p({},e,a||{});jt(t,o,i)}))}function de(e,n){if(!n)return null;var i=t.MediaSource;if(!i)return null;var a=i.isTypeSupported;if("function"!=typeof a)return null;for(var o=['video/mp4; codecs="avc1.42c01e,mp4a.40.5"','video/mp4; codecs="avc1.4d401f,mp4a.40.5"'],r=0;r<o.length;++r)if(!a(o[r]))return null;var l=t.Hls;if(!l||!l.isSupported())return null;var c=null;if("flat"in[]&&p2pml&&p2pml.hlsjs&&p2pml.hlsjs.Engine.isSupported()){var u={segments:{forwardSegmentCount:50,maxHistorySegments:50,swarmId:n},loader:{trackerAnnounce:["wss://p2p-tracker.gloria.tv:10443"],cachedSegmentExpiration:6048e5,cachedSegmentsCount:100,requiredSegmentsPriority:1,simultaneousHttpDownloads:3,httpFailedSegmentTimeout:1e3,httpDownloadInitialTimeout:12e4,httpDownloadInitialTimeoutPerSegment:500,httpUseRanges:!0,httpDownloadProbabilitySkipIfNoPeers:!0,httpDownloadMaxPriority:20,httpDownloadProbability:0,httpDownloadProbabilityInterval:1e3,simultaneousP2PDownloads:7,p2pDownloadMaxPriority:20,rtcConfig:{iceServers:[{urls:"stun:stun.l.google.com:19302"}]}}},s=new p2pml.hlsjs.Engine(u);c=new l({liveSyncDurationCount:7,loader:s.createLoaderClass()}),p2pml.hlsjs.initHlsJsPlayer(c),s.on("peer_connect",(function(t){})),s.on("peer_close",(function(t){})),s.on("segment_loaded",(function(t,e){}))}else c=new l;return c.loadSource(n),c.attachMedia(e),c}st("[data-record]",(function(t){var e=V(t,"data-record");H(t,"click",(function(t){L(t),this.blur(),fe(!0,e)})),setTimeout((function(){O(f,t)&&F(t)}),6e5)})),st("[data-submit]",(function(e){H(e,"submit",(function(n){L(n),jt(e,(function(t){var n=C(e,"blobs");n&&(n.forEach((function(e){t.append(e.name,e.blob,e.filename)})),z(e,"blobs",null))}),(function(n){if(A(e,"reset"),(Y(e,".overlay.dialog")||0==G(e,"textarea,input[type=text],input[type=search],input[type=password],input[type=email],input[type=tel],input[type=url]").length)&&0==$t(n.main).length)return void Bt();It(M(),!0,n.url,n.rtl,n.title,"obsolete"),Nt(n),t.scroll(0,0)}),(function(){e.submit()}))}))})),st("[data-above]",(function(t){he(t,V(t,"data-above"),"before")})),st("[data-below]",(function(t){he(t,V(t,"data-below"),"after")})),st("[data-like]",(function(t){var e=V(t,"data-like");H(t,"click",(function(n){L(n),this.blur(),at(!0,null,p({},e),(function(e){var n=$t(e.main);if(0!=n.length){var i=n.shift().querySelector("[data-like]");if(i){var a=u(t,!1),o=u(i,!1);if(a.length&&o.length){var r=a[0].parentNode;F(a),o.reverse().forEach((function(t){r.insertBefore(t,r.firstChild)})),ft(r,!0)}var l=u(t,!0),c=u(i,!0);if(l.length&&c.length){r=l[0].parentNode;F(l),c.reverse().forEach((function(t){r.insertBefore(t,r.firstChild)})),ft(r,!0)}}}function u(t,e){var n=J(Y(t,".dropdown"),e?"ul":":not(ul)");return J(n.shift())}}))}))})),st("[data-sort]",(function(t){var e=V(t,"data-sort");H(t,"click",(function(n){L(n),this.blur(),function(t,e){var n=Y(t,"ol,ul"),i=Y(t,"li");if(n&&i){switch(e.request){case"move-top":n.insertBefore(i,n.firstChild);break;case"move-up":n.insertBefore(i,i.previousElementSibling);break;case"move-down":i.nextElementSibling&&n.insertBefore(i,i.nextElementSibling.nextElementSibling);break;case"move-bottom":n.appendChild(i);break;case"delete":F(i);break;default:return}at(!0,null,e)}}(t,e)}))})),st("input[type=file]",(function(e){!function e(n,i,a,o){i&&!a&&W(a=n.cloneNode(),"required");var r=Y(n,".placeholder");function l(t){if(0!=t.length){for(var e=r.firstChild;null!==e;){var n=e;if(e=e.nextSibling,n.nodeType==Node.ELEMENT_NODE){if(n.matches("input[type=file]"))continue;if(i&&n.matches(".file"))continue}F(n)}var a;return t.forEach((function(t){var e=U("span",{class:"file"},(t.type.match(/^image/i)?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.414 1.001H5c-1.103 0-2 .897-2 2v18c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5.587l-4.586-4.586zM5 21.001v-18h10v4h4l.001 14H5z"/><path d="M12 16.002l-2-2-3 4h10l-3-6z"/><circle cx="10" cy="11.002" r="2"/></svg>':t.type.match(/^video/i)?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13 12.007H8v6h5v-2.25l3 2.25v-6l-3 2.25z"/><path d="M16.414 1.004H5c-1.103 0-2 .898-2 2v18c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5.59l-4.586-4.586zM5 21.004v-18h10v4h4l.001 14H5z"/></svg>':t.type.match(/^audio/i)?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M16.414 1.003H5c-1.103 0-2 .897-2 2v18c0 1.103.897 2 2 2h14c1.103 0 2-.897 2-2V5.589l-4.586-4.586zM5 21.003v-18h10v4h4l.001 14H5z"/><path d="M11 13.05a2.5 2.5 0 102 2.45v-5.112l2.632.877.633-1.898L11 7.612v5.438z"/></svg>':'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M15.414 2H6c-1.103 0-2 .898-2 2v16c0 1.103.897 2 2 2h12c1.103 0 2-.897 2-2V6.586L15.414 2zm2.587 18H6V4h8v4h4l.001 12z"/></svg>')+t.name);G(e,"svg").forEach((function(t){B(t,"icon")})),q(r,j(" ")),q(r,e),a=e})),a}}var c=Y(n,"label");function u(t){X(c,{backgroundImage:"url("+t+")",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"})}var s=!1;if(H(n,"change",(function(t){if(!s&&t.target.files){var o=t.target.files;if(!r){var f=U("div",{class:"label upload"});c.parentNode.insertBefore(f,c),q(f,c),B(r=c,"placeholder"),P(r,"upload")}if(i){D(n,"hidden",""),r.parentNode.insertBefore(n,r);var h=a.cloneNode();q(r,h),e(h,i,a,!0)}for(var d=[],p=0;p<o.length;++p){var v=o[p];d.push({type:v.type,name:v.name})}for(l(d),p=0;p<o.length;++p)if(0!=(v=o[p]).size&&!(v.size>16777216)&&v.type.match(/^image/i)){var m=new FileReader;m.onloadend=function(t){u(t.target.result)},m.readAsDataURL(v);break}}})),!o){var f=Y(n,".upload");f&&r&&G(f,"[data-capture]").forEach((function(e){if(d.mediaDevices&&d.mediaDevices.getUserMedia){var a=null;H(e,"click",(function(o){d.mediaDevices.getUserMedia({video:{width:{min:640,ideal:3840,max:7680},height:{min:320,ideal:2160,max:4320}},audio:!1}).then((function(o){var r=U("video",{class:"open"}),c=U("canvas",{}),f=null,h=Pt("lightbox",[r,c],(function(){var t=Lt.indexOf(h);-1!=t&&Lt.splice(t,1),clearTimeout(f),o.getTracks().forEach((function(t){t.stop()}))}));Lt.push(h),X(h.overlay,{width:320/240*100+"vh",height:"75vw"}),r.srcObject=o,H(r,"loadedmetadata",(function(t){r.play()})),H(r,"playing",(function(o){var d=r.videoWidth,p=r.videoHeight;X(h.overlay,{width:d/p*100+"vh",height:p/d*100+"vw"}),f=t.setTimeout((function(){var t=c.getContext("2d");c.width=d,c.height=p,t.drawImage(r,0,0,d,p);var o=Y(n,"form");o&&(c.toBlob((function(t){var e=R(n,"name"),a=C(o,"blobs");a||(a=[]),i||(a=a.filter((function(t){return t.name!=e}))),a.push({name:e,blob:t,filename:"snapshot.jpeg"}),z(o,"blobs",a)}),"image/jpeg",.95),a&&!i&&F(a),a=l([{type:"image/jpeg",name:e.textContent}]),u(c.toDataURL("image/jpeg",.95)),s=!0,A(n,"change"),s=!1,W(n,"required"),h.close())}),1e3)}))})).catch((function(t){Ut($(t.message),"danger")}))}))}else F(e)}))}}(e,N(e,"multiple"))})),st("[data-validate]",(function(t){if(t.setCustomValidity){var e=Y(t,"form");if(e){var n=V(t,"data-validate"),i=R(t,"name");if(i){var a=ot(),o=T((function(){if(t.value){var o=p({},n||{});for(var r in o)o.hasOwnProperty(r)&&G(e,"[name="+r+"]").forEach((function(t){t.value&&(o[r]=t.value)}));o[i]=t.value,a(!0,void 0,o,(function(e){var n="";e.main&&e.main.forEach((function(t){t.matches(".alert-danger")&&(n=t.textContent)})),t.setCustomValidity(n)}))}}),300,!0);H(t,"input",o)}}}})),st("[data-repeatpassword]",(function(t){var e=_(t,"input[type=password]");e&&H(e,"change",(function(){var n=e.value.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");D(t,"pattern",n)}))})),st("[data-upload]",(function(t){var e=Y(t,"form");if(e){var n=G(e,"input[name=upload-file]"),i=G(e,"input[name=upload-link]"),a=G(e,"input[name=upload-title]"),o=G(e,"textarea[name=upload-text]"),r=G(e,"button[data-livestream]"),l=[];n.forEach((function(e){var n=Y(e,".upload");l.push(n),H(e,"change",(function(e){var n=t.parentNode;if(n){var o=[t].concat(i,a,r,n);1==r.length&&o.push(r[0].parentNode),F(o)}}))})),i.forEach((function(e){H(e,"input",(function(n){var i=t.parentNode;if(i){var c=Y(e,".cols");c&&c.parentNode.insertBefore(e,c),e.focus(),D(e,"required","required"),o.forEach((function(t){W(t,"required")}));var u=[t].concat(l,a,r,i);1==r.length&&u.push(r[0].parentNode),F(u)}}))})),a.forEach((function(t){H(t,"input",(function(t){c()}))})),H(t,"click",(function(t){L(t),c()})),r.forEach((function(n){H(n,"click",(function(n){L(n);var o=t.parentNode;if(o){var c=[t].concat(l,i,a,r,o);1==r.length&&c.push(r[0].parentNode),F(c);var u=!1;G(e,"button[type=submit]").forEach((function(t){H(t,"click",(function(t){L(t),e.checkValidity&&e.checkValidity()&&(u||(u=!0,G(e,"input[type=hidden][name=upload]").forEach((function(t){D(t,"value","live")})),function(t,e){var n=null,i=null;function a(){n&&n(),n=null,i&&i()}n=se((function(){return new Promise((function(t,n){e().then((function(e){var n=("http:"==location.protocol?"ws://":"wss://")+e.host+(e.port?":"+e.port:"")+(e.path||"/")+e.upload;t(n)})).catch(n)}))}),null,(function(e){if(0!=e.getVideoTracks().length&&0!=e.getAudioTracks().length){X(t,{display:"none"});var n=U("video",{playsinline:!0,autoplay:!0}),o=U("button",{class:"stop muted"}),r=U("div",{class:"keypad"},o),l=U("div",{class:"camera"},[n,r]);t.parentNode.insertBefore(l,t),n.srcObject=e,n.muted=!0,n.style.transform="scaleX(-1)",n.play(),H(o,"click",(function(t){L(t),a()})),i=function(){i=null,F(r),n.srcObject=null}}else a()}),(function(t,e,n,i){}),(function(t,e,n){}),(function(t,e){}),(function(t){a(),t&&Ut($(t),"danger")}))}(e,(function(){return new Promise((function(t,n){jt(e,null,(function(i){A(e,"reset");var a=!1;$t(i.main,(function(e){t(e),a=!0})),a||n()}),(function(){n()}))}))}))))}))}))}}))}))}function c(){var e=t.parentNode;if(e){a.forEach((function(t){var e=Y(t,".cols");e&&e.parentNode.insertBefore(t,e),t.focus()})),o.forEach((function(t){D(t,"data-fileupload","")}));var n=[t].concat(l,i,r,e);1==r.length&&n.push(r[0].parentNode),F(n)}}})),st("[data-signup]",(function(t){var e=Y(t,"form");if(e){var n=G(e,"input[name=user-namegiven],input[name=user-nameadditional],input[name=user-namefamily]"),i=G(e,"input[name=user-organization]"),a=G(e,"input[name=user-gender][value=neuter]");n.forEach((function(t){t&&H(t,"input",(function(t){i&&(F(i),n=null,i=null,a=null)}))})),i.forEach((function(t){t&&H(t,"input",(function(t){if(n&&a){var e=n[0].parentNode;F(n.concat(e)),a.forEach((function(t){var e=Y(t,"label");e&&W(e,"hidden")})),n=null,i=null,a=null}}))}))}})),st("[data-autocomplete]",(function(t){var e=V(t,"data-autocomplete"),n=R(t,"name"),i=Y(t,"form");n&&i&&function(t,e,n,i,a){if(!Z()||!a){D(e,"autocomplete","off");var o=e.offsetWidth,r=null,l=ot(),c=T((function(){if(o=Math.max(o,e.offsetWidth),e.value){var c=p({},n);c[i]=e.value,l(!1,void 0,c,(function(n){if(n.main||n.aside){if(r)K(r);else{r=U("div",{class:"autocomplete"});var i=t.getBoundingClientRect(),l=e.getBoundingClientRect();X(r,{top:l.top-i.top+e.offsetHeight+1+"px",left:l.left-i.left+"px",maxWidth:o+"px"}),H(r,"click",(function(){u()}),!0),H(f,["mouseup","touchend"],s),q(t,r)}if(a){var c=[];n.main&&(c=n.main.slice(0,5).map((function(t){return B(t,"suggestion"),t})));var h=[];if(n.aside&&(h=n.aside.slice(0,3).map((function(t){return B(t,"suggestion"),t}))),0!=h.length){B(r,"cols");var d=U("div",{class:"col-spare"},c),p=U("div",{class:"col-thumb"},h);gt(r,"append",[d,p],!1)}else P(r,"cols"),gt(r,"append",c,!1)}else c=[],n.main&&(c=n.main.slice(0,5).map((function(t){return B(t,"suggestion"),H(t,"click",(function(n){L(n),this.blur();var i=null;G(t,".richtext").forEach((function(t){i||(i=t.textContent)})),i||(i=t.textContent),e.value=i;var a=R(t,"data-id"),o=Y(e,"label");if(a&&o){var r=G(o,"input[type=hidden]");1==r.length&&(r.shift().value=a)}u()})),t}))),gt(r,"append",c,!1)}else u()}))}else u()}),300,!0);H(e,"input",c)}function u(){r&&(S(f,["mouseup","touchend"],s),F(r),r=null)}function s(t){r&&(O(e,t.target)||O(r,t.target)||u())}}(i,t,e,n,!1)})),st("[data-search]",(function(t){var e=V(t,"data-search"),n=R(t,"name"),i=Y(t,".modal"),a=i?i.querySelector(".main"):f.querySelector("main");if(n&&a){var o=ot(),r=null,l=T((function(){c(t.value)}),300,!0);H(t,"input",l),H(t,"keydown",(function(e){"Escape"==e.key&&(c(),t.value="")}))}function c(i){if(!i||i.length<3){if(null===r)return;return K(a),q(a,r),void(r=null)}var l=p({},e);l[n]=i,o(!1,void 0,l,(function(i){null===r?r=K(a):K(a),i.main?(gt(a,"append",i.main,!1),G(a,"[data-filter]").forEach((function(i){i.matches("input[type=checkbox]")?H(i,"change",(function(n){var a=!!i.checked;"all-languages"!=i.name&&"all-users"!=i.name||(a=!a),a?e[i.name]="":delete e[i.name],c(t.value)})):H(i,"click",(function(e){L(e),this.blur();var a=V(i,"data-filter");n in a&&(t.value=a[n]),c(t.value)}))}))):c()}))}})),st("[data-lightbox]",(function(t){var e=V(t,"data-lightbox");if(e){var n=!1;H(t,"click",(function(t){L(t),this.blur();var i=Array.isArray(e);!function(t,e){var n=[];e.forEach((function(t,e){var i=t.url?U("img",{src:Gt(t.url,t.width,t.height),width:t.width,height:t.height,alt:""}):U("div",{style:"width:"+("audio"==t.type?"80%":"100%")},t.html);0!=e&&G(i,"video,audio").forEach((function(t){W(t,"autoplay")})),n.push(i)}));var i=Pt("lightbox",n,(function(){var t=Lt.indexOf(i);-1!=t&&Lt.splice(t,1)}));function a(t){var a=i.overlay.querySelector(".open");a&&(P(a,"open"),G(a,"video,audio").forEach((function(t){t.pause()})));var o=n.indexOf(a);-1==o&&(o=0),-1==t?o=0!=o?o-1:n.length-1:1==t&&(o=o+1<n.length?o+1:0);var r=n[o];B(r,"open"),G(r,"video,audio").forEach((function(t){t.play()}));var l=e[o],c="paper"==l.type?2*l.width:l.width||512,u=l.height||128;X(i.overlay,{width:c/u*100+"vh",height:u/c*100+"vw"})}Lt.push(i);var o=U("button"),r=U("div",{class:"nav-close"},o);if(q(i.modal,r),e.length>1){var l=U("button"),c=U("div",{class:"nav-back"},l);H(l,"click",(function(t){L(t),this.blur(),a(-1)}));var u=U("button"),s=U("div",{class:"nav-next"},u);H(u,"click",(function(t){L(t),this.blur(),a(1)})),q(i.modal,[c,s])}H(i.overlay,"click",(function(t){L(t),this.blur();var o=-1;n.forEach((function(e,n){O(e,t.target)&&(o=n)})),-1==o||1==e.length?i.close():"url"in e[o]&&a(1)})),a(0)}(0,i?e:[e]),i||!e.notify||n||(at(!1,null,e.notify),n=!0)}))}})),st("[data-video]",(function(e){var n=V(e,"data-video");if(n){var i=N(e,"autoplay");setTimeout((function(){!function(e,n,i,a,o,r){var l=U("div",{style:"display:none"},'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="plyr-airplay" viewBox="0 0 18 18"><path d="M16 1H2a1 1 0 00-1 1v10a1 1 0 001 1h3v-2H3V3h12v8h-2v2h3a1 1 0 001-1V2a1 1 0 00-1-1z"/><path d="M4 17h10l-5-6z"/></symbol><symbol id="plyr-captions-off" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd" fill-opacity=".5"/></symbol><symbol id="plyr-captions-on" viewBox="0 0 18 18"><path d="M1 1c-.6 0-1 .4-1 1v11c0 .6.4 1 1 1h4.6l2.7 2.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3l2.7-2.7H17c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1H1zm4.52 10.15c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41C8.47 4.96 7.46 3.76 5.5 3.76c-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69zm7.57 0c1.99 0 3.01-1.32 3.28-2.41l-1.29-.39c-.19.66-.78 1.45-1.99 1.45-1.14 0-2.2-.83-2.2-2.34 0-1.61 1.12-2.37 2.18-2.37 1.23 0 1.78.75 1.95 1.43l1.3-.41c-.28-1.15-1.29-2.35-3.25-2.35-1.9 0-3.61 1.44-3.61 3.7 0 2.26 1.65 3.69 3.63 3.69z" fill-rule="evenodd"/></symbol><symbol id="plyr-download" viewBox="0 0 18 18"><path d="M9 13c.3 0 .5-.1.7-.3L15.4 7 14 5.6l-4 4V1H8v8.6l-4-4L2.6 7l5.7 5.7c.2.2.4.3.7.3zm-7 2h14v2H2z"/></symbol><symbol id="plyr-enter-fullscreen" viewBox="0 0 18 18"><path d="M10 3h3.6l-4 4L11 8.4l4-4V8h2V1h-7zM7 9.6l-4 4V10H1v7h7v-2H4.4l4-4z"/></symbol><symbol id="plyr-exit-fullscreen" viewBox="0 0 18 18"><path d="M1 12h3.6l-4 4L2 17.4l4-4V17h2v-7H1zM16 .6l-4 4V1h-2v7h7V6h-3.6l4-4z"/></symbol><symbol id="plyr-fast-forward" viewBox="0 0 18 18"><path d="M7.875 7.171L0 1v16l7.875-6.171V17L18 9 7.875 1z"/></symbol><symbol id="plyr-logo-vimeo" viewBox="0 0 18 18"><path d="M17 5.3c-.1 1.6-1.2 3.7-3.3 6.4-2.2 2.8-4 4.2-5.5 4.2-.9 0-1.7-.9-2.4-2.6C5 10.9 4.4 6 3 6c-.1 0-.5.3-1.2.8l-.8-1c.8-.7 3.5-3.4 4.7-3.5 1.2-.1 2 .7 2.3 2.5.3 2 .8 6.1 1.8 6.1.9 0 2.5-3.4 2.6-4 .1-.9-.3-1.9-2.3-1.1.8-2.6 2.3-3.8 4.5-3.8 1.7.1 2.5 1.2 2.4 3.3z"/></symbol><symbol id="plyr-logo-youtube" viewBox="0 0 18 18"><path d="M16.8 5.8c-.2-1.3-.8-2.2-2.2-2.4C12.4 3 9 3 9 3s-3.4 0-5.6.4C2 3.6 1.3 4.5 1.2 5.8 1 7.1 1 9 1 9s0 1.9.2 3.2c.2 1.3.8 2.2 2.2 2.4C5.6 15 9 15 9 15s3.4 0 5.6-.4c1.4-.3 2-1.1 2.2-2.4.2-1.3.2-3.2.2-3.2s0-1.9-.2-3.2zM7 12V6l5 3-5 3z"/></symbol><symbol id="plyr-muted" viewBox="0 0 18 18"><path d="M12.4 12.5l2.1-2.1 2.1 2.1 1.4-1.4L15.9 9 18 6.9l-1.4-1.4-2.1 2.1-2.1-2.1L11 6.9 13.1 9 11 11.1zM3.786 6.008H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"/></symbol><symbol id="plyr-pause" viewBox="0 0 18 18"><path d="M6 1H3c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1zm6 0c-.6 0-1 .4-1 1v14c0 .6.4 1 1 1h3c.6 0 1-.4 1-1V2c0-.6-.4-1-1-1h-3z"/></symbol><symbol id="plyr-pip" viewBox="0 0 18 18"><path d="M13.293 3.293L7.022 9.564l1.414 1.414 6.271-6.271L17 7V1h-6z"/><path d="M13 15H3V5h5V3H2a1 1 0 00-1 1v12a1 1 0 001 1h12a1 1 0 001-1v-6h-2v5z"/></symbol><symbol id="plyr-play" viewBox="0 0 18 18"><path d="M15.562 8.1L3.87.225c-.818-.562-1.87 0-1.87.9v15.75c0 .9 1.052 1.462 1.87.9L15.563 9.9c.584-.45.584-1.35 0-1.8z"/></symbol><symbol id="plyr-restart" viewBox="0 0 18 18"><path d="M9.7 1.2l.7 6.4 2.1-2.1c1.9 1.9 1.9 5.1 0 7-.9 1-2.2 1.5-3.5 1.5-1.3 0-2.6-.5-3.5-1.5-1.9-1.9-1.9-5.1 0-7 .6-.6 1.4-1.1 2.3-1.3l-.6-1.9C6 2.6 4.9 3.2 4 4.1 1.3 6.8 1.3 11.2 4 14c1.3 1.3 3.1 2 4.9 2 1.9 0 3.6-.7 4.9-2 2.7-2.7 2.7-7.1 0-9.9L16 1.9l-6.3-.7z"/></symbol><symbol id="plyr-rewind" viewBox="0 0 18 18"><path d="M10.125 1L0 9l10.125 8v-6.171L18 17V1l-7.875 6.171z"/></symbol><symbol id="plyr-settings" viewBox="0 0 18 18"><path d="M16.135 7.784a2 2 0 01-1.23-2.969c.322-.536.225-.998-.094-1.316l-.31-.31c-.318-.318-.78-.415-1.316-.094a2 2 0 01-2.969-1.23C10.065 1.258 9.669 1 9.219 1h-.438c-.45 0-.845.258-.997.865a2 2 0 01-2.969 1.23c-.536-.322-.999-.225-1.317.093l-.31.31c-.318.318-.415.781-.093 1.317a2 2 0 01-1.23 2.969C1.26 7.935 1 8.33 1 8.781v.438c0 .45.258.845.865.997a2 2 0 011.23 2.969c-.322.536-.225.998.094 1.316l.31.31c.319.319.782.415 1.316.094a2 2 0 012.969 1.23c.151.607.547.865.997.865h.438c.45 0 .845-.258.997-.865a2 2 0 012.969-1.23c.535.321.997.225 1.316-.094l.31-.31c.318-.318.415-.781.094-1.316a2 2 0 011.23-2.969c.607-.151.865-.547.865-.997v-.438c0-.451-.26-.846-.865-.997zM9 12a3 3 0 110-6 3 3 0 010 6z"/></symbol><symbol id="plyr-volume" viewBox="0 0 18 18"><path d="M15.6 3.3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4C15.4 5.9 16 7.4 16 9c0 1.6-.6 3.1-1.8 4.3-.4.4-.4 1 0 1.4.2.2.5.3.7.3.3 0 .5-.1.7-.3C17.1 13.2 18 11.2 18 9s-.9-4.2-2.4-5.7z"/><path d="M11.282 5.282a.909.909 0 000 1.316c.735.735.995 1.458.995 2.402 0 .936-.425 1.917-.995 2.487a.909.909 0 000 1.316c.145.145.636.262 1.018.156a.725.725 0 00.298-.156C13.773 11.733 14.13 10.16 14.13 9c0-.17-.002-.34-.011-.51-.053-.992-.319-2.005-1.522-3.208a.909.909 0 00-1.316 0zm-7.496.726H.714C.286 6.008 0 6.31 0 6.76v4.512c0 .452.286.752.714.752h3.072l4.071 3.858c.5.3 1.143 0 1.143-.602V2.752c0-.601-.643-.977-1.143-.601L3.786 6.008z"/></symbol></svg>');e.parentNode.insertBefore(l,e);var c=null;a&&(c=function(t){for(var e=a.frames,i=1;i*i<e;)i++;var o=parseInt((e+i-1)/i),r=parseInt(a.width/i),l=parseInt(a.height/o);r*i==a.width&&a.height;for(var c=[],u=0;u<e;++u){var s=r*(u%i),f=l*parseInt(u/i),h=u*n/Math.max(e,1)/1e3,d=(u+1)*n/Math.max(e,1)/1e3;c.push({startTime:h,endTime:d,text:Gt(a.url,a.width,a.height),x:s,y:f,w:r,h:l})}t([{frames:c,width:a.width,height:a.height,urlPrefix:""}])});var u=[],s=null;G(e,"source").forEach((function(t){var e=R(t,"type")||"",n=R(t,"src"),i=V(t,"data-quality")||{};e.match(/^application\/x-mpegURL$/i)?s||(s=n):i&&(u.push([t,i.height]),i.width)})),u.sort((function(t,e){return t[1]-e[1]}));for(var h=[4320,2880,2160,1440,1080,720,576,480,360,240],d=0;d<u.length;++d){for(var p=0,v=0;v<h.length&&(p=v,!(u[d][1]>=h[v]));++v);D(u[d][0],"size",h[p]),h.splice(p)}y((function(){if(O(f,e)){var n=new Plyr(e,{autoplay:i,volume:1,iconUrl:"",controls:["play-large","play","progress","current-time","volume","settings","captions","pip","airplay","fullscreen"],settings:["quality"],blankVideo:null,keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},storage:{enabled:!1,key:"plyr"},duration:null,previewThumbnails:c?{enabled:!0,src:c}:{enabled:!1}}),a=de(e,s);a&&n.on("languagechange",(function(){setTimeout((function(){a.subtitleTrack=n.currentTrack}),50)})),n.once("ready",(function(){if(O(f,e)){if(i){var a=/^#(\d+)$/.exec(t.location.hash||"");a&&(n.currentTime=parseInt(a[1])),n.play()}}else n.stop()}));var o=!1;n.on("play",(function(){a&&a.startLoad(),r&&!o&&(at(!1,null,r),o=!0)})),n.on("pause",(function(){a&&a.stopLoad()})),n.on("qualitychange",(function(t){}))}}))}(e,n.duration,i,n.thumbnails,n.logo,n.notify)}))}}));var pe=null,ve=null;function me(t){if(ve!==t&&(ve=t,pe&&pe(),pe=null,t)){var e=V(t,"data-teaser");if(0==dt){var n=null,i=null;if(e.video){var a=e.video,o=[],r=null;if(a.files.forEach((function(t){var e=t.url;if("object"==typeof e&&(l&&!("language"in e)&&(e.language=l),c&&!("synchronizer"in e)&&(e.synchronizer=c),e=nt(e)),t.mediatype.match(/^application\/x-mpegURL$/i))r=e;else{var n=U("source",{type:t.mediatype,src:e});o.push(n)}})),0!=o.length||r){var u=G(t,"figure");u.sort((function(t,e){var n=t.getBoundingClientRect(),i=e.getBoundingClientRect();return i.width*i.height-n.width*n.height}));var s=u.shift(),f=G(s,"img").shift(),h=G(s,"a").pop(),d=G(s,".play").pop(),p=G(s,".topleft").pop(),v=p?p.innerHTML:null,m=U("video",{width:a.width,height:a.height,poster:f.src},o);m.muted=!0,m.loop=!0,m.playsinline=!0,m.disablePictureInPicture=!0,m.controlsList&&(m.controlsList.add("nodownload"),m.controlsList.add("nofullscreen"),m.controlsList.add("noremoteplayback")),H(m,"contextmenu",(function(){return!1})),X(m,{marginTop:f.style.marginTop||"",marginRight:f.style.marginRight||"",marginBottom:f.style.marginBottom||"",marginLeft:f.style.marginLeft||""}),d?d.parentNode.insertBefore(m,d.nextSibling):h.parentNode.insertBefore(m,h),H(m,"playing",(function(t){var e=s.getBoundingClientRect(),n=e.width/e.height,i=a.width/a.height;X(m,i<n?{marginTop:"-"+50*(1/i-1/n)+"%",marginRight:null,marginBottom:"-"+50*(1/i-1/n)+"%",marginLeft:null}:{width:i/n*100+"%",marginTop:null,marginRight:"-"+50*(i/n-1)+"%",marginBottom:null,marginLeft:"-"+50*(i/n-1)+"%"})}));var g=[],w=null,b=null,x=null,k=function(){b&&F(b),p&&(p.innerHTML=v),w=null,b=null,x=null};if(H(m,"timeupdate",(function(t){if(!1!==k){var e=g.filter((function(t){return t.start<=m.currentTime&&m.currentTime<=t.end}));if(p&&(m.duration||m.currentTime>0)){var n=m.duration?Math.ceil(m.duration)-m.currentTime:m.currentTime,i=parseInt(n/3600),a=parseInt(n/60)%60,o=parseInt(n)%60;p.textContent=(0!=i?(i<10?"0"+i:i)+":":"")+(a<10?"0"+a:a)+":"+(o<10?"0"+o:o)}if(0==e.length)return b&&F(b),w=null,b=null,void(x=null);var r=e[0];w!==r&&(w=r,b||(x=U("div"),b=U("div",{class:"subtitle"},x),h.parentNode.insertBefore(b,h)),x.textContent=r.text.join("\n"))}})),a.tracks&&0!=a.tracks.length){at(!1,null,a.tracks[0].url,(function(t){!1!==k&&t.split(/\r?\n\r?\n/).forEach((function(t){var e=null;t.split(/\r?\n/).forEach((function(t){if(null===e){var n=t.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2})\.([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2})\.([0-9]{2,3})/);if(!n)return;e={start:60*Number(n[1]||0)*60+60*Number(n[2])+Number(n[3])+Number("0."+n[4]),end:60*Number(n[6]||0)*60+60*Number(n[7])+Number(n[8])+Number("0."+n[9]),text:[]}}else 0!=t.trim().length&&e.text.push(t.trim())})),null!==e&&g.push(e)}))}),null,null,"text/vtt")}var M=function(){try{m.play()}catch(t){n&&n(),n=null}},E=null;n=function(){k&&k(),k=!1,E&&E.stopLoad(),F(m)},r?y((function(){n&&((E=de(m,r))&&H(m,"play",(function(t){E.startLoad()})),M())})):M()}}else{var T=G(t,"blockquote[cite]>a[href]");0!=T.length&&(i=function(){var t=!1,e=new Image,n=console;if(Object.defineProperty(e,"id",{get:function(){t=!0}}),n.log("%cH",e),!t){var i=T.shift().parentNode,a=U("iframe",{width:0,height:0,src:i.getAttribute("cite"),sandbox:"",style:"display:none"});if("allow"in a&&"featurePolicy"in a){var o=a.featurePolicy.features();-1!=o.indexOf("autoplay")&&(a.allow=o.reduce((function(t,e){return t+e+" 'none';"}),""),q(i,a),setTimeout((function(){F(a)}),1e3))}}})}var A=setTimeout((function(){C(t,"teaser")||(z(t,"teaser",!0),at(!1,void 0,e.notify),i&&i(),i=null)}),6e3),L=G(t,"a[href],button,label");pe=function(){n&&n(),n=null,clearTimeout(A),L.forEach((function(t){S(t,"click",pe)}));var t=pt.indexOf(pe);-1!=t&&delete pt[t]},L.forEach((function(t){H(t,"click",pe)})),pt.push(pe)}}}var ge=T((function(e){var n=null,i=[],a=(f.clientHeight||t.innerHeight)/2;G(f,"[data-teaser]").forEach((function(t){if(wt(t)){var e=G(t,"h1,h2,h3,figure"),o=(0!=e.length?e.shift():t).getBoundingClientRect(),r=o.bottom<a?a-o.bottom:o.top>a?o.top-a:0;!n&&o.top>=0&&(n=t),i.push([t,r])}})),n?me(n):0!=i.length?(i.sort((function(t,e){return t[1]-e[1]})),me(i.shift()[0])):me()}),200,!0);function we(e,n,i){var a=f.matches("html[dir=rtl]"),o=U("button"),r=U("div",{class:"nav-back lock"},o),l=U("button"),c=U("div",{class:"nav-next lock"},l),u=Y(e,".overlay");u||(u=Y(e,".frame")),u&&(G(u,".nav-back,.nav-next").forEach((function(t){F(t)})),q(u,[r,c]));var s=!1;function d(){i&&!s&&(at(!1,null,i),s=!0)}function p(t,e){var i=e;a&&(e%2==0?i+=1:i-=1),t.innerHTML=i<n.length?n[i].html:"",q(t,U("var",null,j(i+1)))}var v=0,m=!1;function g(t){m=!0;var n=G(e,"div.page");if(4==n.length){var i=n[0],o=n[1];q(e,i),q(e,o),t?(p(i,v-2),p(o,v-1),v-=2):(p(i,v+2),p(o,v+3),v+=2);var l=parseInt(e.offsetWidth/2),u=parseInt(e.offsetHeight);X(i,{clip:"rect(0,0,"+u+"px,0)"}),X(o,{clip:"rect(0,0,"+u+"px,0)"}),X(r,{zIndex:3}),X(c,{zIndex:3}),x(400,(a?!t:t)?function(t){var e=parseInt(Math.round(t*(2*l)-l));e=Math.min(e,l);var n=parseInt(Math.round((1-t)*l));n=Math.max(n,0),X(i,{left:0,right:"auto",clip:"rect(0,"+(l-n)+"px,"+u+"px,0)",zIndex:1}),X(o,{left:e+"px",right:"auto",clip:"rect(0,"+l+"px,"+u+"px,"+n+"px)",zIndex:2})}:function(t){var e=parseInt(Math.round(2*l*(1-t)));e=Math.max(e,0);var n=parseInt(Math.round(t*l));n=Math.min(n,l);var a=e-l;X(i,{left:e+"px",right:"auto",clip:"rect(0,"+n+"px,"+u+"px,0)",zIndex:2}),X(o,{left:l+"px",right:"auto",clip:"rect(0,"+l+"px,"+u+"px,"+a+"px)",zIndex:1})},(function(){X(i,{left:null,right:null,clip:null,zIndex:null}),X(o,{left:null,right:null,clip:null,zIndex:null}),X(r,{zIndex:null}),X(c,{zIndex:null}),m=!1}))}}function w(){(a?v+3<=n.length:0!=v)?W(o,"disabled"):D(o,"disabled","disabled"),(a?0!=v:v+3<=n.length)?W(l,"disabled"):D(l,"disabled","disabled")}function y(){m||v<2||(g(!0),w(),d())}function b(){m||v+3>n.length||(g(!1),w(),d())}w(),H(o,"click",(function(t){L(t),this.blur(),y()})),H(l,"click",(function(t){L(t),this.blur(),b()})),z(e,"book",{back:y,next:b});var k=null;function M(e){e.originalEvent&&e.originalEvent.touches&&(e=e.originalEvent.touches[0]);if(k.idle&&Math.abs(e.pageX-k.x)>10&&(t.getSelection().toString()?k=null:k.idle(e)),k){var n=0;e.clientX||e.clientY?n=e.clientX:(e.pageX||e.pageY)&&(n=e.pageX-h.scrollLeft-f.scrollLeft);var i=n>k.pointerStartX?-1:1;k.dir=i}}function E(t){k&&(k.dir==(a?1:-1)?y():k.dir==(a?-1:1)&&b(),w()),S(f,["mousemove","touchmove"],M),S(f,["mouseup","touchend"],E),P(e,"drag"),k=null}H(e,["touchstart","mousedown"],(function(t){t.originalEvent&&t.originalEvent.touches&&(t=t.originalEvent.touches[0]),L(t),t.button&&2==t.button||(k={idle:function(t){k.idle=!1,B(e,"drag")},x:parseInt(t.pageX,10),dir:0,pointerStartX:parseInt(t.pageX,10),pointerStartY:parseInt(t.pageY,10)},H(f,["mousemove","touchmove"],M),H(f,["mouseup","touchend"],E))})),G(e,"div.page").forEach((function(e,i){H(e,"click",(function(e){L(e),this.blur();var a=v+i%2;a>=n.length&&(a-=1),function(e){var i=[];n.forEach((function(t){var e=U("div");X(e,{width:"85vw",height:85/t.width*t.height+"vw"}),i.push(e)}));var a=Pt("pages",i,(function(){var t=Lt.indexOf(a);-1!=t&&Lt.splice(t,1)}));if(a){if(Lt.push(a),H(a.overlay,"click",(function(t){L(t),this.blur(),a.close()})),0!=e&&e<i.length){var o=i[e].offsetTop;o&&a.modal.scroll(0,o-t.innerHeight/20)}var r=T((function(){var t=[];i.forEach((function(e){wt(e)&&t.push(e)})),G(a.overlay,"iframe").forEach((function(e){var n=Y(e,"div");-1==t.indexOf(n)&&F(e)})),t.forEach((function(t){if(!t.querySelector("iframe")){var e=i.indexOf(t);if(-1!=e){t.innerHTML=n[e].iframe;var a=t.offsetWidth/n[e].width;X(t.querySelector("iframe"),{transform:"scale("+a+")",transformOrigin:"0 0"})}}}))}),50);H(a.modal,["scroll","resize","orientationchange"],r),r()}}(a),d()}))}))}et.push(ge),st("[data-book]",(function(t){var e=V(t,"data-book");e&&e.pages&&setTimeout((function(){we(t,e.pages,e.notify)}))})),st("details,.details",(function(t){H(t,"click",(function(e){if(!N(t,"open")){var n=G(t,".toggle");if(0!=n.length){var i=!1;if(n.forEach((function(t){O(t,e.target)&&(i=!0)})),!i)return}L(e),this.blur();var a=t.offsetHeight;D(t,"open","open");var o=t.offsetHeight;if(a!=o)X(t,{height:a+"px",overflow:"hidden"}),x(2*a>=o?150:5*a>=o?300:450,(function(e){X(t,{height:(o-a)*e+a+"px"})}),(function(){X(t,{height:null,overflow:null})}))}}))})),st("[data-social]",(function(t){var e=V(t,"data-social"),n=[{name:"Facebook",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M9.375 12.96v8.185h3.977V13h2.718l.657-3.395h-3.344V7.117c0-.344.183-.804.738-.804h1.938V2.854h-3.614c-1.246 0-3.082 1.536-3.082 3.168v3.489h-2.09v3.437zm0 0"/></svg>',url:"https://www.facebook.com/sharer.php?u=[url]&t=[title]"},{name:"Twitter",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M21.145 6.328c-.676.297-1.395.5-2.157.594a3.765 3.765 0 001.649-2.078 7.498 7.498 0 01-2.38.91 3.758 3.758 0 00-2.741-1.184 3.751 3.751 0 00-3.653 4.606 10.64 10.64 0 01-7.73-3.918 3.747 3.747 0 001.16 5.008 3.72 3.72 0 01-1.7-.47v.048a3.759 3.759 0 003.009 3.68 3.84 3.84 0 01-1.695.063 3.759 3.759 0 003.507 2.604 7.522 7.522 0 01-4.66 1.606c-.3 0-.602-.016-.895-.05a10.624 10.624 0 005.75 1.683c6.903 0 10.676-5.715 10.676-10.672 0-.164-.004-.324-.012-.488a7.625 7.625 0 001.872-1.942"/></svg>',url:"https://twitter.com/intent/tweet?text=[title]&url=[url]&counturl=[url]&hashtags="},{name:"Reddit",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M6.57 13.355a1.357 1.357 0 102.716.005 1.357 1.357 0 00-2.716-.005zm8.145 0a1.357 1.357 0 102.714.005 1.357 1.357 0 00-2.714-.005zm.066 2.903a.802.802 0 011.13.133.807.807 0 01-.134 1.132c-.972.766-2.457 1.262-3.777 1.262-1.32 0-2.805-.496-3.777-1.262a.803.803 0 01-.133-1.132.802.802 0 011.129-.133c.562.441 1.672.918 2.781.918 1.11 0 2.219-.477 2.781-.918zm8.078-5.613c0-1.5-1.218-2.715-2.714-2.715-1.024 0-1.91.562-2.372 1.394-1.398-.761-3.097-1.254-4.949-1.37l1.621-3.638 3.098.895a2.04 2.04 0 001.922 1.36c1.125 0 2.035-.91 2.035-2.036 0-1.125-.91-2.035-2.035-2.035-.774 0-1.45.434-1.793 1.07l-3.453-.996a.805.805 0 00-.961.446l-2.2 4.94c-1.808.13-3.464.618-4.828 1.364a2.716 2.716 0 00-5.09 1.316c0 1.11.669 2.063 1.622 2.485a5.08 5.08 0 00-.262 1.59C2.5 18.46 6.754 21.5 12 21.5s9.5-3.04 9.5-6.785c0-.547-.09-1.082-.262-1.59a2.713 2.713 0 001.621-2.48zm-3.394-6.872a.764.764 0 11-.004 1.528.764.764 0 01.004-1.528zM2.5 10.645c0-.75.61-1.36 1.355-1.36.543 0 1.012.32 1.227.777-.707.54-1.297 1.16-1.73 1.84-.5-.199-.852-.691-.852-1.257zM12 19.89c-4.355 0-7.89-2.32-7.89-5.176 0-2.86 3.535-5.176 7.89-5.176 4.355 0 7.89 2.316 7.89 5.176 0 2.855-3.535 5.176-7.89 5.176zm8.648-7.989c-.433-.68-1.023-1.3-1.73-1.84a1.356 1.356 0 111.73 1.84zm0 0"/><path d="M9.285 13.355a1.357 1.357 0 11-2.714.005 1.357 1.357 0 012.714-.005zm0 0M14.781 16.258c-.562.441-1.672.918-2.781.918-1.11 0-2.219-.477-2.781-.918a.802.802 0 00-1.13.133.803.803 0 00.134 1.132c.972.766 2.457 1.262 3.777 1.262 1.32 0 2.805-.496 3.777-1.262a.807.807 0 00.133-1.132.802.802 0 00-1.129-.133zm0 0M17.43 13.355a1.357 1.357 0 11-2.716.005 1.357 1.357 0 012.716-.005zm0 0"/><path d="M22.86 10.645c0-1.5-1.22-2.715-2.715-2.715-1.024 0-1.91.562-2.372 1.394-1.398-.761-3.097-1.254-4.949-1.37l1.621-3.638 3.098.895a2.04 2.04 0 001.922 1.36c1.125 0 2.035-.91 2.035-2.036 0-1.125-.91-2.035-2.035-2.035-.774 0-1.45.434-1.793 1.07l-3.453-.996a.805.805 0 00-.961.446l-2.2 4.94c-1.808.13-3.464.618-4.828 1.364a2.715 2.715 0 00-5.085 1.317c0 1.109.664 2.062 1.617 2.484a5.08 5.08 0 00-.262 1.59C2.5 18.46 6.754 21.5 12 21.5s9.5-3.04 9.5-6.785c0-.547-.09-1.082-.262-1.59a2.713 2.713 0 001.621-2.48zm-3.395-6.872a.764.764 0 11-.004 1.528.764.764 0 01.004-1.528zM2.5 10.645c0-.75.61-1.36 1.355-1.36.543 0 1.012.32 1.227.777-.707.54-1.297 1.16-1.73 1.84-.5-.199-.852-.691-.852-1.257zM12 19.89c-4.355 0-7.89-2.32-7.89-5.176 0-2.86 3.535-5.176 7.89-5.176 4.355 0 7.89 2.316 7.89 5.176 0 2.855-3.535 5.176-7.89 5.176zm8.648-7.989c-.433-.68-1.023-1.3-1.73-1.84a1.356 1.356 0 111.73 1.84zm0 0"/></svg>',url:"https://www.reddit.com/submit?url=[url]&title=[title]"},{name:"VK",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M21.047 16.203a1.494 1.494 0 00-.063-.117c-.32-.57-.925-1.273-1.82-2.106l-.027-.027-.008-.012h-.012c-.406-.386-.664-.644-.773-.777-.196-.254-.239-.512-.133-.773.078-.196.363-.61.86-1.246.257-.336.464-.606.616-.81 1.098-1.46 1.575-2.394 1.43-2.8l-.058-.094c-.036-.058-.137-.109-.293-.16a1.523 1.523 0 00-.61-.023l-2.742.02a.398.398 0 00-.191.003l-.125.032-.047.023-.04.027a.413.413 0 00-.105.102.756.756 0 00-.093.168 15.26 15.26 0 01-1.02 2.14c-.234.395-.45.735-.645 1.024-.199.289-.363.5-.496.637a3.194 3.194 0 01-.363.328c-.105.082-.187.117-.246.105a1.604 1.604 0 01-.16-.039.583.583 0 01-.215-.23 1.04 1.04 0 01-.11-.371 4.277 4.277 0 01-.035-.387c-.003-.11 0-.262.004-.457.008-.195.012-.332.012-.403 0-.238.004-.5.016-.785.008-.28.015-.504.023-.672.004-.164.008-.335.008-.523a2.39 2.39 0 00-.031-.43 1.641 1.641 0 00-.102-.304.517.517 0 00-.195-.23 1.054 1.054 0 00-.32-.13 6.573 6.573 0 00-1.286-.125c-1.18-.011-1.937.067-2.273.23-.133.071-.254.165-.363.286-.114.14-.13.215-.047.23.379.055.648.192.808.407l.059.117c.043.082.086.226.133.437.043.207.07.442.086.696.03.46.03.859 0 1.187-.035.332-.063.59-.09.774a1.55 1.55 0 01-.133.445 1.51 1.51 0 01-.113.21.257.257 0 01-.047.048.718.718 0 01-.258.047c-.09 0-.195-.043-.32-.133a2.245 2.245 0 01-.399-.367 5.222 5.222 0 01-.46-.653c-.172-.277-.348-.61-.532-.988l-.152-.277c-.098-.176-.227-.438-.395-.778a15.984 15.984 0 01-.437-.984.63.63 0 00-.227-.305l-.047-.027a.836.836 0 00-.152-.082 1.4 1.4 0 00-.219-.063l-2.61.02c-.265 0-.448.062-.542.183l-.04.055a.386.386 0 00-.027.156c0 .07.02.157.06.258a32.996 32.996 0 002.41 4.598c.327.508.663.984 1.007 1.437.344.45.57.739.68.867.113.126.199.22.261.286l.239.226c.152.153.379.336.672.547.296.215.62.422.98.629.36.207.777.375 1.254.504.473.133.937.183 1.387.156h1.097c.223-.015.391-.086.504-.207l.04-.047a.942.942 0 00.105-.438 3.11 3.11 0 01.058-.738c.047-.218.102-.386.164-.496a1.3 1.3 0 01.204-.28.819.819 0 01.164-.138c.03-.015.054-.027.074-.035.152-.05.332 0 .539.149.207.148.398.332.582.554.18.22.394.465.652.735.254.273.473.476.664.61l.192.112c.125.079.293.149.492.211.203.063.383.078.535.047l2.438-.035c.242 0 .43-.039.562-.121.133-.078.211-.164.238-.262a.815.815 0 00.004-.324 1.578 1.578 0 00-.066-.254zm0 0"/></svg>',url:"https://vk.com/share.php?url=[url]"},{name:"Weibo",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M17.113 12.074c-.297-.09-.504-.152-.347-.554.34-.868.375-1.618.007-2.153-.691-1.004-2.578-.953-4.742-.027 0-.004-.68.3-.508-.246.336-1.09.282-2.004-.234-2.531-1.176-1.196-4.297.042-6.976 2.773-2.004 2.039-3.168 4.203-3.168 6.074 0 3.578 4.507 5.973 8.917 5.973 5.782 0 9.633-3.637 9.633-6.352 0-1.64-1.36-2.57-2.582-2.957zm-7.039 7.703c-3.52.352-6.558-1.25-6.785-3.574-.23-2.32 2.438-4.488 5.961-4.84 3.52-.351 6.559 1.25 6.785 3.575.227 2.324-2.437 4.492-5.96 4.84zm0 0M22.86 9.16a6.55 6.55 0 00-6.547-6.543.764.764 0 100 1.527 5.017 5.017 0 015.015 5.02c0 .422.344.762.766.762.422 0 .765-.34.765-.762V9.16zm0 0"/><path d="M19.82 9.047a4.367 4.367 0 00-3.394-3.395.762.762 0 00-.903.594.762.762 0 00.594.902 2.835 2.835 0 012.207 2.207.764.764 0 001.496-.308zm0 0M8.27 13.64c-1.418.286-2.375 1.473-2.137 2.657.238 1.18 1.578 1.906 2.996 1.621 1.418-.285 2.375-1.473 2.137-2.656-.239-1.18-1.579-1.907-2.996-1.621zm0 0"/></svg>',url:"https://service.weibo.com/share/share.php?url=[url]"},{name:"LinkedIn",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M6.996 4.938c0 1.082-.797 1.957-2.105 1.957-1.239 0-2.036-.875-2.036-1.957 0-1.106.825-1.954 2.086-1.954 1.258 0 2.032.848 2.055 1.954m-4.035 3.5h3.91v12.578h-3.91zm6.25 4.011c0-1.566-.055-2.879-.106-4.011H12.5l.18 1.75h.078c.515-.825 1.773-2.032 3.883-2.032 2.574 0 4.5 1.723 4.5 5.426v7.434h-3.907v-6.97c0-1.62-.566-2.73-1.98-2.73-1.082 0-1.723.746-2.008 1.47-.101.253-.129.616-.129.976v7.254h-3.91v-8.567zm0 0"/></svg>',url:"https://www.linkedin.com/shareArticle?mini=true&title=[title]&url=[url]"},{name:"Tumblr",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M13.14 10.86v4.18c0 1.058-.011 1.67.102 1.972.11.3.39.61.695.789.407.242.868.363 1.387.363.926 0 1.473-.121 2.387-.723v2.75c-.777.368-1.461.582-2.094.73a9.228 9.228 0 01-2.055.224 5.603 5.603 0 01-1.972-.317 4.823 4.823 0 01-1.64-.902c-.458-.395-.77-.809-.946-1.25-.176-.438-.262-1.078-.262-1.914v-6.41H6.29v-2.59c.715-.235 1.52-.57 2.031-1.004.512-.438.922-.961 1.235-1.57.308-.61.523-1.387.64-2.333h2.946V7.43h4.57v3.425zm0 0"/></svg>',url:"https://www.tumblr.com/share/link?url=[url]&title=[title]"},{name:"Pinterest",icon:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M18.984 2.46C17.332.876 15.047 0 12.547 0 8.73 0 6.383 1.566 5.086 2.879 3.484 4.496 2.57 6.645 2.57 8.773c0 2.668 1.118 4.72 2.989 5.485.125.05.25.074.375.074.394 0 .707-.258.816-.672.063-.238.207-.824.273-1.078.137-.504.024-.746-.273-1.094-.54-.64-.793-1.398-.793-2.383 0-2.93 2.18-6.039 6.223-6.039 3.203 0 5.195 1.82 5.195 4.754 0 1.852-.398 3.567-1.125 4.828-.5.875-1.387 1.922-2.742 1.922-.59 0-1.117-.242-1.45-.664-.316-.398-.417-.91-.292-1.445.144-.606.34-1.238.527-1.848.344-1.113.668-2.164.668-3.004 0-1.437-.883-2.402-2.195-2.402-1.668 0-2.977 1.695-2.977 3.86 0 1.062.281 1.859.41 2.163-.21.891-1.46 6.188-1.699 7.188-.137.582-.96 5.187.406 5.555 1.535.414 2.907-4.075 3.047-4.578.113-.415.508-1.973.754-2.93.738.71 1.934 1.195 3.094 1.195 2.191 0 4.16-.984 5.547-2.773 1.343-1.735 2.082-4.157 2.082-6.813 0-2.074-.89-4.12-2.446-5.613zm0 0"/></svg>',url:"https://pinterest.com/pin/create/bookmarklet/?is_video=false&url=[url]&media=&description=[title]"}].map((function(t){var n=U("a",{href:t.url.replace(/\[url\]/g,encodeURIComponent(e.url)).replace(/\[title\]/g,encodeURIComponent(e.text)),target:"_blank"},t.icon+t.name);return G(n,"svg").forEach((function(t){B(t,"icon")})),U("li",void 0,n)})),i=U("ul",void 0,n);t.parentNode.insertBefore(i,t.nextSibling)})),st("nav>ul>li.unread>a",(function(t){H(t,"click",(function(){var e=Y(t,"li");P(e,"unread"),G(e,"small").forEach((function(t){F(t)}))}))})),st("[data-embed]",(function(t){var e=R(t,"data-embed");if(e){var n=Y(t,"form"),i=t.querySelector("input[type=checkbox]"),a=n.querySelector("textarea");i&&a&&(H(i,"change",(function(){var t=a.value;a.value=e,e=t})),H(a,"click",(function(){this.blur(),this.focus(),this.select()})))}})),st("[data-translate]",(function(t){var e=V(t,"data-translate"),n=null;H(t,"click",(function(i){if(L(i),this.blur(),null===n){n=[];var a,o,r,l=Y(t,"section[id^=post-]"),u=Y(t,"section[id^=share-]"),s=Y(t,"section[id^=posting-]"),f=Y(t,"section[id^=texting-]");if("post"in e)if(l){var h;G(l,"blockquote").forEach((function(t){h=h||t})),h&&(r=_(h,"div.richtext")),G(h||l,"h2").forEach((function(t){var e=G(t,"a");a=a||(0!=e.length?e[0]:t)})),G(h||l,"h2~div.richtext").forEach((function(t){o=o||t})),!r&&a&&(r=_(a,"div.richtext"))}else{if(!(m=Y(t,"div")))return;var d=_(m,"article");if(d)G(d,"h1").forEach((function(t){var e=G(t,"a");a=a||(0!=e.length?e[0]:t)})),G(d,"h1~div.articletext").forEach((function(t){o=o||t}));else{var p=_(m,"h2,h3");if(p){var v=G(p,"a");a=0!=v.length?v[0]:p,o=Q(p,"div.richtext")}}}else if("share"in e){if(u)G(u,"div.richtext").forEach((function(t){o=o||t}));else if(l){if(!(m=Y(t,"div")))return;o=Q(m,"div.richtext")}}else if("posting"in e){if(s)G(s,"div.richtext").forEach((function(t){o=o||t}));else if(l){var m;if(!(m=Y(t,"div")))return;o=Q(m,"div.richtext")}}else"texting"in e&&f&&G(f,"div.richtext").forEach((function(t){o=o||t}));var g=new FormData,w={},y=function(t){var e;return G(t,"details>summary+*,.details>.summary+*").forEach((function(t){e=t})),(e||t).innerHTML};if(a&&a.textContent&&(g.append("title",y(a)),w.title=a),o&&o.textContent&&(g.append("text",y(o)),w.text=o),r&&r.textContent&&(g.append("comment",y(r)),w.comment=r),0!=w.length){for(var b in w)w.hasOwnProperty(b)&&X(w[b],{color:"#888"});var k=e;Array.isArray(k.target)&&(k.target=k.target.join(",")),c&&!("synchronizer"in k)&&(k.synchronizer=c),at(!0,g,nt(k,"/translate"),(function(t){Object.keys(w).forEach((function(e){var i=w[e];e in t&&t[e]?(n.push({element:i,detached:K(i)}),i.innerHTML=t[e],x(1e3,(function(t){function e(t,e,n,i){var a=(1-n)*t+n*e;return i?a:Math.round(a)}X(i,{color:"rgb("+e(170,0,t)+","+e(170,0,t)+","+e(170,0,t)+")",backgroundColor:"rgba(0,0,0,"+e(.05,0,t,!0)+")"})}),(function(){X(i,{color:null,backgroundColor:null})}))):X(i,{color:null})}))}),null,null,"application/json")}}else for(var M=0;M<n.length;++M){var E=n[M].element,C=n[M].detached;n[M].detached=K(E),q(E,C)}}))})),"chrome"in t&&!("wakeLock"in d)&&st("use",(function(t,e){e&&t.parentNode.replaceChild(t.cloneNode(),t)})),("ActiveXObject"in t||(d.userAgent.match(/\bEdge\/12\.(\d+)\b/)||[])[1]<10547||(d.userAgent.match(/\bAppleWebKit\/(\d+)\b/)||[])[1]<537)&&st("svg",(function(t){var e=t.querySelector("use");if(e){var n=U("img",{src:"/icon/"+e.getAttribute("xlink:href").replace(/.*#/,""),width:"24",height:"24",class:t.getAttribute("class")});t.parentNode.replaceChild(n,t)}})),ft(f),c&&"WebSocket"in t&&2===t.WebSocket.CLOSING&&re(u),y()}));
