2023-11-08 19:09:39 +01:00
var y = { isSignal ( t ) { return ! 1 } , processReactiveAttribute ( t , e , n , o ) { return n } } ; function M ( t , e = ! 0 ) { return e ? Object . assign ( y , t ) : ( Object . setPrototypeOf ( t , y ) , t ) } function R ( t ) { return y . isPrototypeOf ( t ) && t !== y ? t : y } function v ( t ) { return typeof t > "u" } function F ( t ) { let e = typeof t ; return e !== "object" ? e : t === null ? "null" : Object . prototype . toString . call ( t ) } function C ( t , e ) { if ( ! t || ! ( t instanceof AbortSignal ) ) return ! 0 ; if ( ! t . aborted ) return t . addEventListener ( "abort" , e ) , function ( ) { t . removeEventListener ( "abort" , e ) } } var U = { setDeleteAttr : X } ; function X ( t , e , n ) { if ( Reflect . set ( t , e , n ) , ! ! v ( n ) ) { if ( Reflect . deleteProperty ( t , e ) , t instanceof HTMLElement && t . getAttribute ( e ) === "undefined" ) return t . removeAttribute ( e ) ; if ( Reflect . get ( t , e ) === "undefined" ) return Reflect . set ( t , e , "" ) } } var w = [ { scope : document . body , host : t => t ? t ( document . body ) : document . body , prevent : ! 0 , inherit _host : ! 1 } ] , _ = { get current ( ) { return w [ w . length - 1 ] } , get host ( ) { return this . current . host } , preventDefault ( ) { let { current : t } = this ; return t . prevent = ! 0 , t } , get state ( ) { return [ ... w ] } , push ( t = { } ) { return w . push ( Object . assign ( { } , this . current , { prevent : ! 1 } , t ) ) } , pop ( ) { return w . pop ( ) } } , L ; function m ( t , e , ... n ) { let o = R ( this ) , r = 0 , c , s ; switch ( ( Object ( e ) !== e || o . isSignal ( e ) ) && ( e = { textContent : e } ) , ! 0 ) { case typeof t == "function" : { r = 1 ; let { inherit _host : a , host : d } = _ . current , h = a ? d : i => i ? ( r === 1 ? n . unshift ( i ) : i ( s ) , void 0 ) : s ; _ . push ( { scope : t , host : h , inherit _host : a } ) , c = t ( e || void 0 ) ; let E = c instanceof DocumentFragment , u = m . mark ( { type : "component" , name : t . name , host : E ? "this" : c . nodeName === "#comment" ? "previousLater" : "parentElement" } ) ; c . prepend ( u ) , E && ( s = u ) ; break } case t === "#text" : c = N . call ( this , document . createTextNode ( "" ) , e ) ; break ; case ( t === "<>" || ! t ) : c = N . call ( this , document . createDocumentFragment ( ) , e ) ; break ; case L : c = N . call ( this , document . createElementNS ( L , t ) , e ) ; break ; case ! c : c = N . call ( this , document . createElement ( t ) , e ) } return rt ( c ) , s || ( s = c ) , n . forEach ( a => a ( s ) ) , r && _ . pop ( ) , r = 2 , c } m . mark = function ( t , e = ! 1 ) { t = Object . entries ( t ) . map ( ( [ r , c ] ) => r + ` =" ${ c } " ` ) . join ( " " ) ; let n = e ? "" : "/" , o = document . createComment ( ` <dde:mark ${ t } ${ n } > ` ) ; return e || ( o . end = document . createComment ( "</dde:mark>" ) ) , o } ; m . later = function ( ) { let t = m . mark ( { type : "later" } ) ; return t . append = t . prepend = function ( ... e ) { return t . after ( ... e ) , t } , t } ; function bt ( t ) { let e = this ; return function ( ... o ) { L = t ; let r = m . call ( e , ... o ) ; return L = void 0 , r } } var { setDeleteAttr : q } = U , P = new WeakMap ; function N ( t , ... e ) { if ( ! e . length ) return t ; P . set ( t , J ( t , this ) ) ; for ( let [ n , o ] of Object . entries ( Object . assign ( { } , ... e ) ) ) I . call ( this , t , n , o ) ; return P . delete ( t ) , t } function I ( t , e , n ) { let { setRemoveAttr : o , s : r } = J ( t , this ) , c = this ; n = r . processReactiveAttribute ( t , e , n , ( a , d ) => I . call ( c , t , a , d ) ) ; let [ s ] = e ; if ( s === "=" ) return o ( e . slice ( 1 ) , n ) ; if ( s === "." ) return H ( t , e . slice ( 1 ) , n ) ; if ( /(aria|data)([A-Z])/ . test ( e ) ) return e = e . replace ( /([a-z])([A-Z])/g , "$1-$2" ) . toLowerCase ( ) , o ( e , n ) ; switch ( e === "className" && ( e = "class" ) , e ) { case "xlink:href" : return o ( e , n , "http://www.w3.org/1999/xlink" ) ; case "textContent" : return q ( t , e , n ) ; case "style" : if ( typeof n != "object" ) break ; case "dataset" : return W ( r , n , H . bind ( null , t [ e ] ) ) ; case "ariaset" : return W ( r , n , ( a , d ) => o ( "aria-" + a , d ) ) ; case "classList" : return Y . call ( c , t , n ) } return tt ( t , e ) ? q ( t , e , n ) : o ( e , n ) } function J ( t , e ) { if ( P . has ( t ) ) return P . get ( t ) ; let o = ( t instanceof SVGElement ? nt : et ) . bind ( null , t , "Attribute" ) , r = R ( e ) ; return { setRemoveAttr : o , s : r } } function Y ( t , e ) { let n = R ( this ) ; return W ( n , e , ( o , r ) => t . classList . toggle ( o , r === - 1 ? void 0 : ! ! r ) ) , t } function Et ( t ) { return Array . from ( t . children ) . forEach ( e => e . remove ( ) ) , t } function tt ( t , e ) { if ( ! Reflect . has ( t , e ) ) return ! 1 ; let n = Z ( t , e ) ; return ! v ( n . set ) } function Z ( t , e ) { if ( t = Object . getPrototypeOf ( t ) , ! t ) return { } ; let n = Object . getOwnPropertyDescriptor ( t , e ) ; return n || Z ( t , e ) } function W ( t , e , n ) { if ( ! ( typeof e != "object" || e === null ) ) return Object . entries ( e ) . forEach ( function ( [ r , c ] ) { r && ( c = t . processReactiveAttribute ( e , r , c , n ) , n ( r , c ) ) } ) } function G ( t ) { return Array . isArray ( t ) ? t . filter ( Boolean ) . join ( " " ) : t } function et ( t , e , n , o ) { return t [ ( v ( o ) ? "remove" : "set" ) + e ] ( n , G ( o ) ) } function nt ( t , e , n , o , r = null ) { return t [ ( v ( o ) ? "remove" : "set" ) + e + "NS" ] ( r , n , G ( o ) ) } function H ( t , e , n ) { if ( Reflect . set ( t , e , n ) , ! ! v ( n ) ) return Reflect . deleteProperty ( t , e ) } function B ( ... t ) { return this . appendOrig ( ... t ) , this
* Investigate ` __dde_attributes ` key of the element . * / g . c l e a r ( . . . O b j e c t . v a l u e s ( r [ A ] ) ) , o = n u l l } ) ( r ) , r } ) , n e w P r o x y ( n , { a p p l y ( r , c , s ) { i f ( ! s . l e n g t h ) r e t u r n r ( ) ; i f ( ! o ) r e t u r n ; l e t a = s [ 0 ] ; r e t u r n o i n s t a n c e o f H T M L E l e m e n t ? o . s e t A t t r i b u t e ( t , a ) : o . s e t A t t r i b u t e N S ( n u l l , t , a ) } } ) } ; g . c l e a r = f u n c t i o n ( . . . t ) { f o r ( l e t n o f t ) { R e f l e c t . d e l e t e P r o p e r t y ( n , " t o J S O N " ) ; l e t o = n [ p ] ; o . o n c l e a r . f o r E a c h ( r = > r . c a l l ( o ) ) , e ( n , o ) , R e f l e c t . d e l e t e P r o p e r t y ( n , p ) } f u n c t i o n e ( n , o ) { o . l i s t e n e r s . f o r E a c h ( r = > { i f ( o . l i s t e n e r s . d e l e t e ( r ) , ! l . h a s ( r ) ) r e t u r n ; l e t c = l . g e t ( r ) ; c . d e l e t e ( n ) , ! ( c . s i z e > 1 ) & & ( g . c l e a r ( . . . c ) , l . d e l e t e ( r ) ) } ) } } ; v a r k = " _ _ d d e _ r e a c t i v e " ; g . e l = f u n c t i o n ( t , e ) { l e t n = m . m a r k ( { t y p e : " r e a c t i v e " } , ! 1 ) , o = n . e n d , r = d o c u m e n t . c r e a t e D o c u m e n t F r a g m e n t ( ) ; r . a p p e n d ( n , o ) ; l e t { c u r r e n t : c } = _ , s = a = > { i f ( ! n . p a r e n t N o d e | | ! o . p a r e n t N o d e ) r e t u r n O ( t , s ) ; _ . p u s h ( c ) ; l e t d = e ( a ) ; _ . p o p ( ) , A r r a y . i s A r r a y ( d ) | | ( d = [ d ] ) ; l e t h = n ; f o r ( ; ( h = n . n e x t S i b l i n g ) ! = = o ; ) h . r e m o v e ( ) ; n . a f t e r ( . . . d ) } ; r e t u r n z ( t , s ) , Q ( t , s , n , e ) , s ( t ( ) ) , r } ; v a r K = { i s S i g n a l : D , p r o c e s s R e a c t i v e A t t r i b u t e ( t , e , n , o ) { i f ( ! D ( n ) ) r e t u r n n ; l e t r = c = > o ( e , c ) ; r e t u r n z ( n , r ) , Q ( n , r , t , e ) , n ( ) } } ; f u n c t i o n Q ( t , e , . . . n ) { l e t { c u r r e n t : o } = _ ; o . p r e v e n t | | o . h o s t ( f u n c t i o n ( r ) { r [ k ] | | ( r [ k ] = [ ] , x . d i s c o n n e c t e d ( ( ) = > r [ k ] . f o r E a c h ( ( [ [ c , s ] ] ) = > O ( c , s , c [ p ] ? . h o s t ( ) = = = r ) ) ) ( r ) ) , r [ k ] . p u s h ( [ [ t , e ] , . . . n ] ) } ) } f u n c t i o n V ( t , e ) { l e t n = ( . . . o ) = > o . l e n g t h ? a t ( n , . . . o ) : f t ( n ) ; r e t u r n i t ( n , t , e ) } v a r s t = O b j e c t . a s s i g n ( O b j e c t . c r e a t e ( n u l l ) , { s t o p P r o p a g a t i o n ( ) { t h i s . s k i p = ! 0 } } ) , $ = c l a s s e x t e n d s E r r o r { c o n s t r u c t o r ( ) { s u p e r ( ) ; l e t [ e , . . . n ] = t h i s . s t a c k . s p l i t ( `
` ),o=e.slice(e.indexOf("@"),e.indexOf(".js:")+4);this.stack=n.find(r=>!r.includes(o))}};function it(t,e,n){let o=[];F(n)!=="[object Object]"&&(n={});let{onclear:r}=g.symbols;n[r]&&(o.push(n[r]),Reflect.deleteProperty(n,r));let{host:c}=_;return Reflect.defineProperty(t,p,{value:{value:e,actions:n,onclear:o,host:c,listeners:new Set,defined:new $ },enumerable:!1,writable:!1,configurable:!0}),t.toJSON=()=>t(),Object.setPrototypeOf(t[p],st),t}function ut(){return T[T.length-1]}function ft(t){if(!t[p])return;let{value:e,listeners:n}=t[p],o=ut();return o&&n.add(o),l.has(o)&&l.get(o).add(t),e}function at(t,e,n){if(!t[p])return;let o=t[p];if(!(!n&&o.value===e))return o.value=e,o.listeners.forEach(r=>r(e)),e}function z(t,e){if(t[p])return t[p].listeners.add(e)}function O(t,e,n){let o=t[p];if(!o)return;let r=o.listeners.delete(e);if(n&&!o.listeners.size){if(g.clear(t),!l.has(o))return r;let c=l.get(o);if(!l.has(c))return r;l.get(c).forEach(s=>O(s,c,!0))}return r}M(K);export{g as S,N as assign,I as assignAttribute,Y as classListDeclarative,m as createElement,bt as createElementNS,xt as dispatchEvent,m as el,bt as elNS,Et as empty,D as isSignal,x as on,M as registerReactivity,_ as scope};