Files
phanpy-cz/assets/ScheduledAtField-CQDO0gVJ.js
2025-09-18 19:34:46 +02:00

194 lines
208 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

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

import{ao as Jt,W as xt,e as r,d as V,q as Et,A as N,_ as $e,y as Q,I as Xi,ap as Na,l as lt,S as ke,h as kr,aq as Fa,ar as io,as as za,at as Qi,V as Ji,k as F,M as rn,$ as Bt,G as so,E as Dt,s as H,a8 as A,au as Ba,x as Va,n as Ha,av as ja,u as Yt,a as An,H as Ka,aw as Ua,ax as Wa,T as R,g as Cr,ay as ts,az as Za,aA as es,p as po,z as ns,aB as qa,aC as Ot,aD as Ga,aE as Ya,aF as Hn,P as ce,c as Ln,aG as Xa,aH as Qa,a0 as os,aI as rs,t as Ja,b as we,aJ as tc}from"./useTitle-Ck4QBWzz.js";const is=["shift","alt","meta","mod","ctrl","control"],ec={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 Ae(t){return(ec[t.trim()]||t.trim()).toLowerCase().replace(/key|digit|numpad/,"")}function ss(t){return is.includes(t)}function Io(t,e=","){return t.toLowerCase().split(e)}function Lo(t,e="+",n=">",o=!1,i){let a=[],s=!1;t.includes(n)?(s=!0,a=t.toLocaleLowerCase().split(n).map(d=>Ae(d))):a=t.toLocaleLowerCase().split(e).map(d=>Ae(d));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(d=>!is.includes(d));return{...c,keys:l,description:i,isSequence:s}}typeof document<"u"&&(document.addEventListener("keydown",t=>{t.code!==void 0&&as([Ae(t.code)])}),document.addEventListener("keyup",t=>{t.code!==void 0&&cs([Ae(t.code)])})),typeof window<"u"&&(window.addEventListener("blur",()=>{he.clear()}),window.addEventListener("contextmenu",()=>{setTimeout(()=>{he.clear()},0)}));const he=new Set;function Sr(t){return Array.isArray(t)}function nc(t,e=","){return(Sr(t)?t:t.split(e)).every(n=>he.has(n.trim().toLowerCase()))}function as(t){const e=Array.isArray(t)?t:[t];he.has("meta")&&he.forEach(n=>!ss(n)&&he.delete(n.toLowerCase())),e.forEach(n=>he.add(n.toLowerCase()))}function cs(t){const e=Array.isArray(t)?t:[t];t==="meta"?he.clear():e.forEach(n=>he.delete(n.toLowerCase()))}function oc(t,e,n){(typeof n=="function"&&n(t,e)||n===!0)&&t.preventDefault()}function rc(t,e,n){return typeof n=="function"?n(t,e):n===!0||n===void 0}function ic(t){return ls(t,["input","textarea","select"])}function ls(t,e=!1){const{target:n,composed:o}=t;let i;return sc(n)&&o?i=t.composedPath()[0]&&t.composedPath()[0].tagName:i=n&&n.tagName,Sr(e)?!!(i&&e&&e.some(a=>a.toLowerCase()===i.toLowerCase())):!!(i&&e&&e)}function sc(t){return!!t.tagName&&!t.tagName.startsWith("-")&&t.tagName.includes("-")}function ac(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 cc=(t,e,n=!1)=>{const{alt:o,meta:i,mod:a,shift:s,ctrl:c,keys:l,useKey:d}=e,{code:h,key:u,ctrlKey:f,metaKey:m,shiftKey:p,altKey:g}=t,v=Ae(h);if(d&&l?.length===1&&l.includes(u))return!0;if(!(l!=null&&l.includes(v))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!n){if(o!==g&&v!=="alt"||s!==p&&v!=="shift")return!1;if(a){if(!m&&!f)return!1}else if(i!==m&&v!=="meta"&&v!=="os"||c!==f&&v!=="ctrl"&&v!=="control")return!1}return l&&l.length===1&&l.includes(v)?!0:l?nc(l):!l},lc=Jt(void 0),uc=()=>xt(lc);function us(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&&us(t[o],e[o]),!0):t===e}const dc=Jt({hotkeys:[],activeScopes:[],toggleScope:()=>{},enableScope:()=>{},disableScope:()=>{}}),hc=()=>xt(dc);function fc(t){const e=N(void 0);return us(e.current,t)||(e.current=t),e.current}const ii=t=>{t.stopPropagation(),t.preventDefault(),t.stopImmediatePropagation()},mc=typeof window<"u"?$e:Q;function Ge(t,e,n,o){const i=N(null),a=N(!1),s=n instanceof Array?o instanceof Array?void 0:o:n,c=Sr(t)?t.join(s?.delimiter):t,l=n instanceof Array?n:o instanceof Array?o:void 0,d=Et(e,l??[]),h=N(d);l?h.current=d:h.current=e;const u=fc(s),{activeScopes:f}=hc(),m=uc();return mc(()=>{if(u?.enabled===!1||!ac(f,u?.scopes))return;let p=[],g;const v=(T,y=!1)=>{var S;if(!(ic(T)&&!ls(T,u?.enableOnFormTags))){if(i.current!==null){const b=i.current.getRootNode();if((b instanceof Document||b instanceof ShadowRoot)&&b.activeElement!==i.current&&!i.current.contains(b.activeElement)){ii(T);return}}(S=T.target)!=null&&S.isContentEditable&&!(u!=null&&u.enableOnContentEditable)||Io(c,u?.delimiter).forEach(b=>{var x,P,D,C;if(b.includes(u?.splitKey??"+")&&b.includes(u?.sequenceSplitKey??">")){console.warn(`Hotkey ${b} contains both ${u?.splitKey??"+"} and ${u?.sequenceSplitKey??">"} which is not supported.`);return}const L=Lo(b,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description);if(L.isSequence){g=setTimeout(()=>{p=[]},u?.sequenceTimeoutMs??1e3);const O=L.useKey?T.key:Ae(T.code);if(ss(O.toLowerCase()))return;p.push(O);const I=(x=L.keys)==null?void 0:x[p.length-1];if(O!==I){p=[],g&&clearTimeout(g);return}p.length===((P=L.keys)==null?void 0:P.length)&&(h.current(T,L),g&&clearTimeout(g),p=[])}else if(cc(T,L,u?.ignoreModifiers)||(D=L.keys)!=null&&D.includes("*")){if((C=u?.ignoreEventWhen)!=null&&C.call(u,T)||y&&a.current)return;if(oc(T,L,u?.preventDefault),!rc(T,L,u?.enabled)){ii(T);return}h.current(T,L),y||(a.current=!0)}})}},E=T=>{T.code!==void 0&&(as(Ae(T.code)),(u?.keydown===void 0&&u?.keyup!==!0||u!=null&&u.keydown)&&v(T))},w=T=>{T.code!==void 0&&(cs(Ae(T.code)),a.current=!1,u!=null&&u.keyup&&v(T,!0))},k=i.current||s?.document||document;return k.addEventListener("keyup",w,s?.eventListenerOptions),k.addEventListener("keydown",E,s?.eventListenerOptions),m&&Io(c,u?.delimiter).forEach(T=>m.addHotkey(Lo(T,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description))),()=>{k.removeEventListener("keyup",w,s?.eventListenerOptions),k.removeEventListener("keydown",E,s?.eventListenerOptions),m&&Io(c,u?.delimiter).forEach(T=>m.removeHotkey(Lo(T,u?.splitKey,u?.sequenceSplitKey,u?.useKey,u?.description))),p=[],g&&clearTimeout(g)}},[c,u,f]),i}var eo={exports:{}};/*!
* Toastify js 1.12.0
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
*/var pc=eo.exports,si;function gc(){return si||(si=1,function(t){(function(e,n){t.exports?t.exports=n():e.Toastify=n()})(pc,function(e){var n=function(s){return new n.lib.init(s)},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(s){return s||(s={}),this.options={},this.toastElement=null,this.options.text=s.text||n.defaults.text,this.options.node=s.node||n.defaults.node,this.options.duration=s.duration===0?0:s.duration||n.defaults.duration,this.options.selector=s.selector||n.defaults.selector,this.options.callback=s.callback||n.defaults.callback,this.options.destination=s.destination||n.defaults.destination,this.options.newWindow=s.newWindow||n.defaults.newWindow,this.options.close=s.close||n.defaults.close,this.options.gravity=s.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=s.positionLeft||n.defaults.positionLeft,this.options.position=s.position||n.defaults.position,this.options.backgroundColor=s.backgroundColor||n.defaults.backgroundColor,this.options.avatar=s.avatar||n.defaults.avatar,this.options.className=s.className||n.defaults.className,this.options.stopOnFocus=s.stopOnFocus===void 0?n.defaults.stopOnFocus:s.stopOnFocus,this.options.onClick=s.onClick||n.defaults.onClick,this.options.offset=s.offset||n.defaults.offset,this.options.escapeMarkup=s.escapeMarkup!==void 0?s.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=s.ariaLive||n.defaults.ariaLive,this.options.style=s.style||n.defaults.style,s.backgroundColor&&(this.options.style.background=s.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var s=document.createElement("div");s.className="toastify on "+this.options.className,this.options.position?s.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(s.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):s.className+=" toastify-right",s.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');for(var c in this.options.style)s.style[c]=this.options.style[c];if(this.options.ariaLive&&s.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)s.appendChild(this.options.node);else if(this.options.escapeMarkup?s.innerText=this.options.text:s.innerHTML=this.options.text,this.options.avatar!==""){var l=document.createElement("img");l.src=this.options.avatar,l.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?s.appendChild(l):s.insertAdjacentElement("afterbegin",l)}if(this.options.close===!0){var d=document.createElement("button");d.type="button",d.setAttribute("aria-label","Close"),d.className="toast-close",d.innerHTML="&#10006;",d.addEventListener("click",(function(v){v.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var h=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&h>360?s.insertAdjacentElement("afterbegin",d):s.appendChild(d)}if(this.options.stopOnFocus&&this.options.duration>0){var u=this;s.addEventListener("mouseover",function(v){window.clearTimeout(s.timeOutValue)}),s.addEventListener("mouseleave",function(){s.timeOutValue=window.setTimeout(function(){u.removeElement(s)},u.options.duration)})}if(typeof this.options.destination<"u"&&s.addEventListener("click",(function(v){v.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination}).bind(this)),typeof this.options.onClick=="function"&&typeof this.options.destination>"u"&&s.addEventListener("click",(function(v){v.stopPropagation(),this.options.onClick()}).bind(this)),typeof this.options.offset=="object"){var f=i("x",this.options),m=i("y",this.options),p=this.options.position=="left"?f:"-"+f,g=this.options.gravity=="toastify-top"?m:"-"+m;s.style.transform="translate("+p+","+g+")"}return s},showToast:function(){this.toastElement=this.buildToast();var s;if(typeof this.options.selector=="string"?s=document.getElementById(this.options.selector):this.options.selector instanceof HTMLElement||typeof ShadowRoot<"u"&&this.options.selector instanceof ShadowRoot?s=this.options.selector:s=document.body,!s)throw"Root element is not defined";var c=n.defaults.oldestFirst?s.firstChild:s.lastChild;return s.insertBefore(this.toastElement,c),n.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout((function(){this.removeElement(this.toastElement)}).bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(s){s.className=s.className.replace(" on",""),window.setTimeout((function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),s.parentNode&&s.parentNode.removeChild(s),this.options.callback.call(s),n.reposition()}).bind(this),400)}},n.reposition=function(){for(var s={top:15,bottom:15},c={top:15,bottom:15},l={top:15,bottom:15},d=document.getElementsByClassName("toastify"),h,u=0;u<d.length;u++){a(d[u],"toastify-top")===!0?h="toastify-top":h="toastify-bottom";var f=d[u].offsetHeight;h=h.substr(9,h.length-1);var m=15,p=window.innerWidth>0?window.innerWidth:screen.width;p<=360?(d[u].style[h]=l[h]+"px",l[h]+=f+m):a(d[u],"toastify-left")===!0?(d[u].style[h]=s[h]+"px",s[h]+=f+m):(d[u].style[h]=c[h]+"px",c[h]+=f+m)}return this};function i(s,c){return c.offset[s]?isNaN(c.offset[s])?c.offset[s]:c.offset[s]+"px":"0px"}function a(s,c){return!s||typeof c!="string"?!1:!!(s.className&&s.className.trim().split(/\s+/gi).indexOf(c)>-1)}return n.lib.init.prototype=n.lib,n})}(eo)),eo.exports}var vc=gc();const _c=Xi(vc);window._showToast=kt;function kt(t){typeof t=="string"&&(t={text:t});const{onClick:e,delay:n,...o}=t,i=_c({className:`${e||t.destination?"shiny-pill":""}`,gravity:"bottom",position:"center",...o,onClick:()=>{e?.(i)}});return n?setTimeout(()=>{i.showToast()},n):i.showToast(),i}function Mv(t,e,n,o){const i=N(t);Q(()=>{i.current=t},[t,n]),Q(()=>{!o||e===null||e===!1||i.current()},[o]),Q(()=>{if(e===null||e===!1)return;const s=setInterval(()=>i.current(),e);return()=>clearInterval(s)},[e])}const xr=t=>!!t&&t[0]==="o",er=Na,kn=(t,e)=>t===!0||!!(t&&t[e]),Ht=(t,e)=>typeof t=="function"?t(e):t,yc="_szhsinMenu",bc=t=>t[yc];const sn=(t,e)=>(e&&Object.keys(e).forEach(n=>{const o=t[n],i=e[n];typeof i=="function"&&o?t[n]=(...a)=>{i(...a),o(...a)}:t[n]=i}),t),wc=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]}},Do=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 go(t,e){return{"aria-disabled":t||void 0,tabIndex:e?0:-1}}function ai(t,e){for(let n=0;n<t.length;n++)if(t[n]===e)return n;return-1}const ue=({block:t,element:e,modifiers:n,className:o})=>lt(()=>{const i=e?`${t}__${e}`:t;let a=i;n&&Object.keys(n).forEach(c=>{const l=n[c];l&&(a+=` ${i}--${l===!0?c:`${c}-${l}`}`)});let s=typeof o=="function"?o(n):o;return typeof s=="string"&&(s=s.trim(),s&&(a+=` ${s}`)),a},[t,e,n,o]),Ec="szh-menu-container",le="szh-menu";const Tc="arrow",Ir="item",Ac="divider",kc="header",Cc="group",Sc="submenu";const ds=Jt(),Lr=Jt({}),ao=Jt({}),Dr=Jt({}),xc=Jt({}),vo=Jt({}),$t=Object.freeze({ENTER:"Enter",ESC:"Escape",SPACE:" ",HOME:"Home",END:"End",LEFT:"ArrowLeft",RIGHT:"ArrowRight",UP:"ArrowUp",DOWN:"ArrowDown"}),wt=Object.freeze({RESET:0,SET:1,UNSET:2,INCREASE:3,DECREASE:4,FIRST:5,LAST:6,SET_INDEX:7}),Cn=Object.freeze({CLICK:"click",CANCEL:"cancel",BLUR:"blur",SCROLL:"scroll"}),Ye=Object.freeze({FIRST:"first",LAST:"last"}),Ic=Object.freeze({entering:"opening",entered:"open",exiting:"closing",exited:"closed"}),ci="absolute",Mr="none",Pr="menuitem",nr={preventScroll:!0};const Lc=({className:t,containerRef:e,containerProps:n,children:o,isOpen:i,theming:a,transition:s,onClose:c})=>{const l=kn(s,"item");return r("div",{...sn({onKeyDown:({key:u})=>{switch(u){case $t.ESC:Ht(c,{key:u,reason:Cn.CANCEL});break}},onBlur:u=>{i&&!u.currentTarget.contains(u.relatedTarget)&&Ht(c,{reason:Cn.BLUR})}},n),className:ue({block:Ec,modifiers:lt(()=>({theme:a,itemTransition:l}),[a,l]),className:t}),style:{position:"absolute",...n?.style},ref:e,children:o})},Dc=()=>{let t,e=0;return{toggle:n=>{n?e++:e--,e=Math.max(e,0)},on:(n,o,i)=>{e?t||(t=setTimeout(()=>{t=0,o()},n)):i?.()},off:()=>{t&&(clearTimeout(t),t=0)}}},Mc=t=>{const[e,n]=V(),i=N({items:[],hoverIndex:-1,sorted:!1}).current,a=Et((c,l)=>{const{items:d}=i;if(!c)i.items=[];else if(l)d.push(c);else{const h=d.indexOf(c);h>-1&&(d.splice(h,1),c.contains(document.activeElement)&&(t.current.focus(nr),n()))}i.hoverIndex=-1,i.sorted=!1},[i,t]),s=Et((c,l,d)=>{const{items:h,hoverIndex:u}=i,f=()=>{if(i.sorted)return;const g=t.current.querySelectorAll(".szh-menu__item");h.sort((v,E)=>ai(g,v)-ai(g,E)),i.sorted=!0};let m=-1,p;switch(c){case wt.RESET:break;case wt.SET:p=l;break;case wt.UNSET:p=g=>g===l?void 0:g;break;case wt.FIRST:f(),m=0,p=h[m];break;case wt.LAST:f(),m=h.length-1,p=h[m];break;case wt.SET_INDEX:f(),m=d,p=h[m];break;case wt.INCREASE:f(),m=u,m<0&&(m=h.indexOf(l)),m++,m>=h.length&&(m=0),p=h[m];break;case wt.DECREASE:f(),m=u,m<0&&(m=h.indexOf(l)),m--,m<0&&(m=h.length-1),p=h[m];break;default:}p||(m=-1),n(p),i.hoverIndex=m},[t,i]);return{hoverItem:e,dispatch:s,updateItems:a}},li=(t,e)=>Math.round(t)===e?t:e,hs=t=>{const e=t.getBoundingClientRect();return e.width=li(e.width,t.offsetWidth),e.height=li(e.height,t.offsetHeight),e},Pc=(t,e,n,o)=>{const i=hs(e),a=t.getBoundingClientRect(),s=n===window?{left:0,top:0,right:document.documentElement.clientWidth,bottom:window.innerHeight}:n.getBoundingClientRect(),c=wc(o),l=p=>p+a.left-s.left-c.left,d=p=>p+a.left+i.width-s.right+c.right,h=p=>p+a.top-s.top-c.top,u=p=>p+a.top+i.height-s.bottom+c.bottom;return{menuRect:i,containerRect:a,getLeftOverflow:l,getRightOverflow:d,getTopOverflow:h,getBottomOverflow:u,confineHorizontally:p=>{let g=l(p);if(g<0)p-=g;else{const v=d(p);v>0&&(p-=v,g=l(p),g<0&&(p-=g))}return p},confineVertically:p=>{let g=h(p);if(g<0)p-=g;else{const v=u(p);v>0&&(p-=v,g=h(p),g<0&&(p-=g))}return p}}},Rc=({arrowRef:t,menuY:e,anchorRect:n,containerRect:o,menuRect:i})=>{let a=n.top-o.top-e+n.height/2;const s=t.current.offsetHeight*1.25;return a=Math.max(s,a),a=Math.min(a,i.height-s),a},Oc=({anchorRect:t,containerRect:e,menuRect:n,placeLeftorRightY:o,placeLeftX:i,placeRightX:a,getLeftOverflow:s,getRightOverflow:c,confineHorizontally:l,confineVertically:d,arrowRef:h,arrow:u,direction:f,position:m})=>{let p=f,g=o;m!=="initial"&&(g=d(g),m==="anchor"&&(g=Math.min(g,t.bottom-e.top),g=Math.max(g,t.top-e.top-n.height)));let v,E,w;return p==="left"?(v=i,m!=="initial"&&(E=s(v),E<0&&(w=c(a),(w<=0||-E>w)&&(v=a,p="right")))):(v=a,m!=="initial"&&(w=c(v),w>0&&(E=s(i),(E>=0||-E<w)&&(v=i,p="left")))),m==="auto"&&(v=l(v)),{arrowY:u?Rc({menuY:g,arrowRef:h,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:v,y:g,computedDirection:p}},$c=({arrowRef:t,menuX:e,anchorRect:n,containerRect:o,menuRect:i})=>{let a=n.left-o.left-e+n.width/2;const s=t.current.offsetWidth*1.25;return a=Math.max(s,a),a=Math.min(a,i.width-s),a},Nc=({anchorRect:t,containerRect:e,menuRect:n,placeToporBottomX:o,placeTopY:i,placeBottomY:a,getTopOverflow:s,getBottomOverflow:c,confineHorizontally:l,confineVertically:d,arrowRef:h,arrow:u,direction:f,position:m})=>{let p=f==="top"?"top":"bottom",g=o;m!=="initial"&&(g=l(g),m==="anchor"&&(g=Math.min(g,t.right-e.left),g=Math.max(g,t.left-e.left-n.width)));let v,E,w;return p==="top"?(v=i,m!=="initial"&&(E=s(v),E<0&&(w=c(a),(w<=0||-E>w)&&(v=a,p="bottom")))):(v=a,m!=="initial"&&(w=c(v),w>0&&(E=s(i),(E>=0||-E<w)&&(v=i,p="top")))),m==="auto"&&(v=d(v)),{arrowX:u?$c({menuX:g,arrowRef:h,anchorRect:t,containerRect:e,menuRect:n}):void 0,x:g,y:v,computedDirection:p}},Fc=({arrow:t,align:e,direction:n,gap:o,shift:i,position:a,anchorRect:s,arrowRef:c,positionHelpers:l})=>{const{menuRect:d,containerRect:h}=l,u=n==="left"||n==="right";let f=u?o:i,m=u?i:o;if(t){const y=c.current;u?f+=y.offsetWidth:m+=y.offsetHeight}const p=s.left-h.left-d.width-f,g=s.right-h.left+f,v=s.top-h.top-d.height-m,E=s.bottom-h.top+m;let w,k;e==="end"?(w=s.right-h.left-d.width,k=s.bottom-h.top-d.height):e==="center"?(w=s.left-h.left-(d.width-s.width)/2,k=s.top-h.top-(d.height-s.height)/2):(w=s.left-h.left,k=s.top-h.top),w+=f,k+=m;const T={...l,anchorRect:s,placeLeftX:p,placeRightX:g,placeLeftorRightY:k,placeTopY:v,placeBottomY:E,placeToporBottomX:w,arrowRef:c,arrow:t,direction:n,position:a};switch(n){case"left":case"right":return Oc(T);case"top":case"bottom":default:return Nc(T)}},Xe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?$e:Q;function ui(t,e){typeof t=="function"?t(e):t.current=e}const an=(t,e)=>lt(()=>t?e?n=>{ui(t,n),ui(e,n)}:t:e,[t,e]),di=-9999,fs=({ariaLabel:t,menuClassName:e,menuStyle:n,arrow:o,arrowProps:i={},anchorPoint:a,anchorRef:s,containerRef:c,containerProps:l,externalRef:d,parentScrollingRef:h,align:u="start",direction:f="bottom",position:m="auto",overflow:p="visible",setDownOverflow:g,repositionFlag:v,captureFocus:E=!0,state:w,endTransition:k,isDisabled:T,menuItemFocus:y,gap:S=0,shift:b=0,children:x,onClose:P,focusProps:D,...C})=>{const[L,O]=V({x:di,y:di}),[I,z]=V({}),[B,bt]=V(),[G,ut]=V(f),[nt]=V(Dc),[vt,ot]=kr(X=>X+1,1),{transition:rt,boundingBoxRef:et,boundingBoxPadding:Mt,rootMenuRef:ft,rootAnchorRef:Ut,scrollNodesRef:Xt,reposition:Qt,viewScroll:U,submenuCloseDelay:Tt}=xt(vo),{submenuCtx:mt,reposSubmenu:te=v}=xt(ao),_t=N(),Wt=N(),tt=N(!1),{hoverItem:pt,dispatch:Ct,updateItems:dt}=Mc(_t),J=xr(w),gt=kn(rt,"open"),_e=kn(rt,"close"),It=Xt.current,Fe=X=>{switch(X.key){case $t.HOME:Ct(wt.FIRST);break;case $t.END:Ct(wt.LAST);break;case $t.UP:Ct(wt.DECREASE,pt);break;case $t.DOWN:Ct(wt.INCREASE,pt);break;case $t.SPACE:X.target&&X.target.className.indexOf(le)!==-1&&X.preventDefault();return;default:return}X.preventDefault(),X.stopPropagation()},j=()=>{w==="closing"&&bt(),Ht(k)},Y=X=>{X.stopPropagation(),nt.on(Tt,()=>{Ct(wt.RESET),_t.current.focus(nr)})},W=X=>{X.target===X.currentTarget&&nt.off()},q=Et(X=>{const St=_t.current,zt=c.current;if(!St||!zt)return;const Zt=s?s.current?.getBoundingClientRect():a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0,height:0}:null;if(!Zt)return;It.menu||(It.menu=(et?et.current:Do(ft.current))||window);const Z=Pc(zt,St,It.menu,Mt);let{arrowX:ye,arrowY:Se,x:de,y:Be,computedDirection:qt}=Fc({arrow:o,align:u,direction:f,gap:S,shift:b,position:m,anchorRect:Zt,arrowRef:Wt,positionHelpers:Z});const{menuRect:xe}=Z,Gt=xe.height;if(!X&&p!=="visible"){const{getTopOverflow:Mn,getBottomOverflow:cn}=Z;let ee,Ve;const He=cn(Be);if(He>0)ee=Gt-He,Ve=He;else{const Ie=Mn(Be);Ie<0&&(ee=Gt+Ie,Ve=0-Ie,ee>=0&&(Be-=Ie))}ee>=0&&bt({height:ee,overflowAmt:Ve})}o&&z({x:ye,y:Se}),O({x:de,y:Be}),ut(qt)},[o,u,Mt,f,S,b,m,p,a,s,c,et,ft,It]);Xe(()=>{J&&(q(),tt.current&&ot()),tt.current=J},[J,q,te]),Xe(()=>{B&&!g&&(_t.current.scrollTop=0)},[B,g]),Xe(()=>dt,[dt]),Q(()=>{let{menu:X}=It;if(!J||!X)return;if(X=X.addEventListener?X:window,!It.anchors){It.anchors=[];let Z=Do(Ut&&Ut.current);for(;Z&&Z!==X;)It.anchors.push(Z),Z=Do(Z)}let St=U;if(It.anchors.length&&St==="initial"&&(St="auto"),St==="initial")return;const zt=()=>{St==="auto"?er(()=>q(!0)):Ht(P,{reason:Cn.SCROLL})},Zt=It.anchors.concat(U!=="initial"?X:[]);return Zt.forEach(Z=>Z.addEventListener("scroll",zt)),()=>Zt.forEach(Z=>Z.removeEventListener("scroll",zt))},[Ut,It,J,P,U,q]);const at=!!B&&B.overflowAmt>0;Q(()=>{if(at||!J||!h)return;const X=()=>er(q),St=h.current;return St.addEventListener("scroll",X),()=>St.removeEventListener("scroll",X)},[J,at,h,q]),Q(()=>{if(!J||typeof ResizeObserver!="function"||Qt==="initial")return;const X=[],St=new ResizeObserver(Z=>Z.forEach(({target:ye})=>{X.indexOf(ye)<0?X.push(ye):Fa(()=>{q(),ot()})})),zt={box:"border-box"};St.observe(_t.current,zt);const Zt=s?.current;return Zt&&St.observe(Zt,zt),()=>St.disconnect()},[J,Qt,s,q]),Q(()=>{if(!J){Ct(wt.RESET),_e||bt();return}const{position:X,alwaysUpdate:St}=y||{},zt=()=>{X===Ye.FIRST?Ct(wt.FIRST):X===Ye.LAST?Ct(wt.LAST):X>=-1&&Ct(wt.SET_INDEX,void 0,X)};if(St)zt();else if(E){const Zt=setTimeout(()=>{const Z=_t.current;Z&&!Z.contains(document.activeElement)&&(Z.focus(nr),zt())},gt?170:100);return()=>clearTimeout(Zt)}},[J,gt,_e,E,y,Ct]);const Pt=lt(()=>({isParentOpen:J,submenuCtx:nt,dispatch:Ct,updateItems:dt}),[J,nt,Ct,dt]);let it,Nt;B&&(g?Nt=B.overflowAmt:it=B.height);const ze=lt(()=>({reposSubmenu:vt,submenuCtx:nt,overflow:p,overflowAmt:Nt,parentMenuRef:_t,parentDir:G}),[vt,nt,p,Nt,G]),jt=it>=0?{maxHeight:it,overflow:p}:void 0,yt=lt(()=>({state:w,align:u,dir:G}),[w,u,G]),Rt=lt(()=>({dir:G}),[G]),Ft=ue({block:le,element:Tc,modifiers:Rt,className:i.className}),Lt=r("ul",{role:"menu","aria-label":t,...go(T),...sn({onPointerEnter:mt?.off,onPointerMove:Y,onPointerLeave:W,onKeyDown:Fe,onAnimationEnd:j},C),ref:an(d,_t),className:ue({block:le,modifiers:yt,className:e}),style:{...n,...jt,margin:0,display:w==="closed"?"none":void 0,position:ci,left:L.x,top:L.y},children:[o&&r("li",{"aria-hidden":!0,...i,className:Ft,style:{display:"block",position:ci,left:I.x,top:I.y,...i.style},ref:Wt}),r(ao.Provider,{value:ze,children:r(Lr.Provider,{value:Pt,children:r(ds.Provider,{value:pt,children:Ht(x,yt)})})})]});return l?r(Lc,{...l,isOpen:J,children:Lt}):Lt},ms=ke(function({"aria-label":e,className:n,containerProps:o,initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:d,reposition:h="auto",submenuOpenDelay:u=300,submenuCloseDelay:f=150,viewScroll:m="initial",portal:p,theming:g,onItemClick:v,...E},w){const k=N(null),T=N({}),{anchorRef:y,state:S,onClose:b}=E,x=lt(()=>({initialMounted:i,unmountOnClose:a,transition:s,transitionTimeout:c,boundingBoxRef:l,boundingBoxPadding:d,rootMenuRef:k,rootAnchorRef:y,scrollNodesRef:T,reposition:h,viewScroll:m,submenuOpenDelay:u,submenuCloseDelay:f}),[i,a,s,c,y,l,d,h,m,u,f]),P=lt(()=>({handleClick(C,L){C.stopPropagation||Ht(v,C);let O=C.keepOpen;O===void 0&&(O=L&&C.key===$t.SPACE),O||Ht(b,{value:C.value,key:C.key,reason:Cn.CLICK})},handleClose(C){Ht(b,{key:C,reason:Cn.CLICK})}}),[v,b]);if(!S)return null;const D=r(vo.Provider,{value:x,children:r(Dr.Provider,{value:P,children:r(fs,{...E,ariaLabel:e||"Menu",externalRef:w,containerRef:k,containerProps:{className:n,containerRef:k,containerProps:o,theming:g,transition:s,onClose:b}})})});return p===!0&&typeof document<"u"?io(D,document.body):p?p.target?io(D,p.target):p.stablePosition?null:D:D}),or=0,rr=1,co=2,lo=3,uo=4,zc=5,ps=6,Bc=["preEnter","entering","entered","preExit","exiting","exited","unmounted"],gs=t=>({_s:t,status:Bc[t],isEnter:t<lo,isMounted:t!==ps,isResolved:t===co||t>uo}),ir=t=>t?ps:zc,Vc=(t,e)=>{switch(t){case rr:case or:return co;case uo:case lo:return ir(e)}},Hc=t=>typeof t=="object"?[t.enter,t.exit]:[t,t],jc=(t,e)=>setTimeout(()=>{isNaN(document.body.offsetTop)||t(e+1)},0),hi=(t,e,n,o,i)=>{clearTimeout(o.current);const a=gs(t);e(a),n.current=a,i&&i({current:a})},Kc=({enter:t=!0,exit:e=!0,preEnter:n,preExit:o,timeout:i,initialEntered:a,mountOnEnter:s,unmountOnExit:c,onStateChange:l}={})=>{const[d,h]=V(()=>gs(a?co:ir(s))),u=N(d),f=N(),[m,p]=Hc(i),g=Et(()=>{const E=Vc(u.current._s,c);E&&hi(E,h,u,f,l)},[l,c]),v=Et(E=>{const w=T=>{switch(hi(T,h,u,f,l),T){case rr:m>=0&&(f.current=setTimeout(g,m));break;case uo:p>=0&&(f.current=setTimeout(g,p));break;case or:case lo:f.current=jc(w,T);break}},k=u.current.isEnter;typeof E!="boolean"&&(E=!k),E?!k&&w(t?n?or:rr:co):k&&w(e?o?lo:uo:ir(c))},[g,l,t,e,n,o,m,p,c]);return[d,v,g]};const Uc=({initialOpen:t,initialMounted:e,unmountOnClose:n,transition:o,transitionTimeout:i=500,onMenuChange:a}={})=>{const s=kn(o,"open"),c=kn(o,"close"),[{status:l},d,h]=Kc({initialEntered:t,mountOnEnter:!e,unmountOnExit:n,timeout:i,enter:s,exit:c,onStateChange:Et(({current:{isEnter:u,isResolved:f}})=>{!a||u&&s&&f||!u&&c&&f||a({open:u})},[a,s,c])});return[{state:Ic[l],endTransition:h},d]},vs=t=>{const[e,n]=Uc(t),[o,i]=V(),a=(s,c)=>{i({position:s,alwaysUpdate:c}),n(!0)};return[{menuItemFocus:o,...e},n,a]},Wc=(t,e)=>{const[n]=V({});return{onMouseDown:()=>{n.v=t&&t!=="closed"},onClick:o=>n.v?n.v=!1:e(!0,o)}},Zc=parseInt(za)<19,qc=ke(function({"aria-label":e,captureFocus:n,initialOpen:o,menuButton:i,instanceRef:a,onMenuChange:s,...c},l){const[d,h,u]=vs({...c,onMenuChange:s}),{state:f}=d,m=xr(f),p=N(null),g=Wc(f,(y,S)=>u(S.detail?void 0:Ye.FIRST)),v=Et(y=>{h(!1),y.key&&p.current.focus()},[h]),E=y=>{switch(y.key){case $t.UP:u(Ye.LAST);break;case $t.DOWN:u(Ye.FIRST);break;default:return}y.preventDefault()},w=Ht(i,{open:m});if(!w||!w.type)throw new Error("Menu requires a menuButton prop.");const k={...sn({onKeyDown:E,...g},w.props),ref:an(Zc?w.ref:w.props.ref,p)};bc(w.type)==="MenuButton"&&(k.isOpen=m);const T=Qi(w,k);return Ji(a,()=>({openMenu:u,closeMenu:()=>h(!1)})),r(F,{children:[T,r(ms,{...c,...d,"aria-label":e||(typeof w.props.children=="string"?w.props.children:"Menu"),anchorRef:p,ref:l,onClose:v})]})}),Rr=(t,e)=>{const n=rn(e),o=ke((i,a)=>{const s=N(null);return r(n,{...i,itemRef:s,externalRef:a,isHovering:xt(ds)===s.current})});return o.displayName=`WithHovering(${t})`,o},_s=t=>{const[e,n]=V(!1);return Q(()=>{!t&&n(!1)},[t]),[e,()=>!e&&n(!0),()=>n(!1)]},ys=(t,e,n)=>{Xe(()=>{if(t)return;const o=e.current;return n(o,!0),()=>{n(o)}},[t,e,n])},Gc=Rr("SubMenu",function({"aria-label":e,className:n,disabled:o,direction:i,label:a,openTrigger:s,onMenuChange:c,isHovering:l,instanceRef:d,itemRef:h,captureFocus:u,repositionFlag:f,itemProps:m={},...p}){const g=xt(vo),{rootMenuRef:v,submenuOpenDelay:E,submenuCloseDelay:w}=g,{parentMenuRef:k,parentDir:T,overflow:y}=xt(ao),{isParentOpen:S,submenuCtx:b,dispatch:x,updateItems:P}=xt(Lr),D=y!=="visible",[C,L,O]=vs({...g,onMenuChange:c}),[I,z,B]=_s(l),{state:bt}=C,G=!!o,ut=xr(bt),nt=N(null),[vt]=V({v:0}),ot=()=>{b.off(),vt.v&&(clearTimeout(vt.v),vt.v=0)},rt=(...tt)=>{ot(),et(),!G&&O(...tt)},et=()=>!l&&!G&&x(wt.SET,h.current),Mt=tt=>{et(),s||(vt.v=setTimeout(()=>er(rt),Math.max(tt,0)))},ft=tt=>{G||(tt.stopPropagation(),z(),!(vt.v||ut)&&b.on(w,()=>Mt(E-w),()=>Mt(E)))},Ut=()=>{B(),ot(),ut||x(wt.UNSET,h.current)},Xt=tt=>{if(l)switch(tt.key){case $t.ENTER:tt.preventDefault();case $t.SPACE:case $t.RIGHT:s!=="none"&&rt(Ye.FIRST)}},Qt=tt=>{let pt=!1;switch(tt.key){case $t.LEFT:ut&&(h.current.focus(),L(!1),pt=!0);break;case $t.RIGHT:ut||(pt=!0);break}pt&&(tt.preventDefault(),tt.stopPropagation())};ys(G,h,P),Q(()=>b.toggle(ut),[b,ut]),Q(()=>()=>{clearTimeout(vt.v),b.toggle(!1)},[vt,b]),Q(()=>{l&&S?h.current.focus():L(!1)},[l,S,L,h]),Ji(d,()=>({openMenu:(...tt)=>{S&&rt(...tt)},closeMenu:()=>{ut&&(h.current.focus(),L(!1))}}));const U=lt(()=>({open:ut,hover:I||l,disabled:G,submenu:!0}),[ut,l,G,I]),{ref:Tt,className:mt,...te}=m,_t=sn({onPointerEnter:b.off,onPointerMove:ft,onPointerLeave:Ut,onKeyDown:Xt,onClick:()=>s!=="none"&&rt()},te),Wt=()=>{const tt=r(fs,{...p,...C,ariaLabel:e||(typeof a=="string"?a:"Submenu"),anchorRef:h,containerRef:D?v:nt,direction:i||(T==="right"||T==="left"?T:"right"),parentScrollingRef:D&&k,isDisabled:G}),pt=v.current;return D&&pt?io(tt,pt):tt};return r("li",{className:ue({block:le,element:Sc,className:n}),style:{position:"relative"},role:Mr,ref:nt,onKeyDown:Qt,children:[r("div",{role:Pr,"aria-haspopup":!0,"aria-expanded":ut,...go(G,l),..._t,ref:an(Tt,h),className:ue({block:le,element:Ir,modifiers:U,className:mt}),children:lt(()=>Ht(a,U),[a,U])}),bt&&Wt()]})}),bs=(t,e,n,o)=>{const[i,a,s]=_s(n),{submenuCloseDelay:c}=xt(vo),{isParentOpen:l,submenuCtx:d,dispatch:h,updateItems:u}=xt(Lr),f=()=>{!n&&!o&&h(wt.SET,t.current)},m=()=>{!o&&h(wt.UNSET,t.current)},p=E=>{n&&!E.currentTarget.contains(E.relatedTarget)&&m()},g=E=>{o||(E.stopPropagation(),a(),d.on(c,f,f))},v=(E,w)=>{s(),d.off(),!w&&m()};return ys(o,t,u),Q(()=>{n&&l&&e.current&&e.current.focus()},[e,n,l]),{mouseOver:i,setHover:f,onBlur:p,onPointerMove:g,onPointerLeave:v}},At=Rr("MenuItem",function({className:e,value:n,href:o,type:i,checked:a,disabled:s,children:c,onClick:l,isHovering:d,itemRef:h,externalRef:u,...f}){const m=!!s,{mouseOver:p,setHover:g,...v}=bs(h,h,d,m),E=xt(Dr),w=xt(xc),k=i==="radio",T=i==="checkbox",y=!!o&&!m&&!k&&!T,S=k?w.value===n:T?!!a:!1,b=L=>{if(m){L.stopPropagation(),L.preventDefault();return}const O={value:n,syntheticEvent:L};L.key!==void 0&&(O.key=L.key),T&&(O.checked=!S),k&&(O.name=w.name),Ht(l,O),k&&Ht(w.onRadioChange,O),E.handleClick(O,T||k)},x=L=>{if(d)switch(L.key){case $t.ENTER:L.preventDefault();case $t.SPACE:y?h.current.click():b(L)}},P=lt(()=>({type:i,disabled:m,hover:p||d,checked:S,anchor:y}),[i,m,p,d,S,y]),D=sn({...v,onPointerDown:g,onKeyDown:x,onClick:b},f),C={role:k?"menuitemradio":T?"menuitemcheckbox":Pr,"aria-checked":k||T?S:void 0,...go(m,d),...D,ref:an(u,h),className:ue({block:le,element:Ir,modifiers:P,className:e}),children:lt(()=>Ht(c,P),[c,P])};return y?r("li",{role:Mr,children:r("a",{href:o,...C})}):r("li",{...C})}),Yc=Rr("FocusableItem",function({className:e,disabled:n,children:o,isHovering:i,itemRef:a,externalRef:s,...c}){const l=!!n,d=N(null),{mouseOver:h,setHover:u,onPointerLeave:f,...m}=bs(a,d,i,l),{handleClose:p}=xt(Dr),g=lt(()=>({disabled:l,hover:h||i,focusable:!0}),[l,i,h]),v=lt(()=>Ht(o,{...g,ref:d,closeMenu:p}),[o,g,p]),E=sn({...m,onPointerLeave:w=>f(w,!0),onFocus:u},c);return r("li",{role:Pr,...go(l),...E,ref:an(s,a),className:ue({block:le,element:Ir,modifiers:g,className:e}),children:v})}),hn=rn(ke(function({className:e,...n},o){return r("li",{role:"separator",...n,ref:o,className:ue({block:le,element:Ac,className:e})})})),Pv=rn(ke(function({className:e,...n},o){return r("li",{role:Mr,...n,ref:o,className:ue({block:le,element:kc,className:e})})})),Rv=ke(function({className:e,style:n,takeOverflow:o,...i},a){const s=N(null),[c,l]=V(),{overflow:d,overflowAmt:h}=xt(ao);return Xe(()=>{let u;o&&h>=0&&(u=hs(s.current).height-h,u<0&&(u=0)),l(u>=0?{maxHeight:u,overflow:d}:void 0)},[o,d,h]),Xe(()=>{c&&(s.current.scrollTop=0)},[c]),r("div",{...i,ref:an(a,s),className:ue({block:le,element:Cc,className:e}),style:{...n,...c}})});var vn=(t=>(t.Mouse="mouse",t.Touch="touch",t.Pointer="pointer",t))(vn||{}),_n=(t=>(t.CancelledByMovement="cancelled-by-movement",t.CancelledByRelease="cancelled-by-release",t.CancelledOutsideElement="cancelled-outside-element",t))(_n||{});const Xc=["mousedown","mousemove","mouseup","mouseleave","mouseout"],Qc=["touchstart","touchmove","touchend","touchcancel"],Jc=["pointerdown","pointermove","pointerup","pointerleave","pointerout"];function tl(t){return typeof t=="object"&&t!==null&&"pageX"in t&&typeof t.pageX=="number"&&"pageY"in t&&typeof t.pageY=="number"}function el(t){var e;return Xc.includes((e=t?.nativeEvent)==null?void 0:e.type)}function ws(t){var e;return Qc.includes((e=t?.nativeEvent)==null?void 0:e.type)||"touches"in t}function nl(t){const{nativeEvent:e}=t;return e?Jc.includes(e?.type)||"pointerId"in e:!1}function Mo(t){return el(t)||ws(t)||nl(t)}function fi(t){var e;const n=ws(t)?(e=t?.touches)==null?void 0:e[0]:t;return tl(n)?{x:n.pageX,y:n.pageY}:null}function ol(t){return{target:t.target,currentTarget:t.currentTarget,nativeEvent:t,persist:()=>{}}}function Es(t,{threshold:e=400,captureEvent:n=!1,detect:o=vn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:a=!0,filterEvents:s,onStart:c,onMove:l,onFinish:d,onCancel:h}={}){const u=N(!1),f=N(!1),m=N(),p=N(),g=N(t),v=N(null),E=Et(y=>S=>{f.current||Mo(S)&&(s!==void 0&&!s(S)||(n&&S.persist(),c?.(S,{context:y}),v.current=fi(S),f.current=!0,m.current=S.currentTarget,p.current=setTimeout(()=>{g.current&&(g.current(S,{context:y}),u.current=!0)},e)))},[n,s,c,e]),w=Et(y=>(S,b)=>{Mo(S)&&f.current&&(v.current=null,n&&S.persist(),u.current?d?.(S,{context:y}):f.current&&h?.(S,{context:y,reason:b??_n.CancelledByRelease}),u.current=!1,f.current=!1,p.current!==void 0&&clearTimeout(p.current))},[n,d,h]),k=Et(y=>S=>{if(Mo(S)&&(l?.(S,{context:y}),i!==!1&&v.current)){const b=fi(S);if(b){const x=i===!0?25:i,P={x:Math.abs(b.x-v.current.x),y:Math.abs(b.y-v.current.y)};(P.x>x||P.y>x)&&w(y)(S,_n.CancelledByMovement)}}},[w,i,l]),T=Et(y=>{if(t===null)return{};switch(o){case vn.Mouse:{const S={onMouseDown:E(y),onMouseMove:k(y),onMouseUp:w(y)};return a&&(S.onMouseLeave=b=>{w(y)(b,_n.CancelledOutsideElement)}),S}case vn.Touch:return{onTouchStart:E(y),onTouchMove:k(y),onTouchEnd:w(y)};case vn.Pointer:{const S={onPointerDown:E(y),onPointerMove:k(y),onPointerUp:w(y)};return a&&(S.onPointerLeave=b=>w(y)(b,_n.CancelledOutsideElement)),S}}},[t,w,a,o,k,E]);return Q(()=>{function y(S){const b=ol(S);w()(b)}return window.addEventListener("mouseup",y),window.addEventListener("touchend",y),window.addEventListener("pointerup",y),()=>{window.removeEventListener("mouseup",y),window.removeEventListener("touchend",y),window.removeEventListener("pointerup",y)}},[w]),Q(()=>()=>{p.current!==void 0&&clearTimeout(p.current)},[]),Q(()=>{g.current=t},[t]),T}function rl(){const t=[...navigator.languages];try{const e=new Intl.DateTimeFormat().resolvedOptions().locale;t.includes(e)||t.unshift(e)}catch{}return t}let mi=rl();const Po=Bt((t,e={})=>{try{return new Intl.Locale(t,e)}catch{if(!t)return null;const[n,...o]=t.split("-",4),i=o.pop()||null,a={language:n,region:i,...e,toString:()=>{const s=a.language,c=o.length>0?`-${o.join("-")}-`:"-",l=a.region;return l?`${s}${c}${l}`:s}};return a}}),il=(t,e)=>{const n=e,o=Po(t);let i=null;for(const c of mi){const l=Po(c)?.region;if(l){i=l;break}}const a=i&&o&&o.region!==i?Po(o.language,{...o,region:i})?.toString():null,s=so([a,t,t?.replace(/-[a-z]+$/i,"")],mi,t);try{return new Intl.DateTimeFormat(s,n)}catch{return new Intl.DateTimeFormat(void 0,n)}},sr=Bt(il);function Sn(t,e){t instanceof Date||(t=new Date(t));const{hideTime:n,formatOpts:o,forceOpts:i}=e||{},a=new Date().getFullYear(),s=i||{year:t.getFullYear()===a?void 0:"numeric",month:"short",day:"numeric",hour:n?void 0:"numeric",minute:n?void 0:"numeric",...o};return sr(Dt.locale,s).format(t)}function sl(t){const e=URL.parse("./compose/",window.location),{width:n,height:o}=window.screen,i=Math.max(0,(n-600)/2),a=Math.max(0,(o-450)/2),s=Math.min(n,600),c=Math.min(o,450),l=t?.uid||Math.random(),d=window.open(e,"compose"+l,`width=${s},height=${c},left=${i},top=${a}`);return d?d.__COMPOSE__=t:alert(Dt._({id:"4S86wI"})),d}const al=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);function cl(){if(al){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 ll=document.documentElement,jn=getComputedStyle(ll),ul=8;let Ts=[0,0,0,0];function As(){const t=jn.getPropertyValue("--sai-top"),e=jn.getPropertyValue("--sai-right"),n=jn.getPropertyValue("--sai-bottom"),o=jn.getPropertyValue("--sai-left");Ts=[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(As);function ks(t=[]){return Ts.map((n,o)=>(n||ul)+(t[o]||0)).join(" ")}CSS.supports("top: env(safe-area-inset-top)")&&window.addEventListener("resize",As,{passive:!0});const pi=5e3;function Kn(t){if(t||(t=!0),H.showCompose){H.composerState.minimized?kt({duration:pi,text:Dt._({id:"/4fHR1"})}):kt({duration:pi,text:Dt._({id:"vvl08N"})});return}cl(),H.showCompose=t}const Ue=document.createElement("div");function dl(t,e){if(!t)return"";const{preProcess:n}=e||{};return Ue.innerHTML=t.replace(/<\/p>/g,`</p>
`).replace(/<\/li>/g,`</li>
`),Ue.querySelectorAll("br").forEach(o=>{o.replaceWith(`
`)}),n?.(Ue),Ue.querySelectorAll(".invisible").forEach(o=>{o.remove()}),Ue.querySelectorAll(".ellipsis").forEach(o=>{o.append("...")}),Ue.innerText.replace(/[\r\n]{3,}/g,`
`).trim()}const _o=Bt(dl);function Cs(t){const{spoilerText:e,content:n,poll:o,mediaAttachments:i}=t;let a="";return e?.trim()?a+=e:a+=_o(n),a=a.trim(),o?.options?.length&&(a+=`
📊:
${o.options.map(s=>`${o.multiple?"▪️":"•"} ${s.title}`).join(`
`)}`),i?.length&&(a+=" "+i.map(s=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[s.type]||"").join("")),a}const hl=/[&<>"']/g,fl={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&apos;"};function no(t){return t.replace(hl,e=>fl[e])}const Ss={x:()=>A(()=>import("./icons/close-line-Bfj902o4.js"),[],import.meta.url),heart:()=>A(()=>import("./icons/heart-line-vi3QqJTo.js"),[],import.meta.url),bookmark:()=>A(()=>import("./icons/bookmark-line-BMGZc_Mc.js"),[],import.meta.url),"check-circle":()=>A(()=>import("./icons/check-circle-line-CSlVj8QA.js"),[],import.meta.url),"x-circle":()=>A(()=>import("./icons/close-circle-line-DlCWcUwK.js"),[],import.meta.url),transfer:()=>A(()=>import("./icons/transfer-4-line-BHXBUumZ.js"),[],import.meta.url),rocket:()=>A(()=>import("./icons/rocket-line-B7gBxy4I.js"),[],import.meta.url),"arrow-left":{module:()=>A(()=>import("./icons/arrow-left-line-BGgZ0udH.js"),[],import.meta.url),rtl:!0},"arrow-right":{module:()=>A(()=>import("./icons/arrow-right-line-zKtS4vm5.js"),[],import.meta.url),rtl:!0},"arrow-up":()=>A(()=>import("./icons/arrow-up-line-Bow_AQZ6.js"),[],import.meta.url),"arrow-down":()=>A(()=>import("./icons/arrow-down-line-RSwsrALM.js"),[],import.meta.url),earth:()=>A(()=>import("./icons/world-2-line-BqQ1RIgL.js"),[],import.meta.url),lock:()=>A(()=>import("./icons/lock-line-BbTC1fux.js"),[],import.meta.url),unlock:()=>A(()=>import("./icons/unlock-line-CGrzBxul.js"),[],import.meta.url),"eye-close":()=>A(()=>import("./icons/eye-close-line-DQnawnJE.js"),[],import.meta.url),"eye-open":()=>A(()=>import("./icons/eye-2-line-Dvog5oyl.js"),[],import.meta.url),message:()=>A(()=>import("./icons/mail-line-Cadg2cpP.js"),[],import.meta.url),comment:{module:()=>A(()=>import("./icons/chat-3-line-C4e7R0Zy.js"),[],import.meta.url),rtl:!0},comment2:{module:()=>A(()=>import("./icons/comment-2-line-DfD-95ou.js"),[],import.meta.url),rtl:!0},home:()=>A(()=>import("./icons/home-3-line-BLD1YYP8.js"),[],import.meta.url),notification:()=>A(()=>import("./icons/notification-line-Cc2m6sh5.js"),[],import.meta.url),follow:()=>A(()=>import("./icons/user-follow-line-CsL-DB1N.js"),[],import.meta.url),"follow-add":()=>A(()=>import("./icons/user-add-line-DuegJyfy.js"),[],import.meta.url),poll:[()=>A(()=>import("./icons/chart-bar-line-W9BuvVdR.js"),[],import.meta.url),"90deg"],pencil:()=>A(()=>import("./icons/pencil-line-BwUdLENj.js"),[],import.meta.url),quill:()=>A(()=>import("./icons/quill-pen-line-oAx8SSeF.js"),[],import.meta.url),at:()=>A(()=>import("./icons/at-line-C4-OGRKX.js"),[],import.meta.url),attachment:()=>A(()=>import("./icons/attachment-line-C4ysC1zZ.js"),[],import.meta.url),upload:()=>A(()=>import("./icons/upload-3-line-BB2RA_2Z.js"),[],import.meta.url),gear:()=>A(()=>import("./icons/settings-3-line-BGrM7a5R.js"),[],import.meta.url),more:()=>A(()=>import("./icons/more-3-line-WfszpsFu.js"),[],import.meta.url),more2:()=>A(()=>import("./icons/more-1-fill-Cnnj9cLP.js"),[],import.meta.url),external:{module:()=>A(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rtl:!0},popout:{module:()=>A(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rtl:!0},popin:{module:()=>A(()=>import("./icons/external-link-line-BYXsdcMa.js"),[],import.meta.url),rotate:"180deg",rtl:!0},plus:()=>A(()=>import("./icons/add-circle-line-VUOz5dLS.js"),[],import.meta.url),"chevron-left":{module:()=>A(()=>import("./icons/left-line-8vYaPuok.js"),[],import.meta.url),rtl:!0},"chevron-right":{module:()=>A(()=>import("./icons/right-line-E80CeS1Q.js"),[],import.meta.url),rtl:!0},"chevron-down":()=>A(()=>import("./icons/down-line-PlS1iUy8.js"),[],import.meta.url),reply:{module:()=>A(()=>import("./icons/share-forward-line-DX1QbiUu.js"),[],import.meta.url),rotate:"180deg",flip:"horizontal",rtl:!0},thread:()=>A(()=>import("./icons/route-line-D10jSVCO.js"),[],import.meta.url),group:{module:()=>A(()=>import("./icons/group-line-Cw2Phg9p.js"),[],import.meta.url),rtl:!0},bot:()=>A(()=>import("./icons/android-2-line-C7qVwx2U.js"),[],import.meta.url),menu:()=>A(()=>import("./icons/rows-4-line-DIXu-DVG.js"),[],import.meta.url),list:{module:()=>A(()=>import("./icons/list-check-line-BaMf8v8i.js"),[],import.meta.url),rtl:!0},search:()=>A(()=>import("./icons/search-2-line-CoCbFBVR.js"),[],import.meta.url),hashtag:()=>A(()=>import("./icons/hashtag-line-Cml-0qv2.js"),[],import.meta.url),info:()=>A(()=>import("./icons/information-line-Dn255DD5.js"),[],import.meta.url),shortcut:()=>A(()=>import("./icons/lightning-line-cvW5NR-M.js"),[],import.meta.url),user:()=>A(()=>import("./icons/user-4-line-C89P3h09.js"),[],import.meta.url),following:()=>A(()=>import("./icons/walk-line-BZwRwcxJ.js"),[],import.meta.url),pin:()=>A(()=>import("./icons/pin-line-BqseDe3t.js"),[],import.meta.url),unpin:[()=>A(()=>import("./icons/pin-line-BqseDe3t.js"),[],import.meta.url),"180deg"],bus:()=>A(()=>import("./icons/bus-2-line-CfBaNBAi.js"),[],import.meta.url),link:()=>A(()=>import("./icons/link-2-line-SnIkQ_rZ.js"),[],import.meta.url),history:()=>A(()=>import("./icons/history-line-Bi2So-je.js"),[],import.meta.url),share:()=>A(()=>import("./icons/share-2-line-C2byQ30z.js"),[],import.meta.url),sparkles:()=>A(()=>import("./icons/sparkles-line-DWyRj8uB.js"),[],import.meta.url),sparkles2:()=>A(()=>import("./icons/sparkles-2-line-H731KO3v.js"),[],import.meta.url),exit:{module:()=>A(()=>import("./icons/exit-line-NjC63GxM.js"),[],import.meta.url),rtl:!0},translate:()=>A(()=>import("./icons/translate-line-cdOWN72F.js"),[],import.meta.url),play:()=>A(()=>import("./icons/play-fill-D1o3ePO2.js"),[],import.meta.url),trash:()=>A(()=>import("./icons/delete-2-line-C-lQIJNC.js"),[],import.meta.url),mute:{module:()=>A(()=>import("./icons/volume-mute-line-BluUkhVT.js"),[],import.meta.url),rtl:!0},unmute:{module:()=>A(()=>import("./icons/volume-line-dtC5ZFr8.js"),[],import.meta.url),rtl:!0},block:()=>A(()=>import("./icons/forbid-circle-line-f_JQE7a8.js"),[],import.meta.url),unblock:[()=>A(()=>import("./icons/forbid-circle-line-f_JQE7a8.js"),[],import.meta.url),"180deg"],flag:()=>A(()=>import("./icons/flag-1-line-sWzx_4o4.js"),[],import.meta.url),time:()=>A(()=>import("./icons/time-line-CHAmvUdg.js"),[],import.meta.url),refresh:()=>A(()=>import("./icons/refresh-2-line-B3CD5yz0.js"),[],import.meta.url),emoji2:()=>A(()=>import("./icons/emoji-2-line-DODV8bnC.js"),[],import.meta.url),filter:()=>A(()=>import("./icons/filter-2-line-DLBEPhKS.js"),[],import.meta.url),filters:()=>A(()=>import("./icons/filter-line-CuUlgBZU.js"),[],import.meta.url),chart:()=>A(()=>import("./icons/chart-line-line-noCpZUdN.js"),[],import.meta.url),react:()=>A(()=>import("./icons/react-line-C6TecPWI.js"),[],import.meta.url),layout4:{module:()=>A(()=>import("./icons/layout-4-line-BFFb1cPy.js"),[],import.meta.url),rtl:!0},layout5:()=>A(()=>import("./icons/layout-5-line-tauINoiF.js"),[],import.meta.url),announce:{module:()=>A(()=>import("./icons/announcement-line-BdsFnqjO.js"),[],import.meta.url),rtl:!0},alert:()=>A(()=>import("./icons/alert-line-CcwmWSBO.js"),[],import.meta.url),round:()=>A(()=>import("./icons/round-fill-CaZIeOWe.js"),[],import.meta.url),"arrow-up-circle":()=>A(()=>import("./icons/arrow-up-circle-line-SO68bPTf.js"),[],import.meta.url),"arrow-down-circle":()=>A(()=>import("./icons/arrow-down-circle-line-SfuiravZ.js"),[],import.meta.url),clipboard:{module:()=>A(()=>import("./icons/clipboard-line-CIOFpSsX.js"),[],import.meta.url),rtl:!0},"account-edit":()=>A(()=>import("./icons/user-edit-line-CC6Y-fJT.js"),[],import.meta.url),"account-warning":()=>A(()=>import("./icons/user-warning-line-BLfdr8Bj.js"),[],import.meta.url),"account-add":()=>A(()=>import("./icons/user-add-2-line-BbaxtCjf.js"),[],import.meta.url),keyboard:()=>A(()=>import("./icons/keyboard-line-BRd9ohM1.js"),[],import.meta.url),cloud:()=>A(()=>import("./icons/cloud-line-CCOdtB64.js"),[],import.meta.url),month:{module:()=>A(()=>import("./icons/calendar-month-line-DGpTEHfi.js"),[],import.meta.url),rtl:!0},media:()=>A(()=>import("./icons/photo-album-line-DkklX4P5.js"),[],import.meta.url),speak:()=>A(()=>import("./icons/radar-line-Dch2zZ5p.js"),[],import.meta.url),building:()=>A(()=>import("./icons/building-5-line-jPUf3HeC.js"),[],import.meta.url),history2:{module:()=>A(()=>import("./icons/history-2-line-C2uKqj-3.js"),[],import.meta.url),rtl:!0},document:()=>A(()=>import("./icons/document-line-ewA3UKpU.js"),[],import.meta.url),"arrows-right":{module:()=>A(()=>import("./icons/arrows-right-line-B7gMPCMB.js"),[],import.meta.url),rtl:!0},code:()=>A(()=>import("./icons/code-line-_8nrb8Yp.js"),[],import.meta.url),copy:()=>A(()=>import("./icons/copy-2-line-SBRewLs-.js"),[],import.meta.url),quote:{module:()=>A(()=>import("./icons/quote-left-line-D0CgS7V6.js"),[],import.meta.url),rtl:!0},settings:()=>A(()=>import("./icons/settings-6-line-3dTfr4F6.js"),[],import.meta.url),"heart-break":()=>A(()=>import("./icons/heart-crack-line-BlrTdexG.js"),[],import.meta.url),"user-x":()=>A(()=>import("./icons/user-x-line-Dahn1YZg.js"),[],import.meta.url),minimize:()=>A(()=>import("./icons/down-line-PlS1iUy8.js"),[],import.meta.url),celebrate:()=>A(()=>import("./icons/celebrate-line-CwClz8eZ.js"),[],import.meta.url),schedule:()=>A(()=>import("./icons/calendar-time-add-line-BwP_cVys.js"),[],import.meta.url),day:()=>A(()=>import("./icons/calendar-day-line-zQlj2fPr.js"),[],import.meta.url),camera:()=>A(()=>import("./icons/camera-line-DK82q_yA.js"),[],import.meta.url),endorsement:{module:()=>A(()=>import("./icons/user-star-line-jCNS7JD6.js"),[],import.meta.url),rtl:!0},formula:()=>A(()=>import("./icons/formula-line-DHbN6ztn.js"),[],import.meta.url),edit:()=>A(()=>import("./icons/edit-4-line-B3lvLrpT.js"),[],import.meta.url),"zoom-in":()=>A(()=>import("./icons/zoom-in-line-a0TkUNno.js"),[],import.meta.url),"zoom-out":()=>A(()=>import("./icons/zoom-out-line-wfKlvfFM.js"),[],import.meta.url),"cursor-hand":()=>A(()=>import("./icons/hand-finger-2-line-QNYxa4H_.js"),[],import.meta.url)},ml={xs:8,s:12,m:16,l:20,xl:24,xxl:32},gi={},pl=/[^a-zA-Z0-9]/g,gl=Ba(function({icon:t,title:e,width:n,height:o,body:i,rotate:a,flip:s}){const c=e?.replace(pl,"-")||"",l=`icon-${t}-${c}`,d=e?`<title id="${l}">${no(e)}</title>${i}`:i;return r("svg",{role:e?"img":"presentation","aria-labelledby":l,viewBox:`0 0 ${n} ${o}`,dangerouslySetInnerHTML:{__html:d},style:{transform:`${a?`rotate(${a})`:""} ${s?"scaleX(-1)":""}`}})},{isShallowEqual:!0,maxSize:Object.keys(Ss).length,matchesArg:(t,e)=>t.icon===e.icon&&t.title===e.title&&t.body===e.body});function M({icon:t,size:e="m",alt:n,title:o,class:i="",style:a={}}){if(!t)return null;const s=ml[e];let c=Ss[t];if(!c)return null;let l,d,h=!1;Array.isArray(c)?[c,l,d]=c:typeof c=="object"&&({rotate:l,flip:d,rtl:h}=c,c=c.module);const[u,f]=V(gi[t]),m=N(t);return Q(()=>{u&&m.current===t||((async()=>{const p=await c();f(p.default),gi[t]=p.default})(),m.current=t)},[t]),r("span",{class:`icon ${i} ${h?"rtl-flip":""}`,style:{width:`${s}px`,height:`${s}px`,...a},"data-icon":t,children:u&&r(gl,{icon:t,title:o||n,width:u.width,height:u.height,body:u.body,rotate:l,flip:d})})}const Je=ke((t,e)=>{let n;try{n=Va()}catch{}let o=(location.hash||"").replace(/^#/,"").trim();o===""&&(o="/");const{to:i,...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(([d,h])=>`${d}=${encodeURIComponent(h)}`).join("&");o=c.pathname+"?"+l}}const s=o===i||decodeURIComponent(o)===i;return r("a",{ref:e,href:`#${i}`,...a,class:`${t.class||""} ${s?"is-active":""}`,onClick:c=>{c.currentTarget?.parentNode?.closest("a")&&c.stopPropagation(),n&&(H.prevLocation=n),t.onClick?.(c)}})});function vi(t){const{className:e,disabled:n,...o}=t;return r(Yc,{className:e,disabled:n,children:({ref:i,closeMenu:a})=>r(Je,{...o,ref:i,onClick:({detail:s})=>a(s===0?"Enter":void 0)})})}const xs=Bt(t=>new Intl.RelativeTimeFormat(t||void 0));function _i(t){if(t instanceof Date)return!isNaN(t.getTime());{const e=new Date(t);return!isNaN(e.getTime())}}const tn=60,en=60*tn,Me=24*en,vl=t=>{const e=xs(Dt.locale),n=(t.getTime()-Date.now())/1e3,o=Math.abs(n);return o<tn?e.format(Math.floor(n),"second"):o<en?e.format(Math.floor(n/tn),"minute"):o<Me?e.format(Math.floor(n/en),"hour"):o<30*Me?e.format(Math.floor(n/Me),"day"):o<365*Me?e.format(Math.floor(n/Me/30),"month"):e.format(Math.floor(n/Me/365),"year")},_l=t=>{const e=(Date.now()-t.getTime())/1e3;return e<tn?Dt._({id:"NnRCUm",values:{0:e<1?1:Math.floor(e)}}):e<en?Dt._({id:"ZSWUwq",values:{0:Math.floor(e/tn)}}):Dt._({id:"NSSJsj",values:{0:Math.floor(e/en)}})};function me({datetime:t,format:e}){if(!t)return null;const[n,o]=kr(l=>l+1,0),i=lt(()=>new Date(t),[t]),[a,s,c]=lt(()=>{if(!_i(i))return[""+(typeof t=="string"?t:""),"",""];let l;if(e==="micro"){const d=new Date;(d.getTime()-i.getTime())/1e3/Me<=1?l=_l(i):d.getFullYear()===i.getFullYear()?l=sr(Dt.locale,{year:void 0,month:"short",day:"numeric"}).format(i):l=sr(Dt.locale,{dateStyle:"short"}).format(i)}return l||(l=vl(i)),[l,i.toISOString(),i.toLocaleString()]},[i,e,n]);return Q(()=>{if(!_i(i))return;let l,d;function h(){d=requestAnimationFrame(()=>{o(),u()})}function u(){const f=(Date.now()-i.getTime())/1e3;f<tn?l=setTimeout(h,1e4):f<en&&(l=setTimeout(h,6e4))}return u(),()=>{clearTimeout(l),cancelAnimationFrame(d)}},[]),r("time",{datetime:s,title:c,children:a})}function yl(t){const e=N();return r(Gc,{...t,instanceRef:e,itemProps:{onPointerMove:n=>{n.pointerType==="touch"&&e.current?.openMenu?.()},onPointerLeave:n=>{n.pointerType==="touch"&&e.current?.openMenu?.()},...t.itemProps}})}function bl(t,e=[]){!t||typeof t!="function"||Q(()=>{const n=new CloseWatcher;return n.addEventListener("close",t),()=>{n.destroy()}},e)}const wl=window.CloseWatcher?bl:()=>{},El=document.getElementById("modal-container");function yi(){return getComputedStyle(document.documentElement).getPropertyValue("--backdrop-theme-color")}function ar({children:t,onClose:e,onClick:n,class:o,minimized:i}){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 s=window.CloseWatcher,c=Ge("esc",()=>{setTimeout(()=>{e?.()},0)},{enabled:!s&&!!e,keydown:!1,keyup:!0,useKey:!0,ignoreEventWhen:u=>u.metaKey||u.ctrlKey||u.altKey||u.shiftKey},[e]);wl(e,[e]),Q(()=>{const u=document.querySelectorAll(".deck-container");if(i){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,i]);const l=N(),d=N();$e(()=>{if(t&&!i)if(Ha.local.get("theme")){const f=yi();l.current=document.querySelector('meta[name="theme-color"][data-theme-setting="manual"]'),l.current&&(d.current=l.current.content,l.current.content=f)}else{const f=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",m=yi();l.current=document.querySelector(`meta[name="theme-color"][media*="${f}"]`),l.current&&(d.current=l.current.content,l.current.content=m)}else l.current&&d.current&&(l.current.content=d.current);return()=>{l.current&&d.current&&(l.current.content=d.current)}},[t,i]);const h=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:i?0:"-1",inert:i,onFocus:u=>{try{if(u.target===u.currentTarget){const f=a.current?.querySelector('[tabindex="-1"]'),m=!!f&&getComputedStyle(f)?.pointerEvents!=="none";f&&m&&f.focus()}}catch{}},children:t});return io(h,El)}const bi={s:16,m:20,l:24,xl:32,xxl:50,xxxl:64},fn={},yn=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas"),oo=yn.getContext("2d",{willReadFrequently:!0});oo.imageSmoothingEnabled=!1;const Tl=/missing\.png$/;function Al({url:t,staticUrl:e,size:n,alt:o="",squircle:i,...a}){n=bi[n]||n||bi.m;const s=N(),c=Tl.test(t);return r("picture",{ref:s,class:`avatar ${i?"squircle":""} ${fn[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:fn[t]===void 0&&!c?"anonymous":void 0,onError:l=>{l.target.crossOrigin&&(l.target.crossOrigin=null,l.target.src=t)},onLoad:l=>{s.current&&(s.current.dataset.loaded=!0),fn[t]===void 0&&(c||setTimeout(()=>{try{const{width:d,height:h}=l.target;yn.width!==d&&(yn.width=d),yn.height!==h&&(yn.height=h),oo.drawImage(l.target,0,0);const u=oo.getImageData(0,0,d,h),f=u.data.filter((m,p)=>p%4===3&&m<=128).length/(u.data.length/4)>.1;f&&s.current.classList.add("has-alpha"),fn[t]=f,oo.clearRect(0,0,d,h)}catch{fn[t]=!1}},1))}})]})}const pe=Bt(Al);let cr=!1;const kl=new MutationObserver(t=>{t.forEach(e=>{if(e.type==="attributes"){const{dir:n}=e.target;n==="rtl"?cr=!0:cr=!1}})});kl.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});function lr(){return cr}function Cl(){const[t,e]=V({width:null,height:null});return $e(()=>{const n=()=>{e({width:window.innerWidth,height:window.innerHeight})};return n(),window.addEventListener("resize",n,{passive:!0}),()=>{window.removeEventListener("resize",n)}},[]),t}function Is(t){const{containerProps:e,instanceRef:n,align:o}=t,i=Cl(),a=n?.current?n:N(),s=lr()?o==="end"?"start":o==="start"?"end":o:o;return r(qc,{boundingBoxPadding:ks(),repositionFlag:`${i.width}x${i.height}`,unmountOnClose:!0,...t,align:s,instanceRef:a,containerProps:{onClick:c=>{c.target===c.currentTarget&&a.current?.closeMenu?.(),e?.onClick?.(c)},...e}})}function Ro({subMenu:t=!1,confirm:e=!0,confirmLabel:n,menuItemClassName:o,menuFooter:i,menuExtras:a,...s}){const{children:c,onClick:l,...d}=s;return e?r(t?yl:Is,{openTrigger:"clickOnly",direction:"bottom",overflow:"auto",gap:-8,shift:8,menuClassName:"menu-emphasized",...d,menuButton:t?void 0:c,label:t?c:void 0,children:[r(At,{className:o,onClick:l,children:n}),a,i]}):t?r(At,{...s}):l?ja(c,{onClick:l}):c}const Qe=2147483647,ie=36,Or=1,xn=26,Sl=38,xl=700,Ls=72,Ds=128,Ms="-",Il=/^xn--/,Ll=/[^\0-\x7F]/,Dl=/[\x2E\u3002\uFF0E\uFF61]/g,Ml={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Oo=ie-Or,se=Math.floor,$o=String.fromCharCode;function Ee(t){throw new RangeError(Ml[t])}function Pl(t,e){const n=[];let o=t.length;for(;o--;)n[o]=e(t[o]);return n}function Ps(t,e){const n=t.split("@");let o="";n.length>1&&(o=n[0]+"@",t=n[1]),t=t.replace(Dl,".");const i=t.split("."),a=Pl(i,e).join(".");return o+a}function Rs(t){const e=[];let n=0;const o=t.length;for(;n<o;){const i=t.charCodeAt(n++);if(i>=55296&&i<=56319&&n<o){const a=t.charCodeAt(n++);(a&64512)==56320?e.push(((i&1023)<<10)+(a&1023)+65536):(e.push(i),n--)}else e.push(i)}return e}const Rl=t=>String.fromCodePoint(...t),Ol=function(t){return t>=48&&t<58?26+(t-48):t>=65&&t<91?t-65:t>=97&&t<123?t-97:ie},wi=function(t,e){return t+22+75*(t<26)-((e!=0)<<5)},Os=function(t,e,n){let o=0;for(t=n?se(t/xl):t>>1,t+=se(t/e);t>Oo*xn>>1;o+=ie)t=se(t/Oo);return se(o+(Oo+1)*t/(t+Sl))},$s=function(t){const e=[],n=t.length;let o=0,i=Ds,a=Ls,s=t.lastIndexOf(Ms);s<0&&(s=0);for(let c=0;c<s;++c)t.charCodeAt(c)>=128&&Ee("not-basic"),e.push(t.charCodeAt(c));for(let c=s>0?s+1:0;c<n;){const l=o;for(let h=1,u=ie;;u+=ie){c>=n&&Ee("invalid-input");const f=Ol(t.charCodeAt(c++));f>=ie&&Ee("invalid-input"),f>se((Qe-o)/h)&&Ee("overflow"),o+=f*h;const m=u<=a?Or:u>=a+xn?xn:u-a;if(f<m)break;const p=ie-m;h>se(Qe/p)&&Ee("overflow"),h*=p}const d=e.length+1;a=Os(o-l,d,l==0),se(o/d)>Qe-i&&Ee("overflow"),i+=se(o/d),o%=d,e.splice(o++,0,i)}return String.fromCodePoint(...e)},Ns=function(t){const e=[];t=Rs(t);const n=t.length;let o=Ds,i=0,a=Ls;for(const l of t)l<128&&e.push($o(l));const s=e.length;let c=s;for(s&&e.push(Ms);c<n;){let l=Qe;for(const h of t)h>=o&&h<l&&(l=h);const d=c+1;l-o>se((Qe-i)/d)&&Ee("overflow"),i+=(l-o)*d,o=l;for(const h of t)if(h<o&&++i>Qe&&Ee("overflow"),h===o){let u=i;for(let f=ie;;f+=ie){const m=f<=a?Or:f>=a+xn?xn:f-a;if(u<m)break;const p=u-m,g=ie-m;e.push($o(wi(m+p%g,0))),u=se(p/g)}e.push($o(wi(u,0))),a=Os(i,d,c===s),i=0,++c}++i,++o}return e.join("")},$l=function(t){return Ps(t,function(e){return Il.test(e)?$s(e.slice(4).toLowerCase()):e})},Nl=function(t){return Ps(t,function(e){return Ll.test(e)?"xn--"+Ns(e):e})},Fs={version:"2.3.1",ucs2:{decode:Rs,encode:Rl},decode:$s,encode:Ns,toASCII:Nl,toUnicode:$l};function Fl(t){try{return Fs.toUnicode(URL.parse(t).hostname.replace(/^www\./,"").replace(/\/$/,""))}catch{return""}}const ho=Bt(Fl);function ur({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 zl=Bt(t=>new RegExp(`:(${t.join("|")}):`,"g"));function Bl({text:t,emojis:e,staticEmoji:n}){if(!t)return"";if(!e?.length||t.indexOf(":")===-1)return t;const o=zl(e.map(a=>a.shortcode));return t.split(o).map((a,s)=>{const c=e.find(l=>l.shortcode===a);if(c){const{url:l,staticUrl:d}=c;return r(ur,{staticUrl:n?void 0:d,alt:a,url:n&&d||l},a+"-"+s)}return a})}const nn=Bt(Bl),Vl=Bt(t=>{const e={sensitivity:"base"};try{return new Intl.Collator(t||void 0,e)}catch{return new Intl.Collator(void 0,e)}}),Hl=/([^@]+)(@.+)/i,jl=/(\:(\w|\+|\-)+\:)(?=|[\!\.\?]|$)/g,Kl=/\s+/g,Ul=/[^a-z0-9@\.]/gi;function Wl({account:t,instance:e,showAvatar:n,showAcct:o,short:i,external:a,onClick:s}){const{i18n:c}=Yt();if(!t)return null;const{acct:l,avatar:d,avatarStatic:h,id:u,url:f,displayName:m,emojis:p,bot:g,username:v,roles:E}=t,[w,k,T]=l.match(Hl)||[,l];e||(e=An().instance);const y=ho(f),S=v.toLowerCase().trim(),b=(m||"").toLowerCase().trim(),x=b.replace(jl,"").replace(Kl,""),P=x.replace(Ul,""),D=!i&&(S===b||S===x||S===P||Vl(c.locale).compare(S,x)===0)||P===l.toLowerCase();return r("a",{class:`name-text ${o?"show-acct":""} ${i?"short":""}`,href:f,target:a?"_blank":null,title:m?`${m} (${T?"":"@"}${l})`:`${T?"":"@"}${l}`,onClick:C=>{if(!a&&!C.shiftKey){if(C.preventDefault(),C.stopPropagation(),s)return s(C);if(C.metaKey||C.ctrlKey||C.shiftKey||C.which===2){const L=`#/${e}/a/${u}`;window.open(L,"_blank");return}H.showAccount={account:t,instance:e}}},children:[n&&r(F,{children:[r(pe,{url:h||d,squircle:g})," "]}),m&&!i?r(F,{children:[r("b",{dir:"auto",children:r(nn,{text:m,emojis:p,staticEmoji:!0})}),!o&&!D&&r(F,{children:[" ",r("i",{class:"bidi-isolate",children:["@",v]}),E?.map(C=>r(F,{children:[" ",r("span",{class:"tag collapsed",children:[C.name,!!y&&r(F,{children:[" ",r("span",{class:"more-insignificant",children:y})]})]})]}))]})]}):i?r("i",{children:v}):r("b",{children:v}),o&&r(F,{children:[r("br",{}),r("i",{class:"bidi-isolate",children:[T?"":"@",k,!!T&&r("span",{class:"ib",children:T})]}),E?.map(C=>r(F,{children:[" ",r("span",{class:"tag collapsed",children:[C.name,!!y&&r(F,{children:[" ",r("span",{class:"more-insignificant",children:y})]})]})]}))]})]})}const Te=Bt(Wl),Zl="Аҧсшәа",ql="Acèh",Gl="Lëbacoli",Yl="Afár",Xl="Afrikaans",Ql="Shqip",Jl="Dhalur",tu="አማርኛ",eu="العربية",nu="Հայերեն",ou="অসমীয়া",ru="Авар мацӀ",iu="अवधी",su="Aymar aru",au="Azərbaycanca",cu="Basa Bali",lu="بلوچی",uu="Bamanankan",du="Baoulé",hu="Башҡортса",fu="Euskara",mu="Batak Karo",pu="Batak Simalungun",gu="Batak Toba",vu="Беларуская",_u="Ichibemba",yu="বাংলা",bu="Betawi",wu="भोजपुरी",Eu="Bikol",Tu="Bosanski",Au="Brezhoneg",ku="Български",Cu="Буряад",Su="粵語",xu="Català",Iu="Cebuano",Lu="Chamoru",Du="Нохчийн мотт",Mu="Chichewa",Pu="Kapasen Chuuk",Ru="Чӑвашла",Ou="Corsu",$u="Qırımtatarca (Кирилл)",Nu="Hrvatski",Fu="Čeština",zu="Dansk",Bu="ދިވެހި",Vu="Thuɔŋjäŋ",Hu="डोगरी",ju="Dombe",Ku="Nederlands",Uu="Jula",Wu="རྫོང་ཁ",Zu="English",qu="Esperanto",Gu="Eesti",Yu="Eʋegbe",Xu="Føroyskt",Qu="Vosa Vakaviti",Ju="Tagalog",td="Suomi",ed="Fon",nd="Français",od="Frysk",rd="Furlan",id="Fulfulde",sd="Gã",ad="Galego",cd="ქართული",ld="Deutsch",ud="Ελληνικά",dd="Avañe'ẽ",hd="ગુજરાતી",fd="Kreyòl ayisyen",md="Hakha Chin",pd="Hausa",gd="ʻŌlelo Hawaiʻi",vd="עברית",_d="Hiligaynon",yd="हिन्दी",bd="Hmoob",wd="Magyar",Ed="Hunsrik",Td="Iban",Ad="Íslenska",kd="Igbo",Cd="Iloko",Sd="Bahasa Indonesia",xd="ᐃᓄᒃᑎᑐᑦ",Id="Gaeilge",Ld="Italiano",Dd="Patwa",Md="日本語",Pd="Basa Jawa",Rd="Jinghpaw",Od="Kalaallisut",$d="ಕನ್ನಡ",Nd="Kanuri",Fd="Kapampangan",zd="Қазақша",Bd="Khasi",Vd="ភាសាខ្មែរ",Hd="Rukiga",jd="Kikongo",Kd="Kinyarwanda",Ud="Kituba",Wd="Kokborok",Zd="Коми кыв",qd="कोंकणी",Gd="한국어",Yd="Krio",Xd="Kurdî (Kurmancî)",Qd="کوردی (سۆرانی)",Jd="Кыргызча",th="ລາວ",eh="Latgaļu",nh="Latina",oh="Latviešu",rh="Ligure",ih="Limburgs",sh="Lingála",ah="Lietuvių",ch="Lombard",lh="Luganda",uh="Dholuo",dh="Lëtzebuergesch",hh="Македонски",fh="Madhurâ",mh="मैथिली",ph="Makassar",gh="Malagasy",vh="Bahasa Melayu",_h="മലയാളം",yh="Malti",bh="Mam",wh="Gaelg",Eh="Te Reo Māori",Th="मराठी",Ah="Kajin M̧ajeļ",kh="मारवाड़ी",Ch="Kreol Morisien",Sh="Олык марий",xh="Baso Minang",Ih="Mizo ṭawng",Lh="Монгол",Dh="မြန်မာစာ",Mh="Náhuatl",Ph="isiNdebele",Rh="नेपाली",Oh="Norsk",$h="Thok Nath",Nh="Occitan",Fh="ଓଡ଼ିଆ",zh="Afaan Oromoo",Bh="Ирон æвзаг",Vh="Pangasinan",Hh="Papiamentu",jh="پښتو",Kh="فارسی",Uh="Polski",Wh="Português (Brasil)",Zh="ਪੰਜਾਬੀ",qh="Runa Simi",Gh="Qʼeqchiʼ",Yh="Romani čhib",Xh="Română",Qh="Ikirundi",Jh="Русский",tf="Davvisámegiella",ef="Gagana Samoa",nf="Sängö",of="संस्कृतम्",rf="ᱥᱟᱱᱛᱟᱲᱤ",sf="Gàidhlig",af="Sepedi",cf="Српски",lf="Sesotho",uf="Kreol seselwa",df="လိၵ်ႈတႆး",hf="chiShona",ff="Sicilianu",mf="Ślōnskŏ",pf="سنڌي",gf="සිංහල",vf="Slovenčina",_f="Slovenščina",yf="Soomaali",bf="Español",wf="Basa Sunda",Ef="Susu",Tf="Kiswahili",Af="siSwati",kf="Svenska",Cf="Reo Tahiti",Sf="Тоҷикӣ",xf="ⵜⴰⵎⴰⵣⵉⵖⵜ",If="தமிழ்",Lf="Татарча",Df="తెలుగు",Mf="Tetun",Pf="ไทย",Rf="བོད་ཡིག",Of="ትግርኛ",$f="Tiv",Nf="Tok Pisin",Ff="Lea fakatonga",zf="Tshiluba",Bf="Xitsonga",Vf="Setswana",Hf="ತುಳು",jf="chiTumbuka",Kf="Türkçe",Uf="Türkmençe",Wf="Тыва дыл",Zf="Akankasa",qf="Удмурт кыл",Gf="Українська",Yf="اردو",Xf="ئۇيغۇرچە",Qf="Oʻzbekcha",Jf="Tshivenḓa",tm="Vèneto",em="Tiếng Việt",nm="Winaray",om="Cymraeg",rm="Wolof",im="isiXhosa",sm="Саха тыла",am="ייִדיש",cm="Yorùbá",lm="Màaya T'àan",um="Didxazá",dm="isiZulu",hm={ab:Zl,ace:ql,ach:Gl,aa:Yl,af:Xl,sq:Ql,alz:Jl,am:tu,ar:eu,hy:nu,as:ou,av:ru,awa:iu,ay:su,az:au,ban:cu,bal:lu,bm:uu,bci:du,ba:hu,eu:fu,btx:mu,bts:pu,bbc:gu,be:vu,bem:_u,bn:yu,bew:bu,bho:wu,bik:Eu,bs:Tu,br:Au,bg:ku,bua:Cu,yue:Su,ca:xu,ceb:Iu,ch:Lu,ce:Du,ny:Mu,"zh-CN":"简体中文","zh-TW":"繁體中文",chk:Pu,cv:Ru,co:Ou,crh:$u,"crh-Latn":"Qırımtatarca (Latin)",hr:Nu,cs:Fu,da:zu,"fa-AF":"درى",dv:Bu,din:Vu,doi:Hu,dov:ju,nl:Ku,dyu:Uu,dz:Wu,en:Zu,eo:qu,et:Gu,ee:Yu,fo:Xu,fj:Qu,tl:Ju,fi:td,fon:ed,fr:nd,"fr-CA":"Français (Canada)",fy:od,fur:rd,ff:id,gaa:sd,gl:ad,ka:cd,de:ld,el:ud,gn:dd,gu:hd,ht:fd,cnh:md,ha:pd,haw:gd,iw:vd,hil:_d,hi:yd,hmn:bd,hu:wd,hrx:Ed,iba:Td,is:Ad,ig:kd,ilo:Cd,id:Sd,"iu-Latn":"Inuktitut (Latin)",iu:xd,ga:Id,it:Ld,jam:Dd,ja:Md,jw:Pd,kac:Rd,kl:Od,kn:$d,kr:Nd,pam:Fd,kk:zd,kha:Bd,km:Vd,cgg:Hd,kg:jd,rw:Kd,ktu:Ud,trp:Wd,kv:Zd,gom:qd,ko:Gd,kri:Yd,ku:Xd,ckb:Qd,ky:Jd,lo:th,ltg:eh,la:nh,lv:oh,lij:rh,li:ih,ln:sh,lt:ah,lmo:ch,lg:lh,luo:uh,lb:dh,mk:hh,mad:fh,mai:mh,mak:ph,mg:gh,ms:vh,"ms-Arab":"بهاس ملايو",ml:_h,mt:yh,mam:bh,gv:wh,mi:Eh,mr:Th,mh:Ah,mwr:kh,mfe:Ch,chm:Sh,"mni-Mtei":"ꯃꯤꯇꯩꯂꯣꯟ",min:xh,lus:Ih,mn:Lh,my:Dh,nhe:Mh,"ndc-ZW":"Ndau",nr:Ph,new:"नेपाल भाषा",ne:Rh,"bm-Nkoo":"ߒߞߏ",no:Oh,nus:$h,oc:Nh,or:Fh,om:zh,os:Bh,pag:Vh,pap:Hh,ps:jh,fa:Kh,pl:Uh,pt:Wh,"pt-PT":"Português (Portugal)",pa:Zh,"pa-Arab":"پنجابی",qu:qh,kek:Gh,rom:Yh,ro:Xh,rn:Qh,ru:Jh,se:tf,sm:ef,sg:nf,sa:of,"sat-Latn":"Santali (Latin)",sat:rf,gd:sf,nso:af,sr:cf,st:lf,crs:uf,shn:df,sn:hf,scn:ff,szl:mf,sd:pf,si:gf,sk:vf,sl:_f,so:yf,es:bf,su:wf,sus:Ef,sw:Tf,ss:Af,sv:kf,ty:Cf,tg:Sf,"ber-Latn":"Tamazight (Latin)",ber:xf,ta:If,tt:Lf,te:Df,tet:Mf,th:Pf,bo:Rf,ti:Of,tiv:$f,tpi:Nf,to:Ff,lua:zf,ts:Bf,tn:Vf,tcy:Hf,tum:jf,tr:Kf,tk:Uf,tyv:Wf,ak:Zf,udm:qf,uk:Gf,ur:Yf,ug:Xf,uz:Qf,ve:Jf,vec:tm,vi:em,war:nm,cy:om,wo:rm,xh:im,sah:sm,yi:am,yo:cm,yua:lm,zap:um,zu:dm},Un={"zh-YUE":"YUE",zh_HANT:"zh-Hant"},No=Bt(t=>new Intl.DisplayNames(t||void 0,{type:"language"}));function fm(t){let e,n;typeof t=="object"&&({code:t,locale:e,fallback:n}=t);try{const o=No(e||Dt.locale).of(t);if(o!==t)return o;if(!n){const i=No(t).of(t);if(i!==t)return i;const a=hm?.[e];if(a!==t)return a}return n||""}catch{if(Un[t])try{const i=No(Un[e]||e||Dt.locale).of(Un[t]);return i!==Un[t]?i:n||""}catch{}return n||""}}const mn=Bt(fm),mm={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"},pm={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"},gm={},zs={sl:mm,tl:pm,al:gm},vm=Object.entries(zs.tl).map(([t,{name:e}])=>({code:t,name:e})),dr=[...navigator.languages];try{const t=new Intl.DateTimeFormat().resolvedOptions().locale;dr.includes(t)||dr.unshift(t)}catch{}const _m=()=>so(dr,vm.map(t=>t.code.replace("_","-")),"en");function Bs(t=!1){if(t){const{contentTranslationTargetLanguage:e}=H.settings;if(e)return e}return _m()}const Ei=["byte","kilobyte","megabyte","gigabyte","terabyte","petabyte"];function Ov(t){const e=Math.min(Math.floor(Math.log2(t)/10),Ei.length-1),n=t/1024**e;return Dt.number(n,{style:"unit",unit:Ei[e],unitDisplay:"narrow",maximumFractionDigits:0})}function hr(t,e=[]){return t?(!e.length||t.indexOf(":")===-1||e.forEach(n=>{const{shortcode:o,staticUrl:i,url:a}=n;t=t.replace(new RegExp(`:${o}:`,"g"),`<picture><source srcset="${i}" media="(prefers-reduced-motion: reduce)"></source><img class="shortcode-emoji emoji" src="${a}" alt=":${o}:" title="${o}" 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>`)}),t):""}const We=document.createElement("div"),ym=["u-url","mention","hashtag"],bm=/<a/i,wm=/^https?:\/\//i,Em=/^@[^@]+(@[^@]+)?$/,Tm=/^#[^#]+$/,Am=/^```[^]+```$/,km=/^```/,Cm=/```$/,Sm=/`[^`]+`/,xm=/(twitter|x)\.com/i,Im=/@[a-zA-Z0-9_]+@(twitter|x)\.com/,Lm=/(@([a-zA-Z0-9_]+)@(twitter|x)\.com)/g,Dm=/(`[^]+?`)/g;function Mm(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 Pm(t,e={}){if(!t)return"";const{emojis:n,returnDOM:o,postEnhanceDOM:i=()=>{}}=e;let a=t;const s=Mm(a,o),c=bm.test(a),l=a.includes("```");if(c){const h=s.querySelectorAll('a:not([target="_blank"])');for(const f of h)f.setAttribute("target","_blank");const u=s.querySelectorAll("a[class]");for(const f of u)for(const m of f.classList)ym.includes(m)||f.classList.remove(m)}if(c){const h=s.querySelectorAll("a[href]");for(const u of h)wm.test(u.textContent.trim())&&(u.classList.add("has-url-text"),Nm(u))}if(c){const h=s.querySelectorAll("a[href]"),u=[];for(const f of h){const m=f.innerText.trim(),p=f.querySelector("*");if(Em.test(m)){const[g,v,E]=m.split("@");p||(!u.some(([w])=>w===v)||u.some(([w,k])=>w===v&&k===E)?(f.innerHTML=`@<span>${v}</span>`,u.push([v,E])):f.innerHTML=`@<span>${v}@${E}</span>`),f.classList.add("mention")}Tm.test(m)&&(p||(f.innerHTML=`#<span>${m.slice(1)}</span>`),f.classList.add("mention","hashtag"))}}let d;if(a.includes(":")&&n?.length){d=zo(s);for(const h of d){let u=no(h.nodeValue);u=hr(u,n),We.innerHTML=u,h.replaceWith(...We.childNodes)}}if(l){const h=[...s.querySelectorAll("p")].filter(u=>Am.test(u.innerText.trim()));for(const u of h){const f=document.createElement("pre");for(const m of u.querySelectorAll("br"))m.replaceWith(`
`);f.innerHTML=`<code>${u.innerHTML.trim()}</code>`,u.replaceWith(f)}}if(l){const u=[...s.querySelectorAll("p")].filter(f=>km.test(f.innerText));for(const f of u){const m=[f];let p=!1,g=f;for(;g.nextElementSibling;){const v=g.nextElementSibling;if(v&&v.tagName==="P")if(Cm.test(v.innerText)){m.push(v),p=!0;break}else m.push(v);else break;g=v}if(p){const v=document.createElement("pre");for(const w of m)for(const k of w.querySelectorAll("br"))k.replaceWith(`
`);const E=m.map(w=>w.innerHTML).join(`
`);v.innerHTML=`<code tabindex="0">${E}</code>`,f.replaceWith(v);for(const w of m)w.remove()}}}if(a.includes("`")){d=zo(s);for(const h of d){let u=no(h.nodeValue);Sm.test(u)&&(u=u.replaceAll(Dm,"<code>$1</code>")),We.innerHTML=u,h.replaceWith(...We.childNodes)}}if(xm.test(a)){d=zo(s,{rejectFilter:["A"]});for(const h of d){let u=no(h.nodeValue);Im.test(u)&&(u=u.replaceAll(Lm,'<a href="https://twitter.com/$2" rel="nofollow noopener" target="_blank">$1</a>')),We.innerHTML=u,h.replaceWith(...We.childNodes)}}if(a.includes("#")){let h=null;const u=[...s.querySelectorAll("p")].filter((f,m)=>{let p=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 E=v.textContent.trim();if(!E||!E.startsWith("#"))return!1;p++}else return!1}if(p>3||p>1&&h&&m===h+1)return h=m,!0});if(u?.length)for(const f of u)f.classList.add("hashtag-stuffing"),f.title=f.innerText}if(a.includes("<img")){const h=s.querySelectorAll("img");for(let u=0;u<h.length;u++){const f=h[u],m=f.getAttribute("width")||f.naturalWidth,p=f.getAttribute("height")||f.naturalHeight;m&&p&&f.style.setProperty("--original-aspect-ratio",`${m}/${p}`)}}for(const h of s.childNodes)if(h.nodeType===Node.TEXT_NODE&&h.textContent.trim?.()){const u=document.createElement("span");u.textContent=h.textContent,s.replaceChild(u,h)}return i&&queueMicrotask(()=>i(s)),o?s:s.innerHTML}const Vs=Bt(Pm),Rm=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],Om=Object.fromEntries(Rm.map(t=>[t,!0])),$m=/^(https?:\/\/(www\.)?|xmpp:)/,Fo=30;function Nm(t){if(!(!t||t.querySelector?.("*")))try{const e=t.innerText.trim(),n=(e.match($m)||[])[0]||"";if(!n)return;const o=e.slice(n.length,n.length+Fo),i=e.slice(n.length+Fo),a=e.slice(n.length).length>Fo;t.innerHTML=`<span class="invisible">${n}</span><span class=${a?"ellipsis":""}>${o}</span><span class="invisible">${i}</span>`}catch{}}function zo(t,e={}){const n=[],o=Object.assign({},Om,e.rejectFilter?.reduce((s,c)=>(s[c]=!0,s),{})),i=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode(s){return o[s.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let a;for(;a=i.nextNode();)n.push(a);return n}const Fm=window.matchMedia("(hover: hover)").matches;function zm(t){const{mentions:e=[],instance:n,previewMode:o,statusURL:i}=t||{};return a=>{if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.which===2)return;let{target:s}=a;if(s.closest(".shortcode-emoji")){const{naturalWidth:u,naturalHeight:f,width:m,height:p}=s,g=2;if(u>m*g||f>p*g){a.preventDefault(),a.stopPropagation(),H.showMediaModal={mediaAttachments:[{type:"image",url:s.src,description:s.title||s.alt}]};return}}if(s=s.closest("a"),!s||!a.currentTarget.contains(s))return;const{href:c}=s,l=s.previousSibling?.textContent,d=l?.endsWith("@"),h=s.innerText.startsWith("@");if((s.classList.contains("u-url")||s.classList.contains("mention"))&&h||d&&!h){const u=(s.querySelector("span")||s).innerText.trim(),f=u.replace(/^@/,""),m=e.find(p=>p.url===c)||e.find(p=>p.acct===f||p.username===f);if(m){a.preventDefault(),a.stopPropagation(),H.showAccount={account:m.acct,instance:n};return}else if(!/^http/i.test(u)){a.preventDefault(),a.stopPropagation(),H.showAccount={account:c,instance:n};return}}else if(!o){const u=l?.endsWith("#");if(s.classList.contains("hashtag")||u){a.preventDefault(),a.stopPropagation();const f=s.innerText.replace(/^#/,"").trim(),m=n?`#/${n}/t/${f}`:`#/t/${f}`;location.hash=m;return}else if(H.unfurledLinks[c]?.url&&i!==c){a.preventDefault(),a.stopPropagation(),H.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${H.unfurledLinks[c].url}`;return}}try{const f=URL.parse(c).hostname.replace(/^www\./i,"");if(!s.innerText.toLowerCase().includes(f.toLowerCase())&&!Fm){a.preventDefault(),a.stopPropagation();const p=s.innerText.trim();H.showOpenLink={url:c,linkText:p}}}catch{}}}function fe(t){try{return Dt.number(t,{notation:"compact",roundingMode:"floor"})}catch{return t}}const Bm={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2","@gotosocial/list-exclusive":">=0.17","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3","@mastodon/trending-link-posts":"~4.3 || >=4.3","@mastodon/annual-report":"~4.4 || >=4.4","@mastodon/endorsements":"~4.4 || >=4.4"},Bo=/pixelfed/i,re=/^(?!.*pixelfed).*$/i,Vm=/pleroma/i,Hm=/akkoma/i;const Ti={"@mastodon/lists":re,"@mastodon/filters":re,"@mastodon/mentions":re,"@mastodon/trending-hashtags":re,"@mastodon/trending-links":re,"@mastodon/post-bookmark":re,"@mastodon/post-edit":re,"@mastodon/profile-edit":re,"@mastodon/profile-private-note":re,"@mastodon/pinned-posts":re,"@pixelfed/trending":Bo,"@pixelfed/home-include-reblogs":Bo,"@pixelfed/global-feed":Bo,"@pleroma/local-visibility-post":Vm,"@akkoma/local-visibility-post":Hm},Wn={};function Zn(t){try{let{version:e,domain:n}=Ka(),o=Ua()?.software?.name||"mastodon";o==="hometown"&&(o="mastodon");const i=`${n}-${t}`;if(Wn[i])return Wn[i];if(Ti[t])return Wn[i]=Ti[t].test(e);const a=Bm[t];if(!a)return!1;const c=t.match(/^@([a-z]+)\//)[1]===o.toLowerCase();return Wn[i]=c&&Wa(e,a,{includePrerelease:!0,loose:!0})}catch{return!1}}function $v({skeleton:t,account:e,avatarSize:n="xl",useAvatarStatic:o=!1,instance:i,external:a,internal:s,onClick:c,showActivity:l=!1,showStats:d=!1,accountInstance:h,hideDisplayName:u=!1,relationship:f={},excludeRelationshipAttrs:m=[]}){const{_:p}=Yt();if(t)return r("div",{class:"account-block skeleton",children:[r(pe,{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:E,avatarStatic:w,displayName:k,username:T,emojis:y,url:S,statusesCount:b,lastStatusAt:x,bot:P,fields:D,note:C,group:L,followersCount:O,createdAt:I,locked:z,roles:B}=e;let[bt,G,ut]=v.match(/([^@]+)(@.+)/i)||[,v];h&&(ut=`@${h}`);const nt=ho(S),vt=D?.find(et=>!!et.verifiedAt&&!!et.value),ot={};for(const et in f)m.includes(et)||(ot[et]=f[et]);const rt=ot.following||ot.followedBy||ot.requested;return r("a",{class:"account-block",href:S,target:a?"_blank":null,title:ut?v:`@${v}`,onClick:et=>{if(!a){if(et.preventDefault(),c)return c(et);s?location.hash=`/${i}/a/${g}`:H.showAccount={account:e,instance:i}}},children:[r("div",{class:"avatar-container",children:r(pe,{url:o?w:E||w,staticUrl:o?void 0:w,size:n,squircle:P})}),r("span",{class:"account-block-content",children:[!u&&r(F,{children:k?r("b",{children:r(nn,{text:k,emojis:y})}):r("b",{children:T})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[ut?"":"@",G,r("wbr",{}),ut,z&&r(F,{children:[" ",r(M,{icon:"lock",size:"s",alt:p({id:"G2fuEb"})})]})]}),B?.map(et=>r(F,{children:[" ",r("span",{class:"tag collapsed",children:[et.name,!!nt&&r(F,{children:[" ",r("span",{class:"more-insignificant",children:nt})]})]})]})),l&&r("div",{class:"account-block-stats",children:[r(R,{id:"ajzDof",values:{0:fe(b)}}),!!x&&r(F,{children:[" ","·"," ",r(R,{id:"f8bJ3C",values:{0:Sn(x,{hideTime:!0})}})]})]}),d&&r("div",{class:"account-block-stats",children:[P&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"bot"})," ",r(R,{id:"9Vdq+j"})]})}),!!L&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"group"})," ",r(R,{id:"L8fEEm"})]})}),rt&&r("div",{class:"shazam-container-horizontal",children:r("div",{class:"shazam-container-inner",children:ot.following&&ot.followedBy?r("span",{class:"tag minimal",children:r(R,{id:"7oRLbi"})}):ot.requested?r("span",{class:"tag minimal",children:r(R,{id:"Yx0Ud8"})}):ot.following?r("span",{class:"tag minimal",children:r(R,{id:"y6sq5j"})}):ot.followedBy?r("span",{class:"tag minimal",children:r(R,{id:"p3UO/y"})}):null})},f.id),!!O&&r("span",{class:"ib",children:r(R,{id:"Mn1E9C",values:{followersCount:O}})}),!!vt&&r("span",{class:"verified-field",children:[r(M,{icon:"check-circle",size:"s",alt:p({id:"QDEWii"})})," ",r("span",{dangerouslySetInnerHTML:{__html:Vs(vt.value,{emojis:y})}})]}),!P&&!L&&!rt&&!O&&!vt&&!!I&&r("span",{class:"created-at",children:r(R,{id:"PCcEFZ",values:{0:Sn(I,{hideTime:!0})},components:{0:r("time",{datetime:I})}})})]})]})]})}async function Nv(t,e={}){if(!t?.length)return;const{masto:n}=An(),o=Cr(),i=t.reduce((a,s)=>(!a.includes(s.id)&&!e[s.id]&&s.id!==o&&a.push(s.id),a),[]);if(!i.length)return null;try{return(await n.v1.accounts.relationships.fetch({id:i})).reduce((c,l)=>(c[l.id]=l,c),{})}catch{return null}}function Fv(t,e){return()=>Dt.number(t,{style:"unit",unit:e,unitDisplay:"long"})}const jm=Object.prototype.toString,Km=t=>jm.call(t)==="[object Error]",Um=new Set(["network error","Failed to fetch","NetworkError when attempting to fetch resource.","The Internet connection appears to be offline.","Load failed","Network request failed","fetch failed","terminated"]);function Wm(t){return t&&Km(t)&&t.name==="TypeError"&&typeof t.message=="string"?t.message==="Load failed"?t.stack===void 0:Um.has(t.message):!1}function Zm(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 qn(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 qm extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name="AbortError",this.message=e}}const Gm=(t,e,n)=>{const o=n.retries-(e-1);return Object.freeze({error:t,attemptNumber:e,retriesLeft:o})};function Ym(t,e){const n=e.randomize?Math.random()+1:1;let o=Math.round(n*Math.max(e.minTimeout,1)*e.factor**(t-1));return o=Math.min(o,e.maxTimeout),o}async function Xm(t,e,n,o,i){let a=t;if(a instanceof Error||(a=new TypeError(`Non-error was thrown: "${a}". You should only throw errors.`)),a instanceof qm)throw a.originalError;if(a instanceof TypeError&&!Wm(a))throw a;const s=Gm(a,e,n);await n.onFailedAttempt(s);const c=Date.now();if(c-o>=i||e>=n.retries+1||!await n.shouldRetry(s))throw a;const l=Ym(e,n),d=i-(c-o);if(d<=0)throw a;const h=Math.min(l,d);h>0&&await new Promise((u,f)=>{const m=()=>{clearTimeout(p),n.signal?.removeEventListener("abort",m),f(n.signal.reason)},p=setTimeout(()=>{n.signal?.removeEventListener("abort",m),u()},h);n.unref&&p.unref?.(),n.signal?.addEventListener("abort",m,{once:!0})}),n.signal?.throwIfAborted()}async function Qm(t,e={}){if(e={...e},Zm(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.randomize??=!1,e.onFailedAttempt??=()=>{},e.shouldRetry??=()=>!0,qn("factor",e.factor,{min:0,allowInfinity:!1}),qn("minTimeout",e.minTimeout,{min:0,allowInfinity:!1}),qn("maxTimeout",e.maxTimeout,{min:0,allowInfinity:!0});const n=e.maxRetryTime??Number.POSITIVE_INFINITY;qn("maxRetryTime",n,{min:0,allowInfinity:!0}),e.factor>0||(e.factor=1),e.signal?.throwIfAborted();let o=0;const i=Date.now(),a=n;for(;o<e.retries+1;){o++;try{e.signal?.throwIfAborted();const s=await t(o);return e.signal?.throwIfAborted(),s}catch(s){await Xm(s,o,e,i,a)}}throw new Error("Retry attempts exhausted without throwing an error.")}const Hs="LanguageDetector"in self,Jm=Hs&&"Translator"in self;let Oe;Hs&&(async()=>{try{const t=await LanguageDetector.availability();if(t==="unavailable")return;t==="available"?Oe=await LanguageDetector.create():(Oe=await LanguageDetector.create({monitor(e){e.addEventListener("downloadprogress",n=>{})}}),await Oe.ready)}catch{}})();const tp=async(t,e,n)=>{let o;const i=e;if(e==="auto"){if(!Oe?.detect)return{error:"No language detector"};try{e=(await Oe.detect(t))[0].detectedLanguage,o=e}catch(s){return{error:s}}}const a=`💬 BROWSER TRANSLATE ${t}`;console.groupCollapsed(a);try{const s=await Translator.availability({sourceLanguage:e,targetLanguage:n});if(s==="unavailable")return console.groupEnd(a),{error:`Unsupported language pair: ${e} -> ${n}`};let c;s==="available"?c=await Translator.create({sourceLanguage:e,targetLanguage:n}):(c=await Translator.create({sourceLanguage:e,targetLanguage:n,monitor(d){d.addEventListener("downloadprogress",h=>{})}}),await c.ready);const l=await c.translate(t);return console.groupEnd(a),{content:l,detectedSourceLanguage:o,provider:"browser"}}catch(s){return console.groupEnd(a),{error:s}}};var ep=Object.defineProperty,np=(t,e,n)=>e in t?ep(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gn=(t,e,n)=>np(t,typeof e!="symbol"?e+"":e,n),fr=new Map,Yn=new WeakMap,Ai=0,op=void 0;function rp(t){return t?(Yn.has(t)||(Ai+=1,Yn.set(t,Ai.toString())),Yn.get(t)):"0"}function ip(t){return Object.keys(t).sort().filter(e=>t[e]!==void 0).map(e=>`${e}_${e==="root"?rp(t.root):t[e]}`).toString()}function sp(t){const e=ip(t);let n=fr.get(e);if(!n){const o=new Map;let i;const a=new IntersectionObserver(s=>{s.forEach(c=>{var l;const d=c.isIntersecting&&i.some(h=>c.intersectionRatio>=h);t.trackVisibility&&typeof c.isVisible>"u"&&(c.isVisible=d),(l=o.get(c.target))==null||l.forEach(h=>{h(d,c)})})},t);i=a.thresholds||(Array.isArray(t.threshold)?t.threshold:[t.threshold||0]),n={id:e,observer:a,elements:o},fr.set(e,n)}return n}function js(t,e,n={},o=op){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:i,observer:a,elements:s}=sp(n),c=s.get(t)||[];return s.has(t)||s.set(t,c),c.push(e),a.observe(t),function(){c.splice(c.indexOf(e),1),c.length===0&&(s.delete(t),a.unobserve(t)),s.size===0&&(a.disconnect(),fr.delete(i))}}function ap(t){return typeof t.children!="function"}var zv=class extends ts{constructor(t){super(t),Gn(this,"node",null),Gn(this,"_unobserveCb",null),Gn(this,"handleNode",e=>{this.node&&(this.unobserve(),!e&&!this.props.triggerOnce&&!this.props.skip&&this.setState({inView:!!this.props.initialInView,entry:void 0})),this.node=e||null,this.observeNode()}),Gn(this,"handleChange",(e,n)=>{e&&this.props.triggerOnce&&this.unobserve(),ap(this.props)||this.setState({inView:e,entry:n}),this.props.onChange&&this.props.onChange(e,n)}),this.state={inView:!!t.initialInView,entry:void 0}}componentDidMount(){this.unobserve(),this.observeNode()}componentDidUpdate(t){(t.rootMargin!==this.props.rootMargin||t.root!==this.props.root||t.threshold!==this.props.threshold||t.skip!==this.props.skip||t.trackVisibility!==this.props.trackVisibility||t.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())}componentWillUnmount(){this.unobserve()}observeNode(){if(!this.node||this.props.skip)return;const{threshold:t,root:e,rootMargin:n,trackVisibility:o,delay:i,fallbackInView:a}=this.props;this._unobserveCb=js(this.node,this.handleChange,{threshold:t,root:e,rootMargin:n,trackVisibility:o,delay:i},a)}unobserve(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)}render(){const{children:t}=this.props;if(typeof t=="function"){const{inView:m,entry:p}=this.state;return t({inView:m,entry:p,ref:this.handleNode})}const{as:e,triggerOnce:n,threshold:o,root:i,rootMargin:a,onChange:s,skip:c,trackVisibility:l,delay:d,initialInView:h,fallbackInView:u,...f}=this.props;return Za(e||"div",{ref:this.handleNode,...f},t)}};function cp({threshold:t,delay:e,trackVisibility:n,rootMargin:o,root:i,triggerOnce:a,skip:s,initialInView:c,fallbackInView:l,onChange:d}={}){var h;const[u,f]=V(null),m=N(d),[p,g]=V({inView:!!c,entry:void 0});m.current=d,Q(()=>{if(s||!u)return;let k;return k=js(u,(T,y)=>{g({inView:T,entry:y}),m.current&&m.current(T,y),y.isIntersecting&&a&&k&&(k(),k=void 0)},{root:i,rootMargin:o,threshold:t,trackVisibility:n,delay:e},l),()=>{k&&k()}},[Array.isArray(t)?t.toString():t,u,i,o,a,s,n,l,e]);const v=(h=p.entry)==null?void 0:h.target,E=N(void 0);!u&&v&&!a&&!s&&E.current!==v&&(E.current=v,g({inView:!!c,entry:void 0}));const w=[f,p.inView,p.entry];return w.ref=w[0],w.inView=w[1],w.entry=w[2],w}const ki=48,Vo={};function Ks({id:t,children:e}){const n=N(),o=!!Vo[t],[i,a]=V(!1),[s,c]=V(o||!1),{ref:l}=cp({root:null,rootMargin:`-${ki}px 0px 0px 0px`,trackVisibility:!0,delay:1e3,onChange:d=>{d&&(a(!0),t&&(Vo[t]=!0))},triggerOnce:!0,skip:s||i});return Q(()=>{if(!n.current)return;const d=n.current.getBoundingClientRect();d.bottom>ki&&(d.top<window.innerHeight?a(!0):c(!0),t&&(Vo[t]=!0))},[]),s?e:r("div",{ref:n,class:"shazam-container no-animation",hidden:!i,children:r("div",{ref:l,class:"shazam-container-inner",children:e})})}const lp={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"},up=Object.entries(zs.sl).map(([t,e])=>({code:t,name:e})),{PHANPY_TRANSLANG_INSTANCES:Ci}=lp,mr=Ci?Ci.split(/\s+/):[],Us=es({limit:1,interval:2e3}),Ws=1e3*60*60;let Ho=0;function dp(t,e,n){return Qm(()=>{let i=mr[Ho];const a=t.length>2e3;let s;return a?s=fetch(`https://${i}/api/v1/translate`,{method:"POST",priority:"low",referrerPolicy:"no-referrer",headers:{"Content-Type":"application/json"},body:JSON.stringify({sl:e,tl:n,text:t})}):s=fetch(`https://${i}/api/v1/translate?sl=${encodeURIComponent(e)}&tl=${encodeURIComponent(n)}&text=${encodeURIComponent(t)}`,{priority:"low",referrerPolicy:"no-referrer"}),s.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:i=>{Ho=(Ho+1)%mr.length}})}const Zs=po(dp,{maxAge:Ws}),hp=po(Us(Zs),{maxAge:Ws}),fp=Us(tp);function mp({forceTranslate:t,sourceLanguage:e,onTranslate:n,text:o="",mini:i,autoDetected:a}){const{_:s}=Yt(),c=Bs(!0),[l,d]=V("default"),[h,u]=V(null),[f,m]=V(null),[p,g]=V(null),v=N(),E=e?mn(e):null,w=mn(c),k=N("auto");n||(n=async(...y)=>{if(Jm){const S=await fp(...y);if(S&&!S.error)return S}return i?await hp(...y):await Zs(...y)});const T=async()=>{d("loading");try{const{content:y,detectedSourceLanguage:S,provider:b,error:x,...P}=await n(o,k.current,c);if(y){if(S){const D=mn(S);g(D)}if(b==="translang"){const D=P?.pronunciation;D&&u(D)}m(y),d("default"),!i&&y.trim()!==o.trim()&&(v.current.open=!0,v.current.scrollIntoView({behavior:"smooth",block:"nearest"}))}else d("error")}catch{d("error")}};return Q(()=>{t&&T()},[t]),i?f&&f.trim()!==o.trim()&&p!==w?r(Ks,{children:r("div",{class:"status-translation-block-mini",children:[r(M,{icon:"translate",alt:s({id:"zVJKbG",values:{sourceLangText:E}})}),r("output",{lang:c,dir:"auto",title:h||"",children:f})]})}):null:r("div",{class:"status-translation-block",onClick:y=>{y.preventDefault()},children:r("details",{ref:v,children:[r("summary",{children:r("button",{type:"button",onClick:async y=>{y.preventDefault(),y.stopPropagation(),v.current.open=!v.current.open,l!=="loading"&&(f||T())},children:[r(M,{icon:"translate"})," ",r("span",{children:s(l==="loading"?{id:"Zxkt/v"}:e&&E&&!p?a?{id:"R20Yf9",values:{sourceLangText:E}}:{id:"h8zDAI",values:{sourceLangText:E}}:{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:y=>{k.current=y.target.value,T()},children:up.map(y=>{const S=mn({code:y.code,fallback:y.name}),b=mn({code:y.code,locale:y.code}),x=b&&S!==b;return r("option",{value:y.code,children:y.code==="auto"?s({id:"Bze3gr",values:{0:p??"…"}}):x?`${b} - ${S}`:S})})})," ",r("span",{children:["→ ",w]}),r(ns,{abrupt:!0,hidden:l!=="loading"})]}),l==="error"?r("p",{class:"ui-state",children:r(R,{id:"m5LihO"})}):!!f&&r(F,{children:[r("output",{class:"translated-content",lang:c,dir:"auto",children:f}),!!h&&r("output",{class:"translated-pronunciation-content",tabIndex:-1,onClick:y=>{y.target.classList.toggle("expand")},children:h})]})]})]})})}const pp=mr?.length?mp:()=>null;function ve(t){return new Promise((e,n)=>{t.oncomplete=t.onsuccess=()=>e(t.result),t.onabort=t.onerror=()=>n(t.error)})}function qs(t,e){let n;const o=()=>{if(n)return n;const i=indexedDB.open(t);return i.onupgradeneeded=()=>i.result.createObjectStore(e),n=ve(i),n.then(a=>{a.onclose=()=>n=void 0},()=>{}),n};return(i,a)=>o().then(s=>a(s.transaction(e,i).objectStore(e)))}let jo;function Ne(){return jo||(jo=qs("keyval-store","keyval")),jo}function gp(t,e=Ne()){return e("readonly",n=>ve(n.get(t)))}function vp(t,e,n=Ne()){return n("readwrite",o=>(o.put(e,t),ve(o.transaction)))}function _p(t,e=Ne()){return e("readonly",n=>Promise.all(t.map(o=>ve(n.get(o)))))}function yp(t,e=Ne()){return e("readwrite",n=>(n.delete(t),ve(n.transaction)))}function bp(t,e=Ne()){return e("readwrite",n=>(t.forEach(o=>n.delete(o)),ve(n.transaction)))}function wp(t=Ne()){return t("readwrite",e=>(e.clear(),ve(e.transaction)))}function Ep(t,e){return t.openCursor().onsuccess=function(){this.result&&(e(this.result),this.result.continue())},ve(t.transaction)}function Tp(t=Ne()){return t("readonly",e=>{if(e.getAllKeys)return ve(e.getAllKeys());const n=[];return Ep(e,o=>n.push(o.key)).then(()=>n)})}function Si(t,e){const n=qs(t,e);return{set:(o,i)=>vp(o,i,n),get:o=>gp(o,n),getMany:o=>_p(o,n),del:o=>yp(o,n),delMany:o=>bp(o,n),clear:()=>wp(n),keys:()=>Tp(n)}}const Bv={drafts:Si("drafts-db","drafts-store"),catchup:Si("catchup-db","catchup-store")},Gs=Jt({}),Ap=!!document.startViewTransition;function Vv({children:t,statusID:e}){const n=N([]),[o,i]=V(!1),[a,s]=V(0);function c(m){m!==a&&(Ap?document.startViewTransition(()=>{s(m)}):s(m))}async function l(){const{masto:m}=An(),p=await m.v1.statuses.$select(e).history.list();p.sort((g,v)=>Date.parse(v.createdAt)-Date.parse(g.createdAt)),n.current=p}async function d(){try{await l(),i(!0),c(0)}catch{i(!1)}}function h(){n.current=[],i(!1),c(0)}function u(){c(m=>Math.min(m+1,n.current.length-1))}function f(){c(m=>Math.max(m-1,0))}return r(Gs.Provider,{value:{editHistoryRef:n,initEditHistory:d,exitEditHistory:h,editHistoryMode:o,editedAtIndex:a,prevEditedAt:u,nextEditedAt:f},children:t})}function kp(){return xt(Gs)}const $r=Jt();function Cp(t,e){if(!t?.length)return!1;const n=t.filter(s=>{const{filter:c}=s,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(s=>s.filter.filterAction==="hide"))return{action:"hide"};if(n.every(s=>s.filter.filterAction==="blur")){const s=n.map(c=>c.filter.title);return{action:"blur",titles:s,titlesStr:s.join(" • ")}}if(n.some(s=>!!s.filter.filterAction)){const s=n.map(c=>c.filter.title);return{action:"warn",titles:s,titlesStr:s.join(" • ")}}return!1}const yo=Bt(Cp);function Sp(t,e,n){const{filtered:o}=t;if(!o?.length||n&&t.account?.id===n)return!0;const a=yo(o,e);return a?a.action!=="hide":!0}function Hv(t,e){if(!t?.length)return[];if(!e)return t;const n=Cr();return t.filter(o=>Sp(o,e,n))}const Ko=document.createElement("div");function Uo(t){return t?(Ko.innerHTML=t,Ko.querySelectorAll(".invisible").forEach(e=>{e.remove()}),Ko.innerText.length):0}const pr="speechSynthesis"in window;function xp(t,e){if(pr)try{speechSynthesis.speaking&&speechSynthesis.cancel();const n=new SpeechSynthesisUtterance(t);e&&(n.lang=e),speechSynthesis.speak(n)}catch(n){alert(n)}}function Ip(t,e,n,o){var i=this,a=N(null),s=N(0),c=N(0),l=N(null),d=N([]),h=N(),u=N(),f=N(t),m=N(!0);f.current=t;var p=typeof window<"u",g=!e&&e!==0&&p;if(typeof t!="function")throw new TypeError("Expected a function");e=+e||0;var v=!!(n=n||{}).leading,E=!("trailing"in n)||!!n.trailing,w="maxWait"in n,k="debounceOnServer"in n&&!!n.debounceOnServer,T=w?Math.max(+n.maxWait||0,e):null;Q(function(){return m.current=!0,function(){m.current=!1}},[]);var y=lt(function(){var S=function(O){var I=d.current,z=h.current;return d.current=h.current=null,s.current=O,c.current=c.current||O,u.current=f.current.apply(z,I)},b=function(O,I){g&&cancelAnimationFrame(l.current),l.current=g?requestAnimationFrame(O):setTimeout(O,I)},x=function(O){if(!m.current)return!1;var I=O-a.current;return!a.current||I>=e||I<0||w&&O-s.current>=T},P=function(O){return l.current=null,E&&d.current?S(O):(d.current=h.current=null,u.current)},D=function O(){var I=Date.now();if(v&&c.current===s.current&&C(),x(I))return P(I);if(m.current){var z=e-(I-a.current),B=w?Math.min(z,T-(I-s.current)):z;b(O,B)}},C=function(){o&&o({})},L=function(){if(p||k){var O=Date.now(),I=x(O);if(d.current=[].slice.call(arguments),h.current=i,a.current=O,I){if(!l.current&&m.current)return s.current=a.current,b(D,e),v?S(a.current):u.current;if(w)return b(D,e),S(a.current)}return l.current||b(D,e),u.current}};return L.cancel=function(){var O=l.current;O&&(g?cancelAnimationFrame(l.current):clearTimeout(l.current)),s.current=0,d.current=a.current=h.current=l.current=null,O&&o&&o({})},L.isPending=function(){return!!l.current},L.flush=function(){return l.current?P(Date.now()):u.current},L},[v,w,e,T,E,g,p,k,o]);return y}function Lp(t,e,n){var o=n===void 0?{}:n,i=o.leading,a=o.trailing;return Ip(t,e,{maxWait:e,leading:i===void 0||i,trailing:a===void 0||a})}function Dp(t,e){var n=N(null),o=N(null);o.current=e;var i=N(null);Q(function(){a()});var a=Et(function(){var s=i.current,c=o.current,l=s||(c?c instanceof Element?c:c.current:null);n.current&&n.current.element===l&&n.current.subscriber===t||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:t,cleanup:l?t(l):void 0})},[t]);return Q(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),Et(function(s){i.current=s,a()},[a])}function xi(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 Mp(t){t===void 0&&(t={});var e=t.onResize,n=N(void 0);n.current=e;var o=t.round||Math.round,i=N(),a=V({width:void 0,height:void 0}),s=a[0],c=a[1],l=N(!1);Q(function(){return l.current=!1,function(){l.current=!0}},[]);var d=N({width:void 0,height:void 0}),h=Dp(Et(function(u){return(!i.current||i.current.box!==t.box||i.current.round!==o)&&(i.current={box:t.box,round:o,instance:new ResizeObserver(function(f){var m=f[0],p=t.box==="border-box"?"borderBoxSize":t.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=xi(m,p,"inlineSize"),v=xi(m,p,"blockSize"),E=g?o(g):void 0,w=v?o(v):void 0;if(d.current.width!==E||d.current.height!==w){var k={width:E,height:w};d.current.width=E,d.current.height=w,n.current?n.current(k):l.current||c(k)}})}),i.current.instance.observe(u,{box:t.box}),function(){i.current&&i.current.instance.unobserve(u)}},[t.box,o]),t.ref);return lt(function(){return{ref:h,width:s.width,height:s.height}},[h,s.width,s.height])}function bn({className:t="truncated"}={}){const e=N(),n=Lp(({height:o})=>{if(e.current){const{scrollHeight:i}=e.current;let a=i>o;if(a){const{height:s,maxHeight:c}=getComputedStyle(e.current),l=parseInt(c||s,10);a=i>l}e.current.classList.toggle(t,a)}},300);return Mp({ref:e,box:"border-box",onResize:n}),e}const wn={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"},Re={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"pPYeIN"},private:{id:"x5LEuB"},direct:{id:"IV4QaU"}},Pp=["\\\\\\[[\\s\\S]*?\\\\\\]","\\\\\\([\\s\\S]*?\\\\\\)"],Ii=new RegExp(Pp.join("|"),"g");function Rp(t){const e=["\\\\\\[","\\\\\\("],n=new RegExp(`(${e.join("|")})`),o=document.createTreeWalker(t,NodeFilter.SHOW_TEXT),i=[];let a;for(;a=o.nextNode();)i.push(a);for(const s of i){const c=s.textContent,l=c.match(n);if(!l)continue;const h=l[0]==="\\["?"\\]":"\\)",u=[s];let f=s,m=!1,p=c;if(c.includes(h))m=!0;else for(;f.nextSibling&&!m;){const g=f.nextSibling;if(g.nodeType===Node.TEXT_NODE)u.push(g),p+=g.textContent,g.textContent.includes(h)&&(m=!0);else if(g.nodeType===Node.ELEMENT_NODE&&g.tagName==="BR")u.push(g),p+=`
`;else break;f=g}if(m&&u.length>1){s.textContent=p;for(let g=1;g<u.length;g++)u[g].remove()}}}const Op=({content:t,contentRef:e,onRevert:n})=>{if(Ii.lastIndex=0,!Ii.test(t))return null;const{_:i}=Yt(),[a,s]=V(!1),c=Et(async l=>{if(l.preventDefault(),l.stopPropagation(),a)s(!1),n();else try{const d=window.temml||(window.temml=(await A(async()=>{const{default:m}=await import("./temml-D21kwrgi.js");return{default:m}},[],import.meta.url))?.default);Rp(e.current);const h=e.current.innerHTML;d.renderMathInElement(e.current,{fences:"(",annotate:!0,throwOnError:!0,errorCallback:m=>{}});const u=e.current.querySelector("math.tml-display"),f=e.current.innerHTML!==h;u&&f?s(!0):(kt(i({id:"HBIZeo"})),s(!1),n())}catch{}},[a]);return r("div",{class:"math-block",children:[r(M,{icon:"formula",size:"s"})," ",r("span",{children:i({id:"/nf2x7"})})," ",r("button",{type:"button",class:"light small",onClick:c,children:i(a?{id:"AJqQb+"}:{id:"dP6iYK"})})]})},Ys=new Uint8Array(128);for(let t=0;t<83;t++)Ys["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(t)]=t;const ro=(t,e,n)=>{let o=0;for(;e<n;)o*=83,o+=Ys[t.charCodeAt(e++)];return o},Xs=Math.pow,In=Math.PI,$p=In*2,Qs=3294.6,Js=269.025,Np=t=>t>10.31475?Xs(t/Js+.052132,2.4):t/Qs,Wo=t=>~~(t>1227e-8?Js*Xs(t,.416666)-13.025:t*Qs+1),En=t=>(t<0?-1:1)*t*t,Li=t=>{for(t+=In/2;t>In;)t-=$p;const e=1.27323954*t-.405284735*En(t);return .225*(En(e)-e)+e};function Nr(t){const e=ro(t,2,6);return[e>>16,e>>8&255,e&255]}function Fp(t,e,n,o){const i=ro(t,0,1),a=i%9+1,s=~~(i/9)+1,c=a*s;let l=0,d=0,h=0,u=0,f=0,m=0,p=0,g=0,v=0,E=0,w=0,k=0;const T=(ro(t,1,2)+1)/13446*(o|1),y=new Float64Array(c*3),S=Nr(t);for(l=0;l<3;l++)y[l]=Np(S[l]);for(l=1;l<c;l++)k=ro(t,4+l*2,6+l*2),y[l*3]=En(~~(k/361)-9)*T,y[l*3+1]=En(~~(k/19)%19-9)*T,y[l*3+2]=En(k%19-9)*T;const b=new Float64Array(s*n),x=new Float64Array(a*e);for(d=0;d<s;d++)for(u=0;u<n;u++)b[d*n+u]=Li(In*u*d/n);for(l=0;l<a;l++)for(h=0;h<e;h++)x[l*e+h]=Li(In*h*l/e);const P=e*4,D=new Uint8ClampedArray(P*n);for(u=0;u<n;u++)for(h=0;h<e;h++){for(f=m=p=0,d=0;d<s;d++)for(v=b[d*n+u],l=0;l<a;l++)g=x[l*e+h]*v,E=(l+d*a)*3,f+=y[E]*g,m+=y[E+1]*g,p+=y[E+2]*g;w=4*h+u*P,D[w]=Wo(f),D[w+1]=Wo(m),D[w+2]=Wo(p),D[w+3]=255}return D}var ta="kvfysmfp",ea="ufhsfnkm",zp=".".concat(ta,"{overflow:hidden;touch-action:none}.").concat(ea,"{transform-origin: 0 0}"),Bp=typeof window>"u",Vp=function(){return!Bp&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Hp=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 jp=Math.min,Kp=Math.max;function Di(t){var e=t.containerDimension,n=t.childDimension,o=t.padding,i=t.centerContained,a=n-e;return a+2*o<=0&&i?[a/2,a/2]:[jp(a+o,0)-o,Kp(0,a+o)]}var Mi=function(t,e){return e?"".concat(t," ").concat(e):t},Xn=Math.abs,Up=Math.min,Wp=Math.sqrt,na=typeof window>"u",Zp=na?!1:/(Mac)/i.test(navigator.platform),Ze=function(t){return t==="drag"},pn=function(t){return t==="zoom"},qp=function(t){return Zp&&t.ctrlKey},gn=function(t){t.stopPropagation(),t.preventDefault()},Pi=function(t,e){var n=t.x-e.x,o=t.y-e.y;return Wp(n*n+o*o)},Gp=function(t,e){var n=Pi(t[0],t[1]),o=Pi(e[0],e[1]);return o/n},Yp=function(t,e){return t>e-.01&&t<e+.01},Xp=function(t){return-Math.cos(t*Math.PI)/2+.5},Qp=function(t){return{x:t.pageX,y:t.pageY}},Qn=function(t){return Array.from(t).map(Qp)},Ri=function(t,e){return t+e},Jp=function(t){return{x:t.map(function(e){var n=e.x;return n}).reduce(Ri,0)/t.length,y:t.map(function(e){var n=e.y;return n}).reduce(Ri,0)/t.length}},Zo=function(t,e,n){return n<t?t:n>e?e:n},tg=function(t){return!(t.ctrlKey||t.metaKey)},eg=function(t){if(t){var e=t.offsetWidth,n=t.offsetHeight;if(e&&n)return{width:e,height:n};var o=getComputedStyle(t),i=parseFloat(o.width),a=parseFloat(o.height);if(a&&i)return{width:i,height:a}}return{width:0,height:0}},ng=function(t,e){return{x:e.x-t.x,y:e.y-t.y}},og=function(t,e){return t.x===e.x&&t.y===e.y},De=function(){},Jn={x:0,y:0},Oi=function(t){qa(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=Ot({},Jn),n._interaction=null,n._isDoubleTap=!1,n._isOffsetsSet=!1,n._lastDragPosition=null,n._lastScale=1,n._lastTouchStart=0,n._lastZoomCenter=null,n._listenMouseMove=!1,n._nthZoom=0,n._offset=Ot({},Jn),n._startOffset=Ot({},Jn),n._startTouches=null,n._updatePlaned=!1,n._wheelTimeOut=null,n._zoomFactor=1,n._initialZoomFactor=1,n._draggingPoint=Ot({},Jn),n._ignoreNextClick=!1,n._containerRef=Ga(),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&&(pn(n._interaction)||Ze(n._interaction)&&(n._startOffset.x!==n._offset.x||n._startOffset.y!==n._offset.y))&&gn(o),Ze(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&&gn(o),n._startOffset=Ot({},n._offset),n._startTouches=Qn(o.touches)):(pn(n._interaction)?n._startTouches&&n._startTouches.length===2&&o.touches.length===2&&n._handleZoom(o,Gp(n._startTouches,Qn(o.touches))):Ze(n._interaction)&&n._handleDrag(o),n._interaction&&(gn(o),n._update())),n._firstMove=!1)}),n._handlerWheel=function(o){if(!n.props.shouldInterceptWheel(o)){gn(o);var i=o.pageX,a=o.pageY,s=o.deltaY,c=o.deltaMode,l=1;(qp(o)||c===1)&&(l=15);var d={touches:[{pageX:i,pageY:a}]},h=n._getOffsetByFirstTouch(d),u=s*l;n._stopAnimation(),n._scaleTo(n._zoomFactor-u/n.props.wheelScaleFactor,h),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,i=o.inertiaFriction,a=o.inertia;if(!(!a||!this._velocity)){var s=this._velocity,c=s.x,l=s.y;if(c||l){this._stopAnimation(),this._resetInertia();var d=function(){if(c*=i,l*=i,!c&&!l)return n._stopAnimation();var h=Ot({},n._offset);if(n._addOffset({x:c,y:l}),n._offset=n._sanitizeOffset(n._offset),og(h,n._offset))return n._stopAnimation();n._update({isAnimation:!0})};this._animate(d,{duration:9999})}}},e.prototype._collectInertia=function(n){var o=n.touches;if(this.props.inertia){var i=Qn(o)[0],a=this._prevDragMovePoint;a&&(this._velocity=ng(i,a)),this._prevDragMovePoint=i}},e.prototype._handleDragEnd=function(){this.props.onDragEnd(),this._end(),this._realizeInertia()},e.prototype._handleZoomStart=function(){this.props.onZoomStart(),this._stopAnimation(),this._lastScale=1,this._nthZoom=0,this._lastZoomCenter=null,this._hasInteraction=!0},e.prototype._handleZoom=function(n,o){var i=Jp(this._getOffsetTouches(n)),a=o/this._lastScale;this._lastScale=o,this._nthZoom+=1,this._nthZoom>3&&(this._scale(a,i),this._drag(i,this._lastZoomCenter),this.props.enforceBoundsDuringZoom&&(this._offset=this._sanitizeOffset(this._offset))),this._lastZoomCenter=i},e.prototype._handleZoomEnd=function(){this.props.onZoomEnd(),this._end()},e.prototype._handleDoubleTap=function(n){var o=this;if(!(this._hasInteraction||this.props.tapZoomFactor===0)){var i=this.props.doubleTapZoomOutOnMaxScale&&this._zoomFactor===this.props.maxZoom||this.props.doubleTapToggleZoom&&this._zoomFactor>1;this.props.onDoubleTap(),this._ignoreNextClick=!0;var a=this._zoomFactor+this.props.tapZoomFactor,s=this._zoomFactor,c=function(d){o._scaleTo(s+d*(a-s),l)},l=this._getOffsetByFirstTouch(n);this._isDoubleTap=!0,s>a&&(l=this._getCurrentZoomCenter()),i?this._zoomOutAnimation():this._animate(c)}},e.prototype._computeInitialOffset=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=o.width,a=o.height,s=-Xn(i*this._getInitialZoomFactor()-n.width)/2,c=-Xn(a*this._getInitialZoomFactor()-n.height)/2;this._initialOffset={x:s,y:c}},e.prototype._resetOffset=function(){this._offset=Ot({},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(),i=this._getChildSize(),a=i.width,s=i.height,c=a*this._getInitialZoomFactor()*this._zoomFactor,l=s*this._getInitialZoomFactor()*this._zoomFactor,d=Di({containerDimension:o.width,childDimension:c,padding:this.props.horizontalPadding,centerContained:this.props.centerContained}),h=d[0],u=d[1],f=Di({containerDimension:o.height,childDimension:l,padding:this.props.verticalPadding,centerContained:this.props.centerContained}),m=f[0],p=f[1];return{x:Zo(h,u,n.x),y:Zo(m,p,n.y)}},e.prototype.alignCenter=function(n){var o=this,i=Ot({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,d=i.duration,h=a*this._initialZoomFactor,u=s*this._initialZoomFactor,f=this._zoomFactor,m=Ot({},this._offset),p=this._getContainerRect(),g={x:p.width/2,y:p.height/2};if(this._zoomFactor=1,this._offset={x:-(g.x-h),y:-(g.y-u)},this._scaleTo(c,g),this._stopAnimation(),!l)return this._update();var v=this._zoomFactor-f,E={x:this._offset.x-m.x,y:this._offset.y-m.y};this._zoomFactor=f,this._offset=Ot({},m);var w=function(k){var T=m.x+E.x*k,y=m.y+E.y*k;o._zoomFactor=f+v*k,o._offset=o._sanitizeOffset({x:T,y}),o._update()};this._animate(w,{callback:function(){return o._sanitize()},duration:d})},e.prototype.scaleTo=function(n){var o=this,i=Ot({duration:250,animated:!0},n),a=i.x,s=i.y,c=i.scale,l=i.animated,d=i.duration,h=this._zoomFactor,u=Ot({},this._offset);if(this._zoomFactor=1,this._offset={x:0,y:0},this._scaleTo(c,{x:a,y:s}),this._stopAnimation(),!l)return this._update();var f=this._zoomFactor-h,m={x:this._offset.x-u.x,y:this._offset.y-u.y};this._zoomFactor=h,this._offset=Ot({},u);var p=function(g){var v=u.x+m.x*g,E=u.y+m.y*g;o._zoomFactor=h+f*g,o._offset={x:v,y:E},o._update()};this._animate(p,{callback:function(){return o._sanitize()},duration:d})},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=Zo(this.props.minZoom,this.props.maxZoom,this._zoomFactor),this._zoomFactor/o},e.prototype._canDrag=function(){return this.props.draggableUnZoomed||!Yp(this._zoomFactor,1)},e.prototype._drag=function(n,o){if(o){var i=-(n.y-o.y),a=-(n.x-o.x);this.props.lockDragAxis?Xn(a)>Xn(i)?this._addOffset({x:a,y:0}):this._addOffset({y:i,x:0}):this._addOffset({x:a,y:i}),this.props.onDragUpdate()}},e.prototype._virtualDrag=function(n,o){if(o){var i=-(n.y-o.y),a=-(n.x-o.x);this._draggingPoint={x:a+this._draggingPoint.x,y:i+this._draggingPoint.y}}},e.prototype._addOffset=function(n){var o=this._offset,i=o.x,a=o.y;this._offset={x:i+n.x,y:a+n.y}},e.prototype._sanitize=function(){this._zoomFactor<this.props.zoomOutFactor?(this._resetInertia(),this._zoomOutAnimation()):this._isInsaneOffset()&&this._sanitizeOffsetAnimation()},e.prototype._isInsaneOffset=function(){var n=this._offset,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),i=Ot({},this._offset),a=function(s){var c=i.x+s*(o.x-i.x),l=i.y+s*(o.y-i.y);n._offset={x:c,y:l},n._update()};this._animate(a)},e.prototype._zoomOutAnimation=function(){var n=this;if(this._zoomFactor!==1){var o=this._zoomFactor,i=1,a=this._getCurrentZoomCenter(),s=function(c){var l=o+c*(i-o);n._scaleTo(l,a)};this._animate(s)}},e.prototype._getInitialZoomFactor=function(){return this._initialZoomFactor},e.prototype._getCurrentZoomCenter=function(){var n=this._offset,o=n.x,i=n.y,a=o-this._initialOffset.x,s=i-this._initialOffset.y;return{x:-1*o-a/(1/this._zoomFactor-1),y:-1*i-s/(1/this._zoomFactor-1)}},e.prototype._getOffsetByFirstTouch=function(n){return this._getOffsetTouches(n)[0]},e.prototype._getOffsetTouches=function(n){var o=this.props._document,i=o.documentElement,a=o.body,s=this._getContainerRect(),c=s.top,l=s.left,d=i.scrollTop||a.scrollTop,h=i.scrollLeft||a.scrollLeft,u=c+d,f=l+h;return Qn(n.touches).map(function(m){var p=m.x,g=m.y;return{x:p-f,y:g-u}})},e.prototype._animate=function(n,o){var i=this,a=new Date().getTime(),s=Ot({timeFn:Xp,callback:function(){},duration:this.props.animationDuration},o),c=s.timeFn,l=s.callback,d=s.duration,h=function(){if(i._inAnimation){var u=new Date().getTime()-a,f=u/d;u>=d?(n(1),i._stopAnimation(),l(),i._update()):(f=c(f),n(f),i._update({isAnimation:!0}),requestAnimationFrame(h))}};this._inAnimation=!0,requestAnimationFrame(h)},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 eg(n?.firstElementChild)},e.prototype._updateInitialZoomFactor=function(){var n=this._getContainerRect(),o=this._getChildSize(),i=n.width/o.width,a=n.height/o.height;this._initialZoomFactor=Up(i,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(i){var a=i[0],s=i[1],c=i[2];(c||o).addEventListener(a,s,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.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(i){var a=i[0],s=i[1],c=i[2];(c||o).removeEventListener(a,s,!0)}),Array.from(o.querySelectorAll("img")).forEach(function(i){return i.removeEventListener("load",n._onResize)})},e.prototype._update=function(n){var o=this;if(!this._updatePlaned){var i=function(){var a=o._getInitialZoomFactor()*o._zoomFactor,s=-o._offset.x/a,c=-o._offset.y/a;o.props.onUpdate({scale:a,x:s,y:c})};if(n?.isAnimation)return i();this._updatePlaned=!0,requestAnimationFrame(function(){o._updatePlaned=!1,i()})}},e.prototype._handlerIfEnable=function(n){var o=this;return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];o.props.enabled&&n.apply(void 0,i)}},e.prototype._setInteraction=function(n,o){var i=this._interaction;i!==n&&(i&&!n&&(pn(i)?this._handleZoomEnd():Ze(i)&&this._handleDragEnd()),pn(n)?this._handleZoomStart():Ze(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?(gn(n),this._handleDoubleTap(n),pn(this._interaction)?this._handleZoomEnd():Ze(this._interaction)&&this._handleDragEnd()):this._isDoubleTap=!1,this._fingers===1&&(this._lastTouchStart=o)},e.prototype.simulate=function(n){var o=this;return function(i){var a=i.pageX,s=i.pageY,c=i.type,l=c==="mouseup",d=c==="mousedown";d&&(i.preventDefault(),o._listenMouseMove=!0),o._listenMouseMove&&(i.touches=l?[]:[{pageX:a,pageY:s}],n(i)),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,i=n.containerProps,a=Ya.only(o),s=i||{};return Hn.createElement(Hn.Fragment,null,Hn.createElement("style",null,zp),Hn.createElement("div",Ot({},s,{ref:this._containerRef,className:Mi(ta,s.className)}),Qi(a,{className:Mi(ea,a.props.className)})))},e.defaultProps={animationDuration:250,draggableUnZoomed:!0,enforceBoundsDuringZoom:!1,centerContained:!1,enabled:!0,inertia:!0,inertiaFriction:.96,horizontalPadding:0,isTouch:Vp,lockDragAxis:!1,maxZoom:5,minZoom:.5,onDoubleTap:De,onDragEnd:De,onDragStart:De,onDragUpdate:De,onZoomEnd:De,onZoomStart:De,onZoomUpdate:De,setOffsetsOnce:!1,shouldInterceptWheel:tg,shouldCancelHandledTouchEndEvents:!1,tapZoomFactor:1,verticalPadding:0,wheelScaleFactor:1500,zoomOutFactor:1.3,doubleTapZoomOutOnMaxScale:!1,doubleTapToggleZoom:!1,_document:na?null:window.document},e}(ts);if(0)var jv,Kv,Uv,Wv,Zv,qv,Gv;function qo(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 rg=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),ig="ALT",Go=t=>{const{_:e}=Yt(),{alt:n,lang:o,index:i,...a}=t;return!n||!n.trim()?null:r("button",{type:"button",class:"alt-badge clickable",...a,onClick:s=>{s.stopPropagation(),s.preventDefault(),H.showMediaAlt={alt:n,lang:o}},title:e({id:"5gfDMm"}),children:[ig,!!i&&r("sup",{children:i})]})},sg=140,ag=280,oa=Bt(t=>t?.length?t.length>sg||/[\n\r].*[\n\r]/.test(t.trim()):!1);function cg({class:t="",media:e,to:n,lang:o,showOriginal:i,autoAnimate:a,showCaption:s,allowLongerCaption:c,altIndex:l,checkAspectRatio:d=!0,onClick:h}){let{id:u,blurhash:f,description:m,meta:p,previewRemoteUrl:g,previewUrl:v,remoteUrl:E,url:w,type:k}=e;/no\-preview\./i.test(v)&&(v=null);const T=lg(u||f||w),{original:y={},small:S,focus:b}=p||{},x=i?y?.width:S?.width||y?.width,P=i?y?.height:S?.height||y?.height,D=i?w:v||w,C=i?E:g||E,L=S?.width&&S?.height,I=x&&P?x>P?"landscape":"portrait":null,z=f?Nr(f):null,B=N();let bt;if(b){const j=(b.x+1)/2*100,Y=(1-b.y)/2*100;bt=`${j.toFixed(0)}% ${Y.toFixed(0)}%`}const G=N(),ut=Et(({x:j,y:Y,scale:W})=>{const{current:q}=G;if(q){const at=Hp({x:j,y:Y,scale:W});W===1?q.style.removeProperty("transform"):q.style.setProperty("transform",at),q.closest(".media-zoom").style.touchAction=W<=1.01?"pan-x":""}},[]),[nt,vt]=V(!1),ot={enabled:nt,draggableUnZoomed:!1,inertiaFriction:.9,tapZoomFactor:2,doubleTapToggleZoom:!0,containerProps:{className:"media-zoom",style:{overflow:"visible"}},onUpdate:ut},[rt,et]=V(!1),Mt=lt(()=>n&&!rt?j=>r(Je,{to:n,...j}):"div",[n,rt]),ft=C?$i(C):null,Ut=k==="unknown"&&ft&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(ft.pathname),Xt=k==="unknown"&&ft&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(ft.pathname),Qt=k==="image"||k==="unknown"&&v&&!Ut&&!Xt,U=v&&/\.(mp4|m4r|m4v|mov|webm)$/i.test($i(v).pathname),Tt=N(),[mt,te]=V(!1);$e(()=>{if(!Qt||!i||!Tt.current)return;const{offsetWidth:j,offsetHeight:Y}=Tt.current,W=x<j&&P<Y;W&&te(W)},[x,P]);const _t=window.innerHeight*(I==="portrait"?.45:.33),Wt=I==="portrait"?0:160,tt={"--average-color":z&&`rgb(${z.join(",")})`},pt=x&&P?{"--width":`${x}px`,"--height":`${P}px`,"--aspectWidth":`${x/P*Math.max(Wt,_t)}px`,aspectRatio:`${x} / ${P}`,...tt}:{...tt},Ct=oa(m);let dt=!!s&&!i&&!!m&&!Ct;c&&!dt&&m?.length<=ag&&(dt=!0);const J=dt?j=>{const{children:Y,...W}=j;return r("figure",{...W,children:[Y,r("figcaption",{class:"media-caption",lang:o,dir:"auto",onClick:q=>{q.preventDefault(),q.stopPropagation(),H.showMediaAlt={alt:m,lang:o}},children:m})]})}:F,[gt,_e]=V(void 0),It=()=>window.matchMedia("(min-width: calc(40em + 350px))").matches?"large":"small",Fe=Et(j=>{const Y=j.target.closest(".status-deck");if(i||It()==="large"&&Y||!document.startViewTransition){h?.(j);return}const W=j.target.closest("[data-view-transition-name]")||j.target.querySelector("[data-view-transition-name]");if(W)if(h)h(j);else if(j.preventDefault(),W.dataset.viewTransitioned){W.style.viewTransitionName=T;try{document.startViewTransition(()=>{W.style.viewTransitionName="",location.hash=`#${n}`})}catch{W.style.viewTransitionName="",location.hash=`#${n}`}}else location.hash=`#${n}`;else h?.(j)},[T,i,h]);if(Qt)return ot.containerProps.style.display="inherit",$e(()=>{rg&&i&&(async()=>{try{await fetch(D,{mode:"no-cors"}),G.current.src=D}catch{}})()},[D]),r(J,{children:[r(Mt,{ref:Tt,class:`media media-image ${t}`,onClick:Fe,"data-orientation":I,"data-has-alt":!dt||void 0,"data-has-natural-aspect-ratio":gt||void 0,style:i?{backgroundImage:`url(${v})`,"--bg-image":`url(${v})`,backgroundSize:mt?`${x}px ${P}px`:void 0,...tt}:pt,children:i?r(Oi,{...ot,children:r("img",{ref:G,src:D,alt:m,width:x,height:P,"data-orientation":I,loading:"eager",decoding:"sync",style:{"view-transition-name":T},onLoad:j=>{const Y=j.target,W=Y.closest(".media-image");W&&(W.style.backgroundImage=`url(${Y.src})`,W.style.removeProperty("--bg-image")),Y.closest(".media-zoom").style.display="",vt(!0)},onError:j=>{const{src:Y}=j.target;Y===D&&C&&D!==C&&(j.target.src=C)}})}):r(F,{children:[r("img",{src:D,alt:dt?"":m,width:x,height:P,"data-orientation":I,loading:"lazy","data-view-transition-name":T,style:{objectPosition:bt||"center","--anim-duration":`${Math.min(Math.max(Math.max(x,P)/100,5),120)}s`},onLoad:j=>{j.target.dataset.loaded=!0;const Y=j.target.closest(".media");if(!L&&Y){const{naturalWidth:W,naturalHeight:q}=j.target;Y.dataset.orientation=W>q?"landscape":"portrait",Y.style.setProperty("--width",`${W}px`),Y.style.setProperty("--height",`${q}px`),Y.style.aspectRatio=`${W}/${q}`}if(d&&Y){const{clientWidth:W,clientHeight:q,naturalWidth:at,naturalHeight:Pt}=j.target;if(W&&q&&at&&Pt)if(at<88||Pt<88)Y.dataset.hasSmallDimension=!0;else{const Nt=Pt*W/at;Math.abs(Nt-q)<5&&_e(!0)}}},onError:j=>{const{src:Y}=j.target;Y===D&&D!==C?j.target.src=C:et(!0)}}),!dt&&r(Go,{alt:m,lang:o,index:l})]})}),rt&&r("div",{children:r("a",{href:E,class:"button plain6 small",target:"_blank",children:[r(M,{icon:"external"})," ",r("span",{children:r(R,{id:"9npOH9"})})]})})]});if(k==="gifv"||k==="video"||Ut){const j=y.duration>0,Y=y.duration<31,W=k==="gifv"&&Y,q=y.duration<61,at=qo(y.duration),Pt=!i&&!a&&W,it=!i&&a&&W,Nt=y.duration>5,ze=`
<video
src="${w}"
poster="${v}"
width="${x}"
height="${P}"
data-orientation="${I}"
style="view-transition-name: ${T}"
preload="auto"
autoplay
muted
playsinline
${q?"loop":""}
ondblclick="this.paused ? this.play() : this.pause()"
${Nt?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`,jt=`
<video
src="${w}"
poster="${v}"
width="${x}"
height="${P}"
data-orientation="${I}"
style="view-transition-name: ${T}"
preload="auto"
autoplay
playsinline
${q?"loop":""}
controls
></video>
`;return r(J,{children:r(Mt,{ref:Tt,class:`media ${t} media-${W?"gif":"video"} ${it?"media-contain":""} ${Pt?"media-hover-animate":""}`,"data-orientation":I,"data-formatted-duration":i?void 0:at,"data-label":W&&!i&&!it?"GIF":void 0,"data-has-alt":!dt||void 0,style:!i&&pt,onClick:yt=>{if(Pt)try{B.current.pause()}catch{}Fe(yt)},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:[i||it?W&&i?r(Oi,{...ot,enabled:!0,children:r("div",{ref:G,dangerouslySetInnerHTML:{__html:ze}})}):W?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:ze}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:jt}}):W?r("video",{ref:B,src:w,poster:v,width:x,height:P,"data-orientation":I,"data-view-transition-name":T,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:Nt?yt=>{const{target:Rt}=yt,Ft=Rt?.closest(".media-gif");if(Ft){const Lt=Rt.currentTime/Rt.duration*100;Ft.style.setProperty("--progress",`${Lt}%`)}}:void 0}):r(F,{children:[v&&!U?r("img",{src:v,alt:dt?"":m,width:x,height:P,"data-orientation":I,loading:"lazy",decoding:"async","data-view-transition-name":T,onLoad:yt=>{if(!L){const Rt=yt.target.closest(".media");if(Rt){const{naturalHeight:Ft,naturalWidth:Lt}=yt.target;Rt.dataset.orientation=Lt>Ft?"landscape":"portrait",Rt.style.setProperty("--width",`${Lt}px`),Rt.style.setProperty("--height",`${Ft}px`),Rt.style.aspectRatio=`${Lt}/${Ft}`}}}}):r("video",{src:w+"#t=0.1",width:x,height:P,"data-orientation":I,"data-view-transition-name":T,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:yt=>{if(!j){const{duration:Rt}=yt.target;if(Rt){const Ft=qo(Rt),Lt=yt.target.closest(".media-video");Lt&&(Lt.dataset.formattedDuration=Ft)}}}}),r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})})]}),!i&&!dt&&r(Go,{alt:m,lang:o,index:l})]})})}else if(k==="audio"||Xt){const j=qo(y.duration);return r(J,{children:r(Mt,{class:`media media-audio ${t}`,"data-formatted-duration":i?void 0:j,"data-has-alt":!dt||void 0,onClick:h,style:!i&&pt,children:[i?r("audio",{src:E||w,preload:"none",controls:!0,autoPlay:!0}):v?r("img",{src:v,alt:dt?"":m,width:x,height:P,"data-orientation":I,loading:"lazy",onError:Y=>{try{Y.target?.remove?.()}catch{}}}):null,!i&&r(F,{children:[r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})}),!dt&&r(Go,{alt:m,lang:o,index:l})]})]})})}}function $i(t){return URL.parse(t,location.origin)}function lg(t){let e=t.replace(/[^a-zA-Z0-9_-]/g,"-");return e.match(/^[0-9-]/)&&(e="vt-"+e),e}const gr=rn(cg,(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 ug(t){const{mediaAttachments:e,language:n,postID:o,instance:i}=t,a=e.length>1,s=N(),[c,l]=V(0);return Q(()=>{let d=()=>{const{clientWidth:h,scrollLeft:u}=s.current,f=Math.round(Math.abs(u)/h);l(f)};return s.current&&s.current.addEventListener("scroll",d,{passive:!0}),()=>{s.current&&s.current.removeEventListener("scroll",d)}},[]),r(F,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:s,children:e.map((d,h)=>r("div",{class:"media-first-item",children:r(gr,{media:d,lang:n,to:`/${i}/s/${o}?media=${h+1}`})},d.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:d=>{d.preventDefault(),d.stopPropagation(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c-1)*(lr()?-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:d=>{d.preventDefault(),d.stopPropagation(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c+1)*(lr()?-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((d,h)=>r("span",{class:`carousel-dot ${h===c?"active":""}`},d.id))})]})}function dg(t){const{enabled:e,children:n,lang:o,captionChildren:i}=t;return!e||!i?n:r("figure",{class:"media-figure-multiple",children:[n,r("figcaption",{lang:o,dir:"auto",children:i})]})}function hg({poll:t,lang:e,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const{_:a}=Yt(),[s,c]=V("default"),{expired:l,expiresAt:d,id:h,multiple:u,options:f,ownVotes:m,voted:p,votersCount:g,votesCount:v=0,emojis:E}=t,w=!!d&&new Date(d),k=u&&g||v;let T=0;k<=1e3?T=0:k<=1e4?T=1:k<=1e5&&(T=2);const[y,S]=V(!1),b=f.every(x=>x.votesCount!==null);return r("div",{lang:e,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[y&&b||p||l?r(F,{children:[r("div",{class:"poll-options",children:f.map((x,P)=>{const{title:D,votesCount:C}=x,L=k?C/k:0,O=L?L.toLocaleString(Dt.locale||void 0,{style:"percent",maximumFractionDigits:T}):"0%",I=C>0&&C===Math.max(...f.map(z=>z.votesCount));return r("div",{class:`poll-option poll-result ${I?"poll-option-leading":""}`,style:{"--percentage":`${L*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(nn,{text:D,emojis:E})}),p&&m.includes(P)&&r(F,{children:[" ",r(M,{icon:"check-circle",alt:a({id:"IeO7us"})})]})]}),r("div",{class:"poll-option-votes",title:Dt._({id:"+syLpm",values:{optionVotesCount:C}}),children:O})]},`${P}-${D}-${C}`)})}),!l&&!p&&r("button",{class:"poll-vote-button plain2",disabled:s==="loading",onClick:x=>{x.preventDefault(),S(!1)},children:[r(M,{icon:"arrow-left",size:"s"})," ",r(R,{id:"L96xSt"})]})]}):r("form",{onSubmit:async x=>{x.preventDefault();const P=x.target,D=new FormData(P),C=[];D.forEach((L,O)=>{O==="poll"&&C.push(L)}),C.length&&(c("loading"),await i(C),c("default"))},children:[r("div",{class:"poll-options",children:f.map((x,P)=>{const{title:D}=x;return r("div",{class:"poll-option",children:r("label",{class:"poll-label",children:[r("input",{type:u?"checkbox":"radio",name:"poll",value:P,disabled:s==="loading",readOnly:n}),r("span",{class:"poll-option-title",children:r(nn,{text:D,emojis:E})})]})})})}),!n&&r("button",{class:"poll-vote-button",type:"submit",disabled:s==="loading",children:r(R,{id:"lQXQKs"})})]}),r("p",{class:"poll-meta",children:[!l&&!n&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:x=>{x.preventDefault(),c("loading"),(async()=>(await o(),c("default")))()},title:a({id:"lCF0wC"}),children:r(M,{icon:"refresh",alt:a({id:"lCF0wC"})})}),!p&&!l&&!n&&b&&r("button",{type:"button",class:"plain small",disabled:s==="loading",onClick:x=>{x.preventDefault(),S(!y)},title:a(y?{id:"L96xSt"}:{id:"zCjei3"}),children:[r(M,{icon:y?"eye-open":"eye-close",alt:a(y?{id:"L96xSt"}:{id:"zCjei3"})})," "]}),!l&&!n&&" ",r(R,{id:"k7v0Rh",values:{0:fe(v),1:fe(v),votesCount:v},components:{0:r("span",{title:v}),1:r("span",{title:v})}}),!!g&&g!==v&&r(F,{children:[" ","•"," ",r(R,{id:"jf1i1L",values:{0:fe(g),1:fe(g),votersCount:g},components:{0:r("span",{title:g}),1:r("span",{title:g})}})]})," ","•"," ",l?w?r(R,{id:"5LwCCI",components:{0:r(me,{datetime:w})}}):a({id:"237hSL"}):w?r(R,{id:"ooHDPY",components:{0:r(me,{datetime:w})}}):a({id:"O2tNG0"})]})]})}const fg=/^http/i,Ni=({post:t,instance:e,previewMode:n})=>{const{content:o,emojis:i,language:a,mentions:s,url:c}=t,l=N();return $e(()=>{if(!l.current)return;const d=Vs(o,{emojis:i,returnDOM:!0});for(const h of d.querySelectorAll('a.u-url[target="_blank"]'))fg.test(h.innerText.trim())||h.removeAttribute("target");l.current.replaceChildren(d.cloneNode(!0))},[o,i?.length]),r("div",{ref:l,lang:a,dir:"auto",class:"inner-content",onClick:zm({mentions:s,instance:e,previewMode:n,statusURL:c})})};var Yo,Fi;function mg(){return Fi||(Fi=1,Yo=(e,n={})=>{const o=n.char||" ",i=n.count||2;let a=0;const s=[];return e.reverse().reduce((c,l)=>{s.length&&a&&s[a]&&s[a]===l.substring(1,s[a].length+1)&&(s.splice(a,1),a--);const h=[`${o.repeat(a?a*i:0)}${l}`,...c];return l.substring(0,2)==="</"&&(a++,s[a]=l.substring(2,l.length-1)),h},[]).join(`
`)}),Yo}var Xo,zi;function pg(){if(zi)return Xo;zi=1;const t=n=>n.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,"");return Xo={mergeAttributesWithElements:n=>{const o=t(n).split(`
`),i=[];let a="";for(let s=0;s<o.length;s+=1){const c=o[s];if(c.endsWith("/>")){i.push(`${a}${c.slice(0,-2)} />`),a="";continue}if(c.endsWith(">")){i.push(`${a}${c.startsWith(">")||c.startsWith("<")?"":" "}${c}`),a="";continue}a+=a.length?` ${c}`:c}return i},removeEmptyLines:t},Xo}var Qo,Bi;function gg(){if(Bi)return Qo;Bi=1;const t=mg(),{mergeAttributesWithElements:e}=pg();return Qo=(o,i={})=>{const a=e(o);return t(a,i)},Qo}var vg=gg();const _g=Xi(vg);function ra(t,e,n=0){const{account:{url:o,displayName:i,acct:a,username:s,emojis:c,bot:l,group:d},id:h,poll:u,spoilerText:f,language:m,editedAt:p,createdAt:g,content:v,mediaAttachments:E,url:w,emojis:k}=t,T=ce(h,e),S=(H.statusQuotes[T]||[]).filter((C,L,O)=>O.findIndex(I=>I.url===C.url)===L),b=S.length&&n<=2?S.map(C=>{const{id:L,instance:O}=C,I=ce(L,O),z=H.statuses[I];if(z)return ra(z,O,++n)}).join(""):"",x=new Date(g),P=hr(v,k)+`
`+b+`
`+(u?.options?.length?`
<p>📊:</p>
<ul>
${u.options.map(C=>`
<li>
${C.title}
${C.votesCount>=0?` (${C.votesCount})`:""}
</li>
`).join("")}
</ul>`:"")+(E.length>0?`
`+E.map(C=>{const{description:L,meta:O,previewRemoteUrl:I,previewUrl:z,remoteUrl:B,url:bt,type:G}=C,{original:ut={},small:nt}=O||{},vt=nt?.width||ut?.width,ot=nt?.height||ut?.height,rt=B||bt,et=I||z,Mt=et||rt,ft=rt?URL.parse(rt):null,Ut=G==="unknown"&&ft&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(ft.pathname),Xt=G==="unknown"&&ft&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(ft.pathname),Qt=G==="image"||G==="unknown"&&et&&!Ut&&!Xt,U=G==="gifv"||G==="video"||Ut,Tt=G==="audio"||Xt;let mt="";return Qt?mt=`<img src="${Mt}" width="${vt}" height="${ot}" alt="${L}" loading="lazy" />`:U?mt=`
<video src="${rt}" width="${vt}" height="${ot}" controls preload="auto" poster="${et}" loading="lazy"></video>
${L?`<figcaption>${L}</figcaption>`:""}
`:Tt?mt=`
<audio src="${rt}" controls preload="auto"></audio>
${L?`<figcaption>${L}</figcaption>`:""}
`:mt=`
<a href="${rt}">📄 ${L||rt}</a>
`,`<figure>${mt}</figure>`}).join(`
`):""),D=`
<blockquote lang="${m}" cite="${w}" data-source="fediverse">
${f?`
<details>
<summary>${f}</summary>
${P}
</details>
`:P}
<footer>
${hr(i,c)} (@${a}) ${g?`<a href="${w}"><time datetime="${x.toISOString()}">${x.toLocaleString()}</time></a>`:""}
</footer>
</blockquote>
`;return _g(D)}function yg({post:t,instance:e,onClose:n}){const{_:o}=Yt(),{account:{url:i,displayName:a,username:s,emojis:c,bot:l,group:d},id:h,poll:u,spoilerText:f,language:m,editedAt:p,createdAt:g,content:v,mediaAttachments:E,url:w,emojis:k}=t,T=ra(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(R,{id:"jdVwsS"})})}),r("main",{tabIndex:"-1",children:[r("h3",{children:r(R,{id:"GkS6YG"})}),r("textarea",{class:"embed-code",readonly:!0,onClick:y=>{y.target.select()},dir:"auto",children:T}),r("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(T),kt(o({id:"bl7nrg"}))}catch{kt(o({id:"/KEBaP"}))}},children:[r(M,{icon:"clipboard"})," ",r("span",{children:r(R,{id:"he3ygx"})})]}),!!E?.length&&r("section",{children:[r("p",{children:r(R,{id:"/2mUza"})}),r("ol",{class:"links-list",children:E.map(y=>r("li",{children:r("a",{href:y.remoteUrl||y.url,target:"_blank",download:!0,children:y.remoteUrl||y.url})},y.id))})]}),!!c?.length&&r("section",{children:[r("p",{children:r(R,{id:"AeM/di"})}),r("ul",{children:c.map(y=>r("li",{children:[r("picture",{children:[r("source",{srcset:y.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:y.url,alt:`:${y.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",y.shortcode,":"]})," (",r("a",{href:y.url,target:"_blank",download:!0,children:"URL"}),")",y.staticUrl?r(F,{children:[" ","(",r("a",{href:y.staticUrl,target:"_blank",download:!0,children:r(R,{id:"xiropL"})}),")"]}):null]},y.shortcode))})]}),!!k?.length&&r("section",{children:[r("p",{children:r(R,{id:"jzjjJh"})}),r("ul",{children:k.map(y=>r("li",{children:[r("picture",{children:[r("source",{srcset:y.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:y.url,alt:`:${y.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",y.shortcode,":"]})," (",r("a",{href:y.url,target:"_blank",download:!0,children:"URL"}),")",y.staticUrl?r(F,{children:[" ","(",r("a",{href:y.staticUrl,target:"_blank",download:!0,children:r(R,{id:"xiropL"})}),")"]}):null]},y.shortcode))})]}),r("section",{children:r("small",{children:[r("p",{children:r(R,{id:"TnJgwX"})}),r("ul",{children:[r("li",{children:r(R,{id:"0OHPem"})}),r("li",{children:r(R,{id:"AzZ5zv"})}),r("li",{children:r(R,{id:"NU7wa/"})}),r("li",{children:r(R,{id:"R4PmPA"})})]})]})}),r("h3",{children:r(R,{id:"rdUucN"})}),r("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:T},dir:"auto"}),r("p",{children:r("small",{children:r(R,{id:"j0kZfi"})})})]})]})}const qe=ke((t,e)=>{let{checked:n,count:o,class:i,title:a,alt:s,size:c,icon:l,iconSize:d="l",onClick:h,...u}=t;typeof a=="string"&&(a=[a,a]),typeof s=="string"&&(s=[s,s]);const[f,m]=V(a[0]||""),[p,g]=V(s[0]||"");return Q(()=>{n?(m(a[1]||""),g(s[1]||"")):(m(a[0]||""),g(s[0]||""))},[n,a,s]),r("button",{ref:e,type:"button",title:f,class:`plain ${c?"small":""} ${i} ${n?"checked":""}`,onClick:v=>{h&&(v.preventDefault(),v.stopPropagation(),h(v))},...u,children:[r(M,{icon:l,size:d,alt:p}),!!o&&r(F,{children:[" ",r("small",{title:o,children:fe(o)})]})]})});class Vt extends HTMLElement{constructor(){super(),this.isIframeLoaded=!1,this.setupDom()}static get observedAttributes(){return["videoid","playlistid","videoplay","videotitle"]}connectedCallback(){this.addEventListener("pointerover",()=>Vt.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%;
}
@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&&(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 i=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}"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
src="https://www.youtube${i}.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.testPosterImage(),this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.domRefImg?.fallback?.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}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 i=o.target;i?.naturalHeight==90&&i?.naturalWidth==120&&(this.posterQuality="hqdefault");const s=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`;this.domRefImg.webp.srcset=s;const c=`https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;this.domRefImg.fallback.loading=this.posterLoading,this.domRefImg.jpeg.srcset=c,this.domRefImg.fallback.src=c,this.domRefImg.fallback.loading=this.posterLoading}},100)}initIntersectionObserver(){const e={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((o,i)=>{o.forEach(a=>{a.isIntersecting&&!this.isIframeLoaded&&(Vt.warmConnections(this),this.addIframe(!0),i.unobserve(this))})},e).observe(this),this.autoPause&&new IntersectionObserver((i,a)=>{i.forEach(s=>{s.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){Vt.isPreconnected||window.liteYouTubeIsPreconnected||(Vt.addPrefetch("preconnect","https://i.ytimg.com/"),Vt.addPrefetch("preconnect","https://s.ytimg.com"),e.noCookie?Vt.addPrefetch("preconnect","https://www.youtube-nocookie.com"):(Vt.addPrefetch("preconnect","https://www.youtube.com"),Vt.addPrefetch("preconnect","https://www.google.com"),Vt.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Vt.addPrefetch("preconnect","https://static.doubleclick.net")),Vt.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Vt.isPreconnected=!1;customElements.define("lite-youtube",Vt);function bg({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(R,{id:"4LHHK6",components:{0:r(Te,{account:o,showAvatar:!0})}})})]})]})}function Vi(t){return["x.com","twitter.com","threads.net","bsky.app","bsky.brid.gy","fed.brid.gy"].includes(t)}function wg({card:t,selfReferential:e,selfAuthor:n,instance:o}){const i=Ln(H),{blurhash:a,title:s,description:c,html:l,providerName:d,providerUrl:h,authorName:u,authorUrl:f,width:m,height:p,image:g,imageDescription:v,url:E,type:w,embedUrl:k,language:T,publishedAt:y,authors:S}=t,b=s||d||u,P=m/p>=1.2?"large":"",[D,C]=V(null);if(Q(()=>{b&&g&&!e&&Xa(E)&&Qa(o,E).then(B=>{if(!B)return;const{id:bt,url:G}=B;C("#"+G)})},[b,g,e]),i.unfurledLinks[E])return null;const L=/<iframe/i.test(l),O=Et(B=>{L&&(B.preventDefault(),H.showEmbedModal={html:l,url:E||k,width:m,height:p})},[L]),[I,z]=V(null);if(b&&(g||w==="photo"&&a)){const B=ho(E),bt=g&&a?Nr(a):null;if(!g){const vt=Fp(a,44,44),ot=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");ot.width=44,ot.height=44;const rt=ot.getContext("2d");rt.imageSmoothingEnabled=!1;const et=rt.createImageData(44,44);et.data.set(vt),rt.putImageData(et,0,0);try{window.OffscreenCanvas?ot.convertToBlob().then(Mt=>{z(URL.createObjectURL(Mt))}):z(ot.toDataURL())}catch{}}const G=Vi(B);return r(bg,{hidden:!!n,authors:S,children:r("a",{href:D||E,target:D?null:"_blank",rel:"nofollow noopener",class:`card link ${G?"card-post":""} ${I?"":P}`,style:{"--average-color":bt&&`rgb(${bt.join(",")})`},onClick:O,children:[r("div",{class:"card-image",children:r("img",{src:g||I,width:m,height:p,loading:"lazy",decoding:"async",fetchPriority:"low",alt:v||"",onError:ut=>{try{ut.target.style.display="none"}catch{}},style:{"--anim-duration":m&&p&&`${Math.min(Math.max(Math.max(m,p)/100,5),120)}s`}})}),r("div",{class:"meta-container",lang:T,children:[r("p",{class:"meta domain",children:[r("span",{class:"domain",children:B})," ",!!y&&r(F,{children:"· "}),!!y&&r(F,{children:r(me,{datetime:y,format:"micro"})})]}),r("p",{class:"title",dir:"auto",title:s,children:s}),r("p",{class:"meta",dir:"auto",title:c,children:c||!!y&&r(me,{datetime:y,format:"micro"})})]})]})})}else{if(w==="photo")return r("a",{href:E,target:"_blank",rel:"nofollow noopener",class:"card photo",onClick:O,children:r("img",{src:k,width:m,height:p,alt:s||c,loading:"lazy",style:{height:"auto",aspectRatio:`${m}/${p}`}})});if(w==="video"&&/youtube/i.test(d)){const B=E.match(/watch\?v=([^&]+)/)?.[1];if(B)return r("a",{class:"card video",onClick:O,children:r("lite-youtube",{videoid:B,nocookie:!0,autoPause:!0})})}if(b&&!g){const B=ho(E),bt=Vi(B);return r("a",{href:D||E,target:D?null:"_blank",rel:"nofollow noopener",class:`card link ${bt?"card-post":""} no-image`,lang:T,dir:"auto",onClick:O,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})]})," ",!!y&&r(F,{children:"· "}),!!y&&r(F,{children:r(me,{datetime:y,format:"micro"})})]}),r("p",{class:"title",title:s,children:s}),r("p",{class:"meta",title:c||d||u,children:c||d||u})]})})}}}function Eg({sKey:t}){const n=Ln(H).statusReply[t];if(!n)return null;const{id:o,instance:i}=n,a=os(o,i);if(!a)return null;const{account:{id:s},sensitive:c,spoilerText:l,account:{avatar:d,avatarStatic:h,bot:u}={},visibility:f,content:m,language:p,filtered:g}=a;if(c||l||!m)return null;const v=ce(o,i),E=Cs(a),w=rs(),k=w&&w===s,T=xt($r);let y=!k&&yo(g,T);if(y?.action==="blur"&&(y=null),y?.action==="hide")return null;const S=y?.titlesStr||"";return r("article",{class:`status compact-reply shazam ${f==="direct"?"visibility-direct":""}`,tabindex:"-1","data-state-post-id":v,children:[r(pe,{url:h||d,squircle:u}),r("div",{class:"content-compact",title:E,lang:p,dir:"auto",children:y?r("b",{class:"status-filtered-badge badge-meta",title:S,children:[r("span",{children:r(R,{id:"03Qqf9"})}),r("span",{children:S})]}):r("span",{children:E})})]})}const Tg=Jt(0);function Hi({alt:t}){return r(M,{icon:"thread",size:"s",alt:t})}function ji({index:t,showIcon:e,showText:n}){const{_:o}=Yt(),i=xt(Tg),a=t>0,s=i>0;return r("div",{class:"status-thread-badge",children:[e&&r(F,{children:[r(Hi,{alt:n?"":o({id:"e66y2Z"})})," "]}),n?a?s?r(R,{id:"A05Pj6",values:{index:t,total:i}}):r(R,{id:"fYeATS",values:{index:t}}):o({id:"e66y2Z"}):a?o(s?{id:"98E0aM",values:{index:t,total:i}}:{id:"NNrlf5",values:{index:t}}):!e&&r(Hi,{alt:o({id:"e66y2Z"})})]})}const Ag=280,kg=140,Cg=es({limit:1,interval:1e3});function Sg(t,e){return e.v1.accounts.$select(t).fetch()}const xg=po(Cg(Sg)),Ig=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),Ki=80;function Lg(t){return t?.options?.length?`📊:
${t.options.map(e=>`- ${e.title}${e.votesCount>=0?` (${e.votesCount})`:""}`).join(`
`)}`:""}function Jo(t,e){const{maskCustomEmojis:n,maskURLs:o}=e||{},{spoilerText:i,poll:a,emojis:s}=t;let{content:c}=t;if(n&&s?.length){const l=new RegExp(`:(${s.map(d=>d.shortcode).join("|")}):`,"g");c=c.replace(l,"⬚")}return(i?`${i}
`:"")+_o(c,{preProcess:o&&(l=>{for(const d of l.querySelectorAll("a")){const h=d.innerText.trim();/^https?:\/\//i.test(h)&&d.replaceWith("«🔗»")}})})+Lg(a)}function ia(t=[],e=document){for(const n of t)try{return e.querySelectorAll(n)}catch{}return[]}function Dg(t,e){if(!t)return!1;if(e?.length){const o=new RegExp(`:(${e.map(i=>i.shortcode).join("|")}):`,"g");t=t.replace(o,"")}return t=t.trim(),t?!!_o(t,{preProcess:o=>{for(const i of ia([".mention, pre, code, a:has(.invisible)",".mention, pre, code"],o))i.remove()}}):!1}function Mg(t,e){if(e?.length){const n=new RegExp(`:(${e.map(o=>o.shortcode).join("|")}):`,"g");t=t.replace(n,"")}return _o(t,{preProcess:n=>{for(const o of ia([".mention, .hashtag, pre, code, a:has(.invisible)",".mention, .hashtag, pre, code"],n))o.remove();for(const o of n.querySelectorAll("a")){const i=o.innerText.trim();(i.startsWith("https://")||i.startsWith("http://"))&&o.remove()}}})}const Pg={s:"small",m:"medium",l:"large"},Rg=po(async t=>{if(t=t?.trim(),t?.length>500)return null;if(Oe){const i=await Oe.detect(t);console.groupCollapsed("💬 DETECTLANG BROWSER",i.slice(0,3).map(s=>s.detectedLanguage)),console.groupEnd();const a=i[0];if(a?.detectedLanguage&&a?.confidence>.5)return a.detectedLanguage}const{detectAll:e}=await A(async()=>{const{detectAll:i}=await import("./tinyld.light.node-D9KYf3Y3.js");return{detectAll:i}},[],import.meta.url),n=e(t);console.groupCollapsed("💬 DETECTLANG TINYLD",n.slice(0,3).map(i=>i.lang)),console.groupEnd();const o=n[0];return o?.lang&&o?.accuracy>.5?o.lang:null}),Tn={id:"8fZueG"},vr={},_r=(t,e)=>`${t}:${e.join("|")}`,Og=(t,e=[])=>{if(!t)return!1;const n=_r(t,e),o=Bs(!0),i=t!==o&&!so([t],[o])&&!e.find(a=>t===a||so([t],[a]));return i&&(vr[n]=!0),i};function on({statusID:t,status:e,instance:n,size:o="m",contentTextWeight:i,readOnly:a,enableCommentHint:s,withinContext:c,skeleton:l,enableTranslate:d,forceTranslate:h,previewMode:u,allowFilters:f,onMediaClick:m,quoted:p,quoteDomain:g,onStatusLinkClick:v=()=>{},showFollowedTags:E,allowContextMenu:w,showActionsBar:k,showReplyParent:T,mediaFirst:y}){const{_:S,_:b,i18n:x}=Yt(),P=xs(x.locale);if(l)return r("div",{class:`status skeleton ${y?"status-media-first small":""}`,children:[!y&&r(pe,{size:"xxl"}),r("div",{class:"container",children:[r("div",{class:"meta",children:[(o==="s"||y)&&r(pe,{size:"m"})," ███ ████████"]}),r("div",{class:"content-container",children:[y&&r("div",{class:"media-first-container"}),r("div",{class:`content ${y?"media-first-content":""}`,children:r("p",{children:"████ ████████"})})]})]})]});const{masto:D,instance:C,authenticated:L}=An({instance:n}),{instance:O}=An(),I=C===O;let z=ce(t||e?.id,C);const B=Ln(H);if(e||(e=B.statuses[z]||B.statuses[t],z=ce(e?.id,C)),!e)return null;const{editHistoryRef:bt,editHistoryMode:G,editedAtIndex:ut}=kp();if(G&&e?.editedAt&&bt.current.length){const _=bt.current[ut];_&&(e={...e,..._})}const{account:{acct:nt,avatar:vt,avatarStatic:ot,id:rt,url:et,displayName:Mt,username:ft,emojis:Ut,bot:Xt,group:Qt}={},id:U,repliesCount:Tt,reblogged:mt,reblogsCount:te,favourited:_t,favouritesCount:Wt,bookmarked:tt,poll:pt,muted:Ct,sensitive:dt,spoilerText:J,visibility:gt,language:_e,editedAt:It,filtered:Fe,card:j,createdAt:Y,inReplyToId:W,inReplyToAccountId:q,content:at,mentions:Pt,mediaAttachments:it=[],reblog:Nt,uri:ze,url:jt,emojis:yt,tags:Rt,pinned:Ft,_deleted:Lt,_pinned:X,emojiReactions:St}=e,[zt,Zt]=V(null);Q(()=>{if(!at||_e||zt)return;let _;return _=setTimeout(async()=>{let $=await Rg(Mg(at,yt));Zt($)},1e3),()=>clearTimeout(_)},[at,_e]);const Z=_e||zt,ye=!!it?.length;y&&ye&&(o="s");const Se=rs(),de=lt(()=>Se&&Se===rt,[rt,Se]),Be=xt($r),qt=!de&&(!a&&!u||f)&&yo(Fe,Be);if(qt?.action==="hide")return null;const xe=_=>{_.shiftKey};if((f||o!=="l")&&qt&&qt.action!=="blur")return r(Vg,{status:e,filterInfo:qt,instance:C,containerProps:{onMouseEnter:xe},showFollowedTags:!0,quoted:p});const Gt=new Date(Y),Mn=new Date(It);let cn=Pt?.find(_=>_.id===q);!cn&&q===U&&(cn={url:et,username:ft,displayName:Mt});const[ee,Ve]=V(cn);if(!c&&!ee&&q){const _=H.accounts[q];_?Ve(_):xg(q,D).then($=>{Ve($),H.accounts[$.id]=$}).catch($=>{})}const He=q===Se||Pt?.find(_=>_.id===Se),Ie=Ja(),be=!!Ie["reading:expand:spoilers"],zr=Ie["reading:expand:media"]?.toLowerCase()||"default",ne=u||be||!!B.spoilers[U],ln=u||zr==="show_all"&&qt?.action!=="blur"||!!B.spoilersMedia[U];if(Nt)return Qt?r("div",{"data-state-post-id":z,class:"status-group",onMouseEnter:xe,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"group",size:"l",alt:b({id:"L8fEEm"})})," ",r(Te,{account:e.account,instance:C,showAvatar:!0})]}),r(on,{status:t?null:Nt,statusID:t?Nt.id:null,instance:C,size:o,contentTextWeight:i,readOnly:a,mediaFirst:y})]}):r("div",{"data-state-post-id":z,class:"status-reblog",onMouseEnter:xe,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"rocket",size:"l"})," ",r(R,{id:"DlhB4J",components:{0:r(Te,{account:e.account,instance:C,showAvatar:!0}),1:r("span",{})}})]}),r(on,{status:t?null:Nt,statusID:t?Nt.id:null,instance:C,size:o,contentTextWeight:i,readOnly:a,enableCommentHint:!0,mediaFirst:y})]});const ga=Et(({children:_})=>r("div",{"data-state-post-id":z,class:"status-followed-tags",onMouseEnter:xe,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"hashtag",size:"l"})," ",B.statusFollowedTags[z].slice(0,3).map($=>r(Je,{to:C?`/${C}/t/${$}`:`/t/${$}`,class:"status-followed-tag-item",children:$},$))]}),_]}),[z,C,B.statusFollowedTags[z]]),va=E&&B.statusFollowedTags[z]?.length?ga:F,ct=o==="l",[bo,_a]=V(h),{contentTranslation:wo,contentTranslationAutoInline:Br}=B.settings;wo||(d=!1);const Vr=lt(()=>{if(!wo||!Br||a||c&&!ct||u||J||dt||pt||j)return!1;const _=Uo(at);return _>0&&_<=kg},[wo,Br,a,c,ct,u,J,dt,pt,j,it,at]),[Eo,Pn]=V(!1),[ya,To]=V(!1),Hr=bn(),Ao=bn(),ba=bn(),je=N(null),[wa,Ea]=kr(_=>_+1,0),Rn=b({id:"7jyUKe"}),jr=Et(()=>Math.max(Math.round(((J?.length||0)+Uo(at))/140)||1,1),[J,at]),Kr=Y&&Sn(Gt),Ur=It&&Sn(Mn);let un=L&&gt!=="direct"&&gt!=="private";gt==="private"&&de&&(un=!0);const On=_=>{if(!I||!L)return alert(Rn);(_?.shiftKey||_?.syntheticEvent?.shiftKey)&&sl({replyToStatus:e})||Kn({replyToStatus:e})},Ta=lt(()=>it.some(_=>!_.description?.trim?.()),[it]),Wr=lt(()=>Math.floor((new Date-Gt)/(1e3*60*60*24*30)),[Gt]),ko=async()=>{if(!I||!L)return alert(Rn),!1;try{if(H.statuses[z]={...e,reblogged:!mt,reblogsCount:te+(mt?-1:1)},mt){const _=await D.v1.statuses.$select(U).unreblog();we(_,C)}else{const _=await D.v1.statuses.$select(U).reblog();we(_,C)}return!0}catch{return H.statuses[z]=e,!1}},Zr=async()=>{if(!I||!L)return alert(Rn),!1;try{if(H.statuses[z]={...e,favourited:!_t,favouritesCount:Wt+(_t?-1:1)},_t){const _=await D.v1.statuses.$select(U).unfavourite();we(_,C)}else{const _=await D.v1.statuses.$select(U).favourite();we(_,C)}return!0}catch{return H.statuses[z]=e,!1}},Co=async()=>{try{const _=await Zr();!ct&&_&&kt(b(_t?{id:"sZvpIt",values:{0:ft||nt}}:{id:"yUngDO",values:{0:ft||nt}}))}catch{}},qr=async()=>{if(Zn("@mastodon/post-bookmark")){if(!I||!L)return alert(Rn),!1;try{if(H.statuses[z]={...e,bookmarked:!tt},tt){const _=await D.v1.statuses.$select(U).unbookmark();we(_,C)}else{const _=await D.v1.statuses.$select(U).bookmark();we(_,C)}return!0}catch{return H.statuses[z]=e,!1}}},Gr=async()=>{try{const _=await qr();!ct&&_&&kt(b(tt?{id:"lWQguj",values:{0:ft||nt}}:{id:"Fb2K8h",values:{0:ft||nt}}))}catch{}},So=B.settings.contentTranslationHideLanguages||[],[Le,Yr]=V(vr[_r(Z,So)]);Q(()=>{if(!Z||Le)return;if(!Le&&vr[_r(Z,So)]){Yr(!0);return}let _=setTimeout(()=>{const $=Og(Z,So);$&&Yr($)},100);return()=>clearTimeout(_)},[Z,Le]);const Xr=N(),Qr=N();async function Aa(_){_&&(Xr.current=D.v1.statuses.$select(t).rebloggedBy.list({limit:Ki}).values(),Qr.current=D.v1.statuses.$select(t).favouritedBy.list({limit:Ki}).values());const[{value:$},{value:st}]=await Promise.allSettled([Xr.current.next(),Qr.current.next()]);if($.value?.length||st.value?.length){const ht=[];return $.value?.length&&ht.push(...$.value.map(oe=>(oe._types=["reblog"],oe))),st.value?.length&&ht.push(...st.value.map(oe=>(oe._types=["favourite"],oe))),{value:ht,done:$.done&&st.done}}return{value:[],done:!0}}const ka=N(),Jr=["public","unlisted"].includes(gt),Ca=["public","unlisted","private"].includes(gt),ti=Ta&&!mt?r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(R,{id:"MB+wJL"})]}):Wr>=3&&r("div",{class:"footer",children:[r(M,{icon:"info"}),r("span",{children:r(R,{id:"dBme/4",values:{0:P.format(-Wr,"month")},components:{0:r("strong",{})}})})]}),ei=r(F,{children:[!ct&&I&&r(F,{children:r("div",{class:"menu-control-group-horizontal status-menu",children:[r(At,{onClick:On,children:[r(M,{icon:"comment"}),r("span",{children:Tt>0?fe(Tt):b({id:"ImOQa9"})})]}),r(Ro,{subMenu:!0,confirmLabel:r(F,{children:[r(M,{icon:"rocket"}),r("span",{children:b(mt?{id:"QzzGsY"}:{id:"kulphB"})})]}),className:`menu-reblog ${mt?"checked":""}`,menuExtras:r(At,{onClick:()=>{Kn({draftStatus:{status:`
${jt}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(R,{id:"ZhhOwV"})})]}),menuFooter:ti,disabled:!un,onClick:async()=>{try{const _=await ko();!ct&&_&&kt(b(mt?{id:"bpDheH",values:{0:ft||nt}}:{id:"dbNZdP",values:{0:ft||nt}}))}catch{}},children:[r(M,{icon:"rocket"}),r("span",{children:te>0?fe(te):b(mt?{id:"QzzGsY"}:{id:"PiVIlD"})})]}),r(At,{onClick:Co,className:`menu-favourite ${_t?"checked":""}`,children:[r(M,{icon:"heart"}),r("span",{children:Wt>0?fe(Wt):b(_t?{id:"OcUmcH"}:{id:"W9FRBT"})})]}),Zn("@mastodon/post-bookmark")&&r(At,{onClick:Gr,className:`menu-bookmark ${tt?"checked":""}`,children:[r(M,{icon:"bookmark"}),r("span",{children:b(tt?{id:"q8EQYI"}:{id:"PZlHt8"})})]})]})}),!ct&&I&&(ct||k)&&r(hn,{}),(ct||k)&&r(F,{children:r(At,{onClick:()=>{H.showGenericAccounts={heading:b({id:"+XOeb+"}),fetchAccounts:Aa,instance:C,showReactions:!0,postID:z}},children:[r(M,{icon:"react"}),r("span",{children:r(R,{id:"+XOeb+"})})]})}),(ct||!y&&(d||!Z||Le))&&r(hn,{}),!y&&(d||!Z||Le)&&r("div",{class:pr?"menu-horizontal":"",children:[d?r(At,{disabled:bo,onClick:()=>_a(!0),children:[r(M,{icon:"translate"}),r("span",{children:r(R,{id:"pi8x/S"})})]}):r(vi,{to:`${C?`/${C}`:""}/s/${U}?translate=1`,children:[r(M,{icon:"translate"}),r("span",{children:r(R,{id:"pi8x/S"})})]}),pr&&r(At,{onClick:()=>{try{const _=Jo(e);_&&xp(_,Z)}catch{}},children:[r(M,{icon:"speak"}),r("span",{children:r(R,{id:"yIBLq8"})})]})]}),ct&&r(At,{onClick:()=>{try{const _=Jo(e);navigator.clipboard.writeText(_),kt(b({id:"iSRQvy"}))}catch{kt(b({id:"N1MyiN"}))}},children:[r(M,{icon:"clipboard"}),r("span",{children:r(R,{id:"iQgJaz"})})]}),(!ct&&I||d||!Z||Le)&&r(hn,{}),!ct&&r(F,{children:r(vi,{to:C?`/${C}/s/${U}`:`/s/${U}`,onClick:_=>{v(_,e)},children:[r(M,{icon:"arrows-right"}),r("small",{children:[r(R,{id:"8MkSAW",values:{0:ft||nt},components:{0:r("span",{class:"bidi-isolate"})}}),r("br",{}),r("span",{class:"more-insignificant",children:[S(Re[gt])," • ",Kr]})]})]})}),!!It&&r(F,{children:r(At,{onClick:()=>{Pn(U)},children:[r(M,{icon:"history"}),r("small",{children:[r(R,{id:"QL+7Jw"}),r("br",{}),r("span",{class:"more-insignificant",children:r(R,{id:"DuJJm9",values:{editedDateText:Ur}})})]})]})}),r(At,{href:jt,target:"_blank",children:[r(M,{icon:"external"}),r("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:$g(jt)})]}),r("div",{class:"menu-horizontal",children:[r(At,{onClick:()=>{try{navigator.clipboard.writeText(jt),kt(b({id:"edWbV6"}))}catch{kt(b({id:"W1ewR0"}))}},children:[r(M,{icon:"link"}),r("span",{children:r(R,{id:"he3ygx"})})]}),Jr&&navigator?.share&&navigator?.canShare?.({url:jt})&&r(At,{onClick:()=>{try{navigator.share({url:jt})}catch{alert(b({id:"TtG3Uh"}))}},children:[r(M,{icon:"share"}),r("span",{children:r(R,{id:"LFKLqp"})})]})]}),Jr&&ct&&r(At,{onClick:()=>{To(!0)},children:[r(M,{icon:"code"}),r("span",{children:r(R,{id:"jdVwsS"})})]}),(de||He)&&r(hn,{}),(de||He)&&r(At,{onClick:async()=>{try{const _=await D.v1.statuses.$select(U)[Ct?"unmute":"mute"]();we(_,C),kt(b(Ct?{id:"Pm+5jw"}:{id:"ywB7JM"}))}catch{kt(b(Ct?{id:"c6jxNY"}:{id:"8SN9kN"}))}},children:Ct?r(F,{children:[r(M,{icon:"unmute"}),r("span",{children:r(R,{id:"i51zUR"})})]}):r(F,{children:[r(M,{icon:"mute"}),r("span",{children:r(R,{id:"OiUYO5"})})]})}),de&&Ca&&r(At,{onClick:async()=>{try{const _=await D.v1.statuses.$select(U)[Ft?"unpin":"pin"]();we(_,C),kt(b(Ft?{id:"Yx809+"}:{id:"S6P6E+"}))}catch{kt(b(Ft?{id:"A6cs15"}:{id:"vgUfWO"}))}},children:Ft?r(F,{children:[r(M,{icon:"unpin"}),r("span",{children:r(R,{id:"XQMQZw"})})]}):r(F,{children:[r(M,{icon:"pin"}),r("span",{children:r(R,{id:"lfHLsx"})})]})}),de&&r("div",{class:"menu-horizontal",children:[Zn("@mastodon/post-edit")&&r(At,{onClick:()=>{Kn({editStatus:e})},children:[r(M,{icon:"pencil"}),r("span",{children:r(R,{id:"ePK91l"})})]}),ct&&r(Ro,{subMenu:!0,confirmLabel:r(F,{children:[r(M,{icon:"trash"}),r("span",{children:r(R,{id:"FbPNuJ"})})]}),itemProps:{className:"danger"},menuItemClassName:"danger",onClick:()=>{(async()=>{try{await D.v1.statuses.$select(U).remove();const _=os(U,C);_._deleted=!0,kt(b({id:"KiyvHV"}))}catch{kt(b({id:"Yb6p2q"}))}})()},children:[r(M,{icon:"trash"}),r("span",{children:r(R,{id:"Jb6/SB"})})]})]}),!de&&ct&&r(F,{children:[r(hn,{}),r(At,{className:"danger",onClick:()=>{H.showReportModal={account:e.account,post:e}},children:[r(M,{icon:"flag"}),r("span",{children:r(R,{id:"7PQAMY"})})]})]})]}),ni=N(),[$n,dn]=V(!1),[oi,Nn]=V({}),Fn=w||!ct&&!u&&!Lt&&!p,Sa=Es(Ig&&Fn?_=>{if(_.pointerType==="mouse")return;const{clientX:$,clientY:st}=_.touches?.[0]||_,ht=_.target.closest("a");ht&&je.current.contains(ht)&&!ht.getAttribute("href").startsWith("#")||(_.preventDefault(),Nn({anchorPoint:{x:$,y:st},direction:"right"}),dn(!0))}:null,{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),zn=!a&&!u&&!p,xa=Ge("r, shift+r",On,{enabled:zn,useKey:!0,ignoreEventWhen:_=>_.metaKey||_.ctrlKey||_.altKey}),Ia=Ge("f, l",Co,{enabled:zn,ignoreEventWhen:_=>_.metaKey||_.ctrlKey||_.altKey||_.shiftKey,useKey:!0}),La=Ge("d",Gr,{enabled:zn,useKey:!0,ignoreEventWhen:_=>_.metaKey||_.ctrlKey||_.altKey||_.shiftKey}),Da=Ge("shift+b",_=>{_.shiftKey&&(async()=>{try{const $=await ko();!ct&&$&&kt(b(mt?{id:"bpDheH",values:{0:ft||nt}}:{id:"dbNZdP",values:{0:ft||nt}}))}catch{}})()},{enabled:zn&&un,useKey:!0,ignoreEventWhen:_=>_.metaKey||_.ctrlKey||_.altKey}),Ma=Ge("x",_=>{const $=document.activeElement.closest(".status-link, .status-focus");if($){const st=$.querySelector(".spoiler-button:not(.spoiling)");if(st)_.stopPropagation(),st.click();else{const ht=$.querySelector(".spoiler-media-button:not(.spoiling)");ht&&(_.stopPropagation(),ht.click())}}},{useKey:!0,ignoreEventWhen:_=>_.metaKey||_.ctrlKey||_.altKey||_.shiftKey}),Bn=it.slice(0,ct?void 0:4),Vn=it.length>1&&Bn.some(_=>!!_.description&&!oa(_.description)),Pa=lt(()=>{if(!Vn)return null;const _=[];return Bn.forEach(($,st)=>{if(!$.description)return;const ht=_.findIndex(oe=>oe.media.description===$.description);ht===-1?_.push({media:$,indices:[st]}):_[ht].indices.push(st)}),_.map(({media:$,indices:st})=>r("div",{"data-caption-index":st.map(ht=>ht+1).join(" "),onClick:ht=>{ht.preventDefault(),ht.stopPropagation(),H.showMediaAlt={alt:$.description,lang:Z}},title:$.description,children:[r("sup",{children:st.map(ht=>ht+1).join(" ")})," ",$.description]},$.id))},[Vn,Bn,Z]),Ke=lt(()=>!!W&&q===e.account?.id||!!B.statusThreadNumber[z],[W,q,e.account?.id,B.statusThreadNumber[z]]),Ra=lt(()=>s&&!Ke&&!c&&!W&&gt==="public"&&Tt>0,[s,Ke,c,W,Tt,gt]),ri=lt(()=>{if(j||pt||dt||J||it?.length||Ke||c||W||Tt<=0||!/[???︖❓❔⁇⁈⁉¿‽؟]/.test(at))return!1;const st=Uo(at);if(st>0&&st<=Ag)return!0},[j,pt,dt,J,it,Nt,Ke,c,W,Tt,at]);return r(va,{children:[T&&!!(W&&q)&&r(Eg,{sKey:z}),r("article",{"data-state-post-id":z,ref:_=>{je.current=_;const $=_?.closest?.(".timeline-item, .timeline-item-alt, .status-link, .status-focus")||_;xa.current=$,Ia.current=$,La.current=$,Da.current=$,Ma.current=$},tabindex:"-1",class:`status ${!c&&W&&ee?"status-reply-to":""} visibility-${gt} ${X?"status-pinned":""} ${Pg[o]} ${Lt?"status-deleted":""} ${p?"status-card":""} ${$n?"status-menu-open":""} ${y&&ye?"status-media-first":""}`,onMouseEnter:xe,onContextMenu:_=>{if(!Fn||_.metaKey)return;const $=_.target.closest("a");if($&&je.current.contains($)&&!$.getAttribute("href").startsWith("#"))return;const st=window.getSelection?.();if(st.toString().length>0){const{anchorNode:ht}=st;if(je.current?.contains(ht))return}_.preventDefault(),Nn({anchorPoint:{x:_.clientX,y:_.clientY},direction:"right"}),dn(!0)},...Fn?Sa():{},children:[Fn&&r(ms,{ref:ni,state:$n?"open":void 0,...oi,onClose:_=>{dn(!1),_?.reason==="click"&&je.current?.closest("[tabindex]")?.focus?.()},portal:{target:document.body},containerProps:{style:{zIndex:1001},onClick:()=>{ni.current?.closeMenu?.()}},overflow:"auto",boundingBoxPadding:ks(),unmountOnClose:!0,children:ei}),k&&o!=="l"&&!u&&!a&&!Lt&&!p&&r("div",{class:`status-actions ${$n==="actions-bar"?"open":""}`,ref:ka,children:[r(qe,{size:"s",title:b({id:"ImOQa9"}),alt:b({id:"ImOQa9"}),class:"reply-button",icon:"comment",iconSize:"m",onClick:On}),r(qe,{size:"s",checked:_t,title:[b({id:"W9FRBT"}),b({id:"OcUmcH"})],alt:[b({id:"W9FRBT"}),b({id:"8ab1sR"})],class:"favourite-button",icon:"heart",iconSize:"m",count:Wt,onClick:Co}),r("button",{type:"button",title:b({id:"2FYpfJ"}),class:"plain more-button",onClick:_=>{_.preventDefault(),_.stopPropagation(),Nn({anchorRef:{current:_.currentTarget},align:"start",direction:"left",gap:0,shift:-8}),dn("actions-bar")},children:r(M,{icon:"more2",size:"m",alt:b({id:"2FYpfJ"})})})]}),o!=="l"&&r("div",{class:"status-badge",children:[mt&&r(M,{class:"reblog",icon:"rocket",size:"s",alt:b({id:"b7T5Zj"})}),_t&&r(M,{class:"favourite",icon:"heart",size:"s",alt:b({id:"8ab1sR"})}),tt&&r(M,{class:"bookmark",icon:"bookmark",size:"s",alt:b({id:"1C/9Sa"})}),X&&r(M,{class:"pin",icon:"pin",size:"s",alt:b({id:"kNiQp6"})})]}),o!=="s"&&r("a",{href:et,tabindex:"-1",title:`@${nt}`,onClick:_=>{_.preventDefault(),_.stopPropagation(),H.showAccount={account:e.account,instance:C}},children:r(pe,{url:ot||vt,size:"xxl",squircle:Xt})}),r("div",{class:"container",children:[!!g&&r("div",{class:"status-quote-meta",children:r("span",{class:"domain",children:g})}),!!(e.account||Y)&&r("div",{class:"meta",children:[r("span",{class:"meta-name",children:r(Te,{account:e.account,instance:C,showAvatar:o==="s",showAcct:ct})}),c&&Ke&&r(ji,{showIcon:ct,index:B.statusThreadNumber[z]})," ",o!=="l"&&(Lt?r("span",{class:"status-deleted-tag",children:r(R,{id:"vGjmyl"})}):jt&&!u&&!a&&!p?r(Je,{to:C?`/${C}/s/${U}`:`/s/${U}`,onClick:_=>{_.metaKey||_.ctrlKey||_.shiftKey||_.altKey||_.which===2||(_.preventDefault(),_.stopPropagation(),v?.(_,e),Nn({anchorRef:{current:_.currentTarget},align:"end",direction:"bottom",gap:4}),dn(!0))},class:`time ${$n&&oi?.anchorRef?"is-open":""}`,children:[Ra&&!ri?r(M,{icon:"comment2",size:"s",alt:Dt._({id:"RXmXDR",values:{repliesCount:Tt}})}):gt!=="public"&&gt!=="direct"&&r(M,{icon:wn[gt],alt:S(Re[gt]),size:"s"})," ",r(me,{datetime:Gt,format:"micro"}),!u&&!a&&r(M,{icon:"more2",class:"more",alt:b({id:"2FYpfJ"})})]}):r("span",{class:"time",children:[gt!=="public"&&gt!=="direct"&&r(F,{children:[r(M,{icon:wn[gt],alt:S(Re[gt]),size:"s"})," "]}),r(me,{datetime:Gt,format:"micro"})]}))]}),gt==="direct"&&r(F,{children:[r("div",{class:"status-direct-badge",children:r(R,{id:"IV4QaU"})})," "]}),!c&&r(F,{children:Ke?r(ji,{showIcon:!0,showText:!0,index:B.statusThreadNumber[z]}):!!W&&!!ee&&(!!J||!Pt.find(_=>_.id===q))&&r("div",{class:"status-reply-badge",children:[r(M,{icon:"reply"})," ",r(Te,{account:ee,instance:C,short:!0})]})}),r("div",{class:`content-container ${J||dt||qt?.action==="blur"?"has-spoiler":""} ${ne?"show-spoiler":""} ${ln?"show-media":""}`,"data-content-text-weight":i?jr():null,style:(ct||i)&&{"--content-text-weight":jr()},children:y&&ye?r(F,{children:[(!!J||!!dt)&&!be&&r(F,{children:[!!J&&r("span",{class:"spoiler-content media-first-spoiler-content",lang:Z,dir:"auto",ref:Hr,"data-read-more":S(Tn),children:[r(nn,{text:J,emojis:yt})," "]}),r("button",{class:`light spoiler-button media-first-spoiler-button ${ne?"spoiling":""}`,type:"button",onClick:_=>{_.preventDefault(),_.stopPropagation(),ne?(delete H.spoilers[U],be||delete H.spoilersMedia[U]):(H.spoilers[U]=!0,be||(H.spoilersMedia[U]=!0))},children:[r(M,{icon:ne?"eye-open":"eye-close"})," ",b(ne?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),r(ug,{mediaAttachments:it,language:Z,postID:U,instance:C}),!!at&&r("div",{class:"media-first-content content",ref:Ao,children:r(Ni,{post:e,instance:C,previewMode:u})})]}):r(F,{children:[!!J&&r(F,{children:[r("div",{class:"content spoiler-content",lang:Z,dir:"auto",ref:Hr,"data-read-more":S(Tn),children:r("p",{children:r(nn,{text:J,emojis:yt})})}),be||u?r("div",{class:"spoiler-divider",children:[r(M,{icon:"eye-open"})," ",r(R,{id:"gnKo7f"})]}):r("button",{class:`light spoiler-button ${ne?"spoiling":""}`,type:"button",onClick:_=>{_.preventDefault(),_.stopPropagation(),ne?(delete H.spoilers[U],be||delete H.spoilersMedia[U]):(H.spoilers[U]=!0,be||(H.spoilersMedia[U]=!0))},children:[r(M,{icon:ne?"eye-open":"eye-close"})," ",b(ne?{id:"6lGV3K"}:{id:"lqBX03"})]})]}),!!at&&r("div",{class:"content",ref:Ao,"data-read-more":S(Tn),inert:J&&!ne?!0:void 0,children:r(Ni,{post:e,instance:C,previewMode:u},wa)}),!!at&&r(Op,{content:at,contentRef:Ao,onRevert:Ea}),!!pt&&r(hg,{lang:Z,poll:pt,readOnly:a||!I||!L,onUpdate:_=>{H.statuses[z].poll=_},refresh:()=>D.v1.polls.$select(pt.id).fetch().then(_=>{H.statuses[z].poll=_}).catch(_=>{}),votePoll:_=>D.v1.polls.$select(pt.id).votes.create({choices:_}).then($=>{H.statuses[z].poll=$}).catch($=>{})}),((d||Vr)&&Dg(at,yt)&&Le||bo)&&r(pp,{forceTranslate:bo||Vr,mini:!ct&&!c,sourceLanguage:Z,autoDetected:zt,text:Jo(e,{maskCustomEmojis:!0,maskURLs:!0})}),!u&&(dt||qt?.action==="blur")&&!!it.length&&(zr!=="show_all"||qt?.action==="blur")&&r("button",{class:`plain spoiler-media-button ${ln?"spoiling":""}`,type:"button",hidden:!be&&!!J,onClick:_=>{_.preventDefault(),_.stopPropagation(),ln?delete H.spoilersMedia[U]:H.spoilersMedia[U]=!0},children:[r(M,{icon:ln?"eye-open":"eye-close"})," ",r("span",{children:[qt?.action==="blur"&&r("small",{children:[r(R,{id:"suKjh3",values:{0:qt?.titlesStr}}),r("br",{})]}),b(ln?{id:"6lGV3K"}:{id:"9ZCilh"})]})]}),!!it.length&&(it.length>1&&(ct||c&&o==="m")?r("div",{class:"media-large-container",children:it.map((_,$)=>r("div",{class:"media-container media-eq1",children:r(gr,{media:_,autoAnimate:!0,showCaption:!0,allowLongerCaption:!at||ct,lang:Z,to:`/${C}/s/${U}?${c?"media":"media-only"}=${$+1}`,onClick:m?st=>m(st,$,_,e):void 0})},_.id))}):r(dg,{lang:Z,enabled:Vn,captionChildren:Pa,children:r("div",{ref:ba,class:`media-container media-eq${it.length} ${it.length>2?"media-gt2":""} ${it.length>4?"media-gt4":""}`,children:Bn.map((_,$)=>r(gr,{media:_,autoAnimate:ct,showCaption:it.length===1,allowLongerCaption:!at&&it.length===1,lang:Z,altIndex:Vn&&!!_.description&&$+1,to:`/${C}/s/${U}?${c?"media":"media-only"}=${$+1}`,onClick:m?st=>{m(st,$,_,e)}:void 0,checkAspectRatio:it.length===1},_.id))})})),r(zg,{id:U,instance:C,level:p}),!!j&&/^https/i.test(j?.url)&&!dt&&!J&&!pt&&!it.length&&!B.statusQuotes[z]&&r(wg,{card:j,selfReferential:j?.url===e.url||j?.url===e.uri,selfAuthor:j?.authors?.some(_=>_.account?.url===et),instance:O})]})}),!ct&&ri&&r("div",{class:"content-comment-hint insignificant",children:[r(M,{icon:"comment2",alt:b({id:"N8UzTV"})})," ",Tt]}),ct&&r(F,{children:[r("div",{class:"extra-meta",children:Lt?r("span",{class:"status-deleted-tag",children:r(R,{id:"vGjmyl"})}):r(F,{children:[r("span",{children:S(Re[gt])})," •"," ",r("a",{href:jt,target:"_blank",rel:"noopener",children:[Date.now()-Gt.getTime()<864e5&&r(F,{children:[r(me,{datetime:Gt,format:"micro"})," ",""," "]}),!!Y&&r("time",{class:"created",datetime:Gt.toISOString(),title:Gt.toLocaleString(),children:Kr})]}),It&&r("span",{class:"edited-container",children:[" ","• ",r(M,{icon:"pencil",alt:b({id:"MRZxAn"})})," ",r("time",{tabIndex:"0",class:"edited",datetime:Mn.toISOString(),onClick:()=>{Pn(U)},children:Ur})]})]})}),!!St?.length&&r("div",{class:"emoji-reactions",children:St.map(_=>{const{name:$,count:st,me:ht,url:oe,staticUrl:Oa}=_;if(oe)return r("span",{class:`emoji-reaction tag ${ht?"":"insignificant"}`,children:[r(ur,{alt:$,url:oe,staticUrl:Oa})," ",st]});if(/^:.+?:$/.test($)){const xo=yt.find($a=>$a.shortcode===$.replace(/^:/,"").replace(/:$/,""));if(xo)return r("span",{class:`emoji-reaction tag ${ht?"":"insignificant"}`,children:[r(ur,{alt:$,url:xo.url,staticUrl:xo.staticUrl})," ",st]})}return r("span",{class:`emoji-reaction tag ${ht?"":"insignificant"}`,children:[$," ",st]})})}),r("div",{class:`actions ${Lt?"disabled":""}`,children:[r("div",{class:"action has-count",children:r(qe,{title:b({id:"ImOQa9"}),alt:b({id:"VbyRUy"}),class:"reply-button",icon:"comment",count:Tt,onClick:On})}),r("div",{class:"action has-count",children:r(Ro,{disabled:!un,onClick:ko,confirmLabel:r(F,{children:[r(M,{icon:"rocket"}),r("span",{children:b(mt?{id:"QzzGsY"}:{id:"kulphB"})})]}),menuExtras:r(At,{onClick:()=>{Kn({draftStatus:{status:`
${jt}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(R,{id:"ZhhOwV"})})]}),menuFooter:ti,children:r(qe,{checked:mt,title:[b({id:"kulphB"}),b({id:"QzzGsY"})],alt:[b({id:"kulphB"}),b({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:te,disabled:!un})})}),r("div",{class:"action has-count",children:r(qe,{checked:_t,title:[b({id:"W9FRBT"}),b({id:"OcUmcH"})],alt:[b({id:"W9FRBT"}),b({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:Wt,onClick:Zr})}),Zn("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(qe,{checked:tt,title:[b({id:"PZlHt8"}),b({id:"q8EQYI"})],alt:[b({id:"PZlHt8"}),b({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:qr})}),r(Is,{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:b({id:"2FYpfJ"}),class:"plain more-button",children:r(M,{icon:"more",size:"l",alt:b({id:"2FYpfJ"})})})}),children:[ei," "]})]})]})]}),!!Eo&&r(ar,{onClick:_=>{_.target===_.currentTarget&&Pn(!1)},children:r(Bg,{statusID:Eo,instance:C,fetchStatusHistory:()=>D.v1.statuses.$select(Eo).history.list(),onClose:()=>{Pn(!1),je.current?.focus()}})}),!!ya&&r(ar,{onClick:_=>{_.target===_.currentTarget&&To(!1)},children:r(yg,{post:e,instance:C,onClose:()=>{To(!1)}})})]})]})}function $g(t){if(!t)return;const e=URL.parse(t);if(!e)return;const{host:n,pathname:o}=e,i=o.replace(/\/$/,""),[a,s,c]=i.match(/\/(@[^\/]+)\/(.*)/)||[];return r(F,{children:[Fs.toUnicode(n),s?r(F,{children:["/",s,r("wbr",{}),r("span",{class:"more-insignificant",children:["/",c]})]}):r("span",{class:"more-insignificant",children:i})]})}const Ng=["deleted","unauthorized","pending","rejected","revoked"],Fg={filterHidden:{id:"XC9Jpz"},pending:{id:"ptPep5"},deleted:{id:"2C0g0G"},unauthorized:{id:"2C0g0G"},rejected:{id:"2C0g0G"},revoked:{id:"5bAOta"}},zg=rn(({id:t,instance:e,level:n=0})=>{if(!t||!e)return;const{_:o}=Yt(),i=Ln(H),a=ce(t,e),c=i.statusQuotes[a]?.filter((u,f,m)=>m.findIndex(p=>p.url===u.url)===f);if(!c?.length||n>2)return;const l=xt($r),d=Cr(),h=bn();return r("div",{class:"status-card-container",ref:h,children:c.map(u=>{let f;const m=i.statuses[ce(u.id,u.instance)];if(m&&(!(d&&d===m.account?.id)&&yo(m.filtered,l))?.action==="hide"&&(f="filterHidden"),f||(f=Ng.find(g=>u.state===g)),f)return r("div",{class:`status-card-unfulfilled ${f==="filterHidden"?"status-card-ghost":""}`,children:[r(M,{icon:"quote"}),r("i",{children:o(Fg[f])})]});const p=u.native?F:Ks;return r(p,{id:u.instance+u.id,children:r(Je,{to:`${u.instance?`/${u.instance}`:""}/s/${u.id}`,class:`status-card-link ${u.native?"quote-post-native":""}`,"data-read-more":o(Tn),children:r(on,{statusID:u.id,instance:u.instance,size:"s",quoted:n+1,quoteDomain:u.originalDomain,enableCommentHint:!0})},u.instance+u.id)},u.instance+u.id)})})});function Bg({statusID:t,instance:e,fetchStatusHistory:n=()=>{},onClose:o}){const{_:i}=Yt(),[a,s]=V("default"),[c,l]=V([]);return Q(()=>{s("loading"),(async()=>{try{const d=await n();l(d),s("default")}catch{s("error")}})()},[]),r("div",{id:"edit-history",class:"sheet",children:[!!o&&r("button",{type:"button",class:"sheet-close",onClick:o,children:r(M,{icon:"x",alt:i({id:"yz7wBu"})})}),r("header",{children:[r("h2",{children:r(R,{id:"OKiofn"})}),a==="error"&&r("p",{children:r(R,{id:"EANWES"})}),a==="loading"&&r("p",{children:[r(ns,{abrupt:!0})," ",r(R,{id:"Pwqkdw"})]})]}),r("main",{tabIndex:"-1",children:c.length>0&&r("ol",{children:c.map(d=>{const{createdAt:h}=d,u=new Date(h);return r("li",{class:"history-item",children:[r("h3",{children:r("time",{children:Sn(u,{formatOpts:{weekday:"short",second:"numeric"}})})}),r(on,{status:d,instance:e,size:"s",withinContext:!0,readOnly:!0,previewMode:!0})]},h)})})})]})}function Vg({status:t,filterInfo:e,instance:n,containerProps:o={},showFollowedTags:i,quoted:a}){const{_:s,_:c}=Yt(),l=Ln(H),{id:d,account:{avatar:h,avatarStatic:u,bot:f,group:m},createdAt:p,visibility:g,reblog:v}=t,E=!!v,w=e?.titlesStr||"",k=new Date(p),T=Cs(t.reblog||t),[y,S]=V(!1),b=Es(()=>{S(!0)},{threshold:600,captureEvent:!0,detect:"touch",cancelOnMovement:2}),x=bn(),P=ce(t.id,n),D=ce(t.id,n)+" "+(ce(v?.id,n)||""),C=v?.id||d,L=n?`/${n}/s/${C}`:`/s/${C}`,O=i&&!!l.statusFollowedTags[P]?.length;return r("div",{class:`${a?"":E?m?"status-group":"status-reblog":O?"status-followed-tags":""} visibility-${g}`,...o,onContextMenu:I=>{I.preventDefault(),S(!0)},...b(),children:[r("article",{"data-state-post-id":D,class:`status filtered ${a?"status-card":""}`,tabindex:"-1",children:[r("b",{class:"status-filtered-badge clickable badge-meta",title:w,onClick:I=>{I.preventDefault(),S(!0)},children:[r("span",{children:r(R,{id:"03Qqf9"})}),r("span",{children:w})]})," ",r(pe,{url:u||h,squircle:f}),r("span",{class:"status-filtered-info",children:[r("span",{class:"status-filtered-info-1",children:E?r(R,{id:"zJyf/5",components:{0:r(Te,{account:t.account,instance:n}),1:r(M,{icon:wn[g],alt:s(Re[g]),size:"s"})}}):O?r(F,{children:[r(Te,{account:t.account,instance:n})," ",r(M,{icon:wn[g],alt:s(Re[g]),size:"s"})," ",r("span",{children:l.statusFollowedTags[P].slice(0,3).map(I=>r("span",{class:"status-followed-tag-item",children:["#",I]},I))})]}):r(F,{children:[r(Te,{account:t.account,instance:n})," ",r(M,{icon:wn[g],alt:s(Re[g]),size:"s"})," ",r(me,{datetime:k,format:"micro"})]})}),r("span",{class:"status-filtered-info-2",children:[E&&r(F,{children:[r(pe,{url:v.account.avatarStatic||v.account.avatar,squircle:f})," "]}),T]})]})]}),!!y&&r(ar,{onClick:I=>{I.target===I.currentTarget&&S(!1)},children:r("div",{id:"filtered-status-peek",class:"sheet",children:[r("button",{type:"button",class:"sheet-close",onClick:()=>S(!1),children:r(M,{icon:"x",alt:c({id:"yz7wBu"})})}),r("header",{children:[r("b",{class:"status-filtered-badge",children:r(R,{id:"03Qqf9"})})," ",w]}),r("main",{tabIndex:"-1",children:r(Je,{ref:x,class:"status-link",to:L,onClick:()=>{S(!1)},"data-read-more":s(Tn),children:r(on,{status:t,instance:n,size:"s",readOnly:!0})})})]})})]})}const Yv=rn(on,(t,e)=>{const{status:n,...o}=t,{status:i,...a}=e;return n?.id===i?.id&&tc(o,a)});var Ui=36,sa="";for(;Ui--;)sa+=Ui.toString(36);function Xv(t){for(var e="",n=t||11;n--;)e+=sa[Math.random()*36|0];return e}function ge(t){return Array.isArray?Array.isArray(t):la(t)==="[object Array]"}const Hg=1/0;function jg(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-Hg?"-0":e}function Kg(t){return t==null?"":jg(t)}function ae(t){return typeof t=="string"}function aa(t){return typeof t=="number"}function Ug(t){return t===!0||t===!1||Wg(t)&&la(t)=="[object Boolean]"}function ca(t){return typeof t=="object"}function Wg(t){return ca(t)&&t!==null}function Kt(t){return t!=null}function tr(t){return!t.trim().length}function la(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Zg="Incorrect 'index' type",qg=t=>`Invalid value for key ${t}`,Gg=t=>`Pattern length exceeds max of ${t}.`,Yg=t=>`Missing ${t} property in key`,Xg=t=>`Property 'weight' in key '${t}' must be a positive integer`,Wi=Object.prototype.hasOwnProperty;class Qg{constructor(e){this._keys=[],this._keyMap={};let n=0;e.forEach(o=>{let i=ua(o);this._keys.push(i),this._keyMap[i.id]=i,n+=i.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 ua(t){let e=null,n=null,o=null,i=1,a=null;if(ae(t)||ge(t))o=t,e=Zi(t),n=yr(t);else{if(!Wi.call(t,"name"))throw new Error(Yg("name"));const s=t.name;if(o=s,Wi.call(t,"weight")&&(i=t.weight,i<=0))throw new Error(Xg(s));e=Zi(s),n=yr(s),a=t.getFn}return{path:e,id:n,weight:i,src:o,getFn:a}}function Zi(t){return ge(t)?t:t.split(".")}function yr(t){return ge(t)?t.join("."):t}function Jg(t,e){let n=[],o=!1;const i=(a,s,c)=>{if(Kt(a))if(!s[c])n.push(a);else{let l=s[c];const d=a[l];if(!Kt(d))return;if(c===s.length-1&&(ae(d)||aa(d)||Ug(d)))n.push(Kg(d));else if(ge(d)){o=!0;for(let h=0,u=d.length;h<u;h+=1)i(d[h],s,c+1)}else s.length&&i(d,s,c+1)}};return i(t,ae(e)?e.split("."):e,0),o?n:n[0]}const tv={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},ev={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},nv={location:0,threshold:.6,distance:100},ov={useExtendedSearch:!1,getFn:Jg,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var K={...ev,...tv,...nv,...ov};const rv=/[^ ]+/g;function iv(t=1,e=3){const n=new Map,o=Math.pow(10,e);return{get(i){const a=i.match(rv).length;if(n.has(a))return n.get(a);const s=1/Math.pow(a,.5*t),c=parseFloat(Math.round(s*o)/o);return n.set(a,c),c},clear(){n.clear()}}}class Fr{constructor({getFn:e=K.getFn,fieldNormWeight:n=K.fieldNormWeight}={}){this.norm=iv(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,ae(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();ae(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(!Kt(e)||tr(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((i,a)=>{let s=i.getFn?i.getFn(e):this.getFn(e,i.path);if(Kt(s)){if(ge(s)){let c=[];const l=[{nestedArrIndex:-1,value:s}];for(;l.length;){const{nestedArrIndex:d,value:h}=l.pop();if(Kt(h))if(ae(h)&&!tr(h)){let u={v:h,i:d,n:this.norm.get(h)};c.push(u)}else ge(h)&&h.forEach((u,f)=>{l.push({nestedArrIndex:f,value:u})})}o.$[a]=c}else if(ae(s)&&!tr(s)){let c={v:s,n:this.norm.get(s)};o.$[a]=c}}}),this.records.push(o)}toJSON(){return{keys:this.keys,records:this.records}}}function da(t,e,{getFn:n=K.getFn,fieldNormWeight:o=K.fieldNormWeight}={}){const i=new Fr({getFn:n,fieldNormWeight:o});return i.setKeys(t.map(ua)),i.setSources(e),i.create(),i}function sv(t,{getFn:e=K.getFn,fieldNormWeight:n=K.fieldNormWeight}={}){const{keys:o,records:i}=t,a=new Fr({getFn:e,fieldNormWeight:n});return a.setKeys(o),a.setIndexRecords(i),a}function to(t,{errors:e=0,currentLocation:n=0,expectedLocation:o=0,distance:i=K.distance,ignoreLocation:a=K.ignoreLocation}={}){const s=e/t.length;if(a)return s;const c=Math.abs(o-n);return i?s+c/i:c?1:s}function av(t=[],e=K.minMatchCharLength){let n=[],o=-1,i=-1,a=0;for(let s=t.length;a<s;a+=1){let c=t[a];c&&o===-1?o=a:!c&&o!==-1&&(i=a-1,i-o+1>=e&&n.push([o,i]),o=-1)}return t[a-1]&&a-o>=e&&n.push([o,a-1]),n}const Pe=32;function cv(t,e,n,{location:o=K.location,distance:i=K.distance,threshold:a=K.threshold,findAllMatches:s=K.findAllMatches,minMatchCharLength:c=K.minMatchCharLength,includeMatches:l=K.includeMatches,ignoreLocation:d=K.ignoreLocation}={}){if(e.length>Pe)throw new Error(Gg(Pe));const h=e.length,u=t.length,f=Math.max(0,Math.min(o,u));let m=a,p=f;const g=c>1||l,v=g?Array(u):[];let E;for(;(E=t.indexOf(e,p))>-1;){let b=to(e,{currentLocation:E,expectedLocation:f,distance:i,ignoreLocation:d});if(m=Math.min(b,m),p=E+h,g){let x=0;for(;x<h;)v[E+x]=1,x+=1}}p=-1;let w=[],k=1,T=h+u;const y=1<<h-1;for(let b=0;b<h;b+=1){let x=0,P=T;for(;x<P;)to(e,{errors:b,currentLocation:f+P,expectedLocation:f,distance:i,ignoreLocation:d})<=m?x=P:T=P,P=Math.floor((T-x)/2+x);T=P;let D=Math.max(1,f-P+1),C=s?u:Math.min(f+P,u)+h,L=Array(C+2);L[C+1]=(1<<b)-1;for(let I=C;I>=D;I-=1){let z=I-1,B=n[t.charAt(z)];if(g&&(v[z]=+!!B),L[I]=(L[I+1]<<1|1)&B,b&&(L[I]|=(w[I+1]|w[I])<<1|1|w[I+1]),L[I]&y&&(k=to(e,{errors:b,currentLocation:z,expectedLocation:f,distance:i,ignoreLocation:d}),k<=m)){if(m=k,p=z,p<=f)break;D=Math.max(1,2*f-p)}}if(to(e,{errors:b+1,currentLocation:f,expectedLocation:f,distance:i,ignoreLocation:d})>m)break;w=L}const S={isMatch:p>=0,score:Math.max(.001,k)};if(g){const b=av(v,c);b.length?l&&(S.indices=b):S.isMatch=!1}return S}function lv(t){let e={};for(let n=0,o=t.length;n<o;n+=1){const i=t.charAt(n);e[i]=(e[i]||0)|1<<o-n-1}return e}const fo=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 ha{constructor(e,{location:n=K.location,threshold:o=K.threshold,distance:i=K.distance,includeMatches:a=K.includeMatches,findAllMatches:s=K.findAllMatches,minMatchCharLength:c=K.minMatchCharLength,isCaseSensitive:l=K.isCaseSensitive,ignoreDiacritics:d=K.ignoreDiacritics,ignoreLocation:h=K.ignoreLocation}={}){if(this.options={location:n,threshold:o,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:d,ignoreLocation:h},e=l?e:e.toLowerCase(),e=d?fo(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const u=(m,p)=>{this.chunks.push({pattern:m,alphabet:lv(m),startIndex:p})},f=this.pattern.length;if(f>Pe){let m=0;const p=f%Pe,g=f-p;for(;m<g;)u(this.pattern.substr(m,Pe),m),m+=Pe;if(p){const v=f-Pe;u(this.pattern.substr(v),v)}}else u(this.pattern,0)}searchIn(e){const{isCaseSensitive:n,ignoreDiacritics:o,includeMatches:i}=this.options;if(e=n?e:e.toLowerCase(),e=o?fo(e):e,this.pattern===e){let g={isMatch:!0,score:0};return i&&(g.indices=[[0,e.length-1]]),g}const{location:a,distance:s,threshold:c,findAllMatches:l,minMatchCharLength:d,ignoreLocation:h}=this.options;let u=[],f=0,m=!1;this.chunks.forEach(({pattern:g,alphabet:v,startIndex:E})=>{const{isMatch:w,score:k,indices:T}=cv(e,g,v,{location:a+E,distance:s,threshold:c,findAllMatches:l,minMatchCharLength:d,includeMatches:i,ignoreLocation:h});w&&(m=!0),f+=k,w&&T&&(u=[...u,...T])});let p={isMatch:m,score:m?f/this.chunks.length:1};return m&&i&&(p.indices=u),p}}class Ce{constructor(e){this.pattern=e}static isMultiMatch(e){return qi(e,this.multiRegex)}static isSingleMatch(e){return qi(e,this.singleRegex)}search(){}}function qi(t,e){const n=t.match(e);return n?n[1]:null}class uv extends Ce{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 dv extends Ce{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 hv extends Ce{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 fv extends Ce{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 mv extends Ce{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 pv extends Ce{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 fa extends Ce{constructor(e,{location:n=K.location,threshold:o=K.threshold,distance:i=K.distance,includeMatches:a=K.includeMatches,findAllMatches:s=K.findAllMatches,minMatchCharLength:c=K.minMatchCharLength,isCaseSensitive:l=K.isCaseSensitive,ignoreDiacritics:d=K.ignoreDiacritics,ignoreLocation:h=K.ignoreLocation}={}){super(e),this._bitapSearch=new ha(e,{location:n,threshold:o,distance:i,includeMatches:a,findAllMatches:s,minMatchCharLength:c,isCaseSensitive:l,ignoreDiacritics:d,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class ma extends Ce{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let n=0,o;const i=[],a=this.pattern.length;for(;(o=e.indexOf(this.pattern,n))>-1;)n=o+a,i.push([o,n-1]);const s=!!i.length;return{isMatch:s,score:s?0:1,indices:i}}}const br=[uv,ma,hv,fv,pv,mv,dv,fa],Gi=br.length,gv=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,vv="|";function _v(t,e={}){return t.split(vv).map(n=>{let o=n.trim().split(gv).filter(a=>a&&!!a.trim()),i=[];for(let a=0,s=o.length;a<s;a+=1){const c=o[a];let l=!1,d=-1;for(;!l&&++d<Gi;){const h=br[d];let u=h.isMultiMatch(c);u&&(i.push(new h(u,e)),l=!0)}if(!l)for(d=-1;++d<Gi;){const h=br[d];let u=h.isSingleMatch(c);if(u){i.push(new h(u,e));break}}}return i})}const yv=new Set([fa.type,ma.type]);class bv{constructor(e,{isCaseSensitive:n=K.isCaseSensitive,ignoreDiacritics:o=K.ignoreDiacritics,includeMatches:i=K.includeMatches,minMatchCharLength:a=K.minMatchCharLength,ignoreLocation:s=K.ignoreLocation,findAllMatches:c=K.findAllMatches,location:l=K.location,threshold:d=K.threshold,distance:h=K.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:o,includeMatches:i,minMatchCharLength:a,findAllMatches:c,ignoreLocation:s,location:l,threshold:d,distance:h},e=n?e:e.toLowerCase(),e=o?fo(e):e,this.pattern=e,this.query=_v(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:i,ignoreDiacritics:a}=this.options;e=i?e:e.toLowerCase(),e=a?fo(e):e;let s=0,c=[],l=0;for(let d=0,h=n.length;d<h;d+=1){const u=n[d];c.length=0,s=0;for(let f=0,m=u.length;f<m;f+=1){const p=u[f],{isMatch:g,indices:v,score:E}=p.search(e);if(g){if(s+=1,l+=E,o){const w=p.constructor.type;yv.has(w)?c=[...c,...v]:c.push(v)}}else{l=0,s=0,c.length=0;break}}if(s){let f={isMatch:!0,score:l/s};return o&&(f.indices=c),f}}return{isMatch:!1,score:1}}}const wr=[];function wv(...t){wr.push(...t)}function Er(t,e){for(let n=0,o=wr.length;n<o;n+=1){let i=wr[n];if(i.condition(t,e))return new i(t,e)}return new ha(t,e)}const mo={AND:"$and",OR:"$or"},Tr={PATH:"$path",PATTERN:"$val"},Ar=t=>!!(t[mo.AND]||t[mo.OR]),Ev=t=>!!t[Tr.PATH],Tv=t=>!ge(t)&&ca(t)&&!Ar(t),Yi=t=>({[mo.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function pa(t,e,{auto:n=!0}={}){const o=i=>{let a=Object.keys(i);const s=Ev(i);if(!s&&a.length>1&&!Ar(i))return o(Yi(i));if(Tv(i)){const l=s?i[Tr.PATH]:a[0],d=s?i[Tr.PATTERN]:i[l];if(!ae(d))throw new Error(qg(l));const h={keyId:yr(l),pattern:d};return n&&(h.searcher=Er(d,e)),h}let c={children:[],operator:a[0]};return a.forEach(l=>{const d=i[l];ge(d)&&d.forEach(h=>{c.children.push(o(h))})}),c};return Ar(t)||(t=Yi(t)),o(t)}function Av(t,{ignoreFieldNorm:e=K.ignoreFieldNorm}){t.forEach(n=>{let o=1;n.matches.forEach(({key:i,norm:a,score:s})=>{const c=i?i.weight:null;o*=Math.pow(s===0&&c?Number.EPSILON:s,(c||1)*(e?1:a))}),n.score=o})}function kv(t,e){const n=t.matches;e.matches=[],Kt(n)&&n.forEach(o=>{if(!Kt(o.indices)||!o.indices.length)return;const{indices:i,value:a}=o;let s={indices:i,value:a};o.key&&(s.key=o.key.src),o.idx>-1&&(s.refIndex=o.idx),e.matches.push(s)})}function Cv(t,e){e.score=t.score}function Sv(t,e,{includeMatches:n=K.includeMatches,includeScore:o=K.includeScore}={}){const i=[];return n&&i.push(kv),o&&i.push(Cv),t.map(a=>{const{idx:s}=a,c={item:e[s],refIndex:s};return i.length&&i.forEach(l=>{l(a,c)}),c})}class Dn{constructor(e,n={},o){this.options={...K,...n},this.options.useExtendedSearch,this._keyStore=new Qg(this.options.keys),this.setCollection(e,o)}setCollection(e,n){if(this._docs=e,n&&!(n instanceof Fr))throw new Error(Zg);this._myIndex=n||da(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){Kt(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const n=[];for(let o=0,i=this._docs.length;o<i;o+=1){const a=this._docs[o];e(a,o)&&(this.removeAt(o),o-=1,i-=1,n.push(a))}return n}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:n=-1}={}){const{includeMatches:o,includeScore:i,shouldSort:a,sortFn:s,ignoreFieldNorm:c}=this.options;let l=ae(e)?ae(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Av(l,{ignoreFieldNorm:c}),a&&l.sort(s),aa(n)&&n>-1&&(l=l.slice(0,n)),Sv(l,this._docs,{includeMatches:o,includeScore:i})}_searchStringList(e){const n=Er(e,this.options),{records:o}=this._myIndex,i=[];return o.forEach(({v:a,i:s,n:c})=>{if(!Kt(a))return;const{isMatch:l,score:d,indices:h}=n.searchIn(a);l&&i.push({item:a,idx:s,matches:[{score:d,value:a,norm:c,indices:h}]})}),i}_searchLogical(e){const n=pa(e,this.options),o=(c,l,d)=>{if(!c.children){const{keyId:u,searcher:f}=c,m=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(l,u),searcher:f});return m&&m.length?[{idx:d,item:l,matches:m}]:[]}const h=[];for(let u=0,f=c.children.length;u<f;u+=1){const m=c.children[u],p=o(m,l,d);if(p.length)h.push(...p);else if(c.operator===mo.AND)return[]}return h},i=this._myIndex.records,a={},s=[];return i.forEach(({$:c,i:l})=>{if(Kt(c)){let d=o(n,c,l);d.length&&(a[l]||(a[l]={idx:l,item:c,matches:[]},s.push(a[l])),d.forEach(({matches:h})=>{a[l].matches.push(...h)}))}}),s}_searchObjectList(e){const n=Er(e,this.options),{keys:o,records:i}=this._myIndex,a=[];return i.forEach(({$:s,i:c})=>{if(!Kt(s))return;let l=[];o.forEach((d,h)=>{l.push(...this._findMatches({key:d,value:s[h],searcher:n}))}),l.length&&a.push({idx:c,item:s,matches:l})}),a}_findMatches({key:e,value:n,searcher:o}){if(!Kt(n))return[];let i=[];if(ge(n))n.forEach(({v:a,i:s,n:c})=>{if(!Kt(a))return;const{isMatch:l,score:d,indices:h}=o.searchIn(a);l&&i.push({score:d,key:e,value:a,idx:s,norm:c,indices:h})});else{const{v:a,n:s}=n,{isMatch:c,score:l,indices:d}=o.searchIn(a);c&&i.push({score:l,key:e,value:a,norm:s,indices:d})}return i}}Dn.version="7.1.0";Dn.createIndex=da;Dn.parseIndex=sv;Dn.config=K;Dn.parseQuery=pa;wv(bv);const xv=6*60*1e3,Iv=90*24*60*60*1e3;function Qv({scheduledAt:t,setScheduledAt:e}){if(!t||!(t instanceof Date))return;const[n,o]=V(),[i,a]=V(),s=t.getTimezoneOffset();Q(()=>{function l(){const u=new Date(Date.now()+xv),f=new Date(u.getTime()-s*6e4).toISOString().slice(0,16);o(f)}l();function d(){const u=new Date(Date.now()+Iv),f=new Date(u.getTime()-s*6e4).toISOString().slice(0,16);a(f)}d();const h=setInterval(()=>{l(),d()},1e3*10);return()=>clearInterval(h)},[]);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:i,required:!0,onChange:l=>{e(new Date(l.target.value))}})}function Jv(){const t=new Date;return new Intl.DateTimeFormat(void 0,{timeZoneName:"long"}).formatToParts(t).find(i=>i.type==="timeZoneName")?.value}export{Hv as $,pe as A,zm as B,ms as C,fe as D,nn as E,Bv as F,Yv as G,zv as H,M as I,pr as J,xp as K,Je as L,vi as M,Te as N,lr as O,Nr as P,gr as Q,me as R,yl as S,pp as T,ur as U,Es as V,yo as W,bn as X,Lp as Y,$r as Z,Ip as _,sl as a,ji as a0,Xv as a1,Uo as a2,hr as a3,Pv as a4,Yc as a5,Rv as a6,Dn as a7,Jv as a8,Qv as a9,kp as aa,lg as ab,Vv as ac,Qm as ad,Tg as ae,_c as af,Ss as ag,no as ah,Oe as ai,xv as aj,xs as ak,wl as al,Mp as am,wn as an,Re as ao,Kn as b,ks as c,hn as d,At as e,Cs as f,ar as g,Is as h,Ro as i,zs as j,Bs as k,mn as l,Fs as m,Sn as n,cl as o,Ov as p,Zn as q,Nv as r,kt as s,$v as t,Mv as u,_o as v,Ge as w,Fv as x,ho as y,Vs as z};
//# sourceMappingURL=ScheduledAtField-CQDO0gVJ.js.map