phanpy-cz/assets/fuse-sLNor9NY.js

184 lines
199 KiB
JavaScript
Raw Permalink Normal View History

2024-06-23 10:39:24 +00:00
import{Y as ct,P as Ne,c as s,p as ee,j as Ae,F as B,A as _n,_ as se,Z as xn,o as It,$ as A,a0 as ca,a1 as tr,a2 as la,q as he,D as Ct,y as Pi,a3 as ua,a4 as $i,T as Oi,k as U,x as yt,a5 as lt,h as da,s as W,a6 as of,a7 as fa,a as nr,n as ha,a8 as Ri,a9 as pa,aa as Di,i as po,L as Ni,g as mo,ab as ma,ac as Re,ad as ga,ae as va,af as Hn,w as it,u as Mn,d as Ko,b as rt,I as Fi,ag as ya,ah as _a,ai as ba}from"./useTitle-TOnOofzE.js";import{e as wa}from"./tinyld-light-PxOyhYWY.js";import{m as Ea}from"./index-gNUvm9kb.js";function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qr.apply(this,arguments)}var zi=["shift","alt","meta","mod","ctrl"],Ta={esc:"escape",return:"enter",".":"period",",":"comma","-":"slash"," ":"space","`":"backquote","#":"backslash","+":"bracketright",ShiftLeft:"shift",ShiftRight:"shift",AltLeft:"alt",AltRight:"alt",MetaLeft:"meta",MetaRight:"meta",OSLeft:"meta",OSRight:"meta",ControlLeft:"ctrl",ControlRight:"ctrl"};function mt(e){return(Ta[e]||e).trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function Sa(e){return zi.includes(e)}function kr(e,t){return t===void 0&&(t=","),e.split(t)}function Lr(e,t,n){t===void 0&&(t="+");var r=e.toLocaleLowerCase().split(t).map(function(a){return mt(a)}),o={alt:r.includes("alt"),ctrl:r.includes("ctrl")||r.includes("control"),shift:r.includes("shift"),meta:r.includes("meta"),mod:r.includes("mod")},i=r.filter(function(a){return!zi.includes(a)});return qr({},o,{keys:i,description:n})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Hi([mt(e.key),mt(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&Vi([mt(e.key),mt(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){gt.clear()})})();var gt=new Set;function go(e){return Array.isArray(e)}function xa(e,t){t===void 0&&(t=",");var n=go(e)?e:e.split(t);return n.every(function(r){return gt.has(r.trim().toLowerCase())})}function Hi(e){var t=Array.isArray(e)?e:[e];gt.has("meta")&&gt.forEach(function(n){return!Sa(n)&&gt.delete(n.toLowerCase())}),t.forEach(function(n){return gt.add(n.toLowerCase())})}function Vi(e){var t=Array.isArray(e)?e:[e];e==="meta"?gt.clear():t.forEach(function(n){return gt.delete(n.toLowerCase())})}function Ma(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function ka(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function La(e){return Bi(e,["input","textarea","select"])}function Bi(e,t){var n=e.target;t===void 0&&(t=!1);var r=n&&n.tagName;return go(t)?!!(r&&t&&t.some(function(o){return o.toLowerCase()===r.toLowerCase()})):!!(r&&t&&t===!0)}function Aa(e,t){return e.length===0&&t?(console.warn('A hotkey has the "scopes" option set, however no active scopes were found. If you want to use the global scopes feature, you need to wrap your app in a <HotkeysProvider>'),!0):t?e.some(function(n){return t.includes(n)})||e.includes("*"):!0}var Ia=function(t,n,r){r===void 0&&(r=!1);var o=n.alt,i=n.meta,a=n.mod,l=n.shift,c=n.ctrl,u=n.keys,f=t.key,d=t.code,p=t.ctrlKey,m=t.metaKey,h=t.shiftKey,g=t.altKey,v=mt(d),E=f.toLowerCase();if(!(u!=null&&u.includes(v))&&!(u!=null&&u.includes(E))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!r){if(o===!g&&E!=="alt"||l===!h&&E!=="shift")return!1;if(a){if(!m&&!p)return!1}else if(i===!m&&E!=="meta"&&E!=="os"||c===!p&&E!=="ctrl"&&E!=="control")return!1}return u&&u.length===1&&(u.includes(E)||u.includes(v))?!0:u?xa(u):!u},Ca=ct(void 0),Pa=function(){return Ne(Ca)};function ji(e,t){return e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(e).length===Object.keys(t).length&&Object.keys(e).reduce(function(n,r){return n&&ji(e[r],t[r])},!0):e===t}var $a=ct({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Oa=function(){return Ne($a)};function Ra(e){var t=B(void 0);return ji(t.current,e)||(t.current=e),t.current}var
* Toastify js 1.12.0
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
*/var cf=vo.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(xn,function(t){var n=function(a){return new n.lib.init(a)},r="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:r,constructor:n,init:function(a){return a||(a={}),this.options={},this.toastElement=null,this.options.text=a.text||n.defaults.text,this.options.node=a.node||n.defaults.node,this.options.duration=a.duration===0?0:a.duration||n.defaults.duration,this.options.selector=a.selector||n.defaults.selector,this.options.callback=a.callback||n.defaults.callback,this.options.destination=a.destination||n.defaults.destination,this.options.newWindow=a.newWindow||n.defaults.newWindow,this.options.close=a.close||n.defaults.close,this.options.gravity=a.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=a.positionLeft||n.defaults.positionLeft,this.options.position=a.position||n.defaults.position,this.options.backgroundColor=a.backgroundColor||n.defaults.backgroundColor,this.options.avatar=a.avatar||n.defaults.avatar,this.options.className=a.className||n.defaults.className,this.options.stopOnFocus=a.stopOnFocus===void 0?n.defaults.stopOnFocus:a.stopOnFocus,this.options.onClick=a.onClick||n.defaults.onClick,this.options.offset=a.offset||n.defaults.offset,this.options.escapeMarkup=a.escapeMarkup!==void 0?a.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=a.ariaLive||n.defaults.ariaLive,this.options.style=a.style||n.defaults.style,a.backgroundColor&&(this.options.style.background=a.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var a=document.createElement("div");a.className="toastify on "+this.options.className,this.options.position?a.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(a.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):a.className+=" toastify-right",a.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');for(var l in this.options.style)a.style[l]=this.options.style[l];if(this.options.ariaLive&&a.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)a.appendChild(this.options.node);else if(this.options.escapeMarkup?a.innerText=this.options.text:a.innerHTML=this.options.text,this.options.avatar!==""){var c=document.createElement("img");c.src=this.options.avatar,c.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?a.appendChild(c):a.insertAdjacentElement("afterbegin",c)}if(this.options.close===!0){var u=document.createElement("button");u.type="button",u.setAttribute("aria-label","Close"),u.className="toast-close",u.innerHTML="&#10006;",u.addEventListener("click",(function(v){v.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var f=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&f>360?a.insertAdjacentElement("afterbegin",u):a.appendChild(u)}if(this.options.stopOnFocus&&this.options.duration>0){var d=this;a.addEventListener("mouseover",function(v){window.clearTimeout(a.timeOutValue)}),a.addEventListener("mouseleave",function(){a.timeOutValue=window.setTimeout(function(){d.removeElement(a)},d.options.duration)})}if(typeof this.options.destination<"u"&&a.addEventListener("click",(function(v){v.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination
`)),d.innerHTML=`<code>${f.innerHTML.trim()}</code>`,f.replaceWith(d)}),l&&[...i.querySelectorAll("p")].filter(d=>/^```/g.test(d.innerText)).forEach(d=>{const p=[d];let m=!1,h=d;for(;h.nextElementSibling;){const g=h.nextElementSibling;if(g&&g.tagName==="P")if(/```$/g.test(g.innerText)){p.push(g),m=!0;break}else p.push(g);else break;h=g}if(m){const g=document.createElement("pre");p.forEach(E=>{E.querySelectorAll("br").forEach(_=>_.replaceWith(`
`))});const v=p.map(E=>E.innerHTML).join(`
`);g.innerHTML=`<code tabindex="0">${v}</code>`,d.replaceWith(g),p.forEach(E=>E.remove())}}),o.includes("`")&&(c=Dr(i),c.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");/`[^`]+`/g.test(f)&&(f=f.replaceAll(/(`[^]+?`)/g,"<code>$1</code>")),Ft.innerHTML=f,u.replaceWith(...Ft.childNodes)})),/twitter\.com/i.test(o)&&(c=Dr(i,{rejectFilter:["A"]}),c.forEach(u=>{let f=u.nodeValue.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");/@[a-zA-Z0-9_]+@twitter\.com/g.test(f)&&(f=f.replaceAll(/(@([a-zA-Z0-9_]+)@twitter\.com)/g,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),Ft.innerHTML=f,u.replaceWith(...Ft.childNodes)})),o.includes("#")){let u=null;const f=[...i.querySelectorAll("p")].filter((d,p)=>{let m=0;for(let h=0;h<d.childNodes.length;h++){const g=d.childNodes[h];if(g.nodeType===Node.TEXT_NODE){if(g.textContent.trim()!=="")return!1}else if(g.tagName!=="BR")if(g.tagName==="A"){const v=g.textContent.trim();if(!v||!v.startsWith("#"))return!1;m++}else return!1}if(m>3||m>1&&u&&p===u+1)return u=p,!0});f!=null&&f.length&&f.forEach(d=>{d.classList.add("hashtag-stuffing"),d.title=d.innerText})}return o.includes("<img")&&i.querySelectorAll("img").forEach(u=>{const f=u.getAttribute("width")||u.naturalWidth,d=u.getAttribute("height")||u.naturalHeight;f&&d&&u.style.setProperty("--original-aspect-ratio",`${f}/${d}`)}),r&&queueMicrotask(()=>r(i)),o=i.innerHTML,o}const ms=lt(ll),ul=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],dl=Object.fromEntries(ul.map(e=>[e,!0])),fl=/^(https?:\/\/(www\.)?|xmpp:)/,Rr=30;function hl(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),r=(n.match(fl)||[])[0]||"";if(!r)return;const o=n.slice(r.length,r.length+Rr),i=n.slice(r.length+Rr),a=n.slice(r.length).length>Rr;e.innerHTML=`<span class="invisible">${r}</span><span class=${a?"ellipsis":""}>${o}</span><span class="invisible">${i}</span>`}catch{}}function Dr(e,t={}){var a;const n=[],r=Object.assign({},dl,(a=t.rejectFilter)==null?void 0:a.reduce((l,c)=>(l[c]=!0,l),{})),o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(l){return r[l.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let i;for(;i=o.nextNode();)n.push(i);return n}const zt=document.createElement("div");function pl(e,t){if(!e)return"";const{preProcess:n}=t||{};return zt.innerHTML=e.replace(/<\/p>/g,`</p>
`).replace(/<\/li>/g,`</li>
`),zt.querySelectorAll("br").forEach(r=>{r.replaceWith(`
`)}),n==null||n(zt),zt.querySelectorAll(".invisible").forEach(r=>{r.remove()}),zt.querySelectorAll(".ellipsis").forEach(r=>{r.append("...")}),zt.innerText.replace(/[\r\n]{3,}/g,`
`).trim()}const fr=lt(pl);function ml(e){const{mentions:t=[],instance:n,previewMode:r,statusURL:o}=e||{};return i=>{var f,d;let{target:a}=i;if(a=a.closest("a"),!a||i.metaKey||i.ctrlKey||i.shiftKey||i.altKey||i.which===2)return;const l=(f=a.previousSibling)==null?void 0:f.textContent,c=l==null?void 0:l.endsWith("@"),u=a.innerText.startsWith("@");if((a.classList.contains("u-url")||a.classList.contains("mention"))&&u||c&&!u){const p=(a.querySelector("span")||a).innerText.trim(),m=p.replace(/^@/,""),h=a.getAttribute("href"),g=t.find(v=>v.url===h)||t.find(v=>v.acct===m||v.username===m);if(g)i.preventDefault(),i.stopPropagation(),W.showAccount={account:g.acct,instance:n};else if(!/^http/i.test(p)){i.preventDefault(),i.stopPropagation();const v=a.getAttribute("href");W.showAccount={account:v,instance:n}}}else if(!r){const p=l==null?void 0:l.endsWith("#");if(a.classList.contains("hashtag")||p){i.preventDefault(),i.stopPropagation();const m=a.innerText.replace(/^#/,"").trim(),h=n?`#/${n}/t/${m}`:`#/t/${m}`;location.hash=h}else(d=W.unfurledLinks[a.href])!=null&&d.url&&o!==a.href&&(i.preventDefault(),i.stopPropagation(),W.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${W.unfurledLinks[a.href].url}`)}}}const{locale:gl}=new Intl.DateTimeFormat().resolvedOptions(),vl=e=>{const{dateYear:t,hideTime:n,formatOpts:r}=e||{},o=new Date().getFullYear();return Intl.DateTimeFormat(gl,{year:t===o?void 0:"numeric",month:"short",day:"numeric",hour:n?void 0:"numeric",minute:n?void 0:"numeric",...r})},yl=lt(vl);function Tn(e,t){return e instanceof Date||(e=new Date(e)),yl({dateYear:e.getFullYear(),...t}).format(e)}const{locale:_l}=Intl.NumberFormat().resolvedOptions(),vt=Intl.NumberFormat(_l,{notation:"compact",roundingMode:"floor"}).format,ri=5e3;function Bn(e){if(e||(e=!0),W.showCompose){W.composerState.minimized?Pe({duration:ri,text:"A draft post is currently minimized. Post or discard it before creating a new one."}):Pe({duration:ri,text:"A post is currently open. Post or discard it before creating a new one."});return}Va(),W.showCompose=e}const bl=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,hr=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const t=e.match(bl);if(!t)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},oi=e=>e==="*"||e==="x"||e==="X",ii=e=>{const t=parseInt(e,10);return isNaN(t)?e:t},wl=(e,t)=>typeof e!=typeof t?[String(e),String(t)]:[e,t],El=(e,t)=>{if(oi(e)||oi(t))return 0;const[n,r]=wl(ii(e),ii(t));return n>r?1:n<r?-1:0},jt=(e,t)=>{for(let n=0;n<Math.max(e.length,t.length);n++){const r=El(e[n]||"0",t[n]||"0");if(r!==0)return r}return 0},Tl=(e,t)=>{const n=hr(e),r=hr(t),o=n.pop(),i=r.pop(),a=jt(n,r);return a!==0?a:o&&i?jt(o.split("."),i.split(".")):o||i?o?-1:1:0},Sl=(e,t,n)=>{xl(n);const r=Tl(e,t);return gs[n].includes(r)},gs={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},si=Object.keys(gs),xl=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(si.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${si.join("|")}`)},Jn=(e,t)=>{if(t=t.replace(/([><=]+)\s+/g,"$1"),t.includes("||"))return t.split("||").some(v=>Jn(e,v));if(t.includes(" - ")){const[v,E]=t.split(" - ",2);return Jn(e,`>=${v} <=${E}`)}else if(t.includes(" "))return t.trim().replace(/\s{2,}/g," ").split(" ").every(v=>Jn(e,v));const n=t.match(/^([<>=~^]+)/),r=n?n[1]:"=";if(r!=="^"&&r!=="~")return Sl(e,t,r);const[o,i,a,,l]=hr(e),[c,u,f,,d]=hr(t),p=[o,i,a],m=[c,u??"x",f??"x"];if(d&&(!l||jt(p,m)!==0||jt(l.split("."),d.split("."))===-1))return!1;const h=m.findIndex(v=>v!=="0")+1,g=r==="~"?2:h>1?h:1;return!(jt(p.slice(0,g),m.slice(0,g))!==0||jt(p.slice(g),m.slice(g))===-1)};const Ml={"@mastodon/edit-media-attributes":">=4.1","@mastodon/list-exclusive":">=4.2","@mastodon/filtered-notifications":"~4.3 || >=4.3","@mastodon/fetch-multiple-statuses":"~4.3 || >=4.3","@mastodon/trending-link-posts":"~4
<style ${n}>
:host {
contain: content;
display: block;
position: relative;
width: 100%;
padding-bottom: calc(100% / (16 / 9));
}
@media (max-width: 40em) {
:host([short]) {
padding-bottom: calc(100% / (9 / 16));
}
}
#frame, #fallbackPlaceholder, iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
}
#frame {
cursor: pointer;
}
#fallbackPlaceholder {
object-fit: cover;
}
#frame::before {
content: '';
display: block;
position: absolute;
top: 0;
background-image: linear-gradient(180deg, #111 -20%, transparent 90%);
height: 60px;
width: 100%;
z-index: 1;
}
#playButton {
width: 68px;
height: 48px;
background-color: transparent;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
z-index: 1;
border: 0;
border-radius: inherit;
}
#playButton:before {
content: '';
border-style: solid;
border-width: 11px 0 11px 19px;
border-color: transparent transparent transparent #fff;
}
#playButton,
#playButton:before {
position: absolute;
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
cursor: inherit;
}
/* Post-click styles */
.activated {
cursor: unset;
}
#frame.activated::before,
#frame.activated > #playButton {
display: none;
}
</style>
<div id="frame">
<picture>
<source id="webpPlaceholder" type="image/webp">
<source id="jpegPlaceholder" type="image/jpeg">
<img id="fallbackPlaceholder" referrerpolicy="origin" loading="lazy">
</picture>
<button id="playButton"></button>
</div>
`,this.domRefFrame=t.querySelector("#frame"),this.domRefImg={fallback:t.querySelector("#fallbackPlaceholder"),webp:t.querySelector("#webpPlaceholder"),jpeg:t.querySelector("#jpegPlaceholder")},this.domRefPlayButton=t.querySelector("#playButton")}setupComponent(){this.initImagePlaceholder(),this.domRefPlayButton.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),this.setAttribute("title",`${this.videoPlay}: ${this.videoTitle}`),(this.autoLoad||this.isYouTubeShort())&&this.initIntersectionObserver()}attributeChangedCallback(t,n,r){switch(t){case"videoid":case"playlistid":case"videoTitle":case"videoPlay":{n!==r&&(this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1));break}default:break}}addIframe(t=!1){if(!this.isIframeLoaded){let n=t?0:1;const r=this.noCookie?"-nocookie":"";let o;this.playlistId?o=`?listType=playlist&list=${this.playlistId}&`:o=`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1);const i=`
<iframe frameborder="0" title="${this.videoTitle}"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
src="https://www.youtube${r}.com/embed/${o}autoplay=${n}&${this.params}"
></iframe>`;this.domRefFrame.insertAdjacentHTML("beforeend",i),this.domRefFrame.classList.add("activated"),this.isIframeLoaded=!0,this.attemptShortAutoPlay(),this.dispatchEvent(new CustomEvent("liteYoutubeIframeLoaded",{detail:{videoId:this.videoId},bubbles:!0,cancelable:!0}))}}initImagePlaceholder(){var r,o;const t=`https://i.ytimg.com/vi_webp/${this.videoId}/${this.posterQuality}.webp`,n=`https://i.ytimg.com/vi/${this.videoId}/${this.posterQuality}.jpg`;this.domRefImg.fallback.loading=this.posterLoading,this.domRefImg.webp.srcset=t,this.domRefImg.jpeg.srcset=n,this.domRefImg.fallback.src=n,this.domRefImg.fallback.setAttribute("aria-label",`${this.videoPlay}: ${this.videoTitle}`),(o=(r=this.domRefImg)==null?void 0:r.fallback)==null||o.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}initIntersectionObserver(){const t={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((r,o)=>{r.forEach(i=>{i.isIntersecting&&!this.isIframeLoaded&&(je.warmConnections(),this.addIframe(!0),o.unobserve(this))})},t).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{var t,n;(n=(t=this.shadowRoot.querySelector("iframe"))==null?void 0:t.contentWindow)==null||n.postMessage('{"event":"command","func":"playVideo","args":""}',"*")},2e3)}isYouTubeShort(){return this.getAttribute("short")===""&&window.matchMedia("(max-width: 40em)").matches}static addPrefetch(t,n){const r=document.createElement("link");r.rel=t,r.href=n,r.crossOrigin="true",document.head.append(r)}static warmConnections(){je.isPreconnected||window.liteYouTubeIsPreconnected||(je.addPrefetch("preconnect","https://i.ytimg.com/"),je.addPrefetch("preconnect","https://s.ytimg.com"),je.addPrefetch("preconnect","https://www.youtube.com"),je.addPrefetch("preconnect","https://www.google.com"),je.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),je.addPrefetch("preconnect","https://static.doubleclick.net"),je.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}je.isPreconnected=!1;customElements.define("lite-youtube",je);const iu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~",Qn=(e,t,n)=>{let r=0;for(;t<n;)r*=83,r+=iu.indexOf(e[t++]);return r},Ts=Math.pow,Sn=Math.PI,su=Sn*2,Ss=3294.6,xs=269.025,au=e=>e>10.31475?Ts(e/xs+.052132,2.4):e/Ss,Vr=e=>~~(e>1227e-8?xs*Ts(e,.416666)-13.025:e*Ss+1),yn=e=>(e<0?-1:1)*e*e,pi=e=>{for(e+=Sn/2;e>Sn;)e-=su;const t=1.27323954*e-.405284735*yn(e);return .225*(yn(t)-t)+t};function Mo(e){const t=Qn(e,2,6);return[t>>16,t>>8&255,t&255]}function cu(e,t,n,r){const o=Qn(e,0,1),i=o%9+1,a=~~(o/9)+1,l=i*a;let c=0,u=0,f=0,d=0,p=0,m=0,h=0,g=0,v=0,E=0,_=0,T=0,w=0,b=0;const x=(Qn(e,1,2)+1)/13446*(r|1),L=new Float64Array(l*3),O=Mo(e);for(c=0;c<3;c++)L[c]=au(O[c]);for(c=1;c<l;c++)b=Qn(e,4+c*2,6+c*2),L[c*3]=yn(~~(b/(19*19))-9)*x,L[c*3+1]=yn(~~(b/19)%19-9)*x,L[c*3+2]=yn(b%19-9)*x;const $=t*4,S=new Uint8ClampedArray($*n);for(d=0;d<n;d++)for(T=Sn*d/n,f=0;f<t;f++){for(p=0,m=0,h=0,w=Sn*f/t,u=0;u<a;u++)for(v=pi(T*u),c=0;c<i;c++)g=pi(w*c)*v,E=(c+u*i)*3,p+=L[E]*g,m+=L[E+1]*g,h+=L[E+2]*g;_=4*f+d*$,S[_]=Vr(p),S[_+1]=Vr(m),S[_+2]=Vr(h),S[_+3]=255}return S}const lu=(e,t={})=>{const n=t.char||" ",r=t.count||2;let o=0;const i=[];return e.reverse().reduce((a,l)=>{i.length&&o&&i[o]&&i[o]===l.substring(1,i[o].length+1)&&(i.splice(o,1),o--);const u=[`${n.repeat(o?o*r:0)}${l}`,...a];return l.substring(0,2)==="</"&&(o++,i[o]=l.substring(2,l.length-1)),u},[]).join(`
`)};var uu=lu;const Ms=e=>e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),du=e=>{const t=Ms(e).split(`
`),n=[];let r="";for(let o=0;o<t.length;o+=1){const i=t[o];if(i.endsWith("/>")){n.push(`${r}${i.slice(0,-2)} />`),r="";continue}if(i.endsWith(">")){n.push(`${r}${i.startsWith(">")||i.startsWith("<")?"":" "}${i}`),r="";continue}r+=r.length?` ${i}`:i}return n};var fu={mergeAttributesWithElements:du,removeEmptyLines:Ms};const hu=uu,{mergeAttributesWithElements:pu}=fu,mu=(e,t={})=>{const n=pu(e);return hu(n,t)};var gu=mu;const vu=It(gu);var hn=(e=>(e.Mouse="mouse",e.Touch="touch",e.Pointer="pointer",e))(hn||{}),pn=(e=>(e.CancelledByMovement="cancelled-by-movement",e.CancelledByRelease="cancelled-by-release",e.CancelledOutsideElement="cancelled-outside-element",e))(pn||{});const ks=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,yu=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function Ls(e){const{nativeEvent:t}=e,n=yu();return n&&t instanceof n||"touches"in e}function As(e){const t=ks();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Is(e){const{nativeEvent:t}=e;if(!t)return!1;const n=ks();return n&&t instanceof n||"pointerId"in t}function mi(e){return As(e)||Ls(e)||Is(e)}function gi(e){return Ls(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:As(e)||Is(e)?{x:e.pageX,y:e.pageY}:null}function _u(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Cs(e,{threshold:t=400,captureEvent:n=!1,detect:r=hn.Pointer,cancelOnMovement:o=!1,cancelOutsideElement:i=!0,filterEvents:a,onStart:l,onMove:c,onFinish:u,onCancel:f}={}){const d=B(!1),p=B(!1),m=B(),h=B(),g=B(e),v=B(null),E=Ae(b=>x=>{p.current||mi(x)&&(a!==void 0&&!a(x)||(n&&x.persist(),l==null||l(x,{context:b}),v.current=gi(x),p.current=!0,m.current=x.currentTarget,h.current=setTimeout(()=>{g.current&&(g.current(x,{context:b}),d.current=!0)},t)))},[n,a,l,t]),_=Ae(b=>(x,L)=>{mi(x)&&p.current&&(v.current=null,n&&x.persist(),d.current?u==null||u(x,{context:b}):p.current&&(f==null||f(x,{context:b,reason:L??pn.CancelledByRelease})),d.current=!1,p.current=!1,h.current!==void 0&&clearTimeout(h.current))},[n,u,f]),T=Ae(b=>x=>{if(c==null||c(x,{context:b}),o!==!1&&v.current){const L=gi(x);if(L){const O=o===!0?25:o,$={x:Math.abs(L.x-v.current.x),y:Math.abs(L.y-v.current.y)};($.x>O||$.y>O)&&_(b)(x,pn.CancelledByMovement)}}},[_,o,c]),w=Ae(b=>{if(e===null)return{};switch(r){case hn.Mouse:{const x={onMouseDown:E(b),onMouseMove:T(b),onMouseUp:_(b)};return i&&(x.onMouseLeave=L=>{_(b)(L,pn.CancelledOutsideElement)}),x}case hn.Touch:return{onTouchStart:E(b),onTouchMove:T(b),onTouchEnd:_(b)};case hn.Pointer:{const x={onPointerDown:E(b),onPointerMove:T(b),onPointerUp:_(b)};return i&&(x.onPointerLeave=L=>_(b)(L,pn.CancelledOutsideElement)),x}}},[e,_,i,r,T,E]);return se(()=>{if(!window)return;function b(x){const L=_u(x);_()(L)}return window.addEventListener("mouseup",b),window.addEventListener("touchend",b),window.addEventListener("pointerup",b),()=>{window.removeEventListener("mouseup",b),window.removeEventListener("touchend",b),window.removeEventListener("pointerup",b)}},[_]),se(()=>()=>{h.current!==void 0&&clearTimeout(h.current)},[]),se(()=>{g.current=e},[e]),w}function bu({poll:e,lang:t,readOnly:n,refresh:r=()=>{},votePoll:o=()=>{}}){const[i,a]=ee("default"),{expired:l,expiresAt:c,id:u,multiple:f,options:d,ownVotes:p,voted:m,votersCount:h,votesCount:g,emojis:v}=e,E=!!c&&new Date(c),_=h||g;let T=0;_<=1e3?T=0:_<=1e4?T=1:_<=1e5&&(T=2);const[w,b]=ee(!1),x=d.every(L=>L.votesCount!==null);return s("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${i==="loading"?"loading":""}`,children:[w&&x||m||l?s(U,{children:[s("div",{class:"poll-options",children:d.map((L,O)=>{const{title:$,votesCount:S}=L,M=_?(S/_*100).toFixed(T):0,V=S>0&&S===Math.max(...d.map(j=>j.votesCount));return s("div",{class:`poll-option poll-result ${V?"poll-option-leading":""}`,style:{"--percentage":`${M}%`},children:[s("div",{class:"poll-option-title",children:[s("span",{children:s(Zt,{text:$,emojis:v})}),m&&p.includes(O)&&s(U,{children:[" ",s(H,{icon:"check-circle"})]})]}),s("div",{class:"p
📊:
${r.options.map(l=>`${r.multiple?"▪️":"•"} ${l.title}`).join(`
`)}`),o!=null&&o.length&&(i+=" "+o.map(l=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[l.type]||"").join("")),i}function Tu(e,t,n){var r=this,o=B(null),i=B(0),a=B(null),l=B([]),c=B(),u=B(),f=B(e),d=B(!0);f.current=e;var p=typeof window<"u",m=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var h=!!(n=n||{}).leading,g=!("trailing"in n)||!!n.trailing,v="maxWait"in n,E="debounceOnServer"in n&&!!n.debounceOnServer,_=v?Math.max(+n.maxWait||0,t):null;se(function(){return d.current=!0,function(){d.current=!1}},[]);var T=he(function(){var w=function(S){var M=l.current,V=c.current;return l.current=c.current=null,i.current=S,u.current=f.current.apply(V,M)},b=function(S,M){m&&cancelAnimationFrame(a.current),a.current=m?requestAnimationFrame(S):setTimeout(S,M)},x=function(S){if(!d.current)return!1;var M=S-o.current;return!o.current||M>=t||M<0||v&&S-i.current>=_},L=function(S){return a.current=null,g&&l.current?w(S):(l.current=c.current=null,u.current)},O=function S(){var M=Date.now();if(x(M))return L(M);if(d.current){var V=t-(M-o.current),j=v?Math.min(V,_-(M-i.current)):V;b(S,j)}},$=function(){if(p||E){var S=Date.now(),M=x(S);if(l.current=[].slice.call(arguments),c.current=r,o.current=S,M){if(!a.current&&d.current)return i.current=o.current,b(O,t),h?w(o.current):u.current;if(v)return b(O,t),w(o.current)}return a.current||b(O,t),u.current}};return $.cancel=function(){a.current&&(m?cancelAnimationFrame(a.current):clearTimeout(a.current)),i.current=0,l.current=o.current=c.current=a.current=null},$.isPending=function(){return!!a.current},$.flush=function(){return a.current?L(Date.now()):u.current},$},[h,v,t,_,g,m,p,E]);return T}function Su(e,t,n){var r=n===void 0?{}:n,o=r.leading,i=r.trailing;return Tu(e,t,{maxWait:t,leading:o===void 0||o,trailing:i===void 0||i})}function xu(e,t){var n=B(null),r=B(null);r.current=t;var o=B(null);se(function(){i()});var i=Ae(function(){var a=o.current,l=r.current,c=a||(l?l instanceof Element?l:l.current:null);n.current&&n.current.element===c&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:c,subscriber:e,cleanup:c?e(c):void 0})},[e]);return se(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),Ae(function(a){o.current=a,i()},[i])}function yi(e,t,n){return e[t]?e[t][0]?e[t][0][n]:e[t][n]:t==="contentBoxSize"?e.contentRect[n==="inlineSize"?"width":"height"]:void 0}function Mu(e){e===void 0&&(e={});var t=e.onResize,n=B(void 0);n.current=t;var r=e.round||Math.round,o=B(),i=ee({width:void 0,height:void 0}),a=i[0],l=i[1],c=B(!1);se(function(){return c.current=!1,function(){c.current=!0}},[]);var u=B({width:void 0,height:void 0}),f=xu(Ae(function(d){return(!o.current||o.current.box!==e.box||o.current.round!==r)&&(o.current={box:e.box,round:r,instance:new ResizeObserver(function(p){var m=p[0],h=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=yi(m,h,"inlineSize"),v=yi(m,h,"blockSize"),E=g?r(g):void 0,_=v?r(v):void 0;if(u.current.width!==E||u.current.height!==_){var T={width:E,height:_};u.current.width=E,u.current.height=_,n.current?n.current(T):c.current||l(T)}})}),o.current.instance.observe(d,{box:e.box}),function(){o.current&&o.current.instance.unobserve(d)}},[e.box,r]),e.ref);return he(function(){return{ref:f,width:a.width,height:a.height}},[f,a.width,a.height])}function er({className:e="truncated"}={}){const t=B(),n=Su(({height:r})=>{if(t.current){const{scrollHeight:o}=t.current;let i=o>r;if(i){const{height:a,maxHeight:l}=getComputedStyle(t.current),c=parseInt(l||a,10);i=o>c}t.current.classList.toggle(e,i)}},300);return Mu({ref:t,box:"border-box",onResize:n}),t}const io={public:"earth",unlisted:"group",private:"lock",direct:"message"};var Os="kvfysmfp",Rs="ufhsfnkm",ku=".".concat(Os,"{overflow:hidden;touch-action:none}.").concat(Rs,"{transform-origin: 0 0}"),Lu=typeof window>"u",Au=function(){return!Lu&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Iu=function(e){
<video
src="${v}"
poster="${h}"
width="${b}"
height="${x}"
data-orientation="${S}"
preload="auto"
autoplay
muted
playsinline
${ae?"loop":""}
ondblclick="this.paused ? this.play() : this.pause()"
${we?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`,Ve=`
<video
src="${v}"
poster="${h}"
width="${b}"
height="${x}"
data-orientation="${S}"
preload="auto"
autoplay
playsinline
${ae?"loop":""}
controls
></video>
`;return s(ne,{children:s(z,{class:`media ${e} media-${Q?"gif":"video"} ${oe?"media-contain":""} ${de?"media-hover-animate":""}`,"data-orientation":S,"data-formatted-duration":o?void 0:ge,"data-label":Q&&!o&&!oe?"GIF":void 0,"data-has-alt":!q||void 0,style:!o&&ie,onClick:me=>{if(de)try{V.current.pause()}catch{}u(me)},onMouseEnter:()=>{if(de)try{V.current.play()}catch{}},onMouseLeave:()=>{if(de)try{V.current.pause()}catch{}},onFocus:()=>{if(de)try{V.current.play()}catch{}},onBlur:()=>{if(de)try{V.current.pause()}catch{}},children:[o||oe?Q&&o?s(Ti,{...C,enabled:!0,children:s("div",{ref:R,dangerouslySetInnerHTML:{__html:bt}})}):Q?s("div",{class:"video-container",dangerouslySetInnerHTML:{__html:bt}}):s("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Ve}}):Q?s("video",{ref:V,src:v,poster:h,width:b,height:x,"data-orientation":S,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:we?me=>{const{target:Le}=me,Ie=Le==null?void 0:Le.closest(".media-gif");if(Ie){const Ce=Le.currentTime/Le.duration*100;Ie.style.setProperty("--progress",`${Ce}%`)}}:void 0}):s(U,{children:[h?s("img",{src:h,alt:q?"":d,width:b,height:x,"data-orientation":S,loading:"lazy",decoding:"async",onLoad:me=>{if(!$){const Le=me.target.closest(".media");if(Le){const{naturalHeight:Ie,naturalWidth:Ce}=me.target;Le.dataset.orientation=Ce>Ie?"landscape":"portrait",Le.style.setProperty("--width",`${Ce}px`),Le.style.setProperty("--height",`${Ie}px`),Le.style.aspectRatio=`${Ce}/${Ie}`}}}}):s("video",{src:v+"#t=0.1",width:b,height:x,"data-orientation":S,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:me=>{if(!Z){const{duration:Le}=me.target;if(Le){const Ie=Wr(Le),Ce=me.target.closest(".media-video");Ce&&(Ce.dataset.formattedDuration=Ie)}}}}),s("div",{class:"media-play",children:s(H,{icon:"play",size:"xl"})})]}),!o&&!q&&s(Yr,{alt:d,lang:r,index:c})]})})}else if(E==="audio"||Y){const Z=Wr(_.duration);return s(ne,{children:s(z,{class:`media media-audio ${e}`,"data-formatted-duration":o?void 0:Z,"data-has-alt":!q||void 0,onClick:u,style:!o&&ie,children:[o?s("audio",{src:g||v,preload:"none",controls:!0,autoPlay:!0}):h?s("img",{src:h,alt:q?"":d,width:b,height:x,"data-orientation":S,loading:"lazy",onError:ve=>{var Q,ae;try{(ae=(Q=ve.target)==null?void 0:Q.remove)==null||ae.call(Q)}catch{}}}):null,!o&&s(U,{children:[s("div",{class:"media-play",children:s(H,{icon:"play",size:"xl"})}),!q&&s(Yr,{alt:d,lang:r,index:c})]})]})})}}function Gu(e){return URL.parse(e,location.origin)}const Xu=280,Ju=140,Qu=Di({limit:1,interval:1e3});function ed(e,t){return t.v1.accounts.$select(e).fetch()}const td=po(Qu(ed)),gn={public:"Public",unlisted:"Unlisted",private:"Followers only",direct:"Private mention"},nd=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),rd=new Intl.RelativeTimeFormat,Si=80;function od(e){var t;return(t=e==null?void 0:e.options)!=null&&t.length?`📊:
${e.options.map(n=>`- ${n.title}${n.votesCount>=0?` (${n.votesCount})`:""}`).join(`
`)}`:""}function Kr(e){const{spoilerText:t,content:n,poll:r}=e;return(t?`${t}
`:"")+fr(n)+od(r)}const xi=yt(({post:e,instance:t,previewMode:n})=>{const{content:r,emojis:o,language:i,mentions:a,url:l}=e;return s("div",{lang:i,dir:"auto",class:"inner-content",onClick:ml({mentions:a,instance:t,previewMode:n,statusURL:l}),dangerouslySetInnerHTML:{__html:ms(r,{emojis:o,postEnhanceDOM:c=>{c.querySelectorAll('a.u-url[target="_blank"]').forEach(u=>{/http/i.test(u.innerText.trim())||u.removeAttribute("target")})}})}})},(e,t)=>{const{post:n}=e,{post:r}=t;return n.content===r.content}),id={s:"small",m:"medium",l:"large"},sd=lt(e=>{if(e=e==null?void 0:e.trim(),(e==null?void 0:e.length)>500)return null;const n=wa(e)[0];return n!=null&&n.lang&&(n==null?void 0:n.accuracy)>.5?n.lang:null});function qt({statusID:e,status:t,instance:n,size:r="m",contentTextWeight:o,readOnly:i,enableCommentHint:a,withinContext:l,skeleton:c,enableTranslate:u,forceTranslate:f,previewMode:d,onMediaClick:p,quoted:m,onStatusLinkClick:h=()=>{},showFollowedTags:g,allowContextMenu:v,showActionsBar:E,showReplyParent:_,mediaFirst:T}){var Uo,Wo,Yo;if(c)return s("div",{class:`status skeleton ${T?"status-media-first small":""}`,children:[!T&&s(st,{size:"xxl"}),s("div",{class:"container",children:[s("div",{class:"meta",children:[(r==="s"||T)&&s(st,{size:"m"})," ███ ████████"]}),s("div",{class:"content-container",children:[T&&s("div",{class:"media-first-container"}),s("div",{class:`content ${T?"media-first-content":""}`,children:s("p",{children:"████ ████████"})})]})]})]});const{masto:w,instance:b,authenticated:x}=nr({instance:n}),{instance:L}=nr(),O=b===L;let $=it(e||(t==null?void 0:t.id),b);const S=Mn(W);if(t||(t=S.statuses[$]||S.statuses[e],$=it(t==null?void 0:t.id,b)),!t)return null;const{account:{acct:M,avatar:V,avatarStatic:j,id:R,url:I,displayName:k,username:D,emojis:C,bot:z,group:N},id:P,repliesCount:Y,reblogged:K,reblogsCount:te,favourited:le,favouritesCount:Te,bookmarked:pe,poll:_e,muted:be,sensitive:ie,spoilerText:ue,visibility:q,language:ne,editedAt:Se,filtered:dt,card:Z,createdAt:ve,inReplyToId:Q,inReplyToAccountId:ae,content:ge,mentions:de,mediaAttachments:oe,reblog:we,uri:bt,url:Ve,emojis:me,tags:Le,_deleted:Ie,_pinned:Ce,emojiReactions:$t}=t,[Ye,Ln]=ee(null);se(()=>{if(!ge||ne)return;let y;return y=setTimeout(()=>{let F=sd(fr(ge,{preProcess:J=>{J.querySelectorAll(".mention, .hashtag, pre, code, a:has(.invisible)").forEach(ce=>{ce.remove()}),J.querySelectorAll("a").forEach(ce=>{const Oe=ce.innerText.trim();(Oe.startsWith("https://")||Oe.startsWith("http://"))&&ce.remove()})}}));Ln(F)},1e3),()=>clearTimeout(y)},[ge,ne]);const Ee=ne||Ye,wt=!!(oe!=null&&oe.length);T&&wt&&(r="s");const Je=he(()=>mo(),[]),Qe=he(()=>Je&&Je===R,[R,Je]),yr=Ne(Ps),ft=!Qe&&!i&&!d&&ko(dt,yr);if((ft==null?void 0:ft.action)==="hide")return null;const Et=y=>{y.shiftKey};if(r!=="l"&&ft)return s(pd,{status:t,filterInfo:ft,instance:b,containerProps:{onMouseEnter:Et},showFollowedTags:!0,quoted:m});const et=new Date(ve),Jt=new Date(Se);let re=de==null?void 0:de.find(y=>y.id===ae);!re&&ae===P&&(re={url:I,username:D,displayName:k});const[Me,Be]=ee(re);if(!l&&!Me&&ae){const y=W.accounts[ae];y?Be(y):td(ae,w).then(F=>{Be(F),W.accounts[F.id]=F}).catch(F=>{})}const Fe=ae===Je||(de==null?void 0:de.find(y=>y.id===Je)),ye=he(()=>!!(Ko.account.get("preferences")||{})["reading:expand:spoilers"],[]),tt=he(()=>(Ko.account.get("preferences")||{})["reading:expand:media"]||"default",[]),$e=d||ye||!!S.spoilers[P],ze=d||tt==="show_all"||!!S.spoilersMedia[P];if(we)return N?s("div",{"data-state-post-id":$,class:"status-group",onMouseEnter:Et,children:[s("div",{class:"status-pre-meta",children:[s(H,{icon:"group",size:"l",alt:"Group"})," ",s(fn,{account:t.account,instance:b,showAvatar:!0})]}),s(qt,{status:e?null:we,statusID:e?we.id:null,instance:b,size:r,contentTextWeight:o,readOnly:i,mediaFirst:T})]}):s("div",{"data-state-post-id":$,class:"status-reblog",onMouseEnter:Et,children:[s("div",{class:"status-pre-meta",children:[s(H,{icon:"rocket",size:"l"})," ",s(fn,{account:t.account,instance:b,showAvatar:!0})," ",s("span",{children:"boosted"})]}),
Some media have no descriptions.`),!confirm(y))return!1}if(W.statuses[$]={...t,reblogged:!K,reblogsCount:te+(K?-1:1)},K){const y=await w.v1.statuses.$select(P).unreblog();return rt(y,b),!0}else{const y=await w.v1.statuses.$select(P).reblog();return rt(y,b),!0}}catch{return W.statuses[$]=t,!1}},Sr=async()=>{if(!O||!x)return alert(nn),!1;try{if(W.statuses[$]={...t,reblogged:!K,reblogsCount:te+(K?-1:1)},K){const y=await w.v1.statuses.$select(P).unreblog();rt(y,b)}else{const y=await w.v1.statuses.$select(P).reblog();rt(y,b)}return!0}catch{return W.statuses[$]=t,!1}},Ro=async()=>{if(!O||!x)return alert(nn),!1;try{if(W.statuses[$]={...t,favourited:!le,favouritesCount:Te+(le?-1:1)},le){const y=await w.v1.statuses.$select(P).unfavourite();rt(y,b)}else{const y=await w.v1.statuses.$select(P).favourite();rt(y,b)}return!0}catch{return W.statuses[$]=t,!1}},xr=async()=>{try{const y=await Ro();!fe&&y&&Pe(le?`Unliked @${D||M}'s post`:`Liked @${D||M}'s post`)}catch{}},Do=async()=>{if(Un("@mastodon/post-bookmark")){if(!O||!x)return alert(nn),!1;try{if(W.statuses[$]={...t,bookmarked:!pe},pe){const y=await w.v1.statuses.$select(P).unbookmark();rt(y,b)}else{const y=await w.v1.statuses.$select(P).bookmark();rt(y,b)}return!0}catch{return W.statuses[$]=t,!1}}},No=async()=>{try{const y=await Do();!fe&&y&&Pe(pe?`Unbookmarked @${D||M}'s post`:`Bookmarked @${D||M}'s post`)}catch{}},Pn=!!Ee&&Ee!==nt&&!no([Ee],[nt])&&!tn.find(y=>Ee===y||no([Ee],[y])),Fo=B(),zo=B();async function Xs(y){var ce,Oe,Dt,Mr;y&&(Fo.current=w.v1.statuses.$select(e).rebloggedBy.list({limit:Si}),zo.current=w.v1.statuses.$select(e).favouritedBy.list({limit:Si}));const[{value:F},{value:J}]=await Promise.allSettled([Fo.current.next(),zo.current.next()]);if((ce=F.value)!=null&&ce.length||(Oe=J.value)!=null&&Oe.length){const St=[];return(Dt=F.value)!=null&&Dt.length&&St.push(...F.value.map(xt=>(xt._types=["reblog"],xt))),(Mr=J.value)!=null&&Mr.length&&St.push(...J.value.map(xt=>(xt._types=["favourite"],xt))),{value:St,done:F.done&&J.done}}return{value:[],done:!0}}const Js=B(),Ho=["public","unlisted"].includes(q),Qs=["public","unlisted","private"].includes(q),Vo=s(U,{children:[!fe&&O&&s(U,{children:s("div",{class:"menu-control-group-horizontal status-menu",children:[s(ke,{onClick:Cn,children:[s(H,{icon:"comment"}),s("span",{children:Y>0?vt(Y):"Reply"})]}),s(Cr,{subMenu:!0,confirmLabel:s(U,{children:[s(H,{icon:"rocket"}),s("span",{children:K?"Unboost":"Boost"})]}),className:`menu-reblog ${K?"checked":""}`,menuExtras:s(ke,{onClick:()=>{Bn({draftStatus:{status:`
${Ve}`}})},children:[s(H,{icon:"quote"}),s("span",{children:"Quote"})]}),menuFooter:Tr&&!K?s("div",{class:"footer",children:[s(H,{icon:"alert"}),"Some media have no descriptions."]}):Oo>=3&&s("div",{class:"footer",children:[s(H,{icon:"info"}),s("span",{children:["Old post (",s("strong",{children:rd.format(-Oo,"month")}),")"]})]}),disabled:!rn,onClick:async()=>{try{const y=await Sr();!fe&&y&&Pe(K?`Unboosted @${D||M}'s post`:`Boosted @${D||M}'s post`)}catch{}},children:[s(H,{icon:"rocket"}),s("span",{children:te>0?vt(te):K?"Unboost":"Boost…"})]}),s(ke,{onClick:xr,className:`menu-favourite ${le?"checked":""}`,children:[s(H,{icon:"heart"}),s("span",{children:Te>0?vt(Te):le?"Unlike":"Like"})]}),Un("@mastodon/post-bookmark")&&s(ke,{onClick:No,className:`menu-bookmark ${pe?"checked":""}`,children:[s(H,{icon:"bookmark"}),s("span",{children:pe?"Unbookmark":"Bookmark"})]})]})}),!fe&&O&&(fe||E)&&s(an,{}),(fe||E)&&s(U,{children:s(ke,{onClick:()=>{W.showGenericAccounts={heading:"Boosted/Liked by…",fetchAccounts:Xs,instance:b,showReactions:!0,postID:$}},children:[s(H,{icon:"react"}),s("span",{children:["Boosted/Liked by",s("span",{class:"more-insignificant",children:"…"})]})]})}),!T&&s(U,{children:[(u||!Ee||Pn)&&s(an,{}),u?s("div",{class:mn?"menu-horizontal":"",children:[s(ke,{disabled:en,onClick:()=>{_r(!0)},children:[s(H,{icon:"translate"}),s("span",{children:"Translate"})]}),mn&&s(ke,{onClick:()=>{const y=Kr(t);y&&vi(y,Ee)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]}):(!Ee||Pn)&&s("div",{class:mn?"menu-horizontal":"",children:[s(ci,{to:`${b?`/${b}`:""}/s/${P}?translate=1`,children:[s(H,{icon:"translate"}),s("span",{children:"Translate"})]}),mn&&s(ke,{onClick:()=>{const y=Kr(t);y&&vi(y,Ee)},children:[s(H,{icon:"speak"}),s("span",{children:"Speak"})]})]})]}),(!fe&&O||u||!Ee||Pn)&&s(an,{}),!fe&&s(U,{children:s(ci,{to:b?`/${b}/s/${P}`:`/s/${P}`,onClick:y=>{h(y,t)},children:[s(H,{icon:"arrows-right"}),s("small",{children:["View post by @",D||M,s("br",{}),s("span",{class:"more-insignificant",children:[gn[q]," • ",Po]})]})]})}),!!Se&&s(U,{children:s(ke,{onClick:()=>{In(P)},children:[s(H,{icon:"history"}),s("small",{children:["Show Edit History",s("br",{}),s("span",{class:"more-insignificant",children:["Edited: ",$o]})]})]})}),s(ke,{href:Ve,target:"_blank",children:[s(H,{icon:"external"}),s("small",{class:"menu-double-lines",children:fd(Ve)})]}),s("div",{class:"menu-horizontal",children:[s(ke,{onClick:()=>{try{navigator.clipboard.writeText(Ve),Pe("Link copied")}catch{Pe("Unable to copy link")}},children:[s(H,{icon:"link"}),s("span",{children:"Copy"})]}),Ho&&(navigator==null?void 0:navigator.share)&&((Wo=navigator==null?void 0:navigator.canShare)==null?void 0:Wo.call(navigator,{url:Ve}))&&s(ke,{onClick:()=>{try{navigator.share({url:Ve})}catch{alert("Sharing doesn't seem to work.")}},children:[s(H,{icon:"share"}),s("span",{children:"Share…"})]})]}),Ho&&fe&&s(ke,{onClick:()=>{wr(!0)},children:[s(H,{icon:"code"}),s("span",{children:"Embed post"})]}),(Qe||Fe)&&s(an,{}),(Qe||Fe)&&s(ke,{onClick:async()=>{try{const y=await w.v1.statuses.$select(P)[be?"unmute":"mute"]();rt(y,b),Pe(be?"Conversation unmuted":"Conversation muted")}catch{Pe(be?"Unable to unmute conversation":"Unable to mute conversation")}},children:be?s(U,{children:[s(H,{icon:"unmute"}),s("span",{children:"Unmute conversation"})]}):s(U,{children:[s(H,{icon:"mute"}),s("span",{children:"Mute conversation"})]})}),Qe&&Qs&&s(ke,{onClick:async()=>{try{const y=await w.v1.statuses.$select(P)[Ce?"unpin":"pin"]();Pe(Ce?"Post unpinned from profile":"Post pinned to profile")}catch{Pe(Ce?"Unable to unpin post":"Unable to pin post")}},children:Ce?s(U,{children:[s(H,{icon:"unpin"}),s("span",{children:"Unpin from profile"})]}):s(U,{children:[s(H,{icon:"pin"}),s("span",{children:"Pin to profile"})]})}),Qe&&s("div",{class:"menu-horizontal",children:[Un("@mastodon/post-edit")&&s(ke,{onClick:()=>{Bn({editStatus:t})},children:[s(H,{icon:"pencil"}),s("span",{children:"Edit"})]}),fe&&s(Cr,{subMenu:!0,confirmLabel:s(U,{children:[s(H,{icon:"trash"}),s("span",{children:"Delete th
${Ve}`}})},children:[s(H,{icon:"quote"}),s("span",{children:"Quote"})]}),menuFooter:Tr&&!K&&s("div",{class:"footer",children:[s(H,{icon:"alert"}),"Some media have no descriptions."]}),children:s("div",{class:"action has-count",children:s(Vt,{checked:K,title:["Boost","Unboost"],alt:["Boost","Boosted"],class:"reblog-button",icon:"rocket",count:te,disabled:!rn})})}),s("div",{class:"action has-count",children:s(Vt,{checked:le,title:["Like","Unlike"],alt:["Like","Liked"],class:"favourite-button",icon:"heart",count:Te,onClick:Ro})}),Un("@mastodon/post-bookmark")&&s("div",{class:"action",children:s(Vt,{checked:pe,title:["Bookmark","Unbookmark"],alt:["Bookmark","Bookmarked"],class:"bookmark-button",icon:"bookmark",onClick:Do})}),s(is,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:s("div",{class:"action",children:s("button",{type:"button",title:"More",class:"plain more-button",children:s(H,{icon:"more",size:"l",alt:"More"})})}),children:Vo})]})]})]}),!!br&&s(Gr,{onClick:y=>{y.target===y.currentTarget&&In(!1)},children:s(ud,{statusID:br,instance:b,fetchStatusHistory:()=>w.v1.statuses.$select(br).history.list(),onClose:()=>{var y;In(!1),(y=Rt.current)==null||y.focus()}})}),!!qs&&s(Gr,{onClick:y=>{y.target===y.currentTarget&&wr(!1)},children:s(dd,{post:t,instance:b,onClose:()=>{wr(!1)}})})]})]})}function ad(e){const{enabled:t,children:n,lang:r,captionChildren:o}=e;return!t||!o?n:s("figure",{class:"media-figure-multiple",children:[n,s("figcaption",{lang:r,dir:"auto",children:o})]})}function cd(e){const{mediaAttachments:t,language:n,postID:r,instance:o}=e,i=t.length>1,a=B(),[l,c]=ee(0);return se(()=>{let u=()=>{const{clientWidth:f,scrollLeft:d}=a.current,p=Math.round(d/f);c(p)};return a.current&&a.current.addEventListener("scroll",u,{passive:!0}),()=>{a.current&&a.current.removeEventListener("scroll",u)}},[]),s(U,{children:[s("div",{class:"media-first-container",children:[s("div",{class:"media-first-carousel",ref:a,children:t.map((u,f)=>s("div",{class:"media-first-item",children:s(so,{media:u,lang:n,to:`/${o}/s/${r}?media=${f+1}`})},u.id))}),i&&s("div",{class:"media-carousel-controls",children:[s("div",{class:"carousel-indexer",children:[l+1,"/",t.length]}),s("label",{class:"media-carousel-button",children:s("button",{type:"button",class:"carousel-button",hidden:l===0,onClick:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(l-1),behavior:"smooth"})},children:s(H,{icon:"arrow-left"})})}),s("label",{class:"media-carousel-button",children:s("button",{type:"button",class:"carousel-button",hidden:l===t.length-1,onClick:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(l+1),behavior:"smooth"})},children:s(H,{icon:"arrow-right"})})})]})]}),i&&s("div",{class:"media-carousel-dots",style:{"--dots-count":t.length},children:t.map((u,f)=>s("span",{class:`carousel-dot ${f===l?"active":""}`},u.id))})]})}function ld({card:e,selfReferential:t,instance:n}){var V;const r=Mn(W),{blurhash:o,title:i,description:a,html:l,providerName:c,providerUrl:u,authorName:f,authorUrl:d,width:p,height:m,image:h,imageDescription:g,url:v,type:E,embedUrl:_,language:T,publishedAt:w}=e,b=i||c||f,L=p/m>=1.2?"large":"",[O,$]=ee(null);if(se(()=>{b&&h&&!t&&ya(v)&&_a(n,v).then(j=>{if(!j)return;const{id:R,url:I}=j;$("#"+I)})},[b,h,t]),r.unfurledLinks[v])return null;const S=/<iframe/i.test(l),M=Ae(j=>{S&&(j.preventDefault(),W.showEmbedModal={html:l,url:v||_,width:p,height:m})},[S]);if(b&&(h||E==="photo"&&o)){const j=ro.toUnicode(URL.parse(v).hostname.replace(/^www\./,"").replace(/\/$/,""));let R;const I=h&&o?Mo(o):null;if(!h){const z=cu(o,44,44),N=window.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas");N.width=44,N.height=44;const P=N.getContext("2d");P.imageSmoothingEnabled=!1;const Y=P.createImageData(44,44);Y.data.set(z),P.putImageData(Y,0,0),R=N.toDataURL()}const k=["x.com","twitter.com","threads.net"].includes(j);return s("a",{href:O||v,target:O?nu
`+L+`
`+((M=d==null?void 0:d.options)!=null&&M.length?`
<p>📊:</p>
<ul>
${d.options.map(V=>`
<li>
${V.title}
${V.votesCount>=0?` (${V.votesCount})`:""}
</li>
`).join("")}
</ul>`:"")+(E.length>0?`
`+E.map(V=>{const{description:j,meta:R,previewRemoteUrl:I,previewUrl:k,remoteUrl:D,url:C,type:z}=V,{original:N={},small:P}=R||{},Y=(P==null?void 0:P.width)||(N==null?void 0:N.width),K=(P==null?void 0:P.height)||(N==null?void 0:N.height),te=D||C,le=I||k,Te=le||te,pe=te?URL.parse(te):null,_e=z==="unknown"&&pe&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(pe.pathname),be=z==="unknown"&&pe&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(pe.pathname),ie=z==="image"||z==="unknown"&&le&&!_e&&!be,ue=z==="gifv"||z==="video"||_e,q=z==="audio"||be;let ne="";return ie?ne=`<img src="${Te}" width="${Y}" height="${K}" alt="${j}" loading="lazy" />`:ue?ne=`
<video src="${te}" width="${Y}" height="${K}" controls preload="auto" poster="${le}" loading="lazy"></video>
${j?`<figcaption>${j}</figcaption>`:""}
`:q?ne=`
<audio src="${te}" controls preload="auto"></audio>
${j?`<figcaption>${j}</figcaption>`:""}
`:ne=`
<a href="${te}">📄 ${j||te}</a>
`,`<figure>${ne}</figure>`}).join(`
`):""),S=`
<blockquote lang="${m}" cite="${_}">
${p?`
<details>
<summary>${p}</summary>
${$}
</details>
`:$}
<footer>
${dr(o,l)} (@${i}) <a href="${_}"><time datetime="${O.toISOString()}">${O.toLocaleString()}</time></a>
</footer>
</blockquote>
`;return vu(S)}function dd({post:e,instance:t,onClose:n}){const{account:{url:r,displayName:o,username:i,emojis:a,bot:l,group:c},id:u,poll:f,spoilerText:d,language:p,editedAt:m,createdAt:h,content:g,mediaAttachments:v,url:E,emojis:_}=e,T=Fs(e,t);return s("div",{id:"embed-post",class:"sheet",children:[!!n&&s("button",{type:"button",class:"sheet-close",onClick:n,children:s(H,{icon:"x"})}),s("header",{children:s("h2",{children:"Embed post"})}),s("main",{tabIndex:"-1",children:[s("h3",{children:"HTML Code"}),s("textarea",{class:"embed-code",readonly:!0,onClick:w=>{w.target.select()},children:T}),s("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(T),Pe("HTML code copied")}catch{Pe("Unable to copy HTML code")}},children:[s(H,{icon:"clipboard"})," ",s("span",{children:"Copy"})]}),!!(v!=null&&v.length)&&s("section",{children:[s("p",{children:"Media attachments:"}),s("ol",{class:"links-list",children:v.map(w=>s("li",{children:s("a",{href:w.remoteUrl||w.url,target:"_blank",download:!0,children:w.remoteUrl||w.url})},w.id))})]}),!!(a!=null&&a.length)&&s("section",{children:[s("p",{children:"Account Emojis:"}),s("ul",{children:a.map(w=>s("li",{children:[s("picture",{children:[s("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),s("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",s("code",{children:[":",w.shortcode,":"]})," (",s("a",{href:w.url,target:"_blank",download:!0,children:"url"}),")",w.staticUrl?s(U,{children:[" ","(",s("a",{href:w.staticUrl,target:"_blank",download:!0,children:"static"}),")"]}):null]},w.shortcode))})]}),!!(_!=null&&_.length)&&s("section",{children:[s("p",{children:"Emojis:"}),s("ul",{children:_.map(w=>s("li",{children:[s("picture",{children:[s("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),s("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",s("code",{children:[":",w.shortcode,":"]})," (",s("a",{href:w.url,target:"_blank",download:!0,children:"url"}),")",w.staticUrl?s(U,{children:[" ","(",s("a",{href:w.staticUrl,target:"_blank",download:!0,children:"static"}),")"]}):null]},w.shortcode))})]}),s("section",{children:s("small",{children:[s("p",{children:"Notes:"}),s("ul",{children:[s("li",{children:"This is static, unstyled and scriptless. You may need to apply your own styles and edit as needed."}),s("li",{children:"Polls are not interactive, becomes a list with vote counts."}),s("li",{children:"Media attachments can be images, videos, audios or any file types."}),s("li",{children:"Post could be edited or deleted later."})]})]})}),s("h3",{children:"Preview"}),s("output",{class:"embed-preview",dangerouslySetInnerHTML:{__html:T}}),s("p",{children:s("small",{children:"Note: This preview is lightly styled."})})]})]})}function Vt({checked:e,count:t,class:n,title:r,alt:o,size:i,icon:a,iconSize:l="l",onClick:c,...u}){typeof r=="string"&&(r=[r,r]),typeof o=="string"&&(o=[o,o]);const[f,d]=ee(r[0]||""),[p,m]=ee(o[0]||"");return se(()=>{e?(d(r[1]||""),m(o[1]||"")):(d(r[0]||""),m(o[0]||""))},[e,r,o]),s("button",{type:"button",title:f,class:`plain ${i?"small":""} ${n} ${e?"checked":""}`,onClick:h=>{c&&(h.preventDefault(),h.stopPropagation(),c(h))},...u,children:[s(H,{icon:a,size:l,alt:p}),!!t&&s(U,{children:[" ",s("small",{title:t,children:vt(t)})]})]})}function fd(e){if(!e)return;const t=URL.parse(e),{host:n,pathname:r}=t,o=r.replace(/\/$/,""),[i,a,l]=o.match(/\/(@[^\/]+)\/(.*)/)||[];return s(U,{children:[ro.toUnicode(n),a?s(U,{children:["/",a,s("wbr",{}),s("span",{class:"more-insignificant",children:["/",l]})]}):s("span",{class:"more-insignificant",children:o})]})}function hd({sKey:e}){const n=Mn(W).statusReply[e];if(!n)return null;const{id:r,instance:o}=n,i=Fi(r,o);if(!i)return null;const{sensitive:a,spoilerText:l,account:{avatar:c,avatarStatic:u,bot:f}={},visibility:d,content:p,language:m,filtered:h}=i;if(a||l||!p)return null;const g=it(r,o),v=$s(i),E=Ne(Ps),_=ko(h,E);if((_==null?void 0:
//# sourceMappingURL=fuse-sLNor9NY.js.map