phanpy-cz/assets/fuse-3cGZwVM1.js

190 lines
193 KiB
JavaScript
Raw Normal View History

2024-12-08 16:19:23 +00:00
import{ad as lt,Q as ze,c as r,h as Z,t as Me,A as $,_ as Pt,y as ee,ae as Sa,E as vr,i as k,af as I,ag as Ia,d as Yo,ah as io,ai as Aa,l as ae,P as vt,p as Wi,aj as Ca,ak as Ki,O as Zi,f as F,C as Jt,V as Oe,q as Pa,s as B,al as La,j as po,a as so,z as bn,B as Ma,am as Ra,T as O,an as Gi,ao as Oa,ap as qi,r as mo,w as Yi,g as _r,aq as Da,ar as Ne,as as $a,at as Na,au as Un,J as it,u as In,b as ft,W as Xi,av as Fa,aw as za,ax as Va}from"./useTitle-6CgMxXiB.js";function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Xo.apply(null,arguments)}var Qi=["shift","alt","meta","mod","ctrl"],Ha={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 pt(e){return(e&&Ha[e]||e||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function Ba(e){return Qi.includes(e)}function Io(e,t){return t===void 0&&(t=","),e.split(t)}function Ao(e,t,n){t===void 0&&(t="+");var o=e.toLocaleLowerCase().split(t).map(function(a){return pt(a)}),i={alt:o.includes("alt"),ctrl:o.includes("ctrl")||o.includes("control"),shift:o.includes("shift"),meta:o.includes("meta"),mod:o.includes("mod")},s=o.filter(function(a){return!Qi.includes(a)});return Xo({},i,{keys:s,description:n,hotkey:e})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Ji([pt(e.key),pt(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&es([pt(e.key),pt(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){mt.clear()})})();var mt=new Set;function yr(e){return Array.isArray(e)}function Ua(e,t){t===void 0&&(t=",");var n=yr(e)?e:e.split(t);return n.every(function(o){return mt.has(o.trim().toLowerCase())})}function Ji(e){var t=Array.isArray(e)?e:[e];mt.has("meta")&&mt.forEach(function(n){return!Ba(n)&&mt.delete(n.toLowerCase())}),t.forEach(function(n){return mt.add(n.toLowerCase())})}function es(e){var t=Array.isArray(e)?e:[e];e==="meta"?mt.clear():t.forEach(function(n){return mt.delete(n.toLowerCase())})}function ja(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Wa(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Ka(e){return ts(e,["input","textarea","select"])}function ts(e,t){t===void 0&&(t=!1);var n=e.target,o=e.composed,i=null;return Za(n)&&o?i=e.composedPath()[0]&&e.composedPath()[0].tagName:i=n&&n.tagName,yr(t)?!!(i&&t&&t.some(function(s){var a;return s.toLowerCase()===((a=i)==null?void 0:a.toLowerCase())})):!!(i&&t&&t)}function Za(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function Ga(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 qa=function(t,n,o){o===void 0&&(o=!1);var i=n.alt,s=n.meta,a=n.mod,c=n.shift,l=n.ctrl,d=n.keys,f=t.key,u=t.code,p=t.ctrlKey,h=t.metaKey,m=t.shiftKey,g=t.altKey,v=pt(u),T=f.toLowerCase();if(!(d!=null&&d.includes(v))&&!(d!=null&&d.includes(T))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!o){if(i===!g&&T!=="alt"||c===!m&&T!=="shift")return!1;if(a){if(!h&&!p)return!1}else if(s===!h&&T!=="meta"&&T!=="os"||l===!p&&T!=="ctrl"&&T!=="control")return!1}return d&&d.length===1&&(d.includes(T)||d.includes(v))?!0:d?Ua(d):!d},Ya=lt(void 0),Xa=function(){return ze(Ya)};function ns(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,o){return n&&ns(e[o],t[o])},!0):e===t}var Qa=lt({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableSco
* Toastify js 1.12.0
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
*/var jf=br.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(Sa,function(t){var n=function(a){return new n.lib.init(a)},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(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 c in this.options.style)a.style[c]=this.options.style[c];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 l=document.createElement("img");l.src=this.options.avatar,l.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?a.appendChild(l):a.insertAdjacentElement("afterbegin",l)}if(this.options.close===!0){var d=document.createElement("button");d.type="button",d.setAttribute("aria-label","Close"),d.className="toast-close",d.innerHTML="&#10006;",d.addEventListener("click",(function(v){v.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var f=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&f>360?a.insertAdjacentElement("afterbegin",d):a.appendChild(d)}if(this.options.stopOnFocus&&this.options.duration>0){var u=this;a.addEventListener("mouseover",function(v){window.clearTimeout(a.timeOutValue)}),a.addEventListener("mouseleave",function(){a.timeOutValue=window.setTimeout(function(){u.removeElement(a)},u.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
`);p.innerHTML=`<code>${u.innerHTML.trim()}</code>`,u.replaceWith(p)}}if(l){const u=[...a.querySelectorAll("p")].filter(p=>Wl.test(p.innerText));for(const p of u){const h=[p];let m=!1,g=p;for(;g.nextElementSibling;){const v=g.nextElementSibling;if(v&&v.tagName==="P")if(Kl.test(v.innerText)){h.push(v),m=!0;break}else h.push(v);else break;g=v}if(m){const v=document.createElement("pre");for(const y of h)for(const w of y.querySelectorAll("br"))w.replaceWith(`
`);const T=h.map(y=>y.innerHTML).join(`
`);v.innerHTML=`<code tabindex="0">${T}</code>`,p.replaceWith(v);for(const y of h)y.remove()}}}if(s.includes("`")){d=Fo(a);for(const f of d){let u=$o(f.nodeValue);Zl.test(u)&&(u=u.replaceAll(Xl,"<code>$1</code>")),zt.innerHTML=u,f.replaceWith(...zt.childNodes)}}if(Gl.test(s)){d=Fo(a,{rejectFilter:["A"]});for(const f of d){let u=$o(f.nodeValue);ql.test(u)&&(u=u.replaceAll(Yl,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),zt.innerHTML=u,f.replaceWith(...zt.childNodes)}}if(s.includes("#")){let f=null;const u=[...a.querySelectorAll("p")].filter((p,h)=>{let m=0;for(let g=0;g<p.childNodes.length;g++){const v=p.childNodes[g];if(v.nodeType===Node.TEXT_NODE){if(v.textContent.trim()!=="")return!1}else if(v.tagName!=="BR")if(v.tagName==="A"){const T=v.textContent.trim();if(!T||!T.startsWith("#"))return!1;m++}else return!1}if(m>3||m>1&&f&&h===f+1)return f=h,!0});if(u!=null&&u.length)for(const p of u)p.classList.add("hashtag-stuffing"),p.title=p.innerText}if(s.includes("<img")){const f=a.querySelectorAll("img");for(let u=0;u<f.length;u++){const p=f[u],h=p.getAttribute("width")||p.naturalWidth,m=p.getAttribute("height")||p.naturalHeight;h&&m&&p.style.setProperty("--original-aspect-ratio",`${h}/${m}`)}}for(const f of a.childNodes)if(f.nodeType===Node.TEXT_NODE){const u=document.createElement("span");u.textContent=f.textContent,a.replaceChild(u,f)}return i&&queueMicrotask(()=>i(a)),o?a:a.innerHTML}const Ls=Oe(Jl),eu=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],tu=Object.fromEntries(eu.map(e=>[e,!0])),nu=/^(https?:\/\/(www\.)?|xmpp:)/,No=30;function ou(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),o=(n.match(nu)||[])[0]||"";if(!o)return;const i=n.slice(o.length,o.length+No),s=n.slice(o.length+No),a=n.slice(o.length).length>No;e.innerHTML=`<span class="invisible">${o}</span><span class=${a?"ellipsis":""}>${i}</span><span class="invisible">${s}</span>`}catch{}}function Fo(e,t={}){var a;const n=[],o=Object.assign({},tu,(a=t.rejectFilter)==null?void 0:a.reduce((c,l)=>(c[l]=!0,c),{})),i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode(c){return o[c.parentNode.nodeName]?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}},!1);let s;for(;s=i.nextNode();)n.push(s);return n}const Vt=document.createElement("div");function ru(e,t){if(!e)return"";const{preProcess:n}=t||{};return Vt.innerHTML=e.replace(/<\/p>/g,`</p>
`).replace(/<\/li>/g,`</li>
`),Vt.querySelectorAll("br").forEach(o=>{o.replaceWith(`
`)}),n==null||n(Vt),Vt.querySelectorAll(".invisible").forEach(o=>{o.remove()}),Vt.querySelectorAll(".ellipsis").forEach(o=>{o.append("...")}),Vt.innerText.replace(/[\r\n]{3,}/g,`
`).trim()}const _o=Oe(ru);function iu(e){const{mentions:t=[],instance:n,previewMode:o,statusURL:i}=e||{};return s=>{var f,u;let{target:a}=s;if(a=a.closest("a"),!a||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.which===2)return;const c=(f=a.previousSibling)==null?void 0:f.textContent,l=c==null?void 0:c.endsWith("@"),d=a.innerText.startsWith("@");if((a.classList.contains("u-url")||a.classList.contains("mention"))&&d||l&&!d){const p=(a.querySelector("span")||a).innerText.trim(),h=p.replace(/^@/,""),m=a.getAttribute("href"),g=t.find(v=>v.url===m)||t.find(v=>v.acct===h||v.username===h);if(g)s.preventDefault(),s.stopPropagation(),B.showAccount={account:g.acct,instance:n};else if(!/^http/i.test(p)){s.preventDefault(),s.stopPropagation();const v=a.getAttribute("href");B.showAccount={account:v,instance:n}}}else if(!o){const p=c==null?void 0:c.endsWith("#");if(a.classList.contains("hashtag")||p){s.preventDefault(),s.stopPropagation();const h=a.innerText.replace(/^#/,"").trim(),m=n?`#/${n}/t/${h}`:`#/t/${h}`;location.hash=m}else(u=B.unfurledLinks[a.href])!=null&&u.url&&i!==a.href&&(s.preventDefault(),s.stopPropagation(),B.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${B.unfurledLinks[a.href].url}`)}}}function eh(e,t){return()=>k.number(e,{style:"unit",unit:t,unitDisplay:"long"})}const su=Oe(()=>new Intl.DateTimeFormat().resolvedOptions().locale),au=e=>{const{locale:t,dateYear:n,hideTime:o,formatOpts:i,forceOpts:s}=e||{},a=t.replace(/-[a-z]+$/i,""),c=bn([a],[su],t),l=new Date().getFullYear(),d=s||{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(t,d)}catch{}return Intl.DateTimeFormat(void 0,d)},cu=Oe(au);function kn(e,t){return e instanceof Date||(e=new Date(e)),cu({dateYear:e.getFullYear(),locale:k.locale,...t}).format(e)}function rt(e){try{return k.number(e,{notation:"compact",roundingMode:"floor"})}catch{return e}}const _i=5e3;function Gn(e){if(e||(e=!0),B.showCompose){B.composerState.minimized?Re({duration:_i,text:k._({id:"/4fHR1"})}):Re({duration:_i,text:k._({id:"vvl08N"})});return}sc(),B.showCompose=e}function th({skeleton:e,account:t,avatarSize:n="xl",useAvatarStatic:o=!1,instance:i,external:s,internal:a,onClick:c,showActivity:l=!1,showStats:d=!1,accountInstance:f,hideDisplayName:u=!1,relationship:p={},excludeRelationshipAttrs:h=[]}){if(e)return r("div",{class:"account-block skeleton",children:[r(st,{size:n}),r("span",{children:[r("b",{children:"████████"}),r("br",{}),r("span",{class:"account-block-acct",children:"██████"})]})]});if(!t)return null;const{id:m,acct:g,avatar:v,avatarStatic:T,displayName:y,username:w,emojis:E,url:x,statusesCount:b,lastStatusAt:S,bot:D,fields:L,note:A,group:C,followersCount:R,createdAt:K,locked:U}=t;let[oe,Q,re]=g.match(/([^@]+)(@.+)/i)||[,g];f&&(re=`@${f}`);const q=L==null?void 0:L.find(se=>!!se.verifiedAt&&!!se.value),ie={};for(const se in p)h.includes(se)||(ie[se]=p[se]);const ce=ie.following||ie.followedBy||ie.requested;return r("a",{class:"account-block",href:x,target:s?"_blank":null,title:re?g:`@${g}`,onClick:se=>{if(!s){if(se.preventDefault(),c)return c(se);a?location.hash=`/${i}/a/${m}`:B.showAccount={account:t,instance:i}}},children:[r("div",{class:"avatar-container",children:r(st,{url:o?T:v||T,size:n,squircle:D})}),r("span",{class:"account-block-content",children:[!u&&r(F,{children:y?r("b",{children:r(qt,{text:y,emojis:E})}):r("b",{children:w})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[re?"":"@",Q,r("wbr",{}),re,U&&r(F,{children:[" ",r(M,{icon:"lock",size:"s",alt:k._({id:"G2fuEb"})})]})]}),l&&r("div",{class:"account-block-stats",children:[r(O,{id:"ajzDof",values:{0:rt(b)}}),!!S&&r(F,{children:[" ","·"," ",r(O,{id:"f8bJ3C",values:{0:kn(S,{hideTime:!0})}})]})]}),d&&r("div",{class:"account-block-stats",children:[D&&r(F,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"bot"})," ",r(O,{id:"9Vdq+j"})]})}),!!C&&r(F,{children:r("span",{class:"tag collapsed",children:[r(
<style ${n}>
:host {
--aspect-ratio: var(--lite-youtube-aspect-ratio, 16 / 9);
--aspect-ratio-short: var(--lite-youtube-aspect-ratio-short, 9 / 16);
--frame-shadow-visible: var(--lite-youtube-frame-shadow-visible, yes);
contain: content;
display: block;
position: relative;
width: 100%;
aspect-ratio: var(--aspect-ratio);
}
@media (max-width: 40em) {
:host([short]) {
aspect-ratio: var(--aspect-ratio-short);
}
}
#frame, #fallbackPlaceholder, iframe {
position: absolute;
width: 100%;
height: 100%;
left: 0;
}
#frame {
cursor: pointer;
}
#fallbackPlaceholder, slot[name=image]::slotted(*) {
object-fit: cover;
width: 100%;
}
@container style(--frame-shadow-visible: yes) {
#frame::before {
content: '';
display: block;
position: absolute;
top: 0;
background-image: linear-gradient(180deg, #111 -20%, transparent 90%);
height: 60px;
width: 100%;
z-index: 1;
}
}
#playButton {
width: 68px;
height: 48px;
background-color: transparent;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 68 48"><path d="M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z" fill="red"/><path d="M45 24 27 14v20" fill="white"/></svg>');
z-index: 1;
border: 0;
border-radius: inherit;
}
#playButton:before {
content: '';
border-style: solid;
border-width: 11px 0 11px 19px;
border-color: transparent transparent transparent #fff;
}
#playButton,
#playButton:before {
position: absolute;
top: 50%;
left: 50%;
transform: translate3d(-50%, -50%, 0);
cursor: inherit;
}
/* Post-click styles */
.activated {
cursor: unset;
}
#frame.activated::before,
#frame.activated > #playButton {
display: none;
}
</style>
<div id="frame">
<picture>
<slot name="image">
<source id="webpPlaceholder" type="image/webp">
<source id="jpegPlaceholder" type="image/jpeg">
<img id="fallbackPlaceholder" referrerpolicy="origin" loading="lazy">
</slot>
</picture>
<button id="playButton"></button>
</div>
`,this.domRefFrame=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.autoPause)&&this.initIntersectionObserver()}attributeChangedCallback(t,n,o){n!==o&&(this.setupComponent(),this.domRefFrame.classList.contains("activated")&&(this.domRefFrame.classList.remove("activated"),this.shadowRoot.querySelector("iframe").remove(),this.isIframeLoaded=!1))}addIframe(t=!1){if(!this.isIframeLoaded){let n=t?0:1;const o=this.noCookie?"-nocookie":"";let i;this.playlistId?i=`?listType=playlist&list=${this.playlistId}&`:i=`${this.videoId}?`,this.autoPause&&(this.params="enablejsapi=1"),this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1);const s=`
<iframe credentialless frameborder="0" title="${this.videoTitle}"
allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen
src="https://www.youtube${o}.com/embed/${i}autoplay=${n}&${this.params}"
></iframe>`;this.domRefFrame.insertAdjacentHTML("beforeend",s),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 o,i;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}`),(i=(o=this.domRefImg)==null?void 0:o.fallback)==null||i.setAttribute("alt",`${this.videoPlay}: ${this.videoTitle}`)}initIntersectionObserver(){const t={root:null,rootMargin:"0px",threshold:0};new IntersectionObserver((o,i)=>{o.forEach(s=>{s.isIntersecting&&!this.isIframeLoaded&&(Be.warmConnections(this),this.addIframe(!0),i.unobserve(this))})},t).observe(this),this.autoPause&&new IntersectionObserver((i,s)=>{i.forEach(a=>{var c,l;a.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 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 o=document.createElement("link");o.rel=t,o.href=n,o.crossOrigin="true",document.head.append(o)}static warmConnections(t){Be.isPreconnected||window.liteYouTubeIsPreconnected||(Be.addPrefetch("preconnect","https://i.ytimg.com/"),Be.addPrefetch("preconnect","https://s.ytimg.com"),t.noCookie?Be.addPrefetch("preconnect","https://www.youtube-nocookie.com"):(Be.addPrefetch("preconnect","https://www.youtube.com"),Be.addPrefetch("preconnect","https://www.google.com"),Be.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Be.addPrefetch("preconnect","https://static.doubleclick.net")),Be.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Be.isPreconnected=!1;customElements.define("lite-youtube",Be);const Fs=new Uint8Array(128);for(let e=0;e<83;e++)Fs["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(e)]=e;const oo=(e,t,n)=>{let o=0;for(;t<n;)o*=83,o+=Fs[e.charCodeAt(t++)];return o},zs=Math.pow,Sn=Math.PI,Hu=Sn*2,Vs=3294.6,Hs=269.025,Bu=e=>e>10.31475?zs(e/Hs+.052132,2.4):e/Vs,Bo=e=>~~(e>1227e-8?Hs*zs(e,.416666)-13.025:e*Vs+1),vn=e=>(e<0?-1:1)*e*e,xi=e=>{for(e+=Sn/2;e>Sn;)e-=Hu;const t=1.27323954*e-.405284735*vn(e);return .225*(vn(t)-t)+t};function Cr(e){const t=oo(e,2,6);return[t>>16,t>>8&255,t&255]}function Uu(e,t,n,o){const i=oo(e,0,1),s=i%9+1,a=~~(i/9)+1,c=s*a;let l=0,d=0,f=0,u=0,p=0,h=0,m=0,g=0,v=0,T=0,y=0,w=0;const E=(oo(e,1,2)+1)/13446*(o|1),x=new Float64Array(c*3),b=Cr(e);for(l=0;l<3;l++)x[l]=Bu(b[l]);for(l=1;l<c;l++)w=oo(e,4+l*2,6+l*2),x[l*3]=vn(~~(w/361)-9)*E,x[l*3+1]=vn(~~(w/19)%19-9)*E,x[l*3+2]=vn(w%19-9)*E;const S=new Float64Array(a*n),D=new Float64Array(s*t);for(d=0;d<a;d++)for(u=0;u<n;u++)S[d*n+u]=xi(Sn*u*d/n);for(l=0;l<s;l++)for(f=0;f<t;f++)D[l*t+f]=xi(Sn*f*l/t);const L=t*4,A=new Uint8ClampedArray(L*n);for(u=0;u<n;u++)for(f=0;f<t;f++){for(p=h=m=0,d=0;d<a;d++)for(v=S[d*n+u],l=0;l<s;l++)g=D[l*t+f]*v,T=(l+d*s)*3,p+=x[T]*g,h+=x[T+1]*g,m+=x[T+2]*g;y=4*f+u*L,A[y]=Bo(p),A[y+1]=Bo(h),A[y+2]=Bo(m),A[y+3]=255}return A}const ju=(e,t={})=>{const n=t.char||" ",o=t.count||2;let i=0;const s=[];return e.reverse().reduce((a,c)=>{s.length&&i&&s[i]&&s[i]===c.substring(1,s[i].length+1)&&(s.splice(i,1),i--);const d=[`${n.repeat(i?i*o:0)}${c}`,...a];return c.substring(0,2)==="</"&&(i++,s[i]=c.substring(2,c.length-1)),d},[]).join(`
`)};var Wu=ju;const Bs=e=>e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),Ku=e=>{const t=Bs(e).split(`
`),n=[];let o="";for(let i=0;i<t.length;i+=1){const s=t[i];if(s.endsWith("/>")){n.push(`${o}${s.slice(0,-2)} />`),o="";continue}if(s.endsWith(">")){n.push(`${o}${s.startsWith(">")||s.startsWith("<")?"":" "}${s}`),o="";continue}o+=o.length?` ${s}`:s}return n};var Zu={mergeAttributesWithElements:Ku,removeEmptyLines:Bs};const Gu=Wu,{mergeAttributesWithElements:qu}=Zu,Yu=(e,t={})=>{const n=qu(e);return Gu(n,t)};var Xu=Yu;const Qu=vr(Xu);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 Us=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,Ju=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function js(e){const{nativeEvent:t}=e,n=Ju();return n&&t instanceof n||"touches"in e}function Ws(e){const t=Us();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Ks(e){const{nativeEvent:t}=e;if(!t)return!1;const n=Us();return n&&t instanceof n||"pointerId"in t}function ki(e){return Ws(e)||js(e)||Ks(e)}function Si(e){return js(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:Ws(e)||Ks(e)?{x:e.pageX,y:e.pageY}:null}function ed(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Zs(e,{threshold:t=400,captureEvent:n=!1,detect:o=hn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:s=!0,filterEvents:a,onStart:c,onMove:l,onFinish:d,onCancel:f}={}){const u=$(!1),p=$(!1),h=$(),m=$(),g=$(e),v=$(null),T=Me(x=>b=>{p.current||ki(b)&&(a!==void 0&&!a(b)||(n&&b.persist(),c==null||c(b,{context:x}),v.current=Si(b),p.current=!0,h.current=b.currentTarget,m.current=setTimeout(()=>{g.current&&(g.current(b,{context:x}),u.current=!0)},t)))},[n,a,c,t]),y=Me(x=>(b,S)=>{ki(b)&&p.current&&(v.current=null,n&&b.persist(),u.current?d==null||d(b,{context:x}):p.current&&(f==null||f(b,{context:x,reason:S??pn.CancelledByRelease})),u.current=!1,p.current=!1,m.current!==void 0&&clearTimeout(m.current))},[n,d,f]),w=Me(x=>b=>{if(l==null||l(b,{context:x}),i!==!1&&v.current){const S=Si(b);if(S){const D=i===!0?25:i,L={x:Math.abs(S.x-v.current.x),y:Math.abs(S.y-v.current.y)};(L.x>D||L.y>D)&&y(x)(b,pn.CancelledByMovement)}}},[y,i,l]),E=Me(x=>{if(e===null)return{};switch(o){case hn.Mouse:{const b={onMouseDown:T(x),onMouseMove:w(x),onMouseUp:y(x)};return s&&(b.onMouseLeave=S=>{y(x)(S,pn.CancelledOutsideElement)}),b}case hn.Touch:return{onTouchStart:T(x),onTouchMove:w(x),onTouchEnd:y(x)};case hn.Pointer:{const b={onPointerDown:T(x),onPointerMove:w(x),onPointerUp:y(x)};return s&&(b.onPointerLeave=S=>y(x)(S,pn.CancelledOutsideElement)),b}}},[e,y,s,o,w,T]);return ee(()=>{if(!window)return;function x(b){const S=ed(b);y()(S)}return window.addEventListener("mouseup",x),window.addEventListener("touchend",x),window.addEventListener("pointerup",x),()=>{window.removeEventListener("mouseup",x),window.removeEventListener("touchend",x),window.removeEventListener("pointerup",x)}},[y]),ee(()=>()=>{m.current!==void 0&&clearTimeout(m.current)},[]),ee(()=>{g.current=e},[e]),E}function td({poll:e,lang:t,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const[s,a]=Z("default"),{expired:c,expiresAt:l,id:d,multiple:f,options:u,ownVotes:p,voted:h,votersCount:m,votesCount:g,emojis:v}=e,T=!!l&&new Date(l),y=f?m:g;let w=0;y<=1e3?w=0:y<=1e4?w=1:y<=1e5&&(w=2);const[E,x]=Z(!1),b=u.every(S=>S.votesCount!==null);return r("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[E&&b||h||c?r(F,{children:[r("div",{class:"poll-options",children:u.map((S,D)=>{const{title:L,votesCount:A}=S,C=y?A/y:0,R=C?C.toLocaleString(k.locale||void 0,{style:"percent",maximumFractionDigits:w}):"0%",K=A>0&&A===Math.max(...u.map(U=>U.votesCount));return r("div",{class:`poll-option poll-result ${K?"poll-option-leading":""}`,style:{"--percentage":`${C*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(qt,{text:L,emojis:v})}),h&&p.includes(D
📊:
${o.options.map(c=>`${o.multiple?"▪️":"•"} ${c.title}`).join(`
`)}`),i!=null&&i.length&&(s+=" "+i.map(c=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[c.type]||"").join("")),s}function rd(e,t,n){var o=this,i=$(null),s=$(0),a=$(null),c=$([]),l=$(),d=$(),f=$(e),u=$(!0);f.current=e;var p=typeof window<"u",h=!t&&t!==0&&p;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var m=!!(n=n||{}).leading,g=!("trailing"in n)||!!n.trailing,v="maxWait"in n,T="debounceOnServer"in n&&!!n.debounceOnServer,y=v?Math.max(+n.maxWait||0,t):null;ee(function(){return u.current=!0,function(){u.current=!1}},[]);var w=ae(function(){var E=function(A){var C=c.current,R=l.current;return c.current=l.current=null,s.current=A,d.current=f.current.apply(R,C)},x=function(A,C){h&&cancelAnimationFrame(a.current),a.current=h?requestAnimationFrame(A):setTimeout(A,C)},b=function(A){if(!u.current)return!1;var C=A-i.current;return!i.current||C>=t||C<0||v&&A-s.current>=y},S=function(A){return a.current=null,g&&c.current?E(A):(c.current=l.current=null,d.current)},D=function A(){var C=Date.now();if(b(C))return S(C);if(u.current){var R=t-(C-i.current),K=v?Math.min(R,y-(C-s.current)):R;x(A,K)}},L=function(){if(p||T){var A=Date.now(),C=b(A);if(c.current=[].slice.call(arguments),l.current=o,i.current=A,C){if(!a.current&&u.current)return s.current=i.current,x(D,t),m?E(i.current):d.current;if(v)return x(D,t),E(i.current)}return a.current||x(D,t),d.current}};return L.cancel=function(){a.current&&(h?cancelAnimationFrame(a.current):clearTimeout(a.current)),s.current=0,c.current=i.current=l.current=a.current=null},L.isPending=function(){return!!a.current},L.flush=function(){return a.current?S(Date.now()):d.current},L},[m,v,t,y,g,h,p,T]);return w}function id(e,t,n){var o=n===void 0?{}:n,i=o.leading,s=o.trailing;return rd(e,t,{maxWait:t,leading:i===void 0||i,trailing:s===void 0||s})}function sd(e,t){var n=$(null),o=$(null);o.current=t;var i=$(null);ee(function(){s()});var s=Me(function(){var a=i.current,c=o.current,l=a||(c?c instanceof Element?c:c.current:null);n.current&&n.current.element===l&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:e,cleanup:l?e(l):void 0})},[e]);return ee(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),Me(function(a){i.current=a,s()},[s])}function Ai(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 ad(e){e===void 0&&(e={});var t=e.onResize,n=$(void 0);n.current=t;var o=e.round||Math.round,i=$(),s=Z({width:void 0,height:void 0}),a=s[0],c=s[1],l=$(!1);ee(function(){return l.current=!1,function(){l.current=!0}},[]);var d=$({width:void 0,height:void 0}),f=sd(Me(function(u){return(!i.current||i.current.box!==e.box||i.current.round!==o)&&(i.current={box:e.box,round:o,instance:new ResizeObserver(function(p){var h=p[0],m=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=Ai(h,m,"inlineSize"),v=Ai(h,m,"blockSize"),T=g?o(g):void 0,y=v?o(v):void 0;if(d.current.width!==T||d.current.height!==y){var w={width:T,height:y};d.current.width=T,d.current.height=y,n.current?n.current(w):l.current||c(w)}})}),i.current.instance.observe(u,{box:e.box}),function(){i.current&&i.current.instance.unobserve(u)}},[e.box,o]),e.ref);return ae(function(){return{ref:f,width:a.width,height:a.height}},[f,a.width,a.height])}function ro({className:e="truncated"}={}){const t=$(),n=id(({height:o})=>{if(t.current){const{scrollHeight:i}=t.current;let s=i>o;if(s){const{height:a,maxHeight:c}=getComputedStyle(t.current),l=parseInt(c||a,10);s=i>l}t.current.classList.toggle(e,s)}},300);return ad({ref:t,box:"border-box",onResize:n}),t}const _n={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"};var Ys="kvfysmfp",Xs="ufhsfnkm",cd=".".concat(Ys,"{overflow:hidden;touch-action:none}.").concat(Xs,"{transform-origin: 0 0}"),ld=typeof window>"u",ud=function(){return!ld&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var
<video
src="${T}"
poster="${g}"
width="${b}"
height="${S}"
data-orientation="${C}"
preload="auto"
autoplay
muted
playsinline
${J?"loop":""}
ondblclick="this.paused ? this.play() : this.pause()"
${pe?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`,Ue=`
<video
src="${T}"
poster="${g}"
width="${b}"
height="${S}"
data-orientation="${C}"
preload="auto"
autoplay
playsinline
${J?"loop":""}
controls
></video>
`;return r(ge,{children:r(ce,{class:`media ${e} media-${z?"gif":"video"} ${te?"media-contain":""} ${be?"media-hover-animate":""}`,"data-orientation":C,"data-formatted-duration":i?void 0:Y,"data-label":z&&!i&&!te?"GIF":void 0,"data-has-alt":!N||void 0,style:!i&&Ce,onClick:Ae=>{if(be)try{K.current.pause()}catch{}f(Ae)},onMouseEnter:()=>{if(be)try{K.current.play()}catch{}},onMouseLeave:()=>{if(be)try{K.current.pause()}catch{}},onFocus:()=>{if(be)try{K.current.play()}catch{}},onBlur:()=>{if(be)try{K.current.pause()}catch{}},children:[i||te?z&&i?r(Ri,{...ie,enabled:!0,children:r("div",{ref:oe,dangerouslySetInnerHTML:{__html:Rt}})}):z?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Rt}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Ue}}):z?r("video",{ref:K,src:T,poster:g,width:b,height:S,"data-orientation":C,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:pe?Ae=>{const{target:Pe}=Ae,ve=Pe==null?void 0:Pe.closest(".media-gif");if(ve){const Le=Pe.currentTime/Pe.duration*100;ve.style.setProperty("--progress",`${Le}%`)}}:void 0}):r(F,{children:[g?r("img",{src:g,alt:N?"":p,width:b,height:S,"data-orientation":C,loading:"lazy",decoding:"async",onLoad:Ae=>{if(!A){const Pe=Ae.target.closest(".media");if(Pe){const{naturalHeight:ve,naturalWidth:Le}=Ae.target;Pe.dataset.orientation=Le>ve?"landscape":"portrait",Pe.style.setProperty("--width",`${Le}px`),Pe.style.setProperty("--height",`${ve}px`),Pe.style.aspectRatio=`${Le}/${ve}`}}}}):r("video",{src:T+"#t=0.1",width:b,height:S,"data-orientation":C,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:Ae=>{if(!V){const{duration:Pe}=Ae.target;if(Pe){const ve=Ko(Pe),Le=Ae.target.closest(".media-video");Le&&(Le.dataset.formattedDuration=ve)}}}}),r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})})]}),!i&&!N&&r(Zo,{alt:p,lang:o,index:l})]})})}else if(y==="audio"||fe){const V=Ko(w.duration);return r(ge,{children:r(ce,{class:`media media-audio ${e}`,"data-formatted-duration":i?void 0:V,"data-has-alt":!N||void 0,onClick:f,style:!i&&Ce,children:[i?r("audio",{src:v||T,preload:"none",controls:!0,autoPlay:!0}):g?r("img",{src:g,alt:N?"":p,width:b,height:S,"data-orientation":C,loading:"lazy",onError:le=>{var z,J;try{(J=(z=le.target)==null?void 0:z.remove)==null||J.call(z)}catch{}}}):null,!i&&r(F,{children:[r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})}),!N&&r(Zo,{alt:p,lang:o,index:l})]})]})})}}function Md(e){return URL.parse(e,location.origin)}const lr=Jt(Ld,(e,t)=>{const n=e.media||{},o=t.media||{};return(n==null?void 0:n.id)===(o==null?void 0:o.id)&&n.url===o.url&&e.to===t.to&&e.class===t.class}),Rd=280,Od=140,Dd=qi({limit:1,interval:1e3});function $d(e,t){return t.v1.accounts.$select(e).fetch()}const Nd=mo(Dd($d)),Ct={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"WDcQq9"},private:{id:"o34OrG"},direct:{id:"IV4QaU"}},Fd=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),zd=new Intl.RelativeTimeFormat,Oi=80;function Vd(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 Go(e){const{spoilerText:t,content:n,poll:o}=e;return(t?`${t}
`:"")+_o(n)+Vd(o)}function ea(e=[],t=document){for(const n of e)try{return t.querySelectorAll(n)}catch{}return[]}function Hd(e){return!e||(e=e.trim(),!e)?!1:!!_o(e,{preProcess:n=>{for(const o of ea([".mention, pre, code, a:has(.invisible)",".mention, pre, code"],n))o.remove()}})}function Bd(e){return _o(e,{preProcess:t=>{for(const n of ea([".mention, .hashtag, pre, code, a:has(.invisible)",".mention, .hashtag, pre, code"],t))n.remove();for(const n of t.querySelectorAll("a")){const o=n.innerText.trim();(o.startsWith("https://")||o.startsWith("http://"))&&n.remove()}}})}const Ud=/^http/i,Di=({post:e,instance:t,previewMode:n})=>{const{content:o,emojis:i,language:s,mentions:a,url:c}=e,l=$();return Pt(()=>{if(!l.current)return;const d=Ls(o,{emojis:i,returnDOM:!0});for(const f of d.querySelectorAll('a.u-url[target="_blank"]'))Ud.test(f.innerText.trim())||f.removeAttribute("target");l.current.replaceChildren(d.cloneNode(!0))},[o,i.length]),r("div",{ref:l,lang:s,dir:"auto",class:"inner-content",onClick:iu({mentions:a,instance:t,previewMode:n,statusURL:c})})},jd={s:"small",m:"medium",l:"large"},Wd=mo(async e=>{const{detectAll:t}=await I(async()=>{const{detectAll:i}=await import("./tinyld-light-tbgyvj3S.js");return{detectAll:i}},[],import.meta.url);if(e=e==null?void 0:e.trim(),(e==null?void 0:e.length)>500)return null;const o=t(e)[0];return o!=null&&o.lang&&(o==null?void 0:o.accuracy)>.5?o.lang:null}),yn={id:"8fZueG"},ur={},$i=(e,t=[])=>{if(!e)return!1;const n=bs(!0),o=e!==n&&!bn([e],[n])&&!t.find(i=>e===i||bn([e],[i]));return ur[e+t]=!0,o};function Qt({statusID:e,status:t,instance:n,size:o="m",contentTextWeight:i,readOnly:s,enableCommentHint:a,withinContext:c,skeleton:l,enableTranslate:d,forceTranslate:f,previewMode:u,onMediaClick:p,quoted:h,onStatusLinkClick:m=()=>{},showFollowedTags:g,allowContextMenu:v,showActionsBar:T,showReplyParent:y,mediaFirst:w}){var Yr,Xr,Qr,Jr;const{_:E}=po();if(l)return r("div",{class:`status skeleton ${w?"status-media-first small":""}`,children:[!w&&r(st,{size:"xxl"}),r("div",{class:"container",children:[r("div",{class:"meta",children:[(o==="s"||w)&&r(st,{size:"m"})," ███ ████████"]}),r("div",{class:"content-container",children:[w&&r("div",{class:"media-first-container"}),r("div",{class:`content ${w?"media-first-content":""}`,children:r("p",{children:"████ ████████"})})]})]})]});const{masto:x,instance:b,authenticated:S}=so({instance:n}),{instance:D}=so(),L=b===D;let A=it(e||(t==null?void 0:t.id),b);const C=In(B);if(t||(t=C.statuses[A]||C.statuses[e],A=it(t==null?void 0:t.id,b)),!t)return null;const{account:{acct:R,avatar:K,avatarStatic:U,id:oe,url:Q,displayName:re,username:q,emojis:ie,bot:ce,group:se},id:H,repliesCount:fe,reblogged:ne,reblogsCount:Ee,favourited:ye,favouritesCount:xe,bookmarked:De,poll:Ie,muted:$e,sensitive:Ce,spoilerText:he,visibility:N,language:ge,editedAt:Ge,filtered:Mt,card:V,createdAt:le,inReplyToId:z,inReplyToAccountId:J,content:Y,mentions:be,mediaAttachments:te,reblog:pe,uri:Rt,url:Ue,emojis:Ae,tags:Pe,pinned:ve,_deleted:Le,_pinned:Cn,emojiReactions:dt}=t,[yt,yo]=Z(null);ee(()=>{if(!Y||ge||yt)return;let _;return _=setTimeout(async()=>{let P=await Wd(Bd(Y));yo(P)},1e3),()=>clearTimeout(_)},[Y,ge]);const me=ge||yt,Ot=!!(te!=null&&te.length);w&&Ot&&(o="s");const bt=ae(()=>_r(),[]),tt=ae(()=>bt&&bt===oe,[oe,bt]),Pn=ze(Gs),X=!tt&&!s&&!u&&Pr(Mt,Pn);if((X==null?void 0:X.action)==="hide")return null;const _e=_=>{_.shiftKey};if(o!=="l"&&X)return r(ef,{status:t,filterInfo:X,instance:b,containerProps:{onMouseEnter:_e},showFollowedTags:!0,quoted:h});const Te=new Date(le),He=new Date(Ge);let ke=be==null?void 0:be.find(_=>_.id===J);!ke&&J===H&&(ke={url:Q,username:q,displayName:re});const[nt,Ln]=Z(ke);if(!c&&!nt&&J){const _=B.accounts[J];_?Ln(_):Nd(J,x).then(P=>{Ln(P),B.accounts[P.id]=P}).catch(P=>{})}const Tt=J===bt||(be==null?void 0:be.find(_=>_.id===bt)),qe=ae(()=>!!(Yo.account.get("preferences")||{})["reading:expand:spoilers"],[]),Mn=ae(()=>{var P;return((P=(Yo.account.get("preferences")||{})["reading:expand:media"])==null?void 0:P.toLowerCase
${Ue}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:zr&&!ne?r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(O,{id:"MB+wJL"})]}):Vr>=3&&r("div",{class:"footer",children:[r(M,{icon:"info"}),r("span",{children:r(O,{id:"dBme/4",values:{0:zd.format(-Vr,"month")},components:{0:r("strong",{})}})})]}),disabled:!nn,onClick:async()=>{try{const _=await xo();!de&&_&&Re(ne?k._({id:"bpDheH",values:{0:q||R}}):k._({id:"dbNZdP",values:{0:q||R}}))}catch{}},children:[r(M,{icon:"rocket"}),r("span",{children:Ee>0?rt(Ee):ne?k._({id:"QzzGsY"}):k._({id:"PiVIlD"})})]}),r(Se,{onClick:ko,className:`menu-favourite ${ye?"checked":""}`,children:[r(M,{icon:"heart"}),r("span",{children:xe>0?rt(xe):ye?k._({id:"OcUmcH"}):k._({id:"W9FRBT"})})]}),Zn("@mastodon/post-bookmark")&&r(Se,{onClick:Ur,className:`menu-bookmark ${De?"checked":""}`,children:[r(M,{icon:"bookmark"}),r("span",{children:De?k._({id:"q8EQYI"}):k._({id:"PZlHt8"})})]})]})}),!de&&L&&(de||T)&&r(an,{}),(de||T)&&r(F,{children:r(Se,{onClick:()=>{B.showGenericAccounts={heading:k._({id:"+XOeb+"}),fetchAccounts:ma,instance:b,showReactions:!0,postID:A}},children:[r(M,{icon:"react"}),r("span",{children:r(O,{id:"+XOeb+"})})]})}),!w&&r(F,{children:[(d||!me||Nt)&&r(an,{}),d?r("div",{class:mn?"menu-horizontal":"",children:[r(Se,{disabled:xt,onClick:()=>{Dt(!0)},children:[r(M,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),mn&&r(Se,{onClick:()=>{const _=Go(t);_&&Ii(_,me)},children:[r(M,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]}):(!me||Nt)&&r("div",{class:mn?"menu-horizontal":"",children:[r(li,{to:`${b?`/${b}`:""}/s/${H}?translate=1`,children:[r(M,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),mn&&r(Se,{onClick:()=>{const _=Go(t);_&&Ii(_,me)},children:[r(M,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]})]}),(!de&&L||d||!me||Nt)&&r(an,{}),!de&&r(F,{children:r(li,{to:b?`/${b}/s/${H}`:`/s/${H}`,onClick:_=>{m(_,t)},children:[r(M,{icon:"arrows-right"}),r("small",{children:[r(O,{id:"8MkSAW",values:{0:q||R},components:{0:r("span",{class:"bidi-isolate"})}}),r("br",{}),r("span",{class:"more-insignificant",children:[E(Ct[N])," • ",Nr]})]})]})}),!!Ge&&r(F,{children:r(Se,{onClick:()=>{Rn(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:Fr}})})]})]})}),r(Se,{href:Ue,target:"_blank",children:[r(M,{icon:"external"}),r("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:Qd(Ue)})]}),r("div",{class:"menu-horizontal",children:[r(Se,{onClick:()=>{try{navigator.clipboard.writeText(Ue),Re(k._({id:"edWbV6"}))}catch{Re(k._({id:"W1ewR0"}))}},children:[r(M,{icon:"link"}),r("span",{children:r(O,{id:"he3ygx"})})]}),Kr&&(navigator==null?void 0:navigator.share)&&((Xr=navigator==null?void 0:navigator.canShare)==null?void 0:Xr.call(navigator,{url:Ue}))&&r(Se,{onClick:()=>{try{navigator.share({url:Ue})}catch{alert(k._({id:"TtG3Uh"}))}},children:[r(M,{icon:"share"}),r("span",{children:r(O,{id:"LFKLqp"})})]})]}),Kr&&de&&r(Se,{onClick:()=>{Eo(!0)},children:[r(M,{icon:"code"}),r("span",{children:r(O,{id:"jdVwsS"})})]}),(tt||Tt)&&r(an,{}),(tt||Tt)&&r(Se,{onClick:async()=>{try{const _=await x.v1.statuses.$select(H)[$e?"unmute":"mute"]();ft(_,b),Re($e?k._({id:"Pm+5jw"}):k._({id:"ywB7JM"}))}catch{Re($e?k._({id:"c6jxNY"}):k._({id:"8SN9kN"}))}},children:$e?r(F,{children:[r(M,{icon:"unmute"}),r("span",{children:r(O,{id:"i51zUR"})})]}):r(F,{children:[r(M,{icon:"mute"}),r("span",{children:r(O,{id:"OiUYO5"})})]})}),tt&&va&&r(Se,{onClick:async()=>{try{const _=await x.v1.statuses.$select(H)[ve?"unpin":"pin"]();ft(_,b),Re(ve?k._({id:"Yx809+"}):k._({id:"S6P6E+"}))}catch{Re(ve?k._({id:"A6cs15"}):k._({id:"vgUfWO"}))}},children:ve?r(F,{children:[r(M,{icon:"unpin"}),r("span",{children:r(O,{id:"XQMQZw"})})]}):r(F,{children:[r(M,{icon:"pin"}),r("span",{children:r(O,{id:"lfHLsx"})})]})}),tt&&r("div",{class:"menu-horizontal",children:[Zn("@mastodon/post-edit")&&r(Se,{onClick:()=>{Gn({editStatus:t})},children:[r(M,
${Ue}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:zr&&!ne&&r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(O,{id:"MB+wJL"})]}),children:r(Bt,{checked:ne,title:[k._({id:"kulphB"}),k._({id:"QzzGsY"})],alt:[k._({id:"kulphB"}),k._({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:Ee,disabled:!nn})})}),r("div",{class:"action has-count",children:r(Bt,{checked:ye,title:[k._({id:"W9FRBT"}),k._({id:"OcUmcH"})],alt:[k._({id:"W9FRBT"}),k._({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:xe,onClick:Hr})}),Zn("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(Bt,{checked:De,title:[k._({id:"PZlHt8"}),k._({id:"q8EQYI"})],alt:[k._({id:"PZlHt8"}),k._({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:Br})}),r(ys,{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:k._({id:"2FYpfJ"}),class:"plain more-button",children:r(M,{icon:"more",size:"l",alt:k._({id:"2FYpfJ"})})})}),children:Zr})]})]})]}),!!wo&&r(Qo,{onClick:_=>{_.target===_.currentTarget&&Rn(!1)},children:r(Yd,{statusID:wo,instance:b,fetchStatusHistory:()=>x.v1.statuses.$select(wo).history.list(),onClose:()=>{var _;Rn(!1),(_=$t.current)==null||_.focus()}})}),!!fa&&r(Qo,{onClick:_=>{_.target===_.currentTarget&&Eo(!1)},children:r(Xd,{post:t,instance:b,onClose:()=>{Eo(!1)}})})]})]})}function Kd(e){const{enabled:t,children:n,lang:o,captionChildren:i}=e;return!t||!i?n:r("figure",{class:"media-figure-multiple",children:[n,r("figcaption",{lang:o,dir:"auto",children:i})]})}function Zd(e){const{mediaAttachments:t,language:n,postID:o,instance:i}=e,s=t.length>1,a=$(),[c,l]=Z(0);return ee(()=>{let d=()=>{const{clientWidth:f,scrollLeft:u}=a.current,p=Math.round(Math.abs(u)/f);l(p)};return a.current&&a.current.addEventListener("scroll",d,{passive:!0}),()=>{a.current&&a.current.removeEventListener("scroll",d)}},[]),r(F,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:a,children:t.map((d,f)=>r("div",{class:"media-first-item",children:r(lr,{media:d,lang:n,to:`/${i}/s/${o}?media=${f+1}`})},d.id))}),s&&r("div",{class:"media-carousel-controls",children:[r("div",{class:"carousel-indexer",children:[c+1,"/",t.length]}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===0,onClick:d=>{d.preventDefault(),d.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(c-1)*(rr()?-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===t.length-1,onClick:d=>{d.preventDefault(),d.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(c+1)*(rr()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-right"})})})]})]}),s&&r("div",{class:"media-carousel-dots",style:{"--dots-count":t.length},children:t.map((d,f)=>r("span",{class:`carousel-dot ${f===c?"active":""}`},d.id))})]})}function Ni(e){return Ps.toUnicode(URL.parse(e).hostname.replace(/^www\./,"").replace(/\/$/,""))}function Fi(e){return["x.com","twitter.com","threads.net","bsky.app"].includes(e)}function Gd({authors:e,hidden:t,children:n}){var i,s;if(t||!((s=(i=e==null?void 0:e[0])==null?void 0:i.account)!=null&&s.id))return n;const o=e[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(gt,{account:o,showAvatar:!0})}})})]})]})}function qd({card:e,selfReferential:t,selfAuthor:n,instance:o}){var Q;const i=In(B),{blurhash:s,title:a,description:c,html:l,providerName:d,providerUrl:f,authorName:u,authorUrl:p,width:h,height:m,image:g,imageDescription:v,url:T,type:y,embedUrl:w,language:E,publishedAt:x,authors:b}=e,S=a||d||u,L=h/m>=1.2?"large":"",[A,C]=Z(null);if(ee(()=>{S&&g&&!t&&Fa(T)&&za(o,T).then(re=>{if(!re)
`+S+`
`+((C=u==null?void 0:u.options)!=null&&C.length?`
<p>📊:</p>
<ul>
${u.options.map(R=>`
<li>
${R.title}
${R.votesCount>=0?` (${R.votesCount})`:""}
</li>
`).join("")}
</ul>`:"")+(T.length>0?`
`+T.map(R=>{const{description:K,meta:U,previewRemoteUrl:oe,previewUrl:Q,remoteUrl:re,url:q,type:ie}=R,{original:ce={},small:se}=U||{},H=(se==null?void 0:se.width)||(ce==null?void 0:ce.width),fe=(se==null?void 0:se.height)||(ce==null?void 0:ce.height),ne=re||q,Ee=oe||Q,ye=Ee||ne,xe=ne?URL.parse(ne):null,De=ie==="unknown"&&xe&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(xe.pathname),Ie=ie==="unknown"&&xe&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(xe.pathname),$e=ie==="image"||ie==="unknown"&&Ee&&!De&&!Ie,Ce=ie==="gifv"||ie==="video"||De,he=ie==="audio"||Ie;let N="";return $e?N=`<img src="${ye}" width="${H}" height="${fe}" alt="${K}" loading="lazy" />`:Ce?N=`
<video src="${ne}" width="${H}" height="${fe}" controls preload="auto" poster="${Ee}" loading="lazy"></video>
${K?`<figcaption>${K}</figcaption>`:""}
`:he?N=`
<audio src="${ne}" controls preload="auto"></audio>
${K?`<figcaption>${K}</figcaption>`:""}
`:N=`
<a href="${ne}">📄 ${K||ne}</a>
`,`<figure>${N}</figure>`}).join(`
`):""),A=`
<blockquote lang="${h}" cite="${y}" data-source="fediverse">
${p?`
<details>
<summary>${p}</summary>
${L}
</details>
`:L}
<footer>
${ar(i,c)} (@${s}) <a href="${y}"><time datetime="${D.toISOString()}">${D.toLocaleString()}</time></a>
</footer>
</blockquote>
`;return Qu(A)}function Xd({post:e,instance:t,onClose:n}){const{account:{url:o,displayName:i,username:s,emojis:a,bot:c,group:l},id:d,poll:f,spoilerText:u,language:p,editedAt:h,createdAt:m,content:g,mediaAttachments:v,url:T,emojis:y}=e,w=ta(e,t);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:k._({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:E=>{E.target.select()},dir:"auto",children:w}),r("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(w),Re(k._({id:"bl7nrg"}))}catch{Re(k._({id:"/KEBaP"}))}},children:[r(M,{icon:"clipboard"})," ",r("span",{children:r(O,{id:"he3ygx"})})]}),!!(v!=null&&v.length)&&r("section",{children:[r("p",{children:r(O,{id:"/2mUza"})}),r("ol",{class:"links-list",children:v.map(E=>r("li",{children:r("a",{href:E.remoteUrl||E.url,target:"_blank",download:!0,children:E.remoteUrl||E.url})},E.id))})]}),!!(a!=null&&a.length)&&r("section",{children:[r("p",{children:r(O,{id:"AeM/di"})}),r("ul",{children:a.map(E=>r("li",{children:[r("picture",{children:[r("source",{srcset:E.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:E.url,alt:`:${E.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",E.shortcode,":"]})," (",r("a",{href:E.url,target:"_blank",download:!0,children:"URL"}),")",E.staticUrl?r(F,{children:[" ","(",r("a",{href:E.staticUrl,target:"_blank",download:!0,children:r(O,{id:"xiropL"})}),")"]}):null]},E.shortcode))})]}),!!(y!=null&&y.length)&&r("section",{children:[r("p",{children:r(O,{id:"jzjjJh"})}),r("ul",{children:y.map(E=>r("li",{children:[r("picture",{children:[r("source",{srcset:E.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:E.url,alt:`:${E.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",E.shortcode,":"]})," (",r("a",{href:E.url,target:"_blank",download:!0,children:"URL"}),")",E.staticUrl?r(F,{children:[" ","(",r("a",{href:E.staticUrl,target:"_blank",download:!0,children:r(O,{id:"xiropL"})}),")"]}):null]},E.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:w},dir:"auto"}),r("p",{children:r("small",{children:r(O,{id:"j0kZfi"})})})]})]})}const Bt=vt((e,t)=>{let{checked:n,count:o,class:i,title:s,alt:a,size:c,icon:l,iconSize:d="l",onClick:f,...u}=e;typeof s=="string"&&(s=[s,s]),typeof a=="string"&&(a=[a,a]);const[p,h]=Z(s[0]||""),[m,g]=Z(a[0]||"");return ee(()=>{n?(h(s[1]||""),g(a[1]||"")):(h(s[0]||""),g(a[0]||""))},[n,s,a]),r("button",{ref:t,type:"button",title:p,class:`plain ${c?"small":""} ${i} ${n?"checked":""}`,onClick:v=>{f&&(v.preventDefault(),v.stopPropagation(),f(v))},...u,children:[r(M,{icon:l,size:d,alt:m}),!!o&&r(F,{children:[" ",r("small",{title:o,children:rt(o)})]})]})});function Qd(e){if(!e)return;const t=URL.parse(e),{host:n,pathname:o}=t,i=o.replace(/\/$/,""),[s,a,c]=i.match(/\/(@[^\/]+)\/(.*)/)||[];return r(F,{children:[Ps.toUnicode(n),a?r(F,{children:["/",a,r("wbr",{}),r("span",{class:"more-insignificant",children:["/",c]})]}):r("span",{class:"more-insignificant",children:i})]})}function Jd({sKey:e}){const n=In(B).statusReply[e];if(!n)return null;const{id:o,instance:i}=n,s=Xi(o,i);if(!s)return null;const{sensitive:a,spoilerText:c,account:{avatar:l,avatarStatic:d,bot:f}={},visibility:u,content:p,language:h,filtered:m}=s;if(a||c||!p)return null;const g=it(o,i),v=qs(s),T=ze(Gs),y=Pr(m,T);if((y==null?void 0:y.action)==="hide")return null;const w=(y==null?void 0:y.titlesStr)||"";return r("article",
//# sourceMappingURL=fuse-3cGZwVM1.js.map