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