182 lines
192 KiB
JavaScript
182 lines
192 KiB
JavaScript
import{ad as lt,Q as ze,c as r,h as Z,t as Me,A as $,_ as Zt,y as ee,ae as xa,E as gr,i as S,af as I,ag as Sa,ah as io,ai as ka,l as ae,P as Ct,p as ji,aj as Ia,ak as Ki,O as Wi,f as F,C as Jt,V as Oe,q as Aa,s as B,al as Ca,j as po,a as so,z as bn,B as Pa,am as La,T as O,an as Zi,ao as Ma,ap as Gi,r as mo,w as qi,g as vr,aq as Ra,ar as Ne,as as Oa,at as Da,au as Un,J as it,u as In,d as Jr,b as ft,W as Yi,av as $a,aw as Na,ax as Fa}from"./useTitle-TK72setz.js";function Yo(){return Yo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Yo.apply(null,arguments)}var Xi=["shift","alt","meta","mod","ctrl"],za={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function pt(e){return(e&&za[e]||e||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function Va(e){return Xi.includes(e)}function Io(e,t){return t===void 0&&(t=","),e.split(t)}function Ao(e,t,n){t===void 0&&(t="+");var o=e.toLocaleLowerCase().split(t).map(function(a){return pt(a)}),i={alt:o.includes("alt"),ctrl:o.includes("ctrl")||o.includes("control"),shift:o.includes("shift"),meta:o.includes("meta"),mod:o.includes("mod")},s=o.filter(function(a){return!Xi.includes(a)});return Yo({},i,{keys:s,description:n,hotkey:e})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Qi([pt(e.key),pt(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&Ji([pt(e.key),pt(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){mt.clear()})})();var mt=new Set;function _r(e){return Array.isArray(e)}function Ha(e,t){t===void 0&&(t=",");var n=_r(e)?e:e.split(t);return n.every(function(o){return mt.has(o.trim().toLowerCase())})}function Qi(e){var t=Array.isArray(e)?e:[e];mt.has("meta")&&mt.forEach(function(n){return!Va(n)&&mt.delete(n.toLowerCase())}),t.forEach(function(n){return mt.add(n.toLowerCase())})}function Ji(e){var t=Array.isArray(e)?e:[e];e==="meta"?mt.clear():t.forEach(function(n){return mt.delete(n.toLowerCase())})}function Ba(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Ua(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function ja(e){return es(e,["input","textarea","select"])}function es(e,t){t===void 0&&(t=!1);var n=e.target,o=e.composed,i=null;return Ka(n)&&o?i=e.composedPath()[0]&&e.composedPath()[0].tagName:i=n&&n.tagName,_r(t)?!!(i&&t&&t.some(function(s){var a;return s.toLowerCase()===((a=i)==null?void 0:a.toLowerCase())})):!!(i&&t&&t)}function Ka(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function Wa(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var Za=function(t,n,o){o===void 0&&(o=!1);var i=n.alt,s=n.meta,a=n.mod,c=n.shift,l=n.ctrl,u=n.keys,d=t.key,f=t.code,p=t.ctrlKey,h=t.metaKey,m=t.shiftKey,g=t.altKey,_=pt(f),T=d.toLowerCase();if(!(u!=null&&u.includes(_))&&!(u!=null&&u.includes(T))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(_))return!1;if(!o){if(i===!g&&T!=="alt"||c===!m&&T!=="shift")return!1;if(a){if(!h&&!p)return!1}else if(s===!h&&T!=="meta"&&T!=="os"||l===!p&&T!=="ctrl"&&T!=="control")return!1}return u&&u.length===1&&(u.includes(T)||u.includes(_))?!0:u?Ha(u):!u},Ga=lt(void 0),qa=function(){return ze(Ga)};function ts(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,o){return n&&ts(e[o],t[o])},!0):e===t}var Ya=lt({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Xa=function(){return ze(Ya)};function Qa(e){var t=$(void 0);return ts(t.current,e)||(t.current=e),t.current}var ei=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Ja=typeof window<"u"?Zt:ee;function Bt(e,t,n,o){var i=Z(null),s=i[0],a=i[1],c=$(!1),l=n instanceof Array?o instanceof Array?void 0:o:n,u=_r(e)?e.join(l==null?void 0:l.splitKey):e,d=n instanceof Array?n:o instanceof Array?o:void 0,f=Me(t,d??[]),p=$(f);d?p.current=f:p.current=t;var h=Qa(l),m=Xa(),g=m.enabledScopes,_=qa();return Ja(function(){if(!((h==null?void 0:h.enabled)===!1||!Wa(g,h==null?void 0:h.scopes))){var T=function(b,k){var D;if(k===void 0&&(k=!1),!(ja(b)&&!es(b,h==null?void 0:h.enableOnFormTags))){if(s!==null){var L=s.getRootNode();if((L instanceof Document||L instanceof ShadowRoot)&&L.activeElement!==s&&!s.contains(L.activeElement)){ei(b);return}}(D=b.target)!=null&&D.isContentEditable&&!(h!=null&&h.enableOnContentEditable)||Io(u,h==null?void 0:h.splitKey).forEach(function(A){var C,R=Ao(A,h==null?void 0:h.combinationKey);if(Za(b,R,h==null?void 0:h.ignoreModifiers)||(C=R.keys)!=null&&C.includes("*")){if(h!=null&&h.ignoreEventWhen!=null&&h.ignoreEventWhen(b)||k&&c.current)return;if(Ba(b,R,h==null?void 0:h.preventDefault),!Ua(b,R,h==null?void 0:h.enabled)){ei(b);return}p.current(b,R),k||(c.current=!0)}})}},y=function(b){b.key!==void 0&&(Qi(pt(b.code)),((h==null?void 0:h.keydown)===void 0&&(h==null?void 0:h.keyup)!==!0||h!=null&&h.keydown)&&T(b))},w=function(b){b.key!==void 0&&(Ji(pt(b.code)),c.current=!1,h!=null&&h.keyup&&T(b,!0))},E=s||(l==null?void 0:l.document)||document;return E.addEventListener("keyup",w),E.addEventListener("keydown",y),_&&Io(u,h==null?void 0:h.splitKey).forEach(function(x){return _.addHotkey(Ao(x,h==null?void 0:h.combinationKey,h==null?void 0:h.description))}),function(){E.removeEventListener("keyup",w),E.removeEventListener("keydown",y),_&&Io(u,h==null?void 0:h.splitKey).forEach(function(x){return _.removeHotkey(Ao(x,h==null?void 0:h.combinationKey,h==null?void 0:h.description))})}}},[s,u,h,g]),a}var yr={exports:{}};/*!
|
||
* Toastify js 1.12.0
|
||
* https://github.com/apvarun/toastify-js
|
||
* @license MIT licensed
|
||
*
|
||
* Copyright (C) 2018 Varun A P
|
||
*/var Hf=yr.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(xa,function(t){var n=function(a){return new n.lib.init(a)},o="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:o,constructor:n,init:function(a){return a||(a={}),this.options={},this.toastElement=null,this.options.text=a.text||n.defaults.text,this.options.node=a.node||n.defaults.node,this.options.duration=a.duration===0?0:a.duration||n.defaults.duration,this.options.selector=a.selector||n.defaults.selector,this.options.callback=a.callback||n.defaults.callback,this.options.destination=a.destination||n.defaults.destination,this.options.newWindow=a.newWindow||n.defaults.newWindow,this.options.close=a.close||n.defaults.close,this.options.gravity=a.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=a.positionLeft||n.defaults.positionLeft,this.options.position=a.position||n.defaults.position,this.options.backgroundColor=a.backgroundColor||n.defaults.backgroundColor,this.options.avatar=a.avatar||n.defaults.avatar,this.options.className=a.className||n.defaults.className,this.options.stopOnFocus=a.stopOnFocus===void 0?n.defaults.stopOnFocus:a.stopOnFocus,this.options.onClick=a.onClick||n.defaults.onClick,this.options.offset=a.offset||n.defaults.offset,this.options.escapeMarkup=a.escapeMarkup!==void 0?a.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=a.ariaLive||n.defaults.ariaLive,this.options.style=a.style||n.defaults.style,a.backgroundColor&&(this.options.style.background=a.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var a=document.createElement("div");a.className="toastify on "+this.options.className,this.options.position?a.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(a.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):a.className+=" toastify-right",a.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');for(var c in this.options.style)a.style[c]=this.options.style[c];if(this.options.ariaLive&&a.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)a.appendChild(this.options.node);else if(this.options.escapeMarkup?a.innerText=this.options.text:a.innerHTML=this.options.text,this.options.avatar!==""){var l=document.createElement("img");l.src=this.options.avatar,l.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?a.appendChild(l):a.insertAdjacentElement("afterbegin",l)}if(this.options.close===!0){var u=document.createElement("button");u.type="button",u.setAttribute("aria-label","Close"),u.className="toast-close",u.innerHTML="✖",u.addEventListener("click",(function(_){_.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var d=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&d>360?a.insertAdjacentElement("afterbegin",u):a.appendChild(u)}if(this.options.stopOnFocus&&this.options.duration>0){var f=this;a.addEventListener("mouseover",function(_){window.clearTimeout(a.timeOutValue)}),a.addEventListener("mouseleave",function(){a.timeOutValue=window.setTimeout(function(){f.removeElement(a)},f.options.duration)})}if(typeof this.options.destination<"u"&&a.addEventListener("click",(function(_){_.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}).bind(this)),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&a.addEventListener("click",(function(_){_.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var p=i("x",this.options),h=i("y",this.options),m=this.options.position=="left"?p:"-"+p,g=this.options.gravity=="toastify-top"?h:"-"+h;a.style.transform="translate("+m+","+g+")"}return a},showToast:function(){this.toastElement=this.buildToast();var a;if(typeof this.options.selector=="string"?a=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||typeof ShadowRoot<"u"&&this.options.selector instanceof ShadowRoot?a=this.options.selector:a=document.body,!a)throw"Root element is not defined";var c=n.defaults.oldestFirst?a.firstChild:a.lastChild;return a.insertBefore(this.toastElement,c),n.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout((function(){this.removeElement(this.toastElement)}).bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(a){a.className=a.className.replace(" on",""),window.setTimeout((function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),a.parentNode&&a.parentNode.removeChild(a),this.options.callback.call(a),n.reposition()}).bind(this),400)}},n.reposition=function(){for(var a={top:15,bottom:15},c={top:15,bottom:15},l={top:15,bottom:15},u=document.getElementsByClassName("toastify"),d,f=0;f<u.length;f++){s(u[f],"toastify-top")===!0?d="toastify-top":d="toastify-bottom";var p=u[f].offsetHeight;d=d.substr(9,d.length-1);var h=15,m=window.innerWidth>0?window.innerWidth:screen.width;m<=360?(u[f].style[d]=l[d]+"px",l[d]+=p+h):s(u[f],"toastify-left")===!0?(u[f].style[d]=a[d]+"px",a[d]+=p+h):(u[f].style[d]=c[d]+"px",c[d]+=p+h)}return this};function i(a,c){return c.offset[a]?isNaN(c.offset[a])?c.offset[a]:c.offset[a]+"px":"0px"}function s(a,c){return!a||typeof c!="string"?!1:!!(a.className&&a.className.trim().split(/\s+/gi).indexOf(c)>-1)}return n.lib.init.prototype=n.lib,n})})(yr);var ec=yr.exports;const tc=gr(ec);window._showToast=Re;function Re(e){typeof e=="string"&&(e={text:e});const{onClick:t,delay:n,...o}=e,i=tc({className:`${t||e.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...o,onClick:()=>{t==null||t(i)}});return n?setTimeout(()=>{i.showToast()},n):i.showToast(),i}function Bf(e,t,n,o){const i=$(e);ee(()=>{i.current=e},[e,n]),ee(()=>{!o||t===null||t===!1||i.current()},[o]),ee(()=>{if(t===null||t===!1)return;const a=setInterval(()=>i.current(),t);return()=>clearInterval(a)},[t])}function nc(e){const t=URL.parse("/compose/",window.location),{width:n,height:o}=window.screen,i=Math.max(0,(n-600)/2),s=Math.max(0,(o-450)/2),a=Math.min(n,600),c=Math.min(o,450),l=(e==null?void 0:e.uid)||Math.random(),u=window.open(t,"compose"+l,`width=${a},height=${c},left=${i},top=${s}`);return u?u.__COMPOSE__=e:alert(S._({id:"4S86wI"})),u}const oc=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function rc(){if(oc){const e=document.createElement("input");e.style.position="absolute",e.style.top="0",e.style.left="0",e.style.opacity="0",document.body.appendChild(e),e.focus(),setTimeout(()=>{document.body.removeChild(e)},500)}}const ns={x:()=>I(()=>import("./icons/close-line-YTE7hIJE.js"),[],import.meta.url),heart:()=>I(()=>import("./icons/heart-line-VwvWYh8h.js"),[],import.meta.url),bookmark:()=>I(()=>import("./icons/bookmark-line-D6jQ7QFs.js"),[],import.meta.url),"check-circle":()=>I(()=>import("./icons/check-circle-line-sE41WGxF.js"),[],import.meta.url),"x-circle":()=>I(()=>import("./icons/close-circle-line-qd3g541O.js"),[],import.meta.url),transfer:()=>I(()=>import("./icons/transfer-4-line-Q9QJoxz3.js"),[],import.meta.url),rocket:()=>I(()=>import("./icons/rocket-line-rZbVYYCZ.js"),[],import.meta.url),"arrow-left":{module:()=>I(()=>import("./icons/arrow-left-line-_YC6-XGG.js"),[],import.meta.url),rtl:!0},"arrow-right":{module:()=>I(()=>import("./icons/arrow-right-line-PypiEqpu.js"),[],import.meta.url),rtl:!0},"arrow-up":()=>I(()=>import("./icons/arrow-up-line-fcuKqhVE.js"),[],import.meta.url),"arrow-down":()=>I(()=>import("./icons/arrow-down-line-0TRJUP_K.js"),[],import.meta.url),earth:()=>I(()=>import("./icons/earth-line-t1Um8wpQ.js"),[],import.meta.url),lock:()=>I(()=>import("./icons/lock-line-0jNHqZpm.js"),[],import.meta.url),unlock:()=>I(()=>import("./icons/unlock-line-w3piJMVb.js"),[],import.meta.url),"eye-close":()=>I(()=>import("./icons/eye-close-line-lBiePPv9.js"),[],import.meta.url),"eye-open":()=>I(()=>import("./icons/eye-2-line-vz_Kw-rK.js"),[],import.meta.url),message:()=>I(()=>import("./icons/mail-line-5XLS6FEo.js"),[],import.meta.url),comment:{module:()=>I(()=>import("./icons/chat-3-line-F0xcdpXY.js"),[],import.meta.url),rtl:!0},comment2:{module:()=>I(()=>import("./icons/comment-2-line-xEXuT-Ip.js"),[],import.meta.url),rtl:!0},home:()=>I(()=>import("./icons/home-3-line-qJiZhXUH.js"),[],import.meta.url),notification:()=>I(()=>import("./icons/notification-line-olNPLtgS.js"),[],import.meta.url),follow:()=>I(()=>import("./icons/user-follow-line-k_GCWTtp.js"),[],import.meta.url),"follow-add":()=>I(()=>import("./icons/user-add-line-zzW9OULB.js"),[],import.meta.url),poll:[()=>I(()=>import("./icons/chart-bar-line-5r_DfN2w.js"),[],import.meta.url),"90deg"],pencil:()=>I(()=>import("./icons/pencil-line-bKXqElLR.js"),[],import.meta.url),quill:()=>I(()=>import("./icons/quill-pen-line-h_5-FsGz.js"),[],import.meta.url),at:()=>I(()=>import("./icons/at-line-9vJS_Hnl.js"),[],import.meta.url),attachment:()=>I(()=>import("./icons/attachment-line-C2PUa1Ke.js"),[],import.meta.url),upload:()=>I(()=>import("./icons/upload-3-line-Qsjvubiw.js"),[],import.meta.url),gear:()=>I(()=>import("./icons/settings-3-line-kt4MSpRv.js"),[],import.meta.url),more:()=>I(()=>import("./icons/more-3-line-wUD-Yhmj.js"),[],import.meta.url),more2:()=>I(()=>import("./icons/more-1-fill-je1-slyh.js"),[],import.meta.url),external:{module:()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rtl:!0},popout:{module:()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rtl:!0},popin:{module:()=>I(()=>import("./icons/external-link-line-8nOOkmFu.js"),[],import.meta.url),rotate:"180deg",rtl:!0},plus:()=>I(()=>import("./icons/add-circle-line--O-MfyNy.js"),[],import.meta.url),"chevron-left":{module:()=>I(()=>import("./icons/left-line-Jck0yVmC.js"),[],import.meta.url),rtl:!0},"chevron-right":{module:()=>I(()=>import("./icons/right-line-7VBoqLdz.js"),[],import.meta.url),rtl:!0},"chevron-down":()=>I(()=>import("./icons/down-line-9PeS5YhF.js"),[],import.meta.url),reply:{module:()=>I(()=>import("./icons/share-forward-line-4jL-2Q4u.js"),[],import.meta.url),rotate:"180deg",flip:"horizontal",rtl:!0},thread:()=>I(()=>import("./icons/route-line-2YYy3958.js"),[],import.meta.url),group:{module:()=>I(()=>import("./icons/group-line-JvhJklhQ.js"),[],import.meta.url),rtl:!0},bot:()=>I(()=>import("./icons/android-2-line-uPwvVubH.js"),[],import.meta.url),menu:()=>I(()=>import("./icons/rows-4-line-SxGPYpTa.js"),[],import.meta.url),list:{module:()=>I(()=>import("./icons/list-check-line-qNqx9Mm4.js"),[],import.meta.url),rtl:!0},search:()=>I(()=>import("./icons/search-2-line-G39AynEw.js"),[],import.meta.url),hashtag:()=>I(()=>import("./icons/hashtag-line-SS3QMu1R.js"),[],import.meta.url),info:()=>I(()=>import("./icons/information-line-8SOch6cR.js"),[],import.meta.url),shortcut:()=>I(()=>import("./icons/lightning-line-JMYUlCZM.js"),[],import.meta.url),user:()=>I(()=>import("./icons/user-4-line-zT_bpOrS.js"),[],import.meta.url),following:()=>I(()=>import("./icons/walk-line-CF7a5s4t.js"),[],import.meta.url),pin:()=>I(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),unpin:[()=>I(()=>import("./icons/pin-line-ULyRQyWZ.js"),[],import.meta.url),"180deg"],bus:()=>I(()=>import("./icons/bus-2-line-XuQdDZ_w.js"),[],import.meta.url),link:()=>I(()=>import("./icons/link-2-line-BUqp1EwN.js"),[],import.meta.url),history:()=>I(()=>import("./icons/history-line-yoG7K8wL.js"),[],import.meta.url),share:()=>I(()=>import("./icons/share-2-line-PYo-zN94.js"),[],import.meta.url),sparkles:()=>I(()=>import("./icons/sparkles-line-wjZWGZ1a.js"),[],import.meta.url),sparkles2:()=>I(()=>import("./icons/sparkles-2-line-g2FqdZ0R.js"),[],import.meta.url),exit:{module:()=>I(()=>import("./icons/exit-line-l-1uUgI7.js"),[],import.meta.url),rtl:!0},translate:()=>I(()=>import("./icons/translate-line-HpDtlqS2.js"),[],import.meta.url),play:()=>I(()=>import("./icons/play-fill-Ey-zv2eL.js"),[],import.meta.url),trash:()=>I(()=>import("./icons/delete-2-line-pjUduCFs.js"),[],import.meta.url),mute:{module:()=>I(()=>import("./icons/volume-mute-line-WthBoXru.js"),[],import.meta.url),rtl:!0},unmute:{module:()=>I(()=>import("./icons/volume-line-PZujbN8h.js"),[],import.meta.url),rtl:!0},block:()=>I(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),unblock:[()=>I(()=>import("./icons/forbid-circle-line-3FxopGoP.js"),[],import.meta.url),"180deg"],flag:()=>I(()=>import("./icons/flag-1-line-xvcg7G7Q.js"),[],import.meta.url),time:()=>I(()=>import("./icons/time-line-ThP0kTRr.js"),[],import.meta.url),refresh:()=>I(()=>import("./icons/refresh-2-line-t42qqclb.js"),[],import.meta.url),emoji2:()=>I(()=>import("./icons/emoji-2-line--uNVc2IC.js"),[],import.meta.url),filter:()=>I(()=>import("./icons/filter-2-line-KyjbFYlO.js"),[],import.meta.url),filters:()=>I(()=>import("./icons/filter-line-1KEfnWDm.js"),[],import.meta.url),chart:()=>I(()=>import("./icons/chart-line-line-pHaLt6yC.js"),[],import.meta.url),react:()=>I(()=>import("./icons/react-line-YfZPqZem.js"),[],import.meta.url),layout4:{module:()=>I(()=>import("./icons/layout-4-line-FOdnyEcZ.js"),[],import.meta.url),rtl:!0},layout5:()=>I(()=>import("./icons/layout-5-line-9Kks7dle.js"),[],import.meta.url),announce:{module:()=>I(()=>import("./icons/announcement-line-MSlAmDH1.js"),[],import.meta.url),rtl:!0},alert:()=>I(()=>import("./icons/alert-line-zyc6hy8V.js"),[],import.meta.url),round:()=>I(()=>import("./icons/round-fill-a0rplSmV.js"),[],import.meta.url),"arrow-up-circle":()=>I(()=>import("./icons/arrow-up-circle-line-e3kZqEZN.js"),[],import.meta.url),"arrow-down-circle":()=>I(()=>import("./icons/arrow-down-circle-line-mpqFtRtO.js"),[],import.meta.url),clipboard:{module:()=>I(()=>import("./icons/clipboard-line-9F_Yeo71.js"),[],import.meta.url),rtl:!0},"account-edit":()=>I(()=>import("./icons/user-edit-line-9VnWCh0X.js"),[],import.meta.url),"account-warning":()=>I(()=>import("./icons/user-warning-line-gL3RGb1N.js"),[],import.meta.url),keyboard:()=>I(()=>import("./icons/keyboard-line-10AZQcVH.js"),[],import.meta.url),cloud:()=>I(()=>import("./icons/cloud-line-abe0HgFS.js"),[],import.meta.url),month:{module:()=>I(()=>import("./icons/calendar-month-line-VoXZVWAe.js"),[],import.meta.url),rtl:!0},media:()=>I(()=>import("./icons/photo-album-line--GdJqjfq.js"),[],import.meta.url),speak:()=>I(()=>import("./icons/radar-line-ndI8IhOG.js"),[],import.meta.url),building:()=>I(()=>import("./icons/building-5-line-ew7lu83B.js"),[],import.meta.url),history2:{module:()=>I(()=>import("./icons/history-2-line-3yIVzoWo.js"),[],import.meta.url),rtl:!0},document:()=>I(()=>import("./icons/document-line--D6ooZg1.js"),[],import.meta.url),"arrows-right":{module:()=>I(()=>import("./icons/arrows-right-line-HF4HILdT.js"),[],import.meta.url),rtl:!0},code:()=>I(()=>import("./icons/code-line-h4RWLaak.js"),[],import.meta.url),copy:()=>I(()=>import("./icons/copy-2-line-mPSDKieb.js"),[],import.meta.url),quote:{module:()=>I(()=>import("./icons/quote-left-line-NQzeELMO.js"),[],import.meta.url),rtl:!0},settings:()=>I(()=>import("./icons/settings-6-line-ZgCBilgF.js"),[],import.meta.url),"heart-break":()=>I(()=>import("./icons/heart-crack-line-P3DoKfTT.js"),[],import.meta.url),"user-x":()=>I(()=>import("./icons/user-x-line-zIdph-gu.js"),[],import.meta.url),minimize:()=>I(()=>import("./icons/arrows-down-line-ovOF9r0o.js"),[],import.meta.url)},ic={s:12,m:16,l:20,xl:24,xxl:32},ti={},sc=Sa(function({width:e,height:t,body:n,rotate:o,flip:i}){return r("svg",{viewBox:`0 0 ${e} ${t}`,dangerouslySetInnerHTML:{__html:n},style:{transform:`${o?`rotate(${o})`:""} ${i?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(ns).length,matchesArg:(e,t)=>e.icon===t.icon&&e.body===t.body});function M({icon:e,size:t="m",alt:n,title:o,class:i="",style:s={}}){if(!e)return null;const a=ic[t];let c=ns[e];if(!c)return null;let l,u,d=!1;Array.isArray(c)?[c,l,u]=c:typeof c=="object"&&({rotate:l,flip:u,rtl:d}=c,c=c.module);const[f,p]=Z(ti[e]),h=$(e);return ee(()=>{f&&h.current===e||((async()=>{const m=await c();p(m.default),ti[e]=m.default})(),h.current=e)},[e]),r("span",{class:`icon ${i} ${d?"rtl-flip":""}`,title:o||n,style:{width:`${a}px`,height:`${a}px`,...s},"data-icon":e,children:f&&r(sc,{icon:e,width:f.width,height:f.height,body:f.body,rotate:l,flip:u})})}function ac(e,t=[]){!e||typeof e!="function"||ee(()=>{const n=new CloseWatcher;return n.addEventListener("close",e),()=>{n.destroy()}},t)}const cc=window.CloseWatcher?ac:()=>{},lc=document.getElementById("modal-container");function Xo({children:e,onClose:t,onClick:n,class:o,minimized:i}){if(!e)return null;const s=$();ee(()=>{let u=setTimeout(()=>{var f;const d=(f=s.current)==null?void 0:f.querySelector('[tabindex="-1"]');d&&d.focus()},100);return()=>clearTimeout(u)},[]);const a=window.CloseWatcher,c=Bt("esc",()=>{setTimeout(()=>{t==null||t()},0)},{enabled:!a&&!!t,keydown:!1,keyup:!0},[t]);cc(t,[t]),ee(()=>{const u=document.querySelectorAll(".deck-container");if(i){const d=u[u.length-1];d&&d.tabIndex===-1&&d.focus()}else e?u.forEach(d=>{d.setAttribute("inert","")}):u.forEach(d=>{d.removeAttribute("inert")});return()=>{u.forEach(d=>{d.removeAttribute("inert")})}},[e,i]);const l=r("div",{ref:u=>{var d;s.current=u,c(((d=u==null?void 0:u.querySelector)==null?void 0:d.call(u,'[tabindex="-1"]'))||u)},className:o,onClick:u=>{n==null||n(u),u.target===u.currentTarget&&(t==null||t(u))},tabIndex:i?0:"-1",inert:i,onFocus:u=>{var d,f;try{if(u.target===u.currentTarget){const p=(d=s.current)==null?void 0:d.querySelector('[tabindex="-1"]'),h=!!p&&((f=getComputedStyle(p))==null?void 0:f.pointerEvents)!=="none";p&&h&&p.focus()}}catch{}},children:e});return io(l,lc)}var br={exports:{}},uc="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",dc=uc;var fc=dc;function os(){}function rs(){}rs.resetWarningCache=os;var hc=function(){function e(o,i,s,a,c,l){if(l!==fc){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:rs,resetWarningCache:os};return n.PropTypes=n,n};var Uf=br.exports;if(0)var jf,Kf;else br.exports=hc();var j=br.exports;const Tr=e=>!!e&&e[0]==="o",Qo=ka||(e=>e());const Tn=(e,t)=>e===!0||!!(e&&e[t]),Ve=(e,t)=>typeof e=="function"?e(t):e,pc="_szhsinMenu",mc=e=>e[pc];const en=(e,t)=>(t&&Object.keys(t).forEach(n=>{const o=e[n],i=t[n];typeof i=="function"&&o?e[n]=(...s)=>{i(...s),o(...s)}:e[n]=i}),e),gc=e=>{if(typeof e!="string")return{top:0,right:0,bottom:0,left:0};const t=e.trim().split(/\s+/,4).map(parseFloat),n=isNaN(t[0])?0:t[0],o=isNaN(t[1])?n:t[1];return{top:n,right:o,bottom:isNaN(t[2])?n:t[2],left:isNaN(t[3])?o:t[3]}},Co=e=>{for(;e;){if(e=e.parentNode,!e||e===document.body||!e.parentNode)return;const{overflow:t,overflowX:n,overflowY:o}=getComputedStyle(e);if(/auto|scroll|overlay|hidden/.test(t+o+n))return e}};function go(e,t){return{"aria-disabled":e||void 0,tabIndex:t?0:-1}}function ni(e,t){for(let n=0;n<e.length;n++)if(e[n]===t)return n;return-1}const vc=e=>({[e?`${e}ClassName`:"className"]:j.oneOfType([j.string,j.func])}),_c={className:j.string,...vc("menu"),arrowProps:j.object,focusProps:j.object,menuStyle:j.object,arrow:j.bool,setDownOverflow:j.bool,gap:j.number,shift:j.number,align:j.oneOf(["start","center","end"]),direction:j.oneOf(["left","right","top","bottom"]),position:j.oneOf(["auto","anchor","initial"]),overflow:j.oneOf(["auto","visible","hidden"])},Wf={..._c,containerProps:j.object,initialMounted:j.bool,unmountOnClose:j.bool,transition:j.oneOfType([j.bool,j.exact({open:j.bool,close:j.bool,item:j.bool})]),transitionTimeout:j.number,boundingBoxRef:j.object,boundingBoxPadding:j.string,reposition:j.oneOf(["auto","initial"]),repositionFlag:j.oneOfType([j.string,j.number]),viewScroll:j.oneOf(["auto","close","initial"]),submenuOpenDelay:j.number,submenuCloseDelay:j.number,portal:j.oneOfType([j.bool,j.exact({target:j.object,stablePosition:j.bool})]),theming:j.string,onItemClick:j.func},Zf={instanceRef:j.oneOfType([j.object,j.func]),onMenuChange:j.func},et=({block:e,element:t,modifiers:n,className:o})=>ae(()=>{const i=t?`${e}__${t}`:e;let s=i;n&&Object.keys(n).forEach(c=>{const l=n[c];l&&(s+=` ${i}--${l===!0?c:`${c}-${l}`}`)});let a=typeof o=="function"?o(n):o;return typeof a=="string"&&(a=a.trim(),a&&(s+=` ${a}`)),s},[e,t,n,o]),yc="szh-menu-container",Je="szh-menu";const bc="arrow",wr="item",Tc="divider",wc="header",Ec="group",xc="submenu";const is=lt(),Er=lt({}),ao=lt({}),xr=lt({}),Sc=lt({}),vo=lt({}),Fe=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),we=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),wn=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),jt=Object.freeze({FIRST:"first",LAST:"last"}),kc=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Po="absolute",En="none",Sr="menuitem";const Ic=({className:e,containerRef:t,containerProps:n,children:o,isOpen:i,theming:s,transition:a,onClose:c})=>{const l=Tn(a,"item");return r("div",{...en({onKeyDown:({key:f})=>{switch(f){case Fe.ESC:Ve(c,{key:f,reason:wn.CANCEL});break}},onBlur:f=>{i&&!f.currentTarget.contains(f.relatedTarget)&&Ve(c,{reason:wn.BLUR})}},n),className:et({block:yc,modifiers:ae(()=>({theme:s,itemTransition:l}),[s,l]),className:e}),style:{position:"absolute",...n==null?void 0:n.style},ref:t,children:o})},Ac=()=>{let e,t=0;return{toggle:n=>{n?t++:t--,t=Math.max(t,0)},on:(n,o,i)=>{t?e||(e=setTimeout(()=>{e=0,o()},n)):i==null||i()},off:()=>{e&&(clearTimeout(e),e=0)}}},Cc=(e,t)=>{const[n,o]=Z(),s=$({items:[],hoverIndex:-1,sorted:!1}).current,a=Me((l,u)=>{const{items:d}=s;if(!l)s.items=[];else if(u)d.push(l);else{const f=d.indexOf(l);f>-1&&(d.splice(f,1),l.contains(document.activeElement)&&(t.current.focus(),o()))}s.hoverIndex=-1,s.sorted=!1},[s,t]),c=Me((l,u,d)=>{const{items:f,hoverIndex:p}=s,h=()=>{if(s.sorted)return;const _=e.current.querySelectorAll(".szh-menu__item");f.sort((T,y)=>ni(_,T)-ni(_,y)),s.sorted=!0};let m=-1,g;switch(l){case we.RESET:break;case we.SET:g=u;break;case we.UNSET:g=_=>_===u?void 0:_;break;case we.FIRST:h(),m=0,g=f[m];break;case we.LAST:h(),m=f.length-1,g=f[m];break;case we.SET_INDEX:h(),m=d,g=f[m];break;case we.INCREASE:h(),m=p,m<0&&(m=f.indexOf(u)),m++,m>=f.length&&(m=0),g=f[m];break;case we.DECREASE:h(),m=p,m<0&&(m=f.indexOf(u)),m--,m<0&&(m=f.length-1),g=f[m];break;default:}g||(m=-1),o(g),s.hoverIndex=m},[e,s]);return{hoverItem:n,dispatch:c,updateItems:a}},oi=(e,t)=>Math.round(e)===t?e:t,ss=e=>{const t=e.getBoundingClientRect();return t.width=oi(t.width,e.offsetWidth),t.height=oi(t.height,e.offsetHeight),t},Pc=(e,t,n,o)=>{const i=ss(t.current),s=e.current.getBoundingClientRect(),a=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=gc(o),l=m=>m+s.left-a.left-c.left,u=m=>m+s.left+i.width-a.right+c.right,d=m=>m+s.top-a.top-c.top,f=m=>m+s.top+i.height-a.bottom+c.bottom;return{menuRect:i,containerRect:s,getLeftOverflow:l,getRightOverflow:u,getTopOverflow:d,getBottomOverflow:f,confineHorizontally:m=>{let g=l(m);if(g<0)m-=g;else{const _=u(m);_>0&&(m-=_,g=l(m),g<0&&(m-=g))}return m},confineVertically:m=>{let g=d(m);if(g<0)m-=g;else{const _=f(m);_>0&&(m-=_,g=d(m),g<0&&(m-=g))}return m}}},Lc=({arrowRef:e,menuY:t,anchorRect:n,containerRect:o,menuRect:i})=>{let s=n.top-o.top-t+n.height/2;const a=e.current.offsetHeight*1.25;return s=Math.max(a,s),s=Math.min(s,i.height-a),s},Mc=({anchorRect:e,containerRect:t,menuRect:n,placeLeftorRightY:o,placeLeftX:i,placeRightX:s,getLeftOverflow:a,getRightOverflow:c,confineHorizontally:l,confineVertically:u,arrowRef:d,arrow:f,direction:p,position:h})=>{let m=p,g=o;h!=="initial"&&(g=u(g),h==="anchor"&&(g=Math.min(g,e.bottom-t.top),g=Math.max(g,e.top-t.top-n.height)));let _,T,y;return m==="left"?(_=i,h!=="initial"&&(T=a(_),T<0&&(y=c(s),(y<=0||-T>y)&&(_=s,m="right")))):(_=s,h!=="initial"&&(y=c(_),y>0&&(T=a(i),(T>=0||-T<y)&&(_=i,m="left")))),h==="auto"&&(_=l(_)),{arrowY:f?Lc({menuY:g,arrowRef:d,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:_,y:g,computedDirection:m}},Rc=({arrowRef:e,menuX:t,anchorRect:n,containerRect:o,menuRect:i})=>{let s=n.left-o.left-t+n.width/2;const a=e.current.offsetWidth*1.25;return s=Math.max(a,s),s=Math.min(s,i.width-a),s},Oc=({anchorRect:e,containerRect:t,menuRect:n,placeToporBottomX:o,placeTopY:i,placeBottomY:s,getTopOverflow:a,getBottomOverflow:c,confineHorizontally:l,confineVertically:u,arrowRef:d,arrow:f,direction:p,position:h})=>{let m=p==="top"?"top":"bottom",g=o;h!=="initial"&&(g=l(g),h==="anchor"&&(g=Math.min(g,e.right-t.left),g=Math.max(g,e.left-t.left-n.width)));let _,T,y;return m==="top"?(_=i,h!=="initial"&&(T=a(_),T<0&&(y=c(s),(y<=0||-T>y)&&(_=s,m="bottom")))):(_=s,h!=="initial"&&(y=c(_),y>0&&(T=a(i),(T>=0||-T<y)&&(_=i,m="top")))),h==="auto"&&(_=u(_)),{arrowX:f?Rc({menuX:g,arrowRef:d,anchorRect:e,containerRect:t,menuRect:n}):void 0,x:g,y:_,computedDirection:m}},Dc=({arrow:e,align:t,direction:n,gap:o,shift:i,position:s,anchorRect:a,arrowRef:c,positionHelpers:l})=>{const{menuRect:u,containerRect:d}=l,f=n==="left"||n==="right";let p=f?o:i,h=f?i:o;if(e){const x=c.current;f?p+=x.offsetWidth:h+=x.offsetHeight}const m=a.left-d.left-u.width-p,g=a.right-d.left+p,_=a.top-d.top-u.height-h,T=a.bottom-d.top+h;let y,w;t==="end"?(y=a.right-d.left-u.width,w=a.bottom-d.top-u.height):t==="center"?(y=a.left-d.left-(u.width-a.width)/2,w=a.top-d.top-(u.height-a.height)/2):(y=a.left-d.left,w=a.top-d.top),y+=p,w+=h;const E={...l,anchorRect:a,placeLeftX:m,placeRightX:g,placeLeftorRightY:w,placeTopY:_,placeBottomY:T,placeToporBottomX:y,arrowRef:c,arrow:e,direction:n,position:s};switch(n){case"left":case"right":return Mc(E);case"top":case"bottom":default:return Oc(E)}},Kt=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?Zt:ee;function ri(e,t){typeof e=="function"?e(t):e.current=t}const tn=(e,t)=>ae(()=>e?t?n=>{ri(e,n),ri(t,n)}:e:t,[e,t]),ii=-9999,as=({ariaLabel:e,menuClassName:t,menuStyle:n,arrow:o,arrowProps:i={},anchorPoint:s,anchorRef:a,containerRef:c,containerProps:l,focusProps:u,externalRef:d,parentScrollingRef:f,align:p="start",direction:h="bottom",position:m="auto",overflow:g="visible",setDownOverflow:_,repositionFlag:T,captureFocus:y=!0,state:w,endTransition:E,isDisabled:x,menuItemFocus:b,gap:k=0,shift:D=0,children:L,onClose:A,...C})=>{const[R,W]=Z({x:ii,y:ii}),[U,oe]=Z({}),[Q,re]=Z(),[q,ie]=Z(h),[ce]=Z(Ac),[se,H]=ji(X=>X+1,1),{transition:fe,boundingBoxRef:ne,boundingBoxPadding:Ee,rootMenuRef:ye,rootAnchorRef:xe,scrollNodesRef:De,reposition:Ie,viewScroll:$e,submenuCloseDelay:Ce}=ze(vo),{submenuCtx:he,reposSubmenu:N=T}=ze(ao),ge=$(null),Ge=$(),Lt=$(),V=$(!1),{hoverItem:le,dispatch:z,updateItems:J}=Cc(ge,Ge),Y=Tr(w),be=Tn(fe,"open"),te=Tn(fe,"close"),pe=De.current,Mt=X=>{switch(X.key){case Fe.HOME:z(we.FIRST);break;case Fe.END:z(we.LAST);break;case Fe.UP:z(we.DECREASE,le);break;case Fe.DOWN:z(we.INCREASE,le);break;case Fe.SPACE:X.target&&X.target.className.indexOf(Je)!==-1&&X.preventDefault();return;default:return}X.preventDefault(),X.stopPropagation()},Be=()=>{w==="closing"&&re(),Ve(E)},Ae=X=>{X.stopPropagation(),ce.on(Ce,()=>{z(we.RESET),Ge.current.focus()})},Pe=X=>{X.target===X.currentTarget&&ce.off()},ve=Me(X=>{var _e;const Te=a?(_e=a.current)==null?void 0:_e.getBoundingClientRect():s?{left:s.x,right:s.x,top:s.y,bottom:s.y,width:0,height:0}:null;if(!Te)return;pe.menu||(pe.menu=(ne?ne.current:Co(ye.current))||window);const He=Pc(c,ge,pe.menu,Ee);let{arrowX:Se,arrowY:nt,x:Ln,y:bt,computedDirection:qe}=Dc({arrow:o,align:p,direction:h,gap:k,shift:D,position:m,anchorRect:Te,arrowRef:Lt,positionHelpers:He});const{menuRect:Mn}=He,Ue=Mn.height;if(!X&&g!=="visible"){const{getTopOverflow:Tt,getBottomOverflow:bo}=He;let wt,de;const Et=bo(bt);if(Et>0)wt=Ue-Et,de=Et;else{const Ot=Tt(bt);Ot<0&&(wt=Ue+Ot,de=0-Ot,wt>=0&&(bt-=Ot))}wt>=0&&re({height:wt,overflowAmt:de})}o&&oe({x:Se,y:nt}),W({x:Ln,y:bt}),ie(qe)},[o,p,Ee,h,k,D,m,g,s,a,c,ne,ye,pe]);Kt(()=>{Y&&(ve(),V.current&&H()),V.current=Y},[Y,ve,N]),Kt(()=>{Q&&!_&&(ge.current.scrollTop=0)},[Q,_]),Kt(()=>J,[J]),ee(()=>{let{menu:X}=pe;if(!Y||!X)return;if(X=X.addEventListener?X:window,!pe.anchors){pe.anchors=[];let Se=Co(xe&&xe.current);for(;Se&&Se!==X;)pe.anchors.push(Se),Se=Co(Se)}let _e=$e;if(pe.anchors.length&&_e==="initial"&&(_e="auto"),_e==="initial")return;const Te=()=>{_e==="auto"?Qo(()=>ve(!0)):Ve(A,{reason:wn.SCROLL})},He=pe.anchors.concat($e!=="initial"?X:[]);return He.forEach(Se=>Se.addEventListener("scroll",Te)),()=>He.forEach(Se=>Se.removeEventListener("scroll",Te))},[xe,pe,Y,A,$e,ve]);const Le=!!Q&&Q.overflowAmt>0;ee(()=>{if(Le||!Y||!f)return;const X=()=>Qo(ve),_e=f.current;return _e.addEventListener("scroll",X),()=>_e.removeEventListener("scroll",X)},[Y,Le,f,ve]),ee(()=>{if(!Y||typeof ResizeObserver!="function"||Ie==="initial")return;const X=[],_e=new ResizeObserver(Se=>Se.forEach(({target:nt})=>{X.indexOf(nt)<0?X.push(nt):Ia(()=>{ve(),H()})})),Te={box:"border-box"};_e.observe(ge.current,Te);const He=a==null?void 0:a.current;return He&&_e.observe(He,Te),()=>_e.disconnect()},[Y,Ie,a,ve]),ee(()=>{if(!Y){z(we.RESET),te||re();return}const{position:X,alwaysUpdate:_e}=b||{},Te=()=>{X===jt.FIRST?z(we.FIRST):X===jt.LAST?z(we.LAST):X>=-1&&z(we.SET_INDEX,void 0,X)};if(_e)Te();else if(y){const He=setTimeout(()=>{const Se=ge.current;Se&&!Se.contains(document.activeElement)&&(Ge.current.focus(),Te())},be?170:100);return()=>clearTimeout(He)}},[Y,be,te,y,b,z]);const Cn=ae(()=>({isParentOpen:Y,submenuCtx:ce,dispatch:z,updateItems:J}),[Y,ce,z,J]);let dt,_t;Q&&(_?_t=Q.overflowAmt:dt=Q.height);const yo=ae(()=>({reposSubmenu:se,submenuCtx:ce,overflow:g,overflowAmt:_t,parentMenuRef:ge,parentDir:q}),[se,ce,g,_t,q]),me=dt>=0?{maxHeight:dt,overflow:g}:void 0,Rt=ae(()=>({state:w,align:p,dir:q}),[w,p,q]),yt=ae(()=>({dir:q}),[q]),tt=et({block:Je,element:bc,modifiers:yt,className:i.className}),Pn=r("ul",{role:"menu","aria-label":e,...go(x),...en({onPointerEnter:he==null?void 0:he.off,onPointerMove:Ae,onPointerLeave:Pe,onKeyDown:Mt,onAnimationEnd:Be},C),ref:tn(d,ge),className:et({block:Je,modifiers:Rt,className:t}),style:{...n,...me,margin:0,display:w==="closed"?"none":void 0,position:Po,left:R.x,top:R.y},children:[r("li",{tabIndex:-1,role:En,style:{position:Po,left:0,top:0,display:"block",outline:"none"},ref:Ge,...u}),o&&r("li",{role:En,...i,className:tt,style:{display:"block",position:Po,left:U.x,top:U.y,...i.style},ref:Lt}),r(ao.Provider,{value:yo,children:r(Er.Provider,{value:Cn,children:r(is.Provider,{value:le,children:Ve(L,Rt)})})})]});return l?r(Ic,{...l,isOpen:Y,children:Pn}):Pn},cs=Ct(function({"aria-label":t,className:n,containerProps:o,initialMounted:i,unmountOnClose:s,transition:a,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:u,reposition:d="auto",submenuOpenDelay:f=300,submenuCloseDelay:p=150,viewScroll:h="initial",portal:m,theming:g,onItemClick:_,...T},y){const w=$(null),E=$({}),{anchorRef:x,state:b,onClose:k}=T,D=ae(()=>({initialMounted:i,unmountOnClose:s,transition:a,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:u,rootMenuRef:w,rootAnchorRef:x,scrollNodesRef:E,reposition:d,viewScroll:h,submenuOpenDelay:f,submenuCloseDelay:p}),[i,s,a,c,x,l,u,d,h,f,p]),L=ae(()=>({handleClick(C,R){C.stopPropagation||Ve(_,C);let W=C.keepOpen;W===void 0&&(W=R&&C.key===Fe.SPACE),W||Ve(k,{value:C.value,key:C.key,reason:wn.CLICK})},handleClose(C){Ve(k,{key:C,reason:wn.CLICK})}}),[_,k]);if(!b)return null;const A=r(vo.Provider,{value:D,children:r(xr.Provider,{value:L,children:r(as,{...T,ariaLabel:t||"Menu",externalRef:y,containerRef:w,containerProps:{className:n,containerRef:w,containerProps:o,theming:g,transition:a,onClose:k}})})});return m===!0&&typeof document<"u"?io(A,document.body):m?m.target?io(A,m.target):m.stablePosition?null:A:A}),Jo=0,er=1,co=2,lo=3,uo=4,$c=5,ls=6,Nc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],us=e=>({_s:e,status:Nc[e],isEnter:e<lo,isMounted:e!==ls,isResolved:e===co||e>uo}),tr=e=>e?ls:$c,Fc=(e,t)=>{switch(e){case er:case Jo:return co;case uo:case lo:return tr(t)}},zc=e=>typeof e=="object"?[e.enter,e.exit]:[e,e],si=(e,t,n,o,i)=>{clearTimeout(o.current);const s=us(e);t(s),n.current=s,i&&i({current:s})},Vc=({enter:e=!0,exit:t=!0,preEnter:n,preExit:o,timeout:i,initialEntered:s,mountOnEnter:a,unmountOnExit:c,onStateChange:l}={})=>{const[u,d]=Z(()=>us(s?co:tr(a))),f=$(u),p=$(),[h,m]=zc(i),g=Me(()=>{const T=Fc(f.current._s,c);T&&si(T,d,f,p,l)},[l,c]),_=Me(T=>{const y=E=>{switch(si(E,d,f,p,l),E){case er:h>=0&&(p.current=setTimeout(g,h));break;case uo:m>=0&&(p.current=setTimeout(g,m));break;case Jo:case lo:p.current=setTimeout(()=>y(E+1),0);break}},w=f.current.isEnter;typeof T!="boolean"&&(T=!w),T?!w&&y(e?n?Jo:er:co):w&&y(t?o?lo:uo:tr(c))},[g,l,e,t,n,o,h,m,c]);return ee(()=>()=>clearTimeout(p.current),[]),[u,_,g]};const Hc=({initialOpen:e,initialMounted:t,unmountOnClose:n,transition:o,transitionTimeout:i=500}={})=>{const[{status:s},a,c]=Vc({initialEntered:e,mountOnEnter:!t,unmountOnExit:n,timeout:i,enter:Tn(o,"open"),exit:Tn(o,"close")});return[{state:kc[s],endTransition:c},a]},ds=e=>{const[t,n]=Hc(e),[o,i]=Z(),s=(a,c)=>{i({position:a,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:o,...t},n,s]},Bc=(e,t)=>{const[n]=Z({});return{onMouseDown:()=>{n.v=e&&e!=="closed"},onClick:o=>n.v?n.v=!1:t(!0,o)}},fs=(e,t)=>{const n=$(t);ee(()=>{n.current!==t&&Ve(e,{open:t}),n.current=t},[e,t])},Uc=Ct(function({"aria-label":t,captureFocus:n,initialOpen:o,menuButton:i,instanceRef:s,onMenuChange:a,...c},l){const[u,d,f]=ds(c),{state:p}=u,h=Tr(p),m=$(null),g=Bc(p,(x,b)=>f(b.detail?void 0:jt.FIRST)),_=Me(x=>{d(!1),x.key&&m.current.focus()},[d]),T=x=>{switch(x.key){case Fe.UP:f(jt.LAST);break;case Fe.DOWN:f(jt.FIRST);break;default:return}x.preventDefault()},y=Ve(i,{open:h});if(!y||!y.type)throw new Error("Menu requires a menuButton prop.");const w={ref:tn(y.ref,m),...en({onKeyDown:T,...g},y.props)};mc(y.type)==="MenuButton"&&(w.isOpen=h);const E=Ki(y,w);return fs(a,h),Wi(s,()=>({openMenu:f,closeMenu:()=>d(!1)})),r(F,{children:[E,r(cs,{...c,...u,"aria-label":t||(typeof y.props.children=="string"?y.props.children:"Menu"),anchorRef:m,ref:l,onClose:_})]})}),kr=(e,t)=>{const n=Jt(t),o=Ct((i,s)=>{const a=$(null);return r(n,{...i,itemRef:a,externalRef:s,isHovering:ze(is)===a.current})});return o.displayName=`WithHovering(${e})`,o},hs=(e,t,n)=>{Kt(()=>{if(e)return;const o=t.current;return n(o,!0),()=>{n(o)}},[e,t,n])},jc=kr("SubMenu",function({"aria-label":t,className:n,disabled:o,direction:i,label:s,openTrigger:a,onMenuChange:c,isHovering:l,instanceRef:u,itemRef:d,captureFocus:f,repositionFlag:p,itemProps:h={},...m}){const g=ze(vo),{rootMenuRef:_,submenuOpenDelay:T,submenuCloseDelay:y}=g,{parentMenuRef:w,parentDir:E,overflow:x}=ze(ao),{isParentOpen:b,submenuCtx:k,dispatch:D,updateItems:L}=ze(Er),A=x!=="visible",[C,R,W]=ds(g),{state:U}=C,oe=!!o,Q=Tr(U),re=$(null),[q]=Z({v:0}),ie=()=>{k.off(),q.v&&(clearTimeout(q.v),q.v=0)},ce=(...N)=>{ie(),se(),!oe&&W(...N)},se=()=>!l&&!oe&&D(we.SET,d.current),H=N=>{se(),a||(q.v=setTimeout(()=>Qo(ce),Math.max(N,0)))},fe=N=>{oe||(N.stopPropagation(),!(q.v||Q)&&k.on(y,()=>H(T-y),()=>H(T)))},ne=()=>{ie(),Q||D(we.UNSET,d.current)},Ee=N=>{if(l)switch(N.key){case Fe.ENTER:N.preventDefault();case Fe.SPACE:case Fe.RIGHT:a!=="none"&&ce(jt.FIRST)}},ye=N=>{let ge=!1;switch(N.key){case Fe.LEFT:Q&&(d.current.focus(),R(!1),ge=!0);break;case Fe.RIGHT:Q||(ge=!0);break}ge&&(N.preventDefault(),N.stopPropagation())};hs(oe,d,L),fs(c,Q),ee(()=>k.toggle(Q),[k,Q]),ee(()=>()=>clearTimeout(q.v),[q]),ee(()=>{l&&b?d.current.focus():R(!1)},[l,b,R,d]),Wi(u,()=>({openMenu:(...N)=>{b&&ce(...N)},closeMenu:()=>{Q&&(d.current.focus(),R(!1))}}));const xe=ae(()=>({open:Q,hover:l,disabled:oe,submenu:!0}),[Q,l,oe]),{ref:De,className:Ie,...$e}=h,Ce=en({onPointerEnter:k.off,onPointerMove:fe,onPointerLeave:ne,onKeyDown:Ee,onClick:()=>a!=="none"&&ce()},$e),he=()=>{const N=r(as,{...m,...C,ariaLabel:t||(typeof s=="string"?s:"Submenu"),anchorRef:d,containerRef:A?_:re,direction:i||(E==="right"||E==="left"?E:"right"),parentScrollingRef:A&&w,isDisabled:oe}),ge=_.current;return A&&ge?io(N,ge):N};return r("li",{className:et({block:Je,element:xc,className:n}),style:{position:"relative"},role:En,ref:re,onKeyDown:ye,children:[r("div",{role:Sr,"aria-haspopup":!0,"aria-expanded":Q,...go(oe,l),...Ce,ref:tn(De,d),className:et({block:Je,element:wr,modifiers:xe,className:Ie}),children:ae(()=>Ve(s,xe),[s,xe])}),U&&he()]})}),ps=(e,t,n,o)=>{const{submenuCloseDelay:i}=ze(vo),{isParentOpen:s,submenuCtx:a,dispatch:c,updateItems:l}=ze(Er),u=()=>{!n&&!o&&c(we.SET,e.current)},d=()=>{!o&&c(we.UNSET,e.current)},f=m=>{n&&!m.currentTarget.contains(m.relatedTarget)&&d()},p=m=>{o||(m.stopPropagation(),a.on(i,u,u))},h=(m,g)=>{a.off(),!g&&d()};return hs(o,e,l),ee(()=>{n&&s&&t.current&&t.current.focus()},[t,n,s]),{setHover:u,onBlur:f,onPointerMove:p,onPointerLeave:h}},ke=kr("MenuItem",function({className:t,value:n,href:o,type:i,checked:s,disabled:a,children:c,onClick:l,isHovering:u,itemRef:d,externalRef:f,...p}){const h=!!a,{setHover:m,...g}=ps(d,d,u,h),_=ze(xr),T=ze(Sc),y=i==="radio",w=i==="checkbox",E=!!o&&!h&&!y&&!w,x=y?T.value===n:w?!!s:!1,b=C=>{if(h){C.stopPropagation(),C.preventDefault();return}const R={value:n,syntheticEvent:C};C.key!==void 0&&(R.key=C.key),w&&(R.checked=!x),y&&(R.name=T.name),Ve(l,R),y&&Ve(T.onRadioChange,R),_.handleClick(R,w||y)},k=C=>{if(u)switch(C.key){case Fe.ENTER:C.preventDefault();case Fe.SPACE:E?d.current.click():b(C)}},D=ae(()=>({type:i,disabled:h,hover:u,checked:x,anchor:E}),[i,h,u,x,E]),L=en({...g,onPointerDown:m,onKeyDown:k,onClick:b},p),A={role:y?"menuitemradio":w?"menuitemcheckbox":Sr,"aria-checked":y||w?x:void 0,...go(h,u),...L,ref:tn(f,d),className:et({block:Je,element:wr,modifiers:D,className:t}),children:ae(()=>Ve(c,D),[c,D])};return E?r("li",{role:En,children:r("a",{href:o,...A})}):r("li",{...A})}),Kc=kr("FocusableItem",function({className:t,disabled:n,children:o,isHovering:i,itemRef:s,externalRef:a,...c}){const l=!!n,u=$(null),{setHover:d,onPointerLeave:f,...p}=ps(s,u,i,l),{handleClose:h}=ze(xr),m=ae(()=>({disabled:l,hover:i,focusable:!0}),[l,i]),g=ae(()=>Ve(o,{...m,ref:u,closeMenu:h}),[o,m,h]),_=en({...p,onPointerLeave:T=>f(T,!0),onFocus:d},c);return r("li",{role:Sr,...go(l),..._,ref:tn(a,s),className:et({block:Je,element:wr,modifiers:m,className:t}),children:g})}),an=Jt(Ct(function({className:t,...n},o){return r("li",{role:"separator",...n,ref:o,className:et({block:Je,element:Tc,className:t})})})),Gf=Jt(Ct(function({className:t,...n},o){return r("li",{role:En,...n,ref:o,className:et({block:Je,element:wc,className:t})})})),qf=Ct(function({className:t,style:n,takeOverflow:o,...i},s){const a=$(null),[c,l]=Z(),{overflow:u,overflowAmt:d}=ze(ao);return Kt(()=>{let f;o&&d>=0&&(f=ss(a.current).height-d,f<0&&(f=0)),l(f>=0?{maxHeight:f,overflow:u}:void 0)},[o,u,d]),Kt(()=>{c&&(a.current.scrollTop=0)},[c]),r("div",{...i,ref:tn(s,a),className:et({block:Je,element:Ec,className:t}),style:{...n,...c}})});const ai={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},cn={},fn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),to=fn.getContext("2d",{willReadFrequently:!0});to.imageSmoothingEnabled=!1;const Wc=/missing\.png$/;function Zc({url:e,size:t,alt:n="",squircle:o,...i}){t=ai[t]||t||ai.m;const s=$(),a=Wc.test(e);return r("span",{ref:s,class:`avatar ${o?"squircle":""} ${cn[e]?"has-alpha":""}`,style:{width:t,height:t},title:n,...i,children:!!e&&r("img",{src:e,width:t,height:t,alt:n,loading:"lazy",decoding:"async",fetchPriority:"low",crossOrigin:cn[e]===void 0&&!a?"anonymous":void 0,onError:c=>{c.target.crossOrigin&&(c.target.crossOrigin=null,c.target.src=e)},onLoad:c=>{s.current&&(s.current.dataset.loaded=!0),cn[e]===void 0&&(a||setTimeout(()=>{try{const{width:l,height:u}=c.target;fn.width!==l&&(fn.width=l),fn.height!==u&&(fn.height=u),to.drawImage(c.target,0,0);const d=to.getImageData(0,0,l,u),f=d.data.filter((p,h)=>h%4===3&&p<=128).length/(d.data.length/4)>.1;f&&s.current.classList.add("has-alpha"),cn[e]=f,to.clearRect(0,0,l,u)}catch{cn[e]=!1}},1))}})})}const st=Oe(Zc),Gt=Ct((e,t)=>{var c;let n;try{n=Aa()}catch{}let o=(location.hash||"").replace(/^#/,"").trim();o===""&&(o="/");const{to:i,...s}=e;if(o&&o!=="/"&&o.includes("?")){const l=URL.parse(o,location.origin);if((c=l==null?void 0:l.searchParams)!=null&&c.size){const u=Array.from(l.searchParams.entries()).map(([d,f])=>`${d}=${encodeURIComponent(f)}`).join("&");o=l.pathname+"?"+u}}const a=o===i||decodeURIComponent(o)===i;return r("a",{ref:t,href:`#${i}`,...s,class:`${e.class||""} ${a?"is-active":""}`,onClick:l=>{var u,d,f;(d=(u=l.currentTarget)==null?void 0:u.parentNode)!=null&&d.closest("a")&&l.stopPropagation(),n&&(B.prevLocation=n),(f=e.onClick)==null||f.call(e,l)}})});let nr=!1;const Gc=new MutationObserver(e=>{e.forEach(t=>{if(t.type==="attributes"){const{dir:n}=t.target;n==="rtl"?nr=!0:nr=!1}})});Gc.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function or(){return nr}const qc=document.documentElement,jn=getComputedStyle(qc),Yc=8;let ms=[0,0,0,0];function gs(){const e=jn.getPropertyValue("--sai-top"),t=jn.getPropertyValue("--sai-right"),n=jn.getPropertyValue("--sai-bottom"),o=jn.getPropertyValue("--sai-left");ms=[Math.max(0,parseInt(e,10)),Math.max(0,parseInt(t,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(o,10))]}requestAnimationFrame(gs);function vs(e=[]){return ms.map((n,o)=>(n||Yc)+(e[o]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",gs,{passive:!0});function Xc(){const[e,t]=Z({width:null,height:null});return Zt(()=>{const n=()=>{t({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[]),e}function _s(e){const{containerProps:t,instanceRef:n,align:o}=e,i=Xc(),s=n!=null&&n.current?n:$(),a=or()?o==="end"?"start":o==="start"?"end":o:o;return r(Uc,{boundingBoxPadding:vs(),repositionFlag:`${i.width}x${i.height}`,unmountOnClose:!0,...e,align:a,instanceRef:s,containerProps:{onClick:c=>{var l,u,d;c.target===c.currentTarget&&((u=(l=s.current)==null?void 0:l.closeMenu)==null||u.call(l)),(d=t==null?void 0:t.onClick)==null||d.call(t,c)},...t}})}function Qc(e){const t=$();return r(jc,{...e,instanceRef:t,itemProps:{onPointerMove:n=>{var o,i;n.pointerType==="touch"&&((i=(o=t.current)==null?void 0:o.openMenu)==null||i.call(o))},onPointerLeave:n=>{var o,i;n.pointerType==="touch"&&((i=(o=t.current)==null?void 0:o.openMenu)==null||i.call(o))},...e.itemProps}})}function Lo({subMenu:e=!1,confirm:t=!0,confirmLabel:n,menuItemClassName:o,menuFooter:i,menuExtras:s,...a}){const{children:c,onClick:l,...u}=a;return t?r(e?Qc:_s,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...u,menuButton:e?void 0:c,label:e?c:void 0,children:[r(ke,{className:o,onClick:l,children:n}),s,i]}):e?r(ke,{...a}):l?Ca(c,{onClick:l}):c}function ci(e){const{className:t,disabled:n,...o}=e;return r(Kc,{className:t,disabled:n,children:({ref:i,closeMenu:s})=>r(Gt,{...o,ref:i,onClick:({detail:a})=>s(a===0?"Enter":void 0)})})}function rr({staticUrl:e,alt:t,url:n}){return r("picture",{children:[e&&r("source",{srcset:e,media:"(prefers-reduced-motion: reduce)"}),r("img",{src:n,alt:t,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async",fetchPriority:"low"},t||n)]})}const Jc=Oe(e=>new RegExp(`:(${e.join("|")}):`,"g"));function el({text:e,emojis:t}){if(!e)return"";if(!(t!=null&&t.length)||e.indexOf(":")===-1)return e;const n=Jc(t.map(i=>i.shortcode));return e.split(n).map((i,s)=>{const a=t.find(c=>c.shortcode===i);if(a){const{url:c,staticUrl:l}=a;return r(rr,{staticUrl:l,alt:i,url:c},i+"-"+s)}return i})}const qt=Oe(el),tl=Oe(e=>{const t={sensitivity:"base"};try{return new Intl.Collator(e||void 0,t)}catch{return new Intl.Collator(void 0,t)}}),nl=/([^@]+)(@.+)/i,ol=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,rl=/\s+/g,il=/[^a-z0-9@\.]/gi;function sl({account:e,instance:t,showAvatar:n,showAcct:o,short:i,external:s,onClick:a}){const{i18n:c}=po(),{acct:l,avatar:u,avatarStatic:d,id:f,url:p,displayName:h,emojis:m,bot:g,username:_}=e,[T,y,w]=l.match(nl)||[,l];t||(t=so().instance);const E=_.toLowerCase().trim(),x=(h||"").toLowerCase().trim(),b=x.replace(ol,"").replace(rl,""),k=b.replace(il,""),D=!i&&(E===x||E===b||E===k||tl(c.locale).compare(E,b)===0)||k===l.toLowerCase();return r("a",{class:`name-text ${o?"show-acct":""} ${i?"short":""}`,href:p,target:s?"_blank":null,title:h?`${h} (${w?"":"@"}${l})`:`${w?"":"@"}${l}`,onClick:L=>{if(!s&&!L.shiftKey){if(L.preventDefault(),L.stopPropagation(),a)return a(L);if(L.metaKey||L.ctrlKey||L.shiftKey||L.which===2){const A=`#/${t}/a/${f}`;window.open(A,"_blank");return}B.showAccount={account:e,instance:t}}},children:[n&&r(F,{children:[r(st,{url:d||u,squircle:g})," "]}),h&&!i?r(F,{children:[r("b",{dir:"auto",children:r(qt,{text:h,emojis:m})}),!o&&!D&&r(F,{children:[" ",r("i",{class:"bidi-isolate",children:["@",_]})]})]}):i?r("i",{children:_}):r("b",{children:_}),o&&r(F,{children:[r("br",{}),r("i",{class:"bidi-isolate",children:[w?"":"@",y,!!w&&r("span",{class:"ib",children:w})]})]})]})}const gt=Oe(sl),Kn={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},Mo=Oe(e=>new Intl.DisplayNames(e||void 0,{type:"language"}));function al(e){let t,n;typeof e=="object"&&({code:e,locale:t,fallback:n}=e);try{const o=Mo(t||S.locale).of(e);if(o!==e)return o;if(!n){const i=Mo(e).of(e);if(i!==e)return i}return n||""}catch{if(Kn[e])try{const i=Mo(Kn[t]||t||S.locale).of(Kn[e]);return i!==Kn[e]?i:n||""}catch{}return n||""}}const ln=Oe(al);function li(e){if(e instanceof Date)return!isNaN(e.getTime());{const t=new Date(e);return!isNaN(t.getTime())}}const cl=Oe(()=>new Intl.DateTimeFormat().resolvedOptions().locale),ui=Oe((e,t={})=>{const n=e.replace(/-[a-z]+$/i,""),o=bn([n],[cl()],e);try{return new Intl.DateTimeFormat(o,t)}catch{}try{return new Intl.DateTimeFormat(e,t)}catch{}return new Intl.DateTimeFormat(void 0,t)}),ll=Oe(e=>new Intl.RelativeTimeFormat(e||void 0)),Yt=60,Xt=60*Yt,ir=24*Xt,ul=e=>{const t=ll(S.locale),n=(e.getTime()-Date.now())/1e3,o=Math.abs(n);return o<Yt?t.format(n,"second"):o<Xt?t.format(Math.floor(n/Yt),"minute"):o<ir?t.format(Math.floor(n/Xt),"hour"):t.format(Math.floor(n/ir),"day")},dl=e=>{const t=(Date.now()-e.getTime())/1e3;return t<Yt?S._({values:{0:t<1?1:Math.floor(t)},id:"NnRCUm"}):t<Xt?S._({values:{0:Math.floor(t/Yt)},id:"ZSWUwq"}):S._({values:{0:Math.floor(t/Xt)},id:"NSSJsj"})};function at({datetime:e,format:t}){if(!e)return null;const[n,o]=ji(l=>l+1,0),i=ae(()=>new Date(e),[e]),[s,a,c]=ae(()=>{if(!li(i))return[""+e,"",""];let l;if(t==="micro"){const u=new Date;(u.getTime()-i.getTime())/1e3/ir<=1?l=dl(i):u.getFullYear()===i.getFullYear()?l=ui(S.locale,{year:void 0,month:"short",day:"numeric"}).format(i):l=ui(S.locale,{dateStyle:"short"}).format(i)}return l||(l=ul(i)),[l,i.toISOString(),i.toLocaleString()]},[i,t,n]);return ee(()=>{if(!li(i))return;let l,u;function d(){u=requestAnimationFrame(()=>{o(),f()})}function f(){const p=(Date.now()-i.getTime())/1e3;p<Yt?l=setTimeout(d,1e4):p<Xt&&(l=setTimeout(d,6e4))}return f(),()=>{clearTimeout(l),cancelAnimationFrame(u)}},[]),r("time",{datetime:a,title:c,children:s})}const fl=[{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"zh_HANT",name:"Chinese (Traditional)"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}],hl=Oe(()=>[new Intl.DateTimeFormat().resolvedOptions().locale,...navigator.languages]),pl=()=>bn(hl(),fl.map(e=>e.code.replace("_","-")),"en");function ys(e=!1){if(e){const{contentTranslationTargetLanguage:t}=B.settings;if(t)return t}return pl()}const di=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"];function Yf(e){const t=Math.min(Math.floor(Math.log2(e)/10),di.length-1),n=e/1024**t;return S.number(n,{style:"unit",unit:di[t],unitDisplay:"narrow",maximumFractionDigits:0})}const ml=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,fo=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(ml);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},fi=e=>e==="*"||e==="x"||e==="X",hi=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},gl=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],vl=(e,t)=>{if(fi(e)||fi(t))return 0;const[n,o]=gl(hi(e),hi(t));return n>o?1:n<o?-1:0},Ut=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const o=vl(e[n]||"0",t[n]||"0");if(o!==0)return o}return 0},_l=(e,t)=>{const n=fo(e),o=fo(t),i=n.pop(),s=o.pop(),a=Ut(n,o);return a!==0?a:i&&s?Ut(i.split("."),s.split(".")):i||s?i?-1:1:0},yl=(e,t,n)=>{bl(n);const o=_l(e,t);return bs[n].includes(o)},bs={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},pi=Object.keys(bs),bl=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(pi.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${pi.join("|")}`)},no=(e,t)=>{if(t=t.replace(/([><=]+)\s+/g,"$1"),t.includes("||"))return t.split("||").some(_=>no(e,_));if(t.includes(" - ")){const[_,T]=t.split(" - ",2);return no(e,`>=${_} <=${T}`)}else if(t.includes(" "))return t.trim().replace(/\s{2,}/g," ").split(" ").every(_=>no(e,_));const n=t.match(/^([<>=~^]+)/),o=n?n[1]:"=";if(o!=="^"&&o!=="~")return yl(e,t,o);const[i,s,a,,c]=fo(e),[l,u,d,,f]=fo(t),p=[i,s,a],h=[l,u??"x",d??"x"];if(f&&(!c||Ut(p,h)!==0||Ut(c.split("."),f.split("."))===-1))return!1;const m=h.findIndex(_=>_!=="0")+1,g=o==="~"?2:m>1?m:1;return!(Ut(p.slice(0,g),h.slice(0,g))!==0||Ut(p.slice(g),h.slice(g))===-1)};const Tl={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2","@gotosocial/list-exclusive":">=0.17","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3","@mastodon/trending-link-posts":"~4.3 || >=4.3","@mastodon/grouped-notifications":"~4.3 || >=4.3"},Ro=/pixelfed/i,ot=/^(?!.*pixelfed).*$/i,wl=/pleroma/i,El=/akkoma/i;const mi={"@mastodon/lists":ot,"@mastodon/filters":ot,"@mastodon/mentions":ot,"@mastodon/trending-hashtags":ot,"@mastodon/trending-links":ot,"@mastodon/post-bookmark":ot,"@mastodon/post-edit":ot,"@mastodon/profile-edit":ot,"@mastodon/profile-private-note":ot,"@pixelfed/trending":Ro,"@pixelfed/home-include-reblogs":Ro,"@pixelfed/global-feed":Ro,"@pleroma/local-visibility-post":wl,"@akkoma/local-visibility-post":El},Wn={};function Zn(e){var t,n;try{let{version:o,domain:i}=Pa(),s=((n=(t=La())==null?void 0:t.software)==null?void 0:n.name)||"mastodon";s==="hometown"&&(s="mastodon");const a=`${i}-${e}`;if(Wn[a])return Wn[a];if(mi[e])return Wn[a]=mi[e].test(o);const c=Tl[e];if(!c)return!1;const u=e.match(/^@([a-z]+)\//)[1]===s.toLowerCase();return Wn[a]=u&&no(o,c,{includePrerelease:!0,loose:!0})}catch{return!1}}const Wt=2147483647,Ye=36,Ir=1,xn=26,xl=38,Sl=700,Ts=72,ws=128,Es="-",kl=/^xn--/,Il=/[^\0-\x7F]/,Al=/[\x2E\u3002\uFF0E\uFF61]/g,Cl={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Oo=Ye-Ir,Xe=Math.floor,Do=String.fromCharCode;function ht(e){throw new RangeError(Cl[e])}function Pl(e,t){const n=[];let o=e.length;for(;o--;)n[o]=t(e[o]);return n}function xs(e,t){const n=e.split("@");let o="";n.length>1&&(o=n[0]+"@",e=n[1]),e=e.replace(Al,".");const i=e.split("."),s=Pl(i,t).join(".");return o+s}function Ss(e){const t=[];let n=0;const o=e.length;for(;n<o;){const i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<o){const s=e.charCodeAt(n++);(s&64512)==56320?t.push(((i&1023)<<10)+(s&1023)+65536):(t.push(i),n--)}else t.push(i)}return t}const Ll=e=>String.fromCodePoint(...e),Ml=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:Ye},gi=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},ks=function(e,t,n){let o=0;for(e=n?Xe(e/Sl):e>>1,e+=Xe(e/t);e>Oo*xn>>1;o+=Ye)e=Xe(e/Oo);return Xe(o+(Oo+1)*e/(e+xl))},Is=function(e){const t=[],n=e.length;let o=0,i=ws,s=Ts,a=e.lastIndexOf(Es);a<0&&(a=0);for(let c=0;c<a;++c)e.charCodeAt(c)>=128&&ht("not-basic"),t.push(e.charCodeAt(c));for(let c=a>0?a+1:0;c<n;){const l=o;for(let d=1,f=Ye;;f+=Ye){c>=n&&ht("invalid-input");const p=Ml(e.charCodeAt(c++));p>=Ye&&ht("invalid-input"),p>Xe((Wt-o)/d)&&ht("overflow"),o+=p*d;const h=f<=s?Ir:f>=s+xn?xn:f-s;if(p<h)break;const m=Ye-h;d>Xe(Wt/m)&&ht("overflow"),d*=m}const u=t.length+1;s=ks(o-l,u,l==0),Xe(o/u)>Wt-i&&ht("overflow"),i+=Xe(o/u),o%=u,t.splice(o++,0,i)}return String.fromCodePoint(...t)},As=function(e){const t=[];e=Ss(e);const n=e.length;let o=ws,i=0,s=Ts;for(const l of e)l<128&&t.push(Do(l));const a=t.length;let c=a;for(a&&t.push(Es);c<n;){let l=Wt;for(const d of e)d>=o&&d<l&&(l=d);const u=c+1;l-o>Xe((Wt-i)/u)&&ht("overflow"),i+=(l-o)*u,o=l;for(const d of e)if(d<o&&++i>Wt&&ht("overflow"),d===o){let f=i;for(let p=Ye;;p+=Ye){const h=p<=s?Ir:p>=s+xn?xn:p-s;if(f<h)break;const m=f-h,g=Ye-h;t.push(Do(gi(h+m%g,0))),f=Xe(m/g)}t.push(Do(gi(f,0))),s=ks(i,u,c===a),i=0,++c}++i,++o}return t.join("")},Rl=function(e){return xs(e,function(t){return kl.test(t)?Is(t.slice(4).toLowerCase()):t})},Ol=function(e){return xs(e,function(t){return Il.test(t)?"xn--"+As(t):t})},Cs={version:"2.3.1",ucs2:{decode:Ss,encode:Ll},decode:Is,encode:As,toASCII:Ol,toUnicode:Rl};function sr(e,t=[]){return e?(!t.length||e.indexOf(":")===-1||t.forEach(n=>{const{shortcode:o,staticUrl:i,url:s}=n;e=e.replace(new RegExp(`:${o}:`,"g"),`<picture><source srcset="${i}" media="(prefers-reduced-motion: reduce)"></source><img class="shortcode-emoji emoji" src="${s}" alt=":${o}:" width="16" height="16" loading="lazy" decoding="async" fetchPriority="low" /></picture>`)}),e):""}const Ft=document.createElement("div"),Dl=["u-url","mention","hashtag"],$l=/[&<>]/g;function $o(e){return e.replace($l,t=>({"&":"&","<":"<",">":">"})[t])}const Nl=/<a/i,Fl=/^https?:\/\//i,zl=/^@[^@]+(@[^@]+)?$/,Vl=/^#[^#]+$/,Hl=/^```[^]+```$/,Bl=/^```/,Ul=/```$/,jl=/`[^`]+`/,Kl=/(twitter|x)\.com/i,Wl=/@[a-zA-Z0-9_]+@(twitter|x)\.com/,Zl=/(@([a-zA-Z0-9_]+)@(twitter|x)\.com)/g,Gl=/(`[^]+?`)/g;function ql(e,t){if(t){const n=document.createElement("template");return n.innerHTML=e,n.content}else{const n=document.createElement("div");return n.innerHTML=e,n}}function Yl(e,t={}){const{emojis:n,returnDOM:o,postEnhanceDOM:i=()=>{}}=t;let s=e;const a=ql(s,o),c=Nl.test(s),l=s.includes("```");if(c){const d=a.querySelectorAll('a:not([target="_blank"])');for(const p of d)p.setAttribute("target","_blank");const f=a.querySelectorAll("a[class]");for(const p of f)for(const h of p.classList)Dl.includes(h)||p.classList.remove(h)}if(c){const d=a.querySelectorAll("a[href]");for(const f of d)Fl.test(f.textContent.trim())&&(f.classList.add("has-url-text"),eu(f))}if(c){const d=a.querySelectorAll("a[href]"),f=[];for(const p of d){const h=p.innerText.trim(),m=p.querySelector("*");if(zl.test(h)){const[g,_,T]=h.split("@");m||(!f.some(([y])=>y===_)||f.some(([y,w])=>y===_&&w===T)?(p.innerHTML=`@<span>${_}</span>`,f.push([_,T])):p.innerHTML=`@<span>${_}@${T}</span>`),p.classList.add("mention")}Vl.test(h)&&(m||(p.innerHTML=`#<span>${h.slice(1)}</span>`),p.classList.add("mention","hashtag"))}}let u;if(s.includes(":")&&(n!=null&&n.length)){u=Fo(a);for(const d of u){let f=$o(d.nodeValue);f=sr(f,n),Ft.innerHTML=f,d.replaceWith(...Ft.childNodes)}}if(l){const d=[...a.querySelectorAll("p")].filter(f=>Hl.test(f.innerText.trim()));for(const f of d){const p=document.createElement("pre");for(const h of f.querySelectorAll("br"))h.replaceWith(`
|
||
`);p.innerHTML=`<code>${f.innerHTML.trim()}</code>`,f.replaceWith(p)}}if(l){const f=[...a.querySelectorAll("p")].filter(p=>Bl.test(p.innerText));for(const p of f){const h=[p];let m=!1,g=p;for(;g.nextElementSibling;){const _=g.nextElementSibling;if(_&&_.tagName==="P")if(Ul.test(_.innerText)){h.push(_),m=!0;break}else h.push(_);else break;g=_}if(m){const _=document.createElement("pre");for(const y of h)for(const w of y.querySelectorAll("br"))w.replaceWith(`
|
||
`);const T=h.map(y=>y.innerHTML).join(`
|
||
|
||
`);_.innerHTML=`<code tabindex="0">${T}</code>`,p.replaceWith(_);for(const y of h)y.remove()}}}if(s.includes("`")){u=Fo(a);for(const d of u){let f=$o(d.nodeValue);jl.test(f)&&(f=f.replaceAll(Gl,"<code>$1</code>")),Ft.innerHTML=f,d.replaceWith(...Ft.childNodes)}}if(Kl.test(s)){u=Fo(a,{rejectFilter:["A"]});for(const d of u){let f=$o(d.nodeValue);Wl.test(f)&&(f=f.replaceAll(Zl,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),Ft.innerHTML=f,d.replaceWith(...Ft.childNodes)}}if(s.includes("#")){let d=null;const f=[...a.querySelectorAll("p")].filter((p,h)=>{let m=0;for(let g=0;g<p.childNodes.length;g++){const _=p.childNodes[g];if(_.nodeType===Node.TEXT_NODE){if(_.textContent.trim()!=="")return!1}else if(_.tagName!=="BR")if(_.tagName==="A"){const T=_.textContent.trim();if(!T||!T.startsWith("#"))return!1;m++}else return!1}if(m>3||m>1&&d&&h===d+1)return d=h,!0});if(f!=null&&f.length)for(const p of f)p.classList.add("hashtag-stuffing"),p.title=p.innerText}if(s.includes("<img")){const d=a.querySelectorAll("img");for(let f=0;f<d.length;f++){const p=d[f],h=p.getAttribute("width")||p.naturalWidth,m=p.getAttribute("height")||p.naturalHeight;h&&m&&p.style.setProperty("--original-aspect-ratio",`${h}/${m}`)}}for(const d of a.childNodes)if(d.nodeType===Node.TEXT_NODE){const f=document.createElement("span");f.textContent=d.textContent,a.replaceChild(f,d)}return i&&queueMicrotask(()=>i(a)),o?a:a.innerHTML}const Ps=Oe(Yl),Xl=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],Ql=Object.fromEntries(Xl.map(e=>[e,!0])),Jl=/^(https?:\/\/(www\.)?|xmpp:)/,No=30;function eu(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),o=(n.match(Jl)||[])[0]||"";if(!o)return;const i=n.slice(o.length,o.length+No),s=n.slice(o.length+No),a=n.slice(o.length).length>No;e.innerHTML=`<span class="invisible">${o}</span><span class=${a?"ellipsis":""}>${i}</span><span class="invisible">${s}</span>`}catch{}}function Fo(e,t={}){var a;const n=[],o=Object.assign({},Ql,(a=t.rejectFilter)==null?void 0:a.reduce((c,l)=>(c[l]=!0,c),{})),i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(c){return o[c.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let s;for(;s=i.nextNode();)n.push(s);return n}const zt=document.createElement("div");function tu(e,t){if(!e)return"";const{preProcess:n}=t||{};return zt.innerHTML=e.replace(/<\/p>/g,`</p>
|
||
|
||
`).replace(/<\/li>/g,`</li>
|
||
`),zt.querySelectorAll("br").forEach(o=>{o.replaceWith(`
|
||
`)}),n==null||n(zt),zt.querySelectorAll(".invisible").forEach(o=>{o.remove()}),zt.querySelectorAll(".ellipsis").forEach(o=>{o.append("...")}),zt.innerText.replace(/[\r\n]{3,}/g,`
|
||
|
||
`).trim()}const _o=Oe(tu);function nu(e){const{mentions:t=[],instance:n,previewMode:o,statusURL:i}=e||{};return s=>{var d,f;let{target:a}=s;if(a=a.closest("a"),!a||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.which===2)return;const c=(d=a.previousSibling)==null?void 0:d.textContent,l=c==null?void 0:c.endsWith("@"),u=a.innerText.startsWith("@");if((a.classList.contains("u-url")||a.classList.contains("mention"))&&u||l&&!u){const p=(a.querySelector("span")||a).innerText.trim(),h=p.replace(/^@/,""),m=a.getAttribute("href"),g=t.find(_=>_.url===m)||t.find(_=>_.acct===h||_.username===h);if(g)s.preventDefault(),s.stopPropagation(),B.showAccount={account:g.acct,instance:n};else if(!/^http/i.test(p)){s.preventDefault(),s.stopPropagation();const _=a.getAttribute("href");B.showAccount={account:_,instance:n}}}else if(!o){const p=c==null?void 0:c.endsWith("#");if(a.classList.contains("hashtag")||p){s.preventDefault(),s.stopPropagation();const h=a.innerText.replace(/^#/,"").trim(),m=n?`#/${n}/t/${h}`:`#/t/${h}`;location.hash=m}else(f=B.unfurledLinks[a.href])!=null&&f.url&&i!==a.href&&(s.preventDefault(),s.stopPropagation(),B.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${B.unfurledLinks[a.href].url}`)}}}function Xf(e,t){return()=>S.number(e,{style:"unit",unit:t,unitDisplay:"long"})}const ou=Oe(()=>new Intl.DateTimeFormat().resolvedOptions().locale),ru=e=>{const{locale:t,dateYear:n,hideTime:o,formatOpts:i,forceOpts:s}=e||{},a=t.replace(/-[a-z]+$/i,""),c=bn([a],[ou],t),l=new Date().getFullYear(),u=s||{year:n===l?void 0:"numeric",month:"short",day:"numeric",hour:o?void 0:"numeric",minute:o?void 0:"numeric",...i};try{return Intl.DateTimeFormat(c,u)}catch{}try{return Intl.DateTimeFormat(t,u)}catch{}return Intl.DateTimeFormat(void 0,u)},iu=Oe(ru);function Sn(e,t){return e instanceof Date||(e=new Date(e)),iu({dateYear:e.getFullYear(),locale:S.locale,...t}).format(e)}function rt(e){try{return S.number(e,{notation:"compact",roundingMode:"floor"})}catch{return e}}const vi=5e3;function Gn(e){if(e||(e=!0),B.showCompose){B.composerState.minimized?Re({duration:vi,text:S._({id:"/4fHR1"})}):Re({duration:vi,text:S._({id:"vvl08N"})});return}rc(),B.showCompose=e}function Qf({skeleton:e,account:t,avatarSize:n="xl",useAvatarStatic:o=!1,instance:i,external:s,internal:a,onClick:c,showActivity:l=!1,showStats:u=!1,accountInstance:d,hideDisplayName:f=!1,relationship:p={},excludeRelationshipAttrs:h=[]}){if(e)return r("div",{class:"account-block skeleton",children:[r(st,{size:n}),r("span",{children:[r("b",{children:"████████"}),r("br",{}),r("span",{class:"account-block-acct",children:"██████"})]})]});if(!t)return null;const{id:m,acct:g,avatar:_,avatarStatic:T,displayName:y,username:w,emojis:E,url:x,statusesCount:b,lastStatusAt:k,bot:D,fields:L,note:A,group:C,followersCount:R,createdAt:W,locked:U}=t;let[oe,Q,re]=g.match(/([^@]+)(@.+)/i)||[,g];d&&(re=`@${d}`);const q=L==null?void 0:L.find(se=>!!se.verifiedAt&&!!se.value),ie={};for(const se in p)h.includes(se)||(ie[se]=p[se]);const ce=ie.following||ie.followedBy||ie.requested;return r("a",{class:"account-block",href:x,target:s?"_blank":null,title:re?g:`@${g}`,onClick:se=>{if(!s){if(se.preventDefault(),c)return c(se);a?location.hash=`/${i}/a/${m}`:B.showAccount={account:t,instance:i}}},children:[r("div",{class:"avatar-container",children:r(st,{url:o?T:_||T,size:n,squircle:D})}),r("span",{class:"account-block-content",children:[!f&&r(F,{children:y?r("b",{children:r(qt,{text:y,emojis:E})}):r("b",{children:w})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[re?"":"@",Q,r("wbr",{}),re,U&&r(F,{children:[" ",r(M,{icon:"lock",size:"s",alt:S._({id:"G2fuEb"})})]})]}),l&&r("div",{class:"account-block-stats",children:[r(O,{id:"ajzDof",values:{0:rt(b)}}),!!k&&r(F,{children:[" ","·"," ",r(O,{id:"f8bJ3C",values:{0:Sn(k,{hideTime:!0})}})]})]}),u&&r("div",{class:"account-block-stats",children:[D&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"bot"})," ",r(O,{id:"9Vdq+j"})]})}),!!C&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"group"})," ",r(O,{id:"L8fEEm"})]})}),ce&&r("div",{class:"shazam-container-horizontal",children:r("div",{class:"shazam-container-inner",children:ie.following&&ie.followedBy?r("span",{class:"tag minimal",children:r(O,{id:"7oRLbi"})}):ie.requested?r("span",{class:"tag minimal",children:r(O,{id:"Yx0Ud8"})}):ie.following?r("span",{class:"tag minimal",children:r(O,{id:"y6sq5j"})}):ie.followedBy?r("span",{class:"tag minimal",children:r(O,{id:"p3UO/y"})}):null})},p.id),!!R&&r("span",{class:"ib",children:r(O,{id:"Mn1E9C",values:{followersCount:R}})}),!!q&&r("span",{class:"verified-field",children:[r(M,{icon:"check-circle",size:"s",alt:S._({id:"QDEWii"})})," ",r("span",{dangerouslySetInnerHTML:{__html:Ps(q.value,{emojis:E})}})]}),!D&&!C&&!ce&&!R&&!q&&!!W&&r("span",{class:"created-at",children:r(O,{id:"PCcEFZ",values:{0:Sn(W,{hideTime:!0})},components:{0:r("time",{datetime:W})}})})]})]})]})}var Ls={};function Ze(e,t){typeof t=="boolean"&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}var su=Ze;Ze.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};Ze.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};Ze.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var o=this;return this._timer=setTimeout(function(){o._attempts++,o._operationTimeoutCb&&(o._timeout=setTimeout(function(){o._operationTimeoutCb(o._attempts)},o._operationTimeout),o._options.unref&&o._timeout.unref()),o._fn(o._attempts)},n),this._options.unref&&this._timer.unref(),!0};Ze.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};Ze.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)};Ze.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)};Ze.prototype.start=Ze.prototype.try;Ze.prototype.errors=function(){return this._errors};Ze.prototype.attempts=function(){return this._attempts};Ze.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,o=0;o<this._errors.length;o++){var i=this._errors[o],s=i.message,a=(e[s]||0)+1;e[s]=a,a>=n&&(t=i,n=a)}return t};(function(e){var t=su;e.operation=function(n){var o=e.timeouts(n);return new t(o,{forever:n&&(n.forever||n.retries===1/0),unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(n){if(n instanceof Array)return[].concat(n);var o={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in n)o[i]=n[i];if(o.minTimeout>o.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var s=[],a=0;a<o.retries;a++)s.push(this.createTimeout(a,o));return n&&n.forever&&!s.length&&s.push(this.createTimeout(a,o)),s.sort(function(c,l){return c-l}),s},e.createTimeout=function(n,o){var i=o.randomize?Math.random()+1:1,s=Math.round(i*Math.max(o.minTimeout,1)*Math.pow(o.factor,n));return s=Math.min(s,o.maxTimeout),s},e.wrap=function(n,o,i){if(o instanceof Array&&(i=o,o=null),!i){i=[];for(var s in n)typeof n[s]=="function"&&i.push(s)}for(var a=0;a<i.length;a++){var c=i[a],l=n[c];n[c]=(function(d){var f=e.operation(o),p=Array.prototype.slice.call(arguments,1),h=p.pop();p.push(function(m){f.retry(m)||(m&&(arguments[0]=f.mainError()),h.apply(this,arguments))}),f.attempt(function(){d.apply(n,p)})}).bind(n,l),n[c].options=o}}})(Ls);var au=Ls;const cu=gr(au),lu=Object.prototype.toString,uu=e=>lu.call(e)==="[object Error]",du=new Set(["Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed"]);function fu(e){return e&&uu(e)&&e.name==="TypeError"&&typeof e.message=="string"?e.message==="Load failed"?e.stack===void 0:du.has(e.message):!1}class hu extends Error{constructor(t){super(),t instanceof Error?(this.originalError=t,{message:t}=t):(this.originalError=new Error(t),this.originalError.stack=this.stack),this.name="AbortError",this.message=t}}const _i=(e,t,n)=>{const o=n.retries-(t-1);return e.attemptNumber=t,e.retriesLeft=o,e};async function pu(e,t){return new Promise((n,o)=>{t={onFailedAttempt(){},retries:10,shouldRetry:()=>!0,...t};const i=cu.operation(t),s=()=>{var c;i.stop(),o((c=t.signal)==null?void 0:c.reason)};t.signal&&!t.signal.aborted&&t.signal.addEventListener("abort",s,{once:!0});const a=()=>{var c;(c=t.signal)==null||c.removeEventListener("abort",s),i.stop()};i.attempt(async c=>{try{const l=await e(c);a(),n(l)}catch(l){try{if(!(l instanceof Error))throw new TypeError(`Non-error was thrown: "${l}". You should only throw errors.`);if(l instanceof hu)throw l.originalError;if(l instanceof TypeError&&!fu(l))throw l;if(_i(l,c,t),await t.shouldRetry(l)||(i.stop(),o(l)),await t.onFailedAttempt(l),!i.retry(l))throw i.mainError()}catch(u){_i(u,c,t),a(),o(u)}}})})}const mu=[{code:"auto",name:"Detect"},{code:"af",name:"Afrikaans"},{code:"sq",name:"Albanian"},{code:"am",name:"Amharic"},{code:"ar",name:"Arabic"},{code:"hy",name:"Armenian"},{code:"as",name:"Assamese"},{code:"ay",name:"Aymara"},{code:"az",name:"Azerbaijani"},{code:"bm",name:"Bambara"},{code:"eu",name:"Basque"},{code:"be",name:"Belarusian"},{code:"bn",name:"Bengali"},{code:"bho",name:"Bhojpuri"},{code:"bs",name:"Bosnian"},{code:"bg",name:"Bulgarian"},{code:"ca",name:"Catalan"},{code:"ceb",name:"Cebuano"},{code:"ny",name:"Chichewa"},{code:"zh",name:"Chinese"},{code:"co",name:"Corsican"},{code:"hr",name:"Croatian"},{code:"cs",name:"Czech"},{code:"da",name:"Danish"},{code:"dv",name:"Dhivehi"},{code:"doi",name:"Dogri"},{code:"nl",name:"Dutch"},{code:"en",name:"English"},{code:"eo",name:"Esperanto"},{code:"et",name:"Estonian"},{code:"ee",name:"Ewe"},{code:"tl",name:"Filipino"},{code:"fi",name:"Finnish"},{code:"fr",name:"French"},{code:"fy",name:"Frisian"},{code:"gl",name:"Galician"},{code:"ka",name:"Georgian"},{code:"de",name:"German"},{code:"el",name:"Greek"},{code:"gn",name:"Guarani"},{code:"gu",name:"Gujarati"},{code:"ht",name:"Haitian Creole"},{code:"ha",name:"Hausa"},{code:"haw",name:"Hawaiian"},{code:"iw",name:"Hebrew"},{code:"hi",name:"Hindi"},{code:"hmn",name:"Hmong"},{code:"hu",name:"Hungarian"},{code:"is",name:"Icelandic"},{code:"ig",name:"Igbo"},{code:"ilo",name:"Ilocano"},{code:"id",name:"Indonesian"},{code:"ga",name:"Irish"},{code:"it",name:"Italian"},{code:"ja",name:"Japanese"},{code:"jw",name:"Javanese"},{code:"kn",name:"Kannada"},{code:"kk",name:"Kazakh"},{code:"km",name:"Khmer"},{code:"rw",name:"Kinyarwanda"},{code:"gom",name:"Konkani"},{code:"ko",name:"Korean"},{code:"kri",name:"Krio"},{code:"ku",name:"Kurdish (Kurmanji)"},{code:"ckb",name:"Kurdish (Sorani)"},{code:"ky",name:"Kyrgyz"},{code:"lo",name:"Lao"},{code:"la",name:"Latin"},{code:"lv",name:"Latvian"},{code:"ln",name:"Lingala"},{code:"lt",name:"Lithuanian"},{code:"lg",name:"Luganda"},{code:"lb",name:"Luxembourgish"},{code:"mk",name:"Macedonian"},{code:"mai",name:"Maithili"},{code:"mg",name:"Malagasy"},{code:"ms",name:"Malay"},{code:"ml",name:"Malayalam"},{code:"mt",name:"Maltese"},{code:"mi",name:"Maori"},{code:"mr",name:"Marathi"},{code:"mni-Mtei",name:"Meiteilon (Manipuri)"},{code:"lus",name:"Mizo"},{code:"mn",name:"Mongolian"},{code:"my",name:"Myanmar (Burmese)"},{code:"ne",name:"Nepali"},{code:"no",name:"Norwegian"},{code:"or",name:"Odia (Oriya)"},{code:"om",name:"Oromo"},{code:"ps",name:"Pashto"},{code:"fa",name:"Persian"},{code:"pl",name:"Polish"},{code:"pt",name:"Portuguese"},{code:"pa",name:"Punjabi"},{code:"qu",name:"Quechua"},{code:"ro",name:"Romanian"},{code:"ru",name:"Russian"},{code:"sm",name:"Samoan"},{code:"sa",name:"Sanskrit"},{code:"gd",name:"Scots Gaelic"},{code:"nso",name:"Sepedi"},{code:"sr",name:"Serbian"},{code:"st",name:"Sesotho"},{code:"sn",name:"Shona"},{code:"sd",name:"Sindhi"},{code:"si",name:"Sinhala"},{code:"sk",name:"Slovak"},{code:"sl",name:"Slovenian"},{code:"so",name:"Somali"},{code:"es",name:"Spanish"},{code:"su",name:"Sundanese"},{code:"sw",name:"Swahili"},{code:"sv",name:"Swedish"},{code:"tg",name:"Tajik"},{code:"ta",name:"Tamil"},{code:"tt",name:"Tatar"},{code:"te",name:"Telugu"},{code:"th",name:"Thai"},{code:"ti",name:"Tigrinya"},{code:"ts",name:"Tsonga"},{code:"tr",name:"Turkish"},{code:"tk",name:"Turkmen"},{code:"ak",name:"Twi"},{code:"uk",name:"Ukrainian"},{code:"ur",name:"Urdu"},{code:"ug",name:"Uyghur"},{code:"uz",name:"Uzbek"},{code:"vi",name:"Vietnamese"},{code:"cy",name:"Welsh"},{code:"xh",name:"Xhosa"},{code:"yi",name:"Yiddish"},{code:"yo",name:"Yoruba"},{code:"zu",name:"Zulu"}];var gu=Object.defineProperty,vu=(e,t,n)=>t in e?gu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qn=(e,t,n)=>vu(e,typeof t!="symbol"?t+"":t,n),ar=new Map,Yn=new WeakMap,yi=0,_u=void 0;function yu(e){return e?(Yn.has(e)||(yi+=1,Yn.set(e,yi.toString())),Yn.get(e)):"0"}function bu(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?yu(e.root):e[t]}`).toString()}function Tu(e){const t=bu(e);let n=ar.get(t);if(!n){const o=new Map;let i;const s=new IntersectionObserver(a=>{a.forEach(c=>{var l;const u=c.isIntersecting&&i.some(d=>c.intersectionRatio>=d);e.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=u),(l=o.get(c.target))==null||l.forEach(d=>{d(u,c)})})},e);i=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:s,elements:o},ar.set(t,n)}return n}function Ms(e,t,n={},o=_u){if(typeof window.IntersectionObserver>"u"&&o!==void 0){const l=e.getBoundingClientRect();return t(o,{isIntersecting:o,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:i,observer:s,elements:a}=Tu(n),c=a.get(e)||[];return a.has(e)||a.set(e,c),c.push(t),s.observe(e),function(){c.splice(c.indexOf(t),1),c.length===0&&(a.delete(e),s.unobserve(e)),a.size===0&&(s.disconnect(),ar.delete(i))}}function wu(e){return typeof e.children!="function"}var Jf=class extends Zi{constructor(e){super(e),qn(this,"node",null),qn(this,"_unobserveCb",null),qn(this,"handleNode",t=>{this.node&&(this.unobserve(),!t&&!this.props.triggerOnce&&!this.props.skip&&this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=t||null,this.observeNode()}),qn(this,"handleChange",(t,n)=>{t&&this.props.triggerOnce&&this.unobserve(),wu(this.props)||this.setState({inView:t,entry:n}),this.props.onChange&&this.props.onChange(t,n)}),this.state={inView:!!e.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(e){(e.rootMargin!==this.props.rootMargin||e.root!==this.props.root||e.threshold!==this.props.threshold||e.skip!==this.props.skip||e.trackVisibility!==this.props.trackVisibility||e.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:e,root:t,rootMargin:n,trackVisibility:o,delay:i,fallbackInView:s}=this.props;this._unobserveCb=Ms(this.node,this.handleChange,{threshold:e,root:t,rootMargin:n,trackVisibility:o,delay:i},s)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:e}=this.props;if(typeof e=="function"){const{inView:h,entry:m}=this.state;return e({inView:h,entry:m,ref:this.handleNode})}const{as:t,triggerOnce:n,threshold:o,root:i,rootMargin:s,onChange:a,skip:c,trackVisibility:l,delay:u,initialInView:d,fallbackInView:f,...p}=this.props;return Ma(t||"div",{ref:this.handleNode,...p},e)}};function Eu({threshold:e,delay:t,trackVisibility:n,rootMargin:o,root:i,triggerOnce:s,skip:a,initialInView:c,fallbackInView:l,onChange:u}={}){var d;const[f,p]=Z(null),h=$(),[m,g]=Z({inView:!!c,entry:void 0});h.current=u,ee(()=>{if(a||!f)return;let w;return w=Ms(f,(E,x)=>{g({inView:E,entry:x}),h.current&&h.current(E,x),x.isIntersecting&&s&&w&&(w(),w=void 0)},{root:i,rootMargin:o,threshold:e,trackVisibility:n,delay:t},l),()=>{w&&w()}},[Array.isArray(e)?e.toString():e,f,i,o,s,a,n,l,t]);const _=(d=m.entry)==null?void 0:d.target,T=$();!f&&_&&!s&&!a&&T.current!==_&&(T.current=_,g({inView:!!c,entry:void 0}));const y=[p,m.inView,m.entry];return y.ref=y[0],y.inView=y[1],y.entry=y[2],y}const bi=48,zo={};function Rs({id:e,children:t}){const n=$(),o=!!zo[e],[i,s]=Z(!1),[a,c]=Z(o||!1),{ref:l}=Eu({root:null,rootMargin:`-${bi}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:u=>{u&&(s(!0),e&&(zo[e]=!0))},triggerOnce:!0,skip:a||i});return ee(()=>{if(!n.current)return;const u=n.current.getBoundingClientRect();u.bottom>bi&&(u.top<window.innerHeight?s(!0):c(!0),e&&(zo[e]=!0))},[]),a?t:r("div",{ref:n,class:"shazam-container no-animation",hidden:!i,children:r("div",{ref:l,class:"shazam-container-inner",children:t})})}const xu={BASE_URL:"./",DEV:!1,MODE:"production",PHANPY_CLIENT_NAME:"Phanpy",PHANPY_LINGVA_INSTANCES:"lingva.phanpy.social lingva.lunar.icu lingva.garudalinux.org translate.plausibility.cloud",PHANPY_PRIVACY_POLICY_URL:"https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD",PHANPY_WEBSITE:"https://phanpy.social",PROD:!0,SSR:!1,VITE_APP_ENV:"production"},{PHANPY_LINGVA_INSTANCES:Ti}=xu,gn=Ti?Ti.split(/\s+/):[],Su=Gi({limit:1,interval:2e3});let Vo=0;function ku(e,t,n){return pu(()=>{let i=gn[Vo];return fetch(`https://${i}/api/v1/${t}/${n}/${encodeURIComponent(e)}`).then(s=>{if(!s.ok)throw new Error(s.statusText);return s.json()}).then(s=>{var a;return{provider:"lingva",content:s.translation,detectedSourceLanguage:(a=s.info)==null?void 0:a.detectedSource,info:s.info}})},{retries:3,onFailedAttempt:i=>{Vo=(Vo+1)%gn.length}})}const Os=1e3*60*60,Ds=mo(ku,{maxAge:Os}),Iu=mo(Su(Ds),{maxAge:Os});function Au({forceTranslate:e,sourceLanguage:t,onTranslate:n,text:o="",mini:i,autoDetected:s}){const a=ys(!0),[c,l]=Z("default"),[u,d]=Z(null),[f,p]=Z(null),[h,m]=Z(null),g=$(),_=t?ln(t):null,T=ln(a),y=$("auto");n||(n=i?Iu:Ds);const w=async()=>{var E,x;l("loading");try{const{content:b,detectedSourceLanguage:k,provider:D,error:L,...A}=await n(o,y.current,a);if(b){if(k){const C=ln(k);m(C)}if(D==="lingva"){const C=(x=(E=A==null?void 0:A.info)==null?void 0:E.pronunciation)==null?void 0:x.query;C&&d(C)}p(b),l("default"),!i&&b.trim()!==o.trim()&&(g.current.open=!0,g.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else l("error")}catch{l("error")}};return ee(()=>{e&&w()},[e]),i?f&&f.trim()!==o.trim()&&h!==T?r(Rs,{children:r("div",{class:"status-translation-block-mini",children:[r(M,{icon:"translate",alt:S._({id:"zVJKbG",values:{sourceLangText:_}})}),r("output",{lang:a,dir:"auto",title:u||"",children:f})]})}):null:r("div",{class:"status-translation-block",onClick:E=>{E.preventDefault()},children:r("details",{ref:g,children:[r("summary",{children:r("button",{type:"button",onClick:async E=>{E.preventDefault(),E.stopPropagation(),g.current.open=!g.current.open,c!=="loading"&&(f||w())},children:[r(M,{icon:"translate"})," ",r("span",{children:c==="loading"?S._({id:"Zxkt/v"}):t&&_&&!h?s?S._({id:"R20Yf9",values:{sourceLangText:_}}):S._({id:"h8zDAI",values:{sourceLangText:_}}):S._({id:"pi8x/S"})})]})}),r("div",{class:"translated-block",children:[r("div",{class:"translation-info insignificant",children:[r("select",{class:"translated-source-select",disabled:c==="loading",onChange:E=>{y.current=E.target.value,w()},children:mu.map(E=>{const x=ln({code:E.code,fallback:E.name}),b=ln({code:E.code,locale:E.code}),k=x!==b;return r("option",{value:E.code,children:E.code==="auto"?S._({id:"Bze3gr",values:{0:h??"…"}}):k?`${b} - ${x}`:b})})})," ",r("span",{children:["→ ",T]}),r(qi,{abrupt:!0,hidden:c!=="loading"})]}),c==="error"?r("p",{class:"ui-state",children:r(O,{id:"m5LihO"})}):!!f&&r(F,{children:[r("output",{class:"translated-content",lang:a,dir:"auto",children:f}),!!u&&r("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:E=>{E.target.classList.toggle("expand")},children:u})]})]})]})})}const Cu=gn!=null&&gn.length?Au:()=>null;function ut(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function $s(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const o=ut(n);return(i,s)=>o.then(a=>s(a.transaction(t,i).objectStore(t)))}let Ho;function Pt(){return Ho||(Ho=$s("keyval-store","keyval")),Ho}function Pu(e,t=Pt()){return t("readonly",n=>ut(n.get(e)))}function Lu(e,t,n=Pt()){return n("readwrite",o=>(o.put(t,e),ut(o.transaction)))}function Mu(e,t=Pt()){return t("readonly",n=>Promise.all(e.map(o=>ut(n.get(o)))))}function Ru(e,t=Pt()){return t("readwrite",n=>(n.delete(e),ut(n.transaction)))}function Ou(e,t=Pt()){return t("readwrite",n=>(e.forEach(o=>n.delete(o)),ut(n.transaction)))}function Du(e=Pt()){return e("readwrite",t=>(t.clear(),ut(t.transaction)))}function $u(e,t){return e.openCursor().onsuccess=function(){this.result&&(t(this.result),this.result.continue())},ut(e.transaction)}function Nu(e=Pt()){return e("readonly",t=>{if(t.getAllKeys)return ut(t.getAllKeys());const n=[];return $u(t,o=>n.push(o.key)).then(()=>n)})}function wi(e,t){const n=$s(e,t);return{set:(o,i)=>Lu(o,i,n),get:o=>Pu(o,n),getMany:o=>Mu(o,n),del:o=>Ru(o,n),delMany:o=>Ou(o,n),clear:()=>Du(n),keys:()=>Nu(n)}}const eh={drafts:wi("drafts-db","drafts-store"),catchup:wi("catchup-db","catchup-store")};async function th(e,t={}){if(!(e!=null&&e.length))return;const{masto:n}=so(),o=vr(),i=e.reduce((s,a)=>(!s.includes(a.id)&&!t[a.id]&&a.id!==o&&s.push(a.id),s),[]);if(!i.length)return null;try{return(await n.v1.accounts.relationships.fetch({id:i})).reduce((c,l)=>(c[l.id]=l,c),{})}catch{return null}}class Ke extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid"]}connectedCallback(){this.addEventListener("pointerover",Ke.warmConnections,{once:!0}),this.addEventListener("click",()=>this.addIframe())}get videoId(){return encodeURIComponent(this.getAttribute("videoid")||"")}set videoId(t){this.setAttribute("videoid",t)}get playlistId(){return encodeURIComponent(this.getAttribute("playlistid")||"")}set playlistId(t){this.setAttribute("playlistid",t)}get videoTitle(){return this.getAttribute("videotitle")||"Video"}set videoTitle(t){this.setAttribute("videotitle",t)}get videoPlay(){return this.getAttribute("videoPlay")||"Play"}set videoPlay(t){this.setAttribute("videoPlay",t)}get videoStartAt(){return this.getAttribute("videoStartAt")||"0"}get autoLoad(){return this.hasAttribute("autoload")}get noCookie(){return this.hasAttribute("nocookie")}get posterQuality(){return this.getAttribute("posterquality")||"hqdefault"}get posterLoading(){return this.getAttribute("posterloading")||"lazy"}get params(){return`start=${this.videoStartAt}&${this.getAttribute("params")}`}set params(t){this.setAttribute("params",t)}setupDom(){const t=this.attachShadow({mode:"open"});let n="";window.liteYouTubeNonce&&(n=`nonce="${window.liteYouTubeNonce}"`),t.innerHTML=`
|
||
<style ${n}>
|
||
:host {
|
||
contain: content;
|
||
display: block;
|
||
position: relative;
|
||
width: 100%;
|
||
padding-bottom: calc(100% / (16 / 9));
|
||
}
|
||
|
||
@media (max-width: 40em) {
|
||
:host([short]) {
|
||
padding-bottom: calc(100% / (9 / 16));
|
||
}
|
||
}
|
||
|
||
#frame, #fallbackPlaceholder, iframe {
|
||
position: absolute;
|
||
width: 100%;
|
||
height: 100%;
|
||
left: 0;
|
||
}
|
||
|
||
#frame {
|
||
cursor: pointer;
|
||
}
|
||
|
||
#fallbackPlaceholder {
|
||
object-fit: cover;
|
||
}
|
||
|
||
#frame::before {
|
||
content: '';
|
||
display: block;
|
||
position: absolute;
|
||
top: 0;
|
||
background-image: linear-gradient(180deg, #111 -20%, transparent 90%);
|
||
height: 60px;
|
||
width: 100%;
|
||
z-index: 1;
|
||
}
|
||
|
||
#playButton {
|
||
width: 68px;
|
||
height: 48px;
|
||
background-color: transparent;
|
||
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
|
||
z-index: 1;
|
||
border: 0;
|
||
border-radius: inherit;
|
||
}
|
||
|
||
#playButton:before {
|
||
content: '';
|
||
border-style: solid;
|
||
border-width: 11px 0 11px 19px;
|
||
border-color: transparent transparent transparent #fff;
|
||
}
|
||
|
||
#playButton,
|
||
#playButton:before {
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate3d(-50%, -50%, 0);
|
||
cursor: inherit;
|
||
}
|
||
|
||
/* Post-click styles */
|
||
.activated {
|
||
cursor: unset;
|
||
}
|
||
|
||
#frame.activated::before,
|
||
#frame.activated > #playButton {
|
||
display: none;
|
||
}
|
||
</style>
|
||
<div id="frame">
|
||
<picture>
|
||
<source id="webpPlaceholder" type="image/webp">
|
||
<source id="jpegPlaceholder" type="image/jpeg">
|
||
<img id="fallbackPlaceholder" referrerpolicy="origin" loading="lazy">
|
||
</picture>
|
||
<button id="playButton"></button>
|
||
</div>
|
||
`,this.domRefFrame=t.querySelector("#frame"),this.domRefImg={fallback:t.querySelector("#fallbackPlaceholder"),webp:t.querySelector("#webpPlaceholder"),jpeg:t.querySelector("#jpegPlaceholder")},this.domRefPlayButton=t.querySelector("#playButton")}setupComponent(){this.initImagePlaceholder(),this.domRefPlayButton.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.setAttribute("title",`${this.videoPlay}: ${this.videoTitle}`),(this.autoLoad||this.isYouTubeShort())&&this.initIntersectionObserver()}attributeChangedCallback(t,n,o){switch(t){case"videoid":case"playlistid":case"videoTitle":case"videoPlay":{n!==o&&(this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1));break}default:break}}addIframe(t=!1){if(!this.isIframeLoaded){let n=t?0:1;const o=this.noCookie?"-nocookie":"";let i;this.playlistId?i=`?listType=playlist&list=${this.playlistId}&`:i=`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1);const s=`
|
||
<iframe frameborder="0" title="${this.videoTitle}"
|
||
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
|
||
src="https://www.youtube${o}.com/embed/${i}autoplay=${n}&${this.params}"
|
||
></iframe>`;this.domRefFrame.insertAdjacentHTML("beforeend",s),this.domRefFrame.classList.add("activated"),this.isIframeLoaded=!0,this.attemptShortAutoPlay(),this.dispatchEvent(new CustomEvent("liteYoutubeIframeLoaded",{detail:{videoId:this.videoId},bubbles:!0,cancelable:!0}))}}initImagePlaceholder(){var o,i;const t=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`,n=`https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;this.domRefImg.fallback.loading=this.posterLoading,this.domRefImg.webp.srcset=t,this.domRefImg.jpeg.srcset=n,this.domRefImg.fallback.src=n,this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),(i=(o=this.domRefImg)==null?void 0:o.fallback)==null||i.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}initIntersectionObserver(){const t={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((o,i)=>{o.forEach(s=>{s.isIntersecting&&!this.isIframeLoaded&&(Ke.warmConnections(),this.addIframe(!0),i.unobserve(this))})},t).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{var t,n;(n=(t=this.shadowRoot.querySelector("iframe"))==null?void 0:t.contentWindow)==null||n.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return this.getAttribute("short")===""&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(t,n){const o=document.createElement("link");o.rel=t,o.href=n,o.crossOrigin="true",document.head.append(o)}static warmConnections(){Ke.isPreconnected||window.liteYouTubeIsPreconnected||(Ke.addPrefetch("preconnect","https://i.ytimg.com/"),Ke.addPrefetch("preconnect","https://s.ytimg.com"),Ke.addPrefetch("preconnect","https://www.youtube.com"),Ke.addPrefetch("preconnect","https://www.google.com"),Ke.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Ke.addPrefetch("preconnect","https://static.doubleclick.net"),Ke.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Ke.isPreconnected=!1;customElements.define("lite-youtube",Ke);const Ns=new Uint8Array(128);for(let e=0;e<83;e++)Ns["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(e)]=e;const oo=(e,t,n)=>{let o=0;for(;t<n;)o*=83,o+=Ns[e.charCodeAt(t++)];return o},Fs=Math.pow,kn=Math.PI,Fu=kn*2,zs=3294.6,Vs=269.025,zu=e=>e>10.31475?Fs(e/Vs+.052132,2.4):e/zs,Bo=e=>~~(e>1227e-8?Vs*Fs(e,.416666)-13.025:e*zs+1),vn=e=>(e<0?-1:1)*e*e,Ei=e=>{for(e+=kn/2;e>kn;)e-=Fu;const t=1.27323954*e-.405284735*vn(e);return .225*(vn(t)-t)+t};function Ar(e){const t=oo(e,2,6);return[t>>16,t>>8&255,t&255]}function Vu(e,t,n,o){const i=oo(e,0,1),s=i%9+1,a=~~(i/9)+1,c=s*a;let l=0,u=0,d=0,f=0,p=0,h=0,m=0,g=0,_=0,T=0,y=0,w=0;const E=(oo(e,1,2)+1)/13446*(o|1),x=new Float64Array(c*3),b=Ar(e);for(l=0;l<3;l++)x[l]=zu(b[l]);for(l=1;l<c;l++)w=oo(e,4+l*2,6+l*2),x[l*3]=vn(~~(w/361)-9)*E,x[l*3+1]=vn(~~(w/19)%19-9)*E,x[l*3+2]=vn(w%19-9)*E;const k=new Float64Array(a*n),D=new Float64Array(s*t);for(u=0;u<a;u++)for(f=0;f<n;f++)k[u*n+f]=Ei(kn*f*u/n);for(l=0;l<s;l++)for(d=0;d<t;d++)D[l*t+d]=Ei(kn*d*l/t);const L=t*4,A=new Uint8ClampedArray(L*n);for(f=0;f<n;f++)for(d=0;d<t;d++){for(p=h=m=0,u=0;u<a;u++)for(_=k[u*n+f],l=0;l<s;l++)g=D[l*t+d]*_,T=(l+u*s)*3,p+=x[T]*g,h+=x[T+1]*g,m+=x[T+2]*g;y=4*d+f*L,A[y]=Bo(p),A[y+1]=Bo(h),A[y+2]=Bo(m),A[y+3]=255}return A}const Hu=(e,t={})=>{const n=t.char||" ",o=t.count||2;let i=0;const s=[];return e.reverse().reduce((a,c)=>{s.length&&i&&s[i]&&s[i]===c.substring(1,s[i].length+1)&&(s.splice(i,1),i--);const u=[`${n.repeat(i?i*o:0)}${c}`,...a];return c.substring(0,2)==="</"&&(i++,s[i]=c.substring(2,c.length-1)),u},[]).join(`
|
||
`)};var Bu=Hu;const Hs=e=>e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),Uu=e=>{const t=Hs(e).split(`
|
||
`),n=[];let o="";for(let i=0;i<t.length;i+=1){const s=t[i];if(s.endsWith("/>")){n.push(`${o}${s.slice(0,-2)} />`),o="";continue}if(s.endsWith(">")){n.push(`${o}${s.startsWith(">")||s.startsWith("<")?"":" "}${s}`),o="";continue}o+=o.length?` ${s}`:s}return n};var ju={mergeAttributesWithElements:Uu,removeEmptyLines:Hs};const Ku=Bu,{mergeAttributesWithElements:Wu}=ju,Zu=(e,t={})=>{const n=Wu(e);return Ku(n,t)};var Gu=Zu;const qu=gr(Gu);var hn=(e=>(e.Mouse="mouse",e.Touch="touch",e.Pointer="pointer",e))(hn||{}),pn=(e=>(e.CancelledByMovement="cancelled-by-movement",e.CancelledByRelease="cancelled-by-release",e.CancelledOutsideElement="cancelled-outside-element",e))(pn||{});const Bs=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,Yu=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function Us(e){const{nativeEvent:t}=e,n=Yu();return n&&t instanceof n||"touches"in e}function js(e){const t=Bs();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Ks(e){const{nativeEvent:t}=e;if(!t)return!1;const n=Bs();return n&&t instanceof n||"pointerId"in t}function xi(e){return js(e)||Us(e)||Ks(e)}function Si(e){return Us(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:js(e)||Ks(e)?{x:e.pageX,y:e.pageY}:null}function Xu(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Ws(e,{threshold:t=400,captureEvent:n=!1,detect:o=hn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:s=!0,filterEvents:a,onStart:c,onMove:l,onFinish:u,onCancel:d}={}){const f=$(!1),p=$(!1),h=$(),m=$(),g=$(e),_=$(null),T=Me(x=>b=>{p.current||xi(b)&&(a!==void 0&&!a(b)||(n&&b.persist(),c==null||c(b,{context:x}),_.current=Si(b),p.current=!0,h.current=b.currentTarget,m.current=setTimeout(()=>{g.current&&(g.current(b,{context:x}),f.current=!0)},t)))},[n,a,c,t]),y=Me(x=>(b,k)=>{xi(b)&&p.current&&(_.current=null,n&&b.persist(),f.current?u==null||u(b,{context:x}):p.current&&(d==null||d(b,{context:x,reason:k??pn.CancelledByRelease})),f.current=!1,p.current=!1,m.current!==void 0&&clearTimeout(m.current))},[n,u,d]),w=Me(x=>b=>{if(l==null||l(b,{context:x}),i!==!1&&_.current){const k=Si(b);if(k){const D=i===!0?25:i,L={x:Math.abs(k.x-_.current.x),y:Math.abs(k.y-_.current.y)};(L.x>D||L.y>D)&&y(x)(b,pn.CancelledByMovement)}}},[y,i,l]),E=Me(x=>{if(e===null)return{};switch(o){case hn.Mouse:{const b={onMouseDown:T(x),onMouseMove:w(x),onMouseUp:y(x)};return s&&(b.onMouseLeave=k=>{y(x)(k,pn.CancelledOutsideElement)}),b}case hn.Touch:return{onTouchStart:T(x),onTouchMove:w(x),onTouchEnd:y(x)};case hn.Pointer:{const b={onPointerDown:T(x),onPointerMove:w(x),onPointerUp:y(x)};return s&&(b.onPointerLeave=k=>y(x)(k,pn.CancelledOutsideElement)),b}}},[e,y,s,o,w,T]);return ee(()=>{if(!window)return;function x(b){const k=Xu(b);y()(k)}return window.addEventListener("mouseup",x),window.addEventListener("touchend",x),window.addEventListener("pointerup",x),()=>{window.removeEventListener("mouseup",x),window.removeEventListener("touchend",x),window.removeEventListener("pointerup",x)}},[y]),ee(()=>()=>{m.current!==void 0&&clearTimeout(m.current)},[]),ee(()=>{g.current=e},[e]),E}function Qu({poll:e,lang:t,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const[s,a]=Z("default"),{expired:c,expiresAt:l,id:u,multiple:d,options:f,ownVotes:p,voted:h,votersCount:m,votesCount:g,emojis:_}=e,T=!!l&&new Date(l),y=d?m:g;let w=0;y<=1e3?w=0:y<=1e4?w=1:y<=1e5&&(w=2);const[E,x]=Z(!1),b=f.every(k=>k.votesCount!==null);return r("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[E&&b||h||c?r(F,{children:[r("div",{class:"poll-options",children:f.map((k,D)=>{const{title:L,votesCount:A}=k,C=y?A/y:0,R=C?C.toLocaleString(S.locale||void 0,{style:"percent",maximumFractionDigits:w}):"0%",W=A>0&&A===Math.max(...f.map(U=>U.votesCount));return r("div",{class:`poll-option poll-result ${W?"poll-option-leading":""}`,style:{"--percentage":`${C*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(qt,{text:L,emojis:_})}),h&&p.includes(D)&&r(F,{children:[" ",r(M,{icon:"check-circle",alt:S._({id:"IeO7us"})})]})]}),r("div",{class:"poll-option-votes",title:S._({id:"+syLpm",values:{optionVotesCount:A}}),children:R})]},`${D}-${L}-${A}`)})}),!c&&!h&&r("button",{class:"poll-vote-button plain2",disabled:s==="loading",onClick:k=>{k.preventDefault(),x(!1)},children:[r(M,{icon:"arrow-left",size:"s"})," ",r(O,{id:"L96xSt"})]})]}):r("form",{onSubmit:async k=>{k.preventDefault();const D=k.target,L=new FormData(D),A=[];L.forEach((C,R)=>{R==="poll"&&A.push(C)}),A.length&&(a("loading"),await i(A),a("default"))},children:[r("div",{class:"poll-options",children:f.map((k,D)=>{const{title:L}=k;return r("div",{class:"poll-option",children:r("label",{class:"poll-label",children:[r("input",{type:d?"checkbox":"radio",name:"poll",value:D,disabled:s==="loading",readOnly:n}),r("span",{class:"poll-option-title",children:r(qt,{text:L,emojis:_})})]})})})}),!n&&r("button",{class:"poll-vote-button",type:"submit",disabled:s==="loading",children:r(O,{id:"lQXQKs"})})]}),r("p",{class:"poll-meta",children:[!c&&!n&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:k=>{k.preventDefault(),a("loading"),(async()=>(await o(),a("default")))()},title:S._({id:"lCF0wC"}),children:r(M,{icon:"refresh",alt:S._({id:"lCF0wC"})})}),!h&&!c&&!n&&b&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:k=>{k.preventDefault(),x(!E)},title:E?S._({id:"L96xSt"}):S._({id:"zCjei3"}),children:[r(M,{icon:E?"eye-open":"eye-close",alt:E?S._({id:"L96xSt"}):S._({id:"zCjei3"})})," "]}),!c&&!n&&" ",r(O,{id:"k7v0Rh",values:{0:rt(g),1:rt(g),votesCount:g},components:{0:r("span",{title:g}),1:r("span",{title:g})}}),!!m&&m!==g&&r(F,{children:[" ","•"," ",r(O,{id:"jf1i1L",values:{0:rt(m),1:rt(m),votersCount:m},components:{0:r("span",{title:m}),1:r("span",{title:m})}})]})," ","•"," ",c?T?r(O,{id:"5LwCCI",components:{0:r(at,{datetime:T})}}):S._({id:"237hSL"}):T?r(O,{id:"ooHDPY",components:{0:r(at,{datetime:T})}}):S._({id:"O2tNG0"})]})]})}const Zs=lt();function Ju(e,t){if(!(e!=null&&e.length))return!1;const n=e.filter(s=>{const{filter:a}=s,c=a.context.includes(t);return c?a.expiresAt?new Date(a.expiresAt)>new Date:c:!1});if(!n.length)return!1;if(n.some(s=>s.filter.filterAction==="hide"))return{action:"hide"};if(n.some(s=>s.filter.filterAction==="warn")){const s=n.map(a=>a.filter.title);return{action:"warn",titles:s,titlesStr:s.join(" • ")}}return!1}const Cr=Oe(Ju);function ed(e,t,n){var a;const{filtered:o}=e;if(!(o!=null&&o.length)||n&&((a=e.account)==null?void 0:a.id)===n)return!0;const s=Cr(o,t);return s?s.action!=="hide":!0}function nh(e,t){if(!(e!=null&&e.length))return[];if(!t)return e;const n=vr();return e.filter(o=>ed(o,t,n))}const Uo=document.createElement("div");function jo(e){return e?(Uo.innerHTML=e,Uo.querySelectorAll(".invisible").forEach(t=>{t.remove()}),Uo.innerText.length):0}const mn="speechSynthesis"in window;function ki(e,t){if(mn)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(e);t&&(n.lang=t),speechSynthesis.speak(n)}catch(n){alert(n)}}function Gs(e){var a;const{spoilerText:t,content:n,poll:o,mediaAttachments:i}=e;let s="";return t!=null&&t.trim()?s+=t:s+=_o(n),s=s.trim(),(a=o==null?void 0:o.options)!=null&&a.length&&(s+=`
|
||
|
||
📊:
|
||
${o.options.map(c=>`${o.multiple?"▪️":"•"} ${c.title}`).join(`
|
||
`)}`),i!=null&&i.length&&(s+=" "+i.map(c=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[c.type]||"").join("")),s}function td(e,t,n){var o=this,i=$(null),s=$(0),a=$(null),c=$([]),l=$(),u=$(),d=$(e),f=$(!0);d.current=e;var p=typeof window<"u",h=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var m=!!(n=n||{}).leading,g=!("trailing"in n)||!!n.trailing,_="maxWait"in n,T="debounceOnServer"in n&&!!n.debounceOnServer,y=_?Math.max(+n.maxWait||0,t):null;ee(function(){return f.current=!0,function(){f.current=!1}},[]);var w=ae(function(){var E=function(A){var C=c.current,R=l.current;return c.current=l.current=null,s.current=A,u.current=d.current.apply(R,C)},x=function(A,C){h&&cancelAnimationFrame(a.current),a.current=h?requestAnimationFrame(A):setTimeout(A,C)},b=function(A){if(!f.current)return!1;var C=A-i.current;return!i.current||C>=t||C<0||_&&A-s.current>=y},k=function(A){return a.current=null,g&&c.current?E(A):(c.current=l.current=null,u.current)},D=function A(){var C=Date.now();if(b(C))return k(C);if(f.current){var R=t-(C-i.current),W=_?Math.min(R,y-(C-s.current)):R;x(A,W)}},L=function(){if(p||T){var A=Date.now(),C=b(A);if(c.current=[].slice.call(arguments),l.current=o,i.current=A,C){if(!a.current&&f.current)return s.current=i.current,x(D,t),m?E(i.current):u.current;if(_)return x(D,t),E(i.current)}return a.current||x(D,t),u.current}};return L.cancel=function(){a.current&&(h?cancelAnimationFrame(a.current):clearTimeout(a.current)),s.current=0,c.current=i.current=l.current=a.current=null},L.isPending=function(){return!!a.current},L.flush=function(){return a.current?k(Date.now()):u.current},L},[m,_,t,y,g,h,p,T]);return w}function nd(e,t,n){var o=n===void 0?{}:n,i=o.leading,s=o.trailing;return td(e,t,{maxWait:t,leading:i===void 0||i,trailing:s===void 0||s})}function od(e,t){var n=$(null),o=$(null);o.current=t;var i=$(null);ee(function(){s()});var s=Me(function(){var a=i.current,c=o.current,l=a||(c?c instanceof Element?c:c.current:null);n.current&&n.current.element===l&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:e,cleanup:l?e(l):void 0})},[e]);return ee(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),Me(function(a){i.current=a,s()},[s])}function Ii(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function rd(e){e===void 0&&(e={});var t=e.onResize,n=$(void 0);n.current=t;var o=e.round||Math.round,i=$(),s=Z({width:void 0,height:void 0}),a=s[0],c=s[1],l=$(!1);ee(function(){return l.current=!1,function(){l.current=!0}},[]);var u=$({width:void 0,height:void 0}),d=od(Me(function(f){return(!i.current||i.current.box!==e.box||i.current.round!==o)&&(i.current={box:e.box,round:o,instance:new ResizeObserver(function(p){var h=p[0],m=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=Ii(h,m,"inlineSize"),_=Ii(h,m,"blockSize"),T=g?o(g):void 0,y=_?o(_):void 0;if(u.current.width!==T||u.current.height!==y){var w={width:T,height:y};u.current.width=T,u.current.height=y,n.current?n.current(w):l.current||c(w)}})}),i.current.instance.observe(f,{box:e.box}),function(){i.current&&i.current.instance.unobserve(f)}},[e.box,o]),e.ref);return ae(function(){return{ref:d,width:a.width,height:a.height}},[d,a.width,a.height])}function ro({className:e="truncated"}={}){const t=$(),n=nd(({height:o})=>{if(t.current){const{scrollHeight:i}=t.current;let s=i>o;if(s){const{height:a,maxHeight:c}=getComputedStyle(t.current),l=parseInt(c||a,10);s=i>l}t.current.classList.toggle(e,s)}},300);return rd({ref:t,box:"border-box",onResize:n}),t}const _n={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"};var qs="kvfysmfp",Ys="ufhsfnkm",id=".".concat(qs,"{overflow:hidden;touch-action:none}.").concat(Ys,"{transform-origin: 0 0}"),sd=typeof window>"u",ad=function(){return!sd&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var cd=function(e){var t=e.x,n=e.y,o=e.scale;return"scale3d(".concat(o,",").concat(o,", 1) translate3d(").concat(t,"px, ").concat(n,"px, 0)")};var ld=Math.min,ud=Math.max;function Ai(e){var t=e.containerDimension,n=e.childDimension,o=e.padding,i=e.centerContained,s=n-t;return s+2*o<=0&&i?[s/2,s/2]:[ld(s+o,0)-o,ud(0,s+o)]}var Ci=function(e,t){return t?"".concat(e," ").concat(t):e},Xn=Math.abs,dd=Math.min,fd=Math.sqrt,Xs=typeof window>"u",hd=Xs?!1:/(Mac)/i.test(navigator.platform),Vt=function(e){return e==="drag"},un=function(e){return e==="zoom"},pd=function(e){return hd&&e.ctrlKey},dn=function(e){e.stopPropagation(),e.preventDefault()},Pi=function(e,t){var n=e.x-t.x,o=e.y-t.y;return fd(n*n+o*o)},md=function(e,t){var n=Pi(e[0],e[1]),o=Pi(t[0],t[1]);return o/n},gd=function(e,t){return e>t-.01&&e<t+.01},vd=function(e){return-Math.cos(e*Math.PI)/2+.5},_d=function(e){return{x:e.pageX,y:e.pageY}},Qn=function(e){return Array.from(e).map(_d)},Li=function(e,t){return e+t},yd=function(e){return{x:e.map(function(t){var n=t.x;return n}).reduce(Li,0)/e.length,y:e.map(function(t){var n=t.y;return n}).reduce(Li,0)/e.length}},Ko=function(e,t,n){return n<e?e:n>t?t:n},bd=function(e){return!(e.ctrlKey||e.metaKey)},Td=function(e){if(e){var t=e.offsetWidth,n=e.offsetHeight;if(t&&n)return{width:t,height:n};var o=getComputedStyle(e),i=parseFloat(o.width),s=parseFloat(o.height);if(s&&i)return{width:i,height:s}}return{width:0,height:0}},wd=function(e,t){return{x:t.x-e.x,y:t.y-e.y}},Ed=function(e,t){return e.x===t.x&&e.y===t.y},kt=function(){},Jn={x:0,y:0},Mi=function(e){Ra(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n._prevDragMovePoint=null,n._containerObserver=null,n._fingers=0,n._firstMove=!0,n._initialOffset=Ne({},Jn),n._interaction=null,n._isDoubleTap=!1,n._isOffsetsSet=!1,n._lastDragPosition=null,n._lastScale=1,n._lastTouchStart=0,n._lastZoomCenter=null,n._listenMouseMove=!1,n._nthZoom=0,n._offset=Ne({},Jn),n._startOffset=Ne({},Jn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=Ne({},Jn),n._ignoreNextClick=!1,n._containerRef=Oa(),n._handleClick=function(o){n._ignoreNextClick&&(n._ignoreNextClick=!1,o.stopPropagation())},n._onResize=function(){var o;!((o=n._containerRef)===null||o===void 0)&&o.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(o){n._fingers=o.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(un(n._interaction)||Vt(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&dn(o),Vt(n._interaction)&&!n._enoughToDrag()&&n._handleClick(o),n._updateInteraction(o)}),n._handlerOnTouchStart=n._handlerIfEnable(function(o){n._firstMove=!0,n._fingers=o.touches.length,n._detectDoubleTap(o)}),n._handlerOnTouchMove=n._handlerIfEnable(function(o){n._isDoubleTap||(n._collectInertia(o),n._firstMove?(n._updateInteraction(o),n._interaction&&dn(o),n._startOffset=Ne({},n._offset),n._startTouches=Qn(o.touches)):(un(n._interaction)?n._startTouches&&n._startTouches.length===2&&o.touches.length===2&&n._handleZoom(o,md(n._startTouches,Qn(o.touches))):Vt(n._interaction)&&n._handleDrag(o),n._interaction&&(dn(o),n._update())),n._firstMove=!1)}),n._handlerWheel=function(o){if(!n.props.shouldInterceptWheel(o)){dn(o);var i=o.pageX,s=o.pageY,a=o.deltaY,c=o.deltaMode,l=1;(pd(o)||c===1)&&(l=15);var u={touches:[{pageX:i,pageY:s}]},d=n._getOffsetByFirstTouch(u),f=a*l;n._stopAnimation(),n._scaleTo(n._zoomFactor-f/n.props.wheelScaleFactor,d),n._update(),clearTimeout(n._wheelTimeOut),n._wheelTimeOut=setTimeout(function(){return n._sanitize()},100)}},n._handlers=n.props.isTouch()?[["touchstart",n._handlerOnTouchStart],["touchend",n._handlerOnTouchEnd],["touchmove",n._handlerOnTouchMove]]:[["mousemove",n.simulate(n._handlerOnTouchMove),n.props._document],["mouseup",n.simulate(n._handlerOnTouchEnd),n.props._document],["mousedown",n.simulate(n._handlerOnTouchStart)],["click",n._handleClick],["wheel",n._handlerWheel]],n}return t.prototype._handleDragStart=function(n){this._ignoreNextClick=!0,this.props.onDragStart(),this._stopAnimation(),this._resetInertia(),this._lastDragPosition=null,this._hasInteraction=!0,this._draggingPoint=this._offset,this._handleDrag(n)},t.prototype._handleDrag=function(n){var o=this._getOffsetByFirstTouch(n);this._enoughToDrag()?this._drag(o,this._lastDragPosition):this._virtualDrag(o,this._lastDragPosition),this._offset=this._sanitizeOffset(this._offset),this._lastDragPosition=o},t.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},t.prototype._realizeInertia=function(){var n=this,o=this.props,i=o.inertiaFriction,s=o.inertia;if(!(!s||!this._velocity)){var a=this._velocity,c=a.x,l=a.y;if(c||l){this._stopAnimation(),this._resetInertia();var u=function(){if(c*=i,l*=i,!c&&!l)return n._stopAnimation();var d=Ne({},n._offset);if(n._addOffset({x:c,y:l}),n._offset=n._sanitizeOffset(n._offset),Ed(d,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(u,{duration:9999})}}},t.prototype._collectInertia=function(n){var o=n.touches;if(this.props.inertia){var i=Qn(o)[0],s=this._prevDragMovePoint;s&&(this._velocity=wd(i,s)),this._prevDragMovePoint=i}},t.prototype._handleDragEnd=function(){this.props.onDragEnd(),this._end(),this._realizeInertia()},t.prototype._handleZoomStart=function(){this.props.onZoomStart(),this._stopAnimation(),this._lastScale=1,this._nthZoom=0,this._lastZoomCenter=null,this._hasInteraction=!0},t.prototype._handleZoom=function(n,o){var i=yd(this._getOffsetTouches(n)),s=o/this._lastScale;this._lastScale=o,this._nthZoom+=1,this._nthZoom>3&&(this._scale(s,i),this._drag(i,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=i},t.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},t.prototype._handleDoubleTap=function(n){var o=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var i=this.props.doubleTapZoomOutOnMaxScale&&this._zoomFactor===this.props.maxZoom||this.props.doubleTapToggleZoom&&this._zoomFactor>1;this.props.onDoubleTap(),this._ignoreNextClick=!0;var s=this._zoomFactor+this.props.tapZoomFactor,a=this._zoomFactor,c=function(u){o._scaleTo(a+u*(s-a),l)},l=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,a>s&&(l=this._getCurrentZoomCenter()),i?this._zoomOutAnimation():this._animate(c)}},t.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=o.width,s=o.height,a=-Xn(i*this._getInitialZoomFactor()-n.width)/2,c=-Xn(s*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:a,y:c}},t.prototype._resetOffset=function(){this._offset=Ne({},this._initialOffset)},t.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},t.prototype._sanitizeOffset=function(n){var o=this._getContainerRect(),i=this._getChildSize(),s=i.width,a=i.height,c=s*this._getInitialZoomFactor()*this._zoomFactor,l=a*this._getInitialZoomFactor()*this._zoomFactor,u=Ai({containerDimension:o.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),d=u[0],f=u[1],p=Ai({containerDimension:o.height,childDimension:l,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),h=p[0],m=p[1];return{x:Ko(d,f,n.x),y:Ko(h,m,n.y)}},t.prototype.alignCenter=function(n){var o=this,i=Ne({duration:250,animated:!0},n),s=i.x,a=i.y,c=i.scale,l=i.animated,u=i.duration,d=s*this._initialZoomFactor,f=a*this._initialZoomFactor,p=this._zoomFactor,h=Ne({},this._offset),m=this._getContainerRect(),g={x:m.width/2,y:m.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-d),y:-(g.y-f)},this._scaleTo(c,g),this._stopAnimation(),!l)return this._update();var _=this._zoomFactor-p,T={x:this._offset.x-h.x,y:this._offset.y-h.y};this._zoomFactor=p,this._offset=Ne({},h);var y=function(w){var E=h.x+T.x*w,x=h.y+T.y*w;o._zoomFactor=p+_*w,o._offset=o._sanitizeOffset({x:E,y:x}),o._update()};this._animate(y,{callback:function(){return o._sanitize()},duration:u})},t.prototype.scaleTo=function(n){var o=this,i=Ne({duration:250,animated:!0},n),s=i.x,a=i.y,c=i.scale,l=i.animated,u=i.duration,d=this._zoomFactor,f=Ne({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(c,{x:s,y:a}),this._stopAnimation(),!l)return this._update();var p=this._zoomFactor-d,h={x:this._offset.x-f.x,y:this._offset.y-f.y};this._zoomFactor=d,this._offset=Ne({},f);var m=function(g){var _=f.x+h.x*g,T=f.y+h.y*g;o._zoomFactor=d+p*g,o._offset={x:_,y:T},o._update()};this._animate(m,{callback:function(){return o._sanitize()},duration:u})},t.prototype._scaleTo=function(n,o){this._scale(n/this._zoomFactor,o),this._offset=this._sanitizeOffset(this._offset)},t.prototype._scale=function(n,o){n=this._scaleZoomFactor(n),this._addOffset({x:(n-1)*(o.x+this._offset.x),y:(n-1)*(o.y+this._offset.y)}),this.props.onZoomUpdate()},t.prototype._scaleZoomFactor=function(n){var o=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=Ko(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/o},t.prototype._canDrag=function(){return this.props.draggableUnZoomed||!gd(this._zoomFactor,1)},t.prototype._drag=function(n,o){if(o){var i=-(n.y-o.y),s=-(n.x-o.x);this.props.lockDragAxis?Xn(s)>Xn(i)?this._addOffset({x:s,y:0}):this._addOffset({y:i,x:0}):this._addOffset({x:s,y:i}),this.props.onDragUpdate()}},t.prototype._virtualDrag=function(n,o){if(o){var i=-(n.y-o.y),s=-(n.x-o.x);this._draggingPoint={x:s+this._draggingPoint.x,y:i+this._draggingPoint.y}}},t.prototype._addOffset=function(n){var o=this._offset,i=o.x,s=o.y;this._offset={x:i+n.x,y:s+n.y}},t.prototype._sanitize=function(){this._zoomFactor<this.props.zoomOutFactor?(this._resetInertia(),this._zoomOutAnimation()):this._isInsaneOffset()&&this._sanitizeOffsetAnimation()},t.prototype._isInsaneOffset=function(){var n=this._offset,o=this._sanitizeOffset(n);return o.x!==n.x||o.y!==n.y},t.prototype._sanitizeOffsetAnimation=function(){var n=this,o=this._sanitizeOffset(this._offset),i=Ne({},this._offset),s=function(a){var c=i.x+a*(o.x-i.x),l=i.y+a*(o.y-i.y);n._offset={x:c,y:l},n._update()};this._animate(s)},t.prototype._zoomOutAnimation=function(){var n=this;if(this._zoomFactor!==1){var o=this._zoomFactor,i=1,s=this._getCurrentZoomCenter(),a=function(c){var l=o+c*(i-o);n._scaleTo(l,s)};this._animate(a)}},t.prototype._getInitialZoomFactor=function(){return this._initialZoomFactor},t.prototype._getCurrentZoomCenter=function(){var n=this._offset,o=n.x,i=n.y,s=o-this._initialOffset.x,a=i-this._initialOffset.y;return{x:-1*o-s/(1/this._zoomFactor-1),y:-1*i-a/(1/this._zoomFactor-1)}},t.prototype._getOffsetByFirstTouch=function(n){return this._getOffsetTouches(n)[0]},t.prototype._getOffsetTouches=function(n){var o=this.props._document,i=o.documentElement,s=o.body,a=this._getContainerRect(),c=a.top,l=a.left,u=i.scrollTop||s.scrollTop,d=i.scrollLeft||s.scrollLeft,f=c+u,p=l+d;return Qn(n.touches).map(function(h){var m=h.x,g=h.y;return{x:m-p,y:g-f}})},t.prototype._animate=function(n,o){var i=this,s=new Date().getTime(),a=Ne({timeFn:vd,callback:function(){},duration:this.props.animationDuration},o),c=a.timeFn,l=a.callback,u=a.duration,d=function(){if(i._inAnimation){var f=new Date().getTime()-s,p=f/u;f>=u?(n(1),i._stopAnimation(),l(),i._update()):(p=c(p),n(p),i._update({isAnimation:!0}),requestAnimationFrame(d))}};this._inAnimation=!0,requestAnimationFrame(d)},t.prototype._stopAnimation=function(){this._inAnimation=!1},t.prototype._end=function(){this._hasInteraction=!1,this._sanitize(),this._update()},t.prototype._getContainerRect=function(){var n=this._containerRef.current;return n.getBoundingClientRect()},t.prototype._getChildSize=function(){var n=this._containerRef.current;return Td(n==null?void 0:n.firstElementChild)},t.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=n.width/o.width,s=n.height/o.height;this._initialZoomFactor=dd(i,s)},t.prototype._bindEvents=function(){var n=this,o=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(o)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(i){var s=i[0],a=i[1],c=i[2];(c||o).addEventListener(s,a,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.addEventListener("load",n._onResize)})},t.prototype._unSubscribe=function(){var n=this,o=this._containerRef.current;this._containerObserver&&(this._containerObserver.disconnect(),this._containerObserver=null),window.removeEventListener("resize",this._onResize),this._handlers.forEach(function(i){var s=i[0],a=i[1],c=i[2];(c||o).removeEventListener(s,a,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.removeEventListener("load",n._onResize)})},t.prototype._update=function(n){var o=this;if(!this._updatePlaned){var i=function(){var s=o._getInitialZoomFactor()*o._zoomFactor,a=-o._offset.x/s,c=-o._offset.y/s;o.props.onUpdate({scale:s,x:a,y:c})};if(n!=null&&n.isAnimation)return i();this._updatePlaned=!0,requestAnimationFrame(function(){o._updatePlaned=!1,i()})}},t.prototype._handlerIfEnable=function(n){var o=this;return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];o.props.enabled&&n.apply(void 0,i)}},t.prototype._setInteraction=function(n,o){var i=this._interaction;i!==n&&(i&&!n&&(un(i)?this._handleZoomEnd():Vt(i)&&this._handleDragEnd()),un(n)?this._handleZoomStart():Vt(n)&&this._handleDragStart(o)),this._interaction=n},t.prototype._distanceBetweenNumbers=function(n,o){return n>o?n-o:o-n},t.prototype._enoughToDrag=function(){return this._distanceBetweenNumbers(this._startOffset.x,this._draggingPoint.x)>5||this._distanceBetweenNumbers(this._startOffset.y,this._draggingPoint.y)>5},t.prototype._updateInteraction=function(n){var o=this._fingers;if(o===2)return this._setInteraction("zoom",n);if(o===1&&this._canDrag())return this._setInteraction("drag",n);this._setInteraction(null,n)},t.prototype._detectDoubleTap=function(n){var o=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),o-this._lastTouchStart<300?(dn(n),this._handleDoubleTap(n),un(this._interaction)?this._handleZoomEnd():Vt(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=o)},t.prototype.simulate=function(n){var o=this;return function(i){var s=i.pageX,a=i.pageY,c=i.type,l=c==="mouseup",u=c==="mousedown";u&&(i.preventDefault(),o._listenMouseMove=!0),o._listenMouseMove&&(i.touches=l?[]:[{pageX:s,pageY:a}],n(i)),l&&(o._listenMouseMove=!1)}},t.prototype.componentDidMount=function(){this._bindEvents(),this._update()},t.prototype.componentWillUnmount=function(){this._stopAnimation(),this._unSubscribe()},t.prototype.render=function(){var n=this.props,o=n.children,i=n.containerProps,s=Da.only(o),a=i||{};return Un.createElement(Un.Fragment,null,Un.createElement("style",null,id),Un.createElement("div",Ne({},a,{ref:this._containerRef,className:Ci(qs,a.className)}),Ki(s,{className:Ci(Ys,s.props.className)})))},t.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:ad,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:kt,onDragEnd:kt,onDragStart:kt,onDragUpdate:kt,onZoomEnd:kt,onZoomStart:kt,onZoomUpdate:kt,setOffsetsOnce:!1,shouldInterceptWheel:bd,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:Xs?null:window.document},t}(Zi);if(0)var oh,rh,ih,sh,ah,ch,lh;function Wo(e){if(!e)return;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=Math.round(e%60);return t===0?`${n}:${o.toString().padStart(2,"0")}`:`${t}:${n.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}const xd=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Sd="ALT",Zo=e=>{const{alt:t,lang:n,index:o,...i}=e;return!t||!t.trim()?null:r("button",{type:"button",class:"alt-badge clickable",...i,onClick:s=>{s.stopPropagation(),s.preventDefault(),B.showMediaAlt={alt:t,lang:n}},title:S._({id:"5gfDMm"}),children:[Sd,!!o&&r("sup",{children:o})]})},kd=140,Id=280,Qs=Oe(e=>e!=null&&e.length?e.length>kd||/[\n\r].*[\n\r]/.test(e.trim()):!1);function Ad({class:e="",media:t,to:n,lang:o,showOriginal:i,autoAnimate:s,showCaption:a,allowLongerCaption:c,altIndex:l,checkAspectRatio:u=!0,onClick:d=()=>{}}){let{blurhash:f,description:p,meta:h,previewRemoteUrl:m,previewUrl:g,remoteUrl:_,url:T,type:y}=t;/no\-preview\./i.test(g)&&(g=null);const{original:w={},small:E,focus:x}=h||{},b=i?w==null?void 0:w.width:(E==null?void 0:E.width)||(w==null?void 0:w.width),k=i?w==null?void 0:w.height:(E==null?void 0:E.height)||(w==null?void 0:w.height),D=i?T:g||T,L=i?_:m||_,A=b&&k,C=A?b>k?"landscape":"portrait":null,R=f?Ar(f):null,W=$();let U;if(x){const V=(x.x+1)/2*100,le=(1-x.y)/2*100;U=`${V.toFixed(0)}% ${le.toFixed(0)}%`}const oe=$(),Q=Me(({x:V,y:le,scale:z})=>{const{current:J}=oe;if(J){const Y=cd({x:V,y:le,scale:z});z===1?J.style.removeProperty("transform"):J.style.setProperty("transform",Y),J.closest(".media-zoom").style.touchAction=z<=1.01?"pan-x":""}},[]),[re,q]=Z(!1),ie={enabled:re,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:Q},ce=ae(()=>n?V=>r(Gt,{to:n,...V}):"div",[n]),se=L?Cd(L):null,H=y==="unknown"&&se&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(se.pathname),fe=y==="unknown"&&se&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(se.pathname),ne=y==="image"||y==="unknown"&&g&&!H&&!fe,Ee=$(),[ye,xe]=Z(!1);Zt(()=>{if(!ne||!i||!Ee.current)return;const{offsetWidth:V,offsetHeight:le}=Ee.current,z=b<V&&k<le;z&&xe(z)},[b,k]);const De=window.innerHeight*(C==="portrait"?.45:.33),Ie=C==="portrait"?0:160,$e={"--average-color":R&&`rgb(${R.join(",")})`},Ce=b&&k?{"--width":`${b}px`,"--height":`${k}px`,"--aspectWidth":`${b/k*Math.max(Ie,De)}px`,aspectRatio:`${b} / ${k}`,...$e}:{...$e},he=Qs(p);let N=!!a&&!i&&!!p&&!he;c&&!N&&(p==null?void 0:p.length)<=Id&&(N=!0);const ge=N?V=>{const{children:le,...z}=V;return r("figure",{...z,children:[le,r("figcaption",{class:"media-caption",lang:o,dir:"auto",onClick:J=>{J.preventDefault(),J.stopPropagation(),B.showMediaAlt={alt:p,lang:o}},children:p})]})}:F,[Ge,Lt]=Z(void 0);if(ne)return ie.containerProps.style.display="inherit",Zt(()=>{xd&&i&&(async()=>{try{await fetch(D,{mode:"no-cors"}),oe.current.src=D}catch{}})()},[D]),r(ge,{children:r(ce,{ref:Ee,class:`media media-image ${e}`,onClick:d,"data-orientation":C,"data-has-alt":!N||void 0,"data-has-natural-aspect-ratio":Ge||void 0,style:i?{backgroundImage:`url(${g})`,backgroundSize:ye?`${b}px ${k}px`:void 0,...$e}:Ce,children:i?r(Mi,{...ie,children:r("img",{ref:oe,src:D,alt:p,width:b,height:k,"data-orientation":C,loading:"eager",decoding:"sync",onLoad:V=>{V.target.closest(".media-image").style.backgroundImage="",V.target.closest(".media-zoom").style.display="",q(!0)},onError:V=>{const{src:le}=V.target;le===D&&L&&D!==L&&(V.target.src=L)}})}):r(F,{children:[r("img",{src:D,alt:N?"":p,width:b,height:k,"data-orientation":C,loading:"lazy",style:{objectPosition:U||"center","--anim-duration":`${Math.min(Math.max(Math.max(b,k)/100,5),120)}s`},onLoad:V=>{V.target.dataset.loaded=!0;const le=V.target.closest(".media");if(!A&&le){const{naturalWidth:z,naturalHeight:J}=V.target;le.dataset.orientation=z>J?"landscape":"portrait",le.style.setProperty("--width",`${z}px`),le.style.setProperty("--height",`${J}px`),le.style.aspectRatio=`${z}/${J}`}if(u&&le){const{clientWidth:z,clientHeight:J,naturalWidth:Y,naturalHeight:be}=V.target;if(z&&J&&Y&&be)if(Y<88||be<88)le.dataset.hasSmallDimension=!0;else{const pe=be*z/Y;Math.abs(pe-J)<5&&Lt(!0)}}},onError:V=>{const{src:le}=V.target;le===D&&D!==L&&(V.target.src=L)}}),!N&&r(Zo,{alt:p,lang:o,index:l})]})})});if(y==="gifv"||y==="video"||H){const V=w.duration>0,le=w.duration<31,z=y==="gifv"&&le,J=w.duration<61,Y=Wo(w.duration),be=!i&&!s&&z,te=!i&&s&&z,pe=w.duration>5,Mt=`
|
||
<video
|
||
src="${T}"
|
||
poster="${g}"
|
||
width="${b}"
|
||
height="${k}"
|
||
data-orientation="${C}"
|
||
preload="auto"
|
||
autoplay
|
||
muted
|
||
playsinline
|
||
${J?"loop":""}
|
||
ondblclick="this.paused ? this.play() : this.pause()"
|
||
${pe?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
|
||
></video>
|
||
`,Be=`
|
||
<video
|
||
src="${T}"
|
||
poster="${g}"
|
||
width="${b}"
|
||
height="${k}"
|
||
data-orientation="${C}"
|
||
preload="auto"
|
||
autoplay
|
||
playsinline
|
||
${J?"loop":""}
|
||
controls
|
||
></video>
|
||
`;return r(ge,{children:r(ce,{class:`media ${e} media-${z?"gif":"video"} ${te?"media-contain":""} ${be?"media-hover-animate":""}`,"data-orientation":C,"data-formatted-duration":i?void 0:Y,"data-label":z&&!i&&!te?"GIF":void 0,"data-has-alt":!N||void 0,style:!i&&Ce,onClick:Ae=>{if(be)try{W.current.pause()}catch{}d(Ae)},onMouseEnter:()=>{if(be)try{W.current.play()}catch{}},onMouseLeave:()=>{if(be)try{W.current.pause()}catch{}},onFocus:()=>{if(be)try{W.current.play()}catch{}},onBlur:()=>{if(be)try{W.current.pause()}catch{}},children:[i||te?z&&i?r(Mi,{...ie,enabled:!0,children:r("div",{ref:oe,dangerouslySetInnerHTML:{__html:Mt}})}):z?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Mt}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Be}}):z?r("video",{ref:W,src:T,poster:g,width:b,height:k,"data-orientation":C,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:pe?Ae=>{const{target:Pe}=Ae,ve=Pe==null?void 0:Pe.closest(".media-gif");if(ve){const Le=Pe.currentTime/Pe.duration*100;ve.style.setProperty("--progress",`${Le}%`)}}:void 0}):r(F,{children:[g?r("img",{src:g,alt:N?"":p,width:b,height:k,"data-orientation":C,loading:"lazy",decoding:"async",onLoad:Ae=>{if(!A){const Pe=Ae.target.closest(".media");if(Pe){const{naturalHeight:ve,naturalWidth:Le}=Ae.target;Pe.dataset.orientation=Le>ve?"landscape":"portrait",Pe.style.setProperty("--width",`${Le}px`),Pe.style.setProperty("--height",`${ve}px`),Pe.style.aspectRatio=`${Le}/${ve}`}}}}):r("video",{src:T+"#t=0.1",width:b,height:k,"data-orientation":C,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:Ae=>{if(!V){const{duration:Pe}=Ae.target;if(Pe){const ve=Wo(Pe),Le=Ae.target.closest(".media-video");Le&&(Le.dataset.formattedDuration=ve)}}}}),r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})})]}),!i&&!N&&r(Zo,{alt:p,lang:o,index:l})]})})}else if(y==="audio"||fe){const V=Wo(w.duration);return r(ge,{children:r(ce,{class:`media media-audio ${e}`,"data-formatted-duration":i?void 0:V,"data-has-alt":!N||void 0,onClick:d,style:!i&&Ce,children:[i?r("audio",{src:_||T,preload:"none",controls:!0,autoPlay:!0}):g?r("img",{src:g,alt:N?"":p,width:b,height:k,"data-orientation":C,loading:"lazy",onError:le=>{var z,J;try{(J=(z=le.target)==null?void 0:z.remove)==null||J.call(z)}catch{}}}):null,!i&&r(F,{children:[r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})}),!N&&r(Zo,{alt:p,lang:o,index:l})]})]})})}}function Cd(e){return URL.parse(e,location.origin)}const cr=Jt(Ad,(e,t)=>{const n=e.media||{},o=t.media||{};return(n==null?void 0:n.id)===(o==null?void 0:o.id)&&n.url===o.url&&e.to===t.to&&e.class===t.class}),Pd=280,Ld=140,Md=Gi({limit:1,interval:1e3});function Rd(e,t){return t.v1.accounts.$select(e).fetch()}const Od=mo(Md(Rd)),At={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"WDcQq9"},private:{id:"o34OrG"},direct:{id:"IV4QaU"}},Dd=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),$d=new Intl.RelativeTimeFormat,Ri=80;function Nd(e){var t;return(t=e==null?void 0:e.options)!=null&&t.length?`📊:
|
||
${e.options.map(n=>`- ${n.title}${n.votesCount>=0?` (${n.votesCount})`:""}`).join(`
|
||
`)}`:""}function Go(e){const{spoilerText:t,content:n,poll:o}=e;return(t?`${t}
|
||
|
||
`:"")+_o(n)+Nd(o)}function Fd(e){return!e||(e=e.trim(),!e)?!1:!!_o(e,{preProcess:n=>{for(const o of n.querySelectorAll(".mention, pre, code, a:has(.invisible)"))o.remove()}})}function zd(e){return _o(e,{preProcess:t=>{for(const n of t.querySelectorAll(".mention, .hashtag, pre, code, a:has(.invisible)"))n.remove();for(const n of t.querySelectorAll("a")){const o=n.innerText.trim();(o.startsWith("https://")||o.startsWith("http://"))&&n.remove()}}})}const Vd=/^http/i,Oi=({post:e,instance:t,previewMode:n})=>{const{content:o,emojis:i,language:s,mentions:a,url:c}=e,l=$();return Zt(()=>{if(!l.current)return;const u=Ps(o,{emojis:i,returnDOM:!0});for(const d of u.querySelectorAll('a.u-url[target="_blank"]'))Vd.test(d.innerText.trim())||d.removeAttribute("target");l.current.replaceChildren(u.cloneNode(!0))},[o,i.length]),r("div",{ref:l,lang:s,dir:"auto",class:"inner-content",onClick:nu({mentions:a,instance:t,previewMode:n,statusURL:c})})},Hd={s:"small",m:"medium",l:"large"},Bd=mo(async e=>{const{detectAll:t}=await I(async()=>{const{detectAll:i}=await import("./tinyld-light-tbgyvj3S.js");return{detectAll:i}},[],import.meta.url);if(e=e==null?void 0:e.trim(),(e==null?void 0:e.length)>500)return null;const o=t(e)[0];return o!=null&&o.lang&&(o==null?void 0:o.accuracy)>.5?o.lang:null}),yn={id:"8fZueG"},lr={},Di=(e,t=[])=>{if(!e)return!1;const n=ys(!0),o=e!==n&&!bn([e],[n])&&!t.find(i=>e===i||bn([e],[i]));return lr[e+t]=!0,o};function Qt({statusID:e,status:t,instance:n,size:o="m",contentTextWeight:i,readOnly:s,enableCommentHint:a,withinContext:c,skeleton:l,enableTranslate:u,forceTranslate:d,previewMode:f,onMediaClick:p,quoted:h,onStatusLinkClick:m=()=>{},showFollowedTags:g,allowContextMenu:_,showActionsBar:T,showReplyParent:y,mediaFirst:w}){var qr,Yr,Xr,Qr;const{_:E}=po();if(l)return r("div",{class:`status skeleton ${w?"status-media-first small":""}`,children:[!w&&r(st,{size:"xxl"}),r("div",{class:"container",children:[r("div",{class:"meta",children:[(o==="s"||w)&&r(st,{size:"m"})," ███ ████████"]}),r("div",{class:"content-container",children:[w&&r("div",{class:"media-first-container"}),r("div",{class:`content ${w?"media-first-content":""}`,children:r("p",{children:"████ ████████"})})]})]})]});const{masto:x,instance:b,authenticated:k}=so({instance:n}),{instance:D}=so(),L=b===D;let A=it(e||(t==null?void 0:t.id),b);const C=In(B);if(t||(t=C.statuses[A]||C.statuses[e],A=it(t==null?void 0:t.id,b)),!t)return null;const{account:{acct:R,avatar:W,avatarStatic:U,id:oe,url:Q,displayName:re,username:q,emojis:ie,bot:ce,group:se},id:H,repliesCount:fe,reblogged:ne,reblogsCount:Ee,favourited:ye,favouritesCount:xe,bookmarked:De,poll:Ie,muted:$e,sensitive:Ce,spoilerText:he,visibility:N,language:ge,editedAt:Ge,filtered:Lt,card:V,createdAt:le,inReplyToId:z,inReplyToAccountId:J,content:Y,mentions:be,mediaAttachments:te,reblog:pe,uri:Mt,url:Be,emojis:Ae,tags:Pe,pinned:ve,_deleted:Le,_pinned:Cn,emojiReactions:dt}=t,[_t,yo]=Z(null);ee(()=>{if(!Y||ge||_t)return;let v;return v=setTimeout(async()=>{let P=await Bd(zd(Y));yo(P)},1e3),()=>clearTimeout(v)},[Y,ge]);const me=ge||_t,Rt=!!(te!=null&&te.length);w&&Rt&&(o="s");const yt=ae(()=>vr(),[]),tt=ae(()=>yt&&yt===oe,[oe,yt]),Pn=ze(Zs),X=!tt&&!s&&!f&&Cr(Lt,Pn);if((X==null?void 0:X.action)==="hide")return null;const _e=v=>{v.shiftKey};if(o!=="l"&&X)return r(Xd,{status:t,filterInfo:X,instance:b,containerProps:{onMouseEnter:_e},showFollowedTags:!0,quoted:h});const Te=new Date(le),He=new Date(Ge);let Se=be==null?void 0:be.find(v=>v.id===J);!Se&&J===H&&(Se={url:Q,username:q,displayName:re});const[nt,Ln]=Z(Se);if(!c&&!nt&&J){const v=B.accounts[J];v?Ln(v):Od(J,x).then(P=>{Ln(P),B.accounts[P.id]=P}).catch(P=>{})}const bt=J===yt||(be==null?void 0:be.find(v=>v.id===yt)),qe=ae(()=>!!(Jr.account.get("preferences")||{})["reading:expand:spoilers"],[]),Mn=ae(()=>{var P;return((P=(Jr.account.get("preferences")||{})["reading:expand:media"])==null?void 0:P.toLowerCase())||"default"},[]),Ue=f||qe||!!C.spoilers[H],Tt=f||Mn==="show_all"||!!C.spoilersMedia[H];if(pe)return se?r("div",{"data-state-post-id":A,class:"status-group",onMouseEnter:_e,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"group",size:"l",alt:S._({id:"L8fEEm"})})," ",r(gt,{account:t.account,instance:b,showAvatar:!0})]}),r(Qt,{status:e?null:pe,statusID:e?pe.id:null,instance:b,size:o,contentTextWeight:i,readOnly:s,mediaFirst:w})]}):r("div",{"data-state-post-id":A,class:"status-reblog",onMouseEnter:_e,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"rocket",size:"l"})," ",r(O,{id:"DlhB4J",components:{0:r(gt,{account:t.account,instance:b,showAvatar:!0}),1:r("span",{})}})]}),r(Qt,{status:e?null:pe,statusID:e?pe.id:null,instance:b,size:o,contentTextWeight:i,readOnly:s,enableCommentHint:!0,mediaFirst:w})]});const bo=Me(({children:v})=>r("div",{"data-state-post-id":A,class:"status-followed-tags",onMouseEnter:_e,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"hashtag",size:"l"})," ",C.statusFollowedTags[A].slice(0,3).map(P=>r(Gt,{to:b?`/${b}/t/${P}`:`/t/${P}`,class:"status-followed-tag-item",children:P},P))]}),v]}),[A,b,C.statusFollowedTags[A]]),wt=g&&((qr=C.statusFollowedTags[A])!=null&&qr.length)?bo:F,de=o==="l",[Et,Ot]=Z(d),{contentTranslation:To,contentTranslationAutoInline:Lr}=C.settings;To||(u=!1);const Mr=ae(()=>{if(!To||!Lr||s||c&&!de||f||he||Ce||Ie||V||te!=null&&te.length)return!1;const v=jo(Y);return v>0&&v<=Ld},[To,Lr,s,c,de,f,he,Ce,Ie,V,te,Y]),[wo,Rn]=Z(!1),[ua,Eo]=Z(!1),Rr=ro(),Or=ro(),da=ro(),Dt=$(null),On=S._({id:"7jyUKe"}),Dr=Me(()=>Math.max(Math.round((he.length+jo(Y))/140)||1,1),[he,Y]),$r=Sn(Te),Nr=Ge&&Sn(He);let nn=k&&N!=="direct"&&N!=="private";N==="private"&&tt&&(nn=!0);const Dn=v=>{var P;if(!L||!k)return alert(On);(v!=null&&v.shiftKey||(P=v==null?void 0:v.syntheticEvent)!=null&&P.shiftKey)&&nc({replyToStatus:t})||Gn({replyToStatus:t})},Fr=ae(()=>te.some(v=>{var P,G;return!((G=(P=v.description)==null?void 0:P.trim)!=null&&G.call(P))}),[te]),zr=ae(()=>Math.floor((new Date-Te)/(1e3*60*60*24*30)),[Te]),xo=async()=>{if(!L||!k)return alert(On),!1;try{if(B.statuses[A]={...t,reblogged:!ne,reblogsCount:Ee+(ne?-1:1)},ne){const v=await x.v1.statuses.$select(H).unreblog();ft(v,b)}else{const v=await x.v1.statuses.$select(H).reblog();ft(v,b)}return!0}catch{return B.statuses[A]=t,!1}},Vr=async()=>{if(!L||!k)return alert(On),!1;try{if(B.statuses[A]={...t,favourited:!ye,favouritesCount:xe+(ye?-1:1)},ye){const v=await x.v1.statuses.$select(H).unfavourite();ft(v,b)}else{const v=await x.v1.statuses.$select(H).favourite();ft(v,b)}return!0}catch{return B.statuses[A]=t,!1}},So=async()=>{try{const v=await Vr();!de&&v&&Re(ye?S._({id:"sZvpIt",values:{0:q||R}}):S._({id:"yUngDO",values:{0:q||R}}))}catch{}},Hr=async()=>{if(Zn("@mastodon/post-bookmark")){if(!L||!k)return alert(On),!1;try{if(B.statuses[A]={...t,bookmarked:!De},De){const v=await x.v1.statuses.$select(H).unbookmark();ft(v,b)}else{const v=await x.v1.statuses.$select(H).bookmark();ft(v,b)}return!0}catch{return B.statuses[A]=t,!1}}},Br=async()=>{try{const v=await Hr();!de&&v&&Re(De?S._({id:"lWQguj",values:{0:q||R}}):S._({id:"Fb2K8h",values:{0:q||R}}))}catch{}},on=C.settings.contentTranslationHideLanguages||[],[$t,fa]=Z(lr[me+on]?Di(me,on):!1);ee(()=>{if(!me||$t||lr[me+on])return;let v=setTimeout(()=>{const P=Di(me,on);P&&fa(P)},1);return()=>clearTimeout(v)},[me,$t,on]);const Ur=$(),jr=$();async function ha(v){var ue,je,Nt,ko;v&&(Ur.current=x.v1.statuses.$select(e).rebloggedBy.list({limit:Ri}),jr.current=x.v1.statuses.$select(e).favouritedBy.list({limit:Ri}));const[{value:P},{value:G}]=await Promise.allSettled([Ur.current.next(),jr.current.next()]);if((ue=P.value)!=null&&ue.length||(je=G.value)!=null&&je.length){const xt=[];return(Nt=P.value)!=null&&Nt.length&&xt.push(...P.value.map(St=>(St._types=["reblog"],St))),(ko=G.value)!=null&&ko.length&&xt.push(...G.value.map(St=>(St._types=["favourite"],St))),{value:xt,done:P.done&&G.done}}return{value:[],done:!0}}const pa=$(),Kr=["public","unlisted"].includes(N),ma=["public","unlisted","private"].includes(N),Wr=r(F,{children:[!de&&L&&r(F,{children:r("div",{class:"menu-control-group-horizontal status-menu",children:[r(ke,{onClick:Dn,children:[r(M,{icon:"comment"}),r("span",{children:fe>0?rt(fe):S._({id:"ImOQa9"})})]}),r(Lo,{subMenu:!0,confirmLabel:r(F,{children:[r(M,{icon:"rocket"}),r("span",{children:ne?S._({id:"QzzGsY"}):S._({id:"kulphB"})})]}),className:`menu-reblog ${ne?"checked":""}`,menuExtras:r(ke,{onClick:()=>{Gn({draftStatus:{status:`
|
||
${Be}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:Fr&&!ne?r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(O,{id:"MB+wJL"})]}):zr>=3&&r("div",{class:"footer",children:[r(M,{icon:"info"}),r("span",{children:r(O,{id:"dBme/4",values:{0:$d.format(-zr,"month")},components:{0:r("strong",{})}})})]}),disabled:!nn,onClick:async()=>{try{const v=await xo();!de&&v&&Re(ne?S._({id:"bpDheH",values:{0:q||R}}):S._({id:"dbNZdP",values:{0:q||R}}))}catch{}},children:[r(M,{icon:"rocket"}),r("span",{children:Ee>0?rt(Ee):ne?S._({id:"QzzGsY"}):S._({id:"PiVIlD"})})]}),r(ke,{onClick:So,className:`menu-favourite ${ye?"checked":""}`,children:[r(M,{icon:"heart"}),r("span",{children:xe>0?rt(xe):ye?S._({id:"OcUmcH"}):S._({id:"W9FRBT"})})]}),Zn("@mastodon/post-bookmark")&&r(ke,{onClick:Br,className:`menu-bookmark ${De?"checked":""}`,children:[r(M,{icon:"bookmark"}),r("span",{children:De?S._({id:"q8EQYI"}):S._({id:"PZlHt8"})})]})]})}),!de&&L&&(de||T)&&r(an,{}),(de||T)&&r(F,{children:r(ke,{onClick:()=>{B.showGenericAccounts={heading:S._({id:"+XOeb+"}),fetchAccounts:ha,instance:b,showReactions:!0,postID:A}},children:[r(M,{icon:"react"}),r("span",{children:r(O,{id:"+XOeb+"})})]})}),!w&&r(F,{children:[(u||!me||$t)&&r(an,{}),u?r("div",{class:mn?"menu-horizontal":"",children:[r(ke,{disabled:Et,onClick:()=>{Ot(!0)},children:[r(M,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),mn&&r(ke,{onClick:()=>{const v=Go(t);v&&ki(v,me)},children:[r(M,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]}):(!me||$t)&&r("div",{class:mn?"menu-horizontal":"",children:[r(ci,{to:`${b?`/${b}`:""}/s/${H}?translate=1`,children:[r(M,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),mn&&r(ke,{onClick:()=>{const v=Go(t);v&&ki(v,me)},children:[r(M,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]})]}),(!de&&L||u||!me||$t)&&r(an,{}),!de&&r(F,{children:r(ci,{to:b?`/${b}/s/${H}`:`/s/${H}`,onClick:v=>{m(v,t)},children:[r(M,{icon:"arrows-right"}),r("small",{children:[r(O,{id:"8MkSAW",values:{0:q||R},components:{0:r("span",{class:"bidi-isolate"})}}),r("br",{}),r("span",{class:"more-insignificant",children:[E(At[N])," • ",$r]})]})]})}),!!Ge&&r(F,{children:r(ke,{onClick:()=>{Rn(H)},children:[r(M,{icon:"history"}),r("small",{children:[r(O,{id:"QL+7Jw"}),r("br",{}),r("span",{class:"more-insignificant",children:r(O,{id:"DuJJm9",values:{editedDateText:Nr}})})]})]})}),r(ke,{href:Be,target:"_blank",children:[r(M,{icon:"external"}),r("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:qd(Be)})]}),r("div",{class:"menu-horizontal",children:[r(ke,{onClick:()=>{try{navigator.clipboard.writeText(Be),Re(S._({id:"edWbV6"}))}catch{Re(S._({id:"W1ewR0"}))}},children:[r(M,{icon:"link"}),r("span",{children:r(O,{id:"he3ygx"})})]}),Kr&&(navigator==null?void 0:navigator.share)&&((Yr=navigator==null?void 0:navigator.canShare)==null?void 0:Yr.call(navigator,{url:Be}))&&r(ke,{onClick:()=>{try{navigator.share({url:Be})}catch{alert(S._({id:"TtG3Uh"}))}},children:[r(M,{icon:"share"}),r("span",{children:r(O,{id:"LFKLqp"})})]})]}),Kr&&de&&r(ke,{onClick:()=>{Eo(!0)},children:[r(M,{icon:"code"}),r("span",{children:r(O,{id:"jdVwsS"})})]}),(tt||bt)&&r(an,{}),(tt||bt)&&r(ke,{onClick:async()=>{try{const v=await x.v1.statuses.$select(H)[$e?"unmute":"mute"]();ft(v,b),Re($e?S._({id:"Pm+5jw"}):S._({id:"ywB7JM"}))}catch{Re($e?S._({id:"c6jxNY"}):S._({id:"8SN9kN"}))}},children:$e?r(F,{children:[r(M,{icon:"unmute"}),r("span",{children:r(O,{id:"i51zUR"})})]}):r(F,{children:[r(M,{icon:"mute"}),r("span",{children:r(O,{id:"OiUYO5"})})]})}),tt&&ma&&r(ke,{onClick:async()=>{try{const v=await x.v1.statuses.$select(H)[ve?"unpin":"pin"]();ft(v,b),Re(ve?S._({id:"Yx809+"}):S._({id:"S6P6E+"}))}catch{Re(ve?S._({id:"A6cs15"}):S._({id:"vgUfWO"}))}},children:ve?r(F,{children:[r(M,{icon:"unpin"}),r("span",{children:r(O,{id:"XQMQZw"})})]}):r(F,{children:[r(M,{icon:"pin"}),r("span",{children:r(O,{id:"lfHLsx"})})]})}),tt&&r("div",{class:"menu-horizontal",children:[Zn("@mastodon/post-edit")&&r(ke,{onClick:()=>{Gn({editStatus:t})},children:[r(M,{icon:"pencil"}),r("span",{children:r(O,{id:"ePK91l"})})]}),de&&r(Lo,{subMenu:!0,confirmLabel:r(F,{children:[r(M,{icon:"trash"}),r("span",{children:r(O,{id:"FbPNuJ"})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{await x.v1.statuses.$select(H).remove();const v=Yi(H,b);v._deleted=!0,Re(S._({id:"KiyvHV"}))}catch{Re(S._({id:"Yb6p2q"}))}})()},children:[r(M,{icon:"trash"}),r("span",{children:r(O,{id:"Jb6/SB"})})]})]}),!tt&&de&&r(F,{children:[r(an,{}),r(ke,{className:"danger",onClick:()=>{B.showReportModal={account:t.account,post:t}},children:[r(M,{icon:"flag"}),r("span",{children:r(O,{id:"7PQAMY"})})]})]})]}),Zr=$(),[$n,rn]=Z(!1),[Nn,Fn]=Z({}),zn=_||!de&&!f&&!Le&&!h,ga=Ws(Dd&&zn?v=>{var je;if(v.pointerType==="mouse")return;const{clientX:P,clientY:G}=((je=v.touches)==null?void 0:je[0])||v,ue=v.target.closest("a");ue&&Dt.current.contains(ue)&&!ue.getAttribute("href").startsWith("#")||(v.preventDefault(),Fn({anchorPoint:{x:P,y:G},direction:"right"}),rn(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),Vn=!s&&!f&&!h,va=Bt("r, shift+r",Dn,{enabled:Vn}),_a=Bt("f, l",So,{enabled:Vn}),ya=Bt("d",Br,{enabled:Vn}),ba=Bt("shift+b",()=>{(async()=>{try{const v=await xo();!de&&v&&Re(ne?S._({id:"bpDheH",values:{0:q||R}}):S._({id:"dbNZdP",values:{0:q||R}}))}catch{}})()},{enabled:Vn&&nn}),Ta=Bt("x",v=>{const P=document.activeElement.closest(".status-link, .status-focus");if(P){const G=P.querySelector(".spoiler-button:not(.spoiling)");if(G)v.stopPropagation(),G.click();else{const ue=P.querySelector(".spoiler-media-button:not(.spoiling)");ue&&(v.stopPropagation(),ue.click())}}}),Hn=te.slice(0,de?void 0:4),Bn=te.length>1&&Hn.some(v=>!!v.description&&!Qs(v.description)),wa=ae(()=>{if(!Bn)return null;const v=[];return Hn.forEach((P,G)=>{if(!P.description)return;const ue=v.findIndex(je=>je.media.description===P.description);ue===-1?v.push({media:P,indices:[G]}):v[ue].indices.push(G)}),v.map(({media:P,indices:G})=>r("div",{"data-caption-index":G.map(ue=>ue+1).join(" "),onClick:ue=>{ue.preventDefault(),ue.stopPropagation(),B.showMediaAlt={alt:P.description,lang:me}},title:P.description,children:[r("sup",{children:G.map(ue=>ue+1).join(" ")})," ",P.description]},P.id))},[Bn,Hn,me]),sn=ae(()=>{var v;return!!z&&J===((v=t.account)==null?void 0:v.id)||!!C.statusThreadNumber[A]},[z,J,(Xr=t.account)==null?void 0:Xr.id,C.statusThreadNumber[A]]),Ea=ae(()=>a&&!sn&&!c&&!z&&N==="public"&&fe>0,[a,sn,c,z,fe,N]),Gr=ae(()=>{if(V||Ie||Ce||he||te!=null&&te.length||sn||c||z||fe<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(Y))return!1;const G=jo(Y);if(G>0&&G<=Pd)return!0},[V,Ie,Ce,he,te,pe,sn,c,z,fe,Y]);return r(wt,{children:[y&&!!(z&&J)&&r(Yd,{sKey:A}),r("article",{"data-state-post-id":A,ref:v=>{var G;Dt.current=v;const P=((G=v==null?void 0:v.closest)==null?void 0:G.call(v,".timeline-item, .timeline-item-alt, .status-link, .status-focus"))||v;va(P),_a(P),ya(P),ba(P),Ta(P)},tabindex:"-1",class:`status ${!c&&z&&nt?"status-reply-to":""} visibility-${N} ${Cn?"status-pinned":""} ${Hd[o]} ${Le?"status-deleted":""} ${h?"status-card":""} ${$n?"status-menu-open":""} ${w&&Rt?"status-media-first":""}`,onMouseEnter:_e,onContextMenu:v=>{var ue,je;if(!zn||v.metaKey)return;const P=v.target.closest("a");if(P&&Dt.current.contains(P)&&!P.getAttribute("href").startsWith("#"))return;const G=(ue=window.getSelection)==null?void 0:ue.call(window);if(G.toString().length>0){const{anchorNode:Nt}=G;if((je=Dt.current)!=null&&je.contains(Nt))return}v.preventDefault(),Fn({anchorPoint:{x:v.clientX,y:v.clientY},direction:"right"}),rn(!0)},...zn?ga():{},children:[zn&&r(cs,{ref:Zr,state:$n?"open":void 0,...Nn,onClose:v=>{var P,G,ue;rn(!1),(v==null?void 0:v.reason)==="click"&&((ue=(G=(P=Dt.current)==null?void 0:P.closest("[tabindex]"))==null?void 0:G.focus)==null||ue.call(G))},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{var v,P;(P=(v=Zr.current)==null?void 0:v.closeMenu)==null||P.call(v)}},overflow:"auto",boundingBoxPadding:vs(),unmountOnClose:!0,children:Wr}),T&&o!=="l"&&!f&&!s&&!Le&&!h&&r("div",{class:`status-actions ${$n==="actions-bar"?"open":""}`,ref:pa,children:[r(Ht,{size:"s",title:S._({id:"ImOQa9"}),alt:S._({id:"ImOQa9"}),class:"reply-button",icon:"comment",iconSize:"m",onClick:Dn}),r(Ht,{size:"s",checked:ye,title:[S._({id:"W9FRBT"}),S._({id:"OcUmcH"})],alt:[S._({id:"W9FRBT"}),S._({id:"8ab1sR"})],class:"favourite-button",icon:"heart",iconSize:"m",count:xe,onClick:So}),r("button",{type:"button",title:S._({id:"2FYpfJ"}),class:"plain more-button",onClick:v=>{v.preventDefault(),v.stopPropagation(),Fn({anchorRef:{current:v.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),rn("actions-bar")},children:r(M,{icon:"more2",size:"m",alt:S._({id:"2FYpfJ"})})})]}),o!=="l"&&r("div",{class:"status-badge",children:[ne&&r(M,{class:"reblog",icon:"rocket",size:"s",alt:S._({id:"b7T5Zj"})}),ye&&r(M,{class:"favourite",icon:"heart",size:"s",alt:S._({id:"8ab1sR"})}),De&&r(M,{class:"bookmark",icon:"bookmark",size:"s",alt:S._({id:"1C/9Sa"})}),Cn&&r(M,{class:"pin",icon:"pin",size:"s",alt:S._({id:"kNiQp6"})})]}),o!=="s"&&r("a",{href:Q,tabindex:"-1",title:`@${R}`,onClick:v=>{v.preventDefault(),v.stopPropagation(),B.showAccount={account:t.account,instance:b}},children:r(st,{url:U||W,size:"xxl",squircle:ce})}),r("div",{class:"container",children:[r("div",{class:"meta",children:[r("span",{class:"meta-name",children:r(gt,{account:t.account,instance:b,showAvatar:o==="s",showAcct:de})})," ",o!=="l"&&(Le?r("span",{class:"status-deleted-tag",children:r(O,{id:"vGjmyl"})}):Be&&!f&&!s&&!h?r(Gt,{to:b?`/${b}/s/${H}`:`/s/${H}`,onClick:v=>{v.metaKey||v.ctrlKey||v.shiftKey||v.altKey||v.which===2||(v.preventDefault(),v.stopPropagation(),m==null||m(v,t),Fn({anchorRef:{current:v.currentTarget},align:"end",direction:"bottom",gap:4}),rn(!0))},class:`time ${$n&&(Nn!=null&&Nn.anchorRef)?"is-open":""}`,children:[Ea&&!Gr?r(M,{icon:"comment2",size:"s",alt:S._({id:"RXmXDR",values:{repliesCount:fe}})}):N!=="public"&&N!=="direct"&&r(M,{icon:_n[N],alt:E(At[N]),size:"s"})," ",r(at,{datetime:Te,format:"micro"}),!f&&!s&&r(M,{icon:"more2",class:"more",alt:S._({id:"2FYpfJ"})})]}):r("span",{class:"time",children:[N!=="public"&&N!=="direct"&&r(F,{children:[r(M,{icon:_n[N],alt:E(At[N]),size:"s"})," "]}),r(at,{datetime:Te,format:"micro"})]}))]}),N==="direct"&&r(F,{children:[r("div",{class:"status-direct-badge",children:r(O,{id:"IV4QaU"})})," "]}),!c&&r(F,{children:sn?r("div",{class:"status-thread-badge",children:[r(M,{icon:"thread",size:"s"}),r(O,{id:"lQ8zCz",values:{0:C.statusThreadNumber[A]?` ${C.statusThreadNumber[A]}/X`:""}})]}):!!z&&!!nt&&(!!he||!be.find(v=>v.id===J))&&r("div",{class:"status-reply-badge",children:[r(M,{icon:"reply"})," ",r(gt,{account:nt,instance:b,short:!0})]})}),r("div",{class:`content-container ${he||Ce?"has-spoiler":""} ${Ue?"show-spoiler":""} ${Tt?"show-media":""}`,"data-content-text-weight":i?Dr():null,style:(de||i)&&{"--content-text-weight":Dr()},children:w&&Rt?r(F,{children:[(!!he||!!Ce)&&!qe&&r(F,{children:[!!he&&r("span",{class:"spoiler-content media-first-spoiler-content",lang:me,dir:"auto",ref:Rr,"data-read-more":E(yn),children:[r(qt,{text:he,emojis:Ae})," "]}),r("button",{class:`light spoiler-button media-first-spoiler-button ${Ue?"spoiling":""}`,type:"button",onClick:v=>{v.preventDefault(),v.stopPropagation(),Ue?(delete B.spoilers[H],qe||delete B.spoilersMedia[H]):(B.spoilers[H]=!0,qe||(B.spoilersMedia[H]=!0))},children:[r(M,{icon:Ue?"eye-open":"eye-close"})," ",Ue?S._({id:"6lGV3K"}):S._({id:"lqBX03"})]})]}),r(jd,{mediaAttachments:te,language:me,postID:H,instance:b}),!!Y&&r("div",{class:"media-first-content content",ref:Or,children:r(Oi,{post:t,instance:b,previewMode:f})})]}):r(F,{children:[!!he&&r(F,{children:[r("div",{class:"content spoiler-content",lang:me,dir:"auto",ref:Rr,"data-read-more":E(yn),children:r("p",{children:r(qt,{text:he,emojis:Ae})})}),qe||f?r("div",{class:"spoiler-divider",children:[r(M,{icon:"eye-open"})," ",r(O,{id:"gnKo7f"})]}):r("button",{class:`light spoiler-button ${Ue?"spoiling":""}`,type:"button",onClick:v=>{v.preventDefault(),v.stopPropagation(),Ue?(delete B.spoilers[H],qe||delete B.spoilersMedia[H]):(B.spoilers[H]=!0,qe||(B.spoilersMedia[H]=!0))},children:[r(M,{icon:Ue?"eye-open":"eye-close"})," ",Ue?S._({id:"6lGV3K"}):S._({id:"lqBX03"})]})]}),!!Y&&r("div",{class:"content",ref:Or,"data-read-more":E(yn),inert:he&&!Ue?!0:void 0,children:[r(Oi,{post:t,instance:b,previewMode:f}),r(Qd,{id:H,instance:b,level:h})]}),!!Ie&&r(Qu,{lang:me,poll:Ie,readOnly:s||!L||!k,onUpdate:v=>{B.statuses[A].poll=v},refresh:()=>x.v1.polls.$select(Ie.id).fetch().then(v=>{B.statuses[A].poll=v}).catch(v=>{}),votePoll:v=>x.v1.polls.$select(Ie.id).votes.create({choices:v}).then(P=>{B.statuses[A].poll=P}).catch(P=>{})}),((u||Mr)&&Fd(Y)&&$t||Et)&&r(Cu,{forceTranslate:Et||Mr,mini:!de&&!c,sourceLanguage:me,autoDetected:_t,text:Go(t)}),!f&&Ce&&!!te.length&&Mn!=="show_all"&&r("button",{class:`plain spoiler-media-button ${Tt?"spoiling":""}`,type:"button",hidden:!qe&&!!he,onClick:v=>{v.preventDefault(),v.stopPropagation(),Tt?delete B.spoilersMedia[H]:B.spoilersMedia[H]=!0},children:[r(M,{icon:Tt?"eye-open":"eye-close"})," ",Tt?S._({id:"6lGV3K"}):S._({id:"9ZCilh"})]}),!!te.length&&(te.length>1&&(de||c&&o==="m")?r("div",{class:"media-large-container",children:te.map((v,P)=>r("div",{class:"media-container media-eq1",children:r(cr,{media:v,autoAnimate:!0,showCaption:!0,allowLongerCaption:!Y,lang:me,to:`/${b}/s/${H}?${c?"media":"media-only"}=${P+1}`,onClick:p?G=>p(G,P,v,t):void 0})},v.id))}):r(Ud,{lang:me,enabled:Bn,captionChildren:wa,children:r("div",{ref:da,class:`media-container media-eq${te.length} ${te.length>2?"media-gt2":""} ${te.length>4?"media-gt4":""}`,children:Hn.map((v,P)=>r(cr,{media:v,autoAnimate:de,showCaption:te.length===1,allowLongerCaption:!Y&&te.length===1,lang:me,altIndex:Bn&&!!v.description&&P+1,to:`/${b}/s/${H}?${c?"media":"media-only"}=${P+1}`,onClick:p?G=>{p(G,P,v,t)}:void 0,checkAspectRatio:te.length===1},v.id))})})),!!V&&/^https/i.test(V==null?void 0:V.url)&&!Ce&&!he&&!Ie&&!te.length&&!C.statusQuotes[A]&&r(Wd,{card:V,selfReferential:(V==null?void 0:V.url)===t.url||(V==null?void 0:V.url)===t.uri,selfAuthor:(Qr=V==null?void 0:V.authors)==null?void 0:Qr.some(v=>{var P;return((P=v.account)==null?void 0:P.url)===Q}),instance:D})]})}),!de&&Gr&&r("div",{class:"content-comment-hint insignificant",children:[r(M,{icon:"comment2",alt:S._({id:"N8UzTV"})})," ",fe]}),de&&r(F,{children:[r("div",{class:"extra-meta",children:Le?r("span",{class:"status-deleted-tag",children:r(O,{id:"vGjmyl"})}):r(F,{children:[r("span",{children:E(At[N])})," •"," ",r("a",{href:Be,target:"_blank",rel:"noopener noreferrer",children:[new Date().getTime()-Te.getTime()<864e5&&r(F,{children:[r(at,{datetime:Te,format:"micro"})," ","‒"," "]}),r("time",{class:"created",datetime:Te.toISOString(),title:Te.toLocaleString(),children:$r})]}),Ge&&r(F,{children:[" ","• ",r(M,{icon:"pencil",alt:S._({id:"MRZxAn"})})," ",r("time",{tabIndex:"0",class:"edited",datetime:He.toISOString(),onClick:()=>{Rn(H)},children:Nr})]})]})}),!!(dt!=null&&dt.length)&&r("div",{class:"emoji-reactions",children:dt.map(v=>{const{name:P,count:G,me:ue,url:je,staticUrl:Nt}=v;if(je)return r("span",{class:`emoji-reaction tag ${ue?"":"insignificant"}`,children:[r(rr,{alt:P,url:je,staticUrl:Nt})," ",G]});if(/^:.+?:$/.test(P)){const xt=Ae.find(St=>St.shortcode===P.replace(/^:/,"").replace(/:$/,""));if(xt)return r("span",{class:`emoji-reaction tag ${ue?"":"insignificant"}`,children:[r(rr,{alt:P,url:xt.url,staticUrl:xt.staticUrl})," ",G]})}return r("span",{class:`emoji-reaction tag ${ue?"":"insignificant"}`,children:[P," ",G]})})}),r("div",{class:`actions ${Le?"disabled":""}`,children:[r("div",{class:"action has-count",children:r(Ht,{title:S._({id:"ImOQa9"}),alt:S._({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:fe,onClick:Dn})}),r(Lo,{disabled:!nn,onClick:xo,confirmLabel:r(F,{children:[r(M,{icon:"rocket"}),r("span",{children:ne?S._({id:"QzzGsY"}):S._({id:"kulphB"})})]}),menuExtras:r(ke,{onClick:()=>{Gn({draftStatus:{status:`
|
||
${Be}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:Fr&&!ne&&r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(O,{id:"MB+wJL"})]}),children:r("div",{class:"action has-count",children:r(Ht,{checked:ne,title:[S._({id:"kulphB"}),S._({id:"QzzGsY"})],alt:[S._({id:"kulphB"}),S._({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:Ee,disabled:!nn})})}),r("div",{class:"action has-count",children:r(Ht,{checked:ye,title:[S._({id:"W9FRBT"}),S._({id:"OcUmcH"})],alt:[S._({id:"W9FRBT"}),S._({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:xe,onClick:Vr})}),Zn("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(Ht,{checked:De,title:[S._({id:"PZlHt8"}),S._({id:"q8EQYI"})],alt:[S._({id:"PZlHt8"}),S._({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:Hr})}),r(_s,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:r("div",{class:"action",children:r("button",{type:"button",title:S._({id:"2FYpfJ"}),class:"plain more-button",children:r(M,{icon:"more",size:"l",alt:S._({id:"2FYpfJ"})})})}),children:Wr})]})]})]}),!!wo&&r(Xo,{onClick:v=>{v.target===v.currentTarget&&Rn(!1)},children:r(Zd,{statusID:wo,instance:b,fetchStatusHistory:()=>x.v1.statuses.$select(wo).history.list(),onClose:()=>{var v;Rn(!1),(v=Dt.current)==null||v.focus()}})}),!!ua&&r(Xo,{onClick:v=>{v.target===v.currentTarget&&Eo(!1)},children:r(Gd,{post:t,instance:b,onClose:()=>{Eo(!1)}})})]})]})}function Ud(e){const{enabled:t,children:n,lang:o,captionChildren:i}=e;return!t||!i?n:r("figure",{class:"media-figure-multiple",children:[n,r("figcaption",{lang:o,dir:"auto",children:i})]})}function jd(e){const{mediaAttachments:t,language:n,postID:o,instance:i}=e,s=t.length>1,a=$(),[c,l]=Z(0);return ee(()=>{let u=()=>{const{clientWidth:d,scrollLeft:f}=a.current,p=Math.round(Math.abs(f)/d);l(p)};return a.current&&a.current.addEventListener("scroll",u,{passive:!0}),()=>{a.current&&a.current.removeEventListener("scroll",u)}},[]),r(F,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:a,children:t.map((u,d)=>r("div",{class:"media-first-item",children:r(cr,{media:u,lang:n,to:`/${i}/s/${o}?media=${d+1}`})},u.id))}),s&&r("div",{class:"media-carousel-controls",children:[r("div",{class:"carousel-indexer",children:[c+1,"/",t.length]}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===0,onClick:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(c-1)*(or()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-left"})})}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===t.length-1,onClick:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(c+1)*(or()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-right"})})})]})]}),s&&r("div",{class:"media-carousel-dots",style:{"--dots-count":t.length},children:t.map((u,d)=>r("span",{class:`carousel-dot ${d===c?"active":""}`},u.id))})]})}function $i(e){return Cs.toUnicode(URL.parse(e).hostname.replace(/^www\./,"").replace(/\/$/,""))}function Ni(e){return["x.com","twitter.com","threads.net","bsky.app"].includes(e)}function Kd({authors:e,hidden:t,children:n}){var i,s;if(t||!((s=(i=e==null?void 0:e[0])==null?void 0:i.account)!=null&&s.id))return n;const o=e[0].account;return r("div",{class:"card-byline",children:[n,r("div",{class:"card-byline-author",children:[r(M,{icon:"link",size:"s"})," ",r("small",{children:r(O,{id:"4LHHK6",components:{0:r(gt,{account:o,showAvatar:!0})}})})]})]})}function Wd({card:e,selfReferential:t,selfAuthor:n,instance:o}){var Q;const i=In(B),{blurhash:s,title:a,description:c,html:l,providerName:u,providerUrl:d,authorName:f,authorUrl:p,width:h,height:m,image:g,imageDescription:_,url:T,type:y,embedUrl:w,language:E,publishedAt:x,authors:b}=e,k=a||u||f,L=h/m>=1.2?"large":"",[A,C]=Z(null);if(ee(()=>{k&&g&&!t&&$a(T)&&Na(o,T).then(re=>{if(!re)return;const{id:q,url:ie}=re;C("#"+ie)})},[k,g,t]),i.unfurledLinks[T])return null;const R=/<iframe/i.test(l),W=Me(re=>{R&&(re.preventDefault(),B.showEmbedModal={html:l,url:T||w,width:h,height:m})},[R]),[U,oe]=Z(null);if(k&&(g||y==="photo"&&s)){const re=$i(T),q=g&&s?Ar(s):null;if(!g){const H=Vu(s,44,44),fe=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");fe.width=44,fe.height=44;const ne=fe.getContext("2d");ne.imageSmoothingEnabled=!1;const Ee=ne.createImageData(44,44);Ee.data.set(H),ne.putImageData(Ee,0,0);try{window.OffscreenCanvas?fe.convertToBlob().then(ye=>{oe(URL.createObjectURL(ye))}):oe(fe.toDataURL())}catch{}}const ie=Ni(re);return r(Kd,{hidden:!!n,authors:b,children:r("a",{href:A||T,target:A?null:"_blank",rel:"nofollow noopener noreferrer",class:`card link ${ie?"card-post":""} ${U?"":L}`,style:{"--average-color":q&&`rgb(${q.join(",")})`},onClick:W,children:[r("div",{class:"card-image",children:r("img",{src:g||U,width:h,height:m,loading:"lazy",decoding:"async",fetchPriority:"low",alt:_||"",onError:ce=>{try{ce.target.style.display="none"}catch{}},style:{"--anim-duration":h&&m&&`${Math.min(Math.max(Math.max(h,m)/100,5),120)}s`}})}),r("div",{class:"meta-container",lang:E,children:[r("p",{class:"meta domain",children:[r("span",{class:"domain",children:re})," ",!!x&&r(F,{children:"· "}),!!x&&r(F,{children:r(at,{datetime:x,format:"micro"})})]}),r("p",{class:"title",dir:"auto",title:a,children:a}),r("p",{class:"meta",dir:"auto",title:c,children:c||!!x&&r(at,{datetime:x,format:"micro"})})]})]})})}else{if(y==="photo")return r("a",{href:T,target:"_blank",rel:"nofollow noopener noreferrer",class:"card photo",onClick:W,children:r("img",{src:w,width:h,height:m,alt:a||c,loading:"lazy",style:{height:"auto",aspectRatio:`${h}/${m}`}})});if(y==="video"&&/youtube/i.test(u)){const re=(Q=T.match(/watch\?v=([^&]+)/))==null?void 0:Q[1];if(re)return r("a",{class:"card video",onClick:W,children:r("lite-youtube",{videoid:re,nocookie:!0})})}if(k&&!g){const re=$i(T),q=Ni(re);return r("a",{href:A||T,target:A?null:"_blank",rel:"nofollow noopener noreferrer",class:`card link ${q?"card-post":""} no-image`,lang:E,dir:"auto",onClick:W,children:r("div",{class:"meta-container",children:[r("p",{class:"meta domain",children:[r("span",{class:"domain",children:[r(M,{icon:"link",size:"s"})," ",r("span",{children:re})]})," ",!!x&&r(F,{children:"· "}),!!x&&r(F,{children:r(at,{datetime:x,format:"micro"})})]}),r("p",{class:"title",title:a,children:a}),r("p",{class:"meta",title:c||u||f,children:c||u||f})]})})}}}function Zd({statusID:e,instance:t,fetchStatusHistory:n=()=>{},onClose:o}){const[i,s]=Z("default"),[a,c]=Z([]);return ee(()=>{s("loading"),(async()=>{try{const l=await n();c(l),s("default")}catch{s("error")}})()},[]),r("div",{id:"edit-history",class:"sheet",children:[!!o&&r("button",{type:"button",class:"sheet-close",onClick:o,children:r(M,{icon:"x",alt:S._({id:"yz7wBu"})})}),r("header",{children:[r("h2",{children:r(O,{id:"OKiofn"})}),i==="error"&&r("p",{children:r(O,{id:"EANWES"})}),i==="loading"&&r("p",{children:[r(qi,{abrupt:!0})," ",r(O,{id:"Pwqkdw"})]})]}),r("main",{tabIndex:"-1",children:a.length>0&&r("ol",{children:a.map(l=>{const{createdAt:u}=l,d=new Date(u);return r("li",{class:"history-item",children:[r("h3",{children:r("time",{children:Sn(d,{formatOpts:{weekday:"short",second:"numeric"}})})}),r(Qt,{status:l,instance:t,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},u)})})})]})}function Js(e,t,n=0){var C;const{account:{url:o,displayName:i,acct:s,username:a,emojis:c,bot:l,group:u},id:d,poll:f,spoilerText:p,language:h,editedAt:m,createdAt:g,content:_,mediaAttachments:T,url:y,emojis:w}=e,E=it(d,t),b=(B.statusQuotes[E]||[]).filter((R,W,U)=>U.findIndex(oe=>oe.url===R.url)===W),k=b.length&&n<=2?b.map(R=>{const{id:W,instance:U}=R,oe=it(W,U),Q=B.statuses[oe];if(Q)return Js(Q,U,++n)}).join(""):"",D=new Date(g),L=sr(_,w)+`
|
||
`+k+`
|
||
`+((C=f==null?void 0:f.options)!=null&&C.length?`
|
||
<p>📊:</p>
|
||
<ul>
|
||
${f.options.map(R=>`
|
||
<li>
|
||
${R.title}
|
||
${R.votesCount>=0?` (${R.votesCount})`:""}
|
||
</li>
|
||
`).join("")}
|
||
</ul>`:"")+(T.length>0?`
|
||
`+T.map(R=>{const{description:W,meta:U,previewRemoteUrl:oe,previewUrl:Q,remoteUrl:re,url:q,type:ie}=R,{original:ce={},small:se}=U||{},H=(se==null?void 0:se.width)||(ce==null?void 0:ce.width),fe=(se==null?void 0:se.height)||(ce==null?void 0:ce.height),ne=re||q,Ee=oe||Q,ye=Ee||ne,xe=ne?URL.parse(ne):null,De=ie==="unknown"&&xe&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(xe.pathname),Ie=ie==="unknown"&&xe&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(xe.pathname),$e=ie==="image"||ie==="unknown"&&Ee&&!De&&!Ie,Ce=ie==="gifv"||ie==="video"||De,he=ie==="audio"||Ie;let N="";return $e?N=`<img src="${ye}" width="${H}" height="${fe}" alt="${W}" loading="lazy" />`:Ce?N=`
|
||
<video src="${ne}" width="${H}" height="${fe}" controls preload="auto" poster="${Ee}" loading="lazy"></video>
|
||
${W?`<figcaption>${W}</figcaption>`:""}
|
||
`:he?N=`
|
||
<audio src="${ne}" controls preload="auto"></audio>
|
||
${W?`<figcaption>${W}</figcaption>`:""}
|
||
`:N=`
|
||
<a href="${ne}">📄 ${W||ne}</a>
|
||
`,`<figure>${N}</figure>`}).join(`
|
||
`):""),A=`
|
||
<blockquote lang="${h}" cite="${y}" data-source="fediverse">
|
||
${p?`
|
||
<details>
|
||
<summary>${p}</summary>
|
||
${L}
|
||
</details>
|
||
`:L}
|
||
<footer>
|
||
— ${sr(i,c)} (@${s}) <a href="${y}"><time datetime="${D.toISOString()}">${D.toLocaleString()}</time></a>
|
||
</footer>
|
||
</blockquote>
|
||
`;return qu(A)}function Gd({post:e,instance:t,onClose:n}){const{account:{url:o,displayName:i,username:s,emojis:a,bot:c,group:l},id:u,poll:d,spoilerText:f,language:p,editedAt:h,createdAt:m,content:g,mediaAttachments:_,url:T,emojis:y}=e,w=Js(e,t);return r("div",{id:"embed-post",class:"sheet",children:[!!n&&r("button",{type:"button",class:"sheet-close",onClick:n,children:r(M,{icon:"x",alt:S._({id:"yz7wBu"})})}),r("header",{children:r("h2",{children:r(O,{id:"jdVwsS"})})}),r("main",{tabIndex:"-1",children:[r("h3",{children:r(O,{id:"GkS6YG"})}),r("textarea",{class:"embed-code",readonly:!0,onClick:E=>{E.target.select()},dir:"auto",children:w}),r("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(w),Re(S._({id:"bl7nrg"}))}catch{Re(S._({id:"/KEBaP"}))}},children:[r(M,{icon:"clipboard"})," ",r("span",{children:r(O,{id:"he3ygx"})})]}),!!(_!=null&&_.length)&&r("section",{children:[r("p",{children:r(O,{id:"/2mUza"})}),r("ol",{class:"links-list",children:_.map(E=>r("li",{children:r("a",{href:E.remoteUrl||E.url,target:"_blank",download:!0,children:E.remoteUrl||E.url})},E.id))})]}),!!(a!=null&&a.length)&&r("section",{children:[r("p",{children:r(O,{id:"AeM/di"})}),r("ul",{children:a.map(E=>r("li",{children:[r("picture",{children:[r("source",{srcset:E.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:E.url,alt:`:${E.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",E.shortcode,":"]})," (",r("a",{href:E.url,target:"_blank",download:!0,children:"URL"}),")",E.staticUrl?r(F,{children:[" ","(",r("a",{href:E.staticUrl,target:"_blank",download:!0,children:r(O,{id:"xiropL"})}),")"]}):null]},E.shortcode))})]}),!!(y!=null&&y.length)&&r("section",{children:[r("p",{children:r(O,{id:"jzjjJh"})}),r("ul",{children:y.map(E=>r("li",{children:[r("picture",{children:[r("source",{srcset:E.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:E.url,alt:`:${E.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",E.shortcode,":"]})," (",r("a",{href:E.url,target:"_blank",download:!0,children:"URL"}),")",E.staticUrl?r(F,{children:[" ","(",r("a",{href:E.staticUrl,target:"_blank",download:!0,children:r(O,{id:"xiropL"})}),")"]}):null]},E.shortcode))})]}),r("section",{children:r("small",{children:[r("p",{children:r(O,{id:"TnJgwX"})}),r("ul",{children:[r("li",{children:r(O,{id:"0OHPem"})}),r("li",{children:r(O,{id:"AzZ5zv"})}),r("li",{children:r(O,{id:"NU7wa/"})}),r("li",{children:r(O,{id:"R4PmPA"})})]})]})}),r("h3",{children:r(O,{id:"rdUucN"})}),r("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:w},dir:"auto"}),r("p",{children:r("small",{children:r(O,{id:"j0kZfi"})})})]})]})}function Ht({checked:e,count:t,class:n,title:o,alt:i,size:s,icon:a,iconSize:c="l",onClick:l,...u}){typeof o=="string"&&(o=[o,o]),typeof i=="string"&&(i=[i,i]);const[d,f]=Z(o[0]||""),[p,h]=Z(i[0]||"");return ee(()=>{e?(f(o[1]||""),h(i[1]||"")):(f(o[0]||""),h(i[0]||""))},[e,o,i]),r("button",{type:"button",title:d,class:`plain ${s?"small":""} ${n} ${e?"checked":""}`,onClick:m=>{l&&(m.preventDefault(),m.stopPropagation(),l(m))},...u,children:[r(M,{icon:a,size:c,alt:p}),!!t&&r(F,{children:[" ",r("small",{title:t,children:rt(t)})]})]})}function qd(e){if(!e)return;const t=URL.parse(e),{host:n,pathname:o}=t,i=o.replace(/\/$/,""),[s,a,c]=i.match(/\/(@[^\/]+)\/(.*)/)||[];return r(F,{children:[Cs.toUnicode(n),a?r(F,{children:["/",a,r("wbr",{}),r("span",{class:"more-insignificant",children:["/",c]})]}):r("span",{class:"more-insignificant",children:i})]})}function Yd({sKey:e}){const n=In(B).statusReply[e];if(!n)return null;const{id:o,instance:i}=n,s=Yi(o,i);if(!s)return null;const{sensitive:a,spoilerText:c,account:{avatar:l,avatarStatic:u,bot:d}={},visibility:f,content:p,language:h,filtered:m}=s;if(a||c||!p)return null;const g=it(o,i),_=Gs(s),T=ze(Zs),y=Cr(m,T);if((y==null?void 0:y.action)==="hide")return null;const w=(y==null?void 0:y.titlesStr)||"";return r("article",{class:`status compact-reply ${f==="direct"?"visibility-direct":""}`,tabindex:"-1","data-state-post-id":g,children:[r(st,{url:u||l,squircle:d}),r("div",{class:"content-compact",title:_,lang:h,dir:"auto",children:y?r("b",{class:"status-filtered-badge badge-meta",title:w,children:[r("span",{children:r(O,{id:"03Qqf9"})}),r("span",{children:w})]}):r("span",{children:_})})]})}function Xd({status:e,filterInfo:t,instance:n,containerProps:o={},showFollowedTags:i,quoted:s}){var W;const{_:a}=po(),c=In(B),{id:l,account:{avatar:u,avatarStatic:d,bot:f,group:p},createdAt:h,visibility:m,reblog:g}=e,_=!!g,T=(t==null?void 0:t.titlesStr)||"",y=new Date(h),w=Gs(e.reblog||e),[E,x]=Z(!1),b=Ws(()=>{x(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),k=ro(),D=it(e.id,n),L=it(e.id,n)+" "+(it(g==null?void 0:g.id,n)||""),A=(g==null?void 0:g.id)||l,C=n?`/${n}/s/${A}`:`/s/${A}`,R=i&&!!((W=c.statusFollowedTags[D])!=null&&W.length);return r("div",{class:s?"":_?p?"status-group":"status-reblog":R?"status-followed-tags":"",...o,onContextMenu:U=>{U.preventDefault(),x(!0)},...b(),children:[r("article",{"data-state-post-id":L,class:`status filtered ${s?"status-card":""}`,tabindex:"-1",children:[r("b",{class:"status-filtered-badge clickable badge-meta",title:T,onClick:U=>{U.preventDefault(),x(!0)},children:[r("span",{children:r(O,{id:"03Qqf9"})}),r("span",{children:T})]})," ",r(st,{url:d||u,squircle:f}),r("span",{class:"status-filtered-info",children:[r("span",{class:"status-filtered-info-1",children:_?r(O,{id:"zJyf/5",components:{0:r(gt,{account:e.account,instance:n}),1:r(M,{icon:_n[m],alt:a(At[m]),size:"s"})}}):R?r(F,{children:[r(gt,{account:e.account,instance:n})," ",r(M,{icon:_n[m],alt:a(At[m]),size:"s"})," ",r("span",{children:c.statusFollowedTags[D].slice(0,3).map(U=>r("span",{class:"status-followed-tag-item",children:["#",U]},U))})]}):r(F,{children:[r(gt,{account:e.account,instance:n})," ",r(M,{icon:_n[m],alt:a(At[m]),size:"s"})," ",r(at,{datetime:y,format:"micro"})]})}),r("span",{class:"status-filtered-info-2",children:[_&&r(F,{children:[r(st,{url:g.account.avatarStatic||g.account.avatar,squircle:f})," "]}),w]})]})]}),!!E&&r(Xo,{onClick:U=>{U.target===U.currentTarget&&x(!1)},children:r("div",{id:"filtered-status-peek",class:"sheet",children:[r("button",{type:"button",class:"sheet-close",onClick:()=>x(!1),children:r(M,{icon:"x",alt:S._({id:"yz7wBu"})})}),r("header",{children:[r("b",{class:"status-filtered-badge",children:r(O,{id:"03Qqf9"})})," ",T]}),r("main",{tabIndex:"-1",children:r(Gt,{ref:k,class:"status-link",to:C,onClick:()=>{x(!1)},"data-read-more":a(yn),children:r(Qt,{status:e,instance:n,size:"s",readOnly:!0})})})]})})]})}const Qd=Jt(({id:e,instance:t,level:n=0})=>{if(!e||!t)return;const{_:o}=po(),i=In(B),s=it(e,t),a=i.statusQuotes[s],c=a==null?void 0:a.filter((l,u,d)=>d.findIndex(f=>f.url===l.url)===u);if(c!=null&&c.length&&!(n>2))return c.map(l=>r(Rs,{id:l.instance+l.id,children:r(Gt,{to:`${l.instance?`/${l.instance}`:""}/s/${l.id}`,class:"status-card-link","data-read-more":o(yn),children:r(Qt,{statusID:l.id,instance:l.instance,size:"s",quoted:n+1,enableCommentHint:!0})},l.instance+l.id)}))}),uh=Jt(Qt,(e,t)=>{const{status:n,...o}=e,{status:i,...s}=t;return(n==null?void 0:n.id)===(i==null?void 0:i.id)&&Fa(o,s)});var Fi=36,ea="";for(;Fi--;)ea+=Fi.toString(36);function dh(e){for(var t="",n=e||11;n--;)t+=ea[Math.random()*36|0];return t}function ct(e){return Array.isArray?Array.isArray(e):oa(e)==="[object Array]"}const Jd=1/0;function ef(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-Jd?"-0":t}function tf(e){return e==null?"":ef(e)}function Qe(e){return typeof e=="string"}function ta(e){return typeof e=="number"}function nf(e){return e===!0||e===!1||of(e)&&oa(e)=="[object Boolean]"}function na(e){return typeof e=="object"}function of(e){return na(e)&&e!==null}function We(e){return e!=null}function qo(e){return!e.trim().length}function oa(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const rf="Incorrect 'index' type",sf=e=>`Invalid value for key ${e}`,af=e=>`Pattern length exceeds max of ${e}.`,cf=e=>`Missing ${e} property in key`,lf=e=>`Property 'weight' in key '${e}' must be a positive integer`,zi=Object.prototype.hasOwnProperty;class uf{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(o=>{let i=ra(o);this._keys.push(i),this._keyMap[i.id]=i,n+=i.weight}),this._keys.forEach(o=>{o.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function ra(e){let t=null,n=null,o=null,i=1,s=null;if(Qe(e)||ct(e))o=e,t=Vi(e),n=ur(e);else{if(!zi.call(e,"name"))throw new Error(cf("name"));const a=e.name;if(o=a,zi.call(e,"weight")&&(i=e.weight,i<=0))throw new Error(lf(a));t=Vi(a),n=ur(a),s=e.getFn}return{path:t,id:n,weight:i,src:o,getFn:s}}function Vi(e){return ct(e)?e:e.split(".")}function ur(e){return ct(e)?e.join("."):e}function df(e,t){let n=[],o=!1;const i=(s,a,c)=>{if(We(s))if(!a[c])n.push(s);else{let l=a[c];const u=s[l];if(!We(u))return;if(c===a.length-1&&(Qe(u)||ta(u)||nf(u)))n.push(tf(u));else if(ct(u)){o=!0;for(let d=0,f=u.length;d<f;d+=1)i(u[d],a,c+1)}else a.length&&i(u,a,c+1)}};return i(e,Qe(t)?t.split("."):t,0),o?n:n[0]}const ff={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},hf={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},pf={location:0,threshold:.6,distance:100},mf={useExtendedSearch:!1,getFn:df,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var K={...hf,...ff,...pf,...mf};const gf=/[^ ]+/g;function vf(e=1,t=3){const n=new Map,o=Math.pow(10,t);return{get(i){const s=i.match(gf).length;if(n.has(s))return n.get(s);const a=1/Math.pow(s,.5*e),c=parseFloat(Math.round(a*o)/o);return n.set(s,c),c},clear(){n.clear()}}}class Pr{constructor({getFn:t=K.getFn,fieldNormWeight:n=K.fieldNormWeight}={}){this.norm=vf(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,o)=>{this._keysMap[n.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,Qe(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();Qe(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,o=this.size();n<o;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!We(t)||qo(t))return;let o={v:t,i:n,n:this.norm.get(t)};this.records.push(o)}_addObject(t,n){let o={i:n,$:{}};this.keys.forEach((i,s)=>{let a=i.getFn?i.getFn(t):this.getFn(t,i.path);if(We(a)){if(ct(a)){let c=[];const l=[{nestedArrIndex:-1,value:a}];for(;l.length;){const{nestedArrIndex:u,value:d}=l.pop();if(We(d))if(Qe(d)&&!qo(d)){let f={v:d,i:u,n:this.norm.get(d)};c.push(f)}else ct(d)&&d.forEach((f,p)=>{l.push({nestedArrIndex:p,value:f})})}o.$[s]=c}else if(Qe(a)&&!qo(a)){let c={v:a,n:this.norm.get(a)};o.$[s]=c}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function ia(e,t,{getFn:n=K.getFn,fieldNormWeight:o=K.fieldNormWeight}={}){const i=new Pr({getFn:n,fieldNormWeight:o});return i.setKeys(e.map(ra)),i.setSources(t),i.create(),i}function _f(e,{getFn:t=K.getFn,fieldNormWeight:n=K.fieldNormWeight}={}){const{keys:o,records:i}=e,s=new Pr({getFn:t,fieldNormWeight:n});return s.setKeys(o),s.setIndexRecords(i),s}function eo(e,{errors:t=0,currentLocation:n=0,expectedLocation:o=0,distance:i=K.distance,ignoreLocation:s=K.ignoreLocation}={}){const a=t/e.length;if(s)return a;const c=Math.abs(o-n);return i?a+c/i:c?1:a}function yf(e=[],t=K.minMatchCharLength){let n=[],o=-1,i=-1,s=0;for(let a=e.length;s<a;s+=1){let c=e[s];c&&o===-1?o=s:!c&&o!==-1&&(i=s-1,i-o+1>=t&&n.push([o,i]),o=-1)}return e[s-1]&&s-o>=t&&n.push([o,s-1]),n}const It=32;function bf(e,t,n,{location:o=K.location,distance:i=K.distance,threshold:s=K.threshold,findAllMatches:a=K.findAllMatches,minMatchCharLength:c=K.minMatchCharLength,includeMatches:l=K.includeMatches,ignoreLocation:u=K.ignoreLocation}={}){if(t.length>It)throw new Error(af(It));const d=t.length,f=e.length,p=Math.max(0,Math.min(o,f));let h=s,m=p;const g=c>1||l,_=g?Array(f):[];let T;for(;(T=e.indexOf(t,m))>-1;){let k=eo(t,{currentLocation:T,expectedLocation:p,distance:i,ignoreLocation:u});if(h=Math.min(k,h),m=T+d,g){let D=0;for(;D<d;)_[T+D]=1,D+=1}}m=-1;let y=[],w=1,E=d+f;const x=1<<d-1;for(let k=0;k<d;k+=1){let D=0,L=E;for(;D<L;)eo(t,{errors:k,currentLocation:p+L,expectedLocation:p,distance:i,ignoreLocation:u})<=h?D=L:E=L,L=Math.floor((E-D)/2+D);E=L;let A=Math.max(1,p-L+1),C=a?f:Math.min(p+L,f)+d,R=Array(C+2);R[C+1]=(1<<k)-1;for(let U=C;U>=A;U-=1){let oe=U-1,Q=n[e.charAt(oe)];if(g&&(_[oe]=+!!Q),R[U]=(R[U+1]<<1|1)&Q,k&&(R[U]|=(y[U+1]|y[U])<<1|1|y[U+1]),R[U]&x&&(w=eo(t,{errors:k,currentLocation:oe,expectedLocation:p,distance:i,ignoreLocation:u}),w<=h)){if(h=w,m=oe,m<=p)break;A=Math.max(1,2*p-m)}}if(eo(t,{errors:k+1,currentLocation:p,expectedLocation:p,distance:i,ignoreLocation:u})>h)break;y=R}const b={isMatch:m>=0,score:Math.max(.001,w)};if(g){const k=yf(_,c);k.length?l&&(b.indices=k):b.isMatch=!1}return b}function Tf(e){let t={};for(let n=0,o=e.length;n<o;n+=1){const i=e.charAt(n);t[i]=(t[i]||0)|1<<o-n-1}return t}class sa{constructor(t,{location:n=K.location,threshold:o=K.threshold,distance:i=K.distance,includeMatches:s=K.includeMatches,findAllMatches:a=K.findAllMatches,minMatchCharLength:c=K.minMatchCharLength,isCaseSensitive:l=K.isCaseSensitive,ignoreLocation:u=K.ignoreLocation}={}){if(this.options={location:n,threshold:o,distance:i,includeMatches:s,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:u},this.pattern=l?t:t.toLowerCase(),this.chunks=[],!this.pattern.length)return;const d=(p,h)=>{this.chunks.push({pattern:p,alphabet:Tf(p),startIndex:h})},f=this.pattern.length;if(f>It){let p=0;const h=f%It,m=f-h;for(;p<m;)d(this.pattern.substr(p,It),p),p+=It;if(h){const g=f-It;d(this.pattern.substr(g),g)}}else d(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,includeMatches:o}=this.options;if(n||(t=t.toLowerCase()),this.pattern===t){let m={isMatch:!0,score:0};return o&&(m.indices=[[0,t.length-1]]),m}const{location:i,distance:s,threshold:a,findAllMatches:c,minMatchCharLength:l,ignoreLocation:u}=this.options;let d=[],f=0,p=!1;this.chunks.forEach(({pattern:m,alphabet:g,startIndex:_})=>{const{isMatch:T,score:y,indices:w}=bf(t,m,g,{location:i+_,distance:s,threshold:a,findAllMatches:c,minMatchCharLength:l,includeMatches:o,ignoreLocation:u});T&&(p=!0),f+=y,T&&w&&(d=[...d,...w])});let h={isMatch:p,score:p?f/this.chunks.length:1};return p&&o&&(h.indices=d),h}}class vt{constructor(t){this.pattern=t}static isMultiMatch(t){return Hi(t,this.multiRegex)}static isSingleMatch(t){return Hi(t,this.singleRegex)}search(){}}function Hi(e,t){const n=e.match(t);return n?n[1]:null}class wf extends vt{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class Ef extends vt{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const o=t.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,t.length-1]}}}class xf extends vt{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class Sf extends vt{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class kf extends vt{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class If extends vt{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class aa extends vt{constructor(t,{location:n=K.location,threshold:o=K.threshold,distance:i=K.distance,includeMatches:s=K.includeMatches,findAllMatches:a=K.findAllMatches,minMatchCharLength:c=K.minMatchCharLength,isCaseSensitive:l=K.isCaseSensitive,ignoreLocation:u=K.ignoreLocation}={}){super(t),this._bitapSearch=new sa(t,{location:n,threshold:o,distance:i,includeMatches:s,findAllMatches:a,minMatchCharLength:c,isCaseSensitive:l,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class ca extends vt{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,o;const i=[],s=this.pattern.length;for(;(o=t.indexOf(this.pattern,n))>-1;)n=o+s,i.push([o,n-1]);const a=!!i.length;return{isMatch:a,score:a?0:1,indices:i}}}const dr=[wf,ca,xf,Sf,If,kf,Ef,aa],Bi=dr.length,Af=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Cf="|";function Pf(e,t={}){return e.split(Cf).map(n=>{let o=n.trim().split(Af).filter(s=>s&&!!s.trim()),i=[];for(let s=0,a=o.length;s<a;s+=1){const c=o[s];let l=!1,u=-1;for(;!l&&++u<Bi;){const d=dr[u];let f=d.isMultiMatch(c);f&&(i.push(new d(f,t)),l=!0)}if(!l)for(u=-1;++u<Bi;){const d=dr[u];let f=d.isSingleMatch(c);if(f){i.push(new d(f,t));break}}}return i})}const Lf=new Set([aa.type,ca.type]);class Mf{constructor(t,{isCaseSensitive:n=K.isCaseSensitive,includeMatches:o=K.includeMatches,minMatchCharLength:i=K.minMatchCharLength,ignoreLocation:s=K.ignoreLocation,findAllMatches:a=K.findAllMatches,location:c=K.location,threshold:l=K.threshold,distance:u=K.distance}={}){this.query=null,this.options={isCaseSensitive:n,includeMatches:o,minMatchCharLength:i,findAllMatches:a,ignoreLocation:s,location:c,threshold:l,distance:u},this.pattern=n?t:t.toLowerCase(),this.query=Pf(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:o,isCaseSensitive:i}=this.options;t=i?t:t.toLowerCase();let s=0,a=[],c=0;for(let l=0,u=n.length;l<u;l+=1){const d=n[l];a.length=0,s=0;for(let f=0,p=d.length;f<p;f+=1){const h=d[f],{isMatch:m,indices:g,score:_}=h.search(t);if(m){if(s+=1,c+=_,o){const T=h.constructor.type;Lf.has(T)?a=[...a,...g]:a.push(g)}}else{c=0,s=0,a.length=0;break}}if(s){let f={isMatch:!0,score:c/s};return o&&(f.indices=a),f}}return{isMatch:!1,score:1}}}const fr=[];function Rf(...e){fr.push(...e)}function hr(e,t){for(let n=0,o=fr.length;n<o;n+=1){let i=fr[n];if(i.condition(e,t))return new i(e,t)}return new sa(e,t)}const ho={AND:"$and",OR:"$or"},pr={PATH:"$path",PATTERN:"$val"},mr=e=>!!(e[ho.AND]||e[ho.OR]),Of=e=>!!e[pr.PATH],Df=e=>!ct(e)&&na(e)&&!mr(e),Ui=e=>({[ho.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function la(e,t,{auto:n=!0}={}){const o=i=>{let s=Object.keys(i);const a=Of(i);if(!a&&s.length>1&&!mr(i))return o(Ui(i));if(Df(i)){const l=a?i[pr.PATH]:s[0],u=a?i[pr.PATTERN]:i[l];if(!Qe(u))throw new Error(sf(l));const d={keyId:ur(l),pattern:u};return n&&(d.searcher=hr(u,t)),d}let c={children:[],operator:s[0]};return s.forEach(l=>{const u=i[l];ct(u)&&u.forEach(d=>{c.children.push(o(d))})}),c};return mr(e)||(e=Ui(e)),o(e)}function $f(e,{ignoreFieldNorm:t=K.ignoreFieldNorm}){e.forEach(n=>{let o=1;n.matches.forEach(({key:i,norm:s,score:a})=>{const c=i?i.weight:null;o*=Math.pow(a===0&&c?Number.EPSILON:a,(c||1)*(t?1:s))}),n.score=o})}function Nf(e,t){const n=e.matches;t.matches=[],We(n)&&n.forEach(o=>{if(!We(o.indices)||!o.indices.length)return;const{indices:i,value:s}=o;let a={indices:i,value:s};o.key&&(a.key=o.key.src),o.idx>-1&&(a.refIndex=o.idx),t.matches.push(a)})}function Ff(e,t){t.score=e.score}function zf(e,t,{includeMatches:n=K.includeMatches,includeScore:o=K.includeScore}={}){const i=[];return n&&i.push(Nf),o&&i.push(Ff),e.map(s=>{const{idx:a}=s,c={item:t[a],refIndex:a};return i.length&&i.forEach(l=>{l(s,c)}),c})}class An{constructor(t,n={},o){this.options={...K,...n},this.options.useExtendedSearch,this._keyStore=new uf(this.options.keys),this.setCollection(t,o)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof Pr))throw new Error(rf);this._myIndex=n||ia(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){We(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let o=0,i=this._docs.length;o<i;o+=1){const s=this._docs[o];t(s,o)&&(this.removeAt(o),o-=1,i-=1,n.push(s))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:o,includeScore:i,shouldSort:s,sortFn:a,ignoreFieldNorm:c}=this.options;let l=Qe(t)?Qe(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return $f(l,{ignoreFieldNorm:c}),s&&l.sort(a),ta(n)&&n>-1&&(l=l.slice(0,n)),zf(l,this._docs,{includeMatches:o,includeScore:i})}_searchStringList(t){const n=hr(t,this.options),{records:o}=this._myIndex,i=[];return o.forEach(({v:s,i:a,n:c})=>{if(!We(s))return;const{isMatch:l,score:u,indices:d}=n.searchIn(s);l&&i.push({item:s,idx:a,matches:[{score:u,value:s,norm:c,indices:d}]})}),i}_searchLogical(t){const n=la(t,this.options),o=(c,l,u)=>{if(!c.children){const{keyId:f,searcher:p}=c,h=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(l,f),searcher:p});return h&&h.length?[{idx:u,item:l,matches:h}]:[]}const d=[];for(let f=0,p=c.children.length;f<p;f+=1){const h=c.children[f],m=o(h,l,u);if(m.length)d.push(...m);else if(c.operator===ho.AND)return[]}return d},i=this._myIndex.records,s={},a=[];return i.forEach(({$:c,i:l})=>{if(We(c)){let u=o(n,c,l);u.length&&(s[l]||(s[l]={idx:l,item:c,matches:[]},a.push(s[l])),u.forEach(({matches:d})=>{s[l].matches.push(...d)}))}}),a}_searchObjectList(t){const n=hr(t,this.options),{keys:o,records:i}=this._myIndex,s=[];return i.forEach(({$:a,i:c})=>{if(!We(a))return;let l=[];o.forEach((u,d)=>{l.push(...this._findMatches({key:u,value:a[d],searcher:n}))}),l.length&&s.push({idx:c,item:a,matches:l})}),s}_findMatches({key:t,value:n,searcher:o}){if(!We(n))return[];let i=[];if(ct(n))n.forEach(({v:s,i:a,n:c})=>{if(!We(s))return;const{isMatch:l,score:u,indices:d}=o.searchIn(s);l&&i.push({score:u,key:t,value:s,idx:a,norm:c,indices:d})});else{const{v:s,n:a}=n,{isMatch:c,score:l,indices:u}=o.searchIn(s);c&&i.push({score:l,key:t,value:s,norm:a,indices:u})}return i}}An.version="7.0.0";An.createIndex=ia;An.parseIndex=_f;An.config=K;An.parseQuery=la;Rf(Mf);export{dh as $,st as A,uh as B,Jf as C,mn as D,qt as E,ki as F,or as G,Ar as H,M as I,cr as J,rr as K,Gt as L,Xo as M,gt as N,Cr as O,ro as P,nd as Q,at as R,Qc as S,Cu as T,Zs as U,Ws as V,vs as W,cs as X,td as Y,nh as Z,Gs as _,Bt as a,jo as a0,sr as a1,Gf as a2,Kc as a3,qf as a4,An as a5,pu as a6,tc as a7,ns as a8,cc as a9,_n as aa,nc as b,_s as c,ke as d,ci as e,an as f,Lo as g,ys as h,Zn as i,Xf as j,Cs as k,ln as l,Qf as m,nu as n,rc as o,Yf as p,Ps as q,rt as r,Re as s,fl as t,Bf as u,Sn as v,Gn as w,_o as x,eh as y,th as z};
|
||
//# sourceMappingURL=fuse-zg_VFt4r.js.map
|