182 lines
192 KiB
JavaScript
182 lines
192 KiB
JavaScript
|
import{ad as lt,Q as ze,c as r,h as Z,t as Me,A as $,_ as Zt,y as ee,ae as xa,E as gr,i as S,af as I,ag as Sa,ah as io,ai as ka,l as ae,P as Ct,p as ji,aj as Ia,ak as Ki,O as Wi,f as F,C as Jt,V as Oe,q as Aa,s as B,al as Ca,j as po,a as so,z as bn,B as Pa,am as La,T as O,an as Zi,ao as Ma,ap as Gi,r as mo,w as qi,g as vr,aq as Ra,ar as Ne,as as Oa,at as Da,au as Un,J as it,u as In,d as Jr,b as ft,W as Yi,av as $a,aw as Na,ax as Fa}from"./useTitle-i_dVJKRH.js";function Yo(){return Yo=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},Yo.apply(null,arguments)}var Xi=["shift","alt","meta","mod","ctrl"],za={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&&za[e]||e||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function Va(e){return Xi.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!Xi.includes(a)});return Yo({},i,{keys:s,description:n,hotkey:e})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Qi([pt(e.key),pt(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&Ji([pt(e.key),pt(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){mt.clear()})})();var mt=new Set;function _r(e){return Array.isArray(e)}function Ha(e,t){t===void 0&&(t=",");var n=_r(e)?e:e.split(t);return n.every(function(o){return mt.has(o.trim().toLowerCase())})}function Qi(e){var t=Array.isArray(e)?e:[e];mt.has("meta")&&mt.forEach(function(n){return!Va(n)&&mt.delete(n.toLowerCase())}),t.forEach(function(n){return mt.add(n.toLowerCase())})}function Ji(e){var t=Array.isArray(e)?e:[e];e==="meta"?mt.clear():t.forEach(function(n){return mt.delete(n.toLowerCase())})}function Ba(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Ua(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function ja(e){return es(e,["input","textarea","select"])}function es(e,t){t===void 0&&(t=!1);var n=e.target,o=e.composed,i=null;return Ka(n)&&o?i=e.composedPath()[0]&&e.composedPath()[0].tagName:i=n&&n.tagName,_r(t)?!!(i&&t&&t.some(function(s){var a;return s.toLowerCase()===((a=i)==null?void 0:a.toLowerCase())})):!!(i&&t&&t)}function Ka(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function Wa(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 Za=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,u=n.keys,d=t.key,f=t.code,p=t.ctrlKey,h=t.metaKey,m=t.shiftKey,g=t.altKey,_=pt(f),T=d.toLowerCase();if(!(u!=null&&u.includes(_))&&!(u!=null&&u.includes(T))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(_))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 u&&u.length===1&&(u.includes(T)||u.includes(_))?!0:u?Ha(u):!u},Ga=lt(void 0),qa=function(){return ze(Ga)};function ts(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&&ts(e[o],t[o])},!0):e===t}var Ya=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 Hf=yr.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(xa,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 u=document.createElement("button");u.type="button",u.setAttribute("aria-label","Close"),u.className="toast-close",u.innerHTML="✖",u.addEventListener("click",(function(_){_.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var d=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&d>360?a.insertAdjacentElement("afterbegin",u):a.appendChild(u)}if(this.options.stopOnFocus&&this.options.duration>0){var f=this;a.addEventListener("mouseover",function(_){window.clearTimeout(a.timeOutValue)}),a.addEventListener("mouseleave",function(){a.timeOutValue=window.setTimeout(function(){f.removeElement(a)},f.options.duration)})}if(typeof this.options.destination<"u"&&a.addEventListener("click",(function(_){_.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination
|
||
|
`);p.innerHTML=`<code>${f.innerHTML.trim()}</code>`,f.replaceWith(p)}}if(l){const f=[...a.querySelectorAll("p")].filter(p=>Bl.test(p.innerText));for(const p of f){const h=[p];let m=!1,g=p;for(;g.nextElementSibling;){const _=g.nextElementSibling;if(_&&_.tagName==="P")if(Ul.test(_.innerText)){h.push(_),m=!0;break}else h.push(_);else break;g=_}if(m){const _=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(`
|
||
|
|
||
|
`);_.innerHTML=`<code tabindex="0">${T}</code>`,p.replaceWith(_);for(const y of h)y.remove()}}}if(s.includes("`")){u=Fo(a);for(const d of u){let f=$o(d.nodeValue);jl.test(f)&&(f=f.replaceAll(Gl,"<code>$1</code>")),Ft.innerHTML=f,d.replaceWith(...Ft.childNodes)}}if(Kl.test(s)){u=Fo(a,{rejectFilter:["A"]});for(const d of u){let f=$o(d.nodeValue);Wl.test(f)&&(f=f.replaceAll(Zl,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),Ft.innerHTML=f,d.replaceWith(...Ft.childNodes)}}if(s.includes("#")){let d=null;const f=[...a.querySelectorAll("p")].filter((p,h)=>{let m=0;for(let g=0;g<p.childNodes.length;g++){const _=p.childNodes[g];if(_.nodeType===Node.TEXT_NODE){if(_.textContent.trim()!=="")return!1}else if(_.tagName!=="BR")if(_.tagName==="A"){const T=_.textContent.trim();if(!T||!T.startsWith("#"))return!1;m++}else return!1}if(m>3||m>1&&d&&h===d+1)return d=h,!0});if(f!=null&&f.length)for(const p of f)p.classList.add("hashtag-stuffing"),p.title=p.innerText}if(s.includes("<img")){const d=a.querySelectorAll("img");for(let f=0;f<d.length;f++){const p=d[f],h=p.getAttribute("width")||p.naturalWidth,m=p.getAttribute("height")||p.naturalHeight;h&&m&&p.style.setProperty("--original-aspect-ratio",`${h}/${m}`)}}for(const d of a.childNodes)if(d.nodeType===Node.TEXT_NODE){const f=document.createElement("span");f.textContent=d.textContent,a.replaceChild(f,d)}return i&&queueMicrotask(()=>i(a)),o?a:a.innerHTML}const Ps=Oe(Yl),Xl=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],Ql=Object.fromEntries(Xl.map(e=>[e,!0])),Jl=/^(https?:\/\/(www\.)?|xmpp:)/,No=30;function eu(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),o=(n.match(Jl)||[])[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({},Ql,(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 zt=document.createElement("div");function tu(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(o=>{o.replaceWith(`
|
||
|
`)}),n==null||n(zt),zt.querySelectorAll(".invisible").forEach(o=>{o.remove()}),zt.querySelectorAll(".ellipsis").forEach(o=>{o.append("...")}),zt.innerText.replace(/[\r\n]{3,}/g,`
|
||
|
|
||
|
`).trim()}const _o=Oe(tu);function nu(e){const{mentions:t=[],instance:n,previewMode:o,statusURL:i}=e||{};return s=>{var d,f;let{target:a}=s;if(a=a.closest("a"),!a||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.which===2)return;const c=(d=a.previousSibling)==null?void 0:d.textContent,l=c==null?void 0:c.endsWith("@"),u=a.innerText.startsWith("@");if((a.classList.contains("u-url")||a.classList.contains("mention"))&&u||l&&!u){const p=(a.querySelector("span")||a).innerText.trim(),h=p.replace(/^@/,""),m=a.getAttribute("href"),g=t.find(_=>_.url===m)||t.find(_=>_.acct===h||_.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 _=a.getAttribute("href");B.showAccount={account:_,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(f=B.unfurledLinks[a.href])!=null&&f.url&&i!==a.href&&(s.preventDefault(),s.stopPropagation(),B.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${B.unfurledLinks[a.href].url}`)}}}function Xf(e,t){return()=>S.number(e,{style:"unit",unit:t,unitDisplay:"long"})}const ou=Oe(()=>new Intl.DateTimeFormat().resolvedOptions().locale),ru=e=>{const{locale:t,dateYear:n,hideTime:o,formatOpts:i,forceOpts:s}=e||{},a=t.replace(/-[a-z]+$/i,""),c=bn([a],[ou],t),l=new Date().getFullYear(),u=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,u)}catch{}try{return Intl.DateTimeFormat(t,u)}catch{}return Intl.DateTimeFormat(void 0,u)},iu=Oe(ru);function Sn(e,t){return e instanceof Date||(e=new Date(e)),iu({dateYear:e.getFullYear(),locale:S.locale,...t}).format(e)}function rt(e){try{return S.number(e,{notation:"compact",roundingMode:"floor"})}catch{return e}}const vi=5e3;function Gn(e){if(e||(e=!0),B.showCompose){B.composerState.minimized?Re({duration:vi,text:S._({id:"/4fHR1"})}):Re({duration:vi,text:S._({id:"vvl08N"})});return}rc(),B.showCompose=e}function Qf({skeleton:e,account:t,avatarSize:n="xl",useAvatarStatic:o=!1,instance:i,external:s,internal:a,onClick:c,showActivity:l=!1,showStats:u=!1,accountInstance:d,hideDisplayName:f=!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:_,avatarStatic:T,displayName:y,username:w,emojis:E,url:x,statusesCount:b,lastStatusAt:k,bot:D,fields:L,note:A,group:C,followersCount:R,createdAt:W,locked:U}=t;let[oe,Q,re]=g.match(/([^@]+)(@.+)/i)||[,g];d&&(re=`@${d}`);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:_||T,size:n,squircle:D})}),r("span",{class:"account-block-content",children:[!f&&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:S._({id:"G2fuEb"})})]})]}),l&&r("div",{class:"account-block-stats",children:[r(O,{id:"ajzDof",values:{0:rt(b)}}),!!k&&r(F,{children:[" ","·"," ",r(O,{id:"f8bJ3C",values:{0:Sn(k,{hideTime:!0})}})]})]}),u&&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 {
|
||
|
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,o){switch(t){case"videoid":case"playlistid":case"videoTitle":case"videoPlay":{n!==o&&(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 o=this.noCookie?"-nocookie":"";let i;this.playlistId?i=`?listType=playlist&list=${this.playlistId}&`:i=`${this.videoId}?`,this.isYouTubeShort()&&(this.params=`loop=1&mute=1&modestbranding=1&playsinline=1&rel=0&enablejsapi=1&playlist=${this.videoId}`,n=1);const s=`
|
||
|
<iframe 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&&(Ke.warmConnections(),this.addIframe(!0),i.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 o=document.createElement("link");o.rel=t,o.href=n,o.crossOrigin="true",document.head.append(o)}static warmConnections(){Ke.isPreconnected||window.liteYouTubeIsPreconnected||(Ke.addPrefetch("preconnect","https://i.ytimg.com/"),Ke.addPrefetch("preconnect","https://s.ytimg.com"),Ke.addPrefetch("preconnect","https://www.youtube.com"),Ke.addPrefetch("preconnect","https://www.google.com"),Ke.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Ke.addPrefetch("preconnect","https://static.doubleclick.net"),Ke.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Ke.isPreconnected=!1;customElements.define("lite-youtube",Ke);const Ns=new Uint8Array(128);for(let e=0;e<83;e++)Ns["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(e)]=e;const oo=(e,t,n)=>{let o=0;for(;t<n;)o*=83,o+=Ns[e.charCodeAt(t++)];return o},Fs=Math.pow,kn=Math.PI,Fu=kn*2,zs=3294.6,Vs=269.025,zu=e=>e>10.31475?Fs(e/Vs+.052132,2.4):e/zs,Bo=e=>~~(e>1227e-8?Vs*Fs(e,.416666)-13.025:e*zs+1),vn=e=>(e<0?-1:1)*e*e,Ei=e=>{for(e+=kn/2;e>kn;)e-=Fu;const t=1.27323954*e-.405284735*vn(e);return .225*(vn(t)-t)+t};function Ar(e){const t=oo(e,2,6);return[t>>16,t>>8&255,t&255]}function Vu(e,t,n,o){const i=oo(e,0,1),s=i%9+1,a=~~(i/9)+1,c=s*a;let l=0,u=0,d=0,f=0,p=0,h=0,m=0,g=0,_=0,T=0,y=0,w=0;const E=(oo(e,1,2)+1)/13446*(o|1),x=new Float64Array(c*3),b=Ar(e);for(l=0;l<3;l++)x[l]=zu(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 k=new Float64Array(a*n),D=new Float64Array(s*t);for(u=0;u<a;u++)for(f=0;f<n;f++)k[u*n+f]=Ei(kn*f*u/n);for(l=0;l<s;l++)for(d=0;d<t;d++)D[l*t+d]=Ei(kn*d*l/t);const L=t*4,A=new Uint8ClampedArray(L*n);for(f=0;f<n;f++)for(d=0;d<t;d++){for(p=h=m=0,u=0;u<a;u++)for(_=k[u*n+f],l=0;l<s;l++)g=D[l*t+d]*_,T=(l+u*s)*3,p+=x[T]*g,h+=x[T+1]*g,m+=x[T+2]*g;y=4*d+f*L,A[y]=Bo(p),A[y+1]=Bo(h),A[y+2]=Bo(m),A[y+3]=255}return A}const Hu=(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 u=[`${n.repeat(i?i*o:0)}${c}`,...a];return c.substring(0,2)==="</"&&(i++,s[i]=c.substring(2,c.length-1)),u},[]).join(`
|
||
|
`)};var Bu=Hu;const Hs=e=>e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),Uu=e=>{const t=Hs(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 ju={mergeAttributesWithElements:Uu,removeEmptyLines:Hs};const Ku=Bu,{mergeAttributesWithElements:Wu}=ju,Zu=(e,t={})=>{const n=Wu(e);return Ku(n,t)};var Gu=Zu;const qu=gr(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 Bs=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,Yu=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function Us(e){const{nativeEvent:t}=e,n=Yu();return n&&t instanceof n||"touches"in e}function js(e){const t=Bs();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function Ks(e){const{nativeEvent:t}=e;if(!t)return!1;const n=Bs();return n&&t instanceof n||"pointerId"in t}function xi(e){return js(e)||Us(e)||Ks(e)}function Si(e){return Us(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:js(e)||Ks(e)?{x:e.pageX,y:e.pageY}:null}function Xu(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Ws(e,{threshold:t=400,captureEvent:n=!1,detect:o=hn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:s=!0,filterEvents:a,onStart:c,onMove:l,onFinish:u,onCancel:d}={}){const f=$(!1),p=$(!1),h=$(),m=$(),g=$(e),_=$(null),T=Me(x=>b=>{p.current||xi(b)&&(a!==void 0&&!a(b)||(n&&b.persist(),c==null||c(b,{context:x}),_.current=Si(b),p.current=!0,h.current=b.currentTarget,m.current=setTimeout(()=>{g.current&&(g.current(b,{context:x}),f.current=!0)},t)))},[n,a,c,t]),y=Me(x=>(b,k)=>{xi(b)&&p.current&&(_.current=null,n&&b.persist(),f.current?u==null||u(b,{context:x}):p.current&&(d==null||d(b,{context:x,reason:k??pn.CancelledByRelease})),f.current=!1,p.current=!1,m.current!==void 0&&clearTimeout(m.current))},[n,u,d]),w=Me(x=>b=>{if(l==null||l(b,{context:x}),i!==!1&&_.current){const k=Si(b);if(k){const D=i===!0?25:i,L={x:Math.abs(k.x-_.current.x),y:Math.abs(k.y-_.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=k=>{y(x)(k,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=k=>y(x)(k,pn.CancelledOutsideElement)),b}}},[e,y,s,o,w,T]);return ee(()=>{if(!window)return;function x(b){const k=Xu(b);y()(k)}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 Qu({poll:e,lang:t,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const[s,a]=Z("default"),{expired:c,expiresAt:l,id:u,multiple:d,options:f,ownVotes:p,voted:h,votersCount:m,votesCount:g,emojis:_}=e,T=!!l&&new Date(l),y=d?m:g;let w=0;y<=1e3?w=0:y<=1e4?w=1:y<=1e5&&(w=2);const[E,x]=Z(!1),b=f.every(k=>k.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:f.map((k,D)=>{const{title:L,votesCount:A}=k,C=y?A/y:0,R=C?C.toLocaleString(S.locale||void 0,{style:"percent",maximumFractionDigits:w}):"0%",W=A>0&&A===Math.max(...f.map(U=>U.votesCount));return r("div",{class:`poll-option poll-result ${W?"poll-option-leading":""}`,style:{"--percentage":`${C*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(qt,{text:L,emojis:_})}),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 td(e,t,n){var o=this,i=$(null),s=$(0),a=$(null),c=$([]),l=$(),u=$(),d=$(e),f=$(!0);d.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,_="maxWait"in n,T="debounceOnServer"in n&&!!n.debounceOnServer,y=_?Math.max(+n.maxWait||0,t):null;ee(function(){return f.current=!0,function(){f.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,u.current=d.current.apply(R,C)},x=function(A,C){h&&cancelAnimationFrame(a.current),a.current=h?requestAnimationFrame(A):setTimeout(A,C)},b=function(A){if(!f.current)return!1;var C=A-i.current;return!i.current||C>=t||C<0||_&&A-s.current>=y},k=function(A){return a.current=null,g&&c.current?E(A):(c.current=l.current=null,u.current)},D=function A(){var C=Date.now();if(b(C))return k(C);if(f.current){var R=t-(C-i.current),W=_?Math.min(R,y-(C-s.current)):R;x(A,W)}},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&&f.current)return s.current=i.current,x(D,t),m?E(i.current):u.current;if(_)return x(D,t),E(i.current)}return a.current||x(D,t),u.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?k(Date.now()):u.current},L},[m,_,t,y,g,h,p,T]);return w}function nd(e,t,n){var o=n===void 0?{}:n,i=o.leading,s=o.trailing;return td(e,t,{maxWait:t,leading:i===void 0||i,trailing:s===void 0||s})}function od(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 Ii(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 rd(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 u=$({width:void 0,height:void 0}),d=od(Me(function(f){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=Ii(h,m,"inlineSize"),_=Ii(h,m,"blockSize"),T=g?o(g):void 0,y=_?o(_):void 0;if(u.current.width!==T||u.current.height!==y){var w={width:T,height:y};u.current.width=T,u.current.height=y,n.current?n.current(w):l.current||c(w)}})}),i.current.instance.observe(f,{box:e.box}),function(){i.current&&i.current.instance.unobserve(f)}},[e.box,o]),e.ref);return ae(function(){return{ref:d,width:a.width,height:a.height}},[d,a.width,a.height])}function ro({className:e="truncated"}={}){const t=$(),n=nd(({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 rd({ref:t,box:"border-box",onResize:n}),t}const _n={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"};var qs="kvfysmfp",Ys="ufhsfnkm",id=".".concat(qs,"{overflow:hidden;touch-action:none}.").concat(Ys,"{transform-origin: 0 0}"),sd=typeof window>"u",ad=function(){return!sd&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var
|
||
|
<video
|
||
|
src="${T}"
|
||
|
poster="${g}"
|
||
|
width="${b}"
|
||
|
height="${k}"
|
||
|
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>
|
||
|
`,Be=`
|
||
|
<video
|
||
|
src="${T}"
|
||
|
poster="${g}"
|
||
|
width="${b}"
|
||
|
height="${k}"
|
||
|
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{W.current.pause()}catch{}d(Ae)},onMouseEnter:()=>{if(be)try{W.current.play()}catch{}},onMouseLeave:()=>{if(be)try{W.current.pause()}catch{}},onFocus:()=>{if(be)try{W.current.play()}catch{}},onBlur:()=>{if(be)try{W.current.pause()}catch{}},children:[i||te?z&&i?r(Mi,{...ie,enabled:!0,children:r("div",{ref:oe,dangerouslySetInnerHTML:{__html:Mt}})}):z?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Mt}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Be}}):z?r("video",{ref:W,src:T,poster:g,width:b,height:k,"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:k,"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:k,"data-orientation":C,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:Ae=>{if(!V){const{duration:Pe}=Ae.target;if(Pe){const ve=Wo(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=Wo(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:d,style:!i&&Ce,children:[i?r("audio",{src:_||T,preload:"none",controls:!0,autoPlay:!0}):g?r("img",{src:g,alt:N?"":p,width:b,height:k,"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 Cd(e){return URL.parse(e,location.origin)}const cr=Jt(Ad,(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}),Pd=280,Ld=140,Md=Gi({limit:1,interval:1e3});function Rd(e,t){return t.v1.accounts.$select(e).fetch()}const Od=mo(Md(Rd)),At={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"WDcQq9"},private:{id:"o34OrG"},direct:{id:"IV4QaU"}},Dd=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),$d=new Intl.RelativeTimeFormat,Ri=80;function Nd(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)+Nd(o)}function Fd(e){return!e||(e=e.trim(),!e)?!1:!!_o(e,{preProcess:n=>{for(const o of n.querySelectorAll(".mention, pre, code, a:has(.invisible)"))o.remove()}})}function zd(e){return _o(e,{preProcess:t=>{for(const n of t.querySelectorAll(".mention, .hashtag, pre, code, a:has(.invisible)"))n.remove();for(const n of t.querySelectorAll("a")){const o=n.innerText.trim();(o.startsWith("https://")||o.startsWith("http://"))&&n.remove()}}})}const Vd=/^http/i,Oi=({post:e,instance:t,previewMode:n})=>{const{content:o,emojis:i,language:s,mentions:a,url:c}=e,l=$();return Zt(()=>{if(!l.current)return;const u=Ps(o,{emojis:i,returnDOM:!0});for(const d of u.querySelectorAll('a.u-url[target="_blank"]'))Vd.test(d.innerText.trim())||d.removeAttribute("target");l.current.replaceChildren(u.cloneNode(!0))},[o,i.length]),r("div",{ref:l,lang:s,dir:"auto",class:"inner-content",onClick:nu({mentions:a,instance:t,previewMode:n,statusURL:c})})},Hd={s:"small",m:"medium",l:"large"},Bd=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"},lr={},Di=(e,t=[])=>{if(!e)return!1;const n=ys(!0),o=e!==n&&!bn([e],[n])&&!t.find(i=>e===i||bn([e],[i]));return lr[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:u,forceTranslate:d,previewMode:f,onMediaClick:p,quoted:h,onStatusLinkClick:m=()=>{},showFollowedTags:g,allowContextMenu:_,showActionsBar:T,showReplyParent:y,mediaFirst:w}){var qr,Yr,Xr,Qr;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:k}=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:W,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:Lt,card:V,createdAt:le,inReplyToId:z,inReplyToAccountId:J,content:Y,mentions:be,mediaAttachments:te,reblog:pe,uri:Mt,url:Be,emojis:Ae,tags:Pe,pinned:ve,_deleted:Le,_pinned:Cn,emojiReactions:dt}=t,[_t,yo]=Z(null);ee(()=>{if(!Y||ge||_t)return;let v;return v=setTimeout(async()=>{let P=await Bd(zd(Y));yo(P)},1e3),()=>clearTimeout(v)},[Y,ge]);const me=ge||_t,Rt=!!(te!=null&&te.length);w&&Rt&&(o="s");const yt=ae(()=>vr(),[]),tt=ae(()=>yt&&yt===oe,[oe,yt]),Pn=ze(Zs),X=!tt&&!s&&!f&&Cr(Lt,Pn);if((X==null?void 0:X.action)==="hide")return null;const _e=v=>{v.shiftKey};if(o!=="l"&&X)return r(Xd,{status:t,filterInfo:X,instance:b,containerProps:{onMouseEnter:_e},showFollowedTags:!0,quoted:h});const Te=new Date(le),He=new Date(Ge);let Se=be==null?void 0:be.find(v=>v.id===J);!Se&&J===H&&(Se={url:Q,username:q,displayName:re});const[nt,Ln]=Z(Se);if(!c&&!nt&&J){const v=B.accounts[J];v?Ln(v):Od(J,x).then(P=>{Ln(P),B.accounts[P.id]=P}).catch(P=>{})}const bt=J===yt||(be==null?void 0:be.find(v=>v.id===yt)),qe=ae(()=>!!(Jr.account.get("preferences")||{})["reading:expand:spoilers"],[]),Mn=ae(()=>{var P;return((P=(Jr.account.get("preferences")||{})["reading:expand:media"])==null?void 0:P.toLowerCase())||"default"},[]),Ue=f||qe||!!C.spoilers[H],Tt=f||Mn==="show_all"||!!C.spoilersMedia[H];if(pe)return se?r("div",{"data-stat
|
||
|
${Be}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:Fr&&!ne?r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(O,{id:"MB+wJL"})]}):zr>=3&&r("div",{class:"footer",children:[r(M,{icon:"info"}),r("span",{children:r(O,{id:"dBme/4",values:{0:$d.format(-zr,"month")},components:{0:r("strong",{})}})})]}),disabled:!nn,onClick:async()=>{try{const v=await xo();!de&&v&&Re(ne?S._({id:"bpDheH",values:{0:q||R}}):S._({id:"dbNZdP",values:{0:q||R}}))}catch{}},children:[r(M,{icon:"rocket"}),r("span",{children:Ee>0?rt(Ee):ne?S._({id:"QzzGsY"}):S._({id:"PiVIlD"})})]}),r(ke,{onClick:So,className:`menu-favourite ${ye?"checked":""}`,children:[r(M,{icon:"heart"}),r("span",{children:xe>0?rt(xe):ye?S._({id:"OcUmcH"}):S._({id:"W9FRBT"})})]}),Zn("@mastodon/post-bookmark")&&r(ke,{onClick:Br,className:`menu-bookmark ${De?"checked":""}`,children:[r(M,{icon:"bookmark"}),r("span",{children:De?S._({id:"q8EQYI"}):S._({id:"PZlHt8"})})]})]})}),!de&&L&&(de||T)&&r(an,{}),(de||T)&&r(F,{children:r(ke,{onClick:()=>{B.showGenericAccounts={heading:S._({id:"+XOeb+"}),fetchAccounts:ha,instance:b,showReactions:!0,postID:A}},children:[r(M,{icon:"react"}),r("span",{children:r(O,{id:"+XOeb+"})})]})}),!w&&r(F,{children:[(u||!me||$t)&&r(an,{}),u?r("div",{class:mn?"menu-horizontal":"",children:[r(ke,{disabled:Et,onClick:()=>{Ot(!0)},children:[r(M,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),mn&&r(ke,{onClick:()=>{const v=Go(t);v&&ki(v,me)},children:[r(M,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]}):(!me||$t)&&r("div",{class:mn?"menu-horizontal":"",children:[r(ci,{to:`${b?`/${b}`:""}/s/${H}?translate=1`,children:[r(M,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),mn&&r(ke,{onClick:()=>{const v=Go(t);v&&ki(v,me)},children:[r(M,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]})]}),(!de&&L||u||!me||$t)&&r(an,{}),!de&&r(F,{children:r(ci,{to:b?`/${b}/s/${H}`:`/s/${H}`,onClick:v=>{m(v,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(At[N])," • ",$r]})]})]})}),!!Ge&&r(F,{children:r(ke,{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:Nr}})})]})]})}),r(ke,{href:Be,target:"_blank",children:[r(M,{icon:"external"}),r("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:qd(Be)})]}),r("div",{class:"menu-horizontal",children:[r(ke,{onClick:()=>{try{navigator.clipboard.writeText(Be),Re(S._({id:"edWbV6"}))}catch{Re(S._({id:"W1ewR0"}))}},children:[r(M,{icon:"link"}),r("span",{children:r(O,{id:"he3ygx"})})]}),Kr&&(navigator==null?void 0:navigator.share)&&((Yr=navigator==null?void 0:navigator.canShare)==null?void 0:Yr.call(navigator,{url:Be}))&&r(ke,{onClick:()=>{try{navigator.share({url:Be})}catch{alert(S._({id:"TtG3Uh"}))}},children:[r(M,{icon:"share"}),r("span",{children:r(O,{id:"LFKLqp"})})]})]}),Kr&&de&&r(ke,{onClick:()=>{Eo(!0)},children:[r(M,{icon:"code"}),r("span",{children:r(O,{id:"jdVwsS"})})]}),(tt||bt)&&r(an,{}),(tt||bt)&&r(ke,{onClick:async()=>{try{const v=await x.v1.statuses.$select(H)[$e?"unmute":"mute"]();ft(v,b),Re($e?S._({id:"Pm+5jw"}):S._({id:"ywB7JM"}))}catch{Re($e?S._({id:"c6jxNY"}):S._({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&&ma&&r(ke,{onClick:async()=>{try{const v=await x.v1.statuses.$select(H)[ve?"unpin":"pin"]();ft(v,b),Re(ve?S._({id:"Yx809+"}):S._({id:"S6P6E+"}))}catch{Re(ve?S._({id:"A6cs15"}):S._({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(ke,{onClick:()=>{Gn({editStatus:t})},children:[r(M,
|
||
|
${Be}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:Fr&&!ne&&r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(O,{id:"MB+wJL"})]}),children:r("div",{class:"action has-count",children:r(Ht,{checked:ne,title:[S._({id:"kulphB"}),S._({id:"QzzGsY"})],alt:[S._({id:"kulphB"}),S._({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:Ee,disabled:!nn})})}),r("div",{class:"action has-count",children:r(Ht,{checked:ye,title:[S._({id:"W9FRBT"}),S._({id:"OcUmcH"})],alt:[S._({id:"W9FRBT"}),S._({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:xe,onClick:Vr})}),Zn("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(Ht,{checked:De,title:[S._({id:"PZlHt8"}),S._({id:"q8EQYI"})],alt:[S._({id:"PZlHt8"}),S._({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:Hr})}),r(_s,{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:S._({id:"2FYpfJ"}),class:"plain more-button",children:r(M,{icon:"more",size:"l",alt:S._({id:"2FYpfJ"})})})}),children:Wr})]})]})]}),!!wo&&r(Xo,{onClick:v=>{v.target===v.currentTarget&&Rn(!1)},children:r(Zd,{statusID:wo,instance:b,fetchStatusHistory:()=>x.v1.statuses.$select(wo).history.list(),onClose:()=>{var v;Rn(!1),(v=Dt.current)==null||v.focus()}})}),!!ua&&r(Xo,{onClick:v=>{v.target===v.currentTarget&&Eo(!1)},children:r(Gd,{post:t,instance:b,onClose:()=>{Eo(!1)}})})]})]})}function Ud(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 jd(e){const{mediaAttachments:t,language:n,postID:o,instance:i}=e,s=t.length>1,a=$(),[c,l]=Z(0);return ee(()=>{let u=()=>{const{clientWidth:d,scrollLeft:f}=a.current,p=Math.round(Math.abs(f)/d);l(p)};return a.current&&a.current.addEventListener("scroll",u,{passive:!0}),()=>{a.current&&a.current.removeEventListener("scroll",u)}},[]),r(F,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:a,children:t.map((u,d)=>r("div",{class:"media-first-item",children:r(cr,{media:u,lang:n,to:`/${i}/s/${o}?media=${d+1}`})},u.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:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(c-1)*(or()?-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:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(c+1)*(or()?-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((u,d)=>r("span",{class:`carousel-dot ${d===c?"active":""}`},u.id))})]})}function $i(e){return Cs.toUnicode(URL.parse(e).hostname.replace(/^www\./,"").replace(/\/$/,""))}function Ni(e){return["x.com","twitter.com","threads.net","bsky.app"].includes(e)}function Kd({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 Wd({card:e,selfReferential:t,selfAuthor:n,instance:o}){var Q;const i=In(B),{blurhash:s,title:a,description:c,html:l,providerName:u,providerUrl:d,authorName:f,authorUrl:p,width:h,height:m,image:g,imageDescription:_,url:T,type:y,embedUrl:w,language:E,publishedAt:x,authors:b}=e,k=a||u||f,L=h/m>=1.2?"large":"",[A,C]=Z(null);if(ee(()=>
|
||
|
`+k+`
|
||
|
`+((C=f==null?void 0:f.options)!=null&&C.length?`
|
||
|
<p>📊:</p>
|
||
|
<ul>
|
||
|
${f.options.map(R=>`
|
||
|
<li>
|
||
|
${R.title}
|
||
|
${R.votesCount>=0?` (${R.votesCount})`:""}
|
||
|
</li>
|
||
|
`).join("")}
|
||
|
</ul>`:"")+(T.length>0?`
|
||
|
`+T.map(R=>{const{description:W,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="${W}" loading="lazy" />`:Ce?N=`
|
||
|
<video src="${ne}" width="${H}" height="${fe}" controls preload="auto" poster="${Ee}" loading="lazy"></video>
|
||
|
${W?`<figcaption>${W}</figcaption>`:""}
|
||
|
`:he?N=`
|
||
|
<audio src="${ne}" controls preload="auto"></audio>
|
||
|
${W?`<figcaption>${W}</figcaption>`:""}
|
||
|
`:N=`
|
||
|
<a href="${ne}">📄 ${W||ne}</a>
|
||
|
`,`<figure>${N}</figure>`}).join(`
|
||
|
`):""),A=`
|
||
|
<blockquote lang="${h}" cite="${y}" data-source="fediverse">
|
||
|
${p?`
|
||
|
<details>
|
||
|
<summary>${p}</summary>
|
||
|
${L}
|
||
|
</details>
|
||
|
`:L}
|
||
|
<footer>
|
||
|
— ${sr(i,c)} (@${s}) <a href="${y}"><time datetime="${D.toISOString()}">${D.toLocaleString()}</time></a>
|
||
|
</footer>
|
||
|
</blockquote>
|
||
|
`;return qu(A)}function Gd({post:e,instance:t,onClose:n}){const{account:{url:o,displayName:i,username:s,emojis:a,bot:c,group:l},id:u,poll:d,spoilerText:f,language:p,editedAt:h,createdAt:m,content:g,mediaAttachments:_,url:T,emojis:y}=e,w=Js(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:S._({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(S._({id:"bl7nrg"}))}catch{Re(S._({id:"/KEBaP"}))}},children:[r(M,{icon:"clipboard"})," ",r("span",{children:r(O,{id:"he3ygx"})})]}),!!(_!=null&&_.length)&&r("section",{children:[r("p",{children:r(O,{id:"/2mUza"})}),r("ol",{class:"links-list",children:_.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"})})})]})]})}function Ht({checked:e,count:t,class:n,title:o,alt:i,size:s,icon:a,iconSize:c="l",onClick:l,...u}){typeof o=="string"&&(o=[o,o]),typeof i=="string"&&(i=[i,i]);const[d,f]=Z(o[0]||""),[p,h]=Z(i[0]||"");return ee(()=>{e?(f(o[1]||""),h(i[1]||"")):(f(o[0]||""),h(i[0]||""))},[e,o,i]),r("button",{type:"button",title:d,class:`plain ${s?"small":""} ${n} ${e?"checked":""}`,onClick:m=>{l&&(m.preventDefault(),m.stopPropagation(),l(m))},...u,children:[r(M,{icon:a,size:c,alt:p}),!!t&&r(F,{children:[" ",r("small",{title:t,children:rt(t)})]})]})}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:[Cs.toUnicode(n),a?r(F,{children:["/",a,r("wbr",{}),r("span",{class:"more-insignificant",children:["/",c]})]}):r("span",{class:"more-insignificant",children:i})]})}function Yd({sKey:e}){const n=In(B).statusReply[e];if(!n)return null;const{id:o,instance:i}=n,s=Yi(o,i);if(!s)return null;const{sensitive:a,spoilerText:c,account:{avatar:l,avatarStatic:u,bot:d}={},visibility:f,content:p,language:h,filtered:m}=s;if(a||c||!p)return null;const g=it(o,i),_=Gs(s),T=ze(Zs),y=Cr(m,T);if((y==null?void 0:y.action)==="hide")return null;const w=(y==null?void 0:y.titlesStr)||"";return r("article",{class:`status compa
|
||
|
//# sourceMappingURL=fuse-QSdEypyG.js.map
|