2023-11-29 18:25:21 +01:00
var A = { isObservable ( e ) { return ! 1 } , processReactiveAttribute ( e , t , n , r ) { return n } } ; function T ( e , t = ! 0 ) { return t ? Object . assign ( A , e ) : ( Object . setPrototypeOf ( e , A ) , e ) } function C ( e ) { return A . isPrototypeOf ( e ) && e !== A ? e : A } function x ( e ) { return typeof e > "u" } function B ( e ) { let t = typeof e ; return t !== "object" ? t : e === null ? "null" : Object . prototype . toString . call ( e ) } function N ( e , t ) { if ( ! e || ! ( e instanceof AbortSignal ) ) return ! 0 ; if ( ! e . aborted ) return e . addEventListener ( "abort" , t ) , function ( ) { e . removeEventListener ( "abort" , t ) } } var $ = { setDeleteAttr : ee , ssr : "" } ; function ee ( e , t , n ) { if ( Reflect . set ( e , t , n ) , ! ! x ( n ) ) { if ( Reflect . deleteProperty ( e , t ) , e instanceof HTMLElement && e . getAttribute ( t ) === "undefined" ) return e . removeAttribute ( t ) ; if ( Reflect . get ( e , t ) === "undefined" ) return Reflect . set ( e , t , "" ) } } var E = [ { scope : document . body , host : e => e ? e ( document . body ) : document . body , custom _element : ! 1 , prevent : ! 0 } ] , b = { get current ( ) { return E [ E . length - 1 ] } , get host ( ) { return this . current . host } , preventDefault ( ) { let { current : e } = this ; return e . prevent = ! 0 , e } , get state ( ) { return [ ... E ] } , push ( e = { } ) { return E . push ( Object . assign ( { } , this . current , { prevent : ! 1 } , e ) ) } , pushRoot ( ) { return E . push ( E [ 0 ] ) } , pop ( ) { if ( E . length !== 1 ) return E . pop ( ) } } ; function H ( ... e ) { return this . appendOriginal ( ... e ) , this } function te ( e ) { return e . append === H || ( e . appendOriginal = e . append , e . append = H ) , e } var j ; function y ( e , t , ... n ) { let r = C ( this ) , o = 0 , c , s ; switch ( ( Object ( t ) !== t || r . isObservable ( t ) ) && ( t = { textContent : t } ) , ! 0 ) { case typeof e == "function" : { o = 1 , b . push ( { scope : e , host : ( ... l ) => l . length ? ( o === 1 ? n . unshift ( ... l ) : l . forEach ( v => v ( s ) ) , void 0 ) : s } ) , c = e ( t || void 0 ) ; let d = c instanceof DocumentFragment ; if ( c . nodeName === "#comment" ) break ; let u = y . mark ( { type : "component" , name : e . name , host : d ? "this" : "parentElement" } ) ; c . prepend ( u ) , d && ( s = u ) ; break } case e === "#text" : c = P . call ( this , document . createTextNode ( "" ) , t ) ; break ; case ( e === "<>" || ! e ) : c = P . call ( this , document . createDocumentFragment ( ) , t ) ; break ; case ! ! j : c = P . call ( this , document . createElementNS ( j , e ) , t ) ; break ; case ! c : c = P . call ( this , document . createElement ( e ) , t ) } return te ( c ) , s || ( s = c ) , n . forEach ( d => d ( s ) ) , o && b . pop ( ) , o = 2 , c } function _e ( e ) { let t = Symbol . for ( "default" ) , n = Array . from ( e . querySelectorAll ( "slot" ) ) . reduce ( ( o , c ) => Reflect . set ( o , c . name || t , c ) && o , { } ) , r = Reflect . has ( n , t ) ; return e . append = new Proxy ( e . append , { apply ( o , c , s ) { if ( ! s . length ) return e ; let d = document . createDocumentFragment ( ) ; for ( let u of s ) { if ( ! u || ! u . slot ) { r && d . appendChild ( u ) ; continue } let l = u . slot , v = n [ l ] ; O ( u , "remove" , "slot" ) , v && ( v . replaceWith ( u ) , Reflect . deleteProperty ( n , l ) ) } return r && ( n [ t ] . replaceWith ( d ) , Reflect . deleteProperty ( n , t ) ) , Object . values ( n ) . forEach ( u => u . replaceWith ( y ( ) . append ( ... Array . from ( u . childNodes ) ) ) ) , e } } ) , e } y . mark = function ( e , t = ! 1 ) { e = Object . entries ( e ) . map ( ( [ o , c ] ) => o + ` =" ${ c } " ` ) . join ( " " ) ; let n = t ? "" : "/" , r = document . createComment ( ` <dde:mark ${ e } ${ $ . ssr } ${ n } > ` ) ; return t || ( r . end = document . createComment ( "</dde:mark>" ) ) , r } ; function Ee ( e ) { let t = this ; return function ( ... r ) { j = e ; let o = y . call ( t , ... r ) ; return j = void 0 , o } } var { setDeleteAttr : I } = $ , L = new WeakMap ; function P ( e , ... t ) { if ( ! t . length ) return e ; L . set ( e , G ( e , this ) ) ; for ( let [ n , r ] of Object . entries ( Object . assign ( { } , ... t ) ) ) Z . call ( this , e , n , r ) ; return L . delete ( e ) , e } function Z ( e , t , n ) { let { setRemoveAttr : r , s : o } = G ( e , this ) , c = this ; n = o . processReactiveAttribute ( e , t , n , ( d , u ) => Z . call ( c , e , d , u ) ) ; let [ s ] = t ; if ( s === "=" ) return r ( t . slice ( 1 ) , n ) ; if ( s === "." ) return J ( e , t . slice ( 1 ) , n ) ; if ( /(aria|data)([A-Z])/ . test ( t ) ) return t = t . replace ( /([a-z])([A-Z])/g , "$1-$2" ) . toLowerCase ( ) , r ( t , n ) ; switch ( t === "className" && ( t = "class" ) , t ) { case "xlink:href" : return r ( t , n , "http://www.w3.org/1999/xlink" ) ; case "textContent" : return I ( e , t , n ) ; case "style" : if ( typeof n != "object" ) break ; case "dataset" : return F ( o , n , J . bind ( null , e [ t ] ) ) ; case "ariaset" : return F ( o , n , ( d , u ) => r ( "aria-" + d , u ) ) ; case "classList" : return ne . call ( c , e , n ) } return re ( e , t ) ? I ( e , t , n ) : r ( t , n ) } function G ( e , t ) { if ( L . has ( e ) ) return L . get ( e ) ; let r = ( e instanceof SVGElement ? ce : oe ) . bind ( null , e , "Attribute" ) , o = C ( t ) ; return { setRemoveAttr : r , s : o } } function ne ( e , t ) { let n = C ( this ) ; return F ( n , t , ( r , o ) => e . classList . toggle ( r , o === - 1 ? void 0 : ! ! o ) ) , e } function xe ( e ) { return Array . from ( e . children ) . forEach ( t => t . remove ( ) ) , e } function O ( e , t , n , r ) { return e instanceof HTMLElement ? e [ t + " At
* Investigate ` __dde_attributes ` key of the element . * / m . c l e a r ( . . . O b j e c t . v a l u e s ( r [ R ] ) ) } ) ( r ) } ) , n e w P r o x y ( n , { a p p l y ( o , c , s ) { i f ( ! s . l e n g t h ) r e t u r n o ( ) ; l e t d = s [ 0 ] ; r e t u r n O ( r , " s e t " , e , d ) } } ) } ; v a r X = { i s O b s e r v a b l e : W , p r o c e s s R e a c t i v e A t t r i b u t e ( e , t , n , r ) { i f ( ! W ( n ) ) r e t u r n n ; l e t o = c = > r ( t , c ) ; r e t u r n U ( n , o ) , Y ( n , o , e , t ) , n ( ) } } ; f u n c t i o n Y ( e , t , . . . n ) { l e t { c u r r e n t : r } = b ; r . p r e v e n t | | r . h o s t ( f u n c t i o n ( o ) { o [ k ] | | ( o [ k ] = [ ] , _ . d i s c o n n e c t e d ( ( ) = > o [ k ] . f o r E a c h ( ( [ [ c , s ] ] ) = > S ( c , s , c [ p ] ? . h o s t ( ) = = = o ) ) ) ( o ) ) , o [ k ] . p u s h ( [ [ e , t ] , . . . n ] ) } ) } f u n c t i o n Q ( e , t ) { l e t n = ( . . . r ) = > r . l e n g t h ? l e ( n , . . . r ) : d e ( n ) ; r e t u r n u e ( n , e , t ) } v a r f e = 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 } } ) , q = 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 [ t , . . . n ] = t h i s . s t a c k . s p l i t ( `
` ),r=t.slice(t.indexOf("@"),t.indexOf(".js:")+4);this.stack=n.find(o=>!o.includes(r))}};function ue(e,t,n){let r=[];B(n)!=="[object Object]"&&(n={});let{onclear:o}=m.symbols;n[o]&&(r.push(n[o]),Reflect.deleteProperty(n,o));let{host:c}=b;return Reflect.defineProperty(e,p,{value:{value:t,actions:n,onclear:r,host:c,listeners:new Set,defined:new q},enumerable:!1,writable:!1,configurable:!0}),e.toJSON=()=>e(),Object.setPrototypeOf(e[p],fe),e}function ae(){return M[M.length-1]}function de(e){if(!e[p])return;let{value:t,listeners:n}=e[p],r=ae();return r&&n.add(r),h.has(r)&&h.get(r).add(e),t}function le(e,t,n){if(!e[p])return;let r=e[p];if(!(!n&&r.value===t))return r.value=t,r.listeners.forEach(o=>o(t)),t}function U(e,t){if(e[p])return e[p].listeners.add(t)}function S(e,t,n){let r=e[p];if(!r)return;let o=r.listeners.delete(t);if(n&&!r.listeners.size){if(e.clear(e),!h.has(r))return o;let c=h.get(r);if(!h.has(c))return o;h.get(c).forEach(s=>S(s,c,!0))}return o}T(X);export{m as O,P as assign,Z as assignAttribute,te as chainableAppend,ne as classListDeclarative,y as createElement,Ee as createElementNS,we as dispatchEvent,y as el,Ee as elNS,O as elementAttribute,xe as empty,W as isObservable,m as observable,_ as on,T as registerReactivity,b as scope,_e as simulateSlots};