phanpy-cz/assets/fuse-RZOrQKm7.js

182 lines
190 KiB
JavaScript
Raw Normal View History

2024-10-16 17:47:13 +00:00
import{ad as lt,Q as ze,c as r,h as W,t as Pe,A as $,_ as Wt,y as J,ae as wa,E as gr,i as k,af as A,ag as xa,ah as io,ai as ka,l as le,P as Ct,p as Ui,aj as Sa,ak as ji,O as Ki,f as N,C as Qt,V as Me,q as Ia,s as H,al as Aa,j as go,a as so,z as yn,B as Ca,T as O,am as Wi,an as Pa,ao as Zi,r as vo,w as Gi,g as vr,ap as La,aq as Ne,ar as Ma,as as Ra,at as Un,J as st,u as Sn,d as Jr,b as ft,W as qi,au as Oa,av as Da,aw as $a}from"./useTitle-B8ZF9tfB.js";function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)({}).hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Xo.apply(null,arguments)}var Yi=["shift","alt","meta","mod","ctrl"],Na={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&&Na[e]||e||"").trim().toLowerCase().replace(/key|digit|numpad|arrow/,"")}function Fa(e){return Yi.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(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!Yi.includes(a)});return Xo({},i,{keys:s,description:n})}(function(){typeof document<"u"&&(document.addEventListener("keydown",function(e){e.key!==void 0&&Xi([pt(e.key),pt(e.code)])}),document.addEventListener("keyup",function(e){e.key!==void 0&&Qi([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 za(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 Xi(e){var t=Array.isArray(e)?e:[e];mt.has("meta")&&mt.forEach(function(n){return!Fa(n)&&mt.delete(n.toLowerCase())}),t.forEach(function(n){return mt.add(n.toLowerCase())})}function Qi(e){var t=Array.isArray(e)?e:[e];e==="meta"?mt.clear():t.forEach(function(n){return mt.delete(n.toLowerCase())})}function Va(e,t,n){(typeof n=="function"&&n(e,t)||n===!0)&&e.preventDefault()}function Ha(e,t,n){return typeof n=="function"?n(e,t):n===!0||n===void 0}function Ba(e){return Ji(e,["input","textarea","select"])}function Ji(e,t){var n=e.target;t===void 0&&(t=!1);var o=n&&n.tagName;return _r(t)?!!(o&&t&&t.some(function(i){return i.toLowerCase()===o.toLowerCase()})):!!(o&&t&&t===!0)}function Ua(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 ja=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,f=t.key,d=t.code,m=t.ctrlKey,h=t.metaKey,p=t.shiftKey,g=t.altKey,v=pt(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===!g&&T!=="alt"||c===!p&&T!=="shift")return!1;if(a){if(!h&&!m)return!1}else if(s===!h&&T!=="meta"&&T!=="os"||l===!m&&T!=="ctrl"&&T!=="control")return!1}return u&&u.length===1&&(u.includes(T)||u.includes(v))?!0:u?za(u):!u},Ka=lt(void 0),Wa=function(){return ze(Ka)};function es(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&&es(e[o],t[o])},!0):e===t}var Za=lt({hotkeys:[],enabledScopes:[],toggleScope:function(){},enableScope:function(){},disableScope:function(){}}),Ga=function(){return ze(Za)};function qa(e){var t=$(void 0);return es(t.current,e)||(t.current=e),t.current}var ei=function(t){t.stopPropagation(),t.preventDefault(),t.stopImmediateProp
2024-10-08 17:16:36 +00:00
* Toastify js 1.12.0
* https://github.com/apvarun/toastify-js
* @license MIT licensed
*
* Copyright (C) 2018 Varun A P
2024-10-16 17:47:13 +00:00
*/var $f=yr.exports;(function(e){(function(t,n){e.exports?e.exports=n():t.Toastify=n()})(wa,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="&#10006;",u.addEventListener("click",(function(v){v.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}).bind(this));var f=window.innerWidth>0?window.innerWidth:screen.width;(this.options.position=="left"||this.options.positionLeft===!0)&&f>360?a.insertAdjacentElement("afterbegin",u):a.appendChild(u)}if(this.options.stopOnFocus&&this.options.duration>0){var d=this;a.addEventListener("mouseover",function(v){window.clearTimeout(a.timeOutValue)}),a.addEventListener("mouseleave",function(){a.timeOutValue=window.setTimeout(function(){d.removeElement(a)},d.options.duration)})}if(typeof this.options.destination<"u"&&a.addEventListener("click",(function(v){v.stopPropagation(),this.options.newWindow===!0?window.open(this.options.destination,"_blank"):window.location=this.options.destination
2024-10-08 17:16:36 +00:00
`);m.innerHTML=`<code>${d.innerHTML.trim()}</code>`,d.replaceWith(m)}}if(l){const d=[...a.querySelectorAll("p")].filter(m=>zl.test(m.innerText));for(const m of d){const h=[m];let p=!1,g=m;for(;g.nextElementSibling;){const v=g.nextElementSibling;if(v&&v.tagName==="P")if(Vl.test(v.innerText)){h.push(v),p=!0;break}else h.push(v);else break;g=v}if(p){const v=document.createElement("pre");for(const y of h)for(const x of y.querySelectorAll("br"))x.replaceWith(`
`);const T=h.map(y=>y.innerHTML).join(`
2024-10-16 17:47:13 +00:00
`);v.innerHTML=`<code tabindex="0">${T}</code>`,m.replaceWith(v);for(const y of h)y.remove()}}}if(s.includes("`")){u=zo(a);for(const f of u){let d=No(f.nodeValue);Hl.test(d)&&(d=d.replaceAll(Kl,"<code>$1</code>")),Nt.innerHTML=d,f.replaceWith(...Nt.childNodes)}}if(Bl.test(s)){u=zo(a,{rejectFilter:["A"]});for(const f of u){let d=No(f.nodeValue);Ul.test(d)&&(d=d.replaceAll(jl,'<a href="https://twitter.com/$2" rel="nofollow noopener noreferrer" target="_blank">$1</a>')),Nt.innerHTML=d,f.replaceWith(...Nt.childNodes)}}if(s.includes("#")){let f=null;const d=[...a.querySelectorAll("p")].filter((m,h)=>{let p=0;for(let g=0;g<m.childNodes.length;g++){const v=m.childNodes[g];if(v.nodeType===Node.TEXT_NODE){if(v.textContent.trim()!=="")return!1}else if(v.tagName!=="BR")if(v.tagName==="A"){const T=v.textContent.trim();if(!T||!T.startsWith("#"))return!1;p++}else return!1}if(p>3||p>1&&f&&h===f+1)return f=h,!0});if(d!=null&&d.length)for(const m of d)m.classList.add("hashtag-stuffing"),m.title=m.innerText}if(s.includes("<img")){const f=a.querySelectorAll("img");for(let d=0;d<f.length;d++){const m=f[d],h=m.getAttribute("width")||m.naturalWidth,p=m.getAttribute("height")||m.naturalHeight;h&&p&&m.style.setProperty("--original-aspect-ratio",`${h}/${p}`)}}return i&&queueMicrotask(()=>i(a)),o?a:a.innerHTML}const Cs=Me(Zl),Gl=["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(Gl.map(e=>[e,!0])),Yl=/^(https?:\/\/(www\.)?|xmpp:)/,Fo=30;function Xl(e){var t;if(!(!e||(t=e.querySelector)!=null&&t.call(e,"*")))try{const n=e.innerText.trim(),o=(n.match(Yl)||[])[0]||"";if(!o)return;const i=n.slice(o.length,o.length+Fo),s=n.slice(o.length+Fo),a=n.slice(o.length).length>Fo;e.innerHTML=`<span class="invisible">${o}</span><span class=${a?"ellipsis":""}>${i}</span><span class="invisible">${s}</span>`}catch{}}function zo(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 Ft=document.createElement("div");function Ql(e,t){if(!e)return"";const{preProcess:n}=t||{};return Ft.innerHTML=e.replace(/<\/p>/g,`</p>
2024-10-08 17:16:36 +00:00
`).replace(/<\/li>/g,`</li>
`),Ft.querySelectorAll("br").forEach(o=>{o.replaceWith(`
`)}),n==null||n(Ft),Ft.querySelectorAll(".invisible").forEach(o=>{o.remove()}),Ft.querySelectorAll(".ellipsis").forEach(o=>{o.append("...")}),Ft.innerText.replace(/[\r\n]{3,}/g,`
2024-10-16 17:47:13 +00:00
`).trim()}const po=Me(Ql);function Jl(e){const{mentions:t=[],instance:n,previewMode:o,statusURL:i}=e||{};return s=>{var f,d;let{target:a}=s;if(a=a.closest("a"),!a||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||s.which===2)return;const c=(f=a.previousSibling)==null?void 0:f.textContent,l=c==null?void 0:c.endsWith("@"),u=a.innerText.startsWith("@");if((a.classList.contains("u-url")||a.classList.contains("mention"))&&u||l&&!u){const m=(a.querySelector("span")||a).innerText.trim(),h=m.replace(/^@/,""),p=a.getAttribute("href"),g=t.find(v=>v.url===p)||t.find(v=>v.acct===h||v.username===h);if(g)s.preventDefault(),s.stopPropagation(),H.showAccount={account:g.acct,instance:n};else if(!/^http/i.test(m)){s.preventDefault(),s.stopPropagation();const v=a.getAttribute("href");H.showAccount={account:v,instance:n}}}else if(!o){const m=c==null?void 0:c.endsWith("#");if(a.classList.contains("hashtag")||m){s.preventDefault(),s.stopPropagation();const h=a.innerText.replace(/^#/,"").trim(),p=n?`#/${n}/t/${h}`:`#/t/${h}`;location.hash=p}else(d=H.unfurledLinks[a.href])!=null&&d.url&&i!==a.href&&(s.preventDefault(),s.stopPropagation(),H.prevLocation={pathname:location.hash.replace(/^#/,"")},location.hash=`#${H.unfurledLinks[a.href].url}`)}}}function Kf(e,t){return()=>k.number(e,{style:"unit",unit:t,unitDisplay:"long"})}const eu=Me(()=>new Intl.DateTimeFormat().resolvedOptions().locale),tu=e=>{const{locale:t,dateYear:n,hideTime:o,formatOpts:i,forceOpts:s}=e||{},a=t.replace(/-[a-z]+$/i,""),c=yn([a],[eu],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)},nu=Me(tu);function xn(e,t){return e instanceof Date||(e=new Date(e)),nu({dateYear:e.getFullYear(),locale:k.locale,...t}).format(e)}function it(e){try{return k.number(e,{notation:"compact",roundingMode:"floor"})}catch{return e}}const gi=5e3;function Gn(e){if(e||(e=!0),H.showCompose){H.composerState.minimized?Le({duration:gi,text:k._({id:"/4fHR1"})}):Le({duration:gi,text:k._({id:"vvl08N"})});return}tc(),H.showCompose=e}function Wf({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:f,hideDisplayName:d=!1,relationship:m={},excludeRelationshipAttrs:h=[]}){if(e)return r("div",{class:"account-block skeleton",children:[r(at,{size:n}),r("span",{children:[r("b",{children:"████████"}),r("br",{}),r("span",{class:"account-block-acct",children:"██████"})]})]});if(!t)return null;const{id:p,acct:g,avatar:v,avatarStatic:T,displayName:y,username:x,emojis:w,url:E,statusesCount:b,lastStatusAt:I,bot:D,fields:R,note:S,group:C,followersCount:L,createdAt:Y,locked:z}=t;let[ue,Q,se]=g.match(/([^@]+)(@.+)/i)||[,g];f&&(se=`@${f}`);const q=R==null?void 0:R.find(de=>!!de.verifiedAt&&!!de.value),ae={};for(const de in m)h.includes(de)||(ae[de]=m[de]);const ce=ae.following||ae.followedBy||ae.requested;return r("a",{class:"account-block",href:E,target:s?"_blank":null,title:se?g:`@${g}`,onClick:de=>{if(!s){if(de.preventDefault(),c)return c(de);a?location.hash=`/${i}/a/${p}`:H.showAccount={account:t,instance:i}}},children:[r("div",{class:"avatar-container",children:r(at,{url:o?T:v||T,size:n,squircle:D})}),r("span",{class:"account-block-content",children:[!d&&r(N,{children:y?r("b",{children:r(Gt,{text:y,emojis:w})}):r("b",{children:x})})," ",r("span",{class:"account-block-acct bidi-isolate",children:[se?"":"@",Q,r("wbr",{}),se,z&&r(N,{children:[" ",r(M,{icon:"lock",size:"s",alt:k._({id:"G2fuEb"})})]})]}),l&&r("div",{class:"account-block-stats",children:[r(O,{id:"ajzDof",values:{0:it(b)}}),!!I&&r(N,{children:[" ","·"," ",r(O,{id:"f8bJ3C",values:{0:xn(I,{hideTime:!0})}})]})]}),u&&r("div",{class:"account-block-stats",children:[D&&r(N,{children:r("span",{class:"tag collapsed",children:[r(M,{icon:"bot"})," ",r(O,{id:"9Vdq+j"})]})}),!!C&&r(N,{children:r("span",{class:"tag collapsed",children:[r(
2024-10-08 17:16:36 +00:00
<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}"
2024-10-16 17:47:13 +00:00
></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&&(Ue.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(){Ue.isPreconnected||window.liteYouTubeIsPreconnected||(Ue.addPrefetch("preconnect","https://i.ytimg.com/"),Ue.addPrefetch("preconnect","https://s.ytimg.com"),Ue.addPrefetch("preconnect","https://www.youtube.com"),Ue.addPrefetch("preconnect","https://www.google.com"),Ue.addPrefetch("preconnect","https://googleads.g.doubleclick.net"),Ue.addPrefetch("preconnect","https://static.doubleclick.net"),Ue.isPreconnected=!0,window.liteYouTubeIsPreconnected=!0)}}Ue.isPreconnected=!1;customElements.define("lite-youtube",Ue);const $s=new Uint8Array(128);for(let e=0;e<83;e++)$s["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#$%*+,-.:;=?@[]^_{|}~".charCodeAt(e)]=e;const oo=(e,t,n)=>{let o=0;for(;t<n;)o*=83,o+=$s[e.charCodeAt(t++)];return o},Ns=Math.pow,kn=Math.PI,Du=kn*2,Fs=3294.6,zs=269.025,$u=e=>e>10.31475?Ns(e/zs+.052132,2.4):e/Fs,Uo=e=>~~(e>1227e-8?zs*Ns(e,.416666)-13.025:e*Fs+1),gn=e=>(e<0?-1:1)*e*e,Ei=e=>{for(e+=kn/2;e>kn;)e-=Du;const t=1.27323954*e-.405284735*gn(e);return .225*(gn(t)-t)+t};function Ar(e){const t=oo(e,2,6);return[t>>16,t>>8&255,t&255]}function Nu(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,f=0,d=0,m=0,h=0,p=0,g=0,v=0,T=0,y=0,x=0;const w=(oo(e,1,2)+1)/13446*(o|1),E=new Float64Array(c*3),b=Ar(e);for(l=0;l<3;l++)E[l]=$u(b[l]);for(l=1;l<c;l++)x=oo(e,4+l*2,6+l*2),E[l*3]=gn(~~(x/361)-9)*w,E[l*3+1]=gn(~~(x/19)%19-9)*w,E[l*3+2]=gn(x%19-9)*w;const I=new Float64Array(a*n),D=new Float64Array(s*t);for(u=0;u<a;u++)for(d=0;d<n;d++)I[u*n+d]=Ei(kn*d*u/n);for(l=0;l<s;l++)for(f=0;f<t;f++)D[l*t+f]=Ei(kn*f*l/t);const R=t*4,S=new Uint8ClampedArray(R*n);for(d=0;d<n;d++)for(f=0;f<t;f++){for(m=h=p=0,u=0;u<a;u++)for(v=I[u*n+d],l=0;l<s;l++)g=D[l*t+f]*v,T=(l+u*s)*3,m+=E[T]*g,h+=E[T+1]*g,p+=E[T+2]*g;y=4*f+d*R,S[y]=Uo(m),S[y+1]=Uo(h),S[y+2]=Uo(p),S[y+3]=255}return S}const Fu=(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 zu=Fu;const Vs=e=>e.trim().replace(/(^(\s|\t)+|(( |\t)+)$)/gm,""),Vu=e=>{const t=Vs(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 Hu={mergeAttributesWithElements:Vu,removeEmptyLines:Vs};const Bu=zu,{mergeAttributesWithElements:Uu}=Hu,ju=(e,t={})=>{const n=Uu(e);return Bu(n,t)};var Ku=ju;const Wu=gr(Ku);var fn=(e=>(e.Mouse="mouse",e.Touch="touch",e.Pointer="pointer",e))(fn||{}),hn=(e=>(e.CancelledByMovement="cancelled-by-movement",e.CancelledByRelease="cancelled-by-release",e.CancelledOutsideElement="cancelled-outside-element",e))(hn||{});const Hs=()=>typeof window=="object"?(window==null?void 0:window.PointerEvent)??null:null,Zu=()=>typeof window=="object"?(window==null?void 0:window.TouchEvent)??null:null;function Bs(e){const{nativeEvent:t}=e,n=Zu();return n&&t instanceof n||"touches"in e}function Us(e){const t=Hs();return e.nativeEvent instanceof MouseEvent&&!(t&&e.nativeEvent instanceof t)}function js(e){const{nativeEvent:t}=e;if(!t)return!1;const n=Hs();return n&&t instanceof n||"pointerId"in t}function wi(e){return Us(e)||Bs(e)||js(e)}function xi(e){return Bs(e)?{x:e.touches[0].pageX,y:e.touches[0].pageY}:Us(e)||js(e)?{x:e.pageX,y:e.pageY}:null}function Gu(e){return{target:e.target,currentTarget:e.currentTarget,nativeEvent:e,persist:()=>{}}}function Ks(e,{threshold:t=400,captureEvent:n=!1,detect:o=fn.Pointer,cancelOnMovement:i=!1,cancelOutsideElement:s=!0,filterEvents:a,onStart:c,onMove:l,onFinish:u,onCancel:f}={}){const d=$(!1),m=$(!1),h=$(),p=$(),g=$(e),v=$(null),T=Pe(E=>b=>{m.current||wi(b)&&(a!==void 0&&!a(b)||(n&&b.persist(),c==null||c(b,{context:E}),v.current=xi(b),m.current=!0,h.current=b.currentTarget,p.current=setTimeout(()=>{g.current&&(g.current(b,{context:E}),d.current=!0)},t)))},[n,a,c,t]),y=Pe(E=>(b,I)=>{wi(b)&&m.current&&(v.current=null,n&&b.persist(),d.current?u==null||u(b,{context:E}):m.current&&(f==null||f(b,{context:E,reason:I??hn.CancelledByRelease})),d.current=!1,m.current=!1,p.current!==void 0&&clearTimeout(p.current))},[n,u,f]),x=Pe(E=>b=>{if(l==null||l(b,{context:E}),i!==!1&&v.current){const I=xi(b);if(I){const D=i===!0?25:i,R={x:Math.abs(I.x-v.current.x),y:Math.abs(I.y-v.current.y)};(R.x>D||R.y>D)&&y(E)(b,hn.CancelledByMovement)}}},[y,i,l]),w=Pe(E=>{if(e===null)return{};switch(o){case fn.Mouse:{const b={onMouseDown:T(E),onMouseMove:x(E),onMouseUp:y(E)};return s&&(b.onMouseLeave=I=>{y(E)(I,hn.CancelledOutsideElement)}),b}case fn.Touch:return{onTouchStart:T(E),onTouchMove:x(E),onTouchEnd:y(E)};case fn.Pointer:{const b={onPointerDown:T(E),onPointerMove:x(E),onPointerUp:y(E)};return s&&(b.onPointerLeave=I=>y(E)(I,hn.CancelledOutsideElement)),b}}},[e,y,s,o,x,T]);return J(()=>{if(!window)return;function E(b){const I=Gu(b);y()(I)}return window.addEventListener("mouseup",E),window.addEventListener("touchend",E),window.addEventListener("pointerup",E),()=>{window.removeEventListener("mouseup",E),window.removeEventListener("touchend",E),window.removeEventListener("pointerup",E)}},[y]),J(()=>()=>{p.current!==void 0&&clearTimeout(p.current)},[]),J(()=>{g.current=e},[e]),w}function qu({poll:e,lang:t,readOnly:n,refresh:o=()=>{},votePoll:i=()=>{}}){const[s,a]=W("default"),{expired:c,expiresAt:l,id:u,multiple:f,options:d,ownVotes:m,voted:h,votersCount:p,votesCount:g,emojis:v}=e,T=!!l&&new Date(l),y=f?p:g;let x=0;y<=1e3?x=0:y<=1e4?x=1:y<=1e5&&(x=2);const[w,E]=W(!1),b=d.every(I=>I.votesCount!==null);return r("div",{lang:t,dir:"auto",class:`poll ${n?"read-only":""} ${s==="loading"?"loading":""}`,children:[w&&b||h||c?r(N,{children:[r("div",{class:"poll-options",children:d.map((I,D)=>{const{title:R,votesCount:S}=I,C=y?S/y:0,L=C?C.toLocaleString(k.locale||void 0,{style:"percent",maximumFractionDigits:x}):"0%",Y=S>0&&S===Math.max(...d.map(z=>z.votesCount));return r("div",{class:`poll-option poll-result ${Y?"poll-option-leading":""}`,style:{"--percentage":`${C*100}%`},children:[r("div",{class:"poll-option-title",children:[r("span",{children:r(Gt,{text:R,emojis:v})}),h&&m.includes(D)&&
2024-10-08 17:16:36 +00:00
📊:
${o.options.map(c=>`${o.multiple?"▪️":"•"} ${c.title}`).join(`
2024-10-16 17:47:13 +00:00
`)}`),i!=null&&i.length&&(s+=" "+i.map(c=>({image:"🖼️",gifv:"🎞️",video:"📹",audio:"🎵",unknown:""})[c.type]||"").join("")),s}function Qu(e,t,n){var o=this,i=$(null),s=$(0),a=$(null),c=$([]),l=$(),u=$(),f=$(e),d=$(!0);f.current=e;var m=typeof window<"u",h=!t&&t!==0&&m;if(typeof e!="function")throw new TypeError("Expected a function");t=+t||0;var p=!!(n=n||{}).leading,g=!("trailing"in n)||!!n.trailing,v="maxWait"in n,T="debounceOnServer"in n&&!!n.debounceOnServer,y=v?Math.max(+n.maxWait||0,t):null;J(function(){return d.current=!0,function(){d.current=!1}},[]);var x=le(function(){var w=function(S){var C=c.current,L=l.current;return c.current=l.current=null,s.current=S,u.current=f.current.apply(L,C)},E=function(S,C){h&&cancelAnimationFrame(a.current),a.current=h?requestAnimationFrame(S):setTimeout(S,C)},b=function(S){if(!d.current)return!1;var C=S-i.current;return!i.current||C>=t||C<0||v&&S-s.current>=y},I=function(S){return a.current=null,g&&c.current?w(S):(c.current=l.current=null,u.current)},D=function S(){var C=Date.now();if(b(C))return I(C);if(d.current){var L=t-(C-i.current),Y=v?Math.min(L,y-(C-s.current)):L;E(S,Y)}},R=function(){if(m||T){var S=Date.now(),C=b(S);if(c.current=[].slice.call(arguments),l.current=o,i.current=S,C){if(!a.current&&d.current)return s.current=i.current,E(D,t),p?w(i.current):u.current;if(v)return E(D,t),w(i.current)}return a.current||E(D,t),u.current}};return R.cancel=function(){a.current&&(h?cancelAnimationFrame(a.current):clearTimeout(a.current)),s.current=0,c.current=i.current=l.current=a.current=null},R.isPending=function(){return!!a.current},R.flush=function(){return a.current?I(Date.now()):u.current},R},[p,v,t,y,g,h,m,T]);return x}function Ju(e,t,n){var o=n===void 0?{}:n,i=o.leading,s=o.trailing;return Qu(e,t,{maxWait:t,leading:i===void 0||i,trailing:s===void 0||s})}function ed(e,t){var n=$(null),o=$(null);o.current=t;var i=$(null);J(function(){s()});var s=Pe(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 J(function(){return function(){n.current&&n.current.cleanup&&(n.current.cleanup(),n.current=null)}},[]),Pe(function(a){i.current=a,s()},[s])}function Si(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 td(e){e===void 0&&(e={});var t=e.onResize,n=$(void 0);n.current=t;var o=e.round||Math.round,i=$(),s=W({width:void 0,height:void 0}),a=s[0],c=s[1],l=$(!1);J(function(){return l.current=!1,function(){l.current=!0}},[]);var u=$({width:void 0,height:void 0}),f=ed(Pe(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(m){var h=m[0],p=e.box==="border-box"?"borderBoxSize":e.box==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",g=Si(h,p,"inlineSize"),v=Si(h,p,"blockSize"),T=g?o(g):void 0,y=v?o(v):void 0;if(u.current.width!==T||u.current.height!==y){var x={width:T,height:y};u.current.width=T,u.current.height=y,n.current?n.current(x):l.current||c(x)}})}),i.current.instance.observe(d,{box:e.box}),function(){i.current&&i.current.instance.unobserve(d)}},[e.box,o]),e.ref);return le(function(){return{ref:f,width:a.width,height:a.height}},[f,a.width,a.height])}function ro({className:e="truncated"}={}){const t=$(),n=Ju(({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 td({ref:t,box:"border-box",onResize:n}),t}const vn={public:"earth",unlisted:"group",private:"lock",direct:"message",local:"building"};var Gs="kvfysmfp",qs="ufhsfnkm",nd=".".concat(Gs,"{overflow:hidden;touch-action:none}.").concat(qs,"{transform-origin: 0 0}"),od=typeof window>"u",rd=function(){return!od&&("ontouchstart"in window||navigator.maxTouchPoints>0)};var id=
2024-10-08 17:16:36 +00:00
<video
src="${v}"
poster="${p}"
width="${E}"
height="${b}"
data-orientation="${S}"
preload="auto"
autoplay
muted
playsinline
${Z?"loop":""}
ondblclick="this.paused ? this.play() : this.pause()"
${oe?"ontimeupdate=\"this.closest('.media-gif') && this.closest('.media-gif').style.setProperty('--progress', `${~~((this.currentTime / this.duration) * 100)}%`)\"":""}
></video>
`,An=`
<video
src="${v}"
poster="${p}"
width="${E}"
height="${b}"
data-orientation="${S}"
preload="auto"
autoplay
playsinline
${Z?"loop":""}
controls
></video>
2024-10-16 17:47:13 +00:00
`;return r(F,{children:r(ae,{class:`media ${e} media-${ne?"gif":"video"} ${Ve?"media-contain":""} ${G?"media-hover-animate":""}`,"data-orientation":S,"data-formatted-duration":i?void 0:me,"data-label":ne&&!i&&!Ve?"GIF":void 0,"data-has-alt":!te||void 0,style:!i&&Oe,onClick:pe=>{if(G)try{L.current.pause()}catch{}u(pe)},onMouseEnter:()=>{if(G)try{L.current.play()}catch{}},onMouseLeave:()=>{if(G)try{L.current.pause()}catch{}},onFocus:()=>{if(G)try{L.current.play()}catch{}},onBlur:()=>{if(G)try{L.current.pause()}catch{}},children:[i||Ve?ne&&i?r(Li,{...q,enabled:!0,children:r("div",{ref:z,dangerouslySetInnerHTML:{__html:ve}})}):ne?r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:ve}}):r("div",{class:"video-container",dangerouslySetInnerHTML:{__html:An}}):ne?r("video",{ref:L,src:v,poster:p,width:E,height:b,"data-orientation":S,preload:"auto",playsinline:!0,loop:!0,muted:!0,onTimeUpdate:oe?pe=>{const{target:_e}=pe,Ge=_e==null?void 0:_e.closest(".media-gif");if(Ge){const ye=_e.currentTime/_e.duration*100;Ge.style.setProperty("--progress",`${ye}%`)}}:void 0}):r(N,{children:[p?r("img",{src:p,alt:te?"":d,width:E,height:b,"data-orientation":S,loading:"lazy",decoding:"async",onLoad:pe=>{if(!R){const _e=pe.target.closest(".media");if(_e){const{naturalHeight:Ge,naturalWidth:ye}=pe.target;_e.dataset.orientation=ye>Ge?"landscape":"portrait",_e.style.setProperty("--width",`${ye}px`),_e.style.setProperty("--height",`${Ge}px`),_e.style.aspectRatio=`${ye}/${Ge}`}}}}):r("video",{src:v+"#t=0.1",width:E,height:b,"data-orientation":S,preload:"metadata",muted:!0,disablePictureInPicture:!0,onLoadedMetadata:pe=>{if(!ie){const{duration:_e}=pe.target;if(_e){const Ge=Zo(_e),ye=pe.target.closest(".media-video");ye&&(ye.dataset.formattedDuration=Ge)}}}}),r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})})]}),!i&&!te&&r(Go,{alt:d,lang:o,index:l})]})})}else if(T==="audio"||V){const ie=Zo(y.duration);return r(F,{children:r(ae,{class:`media media-audio ${e}`,"data-formatted-duration":i?void 0:ie,"data-has-alt":!te||void 0,onClick:u,style:!i&&Oe,children:[i?r("audio",{src:g||v,preload:"none",controls:!0,autoPlay:!0}):p?r("img",{src:p,alt:te?"":d,width:E,height:b,"data-orientation":S,loading:"lazy",onError:B=>{var ne,Z;try{(Z=(ne=B.target)==null?void 0:ne.remove)==null||Z.call(ne)}catch{}}}):null,!i&&r(N,{children:[r("div",{class:"media-play",children:r(M,{icon:"play",size:"xl",alt:"▶"})}),!te&&r(Go,{alt:d,lang:o,index:l})]})]})})}}function Sd(e){return URL.parse(e,location.origin)}const cr=Qt(kd,(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}),Id=280,Ad=140,Cd=Zi({limit:1,interval:1e3});function Pd(e,t){return t.v1.accounts.$select(e).fetch()}const Ld=vo(Cd(Pd)),At={public:{id:"7d1a0d"},local:{id:"d5zxa4"},unlisted:{id:"WDcQq9"},private:{id:"o34OrG"},direct:{id:"IV4QaU"}},Md=window.ontouchstart!==void 0&&/iPad|iPhone|iPod/.test(navigator.userAgent),Rd=new Intl.RelativeTimeFormat,Mi=80;function Od(e){var t;return(t=e==null?void 0:e.options)!=null&&t.length?`📊:
2024-10-08 17:16:36 +00:00
${e.options.map(n=>`- ${n.title}${n.votesCount>=0?` (${n.votesCount})`:""}`).join(`
`)}`:""}function qo(e){const{spoilerText:t,content:n,poll:o}=e;return(t?`${t}
2024-10-16 17:47:13 +00:00
`:"")+po(n)+Od(o)}const Dd=/^http/i,Ri=({post:e,instance:t,previewMode:n})=>{const{content:o,emojis:i,language:s,mentions:a,url:c}=e,l=$();return Wt(()=>{if(!l.current)return;const u=Cs(o,{emojis:i,returnDOM:!0});for(const f of u.querySelectorAll('a.u-url[target="_blank"]'))Dd.test(f.innerText.trim())||f.removeAttribute("target");l.current.replaceChildren(u.cloneNode(!0))},[o,i.length]),r("div",{ref:l,lang:s,dir:"auto",class:"inner-content",onClick:Jl({mentions:a,instance:t,previewMode:n,statusURL:c})})},$d={s:"small",m:"medium",l:"large"},Nd=vo(async e=>{const{detectAll:t}=await A(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}),_n={id:"8fZueG"},lr={},Oi=(e,t=[])=>{if(!e)return!1;const n=_s(!0),o=e!==n&&!yn([e],[n])&&!t.find(i=>e===i||yn([e],[i]));return lr[e+t]=!0,o};function Xt({statusID:e,status:t,instance:n,size:o="m",contentTextWeight:i,readOnly:s,enableCommentHint:a,withinContext:c,skeleton:l,enableTranslate:u,forceTranslate:f,previewMode:d,onMediaClick:m,quoted:h,onStatusLinkClick:p=()=>{},showFollowedTags:g,allowContextMenu:v,showActionsBar:T,showReplyParent:y,mediaFirst:x}){var qr,Yr,Xr,Qr;const{_:w}=go();if(l)return r("div",{class:`status skeleton ${x?"status-media-first small":""}`,children:[!x&&r(at,{size:"xxl"}),r("div",{class:"container",children:[r("div",{class:"meta",children:[(o==="s"||x)&&r(at,{size:"m"})," ███ ████████"]}),r("div",{class:"content-container",children:[x&&r("div",{class:"media-first-container"}),r("div",{class:`content ${x?"media-first-content":""}`,children:r("p",{children:"████ ████████"})})]})]})]});const{masto:E,instance:b,authenticated:I}=so({instance:n}),{instance:D}=so(),R=b===D;let S=st(e||(t==null?void 0:t.id),b);const C=Sn(H);if(t||(t=C.statuses[S]||C.statuses[e],S=st(t==null?void 0:t.id,b)),!t)return null;const{account:{acct:L,avatar:Y,avatarStatic:z,id:ue,url:Q,displayName:se,username:q,emojis:ae,bot:ce,group:de},id:V,repliesCount:he,reblogged:ee,reblogsCount:Ce,favourited:Te,favouritesCount:xe,bookmarked:Re,poll:Ee,muted:Oe,sensitive:De,spoilerText:te,visibility:F,language:ke,editedAt:Ze,filtered:ie,card:B,createdAt:ne,inReplyToId:Z,inReplyToAccountId:me,content:G,mentions:Ve,mediaAttachments:oe,reblog:ve,uri:An,url:pe,emojis:_e,tags:Ge,pinned:ye,_deleted:tt,_pinned:Cn,emojiReactions:dt}=t,[Lt,bo]=W(null);J(()=>{if(!G||ke)return;let _;return _=setTimeout(async()=>{let P=await Nd(po(G,{preProcess:K=>{K.querySelectorAll(".mention, .hashtag, pre, code, a:has(.invisible)").forEach(re=>{re.remove()}),K.querySelectorAll("a").forEach(re=>{const $e=re.innerText.trim();($e.startsWith("https://")||$e.startsWith("http://"))&&re.remove()})}}));bo(P)},1e3),()=>clearTimeout(_)},[G,ke]);const ge=ke||Lt,Mt=!!(oe!=null&&oe.length);x&&Mt&&(o="s");const yt=le(()=>vr(),[]),nt=le(()=>yt&&yt===ue,[ue,yt]),Pn=ze(Ws),X=!nt&&!s&&!d&&Cr(ie,Pn);if((X==null?void 0:X.action)==="hide")return null;const be=_=>{_.shiftKey};if(o!=="l"&&X)return r(Wd,{status:t,filterInfo:X,instance:b,containerProps:{onMouseEnter:be},showFollowedTags:!0,quoted:h});const Ae=new Date(ne),Be=new Date(Ze);let Se=Ve==null?void 0:Ve.find(_=>_.id===me);!Se&&me===V&&(Se={url:Q,username:q,displayName:se});const[ot,Ln]=W(Se);if(!c&&!ot&&me){const _=H.accounts[me];_?Ln(_):Ld(me,E).then(P=>{Ln(P),H.accounts[P.id]=P}).catch(P=>{})}const bt=me===yt||(Ve==null?void 0:Ve.find(_=>_.id===yt)),qe=le(()=>!!(Jr.account.get("preferences")||{})["reading:expand:spoilers"],[]),Mn=le(()=>{var P;return((P=(Jr.account.get("preferences")||{})["reading:expand:media"])==null?void 0:P.toLowerCase())||"default"},[]),Ke=d||qe||!!C.spoilers[V],Tt=d||Mn==="show_all"||!!C.spoilersMedia[V];if(ve)return de?r("div",{"data-state-post-id":S,class:"status-group",onMouseEnter:be,children:[r("div",{class:"status-pre-meta",children:[r(M,{icon:"group",size:"l",alt:k._({id:"L8fEEm"})})," ",r(gt,{account:t.acco
${pe}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:Fr&&!ee?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:Rd.format(-zr,"month")},components:{0:r("strong",{})}})})]}),disabled:!tn,onClick:async()=>{try{const _=await ko();!fe&&_&&Le(ee?k._({id:"bpDheH",values:{0:q||L}}):k._({id:"dbNZdP",values:{0:q||L}}))}catch{}},children:[r(M,{icon:"rocket"}),r("span",{children:Ce>0?it(Ce):ee?k._({id:"QzzGsY"}):k._({id:"PiVIlD"})})]}),r(Ie,{onClick:So,className:`menu-favourite ${Te?"checked":""}`,children:[r(M,{icon:"heart"}),r("span",{children:xe>0?it(xe):Te?k._({id:"OcUmcH"}):k._({id:"W9FRBT"})})]}),Zn("@mastodon/post-bookmark")&&r(Ie,{onClick:Br,className:`menu-bookmark ${Re?"checked":""}`,children:[r(M,{icon:"bookmark"}),r("span",{children:Re?k._({id:"q8EQYI"}):k._({id:"PZlHt8"})})]})]})}),!fe&&R&&(fe||T)&&r(sn,{}),(fe||T)&&r(N,{children:r(Ie,{onClick:()=>{H.showGenericAccounts={heading:k._({id:"+XOeb+"}),fetchAccounts:fa,instance:b,showReactions:!0,postID:S}},children:[r(M,{icon:"react"}),r("span",{children:r(O,{id:"+XOeb+"})})]})}),!x&&r(N,{children:[(u||!ge||Dt)&&r(sn,{}),u?r("div",{class:pn?"menu-horizontal":"",children:[r(Ie,{disabled:wt,onClick:()=>{Rt(!0)},children:[r(M,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),pn&&r(Ie,{onClick:()=>{const _=qo(t);_&&ki(_,ge)},children:[r(M,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]}):(!ge||Dt)&&r("div",{class:pn?"menu-horizontal":"",children:[r(ci,{to:`${b?`/${b}`:""}/s/${V}?translate=1`,children:[r(M,{icon:"translate"}),r("span",{children:r(O,{id:"pi8x/S"})})]}),pn&&r(Ie,{onClick:()=>{const _=qo(t);_&&ki(_,ge)},children:[r(M,{icon:"speak"}),r("span",{children:r(O,{id:"yIBLq8"})})]})]})]}),(!fe&&R||u||!ge||Dt)&&r(sn,{}),!fe&&r(N,{children:r(ci,{to:b?`/${b}/s/${V}`:`/s/${V}`,onClick:_=>{p(_,t)},children:[r(M,{icon:"arrows-right"}),r("small",{children:[r(O,{id:"8MkSAW",values:{0:q||L},components:{0:r("span",{class:"bidi-isolate"})}}),r("br",{}),r("span",{class:"more-insignificant",children:[w(At[F])," • ",$r]})]})]})}),!!Ze&&r(N,{children:r(Ie,{onClick:()=>{Rn(V)},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(Ie,{href:pe,target:"_blank",children:[r(M,{icon:"external"}),r("small",{class:"menu-double-lines",style:{maxWidth:"16em"},children:jd(pe)})]}),r("div",{class:"menu-horizontal",children:[r(Ie,{onClick:()=>{try{navigator.clipboard.writeText(pe),Le(k._({id:"edWbV6"}))}catch{Le(k._({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:pe}))&&r(Ie,{onClick:()=>{try{navigator.share({url:pe})}catch{alert(k._({id:"TtG3Uh"}))}},children:[r(M,{icon:"share"}),r("span",{children:r(O,{id:"LFKLqp"})})]})]}),Kr&&fe&&r(Ie,{onClick:()=>{xo(!0)},children:[r(M,{icon:"code"}),r("span",{children:r(O,{id:"jdVwsS"})})]}),(nt||bt)&&r(sn,{}),(nt||bt)&&r(Ie,{onClick:async()=>{try{const _=await E.v1.statuses.$select(V)[Oe?"unmute":"mute"]();ft(_,b),Le(Oe?k._({id:"Pm+5jw"}):k._({id:"ywB7JM"}))}catch{Le(Oe?k._({id:"c6jxNY"}):k._({id:"8SN9kN"}))}},children:Oe?r(N,{children:[r(M,{icon:"unmute"}),r("span",{children:r(O,{id:"i51zUR"})})]}):r(N,{children:[r(M,{icon:"mute"}),r("span",{children:r(O,{id:"OiUYO5"})})]})}),nt&&pa&&r(Ie,{onClick:async()=>{try{const _=await E.v1.statuses.$select(V)[ye?"unpin":"pin"]();ft(_,b),Le(ye?k._({id:"Yx809+"}):k._({id:"S6P6E+"}))}catch{Le(ye?k._({id:"A6cs15"}):k._({id:"vgUfWO"}))}},children:ye?r(N,{children:[r(M,{icon:"unpin"}),r("span",{children:r(O,{id:"XQMQZw"})})]}):r(N,{children:[r(M,{icon:"pin"}),r("span",{children:r(O,{id:"lfHLsx"})})]})}),nt&&r("div",{class:"menu-horizontal",children:[Zn("@mastodon/post-edit")&&r(Ie,{onClick:()=>{Gn({editStatus:t})},children:[r(M,
${pe}`}})},children:[r(M,{icon:"quote"}),r("span",{children:r(O,{id:"ZhhOwV"})})]}),menuFooter:Fr&&!ee&&r("div",{class:"footer",children:[r(M,{icon:"alert"}),r(O,{id:"MB+wJL"})]}),children:r("div",{class:"action has-count",children:r(Vt,{checked:ee,title:[k._({id:"kulphB"}),k._({id:"QzzGsY"})],alt:[k._({id:"kulphB"}),k._({id:"b7T5Zj"})],class:"reblog-button",icon:"rocket",count:Ce,disabled:!tn})})}),r("div",{class:"action has-count",children:r(Vt,{checked:Te,title:[k._({id:"W9FRBT"}),k._({id:"OcUmcH"})],alt:[k._({id:"W9FRBT"}),k._({id:"8ab1sR"})],class:"favourite-button",icon:"heart",count:xe,onClick:Vr})}),Zn("@mastodon/post-bookmark")&&r("div",{class:"action",children:r(Vt,{checked:Re,title:[k._({id:"PZlHt8"}),k._({id:"q8EQYI"})],alt:[k._({id:"PZlHt8"}),k._({id:"1C/9Sa"})],class:"bookmark-button",icon:"bookmark",onClick:Hr})}),r(vs,{portal:{target:document.querySelector(".status-deck")||document.body},align:"end",gap:4,overflow:"auto",viewScroll:"close",menuButton:r("div",{class:"action",children:r("button",{type:"button",title:k._({id:"2FYpfJ"}),class:"plain more-button",children:r(M,{icon:"more",size:"l",alt:k._({id:"2FYpfJ"})})})}),children:Wr})]})]})]}),!!wo&&r(Qo,{onClick:_=>{_.target===_.currentTarget&&Rn(!1)},children:r(Bd,{statusID:wo,instance:b,fetchStatusHistory:()=>E.v1.statuses.$select(wo).history.list(),onClose:()=>{var _;Rn(!1),(_=Ot.current)==null||_.focus()}})}),!!la&&r(Qo,{onClick:_=>{_.target===_.currentTarget&&xo(!1)},children:r(Ud,{post:t,instance:b,onClose:()=>{xo(!1)}})})]})]})}function Fd(e){const{enabled:t,children:n,lang:o,captionChildren:i}=e;return!t||!i?n:r("figure",{class:"media-figure-multiple",children:[n,r("figcaption",{lang:o,dir:"auto",children:i})]})}function zd(e){const{mediaAttachments:t,language:n,postID:o,instance:i}=e,s=t.length>1,a=$(),[c,l]=W(0);return J(()=>{let u=()=>{const{clientWidth:f,scrollLeft:d}=a.current,m=Math.round(Math.abs(d)/f);l(m)};return a.current&&a.current.addEventListener("scroll",u,{passive:!0}),()=>{a.current&&a.current.removeEventListener("scroll",u)}},[]),r(N,{children:[r("div",{class:"media-first-container",children:[r("div",{class:"media-first-carousel",ref:a,children:t.map((u,f)=>r("div",{class:"media-first-item",children:r(cr,{media:u,lang:n,to:`/${i}/s/${o}?media=${f+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)*(rr()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-left"})})}),r("label",{class:"media-carousel-button",children:r("button",{type:"button",class:"carousel-button",hidden:c===t.length-1,onClick:u=>{u.preventDefault(),u.stopPropagation(),a.current.focus(),a.current.scrollTo({left:a.current.clientWidth*(c+1)*(rr()?-1:1),behavior:"smooth"})},children:r(M,{icon:"arrow-right"})})})]})]}),s&&r("div",{class:"media-carousel-dots",style:{"--dots-count":t.length},children:t.map((u,f)=>r("span",{class:`carousel-dot ${f===c?"active":""}`},u.id))})]})}function Di(e){return As.toUnicode(URL.parse(e).hostname.replace(/^www\./,"").replace(/\/$/,""))}function $i(e){return["x.com","twitter.com","threads.net","bsky.app"].includes(e)}function Vd({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 Hd({card:e,selfReferential:t,selfAuthor:n,instance:o}){var Q;const i=Sn(H),{blurhash:s,title:a,description:c,html:l,providerName:u,providerUrl:f,authorName:d,authorUrl:m,width:h,height:p,image:g,imageDescription:v,url:T,type:y,embedUrl:x,language:w,publishedAt:E,authors:b}=e,I=a||u||d,R=h/p>=1.2?"large":"",[S,C]=W(null);if(J(()=>{I
2024-10-08 17:16:36 +00:00
`+I+`
`+((C=d==null?void 0:d.options)!=null&&C.length?`
<p>📊:</p>
<ul>
${d.options.map(L=>`
<li>
${L.title}
${L.votesCount>=0?` (${L.votesCount})`:""}
</li>
`).join("")}
</ul>`:"")+(T.length>0?`
`+T.map(L=>{const{description:Y,meta:z,previewRemoteUrl:ue,previewUrl:Q,remoteUrl:se,url:q,type:ae}=L,{original:ce={},small:de}=z||{},V=(de==null?void 0:de.width)||(ce==null?void 0:ce.width),he=(de==null?void 0:de.height)||(ce==null?void 0:ce.height),ee=se||q,Ce=ue||Q,Te=Ce||ee,xe=ee?URL.parse(ee):null,Re=ae==="unknown"&&xe&&/\.(mp4|m4r|m4v|mov|webm)$/i.test(xe.pathname),Ee=ae==="unknown"&&xe&&/\.(mp3|ogg|wav|m4a|m4p|m4b)$/i.test(xe.pathname),Oe=ae==="image"||ae==="unknown"&&Ce&&!Re&&!Ee,De=ae==="gifv"||ae==="video"||Re,te=ae==="audio"||Ee;let F="";return Oe?F=`<img src="${Te}" width="${V}" height="${he}" alt="${Y}" loading="lazy" />`:De?F=`
<video src="${ee}" width="${V}" height="${he}" controls preload="auto" poster="${Ce}" loading="lazy"></video>
${Y?`<figcaption>${Y}</figcaption>`:""}
`:te?F=`
<audio src="${ee}" controls preload="auto"></audio>
${Y?`<figcaption>${Y}</figcaption>`:""}
`:F=`
<a href="${ee}">📄 ${Y||ee}</a>
`,`<figure>${F}</figure>`}).join(`
`):""),S=`
<blockquote lang="${h}" cite="${y}" data-source="fediverse">
${m?`
<details>
<summary>${m}</summary>
${R}
</details>
`:R}
<footer>
${ho(i,c)} (@${s}) <a href="${y}"><time datetime="${D.toISOString()}">${D.toLocaleString()}</time></a>
</footer>
</blockquote>
2024-10-16 17:47:13 +00:00
`;return Wu(S)}function Ud({post:e,instance:t,onClose:n}){const{account:{url:o,displayName:i,username:s,emojis:a,bot:c,group:l},id:u,poll:f,spoilerText:d,language:m,editedAt:h,createdAt:p,content:g,mediaAttachments:v,url:T,emojis:y}=e,x=Qs(e,t);return r("div",{id:"embed-post",class:"sheet",children:[!!n&&r("button",{type:"button",class:"sheet-close",onClick:n,children:r(M,{icon:"x",alt:k._({id:"yz7wBu"})})}),r("header",{children:r("h2",{children:r(O,{id:"jdVwsS"})})}),r("main",{tabIndex:"-1",children:[r("h3",{children:r(O,{id:"GkS6YG"})}),r("textarea",{class:"embed-code",readonly:!0,onClick:w=>{w.target.select()},dir:"auto",children:x}),r("button",{type:"button",onClick:()=>{try{navigator.clipboard.writeText(x),Le(k._({id:"bl7nrg"}))}catch{Le(k._({id:"/KEBaP"}))}},children:[r(M,{icon:"clipboard"})," ",r("span",{children:r(O,{id:"he3ygx"})})]}),!!(v!=null&&v.length)&&r("section",{children:[r("p",{children:r(O,{id:"/2mUza"})}),r("ol",{class:"links-list",children:v.map(w=>r("li",{children:r("a",{href:w.remoteUrl||w.url,target:"_blank",download:!0,children:w.remoteUrl||w.url})},w.id))})]}),!!(a!=null&&a.length)&&r("section",{children:[r("p",{children:r(O,{id:"AeM/di"})}),r("ul",{children:a.map(w=>r("li",{children:[r("picture",{children:[r("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",w.shortcode,":"]})," (",r("a",{href:w.url,target:"_blank",download:!0,children:"URL"}),")",w.staticUrl?r(N,{children:[" ","(",r("a",{href:w.staticUrl,target:"_blank",download:!0,children:r(O,{id:"xiropL"})}),")"]}):null]},w.shortcode))})]}),!!(y!=null&&y.length)&&r("section",{children:[r("p",{children:r(O,{id:"jzjjJh"})}),r("ul",{children:y.map(w=>r("li",{children:[r("picture",{children:[r("source",{srcset:w.staticUrl,media:"(prefers-reduced-motion: reduce)"}),r("img",{class:"shortcode-emoji emoji",src:w.url,alt:`:${w.shortcode}:`,width:"16",height:"16",loading:"lazy",decoding:"async"})]})," ",r("code",{children:[":",w.shortcode,":"]})," (",r("a",{href:w.url,target:"_blank",download:!0,children:"URL"}),")",w.staticUrl?r(N,{children:[" ","(",r("a",{href:w.staticUrl,target:"_blank",download:!0,children:r(O,{id:"xiropL"})}),")"]}):null]},w.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:x},dir:"auto"}),r("p",{children:r("small",{children:r(O,{id:"j0kZfi"})})})]})]})}function Vt({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[f,d]=W(o[0]||""),[m,h]=W(i[0]||"");return J(()=>{e?(d(o[1]||""),h(i[1]||"")):(d(o[0]||""),h(i[0]||""))},[e,o,i]),r("button",{type:"button",title:f,class:`plain ${s?"small":""} ${n} ${e?"checked":""}`,onClick:p=>{l&&(p.preventDefault(),p.stopPropagation(),l(p))},...u,children:[r(M,{icon:a,size:c,alt:m}),!!t&&r(N,{children:[" ",r("small",{title:t,children:it(t)})]})]})}function jd(e){if(!e)return;const t=URL.parse(e),{host:n,pathname:o}=t,i=o.replace(/\/$/,""),[s,a,c]=i.match(/\/(@[^\/]+)\/(.*)/)||[];return r(N,{children:[As.toUnicode(n),a?r(N,{children:["/",a,r("wbr",{}),r("span",{class:"more-insignificant",children:["/",c]})]}):r("span",{class:"more-insignificant",children:i})]})}function Kd({sKey:e}){const n=Sn(H).statusReply[e];if(!n)return null;const{id:o,instance:i}=n,s=qi(o,i);if(!s)return null;const{sensitive:a,spoilerText:c,account:{avatar:l,avatarStatic:u,bot:f}={},visibility:d,content:m,language:h,filtered:p}=s;if(a||c||!m)return null;const g=st(o,i),v=Zs(s),T=ze(Ws),y=Cr(p,T);if((y==null?void 0:y.action)==="hide")return null;const x=(y==null?void 0:y.titlesStr)||"";return r("article",{class:`status compac
//# sourceMappingURL=fuse-RZOrQKm7.js.map