Files
phanpy-cz/assets/ScheduledAtField-Dw49_KZ-.js
2025-11-28 11:44:18 +01:00

195 lines
216 KiB
JavaScript
Raw Permalink 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{at as ce,Z as It,e as r,d as H,q as yt,A as N,_ as ke,y as q,N as Os,au as gc,m as it,W as Re,h as jo,av as vc,aw as gr,ax as yc,ay as Fs,Y as Bs,k as F,M as $e,l as go,a0 as Wt,I as vr,G as Lt,s as z,az as bc,aA as Li,w as wc,aB as _c,aC as Uo,g as qo,F as vo,u as Kt,a as Ze,a3 as kc,K as Tc,aD as Sc,aE as Pi,T as x,aF as zs,aG as Cc,aH as Ec,p as Er,z as yr,J as Hs,aI as Ac,aJ as Bt,aK as xc,aL as Mc,aM as Jn,c as Ge,S as Qt,b as ye,aN as Ic,aO as Lc,a4 as Ks,aP as Wo,aQ as Pc,t as Dc,x as Rc}from"./pwa-viewport-Bz1GOnQv.js";import{ICONS as $c}from"./ICONS-BJuc0WJ2.js";const js=["shift","alt","meta","mod","ctrl","control"],Nc={esc:"escape",return:"enter",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function De(t){return(Nc[t.trim()]||t.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function Us(t){return js.includes(t)}function qr(t,e=","){return t.toLowerCase().split(e)}function Wr(t,e="+",n=">",o=!1,s){let a=[],i=!1;t=t.trim(),t.includes(n)?(i=!0,a=t.toLocaleLowerCase().split(n).map(h=>De(h))):a=t.toLocaleLowerCase().split(e).map(h=>De(h));const c={alt:a.includes("alt"),ctrl:a.includes("ctrl")||a.includes("control"),shift:a.includes("shift"),meta:a.includes("meta"),mod:a.includes("mod"),useKey:o},l=a.filter(h=>!js.includes(h));return{...c,keys:l,description:s,isSequence:i,hotkey:t}}typeof document<"u"&&(document.addEventListener("keydown",t=>{t.code!==void 0&&qs([De(t.code)])}),document.addEventListener("keyup",t=>{t.code!==void 0&&Ws([De(t.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{be.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{be.clear()},0)}));const be=new Set;function Zo(t){return Array.isArray(t)}function Oc(t,e=","){return(Zo(t)?t:t.split(e)).every(n=>be.has(n.trim().toLowerCase()))}function qs(t){const e=Array.isArray(t)?t:[t];be.has("meta")&&be.forEach(n=>!Us(n)&&be.delete(n.toLowerCase())),e.forEach(n=>be.add(n.toLowerCase()))}function Ws(t){const e=Array.isArray(t)?t:[t];t==="meta"?be.clear():e.forEach(n=>be.delete(n.toLowerCase()))}function Fc(t,e,n){(typeof n=="function"&&n(t,e)||n===!0)&&t.preventDefault()}function Bc(t,e,n){return typeof n=="function"?n(t,e):n===!0||n===void 0}const zc=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"];function Hc(t){return Zs(t,zc)}function Zs(t,e=!1){const{target:n,composed:o}=t;let s,a;return Kc(n)&&o?(s=t.composedPath()[0]&&t.composedPath()[0].tagName,a=t.composedPath()[0]&&t.composedPath()[0].role):(s=n&&n.tagName,a=n&&n.role),Zo(e)?!!(s&&e&&e.some(i=>i.toLowerCase()===s.toLowerCase()||i===a)):!!(s&&e&&e)}function Kc(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function jc(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(n=>e.includes(n))||t.includes("*"):!0}const Uc=(t,e,n=!1)=>{const{alt:o,meta:s,mod:a,shift:i,ctrl:c,keys:l,useKey:h}=e,{code:d,key:u,ctrlKey:f,metaKey:p,shiftKey:m,altKey:g}=t,v=De(d);if(h&&l?.length===1&&l.includes(u))return!0;if(!l?.includes(v)&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!n){if(o!==g&&v!=="alt"||i!==m&&v!=="shift")return!1;if(a){if(!p&&!f)return!1}else if(s!==p&&v!=="meta"&&v!=="os"||c!==f&&v!=="ctrl"&&v!=="control")return!1}return l&&l.length===1&&l.includes(v)?!0:l?Oc(l):!l},qc=ce(void 0),Wc=()=>It(qc);function Vs(t,e){return t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).reduce((n,o)=>n&&Vs(t[o],e[o]),!0):t===e}const Zc=ce({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),Vc=()=>It(Zc);function Gc(t){const e=N(void 0);return Vs(e.current,t)||(e.current=t),e.current}const Di=t=>{t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},Yc=typeof window<"u"?ke:q;function Ke(t,e,n,o){const s=N(null),a=N(!1),i=Array.isArray(n)?Array.isArray(o)?void 0:o:n,c=Zo(t)?t.join(i?.delimiter):t,l=Array.isArray(n)?n:Array.isArray(o)?o:void 0,h=yt(e,l??[]),d=N(h);l?d.current=h:d.current=e;const u=Gc(i),{activeScopes:f}=Vc(),p=Wc();return Yc(()=>{if(u?.enabled===!1||!jc(f,u?.scopes))return;let m=[],g;const v=(C,_=!1)=>{if(!(Hc(C)&&!Zs(C,u?.enableOnFormTags))){if(s.current!==null){const T=s.current.getRootNode();if((T instanceof Document||T instanceof ShadowRoot)&&T.activeElement!==s.current&&!s.current.contains(T.activeElement)){Di(C);return}}C.target?.isContentEditable&&!u?.enableOnContentEditable||qr(c,u?.delimiter).forEach(T=>{if(T.includes(u?.splitKey??"+")&&T.includes(u?.sequenceSplitKey??">")){console.warn(`Hotkey ${T} contains both ${u?.splitKey??"+"} and ${u?.sequenceSplitKey??">"} which is not supported.`);return}const E=Wr(T,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description);if(E.isSequence){g=setTimeout(()=>{m=[]},u?.sequenceTimeoutMs??1e3);const w=E.useKey?C.key:De(C.code);if(Us(w.toLowerCase()))return;m.push(w);const I=E.keys?.[m.length-1];if(w!==I){m=[],g&&clearTimeout(g);return}m.length===E.keys?.length&&(d.current(C,E),g&&clearTimeout(g),m=[])}else if(Uc(C,E,u?.ignoreModifiers)||E.keys?.includes("*")){if(u?.ignoreEventWhen?.(C)||_&&a.current)return;if(Fc(C,E,u?.preventDefault),!Bc(C,E,u?.enabled)){Di(C);return}d.current(C,E),_||(a.current=!0)}})}},b=C=>{C.code!==void 0&&(qs(De(C.code)),(u?.keydown===void 0&&u?.keyup!==!0||u?.keydown)&&v(C))},k=C=>{C.code!==void 0&&(Ws(De(C.code)),a.current=!1,u?.keyup&&v(C,!0))},S=s.current||i?.document||document;return S.addEventListener("keyup",k,i?.eventListenerOptions),S.addEventListener("keydown",b,i?.eventListenerOptions),p&&qr(c,u?.delimiter).forEach(C=>p.addHotkey(Wr(C,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description))),()=>{S.removeEventListener("keyup",k,i?.eventListenerOptions),S.removeEventListener("keydown",b,i?.eventListenerOptions),p&&qr(c,u?.delimiter).forEach(C=>p.removeHotkey(Wr(C,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description))),m=[],g&&clearTimeout(g)}},[c,u,f]),s}var fr={exports:{}};var Xc=fr.exports,Ri;function Qc(){return Ri||(Ri=1,(function(t){(function(e,n){t.exports?t.exports=n():e.Toastify=n()})(Xc,function(e){var n=function(i){return new n.lib.init(i)},o="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:o,constructor:n,init:function(i){return i||(i={}),this.options={},this.toastElement=null,this.options.text=i.text||n.defaults.text,this.options.node=i.node||n.defaults.node,this.options.duration=i.duration===0?0:i.duration||n.defaults.duration,this.options.selector=i.selector||n.defaults.selector,this.options.callback=i.callback||n.defaults.callback,this.options.destination=i.destination||n.defaults.destination,this.options.newWindow=i.newWindow||n.defaults.newWindow,this.options.close=i.close||n.defaults.close,this.options.gravity=i.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=i.positionLeft||n.defaults.positionLeft,this.options.position=i.position||n.defaults.position,this.options.backgroundColor=i.backgroundColor||n.defaults.backgroundColor,this.options.avatar=i.avatar||n.defaults.avatar,this.options.className=i.className||n.defaults.className,this.options.stopOnFocus=i.stopOnFocus===void 0?n.defaults.stopOnFocus:i.stopOnFocus,this.options.onClick=i.onClick||n.defaults.onClick,this.options.offset=i.offset||n.defaults.offset,this.options.escapeMarkup=i.escapeMarkup!==void 0?i.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=i.ariaLive||n.defaults.ariaLive,this.options.style=i.style||n.defaults.style,i.backgroundColor&&(this.options.style.background=i.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var i=document.createElement("div");i.className="toastify on "+this.options.className,this.options.position?i.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(i.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):i.className+=" toastify-right",i.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)i.style[c]=this.options.style[c];if(this.options.ariaLive&&i.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)i.appendChild(this.options.node);else if(this.options.escapeMarkup?i.innerText=this.options.text:i.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?i.appendChild(l):i.insertAdjacentElement("afterbegin",l)}if(this.options.close===!0){var h=document.createElement("button");h.type="button",h.setAttribute("aria-label","Close"),h.className="toast-close",h.innerHTML="&#10006;",h.addEventListener("click",(function(v){v.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var d=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&d>360?i.insertAdjacentElement("afterbegin",h):i.appendChild(h)}if(this.options.stopOnFocus&&this.options.duration>0){var u=this;i.addEventListener("mouseover",function(v){window.clearTimeout(i.timeOutValue)}),i.addEventListener("mouseleave",function(){i.timeOutValue=window.setTimeout(function(){u.removeElement(i)},u.options.duration)})}if(typeof this.options.destination<"u"&&i.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"&&i.addEventListener("click",(function(v){v.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var f=s("x",this.options),p=s("y",this.options),m=this.options.position=="left"?f:"-"+f,g=this.options.gravity=="toastify-top"?p:"-"+p;i.style.transform="translate("+m+","+g+")"}return i},showToast:function(){this.toastElement=this.buildToast();var i;if(typeof this.options.selector=="string"?i=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||typeof ShadowRoot<"u"&&this.options.selector instanceof ShadowRoot?i=this.options.selector:i=document.body,!i)throw"Root element is not defined";var c=n.defaults.oldestFirst?i.firstChild:i.lastChild;return i.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(i){i.className=i.className.replace(" on",""),window.setTimeout((function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),i.parentNode&&i.parentNode.removeChild(i),this.options.callback.call(i),n.reposition()}).bind(this),400)}},n.reposition=function(){for(var i={top:15,bottom:15},c={top:15,bottom:15},l={top:15,bottom:15},h=document.getElementsByClassName("toastify"),d,u=0;u<h.length;u++){a(h[u],"toastify-top")===!0?d="toastify-top":d="toastify-bottom";var f=h[u].offsetHeight;d=d.substr(9,d.length-1);var p=15,m=window.innerWidth>0?window.innerWidth:screen.width;m<=360?(h[u].style[d]=l[d]+"px",l[d]+=f+p):a(h[u],"toastify-left")===!0?(h[u].style[d]=i[d]+"px",i[d]+=f+p):(h[u].style[d]=c[d]+"px",c[d]+=f+p)}return this};function s(i,c){return c.offset[i]?isNaN(c.offset[i])?c.offset[i]:c.offset[i]+"px":"0px"}function a(i,c){return!i||typeof c!="string"?!1:!!(i.className&&i.className.trim().split(/\s+/gi).indexOf(c)>-1)}return n.lib.init.prototype=n.lib,n})})(fr)),fr.exports}var Jc=Qc();const tl=Os(Jc);window._showToast=ht;function ht(t){typeof t=="string"&&(t={text:t});const{onClick:e,delay:n,...o}=t,s=tl({className:`${e||t.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...o,onClick:()=>{e?.(s)}});return n?setTimeout(()=>{s.showToast()},n):s.showToast(),s}function My(t,e,n,o){const s=N(t);q(()=>{s.current=t},[t,n]),q(()=>{!o||e===null||e===!1||s.current()},[o]),q(()=>{if(e===null||e===!1)return;const i=setInterval(()=>s.current(),e);return()=>clearInterval(i)},[e])}const Vo=t=>!!t&&t[0]==="o",yo=gc,zn=(t,e)=>t===!0||!!(t&&t[e]),qt=(t,e)=>typeof t=="function"?t(e):t,el="_szhsinMenu",nl=t=>t[el];const hn=(t,e)=>(e&&Object.keys(e).forEach(n=>{const o=t[n],s=e[n];typeof s=="function"&&o?t[n]=(...a)=>{s(...a),o(...a)}:t[n]=s}),t),rl=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],o=isNaN(e[1])?n:e[1];return{top:n,right:o,bottom:isNaN(e[2])?n:e[2],left:isNaN(e[3])?o:e[3]}},Zr=t=>{for(;t;){if(t=t.parentNode,!t||t===document.body||!t.parentNode)return;const{overflow:e,overflowX:n,overflowY:o}=getComputedStyle(t);if(/auto|scroll|overlay|hidden/.test(e+o+n))return t}};function Ar(t,e){return{"aria-disabled":t||void 0,tabIndex:e?0:-1}}function $i(t,e){for(let n=0;n<t.length;n++)if(t[n]===e)return n;return-1}const pe=({block:t,element:e,modifiers:n,className:o})=>it(()=>{const s=e?`${t}__${e}`:t;let a=s;n&&Object.keys(n).forEach(c=>{const l=n[c];l&&(a+=` ${s}--${l===!0?c:`${c}-${l}`}`)});let i=typeof o=="function"?o(n):o;return typeof i=="string"&&(i=i.trim(),i&&(a+=` ${i}`)),a},[t,e,n,o]),ol="szh-menu-container",fe="szh-menu";const il="arrow",Go="item",sl="divider",al="header",cl="group",ll="submenu";const Gs=ce(),Yo=ce({}),br=ce({}),Xo=ce({}),ul=ce({}),xr=ce({}),zt=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),Et=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),Hn=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),on=Object.freeze({FIRST:"first",LAST:"last"}),dl=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),Ni="absolute",Qo="none",Jo="menuitem",bo={preventScroll:!0};const hl=({className:t,containerRef:e,containerProps:n,children:o,isOpen:s,theming:a,transition:i,onClose:c})=>{const l=zn(i,"item");return r("div",{...hn({onKeyDown:({key:u})=>{switch(u){case zt.ESC:qt(c,{key:u,reason:Hn.CANCEL});break}},onBlur:u=>{s&&!u.currentTarget.contains(u.relatedTarget)&&qt(c,{reason:Hn.BLUR})}},n),className:pe({block:ol,modifiers:it(()=>({theme:a,itemTransition:l}),[a,l]),className:t}),style:{position:"absolute",...n?.style},ref:e,children:o})},fl=()=>{let t,e=0;return{toggle:n=>{n?e++:e--,e=Math.max(e,0)},on:(n,o,s)=>{e?t||(t=setTimeout(()=>{t=0,o()},n)):s?.()},off:()=>{t&&(clearTimeout(t),t=0)}}},pl=t=>{const[e,n]=H(),s=N({items:[],hoverIndex:-1,sorted:!1}).current,a=yt((c,l)=>{const{items:h}=s;if(!c)s.items=[];else if(l)h.push(c);else{const d=h.indexOf(c);d>-1&&(h.splice(d,1),c.contains(document.activeElement)&&(t.current.focus(bo),n()))}s.hoverIndex=-1,s.sorted=!1},[s,t]),i=yt((c,l,h)=>{const{items:d,hoverIndex:u}=s,f=()=>{if(s.sorted)return;const g=t.current.querySelectorAll(".szh-menu__item");d.sort((v,b)=>$i(g,v)-$i(g,b)),s.sorted=!0};let p=-1,m;switch(c){case Et.RESET:break;case Et.SET:m=l;break;case Et.UNSET:m=g=>g===l?void 0:g;break;case Et.FIRST:f(),p=0,m=d[p];break;case Et.LAST:f(),p=d.length-1,m=d[p];break;case Et.SET_INDEX:f(),p=h,m=d[p];break;case Et.INCREASE:f(),p=u,p<0&&(p=d.indexOf(l)),p++,p>=d.length&&(p=0),m=d[p];break;case Et.DECREASE:f(),p=u,p<0&&(p=d.indexOf(l)),p--,p<0&&(p=d.length-1),m=d[p];break;default:}m||(p=-1),n(m),s.hoverIndex=p},[t,s]);return{hoverItem:e,dispatch:i,updateItems:a}},Oi=(t,e)=>Math.round(t)===e?t:e,Ys=t=>{const e=t.getBoundingClientRect();return e.width=Oi(e.width,t.offsetWidth),e.height=Oi(e.height,t.offsetHeight),e},ml=(t,e,n,o)=>{const s=Ys(e),a=t.getBoundingClientRect(),i=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=rl(o),l=m=>m+a.left-i.left-c.left,h=m=>m+a.left+s.width-i.right+c.right,d=m=>m+a.top-i.top-c.top,u=m=>m+a.top+s.height-i.bottom+c.bottom;return{menuRect:s,containerRect:a,getLeftOverflow:l,getRightOverflow:h,getTopOverflow:d,getBottomOverflow:u,confineHorizontally:m=>{let g=l(m);if(g<0)m-=g;else{const v=h(m);v>0&&(m-=v,g=l(m),g<0&&(m-=g))}return m},confineVertically:m=>{let g=d(m);if(g<0)m-=g;else{const v=u(m);v>0&&(m-=v,g=d(m),g<0&&(m-=g))}return m}}},gl=({arrowRef:t,menuY:e,anchorRect:n,containerRect:o,menuRect:s})=>{let a=n.top-o.top-e+n.height/2;const i=t.current.offsetHeight*1.25;return a=Math.max(i,a),a=Math.min(a,s.height-i),a},vl=({anchorRect:t,containerRect:e,menuRect:n,placeLeftorRightY:o,placeLeftX:s,placeRightX:a,getLeftOverflow:i,getRightOverflow:c,confineHorizontally:l,confineVertically:h,arrowRef:d,arrow:u,direction:f,position:p})=>{let m=f,g=o;p!=="initial"&&(g=h(g),p==="anchor"&&(g=Math.min(g,t.bottom-e.top),g=Math.max(g,t.top-e.top-n.height)));let v,b,k;return m==="left"?(v=s,p!=="initial"&&(b=i(v),b<0&&(k=c(a),(k<=0||-b>k)&&(v=a,m="right")))):(v=a,p!=="initial"&&(k=c(v),k>0&&(b=i(s),(b>=0||-b<k)&&(v=s,m="left")))),p==="auto"&&(v=l(v)),{arrowY:u?gl({menuY:g,arrowRef:d,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:v,y:g,computedDirection:m}},yl=({arrowRef:t,menuX:e,anchorRect:n,containerRect:o,menuRect:s})=>{let a=n.left-o.left-e+n.width/2;const i=t.current.offsetWidth*1.25;return a=Math.max(i,a),a=Math.min(a,s.width-i),a},bl=({anchorRect:t,containerRect:e,menuRect:n,placeToporBottomX:o,placeTopY:s,placeBottomY:a,getTopOverflow:i,getBottomOverflow:c,confineHorizontally:l,confineVertically:h,arrowRef:d,arrow:u,direction:f,position:p})=>{let m=f==="top"?"top":"bottom",g=o;p!=="initial"&&(g=l(g),p==="anchor"&&(g=Math.min(g,t.right-e.left),g=Math.max(g,t.left-e.left-n.width)));let v,b,k;return m==="top"?(v=s,p!=="initial"&&(b=i(v),b<0&&(k=c(a),(k<=0||-b>k)&&(v=a,m="bottom")))):(v=a,p!=="initial"&&(k=c(v),k>0&&(b=i(s),(b>=0||-b<k)&&(v=s,m="top")))),p==="auto"&&(v=h(v)),{arrowX:u?yl({menuX:g,arrowRef:d,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:g,y:v,computedDirection:m}},wl=({arrow:t,align:e,direction:n,gap:o,shift:s,position:a,anchorRect:i,arrowRef:c,positionHelpers:l})=>{const{menuRect:h,containerRect:d}=l,u=n==="left"||n==="right";let f=u?o:s,p=u?s:o;if(t){const _=c.current;u?f+=_.offsetWidth:p+=_.offsetHeight}const m=i.left-d.left-h.width-f,g=i.right-d.left+f,v=i.top-d.top-h.height-p,b=i.bottom-d.top+p;let k,S;e==="end"?(k=i.right-d.left-h.width,S=i.bottom-d.top-h.height):e==="center"?(k=i.left-d.left-(h.width-i.width)/2,S=i.top-d.top-(h.height-i.height)/2):(k=i.left-d.left,S=i.top-d.top),k+=f,S+=p;const C={...l,anchorRect:i,placeLeftX:m,placeRightX:g,placeLeftorRightY:S,placeTopY:v,placeBottomY:b,placeToporBottomX:k,arrowRef:c,arrow:t,direction:n,position:a};switch(n){case"left":case"right":return vl(C);case"top":case"bottom":default:return bl(C)}},sn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?ke:q;function Fi(t,e){typeof t=="function"?t(e):t.current=e}const fn=(t,e)=>it(()=>t?e?n=>{Fi(t,n),Fi(e,n)}:t:e,[t,e]),Bi=-9999,Xs=({ariaLabel:t,menuClassName:e,menuStyle:n,arrow:o,arrowProps:s={},anchorPoint:a,anchorRef:i,containerRef:c,containerProps:l,externalRef:h,parentScrollingRef:d,align:u="start",direction:f="bottom",position:p="auto",overflow:m="visible",setDownOverflow:g,repositionFlag:v,captureFocus:b=!0,state:k,endTransition:S,isDisabled:C,menuItemFocus:_,gap:T=0,shift:E=0,children:w,onClose:I,focusProps:P,...L})=>{const[A,$]=H({x:Bi,y:Bi}),[R,W]=H({}),[B,Y]=H(),[et,ct]=H(f),[nt]=H(fl),[V,st]=jo(X=>X+1,1),{transition:J,boundingBoxRef:Tt,boundingBoxPadding:Pt,rootMenuRef:$t,rootAnchorRef:dt,scrollNodesRef:le,reposition:ne,viewScroll:re,submenuCloseDelay:K}=It(xr),{submenuCtx:ft,reposSubmenu:Dt=v}=It(br),At=N(),Ft=N(),jt=N(!1),{hoverItem:tt,dispatch:rt,updateItems:lt}=pl(At),gt=Vo(k),Zt=zn(J,"open"),bt=zn(J,"close"),O=le.current,G=X=>{switch(X.key){case zt.HOME:rt(Et.FIRST);break;case zt.END:rt(Et.LAST);break;case zt.UP:rt(Et.DECREASE,tt);break;case zt.DOWN:rt(Et.INCREASE,tt);break;case zt.SPACE:X.target&&X.target.className.indexOf(fe)!==-1&&X.preventDefault();return;default:return}X.preventDefault(),X.stopPropagation()},U=()=>{k==="closing"&&Y(),qt(S)},wt=X=>{X.stopPropagation(),nt.on(K,()=>{rt(Et.RESET),At.current.focus(bo)})},Mt=X=>{X.target===X.currentTarget&&nt.off()},pt=yt(X=>{const St=At.current,Nt=c.current;if(!St||!Nt)return;const Ot=i?i.current?.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(!Ot)return;O.menu||(O.menu=(Tt?Tt.current:Zr($t.current))||window);const kt=ml(Nt,St,O.menu,Pt);let{arrowX:Oe,arrowY:pn,x:Ir,y:mt,computedDirection:mn}=wl({arrow:o,align:u,direction:f,gap:T,shift:E,position:p,anchorRect:Ot,arrowRef:Ft,positionHelpers:kt});const{menuRect:me}=kt,ie=me.height;if(!X&&m!=="visible"){const{getTopOverflow:Lr,getBottomOverflow:te}=kt;let se,Gt;const Xe=te(mt);if(Xe>0)se=ie-Xe,Gt=Xe;else{const Ee=Lr(mt);Ee<0&&(se=ie+Ee,Gt=0-Ee,se>=0&&(mt-=Ee))}se>=0&&Y({height:se,overflowAmt:Gt})}o&&W({x:Oe,y:pn}),$({x:Ir,y:mt}),ct(mn)},[o,u,Pt,f,T,E,p,m,a,i,c,Tt,$t,O]);sn(()=>{gt&&(pt(),jt.current&&st()),jt.current=gt},[gt,pt,Dt]),sn(()=>{B&&!g&&(At.current.scrollTop=0)},[B,g]),sn(()=>lt,[lt]),q(()=>{let{menu:X}=O;if(!gt||!X)return;if(X=X.addEventListener?X:window,!O.anchors){O.anchors=[];let kt=Zr(dt&&dt.current);for(;kt&&kt!==X;)O.anchors.push(kt),kt=Zr(kt)}let St=re;if(O.anchors.length&&St==="initial"&&(St="auto"),St==="initial")return;const Nt=()=>{St==="auto"?yo(()=>pt(!0)):qt(I,{reason:Hn.SCROLL})},Ot=O.anchors.concat(re!=="initial"?X:[]);return Ot.forEach(kt=>kt.addEventListener("scroll",Nt)),()=>Ot.forEach(kt=>kt.removeEventListener("scroll",Nt))},[dt,O,gt,I,re,pt]);const xt=!!B&&B.overflowAmt>0;q(()=>{if(xt||!gt||!d)return;const X=()=>yo(pt),St=d.current;return St.addEventListener("scroll",X),()=>St.removeEventListener("scroll",X)},[gt,xt,d,pt]),q(()=>{if(!gt||typeof ResizeObserver!="function"||ne==="initial")return;const X=[],St=new ResizeObserver(kt=>kt.forEach(({target:Oe})=>{X.indexOf(Oe)<0?X.push(Oe):vc(()=>{pt(),st()})})),Nt={box:"border-box"};St.observe(At.current,Nt);const Ot=i?.current;return Ot&&St.observe(Ot,Nt),()=>St.disconnect()},[gt,ne,i,pt]),q(()=>{if(!gt){rt(Et.RESET),bt||Y();return}const{position:X,alwaysUpdate:St}=_||{},Nt=()=>{X===on.FIRST?rt(Et.FIRST):X===on.LAST?rt(Et.LAST):X>=-1&&rt(Et.SET_INDEX,void 0,X)};if(St)Nt();else if(b){const Ot=setTimeout(()=>{const kt=At.current;kt&&!kt.contains(document.activeElement)&&(kt.focus(bo),Nt())},Zt?170:100);return()=>clearTimeout(Ot)}},[gt,Zt,bt,b,_,rt]);const Rt=it(()=>({isParentOpen:gt,submenuCtx:nt,dispatch:rt,updateItems:lt}),[gt,nt,rt,lt]);let vt,Vt;B&&(g?Vt=B.overflowAmt:vt=B.height);const Z=it(()=>({reposSubmenu:V,submenuCtx:nt,overflow:m,overflowAmt:Vt,parentMenuRef:At,parentDir:et}),[V,nt,m,Vt,et]),_t=vt>=0?{maxHeight:vt,overflow:m}:void 0,Ht=it(()=>({state:k,align:u,dir:et}),[k,u,et]),oe=it(()=>({dir:et}),[et]),Jt=pe({block:fe,element:il,modifiers:oe,className:s.className}),Ce=r("ul",{role:"menu","aria-label":t,...Ar(C),...hn({onPointerEnter:ft?.off,onPointerMove:wt,onPointerLeave:Mt,onKeyDown:G,onAnimationEnd:U},L),ref:fn(h,At),className:pe({block:fe,modifiers:Ht,className:e}),style:{...n,..._t,margin:0,display:k==="closed"?"none":void 0,position:Ni,left:A.x,top:A.y},children:[o&&r("li",{"aria-hidden":!0,...s,className:Jt,style:{display:"block",position:Ni,left:R.x,top:R.y,...s.style},ref:Ft}),r(br.Provider,{value:Z,children:r(Yo.Provider,{value:Rt,children:r(Gs.Provider,{value:tt,children:qt(w,Ht)})})})]});return l?r(hl,{...l,isOpen:gt,children:Ce}):Ce},Qs=Re(function({"aria-label":e,className:n,containerProps:o,initialMounted:s,unmountOnClose:a,transition:i,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:h,reposition:d="auto",submenuOpenDelay:u=300,submenuCloseDelay:f=150,viewScroll:p="initial",portal:m,theming:g,onItemClick:v,...b},k){const S=N(null),C=N({}),{anchorRef:_,state:T,onClose:E}=b,w=it(()=>({initialMounted:s,unmountOnClose:a,transition:i,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:h,rootMenuRef:S,rootAnchorRef:_,scrollNodesRef:C,reposition:d,viewScroll:p,submenuOpenDelay:u,submenuCloseDelay:f}),[s,a,i,c,_,l,h,d,p,u,f]),I=it(()=>({handleClick(L,A){L.stopPropagation||qt(v,L);let $=L.keepOpen;$===void 0&&($=A&&L.key===zt.SPACE),$||qt(E,{value:L.value,key:L.key,reason:Hn.CLICK})},handleClose(L){qt(E,{key:L,reason:Hn.CLICK})}}),[v,E]);if(!T)return null;const P=r(xr.Provider,{value:w,children:r(Xo.Provider,{value:I,children:r(Xs,{...b,ariaLabel:e||"Menu",externalRef:k,containerRef:S,containerProps:{className:n,containerRef:S,containerProps:o,theming:g,transition:i,onClose:E}})})});return m===!0&&typeof document<"u"?gr(P,document.body):m?m.target?gr(P,m.target):m.stablePosition?null:P:P}),wo=0,_o=1,wr=2,_r=3,kr=4,_l=5,Js=6,kl=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],ta=t=>({_s:t,status:kl[t],isEnter:t<_r,isMounted:t!==Js,isResolved:t===wr||t>kr}),ko=t=>t?Js:_l,Tl=(t,e)=>{switch(t){case _o:case wo:return wr;case kr:case _r:return ko(e)}},Sl=t=>typeof t=="object"?[t.enter,t.exit]:[t,t],Cl=(t,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||t(e+1)},0),zi=(t,e,n,o,s)=>{clearTimeout(o.current);const a=ta(t);e(a),n.current=a,s&&s({current:a})},El=({enter:t=!0,exit:e=!0,preEnter:n,preExit:o,timeout:s,initialEntered:a,mountOnEnter:i,unmountOnExit:c,onStateChange:l}={})=>{const[h,d]=H(()=>ta(a?wr:ko(i))),u=N(h),f=N(),[p,m]=Sl(s),g=yt(()=>{const b=Tl(u.current._s,c);b&&zi(b,d,u,f,l)},[l,c]),v=yt(b=>{const k=C=>{switch(zi(C,d,u,f,l),C){case _o:p>=0&&(f.current=setTimeout(g,p));break;case kr:m>=0&&(f.current=setTimeout(g,m));break;case wo:case _r:f.current=Cl(k,C);break}},S=u.current.isEnter;typeof b!="boolean"&&(b=!S),b?!S&&k(t?n?wo:_o:wr):S&&k(e?o?_r:kr:ko(c))},[g,l,t,e,n,o,p,m,c]);return[h,v,g]};const Al=({initialOpen:t,initialMounted:e,unmountOnClose:n,transition:o,transitionTimeout:s=500,onMenuChange:a}={})=>{const i=zn(o,"open"),c=zn(o,"close"),[{status:l},h,d]=El({initialEntered:t,mountOnEnter:!e,unmountOnExit:n,timeout:s,enter:i,exit:c,onStateChange:yt(({current:{isEnter:u,isResolved:f}})=>{!a||u&&i&&f||!u&&c&&f||a({open:u})},[a,i,c])});return[{state:dl[l],endTransition:d},h]},ea=t=>{const[e,n]=Al(t),[o,s]=H(),a=(i,c)=>{s({position:i,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:o,...e},n,a]},xl=(t,e)=>{const[n]=H({});return{onMouseDown:()=>{n.v=t&&t!=="closed"},onClick:o=>n.v?n.v=!1:e(!0,o)}},Ml=parseInt(yc)<19,Il=Re(function({"aria-label":e,captureFocus:n,initialOpen:o,menuButton:s,instanceRef:a,onMenuChange:i,...c},l){const[h,d,u]=ea({...c,onMenuChange:i}),{state:f}=h,p=Vo(f),m=N(null),g=xl(f,(_,T)=>u(T.detail?void 0:on.FIRST)),v=yt(_=>{d(!1),_.key&&m.current.focus()},[d]),b=_=>{switch(_.key){case zt.UP:u(on.LAST);break;case zt.DOWN:u(on.FIRST);break;default:return}_.preventDefault()},k=qt(s,{open:p});if(!k||!k.type)throw new Error("Menu requires a menuButton prop.");const S={...hn({onKeyDown:b,...g},k.props),ref:fn(Ml?k.ref:k.props.ref,m)};nl(k.type)==="MenuButton"&&(S.isOpen=p);const C=Fs(k,S);return Bs(a,()=>({openMenu:u,closeMenu:()=>d(!1)})),r(F,{children:[C,r(Qs,{...c,...h,"aria-label":e||(typeof k.props.children=="string"?k.props.children:"Menu"),anchorRef:m,ref:l,onClose:v})]})}),ti=(t,e)=>{const n=$e(e),o=Re((s,a)=>{const i=N(null);return r(n,{...s,itemRef:i,externalRef:a,isHovering:It(Gs)===i.current})});return o.displayName=`WithHovering(${t})`,o},na=t=>{const[e,n]=H(!1);return q(()=>{!t&&n(!1)},[t]),[e,()=>!e&&n(!0),()=>n(!1)]},ra=(t,e,n)=>{sn(()=>{if(t)return;const o=e.current;return n(o,!0),()=>{n(o)}},[t,e,n])},Ll=ti("SubMenu",function({"aria-label":e,className:n,disabled:o,direction:s,label:a,openTrigger:i,onMenuChange:c,isHovering:l,instanceRef:h,itemRef:d,captureFocus:u,repositionFlag:f,itemProps:p={},portal:m=!1,...g}){const v=It(xr),{rootMenuRef:b,submenuOpenDelay:k,submenuCloseDelay:S}=v,{parentMenuRef:C,parentDir:_,overflow:T}=It(br),{isParentOpen:E,submenuCtx:w,dispatch:I,updateItems:P}=It(Yo),L=m||T!=="visible",[A,$,R]=ea({...v,onMenuChange:c}),[W,B,Y]=na(l),{state:et}=A,ct=!!o,nt=Vo(et),V=N(null),[st]=H({v:0}),J=()=>{w.off(),st.v&&(clearTimeout(st.v),st.v=0)},Tt=(...tt)=>{J(),Pt(),!ct&&R(...tt)},Pt=()=>!l&&!ct&&I(Et.SET,d.current),$t=tt=>{Pt(),i||(st.v=setTimeout(()=>yo(Tt),Math.max(tt,0)))},dt=tt=>{ct||(tt.stopPropagation(),B(),!(st.v||nt)&&w.on(S,()=>$t(k-S),()=>$t(k)))},le=()=>{Y(),J(),nt||I(Et.UNSET,d.current)},ne=tt=>{if(l)switch(tt.key){case zt.ENTER:tt.preventDefault();case zt.SPACE:case zt.RIGHT:i!=="none"&&Tt(on.FIRST)}},re=tt=>{let rt=!1;switch(tt.key){case zt.LEFT:nt&&(d.current.focus(),$(!1),rt=!0);break;case zt.RIGHT:nt||(rt=!0);break}rt&&(tt.preventDefault(),tt.stopPropagation())};ra(ct,d,P),q(()=>w.toggle(nt),[w,nt]),q(()=>()=>{clearTimeout(st.v),w.toggle(!1)},[st,w]),q(()=>{l&&E?d.current.focus():$(!1)},[l,E,$,d]),Bs(h,()=>({openMenu:(...tt)=>{E&&Tt(...tt)},closeMenu:()=>{nt&&(d.current.focus(),$(!1))}}));const K=it(()=>({open:nt,hover:W||l,disabled:ct,submenu:!0}),[nt,l,ct,W]),{ref:ft,className:Dt,...At}=p,Ft=hn({onPointerEnter:w.off,onPointerMove:dt,onPointerLeave:le,onKeyDown:ne,onClick:()=>i!=="none"&&Tt()},At),jt=()=>{const tt=r(Xs,{...g,...A,ariaLabel:e||(typeof a=="string"?a:"Submenu"),anchorRef:d,containerRef:L?b:V,direction:s||(_==="right"||_==="left"?_:"right"),parentScrollingRef:L&&C,isDisabled:ct}),rt=b.current;return L&&rt?gr(tt,rt):tt};return r("li",{className:pe({block:fe,element:ll,className:n}),style:{position:"relative"},role:Qo,ref:V,onKeyDown:re,children:[r("div",{role:Jo,"aria-haspopup":!0,"aria-expanded":nt,...Ar(ct,l),...Ft,ref:fn(ft,d),className:pe({block:fe,element:Go,modifiers:K,className:Dt}),children:it(()=>qt(a,K),[a,K])}),et&&jt()]})}),oa=(t,e,n,o)=>{const[s,a,i]=na(n),{submenuCloseDelay:c}=It(xr),{isParentOpen:l,submenuCtx:h,dispatch:d,updateItems:u}=It(Yo),f=()=>{!n&&!o&&d(Et.SET,t.current)},p=()=>{!o&&d(Et.UNSET,t.current)},m=b=>{n&&!b.currentTarget.contains(b.relatedTarget)&&p()},g=b=>{o||(b.stopPropagation(),a(),h.on(c,f,f))},v=(b,k)=>{i(),h.off(),!k&&p()};return ra(o,t,u),q(()=>{n&&l&&e.current&&e.current.focus()},[e,n,l]),{mouseOver:s,setHover:f,onBlur:m,onPointerMove:g,onPointerLeave:v}},ut=ti("MenuItem",function({className:e,value:n,href:o,type:s,checked:a,disabled:i,children:c,onClick:l,isHovering:h,itemRef:d,externalRef:u,...f}){const p=!!i,{mouseOver:m,setHover:g,...v}=oa(d,d,h,p),b=It(Xo),k=It(ul),S=s==="radio",C=s==="checkbox",_=!!o&&!p&&!S&&!C,T=S?k.value===n:C?!!a:!1,E=A=>{if(p){A.stopPropagation(),A.preventDefault();return}const $={value:n,syntheticEvent:A};A.key!==void 0&&($.key=A.key),C&&($.checked=!T),S&&($.name=k.name),qt(l,$),S&&qt(k.onRadioChange,$),b.handleClick($,C||S)},w=A=>{if(h)switch(A.key){case zt.ENTER:A.preventDefault();case zt.SPACE:_?d.current.click():E(A)}},I=it(()=>({type:s,disabled:p,hover:m||h,checked:T,anchor:_}),[s,p,m,h,T,_]),P=hn({...v,onPointerDown:g,onKeyDown:w,onClick:E},f),L={role:S?"menuitemradio":C?"menuitemcheckbox":Jo,"aria-checked":S||C?T:void 0,...Ar(p,h),...P,ref:fn(u,d),className:pe({block:fe,element:Go,modifiers:I,className:e}),children:it(()=>qt(c,I),[c,I])};return _?r("li",{role:Qo,children:r("a",{href:o,...L})}):r("li",{...L})}),Pl=ti("FocusableItem",function({className:e,disabled:n,children:o,isHovering:s,itemRef:a,externalRef:i,...c}){const l=!!n,h=N(null),{mouseOver:d,setHover:u,onPointerLeave:f,...p}=oa(a,h,s,l),{handleClose:m}=It(Xo),g=it(()=>({disabled:l,hover:d||s,focusable:!0}),[l,s,d]),v=it(()=>qt(o,{...g,ref:h,closeMenu:m}),[o,g,m]),b=hn({...p,onPointerLeave:k=>f(k,!0),onFocus:u},c);return r("li",{role:Jo,...Ar(l),...b,ref:fn(i,a),className:pe({block:fe,element:Go,modifiers:g,className:e}),children:v})}),Tn=$e(Re(function({className:e,...n},o){return r("li",{role:"separator",...n,ref:o,className:pe({block:fe,element:sl,className:e})})})),Iy=$e(Re(function({className:e,...n},o){return r("li",{role:Qo,...n,ref:o,className:pe({block:fe,element:al,className:e})})})),Ly=Re(function({className:e,style:n,takeOverflow:o,...s},a){const i=N(null),[c,l]=H(),{overflow:h,overflowAmt:d}=It(br);return sn(()=>{let u;o&&d>=0&&(u=Ys(i.current).height-d,u<0&&(u=0)),l(u>=0?{maxHeight:u,overflow:h}:void 0)},[o,h,d]),sn(()=>{c&&(i.current.scrollTop=0)},[c]),r("div",{...s,ref:fn(a,i),className:pe({block:fe,element:cl,className:e}),style:{...n,...c}})});var Dn=(t=>(t.Mouse="mouse",t.Touch="touch",t.Pointer="pointer",t))(Dn||{}),Rn=(t=>(t.CancelledByMovement="cancelled-by-movement",t.CancelledByRelease="cancelled-by-release",t.CancelledOutsideElement="cancelled-outside-element",t))(Rn||{});const Dl=["mousedown","mousemove","mouseup","mouseleave","mouseout"],Rl=["touchstart","touchmove","touchend","touchcancel"],$l=["pointerdown","pointermove","pointerup","pointerleave","pointerout"];function Nl(t){return typeof t=="object"&&t!==null&&"pageX"in t&&typeof t.pageX=="number"&&"pageY"in t&&typeof t.pageY=="number"}function Ol(t){var e;return Dl.includes((e=t?.nativeEvent)==null?void 0:e.type)}function ia(t){var e;return Rl.includes((e=t?.nativeEvent)==null?void 0:e.type)||"touches"in t}function Fl(t){const{nativeEvent:e}=t;return e?$l.includes(e?.type)||"pointerId"in e:!1}function Vr(t){return Ol(t)||ia(t)||Fl(t)}function Hi(t){var e;const n=ia(t)?(e=t?.touches)==null?void 0:e[0]:t;return Nl(n)?{x:n.pageX,y:n.pageY}:null}function Bl(t){return{target:t.target,currentTarget:t.currentTarget,nativeEvent:t,persist:()=>{}}}function sa(t,{threshold:e=400,captureEvent:n=!1,detect:o=Dn.Pointer,cancelOnMovement:s=!1,cancelOutsideElement:a=!0,filterEvents:i,onStart:c,onMove:l,onFinish:h,onCancel:d}={}){const u=N(!1),f=N(!1),p=N(),m=N(),g=N(t),v=N(null),b=yt(_=>T=>{f.current||Vr(T)&&(i!==void 0&&!i(T)||(n&&T.persist(),c?.(T,{context:_}),v.current=Hi(T),f.current=!0,p.current=T.currentTarget,m.current=setTimeout(()=>{g.current&&(g.current(T,{context:_}),u.current=!0)},e)))},[n,i,c,e]),k=yt(_=>(T,E)=>{Vr(T)&&f.current&&(v.current=null,n&&T.persist(),u.current?h?.(T,{context:_}):f.current&&d?.(T,{context:_,reason:E??Rn.CancelledByRelease}),u.current=!1,f.current=!1,m.current!==void 0&&clearTimeout(m.current))},[n,h,d]),S=yt(_=>T=>{if(Vr(T)&&(l?.(T,{context:_}),s!==!1&&v.current)){const E=Hi(T);if(E){const w=s===!0?25:s,I={x:Math.abs(E.x-v.current.x),y:Math.abs(E.y-v.current.y)};(I.x>w||I.y>w)&&k(_)(T,Rn.CancelledByMovement)}}},[k,s,l]),C=yt(_=>{if(t===null)return{};switch(o){case Dn.Mouse:{const T={onMouseDown:b(_),onMouseMove:S(_),onMouseUp:k(_)};return a&&(T.onMouseLeave=E=>{k(_)(E,Rn.CancelledOutsideElement)}),T}case Dn.Touch:return{onTouchStart:b(_),onTouchMove:S(_),onTouchEnd:k(_)};case Dn.Pointer:{const T={onPointerDown:b(_),onPointerMove:S(_),onPointerUp:k(_)};return a&&(T.onPointerLeave=E=>k(_)(E,Rn.CancelledOutsideElement)),T}}},[t,k,a,o,S,b]);return q(()=>{function _(T){const E=Bl(T);k()(E)}return window.addEventListener("mouseup",_),window.addEventListener("touchend",_),window.addEventListener("pointerup",_),()=>{window.removeEventListener("mouseup",_),window.removeEventListener("touchend",_),window.removeEventListener("pointerup",_)}},[k]),q(()=>()=>{m.current!==void 0&&clearTimeout(m.current)},[]),q(()=>{g.current=t},[t]),C}const Ki="dtflocale";function zl(){try{const t=go.session.get(Ki);if(t)return t;const e=new Intl.DateTimeFormat().resolvedOptions().locale;return go.session.set(Ki,e),e}catch{return null}}const aa=Wt(zl);function Hl(){const t=[...navigator.languages],e=aa();return e&&!t.includes(e)&&t.unshift(e),t}let ji=Hl();const Gr=Wt((t,e={})=>{try{return new Intl.Locale(t,e)}catch{if(!t)return null;const[o,...s]=t.split("-",4),a=s.pop()||null,i={language:o,region:a,...e,toString:()=>{const c=i.language,l=s.length>0?`-${s.join("-")}-`:"-",h=i.region;return h?`${c}${l}${h}`:c}};return i}}),Kl=(t,e)=>{const n=e,o=Gr(t);let s=null;for(const c of ji){const l=Gr(c)?.region;if(l){s=l;break}}const a=s&&o&&o.region!==s?Gr(o.language,{...o,region:s})?.toString():null,i=vr([a,t,t?.replace(/-[a-z]+$/i,"")],ji,t);try{return new Intl.DateTimeFormat(i,n)}catch{return new Intl.DateTimeFormat(void 0,n)}},To=Wt(Kl);function Kn(t,e){t instanceof Date||(t=new Date(t));const{hideTime:n,formatOpts:o,forceOpts:s}=e||{},a=new Date().getFullYear(),i=s||{year:t.getFullYear()===a?void 0:"numeric",month:"short",day:"numeric",hour:n?void 0:"numeric",minute:n?void 0:"numeric",...o};return To(Lt.locale,i).format(t)}function jl(t){const e=URL.parse("./compose/",window.location),{width:n,height:o}=window.screen,s=Math.max(0,(n-600)/2),a=Math.max(0,(o-450)/2),i=Math.min(n,600),c=Math.min(o,450),l=t?.uid||Math.random(),h=window.open(e,"compose"+l,`width=${i},height=${c},left=${s},top=${a}`);return h?h.__COMPOSE__=t:alert(Lt._({id:"4S86wI"})),h}const Ul=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function ql(){if(Ul){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 Wl=document.documentElement,tr=getComputedStyle(Wl),Zl=8;let ca=[0,0,0,0];function la(){const t=tr.getPropertyValue("--sai-top"),e=tr.getPropertyValue("--sai-right"),n=tr.getPropertyValue("--sai-bottom"),o=tr.getPropertyValue("--sai-left");ca=[Math.max(0,parseInt(t,10)),Math.max(0,parseInt(e,10)),Math.max(0,parseInt(n,10)),Math.max(0,parseInt(o,10))]}requestAnimationFrame(la);function ua(t=[]){return ca.map((n,o)=>(n||Zl)+(t[o]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",la,{passive:!0});const Ui=5e3;function Ie(t){if(t||(t=!0),z.showCompose){z.composerState.minimized?ht({duration:Ui,text:Lt._({id:"/4fHR1"})}):ht({duration:Ui,text:Lt._({id:"vvl08N"})});return}ql(),z.showCompose=t}const qi=document.createElement("template"),Vl=/<\/p>/g,Gl=/<\/li>/g,Yl=/[\r\n]{3,}/g;function ei(t,e){if(!t)return"";const{preProcess:n,truncateLinks:o=!0}=e||{};qi.innerHTML=t.replace(Vl,`</p>
`).replace(Gl,`</li>
`);const s=qi.content,a=s.querySelectorAll("br");for(let c=0;c<a.length;c++)a[c].replaceWith(`
`);if(n?.(s),o){const c=s.querySelectorAll(".invisible");for(let h=0;h<c.length;h++)c[h].remove();const l=s.querySelectorAll(".ellipsis");for(let h=0;h<l.length;h++)l[h].append("…")}let i="";for(let c=0;c<s.childNodes.length;c++){const l=s.childNodes[c];i+=l.innerText||l.textContent||""}return i.replace(Yl,`
`).trim()}function ni(t){const{spoilerText:e,content:n,poll:o,mediaAttachments:s,quote:a}=t;let i="";const c=!!a?.quotedStatus?.id;if(e?.trim()?i+=e:i+=ei(n,{preProcess:l=>{if(c){const h=l.querySelector(".quote-inline");h&&h.remove()}}}),i=i.trim(),o?.options?.length&&(i+=`
📊:
${o.options.map(l=>`${o.multiple?"▪️":"•"} ${l.title}`).join(`
`)}`),s?.length&&(i+=" "+s.map(l=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[l.type]||"").join("")),c){const l=ni(a.quotedStatus);i+=`
${l}
`}return i}const Xl={xs:8,s:12,m:16,l:20,xl:24,xxl:32},Ql=/[^a-zA-Z0-9]/g;function Jl({icon:t,size:e="m",alt:n,title:o,class:s="",style:a={}}){o=o||n;const{loadIcon:i,isIconLoaded:c}=bc();if(!t)return null;const l=Xl[e];let h=$c[t];if(!h)return null;let d,u,f=!1;Array.isArray(h)?[h,d,u]=h:typeof h=="object"&&({rotate:d,flip:u,rtl:f}=h,h=h.module);const p=o?.replace(Ql,"-"),m=`${Li}-title-${t}-${p}`;q(()=>{c(t)||i(t)},[t]);const g=c(t);return r("span",{class:`icon ${s} ${f?"rtl-flip":""}`,style:{width:`${l}px`,height:`${l}px`,...a},"data-icon":t,title:g?void 0:o||void 0,children:g&&r("svg",{width:l,height:l,role:o?"img":"presentation","aria-labelledby":m,style:{transform:`${d?`rotate(${d})`:""} ${u?"scaleX(-1)":""}`},children:[o?r("title",{id:m,children:o}):null,r("use",{href:`#${Li}-${t}`})]})})}const M=$e(Jl,(t,e)=>t.icon===e.icon&&t.title===e.title&&t.alt===e.alt),Ve=Re((t,e)=>{let n;try{n=wc()}catch{}let o=(location.hash||"").replace(/^#/,"").trim();o===""&&(o="/");const{to:s,...a}=t;if(o&&o!=="/"&&o.includes("?")){const c=URL.parse(o,location.origin);if(c?.searchParams?.size){const l=Array.from(c.searchParams.entries()).map(([h,d])=>`${h}=${encodeURIComponent(d)}`).join("&");o=c.pathname+"?"+l}}const i=o===s||decodeURIComponent(o)===s;return r("a",{ref:e,href:`#${s}`,...a,class:`${t.class||""} ${i?"is-active":""}`,onClick:c=>{c.currentTarget?.parentNode?.closest("a")&&c.stopPropagation(),n&&(z.prevLocation=n),t.onClick?.(c)}})});function Wi(t){const{className:e,disabled:n,...o}=t;return r(Pl,{className:e,disabled:n,children:({ref:s,closeMenu:a})=>r(Ve,{...o,ref:s,onClick:({detail:i})=>a(i===0?"Enter":void 0)})})}const da=Wt(t=>new Intl.RelativeTimeFormat(t||void 0));function Zi(t){if(t instanceof Date)return!isNaN(t.getTime());{const e=new Date(t);return!isNaN(e.getTime())}}const cn=60,ln=60*cn,je=24*ln,tu=t=>{const e=da(Lt.locale),n=(t.getTime()-Date.now())/1e3,o=Math.abs(n);return o<cn?e.format(Math.floor(n),"second"):o<ln?e.format(Math.floor(n/cn),"minute"):o<je?e.format(Math.floor(n/ln),"hour"):o<30*je?e.format(Math.floor(n/je),"day"):o<365*je?e.format(Math.floor(n/je/30),"month"):e.format(Math.floor(n/je/365),"year")},eu=t=>{const e=(Date.now()-t.getTime())/1e3;return e<cn?Lt._({id:"NnRCUm",values:{0:e<1?1:Math.floor(e)}}):e<ln?Lt._({id:"ZSWUwq",values:{0:Math.floor(e/cn)}}):Lt._({id:"NSSJsj",values:{0:Math.floor(e/ln)}})};function we({datetime:t,format:e}){if(!t)return null;const[n,o]=jo(l=>l+1,0),s=it(()=>new Date(t),[t]),[a,i,c]=it(()=>{if(!Zi(s))return[""+(typeof t=="string"?t:""),"",""];let l;if(e==="micro"){const h=new Date;(h.getTime()-s.getTime())/1e3/je<=1?l=eu(s):h.getFullYear()===s.getFullYear()?l=To(Lt.locale,{year:void 0,month:"short",day:"numeric"}).format(s):l=To(Lt.locale,{dateStyle:"short"}).format(s)}return l||(l=tu(s)),[l,s.toISOString(),s.toLocaleString()]},[s,e,n]);return q(()=>{if(!Zi(s))return;let l,h;function d(){h=requestAnimationFrame(()=>{o(),u()})}function u(){const f=(Date.now()-s.getTime())/1e3;f<cn?l=setTimeout(d,1e4):f<ln&&(l=setTimeout(d,6e4))}return u(),()=>{clearTimeout(l),cancelAnimationFrame(h)}},[]),r("time",{datetime:i,title:c,children:a})}function So(t){const e=N();return r(Ll,{...t,instanceRef:e,itemProps:{onPointerMove:n=>{n.pointerType==="touch"&&e.current?.openMenu?.()},onPointerLeave:n=>{n.pointerType==="touch"&&e.current?.openMenu?.()},...t.itemProps}})}function nu(t,e=[]){!t||typeof t!="function"||q(()=>{const n=new CloseWatcher;return n.addEventListener("close",t),()=>{n.destroy()}},e)}const ru=window.CloseWatcher?nu:()=>{},ou=document.getElementById("modal-container");function Vi(){return getComputedStyle(document.documentElement).getPropertyValue("--backdrop-theme-color")}function $n({children:t,onClose:e,onClick:n,class:o,minimized:s}){if(!t)return null;const a=N();q(()=>{let u=setTimeout(()=>{const f=a.current?.querySelector('[tabindex="-1"]');f&&f.focus()},100);return()=>clearTimeout(u)},[]);const i=window.CloseWatcher,c=Ke("esc",()=>{setTimeout(()=>{e?.()},0)},{enabled:!i&&!!e,keydown:!1,keyup:!0,useKey:!0,ignoreEventWhen:u=>u.metaKey||u.ctrlKey||u.altKey||u.shiftKey},[e]);ru(e,[e]),q(()=>{const u=document.querySelectorAll(".deck-container");if(s){const f=u[u.length-1];f&&f.tabIndex===-1&&f.focus()}else t?u.forEach(f=>{f.setAttribute("inert","")}):u.forEach(f=>{f.removeAttribute("inert")});return()=>{u.forEach(f=>{f.removeAttribute("inert")})}},[t,s]);const l=N(),h=N();ke(()=>{if(t&&!s)if(go.local.get("theme")){const f=Vi();l.current=document.querySelector('meta[name="theme-color"][data-theme-setting="manual"]'),l.current&&(h.current=l.current.content,l.current.content=f)}else{const f=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",p=Vi();l.current=document.querySelector(`meta[name="theme-color"][media*="${f}"]`),l.current&&(h.current=l.current.content,l.current.content=p)}else l.current&&h.current&&(l.current.content=h.current);return()=>{l.current&&h.current&&(l.current.content=h.current)}},[t,s]);const d=r("div",{ref:u=>{a.current=u,c.current=u?.querySelector?.('[tabindex="-1"]')||u},className:o,onClick:u=>{n?.(u),u.target===u.currentTarget&&e?.(u)},tabIndex:s?0:"-1",inert:s,onFocus:u=>{try{if(u.target===u.currentTarget){const f=a.current?.querySelector('[tabindex="-1"]'),p=!!f&&getComputedStyle(f)?.pointerEvents!=="none";f&&p&&f.focus()}}catch{}},children:t});return gr(d,ou)}const Gi={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},Sn={},Nn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),pr=Nn.getContext("2d",{willReadFrequently:!0});pr.imageSmoothingEnabled=!1;const iu=/missing\.png$/;function su({url:t,staticUrl:e,size:n,alt:o="",squircle:s,...a}){n=Gi[n]||n||Gi.m;const i=N(),c=iu.test(t);return r("picture",{ref:i,class:`avatar ${s?"squircle":""} ${Sn[t]?"has-alpha":""}`,style:{width:n,height:n},title:o,...a,children:[!!e&&r("source",{srcset:e,media:"(prefers-reduced-motion: reduce)"}),!!t&&r("img",{src:t,width:n,height:n,alt:o,loading:"lazy",decoding:"async",fetchPriority:"low",crossOrigin:Sn[t]===void 0&&!c?"anonymous":void 0,onError:l=>{l.target.crossOrigin&&(l.target.crossOrigin=null,l.target.src=t)},onLoad:l=>{i.current&&(i.current.dataset.loaded=!0),Sn[t]===void 0&&(c||setTimeout(()=>{try{const{width:h,height:d}=l.target;Nn.width!==h&&(Nn.width=h),Nn.height!==d&&(Nn.height=d),pr.drawImage(l.target,0,0);const u=pr.getImageData(0,0,h,d),f=u.data.filter((p,m)=>m%4===3&&p<=128).length/(u.data.length/4)>.1;f&&i.current.classList.add("has-alpha"),Sn[t]=f,pr.clearRect(0,0,h,d)}catch{Sn[t]=!1}},1))}})]})}const _e=Wt(su);let Co=!1;const au=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="attributes"){const{dir:n}=e.target;n==="rtl"?Co=!0:Co=!1}})});au.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function Tr(){return Co}function cu(){const[t,e]=H({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 Eo(t){const{containerProps:e,instanceRef:n,align:o}=t,s=cu(),a=n?.current?n:N(),i=Tr()?o==="end"?"start":o==="start"?"end":o:o;return r(Il,{boundingBoxPadding:ua(),repositionFlag:`${s.width}x${s.height}`,unmountOnClose:!0,...t,align:i,instanceRef:a,containerProps:{onClick:c=>{c.target===c.currentTarget&&a.current?.closeMenu?.(),e?.onClick?.(c)},...e}})}function er({subMenu:t=!1,confirm:e=!0,confirmLabel:n,menuItemClassName:o,menuFooter:s,menuExtras:a,...i}){const{children:c,onClick:l,...h}=i;return e?r(t?So:Eo,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...h,menuButton:t?void 0:c,label:t?c:void 0,children:[r(ut,{className:o,onClick:l,children:n}),a,s]}):t?r(ut,{...i}):l?_c(c,{onClick:l}):c}var ge={},Yr={},ve={},Yi;function ha(){if(Yi)return ve;Yi=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.loop=ve.conditional=ve.parse=void 0;var t=function o(s,a){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:i;if(Array.isArray(a))a.forEach(function(h){return o(s,h,i,c)});else if(typeof a=="function")a(s,i,c,o);else{var l=Object.keys(a)[0];Array.isArray(a[l])?(c[l]={},o(s,a[l],i,c[l])):c[l]=a[l](s,i,c,o)}return i};ve.parse=t;var e=function(s,a){return function(i,c,l,h){a(i,c,l)&&h(i,s,c,l)}};ve.conditional=e;var n=function(s,a){return function(i,c,l,h){for(var d=[],u=i.pos;a(i,c,l);){var f={};if(h(i,s,c,f),i.pos===u)break;u=i.pos,d.push(f)}return d}};return ve.loop=n,ve}var Ct={},Xi;function fa(){if(Xi)return Ct;Xi=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.readBits=Ct.readArray=Ct.readUnsigned=Ct.readString=Ct.peekBytes=Ct.readBytes=Ct.peekByte=Ct.readByte=Ct.buildStream=void 0;var t=function(u){return{data:u,pos:0}};Ct.buildStream=t;var e=function(){return function(u){return u.data[u.pos++]}};Ct.readByte=e;var n=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return function(f){return f.data[f.pos+u]}};Ct.peekByte=n;var o=function(u){return function(f){return f.data.subarray(f.pos,f.pos+=u)}};Ct.readBytes=o;var s=function(u){return function(f){return f.data.subarray(f.pos,f.pos+u)}};Ct.peekBytes=s;var a=function(u){return function(f){return Array.from(o(u)(f)).map(function(p){return String.fromCharCode(p)}).join("")}};Ct.readString=a;var i=function(u){return function(f){var p=o(2)(f);return u?(p[1]<<8)+p[0]:(p[0]<<8)+p[1]}};Ct.readUnsigned=i;var c=function(u,f){return function(p,m,g){for(var v=typeof f=="function"?f(p,m,g):f,b=o(u),k=new Array(v),S=0;S<v;S++)k[S]=b(p);return k}};Ct.readArray=c;var l=function(u,f,p){for(var m=0,g=0;g<p;g++)m+=u[f+g]&&Math.pow(2,p-g-1);return m},h=function(u){return function(f){for(var p=e()(f),m=new Array(8),g=0;g<8;g++)m[7-g]=!!(p&1<<g);return Object.keys(u).reduce(function(v,b){var k=u[b];return k.length?v[b]=l(m,k.index,k.length):v[b]=m[k.index],v},{})}};return Ct.readBits=h,Ct}var Qi;function lu(){return Qi||(Qi=1,(function(t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=ha(),n=fa(),o={blocks:function(f){for(var p=0,m=[],g=f.data.length,v=0,b=(0,n.readByte)()(f);b!==p&&b;b=(0,n.readByte)()(f)){if(f.pos+b>=g){var k=g-f.pos;m.push((0,n.readBytes)(k)(f)),v+=k;break}m.push((0,n.readBytes)(b)(f)),v+=b}for(var S=new Uint8Array(v),C=0,_=0;_<m.length;_++)S.set(m[_],C),C+=m[_].length;return S}},s=(0,e.conditional)({gce:[{codes:(0,n.readBytes)(2)},{byteSize:(0,n.readByte)()},{extras:(0,n.readBits)({future:{index:0,length:3},disposal:{index:3,length:3},userInput:{index:6},transparentColorGiven:{index:7}})},{delay:(0,n.readUnsigned)(!0)},{transparentColorIndex:(0,n.readByte)()},{terminator:(0,n.readByte)()}]},function(u){var f=(0,n.peekBytes)(2)(u);return f[0]===33&&f[1]===249}),a=(0,e.conditional)({image:[{code:(0,n.readByte)()},{descriptor:[{left:(0,n.readUnsigned)(!0)},{top:(0,n.readUnsigned)(!0)},{width:(0,n.readUnsigned)(!0)},{height:(0,n.readUnsigned)(!0)},{lct:(0,n.readBits)({exists:{index:0},interlaced:{index:1},sort:{index:2},future:{index:3,length:2},size:{index:5,length:3}})}]},(0,e.conditional)({lct:(0,n.readArray)(3,function(u,f,p){return Math.pow(2,p.descriptor.lct.size+1)})},function(u,f,p){return p.descriptor.lct.exists}),{data:[{minCodeSize:(0,n.readByte)()},o]}]},function(u){return(0,n.peekByte)()(u)===44}),i=(0,e.conditional)({text:[{codes:(0,n.readBytes)(2)},{blockSize:(0,n.readByte)()},{preData:function(f,p,m){return(0,n.readBytes)(m.text.blockSize)(f)}},o]},function(u){var f=(0,n.peekBytes)(2)(u);return f[0]===33&&f[1]===1}),c=(0,e.conditional)({application:[{codes:(0,n.readBytes)(2)},{blockSize:(0,n.readByte)()},{id:function(f,p,m){return(0,n.readString)(m.blockSize)(f)}},o]},function(u){var f=(0,n.peekBytes)(2)(u);return f[0]===33&&f[1]===255}),l=(0,e.conditional)({comment:[{codes:(0,n.readBytes)(2)},o]},function(u){var f=(0,n.peekBytes)(2)(u);return f[0]===33&&f[1]===254}),h=[{header:[{signature:(0,n.readString)(3)},{version:(0,n.readString)(3)}]},{lsd:[{width:(0,n.readUnsigned)(!0)},{height:(0,n.readUnsigned)(!0)},{gct:(0,n.readBits)({exists:{index:0},resolution:{index:1,length:3},sort:{index:4},size:{index:5,length:3}})},{backgroundColorIndex:(0,n.readByte)()},{pixelAspectRatio:(0,n.readByte)()}]},(0,e.conditional)({gct:(0,n.readArray)(3,function(u,f){return Math.pow(2,f.lsd.gct.size+1)})},function(u,f){return f.lsd.gct.exists}),{frames:(0,e.loop)([s,c,l,a,i],function(u){var f=(0,n.peekByte)()(u);return f===33||f===44})}],d=h;t.default=d})(Yr)),Yr}var Cn={},Ji;function uu(){if(Ji)return Cn;Ji=1,Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.deinterlace=void 0;var t=function(n,o){for(var s=new Array(n.length),a=n.length/o,i=function(p,m){var g=n.slice(m*o,(m+1)*o);s.splice.apply(s,[p*o,o].concat(g))},c=[0,4,2,1],l=[8,8,4,2],h=0,d=0;d<4;d++)for(var u=c[d];u<a;u+=l[d])i(u,h),h++;return s};return Cn.deinterlace=t,Cn}var En={},ts;function du(){if(ts)return En;ts=1,Object.defineProperty(En,"__esModule",{value:!0}),En.lzw=void 0;var t=function(n,o,s){var a=4096,i=-1,c=s,l,h,d,u,f,p,m,E,g,v,T,b,I,P,A,L,k=new Array(s),S=new Array(a),C=new Array(a),_=new Array(a+1);for(b=n,h=1<<b,f=h+1,l=h+2,m=i,u=b+1,d=(1<<u)-1,g=0;g<h;g++)S[g]=0,C[g]=g;var T,E,w,I,P,L,A;for(T=E=w=I=P=L=A=0,v=0;v<c;){if(P===0){if(E<u){T+=o[A]<<E,E+=8,A++;continue}if(g=T&d,T>>=u,E-=u,g>l||g==f)break;if(g==h){u=b+1,d=(1<<u)-1,l=h+2,m=i;continue}if(m==i){_[P++]=C[g],m=g,I=g;continue}for(p=g,g==l&&(_[P++]=I,g=m);g>h;)_[P++]=C[g],g=S[g];I=C[g]&255,_[P++]=I,l<a&&(S[l]=m,C[l]=I,l++,(l&d)===0&&l<a&&(u++,d+=l)),m=p}P--,k[L++]=_[P],v++}for(v=L;v<c;v++)k[v]=0;return k};return En.lzw=t,En}var es;function hu(){if(es)return ge;es=1,Object.defineProperty(ge,"__esModule",{value:!0}),ge.decompressFrames=ge.decompressFrame=ge.parseGIF=void 0;var t=a(lu()),e=ha(),n=fa(),o=uu(),s=du();function a(d){return d&&d.__esModule?d:{default:d}}var i=function(u){var f=new Uint8Array(u);return(0,e.parse)((0,n.buildStream)(f),t.default)};ge.parseGIF=i;var c=function(u){for(var f=u.pixels.length,p=new Uint8ClampedArray(f*4),m=0;m<f;m++){var g=m*4,v=u.pixels[m],b=u.colorTable[v]||[0,0,0];p[g]=b[0],p[g+1]=b[1],p[g+2]=b[2],p[g+3]=v!==u.transparentIndex?255:0}return p},l=function(u,f,p){if(!u.image){console.warn("gif frame does not have associated image.");return}var m=u.image,g=m.descriptor.width*m.descriptor.height,v=(0,s.lzw)(m.data.minCodeSize,m.data.blocks,g);m.descriptor.lct.interlaced&&(v=(0,o.deinterlace)(v,m.descriptor.width));var b={pixels:v,dims:{top:u.image.descriptor.top,left:u.image.descriptor.left,width:u.image.descriptor.width,height:u.image.descriptor.height}};return m.descriptor.lct&&m.descriptor.lct.exists?b.colorTable=m.lct:b.colorTable=f,u.gce&&(b.delay=(u.gce.delay||10)*10,b.disposalType=u.gce.extras.disposal,u.gce.extras.transparentColorGiven&&(b.transparentIndex=u.gce.transparentColorIndex)),p&&(b.patch=c(b)),b};ge.decompressFrame=l;var h=function(u,f){return u.frames.filter(function(p){return p.image}).map(function(p){return l(p,u.gct,f)})};return ge.decompressFrames=h,ge}var ns=hu();async function fu(t){try{const n=await(await fetch(t)).arrayBuffer(),o=ns.parseGIF(n),s=ns.decompressFrames(o,!0);if(!s?.length)return null;const{dims:a,patch:i}=s[0],{width:c,height:l}=a,h=document.createElement("canvas");h.width=c,h.height=l;const d=h.getContext("2d"),u=new ImageData(i,c,l);d.putImageData(u,0,0);const f=await new Promise(p=>{h.toBlob(p,"image/png")});return URL.createObjectURL(f)}catch{return null}}function Ao({staticUrl:t,alt:e,url:n}){return r("picture",{children:[t&&r("source",{srcset:t,media:"(prefers-reduced-motion: reduce)"}),r("img",{src:n,alt:e,class:"shortcode-emoji emoji",width:"16",height:"16",loading:"lazy",decoding:"async",fetchPriority:"low",onLoad:o=>{try{o.target.dataset.isLarger=o.target.naturalWidth>o.target.width*2||o.target.naturalHeight>o.target.height*2}catch{}}},e||n)]})}const pu=new Uo({concurrency:2,interval:1e3,intervalCap:2}),mu=(t,...e)=>pu.add(()=>fetch(...e),{signal:t}),rs=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,gu=Wt(t=>new RegExp(`:(${t.join("|")}):`,"g")),Le=new Map,vu=30,yu=async t=>{if(Le.has(t))return Le.get(t);try{const o=(await(await mu(null,t,{headers:{accept:"application/activity+json"},referrerPolicy:"no-referrer"})).json()).tag?.filter(a=>a.type==="Emoji")||[],s=o.length?await Promise.all(o.map(async a=>{const i={shortcode:a.name.replace(/^:|:$/g,""),url:a.icon.url};if(a.icon?.mediaType==="image/gif"){const c=await fu(i.url);c&&(i.staticUrl=c)}return i})):[];if(Le.size>=vu){const a=Le.keys().next().value;Le.delete(a)}return Le.set(t,s),s}catch{return[]}},bu=Wt((t,e,n)=>{if(!t)return"";if(!t.includes(":")||!e.length)return t;const o=gu(e.map(a=>a.shortcode));return t.split(o).map((a,i)=>{const c=e.find(l=>l.shortcode===a);if(c){const{url:l,staticUrl:h}=c;return r(Ao,{staticUrl:n?void 0:h,url:n&&h||l,alt:a},`${a}-${i}`)}return a})});function un({text:t,emojis:e=[],staticEmoji:n,resolverURL:o}){const[s,a]=H(()=>Le.get(o)||[]),[i,c]=H(!1);if(q(()=>{if(!o||!t?.includes(":"))return;const h=t.match(rs);!h||!h.some(u=>{const f=u.slice(1,-1);return!e.some(p=>p.shortcode===f)})||Le.has(o)||(c(!0),(async()=>{const u=await yu(o);a(u),c(!1)})())},[o,t,e?.length]),!t)return"";if(!t.includes(":"))return t;if(o&&i)return t.replace(rs,"");const l=[...s.filter(h=>!e.some(d=>d.shortcode===h.shortcode)),...e];return bu(t,l,n)}function xo({roles:t,accountId:e,accountUrl:n,hideSelf:o=!1}){if(!t?.length)return null;const s=e&&e===qo();if(o&&s)return null;const a=vo(n);return t?.map(i=>r(F,{children:[" ",r("span",{class:"tag collapsed tag-role",children:[i.name,!!a&&r(F,{children:[" ",r("span",{class:"more-insignificant",children:a})]})]})]}))}const wu=Wt(t=>{const e={sensitivity:"base"};try{return new Intl.Collator(t||void 0,e)}catch{return new Intl.Collator(void 0,e)}}),_u=/([^@]+)(@.+)/i,ku=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,Tu=/\s+/g,Su=/[^a-z0-9@\.]/gi;function Pe({account:t,instance:e,showAvatar:n,showAcct:o,short:s,external:a,onClick:i}){const{i18n:c}=Kt();if(!t)return null;const{acct:l,avatar:h,avatarStatic:d,id:u,url:f,displayName:p,emojis:m,bot:g,username:v,roles:b}=t,[k,S,C]=l.match(_u)||[,l];e||(e=Ze().instance);const _=v.toLowerCase().trim(),T=(p||"").toLowerCase().trim(),E=T.replace(ku,"").replace(Tu,""),w=E.replace(Su,""),I=!s&&(_===T||_===E||_===w||wu(c.locale).compare(_,E)===0)||w===l.toLowerCase();return r("a",{class:`name-text ${o?"show-acct":""} ${s?"short":""}`,href:f,target:a?"_blank":null,title:p?`${p} (${C?"":"@"}${l})`:`${C?"":"@"}${l}`,onClick:P=>{if(!a&&!P.shiftKey){if(P.preventDefault(),P.stopPropagation(),i)return i(P);if(P.metaKey||P.ctrlKey||P.shiftKey||P.which===2){const L=`#/${e}/a/${u}`;window.open(L,"_blank");return}z.showAccount={account:t,instance:e}}},children:[n&&r(F,{children:[r(_e,{url:d||h,squircle:g})," "]}),p&&!s?r(F,{children:[r("b",{dir:"auto",children:r(un,{text:p,emojis:m,resolverURL:t.url,staticEmoji:!0})}),!o&&!I&&r(F,{children:[" ",r("i",{class:"bidi-isolate",children:["@",v]}),r(xo,{roles:b,accountId:u,accountUrl:f,hideSelf:!0})]})]}):s?r("i",{children:v}):r("b",{children:v}),o&&r(F,{children:[r("br",{}),r("i",{class:"bidi-isolate",children:[C?"":"@",S,!!C&&r("span",{class:"ib",children:C})]}),r(xo,{roles:b,accountUrl:f})]})]})}const Cu="Аҧсшәа",Eu="Acèh",Au="Lëbacoli",xu="Afár",Mu="Afrikaans",Iu="Shqip",Lu="Dhalur",Pu="አማርኛ",Du="العربية",Ru="Հայերեն",$u="অসমীয়া",Nu="Авар мацӀ",Ou="अवधी",Fu="Aymar aru",Bu="Azərbaycanca",zu="Basa Bali",Hu="بلوچی",Ku="Bamanankan",ju="Baoulé",Uu="Башҡортса",qu="Euskara",Wu="Batak Karo",Zu="Batak Simalungun",Vu="Batak Toba",Gu="Беларуская",Yu="Ichibemba",Xu="বাংলা",Qu="Betawi",Ju="भोजपुरी",td="Bikol",ed="Bosanski",nd="Brezhoneg",rd="Български",od="Буряад",id="粵語",sd="Català",ad="Cebuano",cd="Chamoru",ld="Нохчийн мотт",ud="Chichewa",dd="Kapasen Chuuk",hd="Чӑвашла",fd="Corsu",pd="Qırımtatarca (Кирилл)",md="Hrvatski",gd="Čeština",vd="Dansk",yd="ދިވެހި",bd="Thuɔŋjäŋ",wd="डोगरी",_d="Dombe",kd="Nederlands",Td="Jula",Sd="རྫོང་ཁ",Cd="English",Ed="Esperanto",Ad="Eesti",xd="Eʋegbe",Md="Føroyskt",Id="Vosa Vakaviti",Ld="Tagalog",Pd="Suomi",Dd="Fon",Rd="Français",$d="Frysk",Nd="Furlan",Od="Fulfulde",Fd="Gã",Bd="Galego",zd="ქართული",Hd="Deutsch",Kd="Ελληνικά",jd="Avañe'ẽ",Ud="ગુજરાતી",qd="Kreyòl ayisyen",Wd="Hakha Chin",Zd="Hausa",Vd="ʻŌlelo Hawaiʻi",Gd="עברית",Yd="Hiligaynon",Xd="हिन्दी",Qd="Hmoob",Jd="Magyar",th="Hunsrik",eh="Iban",nh="Íslenska",rh="Igbo",oh="Iloko",ih="Bahasa Indonesia",sh="ᐃᓄᒃᑎᑐᑦ",ah="Gaeilge",ch="Italiano",lh="Patwa",uh="日本語",dh="Basa Jawa",hh="Jinghpaw",fh="Kalaallisut",ph="ಕನ್ನಡ",mh="Kanuri",gh="Kapampangan",vh="Қазақша",yh="Khasi",bh="ភាសាខ្មែរ",wh="Rukiga",_h="Kikongo",kh="Kinyarwanda",Th="Kituba",Sh="Kokborok",Ch="Коми кыв",Eh="कोंकणी",Ah="한국어",xh="Krio",Mh="Kurdî (Kurmancî)",Ih="کوردی (سۆرانی)",Lh="Кыргызча",Ph="ລາວ",Dh="Latgaļu",Rh="Latina",$h="Latviešu",Nh="Ligure",Oh="Limburgs",Fh="Lingála",Bh="Lietuvių",zh="Lombard",Hh="Luganda",Kh="Dholuo",jh="Lëtzebuergesch",Uh="Македонски",qh="Madhurâ",Wh="मैथिली",Zh="Makassar",Vh="Malagasy",Gh="Bahasa Melayu",Yh="മലയാളം",Xh="Malti",Qh="Mam",Jh="Gaelg",tf="Te Reo Māori",ef="मराठी",nf="Kajin M̧ajeļ",rf="मारवाड़ी",of="Kreol Morisien",sf="Олык марий",af="Baso Minang",cf="Mizo ṭawng",lf="Монгол",uf="မြန်မာစာ",df="Náhuatl",hf="isiNdebele",ff="नेपाली",pf="Norsk",mf="Thok Nath",gf="Occitan",vf="ଓଡ଼ିଆ",yf="Afaan Oromoo",bf="Ирон æвзаг",wf="Pangasinan",_f="Papiamentu",kf="پښتو",Tf="فارسی",Sf="Polski",Cf="Português (Brasil)",Ef="ਪੰਜਾਬੀ",Af="Runa Simi",xf="Qʼeqchiʼ",Mf="Romani čhib",If="Română",Lf="Ikirundi",Pf="Русский",Df="Davvisámegiella",Rf="Gagana Samoa",$f="Sängö",Nf="संस्कृतम्",Of="ᱥᱟᱱᱛᱟᱲᱤ",Ff="Gàidhlig",Bf="Sepedi",zf="Српски",Hf="Sesotho",Kf="Kreol seselwa",jf="လိၵ်ႈတႆး",Uf="chiShona",qf="Sicilianu",Wf="Ślōnskŏ",Zf="سنڌي",Vf="සිංහල",Gf="Slovenčina",Yf="Slovenščina",Xf="Soomaali",Qf="Español",Jf="Basa Sunda",tp="Susu",ep="Kiswahili",np="siSwati",rp="Svenska",op="Reo Tahiti",ip="Тоҷикӣ",sp="ⵜⴰⵎⴰⵣⵉⵖⵜ",ap="தமிழ்",cp="Татарча",lp="తెలుగు",up="Tetun",dp="ไทย",hp="བོད་ཡིག",fp="ትግርኛ",pp="Tiv",mp="Tok Pisin",gp="Lea fakatonga",vp="Tshiluba",yp="Xitsonga",bp="Setswana",wp="ತುಳು",_p="chiTumbuka",kp="Türkçe",Tp="Türkmençe",Sp="Тыва дыл",Cp="Akankasa",Ep="Удмурт кыл",Ap="Українська",xp="اردو",Mp="ئۇيغۇرچە",Ip="Oʻzbekcha",Lp="Tshivenḓa",Pp="Vèneto",Dp="Tiếng Việt",Rp="Winaray",$p="Cymraeg",Np="Wolof",Op="isiXhosa",Fp="Саха тыла",Bp="ייִדיש",zp="Yorùbá",Hp="Màaya T'àan",Kp="Didxazá",jp="isiZulu",Up={ab:Cu,ace:Eu,ach:Au,aa:xu,af:Mu,sq:Iu,alz:Lu,am:Pu,ar:Du,hy:Ru,as:$u,av:Nu,awa:Ou,ay:Fu,az:Bu,ban:zu,bal:Hu,bm:Ku,bci:ju,ba:Uu,eu:qu,btx:Wu,bts:Zu,bbc:Vu,be:Gu,bem:Yu,bn:Xu,bew:Qu,bho:Ju,bik:td,bs:ed,br:nd,bg:rd,bua:od,yue:id,ca:sd,ceb:ad,ch:cd,ce:ld,ny:ud,"zh-CN":"简体中文","zh-TW":"繁體中文",chk:dd,cv:hd,co:fd,crh:pd,"crh-Latn":"Qırımtatarca (Latin)",hr:md,cs:gd,da:vd,"fa-AF":"درى",dv:yd,din:bd,doi:wd,dov:_d,nl:kd,dyu:Td,dz:Sd,en:Cd,eo:Ed,et:Ad,ee:xd,fo:Md,fj:Id,tl:Ld,fi:Pd,fon:Dd,fr:Rd,"fr-CA":"Français (Canada)",fy:$d,fur:Nd,ff:Od,gaa:Fd,gl:Bd,ka:zd,de:Hd,el:Kd,gn:jd,gu:Ud,ht:qd,cnh:Wd,ha:Zd,haw:Vd,iw:Gd,hil:Yd,hi:Xd,hmn:Qd,hu:Jd,hrx:th,iba:eh,is:nh,ig:rh,ilo:oh,id:ih,"iu-Latn":"Inuktitut (Latin)",iu:sh,ga:ah,it:ch,jam:lh,ja:uh,jw:dh,kac:hh,kl:fh,kn:ph,kr:mh,pam:gh,kk:vh,kha:yh,km:bh,cgg:wh,kg:_h,rw:kh,ktu:Th,trp:Sh,kv:Ch,gom:Eh,ko:Ah,kri:xh,ku:Mh,ckb:Ih,ky:Lh,lo:Ph,ltg:Dh,la:Rh,lv:$h,lij:Nh,li:Oh,ln:Fh,lt:Bh,lmo:zh,lg:Hh,luo:Kh,lb:jh,mk:Uh,mad:qh,mai:Wh,mak:Zh,mg:Vh,ms:Gh,"ms-Arab":"بهاس ملايو",ml:Yh,mt:Xh,mam:Qh,gv:Jh,mi:tf,mr:ef,mh:nf,mwr:rf,mfe:of,chm:sf,"mni-Mtei":"ꯃꯤꯇꯩꯂꯣꯟ",min:af,lus:cf,mn:lf,my:uf,nhe:df,"ndc-ZW":"Ndau",nr:hf,new:"नेपाल भाषा",ne:ff,"bm-Nkoo":"ߒߞߏ",no:pf,nus:mf,oc:gf,or:vf,om:yf,os:bf,pag:wf,pap:_f,ps:kf,fa:Tf,pl:Sf,pt:Cf,"pt-PT":"Português (Portugal)",pa:Ef,"pa-Arab":"پنجابی",qu:Af,kek:xf,rom:Mf,ro:If,rn:Lf,ru:Pf,se:Df,sm:Rf,sg:$f,sa:Nf,"sat-Latn":"Santali (Latin)",sat:Of,gd:Ff,nso:Bf,sr:zf,st:Hf,crs:Kf,shn:jf,sn:Uf,scn:qf,szl:Wf,sd:Zf,si:Vf,sk:Gf,sl:Yf,so:Xf,es:Qf,su:Jf,sus:tp,sw:ep,ss:np,sv:rp,ty:op,tg:ip,"ber-Latn":"Tamazight (Latin)",ber:sp,ta:ap,tt:cp,te:lp,tet:up,th:dp,bo:hp,ti:fp,tiv:pp,tpi:mp,to:gp,lua:vp,ts:yp,tn:bp,tcy:wp,tum:_p,tr:kp,tk:Tp,tyv:Sp,ak:Cp,udm:Ep,uk:Ap,ur:xp,ug:Mp,uz:Ip,ve:Lp,vec:Pp,vi:Dp,war:Rp,cy:$p,wo:Np,xh:Op,sah:Fp,yi:Bp,yo:zp,yua:Hp,zap:Kp,zu:jp},nr={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},Xr=Wt(t=>new Intl.DisplayNames(t||void 0,{type:"language"}));function qp(t){let e,n;typeof t=="object"&&({code:t,locale:e,fallback:n}=t);try{const o=Xr(e||Lt.locale).of(t);if(o!==t)return o;if(!n){const s=Xr(t).of(t);if(s!==t)return s;const a=Up?.[e];if(a!==t)return a}return n||""}catch{if(nr[t])try{const s=Xr(nr[e]||e||Lt.locale).of(nr[t]);return s!==nr[t]?s:n||""}catch{}return n||""}}const An=Wt(qp),Wp={auto:"Detect language",ab:"Abkhaz",ace:"Acehnese",ach:"Acholi",aa:"Afar",af:"Afrikaans",sq:"Albanian",alz:"Alur",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",av:"Avar",awa:"Awadhi",ay:"Aymara",az:"Azerbaijani",ban:"Balinese",bal:"Baluchi",bm:"Bambara",bci:"Baoulé",ba:"Bashkir",eu:"Basque",btx:"Batak Karo",bts:"Batak Simalungun",bbc:"Batak Toba",be:"Belarusian",bem:"Bemba",bn:"Bengali",bew:"Betawi",bho:"Bhojpuri",bik:"Bikol",bs:"Bosnian",br:"Breton",bg:"Bulgarian",bua:"Buryat",yue:"Cantonese",ca:"Catalan",ceb:"Cebuano",ch:"Chamorro",ce:"Chechen",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",chk:"Chuukese",cv:"Chuvash",co:"Corsican",crh:"Crimean Tatar (Cyrillic)","crh-Latn":"Crimean Tatar (Latin)",hr:"Croatian",cs:"Czech",da:"Danish","fa-AF":"Dari",dv:"Dhivehi",din:"Dinka",doi:"Dogri",dov:"Dombe",nl:"Dutch",dyu:"Dyula",dz:"Dzongkha",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",fo:"Faroese",fj:"Fijian",tl:"Filipino",fi:"Finnish",fon:"Fon",fr:"French","fr-CA":"French (Canada)",fy:"Frisian",fur:"Friulian",ff:"Fulani",gaa:"Ga",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",cnh:"Hakha Chin",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hil:"Hiligaynon",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",hrx:"Hunsrik",iba:"Iban",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian","iu-Latn":"Inuktut (Latin)",iu:"Inuktut (Syllabics)",ga:"Irish",it:"Italian",jam:"Jamaican Patois",ja:"Japanese",jw:"Javanese",kac:"Jingpo",kl:"Kalaallisut",kn:"Kannada",kr:"Kanuri",pam:"Kapampangan",kk:"Kazakh",kha:"Khasi",km:"Khmer",cgg:"Kiga",kg:"Kikongo",rw:"Kinyarwanda",ktu:"Kituba",trp:"Kokborok",kv:"Komi",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",ltg:"Latgalian",la:"Latin",lv:"Latvian",lij:"Ligurian",li:"Limburgish",ln:"Lingala",lt:"Lithuanian",lmo:"Lombard",lg:"Luganda",luo:"Luo",lb:"Luxembourgish",mk:"Macedonian",mad:"Madurese",mai:"Maithili",mak:"Makassar",mg:"Malagasy",ms:"Malay","ms-Arab":"Malay (Jawi)",ml:"Malayalam",mt:"Maltese",mam:"Mam",gv:"Manx",mi:"Maori",mr:"Marathi",mh:"Marshallese",mwr:"Marwadi",mfe:"Mauritian Creole",chm:"Meadow Mari","mni-Mtei":"Meiteilon (Manipuri)",min:"Minang",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",nhe:"Nahuatl (Eastern Huasteca)","ndc-ZW":"Ndau",nr:"Ndebele (South)",new:"Nepalbhasa (Newari)",ne:"Nepali","bm-Nkoo":"NKo",no:"Norwegian",nus:"Nuer",oc:"Occitan",or:"Odia (Oriya)",om:"Oromo",os:"Ossetian",pag:"Pangasinan",pap:"Papiamento",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)",pa:"Punjabi (Gurmukhi)","pa-Arab":"Punjabi (Shahmukhi)",qu:"Quechua",kek:"Qʼeqchiʼ",rom:"Romani",ro:"Romanian",rn:"Rundi",ru:"Russian",se:"Sami (North)",sm:"Samoan",sg:"Sango",sa:"Sanskrit","sat-Latn":"Santali (Latin)",sat:"Santali (Ol Chiki)",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",crs:"Seychellois Creole",shn:"Shan",sn:"Shona",scn:"Sicilian",szl:"Silesian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sus:"Susu",sw:"Swahili",ss:"Swati",sv:"Swedish",ty:"Tahitian",tg:"Tajik","ber-Latn":"Tamazight",ber:"Tamazight (Tifinagh)",ta:"Tamil",tt:"Tatar",te:"Telugu",tet:"Tetum",th:"Thai",bo:"Tibetan",ti:"Tigrinya",tiv:"Tiv",tpi:"Tok Pisin",to:"Tongan",lua:"Tshiluba",ts:"Tsonga",tn:"Tswana",tcy:"Tulu",tum:"Tumbuka",tr:"Turkish",tk:"Turkmen",tyv:"Tuvan",ak:"Twi",udm:"Udmurt",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",ve:"Venda",vec:"Venetian",vi:"Vietnamese",war:"Waray",cy:"Welsh",wo:"Wolof",xh:"Xhosa",sah:"Yakut",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",zap:"Zapotec",zu:"Zulu"},Zp={ab:"Abkhaz",ace:"Acehnese",ach:"Acholi",aa:"Afar",af:"Afrikaans",sq:"Albanian",alz:"Alur",am:"Amharic",ar:"Arabic",hy:"Armenian",as:"Assamese",av:"Avar",awa:"Awadhi",ay:"Aymara",az:"Azerbaijani",ban:"Balinese",bal:"Baluchi",bm:"Bambara",bci:"Baoulé",ba:"Bashkir",eu:"Basque",btx:"Batak Karo",bts:"Batak Simalungun",bbc:"Batak Toba",be:"Belarusian",bem:"Bemba",bn:"Bengali",bew:"Betawi",bho:"Bhojpuri",bik:"Bikol",bs:"Bosnian",br:"Breton",bg:"Bulgarian",bua:"Buryat",yue:"Cantonese",ca:"Catalan",ceb:"Cebuano",ch:"Chamorro",ce:"Chechen",ny:"Chichewa","zh-CN":"Chinese (Simplified)","zh-TW":"Chinese (Traditional)",chk:"Chuukese",cv:"Chuvash",co:"Corsican",crh:"Crimean Tatar (Cyrillic)","crh-Latn":"Crimean Tatar (Latin)",hr:"Croatian",cs:"Czech",da:"Danish","fa-AF":"Dari",dv:"Dhivehi",din:"Dinka",doi:"Dogri",dov:"Dombe",nl:"Dutch",dyu:"Dyula",dz:"Dzongkha",en:"English",eo:"Esperanto",et:"Estonian",ee:"Ewe",fo:"Faroese",fj:"Fijian",tl:"Filipino",fi:"Finnish",fon:"Fon",fr:"French","fr-CA":"French (Canada)",fy:"Frisian",fur:"Friulian",ff:"Fulani",gaa:"Ga",gl:"Galician",ka:"Georgian",de:"German",el:"Greek",gn:"Guarani",gu:"Gujarati",ht:"Haitian Creole",cnh:"Hakha Chin",ha:"Hausa",haw:"Hawaiian",iw:"Hebrew",hil:"Hiligaynon",hi:"Hindi",hmn:"Hmong",hu:"Hungarian",hrx:"Hunsrik",iba:"Iban",is:"Icelandic",ig:"Igbo",ilo:"Ilocano",id:"Indonesian","iu-Latn":"Inuktut (Latin)",iu:"Inuktut (Syllabics)",ga:"Irish",it:"Italian",jam:"Jamaican Patois",ja:"Japanese",jw:"Javanese",kac:"Jingpo",kl:"Kalaallisut",kn:"Kannada",kr:"Kanuri",pam:"Kapampangan",kk:"Kazakh",kha:"Khasi",km:"Khmer",cgg:"Kiga",kg:"Kikongo",rw:"Kinyarwanda",ktu:"Kituba",trp:"Kokborok",kv:"Komi",gom:"Konkani",ko:"Korean",kri:"Krio",ku:"Kurdish (Kurmanji)",ckb:"Kurdish (Sorani)",ky:"Kyrgyz",lo:"Lao",ltg:"Latgalian",la:"Latin",lv:"Latvian",lij:"Ligurian",li:"Limburgish",ln:"Lingala",lt:"Lithuanian",lmo:"Lombard",lg:"Luganda",luo:"Luo",lb:"Luxembourgish",mk:"Macedonian",mad:"Madurese",mai:"Maithili",mak:"Makassar",mg:"Malagasy",ms:"Malay","ms-Arab":"Malay (Jawi)",ml:"Malayalam",mt:"Maltese",mam:"Mam",gv:"Manx",mi:"Maori",mr:"Marathi",mh:"Marshallese",mwr:"Marwadi",mfe:"Mauritian Creole",chm:"Meadow Mari","mni-Mtei":"Meiteilon (Manipuri)",min:"Minang",lus:"Mizo",mn:"Mongolian",my:"Myanmar (Burmese)",nhe:"Nahuatl (Eastern Huasteca)","ndc-ZW":"Ndau",nr:"Ndebele (South)",new:"Nepalbhasa (Newari)",ne:"Nepali","bm-Nkoo":"NKo",no:"Norwegian",nus:"Nuer",oc:"Occitan",or:"Odia (Oriya)",om:"Oromo",os:"Ossetian",pag:"Pangasinan",pap:"Papiamento",ps:"Pashto",fa:"Persian",pl:"Polish",pt:"Portuguese (Brazil)","pt-PT":"Portuguese (Portugal)",pa:"Punjabi (Gurmukhi)","pa-Arab":"Punjabi (Shahmukhi)",qu:"Quechua",kek:"Qʼeqchiʼ",rom:"Romani",ro:"Romanian",rn:"Rundi",ru:"Russian",se:"Sami (North)",sm:"Samoan",sg:"Sango",sa:"Sanskrit","sat-Latn":"Santali (Latin)",sat:"Santali (Ol Chiki)",gd:"Scots Gaelic",nso:"Sepedi",sr:"Serbian",st:"Sesotho",crs:"Seychellois Creole",shn:"Shan",sn:"Shona",scn:"Sicilian",szl:"Silesian",sd:"Sindhi",si:"Sinhala",sk:"Slovak",sl:"Slovenian",so:"Somali",es:"Spanish",su:"Sundanese",sus:"Susu",sw:"Swahili",ss:"Swati",sv:"Swedish",ty:"Tahitian",tg:"Tajik","ber-Latn":"Tamazight",ber:"Tamazight (Tifinagh)",ta:"Tamil",tt:"Tatar",te:"Telugu",tet:"Tetum",th:"Thai",bo:"Tibetan",ti:"Tigrinya",tiv:"Tiv",tpi:"Tok Pisin",to:"Tongan",lua:"Tshiluba",ts:"Tsonga",tn:"Tswana",tcy:"Tulu",tum:"Tumbuka",tr:"Turkish",tk:"Turkmen",tyv:"Tuvan",ak:"Twi",udm:"Udmurt",uk:"Ukrainian",ur:"Urdu",ug:"Uyghur",uz:"Uzbek",ve:"Venda",vec:"Venetian",vi:"Vietnamese",war:"Waray",cy:"Welsh",wo:"Wolof",xh:"Xhosa",sah:"Yakut",yi:"Yiddish",yo:"Yoruba",yua:"Yucatec Maya",zap:"Zapotec",zu:"Zulu"},Vp={},pa={sl:Wp,tl:Zp,al:Vp},Gp=Object.entries(pa.tl).map(([t,{name:e}])=>({code:t,name:e})),Mo=[...navigator.languages],Qr=aa();Qr&&!Mo.includes(Qr)&&Mo.unshift(Qr);const Yp=()=>vr(Mo,Gp.map(t=>t.code.replace("_","-")),"en");function ma(t=!1){if(t){const{contentTranslationTargetLanguage:e}=z.settings;if(e)return e}return Yp()}const os=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"];function Py(t){const e=Math.min(Math.floor(Math.log2(t)/10),os.length-1),n=t/1024**e;return Lt.number(n,{style:"unit",unit:os[e],unitDisplay:"narrow",maximumFractionDigits:0})}function Yt(){return kc()?.mastodon>=7}function Xp(t){return t?.[t?.currentUser]?.[0]||"nobody"}const Qp=/[.*+?^${}()|[\]\\]/g,Jp={"&":"&amp;",'"':"&quot;","<":"&lt;",">":"&gt;"},tm=/[&"<>]/g;function em(t){return t.replace(Qp,"\\$&")}function nm(t){return t.replace(tm,e=>Jp[e])}function Io(t,e=[]){if(!t)return"";if(!e.length||!t.includes(":"))return t;const n=new Map;for(let i=0;i<e.length;i++){const c=e[i];c?.shortcode&&c?.url&&n.set(c.shortcode,c)}if(n.size===0)return t;const s=Array.from(n.keys()).map(i=>`:${em(i)}:`).join("|"),a=new RegExp(s,"g");return t.replace(a,i=>{const c=i.slice(1,-1),l=n.get(c);if(!l)return i;const{staticUrl:h,url:d}=l,u=nm(i);return`<picture>${h?`<source srcset="${h}" media="(prefers-reduced-motion: reduce)"></source>`:""}<img class="shortcode-emoji emoji" src="${d}" alt="${u}" title="${c}" width="16" height="16" loading="lazy" decoding="async" fetchPriority="low" onload="try { this.dataset.isLarger = this.naturalWidth > (this.width * 2) || this.naturalHeight > (this.height * 2) } catch (e) {}" /></picture>`})}const rm=/[&<>"']/g,om={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};function Jr(t){return t.replace(rm,e=>om[e])}const nn=document.createElement("div"),im=["u-url","mention","hashtag"],sm=/<a/i,am=/^https?:\/\//i,cm=/^[@][^@]+(@[^@]+)?$/,lm=/^[#][^#]+$/,um=/^```[^]+```$/,dm=/^```/,hm=/```$/,fm=/`[^`]+`/,pm=/(twitter|x)\.com/i,mm=/@[a-zA-Z0-9_]+@(twitter|x)\.com/,gm=/(@([a-zA-Z0-9_]+)@(twitter|x)\.com)/g,vm=/(`[^]+?`)/g;function ym(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 bm(t,e={}){if(!t)return"";const{emojis:n,returnDOM:o,postEnhanceDOM:s=()=>{}}=e;let a=t;const i=ym(a,o),c=sm.test(a),l=a.includes("```");if(c){const d=i.querySelectorAll('a:not([target="_blank"])');for(const f of d)f.setAttribute("target","_blank");const u=i.querySelectorAll("a[class]");for(const f of u)for(const p of f.classList)im.includes(p)||f.classList.remove(p)}if(c){const d=i.querySelectorAll("a[href]");for(const u of d)am.test(u.textContent.trim())&&(u.classList.add("has-url-text"),Tm(u))}if(c){const d=i.querySelectorAll("a[href]"),u=[];for(const f of d){const p=f.innerText.trim(),m=f.querySelector("*");if(cm.test(p)){const g=p[0],[v,b,k]=p.split(/[@]/);m||(!u.some(([S])=>S===b)||u.some(([S,C])=>S===b&&C===k)?(f.innerHTML=`${g}<span>${b}</span>`,u.push([b,k])):f.innerHTML=`${g}<span>${b}@${k}</span>`),f.classList.add("mention")}if(lm.test(p)){const g=p[0];m||(f.innerHTML=`${g}<span>${p.slice(1)}</span>`),f.classList.add("mention","hashtag")}}}let h;if(a.includes(":")&&n?.length){h=eo(i);for(const d of h){let u=Jr(d.nodeValue);u=Io(u,n),nn.innerHTML=u,d.replaceWith(...nn.childNodes)}}if(l){const d=[...i.querySelectorAll("p")].filter(u=>um.test(u.innerText.trim()));for(const u of d){const f=document.createElement("pre");for(const p of u.querySelectorAll("br"))p.replaceWith(`
`);f.innerHTML=`<code>${u.innerHTML.trim()}</code>`,u.replaceWith(f)}}if(l){const u=[...i.querySelectorAll("p")].filter(f=>dm.test(f.innerText));for(const f of u){const p=[f];let m=!1,g=f;for(;g.nextElementSibling;){const v=g.nextElementSibling;if(v&&v.tagName==="P")if(hm.test(v.innerText)){p.push(v),m=!0;break}else p.push(v);else break;g=v}if(m){const v=document.createElement("pre");for(const k of p)for(const S of k.querySelectorAll("br"))S.replaceWith(`
`);const b=p.map(k=>k.innerHTML).join(`
`);v.innerHTML=`<code tabindex="0">${b}</code>`,f.replaceWith(v);for(const k of p)k.remove()}}}if(a.includes("`")){h=eo(i);for(const d of h){let u=Jr(d.nodeValue);fm.test(u)&&(u=u.replaceAll(vm,"<code>$1</code>")),nn.innerHTML=u,d.replaceWith(...nn.childNodes)}}if(pm.test(a)){h=eo(i,{rejectFilter:["A"]});for(const d of h){let u=Jr(d.nodeValue);mm.test(u)&&(u=u.replaceAll(gm,'<a href="https://twitter.com/$2" rel="nofollow noopener" target="_blank">$1</a>')),nn.innerHTML=u,d.replaceWith(...nn.childNodes)}}if(a.includes("#")||a.includes("")){let d=null;const u=[...i.querySelectorAll("p")].filter((f,p)=>{let m=0;for(let g=0;g<f.childNodes.length;g++){const v=f.childNodes[g];if(v.nodeType===Node.TEXT_NODE){if(v.textContent.trim()!=="")return!1}else if(v.tagName!=="BR")if(v.tagName==="A"){const b=v.textContent.trim();if(!b||!(b.startsWith("#")||b.startsWith("")))return!1;m++}else return!1}if(m>3||m>1&&d&&p===d+1)return d=p,!0});if(u?.length)for(const f of u)f.classList.add("hashtag-stuffing"),f.title=f.innerText}if(a.includes("<img")){const d=i.querySelectorAll("img");for(let u=0;u<d.length;u++){const f=d[u],p=f.getAttribute("width")||f.naturalWidth,m=f.getAttribute("height")||f.naturalHeight;p&&m&&f.style.setProperty("--original-aspect-ratio",`${p}/${m}`)}}for(const d of i.childNodes)if(d.nodeType===Node.TEXT_NODE&&d.textContent.trim?.()){const u=document.createElement("span");u.textContent=d.textContent,i.replaceChild(u,d)}return s&&queueMicrotask(()=>s(i)),o?i:i.innerHTML}const ga=Wt(bm),wm=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],_m=Object.fromEntries(wm.map(t=>[t,!0])),km=/^(https?:\/\/(www\.)?|xmpp:)/,to=30;function Tm(t){if(!(!t||t.querySelector?.("*")))try{const e=t.innerText.trim(),n=(e.match(km)||[])[0]||"";if(!n)return;const o=e.slice(n.length,n.length+to),s=e.slice(n.length+to),a=e.slice(n.length).length>to;t.innerHTML=`<span class="invisible">${n}</span><span class=${a?"ellipsis":""}>${o}</span><span class="invisible">${s}</span>`}catch{}}function eo(t,e={}){const n=[],o=Object.assign({},_m,e.rejectFilter?.reduce((i,c)=>(i[c]=!0,i),{})),s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(i){return o[i.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let a;for(;a=s.nextNode();)n.push(a);return n}const Sm=window.matchMedia("(hover: hover)").matches;function Cm(t){const{mentions:e=[],instance:n,previewMode:o,statusURL:s}=t||{};return a=>{if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.which===2)return;let{target:i}=a;if(i.closest(".shortcode-emoji")){const{naturalWidth:u,naturalHeight:f,width:p,height:m}=i,g=2;if(u>p*g||f>m*g){a.preventDefault(),a.stopPropagation(),z.showMediaModal={mediaAttachments:[{type:"image",url:i.src,description:i.title||i.alt}]};return}}if(i=i.closest("a"),!i||!a.currentTarget.contains(i))return;const{href:c}=i,l=i.previousSibling?.textContent,h=l?.endsWith("@")||l?.endsWith(""),d=i.innerText.startsWith("@")||i.innerText.startsWith("");if((i.classList.contains("u-url")||i.classList.contains("mention"))&&d||h&&!d){const u=(i.querySelector("span")||i).innerText.trim(),f=u.replace(/^[@]/,""),p=e.find(m=>m.url===c)||e.find(m=>m.acct===f||m.username===f);if(p){a.preventDefault(),a.stopPropagation(),z.showAccount={account:p.acct,instance:n};return}else if(!/^http/i.test(u)){a.preventDefault(),a.stopPropagation(),z.showAccount={account:c,instance:n};return}}else if(!o){const u=l?.endsWith("#")||l?.endsWith("");if(i.classList.contains("hashtag")||u){a.preventDefault(),a.stopPropagation();const f=i.innerText.replace(/^[#]/,"").trim(),p=n?`#/${n}/t/${f}`:`#/t/${f}`;location.hash=p;return}else if(z.unfurledLinks[c]?.url&&s!==c){a.preventDefault(),a.stopPropagation(),z.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${z.unfurledLinks[c].url}`;return}}try{const f=URL.parse(c).hostname.replace(/^www\./i,"");if(!i.innerText.toLowerCase().includes(f.toLowerCase())&&!Sm){a.preventDefault(),a.stopPropagation();const m=i.innerText.trim();z.showOpenLink={url:c,linkText:m}}}catch{}}}function ae(t){try{return Lt.number(t,{notation:"compact",roundingMode:"floor"})}catch{return t}}const Em={"@mastodon/list-exclusive":">=4.2","@gotosocial/list-exclusive":">=0.17","@gotosocial/edit-media-attributes":">=0.18","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3","@mastodon/trending-link-posts":"~4.3 || >=4.3","@mastodon/annual-report":"~4.4 || >=4.4","@mastodon/endorsements":"~4.4 || >=4.4"},no=/pixelfed/i,de=/^(?!.*pixelfed).*$/i,Am=/pleroma/i,xm=/akkoma/i;const is={"@mastodon/lists":de,"@mastodon/filters":de,"@mastodon/mentions":de,"@mastodon/trending-hashtags":de,"@mastodon/trending-links":de,"@mastodon/post-bookmark":de,"@mastodon/post-edit":de,"@mastodon/profile-edit":de,"@mastodon/profile-private-note":de,"@mastodon/pinned-posts":de,"@pixelfed/trending":no,"@pixelfed/home-include-reblogs":no,"@pixelfed/global-feed":no,"@pleroma/local-visibility-post":Am,"@akkoma/local-visibility-post":xm},xn={},Mm=/^\d+\.\d+(\.\d+)?/,Im=/^@([a-z]+)\//i;function rr(t){try{let{version:e,domain:n}=Tc(),o=Sc()?.software?.name||"mastodon";o==="hometown"&&(o="mastodon");const s=`${n}-${t}`;if(xn[s])return xn[s];if(is[t])return xn[s]=is[t].test(e);const a=t.match(Im);if(!a){const d=t.replace(/^@/,"");return xn[s]=o===d}const i=Em[t];if(!i)return!1;const l=a[1]===o.toLowerCase();let h=Pi(e,i,{includePrerelease:!0,loose:!0});if(!h)try{h=Pi(e.match(Mm)?.[0],i,{includePrerelease:!0,loose:!1})}catch{}return xn[s]=l&&h}catch{return!1}}function Dy({skeleton:t,account:e,avatarSize:n="xl",useAvatarStatic:o=!1,instance:s,external:a,internal:i,onClick:c,showActivity:l=!1,showStats:h=!1,accountInstance:d,hideDisplayName:u=!1,relationship:f={},excludeRelationshipAttrs:p=[]}){const{_:m}=Kt();if(t)return r("div",{class:"account-block skeleton",children:[r(_e,{size:n}),r("span",{children:[r("b",{children:"████████"}),r("br",{}),r("span",{class:"account-block-acct",children:"██████"})]})]});if(!e)return null;const{id:g,acct:v,avatar:b,avatarStatic:k,displayName:S,username:C,emojis:_,url:T,statusesCount:E,lastStatusAt:w,bot:I,fields:P,note:L,group:A,followersCount:$,createdAt:R,locked:W,roles:B}=e;let[Y,et,ct]=v.match(/([^@]+)(@.+)/i)||[,v];d&&(ct=`@${d}`);const nt=P?.find(J=>!!J.verifiedAt&&!!J.value),V={};for(const J in f)p.includes(J)||(V[J]=f[J]);const st=V.following||V.followedBy||V.requested;return r("a",{class:"account-block",href:T,target:a?"_blank":null,title:ct?v:`@${v}`,onClick:J=>{if(!a){if(J.preventDefault(),c)return c(J);i?location.hash=`/${s}/a/${g}`:z.showAccount={account:e,instance:s}}},children:[r("div",{class:"avatar-container",children:r(_e,{url:o?k:b||k,staticUrl:o?void 0:k,size:n,squircle:I})}),r("span",{class:"account-block-content",children:[!u&&r(F,{children:S?r("b",{children:r(un,{text:S,emojis:_,resolverURL:T})}):r("b",{children:C})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[ct?"":"@",et,r("wbr",{}),ct,W&&r(F,{children:[" ",r(M,{icon:"lock",size:"s",alt:m({id:"G2fuEb"})})]})]}),r(xo,{roles:B,accountUrl:T}),l&&r("div",{class:"account-block-stats",children:[r(x,{id:"ajzDof",values:{0:ae(E)}}),!!w&&r(F,{children:[" ","·"," ",r(x,{id:"f8bJ3C",values:{0:Kn(w,{hideTime:!0})}})]})]}),h&&r("div",{class:"account-block-stats",children:[I&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"bot"})," ",r(x,{id:"9Vdq+j"})]})}),!!A&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"group"})," ",r(x,{id:"L8fEEm"})]})}),st&&r("div",{class:"shazam-container-horizontal",children:r("div",{class:"shazam-container-inner",children:V.following&&V.followedBy?r("span",{class:"tag minimal",children:r(x,{id:"7oRLbi"})}):V.requested?r("span",{class:"tag minimal",children:r(x,{id:"Yx0Ud8"})}):V.following?r("span",{class:"tag minimal",children:r(x,{id:"y6sq5j"})}):V.followedBy?r("span",{class:"tag minimal",children:r(x,{id:"p3UO/y"})}):null})},f.id),!!$&&r("span",{class:"ib",children:r(x,{id:"Mn1E9C",values:{followersCount:$}})}),!!nt&&r("span",{class:"verified-field",children:[r(M,{icon:"check-circle",size:"s",alt:m({id:"QDEWii"})})," ",r("span",{dangerouslySetInnerHTML:{__html:ga(nt.value,{emojis:_})}})]}),!I&&!A&&!st&&!$&&!nt&&!!R&&r("span",{class:"created-at",children:r(x,{id:"PCcEFZ",values:{0:Kn(R,{hideTime:!0})},components:{0:r("time",{datetime:R})}})})]})]})]})}async function Ry(t,e={}){if(!t?.length)return;const{masto:n}=Ze(),o=qo(),s=t.reduce((a,i)=>(!a.includes(i.id)&&!e[i.id]&&i.id!==o&&a.push(i.id),a),[]);if(!s.length)return null;try{return(await n.v1.accounts.relationships.fetch({id:s})).reduce((c,l)=>(c[l.id]=l,c),{})}catch{return null}}function $y(t,e){return()=>Lt.number(t,{style:"unit",unit:e,unitDisplay:"long"})}const Lm=Object.prototype.toString,Pm=t=>Lm.call(t)==="[object Error]",Dm=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Network request failed","fetch failed","terminated"," A network error occurred.","Network connection lost"]);function Rm(t){if(!(t&&Pm(t)&&t.name==="TypeError"&&typeof t.message=="string"))return!1;const{message:n,stack:o}=t;return n==="Load failed"?o===void 0||"__sentry_captured__"in t:n.startsWith("error sending request for url")?!0:Dm.has(n)}function $m(t){if(typeof t=="number"){if(t<0)throw new TypeError("Expected `retries` to be a non-negative number.");if(Number.isNaN(t))throw new TypeError("Expected `retries` to be a valid number or Infinity, got NaN.")}else if(t!==void 0)throw new TypeError("Expected `retries` to be a number or Infinity.")}function or(t,e,{min:n=0,allowInfinity:o=!1}={}){if(e!==void 0){if(typeof e!="number"||Number.isNaN(e))throw new TypeError(`Expected \`${t}\` to be a number${o?" or Infinity":""}.`);if(!o&&!Number.isFinite(e))throw new TypeError(`Expected \`${t}\` to be a finite number.`);if(e<n)throw new TypeError(`Expected \`${t}\` to be ≥ ${n}.`)}}class Nm 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}}function Om(t,e){const n=Math.max(1,t+1),o=e.randomize?Math.random()+1:1;let s=Math.round(o*e.minTimeout*e.factor**(n-1));return s=Math.min(s,e.maxTimeout),s}function ss(t,e){return Number.isFinite(e)?e-(performance.now()-t):e}async function Fm({error:t,attemptNumber:e,retriesConsumed:n,startTime:o,options:s}){const a=t instanceof Error?t:new TypeError(`Non-error was thrown: "${t}". You should only throw errors.`);if(a instanceof Nm)throw a.originalError;const i=Number.isFinite(s.retries)?Math.max(0,s.retries-n):s.retries,c=s.maxRetryTime??Number.POSITIVE_INFINITY,l=Object.freeze({error:a,attemptNumber:e,retriesLeft:i,retriesConsumed:n});if(await s.onFailedAttempt(l),ss(o,c)<=0)throw a;const h=await s.shouldConsumeRetry(l),d=ss(o,c);if(d<=0||i<=0)throw a;if(a instanceof TypeError&&!Rm(a)){if(h)throw a;return s.signal?.throwIfAborted(),!1}if(!await s.shouldRetry(l))throw a;if(!h)return s.signal?.throwIfAborted(),!1;const u=Om(n,s),f=Math.min(u,d);return f>0&&await new Promise((p,m)=>{const g=()=>{clearTimeout(v),s.signal?.removeEventListener("abort",g),m(s.signal.reason)},v=setTimeout(()=>{s.signal?.removeEventListener("abort",g),p()},f);s.unref&&v.unref?.(),s.signal?.addEventListener("abort",g,{once:!0})}),s.signal?.throwIfAborted(),!0}async function Bm(t,e={}){if(e={...e},$m(e.retries),Object.hasOwn(e,"forever"))throw new Error("The `forever` option is no longer supported. For many use-cases, you can set `retries: Infinity` instead.");e.retries??=10,e.factor??=2,e.minTimeout??=1e3,e.maxTimeout??=Number.POSITIVE_INFINITY,e.maxRetryTime??=Number.POSITIVE_INFINITY,e.randomize??=!1,e.onFailedAttempt??=()=>{},e.shouldRetry??=()=>!0,e.shouldConsumeRetry??=()=>!0,or("factor",e.factor,{min:0,allowInfinity:!1}),or("minTimeout",e.minTimeout,{min:0,allowInfinity:!1}),or("maxTimeout",e.maxTimeout,{min:0,allowInfinity:!0}),or("maxRetryTime",e.maxRetryTime,{min:0,allowInfinity:!0}),e.factor>0||(e.factor=1),e.signal?.throwIfAborted();let n=0,o=0;const s=performance.now();for(;!Number.isFinite(e.retries)||o<=e.retries;){n++;try{e.signal?.throwIfAborted();const a=await t(n);return e.signal?.throwIfAborted(),a}catch(a){await Fm({error:a,attemptNumber:n,retriesConsumed:o,startTime:s,options:e})&&o++}}throw new Error("Retry attempts exhausted without throwing an error.")}const va="LanguageDetector"in self,zm=va&&"Translator"in self;let We;va&&(async()=>{try{const t=await LanguageDetector.availability();if(t==="unavailable")return;t==="available"?We=await LanguageDetector.create():(We=await LanguageDetector.create({monitor(e){e.addEventListener("downloadprogress",n=>{})}}),await We.ready)}catch{}})();const Hm=async(t,e,n)=>{let o;const s=e;if(e==="auto"){if(!We?.detect)return{error:"No language detector"};try{e=(await We.detect(t))[0].detectedLanguage,o=e}catch(i){return{error:i}}}const a=`💬 BROWSER TRANSLATE ${t}`;console.groupCollapsed(a);try{const i=await Translator.availability({sourceLanguage:e,targetLanguage:n});if(i==="unavailable")return console.groupEnd(a),{error:`Unsupported language pair: ${e} -> ${n}`};let c;i==="available"?c=await Translator.create({sourceLanguage:e,targetLanguage:n}):(c=await Translator.create({sourceLanguage:e,targetLanguage:n,monitor(h){h.addEventListener("downloadprogress",d=>{})}}),await c.ready);const l=await c.translate(t);return console.groupEnd(a),{content:l,detectedSourceLanguage:o,provider:"browser"}}catch(i){return console.groupEnd(a),{error:i}}};var Km=Object.defineProperty,jm=(t,e,n)=>e in t?Km(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mn=(t,e,n)=>jm(t,typeof e!="symbol"?e+"":e,n),Lo=new Map,ir=new WeakMap,as=0,Um;function qm(t){return t?(ir.has(t)||(as+=1,ir.set(t,as.toString())),ir.get(t)):"0"}function Wm(t){return Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>`${e}_${e==="root"?qm(t.root):t[e]}`).toString()}function Zm(t){const e=Wm(t);let n=Lo.get(e);if(!n){const o=new Map;let s;const a=new IntersectionObserver(i=>{i.forEach(c=>{var l;const h=c.isIntersecting&&s.some(d=>c.intersectionRatio>=d);t.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=h),(l=o.get(c.target))==null||l.forEach(d=>{d(h,c)})})},t);s=a.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:a,elements:o},Lo.set(e,n)}return n}function ya(t,e,n={},o=Um){if(typeof window.IntersectionObserver>"u"&&o!==void 0){const l=t.getBoundingClientRect();return e(o,{isIntersecting:o,target:t,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:s,observer:a,elements:i}=Zm(n),c=i.get(t)||[];return i.has(t)||i.set(t,c),c.push(e),a.observe(t),function(){c.splice(c.indexOf(e),1),c.length===0&&(i.delete(t),a.unobserve(t)),i.size===0&&(a.disconnect(),Lo.delete(s))}}function Vm(t){return typeof t.children!="function"}var Ny=class extends zs{constructor(t){super(t),Mn(this,"node",null),Mn(this,"_unobserveCb",null),Mn(this,"lastInView"),Mn(this,"handleNode",e=>{this.node&&(this.unobserve(),!e&&!this.props.triggerOnce&&!this.props.skip&&(this.setState({inView:!!this.props.initialInView,entry:void 0}),this.lastInView=this.props.initialInView)),this.node=e||null,this.observeNode()}),Mn(this,"handleChange",(e,n)=>{const o=this.lastInView;this.lastInView=e,!(o===void 0&&!e)&&(e&&this.props.triggerOnce&&this.unobserve(),Vm(this.props)||this.setState({inView:e,entry:n}),this.props.onChange&&this.props.onChange(e,n))}),this.state={inView:!!t.initialInView,entry:void 0},this.lastInView=t.initialInView}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:o,delay:s,fallbackInView:a}=this.props;this.lastInView===void 0&&(this.lastInView=this.props.initialInView),this._unobserveCb=ya(this.node,this.handleChange,{threshold:t,root:e,rootMargin:n,trackVisibility:o,delay:s},a)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if(typeof t=="function"){const{inView:p,entry:m}=this.state;return t({inView:p,entry:m,ref:this.handleNode})}const{as:e,triggerOnce:n,threshold:o,root:s,rootMargin:a,onChange:i,skip:c,trackVisibility:l,delay:h,initialInView:d,fallbackInView:u,...f}=this.props;return Cc(e||"div",{ref:this.handleNode,...f},t)}};var cs,ls,Gm=(ls=(cs=Ec)!=null?cs:ke)!=null?ls:q,Ym=(t,{threshold:e,root:n,rootMargin:o,trackVisibility:s,delay:a,triggerOnce:i,skip:c}={})=>{const l=N(t),h=N(null),d=N(void 0),u=N(void 0);return Gm(()=>{l.current=t},[t]),yt(f=>{const p=()=>{if(d.current){const b=d.current;d.current=void 0,b()}};if(f===h.current)return d.current;if(!f||c){p(),h.current=null,u.current=void 0;return}p(),h.current=f;let m=!1;const g=ya(f,(b,k)=>{const S=u.current;u.current=b,!(S===void 0&&!b)&&(l.current(b,k),i&&b&&v())},{threshold:e,root:n,rootMargin:o,trackVisibility:s,delay:a});function v(){m||(m=!0,g(),h.current=null,d.current=void 0,u.current=void 0)}return d.current=v,d.current},[Array.isArray(e)?e.toString():e,n,o,s,a,i,c])};const us=48,ro={};function ba({id:t,children:e}){const n=N(),[o,s]=H(!!ro[t]),a=yt(c=>{c&&n.current&&(n.current.hidden=!1,t&&(ro[t]=!0))},[t]),i=Ym(a,{rootMargin:`-${us}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,triggerOnce:!0,skip:o});return ke(()=>{if(!n.current)return;const c=n.current.getBoundingClientRect();c.bottom>us&&(c.top<window.innerHeight?n.current.hidden=!1:s(!0),t&&(ro[t]=!0))},[]),o?e:r("div",{ref:n,class:"shazam-container no-animation",hidden:!0,children:r("div",{ref:i,class:"shazam-container-inner",children:e})})}const Xm={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_TRANSLANG_INSTANCES:"translang.phanpy.social",PHANPY_WEBSITE:"https://phanpy.social",PROD:!0,SSR:!1,VITE_APP_ENV:"production"},Qm=Object.entries(pa.sl).map(([t,e])=>({code:t,name:e})),{PHANPY_TRANSLANG_INSTANCES:ds}=Xm,Po=ds?ds.split(/\s+/):[],wa=new Uo({concurrency:1,interval:2e3,intervalCap:1}),_a=1e3*60*60;let oo=0;function Jm(t,e,n){return Bm(()=>{let s=Po[oo];const a=t.length>2e3;let i;return a?i=fetch(`https://${s}/api/v1/translate`,{method:"POST",priority:"low",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/json"},body:JSON.stringify({sl:e,tl:n,text:t})}):i=fetch(`https://${s}/api/v1/translate?sl=${encodeURIComponent(e)}&tl=${encodeURIComponent(n)}&text=${encodeURIComponent(t)}`,{priority:"low",referrerPolicy:"no-referrer"}),i.then(c=>{if(!c.ok)throw new Error(c.statusText);return c.json()}).then(c=>({provider:"translang",content:c.translated_text,detectedSourceLanguage:c.detected_language,pronunciation:c.pronunciation}))},{retries:3,onFailedAttempt:s=>{oo=(oo+1)%Po.length}})}const ka=Er(Jm,{maxAge:_a}),tg=Er(({signal:t,text:e,source:n,target:o})=>wa.add(()=>ka(e,n,o),{signal:t}),{maxAge:_a}),eg=({text:t,source:e,target:n,signal:o})=>wa.add(()=>Hm(t,e,n),{signal:o});function ng({forceTranslate:t,sourceLanguage:e,onTranslate:n,text:o="",mini:s,autoDetected:a}){const{_:i}=Kt(),c=ma(!0),[l,h]=H("default"),[d,u]=H(null),[f,p]=H(null),[m,g]=H(null),v=N(),b=N(),k=e?An(e):null,S=An(c),C=N("auto");n||(n=async({text:T,source:E,target:w,signal:I})=>{if(zm){const P=await eg({text:T,source:E,target:w,signal:I});if(P&&!P.error)return P}return s?await tg({signal:I,text:T,source:E,target:w}):await ka(T,E,w)});const _=async()=>{h("loading");try{const{content:T,detectedSourceLanguage:E,provider:w,error:I,...P}=await n({text:o,source:C.current,target:c,signal:b.current?.signal});if(T){if(E){const L=An(E);g(L)}if(w==="translang"){const L=P?.pronunciation;L&&u(L)}p(T),h("default"),!s&&T.trim()!==o.trim()&&v.current&&(v.current.open=!0,v.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else h("error")}catch(T){T.name!=="AbortError"&&h("error")}};return q(()=>{t&&_()},[t]),q(()=>(b.current=new AbortController,()=>{b.current.abort()}),[]),s?f&&f.trim()!==o.trim()&&m!==S?r(ba,{children:r("div",{class:"status-translation-block-mini",children:[r(M,{icon:"translate",alt:i({id:"zVJKbG",values:{sourceLangText:k}})}),r("output",{lang:c,dir:"auto",title:d||"",children:f})]})}):null:r("div",{class:"status-translation-block",onClick:T=>{T.preventDefault()},children:r("details",{ref:v,children:[r("summary",{children:r("button",{type:"button",class:l==="loading"?"loading-mask":"",onClick:async T=>{T.preventDefault(),T.stopPropagation(),v.current.open=!v.current.open,l!=="loading"&&(f||_())},children:[r(M,{icon:"translate"})," ",r("span",{children:i(l==="loading"?{id:"Zxkt/v"}:e&&k&&!m?a?{id:"R20Yf9",values:{sourceLangText:k}}:{id:"h8zDAI",values:{sourceLangText:k}}:{id:"pi8x/S"})})]})}),r("div",{class:"translated-block",children:[r("div",{class:"translation-info insignificant",children:[r("select",{class:"translated-source-select",disabled:l==="loading",onChange:T=>{C.current=T.target.value,_()},children:Qm.map(T=>{const E=An({code:T.code,fallback:T.name}),w=An({code:T.code,locale:T.code}),I=w&&E!==w;return r("option",{value:T.code,children:T.code==="auto"?i({id:"Bze3gr",values:{0:m??"…"}}):I?`${w} - ${E}`:E})})})," ",r("span",{children:["→ ",S]}),r(yr,{abrupt:!0,hidden:l!=="loading"})]}),l==="error"?r("p",{class:"ui-state",children:r(x,{id:"m5LihO"})}):!!f&&r(F,{children:[r("output",{class:"translated-content",lang:c,dir:"auto",children:f}),!!d&&r("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:T=>{T.target.classList.toggle("expand")},children:d})]})]})]})})}const rg=Po?.length?ng:()=>null;function Se(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function Ta(t,e){let n;const o=()=>{if(n)return n;const s=indexedDB.open(t);return s.onupgradeneeded=()=>s.result.createObjectStore(e),n=Se(s),n.then(a=>{a.onclose=()=>n=void 0},()=>{}),n};return(s,a)=>o().then(i=>a(i.transaction(e,s).objectStore(e)))}let io;function Ye(){return io||(io=Ta("keyval-store","keyval")),io}function og(t,e=Ye()){return e("readonly",n=>Se(n.get(t)))}function ig(t,e,n=Ye()){return n("readwrite",o=>(o.put(e,t),Se(o.transaction)))}function sg(t,e=Ye()){return e("readonly",n=>Promise.all(t.map(o=>Se(n.get(o)))))}function ag(t,e=Ye()){return e("readwrite",n=>(n.delete(t),Se(n.transaction)))}function cg(t,e=Ye()){return e("readwrite",n=>(t.forEach(o=>n.delete(o)),Se(n.transaction)))}function lg(t=Ye()){return t("readwrite",e=>(e.clear(),Se(e.transaction)))}function ug(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},Se(t.transaction)}function dg(t=Ye()){return t("readonly",e=>{if(e.getAllKeys)return Se(e.getAllKeys());const n=[];return ug(e,o=>n.push(o.key)).then(()=>n)})}function hs(t,e){const n=Ta(t,e);return{set:(o,s)=>ig(o,s,n),get:o=>og(o,n),getMany:o=>sg(o,n),del:o=>ag(o,n),delMany:o=>cg(o,n),clear:()=>lg(n),keys:()=>dg(n)}}const Oy={drafts:hs("drafts-db","drafts-store"),catchup:hs("catchup-db","catchup-store")},Sa=ce({}),hg=!!document.startViewTransition;function Fy({children:t,statusID:e}){const n=N([]),[o,s]=H(!1),[a,i]=H(0);function c(p){p!==a&&(hg?document.startViewTransition(()=>{i(p)}):i(p))}async function l(){const{masto:p}=Ze(),m=await p.v1.statuses.$select(e).history.list();m.sort((g,v)=>Date.parse(v.createdAt)-Date.parse(g.createdAt)),n.current=m}async function h(){try{await l(),s(!0),c(0)}catch{s(!1)}}function d(){n.current=[],s(!1),c(0)}function u(){c(p=>Math.min(p+1,n.current.length-1))}function f(){c(p=>Math.max(p-1,0))}return r(Sa.Provider,{value:{editHistoryRef:n,initEditHistory:h,exitEditHistory:d,editHistoryMode:o,editedAtIndex:a,prevEditedAt:u,nextEditedAt:f},children:t})}function fg(){return It(Sa)}const ri=ce();function pg(t,e){if(!t?.length)return!1;const n=t.filter(i=>{const{filter:c}=i,l=c.context.includes(e);return l?c.expiresAt?Date.parse(c.expiresAt)>Date.now():l:!1});if(!n.length)return!1;if(n.some(i=>i.filter.filterAction==="hide"))return{action:"hide"};if(n.every(i=>i.filter.filterAction==="blur")){const i=n.map(c=>c.filter.title);return{action:"blur",titles:i,titlesStr:i.join(" • ")}}if(n.some(i=>!!i.filter.filterAction)){const i=n.map(c=>c.filter.title);return{action:"warn",titles:i,titlesStr:i.join(" • ")}}return!1}const Mr=Wt(pg);function mg(t,e,n){const{filtered:o}=t;if(!o?.length||n&&t.account?.id===n)return!0;const a=Mr(o,e);return a?a.action!=="hide":!0}function By(t,e){if(!t?.length)return[];if(!e)return t;const n=qo();return t.filter(o=>mg(o,e,n))}const sr=document.createElement("template");function gg(t){if(!t)return 0;sr.innerHTML=t;const e=sr.content.querySelectorAll(".invisible");for(let o=0;o<e.length;o++)e[o].remove();let n="";for(let o=0;o<sr.content.childNodes.length;o++){const s=sr.content.childNodes[o];n+=s.innerText||s.textContent||""}return n.length}const Do="speechSynthesis"in window;function vg(t,e){if(Do)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(t);e&&(n.lang=e),speechSynthesis.speak(n)}catch(n){alert(n)}}function yg(t,e,n,o){var s=this,a=N(null),i=N(0),c=N(0),l=N(null),h=N([]),d=N(),u=N(),f=N(t),p=N(!0);f.current=t;var m=typeof window<"u",g=!e&&e!==0&&m;if(typeof t!="function")throw new TypeError("Expected a function");e=+e||0;var v=!!(n=n||{}).leading,b=!("trailing"in n)||!!n.trailing,k="maxWait"in n,S="debounceOnServer"in n&&!!n.debounceOnServer,C=k?Math.max(+n.maxWait||0,e):null;q(function(){return p.current=!0,function(){p.current=!1}},[]);var _=it(function(){var T=function($){var R=h.current,W=d.current;return h.current=d.current=null,i.current=$,c.current=c.current||$,u.current=f.current.apply(W,R)},E=function($,R){g&&cancelAnimationFrame(l.current),l.current=g?requestAnimationFrame($):setTimeout($,R)},w=function($){if(!p.current)return!1;var R=$-a.current;return!a.current||R>=e||R<0||k&&$-i.current>=C},I=function($){return l.current=null,b&&h.current?T($):(h.current=d.current=null,u.current)},P=function $(){var R=Date.now();if(v&&c.current===i.current&&L(),w(R))return I(R);if(p.current){var W=e-(R-a.current),B=k?Math.min(W,C-(R-i.current)):W;E($,B)}},L=function(){o&&o({})},A=function(){if(m||S){var $=Date.now(),R=w($);if(h.current=[].slice.call(arguments),d.current=s,a.current=$,R){if(!l.current&&p.current)return i.current=a.current,E(P,e),v?T(a.current):u.current;if(k)return E(P,e),T(a.current)}return l.current||E(P,e),u.current}};return A.cancel=function(){var $=l.current;$&&(g?cancelAnimationFrame(l.current):clearTimeout(l.current)),i.current=0,h.current=a.current=d.current=l.current=null,$&&o&&o({})},A.isPending=function(){return!!l.current},A.flush=function(){return l.current?I(Date.now()):u.current},A},[v,k,e,C,b,g,m,S,o]);return _}function bg(t,e,n){var o=n===void 0?{}:n,s=o.leading,a=o.trailing;return yg(t,e,{maxWait:e,leading:s===void 0||s,trailing:a===void 0||a})}function wg(t,e){var n=N(null),o=N(null);o.current=e;var s=N(null);q(function(){a()});var a=yt(function(){var i=s.current,c=o.current,l=i||(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 q(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),yt(function(i){s.current=i,a()},[a])}function fs(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 _g(t){t===void 0&&(t={});var e=t.onResize,n=N(void 0);n.current=e;var o=t.round||Math.round,s=N(),a=H({width:void 0,height:void 0}),i=a[0],c=a[1],l=N(!1);q(function(){return l.current=!1,function(){l.current=!0}},[]);var h=N({width:void 0,height:void 0}),d=wg(yt(function(u){return(!s.current||s.current.box!==t.box||s.current.round!==o)&&(s.current={box:t.box,round:o,instance:new ResizeObserver(function(f){var p=f[0],m=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=fs(p,m,"inlineSize"),v=fs(p,m,"blockSize"),b=g?o(g):void 0,k=v?o(v):void 0;if(h.current.width!==b||h.current.height!==k){var S={width:b,height:k};h.current.width=b,h.current.height=k,n.current?n.current(S):l.current||c(S)}})}),s.current.instance.observe(u,{box:t.box}),function(){s.current&&s.current.instance.unobserve(u)}},[t.box,o]),t.ref);return it(function(){return{ref:d,width:i.width,height:i.height}},[d,i.width,i.height])}function kg(t={}){const e=bg(t.onResize,300);return _g({...t,onResize:e})}function On({className:t="truncated"}={}){const e=N();return kg({ref:e,box:"border-box",onResize:({height:o})=>{if(e.current){const{scrollHeight:s}=e.current;let a=s>o;if(a){const{height:i,maxHeight:c}=getComputedStyle(e.current),l=parseInt(c||i,10);a=s>l}e.current.classList.toggle(t,a)}}}),e}const Fn={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"},qe={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"pPYeIN"},private:{id:"x5LEuB"},direct:{id:"IV4QaU"}},Tg=["\\\\\\[[\\s\\S]*?\\\\\\]","\\\\\\([\\s\\S]*?\\\\\\)"],ps=new RegExp(Tg.join("|"),"g");function Sg(t){const e=["\\\\\\[","\\\\\\("],n=new RegExp(`(${e.join("|")})`),o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),s=[];let a;for(;a=o.nextNode();)s.push(a);for(const i of s){const c=i.textContent,l=c.match(n);if(!l)continue;const d=l[0]==="\\["?"\\]":"\\)",u=[i];let f=i,p=!1,m=c;if(c.includes(d))p=!0;else for(;f.nextSibling&&!p;){const g=f.nextSibling;if(g.nodeType===Node.TEXT_NODE)u.push(g),m+=g.textContent,g.textContent.includes(d)&&(p=!0);else if(g.nodeType===Node.ELEMENT_NODE&&g.tagName==="BR")u.push(g),m+=`
`;else break;f=g}if(p&&u.length>1){i.textContent=m;for(let g=1;g<u.length;g++)u[g].remove()}}}const Cg=({content:t,contentRef:e,onRevert:n})=>{if(ps.lastIndex=0,!ps.test(t))return null;const{_:s}=Kt(),[a,i]=H(!1),c=yt(async l=>{if(l.preventDefault(),l.stopPropagation(),a)i(!1),n();else try{const h=window.temml||(window.temml=(await Hs(async()=>{const{default:p}=await import("./temml-Dns96zBN.js");return{default:p}},[],import.meta.url))?.default);Sg(e.current);const d=e.current.innerHTML;h.renderMathInElement(e.current,{fences:"(",annotate:!0,throwOnError:!0,errorCallback:p=>{}});const u=e.current.querySelector("math"),f=e.current.innerHTML!==d;u&&f?i(!0):(ht(s({id:"HBIZeo"})),i(!1),n())}catch{}},[a]);return r("div",{class:"math-block",children:[r(M,{icon:"formula",size:"s"})," ",r("span",{children:s({id:"/nf2x7"})})," ",r("button",{type:"button",class:"light small",onClick:c,children:s(a?{id:"AJqQb+"}:{id:"dP6iYK"})})]})},Ca=new Uint8Array(128);for(let t=0;t<83;t++)Ca["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(t)]=t;const mr=(t,e,n)=>{let o=0;for(;e<n;)o*=83,o+=Ca[t.charCodeAt(e++)];return o},Ea=Math.pow,jn=Math.PI,Eg=jn*2,Aa=3294.6,xa=269.025,Ag=t=>t>10.31475?Ea(t/xa+.052132,2.4):t/Aa,so=t=>~~(t>1227e-8?xa*Ea(t,.416666)-13.025:t*Aa+1),Bn=t=>(t<0?-1:1)*t*t,ms=t=>{for(t+=jn/2;t>jn;)t-=Eg;const e=1.27323954*t-.405284735*Bn(t);return .225*(Bn(e)-e)+e};function oi(t){const e=mr(t,2,6);return[e>>16,e>>8&255,e&255]}function xg(t,e,n,o){const s=mr(t,0,1),a=s%9+1,i=~~(s/9)+1,c=a*i;let l=0,h=0,d=0,u=0,f=0,p=0,m=0,g=0,v=0,b=0,k=0,S=0;const C=(mr(t,1,2)+1)/13446*(o|1),_=new Float64Array(c*3),T=oi(t);for(l=0;l<3;l++)_[l]=Ag(T[l]);for(l=1;l<c;l++)S=mr(t,4+l*2,6+l*2),_[l*3]=Bn(~~(S/361)-9)*C,_[l*3+1]=Bn(~~(S/19)%19-9)*C,_[l*3+2]=Bn(S%19-9)*C;const E=new Float64Array(i*n),w=new Float64Array(a*e);for(h=0;h<i;h++)for(u=0;u<n;u++)E[h*n+u]=ms(jn*u*h/n);for(l=0;l<a;l++)for(d=0;d<e;d++)w[l*e+d]=ms(jn*d*l/e);const I=e*4,P=new Uint8ClampedArray(I*n);for(u=0;u<n;u++)for(d=0;d<e;d++){for(f=p=m=0,h=0;h<i;h++)for(v=E[h*n+u],l=0;l<a;l++)g=w[l*e+d]*v,b=(l+h*a)*3,f+=_[b]*g,p+=_[b+1]*g,m+=_[b+2]*g;k=4*d+u*I,P[k]=so(f),P[k+1]=so(p),P[k+2]=so(m),P[k+3]=255}return P}var Ma="kvfysmfp",Ia="ufhsfnkm",Mg=".".concat(Ma,"{overflow:hidden;touch-action:none}.").concat(Ia,"{transform-origin: 0 0}"),Ig=typeof window>"u",Lg=function(){return!Ig&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Pg=function(t){var e=t.x,n=t.y,o=t.scale;return"scale3d(".concat(o,",").concat(o,", 1) translate3d(").concat(e,"px, ").concat(n,"px, 0)")};var Dg=Math.min,Rg=Math.max;function gs(t){var e=t.containerDimension,n=t.childDimension,o=t.padding,s=t.centerContained,a=n-e;return a+2*o<=0&&s?[a/2,a/2]:[Dg(a+o,0)-o,Rg(0,a+o)]}var vs=function(t,e){return e?"".concat(t," ").concat(e):t},ar=Math.abs,$g=Math.min,Ng=Math.sqrt,La=typeof window>"u",Og=La?!1:/(Mac)/i.test(navigator.platform),rn=function(t){return t==="drag"},In=function(t){return t==="zoom"},Fg=function(t){return Og&&t.ctrlKey},Ln=function(t){t.stopPropagation(),t.preventDefault()},ys=function(t,e){var n=t.x-e.x,o=t.y-e.y;return Ng(n*n+o*o)},Bg=function(t,e){var n=ys(t[0],t[1]),o=ys(e[0],e[1]);return o/n},zg=function(t,e){return t>e-.01&&t<e+.01},Hg=function(t){return-Math.cos(t*Math.PI)/2+.5},Kg=function(t){return{x:t.pageX,y:t.pageY}},cr=function(t){return Array.from(t).map(Kg)},bs=function(t,e){return t+e},jg=function(t){return{x:t.map(function(e){var n=e.x;return n}).reduce(bs,0)/t.length,y:t.map(function(e){var n=e.y;return n}).reduce(bs,0)/t.length}},ao=function(t,e,n){return n<t?t:n>e?e:n},Ug=function(t){return!(t.ctrlKey||t.metaKey)},qg=function(t){if(t){var e=t.offsetWidth,n=t.offsetHeight;if(e&&n)return{width:e,height:n};var o=getComputedStyle(t),s=parseFloat(o.width),a=parseFloat(o.height);if(a&&s)return{width:s,height:a}}return{width:0,height:0}},Wg=function(t,e){return{x:e.x-t.x,y:e.y-t.y}},Zg=function(t,e){return t.x===e.x&&t.y===e.y},ze=function(){},lr={x:0,y:0},ws=(function(t){Ac(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=Bt({},lr),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=Bt({},lr),n._startOffset=Bt({},lr),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=Bt({},lr),n._ignoreNextClick=!1,n._containerRef=xc(),n._handleClick=function(o){n._ignoreNextClick&&(n._ignoreNextClick=!1,o.stopPropagation())},n._onResize=function(){var o;!((o=n._containerRef)===null||o===void 0)&&o.current&&(n._updateInitialZoomFactor(),n._setupOffsets(),n._update())},n._handlerOnTouchEnd=n._handlerIfEnable(function(o){n._fingers=o.touches.length,n.props.shouldCancelHandledTouchEndEvents&&(In(n._interaction)||rn(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&Ln(o),rn(n._interaction)&&!n._enoughToDrag()&&n._handleClick(o),n._updateInteraction(o)}),n._handlerOnTouchStart=n._handlerIfEnable(function(o){n._firstMove=!0,n._fingers=o.touches.length,n._detectDoubleTap(o)}),n._handlerOnTouchMove=n._handlerIfEnable(function(o){n._isDoubleTap||(n._collectInertia(o),n._firstMove?(n._updateInteraction(o),n._interaction&&Ln(o),n._startOffset=Bt({},n._offset),n._startTouches=cr(o.touches)):(In(n._interaction)?n._startTouches&&n._startTouches.length===2&&o.touches.length===2&&n._handleZoom(o,Bg(n._startTouches,cr(o.touches))):rn(n._interaction)&&n._handleDrag(o),n._interaction&&(Ln(o),n._update())),n._firstMove=!1)}),n._handlerWheel=function(o){if(!n.props.shouldInterceptWheel(o)){Ln(o);var s=o.pageX,a=o.pageY,i=o.deltaY,c=o.deltaMode,l=1;(Fg(o)||c===1)&&(l=15);var h={touches:[{pageX:s,pageY:a}]},d=n._getOffsetByFirstTouch(h),u=i*l;n._stopAnimation(),n._scaleTo(n._zoomFactor-u/n.props.wheelScaleFactor,d),n._update(),clearTimeout(n._wheelTimeOut),n._wheelTimeOut=setTimeout(function(){return n._sanitize()},100)}},n._handlers=n.props.isTouch()?[["touchstart",n._handlerOnTouchStart],["touchend",n._handlerOnTouchEnd],["touchmove",n._handlerOnTouchMove]]:[["mousemove",n.simulate(n._handlerOnTouchMove),n.props._document],["mouseup",n.simulate(n._handlerOnTouchEnd),n.props._document],["mousedown",n.simulate(n._handlerOnTouchStart)],["click",n._handleClick],["wheel",n._handlerWheel]],n}return 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 o=this._getOffsetByFirstTouch(n);this._enoughToDrag()?this._drag(o,this._lastDragPosition):this._virtualDrag(o,this._lastDragPosition),this._offset=this._sanitizeOffset(this._offset),this._lastDragPosition=o},e.prototype._resetInertia=function(){this._velocity=null,this._prevDragMovePoint=null},e.prototype._realizeInertia=function(){var n=this,o=this.props,s=o.inertiaFriction,a=o.inertia;if(!(!a||!this._velocity)){var i=this._velocity,c=i.x,l=i.y;if(c||l){this._stopAnimation(),this._resetInertia();var h=function(){if(c*=s,l*=s,!c&&!l)return n._stopAnimation();var d=Bt({},n._offset);if(n._addOffset({x:c,y:l}),n._offset=n._sanitizeOffset(n._offset),Zg(d,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(h,{duration:9999})}}},e.prototype._collectInertia=function(n){var o=n.touches;if(this.props.inertia){var s=cr(o)[0],a=this._prevDragMovePoint;a&&(this._velocity=Wg(s,a)),this._prevDragMovePoint=s}},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,o){var s=jg(this._getOffsetTouches(n)),a=o/this._lastScale;this._lastScale=o,this._nthZoom+=1,this._nthZoom>3&&(this._scale(a,s),this._drag(s,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=s},e.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},e.prototype._handleDoubleTap=function(n){var o=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var s=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,i=this._zoomFactor,c=function(h){o._scaleTo(i+h*(a-i),l)},l=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,i>a&&(l=this._getCurrentZoomCenter()),s?this._zoomOutAnimation():this._animate(c)}},e.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),o=this._getChildSize(),s=o.width,a=o.height,i=-ar(s*this._getInitialZoomFactor()-n.width)/2,c=-ar(a*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:i,y:c}},e.prototype._resetOffset=function(){this._offset=Bt({},this._initialOffset)},e.prototype._setupOffsets=function(){this.props.setOffsetsOnce&&this._isOffsetsSet||(this._isOffsetsSet=!0,this._computeInitialOffset(),this._resetOffset())},e.prototype._sanitizeOffset=function(n){var o=this._getContainerRect(),s=this._getChildSize(),a=s.width,i=s.height,c=a*this._getInitialZoomFactor()*this._zoomFactor,l=i*this._getInitialZoomFactor()*this._zoomFactor,h=gs({containerDimension:o.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),d=h[0],u=h[1],f=gs({containerDimension:o.height,childDimension:l,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),p=f[0],m=f[1];return{x:ao(d,u,n.x),y:ao(p,m,n.y)}},e.prototype.alignCenter=function(n){var o=this,s=Bt({duration:250,animated:!0},n),a=s.x,i=s.y,c=s.scale,l=s.animated,h=s.duration,d=a*this._initialZoomFactor,u=i*this._initialZoomFactor,f=this._zoomFactor,p=Bt({},this._offset),m=this._getContainerRect(),g={x:m.width/2,y:m.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-d),y:-(g.y-u)},this._scaleTo(c,g),this._stopAnimation(),!l)return this._update();var v=this._zoomFactor-f,b={x:this._offset.x-p.x,y:this._offset.y-p.y};this._zoomFactor=f,this._offset=Bt({},p);var k=function(S){var C=p.x+b.x*S,_=p.y+b.y*S;o._zoomFactor=f+v*S,o._offset=o._sanitizeOffset({x:C,y:_}),o._update()};this._animate(k,{callback:function(){return o._sanitize()},duration:h})},e.prototype.scaleTo=function(n){var o=this,s=Bt({duration:250,animated:!0},n),a=s.x,i=s.y,c=s.scale,l=s.animated,h=s.duration,d=this._zoomFactor,u=Bt({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(c,{x:a,y:i}),this._stopAnimation(),!l)return this._update();var f=this._zoomFactor-d,p={x:this._offset.x-u.x,y:this._offset.y-u.y};this._zoomFactor=d,this._offset=Bt({},u);var m=function(g){var v=u.x+p.x*g,b=u.y+p.y*g;o._zoomFactor=d+f*g,o._offset={x:v,y:b},o._update()};this._animate(m,{callback:function(){return o._sanitize()},duration:h})},e.prototype._scaleTo=function(n,o){this._scale(n/this._zoomFactor,o),this._offset=this._sanitizeOffset(this._offset)},e.prototype._scale=function(n,o){n=this._scaleZoomFactor(n),this._addOffset({x:(n-1)*(o.x+this._offset.x),y:(n-1)*(o.y+this._offset.y)}),this.props.onZoomUpdate()},e.prototype._scaleZoomFactor=function(n){var o=this._zoomFactor;return this._zoomFactor*=n,this._zoomFactor=ao(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/o},e.prototype._canDrag=function(){return this.props.draggableUnZoomed||!zg(this._zoomFactor,1)},e.prototype._drag=function(n,o){if(o){var s=-(n.y-o.y),a=-(n.x-o.x);this.props.lockDragAxis?ar(a)>ar(s)?this._addOffset({x:a,y:0}):this._addOffset({y:s,x:0}):this._addOffset({x:a,y:s}),this.props.onDragUpdate()}},e.prototype._virtualDrag=function(n,o){if(o){var s=-(n.y-o.y),a=-(n.x-o.x);this._draggingPoint={x:a+this._draggingPoint.x,y:s+this._draggingPoint.y}}},e.prototype._addOffset=function(n){var o=this._offset,s=o.x,a=o.y;this._offset={x:s+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,o=this._sanitizeOffset(n);return o.x!==n.x||o.y!==n.y},e.prototype._sanitizeOffsetAnimation=function(){var n=this,o=this._sanitizeOffset(this._offset),s=Bt({},this._offset),a=function(i){var c=s.x+i*(o.x-s.x),l=s.y+i*(o.y-s.y);n._offset={x:c,y:l},n._update()};this._animate(a)},e.prototype._zoomOutAnimation=function(){var n=this;if(this._zoomFactor!==1){var o=this._zoomFactor,s=1,a=this._getCurrentZoomCenter(),i=function(c){var l=o+c*(s-o);n._scaleTo(l,a)};this._animate(i)}},e.prototype._getInitialZoomFactor=function(){return this._initialZoomFactor},e.prototype._getCurrentZoomCenter=function(){var n=this._offset,o=n.x,s=n.y,a=o-this._initialOffset.x,i=s-this._initialOffset.y;return{x:-1*o-a/(1/this._zoomFactor-1),y:-1*s-i/(1/this._zoomFactor-1)}},e.prototype._getOffsetByFirstTouch=function(n){return this._getOffsetTouches(n)[0]},e.prototype._getOffsetTouches=function(n){var o=this.props._document,s=o.documentElement,a=o.body,i=this._getContainerRect(),c=i.top,l=i.left,h=s.scrollTop||a.scrollTop,d=s.scrollLeft||a.scrollLeft,u=c+h,f=l+d;return cr(n.touches).map(function(p){var m=p.x,g=p.y;return{x:m-f,y:g-u}})},e.prototype._animate=function(n,o){var s=this,a=new Date().getTime(),i=Bt({timeFn:Hg,callback:function(){},duration:this.props.animationDuration},o),c=i.timeFn,l=i.callback,h=i.duration,d=function(){if(s._inAnimation){var u=new Date().getTime()-a,f=u/h;u>=h?(n(1),s._stopAnimation(),l(),s._update()):(f=c(f),n(f),s._update({isAnimation:!0}),requestAnimationFrame(d))}};this._inAnimation=!0,requestAnimationFrame(d)},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 qg(n?.firstElementChild)},e.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),o=this._getChildSize(),s=n.width/o.width,a=n.height/o.height;this._initialZoomFactor=$g(s,a)},e.prototype._bindEvents=function(){var n=this,o=this._containerRef.current;window.ResizeObserver?(this._containerObserver=new ResizeObserver(this._onResize),this._containerObserver.observe(o)):window.addEventListener("resize",this._onResize),this._handlers.forEach(function(s){var a=s[0],i=s[1],c=s[2];(c||o).addEventListener(a,i,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(s){return s.addEventListener("load",n._onResize)})},e.prototype._unSubscribe=function(){var n=this,o=this._containerRef.current;this._containerObserver&&(this._containerObserver.disconnect(),this._containerObserver=null),window.removeEventListener("resize",this._onResize),this._handlers.forEach(function(s){var a=s[0],i=s[1],c=s[2];(c||o).removeEventListener(a,i,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(s){return s.removeEventListener("load",n._onResize)})},e.prototype._update=function(n){var o=this;if(!this._updatePlaned){var s=function(){var a=o._getInitialZoomFactor()*o._zoomFactor,i=-o._offset.x/a,c=-o._offset.y/a;o.props.onUpdate({scale:a,x:i,y:c})};if(n?.isAnimation)return s();this._updatePlaned=!0,requestAnimationFrame(function(){o._updatePlaned=!1,s()})}},e.prototype._handlerIfEnable=function(n){var o=this;return function(){for(var s=[],a=0;a<arguments.length;a++)s[a]=arguments[a];o.props.enabled&&n.apply(void 0,s)}},e.prototype._setInteraction=function(n,o){var s=this._interaction;s!==n&&(s&&!n&&(In(s)?this._handleZoomEnd():rn(s)&&this._handleDragEnd()),In(n)?this._handleZoomStart():rn(n)&&this._handleDragStart(o)),this._interaction=n},e.prototype._distanceBetweenNumbers=function(n,o){return n>o?n-o:o-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 o=this._fingers;if(o===2)return this._setInteraction("zoom",n);if(o===1&&this._canDrag())return this._setInteraction("drag",n);this._setInteraction(null,n)},e.prototype._detectDoubleTap=function(n){var o=new Date().getTime();this._fingers>1&&(this._lastTouchStart=0),o-this._lastTouchStart<300?(Ln(n),this._handleDoubleTap(n),In(this._interaction)?this._handleZoomEnd():rn(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=o)},e.prototype.simulate=function(n){var o=this;return function(s){var a=s.pageX,i=s.pageY,c=s.type,l=c==="mouseup",h=c==="mousedown";h&&(s.preventDefault(),o._listenMouseMove=!0),o._listenMouseMove&&(s.touches=l?[]:[{pageX:a,pageY:i}],n(s)),l&&(o._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,o=n.children,s=n.containerProps,a=n.nonce,i=Mc.only(o),c=s||{};return Jn.createElement(Jn.Fragment,null,Jn.createElement("style",{nonce:a},Mg),Jn.createElement("div",Bt({},c,{ref:this._containerRef,className:vs(Ma,c.className)}),Fs(i,{className:vs(Ia,i.props.className)})))},e.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Lg,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:ze,onDragEnd:ze,onDragStart:ze,onDragUpdate:ze,onZoomEnd:ze,onZoomStart:ze,onZoomUpdate:ze,setOffsetsOnce:!1,shouldInterceptWheel:Ug,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:La?null:window.document},e})(zs);if(0)var zy,Hy,Ky,jy,Uy,qy,Wy,Zy;function co(t){if(!t)return;let e=Math.floor(t/3600),n=Math.floor(t%3600/60),o=Math.round(t%60);return e===0?`${n}:${o.toString().padStart(2,"0")}`:`${e}:${n.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`}const Vg=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Gg="ALT",lo=t=>{const{_:e}=Kt(),{alt:n,lang:o,index:s,...a}=t;return!n||!n.trim()?null:r("button",{type:"button",class:"alt-badge clickable",...a,onClick:i=>{i.stopPropagation(),i.preventDefault(),z.showMediaAlt={alt:n,lang:o}},title:e({id:"5gfDMm"}),children:[Gg,!!s&&r("sup",{children:s})]})},Yg=140,Xg=280,Pa=Wt(t=>t?.length?t.length>Yg||/[\n\r].*[\n\r]/.test(t.trim()):!1);function Qg({class:t="",media:e,to:n,lang:o,showOriginal:s,autoAnimate:a,showCaption:i,allowLongerCaption:c,altIndex:l,checkAspectRatio:h=!0,onClick:d}){let{id:u,blurhash:f,description:p,meta:m,previewRemoteUrl:g,previewUrl:v,remoteUrl:b,url:k,type:S}=e;/no\-preview\./i.test(v)&&(v=null);const C=Jg(u||f||k),{original:_={},small:T,focus:E}=m||{},w=s?_?.width:T?.width||_?.width,I=s?_?.height:T?.height||_?.height,P=s?k:v||k,L=s?b:g||b,A=T?.width&&T?.height,R=w&&I?w>I?"landscape":"portrait":null,W=f?oi(f):null,B=N();let Y;if(E){const O=(E.x+1)/2*100,G=(1-E.y)/2*100;Y=`${O.toFixed(0)}% ${G.toFixed(0)}%`}const et=N(),ct=yt(({x:O,y:G,scale:U})=>{const{current:wt}=et;if(wt){const Mt=Pg({x:O,y:G,scale:U});U===1?wt.style.removeProperty("transform"):wt.style.setProperty("transform",Mt),wt.closest(".media-zoom").style.touchAction=U<=1.01?"pan-x":""}},[]),[nt,V]=H(!1),st={enabled:nt,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:ct},[J,Tt]=H(!1),Pt=it(()=>n&&!J?O=>r(Ve,{to:n,...O}):"div",[n,J]),$t=L?_s(L):null,dt=S==="unknown"&&$t&&/\.(mp4|m4r|m4v|mov|webm)$/i.test($t.pathname),le=S==="unknown"&&$t&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test($t.pathname),ne=S==="image"||S==="unknown"&&v&&!dt&&!le,re=v&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(_s(v).pathname),K=N(),[ft,Dt]=H(!1);ke(()=>{if(!ne||!s||!K.current)return;const{offsetWidth:O,offsetHeight:G}=K.current,U=w<O&&I<G;U&&Dt(U)},[w,I]);const At=window.innerHeight*(R==="portrait"?.45:.33),Ft=R==="portrait"?0:160,jt={"--average-color":W&&`rgb(${W.join(",")})`},tt=w&&I?{"--width":`${w}px`,"--height":`${I}px`,"--aspectWidth":`${w/I*Math.max(Ft,At)}px`,aspectRatio:`${w} / ${I}`,...jt}:{...jt},rt=Pa(p);let lt=!!i&&!s&&!!p&&!rt;c&&!lt&&p?.length<=Xg&&(lt=!0);const gt=lt?O=>{const{children:G,...U}=O;return r("figure",{...U,children:[G,r("figcaption",{class:"media-caption",lang:o,dir:"auto",onClick:wt=>{wt.preventDefault(),wt.stopPropagation(),z.showMediaAlt={alt:p,lang:o}},children:p})]})}:F,Zt=()=>window.matchMedia("(min-width: calc(40em + 350px))").matches?"large":"small",bt=yt(O=>{const G=O.target.closest(".status-deck");if(s||Zt()==="large"&&G||!document.startViewTransition){d?.(O);return}const U=O.target.closest("[data-view-transition-name]")||O.target.querySelector("[data-view-transition-name]");if(U)if(d)d(O);else if(O.preventDefault(),U.dataset.viewTransitioned){U.style.viewTransitionName=C;try{document.startViewTransition(()=>{U.style.viewTransitionName="",location.hash=`#${n}`})}catch{U.style.viewTransitionName="",location.hash=`#${n}`}}else location.hash=`#${n}`;else d?.(O)},[C,s,d]);if(ne)return st.containerProps.style.display="inherit",ke(()=>{Vg&&s&&(async()=>{try{await fetch(P,{mode:"no-cors"}),et.current.src=P}catch{}})()},[P]),r(gt,{children:[r(Pt,{ref:K,class:`media media-image ${t}`,onClick:bt,"data-orientation":R,"data-has-alt":!lt||void 0,style:s?{backgroundImage:`url(${v})`,"--bg-image":`url(${v})`,backgroundSize:ft?`${w}px ${I}px`:void 0,...jt}:tt,children:s?r(ws,{...st,children:r("img",{ref:et,src:P,alt:p,width:w,height:I,"data-orientation":R,loading:"eager",decoding:"sync",style:{"view-transition-name":C},onLoad:O=>{const G=O.target,U=G.closest(".media-image");U&&(U.style.backgroundImage=`url(${G.src})`,U.style.removeProperty("--bg-image")),G.closest(".media-zoom").style.display="",V(!0)},onError:O=>{const{src:G}=O.target;G===P&&L&&P!==L&&(O.target.src=L)}})}):r(F,{children:[r("img",{src:P,alt:lt?"":p,width:w,height:I,"data-orientation":R,loading:"lazy","data-view-transition-name":C,style:{objectPosition:Y||"center","--anim-duration":`${Math.min(Math.max(Math.max(w,I)/100,5),120)}s`},onLoad:O=>{O.target.dataset.loaded=!0;const G=O.target.closest(".media");if(!A&&G){const{naturalWidth:U,naturalHeight:wt}=O.target;G.dataset.orientation=U>wt?"landscape":"portrait",G.style.setProperty("--width",`${U}px`),G.style.setProperty("--height",`${wt}px`),G.style.aspectRatio=`${U}/${wt}`}if(h&&G){const{target:U}=O;setTimeout(()=>{const{clientWidth:wt,clientHeight:Mt,naturalWidth:pt,naturalHeight:xt}=U;if(wt&&Mt&&pt&&xt)if(pt<88||xt<88)G.dataset.hasSmallDimension=!0;else{const vt=xt*wt/pt;if(Math.abs(vt-Mt)<5){const Z=G.closest(".media");Z&&(Z.dataset.hasNaturalAspectRatio=!0)}}},300)}},onError:O=>{const{src:G}=O.target;G===P&&L&&P!==L?O.target.src=L:Tt(!0)}}),!lt&&r(lo,{alt:p,lang:o,index:l})]})}),J&&r("div",{children:r("a",{href:b,class:"button plain6 small",target:"_blank",children:[r(M,{icon:"external"})," ",r("span",{children:r(x,{id:"9npOH9"})})]})})]});if(S==="gifv"||S==="video"||dt){const O=_.duration>0,G=_.duration<31,U=S==="gifv"&&G,wt=_.duration<61,Mt=co(_.duration),pt=!s&&!a&&U,xt=!s&&a&&U,Rt=_.duration>5,vt=`
<video
src="${k}"
poster="${v}"
width="${w}"
height="${I}"
data-orientation="${R}"
style="view-transition-name: ${C}"
preload="auto"
autoplay
muted
playsinline
${wt?"loop":""}
ondblclick="this.paused ? this.play() : this.pause()"
${Rt?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`,Vt=`
<video
src="${k}"
poster="${v}"
width="${w}"
height="${I}"
data-orientation="${R}"
style="view-transition-name: ${C}"
preload="auto"
autoplay
playsinline
${wt?"loop":""}
controls
></video>
`;return r(gt,{children:r(Pt,{ref:K,class:`media ${t} media-${U?"gif":"video"} ${xt?"media-contain":""} ${pt?"media-hover-animate":""}`,"data-orientation":R,"data-formatted-duration":s?void 0:Mt,"data-label":U&&!s&&!xt?"GIF":void 0,"data-has-alt":!lt||void 0,style:!s&&tt,onClick:Z=>{if(pt)try{B.current.pause()}catch{}bt(Z)},onMouseEnter:()=>{if(pt)try{B.current.play()}catch{}},onMouseLeave:()=>{if(pt)try{B.current.pause()}catch{}},onFocus:()=>{if(pt)try{B.current.play()}catch{}},onBlur:()=>{if(pt)try{B.current.pause()}catch{}},children:[s||xt?U&&s?r(ws,{...st,enabled:!0,children:r("div",{ref:et,dangerouslySetInnerHTML:{__html:vt}})}):U?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:vt}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Vt}}):U?r("video",{ref:B,src:k,poster:v,width:w,height:I,"data-orientation":R,"data-view-transition-name":C,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:Rt?Z=>{const{target:_t}=Z,Ht=_t?.closest(".media-gif");if(Ht){const oe=_t.currentTime/_t.duration*100;Ht.style.setProperty("--progress",`${oe}%`)}}:void 0}):r(F,{children:[v&&!re?r("img",{src:v,alt:lt?"":p,width:w,height:I,"data-orientation":R,loading:"lazy",decoding:"async","data-view-transition-name":C,onLoad:Z=>{if(!A){const _t=Z.target.closest(".media");if(_t){const{naturalHeight:Ht,naturalWidth:oe}=Z.target;_t.dataset.orientation=oe>Ht?"landscape":"portrait",_t.style.setProperty("--width",`${oe}px`),_t.style.setProperty("--height",`${Ht}px`),_t.style.aspectRatio=`${oe}/${Ht}`}}}}):r("video",{src:k+"#t=0.1",width:w,height:I,"data-orientation":R,"data-view-transition-name":C,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:Z=>{if(!O){const{duration:_t}=Z.target;if(_t){const Ht=co(_t),oe=Z.target.closest(".media-video");oe&&(oe.dataset.formattedDuration=Ht)}}}}),r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})})]}),!s&&!lt&&r(lo,{alt:p,lang:o,index:l})]})})}else if(S==="audio"||le){const O=co(_.duration);return r(gt,{children:r(Pt,{class:`media media-audio ${t}`,"data-formatted-duration":s?void 0:O,"data-has-alt":!lt||void 0,onClick:d,style:!s&&tt,children:[s?r("audio",{src:b||k,preload:"none",controls:!0,autoPlay:!0}):v?r("img",{src:v,alt:lt?"":p,width:w,height:I,"data-orientation":R,loading:"lazy",onError:G=>{try{G.target?.remove?.()}catch{}}}):null,!s&&r(F,{children:[r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})}),!lt&&r(lo,{alt:p,lang:o,index:l})]})]})})}}function _s(t){return URL.parse(t,location.origin)}function Jg(t){let e=t.replace(/[^a-zA-Z0-9_-]/g,"-");return e.match(/^[0-9-]/)&&(e="vt-"+e),e}const Ro=$e(Qg,(t,e)=>{const n=t.media||{},o=e.media||{};return n?.id===o?.id&&n.url===o.url&&t.to===e.to&&t.class===e.class});function tv(t){const{mediaAttachments:e,language:n,postID:o,instance:s}=t,a=e.length>1,i=N(),[c,l]=H(0);return q(()=>{let h=()=>{const{clientWidth:d,scrollLeft:u}=i.current,f=Math.round(Math.abs(u)/d);l(f)};return i.current&&i.current.addEventListener("scroll",h,{passive:!0}),()=>{i.current&&i.current.removeEventListener("scroll",h)}},[]),r(F,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:i,children:e.map((h,d)=>r("div",{class:"media-first-item",children:r(Ro,{media:h,lang:n,to:`/${s}/s/${o}?media=${d+1}`})},h.id))}),a&&r("div",{class:"media-carousel-controls",children:[r("div",{class:"carousel-indexer",children:[c+1,"/",e.length]}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===0,onClick:h=>{h.preventDefault(),h.stopPropagation(),i.current.focus(),i.current.scrollTo({left:i.current.clientWidth*(c-1)*(Tr()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-left"})})}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===e.length-1,onClick:h=>{h.preventDefault(),h.stopPropagation(),i.current.focus(),i.current.scrollTo({left:i.current.clientWidth*(c+1)*(Tr()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-right"})})})]})]}),a&&r("div",{class:"media-carousel-dots",style:{"--dots-count":e.length},children:e.map((h,d)=>r("span",{class:`carousel-dot ${d===c?"active":""}`},h.id))})]})}function ev(t){const{enabled:e,children:n,lang:o,captionChildren:s}=t;return!e||!s?n:r("figure",{class:"media-figure-multiple",children:[n,r("figcaption",{lang:o,dir:"auto",children:s})]})}function nv({poll:t,lang:e,readOnly:n,refresh:o=()=>{},votePoll:s=()=>{}}){const{_:a}=Kt(),[i,c]=H("default"),{expired:l,expiresAt:h,id:d,multiple:u,options:f,ownVotes:p,voted:m,votersCount:g,votesCount:v=0,emojis:b}=t,k=!!h&&new Date(h),S=u&&g||v;let C=0;S<=1e3?C=0:S<=1e4?C=1:S<=1e5&&(C=2);const[_,T]=H(!1),E=f.every(w=>w.votesCount!==null);return r("div",{lang:e,dir:"auto",class:`poll ${n?"read-only":""} ${i==="loading"?"loading":""}`,children:[_&&E||m||l?r(F,{children:[r("div",{class:"poll-options",children:f.map((w,I)=>{const{title:P,votesCount:L}=w,A=S?L/S:0,$=A?A.toLocaleString(Lt.locale||void 0,{style:"percent",maximumFractionDigits:C}):"0%",R=L>0&&L===Math.max(...f.map(W=>W.votesCount));return r("div",{class:`poll-option poll-result ${R?"poll-option-leading":""}`,style:{"--percentage":`${A*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(un,{text:P,emojis:b})}),m&&p.includes(I)&&r(F,{children:[" ",r(M,{icon:"check-circle",alt:a({id:"IeO7us"})})]})]}),r("div",{class:"poll-option-votes",title:Lt._({id:"+syLpm",values:{optionVotesCount:L}}),children:$})]},`${I}-${P}-${L}`)})}),!l&&!m&&r("button",{class:"poll-vote-button plain2",disabled:i==="loading",onClick:w=>{w.preventDefault(),T(!1)},children:[r(M,{icon:"arrow-left",size:"s"})," ",r(x,{id:"L96xSt"})]})]}):r("form",{onSubmit:async w=>{w.preventDefault();const I=w.target,P=new FormData(I),L=[];P.forEach((A,$)=>{$==="poll"&&L.push(A)}),L.length&&(c("loading"),await s(L),c("default"))},children:[r("div",{class:"poll-options",children:f.map((w,I)=>{const{title:P}=w;return r("div",{class:"poll-option",children:r("label",{class:"poll-label",children:[r("input",{type:u?"checkbox":"radio",name:"poll",value:I,disabled:i==="loading",readOnly:n}),r("span",{class:"poll-option-title",children:r(un,{text:P,emojis:b})})]})})})}),!n&&r("button",{class:"poll-vote-button",type:"submit",disabled:i==="loading",children:r(x,{id:"lQXQKs"})})]}),r("p",{class:"poll-meta",children:[r("span",{class:"spacer",children:[r("span",{class:"ib",children:r(x,{id:"k7v0Rh",values:{0:ae(v),1:ae(v),votesCount:v},components:{0:r("span",{title:v}),1:r("span",{title:v})}})}),!!g&&g!==v&&r(F,{children:[" ","•"," ",r("span",{class:"ib",children:r(x,{id:"jf1i1L",values:{0:ae(g),1:ae(g),votersCount:g},components:{0:r("span",{title:g}),1:r("span",{title:g})}})})]})," ","•"," ",l?k?r("span",{class:"ib",children:r(x,{id:"5LwCCI",components:{0:r(we,{datetime:k})}})}):a({id:"237hSL"}):k?r("span",{class:"ib",children:r(x,{id:"ooHDPY",components:{0:r(we,{datetime:k})}})}):a({id:"O2tNG0"})]}),!m&&!l&&!n&&E&&r("button",{type:"button",class:"plain small",disabled:i==="loading",onClick:w=>{w.preventDefault(),T(!_)},title:a(_?{id:"L96xSt"}:{id:"zCjei3"}),children:[r(M,{icon:_?"eye-open":"eye-close",alt:a(_?{id:"L96xSt"}:{id:"zCjei3"})})," "]}),!l&&!n&&r("button",{type:"button",class:"plain small",disabled:i==="loading",onClick:w=>{w.preventDefault(),c("loading"),(async()=>(await o(),c("default")))()},title:a({id:"lCF0wC"}),children:r(M,{icon:"refresh",alt:a({id:"lCF0wC"})})})]})]})}const rv=/^http/i,ks=(({post:t,instance:e,previewMode:n})=>{const{content:o,emojis:s,language:a,mentions:i,url:c}=t,l=Ge(z),h=Qt(t.id,e),d=l.statusQuotes[h],u=N();return ke(()=>{if(!u.current)return;const f=ga(o,{emojis:s,returnDOM:!0});for(const p of f.querySelectorAll('a.u-url[target="_blank"]'))rv.test(p.innerText.trim())||p.removeAttribute("target");u.current.replaceChildren(f.cloneNode(!0))},[o,s?.length]),q(()=>{if(d?.length)for(const f of u.current.querySelectorAll("a"))d.some(p=>p?.originalURL===f.href)&&f.classList.add("is-quote")},[d?.length]),r("div",{ref:u,lang:a,dir:"auto",class:"inner-content",onClick:Cm({mentions:i,instance:e,previewMode:n,statusURL:c})})});var uo,Ts;function ov(){return Ts||(Ts=1,uo=(e,n={})=>{const o=n.char||" ",s=n.count||2;let a=0;const i=[];return e.reverse().reduce((c,l)=>{i.length&&a&&i[a]&&i[a]===l.substring(1,i[a].length+1)&&(i.splice(a,1),a--);const d=[`${o.repeat(a?a*s:0)}${l}`,...c];return l.substring(0,2)==="</"&&(a++,i[a]=l.substring(2,l.length-1)),d},[]).join(`
`)}),uo}var ho,Ss;function iv(){if(Ss)return ho;Ss=1;const t=n=>n.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,"");return ho={mergeAttributesWithElements:n=>{const o=t(n).split(`
`),s=[];let a="";for(let i=0;i<o.length;i+=1){const c=o[i];if(c.endsWith("/>")){s.push(`${a}${c.slice(0,-2)} />`),a="";continue}if(c.endsWith(">")){s.push(`${a}${c.startsWith(">")||c.startsWith("<")?"":" "}${c}`),a="";continue}a+=a.length?` ${c}`:c}return s},removeEmptyLines:t},ho}var fo,Cs;function sv(){if(Cs)return fo;Cs=1;const t=ov(),{mergeAttributesWithElements:e}=iv();return fo=(o,s={})=>{const a=e(o);return t(a,s)},fo}var av=sv();const cv=Os(av);function Da(t,e,n=0){const{account:{url:o,displayName:s,acct:a,username:i,emojis:c,bot:l,group:h},id:d,poll:u,spoilerText:f,language:p,editedAt:m,createdAt:g,content:v,mediaAttachments:b,url:k,emojis:S}=t,C=Qt(d,e),T=(z.statusQuotes[C]||[]).filter((L,A,$)=>$.findIndex(R=>R.url===L.url)===A),E=T.length&&n<=2?T.map(L=>{const{id:A,instance:$}=L,R=Qt(A,$),W=z.statuses[R];if(W)return Da(W,$,++n)}).join(""):"",w=new Date(g),I=Io(v,S)+`
`+E+`
`+(u?.options?.length?`
<p>📊:</p>
<ul>
${u.options.map(L=>`
<li>
${L.title}
${L.votesCount>=0?` (${L.votesCount})`:""}
</li>
`).join("")}
</ul>`:"")+(b.length>0?`
`+b.map(L=>{const{description:A,meta:$,previewRemoteUrl:R,previewUrl:W,remoteUrl:B,url:Y,type:et}=L,{original:ct={},small:nt}=$||{},V=nt?.width||ct?.width,st=nt?.height||ct?.height,J=B||Y,Tt=R||W,Pt=Tt||J,$t=J?URL.parse(J):null,dt=et==="unknown"&&$t&&/\.(mp4|m4r|m4v|mov|webm)$/i.test($t.pathname),le=et==="unknown"&&$t&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test($t.pathname),ne=et==="image"||et==="unknown"&&Tt&&!dt&&!le,re=et==="gifv"||et==="video"||dt,K=et==="audio"||le;let ft="";return ne?ft=`<img src="${Pt}" width="${V}" height="${st}" alt="${A}" loading="lazy" />`:re?ft=`
<video src="${J}" width="${V}" height="${st}" controls preload="auto" poster="${Tt}" loading="lazy"></video>
${A?`<figcaption>${A}</figcaption>`:""}
`:K?ft=`
<audio src="${J}" controls preload="auto"></audio>
${A?`<figcaption>${A}</figcaption>`:""}
`:ft=`
<a href="${J}">📄 ${A||J}</a>
`,`<figure>${ft}</figure>`}).join(`
`):""),P=`
<blockquote lang="${p}" cite="${k}" data-source="fediverse">
${f?`
<details>
<summary>${f}</summary>
${I}
</details>
`:I}
<footer>
${Io(s,c)} (@${a}) ${g?`<a href="${k}"><time datetime="${w.toISOString()}">${w.toLocaleString()}</time></a>`:""}
</footer>
</blockquote>
`;return cv(P)}function lv({post:t,instance:e,onClose:n}){const{_:o}=Kt(),{account:{url:s,displayName:a,username:i,emojis:c,bot:l,group:h},id:d,poll:u,spoilerText:f,language:p,editedAt:m,createdAt:g,content:v,mediaAttachments:b,url:k,emojis:S}=t,C=Da(t,e);return r("div",{id:"embed-post",class:"sheet",children:[!!n&&r("button",{type:"button",class:"sheet-close",onClick:n,children:r(M,{icon:"x",alt:o({id:"yz7wBu"})})}),r("header",{children:r("h2",{children:r(x,{id:"jdVwsS"})})}),r("main",{tabIndex:"-1",children:[r("h3",{children:r(x,{id:"GkS6YG"})}),r("textarea",{class:"embed-code",readonly:!0,onClick:_=>{_.target.select()},dir:"auto",children:C}),r("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(C),ht(o({id:"bl7nrg"}))}catch{ht(o({id:"/KEBaP"}))}},children:[r(M,{icon:"clipboard"})," ",r("span",{children:r(x,{id:"he3ygx"})})]}),!!b?.length&&r("section",{children:[r("p",{children:r(x,{id:"/2mUza"})}),r("ol",{class:"links-list",children:b.map(_=>r("li",{children:r("a",{href:_.remoteUrl||_.url,target:"_blank",download:!0,children:_.remoteUrl||_.url})},_.id))})]}),!!c?.length&&r("section",{children:[r("p",{children:r(x,{id:"AeM/di"})}),r("ul",{children:c.map(_=>r("li",{children:[r("picture",{children:[r("source",{srcset:_.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:_.url,alt:`:${_.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",_.shortcode,":"]})," (",r("a",{href:_.url,target:"_blank",download:!0,children:"URL"}),")",_.staticUrl?r(F,{children:[" ","(",r("a",{href:_.staticUrl,target:"_blank",download:!0,children:r(x,{id:"xiropL"})}),")"]}):null]},_.shortcode))})]}),!!S?.length&&r("section",{children:[r("p",{children:r(x,{id:"jzjjJh"})}),r("ul",{children:S.map(_=>r("li",{children:[r("picture",{children:[r("source",{srcset:_.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:_.url,alt:`:${_.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",_.shortcode,":"]})," (",r("a",{href:_.url,target:"_blank",download:!0,children:"URL"}),")",_.staticUrl?r(F,{children:[" ","(",r("a",{href:_.staticUrl,target:"_blank",download:!0,children:r(x,{id:"xiropL"})}),")"]}):null]},_.shortcode))})]}),r("section",{children:r("small",{children:[r("p",{children:r(x,{id:"TnJgwX"})}),r("ul",{children:[r("li",{children:r(x,{id:"0OHPem"})}),r("li",{children:r(x,{id:"AzZ5zv"})}),r("li",{children:r(x,{id:"NU7wa/"})}),r("li",{children:r(x,{id:"R4PmPA"})})]})]})}),r("h3",{children:r(x,{id:"rdUucN"})}),r("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:C},dir:"auto"}),r("p",{children:r("small",{children:r(x,{id:"j0kZfi"})})})]})]})}function uv({onClose:t,post:e,currentPolicy:n}){const{_:o}=Kt(),{masto:s}=Ze(),[a,i]=H("default"),[c,l]=H(n||"public"),h=async d=>{d.preventDefault();const f=new FormData(d.target).get("quoteApprovalPolicy");l(f),i("loading");try{const p=await s.v1.statuses.$select(e.id).interactionPolicy.update({quote_approval_policy:f});t(!0),ht(o({id:"3P1r1z"})),i("default"),ye(p,e.instance,{skipThreading:!0,skipUnfurling:!0})}catch{ht(o({id:"hEe3YR"})),i("error")}};return r("div",{class:"sheet",id:"quote-settings-container",children:[!!t&&r("button",{type:"button",class:"sheet-close",onClick:t,disabled:a==="loading",children:r(M,{icon:"x",alt:o({id:"yz7wBu"})})}),r("header",{children:r("h2",{children:r(x,{id:"UWSCwN"})})}),r("main",{children:[!!e&&r("div",{class:"post-preview",children:r($a,{status:e,size:"s",readOnly:!0})}),r("form",{onSubmit:h,children:[r("select",{value:c,name:"quoteApprovalPolicy",disabled:a==="loading",children:[r("option",{value:"public",children:r(x,{id:"hDWXuG"})}),r("option",{value:"followers",children:r(x,{id:"9Ko+Xp"})}),r("option",{value:"nobody",children:r(x,{id:"+bAQ3S"})})]})," ",r("button",{disabled:a==="loading",children:r(x,{id:"tfDRzk"})})]})]})]})}const Es=20;function dv({statusId:t,instance:e,onClose:n=()=>{}}){const{_:o}=Kt(),{masto:s}=Ze(),[a,i]=H([]),[c,l]=H("default"),[h,d]=H(!1),u=N(),f=N(!0),p=(m=!1)=>{(m||!u.current)&&(u.current=s.v1.statuses.$select(t).quotes.list({limit:Es}).values()),l("loading"),(async()=>{try{let{done:g,value:v}=await u.current.next();Array.isArray(v)?(i(m?v:b=>[...b,...v]),v.length<Es&&(g=!0),d(!g)):d(!1),l("default")}catch{l("error")}})()};return q(()=>{p(!0),f.current=!1},[t]),r("div",{id:"quotes-modal",class:"sheet",tabindex:"-1",children:[n&&r("button",{type:"button",class:"sheet-close",onClick:n,children:r(M,{icon:"x",alt:o({id:"yz7wBu"})})}),r("header",{children:r("h2",{children:r(x,{id:"eWLklq"})})}),r("main",{children:a.length>0?r(F,{children:[r("ul",{class:"quoted-posts-list",children:a.map(m=>r("li",{class:"quoted-post-item",children:r(Ve,{to:e?`/${e}/s/${m.id}`:`/s/${m.id}`,class:"status-link",onContextMenu:g=>{const v=g.target.querySelector(".status");if(v){if(g.metaKey)return;g.preventDefault(),v.dispatchEvent(new MouseEvent("contextmenu",{clientX:g.clientX,clientY:g.clientY}))}},children:r($a,{status:m,instance:e,size:"s",readOnly:!0,showCommentCount:!0})})},m.id))}),c==="default"?h?r("button",{type:"button",class:"plain block",onClick:()=>p(),children:r(x,{id:"uXRAkV"})}):r("p",{class:"ui-state insignificant",children:r(x,{id:"2EYeAZ"})}):c==="loading"&&r("p",{class:"ui-state",children:r(yr,{abrupt:!0})})]}):c==="loading"?r("p",{class:"ui-state",children:r(yr,{abrupt:!0})}):c==="error"?r("p",{class:"ui-state",children:r(x,{id:"3Uoj83"})}):r("p",{class:"ui-state insignificant",children:r(x,{id:"/Xg6f6"})})})]})}const He=Re((t,e)=>{let{checked:n,count:o,extraCount:s,class:a,title:i,alt:c,size:l,icon:h,iconSize:d="l",onClick:u,...f}=t;typeof i=="string"&&(i=[i,i]),typeof c=="string"&&(c=[c,c]);const[p,m]=H(i[0]||""),[g,v]=H(c[0]||"");return q(()=>{n?(m(i[1]||""),v(c[1]||"")):(m(i[0]||""),v(c[0]||""))},[n,i,c]),r("button",{ref:e,type:"button",title:p,class:`plain ${l?"small":""} ${a} ${n?"checked":""}`,onClick:b=>{u&&(b.preventDefault(),b.stopPropagation(),u(b))},...f,children:[r(M,{icon:h,size:d,alt:g}),(!!o||!!s)&&r(F,{children:[" ",!!o&&r("small",{title:o,children:ae(o)}),!!o&&!!s&&r("small",{children:"+"}),!!s&&r("small",{title:s,children:ae(s)})]})]})});class Ut extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.isPlaylistThumbnailLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid","videoplay","videotitle"]}connectedCallback(){this.addEventListener("pointerover",()=>Ut.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)}set posterQuality(e){this.setAttribute("posterquality",e)}get disableNoscript(){return this.hasAttribute("disablenoscript")}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;
top: 0;
}
#frame {
cursor: pointer;
}
#fallbackPlaceholder, slot[name=image]::slotted(*) {
object-fit: cover;
width: 100%;
height: 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" part="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.shadowRoot.querySelector("slot[name=image]").assignedNodes().length===0&&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(),this.disableNoscript||this.injectSearchNoScript()}attributeChangedCallback(e,n,o){n!==o&&(e==="playlistid"&&n!==null&&n!==o&&(this.isPlaylistThumbnailLoaded=!1),this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1))}injectSearchNoScript(){const e=document.createElement("noscript");this.prepend(e),e.innerHTML=this.generateIframe()}generateIframe(e=!1){let n=e?0:1,o=this.autoPause?"&enablejsapi=1":"";const s=this.noCookie?"-nocookie":"";let a;return this.playlistId?a=`?listType=playlist&list=${this.playlistId}&`:a=`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1),`
<iframe credentialless frameborder="0" title="${this.videoTitle}"
referrerpolicy="strict-origin-when-cross-origin"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
src="https://www.youtube${s}.com/embed/${a}autoplay=${n}${o}&${this.params}"
></iframe>`}addIframe(e=!1){if(!this.isIframeLoaded){const n=this.generateIframe(e);this.domRefFrame.insertAdjacentHTML("beforeend",n),this.domRefFrame.classList.add("activated"),this.isIframeLoaded=!0,this.attemptShortAutoPlay(),this.dispatchEvent(new CustomEvent("liteYoutubeIframeLoaded",{detail:{videoId:this.videoId},bubbles:!0,cancelable:!0}))}}initImagePlaceholder(){this.playlistId&&!this.videoId?this.loadPlaylistThumbnail():this.testPosterImage(),this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.domRefImg?.fallback?.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}async loadPlaylistThumbnail(){if(!this.isPlaylistThumbnailLoaded){this.isPlaylistThumbnailLoaded=!0;try{const e=`https://www.youtube.com/oembed?url=https://www.youtube.com/playlist?list=${this.playlistId}&format=json`,n=await fetch(e);if(!n.ok)throw new Error(`Failed to fetch playlist thumbnail: ${n.status}`);const o=await n.json();if(o.thumbnail_url){const s=o.thumbnail_url,a=s.match(/\/vi\/([^\/]+)\//);if(a){const i=a[1];this.loadThumbnailImages(i)}else this.domRefImg.fallback.src=s,this.domRefImg.fallback.loading=this.posterLoading}}catch(e){console.warn("Failed to load playlist thumbnail:",e)}}}loadThumbnailImages(e){const n=`https://i.ytimg.com/vi_webp/${e}/${this.posterQuality}.webp`;this.domRefImg.webp.srcset=n;const o=`https://i.ytimg.com/vi/${e}/${this.posterQuality}.jpg`;this.domRefImg.jpeg.srcset=o,this.domRefImg.fallback.src=o,this.domRefImg.fallback.loading=this.posterLoading}async testPosterImage(){setTimeout(()=>{const e=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`,n=new Image;n.fetchPriority="low",n.referrerPolicy="origin",n.src=e,n.onload=async o=>{const s=o.target;s?.naturalHeight==90&&s?.naturalWidth==120&&(this.posterQuality="hqdefault"),this.loadThumbnailImages(this.videoId)}},100)}initIntersectionObserver(){const e={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((o,s)=>{o.forEach(a=>{a.isIntersecting&&!this.isIframeLoaded&&(Ut.warmConnections(this),this.addIframe(!0),s.unobserve(this))})},e).observe(this),this.autoPause&&new IntersectionObserver((s,a)=>{s.forEach(i=>{i.intersectionRatio!==1&&this.shadowRoot.querySelector("iframe")?.contentWindow?.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")})},{threshold:1}).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{this.shadowRoot.querySelector("iframe")?.contentWindow?.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return this.getAttribute("short")===""&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(e,n){const o=document.createElement("link");o.rel=e,o.href=n,o.crossOrigin="true",document.head.append(o)}static warmConnections(e){Ut.isPreconnected||window.liteYouTubeIsPreconnected||(Ut.addPrefetch("preconnect","https://i.ytimg.com/"),Ut.addPrefetch("preconnect","https://s.ytimg.com"),e.noCookie?Ut.addPrefetch("preconnect","https://www.youtube-nocookie.com"):(Ut.addPrefetch("preconnect","https://www.youtube.com"),Ut.addPrefetch("preconnect","https://www.google.com"),Ut.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Ut.addPrefetch("preconnect","https://static.doubleclick.net")),Ut.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Ut.isPreconnected=!1;customElements.define("lite-youtube",Ut);function hv({authors:t,hidden:e,children:n}){if(e||!t?.[0]?.account?.id)return n;const o=t[0].account;return r("div",{class:"card-byline",children:[n,r("div",{class:"card-byline-author",children:[r(M,{icon:"link",size:"s"})," ",r("small",{children:r(x,{id:"4LHHK6",components:{0:r(Pe,{account:o,showAvatar:!0})}})})]})]})}function As(t){return["x.com","twitter.com","threads.net","bsky.app","bsky.brid.gy","fed.brid.gy"].includes(t)}function fv({card:t,selfReferential:e,selfAuthor:n,instance:o}){const s=Ge(z),{blurhash:a,title:i,description:c,html:l,providerName:h,providerUrl:d,authorName:u,authorUrl:f,width:p,height:m,image:g,imageDescription:v,url:b,type:k,embedUrl:S,language:C,publishedAt:_,authors:T}=t,E=i||h||u,I=p/m>=1.2?"large":"",[P,L]=H(null);if(q(()=>{if(!E||!g||e||!Ic(b))return;const B=new AbortController;return Lc(o,b,B.signal).then(Y=>{if(!Y)return;const{id:et,url:ct}=Y;L("#"+ct)}),()=>{B.abort()}},[E,g,e]),s.unfurledLinks[b])return null;const A=/<iframe/i.test(l),$=yt(B=>{A&&(B.preventDefault(),z.showEmbedModal={html:l,url:b||S,width:p,height:m})},[A]),[R,W]=H(null);if(E&&(g||k==="photo"&&a)){const B=vo(b),Y=g&&a?oi(a):null;if(!g){const V=xg(a,44,44),st=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");st.width=44,st.height=44;const J=st.getContext("2d");J.imageSmoothingEnabled=!1;const Tt=J.createImageData(44,44);Tt.data.set(V),J.putImageData(Tt,0,0);try{window.OffscreenCanvas?st.convertToBlob().then(Pt=>{W(URL.createObjectURL(Pt))}):W(st.toDataURL())}catch{}}const et=As(B);return r(hv,{hidden:!!n,authors:T,children:r("a",{href:P||b,target:P?null:"_blank",rel:"nofollow noopener",class:`card link ${et?"card-post":""} ${R?"":I} ${A?"can-show-embed":""}`,style:{"--average-color":Y&&`rgb(${Y.join(",")})`},onClick:$,children:[r("div",{class:"card-image",children:r("img",{src:g||R,width:p,height:m,loading:"lazy",decoding:"async",fetchPriority:"low",alt:v||"",onError:ct=>{try{ct.target.style.display="none"}catch{}},style:{"--anim-duration":p&&m&&`${Math.min(Math.max(Math.max(p,m)/100,5),120)}s`}})}),r("div",{class:"meta-container",lang:C,children:[r("p",{class:"meta domain",children:[r("span",{class:"domain",children:B})," ",!!_&&r(F,{children:"· "}),!!_&&r(F,{children:r(we,{datetime:_,format:"micro"})})]}),r("p",{class:"title",dir:"auto",title:i,children:i}),r("p",{class:"meta",dir:"auto",title:c,children:c||!!_&&r(we,{datetime:_,format:"micro"})})]})]})})}else{if(k==="photo")return r("a",{href:b,target:"_blank",rel:"nofollow noopener",class:"card photo",onClick:$,children:r("img",{src:S,width:p,height:m,alt:i||c,loading:"lazy",style:{height:"auto",aspectRatio:`${p}/${m}`}})});if(k==="video"&&/youtube/i.test(h)){const B=b.match(/watch\?v=([^&]+)/)?.[1];if(B)return r("a",{class:"card video",onClick:$,children:r("lite-youtube",{videoid:B,nocookie:!0,autoPause:!0})})}if(E&&!g){const B=vo(b),Y=As(B);return r("a",{href:P||b,target:P?null:"_blank",rel:"nofollow noopener",class:`card link ${Y?"card-post":""} no-image`,lang:C,dir:"auto",onClick:$,children:r("div",{class:"meta-container",children:[r("p",{class:"meta domain",children:[r("span",{class:"domain",children:[r(M,{icon:"link",size:"s"})," ",r("span",{children:B})]})," ",!!_&&r(F,{children:"· "}),!!_&&r(F,{children:r(we,{datetime:_,format:"micro"})})]}),r("p",{class:"title",title:i,children:i}),r("p",{class:"meta",title:c||h||u,children:c||h||u})]})})}}}function pv({sKey:t}){const n=Ge(z).statusReply[t];if(!n)return null;const{id:o,instance:s}=n,a=Ks(o,s);if(!a)return null;const{account:{id:i},sensitive:c,spoilerText:l,account:{avatar:h,avatarStatic:d,bot:u}={},visibility:f,content:p,language:m,filtered:g}=a;if(c||l||!p)return null;const v=Qt(o,s),b=ni(a),k=Wo(),S=k&&k===i,C=It(ri);let _=!S&&Mr(g,C);if(_?.action==="blur"&&(_=null),_?.action==="hide")return null;const T=_?.titlesStr||"";return r("article",{class:`status compact-reply shazam ${f==="direct"?"visibility-direct":""}`,tabindex:"-1","data-state-post-id":v,children:[r(_e,{url:d||h,squircle:u}),r("div",{class:"content-compact",title:b,lang:m,dir:"auto",children:_?r("b",{class:"status-filtered-badge badge-meta",title:T,children:[r("span",{children:r(x,{id:"03Qqf9"})}),r("span",{children:T})]}):r("span",{children:b})})]})}const mv=ce(0);function xs({alt:t}){return r(M,{icon:"thread",size:"s",alt:t})}function Ms({index:t,showIcon:e,showText:n}){const{_:o}=Kt(),s=It(mv),a=t>0,i=s>0;return r("div",{class:"status-thread-badge",children:[e&&r(F,{children:[r(xs,{alt:n?"":o({id:"e66y2Z"})})," "]}),n?a?i?r(x,{id:"A05Pj6",values:{index:t,total:s}}):r(x,{id:"fYeATS",values:{index:t}}):o({id:"e66y2Z"}):a?o(i?{id:"98E0aM",values:{index:t,total:s}}:{id:"NNrlf5",values:{index:t}}):!e&&r(xs,{alt:o({id:"e66y2Z"})})]})}const gv={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_TRANSLANG_INSTANCES:"translang.phanpy.social",PHANPY_WEBSITE:"https://phanpy.social",PROD:!0,SSR:!1,VITE_APP_ENV:"production"},vv=280,yv=140,bv=new Uo({concurrency:1,interval:1e3,intervalCap:1});function wv(t,e,n){return bv.add(()=>e.v1.accounts.$select(t).fetch(),{signal:n})}const _v=Er(wv),kv=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),Is=80;function Tv(t){return t?.options?.length?`📊:
${t.options.map(e=>`- ${e.title}${e.votesCount>=0?` (${e.votesCount})`:""}`).join(`
`)}`:""}function po(t,e){const{maskCustomEmojis:n,maskURLs:o,hideInlineQuote:s,htmlTextOpts:a={}}=e||{},{spoilerText:i,poll:c,emojis:l}=t;let{content:h}=t;if(n&&l?.length){const d=new RegExp(`:(${l.map(u=>u.shortcode).join("|")}):`,"g");h=h.replace(d,"⬚")}return(i?`${i}
`:"")+ei(h,{...a,preProcess:(o||s)&&(d=>{if(o)for(const u of d.querySelectorAll("a")){const f=u.innerText.trim();/^https?:\/\//i.test(f)&&u.replaceWith("«🔗»")}if(s){const u=d.querySelector(".quote-inline");u&&u.remove()}})})+Tv(c)}function Sv(t=[],e=document){for(const n of t)try{return e.querySelectorAll(n)}catch{}return[]}const Ra=Wt((t,e)=>{if(!t)return"";if(e?.length){const n=new RegExp(`:(${e.map(o=>o.shortcode).join("|")}):`,"g");t=t.replace(n,"")}return t=t.trim(),t?ei(t,{preProcess:n=>{for(const o of Sv([".mention, .hashtag, pre, code, a:has(.invisible)",".mention, .hashtag, pre, code"],n))o.remove();for(const o of n.querySelectorAll("a")){const s=o.innerText.trim();(s.startsWith("https://")||s.startsWith("http://"))&&o.remove()}}}):""});function Cv(t,e){return!!Ra(t,e)}const Ev={s:"small",m:"medium",l:"large"},Av=Er(async t=>{if(t=t?.trim(),t?.length>500)return null;if(We){const s=await We.detect(t);console.groupCollapsed("💬 DETECTLANG BROWSER",s.slice(0,3).map(i=>i.detectedLanguage)),console.groupEnd();const a=s[0];if(a?.detectedLanguage&&a?.confidence>.5)return a.detectedLanguage}const{detectAll:e}=await Hs(async()=>{const{detectAll:s}=await import("./tinyld.light.node-D9KYf3Y3.js");return{detectAll:s}},[],import.meta.url),n=e(t);console.groupCollapsed("💬 DETECTLANG TINYLD",n.slice(0,3).map(s=>s.lang)),console.groupEnd();const o=n[0];return o?.lang&&o?.accuracy>.5?o.lang:null}),an={id:"8fZueG"},$o={},No=(t,e)=>`${t}:${e.join("|")}`,xv=(t,e=[])=>{if(!t)return!1;const n=No(t,e),o=ma(!0),s=t!==o&&!vr([t],[o])&&!e.find(a=>t===a||vr([t],[a]));return s&&($o[n]=!0),s},Pn={quotePrivate:{id:"0NXzv9"},requestQuote:{id:"awRXyV"},quoteManualReview:{id:"re2mMZ"},quoteFollowersOnly:{id:"NPXprJ"},quoteCannot:{id:"dmiEVR"}},Mv={public:{id:"hDWXuG"},followers:{id:"9Ko+Xp"},nobody:{id:"+bAQ3S"}},Iv=/[???︖❓❔⁇⁈⁉¿‽؟]/,{DEV:ur}=gv;function dn({statusID:t,status:e,instance:n,size:o="m",contentTextWeight:s,readOnly:a,enableCommentHint:i,withinContext:c,skeleton:l,enableTranslate:h,forceTranslate:d,previewMode:u,allowFilters:f,onMediaClick:p,quoted:m,quoteDomain:g,onStatusLinkClick:v=()=>{},showFollowedTags:b,allowContextMenu:k,showActionsBar:S,showReplyParent:C,mediaFirst:_,showCommentCount:T}){const{_:E,_:w,i18n:I}=Kt(),P=da(I.locale);if(l)return r("div",{class:`status skeleton ${_?"status-media-first small":""}`,children:[!_&&r(_e,{size:"xxl"}),r("div",{class:"container",children:[r("div",{class:"meta",children:[(o==="s"||_)&&r(_e,{size:"m"})," ███ ████████"]}),r("div",{class:"content-container",children:[_&&r("div",{class:"media-first-container"}),r("div",{class:`content ${_?"media-first-content":""}`,children:r("p",{children:"████ ████████"})})]})]})]});const{masto:L,instance:A,authenticated:$}=Ze({instance:n}),{instance:R}=Ze(),W=A===R;let B=Qt(t||e?.id,A);const Y=Ge(z);if(e||(e=Y.statuses[B]||Y.statuses[t],B=Qt(e?.id,A)),!e)return null;const{editHistoryRef:et,editHistoryMode:ct,editedAtIndex:nt}=fg();if(ct&&e?.editedAt&&et.current.length){const y=et.current[nt];y&&(e={...e,...y})}const{account:{acct:V,avatar:st,avatarStatic:J,id:Tt,url:Pt,displayName:$t,username:dt,emojis:le,bot:ne,group:re}={},id:K,repliesCount:ft,reblogged:Dt,reblogsCount:At,favourited:Ft,favouritesCount:jt,quotesCount:tt,bookmarked:rt,poll:lt,muted:gt,sensitive:Zt,spoilerText:bt,visibility:O,language:G,editedAt:U,filtered:wt,card:Mt,createdAt:pt,inReplyToId:xt,inReplyToAccountId:Rt,content:vt,mentions:Vt,mediaAttachments:Z=[],reblog:_t,quote:Ht,uri:oe,url:Jt,emojis:Ce,tags:X,pinned:St,quoteApproval:Nt,_deleted:Ot,_pinned:kt,emojiReactions:Oe}=e,[pn,Ir]=H(null);q(()=>{if(!vt||G||pn)return;let y;return y=setTimeout(async()=>{let D=await Av(Ra(vt,Ce));Ir(D)},1e3),()=>clearTimeout(y)},[vt,G]);const mt=G||pn,mn=!!Z?.length;_&&mn&&(o="s");const me=Wo(),ie=me&&me===Tt,Lr=It(ri),te=!ie&&(!a&&!u||f)&&Mr(wt,Lr);if(te?.action==="hide")return null;const se=y=>{y.shiftKey};if((f||o!=="l")&&te&&te.action!=="blur")return r(Ov,{status:e,filterInfo:te,instance:A,containerProps:{onMouseEnter:se},showFollowedTags:!0,quoted:m});const Gt=new Date(pt),Xe=new Date(U);let Ee=Vt?.find(y=>y.id===Rt);!Ee&&Rt===K&&(Ee={url:Pt,username:dt,displayName:$t});const[gn,si]=H(Ee);q(()=>{if(!c&&!gn&&Rt){const y=z.accounts[Rt];if(y){si(y);return}const D=new AbortController;return _v(Rt,L,D.signal).then(Q=>{si(Q),z.accounts[Q.id]=Q}).catch(Q=>{}),()=>{D.abort()}}},[c,gn,Rt]);const ai=Rt&&Rt===me||Vt?.find(y=>y.id===me),ci=Dc(),Ae=!!ci["reading:expand:spoilers"],li=ci["reading:expand:media"]?.toLowerCase()||"default",ue=u||Ae||!!Y.spoilers[K],vn=u||li==="show_all"&&te?.action!=="blur"||!!Y.spoilersMedia[K];if(_t)return re?r("div",{"data-state-post-id":B,class:"status-group",onMouseEnter:se,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"group",size:"l",alt:w({id:"L8fEEm"})})," ",r(Pe,{account:e.account,instance:A,showAvatar:!0})]}),r(dn,{status:t?null:_t,statusID:t?_t.id:null,instance:A,size:o,contentTextWeight:s,readOnly:a,mediaFirst:_})]}):r("div",{"data-state-post-id":B,class:"status-reblog",onMouseEnter:se,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"rocket",size:"l"})," ",r(x,{id:"DlhB4J",components:{0:r(Pe,{account:e.account,instance:A,showAvatar:!0}),1:r("span",{})}})]}),r(dn,{status:t?null:_t,statusID:t?_t.id:null,instance:A,size:o,contentTextWeight:s,readOnly:a,enableCommentHint:!0,mediaFirst:_})]});const Wa=yt(({children:y})=>r("div",{"data-state-post-id":B,class:"status-followed-tags",onMouseEnter:se,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"hashtag",size:"l"})," ",Y.statusFollowedTags[B].slice(0,3).map(D=>r(Ve,{to:A?`/${A}/t/${D}`:`/t/${D}`,class:"status-followed-tag-item",children:D},D))]}),y]}),[B,A,Y.statusFollowedTags[B]]),Za=b&&Y.statusFollowedTags[B]?.length?Wa:F,ot=o==="l",xe=it(()=>gg(vt),[vt]),[Pr,Va]=H(d),{contentTranslation:Dr,contentTranslationAutoInline:ui}=Y.settings;Dr||(h=!1);const di=it(()=>!Dr||!ui||a||c&&!ot||u||bt||Zt||lt||Mt?!1:xe>0&&xe<=yv,[Dr,ui,a,c,ot,u,bt,Zt,lt,Mt,Z,xe]),[Rr,qn]=H(!1),[Ga,$r]=H(!1),[Ya,Nr]=H(!1),[Xa,Or]=H(!1),hi=On(),Fr=On(),Qa=On(),Qe=N(null),[Ja,tc]=jo(y=>y+1,0),yn=w({id:"7jyUKe"}),fi=yt(()=>Math.max(Math.round(((bt?.length||0)+xe)/140)||1,1),[bt,xe]),pi=pt&&Kn(Gt),mi=U&&Kn(Xe),Je=["public","unlisted"].includes(O);let bn=$&&Je;O==="private"&&ie&&(bn=!0);let tn=!1,wn=w({id:"ZhhOwV"}),Me;if(Yt()){const y=ie,D=y&&O==="private",Q=Nt?.currentUser==="automatic"&&(Je||D),at=Nt?.currentUser==="manual"&&(Je||D),ee=Nt?.automatic?.[0]==="followers"||Nt?.manual?.[0]==="followers";!Je&&!y?(tn=!0,Me=E(Pn.quotePrivate)):Q||(at?(wn=E(Pn.requestQuote),Me=E(Pn.quoteManualReview)):(tn=!0,Me=E(ee?Pn.quoteFollowersOnly:Pn.quoteCannot)))}const Wn=Yt()&&!tn,gi=Xp(Nt),Fe=(y,D="all")=>{if(!W||!$)return alert(yn);(y?.shiftKey||y?.syntheticEvent?.shiftKey)&&jl({replyToStatus:e,replyMode:D})||Ie({replyToStatus:e,replyMode:D})},ec=it(()=>Z.some(y=>!y.description?.trim?.()),[Z]),vi=it(()=>Math.floor((new Date-Gt)/(1e3*60*60*24*30)),[Gt]),Br=async()=>{if(!W||!$)return alert(yn),!1;try{if(z.statuses[B]={...e,reblogged:!Dt,reblogsCount:At+(Dt?-1:1)},Dt){const y=await L.v1.statuses.$select(K).unreblog();ye(y,A)}else{const y=await L.v1.statuses.$select(K).reblog();ye(y,A)}return!0}catch{return z.statuses[B]=e,!1}},yi=async()=>{if(!W||!$)return alert(yn),!1;try{if(z.statuses[B]={...e,favourited:!Ft,favouritesCount:jt+(Ft?-1:1)},Ft){const y=await L.v1.statuses.$select(K).unfavourite();ye(y,A)}else{const y=await L.v1.statuses.$select(K).favourite();ye(y,A)}return!0}catch{return z.statuses[B]=e,!1}},zr=async()=>{try{const y=await yi();!ot&&y&&ht(w(Ft?{id:"sZvpIt",values:{0:dt||V}}:{id:"yUngDO",values:{0:dt||V}}))}catch{}},bi=async()=>{if(rr("@mastodon/post-bookmark")){if(!W||!$)return alert(yn),!1;try{if(z.statuses[B]={...e,bookmarked:!rt},rt){const y=await L.v1.statuses.$select(K).unbookmark();ye(y,A)}else{const y=await L.v1.statuses.$select(K).bookmark();ye(y,A)}return!0}catch{return z.statuses[B]=e,!1}}},wi=async()=>{try{const y=await bi();!ot&&y&&ht(w(rt?{id:"lWQguj",values:{0:dt||V}}:{id:"Fb2K8h",values:{0:dt||V}}))}catch{}},Hr=Y.settings.contentTranslationHideLanguages||[],[Be,_i]=H($o[No(mt,Hr)]);q(()=>{if(!mt||Be)return;if(!Be&&$o[No(mt,Hr)]){_i(!0);return}let y=setTimeout(()=>{const D=xv(mt,Hr);D&&_i(D)},100);return()=>clearTimeout(y)},[mt,Be]);const ki=N(),Ti=N();async function nc(y){y&&(ki.current=L.v1.statuses.$select(t).rebloggedBy.list({limit:Is}).values(),Ti.current=L.v1.statuses.$select(t).favouritedBy.list({limit:Is}).values());const[{value:D},{value:Q}]=await Promise.allSettled([ki.current.next(),Ti.current.next()]);if(D.value?.length||Q.value?.length){const at=[];return D.value?.length&&at.push(...D.value.map(ee=>(ee._types=["reblog"],ee))),Q.value?.length&&at.push(...Q.value.map(ee=>(ee._types=["favourite"],ee))),{value:at,done:D.done&&Q.done}}return{value:[],done:!0}}const rc=Ht?.state==="accepted"&&Ht?.quotedStatus?.account?.id===me,oc=N(),ic=["public","unlisted","private"].includes(O),Si=ec&&!Dt?r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(x,{id:"MB+wJL"})]}):vi>=3&&r("div",{class:"footer",children:[r(M,{icon:"info"}),r("span",{children:r(x,{id:"dBme/4",values:{0:P.format(-vi,"month")},components:{0:r("strong",{})}})})]}),Kr=it(()=>Vt?.length?[...new Set([Tt,...Vt.map(D=>D.id)])].filter(D=>D!==me).length:!1,[Tt,Vt?.length,me]),Zn=Kr>3,Ci=()=>r(F,{children:[r(M,{icon:"comment"}),r("span",{children:ft>0?ae(ft):w(Zn?{id:"MmYpxT"}:{id:"ImOQa9"})})]}),Ei=r(F,{children:[r(ut,{onClick:y=>Fe(y,"all"),children:r("small",{children:[r(x,{id:"5ykMJ1"}),r("br",{}),r("span",{class:"more-insignificant",children:r(x,{id:"rtCQ2N",values:{mentionsCount:Kr}})})]})}),r(ut,{onClick:y=>Fe(y,"author-first"),children:r("small",{children:[r(x,{id:"5ykMJ1"}),r("br",{}),r("span",{class:"more-insignificant",children:r(x,{id:"4UOm4A",values:{0:Kr-1,1:dt||V},components:{0:r("span",{class:"bidi-isolate"})}})})]})}),r(ut,{onClick:y=>Fe(y,"author-only"),children:r("small",{children:[r(x,{id:"ImOQa9"}),r("br",{}),r("span",{class:"more-insignificant",children:r(x,{id:"zcKxuj",values:{0:dt||V},components:{0:r("span",{class:"bidi-isolate"})}})})]})})]}),Ai=r(F,{children:[!ot&&W&&r(F,{children:r("div",{class:"menu-control-group-horizontal status-menu",children:[Zn?r(So,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",label:r(Ci,{}),children:Ei}):r(ut,{onClick:Fe,children:r(Ci,{})}),r(er,{subMenu:!0,confirmLabel:r(F,{children:[r(M,{icon:"rocket"}),r("span",{children:w(Dt?{id:"QzzGsY"}:{id:"kulphB"})})]}),className:`menu-reblog ${Dt?"checked":""}`,menuExtras:r(F,{children:[Yt()&&r(ut,{disabled:tn,onClick:()=>{Ie({quoteStatus:e})},children:[r(M,{icon:"quote"}),Me?r("small",{children:[wn,r("br",{}),Me]}):r("span",{children:wn})]}),(ur||!Yt())&&r(ut,{onClick:()=>{Ie({draftStatus:{status:`
${Jt}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(x,{id:"ygxzZR"})}),Yt()&&ur&&r("small",{class:"tag collapsed",children:"DEV"})]})]}),menuFooter:Si,disabled:!bn,onClick:async()=>{try{const y=await Br();!ot&&y&&ht(w(Dt?{id:"bpDheH",values:{0:dt||V}}:{id:"dbNZdP",values:{0:dt||V}}))}catch{}},children:[Wn?r("span",{class:"icon",children:[r(M,{icon:"rocket"}),r(M,{icon:"quote"})]}):r(M,{icon:"rocket"}),r("span",{children:At>0||tt>0?`${At>0?ae(At):""}${At>0&&tt>0?"+":""}${tt>0?ae(tt):""}`:w(Dt?{id:"QzzGsY"}:Wn?{id:"n1PNla"}:{id:"PiVIlD"})})]}),r(ut,{onClick:zr,className:`menu-favourite ${Ft?"checked":""}`,children:[r(M,{icon:"heart"}),r("span",{children:jt>0?ae(jt):w(Ft?{id:"OcUmcH"}:{id:"W9FRBT"})})]}),rr("@mastodon/post-bookmark")&&r(ut,{onClick:wi,className:`menu-bookmark ${rt?"checked":""}`,children:[r(M,{icon:"bookmark"}),r("span",{children:w(rt?{id:"q8EQYI"}:{id:"PZlHt8"})})]})]})}),!ot&&W&&(ot||S)&&r(Tn,{}),(ot||S)&&r(F,{children:[r(ut,{onClick:()=>{z.showGenericAccounts={heading:w({id:"+XOeb+"}),fetchAccounts:nc,instance:A,showReactions:!0,postID:B}},children:[r(M,{icon:"react"}),r("span",{children:r(x,{id:"+XOeb+"})})]}),Yt()&&r(ut,{onClick:()=>{Or(!0)},children:[r(M,{icon:"quote"}),r("span",{children:r(x,{id:"5t4KSs"})})]})]}),(ot||!_&&(h||!mt||Be))&&r(Tn,{}),!_&&(h||!mt||Be)&&r("div",{class:Do?"menu-horizontal":"",children:[h?r(ut,{disabled:Pr,onClick:()=>Va(!0),children:[r(M,{icon:"translate"}),r("span",{children:r(x,{id:"pi8x/S"})})]}):r(Wi,{to:`${A?`/${A}`:""}/s/${K}?translate=1`,children:[r(M,{icon:"translate"}),r("span",{children:r(x,{id:"pi8x/S"})})]}),Do&&r(ut,{onClick:()=>{try{const y=po(e,{hideInlineQuote:Yt()});y&&vg(y,mt)}catch{}},children:[r(M,{icon:"speak"}),r("span",{children:r(x,{id:"yIBLq8"})})]})]}),ot&&r(ut,{onClick:()=>{try{const y=po(e,{hideInlineQuote:Yt(),htmlTextOpts:{truncateLinks:!1}});navigator.clipboard.writeText(y),ht(w({id:"iSRQvy"}))}catch{ht(w({id:"N1MyiN"}))}},children:[r(M,{icon:"clipboard"}),r("span",{children:r(x,{id:"iQgJaz"})})]}),(!ot&&W||h||!mt||Be)&&r(Tn,{}),!ot&&r(F,{children:r(Wi,{to:A?`/${A}/s/${K}`:`/s/${K}`,onClick:y=>{v(y,e)},children:[r(M,{icon:"arrows-right"}),r("small",{children:[r(x,{id:"8MkSAW",values:{0:dt||V},components:{0:r("span",{class:"bidi-isolate"})}}),r("br",{}),r("span",{class:"more-insignificant",children:[E(qe[O])," • ",pi]})]})]})}),!!U&&r(F,{children:r(ut,{onClick:()=>{qn(K)},children:[r(M,{icon:"history"}),r("small",{children:[r(x,{id:"QL+7Jw"}),r("br",{}),r("span",{class:"more-insignificant",children:r(x,{id:"DuJJm9",values:{editedDateText:mi}})})]})]})}),r(So,{direction:Tr()?"left":"right",overflow:"auto",gap:-8,label:r(F,{children:[r(M,{icon:"link"}),r("small",{class:"menu-double-lines should-cloak",style:{maxWidth:"16em"},children:Lv(Jt)}),r(M,{icon:"chevron-right"})]}),children:[r(ut,{href:Jt,target:"_blank",children:[r(M,{icon:"external"}),r("span",{children:r(x,{id:"x57cJf"})})]}),r(ut,{onClick:()=>{try{navigator.clipboard.writeText(Jt),ht(w({id:"edWbV6"}))}catch{ht(w({id:"W1ewR0"}))}},children:[r(M,{icon:"copy"}),r("span",{children:r(x,{id:"he3ygx"})})]}),Je&&navigator?.share&&navigator?.canShare?.({url:Jt})&&r(ut,{onClick:()=>{try{navigator.share({url:Jt})}catch{alert(w({id:"TtG3Uh"}))}},children:[r(M,{icon:"share"}),r("span",{children:r(x,{id:"LFKLqp"})})]})]}),Je&&ot&&r(ut,{onClick:()=>{$r(!0)},children:[r(M,{icon:"code"}),r("span",{children:r(x,{id:"jdVwsS"})})]}),$&&r(F,{children:[(ie||ai)&&r(Tn,{}),(ie||ai)&&r(ut,{onClick:async()=>{try{const y=await L.v1.statuses.$select(K)[gt?"unmute":"mute"]();ye(y,A),ht(w(gt?{id:"Pm+5jw"}:{id:"ywB7JM"}))}catch{ht(w(gt?{id:"c6jxNY"}:{id:"8SN9kN"}))}},children:gt?r(F,{children:[r(M,{icon:"unmute"}),r("span",{children:r(x,{id:"i51zUR"})})]}):r(F,{children:[r(M,{icon:"mute"}),r("span",{children:r(x,{id:"OiUYO5"})})]})}),ie&&ic&&r(ut,{onClick:async()=>{try{const y=await L.v1.statuses.$select(K)[St?"unpin":"pin"]();ye(y,A),ht(w(St?{id:"Yx809+"}:{id:"S6P6E+"}))}catch{ht(w(St?{id:"A6cs15"}:{id:"vgUfWO"}))}},children:St?r(F,{children:[r(M,{icon:"unpin"}),r("span",{children:r(x,{id:"XQMQZw"})})]}):r(F,{children:[r(M,{icon:"pin"}),r("span",{children:r(x,{id:"lfHLsx"})})]})}),ie&&r(F,{children:[Yt()&&!["private","direct"].includes(O)&&r(ut,{onClick:()=>Nr(!0),children:[r(M,{icon:"quote2"}),r("small",{children:[r(x,{id:"eKInue"}),r("br",{}),r("span",{class:"more-insignificant",children:E(Mv[gi])})]})]}),r("div",{class:"menu-horizontal",children:[rr("@mastodon/post-edit")&&r(ut,{onClick:()=>{Ie({editStatus:e,quoteStatus:e.quote?.quotedStatus})},children:[r(M,{icon:"pencil"}),r("span",{children:r(x,{id:"ePK91l"})})]}),ot&&r(er,{subMenu:!0,confirmLabel:r(F,{children:[r(M,{icon:"trash"}),r("span",{children:r(x,{id:"FbPNuJ"})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{await L.v1.statuses.$select(K).remove();const y=Ks(K,A);y._deleted=!0,ht(w({id:"KiyvHV"}))}catch{ht(w({id:"Yb6p2q"}))}})()},children:[r(M,{icon:"trash"}),r("span",{children:r(x,{id:"Jb6/SB"})})]})]})]}),!ie&&ot&&r(F,{children:[r(Tn,{}),rc&&r(er,{subMenu:!0,confirmLabel:r(F,{children:[r(M,{icon:"quote"}),r("span",{children:r(x,{id:"FMGfUd",values:{0:dt||V},components:{0:r("span",{class:"bidi-isolate"})}})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{const y=Ht.quotedStatus.id;await L.v1.statuses.$select(y).quotes.$select(K).revoke.create(),ht(w({id:"YgM2yU"})),z.reloadStatusPage++}catch{ht(w({id:"VzLGaA"}))}})()},children:[r(M,{icon:"quote"}),r(x,{id:"ukL58r"})]}),r(ut,{className:"danger",onClick:()=>{z.showReportModal={account:e.account,post:e}},children:[r(M,{icon:"flag"}),r("span",{children:r(x,{id:"7PQAMY"})})]})]})]})]}),xi=N(),[Vn,_n]=H(!1),[Mi,Gn]=H({}),Yn=k||!ot&&!u&&!Ot&&!m,sc=sa(kv&&Yn?y=>{if(y.pointerType==="mouse")return;const{clientX:D,clientY:Q}=y.touches?.[0]||y,at=y.target.closest("a");at&&Qe.current.contains(at)&&!at.getAttribute("href").startsWith("#")||(y.preventDefault(),Gn({anchorPoint:{x:D,y:Q},direction:"right"}),_n(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),kn=!a&&!u&&!m,ac=Ke("r, shift+r",(y,D)=>{y.shiftKey===D.shift&&Fe(y)},{enabled:kn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey}),cc=Ke("f, l",zr,{enabled:kn,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey,useKey:!0}),lc=Ke("d",wi,{enabled:kn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey}),uc=Ke("shift+b",y=>{y.shiftKey&&(async()=>{try{const D=await Br();!ot&&D&&ht(w(Dt?{id:"bpDheH",values:{0:dt||V}}:{id:"dbNZdP",values:{0:dt||V}}))}catch{}})()},{enabled:kn&&bn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey}),dc=Ke("x",y=>{const D=document.activeElement.closest(".status-link, .status-focus");if(D){const Q=D.querySelector(".spoiler-button:not(.spoiling)");if(Q)y.stopPropagation(),Q.click();else{const at=D.querySelector(".spoiler-media-button:not(.spoiling)");at&&(y.stopPropagation(),at.click())}}},{useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey}),hc=Ke("q",y=>{if(!W||!$)return alert(yn);Yt()?tn?ht(Me):Ie({quoteStatus:e}):Ie({draftStatus:{status:`
${Jt}`}})},{enabled:kn,useKey:!0,ignoreEventWhen:y=>y.metaKey||y.ctrlKey||y.altKey||y.shiftKey}),Xn=Z.slice(0,ot?void 0:4),Qn=Z.length>1&&Xn.some(y=>!!y.description&&!Pa(y.description)),fc=it(()=>{if(!Qn)return null;const y=[];return Xn.forEach((D,Q)=>{if(!D.description)return;const at=y.findIndex(ee=>ee.media.description===D.description);at===-1?y.push({media:D,indices:[Q]}):y[at].indices.push(Q)}),y.map(({media:D,indices:Q})=>r("div",{"data-caption-index":Q.map(at=>at+1).join(" "),onClick:at=>{at.preventDefault(),at.stopPropagation(),z.showMediaAlt={alt:D.description,lang:mt}},title:D.description,children:[r("sup",{children:Q.map(at=>at+1).join(" ")})," ",D.description]},D.id))},[Qn,Xn,mt]),en=it(()=>!!xt&&Rt===e.account?.id||!!Y.statusThreadNumber[B],[xt,Rt,e.account?.id,Y.statusThreadNumber[B]]),Ii=it(()=>i&&!en&&!c&&!xt&&O==="public"&&ft>0,[i,en,c,xt,ft,O]),jr=it(()=>{if(T&&ft>0)return!0;if(Mt||lt||Zt||bt||Z?.length||en||c||xt||ft<=0||!Iv.test(vt))return!1;if(xe>0&&xe<=vv)return!0},[T,Mt,lt,Zt,bt,Z,_t,en,c,xt,ft,vt,xe]);return r(Za,{children:[C&&!!(xt&&Rt)&&r(pv,{sKey:B}),r("article",{"data-state-post-id":B,ref:y=>{Qe.current=y;const D=y?.closest?.(".timeline-item, .timeline-item-alt, .status-link, .status-focus")||y;ac.current=D,cc.current=D,lc.current=D,uc.current=D,dc.current=D,hc.current=D},tabindex:"-1",class:`status ${!c&&xt&&gn?"status-reply-to":""} visibility-${O} ${kt?"status-pinned":""} ${Ev[o]} ${Ot?"status-deleted":""} ${m?"status-card":""} ${Vn?"status-menu-open":""} ${_&&mn?"status-media-first":""}`,onMouseEnter:se,onContextMenu:y=>{if(!Yn||y.metaKey)return;const D=y.target.closest("a");if(D&&Qe.current.contains(D)&&!D.getAttribute("href").startsWith("#"))return;const Q=window.getSelection?.();if(Q.toString().length>0){const{anchorNode:at}=Q;if(Qe.current?.contains(at))return}y.preventDefault(),Gn({anchorPoint:{x:y.clientX,y:y.clientY},direction:"right"}),_n(!0)},...Yn?sc():{},children:[Yn&&r(Qs,{ref:xi,state:Vn?"open":void 0,...Mi,onClose:y=>{_n(!1),y?.reason==="click"&&Qe.current?.closest("[tabindex]")?.focus?.()},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{xi.current?.closeMenu?.()}},overflow:"auto",boundingBoxPadding:ua(),unmountOnClose:!0,children:Ai}),S&&o!=="l"&&!u&&!a&&!Ot&&!m&&r("div",{class:`status-actions ${Vn==="actions-bar"?"open":""}`,ref:oc,children:[r(He,{size:"s",title:w({id:"ImOQa9"}),alt:w({id:"ImOQa9"}),class:"reply-button",icon:"comment",iconSize:"m",onClick:y=>Fe(y,Zn?"author-first":"all")}),r(He,{size:"s",checked:Ft,title:[w({id:"W9FRBT"}),w({id:"OcUmcH"})],alt:[w({id:"W9FRBT"}),w({id:"8ab1sR"})],class:"favourite-button",icon:"heart",iconSize:"m",count:jt,onClick:zr}),r("button",{type:"button",title:w({id:"2FYpfJ"}),class:"plain more-button",onClick:y=>{y.preventDefault(),y.stopPropagation(),Gn({anchorRef:{current:y.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),_n("actions-bar")},children:r(M,{icon:"more2",size:"m",alt:w({id:"2FYpfJ"})})})]}),o!=="l"&&r("div",{class:"status-badge",children:[Dt&&r(M,{class:"reblog",icon:"rocket",size:"s",alt:w({id:"b7T5Zj"})}),Ft&&r(M,{class:"favourite",icon:"heart",size:"s",alt:w({id:"8ab1sR"})}),rt&&r(M,{class:"bookmark",icon:"bookmark",size:"s",alt:w({id:"1C/9Sa"})}),kt&&r(M,{class:"pin",icon:"pin",size:"s",alt:w({id:"kNiQp6"})})]}),o!=="s"&&r("a",{href:Pt,tabindex:"-1",title:`@${V}`,onClick:y=>{y.preventDefault(),y.stopPropagation(),z.showAccount={account:e.account,instance:A}},children:r(_e,{url:J||st,size:"xxl",squircle:ne})}),r("div",{class:"container",children:[!!g&&r("div",{class:"status-quote-meta",children:r("span",{class:"domain",children:g})}),!!(e.account||pt)&&r("div",{class:"meta",children:[r("span",{class:"meta-name",children:r(Pe,{account:e.account,instance:A,showAvatar:o==="s",showAcct:ot})}),c&&en&&r(Ms,{showIcon:ot,index:Y.statusThreadNumber[B]})," ",o!=="l"&&(Ot?r("span",{class:"status-deleted-tag",children:r(x,{id:"vGjmyl"})}):Jt&&!u&&!a&&!m?r(Ve,{to:A?`/${A}/s/${K}`:`/s/${K}`,onClick:y=>{y.metaKey||y.ctrlKey||y.shiftKey||y.altKey||y.which===2||(y.preventDefault(),y.stopPropagation(),v?.(y,e),Gn({anchorRef:{current:y.currentTarget},align:"end",direction:"bottom",gap:4}),_n(!0))},class:`time ${Vn&&Mi?.anchorRef?"is-open":""}`,children:[Ii&&!jr?r(M,{icon:"comment2",size:"s",alt:Lt._({id:"RXmXDR",values:{repliesCount:ft}})}):O!=="public"&&O!=="direct"&&r(M,{icon:Fn[O],alt:E(qe[O]),size:"s"})," ",r(we,{datetime:Gt,format:"micro"}),!u&&!a&&r(M,{icon:"more2",class:"more",alt:w({id:"2FYpfJ"})})]}):r("span",{class:"time",children:[Ii&&!jr?r(M,{icon:"comment2",size:"s",alt:Lt._({id:"RXmXDR",values:{repliesCount:ft}})}):O!=="public"&&O!=="direct"&&r(M,{icon:Fn[O],alt:E(qe[O]),size:"s"})," ",r(we,{datetime:Gt,format:"micro"})]}))]}),O==="direct"&&r(F,{children:[r("div",{class:"status-direct-badge",children:r(x,{id:"IV4QaU"})})," "]}),!c&&r(F,{children:en?r(Ms,{showIcon:!0,showText:!0,index:Y.statusThreadNumber[B]}):!!xt&&!!gn&&(!!bt||!Vt.find(y=>y.id===Rt))&&r("div",{class:"status-reply-badge",children:[r(M,{icon:"reply"})," ",r(Pe,{account:gn,instance:A,short:!0})]})}),r("div",{class:`content-container ${bt||Zt||te?.action==="blur"?"has-spoiler":""} ${ue?"show-spoiler":""} ${vn?"show-media":""}`,"data-content-text-weight":s?fi():null,style:(ot||s)&&{"--content-text-weight":fi()},children:_&&mn?r(F,{children:[(!!bt||!!Zt)&&!Ae&&r(F,{children:[!!bt&&r("span",{class:"spoiler-content media-first-spoiler-content",lang:mt,dir:"auto",ref:hi,"data-read-more":E(an),children:[r(un,{text:bt,emojis:Ce})," "]}),r("button",{class:`light spoiler-button media-first-spoiler-button ${ue?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),ue?(delete z.spoilers[K],Ae||delete z.spoilersMedia[K]):(z.spoilers[K]=!0,Ae||(z.spoilersMedia[K]=!0))},children:[r(M,{icon:ue?"eye-open":"eye-close"})," ",w(ue?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),r(tv,{mediaAttachments:Z,language:mt,postID:K,instance:A}),!!vt&&r("div",{class:"media-first-content content",ref:Fr,children:r(ks,{post:e,instance:A,previewMode:u})})]}):r(F,{children:[!!bt&&r(F,{children:[r("div",{class:"content spoiler-content",lang:mt,dir:"auto",ref:hi,"data-read-more":E(an),children:r("p",{children:r(un,{text:bt,emojis:Ce})})}),Ae||u?r("div",{class:"spoiler-divider",children:[r(M,{icon:"eye-open"})," ",r(x,{id:"gnKo7f"})]}):r("button",{class:`light spoiler-button ${ue?"spoiling":""}`,type:"button",onClick:y=>{y.preventDefault(),y.stopPropagation(),ue?(delete z.spoilers[K],Ae||delete z.spoilersMedia[K]):(z.spoilers[K]=!0,Ae||(z.spoilersMedia[K]=!0))},children:[r(M,{icon:ue?"eye-open":"eye-close"})," ",w(ue?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),!!vt&&r("div",{class:"content",ref:Fr,"data-read-more":E(an),inert:bt&&!ue?!0:void 0,children:r(ks,{post:e,instance:A,previewMode:u},Ja)}),!!vt&&r(Cg,{content:vt,contentRef:Fr,onRevert:tc}),!!lt&&r(nv,{lang:mt,poll:lt,readOnly:a||!W||!$,onUpdate:y=>{z.statuses[B].poll=y},refresh:()=>L.v1.polls.$select(lt.id).fetch().then(y=>{z.statuses[B].poll=y}).catch(y=>{}),votePoll:y=>L.v1.polls.$select(lt.id).votes.create({choices:y}).then(D=>{z.statuses[B].poll=D}).catch(D=>{})}),((h||di)&&Cv(vt,Ce)&&Be||Pr)&&r(rg,{forceTranslate:Pr||di,mini:!ot&&!c,sourceLanguage:mt,autoDetected:pn,text:po(e,{maskCustomEmojis:!0,maskURLs:!0,hideInlineQuote:!0})}),!u&&(Zt||te?.action==="blur")&&!!Z.length&&(li!=="show_all"||te?.action==="blur")&&r("button",{class:`plain spoiler-media-button ${vn?"spoiling":""}`,type:"button",hidden:!Ae&&!!bt,onClick:y=>{y.preventDefault(),y.stopPropagation(),vn?delete z.spoilersMedia[K]:z.spoilersMedia[K]=!0},children:[r(M,{icon:vn?"eye-open":"eye-close"})," ",r("span",{children:[te?.action==="blur"&&r("small",{children:[r(x,{id:"suKjh3",values:{0:te?.titlesStr}}),r("br",{})]}),w(vn?{id:"6lGV3K"}:{id:"9ZCilh"})]})]}),!!Z.length&&(Z.length>1&&(ot||c&&o==="m")?r("div",{class:"media-large-container",children:Z.map((y,D)=>r("div",{class:"media-container media-eq1",children:r(Ro,{media:y,autoAnimate:!0,showCaption:!0,allowLongerCaption:!vt||ot,lang:mt,to:`/${A}/s/${K}?${c?"media":"media-only"}=${D+1}`,onClick:p?Q=>p(Q,D,y,e):void 0})},y.id))}):r(ev,{lang:mt,enabled:Qn,captionChildren:fc,children:r("div",{ref:Qa,class:`media-container media-eq${Z.length} ${Z.length>2?"media-gt2":""} ${Z.length>4?"media-gt4":""}`,children:Xn.map((y,D)=>r(Ro,{media:y,autoAnimate:ot,showCaption:Z.length===1,allowLongerCaption:!vt&&Z.length===1,lang:mt,altIndex:Qn&&!!y.description&&D+1,to:`/${A}/s/${K}?${c?"media":"media-only"}=${D+1}`,onClick:p?Q=>{p(Q,D,y,e)}:void 0,checkAspectRatio:Z.length===1},y.id))})})),r($v,{id:K,instance:A,level:m,collapsed:!ot&&!c}),!!Mt&&/^https/i.test(Mt?.url)&&!Zt&&!bt&&!lt&&!Z.length&&!Y.statusQuotes[B]&&r(fv,{card:Mt,selfReferential:Mt?.url===e.url||Mt?.url===e.uri,selfAuthor:Mt?.authors?.some(y=>y.account?.url===Pt),instance:R})]})}),!ot&&jr&&r("div",{class:"content-comment-hint insignificant",children:[r(M,{icon:"comment2",alt:w({id:"N8UzTV"})})," ",ft]}),ot&&r(F,{children:[r("div",{class:"extra-meta",children:Ot?r("span",{class:"status-deleted-tag",children:r(x,{id:"vGjmyl"})}):r(F,{children:[r("span",{children:E(qe[O])})," •"," ",r("a",{href:Jt,target:"_blank",rel:"noopener",children:[Date.now()-Gt.getTime()<864e5&&r(F,{children:[r(we,{datetime:Gt,format:"micro"})," ",""," "]}),!!pt&&r("time",{class:"created",datetime:Gt.toISOString(),title:Gt.toLocaleString(),children:pi})]}),U&&r("span",{class:"edited-container",children:[" ","• ",r(M,{icon:"pencil",alt:w({id:"MRZxAn"})})," ",r("time",{tabIndex:"0",class:"edited",datetime:Xe.toISOString(),onClick:()=>{qn(K)},children:mi})]})]})}),!!Oe?.length&&r("div",{class:"emoji-reactions",children:Oe.map(y=>{const{name:D,count:Q,me:at,url:ee,staticUrl:pc}=y;if(ee)return r("span",{class:`emoji-reaction tag ${at?"":"insignificant"}`,children:[r(Ao,{alt:D,url:ee,staticUrl:pc})," ",Q]});if(/^:.+?:$/.test(D)){const Ur=Ce.find(mc=>mc.shortcode===D.replace(/^:/,"").replace(/:$/,""));if(Ur)return r("span",{class:`emoji-reaction tag ${at?"":"insignificant"}`,children:[r(Ao,{alt:D,url:Ur.url,staticUrl:Ur.staticUrl})," ",Q]})}return r("span",{class:`emoji-reaction tag ${at?"":"insignificant"}`,children:[D," ",Q]})})}),r("div",{class:`actions ${Ot?"disabled":""}`,children:[r("div",{class:"action has-count",children:Zn?r(Eo,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",menuButton:r(He,{title:w({id:"ImOQa9"}),alt:w({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:ft}),children:Ei}):r(He,{title:w({id:"ImOQa9"}),alt:w({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:ft,onClick:Fe})}),r("div",{class:`action ${Wn&&At>0&&tt>0?"has-counts":"has-count"}`,children:r(er,{disabled:!bn,onClick:Br,confirmLabel:r(F,{children:[r(M,{icon:"rocket"}),r("span",{children:w(Dt?{id:"QzzGsY"}:{id:"kulphB"})})]}),menuExtras:r(F,{children:[Yt()&&r(ut,{disabled:tn,onClick:()=>{Ie({quoteStatus:e})},children:[r(M,{icon:"quote"}),Me?r("small",{children:[wn,r("br",{}),Me]}):r("span",{children:wn})]}),(ur||!Yt())&&r(ut,{onClick:()=>{Ie({draftStatus:{status:`
${Jt}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(x,{id:"ygxzZR"})}),Yt()&&ur&&r("small",{class:"tag collapsed",children:"DEV"})]})]}),menuFooter:Si,children:r(He,{checked:Dt,title:[w(Wn?{id:"n1PNla"}:{id:"PiVIlD"}),w({id:"QzzGsY"})],alt:[w({id:"kulphB"}),w({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:At,extraCount:tt,disabled:!bn})})}),r("div",{class:"action has-count",children:r(He,{checked:Ft,title:[w({id:"W9FRBT"}),w({id:"OcUmcH"})],alt:[w({id:"W9FRBT"}),w({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:jt,onClick:yi})}),rr("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(He,{checked:rt,title:[w({id:"PZlHt8"}),w({id:"q8EQYI"})],alt:[w({id:"PZlHt8"}),w({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:bi})}),r(Eo,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:r("div",{class:"action",children:r("button",{type:"button",title:w({id:"2FYpfJ"}),class:"plain more-button",children:r(M,{icon:"more2",size:"l",alt:w({id:"2FYpfJ"})})})}),children:[Ai," "]})]})]})]}),!!Rr&&r($n,{onClick:y=>{y.target===y.currentTarget&&qn(!1)},children:r(Nv,{statusID:Rr,instance:A,fetchStatusHistory:()=>L.v1.statuses.$select(Rr).history.list(),onClose:()=>{qn(!1),Qe.current?.focus()}})}),!!Ga&&r($n,{onClose:()=>{$r(!1)},children:r(lv,{post:e,instance:A,onClose:()=>{$r(!1)}})}),!!Ya&&r($n,{onClose:()=>{Nr(!1),z.reloadStatusPage++},children:r(uv,{onClose:()=>{Nr(!1),z.reloadStatusPage++},post:e,currentPolicy:gi})}),!!Xa&&r($n,{onClose:()=>{Or(!1)},children:r(dv,{statusId:K,instance:A,onClose:()=>{Or(!1)}})})]})]})}function Lv(t){if(!t)return;const e=URL.parse(t);if(!e)return;const{host:n,pathname:o}=e,s=o.replace(/\/$/,""),[a,i,c]=s.match(/\/(@[^\/]+)\/(.*)/)||[];return r(F,{children:[Rc.toUnicode(n),i?r(F,{children:["/",i,r("wbr",{}),r("span",{class:"more-insignificant",children:["/",c]})]}):r("span",{class:"more-insignificant",children:s})]})}const Pv=["deleted","unauthorized","pending","rejected","revoked","blocked_account","blocked_domain","muted_account"],Dv=["blocked_account","blocked_domain","muted_account"],dr={filterHidden:{id:"XC9Jpz"},pending:{id:"ptPep5"},deleted:{id:"2C0g0G"},unauthorized:{id:"2C0g0G"},rejected:{id:"2C0g0G"},revoked:{id:"5bAOta"},blocked_account:t=>({id:"aLvZxR",values:{name:t}}),blocked_domain:t=>({id:"+RZyRm",values:{domain:t}}),muted_account:t=>({id:"bQ4oy8",values:{name:t}})},Rv=$e(({quote:t,level:e=0})=>{const{_:n}=Kt(),o=Ge(z),s=It(ri),a=Wo(),i=t;let c;const l=o.statuses[Qt(i.id,i.instance)];l&&(!(a&&a===l.account?.id)&&Mr(l.filtered,s))?.action==="hide"&&(c="filterHidden"),c||(c=Pv.find(p=>i.state===p));const h=Dv.includes(c),d=i.id?Qt(i.id,i.instance):null,u=d&&o.revealedQuotes[d];if(c&&(!h||!u)){const m=l?.account?.acct,g=m?.split("@")[1];let v;return h?c==="blocked_account"?v=n(dr.blocked_account(m)):c==="blocked_domain"?v=n(dr.blocked_domain(g)):c==="muted_account"&&(v=n(dr.muted_account(m))):v=n(dr[c]),r("div",{class:`status-card-unfulfilled ${c==="filterHidden"||h?"status-card-ghost":""} ${i.native?"quote-post-native":""}`,children:[r(M,{icon:"quote"}),r("i",{children:v}),h&&d&&r("button",{type:"button",class:"textual",onClick:()=>{z.revealedQuotes[d]=!0},children:r(x,{id:"aWAdCb"})})]},d)}const f=i.native?F:ba;return r(f,{id:i.instance+i.id,children:r(Ve,{to:`${i.instance?`/${i.instance}`:""}/s/${i.id}`,class:`status-card-link ${i.native?"quote-post-native":""}`,"data-read-more":n(an),children:r(dn,{statusID:i.id,instance:i.instance,size:"s",quoted:e+1,quoteDomain:i.originalDomain,enableCommentHint:!0})},i.instance+i.id)},i.instance+i.id)}),$v=$e(({id:t,instance:e,level:n=0,collapsed:o=!1})=>{if(!t||!e)return;const{_:s}=Kt(),a=Ge(z),i=Qt(t,e);let l=a.statusQuotes[i]?.filter((d,u,f)=>d.native||f.findIndex(p=>p.url===d.url)===u);if(!l?.length||n>2)return;o&&(l=[l[0]]);const h=On();return r("div",{class:"status-card-container",ref:h,"data-read-more":s(an),children:l.map(d=>{const u=d.id?Qt(d.id,d.instance):`${d.instance||""}-${d.state}`;return r(Rv,{quote:d,level:n},u)})})});function Nv({statusID:t,instance:e,fetchStatusHistory:n=()=>{},onClose:o}){const{_:s}=Kt(),[a,i]=H("default"),[c,l]=H([]);return q(()=>{i("loading"),(async()=>{try{const h=await n();l(h),i("default")}catch{i("error")}})()},[]),r("div",{id:"edit-history",class:"sheet",children:[!!o&&r("button",{type:"button",class:"sheet-close",onClick:o,children:r(M,{icon:"x",alt:s({id:"yz7wBu"})})}),r("header",{children:[r("h2",{children:r(x,{id:"OKiofn"})}),a==="error"&&r("p",{children:r(x,{id:"EANWES"})}),a==="loading"&&r("p",{children:[r(yr,{abrupt:!0})," ",r(x,{id:"Pwqkdw"})]})]}),r("main",{tabIndex:"-1",children:c.length>0&&r("ol",{children:c.map(h=>{const{createdAt:d}=h,u=new Date(d);return r("li",{class:"history-item",children:[r("h3",{children:r("time",{children:Kn(u,{formatOpts:{weekday:"short",second:"numeric"}})})}),r(dn,{status:h,instance:e,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},d)})})})]})}function Ov({status:t,filterInfo:e,instance:n,containerProps:o={},showFollowedTags:s,quoted:a}){const{_:i,_:c}=Kt(),l=Ge(z),{id:h,account:{avatar:d,avatarStatic:u,bot:f,group:p},createdAt:m,visibility:g,reblog:v}=t,b=!!v,k=e?.titlesStr||"",S=new Date(m),C=ni(t.reblog||t),[_,T]=H(!1),E=sa(()=>{T(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),w=On(),I=Qt(t.id,n),P=Qt(t.id,n)+" "+(Qt(v?.id,n)||""),L=v?.id||h,A=n?`/${n}/s/${L}`:`/s/${L}`,$=s&&!!l.statusFollowedTags[I]?.length;return r("div",{class:`${a?"":b?p?"status-group":"status-reblog":$?"status-followed-tags":""} visibility-${g}`,...o,onContextMenu:R=>{R.preventDefault(),T(!0)},...E(),children:[r("article",{"data-state-post-id":P,class:`status filtered ${a?"status-card":""}`,tabindex:"-1",children:[r("b",{class:"status-filtered-badge clickable badge-meta",title:k,onClick:R=>{R.preventDefault(),T(!0)},children:[r("span",{children:r(x,{id:"03Qqf9"})}),r("span",{children:k})]})," ",r(_e,{url:u||d,squircle:f}),r("span",{class:"status-filtered-info",children:[r("span",{class:"status-filtered-info-1",children:b?r(x,{id:"zJyf/5",components:{0:r(Pe,{account:t.account,instance:n}),1:r(M,{icon:Fn[g],alt:i(qe[g]),size:"s"})}}):$?r(F,{children:[r(Pe,{account:t.account,instance:n})," ",r(M,{icon:Fn[g],alt:i(qe[g]),size:"s"})," ",r("span",{children:l.statusFollowedTags[I].slice(0,3).map(R=>r("span",{class:"status-followed-tag-item",children:["#",R]},R))})]}):r(F,{children:[r(Pe,{account:t.account,instance:n})," ",r(M,{icon:Fn[g],alt:i(qe[g]),size:"s"})," ",r(we,{datetime:S,format:"micro"})]})}),r("span",{class:"status-filtered-info-2",children:[b&&r(F,{children:[r(_e,{url:v.account.avatarStatic||v.account.avatar,squircle:f})," "]}),C]})]})]}),!!_&&r($n,{onClick:R=>{R.target===R.currentTarget&&T(!1)},children:r("div",{id:"filtered-status-peek",class:"sheet",children:[r("button",{type:"button",class:"sheet-close",onClick:()=>T(!1),children:r(M,{icon:"x",alt:c({id:"yz7wBu"})})}),r("header",{children:[r("b",{class:"status-filtered-badge",children:r(x,{id:"03Qqf9"})})," ",k]}),r("main",{tabIndex:"-1",children:r(Ve,{ref:w,class:"status-link",to:A,onClick:()=>{T(!1)},"data-read-more":i(an),children:r(dn,{status:t,instance:n,size:"s",readOnly:!0})})})]})})]})}const $a=$e(dn,(t,e)=>{const{status:n,...o}=t,{status:s,...a}=e;return n?.id===s?.id&&Pc(o,a)});var Ls=36,Na="";for(;Ls--;)Na+=Ls.toString(36);function Vy(t){for(var e="",n=t||11;n--;)e+=Na[Math.random()*36|0];return e}function Te(t){return Array.isArray?Array.isArray(t):Ba(t)==="[object Array]"}const Fv=1/0;function Bv(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-Fv?"-0":e}function zv(t){return t==null?"":Bv(t)}function he(t){return typeof t=="string"}function Oa(t){return typeof t=="number"}function Hv(t){return t===!0||t===!1||Kv(t)&&Ba(t)=="[object Boolean]"}function Fa(t){return typeof t=="object"}function Kv(t){return Fa(t)&&t!==null}function Xt(t){return t!=null}function mo(t){return!t.trim().length}function Ba(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const jv="Incorrect 'index' type",Uv=t=>`Invalid value for key ${t}`,qv=t=>`Pattern length exceeds max of ${t}.`,Wv=t=>`Missing ${t} property in key`,Zv=t=>`Property 'weight' in key '${t}' must be a positive integer`,Ps=Object.prototype.hasOwnProperty;class Vv{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(o=>{let s=za(o);this._keys.push(s),this._keyMap[s.id]=s,n+=s.weight}),this._keys.forEach(o=>{o.weight/=n})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function za(t){let e=null,n=null,o=null,s=1,a=null;if(he(t)||Te(t))o=t,e=Ds(t),n=Oo(t);else{if(!Ps.call(t,"name"))throw new Error(Wv("name"));const i=t.name;if(o=i,Ps.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(Zv(i));e=Ds(i),n=Oo(i),a=t.getFn}return{path:e,id:n,weight:s,src:o,getFn:a}}function Ds(t){return Te(t)?t:t.split(".")}function Oo(t){return Te(t)?t.join("."):t}function Gv(t,e){let n=[],o=!1;const s=(a,i,c)=>{if(Xt(a))if(!i[c])n.push(a);else{let l=i[c];const h=a[l];if(!Xt(h))return;if(c===i.length-1&&(he(h)||Oa(h)||Hv(h)))n.push(zv(h));else if(Te(h)){o=!0;for(let d=0,u=h.length;d<u;d+=1)s(h[d],i,c+1)}else i.length&&s(h,i,c+1)}};return s(t,he(e)?e.split("."):e,0),o?n:n[0]}const Yv={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Xv={isCaseSensitive:!1,ignoreDiacritics:!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},Qv={location:0,threshold:.6,distance:100},Jv={useExtendedSearch:!1,getFn:Gv,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var j={...Xv,...Yv,...Qv,...Jv};const ty=/[^ ]+/g;function ey(t=1,e=3){const n=new Map,o=Math.pow(10,e);return{get(s){const a=s.match(ty).length;if(n.has(a))return n.get(a);const i=1/Math.pow(a,.5*t),c=parseFloat(Math.round(i*o)/o);return n.set(a,c),c},clear(){n.clear()}}}class ii{constructor({getFn:e=j.getFn,fieldNormWeight:n=j.fieldNormWeight}={}){this.norm=ey(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,o)=>{this._keysMap[n.id]=o})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,he(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();he(e)?this._addString(e,n):this._addObject(e,n)}removeAt(e){this.records.splice(e,1);for(let n=e,o=this.size();n<o;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(e,n){return e[this._keysMap[n]]}size(){return this.records.length}_addString(e,n){if(!Xt(e)||mo(e))return;let o={v:e,i:n,n:this.norm.get(e)};this.records.push(o)}_addObject(e,n){let o={i:n,$:{}};this.keys.forEach((s,a)=>{let i=s.getFn?s.getFn(e):this.getFn(e,s.path);if(Xt(i)){if(Te(i)){let c=[];const l=[{nestedArrIndex:-1,value:i}];for(;l.length;){const{nestedArrIndex:h,value:d}=l.pop();if(Xt(d))if(he(d)&&!mo(d)){let u={v:d,i:h,n:this.norm.get(d)};c.push(u)}else Te(d)&&d.forEach((u,f)=>{l.push({nestedArrIndex:f,value:u})})}o.$[a]=c}else if(he(i)&&!mo(i)){let c={v:i,n:this.norm.get(i)};o.$[a]=c}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function Ha(t,e,{getFn:n=j.getFn,fieldNormWeight:o=j.fieldNormWeight}={}){const s=new ii({getFn:n,fieldNormWeight:o});return s.setKeys(t.map(za)),s.setSources(e),s.create(),s}function ny(t,{getFn:e=j.getFn,fieldNormWeight:n=j.fieldNormWeight}={}){const{keys:o,records:s}=t,a=new ii({getFn:e,fieldNormWeight:n});return a.setKeys(o),a.setIndexRecords(s),a}function hr(t,{errors:e=0,currentLocation:n=0,expectedLocation:o=0,distance:s=j.distance,ignoreLocation:a=j.ignoreLocation}={}){const i=e/t.length;if(a)return i;const c=Math.abs(o-n);return s?i+c/s:c?1:i}function ry(t=[],e=j.minMatchCharLength){let n=[],o=-1,s=-1,a=0;for(let i=t.length;a<i;a+=1){let c=t[a];c&&o===-1?o=a:!c&&o!==-1&&(s=a-1,s-o+1>=e&&n.push([o,s]),o=-1)}return t[a-1]&&a-o>=e&&n.push([o,a-1]),n}const Ue=32;function oy(t,e,n,{location:o=j.location,distance:s=j.distance,threshold:a=j.threshold,findAllMatches:i=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,includeMatches:l=j.includeMatches,ignoreLocation:h=j.ignoreLocation}={}){if(e.length>Ue)throw new Error(qv(Ue));const d=e.length,u=t.length,f=Math.max(0,Math.min(o,u));let p=a,m=f;const g=c>1||l,v=g?Array(u):[];let b;for(;(b=t.indexOf(e,m))>-1;){let E=hr(e,{currentLocation:b,expectedLocation:f,distance:s,ignoreLocation:h});if(p=Math.min(E,p),m=b+d,g){let w=0;for(;w<d;)v[b+w]=1,w+=1}}m=-1;let k=[],S=1,C=d+u;const _=1<<d-1;for(let E=0;E<d;E+=1){let w=0,I=C;for(;w<I;)hr(e,{errors:E,currentLocation:f+I,expectedLocation:f,distance:s,ignoreLocation:h})<=p?w=I:C=I,I=Math.floor((C-w)/2+w);C=I;let P=Math.max(1,f-I+1),L=i?u:Math.min(f+I,u)+d,A=Array(L+2);A[L+1]=(1<<E)-1;for(let R=L;R>=P;R-=1){let W=R-1,B=n[t.charAt(W)];if(g&&(v[W]=+!!B),A[R]=(A[R+1]<<1|1)&B,E&&(A[R]|=(k[R+1]|k[R])<<1|1|k[R+1]),A[R]&_&&(S=hr(e,{errors:E,currentLocation:W,expectedLocation:f,distance:s,ignoreLocation:h}),S<=p)){if(p=S,m=W,m<=f)break;P=Math.max(1,2*f-m)}}if(hr(e,{errors:E+1,currentLocation:f,expectedLocation:f,distance:s,ignoreLocation:h})>p)break;k=A}const T={isMatch:m>=0,score:Math.max(.001,S)};if(g){const E=ry(v,c);E.length?l&&(T.indices=E):T.isMatch=!1}return T}function iy(t){let e={};for(let n=0,o=t.length;n<o;n+=1){const s=t.charAt(n);e[s]=(e[s]||0)|1<<o-n-1}return e}const Sr=String.prototype.normalize?(t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(t=>t);class Ka{constructor(e,{location:n=j.location,threshold:o=j.threshold,distance:s=j.distance,includeMatches:a=j.includeMatches,findAllMatches:i=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,isCaseSensitive:l=j.isCaseSensitive,ignoreDiacritics:h=j.ignoreDiacritics,ignoreLocation:d=j.ignoreLocation}={}){if(this.options={location:n,threshold:o,distance:s,includeMatches:a,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:h,ignoreLocation:d},e=l?e:e.toLowerCase(),e=h?Sr(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const u=(p,m)=>{this.chunks.push({pattern:p,alphabet:iy(p),startIndex:m})},f=this.pattern.length;if(f>Ue){let p=0;const m=f%Ue,g=f-m;for(;p<g;)u(this.pattern.substr(p,Ue),p),p+=Ue;if(m){const v=f-Ue;u(this.pattern.substr(v),v)}}else u(this.pattern,0)}searchIn(e){const{isCaseSensitive:n,ignoreDiacritics:o,includeMatches:s}=this.options;if(e=n?e:e.toLowerCase(),e=o?Sr(e):e,this.pattern===e){let g={isMatch:!0,score:0};return s&&(g.indices=[[0,e.length-1]]),g}const{location:a,distance:i,threshold:c,findAllMatches:l,minMatchCharLength:h,ignoreLocation:d}=this.options;let u=[],f=0,p=!1;this.chunks.forEach(({pattern:g,alphabet:v,startIndex:b})=>{const{isMatch:k,score:S,indices:C}=oy(e,g,v,{location:a+b,distance:i,threshold:c,findAllMatches:l,minMatchCharLength:h,includeMatches:s,ignoreLocation:d});k&&(p=!0),f+=S,k&&C&&(u=[...u,...C])});let m={isMatch:p,score:p?f/this.chunks.length:1};return p&&s&&(m.indices=u),m}}class Ne{constructor(e){this.pattern=e}static isMultiMatch(e){return Rs(e,this.multiRegex)}static isSingleMatch(e){return Rs(e,this.singleRegex)}search(){}}function Rs(t,e){const n=t.match(e);return n?n[1]:null}class sy extends Ne{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 ay extends Ne{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const o=e.indexOf(this.pattern)===-1;return{isMatch:o,score:o?0:1,indices:[0,e.length-1]}}}class cy extends Ne{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 ly extends Ne{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 uy extends Ne{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 dy extends Ne{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 ja extends Ne{constructor(e,{location:n=j.location,threshold:o=j.threshold,distance:s=j.distance,includeMatches:a=j.includeMatches,findAllMatches:i=j.findAllMatches,minMatchCharLength:c=j.minMatchCharLength,isCaseSensitive:l=j.isCaseSensitive,ignoreDiacritics:h=j.ignoreDiacritics,ignoreLocation:d=j.ignoreLocation}={}){super(e),this._bitapSearch=new Ka(e,{location:n,threshold:o,distance:s,includeMatches:a,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:h,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Ua extends Ne{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,o;const s=[],a=this.pattern.length;for(;(o=e.indexOf(this.pattern,n))>-1;)n=o+a,s.push([o,n-1]);const i=!!s.length;return{isMatch:i,score:i?0:1,indices:s}}}const Fo=[sy,Ua,cy,ly,dy,uy,ay,ja],$s=Fo.length,hy=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,fy="|";function py(t,e={}){return t.split(fy).map(n=>{let o=n.trim().split(hy).filter(a=>a&&!!a.trim()),s=[];for(let a=0,i=o.length;a<i;a+=1){const c=o[a];let l=!1,h=-1;for(;!l&&++h<$s;){const d=Fo[h];let u=d.isMultiMatch(c);u&&(s.push(new d(u,e)),l=!0)}if(!l)for(h=-1;++h<$s;){const d=Fo[h];let u=d.isSingleMatch(c);if(u){s.push(new d(u,e));break}}}return s})}const my=new Set([ja.type,Ua.type]);class gy{constructor(e,{isCaseSensitive:n=j.isCaseSensitive,ignoreDiacritics:o=j.ignoreDiacritics,includeMatches:s=j.includeMatches,minMatchCharLength:a=j.minMatchCharLength,ignoreLocation:i=j.ignoreLocation,findAllMatches:c=j.findAllMatches,location:l=j.location,threshold:h=j.threshold,distance:d=j.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:o,includeMatches:s,minMatchCharLength:a,findAllMatches:c,ignoreLocation:i,location:l,threshold:h,distance:d},e=n?e:e.toLowerCase(),e=o?Sr(e):e,this.pattern=e,this.query=py(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:o,isCaseSensitive:s,ignoreDiacritics:a}=this.options;e=s?e:e.toLowerCase(),e=a?Sr(e):e;let i=0,c=[],l=0;for(let h=0,d=n.length;h<d;h+=1){const u=n[h];c.length=0,i=0;for(let f=0,p=u.length;f<p;f+=1){const m=u[f],{isMatch:g,indices:v,score:b}=m.search(e);if(g){if(i+=1,l+=b,o){const k=m.constructor.type;my.has(k)?c=[...c,...v]:c.push(v)}}else{l=0,i=0,c.length=0;break}}if(i){let f={isMatch:!0,score:l/i};return o&&(f.indices=c),f}}return{isMatch:!1,score:1}}}const Bo=[];function vy(...t){Bo.push(...t)}function zo(t,e){for(let n=0,o=Bo.length;n<o;n+=1){let s=Bo[n];if(s.condition(t,e))return new s(t,e)}return new Ka(t,e)}const Cr={AND:"$and",OR:"$or"},Ho={PATH:"$path",PATTERN:"$val"},Ko=t=>!!(t[Cr.AND]||t[Cr.OR]),yy=t=>!!t[Ho.PATH],by=t=>!Te(t)&&Fa(t)&&!Ko(t),Ns=t=>({[Cr.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function qa(t,e,{auto:n=!0}={}){const o=s=>{let a=Object.keys(s);const i=yy(s);if(!i&&a.length>1&&!Ko(s))return o(Ns(s));if(by(s)){const l=i?s[Ho.PATH]:a[0],h=i?s[Ho.PATTERN]:s[l];if(!he(h))throw new Error(Uv(l));const d={keyId:Oo(l),pattern:h};return n&&(d.searcher=zo(h,e)),d}let c={children:[],operator:a[0]};return a.forEach(l=>{const h=s[l];Te(h)&&h.forEach(d=>{c.children.push(o(d))})}),c};return Ko(t)||(t=Ns(t)),o(t)}function wy(t,{ignoreFieldNorm:e=j.ignoreFieldNorm}){t.forEach(n=>{let o=1;n.matches.forEach(({key:s,norm:a,score:i})=>{const c=s?s.weight:null;o*=Math.pow(i===0&&c?Number.EPSILON:i,(c||1)*(e?1:a))}),n.score=o})}function _y(t,e){const n=t.matches;e.matches=[],Xt(n)&&n.forEach(o=>{if(!Xt(o.indices)||!o.indices.length)return;const{indices:s,value:a}=o;let i={indices:s,value:a};o.key&&(i.key=o.key.src),o.idx>-1&&(i.refIndex=o.idx),e.matches.push(i)})}function ky(t,e){e.score=t.score}function Ty(t,e,{includeMatches:n=j.includeMatches,includeScore:o=j.includeScore}={}){const s=[];return n&&s.push(_y),o&&s.push(ky),t.map(a=>{const{idx:i}=a,c={item:e[i],refIndex:i};return s.length&&s.forEach(l=>{l(a,c)}),c})}class Un{constructor(e,n={},o){this.options={...j,...n},this.options.useExtendedSearch,this._keyStore=new Vv(this.options.keys),this.setCollection(e,o)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof ii))throw new Error(jv);this._myIndex=n||Ha(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Xt(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let o=0,s=this._docs.length;o<s;o+=1){const a=this._docs[o];e(a,o)&&(this.removeAt(o),o-=1,s-=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:o,includeScore:s,shouldSort:a,sortFn:i,ignoreFieldNorm:c}=this.options;let l=he(e)?he(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return wy(l,{ignoreFieldNorm:c}),a&&l.sort(i),Oa(n)&&n>-1&&(l=l.slice(0,n)),Ty(l,this._docs,{includeMatches:o,includeScore:s})}_searchStringList(e){const n=zo(e,this.options),{records:o}=this._myIndex,s=[];return o.forEach(({v:a,i,n:c})=>{if(!Xt(a))return;const{isMatch:l,score:h,indices:d}=n.searchIn(a);l&&s.push({item:a,idx:i,matches:[{score:h,value:a,norm:c,indices:d}]})}),s}_searchLogical(e){const n=qa(e,this.options),o=(c,l,h)=>{if(!c.children){const{keyId:u,searcher:f}=c,p=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(l,u),searcher:f});return p&&p.length?[{idx:h,item:l,matches:p}]:[]}const d=[];for(let u=0,f=c.children.length;u<f;u+=1){const p=c.children[u],m=o(p,l,h);if(m.length)d.push(...m);else if(c.operator===Cr.AND)return[]}return d},s=this._myIndex.records,a={},i=[];return s.forEach(({$:c,i:l})=>{if(Xt(c)){let h=o(n,c,l);h.length&&(a[l]||(a[l]={idx:l,item:c,matches:[]},i.push(a[l])),h.forEach(({matches:d})=>{a[l].matches.push(...d)}))}}),i}_searchObjectList(e){const n=zo(e,this.options),{keys:o,records:s}=this._myIndex,a=[];return s.forEach(({$:i,i:c})=>{if(!Xt(i))return;let l=[];o.forEach((h,d)=>{l.push(...this._findMatches({key:h,value:i[d],searcher:n}))}),l.length&&a.push({idx:c,item:i,matches:l})}),a}_findMatches({key:e,value:n,searcher:o}){if(!Xt(n))return[];let s=[];if(Te(n))n.forEach(({v:a,i,n:c})=>{if(!Xt(a))return;const{isMatch:l,score:h,indices:d}=o.searchIn(a);l&&s.push({score:h,key:e,value:a,idx:i,norm:c,indices:d})});else{const{v:a,n:i}=n,{isMatch:c,score:l,indices:h}=o.searchIn(a);c&&s.push({score:l,key:e,value:a,norm:i,indices:h})}return s}}Un.version="7.1.0";Un.createIndex=Ha;Un.parseIndex=ny;Un.config=j;Un.parseQuery=qa;vy(gy);const Sy=360*1e3,Cy=2160*60*60*1e3;function Gy({scheduledAt:t,setScheduledAt:e}){if(!t||!t?.getTime)return;const[n,o]=H(),[s,a]=H(),i=t.getTimezoneOffset();q(()=>{function l(){const u=new Date(Date.now()+Sy),f=new Date(u.getTime()-i*6e4).toISOString().slice(0,16);o(f)}l();function h(){const u=new Date(Date.now()+Cy),f=new Date(u.getTime()-i*6e4).toISOString().slice(0,16);a(f)}h();const d=setInterval(()=>{l(),h()},1e3*10);return()=>clearInterval(d)},[]);const c=t?new Date(t.getTime()-t.getTimezoneOffset()*6e4).toISOString().slice(0,16):null;return r("input",{type:"datetime-local",name:"scheduledAt",defaultValue:c,min:n,max:s,required:!0,onChange:l=>{e(new Date(l.target.value))}})}function Yy(){const t=new Date;return new Intl.DateTimeFormat(void 0,{timeZoneName:"long"}).formatToParts(t).find(s=>s.type==="timeZoneName")?.value}export{Ms as $,_e as A,ae as B,Qs as C,Oy as D,un as E,$a as F,Ny as G,Do as H,M as I,vg as J,Tr as K,Ve as L,Wi as M,Pe as N,oi as O,Ro as P,Ao as Q,we as R,So as S,rg as T,Mr as U,sa as V,On as W,bg as X,ri as Y,yg as Z,By as _,jl as a,Vy as a0,gg as a1,Io as a2,Iy as a3,Pl as a4,Ly as a5,Un as a6,Yy as a7,Gy as a8,fg as a9,Jg as aa,Fy as ab,Bm as ac,mv as ad,tl as ae,Jr as af,We as ag,kg as ah,aa as ai,Sy as aj,da as ak,Xp as al,ru as am,qe as an,Fn as ao,Ie as b,Tn as c,ut as d,ni as e,Ke as f,ua as g,$n as h,Eo as i,er as j,pa as k,An as l,ma as m,Kn as n,ql as o,Yt as p,Py as q,rr as r,ht as s,Ry as t,My as u,Dy as v,ei as w,$y as x,ga as y,Cm as z};
//# sourceMappingURL=ScheduledAtField-Dw49_KZ-.js.map