phanpy-cz/assets/fuse-ljJAS_uA.js
2025-01-26 18:32:05 +01:00

190 lines
192 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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