190 lines
194 KiB
JavaScript
190 lines
194 KiB
JavaScript
|
import{ad as lt,Q as Ne,d as r,h as K,q as ke,A as D,_ as Rt,y as J,B as kr,r as Ie,ae as k,af as Va,e as ir,ag as co,ah as Ha,i as se,P as bt,p as cs,ai as Ba,aj as ls,O as us,k as $,M as Qt,V as Le,n as Ua,s as V,ak as ja,u as tt,a as lo,x as En,z as Wa,al as Ka,T as O,am as ds,an as Za,ao as fs,o as vo,v as hs,g as Ir,ap as qa,aq as De,ar as Ga,as as Ya,at as jn,I as it,c as Pn,b as mt,W as ps,au as Xa,av as Qa,aw as Ja}from"./useTitle-jLgT0T3g.js";function sr(){return sr=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},sr.apply(null,arguments)}var ms=["shift","alt","meta","mod","ctrl"],ec={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 vt(e){return(e&&ec[e]||e||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function tc(e){return ms.includes(e)}function Ao(e,t){return t===void 0&&(t=","),e.split(t)}function Co(e,t,n){t===void 0&&(t="+");var o=e.toLocaleLowerCase().split(t).map(function(s){return vt(s)}),i={alt:o.includes("alt"),ctrl:o.includes("ctrl")||o.includes("control"),shift:o.includes("shift"),meta:o.includes("meta"),mod:o.includes("mod")},a=o.filter(function(s){return!ms.includes(s)});return sr({},i,{keys:a,description:n,hotkey:e})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&gs([vt(e.key),vt(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&vs([vt(e.key),vt(e.code)])})),typeof window<"u"&&window.addEventListener("blur",function(){_t.clear()})})();var _t=new Set;function Ar(e){return Array.isArray(e)}function nc(e,t){t===void 0&&(t=",");var n=Ar(e)?e:e.split(t);return n.every(function(o){return _t.has(o.trim().toLowerCase())})}function gs(e){var t=Array.isArray(e)?e:[e];_t.has("meta")&&_t.forEach(function(n){return!tc(n)&&_t.delete(n.toLowerCase())}),t.forEach(function(n){return _t.add(n.toLowerCase())})}function vs(e){var t=Array.isArray(e)?e:[e];e==="meta"?_t.clear():t.forEach(function(n){return _t.delete(n.toLowerCase())})}function oc(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function rc(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function ic(e){return _s(e,["input","textarea","select"])}function _s(e,t){t===void 0&&(t=!1);var n=e.target,o=e.composed,i=null;return sc(n)&&o?i=e.composedPath()[0]&&e.composedPath()[0].tagName:i=n&&n.tagName,Ar(t)?!!(i&&t&&t.some(function(a){var s;return a.toLowerCase()===((s=i)==null?void 0:s.toLowerCase())})):!!(i&&t&&t)}function sc(e){return!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-")}function ac(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 cc=function(t,n,o){o===void 0&&(o=!1);var i=n.alt,a=n.meta,s=n.mod,c=n.shift,l=n.ctrl,u=n.keys,f=t.key,d=t.code,h=t.ctrlKey,p=t.metaKey,m=t.shiftKey,_=t.altKey,v=vt(d),T=f.toLowerCase();if(!(u!=null&&u.includes(v))&&!(u!=null&&u.includes(T))&&!["ctrl","control","unknown","meta","alt","shift","os"].includes(v))return!1;if(!o){if(i===!_&&T!=="alt"||c===!m&&T!=="shift")return!1;if(s){if(!p&&!h)return!1}else if(a===!p&&T!=="meta"&&T!=="os"||l===!h&&T!=="ctrl"&&T!=="control")return!1}return u&&u.length===1&&(u.includes(T)||u.includes(v))?!0:u?nc(u):!u},lc=lt(void 0),uc=function(){return Ne(lc)};function ys(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&&ys(e[o],t[o])},!0):e===t}var dc=lt({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:functi
|
||
|
* Toastify js 1.12.0
|
||
|
* https://github.com/apvarun/toastify-js
|
||
|
* @license MIT licensed
|
||
|
*
|
||
|
* Copyright (C) 2018 Varun A P
|
||
|
*/var mc=no.exports,ci;function gc(){return ci||(ci=1,function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(mc,function(t){var n=function(s){return new n.lib.init(s)},o="1.12.0";n.defaults={oldestFirst:!0,text:"Toastify is awesome!",node:void 0,duration:3e3,selector:void 0,callback:function(){},destination:void 0,newWindow:!1,close:!1,gravity:"toastify-top",positionLeft:!1,position:"",backgroundColor:"",avatar:"",className:"",stopOnFocus:!0,onClick:function(){},offset:{x:0,y:0},escapeMarkup:!0,ariaLive:"polite",style:{background:""}},n.lib=n.prototype={toastify:o,constructor:n,init:function(s){return s||(s={}),this.options={},this.toastElement=null,this.options.text=s.text||n.defaults.text,this.options.node=s.node||n.defaults.node,this.options.duration=s.duration===0?0:s.duration||n.defaults.duration,this.options.selector=s.selector||n.defaults.selector,this.options.callback=s.callback||n.defaults.callback,this.options.destination=s.destination||n.defaults.destination,this.options.newWindow=s.newWindow||n.defaults.newWindow,this.options.close=s.close||n.defaults.close,this.options.gravity=s.gravity==="bottom"?"toastify-bottom":n.defaults.gravity,this.options.positionLeft=s.positionLeft||n.defaults.positionLeft,this.options.position=s.position||n.defaults.position,this.options.backgroundColor=s.backgroundColor||n.defaults.backgroundColor,this.options.avatar=s.avatar||n.defaults.avatar,this.options.className=s.className||n.defaults.className,this.options.stopOnFocus=s.stopOnFocus===void 0?n.defaults.stopOnFocus:s.stopOnFocus,this.options.onClick=s.onClick||n.defaults.onClick,this.options.offset=s.offset||n.defaults.offset,this.options.escapeMarkup=s.escapeMarkup!==void 0?s.escapeMarkup:n.defaults.escapeMarkup,this.options.ariaLive=s.ariaLive||n.defaults.ariaLive,this.options.style=s.style||n.defaults.style,s.backgroundColor&&(this.options.style.background=s.backgroundColor),this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var s=document.createElement("div");s.className="toastify on "+this.options.className,this.options.position?s.className+=" toastify-"+this.options.position:this.options.positionLeft===!0?(s.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):s.className+=" toastify-right",s.className+=" "+this.options.gravity,this.options.backgroundColor&&console.warn('DEPRECATION NOTICE: "backgroundColor" is being deprecated. Please use the "style.background" property.');for(var c in this.options.style)s.style[c]=this.options.style[c];if(this.options.ariaLive&&s.setAttribute("aria-live",this.options.ariaLive),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)s.appendChild(this.options.node);else if(this.options.escapeMarkup?s.innerText=this.options.text:s.innerHTML=this.options.text,this.options.avatar!==""){var l=document.createElement("img");l.src=this.options.avatar,l.className="toastify-avatar",this.options.position=="left"||this.options.positionLeft===!0?s.appendChild(l):s.insertAdjacentElement("afterbegin",l)}if(this.options.close===!0){var u=document.createElement("button");u.type="button",u.setAttribute("aria-label","Close"),u.className="toast-close",u.innerHTML="✖",u.addEventListener("click",(function(v){v.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var f=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&f>360?s.insertAdjacentElement("afterbegin",u):s.appendChild(u)}if(this.options.stopOnFocus&&this.options.duration>0){var d=this;s.addEventListener("mouseover",function(v){window.clearTimeout(s.timeOutValue)}),s.addEventListener("mouseleave",function(){s.timeOutValue=window.setTimeout(function(){d.removeElement(s)},d.options.duration)})}if(typeof this.options.destination<"u"&&s.addEventListener("click",(function(v){v.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.
|
||
|
`);h.innerHTML=`<code>${d.innerHTML.trim()}</code>`,d.replaceWith(h)}}if(l){const d=[...s.querySelectorAll("p")].filter(h=>iu.test(h.innerText));for(const h of d){const p=[h];let m=!1,_=h;for(;_.nextElementSibling;){const v=_.nextElementSibling;if(v&&v.tagName==="P")if(su.test(v.innerText)){p.push(v),m=!0;break}else p.push(v);else break;_=v}if(m){const v=document.createElement("pre");for(const b of p)for(const w of b.querySelectorAll("br"))w.replaceWith(`
|
||
|
`);const T=p.map(b=>b.innerHTML).join(`
|
||
|
|
||
|
`);v.innerHTML=`<code tabindex="0">${T}</code>`,h.replaceWith(v);for(const b of p)b.remove()}}}if(a.includes("`")){u=Ho(s);for(const f of u){let d=zo(f.nodeValue);au.test(d)&&(d=d.replaceAll(du,"<code>$1</code>")),Ft.innerHTML=d,f.replaceWith(...Ft.childNodes)}}if(cu.test(a)){u=Ho(s,{rejectFilter:["A"]});for(const f of u){let d=zo(f.nodeValue);lu.test(d)&&(d=d.replaceAll(uu,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),Ft.innerHTML=d,f.replaceWith(...Ft.childNodes)}}if(a.includes("#")){let f=null;const d=[...s.querySelectorAll("p")].filter((h,p)=>{let m=0;for(let _=0;_<h.childNodes.length;_++){const v=h.childNodes[_];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&&p===f+1)return f=p,!0});if(d!=null&&d.length)for(const h of d)h.classList.add("hashtag-stuffing"),h.title=h.innerText}if(a.includes("<img")){const f=s.querySelectorAll("img");for(let d=0;d<f.length;d++){const h=f[d],p=h.getAttribute("width")||h.naturalWidth,m=h.getAttribute("height")||h.naturalHeight;p&&m&&h.style.setProperty("--original-aspect-ratio",`${p}/${m}`)}}for(const f of s.childNodes)if(f.nodeType===Node.TEXT_NODE){const d=document.createElement("span");d.textContent=f.textContent,s.replaceChild(d,f)}return i&&queueMicrotask(()=>i(s)),o?s:s.innerHTML}const Ks=Le(hu),pu=["STYLE","IMG","VIDEO","AUDIO","AREA","MAP","TRACK","EMBED","IFRAME","OBJECT","PICTURE","PORTAL","SOURCE","SVG","MATH","CANVAS","NOSCRIPT","SCRIPT","INPUT","OPTION","TEXTAREA","SLOT","TEMPLATE"],mu=Object.fromEntries(pu.map(e=>[e,!0])),gu=/^(https?:\/\/(www\.)?|xmpp:)/,Vo=30;function vu(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),o=(n.match(gu)||[])[0]||"";if(!o)return;const i=n.slice(o.length,o.length+Vo),a=n.slice(o.length+Vo),s=n.slice(o.length).length>Vo;e.innerHTML=`<span class="invisible">${o}</span><span class=${s?"ellipsis":""}>${i}</span><span class="invisible">${a}</span>`}catch{}}function Ho(e,t={}){var s;const n=[],o=Object.assign({},mu,(s=t.rejectFilter)==null?void 0:s.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 a;for(;a=i.nextNode();)n.push(a);return n}const zt=document.createElement("div");function _u(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 bo=Le(_u);function yu(e){const{mentions:t=[],instance:n,previewMode:o,statusURL:i}=e||{};return a=>{var f,d;let{target:s}=a;if(s=s.closest("a"),!s||a.metaKey||a.ctrlKey||a.shiftKey||a.altKey||a.which===2)return;const c=(f=s.previousSibling)==null?void 0:f.textContent,l=c==null?void 0:c.endsWith("@"),u=s.innerText.startsWith("@");if((s.classList.contains("u-url")||s.classList.contains("mention"))&&u||l&&!u){const h=(s.querySelector("span")||s).innerText.trim(),p=h.replace(/^@/,""),m=s.getAttribute("href"),_=t.find(v=>v.url===m)||t.find(v=>v.acct===p||v.username===p);if(_)a.preventDefault(),a.stopPropagation(),V.showAccount={account:_.acct,instance:n};else if(!/^http/i.test(h)){a.preventDefault(),a.stopPropagation();const v=s.getAttribute("href");V.showAccount={account:v,instance:n}}}else if(!o){const h=c==null?void 0:c.endsWith("#");if(s.classList.contains("hashtag")||h){a.preventDefault(),a.stopPropagation();const p=s.innerText.replace(/^#/,"").trim(),m=n?`#/${n}/t/${p}`:`#/t/${p}`;location.hash=m}else(d=V.unfurledLinks[s.href])!=null&&d.url&&i!==s.href&&(a.preventDefault(),a.stopPropagation(),V.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${V.unfurledLinks[s.href].url}`)}}}function lh(e,t){return()=>Ie.number(e,{style:"unit",unit:t,unitDisplay:"long"})}const bu=Le(()=>new Intl.DateTimeFormat().resolvedOptions().locale),Tu=e=>{const{locale:t,dateYear:n,hideTime:o,formatOpts:i,forceOpts:a}=e||{},s=t.replace(/-[a-z]+$/i,""),c=En([s],[bu],t),l=new Date().getFullYear(),u=a||{year:n===l?void 0:"numeric",month:"short",day:"numeric",hour:o?void 0:"numeric",minute:o?void 0:"numeric",...i};try{return Intl.DateTimeFormat(c,u)}catch{}try{return Intl.DateTimeFormat(t,u)}catch{}return Intl.DateTimeFormat(void 0,u)},wu=Le(Tu);function An(e,t){return e instanceof Date||(e=new Date(e)),wu({dateYear:e.getFullYear(),locale:Ie.locale,...t}).format(e)}function rt(e){try{return Ie.number(e,{notation:"compact",roundingMode:"floor"})}catch{return e}}const Ci=5e3;function Gn(e){if(e||(e=!0),V.showCompose){V.composerState.minimized?Re({duration:Ci,text:Ie._({id:"/4fHR1"})}):Re({duration:Ci,text:Ie._({id:"vvl08N"})});return}Tc(),V.showCompose=e}function uh({skeleton:e,account:t,avatarSize:n="xl",useAvatarStatic:o=!1,instance:i,external:a,internal:s,onClick:c,showActivity:l=!1,showStats:u=!1,accountInstance:f,hideDisplayName:d=!1,relationship:h={},excludeRelationshipAttrs:p=[]}){const{_:m}=tt();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:_,acct:v,avatar:T,avatarStatic:b,displayName:w,username:I,emojis:g,url:x,statusesCount:E,lastStatusAt:A,bot:M,fields:R,note:S,group:C,followersCount:N,createdAt:q,locked:B}=t;let[X,ae,ie]=v.match(/([^@]+)(@.+)/i)||[,v];f&&(ie=`@${f}`);const ee=R==null?void 0:R.find(he=>!!he.verifiedAt&&!!he.value),Q={};for(const he in h)p.includes(he)||(Q[he]=h[he]);const me=Q.following||Q.followedBy||Q.requested;return r("a",{class:"account-block",href:x,target:a?"_blank":null,title:ie?v:`@${v}`,onClick:he=>{if(!a){if(he.preventDefault(),c)return c(he);s?location.hash=`/${i}/a/${_}`:V.showAccount={account:t,instance:i}}},children:[r("div",{class:"avatar-container",children:r(st,{url:o?b:T||b,size:n,squircle:M})}),r("span",{class:"account-block-content",children:[!d&&r($,{children:w?r("b",{children:r(qt,{text:w,emojis:g})}):r("b",{children:I})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[ie?"":"@",ae,r("wbr",{}),ie,B&&r($,{children:[" ",r(L,{icon:"lock",size:"s",alt:m({id:"G2fuEb"})})]})]}),l&&r("div",{class:"account-block-stats",children:[r(O,{id:"ajzDof",values:{0:rt(E)}}),!!A&&r($,{children:[" ","·"," ",r(O,{id:"f8bJ3C",values:{0:An(A,{hideTime:!0})}})]})]}),u&&r("div",{class:"account-block-stats",children:[M&&r($,{children:r("span",{class:"tag collapsed",children:[r(L,{icon:"bot"})," ",r(O,{id:"9Vdq+j"})]})}),!!C&&r($,{children:r("span",{class:"tag collaps
|
||
|
<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 a=`
|
||
|
<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",a),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(a=>{a.isIntersecting&&!this.isIframeLoaded&&(Be.warmConnections(this),this.addIframe(!0),i.unobserve(this))})},t).observe(this),this.autoPause&&new IntersectionObserver((i,a)=>{i.forEach(s=>{var c,l;s.intersectionRatio!==1&&((l=(c=this.shadowRoot.querySelector("iframe"))==null?void 0:c.contentWindow)==null||l.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*"))})},{threshold:1}).observe(this)}attemptShortAutoPlay(){this.isYouTubeShort()&&setTimeout(()=>{var 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 Qs=new Uint8Array(128);for(let e=0;e<83;e++)Qs["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(e)]=e;const so=(e,t,n)=>{let o=0;for(;t<n;)o*=83,o+=Qs[e.charCodeAt(t++)];return o},Js=Math.pow,Cn=Math.PI,od=Cn*2,ea=3294.6,ta=269.025,rd=e=>e>10.31475?Js(e/ta+.052132,2.4):e/ea,qo=e=>~~(e>1227e-8?ta*Js(e,.416666)-13.025:e*ea+1),bn=e=>(e<0?-1:1)*e*e,Fi=e=>{for(e+=Cn/2;e>Cn;)e-=od;const t=1.27323954*e-.405284735*bn(e);return .225*(bn(t)-t)+t};function $r(e){const t=so(e,2,6);return[t>>16,t>>8&255,t&255]}function id(e,t,n,o){const i=so(e,0,1),a=i%9+1,s=~~(i/9)+1,c=a*s;let l=0,u=0,f=0,d=0,h=0,p=0,m=0,_=0,v=0,T=0,b=0,w=0;const I=(so(e,1,2)+1)/13446*(o|1),g=new Float64Array(c*3),x=$r(e);for(l=0;l<3;l++)g[l]=rd(x[l]);for(l=1;l<c;l++)w=so(e,4+l*2,6+l*2),g[l*3]=bn(~~(w/361)-9)*I,g[l*3+1]=bn(~~(w/19)%19-9)*I,g[l*3+2]=bn(w%19-9)*I;const E=new Float64Array(s*n),A=new Float64Array(a*t);for(u=0;u<s;u++)for(d=0;d<n;d++)E[u*n+d]=Fi(Cn*d*u/n);for(l=0;l<a;l++)for(f=0;f<t;f++)A[l*t+f]=Fi(Cn*f*l/t);const M=t*4,R=new Uint8ClampedArray(M*n);for(d=0;d<n;d++)for(f=0;f<t;f++){for(h=p=m=0,u=0;u<s;u++)for(v=E[u*n+d],l=0;l<a;l++)_=A[l*t+f]*v,T=(l+u*a)*3,h+=g[T]*_,p+=g[T+1]*_,m+=g[T+2]*_;b=4*f+d*M,R[b]=qo(h),R[b+1]=qo(p),R[b+2]=qo(m),R[b+3]=255}return R}var Go,zi;function sd(){return zi||(zi=1,Go=(t,n={})=>{const o=n.char||" ",i=n.count||2;let a=0;const s=[];return t.reverse().reduce((c,l)=>{s.length&&a&&s[a]&&s[a]===l.substring(1,s[a].length+1)&&(s.splice(a,1),a--);const f=[`${o.repeat(a?a*i:0)}${l}`,...c];return l.substring(0,2)==="</"&&(a++,s[a]=l.substring(2,l.length-1)),f},[]).join(`
|
||
|
`)}),Go}var Yo,Vi;function ad(){if(Vi)return Yo;Vi=1;const e=n=>n.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,"");return Yo={mergeAttributesWithElements:n=>{const o=e(n).split(`
|
||
|
`),i=[];let a="";for(let s=0;s<o.length;s+=1){const c=o[s];if(c.endsWith("/>")){i.push(`${a}${c.slice(0,-2)} />`),a="";continue}if(c.endsWith(">")){i.push(`${a}${c.startsWith(">")||c.startsWith("<")?"":" "}${c}`),a="";continue}a+=a.length?` ${c}`:c}return i},removeEmptyLines:e},Yo}var Xo,Hi;function cd(){if(Hi)return Xo;Hi=1;const e=sd(),{mergeAttributesWithElements:t}=ad();return Xo=(o,i={})=>{const a=t(o);return e(a,i)},Xo}var ld=cd();const ud=kr(ld);var gn=(e=>(e.Mouse="mouse",e.Touch="touch",e.Pointer="pointer",e))(gn||{}),vn=(e=>(e.CancelledByMovement="cancelled-by-movement",e.CancelledByRelease="cancelled-by-release",e.CancelledOutsideElement="cancelled-outside-element",e))(vn||{});const na=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,dd=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function oa(e){const{nativeEvent:t}=e,n=dd();return n&&t instanceof n||"touches"in e}function ra(e){const t=na();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function ia(e){const{nativeEvent:t}=e;if(!t)return!1;const n=na();return n&&t instanceof n||"pointerId"in t}function Bi(e){return ra(e)||oa(e)||ia(e)}function Ui(e){return oa(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:ra(e)||ia(e)?{x:e.pageX,y:e.pageY}:null}function fd(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function sa(e,{threshold:t=400,captureEvent:n=!1,detect:o=gn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:a=!0,filterEvents:s,onStart:c,onMove:l,onFinish:u,onCancel:f}={}){const d=D(!1),h=D(!1),p=D(),m=D(),_=D(e),v=D(null),T=ke(g=>x=>{h.current||Bi(x)&&(s!==void 0&&!s(x)||(n&&x.persist(),c==null||c(x,{context:g}),v.current=Ui(x),h.current=!0,p.current=x.currentTarget,m.current=setTimeout(()=>{_.current&&(_.current(x,{context:g}),d.current=!0)},t)))},[n,s,c,t]),b=ke(g=>(x,E)=>{Bi(x)&&h.current&&(v.current=null,n&&x.persist(),d.current?u==null||u(x,{context:g}):h.current&&(f==null||f(x,{context:g,reason:E??vn.CancelledByRelease})),d.current=!1,h.current=!1,m.current!==void 0&&clearTimeout(m.current))},[n,u,f]),w=ke(g=>x=>{if(l==null||l(x,{context:g}),i!==!1&&v.current){const E=Ui(x);if(E){const A=i===!0?25:i,M={x:Math.abs(E.x-v.current.x),y:Math.abs(E.y-v.current.y)};(M.x>A||M.y>A)&&b(g)(x,vn.CancelledByMovement)}}},[b,i,l]),I=ke(g=>{if(e===null)return{};switch(o){case gn.Mouse:{const x={onMouseDown:T(g),onMouseMove:w(g),onMouseUp:b(g)};return a&&(x.onMouseLeave=E=>{b(g)(E,vn.CancelledOutsideElement)}),x}case gn.Touch:return{onTouchStart:T(g),onTouchMove:w(g),onTouchEnd:b(g)};case gn.Pointer:{const x={onPointerDown:T(g),onPointerMove:w(g),onPointerUp:b(g)};return a&&(x.onPointerLeave=E=>b(g)(E,vn.CancelledOutsideElement)),x}}},[e,b,a,o,w,T]);return J(()=>{if(!window)return;function g(x){const E=fd(x);b()(E)}return window.addEventListener("mouseup",g),window.addEventListener("touchend",g),window.addEventListener("pointerup",g),()=>{window.removeEventListener("mouseup",g),window.removeEventListener("touchend",g),window.removeEventListener("pointerup",g)}},[b]),J(()=>()=>{m.current!==void 0&&clearTimeout(m.current)},[]),J(()=>{_.current=e},[e]),I}function hd({poll:e,lang:t,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const{_:a}=tt(),[s,c]=K("default"),{expired:l,expiresAt:u,id:f,multiple:d,options:h,ownVotes:p,voted:m,votersCount:_,votesCount:v,emojis:T}=e,b=!!u&&new Date(u),w=d?_:v;let I=0;w<=1e3?I=0:w<=1e4?I=1:w<=1e5&&(I=2);const[g,x]=K(!1),E=h.every(A=>A.votesCount!==null);return r("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[g&&E||m||l?r($,{children:[r("div",{class:"poll-options",children:h.map((A,M)=>{const{title:R,votesCount:S}=A,C=w?S/w:0,N=C?C.toLocaleString(Ie.locale||void 0,{style:"percent",maximumFractionDigits:I}):"0%",q=S>0&&S===Math.max(...h.map(B=>B.votesCount));return r("div",{class:`poll-option poll-result ${q?"poll-option-leading":""}`,style:{"--percentage":`${C*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(qt,{text:R
|
||
|
|
||
|
📊:
|
||
|
${o.options.map(c=>`${o.multiple?"▪️":"•"} ${c.title}`).join(`
|
||
|
`)}`),i!=null&&i.length&&(a+=" "+i.map(c=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[c.type]||"").join("")),a}function gd(e,t,n){var o=this,i=D(null),a=D(0),s=D(null),c=D([]),l=D(),u=D(),f=D(e),d=D(!0);f.current=e;var h=typeof window<"u",p=!t&&t!==0&&h;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var m=!!(n=n||{}).leading,_=!("trailing"in n)||!!n.trailing,v="maxWait"in n,T="debounceOnServer"in n&&!!n.debounceOnServer,b=v?Math.max(+n.maxWait||0,t):null;J(function(){return d.current=!0,function(){d.current=!1}},[]);var w=se(function(){var I=function(R){var S=c.current,C=l.current;return c.current=l.current=null,a.current=R,u.current=f.current.apply(C,S)},g=function(R,S){p&&cancelAnimationFrame(s.current),s.current=p?requestAnimationFrame(R):setTimeout(R,S)},x=function(R){if(!d.current)return!1;var S=R-i.current;return!i.current||S>=t||S<0||v&&R-a.current>=b},E=function(R){return s.current=null,_&&c.current?I(R):(c.current=l.current=null,u.current)},A=function R(){var S=Date.now();if(x(S))return E(S);if(d.current){var C=t-(S-i.current),N=v?Math.min(C,b-(S-a.current)):C;g(R,N)}},M=function(){if(h||T){var R=Date.now(),S=x(R);if(c.current=[].slice.call(arguments),l.current=o,i.current=R,S){if(!s.current&&d.current)return a.current=i.current,g(A,t),m?I(i.current):u.current;if(v)return g(A,t),I(i.current)}return s.current||g(A,t),u.current}};return M.cancel=function(){s.current&&(p?cancelAnimationFrame(s.current):clearTimeout(s.current)),a.current=0,c.current=i.current=l.current=s.current=null},M.isPending=function(){return!!s.current},M.flush=function(){return s.current?E(Date.now()):u.current},M},[m,v,t,b,_,p,h,T]);return w}function vd(e,t,n){var o=n===void 0?{}:n,i=o.leading,a=o.trailing;return gd(e,t,{maxWait:t,leading:i===void 0||i,trailing:a===void 0||a})}function _d(e,t){var n=D(null),o=D(null);o.current=t;var i=D(null);J(function(){a()});var a=ke(function(){var s=i.current,c=o.current,l=s||(c?c instanceof Element?c:c.current:null);n.current&&n.current.element===l&&n.current.subscriber===e||(n.current&&n.current.cleanup&&n.current.cleanup(),n.current={element:l,subscriber:e,cleanup:l?e(l):void 0})},[e]);return J(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),ke(function(s){i.current=s,a()},[a])}function Wi(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 yd(e){e===void 0&&(e={});var t=e.onResize,n=D(void 0);n.current=t;var o=e.round||Math.round,i=D(),a=K({width:void 0,height:void 0}),s=a[0],c=a[1],l=D(!1);J(function(){return l.current=!1,function(){l.current=!0}},[]);var u=D({width:void 0,height:void 0}),f=_d(ke(function(d){return(!i.current||i.current.box!==e.box||i.current.round!==o)&&(i.current={box:e.box,round:o,instance:new ResizeObserver(function(h){var p=h[0],m=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",_=Wi(p,m,"inlineSize"),v=Wi(p,m,"blockSize"),T=_?o(_):void 0,b=v?o(v):void 0;if(u.current.width!==T||u.current.height!==b){var w={width:T,height:b};u.current.width=T,u.current.height=b,n.current?n.current(w):l.current||c(w)}})}),i.current.instance.observe(d,{box:e.box}),function(){i.current&&i.current.instance.unobserve(d)}},[e.box,o]),e.ref);return se(function(){return{ref:f,width:s.width,height:s.height}},[f,s.width,s.height])}function ao({className:e="truncated"}={}){const t=D(),n=vd(({height:o})=>{if(t.current){const{scrollHeight:i}=t.current;let a=i>o;if(a){const{height:s,maxHeight:c}=getComputedStyle(t.current),l=parseInt(c||s,10);a=i>l}t.current.classList.toggle(e,a)}},300);return yd({ref:t,box:"border-box",onResize:n}),t}const Tn={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"};var la="kvfysmfp",ua="ufhsfnkm",bd=".".concat(la,"{overflow:hidden;touch-action:none}.").concat(ua,"{transform-origin: 0 0}"),Td=typeof window>"u",wd=function(){return!Td&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var Ed=
|
||
|
<video
|
||
|
src="${T}"
|
||
|
poster="${_}"
|
||
|
width="${x}"
|
||
|
height="${E}"
|
||
|
data-orientation="${S}"
|
||
|
preload="auto"
|
||
|
autoplay
|
||
|
muted
|
||
|
playsinline
|
||
|
${te?"loop":""}
|
||
|
ondblclick="this.paused ? this.play() : this.pause()"
|
||
|
${W?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
|
||
|
></video>
|
||
|
`,Ln=`
|
||
|
<video
|
||
|
src="${T}"
|
||
|
poster="${_}"
|
||
|
width="${x}"
|
||
|
height="${E}"
|
||
|
data-orientation="${S}"
|
||
|
preload="auto"
|
||
|
autoplay
|
||
|
playsinline
|
||
|
${te?"loop":""}
|
||
|
controls
|
||
|
></video>
|
||
|
`;return r(Y,{children:r(Q,{class:`media ${e} media-${Z?"gif":"video"} ${Fe?"media-contain":""} ${ue?"media-hover-animate":""}`,"data-orientation":S,"data-formatted-duration":i?void 0:oe,"data-label":Z&&!i&&!Fe?"GIF":void 0,"data-has-alt":!F||void 0,style:!i&&He,onClick:pe=>{if(ue)try{N.current.pause()}catch{}f(pe)},onMouseEnter:()=>{if(ue)try{N.current.play()}catch{}},onMouseLeave:()=>{if(ue)try{N.current.pause()}catch{}},onFocus:()=>{if(ue)try{N.current.play()}catch{}},onBlur:()=>{if(ue)try{N.current.pause()}catch{}},children:[i||Fe?Z&&i?r(Yi,{...ee,enabled:!0,children:r("div",{ref:B,dangerouslySetInnerHTML:{__html:We}})}):Z?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:We}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:Ln}}):Z?r("video",{ref:N,src:T,poster:_,width:x,height:E,"data-orientation":S,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:W?pe=>{const{target:be}=pe,Se=be==null?void 0:be.closest(".media-gif");if(Se){const Oe=be.currentTime/be.duration*100;Se.style.setProperty("--progress",`${Oe}%`)}}:void 0}):r($,{children:[_?r("img",{src:_,alt:F?"":h,width:x,height:E,"data-orientation":S,loading:"lazy",decoding:"async",onLoad:pe=>{if(!R){const be=pe.target.closest(".media");if(be){const{naturalHeight:Se,naturalWidth:Oe}=pe.target;be.dataset.orientation=Oe>Se?"landscape":"portrait",be.style.setProperty("--width",`${Oe}px`),be.style.setProperty("--height",`${Se}px`),be.style.aspectRatio=`${Oe}/${Se}`}}}}):r("video",{src:T+"#t=0.1",width:x,height:E,"data-orientation":S,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:pe=>{if(!re){const{duration:be}=pe.target;if(be){const Se=tr(be),Oe=pe.target.closest(".media-video");Oe&&(Oe.dataset.formattedDuration=Se)}}}}),r("div",{class:"media-play",children:r(L,{icon:"play",size:"xl",alt:"▶"})})]}),!i&&!F&&r(nr,{alt:h,lang:o,index:l})]})})}else if(b==="audio"||z){const re=tr(w.duration);return r(Y,{children:r(Q,{class:`media media-audio ${e}`,"data-formatted-duration":i?void 0:re,"data-has-alt":!F||void 0,onClick:f,style:!i&&He,children:[i?r("audio",{src:v||T,preload:"none",controls:!0,autoPlay:!0}):_?r("img",{src:_,alt:F?"":h,width:x,height:E,"data-orientation":S,loading:"lazy",onError:H=>{var Z,te;try{(te=(Z=H.target)==null?void 0:Z.remove)==null||te.call(Z)}catch{}}}):null,!i&&r($,{children:[r("div",{class:"media-play",children:r(L,{icon:"play",size:"xl",alt:"▶"})}),!F&&r(nr,{alt:h,lang:o,index:l})]})]})})}}function jd(e){return URL.parse(e,location.origin)}const _r=Qt(Ud,(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}),Wd=280,Kd=140,Zd=fs({limit:1,interval:1e3});function qd(e,t){return t.v1.accounts.$select(e).fetch()}const Gd=vo(Zd(qd)),Pt={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"WDcQq9"},private:{id:"o34OrG"},direct:{id:"IV4QaU"}},Yd=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),Xd=new Intl.RelativeTimeFormat,Xi=80;function Qd(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 or(e){const{spoilerText:t,content:n,poll:o}=e;return(t?`${t}
|
||
|
|
||
|
`:"")+bo(n)+Qd(o)}function ha(e=[],t=document){for(const n of e)try{return t.querySelectorAll(n)}catch{}return[]}function Jd(e){return!e||(e=e.trim(),!e)?!1:!!bo(e,{preProcess:n=>{for(const o of ha([".mention, pre, code, a:has(.invisible)",".mention, pre, code"],n))o.remove()}})}function ef(e){return bo(e,{preProcess:t=>{for(const n of ha([".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 tf=/^http/i,Qi=({post:e,instance:t,previewMode:n})=>{const{content:o,emojis:i,language:a,mentions:s,url:c}=e,l=D();return Rt(()=>{if(!l.current)return;const u=Ks(o,{emojis:i,returnDOM:!0});for(const f of u.querySelectorAll('a.u-url[target="_blank"]'))tf.test(f.innerText.trim())||f.removeAttribute("target");l.current.replaceChildren(u.cloneNode(!0))},[o,i.length]),r("div",{ref:l,lang:a,dir:"auto",class:"inner-content",onClick:yu({mentions:s,instance:t,previewMode:n,statusURL:c})})},nf={s:"small",m:"medium",l:"large"},of=vo(async e=>{const{detectAll:t}=await k(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}),wn={id:"8fZueG"},yr={},Ji=(e,t=[])=>{if(!e)return!1;const n=Ds(!0),o=e!==n&&!En([e],[n])&&!t.find(i=>e===i||En([e],[i]));return yr[e+t]=!0,o};function Xt({statusID:e,status:t,instance:n,size:o="m",contentTextWeight:i,readOnly:a,enableCommentHint:s,withinContext:c,skeleton:l,enableTranslate:u,forceTranslate:f,previewMode:d,onMediaClick:h,quoted:p,onStatusLinkClick:m=()=>{},showFollowedTags:_,allowContextMenu:v,showActionsBar:T,showReplyParent:b,mediaFirst:w}){var oi,ri,ii,si;const{_:I,_:g}=tt();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:E,authenticated:A}=lo({instance:n}),{instance:M}=lo(),R=E===M;let S=it(e||(t==null?void 0:t.id),E);const C=Pn(V);if(t||(t=C.statuses[S]||C.statuses[e],S=it(t==null?void 0:t.id,E)),!t)return null;const{account:{acct:N,avatar:q,avatarStatic:B,id:X,url:ae,displayName:ie,username:ee,emojis:Q,bot:me,group:he},id:z,repliesCount:ce,reblogged:le,reblogsCount:Me,favourited:ge,favouritesCount:Ve,bookmarked:Ae,poll:ye,muted:He,sensitive:Ce,spoilerText:F,visibility:Y,language:Ze,editedAt:nt,filtered:re,card:H,createdAt:Z,inReplyToId:te,inReplyToAccountId:oe,content:ue,mentions:Fe,mediaAttachments:W,reblog:We,uri:Ln,url:pe,emojis:be,tags:Se,pinned:Oe,_deleted:dt,_pinned:Mt,emojiReactions:ft}=t,[tn,To]=K(null);J(()=>{if(!ue||Ze||tn)return;let y;return y=setTimeout(async()=>{let P=await of(ef(ue));To(P)},1e3),()=>clearTimeout(y)},[ue,Ze]);const ve=Ze||tn,nn=!!(W!=null&&W.length);w&&nn&&(o="s");const wt=se(()=>Ir(),[]),qe=se(()=>wt&&wt===X,[X,wt]),ne=Ne(aa),_e=!qe&&!a&&!d&&Nr(re,ne);if((_e==null?void 0:_e.action)==="hide")return null;const Pe=y=>{y.shiftKey};if(o!=="l"&&_e)return r(hf,{status:t,filterInfo:_e,instance:E,containerProps:{onMouseEnter:Pe},showFollowedTags:!0,quoted:p});const Te=new Date(Z),xe=new Date(nt);let ht=Fe==null?void 0:Fe.find(y=>y.id===oe);!ht&&oe===z&&(ht={url:ae,username:ee,displayName:ie});const[Ot,Et]=K(ht);if(!c&&!Ot&&oe){const y=V.accounts[oe];y?Et(y):Gd(oe,x).then(P=>{Et(P),V.accounts[P.id]=P}).catch(P=>{})}const Mn=oe===wt||(Fe==null?void 0:Fe.find(y=>y.id===wt)),Ge=se(()=>!!(ir.account.get("preferences")||{})["reading:expand:spoilers"],[]),on=se(()=>{var P;return((P=(ir.account.get("preferences")||{})["reading:expand:media"])==null?void 0
|
||
|
${pe}`}})},children:[r(L,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:Kr&&!le?r("div",{class:"footer",children:[r(L,{icon:"alert"}),r(O,{id:"MB+wJL"})]}):Zr>=3&&r("div",{class:"footer",children:[r(L,{icon:"info"}),r("span",{children:r(O,{id:"dBme/4",values:{0:Xd.format(-Zr,"month")},components:{0:r("strong",{})}})})]}),disabled:!sn,onClick:async()=>{try{const y=await So();!fe&&y&&Re(g(le?{id:"BgT3ls",values:{4:ee||N}}:{id:"iSYdyi",values:{5:ee||N}}))}catch{}},children:[r(L,{icon:"rocket"}),r("span",{children:Me>0?rt(Me):g(le?{id:"QzzGsY"}:{id:"PiVIlD"})})]}),r(Ee,{onClick:ko,className:`menu-favourite ${ge?"checked":""}`,children:[r(L,{icon:"heart"}),r("span",{children:Ve>0?rt(Ve):g(ge?{id:"OcUmcH"}:{id:"W9FRBT"})})]}),qn("@mastodon/post-bookmark")&&r(Ee,{onClick:Yr,className:`menu-bookmark ${Ae?"checked":""}`,children:[r(L,{icon:"bookmark"}),r("span",{children:g(Ae?{id:"q8EQYI"}:{id:"PZlHt8"})})]})]})}),!fe&&R&&(fe||T)&&r(un,{}),(fe||T)&&r($,{children:r(Ee,{onClick:()=>{V.showGenericAccounts={heading:g({id:"+XOeb+"}),fetchAccounts:Ca,instance:E,showReactions:!0,postID:S}},children:[r(L,{icon:"react"}),r("span",{children:r(O,{id:"+XOeb+"})})]})}),!w&&r($,{children:[(u||!ve||$t)&&r(un,{}),u?r("div",{class:_n?"menu-horizontal":"",children:[r(Ee,{disabled:pt,onClick:()=>{Sa(!0)},children:[r(L,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),_n&&r(Ee,{onClick:()=>{const y=or(t);y&&ji(y,ve)},children:[r(L,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]}):(!ve||$t)&&r("div",{class:_n?"menu-horizontal":"",children:[r(bi,{to:`${E?`/${E}`:""}/s/${z}?translate=1`,children:[r(L,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),_n&&r(Ee,{onClick:()=>{const y=or(t);y&&ji(y,ve)},children:[r(L,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]})]}),(!fe&&R||u||!ve||$t)&&r(un,{}),!fe&&r($,{children:r(bi,{to:E?`/${E}/s/${z}`:`/s/${z}`,onClick:y=>{m(y,t)},children:[r(L,{icon:"arrows-right"}),r("small",{children:[r(O,{id:"8MkSAW",values:{0:ee||N},components:{0:r("span",{class:"bidi-isolate"})}}),r("br",{}),r("span",{class:"more-insignificant",children:[I(Pt[Y])," • ",jr]})]})]})}),!!nt&&r($,{children:r(Ee,{onClick:()=>{On(z)},children:[r(L,{icon:"history"}),r("small",{children:[r(O,{id:"QL+7Jw"}),r("br",{}),r("span",{class:"more-insignificant",children:r(O,{id:"DuJJm9",values:{editedDateText:Wr}})})]})]})}),r(Ee,{href:pe,target:"_blank",children:[r(L,{icon:"external"}),r("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:df(pe)})]}),r("div",{class:"menu-horizontal",children:[r(Ee,{onClick:()=>{try{navigator.clipboard.writeText(pe),Re(g({id:"edWbV6"}))}catch{Re(g({id:"W1ewR0"}))}},children:[r(L,{icon:"link"}),r("span",{children:r(O,{id:"he3ygx"})})]}),Jr&&(navigator==null?void 0:navigator.share)&&((ri=navigator==null?void 0:navigator.canShare)==null?void 0:ri.call(navigator,{url:pe}))&&r(Ee,{onClick:()=>{try{navigator.share({url:pe})}catch{alert(g({id:"TtG3Uh"}))}},children:[r(L,{icon:"share"}),r("span",{children:r(O,{id:"LFKLqp"})})]})]}),Jr&&fe&&r(Ee,{onClick:()=>{xo(!0)},children:[r(L,{icon:"code"}),r("span",{children:r(O,{id:"jdVwsS"})})]}),(qe||Mn)&&r(un,{}),(qe||Mn)&&r(Ee,{onClick:async()=>{try{const y=await x.v1.statuses.$select(z)[He?"unmute":"mute"]();mt(y,E),Re(g(He?{id:"Pm+5jw"}:{id:"ywB7JM"}))}catch{Re(g(He?{id:"c6jxNY"}:{id:"8SN9kN"}))}},children:He?r($,{children:[r(L,{icon:"unmute"}),r("span",{children:r(O,{id:"i51zUR"})})]}):r($,{children:[r(L,{icon:"mute"}),r("span",{children:r(O,{id:"OiUYO5"})})]})}),qe&&Ra&&r(Ee,{onClick:async()=>{try{const y=await x.v1.statuses.$select(z)[Oe?"unpin":"pin"]();mt(y,E),Re(g(Oe?{id:"Yx809+"}:{id:"S6P6E+"}))}catch{Re(g(Oe?{id:"A6cs15"}:{id:"vgUfWO"}))}},children:Oe?r($,{children:[r(L,{icon:"unpin"}),r("span",{children:r(O,{id:"XQMQZw"})})]}):r($,{children:[r(L,{icon:"pin"}),r("span",{children:r(O,{id:"lfHLsx"})})]})}),qe&&r("div",{class:"menu-horizontal",children:[qn("@mastodon/post-edit")&&r(Ee,{onClick:()=>{Gn({editStatus:t})},children:[r(L,{icon:"pencil"}),r("span",{children:r(O,{id:"ePK91l"})})]}),f
|
||
|
${pe}`}})},children:[r(L,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:Kr&&!le&&r("div",{class:"footer",children:[r(L,{icon:"alert"}),r(O,{id:"MB+wJL"})]}),children:r(Ht,{checked:le,title:[g({id:"kulphB"}),g({id:"QzzGsY"})],alt:[g({id:"kulphB"}),g({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:Me,disabled:!sn})})}),r("div",{class:"action has-count",children:r(Ht,{checked:ge,title:[g({id:"W9FRBT"}),g({id:"OcUmcH"})],alt:[g({id:"W9FRBT"}),g({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:Ve,onClick:qr})}),qn("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(Ht,{checked:Ae,title:[g({id:"PZlHt8"}),g({id:"q8EQYI"})],alt:[g({id:"PZlHt8"}),g({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:Gr})}),r(Os,{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:g({id:"2FYpfJ"}),class:"plain more-button",children:r(L,{icon:"more",size:"l",alt:g({id:"2FYpfJ"})})})}),children:ei})]})]})]}),!!Eo&&r(ar,{onClick:y=>{y.target===y.currentTarget&&On(!1)},children:r(lf,{statusID:Eo,instance:E,fetchStatusHistory:()=>x.v1.statuses.$select(Eo).history.list(),onClose:()=>{var y;On(!1),(y=Dt.current)==null||y.focus()}})}),!!ka&&r(ar,{onClick:y=>{y.target===y.currentTarget&&xo(!1)},children:r(uf,{post:t,instance:E,onClose:()=>{xo(!1)}})})]})]})}function rf(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 sf(e){const{mediaAttachments:t,language:n,postID:o,instance:i}=e,a=t.length>1,s=D(),[c,l]=K(0);return J(()=>{let u=()=>{const{clientWidth:f,scrollLeft:d}=s.current,h=Math.round(Math.abs(d)/f);l(h)};return s.current&&s.current.addEventListener("scroll",u,{passive:!0}),()=>{s.current&&s.current.removeEventListener("scroll",u)}},[]),r($,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:s,children:t.map((u,f)=>r("div",{class:"media-first-item",children:r(_r,{media:u,lang:n,to:`/${i}/s/${o}?media=${f+1}`})},u.id))}),a&&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(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c-1)*(hr()?-1:1),behavior:"smooth"})},children:r(L,{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(),s.current.focus(),s.current.scrollTo({left:s.current.clientWidth*(c+1)*(hr()?-1:1),behavior:"smooth"})},children:r(L,{icon:"arrow-right"})})})]})]}),a&&r("div",{class:"media-carousel-dots",style:{"--dots-count":t.length},children:t.map((u,f)=>r("span",{class:`carousel-dot ${f===c?"active":""}`},u.id))})]})}function es(e){return Ws.toUnicode(URL.parse(e).hostname.replace(/^www\./,"").replace(/\/$/,""))}function ts(e){return["x.com","twitter.com","threads.net","bsky.app"].includes(e)}function af({authors:e,hidden:t,children:n}){var i,a;if(t||!((a=(i=e==null?void 0:e[0])==null?void 0:i.account)!=null&&a.id))return n;const o=e[0].account;return r("div",{class:"card-byline",children:[n,r("div",{class:"card-byline-author",children:[r(L,{icon:"link",size:"s"})," ",r("small",{children:r(O,{id:"4LHHK6",components:{0:r(yt,{account:o,showAvatar:!0})}})})]})]})}function cf({card:e,selfReferential:t,selfAuthor:n,instance:o}){var X;const i=Pn(V),{blurhash:a,title:s,description:c,html:l,providerName:u,providerUrl:f,authorName:d,authorUrl:h,width:p,height:m,image:_,imageDescription:v,url:T,type:b,embedUrl:w,language:I,publishedAt:g,authors:x}=e,E=s||u||d,M=p/m>=1.2?"large":"",[R,S]=K(null);if(J(()=>{E&&_&&!t&&Xa(T)&&Qa(o,T).then(ae=>{if(!ae)return;const{id:ie,url:ee}=ae;
|
||
|
`+E+`
|
||
|
`+((S=d==null?void 0:d.options)!=null&&S.length?`
|
||
|
<p>📊:</p>
|
||
|
<ul>
|
||
|
${d.options.map(C=>`
|
||
|
<li>
|
||
|
${C.title}
|
||
|
${C.votesCount>=0?` (${C.votesCount})`:""}
|
||
|
</li>
|
||
|
`).join("")}
|
||
|
</ul>`:"")+(T.length>0?`
|
||
|
`+T.map(C=>{const{description:N,meta:q,previewRemoteUrl:B,previewUrl:X,remoteUrl:ae,url:ie,type:ee}=C,{original:Q={},small:me}=q||{},he=(me==null?void 0:me.width)||(Q==null?void 0:Q.width),z=(me==null?void 0:me.height)||(Q==null?void 0:Q.height),ce=ae||ie,le=B||X,Me=le||ce,ge=ce?URL.parse(ce):null,Ve=ee==="unknown"&&ge&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(ge.pathname),Ae=ee==="unknown"&&ge&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(ge.pathname),ye=ee==="image"||ee==="unknown"&&le&&!Ve&&!Ae,He=ee==="gifv"||ee==="video"||Ve,Ce=ee==="audio"||Ae;let F="";return ye?F=`<img src="${Me}" width="${he}" height="${z}" alt="${N}" loading="lazy" />`:He?F=`
|
||
|
<video src="${ce}" width="${he}" height="${z}" controls preload="auto" poster="${le}" loading="lazy"></video>
|
||
|
${N?`<figcaption>${N}</figcaption>`:""}
|
||
|
`:Ce?F=`
|
||
|
<audio src="${ce}" controls preload="auto"></audio>
|
||
|
${N?`<figcaption>${N}</figcaption>`:""}
|
||
|
`:F=`
|
||
|
<a href="${ce}">📄 ${N||ce}</a>
|
||
|
`,`<figure>${F}</figure>`}).join(`
|
||
|
`):""),R=`
|
||
|
<blockquote lang="${p}" cite="${b}" data-source="fediverse">
|
||
|
${h?`
|
||
|
<details>
|
||
|
<summary>${h}</summary>
|
||
|
${M}
|
||
|
</details>
|
||
|
`:M}
|
||
|
<footer>
|
||
|
— ${gr(i,c)} (@${a}) <a href="${b}"><time datetime="${A.toISOString()}">${A.toLocaleString()}</time></a>
|
||
|
</footer>
|
||
|
</blockquote>
|
||
|
`;return ud(R)}function uf({post:e,instance:t,onClose:n}){const{_:o}=tt(),{account:{url:i,displayName:a,username:s,emojis:c,bot:l,group:u},id:f,poll:d,spoilerText:h,language:p,editedAt:m,createdAt:_,content:v,mediaAttachments:T,url:b,emojis:w}=e,I=pa(e,t);return r("div",{id:"embed-post",class:"sheet",children:[!!n&&r("button",{type:"button",class:"sheet-close",onClick:n,children:r(L,{icon:"x",alt:o({id:"yz7wBu"})})}),r("header",{children:r("h2",{children:r(O,{id:"jdVwsS"})})}),r("main",{tabIndex:"-1",children:[r("h3",{children:r(O,{id:"GkS6YG"})}),r("textarea",{class:"embed-code",readonly:!0,onClick:g=>{g.target.select()},dir:"auto",children:I}),r("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(I),Re(o({id:"bl7nrg"}))}catch{Re(o({id:"/KEBaP"}))}},children:[r(L,{icon:"clipboard"})," ",r("span",{children:r(O,{id:"he3ygx"})})]}),!!(T!=null&&T.length)&&r("section",{children:[r("p",{children:r(O,{id:"/2mUza"})}),r("ol",{class:"links-list",children:T.map(g=>r("li",{children:r("a",{href:g.remoteUrl||g.url,target:"_blank",download:!0,children:g.remoteUrl||g.url})},g.id))})]}),!!(c!=null&&c.length)&&r("section",{children:[r("p",{children:r(O,{id:"AeM/di"})}),r("ul",{children:c.map(g=>r("li",{children:[r("picture",{children:[r("source",{srcset:g.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:g.url,alt:`:${g.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",g.shortcode,":"]})," (",r("a",{href:g.url,target:"_blank",download:!0,children:"URL"}),")",g.staticUrl?r($,{children:[" ","(",r("a",{href:g.staticUrl,target:"_blank",download:!0,children:r(O,{id:"xiropL"})}),")"]}):null]},g.shortcode))})]}),!!(w!=null&&w.length)&&r("section",{children:[r("p",{children:r(O,{id:"jzjjJh"})}),r("ul",{children:w.map(g=>r("li",{children:[r("picture",{children:[r("source",{srcset:g.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:g.url,alt:`:${g.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",g.shortcode,":"]})," (",r("a",{href:g.url,target:"_blank",download:!0,children:"URL"}),")",g.staticUrl?r($,{children:[" ","(",r("a",{href:g.staticUrl,target:"_blank",download:!0,children:r(O,{id:"xiropL"})}),")"]}):null]},g.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:I},dir:"auto"}),r("p",{children:r("small",{children:r(O,{id:"j0kZfi"})})})]})]})}const Ht=bt((e,t)=>{let{checked:n,count:o,class:i,title:a,alt:s,size:c,icon:l,iconSize:u="l",onClick:f,...d}=e;typeof a=="string"&&(a=[a,a]),typeof s=="string"&&(s=[s,s]);const[h,p]=K(a[0]||""),[m,_]=K(s[0]||"");return J(()=>{n?(p(a[1]||""),_(s[1]||"")):(p(a[0]||""),_(s[0]||""))},[n,a,s]),r("button",{ref:t,type:"button",title:h,class:`plain ${c?"small":""} ${i} ${n?"checked":""}`,onClick:v=>{f&&(v.preventDefault(),v.stopPropagation(),f(v))},...d,children:[r(L,{icon:l,size:u,alt:m}),!!o&&r($,{children:[" ",r("small",{title:o,children:rt(o)})]})]})});function df(e){if(!e)return;const t=URL.parse(e),{host:n,pathname:o}=t,i=o.replace(/\/$/,""),[a,s,c]=i.match(/\/(@[^\/]+)\/(.*)/)||[];return r($,{children:[Ws.toUnicode(n),s?r($,{children:["/",s,r("wbr",{}),r("span",{class:"more-insignificant",children:["/",c]})]}):r("span",{class:"more-insignificant",children:i})]})}function ff({sKey:e}){const n=Pn(V).statusReply[e];if(!n)return null;const{id:o,instance:i}=n,a=ps(o,i);if(!a)return null;const{sensitive:s,spoilerText:c,account:{avatar:l,avatarStatic:u,bot:f}={},visibility:d,content:h,language:p,filtered:m}=a;if(s||c||!h)return null;const _=it(o,i),v=ca(a),T=Ne(aa),b=Nr(m,T);if((b==null?void 0:b.action)==="hide")return null;const w=(b==null?void 0:b.titlesStr)||"";return r("artic
|
||
|
//# sourceMappingURL=fuse-1Fw6A_G2.js.map
|