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
* / v a r $ f = y r . e x p o r t s ; ( f u n c t i o n ( e ) { ( f u n c t i o n ( t , n ) { e . e x p o r t s ? e . e x p o r t s = n ( ) : t . T o a s t i f y = n ( ) } ) ( w a , f u n c t i o n ( t ) { v a r n = f u n c t i o n ( a ) { r e t u r n n e w n . l i b . i n i t ( a ) } , o = " 1 . 1 2 . 0 " ; n . d e f a u l t s = { o l d e s t F i r s t : ! 0 , t e x t : " T o a s t i f y i s a w e s o m e ! " , n o d e : v o i d 0 , d u r a t i o n : 3 e 3 , s e l e c t o r : v o i d 0 , c a l l b a c k : f u n c t i o n ( ) { } , d e s t i n a t i o n : v o i d 0 , n e w W i n d o w : ! 1 , c l o s e : ! 1 , g r a v i t y : " t o a s t i f y - t o p " , p o s i t i o n L e f t : ! 1 , p o s i t i o n : " " , b a c k g r o u n d C o l o r : " " , a v a t a r : " " , c l a s s N a m e : " " , s t o p O n F o c u s : ! 0 , o n C l i c k : f u n c t i o n ( ) { } , o f f s e t : { x : 0 , y : 0 } , e s c a p e M a r k u p : ! 0 , a r i a L i v e : " p o l i t e " , s t y l e : { b a c k g r o u n d : " " } } , n . l i b = n . p r o t o t y p e = { t o a s t i f y : o , c o n s t r u c t o r : n , i n i t : f u n c t i o n ( a ) { r e t u r n a | | ( a = { } ) , t h i s . o p t i o n s = { } , t h i s . t o a s t E l e m e n t = n u l l , t h i s . o p t i o n s . t e x t = a . t e x t | | n . d e f a u l t s . t e x t , t h i s . o p t i o n s . n o d e = a . n o d e | | n . d e f a u l t s . n o d e , t h i s . o p t i o n s . d u r a t i o n = a . d u r a t i o n = = = 0 ? 0 : a . d u r a t i o n | | n . d e f a u l t s . d u r a t i o n , t h i s . o p t i o n s . s e l e c t o r = a . s e l e c t o r | | n . d e f a u l t s . s e l e c t o r , t h i s . o p t i o n s . c a l l b a c k = a . c a l l b a c k | | n . d e f a u l t s . c a l l b a c k , t h i s . o p t i o n s . d e s t i n a t i o n = a . d e s t i n a t i o n | | n . d e f a u l t s . d e s t i n a t i o n , t h i s . o p t i o n s . n e w W i n d o w = a . n e w W i n d o w | | n . d e f a u l t s . n e w W i n d o w , t h i s . o p t i o n s . c l o s e = a . c l o s e | | n . d e f a u l t s . c l o s e , t h i s . o p t i o n s . g r a v i t y = a . g r a v i t y = = = " b o t t o m " ? " t o a s t i f y - b o t t o m " : n . d e f a u l t s . g r a v i t y , t h i s . o p t i o n s . p o s i t i o n L e f t = a . p o s i t i o n L e f t | | n . d e f a u l t s . p o s i t i o n L e f t , t h i s . o p t i o n s . p o s i t i o n = a . p o s i t i o n | | n . d e f a u l t s . p o s i t i o n , t h i s . o p t i o n s . b a c k g r o u n d C o l o r = a . b a c k g r o u n d C o l o r | | n . d e f a u l t s . b a c k g r o u n d C o l o r , t h i s . o p t i o n s . a v a t a r = a . a v a t a r | | n . d e f a u l t s . a v a t a r , t h i s . o p t i o n s . c l a s s N a m e = a . c l a s s N a m e | | n . d e f a u l t s . c l a s s N a m e , t h i s . o p t i o n s . s t o p O n F o c u s = a . s t o p O n F o c u s = = = v o i d 0 ? n . d e f a u l t s . s t o p O n F o c u s : a . s t o p O n F o c u s , t h i s . o p t i o n s . o n C l i c k = a . o n C l i c k | | n . d e f a u l t s . o n C l i c k , t h i s . o p t i o n s . o f f s e t = a . o f f s e t | | n . d e f a u l t s . o f f s e t , t h i s . o p t i o n s . e s c a p e M a r k u p = a . e s c a p e M a r k u p ! = = v o i d 0 ? a . e s c a p e M a r k u p : n . d e f a u l t s . e s c a p e M a r k u p , t h i s . o p t i o n s . a r i a L i v e = a . a r i a L i v e | | n . d e f a u l t s . a r i a L i v e , t h i s . o p t i o n s . s t y l e = a . s t y l e | | n . d e f a u l t s . s t y l e , a . b a c k g r o u n d C o l o r & & ( t h i s . o p t i o n s . s t y l e . b a c k g r o u n d = a . b a c k g r o u n d C o l o r ) , t h i s } , b u i l d T o a s t : f u n c t i o n ( ) { i f ( ! t h i s . o p t i o n s ) t h r o w " T o a s t i f y i s n o t i n i t i a l i z e d " ; v a r a = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; a . c l a s s N a m e = " t o a s t i f y o n " + t h i s . o p t i o n s . c l a s s N a m e , t h i s . o p t i o n s . p o s i t i o n ? a . c l a s s N a m e + = " t o a s t i f y - " + t h i s . o p t i o n s . p o s i t i o n : t h i s . o p t i o n s . p o s i t i o n L e f t = = = ! 0 ? ( a . c l a s s N a m e + = " t o a s t i f y - l e f t " , c o n s o l e . w a r n ( " P r o p e r t y ` p o s i t i o n L e f t ` w i l l b e d e p r e c i a t e d i n f u r t h e r v e r s i o n s . P l e a s e u s e ` p o s i t i o n ` i n s t e a d . " ) ) : a . c l a s s N a m e + = " t o a s t i f y - r i g h t " , a . c l a s s N a m e + = " " + t h i s . o p t i o n s . g r a v i t y , t h i s . o p t i o n s . b a c k g r o u n d C o l o r & & c o n s o l e . w a r n ( ' D E P R E C A T I O N N O T I C E : " b a c k g r o u n d C o l o r " i s b e i n g d e p r e c a t e d . P l e a s e u s e t h e " s t y l e . b a c k g r o u n d " p r o p e r t y . ' ) ; f o r ( v a r c i n t h i s . o p t i o n s . s t y l e ) a . s t y l e [ c ] = t h i s . o p t i o n s . s t y l e [ c ] ; i f ( t h i s . o p t i o n s . a r i a L i v e & & a . s e t A t t r i b u t e ( " a r i a - l i v e " , t h i s . o p t i o n s . a r i a L i v e ) , t h i s . o p t i o n s . n o d e & & t h i s . o p t i o n s . n o d e . n o d e T y p e = = = N o d e . E L E M E N T _ N O D E ) a . a p p e n d C h i l d ( t h i s . o p t i o n s . n o d e ) ; e l s e i f ( t h i s . o p t i o n s . e s c a p e M a r k u p ? a . i n n e r T e x t = t h i s . o p t i o n s . t e x t : a . i n n e r H T M L = t h i s . o p t i o n s . t e x t , t h i s . o p t i o n s . a v a t a r ! = = " " ) { v a r l = d o c u m e n t . c r e a t e E l e m e n t ( " i m g " ) ; l . s r c = t h i s . o p t i o n s . a v a t a r , l . c l a s s N a m e = " t o a s t i f y - a v a t a r " , t h i s . o p t i o n s . p o s i t i o n = = " l e f t " | | t h i s . o p t i o n s . p o s i t i o n L e f t = = = ! 0 ? a . a p p e n d C h i l d ( l ) : a . i n s e r t A d j a c e n t E l e m e n t ( " a f t e r b e g i n " , l ) } i f ( t h i s . o p t i o n s . c l o s e = = = ! 0 ) { v a r u = d o c u m e n t . c r e a t e E l e m e n t ( " b u t t o n " ) ; u . t y p e = " b u t t o n " , u . s e t A t t r i b u t e ( " a r i a - l a b e l " , " C l o s e " ) , u . c l a s s N a m e = " t o a s t - c l o s e " , u . i n n e r H T M L = " & # 1 0 0 0 6 ; " , u . a d d E v e n t L i s t e n e r ( " c l i c k " , ( f u n c t i o n ( v ) { v . s t o p P r o p a g a t i o n ( ) , t h i s . r e m o v e E l e m e n t ( t h i s . t o a s t E l e m e n t ) , w i n d o w . c l e a r T i m e o u t ( t h i s . t o a s t E l e m e n t . t i m e O u t V a l u e ) } ) . b i n d ( t h i s ) ) ; v a r f = w i n d o w . i n n e r W i d t h > 0 ? w i n d o w . i n n e r W i d t h : s c r e e n . w i d t h ; ( t h i s . o p t i o n s . p o s i t i o n = = " l e f t " | | t h i s . o p t i o n s . p o s i t i o n L e f t = = = ! 0 ) & & f > 3 6 0 ? a . i n s e r t A d j a c e n t E l e m e n t ( " a f t e r b e g i n " , u ) : a . a p p e n d C h i l d ( u ) } i f ( t h i s . o p t i o n s . s t o p O n F o c u s & & t h i s . o p t i o n s . d u r a t i o n > 0 ) { v a r d = t h i s ; a . a d d E v e n t L i s t e n e r ( " m o u s e o v e r " , f u n c t i o n ( v ) { w i n d o w . c l e a r T i m e o u t ( a . t i m e O u t V a l u e ) } ) , a . a d d E v e n t L i s t e n e r ( " m o u s e l e a v e " , f u n c t i o n ( ) { a . t i m e O u t V a l u e = w i n d o w . s e t T i m e o u t ( f u n c t i o n ( ) { d . r e m o v e E l e m e n t ( a ) } , d . o p t i o n s . d u r a t i o n ) } ) } i f ( t y p e o f t h i s . o p t i o n s . d e s t i n a t i o n < " u " & & a . a d d E v e n t L i s t e n e r ( " c l i c k " , ( f u n c t i o n ( v ) { v . s t o p P r o p a g a t i o n ( ) , t h i s . o p t i o n s . n e w W i n d o w = = = ! 0 ? w i n d o w . o p e n ( t h i s . o p t i o n s . d e s t i n a t i o n , " _ b l a n k " ) : w i n d o w . l o c a t i o n = t h i s . o p t i o n s . d e s t i n a t i o n
2024-10-08 17:16:36 +00:00
` );m.innerHTML= ` < code > $ { d . innerHTML . trim ( ) } < / c o d e > ` , d . r e p l a c e W i t h ( m ) } } i f ( l ) { c o n s t d = [ . . . a . q u e r y S e l e c t o r A l l ( " p " ) ] . f i l t e r ( m = > z l . t e s t ( m . i n n e r T e x t ) ) ; f o r ( c o n s t m o f d ) { c o n s t h = [ m ] ; l e t p = ! 1 , g = m ; f o r ( ; g . n e x t E l e m e n t S i b l i n g ; ) { c o n s t v = g . n e x t E l e m e n t S i b l i n g ; i f ( v & & v . t a g N a m e = = = " P " ) i f ( V l . t e s t ( v . i n n e r T e x t ) ) { h . p u s h ( v ) , p = ! 0 ; b r e a k } e l s e h . p u s h ( v ) ; e l s e b r e a k ; g = v } i f ( p ) { c o n s t v = d o c u m e n t . c r e a t e E l e m e n t ( " p r e " ) ; f o r ( c o n s t y o f h ) f o r ( c o n s t x o f y . q u e r y S e l e c t o r A l l ( " b r " ) ) x . r e p l a c e W i t h ( `
` );const T=h.map(y=>y.innerHTML).join( `
2024-10-16 17:47:13 +00:00
` );v.innerHTML= ` < code tabindex = "0" > $ { T } < / c o d e > ` , m . r e p l a c e W i t h ( v ) ; f o r ( c o n s t y o f h ) y . r e m o v e ( ) } } } i f ( s . i n c l u d e s ( " ` " ) ) { u = z o ( a ) ; f o r ( c o n s t f o f u ) { l e t d = N o ( f . n o d e V a l u e ) ; H l . t e s t ( d ) & & ( d = d . r e p l a c e A l l ( K l , " < c o d e > $ 1 < / c o d e > " ) ) , N t . i n n e r H T M L = d , f . r e p l a c e W i t h ( . . . N t . c h i l d N o d e s ) } } i f ( B l . t e s t ( s ) ) { u = z o ( a , { r e j e c t F i l t e r : [ " A " ] } ) ; f o r ( c o n s t f o f u ) { l e t d = N o ( f . n o d e V a l u e ) ; U l . t e s t ( d ) & & ( d = d . r e p l a c e A l l ( j l , ' < a h r e f = " h t t p s : / / t w i t t e r . c o m / $ 2 " r e l = " n o f o l l o w n o o p e n e r n o r e f e r r e r " t a r g e t = " _ b l a n k " > $ 1 < / a > ' ) ) , N t . i n n e r H T M L = d , f . r e p l a c e W i t h ( . . . N t . c h i l d N o d e s ) } } i f ( s . i n c l u d e s ( " # " ) ) { l e t f = n u l l ; c o n s t d = [ . . . a . q u e r y S e l e c t o r A l l ( " p " ) ] . f i l t e r ( ( m , h ) = > { l e t p = 0 ; f o r ( l e t g = 0 ; g < m . c h i l d N o d e s . l e n g t h ; g + + ) { c o n s t v = m . c h i l d N o d e s [ g ] ; i f ( v . n o d e T y p e = = = N o d e . T E X T _ N O D E ) { i f ( v . t e x t C o n t e n t . t r i m ( ) ! = = " " ) r e t u r n ! 1 } e l s e i f ( v . t a g N a m e ! = = " B R " ) i f ( v . t a g N a m e = = = " A " ) { c o n s t T = v . t e x t C o n t e n t . t r i m ( ) ; i f ( ! T | | ! T . s t a r t s W i t h ( " # " ) ) r e t u r n ! 1 ; p + + } e l s e r e t u r n ! 1 } i f ( p > 3 | | p > 1 & & f & & h = = = f + 1 ) r e t u r n f = h , ! 0 } ) ; i f ( d ! = n u l l & & d . l e n g t h ) f o r ( c o n s t m o f d ) m . c l a s s L i s t . a d d ( " h a s h t a g - s t u f f i n g " ) , m . t i t l e = m . i n n e r T e x t } i f ( s . i n c l u d e s ( " < i m g " ) ) { c o n s t f = a . q u e r y S e l e c t o r A l l ( " i m g " ) ; f o r ( l e t d = 0 ; d < f . l e n g t h ; d + + ) { c o n s t m = f [ d ] , h = m . g e t A t t r i b u t e ( " w i d t h " ) | | m . n a t u r a l W i d t h , p = m . g e t A t t r i b u t e ( " h e i g h t " ) | | m . n a t u r a l H e i g h t ; h & & p & & m . s t y l e . s e t P r o p e r t y ( " - - o r i g i n a l - a s p e c t - r a t i o " , ` $ { h } / $ { p } ` ) } } r e t u r n i & & q u e u e M i c r o t a s k ( ( ) = > i ( a ) ) , o ? a : a . i n n e r H T M L } c o n s t C s = M e ( Z l ) , G l = [ " S T Y L E " , " I M G " , " V I D E O " , " A U D I O " , " A R E A " , " M A P " , " T R A C K " , " E M B E D " , " I F R A M E " , " O B J E C T " , " P I C T U R E " , " P O R T A L " , " S O U R C E " , " S V G " , " M A T H " , " C A N V A S " , " N O S C R I P T " , " S C R I P T " , " I N P U T " , " O P T I O N " , " T E X T A R E A " , " S L O T " , " T E M P L A T E " ] , q l = O b j e c t . f r o m E n t r i e s ( G l . m a p ( e = > [ e , ! 0 ] ) ) , Y l = / ^ ( h t t p s ? : \ / \ / ( w w w \ . ) ? | x m p p : ) / , F o = 3 0 ; f u n c t i o n X l ( e ) { v a r t ; i f ( ! ( ! e | | ( t = e . q u e r y S e l e c t o r ) ! = n u l l & & t . c a l l ( e , " * " ) ) ) t r y { c o n s t n = e . i n n e r T e x t . t r i m ( ) , o = ( n . m a t c h ( Y l ) | | [ ] ) [ 0 ] | | " " ; i f ( ! o ) r e t u r n ; c o n s t i = n . s l i c e ( o . l e n g t h , o . l e n g t h + F o ) , s = n . s l i c e ( o . l e n g t h + F o ) , a = n . s l i c e ( o . l e n g t h ) . l e n g t h > F o ; e . i n n e r H T M L = ` < s p a n c l a s s = " i n v i s i b l e " > $ { o } < / s p a n > < s p a n c l a s s = $ { a ? " e l l i p s i s " : " " } > $ { i } < / s p a n > < s p a n c l a s s = " i n v i s i b l e " > $ { s } < / s p a n > ` } c a t c h { } } f u n c t i o n z o ( e , t = { } ) { v a r a ; c o n s t n = [ ] , o = O b j e c t . a s s i g n ( { } , q l , ( a = t . r e j e c t F i l t e r ) = = n u l l ? v o i d 0 : a . r e d u c e ( ( c , l ) = > ( c [ l ] = ! 0 , c ) , { } ) ) , i = d o c u m e n t . c r e a t e T r e e W a l k e r ( e , N o d e F i l t e r . S H O W _ T E X T , { a c c e p t N o d e ( c ) { r e t u r n o [ c . p a r e n t N o d e . n o d e N a m e ] ? N o d e F i l t e r . F I L T E R _ R E J E C T : N o d e F i l t e r . F I L T E R _ A C C E P T } } , ! 1 ) ; l e t s ; f o r ( ; s = i . n e x t N o d e ( ) ; ) n . p u s h ( s ) ; r e t u r n n } c o n s t F t = d o c u m e n t . c r e a t e E l e m e n t ( " d i v " ) ; f u n c t i o n Q l ( e , t ) { i f ( ! e ) r e t u r n " " ; c o n s t { p r e P r o c e s s : n } = t | | { } ; r e t u r n F t . i n n e r H T M L = e . r e p l a c e ( / < \ / p > / g , ` < / p >
2024-10-08 17:16:36 +00:00
` ).replace(/< \/ li>/g, ` < / l i >
` ),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 : 40 em ) {
: 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 ( 180 deg , # 111 - 20 % , transparent 90 % ) ;
height : 60 px ;
width : 100 % ;
z - index : 1 ;
}
# playButton {
width : 68 px ;
height : 48 px ;
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 : 11 px 0 11 px 19 px ;
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 ;
}
< / s t y l e >
< div id = "frame" >
< picture >
< source id = "webpPlaceholder" type = "image/webp" >
< source id = "jpegPlaceholder" type = "image/jpeg" >
< img id = "fallbackPlaceholder" referrerpolicy = "origin" loading = "lazy" >
< / p i c t u r e >
< button id = "playButton" > < / b u t t o n >
< / d i v >
` ,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)}%`)\"" : "" }
> < / v i d e o >
` ,An= `
< video
src = "${v}"
poster = "${p}"
width = "${E}"
height = "${b}"
data - orientation = "${S}"
preload = "auto"
autoplay
playsinline
$ { Z ? "loop" : "" }
controls
> < / v i d e o >
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 } ) ` : "" }
< / l i >
` ).join("")}
< / u l > ` : " " ) + ( T . l e n g t h > 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" > < / v i d e o >
$ { Y ? ` <figcaption> ${ Y } </figcaption> ` : "" }
` :te?F= `
< audio src = "${ee}" controls preload = "auto" > < / a u d i o >
$ { Y ? ` <figcaption> ${ Y } </figcaption> ` : "" }
` :F= `
< a href = "${ee}" > 📄 $ { Y || ee } < / a >
` , ` < figure > $ { F } < / f i g u r e > ` } ) . j o i n ( `
` ):""),S= `
< blockquote lang = "${h}" cite = "${y}" data - source = "fediverse" >
$ { m ? `
< details >
< summary > $ { m } < / s u m m a r y >
$ { R }
< / d e t a i l s >
` :R}
< footer >
— $ { ho ( i , c ) } ( @ $ { s } ) < a href = "${y}" > < time datetime = "${D.toISOString()}" > $ { D . toLocaleString ( ) } < / t i m e > < / a >
< / f o o t e r >
< / b l o c k q u o t e >
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