@lipsjs/lips 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var U4=Object.create;var{defineProperty:g1,getPrototypeOf:K4,getOwnPropertyNames:O4}=Object;var j4=Object.prototype.hasOwnProperty;var t0=(J,Z,X)=>{X=J!=null?U4(K4(J)):{};const H=Z||!J||!J.__esModule?g1(X,"default",{value:J,enumerable:!0}):X;for(let G of O4(J))if(!j4.call(H,G))g1(H,G,{get:()=>J[G],enumerable:!0});return H};var I4=(J,Z)=>()=>(Z||J((Z={exports:{}}).exports,Z),Z.exports);var d0=(J,Z)=>{for(var X in Z)g1(J,X,{get:Z[X],enumerable:!0,configurable:!0,set:(H)=>Z[X]=()=>H})};var i0=I4((G5,q5)=>{(function(){var J=document,Z=window,X=J.documentElement,H=J.createElement.bind(J),G=H("div"),W=H("table"),B=H("tbody"),Y=H("tr"),M=Array.isArray,z=Array.prototype,j=z.concat,K=z.filter,A=z.indexOf,f=z.map,E=z.push,p=z.slice,X0=z.some,s=z.splice,d=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,u=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,o=/<.+>/,l=/^\w+$/;function J0(Q,q){var w=C(q);return!Q||!w&&!L(q)&&!b(q)?[]:!w&&u.test(Q)?q.getElementsByClassName(Q.slice(1).replace(/\\/g,"")):!w&&l.test(Q)?q.getElementsByTagName(Q):q.querySelectorAll(Q)}var m=function(){function Q(q,w){if(!q)return;if(I(q))return q;var O=q;if(S(q)){var N=w||J;if(O=d.test(q)&&L(N)?N.getElementById(q.slice(1).replace(/\\/g,"")):o.test(q)?s1(q):I(N)?N.find(q):S(N)?F(N).find(q):J0(q,N),!O)return}else if(_(q))return this.ready(q);if(O.nodeType||O===Z)O=[O];this.length=O.length;for(var $=0,y=this.length;$<y;$++)this[$]=O[$]}return Q.prototype.init=function(q,w){return new Q(q,w)},Q}(),U=m.prototype,F=U.init;if(F.fn=F.prototype=U,U.length=0,U.splice=s,typeof Symbol==="function")U[Symbol.iterator]=z[Symbol.iterator];function I(Q){return Q instanceof m}function R(Q){return!!Q&&Q===Q.window}function L(Q){return!!Q&&Q.nodeType===9}function C(Q){return!!Q&&Q.nodeType===11}function b(Q){return!!Q&&Q.nodeType===1}function v(Q){return!!Q&&Q.nodeType===3}function i(Q){return typeof Q==="boolean"}function _(Q){return typeof Q==="function"}function S(Q){return typeof Q==="string"}function P(Q){return Q===void 0}function k(Q){return Q===null}function T(Q){return!isNaN(parseFloat(Q))&&isFinite(Q)}function h(Q){if(typeof Q!=="object"||Q===null)return!1;var q=Object.getPrototypeOf(Q);return q===null||q===Object.prototype}F.isWindow=R,F.isFunction=_,F.isArray=M,F.isNumeric=T,F.isPlainObject=h;function D(Q,q,w){if(w){var O=Q.length;while(O--)if(q.call(Q[O],O,Q[O])===!1)return Q}else if(h(Q)){var N=Object.keys(Q);for(var O=0,$=N.length;O<$;O++){var y=N[O];if(q.call(Q[y],y,Q[y])===!1)return Q}}else for(var O=0,$=Q.length;O<$;O++)if(q.call(Q[O],O,Q[O])===!1)return Q;return Q}F.each=D,U.each=function(Q){return D(this,Q)},U.empty=function(){return this.each(function(Q,q){while(q.firstChild)q.removeChild(q.firstChild)})};function x(){var Q=[];for(var q=0;q<arguments.length;q++)Q[q]=arguments[q];var w=i(Q[0])?Q.shift():!1,O=Q.shift(),N=Q.length;if(!O)return{};if(!N)return x(w,F,O);for(var $=0;$<N;$++){var y=Q[$];for(var n in y)if(w&&(M(y[n])||h(y[n]))){if(!O[n]||O[n].constructor!==y[n].constructor)O[n]=new y[n].constructor;x(w,O[n],y[n])}else O[n]=y[n]}return O}F.extend=x,U.extend=function(Q){return x(U,Q)};var V=/\S+/g;function g(Q){return S(Q)?Q.match(V)||[]:[]}U.toggleClass=function(Q,q){var w=g(Q),O=!P(q);return this.each(function(N,$){if(!b($))return;D(w,function(y,n){if(O)q?$.classList.add(n):$.classList.remove(n);else $.classList.toggle(n)})})},U.addClass=function(Q){return this.toggleClass(Q,!0)},U.removeAttr=function(Q){var q=g(Q);return this.each(function(w,O){if(!b(O))return;D(q,function(N,$){O.removeAttribute($)})})};function e(Q,q){if(!Q)return;if(S(Q)){if(arguments.length<2){if(!this[0]||!b(this[0]))return;var w=this[0].getAttribute(Q);return k(w)?void 0:w}if(P(q))return this;if(k(q))return this.removeAttr(Q);return this.each(function(N,$){if(!b($))return;$.setAttribute(Q,q)})}for(var O in Q)this.attr(O,Q[O]);return this}U.attr=e,U.removeClass=function(Q){if(arguments.length)return this.toggleClass(Q,!1);return this.attr("class","")},U.hasClass=function(Q){return!!Q&&X0.call(this,function(q){return b(q)&&q.classList.contains(Q)})},U.get=function(Q){if(P(Q))return p.call(this);return Q=Number(Q),this[Q<0?Q+this.length:Q]},U.eq=function(Q){return F(this.get(Q))},U.first=function(){return this.eq(0)},U.last=function(){return this.eq(-1)};function t(Q){if(P(Q))return this.get().map(function(q){return b(q)||v(q)?q.textContent:""}).join("");return this.each(function(q,w){if(!b(w))return;w.textContent=Q})}U.text=t;function c(Q,q,w){if(!b(Q))return;var O=Z.getComputedStyle(Q,null);return w?O.getPropertyValue(q)||void 0:O[q]||Q.style[q]}function r(Q,q){return parseInt(c(Q,q),10)||0}function a(Q,q){return r(Q,"border".concat(q?"Left":"Top","Width"))+r(Q,"padding".concat(q?"Left":"Top"))+r(Q,"padding".concat(q?"Right":"Bottom"))+r(Q,"border".concat(q?"Right":"Bottom","Width"))}var Z0={};function F0(Q){if(Z0[Q])return Z0[Q];var q=H(Q);J.body.insertBefore(q,null);var w=c(q,"display");return J.body.removeChild(q),Z0[Q]=w!=="none"?w:"block"}function k0(Q){return c(Q,"display")==="none"}function c1(Q,q){var w=Q&&(Q.matches||Q.webkitMatchesSelector||Q.msMatchesSelector);return!!w&&!!q&&w.call(Q,q)}function r0(Q){return S(Q)?function(q,w){return c1(w,Q)}:_(Q)?Q:I(Q)?function(q,w){return Q.is(w)}:!Q?function(){return!1}:function(q,w){return w===Q}}U.filter=function(Q){var q=r0(Q);return F(K.call(this,function(w,O){return q.call(w,O,w)}))};function T0(Q,q){return!q?Q:Q.filter(q)}U.detach=function(Q){return T0(this,Q).each(function(q,w){if(w.parentNode)w.parentNode.removeChild(w)}),this};var u5=/^\s*<(\w+)[^>]*>/,m5=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,p1={"*":G,tr:B,td:Y,th:Y,thead:W,tbody:W,tfoot:W};function s1(Q){if(!S(Q))return[];if(m5.test(Q))return[H(RegExp.$1)];var q=u5.test(Q)&&RegExp.$1,w=p1[q]||p1["*"];return w.innerHTML=Q,F(w.childNodes).detach().get()}F.parseHTML=s1,U.has=function(Q){var q=S(Q)?function(w,O){return J0(Q,O).length}:function(w,O){return O.contains(Q)};return this.filter(q)},U.not=function(Q){var q=r0(Q);return this.filter(function(w,O){return(!S(Q)||b(O))&&!q.call(O,w,O)})};function N0(Q,q,w,O){var N=[],$=_(q),y=O&&r0(O);for(var n=0,j0=Q.length;n<j0;n++)if($){var G0=q(Q[n]);if(G0.length)E.apply(N,G0)}else{var w0=Q[n][q];while(w0!=null){if(O&&y(-1,w0))break;N.push(w0),w0=w?w0[q]:null}}return N}function o1(Q){if(Q.multiple&&Q.options)return N0(K.call(Q.options,function(q){return q.selected&&!q.disabled&&!q.parentNode.disabled}),"value");return Q.value||""}function d5(Q){if(!arguments.length)return this[0]&&o1(this[0]);return this.each(function(q,w){var O=w.multiple&&w.options;if(O||X5.test(w.type)){var N=M(Q)?f.call(Q,String):k(Q)?[]:[String(Q)];if(O)D(w.options,function($,y){y.selected=N.indexOf(y.value)>=0},!0);else w.checked=N.indexOf(w.value)>=0}else w.value=P(Q)||k(Q)?"":Q})}U.val=d5,U.is=function(Q){var q=r0(Q);return X0.call(this,function(w,O){return q.call(w,O,w)})},F.guid=1;function L0(Q){return Q.length>1?K.call(Q,function(q,w,O){return A.call(O,q)===w}):Q}F.unique=L0,U.add=function(Q,q){return F(L0(this.get().concat(F(Q,q).get())))},U.children=function(Q){return T0(F(L0(N0(this,function(q){return q.children}))),Q)},U.parent=function(Q){return T0(F(L0(N0(this,"parentNode"))),Q)},U.index=function(Q){var q=Q?F(Q)[0]:this[0],w=Q?this:F(q).parent().children();return A.call(w,q)},U.closest=function(Q){var q=this.filter(Q);if(q.length)return q;var w=this.parent();if(!w.length)return q;return w.closest(Q)},U.siblings=function(Q){return T0(F(L0(N0(this,function(q){return F(q).parent().children().not(q)}))),Q)},U.find=function(Q){return F(L0(N0(this,function(q){return J0(Q,q)})))};var i5=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,c5=/^$|^module$|\/(java|ecma)script/i,p5=["type","src","nonce","noModule"];function s5(Q,q){var w=F(Q);w.filter("script").add(w.find("script")).each(function(O,N){if(c5.test(N.type)&&X.contains(N)){var $=H("script");$.text=N.textContent.replace(i5,""),D(p5,function(y,n){if(N[n])$[n]=N[n]}),q.head.insertBefore($,null),q.head.removeChild($)}})}function o5(Q,q,w,O,N){if(O)Q.insertBefore(q,w?Q.firstChild:null);else if(Q.nodeName==="HTML")Q.parentNode.replaceChild(q,Q);else Q.parentNode.insertBefore(q,w?Q:Q.nextSibling);if(N)s5(q,Q.ownerDocument)}function $0(Q,q,w,O,N,$,y,n){return D(Q,function(j0,G0){D(F(G0),function(w0,S0){D(F(q),function(I0,a0){var $1=w?S0:a0,A1=w?a0:S0,M0=w?w0:I0;o5($1,!M0?A1:A1.cloneNode(!0),O,N,!M0)},n)},y)},$),q}U.after=function(){return $0(arguments,this,!1,!1,!1,!0,!0)},U.append=function(){return $0(arguments,this,!1,!1,!0)};function l5(Q){if(!arguments.length)return this[0]&&this[0].innerHTML;if(P(Q))return this;var q=/<script[\s>]/.test(Q);return this.each(function(w,O){if(!b(O))return;if(q)F(O).empty().append(Q);else O.innerHTML=Q})}U.html=l5,U.appendTo=function(Q){return $0(arguments,this,!0,!1,!0)},U.wrapInner=function(Q){return this.each(function(q,w){var O=F(w),N=O.contents();N.length?N.wrapAll(Q):O.append(Q)})},U.before=function(){return $0(arguments,this,!1,!0)},U.wrapAll=function(Q){var q=F(Q),w=q[0];while(w.children.length)w=w.firstElementChild;return this.first().before(q),this.appendTo(w)},U.wrap=function(Q){return this.each(function(q,w){var O=F(Q)[0];F(w).wrapAll(!q?O:O.cloneNode(!0))})},U.insertAfter=function(Q){return $0(arguments,this,!0,!1,!1,!1,!1,!0)},U.insertBefore=function(Q){return $0(arguments,this,!0,!0)},U.prepend=function(){return $0(arguments,this,!1,!0,!0,!0,!0)},U.prependTo=function(Q){return $0(arguments,this,!0,!0,!0,!1,!1,!0)},U.contents=function(){return F(L0(N0(this,function(Q){return Q.tagName==="IFRAME"?[Q.contentDocument]:Q.tagName==="TEMPLATE"?Q.content.childNodes:Q.childNodes})))},U.next=function(Q,q,w){return T0(F(L0(N0(this,"nextElementSibling",q,w))),Q)},U.nextAll=function(Q){return this.next(Q,!0)},U.nextUntil=function(Q,q){return this.next(q,!0,Q)},U.parents=function(Q,q){return T0(F(L0(N0(this,"parentElement",!0,q))),Q)},U.parentsUntil=function(Q,q){return this.parents(q,Q)},U.prev=function(Q,q,w){return T0(F(L0(N0(this,"previousElementSibling",q,w))),Q)},U.prevAll=function(Q){return this.prev(Q,!0)},U.prevUntil=function(Q,q){return this.prev(q,!0,Q)},U.map=function(Q){return F(j.apply([],f.call(this,function(q,w){return Q.call(q,w,q)})))},U.clone=function(){return this.map(function(Q,q){return q.cloneNode(!0)})},U.offsetParent=function(){return this.map(function(Q,q){var w=q.offsetParent;while(w&&c(w,"position")==="static")w=w.offsetParent;return w||X})},U.slice=function(Q,q){return F(p.call(this,Q,q))};var r5=/-([a-z])/g;function V1(Q){return Q.replace(r5,function(q,w){return w.toUpperCase()})}U.ready=function(Q){var q=function(){return setTimeout(Q,0,F)};if(J.readyState!=="loading")q();else J.addEventListener("DOMContentLoaded",q);return this},U.unwrap=function(){return this.parent().each(function(Q,q){if(q.tagName==="BODY")return;var w=F(q);w.replaceWith(w.children())}),this},U.offset=function(){var Q=this[0];if(!Q)return;var q=Q.getBoundingClientRect();return{top:q.top+Z.pageYOffset,left:q.left+Z.pageXOffset}},U.position=function(){var Q=this[0];if(!Q)return;var q=c(Q,"position")==="fixed",w=q?Q.getBoundingClientRect():this.offset();if(!q){var O=Q.ownerDocument,N=Q.offsetParent||O.documentElement;while((N===O.body||N===O.documentElement)&&c(N,"position")==="static")N=N.parentNode;if(N!==Q&&b(N)){var $=F(N).offset();w.top-=$.top+r(N,"borderTopWidth"),w.left-=$.left+r(N,"borderLeftWidth")}}return{top:w.top-r(Q,"marginTop"),left:w.left-r(Q,"marginLeft")}};var l1={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};U.prop=function(Q,q){if(!Q)return;if(S(Q)){if(Q=l1[Q]||Q,arguments.length<2)return this[0]&&this[0][Q];return this.each(function(O,N){N[Q]=q})}for(var w in Q)this.prop(w,Q[w]);return this},U.removeProp=function(Q){return this.each(function(q,w){delete w[l1[Q]||Q]})};var n5=/^--/;function N1(Q){return n5.test(Q)}var C1={},a5=G.style,t5=["webkit","moz","ms"];function e5(Q,q){if(q===void 0)q=N1(Q);if(q)return Q;if(!C1[Q]){var w=V1(Q),O="".concat(w[0].toUpperCase()).concat(w.slice(1)),N="".concat(w," ").concat(t5.join("".concat(O," "))).concat(O).split(" ");D(N,function($,y){if(y in a5)return C1[Q]=y,!1})}return C1[Q]}var J4={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function r1(Q,q,w){if(w===void 0)w=N1(Q);return!w&&!J4[Q]&&T(q)?"".concat(q,"px"):q}function Z4(Q,q){if(S(Q)){var w=N1(Q);if(Q=e5(Q,w),arguments.length<2)return this[0]&&c(this[0],Q,w);if(!Q)return this;return q=r1(Q,q,w),this.each(function(N,$){if(!b($))return;if(w)$.style.setProperty(Q,q);else $.style[Q]=q})}for(var O in Q)this.css(O,Q[O]);return this}U.css=Z4;function n1(Q,q){try{return Q(q)}catch(w){return q}}var W4=/^\s+|\s+$/;function a1(Q,q){var w=Q.dataset[q]||Q.dataset[V1(q)];if(W4.test(w))return w;return n1(JSON.parse,w)}function Q4(Q,q,w){w=n1(JSON.stringify,w),Q.dataset[V1(q)]=w}function X4(Q,q){if(!Q){if(!this[0])return;var w={};for(var O in this[0].dataset)w[O]=a1(this[0],O);return w}if(S(Q)){if(arguments.length<2)return this[0]&&a1(this[0],Q);if(P(q))return this;return this.each(function(N,$){Q4($,Q,q)})}for(var O in Q)this.data(O,Q[O]);return this}U.data=X4;function t1(Q,q){var w=Q.documentElement;return Math.max(Q.body["scroll".concat(q)],w["scroll".concat(q)],Q.body["offset".concat(q)],w["offset".concat(q)],w["client".concat(q)])}D([!0,!1],function(Q,q){D(["Width","Height"],function(w,O){var N="".concat(q?"outer":"inner").concat(O);U[N]=function($){if(!this[0])return;if(R(this[0]))return q?this[0]["inner".concat(O)]:this[0].document.documentElement["client".concat(O)];if(L(this[0]))return t1(this[0],O);return this[0]["".concat(q?"offset":"client").concat(O)]+($&&q?r(this[0],"margin".concat(w?"Top":"Left"))+r(this[0],"margin".concat(w?"Bottom":"Right")):0)}})}),D(["Width","Height"],function(Q,q){var w=q.toLowerCase();U[w]=function(O){if(!this[0])return P(O)?void 0:this;if(!arguments.length){if(R(this[0]))return this[0].document.documentElement["client".concat(q)];if(L(this[0]))return t1(this[0],q);return this[0].getBoundingClientRect()[w]-a(this[0],!Q)}var N=parseInt(O,10);return this.each(function($,y){if(!b(y))return;var n=c(y,"boxSizing");y.style[w]=r1(w,N+(n==="border-box"?a(y,!Q):0))})}});var e1="___cd";U.toggle=function(Q){return this.each(function(q,w){if(!b(w))return;var O=k0(w),N=P(Q)?O:Q;if(N){if(w.style.display=w[e1]||"",k0(w))w.style.display=F0(w.tagName)}else if(!O)w[e1]=c(w,"display"),w.style.display="none"})},U.hide=function(){return this.toggle(!1)},U.show=function(){return this.toggle(!0)};var J5="___ce",R1=".",P1={focus:"focusin",blur:"focusout"},Z5={mouseenter:"mouseover",mouseleave:"mouseout"},H4=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function E1(Q){return Z5[Q]||P1[Q]||Q}function T1(Q){var q=Q.split(R1);return[q[0],q.slice(1).sort()]}U.trigger=function(Q,q){if(S(Q)){var w=T1(Q),O=w[0],N=w[1],$=E1(O);if(!$)return this;var y=H4.test($)?"MouseEvents":"HTMLEvents";Q=J.createEvent(y),Q.initEvent($,!0,!0),Q.namespace=N.join(R1),Q.___ot=O}Q.___td=q;var n=Q.___ot in P1;return this.each(function(j0,G0){if(n&&_(G0[Q.___ot]))G0["___i".concat(Q.type)]=!0,G0[Q.___ot](),G0["___i".concat(Q.type)]=!1;G0.dispatchEvent(Q)})};function W5(Q){return Q[J5]=Q[J5]||{}}function G4(Q,q,w,O,N){var $=W5(Q);$[q]=$[q]||[],$[q].push([w,O,N]),Q.addEventListener(q,N)}function Q5(Q,q){return!q||!X0.call(q,function(w){return Q.indexOf(w)<0})}function n0(Q,q,w,O,N){var $=W5(Q);if(!q)for(q in $)n0(Q,q,w,O,N);else if($[q])$[q]=$[q].filter(function(y){var n=y[0],j0=y[1],G0=y[2];if(N&&G0.guid!==N.guid||!Q5(n,w)||O&&O!==j0)return!0;Q.removeEventListener(q,G0)})}U.off=function(Q,q,w){var O=this;if(P(Q))this.each(function($,y){if(!b(y)&&!L(y)&&!R(y))return;n0(y)});else if(!S(Q))for(var N in Q)this.off(N,Q[N]);else{if(_(q))w=q,q="";D(g(Q),function($,y){var n=T1(y),j0=n[0],G0=n[1],w0=E1(j0);O.each(function(S0,I0){if(!b(I0)&&!L(I0)&&!R(I0))return;n0(I0,w0,G0,q,w)})})}return this},U.remove=function(Q){return T0(this,Q).detach().off(),this},U.replaceWith=function(Q){return this.before(Q).remove()},U.replaceAll=function(Q){return F(Q).replaceWith(this),this};function q4(Q,q,w,O,N){var $=this;if(!S(Q)){for(var y in Q)this.on(y,q,w,Q[y],N);return this}if(!S(q))if(P(q)||k(q))q="";else if(P(w))w=q,q="";else O=w,w=q,q="";if(!_(O))O=w,w=void 0;if(!O)return this;return D(g(Q),function(n,j0){var G0=T1(j0),w0=G0[0],S0=G0[1],I0=E1(w0),a0=w0 in Z5,$1=w0 in P1;if(!I0)return;$.each(function(A1,M0){if(!b(M0)&&!L(M0)&&!R(M0))return;var S1=function(q0){if(q0.target["___i".concat(q0.type)])return q0.stopImmediatePropagation();if(q0.namespace&&!Q5(S0,q0.namespace.split(R1)))return;if(!q&&($1&&(q0.target!==M0||q0.___ot===I0)||a0&&q0.relatedTarget&&M0.contains(q0.relatedTarget)))return;var b1=M0;if(q){var f0=q0.target;while(!c1(f0,q)){if(f0===M0)return;if(f0=f0.parentNode,!f0)return}b1=f0}Object.defineProperty(q0,"currentTarget",{configurable:!0,get:function(){return b1}}),Object.defineProperty(q0,"delegateTarget",{configurable:!0,get:function(){return M0}}),Object.defineProperty(q0,"data",{configurable:!0,get:function(){return w}});var M4=O.call(b1,q0,q0.___td);if(N)n0(M0,I0,S0,q,S1);if(M4===!1)q0.preventDefault(),q0.stopPropagation()};S1.guid=O.guid=O.guid||F.guid++,G4(M0,I0,S0,q,S1)})}),this}U.on=q4;function B4(Q,q,w,O){return this.on(Q,q,w,O,!0)}U.one=B4;var z4=/\r?\n/g;function Y4(Q,q){return"&".concat(encodeURIComponent(Q),"=").concat(encodeURIComponent(q.replace(z4,"\r\n")))}var w4=/file|reset|submit|button|image/i,X5=/radio|checkbox/i;if(U.serialize=function(){var Q="";return this.each(function(q,w){D(w.elements||[w],function(O,N){if(N.disabled||!N.name||N.tagName==="FIELDSET"||w4.test(N.type)||X5.test(N.type)&&!N.checked)return;var $=o1(N);if(!P($)){var y=M($)?$:[$];D(y,function(n,j0){Q+=Y4(N.name,j0)})}})}),Q.slice(1)},typeof G5!=="undefined")q5.exports=F;else Z.cash=Z.$=F})()});class e0{pendingComponents=new Set;isPending=!1;callbacks=new Map;register(J,Z){this.callbacks.set(J,Z)}unregister(J){this.callbacks.delete(J)}queue(J){if(!this.callbacks.has(J))return;if(this.pendingComponents.add(J),!this.isPending)this.isPending=!0,this.schedule()}schedule(){Promise.resolve().then(()=>this.process())}process(){const J=Array.from(this.pendingComponents);this.pendingComponents.clear(),this.isPending=!1,J.forEach((Z)=>{try{const X=this.callbacks.get(Z);if(X)X()}catch(X){console.error(`Error updating component ${Z}:`,X)}})}clear(){this.pendingComponents.clear(),this.isPending=!1}dispose(){this.pendingComponents.clear(),this.callbacks.clear(),this.isPending=!1}}class J1{subscriptions=new Map;tick=new e0;register(J,Z){this.subscriptions.set(J,Z),this.tick.register(J,Z)}unregister(J){this.subscriptions.delete(J),this.tick.unregister(J)}queueUpdate(J){this.tick.queue(J)}dispose(){this.subscriptions.clear(),this.tick.dispose()}prepareForPotentialUnload(){this.tick.clear(),this.subscriptions.forEach((J,Z)=>{this.subscriptions.set(Z,()=>{})})}proxyState(J,Z){const X=this,H=new WeakMap,G=(B)=>{if(typeof B.toJSON==="function")return B;if(B instanceof Map)B.forEach((M,z)=>B.set(z,W(M)));else if(Array.isArray(B))B.forEach((M,z)=>B[z]=W(M));else if(typeof B==="object")Object.entries(B).forEach(([M,z])=>B[M]=W(z));let Y=new Proxy(B,{get(M,z){if(z==="toJSON")return function(){const K=(A)=>{if(!A||typeof A!=="object")return A;if(H.has(A)){const f=H.get(A);if(f instanceof Map){const p={};return f.forEach((X0,s)=>p[typeof s==="object"?JSON.stringify(s):String(s)]=K(X0)),p}if(Array.isArray(f))return f.map((p)=>K(p));const E={};return Object.entries(f).forEach(([p,X0])=>E[p]=K(X0)),E}if(typeof A.toJSON==="function"&&!H.has(A))return A.toJSON();return A};return K(Y)};if(z==="reset")return function(){Y=null};const j=M[z];if(B instanceof Map&&typeof j==="function")return function(...K){const A=z.toString();if(A==="set"&&K.length>=2)K[1]=W(K[1]);const f=j.apply(M,K);return["set","delete","clear"].includes(A)&&X.queueUpdate(J),f};if(Array.isArray(B)&&typeof j==="function")return function(...K){const A=z.toString();if(["push","unshift"].includes(A))K=K.map((E)=>W(E));else if(A==="splice"&&K.length>2)K=[K[0],K[1],...K.slice(2).map((E)=>W(E))];const f=j.apply(M,K);return["push","pop","shift","unshift","splice","sort","reverse","fill"].includes(A)&&X.queueUpdate(J),f};return j},set(M,z,j){if(M[z]===j)return!0;if(j instanceof Map&&M[z]instanceof Map){const K=M[z];return K.clear(),j.forEach((A,f)=>K.set(f,W(A))),X.queueUpdate(J),!0}return M[z]=W(j),X.queueUpdate(J),!0}});return H.set(Y,B),Y},W=(B)=>{if(!B)return B;return B instanceof Map||Array.isArray(B)||typeof B==="object"?G(B):B};return G(Z)}}class Z1{domObserver;observedComponents=new Map;TIMEOUT=1e4;constructor(){this.domObserver=new MutationObserver(()=>{this.observedComponents.forEach((J,Z)=>{try{const X=Z.node;if(!X){this.unwatch(Z);return}if(J.type==="attach"&&document.contains(X[0]))this.unwatch(Z),Z.emit("component:attached"),typeof Z.onAttach=="function"&&Z.onAttach.bind(Z)();else if(J.type==="detach"&&!document.contains(X[0]))this.unwatch(Z),Z.emit("component:detached"),typeof Z.onDetach=="function"&&Z.onDetach.bind(Z)()}catch(X){console.log("DWS error --",X)}}),!this.observedComponents.size&&this.domObserver.disconnect()})}watch(J,Z="attach"){const X=J.node;if(!X)return;if(Z==="attach"&&document.contains(X[0])){J.emit("component:attached"),typeof J.onAttach=="function"&&J.onAttach.bind(J)();return}if(Z==="detach"&&!document.contains(X[0])){J.emit("component:detached"),typeof J.onDetach=="function"&&J.onDetach.bind(J)();return}this.unwatch(J);const H=setTimeout(()=>{this.unwatch(J),J.emit(`component:${Z}ment-timeout`)},this.TIMEOUT);this.observedComponents.set(J,{timeout:H,type:Z}),this.observedComponents.size===1&&this.domObserver.observe(document.body,{childList:!0,subtree:!0}),Z==="attach"&&J.once("component:attached",()=>this.watch(J,"detach"))}unwatch(J){const Z=this.observedComponents.get(J);if(Z)clearTimeout(Z.timeout),this.observedComponents.delete(J);!this.observedComponents.size&&this.domObserver.disconnect()}dispose(){this.domObserver.disconnect(),this.observedComponents.forEach((J)=>clearTimeout(J.timeout)),this.observedComponents.clear()}}var W1=function(J,Z){if(!Z)return J;return J.replace(/{(\w+)}/g,(X,H)=>{return Z[H]!==void 0?Z[H].toString():`{${H}}`})},H5=(J,Z,X,H,G)=>{switch(J){case"plural":{if(typeof X==="string"){console.warn("Plural format value cannot be a string");return}if(H.count===void 0){console.warn("Plural format requires <count> parameter or use * by default.");let Y=X["*"];if(typeof Y==="object")Y=Y[G||"*"];return W1(Y,H)}if(typeof H.count==="string")H.count=Number(H.count);let W="*";if(H.count.toString()in X)W=H.count.toString();let B=X[W]||X["*"];if(typeof B==="object")B=B[G||"*"];return W1(B,H)}case"condition":{if(typeof X==="string"){console.warn("Condition format value cannot be a string");return}let W;for(let B in X)try{if(new Function("params",`with( params ){ return ${B}; }`)(H||{})){W=X[B];break}}catch(Y){console.warn(`Invalid <${Z}(${B})> condition expression`)}if(W===void 0)return;if(typeof W==="object")W=W[G||"*"];return W1(W,H)}case"variable":default:{const W=typeof X==="object"?X[G||"*"]:X;if(typeof W==="object"){console.warn(`Invalid <${Z}> variable variant definition`);return}return W1(W,H)}}};class Q1{currentLang=window.navigator.language;DICTIONARIES={};set lang(J){if(this.currentLang===J)return;this.currentLang=J}get lang(){return this.currentLang}setDictionary(J,Z){this.DICTIONARIES[J]=Z}translate(J,Z){if(Z&&this.currentLang===Z)return{text:J,lang:this.currentLang};Z=Z||this.currentLang;const[X,H]=Z.split("-");if(this.DICTIONARIES[X]&&J in this.DICTIONARIES[X]){if(typeof this.DICTIONARIES[X][J]==="object"){const G=this.DICTIONARIES[X][J];J=G[H||"*"]||G["*"]}else if(typeof this.DICTIONARIES[X][J]==="string")J=this.DICTIONARIES[X][J]}return{text:J,lang:Z}}format(J,Z,X){X=X||this.currentLang;const[H,G]=X.split("-");if(!this.DICTIONARIES[H]){console.warn(`Undefined <${X}> format dictionary`);return}if(!this.DICTIONARIES[H][J]){console.warn(`Undefined <${X}[${J}]> format reference`);return}const W=this.DICTIONARIES[H][J];if(typeof W==="string"){console.warn(`Invalid <${X}[${J}]> format reference. Expected object`);return}if(typeof W!=="object"||W===null||Array.isArray(W)){console.warn(`Invalid <${X}[${J}]> format value`);return}return H5(W.type,J,W.value,Z,G)}}var T5=t0(i0(),1);var X1="comm",H1="rule",G1="decl";var B5="@import";var z5="@namespace",Y5="@keyframes";var w5="@layer";function q1(J){return J.trim()}function h0(J,Z,X){return J.replace(Z,X)}function M5(J,Z,X){return J.indexOf(Z,X)}function C0(J,Z){return J.charCodeAt(Z)|0}function R0(J,Z,X){return J.slice(Z,X)}function z0(J){return J.length}function B1(J){return J.length}function _0(J,Z){return Z.push(J),J}var x1=Math.abs,c0=String.fromCharCode;function Y1(J,Z,X,H,G,W,B,Y){return{value:J,root:Z,parent:X,type:H,props:G,children:W,line:z1,column:y0,length:B,return:"",siblings:Y}}function K5(){return H0}function O5(){if(H0=K0>0?C0(u0,--K0):0,y0--,H0===10)y0=1,z1--;return H0}function O0(){if(H0=K0<U5?C0(u0,K0++):0,y0++,H0===10)y0=1,z1++;return H0}function P0(){return C0(u0,K0)}function p0(){return K0}function w1(J,Z){return R0(u0,J,Z)}function v0(J){switch(J){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function j5(J){return z1=y0=1,U5=z0(u0=J),K0=0,[]}function I5(J){return u0="",J}function M1(J){return q1(w1(K0-1,k1(J===91?J+2:J===40?J+1:J)))}function D5(J){while(H0=P0())if(H0<33)O0();else break;return v0(J)>2||v0(H0)>3?"":" "}function F5(J,Z){while(--Z&&O0())if(H0<48||H0>102||H0>57&&H0<65||H0>70&&H0<97)break;return w1(J,p0()+(Z<6&&P0()==32&&O0()==32))}function k1(J){while(O0())switch(H0){case J:return K0;case 34:case 39:if(J!==34&&J!==39)k1(H0);break;case 40:if(J===41)k1(J);break;case 92:O0();break}return K0}function L5(J,Z){while(O0())if(J+H0===57)break;else if(J+H0===84&&P0()===47)break;return"/*"+w1(Z,K0-1)+"*"+c0(J===47?J:O0())}function V5(J){while(!v0(P0()))O0();return w1(J,K0)}var z1=1,y0=1,U5=0,K0=0,H0=0,u0="";function R5(J){return I5(U1("",null,null,null,[""],J=j5(J),0,[0],J))}function U1(J,Z,X,H,G,W,B,Y,M){var z=0,j=0,K=B,A=0,f=0,E=0,p=1,X0=1,s=1,d=0,u="",o=G,l=W,J0=H,m=u;while(X0)switch(E=d,d=O0()){case 40:if(E!=108&&C0(m,K-1)==58){if(M5(m+=h0(M1(d),"&","&\f"),"&\f",x1(z?Y[z-1]:0))!=-1)s=-1;break}case 34:case 39:case 91:m+=M1(d);break;case 9:case 10:case 13:case 32:m+=D5(E);break;case 92:m+=F5(p0()-1,7);continue;case 47:switch(P0()){case 42:case 47:if(_0(F4(L5(O0(),p0()),Z,X,M),M),(v0(E||1)==5||v0(P0()||1)==5)&&z0(m)&&R0(m,-1,void 0)!==" ")m+=" ";break;default:m+="/"}break;case 123*p:Y[z++]=z0(m)*s;case 125*p:case 59:case 0:switch(d){case 0:case 125:X0=0;case 59+j:if(s==-1)m=h0(m,/\f/g,"");if(f>0&&(z0(m)-K||p===0&&E===47))_0(f>32?C5(m+";",H,X,K-1,M):C5(h0(m," ","")+";",H,X,K-2,M),M);break;case 59:m+=";";default:if(_0(J0=N5(m,Z,X,z,j,G,Y,u,o=[],l=[],K,W),W),d===123)if(j===0)U1(m,Z,J0,J0,o,W,K,Y,l);else{switch(A){case 99:if(C0(m,3)===110)break;case 108:if(C0(m,2)===97)break;default:j=0;case 100:case 109:case 115:}if(j)U1(J,J0,J0,H&&_0(N5(J,J0,J0,0,0,G,Y,u,G,o=[],K,l),l),G,l,K,Y,H?o:l);else U1(m,J0,J0,J0,[""],l,0,Y,l)}}z=j=f=0,p=s=1,u=m="",K=B;break;case 58:K=1+z0(m),f=E;default:if(p<1){if(d==123)--p;else if(d==125&&p++==0&&O5()==125)continue}switch(m+=c0(d),d*p){case 38:s=j>0?1:(m+="\f",-1);break;case 44:Y[z++]=(z0(m)-1)*s,s=1;break;case 64:if(P0()===45)m+=M1(O0());A=P0(),j=K=z0(u=m+=V5(p0())),d++;break;case 45:if(E===45&&z0(m)==2)p=0}}return W}function N5(J,Z,X,H,G,W,B,Y,M,z,j,K){var A=G-1,f=G===0?W:[""],E=B1(f);for(var p=0,X0=0,s=0;p<H;++p)for(var d=0,u=R0(J,A+1,A=x1(X0=B[p])),o=J;d<E;++d)if(o=q1(X0>0?f[d]+" "+u:h0(u,/&\f/g,f[d])))M[s++]=o;return Y1(J,Z,X,G===0?H1:Y,M,z,j,K)}function F4(J,Z,X,H){return Y1(J,Z,X,X1,c0(K5()),R0(J,2,-2),0,H)}function C5(J,Z,X,H,G){return Y1(J,Z,X,G1,R0(J,0,H),R0(J,H+1,-1),H,G)}function K1(J,Z){var X="";for(var H=0;H<J.length;H++)X+=Z(J[H],H,J,Z)||"";return X}function P5(J,Z,X,H){switch(J.type){case w5:if(J.children.length)break;case B5:case z5:case G1:return J.return=J.return||J.value;case X1:return"";case Y5:return J.return=J.value+"{"+K1(J.children,H)+"}";case H1:if(!z0(J.value=J.props.join(",")))return""}return z0(X=K1(J.children,H))?J.return=J.value+"{"+X+"}":""}function E5(J){var Z=B1(J);return function(X,H,G,W){var B="";for(var Y=0;Y<Z;Y++)B+=J[Y](X,H,G,W)||"";return B}}class m0{nsp;settings;$head;constructor(J,Z){if(typeof J!=="string")throw new Error("Undefined or invalid styles attachement element(s) namespace");this.nsp=J,this.$head=T5.default("head"),this.settings=Z||{},this.settings&&this.load(this.settings)}compile(J){try{return K1(R5(J),E5([P5]))}catch(Z){throw new Error(`Style compilation failed: ${Z.message}`)}}waitForStyles(J){return new Promise((Z)=>{const X=new MutationObserver(()=>{const H=document.querySelector(J);if(H&&getComputedStyle(H).cssText)X.disconnect(),Z()});X.observe(document.documentElement,{attributes:!0,childList:!0,subtree:!0})})}async inject(J){if(!J)throw new Error("Invalid injection arguments");const Z=`rel="${this.settings.meta?"@":""}${this.nsp}"`;J=this.settings.meta?J:`[rel="${this.nsp}"] { ${J} }`;try{const X=this.compile(J);if(!X)throw new Error(`<component:${this.nsp}> sheet compilation failed`);const H=document.createElement("style");H.setAttribute("rel",`${this.settings.meta?"@":""}${this.nsp}`),H.textContent=X;let G=0;const W=this.$head.find(`style[${Z}]`);if(W.length)G=parseInt(W.attr("dindex"))+1,W.remove();return H.setAttribute("dindex",String(G)),this.settings.meta?document.head.prepend(H):document.head.appendChild(H),H}catch(X){throw new Error(`Style injection failed: ${X.message}`)}}async load(J){if(this.settings=J,typeof this.settings!=="object")throw new Error("Undefined styles settings");if(this.settings.sheet){const Z=await this.inject(this.settings.sheet);await this.waitForStyles(`style[rel="${this.settings.meta?"@":""}${this.nsp}"]`)}}get(){}async clear(){const J=this.$head.find(`style[rel="${this.settings.meta?"@":""}${this.nsp}"]`);if(!J.length)return;const Z=parseInt(J.attr("dindex"));Z===0?J.remove():J.attr("dindex",String(Z-1))}async custom(){return{}}async style(){return{}}}class O1{pending=new Map;isPending=!1;component;metrics={batchCount:0,updatesProcessed:0,lastBatchSize:0,avgBatchSize:"0.00"};constructor(J){this.component=J}queue(J){const Z=J.priority??2;if(!this.pending.has(Z))this.pending.set(Z,new Set);if(this.pending.get(Z)?.add(J),this.component.metrics.inc("dependencyUpdateCount"),!this.isPending)this.isPending=!0,this.scheduleProcessing()}apply({dep:J,deppath:Z},X="batch-updator"){try{const H=this.component.FGUD.get(J)?.get(Z);if(!H){console.warn(`[batch update]: <${Z}> dependency not found`);return}if(H.garbage){this.component.FGUD.get(J)?.delete(Z),!this.component.FGUD.get(J)?.size&&this.component.FGUD.delete(J);return}const G=this.component.FGUDMemory.get(H.nodepath);if(!G)return;const W=H.update(G.memo||{},X);if(W){if(typeof W.memo==="object")G.memo=W.memo;typeof W.cleanup==="function"&&W.cleanup()}}catch(H){console.error("Failed to update dependency --",H)}}scheduleProcessing(){Promise.resolve().then(()=>this.processQueue())}processQueue(){const J=new Map;this.pending.forEach((H,G)=>J.set(G,new Set(H))),this.pending.clear(),this.isPending=!1;const Z=(H)=>{const G=Array.from(H);this.component.metrics.trackBatch(G.length),this.metrics.batchCount++,this.metrics.lastBatchSize=G.length,this.metrics.updatesProcessed+=G.length,this.metrics.avgBatchSize=(this.metrics.updatesProcessed/this.metrics.batchCount).toFixed(2),G.forEach((W)=>this.apply(W))},X=Array.from(J.keys()).sort((H,G)=>H-G);for(let H of X){const G=J.get(H);G&&G.size&&Z(G)}if(this.pending.size>0&&!this.isPending)this.isPending=!0,this.scheduleProcessing()}getMetrics(){return{batchCount:this.metrics.batchCount,lastBatchSize:this.metrics.lastBatchSize,avgBatchSize:this.metrics.avgBatchSize,totalUpdates:this.metrics.updatesProcessed}}}class j1{options={emit:!0};__events={};__once_events={};constructor(J){if(J)this.options=J}on(J,Z){if(!Array.isArray(this.__events[J]))this.__events[J]=[];return this.__events[J].push(Z),this}once(J,Z){if(!Array.isArray(this.__once_events[J]))this.__once_events[J]=[];return this.__once_events[J].push(Z),this}off(J){return delete this.__events[J],delete this.__once_events[J],this}emit(J,...Z){if(!this.options.emit)return;const X=(G)=>{if(typeof G.toJSON==="function")return G.toJSON();if(Array.isArray(G))return G.map(X);if(typeof G==="object")for(let W in G)G[W]=X(G[W]);return G},H=Z.map(X);this.__events[J]?.forEach((G)=>G(...H)),this.__once_events[J]?.forEach((G)=>G(...H)),delete this.__once_events[J]}}var f1=t0(i0(),1);function B0(J,Z){if(J===Z)return!1;if(typeof J!=="object"||typeof Z!=="object")return!1;if(J===null||Z===null)return!0;if(J instanceof Set){if(!(Z instanceof Set))return!0;if(J.size!==Z.size)return!0;if($5(J)&&$5(Z)){for(let B of J)if(!Z.has(B))return!0;return!1}const W=new WeakMap;for(let B of J){let Y=!1;if(typeof B!=="object"){if(Z.has(B))Y=!0}else for(let M of Z){if(typeof M!=="object")continue;if(!W.has(B))W.set(B,new WeakMap);const z=W.get(B);if(z.has(M)){if(Y=z.get(M),Y)break;continue}const j=!B0(B,M);if(z.set(M,j),j){Y=!0;break}}if(!Y)return!0}return!1}if(J instanceof Map){if(!(Z instanceof Map))return!0;if(J.size!==Z.size)return!0;if(A5(J)&&A5(Z)){for(let[B,Y]of J)if(Z.get(B)!==Y)return!0;return!1}const W=new WeakMap;for(let[B,Y]of J){if(typeof B!=="object"){if(!Z.has(B))return!0;const j=Z.get(B);if(typeof Y!=="object"){if(Y!==j)return!0;continue}if(typeof j!=="object"||B0(Y,j))return!0;continue}let M=!1,z=!1;for(let[j,K]of Z){if(typeof j!=="object")continue;if(!W.has(B))W.set(B,new WeakMap);const A=W.get(B);if(A.has(j)){const[f,E]=A.get(j);if(f){M=!0,z=E;break}continue}if(!B0(B,j)){if(M=!0,z=typeof Y==="object"&&typeof K==="object"?!B0(Y,K):Y===K,A.set(j,[!0,z]),z)break}else A.set(j,[!1,!1])}if(!M||!z)return!0}return!1}if(Array.isArray(J)){if(!Array.isArray(Z))return!0;if(J.length!==Z.length)return!0;for(let W=0;W<J.length;W++){const B=J[W],Y=Z[W];if(B!==Y&&(typeof B!=="object"||B0(B,Y)))return!0}return!1}const X=Object.keys(J),H=Object.keys(Z);if(X.length!==H.length)return!0;X.sort(),H.sort();const G=X.length;for(let W=0;W<G;W++)if(X[W]!==H[W])return!0;for(let W=0;W<G;W++){const B=X[W],Y=J[B],M=Z[B];if(Y===M)continue;if(Y instanceof Date){if(!(M instanceof Date)||String(Y)!==String(M))return!0;continue}if(Y instanceof RegExp){if(!(M instanceof RegExp)||Y.source!==M.source||Y.flags!==M.flags)return!0;continue}if(Y instanceof Map){if(!(M instanceof Map)||B0(Y,M))return!0;continue}if(Y instanceof Set){if(!(M instanceof Set)||B0(Y,M))return!0;continue}if(Y instanceof Function){if(!(M instanceof Function))return!0;continue}if(typeof Y==="object"){if(typeof M!=="object")return!0;if(Y===J){if(M!==Z)return!0}else if(B0(Y,M))return!0}else return!0}return!1}function Y0(J,Z){if(J===Z)return!0;if(J==null||Z==null)return J===Z;const X=typeof J;if(X!==typeof Z)return!1;if(X!=="object"){if(X==="number"&&isNaN(J)&&isNaN(Z))return!0;return!1}if(J instanceof Date)return Z instanceof Date&&J.getTime()===Z.getTime();if(J instanceof RegExp)return Z instanceof RegExp&&J.source===Z.source&&J.flags===Z.flags;if(J instanceof Error)return Z instanceof Error&&J.name===Z.name&&J.message===Z.message&&(J.stack===Z.stack||!J.stack&&!Z.stack);if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView(J)){if(!ArrayBuffer.isView(Z))return!1;if(J.byteLength!==Z.byteLength)return!1;const Y=new Uint8Array(J.buffer,J.byteOffset,J.byteLength),M=new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength);for(let z=0;z<Y.length;z++)if(Y[z]!==M[z])return!1;return!0}if(J instanceof Promise||J instanceof WeakMap||J instanceof WeakSet)return J===Z;if(typeof J==="function"){if(typeof Z!=="function")return!1;return J.toString()===Z.toString()&&J.name===Z.name}if(J.constructor!==Z.constructor)return!1;if(J instanceof Map||J instanceof Set||Array.isArray(J)||Object.getPrototypeOf(J)===Object.prototype)return!B0(J,Z);const G=Object.getPrototypeOf(J);if(G!==Object.getPrototypeOf(Z))return!1;const W=Object.getOwnPropertyNames(J),B=Object.getOwnPropertyNames(Z);if(W.length!==B.length)return!1;for(let Y of W){if(!Object.prototype.hasOwnProperty.call(Z,Y))return!1;if(!Y0(J[Y],Z[Y]))return!1}if(G!==null&&G!==Object.prototype){const Y=Object.getOwnPropertyNames(G),M=Object.getOwnPropertyNames(Object.getPrototypeOf(Z));if(Y.length!==M.length)return!1;for(let z of Y){if(z==="constructor")continue;if(!Y0(G[z],Object.getPrototypeOf(Z)[z]))return!1}}return!0}function $5(J){for(let Z of J)if(typeof Z==="object"&&Z!==null)return!1;return!0}function A5(J){for(let[Z,X]of J)if(typeof Z==="object"&&Z!==null||typeof X==="object"&&X!==null)return!1;return!0}function Q0(J,Z=new WeakMap){if(J===null||typeof J!=="object"||J instanceof Promise)return J;if(Z.has(J))return Z.get(J);if(J instanceof Date)return new Date(J.getTime());if(J instanceof RegExp)return new RegExp(J.source,J.flags);if(J instanceof Map){const G=new Map;return Z.set(J,G),J.forEach((W,B)=>G.set(Q0(B,Z),Q0(W,Z))),G}if(J instanceof Set){const G=new Set;return Z.set(J,G),J.forEach((W)=>G.add(Q0(W,Z))),G}if(Array.isArray(J)){const G=[];Z.set(J,G);for(let W=0;W<J.length;W++)G[W]=Q0(J[W],Z);return G}if(ArrayBuffer.isView(J))return new J.constructor(J);const X=Object.create(Object.getPrototypeOf(J));Z.set(J,X);const H=Object.getOwnPropertySymbols(J);for(let G of H)X[G]=Q0(J[G],Z);for(let G in J)if(Object.prototype.hasOwnProperty.call(J,G))X[G]=Q0(J[G],Z);return X}function _5(J,Z){if(!J||typeof J!=="object")throw new TypeError("Original argument must be an object");if(!Z||typeof Z!=="object")throw new TypeError("ToSet argument must be an object");if(!Object.keys(Z).length)return{...J};function X(G,W,B){const Y=W.split(/\.|\[|\]/).filter(Boolean);let M=G;for(let z=0;z<Y.length;z++){const j=Y[z],K=!isNaN(Number(j)),A=z===Y.length-1,f=!isNaN(Number(Y[z+1]));if(A){M[j]=B;continue}if(!(j in M))M[j]=f?[]:{};else if(f&&!Array.isArray(M[j]))M[j]=[];else if(!f&&Array.isArray(M[j]))M[j]={};M=M[j]}}const H=Q0(J);try{for(let[G,W]of Object.entries(Z)){if(typeof G!=="string")throw new TypeError(`Invalid path: ${G}`);if(!/^[a-zA-Z0-9_\-\[\].]+$/.test(G))throw new Error(`Invalid path format: ${G}`);X(H,G,W)}}catch(G){throw new Error(`Failed to assign value: ${G.message}`)}return H}function D1(J){return JSON.parse(JSON.stringify(J))}var A0="i18n",E0="syn:",D0="fn:",b0="on-",U0=/^\.\.\./,I1=/^\[(.*?)\]$/,h1=/{\s*([^{}]+)\s*}/g,S5=["@html","@text","@format"],b5=["display","visibility","position","width","height"],g5=":n",_1=":pr",x5="m",k5="c",f5="x",s0="*",h5=100;f1.default.fn.extend({attrs:function(){const J={},Z=this[0];return Z&&Z.nodeType!==Node.TEXT_NODE&&f1.default.each(Z.attributes,function(){J[this.name]=this.value}),J}});class F1{debug;initialStats={renderCount:0,elementCount:0,renderTime:0,avgRenderTime:0,maxRenderTime:0,componentCount:0,componentUpdateCount:0,partialCount:0,partialUpdateCount:0,memoryUsage:void 0,domOperations:0,domInsertsCount:0,domUpdatesCount:0,domRemovalsCount:0,i18nTrackCount:0,i18nUpdateCount:0,dependencyTrackCount:0,dependencyUpdateCount:0,batchSize:0,batchCount:0,errorCount:0};stats=this.reset();renderStartTime=0;renderTimes=[];measurementCount=0;maxMeasurements=100;loggingInterval=10;autoSaveInterval;constructor(J=!1){if(this.debug=J,this.debug)this.autoSaveInterval=window.setInterval(()=>this.storeMetrics(),5000)}storeMetrics(){try{const J=JSON.parse(localStorage.getItem("lipsPerformanceMetrics")||"[]");J.push({timestamp:Date.now(),metrics:{...this.stats}}),J.length>100&&J.shift(),localStorage.setItem("lipsPerformanceMetrics",JSON.stringify(J))}catch(J){}}startRender(){if(!this.debug)return;this.renderStartTime=performance.now()}endRender(){if(!this.debug||this.renderStartTime===0)return;const J=performance.now()-this.renderStartTime;this.stats.renderTime=J,this.stats.maxRenderTime=Math.max(this.stats.maxRenderTime,J),this.renderTimes.push(J),this.renderTimes.length>this.maxMeasurements&&this.renderTimes.shift(),this.stats.avgRenderTime=this.renderTimes.reduce((Z,X)=>Z+X,0)/this.renderTimes.length,this.renderStartTime=0,this.measurementCount++}inc(J){if(!this.debug)return;if(typeof this.stats[J]==="number")this.stats[J]++}dec(J){if(!this.debug)return;if(typeof this.stats[J]==="number"&&this.stats[J]>0)this.stats[J]--}record(J,Z){if(!this.debug)return;if(typeof this.stats[J]!=="undefined")this.stats[J]=Z}add(J,Z){if(!this.debug)return;if(typeof this.stats[J]==="number")this.stats[J]+=Z}reset(){return this.renderTimes=[],this.measurementCount=0,this.stats=Q0(this.initialStats)}log(){if(!this.debug)return;if(this.loggingInterval>1&&this.measurementCount%this.loggingInterval!==0)return;const J={"Render Count":this.stats.renderCount,"Element Count":this.stats.elementCount,"Avg Render Time (ms)":this.stats.avgRenderTime.toFixed(2),"Max Render Time (ms)":this.stats.maxRenderTime.toFixed(2)},Z={"Component Count":this.stats.componentCount,"Component Updates":this.stats.componentUpdateCount},X={"Partial Count":this.stats.partialCount,"Partial Updates":this.stats.partialUpdateCount},H={"DOM Operations":this.stats.domOperations,"DOM Inserts":this.stats.domInsertsCount,"DOM Updates":this.stats.domUpdatesCount,"DOM Removals":this.stats.domRemovalsCount},G={"i18n Tracked":this.stats.i18nTrackCount,"i18n Updates":this.stats.i18nUpdateCount},W={"Dependencies Tracked":this.stats.dependencyTrackCount,"Dependency Updates":this.stats.dependencyUpdateCount},B={"Batch Count":this.stats.batchCount,"Avg Batch Size":this.stats.batchCount>0?(this.stats.batchSize/this.stats.batchCount).toFixed(2):"0"};console.group("Lips Framework Performance Metrics"),console.table(J),console.table(Z),console.table(X),console.table(H),console.table(G),console.table(W),console.table(B),this.stats.memoryUsage&&console.log(`Memory Usage: ${this.stats.memoryUsage.toFixed(2)} MB`),this.stats.errorCount>0&&console.warn(`Errors encountered: ${this.stats.errorCount}`),console.groupEnd(),window.localStorage&&this.measurementCount%10===0&&this.storeMetrics()}trackMemory(){if(!this.debug||!window.performance?.memory)return;this.stats.memoryUsage=window.performance.memory.usedJSHeapSize/1048576}trackBatch(J){if(!this.debug)return;this.stats.batchCount++,this.stats.batchSize+=J}trackError(J){if(!this.debug)return;this.stats.errorCount++,console.error("Lips Framework Error:",J)}setLoggingInterval(J){if(!this.debug)return;this.loggingInterval=J}getSnapshot(){return Q0(this.stats)}dispose(){if(!this.debug)return;this.autoSaveInterval&&clearInterval(this.autoSaveInterval)}}var W0=t0(i0(),1);var L4=function(J){const Z=/on-([a-zA-Z-]+)\s*\(/g;let X=J,H;while((H=Z.exec(J))!==null){const G=H[1],W=H.index+H[0].length;let B=1,Y=W;while(Y<J.length&&B>0){if(J[Y]==="(")B++;if(J[Y]===")")B--;Y++}if(B===0){const M=J.slice(W,Y-1).trim(),z=J.slice(0,H.index),j=`${b0}${G}="${M}"`,K=J.slice(Y);X=z+j+K,J=X,Z.lastIndex=z.length+j.length}}return X},V4=function(J){const Z=[];let H=J.replace(/<([a-zA-Z][a-zA-Z0-9_-]*)((?:[^>'"]*|'[^']*'|"[^"]*")*?)(?:\/?>)/g,(G,W,B)=>{return Z.push(B),`<${W}##TAG_ATTRS_${Z.length-1}##>`});for(let G=0;G<Z.length;G++){const W=`##TAG_ATTRS_${G}##`,B=Z[G],Y=N4(B);H=H.replace(W,Y)}return H},N4=function(J){let Z="",X=0,H=!1,G="",W=0,B=0,Y=0;while(X<J.length){const M=J[X];if((M==='"'||M==="'")&&(X===0||J[X-1]!=="\\")){if(!H)H=!0,G=M;else if(M===G)H=!1}if(!H){if(M==="(")B++;else if(M===")")B--;else if(M==="{")Y++;else if(M==="}")Y--}if(!H&&B===0&&Y===0&&(M===" "||X===J.length-1)){let z=X;if(X===J.length-1)z=X+1;const j=J.substring(W,z).trim();if(j){const K=C4(j);Z+=" "+K}W=X+1}X++}return Z},C4=function(J){const Z=J.indexOf("=");if(Z===-1){if(J===A0||J.startsWith("...")||J.startsWith("["))return J;return`:${J}="${!J.startsWith("!")}"`}let X=J.substring(0,Z).trim(),H=J.substring(Z+1).trim();if(X.startsWith("@"))return X=!S5.includes(X)?X.slice(1):X,`:${X}=${H}`;if(X.startsWith(D0)||X.startsWith(b0))return J;if(H.startsWith('"')&&H.endsWith('"')||H.startsWith("'")&&H.endsWith("'")){const G=H.substring(1,H.length-1);if(R4(G))return`:${X}="${G}"`;return J}else return`:${X}="${H}"`};function R4(J){if(/\bstate\.|\binput\.|\bself\.|\bcontext\./.test(J))return!0;if(/[\+\*\/\%\(\)\{\}\[\]]|\?\s*:/.test(J))return!0;if(/\b[a-zA-Z_][a-zA-Z0-9_]*\.[a-zA-Z_]/.test(J))return!0;if(J.includes("{")&&J.includes("}"))return!0;return!1}function y1(J){let Z=(J||"").trim().replace(/>\s*</g,"><").replace(/\s{2,}/g," ").replace(/[\r\n\t]/g,"").replace(/<([a-zA-Z0-9_-]+)([^>]*?)\s*\/>/g,"<$1$2></$1>").replace(/<\{([^}]+)\}\s*(.*?)(\/)>/g,(X,H,G)=>{return G.endsWith("<")?`<lips dtag="${H}" ${G}/lips>`:`<lips dtag="${H}" ${G}></lips>`}).replace(/(<>)([\s\S]*?)(<\/>)/g,'<lips fragment="true">$2</lips>').replace(/<if\(\s*(.*?)\s*\)>/g,'<if @by="$1">').replace(/<else-if\(\s*(.*?)\s*\)>/g,'<else-if @by="$1">').replace(/<switch\(\s*(.*?)\s*\)>/g,'<switch @by="$1">').replace(/<async await\(\s*(.*?)\s*\)>/g,`<async ${D0}await="\$1">`).replace(/<log\(\s*(.*?)\s*\)>/g,'<log @args="$1">').replace(/\[(.*?)\]/g,(X)=>X.replace(/\s+/g,""));return Z=L4(Z),Z=V4(Z),Z}var P4=function(J,Z){if(J.isDisposed)return;Z.add(J),J.dependencies.add(Z)},v5=function(J){for(let Z of J.dependencies)Z.delete(J);J.dependencies.clear()};function g0(J,Z={maxSize:100}){const X=new Set,H=[{value:J,timestamp:Date.now()}];let G=0;const W=()=>{const z=L1[L1.length-1];return z&&P4(z,X),H[G].value},B=()=>{const z=[...X];if(y5)for(let j of z)y5.add(j);else for(let j of z)j.execute()};return[W,(z,j)=>{if(Object.is(H[G].value,z))return;if(G<H.length-1)H.splice(G+1);if(H.push({value:z,timestamp:Date.now(),metadata:j}),H.length>Z.maxSize)H.shift(),G=Math.max(0,G-1);else G++;B()},{undo(){if(G>0)G--,B()},redo(){if(G<H.length-1)G++,B()},jumpTo(z){if(z>=0&&z<H.length&&z!==G)G=z,B()},getHistory(){return[...H]},getCurrentIndex(){return G},canUndo(){return G>0},canRedo(){return G<H.length-1},clear(){const z=H[0];H.length=0,H.push(z),G=0,B()}}]}function o0(J){let Z=!1;const X=()=>{if(Z)throw new Error("Circular dependency detected");if(H.isDisposed)return;Z=!0,v5(H),L1.push(H);try{J()}finally{Z=!1,L1.pop()}},H={execute:X,dependencies:new Set,isDisposed:!1};return X(),{dispose:()=>{H.isDisposed=!0,v5(H)}}}var L1=[],y5=null;class x0 extends j1{declaration;$=null;input;state;static;context;__name__;__path__;__lang__;__template__;__previous;__macros=new Map;__i18nDeps=new Map;FGUD=new Map;FGUDMemory=new Map;PCC=new Map;VER=[];prepath="0";debug=!1;isRendered=!1;__setInput;__setState;__getState;UQS;ICE;lips;metrics;stylesheet;__inpath__="";__inpathCounter__=0;__renderDepth__=0;__boundaries__;constructor(J,Z,{input:X,state:H,context:G,_static:W,handler:B,stylesheet:Y,macros:M,declaration:z},j){super();if(this.lips=j.lips,j?.debug)this.debug=j.debug||this.lips.debug;if(j?.prepath)this.prepath=j.prepath;if(this.__name__=J,this.__lang__=this.lips.i18n.lang,this.__path__=this.__inpath__=`${this.prepath}:${this.__name__}`,this.__template__=y1(Z),this.__boundaries__=j.boundaries,this.declaration=z||{name:J},this.input=X||{},this.static=W||{},this.context={},this.state=this.lips.IUC.proxyState(this.__path__,H||{}),M&&this.setMacros(M),B&&this.setHandler(B),Y&&this.setStylesheet(Y),this.metrics=new F1(this.debug),this.metrics.inc("componentCount"),this.UQS=new O1(this),typeof this.onCreate=="function"&&this.onCreate.bind(this)(),this.emit("component:create"),this.input&&Object.keys(this.input).length&&typeof this.onInput=="function")this.onInput.bind(this)(),this.emit("component:input");this.__previous={state:Q0(this.state),input:Q0(this.input),context:Q0(this.context)};const[K,A]=g0(this.input),[f,E]=g0(this.state),[p,X0]=g0(this.context);this.__setInput=A,this.__setState=E,this.__getState=f,this.lips.IUC.register(this.__path__,()=>{B0(this.__previous?.state,this.state)&&this.__setState({...this.__getState(),...this.state})}),Array.isArray(G)&&G.length&&this.lips.useContext(G,(s)=>{if(!B0(this.context,s))return;X0(s),this.context=s,typeof this.onContext=="function"&&this.onContext.bind(this)(),this.emit("component:context")}),this.lips.useTranslator("*",(s)=>{if(s===this.__lang__)return;this.__updateI18nDepNodes__(),this.__lang__=s}),this.ICE=o0(()=>{const s=f(),d=this.input=K(),u=this.context=p();if(!this.isRendered){if(this.metrics.reset(),!this.__template__.length||z?.syntax&&typeof this.onSelfRender=="function"){const o=this.onSelfRender.bind(this)(this.input);if(!this.__boundaries__?.start||!this.__boundaries__?.end)throw new Error(`Undefined <${this.__name__} syntax component boundaries`);this.$=o||W0.default()}else{const{$log:o}=this.render("",void 0,void 0,this.FGUD);this.$=o}!z?.syntax&&this.$?.each((o,l)=>{typeof l.setAttribute=="function"&&l.setAttribute("rel",this.__name__)}),this.isRendered=!0,typeof this.onMount=="function"&&this.onMount.bind(this)(),this.emit("component:mount"),this.lips.watcher.watch(this)}else this.__updateDepNodes__(),typeof this.onUpdate=="function"&&this.onUpdate.bind(this)(),this.emit("component:update"),this.__previous={input:Q0(d),state:Q0(s),context:Q0(u)};typeof this.onRender=="function"&&this.onRender.bind(this)(),this.emit("component:render")})}setContext(J,Z){this.lips.setContext(J,Z)}setInput(J,Z){if(!B0(this.input,J))return;this.__setInput(J),typeof this.onInput=="function"&&this.onInput.bind(this)(this.declaration.syntax?Z:void 0)}subInput(J,Z){if(typeof J!=="object")throw new Error("Invalid sub input data argument");return this.setInput(_5(this.input,J),this.declaration.syntax?Z:void 0),this}setMacros(J){const Z=y1(J),X=W0.default(Z);if(!X.length)return;const H=this;X.each(function(){const G=W0.default(this),{argv:W,attrs:B}=H.__getAttributes__(G);if(!Object.keys(B))throw new Error("Invalid macro component definition");if(!B.literals.name)throw new Error("Undefined macro `name` attribute.");if(H.__macros.get(B.literals.name))console.warn(`Duplicate macro <${B.literals.name}> will be override`);if(!G.contents()?.length)throw new Error("Invalid macro component definition. Template content expected.");H.__macros.set(B.literals.name,{argv:W,$node:G})})}setHandler(J){Object.entries(J).map(([Z,X])=>this[Z]=X?.bind(this))}setStylesheet(J){const Z={sheet:J,meta:this.__name__==="__ROOT__"};this.stylesheet=new m0(this.__name__,Z)}get node(){if(!this.isRendered)throw new Error("node() is expected to be call after component get rendered");return this.$}get boundaries(){return this.__boundaries__}render(J,Z,X={},H,G){if(Z&&!Z.length)return console.warn("Undefined node element to render"),{$log:Z,dependencies:H||new Map};const W=this,B=H||new Map,Y=[];this.metrics.startRender();let M=W0.default();function z(){return Q0(X)}function j(U,F=!1){const I=K(U,F);return W.__inpathCounter__++,W.__inpath__?`${W.__inpath__}/${I}`:`${J?J+"/":""}${I}`}function K(U,F=!1){let I="";switch(U){case"component":I=F?f5:k5;break;case"macro":I=x5;break}return I+W.__inpathCounter__}function A(U){return U!==null&&typeof U==="object"&&typeof U.mesh==="function"&&typeof U.update==="function"}function f(U){return U!==null&&typeof U==="object"&&typeof U.default&&typeof U.default==="string"}function E(U){if(!U.attr(":dtag")||U.prop("tagName")!=="LIPS")throw new Error("Invalid dynamic tag name");const F=U.attr(":dtag"),I=W.__evaluate__(F,X);if(A(I)||I===null)return d(U,F,I);else if(f(I))return u(U,{template:I});else return u(U,{name:I})}function p(U){const F=U.attr(":args"),I=j("log");if(!F)return;const R=z();if(W.__evaluate__(`console.log(${F})`,R),W.__isReactive__(F,R))W.__extractExpressionDeps__(F,R).forEach((C)=>W.__trackDep__(B,C,R,{nodetype:"log",nodepath:I,target:"argument",$fragment:null,update:(b)=>W.__evaluate__(`console.log(${F})`,b),syntax:!0}))}function X0(U){const F=j("var"),{attrs:I}=W.__getAttributes__(U);if(!I)return;Object.entries(I.literals).forEach(([R,L])=>{if(X[R]&&X[R].type==="const")throw new Error(`Cannot override <const ${R}=[value]/> variable`);X[R]={value:L,type:"let"}}),Object.entries(I.expressions).forEach(([R,L])=>{if(X[R]&&X[R].type==="const")throw new Error(`Cannot override <const ${R}=[value]/> variable`);if(X[R]={value:W.__evaluate__(L,X),type:"let"},W.__isReactive__(L,X)){const C=W.__extractExpressionDeps__(L,X),b=(v,i)=>{if(v[R]&&v[R].type==="const")throw new Error(`Cannot override <const ${R}=[value]/> variable`);if(I.map.beforeSpreadAttrs.includes(R))return;const _=W.__evaluate__(L,v);if(Y0(v[R].value,_))return;return v[R]={value:_,type:"let"},W.__updateVarDepNodes__(R,F,v),D1({memo:v})};C.forEach((v)=>W.__trackDep__(B,v,z(),{nodetype:"let",nodepath:F,deppath:`${F}.${R}`,target:"attr",$fragment:null,update:b,syntax:!0}))}}),W.metrics.inc("elementCount")}function s(U){const{attrs:F}=W.__getAttributes__(U);if(!F)return;Object.entries(F.literals).forEach(([I,R])=>{if(X[I]&&X[I].type==="const")throw new Error(`<const ${I}=[value]/> variable already defined`);if(!R)return;X[I]={value:R,type:"const"}}),Object.entries(F.expressions).forEach(([I,R])=>{if(X[I]&&X[I].type==="const")throw new Error(`<const ${I}=[value]/> variable already defined`);if(!R)return;X[I]={value:W.__evaluate__(R,X),type:"const"}}),W.metrics.inc("elementCount")}function d(U,F,I){const{attrs:R}=W.__getAttributes__(U),L=j("element"),C=W.__getBoundaries__(L),b={},v={};let i=z(),_=W0.default(C.start),S={},P=I;if(P){R.literals&&Object.entries(R.literals).forEach(([T,h])=>{b[T]=h,S[T]={type:"arg",value:h}}),R.expressions&&Object.entries(R.expressions).forEach(([T,h])=>{if(!P)return;if(U0.test(T))W.__evaluateSpreadAttr__(T,{memo:i,get keystore(){return v[T]},set keystore(D){if(!v[T])v[T]=[];v[T]=D},each:(D,x)=>{if(b[D]=x,!P?.argv.includes(D))return;S[D]={type:"arg",value:x}}});else{const D=h?W.__evaluate__(h,i):!0;if(b[T]=D,!P.argv.includes(T))return;S[T]={type:"arg",value:D}}}),i.__arguments__=b;const k=P.mesh(S);if(k&&k.length)_=_.add(k);R.expressions&&Object.entries(R.expressions).forEach(([T,h])=>{if(!P)return;if(U0.test(T)&&W.__isReactive__(T,i)){const D=W.__extractExpressionDeps__(T,i),x=(V,g)=>{if(!P)return;const e={};let t=[];if(W.__evaluateSpreadAttr__(T,{memo:V,get keystore(){return v[T]},set keystore(c){if(!v[T])v[T]=[];v[T]=c},each:(c,r)=>{if(R.map.afterSpreadAttrs.includes(c))return;if(!P?.argv.includes(c))return;if(Y0(r,V[c]?.value))return;S[c]=e[c]={value:r,type:"arg"},b[c]=r,t.push(c)},nullify:(c)=>{c.forEach((r)=>{e[r]={value:void 0,type:"arg"},delete b[r]}),t=c}}),t.length)P.argv.length&&W.__updateArgumentsDepNodes__(L,b),P.update(t,e,V,C)};D.forEach((V)=>W.__trackDep__(B,V,i,{nodetype:"dynamic",nodepath:L,deppath:`${L}.${T}`,target:"spread-attr",$fragment:null,boundaries:C,update:x}))}else if(P.argv.includes(T)&&W.__isReactive__(h,i)){const D=W.__extractExpressionDeps__(h,i),x=(V,g)=>{if(!P)return;if(R.map.beforeSpreadAttrs.includes(T))return;const e=h?W.__evaluate__(h,V):!0,t={type:"arg",value:e};if(S[T]=t,P.argv.length)b[T]=e,W.__updateArgumentsDepNodes__(L,b);P.update([T],{[T]:t},V,C)};D.forEach((V)=>W.__trackDep__(B,V,i,{nodetype:"dynamic",nodepath:L,deppath:`${L}.${T}`,target:"attr",$fragment:null,boundaries:C,update:x}))}})}if(W.__isReactive__(F,i)){const k=(h,D)=>{const x=W.__evaluate__(F,h);let V;if(f(x))V=u(U,{template:x}),W.__fillBoundaries__(V,C);else if(A(x)){if(Object.entries(S).forEach(([g,e])=>{if(typeof e==="function")return;b[g]=e.value}),P?.cleanup(C),P=x,P)P.argv.length&&W.__updateArgumentsDepNodes__(L,b),V=P.mesh(S),V?.length&&P.fill(V,C)}else if(P)P.cleanup(C),P=null};W.__extractExpressionDeps__(F,i).forEach((h)=>W.__trackDep__(B,h,{...i,...S},{nodetype:"dynamic",nodepath:L,deppath:`${L}.dtag`,target:"dtag",$fragment:null,boundaries:C,update:k}))}return _=_.add(C.end),_}function u(U,F){let I,R;if(F?.template)I=F.template,R=K("component",I.declaration?.syntax);else{if(R=F?.name||U.prop("tagName")?.toLowerCase(),!R)throw new Error("Invalid component");if(R===W.__name__)throw new Error("Render component within itself is forbidden");I=W.lips.import(R)}if(!I||!R)throw new Error(`<${R}> template not found`);const L=j("component",I.declaration?.syntax),C=W.__getBoundaries__(L),{argv:b,functions:v,attrs:i,events:_}=W.__getAttributes__(U),S={},P={};let k={},T=W0.default(C.start),h=W.PCC.get(L),D=z();i.literals&&Object.entries(i.literals).forEach(([V,g])=>{if(V=="key")return;k[V]=g}),v&&Object.entries(v).forEach(([V,g])=>{k[V]=W.__evaluateFunction__(g,[],D),I.declaration?.syntax?S[E0+D0+V]=g:S[D0+V]=g}),i.expressions&&Object.entries(i.expressions).forEach(([V,g])=>{if(V=="key")return;if(U0.test(V))W.__evaluateSpreadAttr__(V,{memo:D,get keystore(){return P[V]},set keystore(e){if(!P[V])P[V]=[];P[V]=e},each:(e,t)=>k[e]=t});else k[V]=g?W.__evaluate__(g,D):!0;I.declaration?.syntax?S[E0+V]=g:S[V]=g});const x=U.contents();if(x.length){if(k={...k,...W.__meshwire__({$node:U,fragmentPath:L,fragmentBoundaries:C,meshPath:null,scope:D,argv:b,xmlns:G,useAttributes:!0,declaration:I.declaration},S)},I.declaration){if(I.declaration.tags){let V;Object.entries(I.declaration?.tags).forEach(([g,{type:e,many:t,alts:c}])=>{switch(e){case"nexted":{let r=U.next(g);if(!r.length&&Array.isArray(c)&&V?.length&&V.is(c.join(",")))r=V.next(g);if(!r.length)return;if(t){k[g]=[];let a=0,Z0=!1;while(!Z0){if(k[g].push(W.__meshwire__({$node:r,meshPath:`${g}[${a}]`,fragmentPath:L,fragmentBoundaries:C,scope:D,argv:b,xmlns:G,useAttributes:!0,declaration:I.declaration},S)),!r.next(g).length){Z0=!0;break}r=V=r.next(g),a++}}else k[g]=W.__meshwire__({$node:r,meshPath:g,fragmentPath:L,fragmentBoundaries:C,scope:D,argv:b,xmlns:G,useAttributes:!0,declaration:I.declaration},S)}break;case"child":{const r=U.children(g);if(t)k[g]=[],r.each(function(a){const Z0=W0.default(this),{argv:F0}=W.__getAttributes__(Z0);k[g].push(W.__meshwire__({$node:Z0,meshPath:`${g}[${a}]`,fragmentPath:L,fragmentBoundaries:C,scope:D,argv:F0,xmlns:G,useAttributes:!0,declaration:I.declaration},S))});else if(U.children(g).first().length){const a=U.children(g).first(),{argv:Z0}=W.__getAttributes__(a);k[g]=W.__meshwire__({$node:a,meshPath:g,fragmentPath:L,fragmentBoundaries:C,scope:D,argv:Z0,xmlns:G,useAttributes:!0,declaration:I.declaration},S)}}break}})}else if(I.declaration.contents)k.__contents__=x}}if(h)h.setInput(Q0(k)),T=T.add(h.node);else{const{declaration:V,state:g,_static:e,handler:t,context:c,default:r,stylesheet:a}=I;h=new x0(R,r||"",{state:Q0(g),input:Q0(k),context:c,_static:Q0(e),handler:t,stylesheet:a,declaration:V},{debug:W.debug,lips:W.lips,prepath:L,boundaries:C}),T=T.add(h.node),!I.declaration?.syntax&&W.PCC.set(L,h)}return T=T.add(C.end),Object.entries(_).forEach(([V,g])=>{W.__attachEvent__({nodepath:L,element:h,_event:V,instruction:g,scope:D,get __dependencies__(){return B}})}),S&&Object.entries(S).forEach(([V,g])=>{let e=!1,t=!1;if(V.startsWith(E0))e=!0,V=V.replace(E0,"");if(V.startsWith(D0))t=!0,V=V.replace(D0,"");if(U0.test(V)){if(W.__isReactive__(V,D)){const c=(a)=>{const Z0={};W.__evaluateSpreadAttr__(V,{memo:a,get keystore(){return P[V]},set keystore(F0){if(!P[V])P[V]=[];P[V]=F0},each:(F0,k0)=>{if(i.map.afterSpreadAttrs.includes(F0))return;Z0[F0]=k0},nullify:(F0)=>F0.forEach((k0)=>Z0[k0]=void 0)}),h?.subInput(Z0,a)};W.__extractExpressionDeps__(V,D).forEach((a)=>W.__trackDep__(B,a,D,{nodetype:"component",nodepath:L,deppath:`${L}.${V}`,target:"spread-attr",$fragment:null,boundaries:C,update:c,syntax:e}))}}else if(W.__isReactive__(g,D)){const c=(a)=>{if(i.map.beforeSpreadAttrs.includes(V))return;const Z0=t?W.__evaluateFunction__(g,[],a):g?W.__evaluate__(g,a):!0;h?.subInput({[V]:Z0},a)};W.__extractExpressionDeps__(g,D).forEach((a)=>W.__trackDep__(B,a,D,{nodetype:"component",nodepath:L,deppath:`${L}.${V}`,target:"attr",$fragment:null,boundaries:C,update:c,syntax:e}))}}),W.metrics.inc("componentCount"),T}function o(U){const F=U.prop("tagName")?.toLowerCase();if(!F)throw new Error("Invalid macro rendering call");const I=W.__macros.get(F);if(!I)throw new Error("Macro component not found");const R=j("macro"),L=W.__getBoundaries__(R),{attrs:C}=W.__getAttributes__(U),b={},v=z(),i={},_={};C.literals&&Object.entries(C.literals).forEach(([D,x])=>{i[D]=x,_[D]={value:x,type:"arg"}});const S={};C.expressions&&Object.entries(C.expressions).forEach(([D,x])=>{if(U0.test(D))W.__evaluateSpreadAttr__(D,{memo:v,get keystore(){return S[D]},set keystore(V){if(!S[D])S[D]=[];S[D]=V},each:(V,g)=>{if(i[V]=g,I.argv.includes(V))_[V]={value:g,type:"arg"}}}),b[D]=x;else{const V=x?W.__evaluate__(x,v):!0;if(i[D]=V,I.argv.includes(D))_[D]={value:V,type:"arg"},b[D]=x}I.argv.forEach((V)=>{if(_[V]!==void 0)return;_[V]={value:!1,type:"arg"}})}),_.__arguments__=i;let P=W0.default(L.start);const k={$node:I.$node,meshPath:null,fragmentPath:R,fragmentBoundaries:L,argv:I.argv,scope:v,xmlns:G,useAttributes:!0},T=W.__meshwire__(k,b),h=T.renderer.mesh(_,v);return P=P.add(h),b&&Object.entries(b).forEach(([D,x])=>{let V=!1;if(new RegExp(`^${E0}`).test(D))V=!0,D=D.replace(E0,"");if(U0.test(D)){if(!W.__isReactive__(D,v))return;const g=W.__extractExpressionDeps__(D,v),e=(t)=>{const c={};let r=[];if(W.__evaluateSpreadAttr__(D,{memo:t,get keystore(){return S[D]},set keystore(a){if(!S[D])S[D]=[];S[D]=a},each:(a,Z0)=>{if(C.map.afterSpreadAttrs.includes(a))return;if(Y0(Z0,t[a]?.value))return;c[a]={value:Z0,type:"arg"},i[a]=Z0,r.push(a)},nullify:(a)=>{a.forEach((Z0)=>{c[Z0]={value:void 0,type:"arg"},delete i[Z0]}),r=a}}),r.length)W.__updateArgumentsDepNodes__(R,i),T.renderer.update(r,c,t);return D1({memo:{...t,...c}})};g.forEach((t)=>W.__trackDep__(B,t,{...v,..._},{nodetype:"macro",nodepath:R,deppath:`${R}.${D}`,target:"spread-attr",$fragment:null,boundaries:L,update:e,syntax:V}))}else if(W.__isReactive__(x,v)){const g=W.__extractExpressionDeps__(x,v),e=(t)=>{if(C.map.beforeSpreadAttrs.includes(D))return;const c=x?W.__evaluate__(x,t):!0;return i[D]=c,W.__updateArgumentsDepNodes__(R,i),T.renderer.update([D],{[D]:{value:c,type:"arg"}},t),D1({memo:t})};g.forEach((t)=>W.__trackDep__(B,t,{...v,..._},{nodetype:"macro",nodepath:R,deppath:`${R}.${D}`,target:"attr",$fragment:null,boundaries:L,update:e,syntax:V}))}}),P=P.add(L.end),W.metrics.inc("elementCount"),P}function l(U){if(!U.length||!U.prop("tagName"))return U;const F=U.is("svg")||G,I=F?W0.default(document.createElementNS("http://www.w3.org/2000/svg",U.prop("tagName").toLowerCase())):W0.default(`<${U.prop("tagName").toLowerCase()}/>`),R=U.contents(),L=j("element"),C=z();R.length&&I.append(W.__withPath__(L,()=>W.render(L+g5,R,C,B,F).$log));const{attrs:b,events:v}=W.__getAttributes__(U);b.literals&&Object.entries(b.literals).forEach(([_,S])=>{if(_===A0)return;const P=U.is(`[${A0}]`)&&["title","placeholder"].includes(_);I.attr(_,P?W.lips.i18n.translate(S).text:S);const k=(T)=>{I.attr(_,P?W.lips.i18n.translate(S).text:S),P&&W.__trackTranslationDep__(T,{nodetype:"element",nodepath:L,deppath:`${L}.${_}`,target:"attr",$fragment:I,update:k})};P&&W.__trackTranslationDep__(C,{nodetype:"element",nodepath:L,deppath:`${L}.${_}`,target:"attr",$fragment:I,update:k})});const i=(_,S=!1)=>{_&&Object.entries(_).forEach(([P,k])=>{switch(P){case"@html":{const T=(h)=>{I.html(W.__evaluate__(k,h))};if(T(C),S&&W.__isReactive__(k,C))W.__extractExpressionDeps__(k,C).forEach((D)=>W.__trackDep__(B,D,C,{nodetype:"element",nodepath:L,deppath:`${L}.${P}`,target:"meta-attr",$fragment:I,update:T}))}break;case"@text":{const T=U.is(`[${A0}]`),h=(D)=>{I.text(W.__evaluate__(k,D,{translate:T})),T&&W.__trackTranslationDep__(D,{nodetype:"element",nodepath:L,deppath:`${L}.${P}`,target:"meta-attr",$fragment:I,update:h})};if(h(C),S&&W.__isReactive__(k,C))W.__extractExpressionDeps__(k,C).forEach((x)=>W.__trackDep__(B,x,C,{nodetype:"element",nodepath:L,deppath:`${L}.${P}`,target:"meta-attr",$fragment:I,update:h}));T&&W.__trackTranslationDep__(C,{nodetype:"element",nodepath:L,deppath:`${L}.${P}`,target:"meta-attr",$fragment:I,update:h})}break;case"@format":{const[T,h]=k.split(",").map((x)=>x.trim());if(!T)throw new Error("Invalid @format reference");if(!h)throw new Error("Invalid @format parameters");const D=(x)=>{const V=W.__evaluate__(`!${h.trim()}`,x);if(typeof V!=="object")throw new Error("Invalid @format parameters");const g=W.lips.i18n.format(T,V);g!==void 0&&I.text(g),W.__trackTranslationDep__(x,{nodetype:"element",nodepath:L,deppath:`${L}.${P}`,target:"meta-attr",$fragment:I,update:D})};D(C),W.__extractExpressionDeps__(h,C).forEach((x)=>W.__trackDep__(B,x,C,{nodetype:"element",nodepath:L,deppath:`${L}.${P}`,target:"meta-attr",$fragment:I,update:D}))}break;case"style":if(S&&W.__isReactive__(k,C)){const T=(D)=>{const x=W.__evaluate__(k,D);if(typeof x==="object"){let V="";Object.entries(x).forEach(([g,e])=>V+=`${g}:${e};`),V.length&&I.attr("style",V)}else I.attr("style",x)};T(C),W.__extractExpressionDeps__(k,C).forEach((D)=>W.__trackDep__(B,D,C,{nodetype:"element",nodepath:L,deppath:`${L}.${P}`,target:"attr",$fragment:I,update:T}))}else I.attr("style",k);break;default:{const T=U.is(`[${A0}]`)&&["title","placeholder"].includes(P),h=(D)=>{const x=k&&W.__isReactive__(k,C)?W.__evaluate__(k,D,{translate:T}):k!==void 0?k:!0;if(x===void 0||x===!1)I.removeAttr(P);else I.attr(P,x),T&&W.__trackTranslationDep__(D,{nodetype:"element",nodepath:L,deppath:`${L}.${P}`,target:"attr",$fragment:I,update:h})};if(h(C),S&&W.__isReactive__(k,C))W.__extractExpressionDeps__(k,C).forEach((x)=>W.__trackDep__(B,x,C,{nodetype:"element",nodepath:L,deppath:`${L}.${P}`,target:"attr",$fragment:I,update:h}));T&&W.__trackTranslationDep__(C,{nodetype:"element",nodepath:L,deppath:`${L}.${P}`,target:"attr",$fragment:I,update:h})}}})};return b.expressions&&Object.keys(b.expressions).forEach((_)=>{if(!U0.test(_))return;let S=[];const P=(k,T,h=!1)=>{const D={};W.__evaluateSpreadAttr__(_,{memo:k,get keystore(){return S},set keystore(x){S=x},each:(x,V)=>{if(!h&&b.map.afterSpreadAttrs.includes(x))return;D[x]=V},nullify:(x)=>x.forEach((V)=>I.removeAttr(V))}),Object.keys(D).length&&i(D)};if(delete b.expressions[_],P(C,"",!0),_&&W.__isReactive__(_,C))W.__extractExpressionDeps__(_,C).forEach((T)=>W.__trackDep__(B,T,C,{nodetype:"element",nodepath:L,deppath:`${L}.${_}`,target:"spread-attr",$fragment:I,update:P}))}),i(b.expressions,!0),v&&Object.entries(v).forEach(([_,S])=>{Y.push({nodepath:L,element:I,_event:_,instruction:S,scope:C,get __dependencies__(){return B}})}),W.metrics.inc("elementCount"),W.metrics.inc("domInsertsCount"),I}function J0(U){const F=U.text(),I=z(),R=j("element"),L=U.parent().is(`[${A0}]`),C=W0.default(document.createTextNode(W.__interpolate__(F,I,L))),b=(v)=>{const i=W.__interpolate__(F,v,L);if(!C[0])return;C[0].textContent=i,L&&W.__trackTranslationDep__(v,{nodetype:"text",nodepath:R,target:"value",$fragment:C,update:b})};if(F&&W.__isReactive__(F,I))W.__extractTextDeps__(F,I).forEach((i)=>W.__trackDep__(B,i,I,{nodetype:"text",nodepath:R,deppath:`${R}.${i}`,target:"value",$fragment:C,update:b}));return L&&W.__trackTranslationDep__(I,{nodetype:"text",nodepath:R,target:"value",$fragment:C,update:b}),W.metrics.inc("elementCount"),W.metrics.inc("domInsertsCount"),C}function m(U){if(U.get(0)?.nodeType===Node.COMMENT_NODE)return U;if(U.get(0)?.nodeType===Node.TEXT_NODE)return J0(U);if(U.is("let"))return X0(U);else if(U.is("const"))return s(U);else if(U.is("lips")&&U.attr(":dtag"))return E(U);else if(U.is("log"))return p(U);else if(W.__macros.has(U.prop("tagName")?.toLowerCase()))return o(U);else if(U.is("if, for, switch, async")||W.lips.has(U.prop("tagName")?.toLowerCase()))return u(U);else if(U.is("else-if, else"))return;return l(U)}try{this.__renderDepth__++,Z=!Z&&W0.default(this.__template__).length>1?W0.default("<template>").html(this.__template__).contents():Z||W0.default(this.__template__),Z.each(function(){const U=m(W0.default(this));if(U)M=M.add(U)}),Y.forEach(this.__attachEvent__.bind(this)),W.metrics.inc("renderCount")}catch(U){console.error("Rendering Failed --",U),W.metrics.trackError(U)}finally{if(this.__renderDepth__--,this.metrics.endRender(),this.metrics.trackMemory(),this.__renderDepth__===0)this.__inpath__="",this.__inpathCounter__=0}return{$log:M,dependencies:B,events:Y}}destroy(){this.ICE.dispose(),this.stylesheet?.clear(),this.metrics.dispose(),this.lips.IUC.unregister(this.__path__),this.lips.watcher.unwatch(this),this.VER.forEach(this.__detachEvent__.bind(this)),this.VER=[];for(let J in this.PCC){const Z=this.PCC.get(J);Z?.destroy(),Z?.delete(J)}if(this.$?.remove(),this.PCC?.clear(),this.FGUD?.clear(),this.FGUDMemory?.clear(),this.__macros.clear(),this.__i18nDeps.clear(),this.__previous=null,this.state=null,this.input=null,this.context=null,this.$)this.$.each((J,Z)=>{W0.default(Z).off()}),this.$=null;typeof this.onDestroy==="function"&&this.onDestroy.bind(this)(),this.emit("component:destroy")}__meshwire__(J,Z){const X=this,{$node:H,meshPath:G,fragmentPath:W,fragmentBoundaries:B,argv:Y,xmlns:M,declaration:z,useAttributes:j}=J;let K;const A=new Map,f=W+_1,E=(d,u,o)=>{if(K=H.contents(),!K?.length)return null;u=u||J.scope;const l=f+(o||""),{$log:J0,dependencies:m,events:U}=X.__withPath__(l,()=>{return X.render(l,K,{...u,...d},void 0,M)}),F=o||s0;return!A.has(F)&&A.set(F,new Set),A.get(F)?.add(l),m?.forEach((I,R)=>{!X.FGUD?.has(R)&&X.FGUD.set(R,new Map),I.forEach((L,C)=>{if(L.garbage)return;L.partial?.length?L.partial.push(l):L.partial=[l],X.FGUD.get(R)?.set(C,L)})}),X.metrics.inc("partialCount"),J0},p=(d,u,o,l,J0)=>{if(!A.get(J0||s0)?.size)return;o=o||J.scope,l=l||B,X.metrics.startRender();const m=Array.from(A.get(J0||s0)||[]);d.forEach((U)=>{const F=X.FGUD.get(U);if(!F)return;F.forEach((I)=>{const R=m.find((b)=>{return I.partial?.find((v)=>b==v||X.__hasSamePathParent__(v,b))});if(!I.partial||!R)return;const L=I.deppath||I.nodepath,C=this.FGUDMemory.get(I.nodepath);if(I.garbage||l?.start&&!document.contains(l.start)){F.delete(L),X.__unbindMemo__(I);return}if(!C){console.warn(`unexpected occurence: <${L}> has no memo`);return}if(C.memo?.[U]&&u?.[U]&&!Y0(C.memo[U],u[U]))C.memo={...o,...C.memo,...u};X.UQS.queue({dep:U,deppath:L,priority:I.priority}),X.metrics.inc("dependencyUpdateCount")}),!F.size&&X.FGUD.delete(U)}),X.metrics.inc("partialUpdateCount"),X.metrics.endRender()},X0=(d,u)=>{if(X.FGUD.forEach((o,l)=>{o.forEach((J0,m)=>{if(!X.__hasSamePathParent__(m,f+(u||"")))return;X.__unbindMemo__(J0),J0.garbage=!0}),!o.size&&X.FGUD.delete(l)}),A.delete(typeof u==="string"&&u||s0),d=d||B,X.__emptyBoundaries__(d),u)d.start.remove(),d.end.remove()},s={renderer:{path:G,argv:Y,mesh:E,update:p,cleanup:X0,fill(d,u){X.__fillBoundaries__(d,u||B)},demarcate(d,u){const o=X.__getBoundaries__(f+(u||""));let l=W0.default(o.start);return l=l.add(d),l=l.add(o.end),{$partial:l,boundaries:o}}}};if(j&&G){const{attrs:d}=X.__getAttributes__(H);d.literals&&Object.entries(d.literals).forEach(([u,o])=>s[u]=o),d.expressions&&Object.entries(d.expressions).forEach(([u,o])=>{if(U0.test(u)){let l=[];X.__evaluateSpreadAttr__(u,{memo:J.scope,get keystore(){return l},set keystore(J0){l=J0},each:(J0,m)=>s[J0]=m}),Z[`${z?.syntax?E0:""}${G}.${u}`]=o}else s[u]=o?X.__evaluate__(o,J.scope):!0,Z[`${z?.syntax?E0:""}${G}.${u}`]=o})}return s}__getBoundaries__(J){return this.metrics.inc("domOperations"),this.metrics.inc("domInsertsCount"),{start:document.createComment(`s:${J}`),end:document.createComment(`e:${J}`)}}__emptyBoundaries__(J){const Z=[];let X=J.start.nextSibling;while(X&&X!==J.end)Z.push(X),X=X.nextSibling;W0.default(Z).remove()}__fillBoundaries__(J,Z){if(!document.contains(Z.start)||!document.contains(Z.end)){console.warn("Dynamic element boundaries not found");return}this.__emptyBoundaries__(Z),J.length&&W0.default(Z.start).after(J)}__getAttributes__(J){const Z=J.attrs(),X={},H={},G={literals:{},expressions:{},map:{explicitAttrs:[],spreadAttrs:[],beforeSpreadAttrs:[],afterSpreadAttrs:[],metaAttrs:[]}},W=Object.keys(Z).find((M)=>U0.test(M));let B=[],Y=!1;return Z&&Object.entries(Z).forEach(([M,z])=>{if(M==":dtag")return;if(M.startsWith(":")||M.startsWith(D0)||M.startsWith(b0)||U0.test(M)||I1.test(M))if(I1.test(M)){const[j,K]=M.match(I1)||[];B=K.split(",")}else if(M.startsWith(b0))X[M.replace(b0,"")]=z;else if(M.startsWith(D0))H[M.replace(D0,"")]=z;else{if(M.startsWith(":"))M=M.slice(1,M.length);if(W)if(U0.test(M))G.map.spreadAttrs.push(M),Y=!0;else G.map.explicitAttrs.push(M),!Y?G.map.beforeSpreadAttrs.push(M):G.map.afterSpreadAttrs.push(M);G.expressions[M]=z||""}else if(G.literals[M]=z,W)G.map.explicitAttrs.push(M),!Y?G.map.beforeSpreadAttrs.push(M):G.map.afterSpreadAttrs.push(M)}),{argv:B,events:X,functions:H,attrs:G}}__withPath__(J,Z){const X=this.__inpath__;this.__inpath__=J;const H=Z();return this.__inpath__=X,H}__getPathParent__(J){const Z=J.split("/");if(Z.length>1)Z.pop();return Z.join("/")}__hasSamePathParent__(J,Z){return J.startsWith(Z)&&!J.replace(Z,"").startsWith(".")||J.startsWith(`${Z+_1}`)}__evaluate__(J,Z,X){J=typeof J==="string"?J.trim():J;try{const H=(G)=>{const W=this.state.toJSON(),B=(M,...z)=>{try{return M(...z)}catch(j){!X?.mute&&console.error("Eval error --",j);return}};let Y=`return ${G};`;if(Z){let M={},z;for(let K in Z){if(K==="__arguments__")continue;M[K]=Z[K].value}if(typeof Z.__arguments__==="object")z=Z.__arguments__;Y=`with( scope ){ ${Y} }`;const j=new Function("self","input","state","static","context","scope","arguments",Y);return B(j,this,this.input,W,this.static,this.context,M||{},z)}else{const M=new Function("self","input","state","static","context",Y);return B(M,this,this.input,W,this.static,this.context)}};if(/{\s*([^{}]+)\s*}/.test(J)){if(J.startsWith("!{")&&J.endsWith("}"))return H(J.slice(1));return J.replace(h1,(G,W)=>H(W))}return H(J)}catch(H){!X?.mute&&console.error("Expression evaluation error --",H);return}}__evaluateFunction__(J,Z,X){if(/(\s*\w+|\s*\([^)]*\)|\s*)\s*=>\s*(\s*\{[^}]*\}|\s*[^\n;"]+)/g.test(J))return this.__evaluate__(J,X)(...Z);else{let[H,...G]=J.split(/\s*,\s*/),W;const B=this.__evaluate__(H,X,{mute:!0});if(typeof B==="function")W=B;else{if(typeof this[H]!=="function")throw new Error(`Undefined <${H}> handler method`);W=this[H].bind(this)}if(typeof W!=="function")throw new Error(`Expected <${H}> to be a function or handler method`);let Y=G.map((M)=>this.__evaluate__(M,X));if(Z.length)Y=[...Y,...Z];return W(...Y)}}__evaluateSpreadAttr__(J,Z){const X=this.__evaluate__(J.replace(U0,""),Z.memo);if(!X){if(!Z.keystore.length)throw new Error(`Undefined spread operator ${J}`);typeof Z.nullify==="function"&&Z.nullify(Z.keystore);return}if(typeof X!=="object"||Array.isArray(X))throw new Error(`Invalid spread operator ${J}`);if(Z.keystore=Object.keys(X)||[],typeof Z.each==="function")for(let H in X)Z.each(H,X[H])}__interpolate__(J,Z,X){if(J=J.replace(h1,(H,G)=>this.__evaluate__(G,Z)),X)J=this.lips.i18n.translate(J).text;return J}__attachEvent__(J){const{element:Z,nodepath:X,_event:H,instruction:G,scope:W,__dependencies__:B}=J;let Y=W;if(Z.on(H,(...M)=>this.__evaluateFunction__(G,M,Y)),this.VER.push(J),this.metrics.inc("domUpdatesCount"),this.metrics.inc("domRemovalsCount"),this.__isReactive__(G,W))this.__extractExpressionDeps__(G,W).forEach((z)=>this.__trackDep__(B,z,W||{},{nodetype:"event",nodepath:X,deppath:`${X}.${H}`,target:"event-handler",$fragment:!(Z instanceof x0)?Z:null,boundaries:Z instanceof x0?Z.__boundaries__:void 0,update:(j)=>{Y=j}}))}__detachEvent__({element:J,nodepath:Z,_event:X,instruction:H,scope:G,__dependencies__:W}){if(J.off(X),this.__isReactive__(H,G)){const B=this.__extractExpressionDeps__(H,G),Y=`${Z}.${X}`;B.forEach((M)=>{W.get(M)?.delete(Y),this.FGUD.get(M)?.delete(Y)})}this.metrics.inc("domOperations"),this.metrics.inc("domRemovalsCount")}__extractTextDeps__(J,Z){const X=new Set;return(J.match(/{\s*([^{}]+)\s*}/g)||[]).forEach((G)=>{const W=G.replace(/[{}]/g,"").trim();this.__extractExpressionDeps__(W,Z).forEach((Y)=>X.add(Y))}),Array.from(X)}__extractExpressionDeps__(J,Z){const X=/\b(state|input|context|arguments)(?:\.[a-zA-Z_]\w*)+(?=\[|\.|$|\s|;|,|\))/g,H=/\b(self)(?:\.[a-zA-Z_]\w*)+(?=\()/g,G=/\b(arguments)((?:\.[a-zA-Z_]\w*)+)?(?=\[|\.|$|\s|;|,|\))/g;let W=[...Array.from(J.matchAll(X)),...Array.from(J.matchAll(H)),...Array.from(J.matchAll(G))];if(Z&&Object.keys(Z).length){const B=new RegExp(`\\b(?<!\\.)(${Object.keys(Z).join("|")})`,"g"),Y=new RegExp(`(?:(?<=\\.\\.\\.))(${Object.keys(Z).join("|")})\\b`,"g");W=[...W,...Array.from(J.matchAll(B)),...Array.from(J.matchAll(Y))]}return[...new Set(W.map((B)=>B[0]))]}__isReactive__(J,Z){if(/(self|state|input|context|arguments)(\.[\w.]+)?/.test(J))return!0;if(Z&&Object.keys(Z).length&&new RegExp(Object.keys(Z).join("|")).test(J))return!0;return!1}__bindMemo__(J,Z){const X=Z.deppath||Z.nodepath,H=this.FGUDMemory.get(Z.nodepath);if(H)H.tracks.set(X,Z.priority||2),H.memo=J,this.FGUDMemory.set(Z.nodepath,H);else{const G=new Map;G.set(X,Z.priority),this.FGUDMemory.set(Z.nodepath,{tracks:G,memo:J})}}__unbindMemo__(J){const Z=J.deppath||J.nodepath,X=this.FGUDMemory.get(J.nodepath);if(!X||!X.tracks.get(Z))return;X.tracks.delete(Z),!X.tracks.size&&this.FGUDMemory.delete(J.nodepath)}__trackDep__(J,Z,X,H){if(X&&X[Z]&&X[Z].type==="let")H.haslet=!0;if(H.priority===void 0)if(H.target==="attr"&&Z.split(".").find((W)=>b5.includes(W)))H.priority=0;else if(H.syntax)H.priority=1;else if(["event"].includes(H.nodetype))H.priority=3;else H.priority=2;const G=H.deppath||H.nodepath;H.level=G.split(/\//g).length,H.priority=H.level*h5+H.priority,!J.has(Z)&&J.set(Z,new Map),J.get(Z)?.set(G,H),this.__bindMemo__(X,H),this.metrics.inc("dependencyTrackCount")}__trackTranslationDep__(J,Z){this.__i18nDeps.set(Z.deppath||Z.nodepath,Z),this.__bindMemo__(J,Z),this.metrics.inc("i18nTrackCount")}__valueDep__(J,Z){return Z.reduce((X,H)=>X?.[H],J)}__shouldUpdate__(J,Z){if(J==="self")return!0;const X={state:this.state,input:this.input,context:this.context},H=this.__valueDep__(this.__previous[J],Z),G=this.__valueDep__(X[J],Z);return!Y0(H,G)}__updateDepNodes__(){if(!this.FGUD?.size)return;this.metrics.inc("componentUpdateCount"),this.metrics.startRender(),this.FGUD.forEach((J,Z)=>{const[X,...H]=Z.split(".");if(!this.__shouldUpdate__(X,H))return;J.forEach((G)=>{try{const W=G.deppath||G.nodepath;if(G.garbage||G.boundaries?.start&&!document.contains(G.boundaries.start)||G.$fragment!==null&&!G.$fragment.closest("body").length){J.delete(W),this.__unbindMemo__(G);return}this.UQS.queue({dep:Z,deppath:W,priority:G.priority}),this.metrics.inc("dependencyUpdateCount")}catch(W){console.error("failed to update dependency nodes --",W);return}}),!J.size&&this.FGUD?.delete(Z)}),this.metrics.endRender()}__updateVarDepNodes__(J,Z,X){if(!this.FGUD?.size)return;this.metrics.inc("partialUpdateCount"),this.metrics.startRender(),this.FGUD.get(J)?.forEach((H,G)=>{if(!H.haslet||!this.__hasSamePathParent__(G,this.__getPathParent__(Z)))return;const W=H.deppath||H.nodepath,B=this.FGUDMemory.get(H.nodepath);if(!B){console.warn(`unexpected occurence: <${W}> has no memo`);return}B.memo={...B.memo,...X},this.UQS.queue({dep:J,deppath:W,priority:H.priority}),this.metrics.inc("dependencyUpdateCount")}),this.metrics.endRender()}__updateArgumentsDepNodes__(J,Z){if(!this.FGUD?.size)return;this.metrics.inc("partialUpdateCount"),this.metrics.startRender();const X="arguments";this.FGUD.get(X)?.forEach((H,G)=>{if(!this.__hasSamePathParent__(G,J))return;const W=H.deppath||H.nodepath,B=this.FGUDMemory.get(H.nodepath);if(!B){console.warn(`unexpected occurence: <${W}> has no memo`);return}B.memo.__arguments__=Z,this.UQS.queue({dep:X,deppath:W,priority:H.priority}),this.metrics.inc("dependencyUpdateCount")}),this.metrics.endRender()}__updateI18nDepNodes__(){if(!this.__i18nDeps?.size)return;this.metrics.inc("i18nUpdateCount"),this.metrics.startRender(),this.__i18nDeps?.forEach((J,Z)=>{if(!J.$fragment.closest("body").length){this.__i18nDeps.delete(Z);return}const X=this.FGUDMemory.get(J.nodepath);if(!X){console.warn(`unexpected occurence: <${J.deppath||J.nodepath}> has no memo`);return}J.update(X.memo,"i18n-partial-updator"),this.metrics.inc("dependencyUpdateCount")}),this.metrics.endRender()}appendTo(J){return(typeof J=="string"?W0.default(J):J).append(this.node),this.metrics.inc("domOperations"),this}prependTo(J){return typeof J=="string"?W0.default(J):J.prepend(this.node),this.metrics.inc("domOperations"),this}replaceWith(J){return(typeof J=="string"?W0.default(J):J).replaceWith(this.node),this.metrics.inc("domOperations"),this}}var v1={};d0(v1,{handler:()=>{{return $4}},declaration:()=>{{return E4}},_static:()=>{{return T4}}});var E4={name:"if",syntax:!0,tags:{"else-if":{type:"nexted",many:!0,optional:!0},else:{type:"nexted",alts:["else-if"],optional:!0}}},T4={initialized:!1,prevRenderer:null},$4={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,X=!1){if(!J.renderer)return;if(J.by){this.static.prevRenderer?.cleanup();const H=J.renderer.mesh({},Z);if(this.static.prevRenderer=J.renderer,!H?.length)return;if(X)return H;J.renderer.fill(H)}else{this.static.prevRenderer?.cleanup();let H=!1,G;if(Array.isArray(J["else-if"])&&J["else-if"].length)for(let W of J["else-if"]){if(!W.by)continue;if(G=W.renderer.mesh({},Z),this.static.prevRenderer=W.renderer,!G?.length)return;if(X)return G;G?.length&&W.renderer.fill(G),H=!0;break}if(!H&&J.else){const W=J.else.renderer.mesh({},Z);if(this.static.prevRenderer=J.else.renderer,!W?.length)return;if(X)return W;J.else.renderer.fill(W)}}}};var u1={};d0(u1,{handler:()=>{{return b4}},declaration:()=>{{return A4}},_static:()=>{{return S4}}});var V0=t0(i0(),1);var A4={name:"for",syntax:!0},S4={lastIn:null,argvlist:null,initialized:!1,prevRenderer:null,processingBatch:!1},b4={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,X=!1){if(this.static.processingBatch)return;if(!J.renderer)throw new Error("Undefined mesh renderer");let{in:H,from:G,to:W}=J;if(H===void 0&&G===void 0)throw new Error("Invalid <for> arguments");this.static.processingBatch=!0;try{if(G!==void 0)return this.asFromTo(J.renderer,G,W,Z,X);else if(Array.isArray(H))return this.asArray(J.renderer,H,Z,X);else if(H instanceof Map)return this.asMap(J.renderer,H,Z,X);else if(typeof H=="object")return this.asObject(J.renderer,H,Z,X)}finally{this.static.processingBatch=!1}},addItem(J,Z,X,H){if(!this.static.argvlist)this.static.argvlist=[];const G=`[${H}]`,W=J.mesh(X,Z,G);if(!W)return;const{boundaries:B,$partial:Y}=J.demarcate(W,G);return this.static.prevRenderer=J,this.static.argvlist.push({argvalues:X,boundaries:B}),Y},updateItem(J,Z,X,H){if(!this.static.argvlist?.[H])return;this.static.argvlist[H].argvalues=X,J.update(Object.keys(X),X,Z,this.static.argvlist[H].boundaries,`[${H}]`)},removeItem(J,Z){if(!this.static.argvlist?.[Z])return;J.cleanup(this.static.argvlist[Z].boundaries,`[${Z}]`),this.static.argvlist.splice(Z,1)},asFromTo(J,Z,X,H,G){if(Z=parseFloat(String(Z)),X==null)throw new Error("Expected <from> <to> attributes of the for loop to be defined");X=parseFloat(String(X));const W=Z<X,B=Math.abs(X-Z)+1;if(Array.isArray(this.static.argvlist)){const[M]=J.argv;if(M){let z=Z;if(this.static.argvlist.length===B){for(let K=0;K<this.static.argvlist.length;K++)this.static.argvlist[K].argvalues[M].value!==z&&this.updateItem(J,H,{[M]:{value:z,type:"arg"}},K),z=W?z+1:z-1;return}const j=Math.min(this.static.argvlist.length,B);for(let K=0;K<j;K++)this.updateItem(J,H,{[M]:{value:K,type:"arg"}},K);if(B>this.static.argvlist.length)for(let K=this.static.argvlist.length;K<B;K++){const A={[M]:{value:K,type:"arg"}};this.boundaries&&V0.default(this.boundaries.end).before(this.addItem(J,H,A,K))}else if(B<this.static.argvlist.length)for(let K=this.static.argvlist.length-1;K>=B;K--)this.removeItem(J,K)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let Y=V0.default();for(let M=Z;W?M<=X:M>=X;W?M++:M--){const z={},[j]=J.argv;if(j)z[j]={value:M,type:"arg"};Y=Y.add(this.addItem(J,H,z,M))}if(!Y?.length)return;if(G)return Y;J.fill(Y)},asArray(J,Z,X,H){if(this.static.argvlist&&this.static.lastIn&&Z===this.static.lastIn)return;if(!Z.length){if(!this.static.lastIn)console.warn("For loop with empty initial rendering <in> attribute array value will not update")}if(this.static.lastIn=Z,Array.isArray(this.static.argvlist)){const[B,Y]=J.argv;if(B){if(this.static.argvlist.length===Z.length){for(let z=0;z<this.static.argvlist.length;z++)!Y0(this.static.argvlist[z].argvalues[B].value,Z[z])&&this.updateItem(J,X,{[B]:{value:Z[z],type:"arg"},[Y]:{value:z,type:"arg"}},z);return}const M=Math.min(this.static.argvlist.length,Z.length);for(let z=0;z<M;z++)this.updateItem(J,X,{[B]:{value:Z[z],type:"arg"},[Y]:{value:z,type:"arg"}},z);if(Z.length>this.static.argvlist.length)for(let z=this.static.argvlist.length;z<Z.length;z++){const j={[B]:{value:Z[z],type:"arg"},[Y]:{value:z,type:"arg"}};this.boundaries&&V0.default(this.boundaries.end).before(this.addItem(J,X,j,z))}else if(Z.length<this.static.argvlist.length)for(let z=this.static.argvlist.length-1;z>=Z.length;z--)this.removeItem(J,z)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let G=V0.default(),W=0;for(let B of Z){const Y={},[M,z]=J.argv;if(M)Y[M]={value:B,type:"arg"};if(z)Y[z]={value:W,type:"arg"};G=G.add(this.addItem(J,X,Y,W)),W++}if(!G?.length)return;if(H)return G;J.fill(G)},asMap(J,Z,X,H){if(this.static.argvlist&&this.static.lastIn&&Z===this.static.lastIn)return;if(!Z.size){if(!this.static.lastIn)console.warn("For loop with empty initial rendering <in> attribute map value will not update")}if(this.static.lastIn=Z,Array.isArray(this.static.argvlist)){const[B,Y,M]=J.argv,z=Array.from(Z.entries());if(B){if(this.static.argvlist.length===z.length){for(let K=0;K<this.static.argvlist.length;K++)!Y0(this.static.argvlist[K].argvalues[B].value,z[K][0])||!Y0(this.static.argvlist[K].argvalues[Y].value,z[K][1])&&this.updateItem(J,X,{[B]:{value:z[K][0],type:"arg"},[Y]:{value:z[K][1],type:"arg"},[M]:{value:K,type:"arg"}},K);return}const j=Math.min(this.static.argvlist.length,z.length);for(let K=0;K<j;K++)this.updateItem(J,X,{[B]:{value:z[K][0],type:"arg"},[Y]:{value:z[K][1],type:"arg"},[M]:{value:K,type:"arg"}},K);if(z.length>this.static.argvlist.length)for(let K=this.static.argvlist.length;K<z.length;K++){const A={[B]:{value:z[K][0],type:"arg"},[Y]:{value:z[K][1],type:"arg"},[M]:{value:K,type:"arg"}};this.boundaries&&V0.default(this.boundaries.end).before(this.addItem(J,X,A,K))}else if(z.length<this.static.argvlist.length)for(let K=this.static.argvlist.length-1;K>=z.length;K--)this.removeItem(J,K)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let G=V0.default(),W=0;for(let[B,Y]of Z){const M={},[z,j,K]=J.argv;if(z)M[z]={value:B,type:"arg"};if(j)M[j]={value:Y,type:"arg"};if(K)M[K]={value:W,type:"arg"};G=G.add(this.addItem(J,X,M,W)),W++}if(!G?.length)return;if(H)return G;J.fill(G)},asObject(J,Z,X,H){if(this.static.argvlist&&this.static.lastIn&&Z===this.static.lastIn)return;if(!Object.keys(Z).length){if(!this.static.lastIn)console.warn("For loop with empty initial rendering <in> attribute object value will not update")}if(this.static.lastIn=Z,Array.isArray(this.static.argvlist)){const[B,Y,M]=J.argv,z=Object.entries(Z);if(B){if(this.static.argvlist.length===z.length){for(let K=0;K<this.static.argvlist.length;K++)!Y0(this.static.argvlist[K].argvalues[B].value,z[K][0])||!Y0(this.static.argvlist[K].argvalues[Y].value,z[K][1])&&this.updateItem(J,X,{[B]:{value:z[K][0],type:"arg"},[Y]:{value:z[K][1],type:"arg"},[M]:{value:K,type:"arg"}},K);return}const j=Math.min(this.static.argvlist.length,z.length);for(let K=0;K<j;K++)this.updateItem(J,X,{[B]:{value:z[K][0],type:"arg"},[Y]:{value:z[K][1],type:"arg"},[M]:{value:K,type:"arg"}},K);if(z.length>this.static.argvlist.length){let K=V0.default();for(let A=this.static.argvlist.length;A<z.length;A++){const f={[B]:{value:z[A][0],type:"arg"},[Y]:{value:z[A][1],type:"arg"},[M]:{value:A,type:"arg"}},E=this.addItem(J,X,f,A);K=K.add(E)}this.boundaries&&V0.default(this.boundaries.end).before(K)}else if(z.length<this.static.argvlist.length)for(let K=this.static.argvlist.length-1;K>=z.length;K--)this.removeItem(J,K)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let G=V0.default(),W=0;for(let B in Z){const Y={},[M,z,j]=J.argv;if(M)Y[M]={value:B,type:"arg"};if(z)Y[z]={value:Z[B],type:"arg"};if(j)Y[j]={value:W,type:"arg"};G=G.add(this.addItem(J,X,Y,W)),W++}if(!G?.length)return;if(H)return G;J.fill(G)},onDestroy(){this.static.prevRenderer?.cleanup(void 0,!0),this.static.prevRenderer=null,this.static.argvlist=null,this.static.lastIn=null}};var m1={};d0(m1,{handler:()=>{{return k4}},declaration:()=>{{return g4}},_static:()=>{{return x4}}});var g4={name:"async",syntax:!0,tags:{then:{type:"child"},catch:{type:"child",optional:!0},loading:{type:"child",optional:!0}}},x4={initialized:!1,finalized:!1,prevRenderer:null},k4={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,X=!1){if(!J.await)throw new Error("Undefined async <await> attribute");if(!(J.await instanceof Promise))throw new Error("Expected async <await> attribute value to be a function");if(this.static.finalized=!1,J.loading){this.static.prevRenderer?.cleanup();const H=J.loading.renderer.mesh({},Z);if(this.static.prevRenderer=J.loading.renderer,this.execute(J,Z,!0),this.static.finalized)return;if(!H?.length)return;if(X)return H;J.loading.renderer.fill(H)}else this.execute(J,Z)},execute(J,Z,X=!1){J.await.then((H)=>{if(this.static.prevRenderer?.cleanup(),!J.then)return;const[G]=J.then.renderer.argv,W={[G]:{value:H,type:"arg"}},B=J.then.renderer.mesh(W,Z);if(this.static.prevRenderer=J.then.renderer,!B?.length)return;if(!X)return B;J.then.renderer.fill(B)}).catch((H)=>{if(this.static.prevRenderer?.cleanup(),!J.catch)return;const[G]=J.catch.renderer.argv,W={[G]:{value:H,type:"arg"}},B=J.catch.renderer.mesh(W,Z);if(this.static.prevRenderer=J.catch.renderer,!B?.length)return;if(!X)return B;J.catch.renderer.fill(B)}).finally(()=>this.static.finalized=!0)}};var d1={};d0(d1,{handler:()=>{{return _4}},declaration:()=>{{return f4}},_static:()=>{{return h4}}});var f4={name:"switch",syntax:!0,tags:{case:{type:"child",many:!0},default:{type:"child"}}},h4={initialized:!1,prevRenderer:null},_4={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,X=!1){let H=[];this.static.prevRenderer?.cleanup();for(let G of J.case)if(G.is==J.by||Array.isArray(G.is)&&G.is.includes(J.by)){Array.isArray(G.is)?H=[...new Set([...H,...G.is])]:H.push(G.is);const W=G.renderer.mesh({},Z);if(this.static.prevRenderer=G.renderer,!W?.length)return;if(X)return W;G.renderer.fill(W)}if(H.includes(J.by))return;if(J.default){const G=J.default.renderer.mesh({},Z);if(this.static.prevRenderer=J.default.renderer,!G?.length)return;if(X)return G;J.default.renderer.fill(G)}else this.static.prevRenderer=null}};var i1={};d0(i1,{state:()=>{{return y4}},handler:()=>{{return d4}},default:()=>{{return i4}},context:()=>{{return u4}},_static:()=>{{return v4}}});var m4=function(J){const Z={};return J.split("&").map((H)=>{const[G,W]=H.split("=");Z[G]=W}),Z},y4={page:null,params:{},query:{}},v4={global:!1,routes:[],defaultPath:null,currentPath:null,currentRoute:null},u4=["navigate"],d4={onInput(){this.processor(this.input)},processor(J){if(!J.routes)return;if(J.global)this.static.global=J.global;if(this.static.routes=J.routes.map(({path:Z,template:X,default:H})=>{if(H)this.static.defaultPath=Z;const G=Z.match(/:[^\/]*(\/|$)/gi)||[],W=Z.replaceAll("/","\\/").replaceAll(/:[^\/]*(\/|$)/gi,"([^\\/]+)(?:\\/|$)");return{path:Z,template:X,default:H,pathVars:G,pathRegex:new RegExp(`${W}\$`,"i")}}),J.global){const Z=window.location.pathname;this.static.defaultPath=this.static.defaultPath&&Z=="/"&&Z!==this.static.defaultPath?this.static.defaultPath:Z?Z+window.location.search:this.static.routes[0].path}},onAttach(){if(this.input.global)window.navigate=this.navigate.bind(this),window.addEventListener("popstate",(J)=>J.state&&this.navigate(J.state.path,!0));this.setContext("navigate",this.navigate.bind(this)),this.static.defaultPath&&this.navigate(this.static.defaultPath)},navigate(J,Z){!Z&&this.static.global&&history.pushState({path:J},"",J);const X=J.split("?");J=X[0];const H=X[1]?m4(X[1]):{};let G=null;if(this.static.currentRoute)G={path:this.static.currentRoute.path,params:this.state.params},this.emit("before",{fromState:G,toState:{path:J,query:H}});const W=this.match(J);if(!W){this.static.currentRoute=null,this.state.params={},this.state.query={},this.emit("not-found",J);return}const{route:B,params:Y}=W;this.emit("after",{fromState:G,toState:{path:B.path,params:Y,query:H}}),this.static.currentPath=J,this.static.currentRoute=B,this.state.params=Y,this.state.query=H,this.state.page=B.template},match(J){const Z={};let X=!1;for(let H of this.static.routes){const{pathVars:G,pathRegex:W}=H,B=J.match(W);if(B!==null&&B.index===0){for(let Y=0;Y+1<B.length&&Y<G.length;Y++)Z[G[Y].replaceAll(/[\/:]/g,"")]=B[Y+1];X=H;break}}return X?{route:X,params:Z}:!1}},i4="<{state.page} params=state.params query=state.query/>";class l0{debug=!1;stylesheets=[];config={};store={};__root;i18n=new Q1;watcher;IUC;__setLang;__getLang;__setContext;__getContext;constructor(J){if(this.config=J,this.config?.debug)this.debug=this.config.debug;this.watcher=new Z1,this.IUC=new J1;const[Z,X]=g0(this.i18n.lang),[H,G]=g0(J?.context||{});this.__setLang=X,this.__getLang=Z,this.__setContext=G,this.__getContext=H,this.register("if",v1),this.register("for",u1),this.register("async",m1),this.register("switch",d1),this.register("router",i1)}register(J,Z){return this.store[J]=Z,this}unregister(J){return delete this.store[J],this}has(J){return J in this.store}import(J){if(!this.has(J))throw new Error(`<${J}> component not found`);if(!this.store[J].declaration?.syntax&&!this.store[J].default)throw new Error(`Invalid <${J}> component`);return this.store[J]}render(J,Z,X){const{default:H,...G}=Z,W={debug:this.debug,prepath:"0",lips:this},B=new x0(J,H||"",{...G,input:X},W);return window.addEventListener("beforeunload",()=>{return this.dispose(),B.destroy(),null}),window.addEventListener("pagehide",(Y)=>{!Y.persisted&&this.dispose()}),document.addEventListener("visibilitychange",()=>{if(document.visibilityState!=="hidden")return;this.IUC.prepareForPotentialUnload()}),B}root(J,Z){if(this.__root=this.render("__ROOT__",J),this.__root.appendTo(Z),this.config?.stylesheets)this.stylesheets=this.config.stylesheets.map((X)=>new m0("root",{sheet:X,meta:!0}));return this.__root}setLanguage(J){this.i18n.lang=J,this.__setLang(J)}getLanguage(){return this.__getLang()}setContext(J,Z){const X=this.__getContext();if(typeof J==="string"){const H={...X,[J]:Z};B0(X,H)&&this.__setContext(H)}else if(!Array.isArray(J)){const H={...X,...J};B0(X,H)&&this.__setContext(H)}else throw new Error("Invalid context data")}getContext(){return this.__getContext()}useContext(J,Z){if(!J.length)return;o0(()=>{const X=this.__getContext();if(!X)return;const H=Object.fromEntries(J.map((G)=>[G,X[G]]));H&&typeof Z==="function"&&Object.keys(H).length&&Z(H)})}useTranslator(J,Z){o0(()=>{const X=this.__getLang();if(!X)return;(J==="*"||Array.isArray(J)&&J.includes(X))&&typeof Z==="function"&&Z(X)})}dispose(){this.watcher?.dispose(),this.__root?.destroy(),this.stylesheets.forEach((J)=>J.clear())}}var c4=function(){const J={rainbow:[],fire:[],ocean:[],grayscale:[]};for(let W=0;W<360;W++)J.rainbow.push(`hsl(${W}, 80%, 60%)`);for(let W=0;W<60;W++)J.fire.push(`hsl(${W+10}, 90%, 60%)`);for(let W=0;W<60;W++)J.ocean.push(`hsl(${W+180}, 85%, 55%)`);for(let W=0;W<200;W++){const B=W+55;J.grayscale.push(`rgb(${B}, ${B}, ${B})`)}const Z={title:"Interactive Particle System",width:800,height:500,particleCount:200,maxParticleSize:15,minParticleSize:2,speedFactor:1,colorScheme:"rainbow",interactive:!0,showStats:!0,useGravity:!0},X={_static:{animationFrame:0},state:{particles:[],particlePool:[],isRunning:!1,mouseX:0,mouseY:0,hasMouseInput:!1,emissionRate:3,frameCount:0,lastFrameTime:0,lastUpdateTime:0,fps:0,statsUpdateCounter:0,emitterX:0,emitterY:0,gravity:0.1,wind:0,turbulence:0.05},handler:{onCreate(){if(!this.input.width)this.input.width=Z.width;if(!this.input.height)this.input.height=Z.height;if(!this.input.title)this.input.title=Z.title;if(!this.input.particleCount)this.input.particleCount=Z.particleCount;if(!this.input.maxParticleSize)this.input.maxParticleSize=Z.maxParticleSize;if(!this.input.minParticleSize)this.input.minParticleSize=Z.minParticleSize;if(!this.input.speedFactor)this.input.speedFactor=Z.speedFactor;if(!this.input.colorScheme)this.input.colorScheme=Z.colorScheme;if(this.input.interactive===void 0)this.input.interactive=Z.interactive;if(this.input.showStats===void 0)this.input.showStats=Z.showStats;if(this.input.useGravity===void 0)this.input.useGravity=Z.useGravity;if(this.input.width&&this.input.height)this.state.emitterX=this.input.width/2,this.state.emitterY=this.input.height/2;this.initializeParticlePool(this.input.particleCount||200)},initializeParticlePool(W){for(let B=0;B<W;B++)this.state.particlePool.push(this.createInactiveParticle())},createInactiveParticle(){const W=this.input.minParticleSize||2,B=this.input.maxParticleSize||15,Y=W+Math.random()*(B-W);let M;if(Y<5)M="circle";else if(Y<10)M="rect";else M="polygon";return{id:Math.random()*1e5|0,x:0,y:0,size:Y,vx:0,vy:0,color:"",alpha:0,rotation:0,rotationSpeed:0,life:Number.MAX_SAFE_INTEGER,maxLife:0,type:M}},onMount(){if(this.input.interactive){const W=document.querySelector(".particle-system-container");if(W)this.boundMouseMove=this.handleMouseMove.bind(this),this.boundMouseLeave=this.handleMouseLeave.bind(this),W.addEventListener("mousemove",this.boundMouseMove),W.addEventListener("mouseleave",this.boundMouseLeave)}},onDestroy(){if(this.stopAnimation(),this.input.interactive){const W=document.querySelector(".particle-system-container");if(W)W.removeEventListener("mousemove",this.boundMouseMove),W.removeEventListener("mouseleave",this.boundMouseLeave)}this.state.particles=[],this.state.particlePool=[]},handleMouseMove(W){const Y=W.currentTarget.getBoundingClientRect();this.state.mouseX=W.clientX-Y.left,this.state.mouseY=W.clientY-Y.top,this.state.hasMouseInput=!0,this.state.emitterX=this.state.mouseX,this.state.emitterY=this.state.mouseY},handleMouseLeave(){if(this.state.hasMouseInput=!1,this.input.width&&this.input.height)this.state.emitterX=this.input.width/2,this.state.emitterY=this.input.height/2},getRandomColor(){const W=this.input.colorScheme||"rainbow",B=J[W];if(!B||B.length===0){if(W==="rainbow")return`hsl(${Math.random()*360}, 80%, 60%)`;else if(W==="fire"){const Y=Math.random()*60+10,M=80+Math.random()*20,z=50+Math.random()*20;return`hsl(${Y}, ${M}%, ${z}%)`}else if(W==="ocean"){const Y=Math.random()*60+180,M=70+Math.random()*30,z=40+Math.random()*30;return`hsl(${Y}, ${M}%, ${z}%)`}else if(W==="grayscale"){const Y=Math.floor(Math.random()*200+55);return`rgb(${Y}, ${Y}, ${Y})`}return`hsl(${Math.random()*360}, 80%, 60%)`}return B[Math.floor(Math.random()*B.length)]},activateParticle(){let W;for(let z=0;z<this.state.particlePool.length;z++)if(this.state.particlePool[z].life>this.state.particlePool[z].maxLife){W=this.state.particlePool[z];break}if(!W){if(W=this.createInactiveParticle(),!W)return null;this.state.particlePool.push(W)}if(!W||!this.input.width||!this.input.height)return null;W.x=this.state.emitterX,W.y=this.state.emitterY;const B=this.input.speedFactor||1,Y=Math.random()*Math.PI*2,M=(0.5+Math.random()*2)*B;return W.vx=Math.cos(Y)*M,W.vy=Math.sin(Y)*M,W.rotation=Math.random()*Math.PI*2,W.rotationSpeed=(Math.random()-0.5)*0.1,W.maxLife=50+Math.random()*100,W.life=0,W.alpha=0.7+Math.random()*0.3,W.color=this.getRandomColor(),W},updateParticles(){if(!this.input.width||!this.input.height)return;const W=performance.now(),B=(W-this.state.lastUpdateTime)/1000;this.state.lastUpdateTime=W;const Y=0.016666666666666666,M=this.input.useGravity?this.state.gravity:0,z=this.state.wind,j=this.state.turbulence,K=[],A=Math.min(this.state.emissionRate,(this.input.particleCount||200)-this.state.particles.length);for(let f=0;f<A;f++){const E=this.activateParticle();if(E)this.state.particles.push(E)}for(let f=0;f<this.state.particles.length;f++){const E=this.state.particles[f];if(E.life>=E.maxLife)continue;const p=Math.min(B,0.1);E.x+=E.vx*p*60,E.y+=E.vy*p*60,E.vy+=M*p*60,E.vx+=z*p*60,E.vx+=(Math.random()-0.5)*j*p*60,E.vy+=(Math.random()-0.5)*j*p*60,E.rotation+=E.rotationSpeed*p*60,E.life+=p*60;const X0=E.life/E.maxLife;E.alpha=1-Math.pow(X0,2);const s=E.size/2;if(E.x-s<0)E.x=s,E.vx=-E.vx*0.5;else if(E.x+s>this.input.width)E.x=this.input.width-s,E.vx=-E.vx*0.5;if(E.y+s>this.input.height)if(E.y=this.input.height-s,Math.abs(E.vy)>0.5)E.vy=-E.vy*0.4;else E.vy=0,E.vx*=0.95;if(E.life<E.maxLife)K.push(E)}if(this.state.particles.length!==K.length)this.state.particles=K},getParticlePoints(W){const B=[],M=W.size/2,z=W.size/4;for(let j=0;j<10;j++){const K=j%2===0?M:z,A=Math.PI/5*j,f=W.x+K*Math.sin(A),E=W.y+K*Math.cos(A);B.push(`${f},${E}`)}return B.join(" ")},startAnimation(){if(this.state.isRunning)return;if(this.state.isRunning=!0,this.state.lastFrameTime=performance.now(),this.state.lastUpdateTime=performance.now(),!this.boundAnimate)this.boundAnimate=this.animate.bind(this);this.static.animationFrame=requestAnimationFrame(this.boundAnimate)},animate(){if(!this.state.isRunning)return;const W=performance.now(),B=W-this.state.lastFrameTime;if(this.state.lastFrameTime=W,this.state.statsUpdateCounter++,this.state.statsUpdateCounter>=10)this.state.fps=Math.round(1000/B),this.state.statsUpdateCounter=0;this.updateParticles(),this.state.frameCount++;const Y=this.state.frameCount%628,M=Math.sin(Y*0.01),z=Math.sin(Y*0.005);this.state.wind=M*0.05,this.state.turbulence=0.03+z*0.02,this.static.animationFrame=requestAnimationFrame(this.boundAnimate)},stopAnimation(){this.state.isRunning=!1,cancelAnimationFrame(this.static.animationFrame)},toggleAnimation(){if(this.state.isRunning)this.stopAnimation();else this.startAnimation()},changeColorScheme(W){this.input.colorScheme=W},increaseParticleCount(){if(this.input.particleCount){const W=Math.min(1000,this.input.particleCount+50);if(W>this.state.particlePool.length){const B=W-this.state.particlePool.length;for(let Y=0;Y<B;Y++)this.state.particlePool.push(this.createInactiveParticle())}this.input.particleCount=W}},decreaseParticleCount(){if(this.input.particleCount){if(this.input.particleCount=Math.max(50,this.input.particleCount-50),this.state.particles.length>this.input.particleCount)this.state.particles.length=this.input.particleCount}},toggleGravity(){if(this.input.useGravity=!this.input.useGravity,!this.input.useGravity)for(let W=0;W<this.state.particles.length;W++)this.state.particles[W].vy*=0.5},increaseEmissionRate(){this.state.emissionRate=Math.min(20,this.state.emissionRate+1)},decreaseEmissionRate(){this.state.emissionRate=Math.max(1,this.state.emissionRate-1)}},default:`
1
+ var K8=Object.create;var{defineProperty:x1,getPrototypeOf:U8,getOwnPropertyNames:O8}=Object;var j8=Object.prototype.hasOwnProperty;var e0=(J,Z,X)=>{X=J!=null?K8(U8(J)):{};const H=Z||!J||!J.__esModule?x1(X,"default",{value:J,enumerable:!0}):X;for(let G of O8(J))if(!j8.call(H,G))x1(H,G,{get:()=>J[G],enumerable:!0});return H};var I8=(J,Z)=>()=>(Z||J((Z={exports:{}}).exports,Z),Z.exports);var i0=(J,Z)=>{for(var X in Z)x1(J,X,{get:Z[X],enumerable:!0,configurable:!0,set:(H)=>Z[X]=()=>H})};var c0=I8((G5,q5)=>{(function(){var J=document,Z=window,X=J.documentElement,H=J.createElement.bind(J),G=H("div"),W=H("table"),B=H("tbody"),Y=H("tr"),M=Array.isArray,z=Array.prototype,j=z.concat,U=z.filter,b=z.indexOf,f=z.map,T=z.push,p=z.slice,X0=z.some,s=z.splice,i=/^#(?:[\w-]|\\.|[^\x00-\xa0])*$/,m=/^\.(?:[\w-]|\\.|[^\x00-\xa0])*$/,o=/<.+>/,l=/^\w+$/;function J0(Q,q){var w=P(q);return!Q||!w&&!L(q)&&!$(q)?[]:!w&&m.test(Q)?q.getElementsByClassName(Q.slice(1).replace(/\\/g,"")):!w&&l.test(Q)?q.getElementsByTagName(Q):q.querySelectorAll(Q)}var d=function(){function Q(q,w){if(!q)return;if(I(q))return q;var O=q;if(k(q)){var V=w||J;if(O=i.test(q)&&L(V)?V.getElementById(q.slice(1).replace(/\\/g,"")):o.test(q)?s1(q):I(V)?V.find(q):k(V)?D(V).find(q):J0(q,V),!O)return}else if(x(q))return this.ready(q);if(O.nodeType||O===Z)O=[O];this.length=O.length;for(var A=0,y=this.length;A<y;A++)this[A]=O[A]}return Q.prototype.init=function(q,w){return new Q(q,w)},Q}(),K=d.prototype,D=K.init;if(D.fn=D.prototype=K,K.length=0,K.splice=s,typeof Symbol==="function")K[Symbol.iterator]=z[Symbol.iterator];function I(Q){return Q instanceof d}function N(Q){return!!Q&&Q===Q.window}function L(Q){return!!Q&&Q.nodeType===9}function P(Q){return!!Q&&Q.nodeType===11}function $(Q){return!!Q&&Q.nodeType===1}function u(Q){return!!Q&&Q.nodeType===3}function n(Q){return typeof Q==="boolean"}function x(Q){return typeof Q==="function"}function k(Q){return typeof Q==="string"}function C(Q){return Q===void 0}function v(Q){return Q===null}function R(Q){return!isNaN(parseFloat(Q))&&isFinite(Q)}function h(Q){if(typeof Q!=="object"||Q===null)return!1;var q=Object.getPrototypeOf(Q);return q===null||q===Object.prototype}D.isWindow=N,D.isFunction=x,D.isArray=M,D.isNumeric=R,D.isPlainObject=h;function F(Q,q,w){if(w){var O=Q.length;while(O--)if(q.call(Q[O],O,Q[O])===!1)return Q}else if(h(Q)){var V=Object.keys(Q);for(var O=0,A=V.length;O<A;O++){var y=V[O];if(q.call(Q[y],y,Q[y])===!1)return Q}}else for(var O=0,A=Q.length;O<A;O++)if(q.call(Q[O],O,Q[O])===!1)return Q;return Q}D.each=F,K.each=function(Q){return F(this,Q)},K.empty=function(){return this.each(function(Q,q){while(q.firstChild)q.removeChild(q.firstChild)})};function E(){var Q=[];for(var q=0;q<arguments.length;q++)Q[q]=arguments[q];var w=n(Q[0])?Q.shift():!1,O=Q.shift(),V=Q.length;if(!O)return{};if(!V)return E(w,D,O);for(var A=0;A<V;A++){var y=Q[A];for(var r in y)if(w&&(M(y[r])||h(y[r]))){if(!O[r]||O[r].constructor!==y[r].constructor)O[r]=new y[r].constructor;E(w,O[r],y[r])}else O[r]=y[r]}return O}D.extend=E,K.extend=function(Q){return E(K,Q)};var _=/\S+/g;function S(Q){return k(Q)?Q.match(_)||[]:[]}K.toggleClass=function(Q,q){var w=S(Q),O=!C(q);return this.each(function(V,A){if(!$(A))return;F(w,function(y,r){if(O)q?A.classList.add(r):A.classList.remove(r);else A.classList.toggle(r)})})},K.addClass=function(Q){return this.toggleClass(Q,!0)},K.removeAttr=function(Q){var q=S(Q);return this.each(function(w,O){if(!$(O))return;F(q,function(V,A){O.removeAttribute(A)})})};function g(Q,q){if(!Q)return;if(k(Q)){if(arguments.length<2){if(!this[0]||!$(this[0]))return;var w=this[0].getAttribute(Q);return v(w)?void 0:w}if(C(q))return this;if(v(q))return this.removeAttr(Q);return this.each(function(V,A){if(!$(A))return;A.setAttribute(Q,q)})}for(var O in Q)this.attr(O,Q[O]);return this}K.attr=g,K.removeClass=function(Q){if(arguments.length)return this.toggleClass(Q,!1);return this.attr("class","")},K.hasClass=function(Q){return!!Q&&X0.call(this,function(q){return $(q)&&q.classList.contains(Q)})},K.get=function(Q){if(C(Q))return p.call(this);return Q=Number(Q),this[Q<0?Q+this.length:Q]},K.eq=function(Q){return D(this.get(Q))},K.first=function(){return this.eq(0)},K.last=function(){return this.eq(-1)};function a(Q){if(C(Q))return this.get().map(function(q){return $(q)||u(q)?q.textContent:""}).join("");return this.each(function(q,w){if(!$(w))return;w.textContent=Q})}K.text=a;function c(Q,q,w){if(!$(Q))return;var O=Z.getComputedStyle(Q,null);return w?O.getPropertyValue(q)||void 0:O[q]||Q.style[q]}function t(Q,q){return parseInt(c(Q,q),10)||0}function Z0(Q,q){return t(Q,"border".concat(q?"Left":"Top","Width"))+t(Q,"padding".concat(q?"Left":"Top"))+t(Q,"padding".concat(q?"Right":"Bottom"))+t(Q,"border".concat(q?"Right":"Bottom","Width"))}var e={};function z0(Q){if(e[Q])return e[Q];var q=H(Q);J.body.insertBefore(q,null);var w=c(q,"display");return J.body.removeChild(q),e[Q]=w!=="none"?w:"block"}function I0(Q){return c(Q,"display")==="none"}function f0(Q,q){var w=Q&&(Q.matches||Q.webkitMatchesSelector||Q.msMatchesSelector);return!!w&&!!q&&w.call(Q,q)}function n0(Q){return k(Q)?function(q,w){return f0(w,Q)}:x(Q)?Q:I(Q)?function(q,w){return Q.is(w)}:!Q?function(){return!1}:function(q,w){return w===Q}}K.filter=function(Q){var q=n0(Q);return D(U.call(this,function(w,O){return q.call(w,O,w)}))};function A0(Q,q){return!q?Q:Q.filter(q)}K.detach=function(Q){return A0(this,Q).each(function(q,w){if(w.parentNode)w.parentNode.removeChild(w)}),this};var u5=/^\s*<(\w+)[^>]*>/,m5=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,p1={"*":G,tr:B,td:Y,th:Y,thead:W,tbody:W,tfoot:W};function s1(Q){if(!k(Q))return[];if(m5.test(Q))return[H(RegExp.$1)];var q=u5.test(Q)&&RegExp.$1,w=p1[q]||p1["*"];return w.innerHTML=Q,D(w.childNodes).detach().get()}D.parseHTML=s1,K.has=function(Q){var q=k(Q)?function(w,O){return J0(Q,O).length}:function(w,O){return O.contains(Q)};return this.filter(q)},K.not=function(Q){var q=n0(Q);return this.filter(function(w,O){return(!k(Q)||$(O))&&!q.call(O,w,O)})};function N0(Q,q,w,O){var V=[],A=x(q),y=O&&n0(O);for(var r=0,D0=Q.length;r<D0;r++)if(A){var G0=q(Q[r]);if(G0.length)T.apply(V,G0)}else{var M0=Q[r][q];while(M0!=null){if(O&&y(-1,M0))break;V.push(M0),M0=w?M0[q]:null}}return V}function o1(Q){if(Q.multiple&&Q.options)return N0(U.call(Q.options,function(q){return q.selected&&!q.disabled&&!q.parentNode.disabled}),"value");return Q.value||""}function d5(Q){if(!arguments.length)return this[0]&&o1(this[0]);return this.each(function(q,w){var O=w.multiple&&w.options;if(O||X5.test(w.type)){var V=M(Q)?f.call(Q,String):v(Q)?[]:[String(Q)];if(O)F(w.options,function(A,y){y.selected=V.indexOf(y.value)>=0},!0);else w.checked=V.indexOf(w.value)>=0}else w.value=C(Q)||v(Q)?"":Q})}K.val=d5,K.is=function(Q){var q=n0(Q);return X0.call(this,function(w,O){return q.call(w,O,w)})},D.guid=1;function V0(Q){return Q.length>1?U.call(Q,function(q,w,O){return b.call(O,q)===w}):Q}D.unique=V0,K.add=function(Q,q){return D(V0(this.get().concat(D(Q,q).get())))},K.children=function(Q){return A0(D(V0(N0(this,function(q){return q.children}))),Q)},K.parent=function(Q){return A0(D(V0(N0(this,"parentNode"))),Q)},K.index=function(Q){var q=Q?D(Q)[0]:this[0],w=Q?this:D(q).parent().children();return b.call(w,q)},K.closest=function(Q){var q=this.filter(Q);if(q.length)return q;var w=this.parent();if(!w.length)return q;return w.closest(Q)},K.siblings=function(Q){return A0(D(V0(N0(this,function(q){return D(q).parent().children().not(q)}))),Q)},K.find=function(Q){return D(V0(N0(this,function(q){return J0(Q,q)})))};var i5=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,c5=/^$|^module$|\/(java|ecma)script/i,p5=["type","src","nonce","noModule"];function s5(Q,q){var w=D(Q);w.filter("script").add(w.find("script")).each(function(O,V){if(c5.test(V.type)&&X.contains(V)){var A=H("script");A.text=V.textContent.replace(i5,""),F(p5,function(y,r){if(V[r])A[r]=V[r]}),q.head.insertBefore(A,null),q.head.removeChild(A)}})}function o5(Q,q,w,O,V){if(O)Q.insertBefore(q,w?Q.firstChild:null);else if(Q.nodeName==="HTML")Q.parentNode.replaceChild(q,Q);else Q.parentNode.insertBefore(q,w?Q:Q.nextSibling);if(V)s5(q,Q.ownerDocument)}function $0(Q,q,w,O,V,A,y,r){return F(Q,function(D0,G0){F(D(G0),function(M0,b0){F(D(q),function(F0,t0){var $1=w?b0:t0,S1=w?t0:b0,K0=w?M0:F0;o5($1,!K0?S1:S1.cloneNode(!0),O,V,!K0)},r)},y)},A),q}K.after=function(){return $0(arguments,this,!1,!1,!1,!0,!0)},K.append=function(){return $0(arguments,this,!1,!1,!0)};function l5(Q){if(!arguments.length)return this[0]&&this[0].innerHTML;if(C(Q))return this;var q=/<script[\s>]/.test(Q);return this.each(function(w,O){if(!$(O))return;if(q)D(O).empty().append(Q);else O.innerHTML=Q})}K.html=l5,K.appendTo=function(Q){return $0(arguments,this,!0,!1,!0)},K.wrapInner=function(Q){return this.each(function(q,w){var O=D(w),V=O.contents();V.length?V.wrapAll(Q):O.append(Q)})},K.before=function(){return $0(arguments,this,!1,!0)},K.wrapAll=function(Q){var q=D(Q),w=q[0];while(w.children.length)w=w.firstElementChild;return this.first().before(q),this.appendTo(w)},K.wrap=function(Q){return this.each(function(q,w){var O=D(Q)[0];D(w).wrapAll(!q?O:O.cloneNode(!0))})},K.insertAfter=function(Q){return $0(arguments,this,!0,!1,!1,!1,!1,!0)},K.insertBefore=function(Q){return $0(arguments,this,!0,!0)},K.prepend=function(){return $0(arguments,this,!1,!0,!0,!0,!0)},K.prependTo=function(Q){return $0(arguments,this,!0,!0,!0,!1,!1,!0)},K.contents=function(){return D(V0(N0(this,function(Q){return Q.tagName==="IFRAME"?[Q.contentDocument]:Q.tagName==="TEMPLATE"?Q.content.childNodes:Q.childNodes})))},K.next=function(Q,q,w){return A0(D(V0(N0(this,"nextElementSibling",q,w))),Q)},K.nextAll=function(Q){return this.next(Q,!0)},K.nextUntil=function(Q,q){return this.next(q,!0,Q)},K.parents=function(Q,q){return A0(D(V0(N0(this,"parentElement",!0,q))),Q)},K.parentsUntil=function(Q,q){return this.parents(q,Q)},K.prev=function(Q,q,w){return A0(D(V0(N0(this,"previousElementSibling",q,w))),Q)},K.prevAll=function(Q){return this.prev(Q,!0)},K.prevUntil=function(Q,q){return this.prev(q,!0,Q)},K.map=function(Q){return D(j.apply([],f.call(this,function(q,w){return Q.call(q,w,q)})))},K.clone=function(){return this.map(function(Q,q){return q.cloneNode(!0)})},K.offsetParent=function(){return this.map(function(Q,q){var w=q.offsetParent;while(w&&c(w,"position")==="static")w=w.offsetParent;return w||X})},K.slice=function(Q,q){return D(p.call(this,Q,q))};var r5=/-([a-z])/g;function C1(Q){return Q.replace(r5,function(q,w){return w.toUpperCase()})}K.ready=function(Q){var q=function(){return setTimeout(Q,0,D)};if(J.readyState!=="loading")q();else J.addEventListener("DOMContentLoaded",q);return this},K.unwrap=function(){return this.parent().each(function(Q,q){if(q.tagName==="BODY")return;var w=D(q);w.replaceWith(w.children())}),this},K.offset=function(){var Q=this[0];if(!Q)return;var q=Q.getBoundingClientRect();return{top:q.top+Z.pageYOffset,left:q.left+Z.pageXOffset}},K.position=function(){var Q=this[0];if(!Q)return;var q=c(Q,"position")==="fixed",w=q?Q.getBoundingClientRect():this.offset();if(!q){var O=Q.ownerDocument,V=Q.offsetParent||O.documentElement;while((V===O.body||V===O.documentElement)&&c(V,"position")==="static")V=V.parentNode;if(V!==Q&&$(V)){var A=D(V).offset();w.top-=A.top+t(V,"borderTopWidth"),w.left-=A.left+t(V,"borderLeftWidth")}}return{top:w.top-t(Q,"marginTop"),left:w.left-t(Q,"marginLeft")}};var l1={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};K.prop=function(Q,q){if(!Q)return;if(k(Q)){if(Q=l1[Q]||Q,arguments.length<2)return this[0]&&this[0][Q];return this.each(function(O,V){V[Q]=q})}for(var w in Q)this.prop(w,Q[w]);return this},K.removeProp=function(Q){return this.each(function(q,w){delete w[l1[Q]||Q]})};var n5=/^--/;function N1(Q){return n5.test(Q)}var R1={},a5=G.style,t5=["webkit","moz","ms"];function e5(Q,q){if(q===void 0)q=N1(Q);if(q)return Q;if(!R1[Q]){var w=C1(Q),O="".concat(w[0].toUpperCase()).concat(w.slice(1)),V="".concat(w," ").concat(t5.join("".concat(O," "))).concat(O).split(" ");F(V,function(A,y){if(y in a5)return R1[Q]=y,!1})}return R1[Q]}var J8={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function r1(Q,q,w){if(w===void 0)w=N1(Q);return!w&&!J8[Q]&&R(q)?"".concat(q,"px"):q}function Z8(Q,q){if(k(Q)){var w=N1(Q);if(Q=e5(Q,w),arguments.length<2)return this[0]&&c(this[0],Q,w);if(!Q)return this;return q=r1(Q,q,w),this.each(function(V,A){if(!$(A))return;if(w)A.style.setProperty(Q,q);else A.style[Q]=q})}for(var O in Q)this.css(O,Q[O]);return this}K.css=Z8;function n1(Q,q){try{return Q(q)}catch(w){return q}}var W8=/^\s+|\s+$/;function a1(Q,q){var w=Q.dataset[q]||Q.dataset[C1(q)];if(W8.test(w))return w;return n1(JSON.parse,w)}function Q8(Q,q,w){w=n1(JSON.stringify,w),Q.dataset[C1(q)]=w}function X8(Q,q){if(!Q){if(!this[0])return;var w={};for(var O in this[0].dataset)w[O]=a1(this[0],O);return w}if(k(Q)){if(arguments.length<2)return this[0]&&a1(this[0],Q);if(C(q))return this;return this.each(function(V,A){Q8(A,Q,q)})}for(var O in Q)this.data(O,Q[O]);return this}K.data=X8;function t1(Q,q){var w=Q.documentElement;return Math.max(Q.body["scroll".concat(q)],w["scroll".concat(q)],Q.body["offset".concat(q)],w["offset".concat(q)],w["client".concat(q)])}F([!0,!1],function(Q,q){F(["Width","Height"],function(w,O){var V="".concat(q?"outer":"inner").concat(O);K[V]=function(A){if(!this[0])return;if(N(this[0]))return q?this[0]["inner".concat(O)]:this[0].document.documentElement["client".concat(O)];if(L(this[0]))return t1(this[0],O);return this[0]["".concat(q?"offset":"client").concat(O)]+(A&&q?t(this[0],"margin".concat(w?"Top":"Left"))+t(this[0],"margin".concat(w?"Bottom":"Right")):0)}})}),F(["Width","Height"],function(Q,q){var w=q.toLowerCase();K[w]=function(O){if(!this[0])return C(O)?void 0:this;if(!arguments.length){if(N(this[0]))return this[0].document.documentElement["client".concat(q)];if(L(this[0]))return t1(this[0],q);return this[0].getBoundingClientRect()[w]-Z0(this[0],!Q)}var V=parseInt(O,10);return this.each(function(A,y){if(!$(y))return;var r=c(y,"boxSizing");y.style[w]=r1(w,V+(r==="border-box"?Z0(y,!Q):0))})}});var e1="___cd";K.toggle=function(Q){return this.each(function(q,w){if(!$(w))return;var O=I0(w),V=C(Q)?O:Q;if(V){if(w.style.display=w[e1]||"",I0(w))w.style.display=z0(w.tagName)}else if(!O)w[e1]=c(w,"display"),w.style.display="none"})},K.hide=function(){return this.toggle(!1)},K.show=function(){return this.toggle(!0)};var J5="___ce",P1=".",E1={focus:"focusin",blur:"focusout"},Z5={mouseenter:"mouseover",mouseleave:"mouseout"},H8=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function T1(Q){return Z5[Q]||E1[Q]||Q}function A1(Q){var q=Q.split(P1);return[q[0],q.slice(1).sort()]}K.trigger=function(Q,q){if(k(Q)){var w=A1(Q),O=w[0],V=w[1],A=T1(O);if(!A)return this;var y=H8.test(A)?"MouseEvents":"HTMLEvents";Q=J.createEvent(y),Q.initEvent(A,!0,!0),Q.namespace=V.join(P1),Q.___ot=O}Q.___td=q;var r=Q.___ot in E1;return this.each(function(D0,G0){if(r&&x(G0[Q.___ot]))G0["___i".concat(Q.type)]=!0,G0[Q.___ot](),G0["___i".concat(Q.type)]=!1;G0.dispatchEvent(Q)})};function W5(Q){return Q[J5]=Q[J5]||{}}function G8(Q,q,w,O,V){var A=W5(Q);A[q]=A[q]||[],A[q].push([w,O,V]),Q.addEventListener(q,V)}function Q5(Q,q){return!q||!X0.call(q,function(w){return Q.indexOf(w)<0})}function a0(Q,q,w,O,V){var A=W5(Q);if(!q)for(q in A)a0(Q,q,w,O,V);else if(A[q])A[q]=A[q].filter(function(y){var r=y[0],D0=y[1],G0=y[2];if(V&&G0.guid!==V.guid||!Q5(r,w)||O&&O!==D0)return!0;Q.removeEventListener(q,G0)})}K.off=function(Q,q,w){var O=this;if(C(Q))this.each(function(A,y){if(!$(y)&&!L(y)&&!N(y))return;a0(y)});else if(!k(Q))for(var V in Q)this.off(V,Q[V]);else{if(x(q))w=q,q="";F(S(Q),function(A,y){var r=A1(y),D0=r[0],G0=r[1],M0=T1(D0);O.each(function(b0,F0){if(!$(F0)&&!L(F0)&&!N(F0))return;a0(F0,M0,G0,q,w)})})}return this},K.remove=function(Q){return A0(this,Q).detach().off(),this},K.replaceWith=function(Q){return this.before(Q).remove()},K.replaceAll=function(Q){return D(Q).replaceWith(this),this};function q8(Q,q,w,O,V){var A=this;if(!k(Q)){for(var y in Q)this.on(y,q,w,Q[y],V);return this}if(!k(q))if(C(q)||v(q))q="";else if(C(w))w=q,q="";else O=w,w=q,q="";if(!x(O))O=w,w=void 0;if(!O)return this;return F(S(Q),function(r,D0){var G0=A1(D0),M0=G0[0],b0=G0[1],F0=T1(M0),t0=M0 in Z5,$1=M0 in E1;if(!F0)return;A.each(function(S1,K0){if(!$(K0)&&!L(K0)&&!N(K0))return;var b1=function(q0){if(q0.target["___i".concat(q0.type)])return q0.stopImmediatePropagation();if(q0.namespace&&!Q5(b0,q0.namespace.split(P1)))return;if(!q&&($1&&(q0.target!==K0||q0.___ot===F0)||t0&&q0.relatedTarget&&K0.contains(q0.relatedTarget)))return;var g1=K0;if(q){var h0=q0.target;while(!f0(h0,q)){if(h0===K0)return;if(h0=h0.parentNode,!h0)return}g1=h0}Object.defineProperty(q0,"currentTarget",{configurable:!0,get:function(){return g1}}),Object.defineProperty(q0,"delegateTarget",{configurable:!0,get:function(){return K0}}),Object.defineProperty(q0,"data",{configurable:!0,get:function(){return w}});var M8=O.call(g1,q0,q0.___td);if(V)a0(K0,F0,b0,q,b1);if(M8===!1)q0.preventDefault(),q0.stopPropagation()};b1.guid=O.guid=O.guid||D.guid++,G8(K0,F0,b0,q,b1)})}),this}K.on=q8;function B8(Q,q,w,O){return this.on(Q,q,w,O,!0)}K.one=B8;var z8=/\r?\n/g;function Y8(Q,q){return"&".concat(encodeURIComponent(Q),"=").concat(encodeURIComponent(q.replace(z8,"\r\n")))}var w8=/file|reset|submit|button|image/i,X5=/radio|checkbox/i;if(K.serialize=function(){var Q="";return this.each(function(q,w){F(w.elements||[w],function(O,V){if(V.disabled||!V.name||V.tagName==="FIELDSET"||w8.test(V.type)||X5.test(V.type)&&!V.checked)return;var A=o1(V);if(!C(A)){var y=M(A)?A:[A];F(y,function(r,D0){Q+=Y8(V.name,D0)})}})}),Q.slice(1)},typeof G5!=="undefined")q5.exports=D;else Z.cash=Z.$=D})()});class J1{pendingComponents=new Set;isPending=!1;callbacks=new Map;register(J,Z){this.callbacks.set(J,Z)}unregister(J){this.callbacks.delete(J)}queue(J){if(!this.callbacks.has(J))return;if(this.pendingComponents.add(J),!this.isPending)this.isPending=!0,this.schedule()}schedule(){Promise.resolve().then(()=>this.process())}process(){const J=Array.from(this.pendingComponents);this.pendingComponents.clear(),this.isPending=!1,J.forEach((Z)=>{try{const X=this.callbacks.get(Z);if(X)X()}catch(X){console.error(`Error updating component ${Z}:`,X)}})}clear(){this.pendingComponents.clear(),this.isPending=!1}dispose(){this.pendingComponents.clear(),this.callbacks.clear(),this.isPending=!1}}class Z1{subscriptions=new Map;tick=new J1;register(J,Z){this.subscriptions.set(J,Z),this.tick.register(J,Z)}unregister(J){this.subscriptions.delete(J),this.tick.unregister(J)}queueUpdate(J){this.tick.queue(J)}dispose(){this.subscriptions.clear(),this.tick.dispose()}prepareForPotentialUnload(){this.tick.clear(),this.subscriptions.forEach((J,Z)=>{this.subscriptions.set(Z,()=>{})})}proxyState(J,Z){const X=this,H=new WeakMap,G=(B)=>{if(typeof B.toJSON==="function")return B;if(B instanceof Map)B.forEach((M,z)=>B.set(z,W(M)));else if(Array.isArray(B))B.forEach((M,z)=>B[z]=W(M));else if(typeof B==="object")Object.entries(B).forEach(([M,z])=>B[M]=W(z));let Y=new Proxy(B,{get(M,z){if(z==="toJSON")return function(){const U=(b)=>{if(!b||typeof b!=="object")return b;if(H.has(b)){const f=H.get(b);if(f instanceof Map){const p={};return f.forEach((X0,s)=>p[typeof s==="object"?JSON.stringify(s):String(s)]=U(X0)),p}if(Array.isArray(f))return f.map((p)=>U(p));const T={};return Object.entries(f).forEach(([p,X0])=>T[p]=U(X0)),T}if(typeof b.toJSON==="function"&&!H.has(b))return b.toJSON();return b};return U(Y)};if(z==="reset")return function(){Y=null};const j=M[z];if(B instanceof Map&&typeof j==="function")return function(...U){const b=z.toString();if(b==="set"&&U.length>=2)U[1]=W(U[1]);const f=j.apply(M,U);return["set","delete","clear"].includes(b)&&X.queueUpdate(J),f};if(Array.isArray(B)&&typeof j==="function")return function(...U){const b=z.toString();if(["push","unshift"].includes(b))U=U.map((T)=>W(T));else if(b==="splice"&&U.length>2)U=[U[0],U[1],...U.slice(2).map((T)=>W(T))];const f=j.apply(M,U);return["push","pop","shift","unshift","splice","sort","reverse","fill"].includes(b)&&X.queueUpdate(J),f};return j},set(M,z,j){if(M[z]===j)return!0;if(j instanceof Map&&M[z]instanceof Map){const U=M[z];return U.clear(),j.forEach((b,f)=>U.set(f,W(b))),X.queueUpdate(J),!0}return M[z]=W(j),X.queueUpdate(J),!0}});return H.set(Y,B),Y},W=(B)=>{if(!B)return B;return B instanceof Map||Array.isArray(B)||typeof B==="object"?G(B):B};return G(Z)}}class W1{domObserver;observedComponents=new Map;TIMEOUT=1e4;constructor(){this.domObserver=new MutationObserver(()=>{this.observedComponents.forEach((J,Z)=>{try{const X=Z.node;if(!X){this.unwatch(Z);return}if(J.type==="attach"&&document.contains(X[0]))this.unwatch(Z),Z.emit("component:attached"),typeof Z.onAttach=="function"&&Z.onAttach.bind(Z)();else if(J.type==="detach"&&!document.contains(X[0]))this.unwatch(Z),Z.emit("component:detached"),typeof Z.onDetach=="function"&&Z.onDetach.bind(Z)()}catch(X){console.log("DWS error --",X)}}),!this.observedComponents.size&&this.domObserver.disconnect()})}watch(J,Z="attach"){const X=J.node;if(!X)return;if(Z==="attach"&&document.contains(X[0])){J.emit("component:attached"),typeof J.onAttach=="function"&&J.onAttach.bind(J)();return}if(Z==="detach"&&!document.contains(X[0])){J.emit("component:detached"),typeof J.onDetach=="function"&&J.onDetach.bind(J)();return}this.unwatch(J);const H=setTimeout(()=>{this.unwatch(J),J.emit(`component:${Z}ment-timeout`)},this.TIMEOUT);this.observedComponents.set(J,{timeout:H,type:Z}),this.observedComponents.size===1&&this.domObserver.observe(document.body,{childList:!0,subtree:!0}),Z==="attach"&&J.once("component:attached",()=>this.watch(J,"detach"))}unwatch(J){const Z=this.observedComponents.get(J);if(Z)clearTimeout(Z.timeout),this.observedComponents.delete(J);!this.observedComponents.size&&this.domObserver.disconnect()}dispose(){this.domObserver.disconnect(),this.observedComponents.forEach((J)=>clearTimeout(J.timeout)),this.observedComponents.clear()}}var Q1=function(J,Z){if(!Z)return J;return J.replace(/{(\w+)}/g,(X,H)=>{return Z[H]!==void 0?Z[H].toString():`{${H}}`})},H5=(J,Z,X,H,G)=>{switch(J){case"plural":{if(typeof X==="string"){console.warn("Plural format value cannot be a string");return}if(H.count===void 0){console.warn("Plural format requires <count> parameter or use * by default.");let Y=X["*"];if(typeof Y==="object")Y=Y[G||"*"];return Q1(Y,H)}if(typeof H.count==="string")H.count=Number(H.count);let W="*";if(H.count.toString()in X)W=H.count.toString();let B=X[W]||X["*"];if(typeof B==="object")B=B[G||"*"];return Q1(B,H)}case"condition":{if(typeof X==="string"){console.warn("Condition format value cannot be a string");return}let W;for(let B in X)try{if(new Function("params",`with( params ){ return ${B}; }`)(H||{})){W=X[B];break}}catch(Y){console.warn(`Invalid <${Z}(${B})> condition expression`)}if(W===void 0)return;if(typeof W==="object")W=W[G||"*"];return Q1(W,H)}case"variable":default:{const W=typeof X==="object"?X[G||"*"]:X;if(typeof W==="object"){console.warn(`Invalid <${Z}> variable variant definition`);return}return Q1(W,H)}}};class X1{currentLang=window.navigator.language;DICTIONARIES={};set lang(J){if(this.currentLang===J)return;this.currentLang=J}get lang(){return this.currentLang}setDictionary(J,Z){this.DICTIONARIES[J]=Z}translate(J,Z){if(Z&&this.currentLang===Z)return{text:J,lang:this.currentLang};Z=Z||this.currentLang;const[X,H]=Z.split("-");if(this.DICTIONARIES[X]&&J in this.DICTIONARIES[X]){if(typeof this.DICTIONARIES[X][J]==="object"){const G=this.DICTIONARIES[X][J];J=G[H||"*"]||G["*"]}else if(typeof this.DICTIONARIES[X][J]==="string")J=this.DICTIONARIES[X][J]}return{text:J,lang:Z}}format(J,Z,X){X=X||this.currentLang;const[H,G]=X.split("-");if(!this.DICTIONARIES[H]){console.warn(`Undefined <${X}> format dictionary`);return}if(!this.DICTIONARIES[H][J]){console.warn(`Undefined <${X}[${J}]> format reference`);return}const W=this.DICTIONARIES[H][J];if(typeof W==="string"){console.warn(`Invalid <${X}[${J}]> format reference. Expected object`);return}if(typeof W!=="object"||W===null||Array.isArray(W)){console.warn(`Invalid <${X}[${J}]> format value`);return}return H5(W.type,J,W.value,Z,G)}}var T5=e0(c0(),1);var H1="comm",G1="rule",q1="decl";var B5="@import";var z5="@namespace",Y5="@keyframes";var w5="@layer";function B1(J){return J.trim()}function _0(J,Z,X){return J.replace(Z,X)}function M5(J,Z,X){return J.indexOf(Z,X)}function R0(J,Z){return J.charCodeAt(Z)|0}function P0(J,Z,X){return J.slice(Z,X)}function Y0(J){return J.length}function z1(J){return J.length}function y0(J,Z){return Z.push(J),J}var k1=Math.abs,p0=String.fromCharCode;function w1(J,Z,X,H,G,W,B,Y){return{value:J,root:Z,parent:X,type:H,props:G,children:W,line:Y1,column:v0,length:B,return:"",siblings:Y}}function U5(){return H0}function O5(){if(H0=O0>0?R0(m0,--O0):0,v0--,H0===10)v0=1,Y1--;return H0}function j0(){if(H0=O0<K5?R0(m0,O0++):0,v0++,H0===10)v0=1,Y1++;return H0}function E0(){return R0(m0,O0)}function s0(){return O0}function M1(J,Z){return P0(m0,J,Z)}function u0(J){switch(J){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function j5(J){return Y1=v0=1,K5=Y0(m0=J),O0=0,[]}function I5(J){return m0="",J}function K1(J){return B1(M1(O0-1,f1(J===91?J+2:J===40?J+1:J)))}function D5(J){while(H0=E0())if(H0<33)j0();else break;return u0(J)>2||u0(H0)>3?"":" "}function F5(J,Z){while(--Z&&j0())if(H0<48||H0>102||H0>57&&H0<65||H0>70&&H0<97)break;return M1(J,s0()+(Z<6&&E0()==32&&j0()==32))}function f1(J){while(j0())switch(H0){case J:return O0;case 34:case 39:if(J!==34&&J!==39)f1(H0);break;case 40:if(J===41)f1(J);break;case 92:j0();break}return O0}function L5(J,Z){while(j0())if(J+H0===57)break;else if(J+H0===84&&E0()===47)break;return"/*"+M1(Z,O0-1)+"*"+p0(J===47?J:j0())}function V5(J){while(!u0(E0()))j0();return M1(J,O0)}var Y1=1,v0=1,K5=0,O0=0,H0=0,m0="";function R5(J){return I5(U1("",null,null,null,[""],J=j5(J),0,[0],J))}function U1(J,Z,X,H,G,W,B,Y,M){var z=0,j=0,U=B,b=0,f=0,T=0,p=1,X0=1,s=1,i=0,m="",o=G,l=W,J0=H,d=m;while(X0)switch(T=i,i=j0()){case 40:if(T!=108&&R0(d,U-1)==58){if(M5(d+=_0(K1(i),"&","&\f"),"&\f",k1(z?Y[z-1]:0))!=-1)s=-1;break}case 34:case 39:case 91:d+=K1(i);break;case 9:case 10:case 13:case 32:d+=D5(T);break;case 92:d+=F5(s0()-1,7);continue;case 47:switch(E0()){case 42:case 47:if(y0(F8(L5(j0(),s0()),Z,X,M),M),(u0(T||1)==5||u0(E0()||1)==5)&&Y0(d)&&P0(d,-1,void 0)!==" ")d+=" ";break;default:d+="/"}break;case 123*p:Y[z++]=Y0(d)*s;case 125*p:case 59:case 0:switch(i){case 0:case 125:X0=0;case 59+j:if(s==-1)d=_0(d,/\f/g,"");if(f>0&&(Y0(d)-U||p===0&&T===47))y0(f>32?N5(d+";",H,X,U-1,M):N5(_0(d," ","")+";",H,X,U-2,M),M);break;case 59:d+=";";default:if(y0(J0=C5(d,Z,X,z,j,G,Y,m,o=[],l=[],U,W),W),i===123)if(j===0)U1(d,Z,J0,J0,o,W,U,Y,l);else{switch(b){case 99:if(R0(d,3)===110)break;case 108:if(R0(d,2)===97)break;default:j=0;case 100:case 109:case 115:}if(j)U1(J,J0,J0,H&&y0(C5(J,J0,J0,0,0,G,Y,m,G,o=[],U,l),l),G,l,U,Y,H?o:l);else U1(d,J0,J0,J0,[""],l,0,Y,l)}}z=j=f=0,p=s=1,m=d="",U=B;break;case 58:U=1+Y0(d),f=T;default:if(p<1){if(i==123)--p;else if(i==125&&p++==0&&O5()==125)continue}switch(d+=p0(i),i*p){case 38:s=j>0?1:(d+="\f",-1);break;case 44:Y[z++]=(Y0(d)-1)*s,s=1;break;case 64:if(E0()===45)d+=K1(j0());b=E0(),j=U=Y0(m=d+=V5(s0())),i++;break;case 45:if(T===45&&Y0(d)==2)p=0}}return W}function C5(J,Z,X,H,G,W,B,Y,M,z,j,U){var b=G-1,f=G===0?W:[""],T=z1(f);for(var p=0,X0=0,s=0;p<H;++p)for(var i=0,m=P0(J,b+1,b=k1(X0=B[p])),o=J;i<T;++i)if(o=B1(X0>0?f[i]+" "+m:_0(m,/&\f/g,f[i])))M[s++]=o;return w1(J,Z,X,G===0?G1:Y,M,z,j,U)}function F8(J,Z,X,H){return w1(J,Z,X,H1,p0(U5()),P0(J,2,-2),0,H)}function N5(J,Z,X,H,G){return w1(J,Z,X,q1,P0(J,0,H),P0(J,H+1,-1),H,G)}function O1(J,Z){var X="";for(var H=0;H<J.length;H++)X+=Z(J[H],H,J,Z)||"";return X}function P5(J,Z,X,H){switch(J.type){case w5:if(J.children.length)break;case B5:case z5:case q1:return J.return=J.return||J.value;case H1:return"";case Y5:return J.return=J.value+"{"+O1(J.children,H)+"}";case G1:if(!Y0(J.value=J.props.join(",")))return""}return Y0(X=O1(J.children,H))?J.return=J.value+"{"+X+"}":""}function E5(J){var Z=z1(J);return function(X,H,G,W){var B="";for(var Y=0;Y<Z;Y++)B+=J[Y](X,H,G,W)||"";return B}}class d0{nsp;settings;$head;constructor(J,Z){if(typeof J!=="string")throw new Error("Undefined or invalid styles attachement element(s) namespace");this.nsp=J,this.$head=T5.default("head"),this.settings=Z||{},this.settings&&this.load(this.settings)}compile(J){try{return O1(R5(J),E5([P5]))}catch(Z){throw new Error(`Style compilation failed: ${Z.message}`)}}waitForStyles(J){return new Promise((Z)=>{const X=new MutationObserver(()=>{const H=document.querySelector(J);if(H&&getComputedStyle(H).cssText)X.disconnect(),Z()});X.observe(document.documentElement,{attributes:!0,childList:!0,subtree:!0})})}async inject(J){if(!J)throw new Error("Invalid injection arguments");const Z=`rel="${this.settings.meta?"@":""}${this.nsp}"`;J=this.settings.meta?J:`[rel="${this.nsp}"] { ${J} }`;try{const X=this.compile(J);if(!X)throw new Error(`<component:${this.nsp}> sheet compilation failed`);const H=document.createElement("style");H.setAttribute("rel",`${this.settings.meta?"@":""}${this.nsp}`),H.textContent=X;let G=0;const W=this.$head.find(`style[${Z}]`);if(W.length)G=parseInt(W.attr("dindex"))+1,W.remove();return H.setAttribute("dindex",String(G)),this.settings.meta?document.head.prepend(H):document.head.appendChild(H),H}catch(X){throw new Error(`Style injection failed: ${X.message}`)}}async load(J){if(this.settings=J,typeof this.settings!=="object")throw new Error("Undefined styles settings");if(this.settings.sheet){const Z=await this.inject(this.settings.sheet);await this.waitForStyles(`style[rel="${this.settings.meta?"@":""}${this.nsp}"]`)}}get(){}async clear(){const J=this.$head.find(`style[rel="${this.settings.meta?"@":""}${this.nsp}"]`);if(!J.length)return;const Z=parseInt(J.attr("dindex"));Z===0?J.remove():J.attr("dindex",String(Z-1))}async custom(){return{}}async style(){return{}}}class j1{pending=new Map;isPending=!1;component;metrics={batchCount:0,updatesProcessed:0,lastBatchSize:0,avgBatchSize:"0.00"};constructor(J){this.component=J}queue(J){const Z=J.priority??2;if(!this.pending.has(Z))this.pending.set(Z,new Set);if(this.pending.get(Z)?.add(J),this.component.metrics.inc("dependencyUpdateCount"),!this.isPending)this.isPending=!0,this.scheduleProcessing()}apply({dep:J,deppath:Z},X="batch-updator"){try{const H=this.component.FGUD.get(J)?.get(Z);if(!H){console.warn(`[batch update]: <${Z}> dependency not found`);return}if(H.garbage){this.component.FGUD.get(J)?.delete(Z),!this.component.FGUD.get(J)?.size&&this.component.FGUD.delete(J);return}const G=this.component.FGUDMemory.get(H.nodepath);if(!G)return;const W=H.update(G.memo||{},X);if(W){if(typeof W.memo==="object")G.memo=W.memo;typeof W.cleanup==="function"&&W.cleanup()}}catch(H){console.error("Failed to update dependency --",H)}}scheduleProcessing(){Promise.resolve().then(()=>this.processQueue())}processQueue(){const J=new Map;this.pending.forEach((H,G)=>J.set(G,new Set(H))),this.pending.clear(),this.isPending=!1;const Z=(H)=>{const G=Array.from(H);this.component.metrics.trackBatch(G.length),this.metrics.batchCount++,this.metrics.lastBatchSize=G.length,this.metrics.updatesProcessed+=G.length,this.metrics.avgBatchSize=(this.metrics.updatesProcessed/this.metrics.batchCount).toFixed(2),G.forEach((W)=>this.apply(W))},X=Array.from(J.keys()).sort((H,G)=>H-G);for(let H of X){const G=J.get(H);G&&G.size&&Z(G)}if(this.pending.size>0&&!this.isPending)this.isPending=!0,this.scheduleProcessing()}getMetrics(){return{batchCount:this.metrics.batchCount,lastBatchSize:this.metrics.lastBatchSize,avgBatchSize:this.metrics.avgBatchSize,totalUpdates:this.metrics.updatesProcessed}}}class I1{options={emit:!0};__events={};__once_events={};constructor(J){if(J)this.options=J}on(J,Z){if(!Array.isArray(this.__events[J]))this.__events[J]=[];return this.__events[J].push(Z),this}once(J,Z){if(!Array.isArray(this.__once_events[J]))this.__once_events[J]=[];return this.__once_events[J].push(Z),this}off(J){return delete this.__events[J],delete this.__once_events[J],this}emit(J,...Z){if(!this.options.emit)return;const X=(G)=>{if(typeof G.toJSON==="function")return G.toJSON();if(Array.isArray(G))return G.map(X);if(typeof G==="object")for(let W in G)G[W]=X(G[W]);return G},H=Z.map(X);this.__events[J]?.forEach((G)=>G(...H)),this.__once_events[J]?.forEach((G)=>G(...H)),delete this.__once_events[J]}}var h1=e0(c0(),1);function B0(J,Z){if(J===Z)return!1;if(typeof J!=="object"||typeof Z!=="object")return!1;if(J===null||Z===null)return!0;if(J instanceof Set){if(!(Z instanceof Set))return!0;if(J.size!==Z.size)return!0;if(A5(J)&&A5(Z)){for(let B of J)if(!Z.has(B))return!0;return!1}const W=new WeakMap;for(let B of J){let Y=!1;if(typeof B!=="object"){if(Z.has(B))Y=!0}else for(let M of Z){if(typeof M!=="object")continue;if(!W.has(B))W.set(B,new WeakMap);const z=W.get(B);if(z.has(M)){if(Y=z.get(M),Y)break;continue}const j=!B0(B,M);if(z.set(M,j),j){Y=!0;break}}if(!Y)return!0}return!1}if(J instanceof Map){if(!(Z instanceof Map))return!0;if(J.size!==Z.size)return!0;if($5(J)&&$5(Z)){for(let[B,Y]of J)if(Z.get(B)!==Y)return!0;return!1}const W=new WeakMap;for(let[B,Y]of J){if(typeof B!=="object"){if(!Z.has(B))return!0;const j=Z.get(B);if(typeof Y!=="object"){if(Y!==j)return!0;continue}if(typeof j!=="object"||B0(Y,j))return!0;continue}let M=!1,z=!1;for(let[j,U]of Z){if(typeof j!=="object")continue;if(!W.has(B))W.set(B,new WeakMap);const b=W.get(B);if(b.has(j)){const[f,T]=b.get(j);if(f){M=!0,z=T;break}continue}if(!B0(B,j)){if(M=!0,z=typeof Y==="object"&&typeof U==="object"?!B0(Y,U):Y===U,b.set(j,[!0,z]),z)break}else b.set(j,[!1,!1])}if(!M||!z)return!0}return!1}if(Array.isArray(J)){if(!Array.isArray(Z))return!0;if(J.length!==Z.length)return!0;for(let W=0;W<J.length;W++){const B=J[W],Y=Z[W];if(B!==Y&&(typeof B!=="object"||B0(B,Y)))return!0}return!1}const X=Object.keys(J),H=Object.keys(Z);if(X.length!==H.length)return!0;X.sort(),H.sort();const G=X.length;for(let W=0;W<G;W++)if(X[W]!==H[W])return!0;for(let W=0;W<G;W++){const B=X[W],Y=J[B],M=Z[B];if(Y===M)continue;if(Y instanceof Date){if(!(M instanceof Date)||String(Y)!==String(M))return!0;continue}if(Y instanceof RegExp){if(!(M instanceof RegExp)||Y.source!==M.source||Y.flags!==M.flags)return!0;continue}if(Y instanceof Map){if(!(M instanceof Map)||B0(Y,M))return!0;continue}if(Y instanceof Set){if(!(M instanceof Set)||B0(Y,M))return!0;continue}if(Y instanceof Function){if(!(M instanceof Function))return!0;continue}if(typeof Y==="object"){if(typeof M!=="object")return!0;if(Y===J){if(M!==Z)return!0}else if(B0(Y,M))return!0}else return!0}return!1}function w0(J,Z){if(J===Z)return!0;if(J==null||Z==null)return J===Z;const X=typeof J;if(X!==typeof Z)return!1;if(X!=="object"){if(X==="number"&&isNaN(J)&&isNaN(Z))return!0;return!1}if(J instanceof Date)return Z instanceof Date&&J.getTime()===Z.getTime();if(J instanceof RegExp)return Z instanceof RegExp&&J.source===Z.source&&J.flags===Z.flags;if(J instanceof Error)return Z instanceof Error&&J.name===Z.name&&J.message===Z.message&&(J.stack===Z.stack||!J.stack&&!Z.stack);if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView(J)){if(!ArrayBuffer.isView(Z))return!1;if(J.byteLength!==Z.byteLength)return!1;const Y=new Uint8Array(J.buffer,J.byteOffset,J.byteLength),M=new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength);for(let z=0;z<Y.length;z++)if(Y[z]!==M[z])return!1;return!0}if(J instanceof Promise||J instanceof WeakMap||J instanceof WeakSet)return J===Z;if(typeof J==="function"){if(typeof Z!=="function")return!1;return J.toString()===Z.toString()&&J.name===Z.name}if(J.constructor!==Z.constructor)return!1;if(J instanceof Map||J instanceof Set||Array.isArray(J)||Object.getPrototypeOf(J)===Object.prototype)return!B0(J,Z);const G=Object.getPrototypeOf(J);if(G!==Object.getPrototypeOf(Z))return!1;const W=Object.getOwnPropertyNames(J),B=Object.getOwnPropertyNames(Z);if(W.length!==B.length)return!1;for(let Y of W){if(!Object.prototype.hasOwnProperty.call(Z,Y))return!1;if(!w0(J[Y],Z[Y]))return!1}if(G!==null&&G!==Object.prototype){const Y=Object.getOwnPropertyNames(G),M=Object.getOwnPropertyNames(Object.getPrototypeOf(Z));if(Y.length!==M.length)return!1;for(let z of Y){if(z==="constructor")continue;if(!w0(G[z],Object.getPrototypeOf(Z)[z]))return!1}}return!0}function A5(J){for(let Z of J)if(typeof Z==="object"&&Z!==null)return!1;return!0}function $5(J){for(let[Z,X]of J)if(typeof Z==="object"&&Z!==null||typeof X==="object"&&X!==null)return!1;return!0}function Q0(J,Z=new WeakMap){if(J===null||typeof J!=="object"||J instanceof Promise)return J;if(Z.has(J))return Z.get(J);if(J instanceof Date)return new Date(J.getTime());if(J instanceof RegExp)return new RegExp(J.source,J.flags);if(J instanceof Map){const G=new Map;return Z.set(J,G),J.forEach((W,B)=>G.set(Q0(B,Z),Q0(W,Z))),G}if(J instanceof Set){const G=new Set;return Z.set(J,G),J.forEach((W)=>G.add(Q0(W,Z))),G}if(Array.isArray(J)){const G=[];Z.set(J,G);for(let W=0;W<J.length;W++)G[W]=Q0(J[W],Z);return G}if(ArrayBuffer.isView(J))return new J.constructor(J);const X=Object.create(Object.getPrototypeOf(J));Z.set(J,X);const H=Object.getOwnPropertySymbols(J);for(let G of H)X[G]=Q0(J[G],Z);for(let G in J)if(Object.prototype.hasOwnProperty.call(J,G))X[G]=Q0(J[G],Z);return X}function _5(J,Z){if(!J||typeof J!=="object")throw new TypeError("Original argument must be an object");if(!Z||typeof Z!=="object")throw new TypeError("ToSet argument must be an object");if(!Object.keys(Z).length)return{...J};function X(G,W,B){const Y=W.split(/\.|\[|\]/).filter(Boolean);let M=G;for(let z=0;z<Y.length;z++){const j=Y[z],U=!isNaN(Number(j)),b=z===Y.length-1,f=!isNaN(Number(Y[z+1]));if(b){M[j]=B;continue}if(!(j in M))M[j]=f?[]:{};else if(f&&!Array.isArray(M[j]))M[j]=[];else if(!f&&Array.isArray(M[j]))M[j]={};M=M[j]}}const H=Q0(J);try{for(let[G,W]of Object.entries(Z)){if(typeof G!=="string")throw new TypeError(`Invalid path: ${G}`);if(!/^[a-zA-Z0-9_\-\[\].]+$/.test(G))throw new Error(`Invalid path format: ${G}`);X(H,G,W)}}catch(G){throw new Error(`Failed to assign value: ${G.message}`)}return H}function F1(J){return JSON.parse(JSON.stringify(J))}var S0="i18n",T0="syn:",L0="fn:",g0="on-",U0=/^\.\.\./,D1=/^\[(.*?)\]$/,_1=/{\s*([^{}]+)\s*}/g,S5=["@html","@text","@format"],b5=["display","visibility","position","width","height"],g5=":n",y1=":pr",x5="m",k5="c",f5="x",o0="*",h5=100;h1.default.fn.extend({attrs:function(){const J={},Z=this[0];return Z&&Z.nodeType!==Node.TEXT_NODE&&h1.default.each(Z.attributes,function(){J[this.name]=this.value}),J}});class L1{debug;initialStats={renderCount:0,elementCount:0,renderTime:0,avgRenderTime:0,maxRenderTime:0,componentCount:0,componentUpdateCount:0,partialCount:0,partialUpdateCount:0,memoryUsage:void 0,domOperations:0,domInsertsCount:0,domUpdatesCount:0,domRemovalsCount:0,i18nTrackCount:0,i18nUpdateCount:0,dependencyTrackCount:0,dependencyUpdateCount:0,batchSize:0,batchCount:0,errorCount:0};stats=this.reset();renderStartTime=0;renderTimes=[];measurementCount=0;maxMeasurements=100;loggingInterval=10;autoSaveInterval;constructor(J=!1){if(this.debug=J,this.debug)this.autoSaveInterval=window.setInterval(()=>this.storeMetrics(),5000)}storeMetrics(){try{const J=JSON.parse(localStorage.getItem("lipsPerformanceMetrics")||"[]");J.push({timestamp:Date.now(),metrics:{...this.stats}}),J.length>100&&J.shift(),localStorage.setItem("lipsPerformanceMetrics",JSON.stringify(J))}catch(J){}}startRender(){if(!this.debug)return;this.renderStartTime=performance.now()}endRender(){if(!this.debug||this.renderStartTime===0)return;const J=performance.now()-this.renderStartTime;this.stats.renderTime=J,this.stats.maxRenderTime=Math.max(this.stats.maxRenderTime,J),this.renderTimes.push(J),this.renderTimes.length>this.maxMeasurements&&this.renderTimes.shift(),this.stats.avgRenderTime=this.renderTimes.reduce((Z,X)=>Z+X,0)/this.renderTimes.length,this.renderStartTime=0,this.measurementCount++}inc(J){if(!this.debug)return;if(typeof this.stats[J]==="number")this.stats[J]++}dec(J){if(!this.debug)return;if(typeof this.stats[J]==="number"&&this.stats[J]>0)this.stats[J]--}record(J,Z){if(!this.debug)return;if(typeof this.stats[J]!=="undefined")this.stats[J]=Z}add(J,Z){if(!this.debug)return;if(typeof this.stats[J]==="number")this.stats[J]+=Z}reset(){return this.renderTimes=[],this.measurementCount=0,this.stats=Q0(this.initialStats)}log(){if(!this.debug)return;if(this.loggingInterval>1&&this.measurementCount%this.loggingInterval!==0)return;const J={"Render Count":this.stats.renderCount,"Element Count":this.stats.elementCount,"Avg Render Time (ms)":this.stats.avgRenderTime.toFixed(2),"Max Render Time (ms)":this.stats.maxRenderTime.toFixed(2)},Z={"Component Count":this.stats.componentCount,"Component Updates":this.stats.componentUpdateCount},X={"Partial Count":this.stats.partialCount,"Partial Updates":this.stats.partialUpdateCount},H={"DOM Operations":this.stats.domOperations,"DOM Inserts":this.stats.domInsertsCount,"DOM Updates":this.stats.domUpdatesCount,"DOM Removals":this.stats.domRemovalsCount},G={"i18n Tracked":this.stats.i18nTrackCount,"i18n Updates":this.stats.i18nUpdateCount},W={"Dependencies Tracked":this.stats.dependencyTrackCount,"Dependency Updates":this.stats.dependencyUpdateCount},B={"Batch Count":this.stats.batchCount,"Avg Batch Size":this.stats.batchCount>0?(this.stats.batchSize/this.stats.batchCount).toFixed(2):"0"};console.group("Lips Framework Performance Metrics"),console.table(J),console.table(Z),console.table(X),console.table(H),console.table(G),console.table(W),console.table(B),this.stats.memoryUsage&&console.log(`Memory Usage: ${this.stats.memoryUsage.toFixed(2)} MB`),this.stats.errorCount>0&&console.warn(`Errors encountered: ${this.stats.errorCount}`),console.groupEnd(),window.localStorage&&this.measurementCount%10===0&&this.storeMetrics()}trackMemory(){if(!this.debug||!window.performance?.memory)return;this.stats.memoryUsage=window.performance.memory.usedJSHeapSize/1048576}trackBatch(J){if(!this.debug)return;this.stats.batchCount++,this.stats.batchSize+=J}trackError(J){if(!this.debug)return;this.stats.errorCount++,console.error("Lips Framework Error:",J)}setLoggingInterval(J){if(!this.debug)return;this.loggingInterval=J}getSnapshot(){return Q0(this.stats)}dispose(){if(!this.debug)return;this.autoSaveInterval&&clearInterval(this.autoSaveInterval)}}var W0=e0(c0(),1);var L8=function(J){const Z=/on-([a-zA-Z-]+)\s*\(/g;let X=J,H;while((H=Z.exec(J))!==null){const G=H[1],W=H.index+H[0].length;let B=1,Y=W;while(Y<J.length&&B>0){if(J[Y]==="(")B++;if(J[Y]===")")B--;Y++}if(B===0){const M=J.slice(W,Y-1).trim(),z=J.slice(0,H.index),j=`${g0}${G}="${M}"`,U=J.slice(Y);X=z+j+U,J=X,Z.lastIndex=z.length+j.length}}return X},V8=function(J){const Z=[];let H=J.replace(/<([a-zA-Z][a-zA-Z0-9_-]*)((?:[^>'"]*|'[^']*'|"[^"]*")*?)(?:\/?>)/g,(G,W,B)=>{return Z.push(B),`<${W}##TAG_ATTRS_${Z.length-1}##>`});for(let G=0;G<Z.length;G++){const W=`##TAG_ATTRS_${G}##`,B=Z[G],Y=C8(B);H=H.replace(W,Y)}return H},C8=function(J){let Z="",X=0,H=!1,G="",W=0,B=0,Y=0;while(X<J.length){const M=J[X];if((M==='"'||M==="'")&&(X===0||J[X-1]!=="\\")){if(!H)H=!0,G=M;else if(M===G)H=!1}if(!H){if(M==="(")B++;else if(M===")")B--;else if(M==="{")Y++;else if(M==="}")Y--}if(!H&&B===0&&Y===0&&(M===" "||X===J.length-1)){let z=X;if(X===J.length-1)z=X+1;const j=J.substring(W,z).trim();if(j){const U=N8(j);Z+=" "+U}W=X+1}X++}return Z},N8=function(J){const Z=J.indexOf("=");if(Z===-1){if(J===S0||J.startsWith("...")||J.startsWith("["))return J;return`:${J}="${!J.startsWith("!")}"`}let X=J.substring(0,Z).trim(),H=J.substring(Z+1).trim();if(X.startsWith("@"))return X=!S5.includes(X)?X.slice(1):X,`:${X}=${H}`;if(X.startsWith(L0)||X.startsWith(g0))return J;if(H.startsWith('"')&&H.endsWith('"')||H.startsWith("'")&&H.endsWith("'")){const G=H.substring(1,H.length-1);if(R8(G))return`:${X}="${G}"`;return J}else return`:${X}="${H}"`};function R8(J){if(/\bstate\.|\binput\.|\bself\.|\bcontext\./.test(J))return!0;if(/[\+\*\/\%\(\)\{\}\[\]]|\?\s*:/.test(J))return!0;if(/\b[a-zA-Z_][a-zA-Z0-9_]*\.[a-zA-Z_]/.test(J))return!0;if(J.includes("{")&&J.includes("}"))return!0;return!1}function v1(J){let Z=(J||"").trim().replace(/>\s*</g,"><").replace(/\s{2,}/g," ").replace(/[\r\n\t]/g,"").replace(/<([a-zA-Z0-9_-]+)([^>]*?)\s*\/>/g,"<$1$2></$1>").replace(/<\{([^}]+)\}\s*(.*?)(\/)>/g,(X,H,G)=>{return G.endsWith("<")?`<lips dtag="${H}" ${G}/lips>`:`<lips dtag="${H}" ${G}></lips>`}).replace(/(<>)([\s\S]*?)(<\/>)/g,'<lips fragment="true">$2</lips>').replace(/<if\(\s*(.*?)\s*\)>/g,'<if @by="$1">').replace(/<else-if\(\s*(.*?)\s*\)>/g,'<else-if @by="$1">').replace(/<switch\(\s*(.*?)\s*\)>/g,'<switch @by="$1">').replace(/<async await\(\s*(.*?)\s*\)>/g,`<async ${L0}await="\$1">`).replace(/<log\(\s*(.*?)\s*\)>/g,'<log @args="$1">').replace(/\[(.*?)\]/g,(X)=>X.replace(/\s+/g,""));return Z=L8(Z),Z=V8(Z),Z}var P8=function(J,Z){if(J.isDisposed)return;Z.add(J),J.dependencies.add(Z)},v5=function(J){for(let Z of J.dependencies)Z.delete(J);J.dependencies.clear()};function x0(J,Z={maxSize:100}){const X=new Set,H=[{value:J,timestamp:Date.now()}];let G=0;const W=()=>{const z=V1[V1.length-1];return z&&P8(z,X),H[G].value},B=()=>{const z=[...X];if(y5)for(let j of z)y5.add(j);else for(let j of z)j.execute()};return[W,(z,j)=>{if(Object.is(H[G].value,z))return;if(G<H.length-1)H.splice(G+1);if(H.push({value:z,timestamp:Date.now(),metadata:j}),H.length>Z.maxSize)H.shift(),G=Math.max(0,G-1);else G++;B()},{undo(){if(G>0)G--,B()},redo(){if(G<H.length-1)G++,B()},jumpTo(z){if(z>=0&&z<H.length&&z!==G)G=z,B()},getHistory(){return[...H]},getCurrentIndex(){return G},canUndo(){return G>0},canRedo(){return G<H.length-1},clear(){const z=H[0];H.length=0,H.push(z),G=0,B()}}]}function l0(J){let Z=!1;const X=()=>{if(Z)throw new Error("Circular dependency detected");if(H.isDisposed)return;Z=!0,v5(H),V1.push(H);try{J()}finally{Z=!1,V1.pop()}},H={execute:X,dependencies:new Set,isDisposed:!1};return X(),{dispose:()=>{H.isDisposed=!0,v5(H)}}}var V1=[],y5=null;class k0 extends I1{declaration;$=null;input;state;static;context;__name__;__path__;__lang__;__template__;__previous;__macros=new Map;__i18nDeps=new Map;FGUD=new Map;FGUDMemory=new Map;PCC=new Map;VER=[];prepath="0";debug=!1;isRendered=!1;__setInput;__setState;__getState;UQS;ICE;lips;metrics;stylesheet;__inpath__="";__inpathCounter__=0;__renderDepth__=0;__boundaries__;constructor(J,Z,{input:X,state:H,context:G,_static:W,handler:B,stylesheet:Y,macros:M,declaration:z},j){super();if(this.lips=j.lips,j?.debug)this.debug=j.debug||this.lips.debug;if(j?.prepath)this.prepath=j.prepath;if(this.__name__=J,this.__lang__=this.lips.i18n.lang,this.__path__=this.__inpath__=`${this.prepath}:${this.__name__}`,this.__template__=v1(Z),this.__boundaries__=j.boundaries,this.declaration=z||{name:J},this.input=X||{},this.static=W||{},this.context={},this.state=this.lips.IUC.proxyState(this.__path__,H||{}),M&&this.setMacros(M),B&&this.setHandler(B),Y&&this.setStylesheet(Y),this.metrics=new L1(this.debug),this.metrics.inc("componentCount"),this.UQS=new j1(this),typeof this.onCreate=="function"&&this.onCreate.bind(this)(),this.emit("component:create"),this.input&&Object.keys(this.input).length&&typeof this.onInput=="function")this.onInput.bind(this)(),this.emit("component:input");this.__previous={state:Q0(this.state),input:Q0(this.input),context:Q0(this.context)};const[U,b]=x0(this.input),[f,T]=x0(this.state),[p,X0]=x0(this.context);this.__setInput=b,this.__setState=T,this.__getState=f,this.lips.IUC.register(this.__path__,()=>{B0(this.__previous?.state,this.state)&&this.__setState({...this.__getState(),...this.state})}),Array.isArray(G)&&G.length&&this.lips.useContext(G,(s)=>{if(!B0(this.context,s))return;X0(s),this.context=s,typeof this.onContext=="function"&&this.onContext.bind(this)(),this.emit("component:context")}),this.lips.useTranslator("*",(s)=>{if(s===this.__lang__)return;this.__updateI18nDepNodes__(),this.__lang__=s}),this.ICE=l0(()=>{const s=f(),i=this.input=U(),m=this.context=p();if(!this.isRendered){if(this.metrics.reset(),!this.__template__.length||z?.syntax&&typeof this.onSelfRender=="function"){const o=this.onSelfRender.bind(this)(this.input);if(!this.__boundaries__?.start||!this.__boundaries__?.end)throw new Error(`Undefined <${this.__name__} syntax component boundaries`);this.$=o||W0.default()}else{const{$log:o}=this.render("",void 0,void 0,this.FGUD);this.$=o}!z?.syntax&&this.$?.each((o,l)=>{typeof l.setAttribute=="function"&&l.setAttribute("rel",this.__name__)}),this.isRendered=!0,typeof this.onMount=="function"&&this.onMount.bind(this)(),this.emit("component:mount"),this.lips.watcher.watch(this)}else this.__updateDepNodes__(),typeof this.onUpdate=="function"&&this.onUpdate.bind(this)(),this.emit("component:update"),this.__previous={input:Q0(i),state:Q0(s),context:Q0(m)};typeof this.onRender=="function"&&this.onRender.bind(this)(),this.emit("component:render")})}setContext(J,Z){this.lips.setContext(J,Z)}setInput(J,Z){if(!B0(this.input,J))return;this.__setInput(J),typeof this.onInput=="function"&&this.onInput.bind(this)(this.declaration.syntax?Z:void 0)}subInput(J,Z){if(typeof J!=="object")throw new Error("Invalid sub input data argument");return this.setInput(_5(this.input,J),this.declaration.syntax?Z:void 0),this}setMacros(J){const Z=v1(J),X=W0.default(Z);if(!X.length)return;const H=this;X.each(function(){const G=W0.default(this),{argv:W,attrs:B}=H.__getAttributes__(G);if(!Object.keys(B))throw new Error("Invalid macro component definition");if(!B.literals.name)throw new Error("Undefined macro `name` attribute.");if(H.__macros.get(B.literals.name))console.warn(`Duplicate macro <${B.literals.name}> will be override`);if(!G.contents()?.length)throw new Error("Invalid macro component definition. Template content expected.");H.__macros.set(B.literals.name,{argv:W,$node:G})})}setHandler(J){Object.entries(J).map(([Z,X])=>this[Z]=X?.bind(this))}setStylesheet(J){const Z={sheet:J,meta:this.__name__==="__ROOT__"};this.stylesheet=new d0(this.__name__,Z)}get node(){if(!this.isRendered)throw new Error("node() is expected to be call after component get rendered");return this.$}get boundaries(){return this.__boundaries__}render(J,Z,X={},H,G){if(Z&&!Z.length)return console.warn("Undefined node element to render"),{$log:Z,dependencies:H||new Map};const W=this,B=H||new Map,Y=[];this.metrics.startRender();let M=W0.default();function z(){return Q0(X)}function j(K,D=!1){const I=U(K,D);return W.__inpathCounter__++,W.__inpath__?`${W.__inpath__}/${I}`:`${J?J+"/":""}${I}`}function U(K,D=!1){let I="";switch(K){case"component":I=D?f5:k5;break;case"macro":I=x5;break}return I+W.__inpathCounter__}function b(K){return K!==null&&typeof K==="object"&&typeof K.mesh==="function"&&typeof K.update==="function"}function f(K){return K!==null&&typeof K==="object"&&typeof K.default&&typeof K.default==="string"}function T(K){if(!K.attr(":dtag")||K.prop("tagName")!=="LIPS")throw new Error("Invalid dynamic tag name");const D=K.attr(":dtag"),I=W.__evaluate__(D,X);if(b(I)||I===null)return i(K,D,I);else if(f(I))return m(K,{template:I});else return m(K,{name:I})}function p(K){const D=K.attr(":args"),I=j("log");if(!D)return;const N=z();if(W.__evaluate__(`console.log(${D})`,N),W.__isReactive__(D,N))W.__extractExpressionDeps__(D,N).forEach((P)=>W.__trackDep__(B,P,N,{nodetype:"log",nodepath:I,target:"argument",$fragment:null,update:($)=>W.__evaluate__(`console.log(${D})`,$),syntax:!0}))}function X0(K){const D=j("var"),{attrs:I}=W.__getAttributes__(K);if(!I)return;Object.entries(I.literals).forEach(([N,L])=>{if(X[N]&&X[N].type==="const")throw new Error(`Cannot override <const ${N}=[value]/> variable`);X[N]={value:L,type:"let"}}),Object.entries(I.expressions).forEach(([N,L])=>{if(X[N]&&X[N].type==="const")throw new Error(`Cannot override <const ${N}=[value]/> variable`);if(X[N]={value:W.__evaluate__(L,X),type:"let"},W.__isReactive__(L,X)){const P=W.__extractExpressionDeps__(L,X),$=(u,n)=>{if(u[N]&&u[N].type==="const")throw new Error(`Cannot override <const ${N}=[value]/> variable`);if(I.map.beforeSpreadAttrs.includes(N))return;const x=W.__evaluate__(L,u);if(w0(u[N].value,x))return;return u[N]={value:x,type:"let"},W.__updateVarDepNodes__(N,D,u),F1({memo:u})};P.forEach((u)=>W.__trackDep__(B,u,z(),{nodetype:"let",nodepath:D,deppath:`${D}.${N}`,target:"attr",$fragment:null,update:$,syntax:!0}))}}),W.metrics.inc("elementCount")}function s(K){const{attrs:D}=W.__getAttributes__(K);if(!D)return;Object.entries(D.literals).forEach(([I,N])=>{if(X[I]&&X[I].type==="const")throw new Error(`<const ${I}=[value]/> variable already defined`);if(!N)return;X[I]={value:N,type:"const"}}),Object.entries(D.expressions).forEach(([I,N])=>{if(X[I]&&X[I].type==="const")throw new Error(`<const ${I}=[value]/> variable already defined`);if(!N)return;X[I]={value:W.__evaluate__(N,X),type:"const"}}),W.metrics.inc("elementCount")}function i(K,D,I){const{attrs:N}=W.__getAttributes__(K),L=j("element"),P=W.__getBoundaries__(L),$={},u={};let n=z(),x=W0.default(P.start),k={},C=I;if(C){N.literals&&Object.entries(N.literals).forEach(([R,h])=>{$[R]=h,k[R]={type:"arg",value:h}}),N.expressions&&Object.entries(N.expressions).forEach(([R,h])=>{if(!C)return;if(U0.test(R))W.__evaluateSpreadAttr__(R,{memo:n,get keystore(){return u[R]},set keystore(F){if(!u[R])u[R]=[];u[R]=F},each:(F,E)=>{if($[F]=E,!C?.argv.includes(F))return;k[F]={type:"arg",value:E}}});else{const F=h?W.__evaluate__(h,n):!0;if($[R]=F,!C.argv.includes(R))return;k[R]={type:"arg",value:F}}}),n.__arguments__=$;const v=C.mesh(k);if(v&&v.length)x=x.add(v);N.expressions&&Object.entries(N.expressions).forEach(([R,h])=>{if(!C)return;if(U0.test(R)&&W.__isReactive__(R,n)){const F=W.__extractExpressionDeps__(R,n),E=(_,S)=>{if(!C)return;const g={};let a=[];if(W.__evaluateSpreadAttr__(R,{memo:_,get keystore(){return u[R]},set keystore(c){if(!u[R])u[R]=[];u[R]=c},each:(c,t)=>{if(N.map.afterSpreadAttrs.includes(c))return;if(!C?.argv.includes(c))return;if(w0(t,_[c]?.value))return;k[c]=g[c]={value:t,type:"arg"},$[c]=t,a.push(c)},nullify:(c)=>{c.forEach((t)=>{g[t]={value:void 0,type:"arg"},delete $[t]}),a=c}}),a.length)C.argv.length&&W.__updateArgumentsDepNodes__(L,$),C.update(a,g,_,P)};F.forEach((_)=>W.__trackDep__(B,_,n,{nodetype:"dynamic",nodepath:L,deppath:`${L}.${R}`,target:"spread-attr",$fragment:null,boundaries:P,update:E}))}else if(C.argv.includes(R)&&W.__isReactive__(h,n)){const F=W.__extractExpressionDeps__(h,n),E=(_,S)=>{if(!C)return;if(N.map.beforeSpreadAttrs.includes(R))return;const g=h?W.__evaluate__(h,_):!0,a={type:"arg",value:g};if(k[R]=a,C.argv.length)$[R]=g,W.__updateArgumentsDepNodes__(L,$);C.update([R],{[R]:a},_,P)};F.forEach((_)=>W.__trackDep__(B,_,n,{nodetype:"dynamic",nodepath:L,deppath:`${L}.${R}`,target:"attr",$fragment:null,boundaries:P,update:E}))}})}if(W.__isReactive__(D,n)){const v=(h,F)=>{const E=W.__evaluate__(D,h);let _;if(f(E))_=m(K,{template:E}),W.__fillBoundaries__(_,P);else if(b(E)){if(Object.entries(k).forEach(([S,g])=>{if(typeof g==="function")return;$[S]=g.value}),C?.cleanup(P),C=E,C)C.argv.length&&W.__updateArgumentsDepNodes__(L,$),_=C.mesh(k),_?.length&&C.fill(_,P)}else if(C)C.cleanup(P),C=null};W.__extractExpressionDeps__(D,n).forEach((h)=>W.__trackDep__(B,h,{...n,...k},{nodetype:"dynamic",nodepath:L,deppath:`${L}.dtag`,target:"dtag",$fragment:null,boundaries:P,update:v}))}return x=x.add(P.end),x}function m(K,D){let I,N;if(D?.template)I=D.template,N=U("component",I.declaration?.syntax);else{if(N=D?.name||K.prop("tagName")?.toLowerCase(),!N)throw new Error("Invalid component");if(N===W.__name__)throw new Error("Render component within itself is forbidden");I=W.lips.import(N)}if(!I||!N)throw new Error(`<${N}> template not found`);const L=j("component",I.declaration?.syntax),P=`${L}#${N}`,$=W.__getBoundaries__(L),{argv:u,functions:n,attrs:x,events:k}=W.__getAttributes__(K),C={},v={};let R={},h=W0.default($.start),F=W.PCC.get(P),E=z();x.literals&&Object.entries(x.literals).forEach(([S,g])=>{if(S=="key")return;R[S]=g}),n&&Object.entries(n).forEach(([S,g])=>{R[S]=W.__evaluateFunction__(g,[],E),I.declaration?.syntax?C[T0+L0+S]=g:C[L0+S]=g}),x.expressions&&Object.entries(x.expressions).forEach(([S,g])=>{if(S=="key")return;if(U0.test(S))W.__evaluateSpreadAttr__(S,{memo:E,get keystore(){return v[S]},set keystore(a){if(!v[S])v[S]=[];v[S]=a},each:(a,c)=>R[a]=c});else R[S]=g?W.__evaluate__(g,E):!0;I.declaration?.syntax?C[T0+S]=g:C[S]=g});const _=K.contents();if(_.length){if(R={...R,...W.__meshwire__({$node:K,fragmentPath:L,fragmentBoundaries:$,meshPath:null,scope:E,argv:u,xmlns:G,useAttributes:!0,declaration:I.declaration},C)},I.declaration){if(I.declaration.tags){let S;Object.entries(I.declaration?.tags).forEach(([g,{type:a,many:c,alts:t}])=>{switch(a){case"nexted":{let Z0=K.next(g);if(!Z0.length&&Array.isArray(t)&&S?.length&&S.is(t.join(",")))Z0=S.next(g);if(!Z0.length)return;if(c){R[g]=[];let e=0,z0=!1;while(!z0){if(R[g].push(W.__meshwire__({$node:Z0,meshPath:`${g}[${e}]`,fragmentPath:L,fragmentBoundaries:$,scope:E,argv:u,xmlns:G,useAttributes:!0,declaration:I.declaration},C)),!Z0.next(g).length){z0=!0;break}Z0=S=Z0.next(g),e++}}else R[g]=W.__meshwire__({$node:Z0,meshPath:g,fragmentPath:L,fragmentBoundaries:$,scope:E,argv:u,xmlns:G,useAttributes:!0,declaration:I.declaration},C)}break;case"child":{const Z0=K.children(g);if(c)R[g]=[],Z0.each(function(e){const z0=W0.default(this),{argv:I0}=W.__getAttributes__(z0);R[g].push(W.__meshwire__({$node:z0,meshPath:`${g}[${e}]`,fragmentPath:L,fragmentBoundaries:$,scope:E,argv:I0,xmlns:G,useAttributes:!0,declaration:I.declaration},C))});else if(K.children(g).first().length){const e=K.children(g).first(),{argv:z0}=W.__getAttributes__(e);R[g]=W.__meshwire__({$node:e,meshPath:g,fragmentPath:L,fragmentBoundaries:$,scope:E,argv:z0,xmlns:G,useAttributes:!0,declaration:I.declaration},C)}}break}})}else if(I.declaration.contents)R.__contents__=_}}if(F)F.setInput(Q0(R)),h=h.add(F.node);else{const{declaration:S,state:g,_static:a,handler:c,context:t,default:Z0,stylesheet:e}=I;F=new k0(N,Z0||"",{state:Q0(g),input:Q0(R),context:t,_static:Q0(a),handler:c,stylesheet:e,declaration:S},{debug:W.debug,lips:W.lips,prepath:L,boundaries:$}),h=h.add(F.node),!I.declaration?.syntax&&W.PCC.set(P,F)}return h=h.add($.end),Object.entries(k).forEach(([S,g])=>{W.__attachEvent__({nodepath:L,element:F,_event:S,instruction:g,scope:E,get __dependencies__(){return B}})}),C&&Object.entries(C).forEach(([S,g])=>{let a=!1,c=!1;if(S.startsWith(T0))a=!0,S=S.replace(T0,"");if(S.startsWith(L0))c=!0,S=S.replace(L0,"");if(U0.test(S)){if(W.__isReactive__(S,E)){const t=(e)=>{const z0={};W.__evaluateSpreadAttr__(S,{memo:e,get keystore(){return v[S]},set keystore(I0){if(!v[S])v[S]=[];v[S]=I0},each:(I0,f0)=>{if(x.map.afterSpreadAttrs.includes(I0))return;z0[I0]=f0},nullify:(I0)=>I0.forEach((f0)=>z0[f0]=void 0)}),F?.subInput(z0,e)};W.__extractExpressionDeps__(S,E).forEach((e)=>W.__trackDep__(B,e,E,{nodetype:"component",nodepath:L,deppath:`${L}.${S}`,target:"spread-attr",$fragment:null,boundaries:$,update:t,syntax:a}))}}else if(W.__isReactive__(g,E)){const t=(e)=>{if(x.map.beforeSpreadAttrs.includes(S))return;const z0=c?W.__evaluateFunction__(g,[],e):g?W.__evaluate__(g,e):!0;F?.subInput({[S]:z0},e)};W.__extractExpressionDeps__(g,E).forEach((e)=>W.__trackDep__(B,e,E,{nodetype:"component",nodepath:L,deppath:`${L}.${S}`,target:"attr",$fragment:null,boundaries:$,update:t,syntax:a}))}}),W.metrics.inc("componentCount"),h}function o(K){const D=K.prop("tagName")?.toLowerCase();if(!D)throw new Error("Invalid macro rendering call");const I=W.__macros.get(D);if(!I)throw new Error("Macro component not found");const N=j("macro"),L=W.__getBoundaries__(N),{attrs:P}=W.__getAttributes__(K),$={},u=z(),n={},x={};P.literals&&Object.entries(P.literals).forEach(([F,E])=>{n[F]=E,x[F]={value:E,type:"arg"}});const k={};P.expressions&&Object.entries(P.expressions).forEach(([F,E])=>{if(U0.test(F))W.__evaluateSpreadAttr__(F,{memo:u,get keystore(){return k[F]},set keystore(_){if(!k[F])k[F]=[];k[F]=_},each:(_,S)=>{if(n[_]=S,I.argv.includes(_))x[_]={value:S,type:"arg"}}}),$[F]=E;else{const _=E?W.__evaluate__(E,u):!0;if(n[F]=_,I.argv.includes(F))x[F]={value:_,type:"arg"},$[F]=E}I.argv.forEach((_)=>{if(x[_]!==void 0)return;x[_]={value:!1,type:"arg"}})}),x.__arguments__=n;let C=W0.default(L.start);const v={$node:I.$node,meshPath:null,fragmentPath:N,fragmentBoundaries:L,argv:I.argv,scope:u,xmlns:G,useAttributes:!0},R=W.__meshwire__(v,$),h=R.renderer.mesh(x,u);return C=C.add(h),$&&Object.entries($).forEach(([F,E])=>{let _=!1;if(new RegExp(`^${T0}`).test(F))_=!0,F=F.replace(T0,"");if(U0.test(F)){if(!W.__isReactive__(F,u))return;const S=W.__extractExpressionDeps__(F,u),g=(a)=>{const c={};let t=[];if(W.__evaluateSpreadAttr__(F,{memo:a,get keystore(){return k[F]},set keystore(Z0){if(!k[F])k[F]=[];k[F]=Z0},each:(Z0,e)=>{if(P.map.afterSpreadAttrs.includes(Z0))return;if(w0(e,a[Z0]?.value))return;c[Z0]={value:e,type:"arg"},n[Z0]=e,t.push(Z0)},nullify:(Z0)=>{Z0.forEach((e)=>{c[e]={value:void 0,type:"arg"},delete n[e]}),t=Z0}}),t.length)W.__updateArgumentsDepNodes__(N,n),R.renderer.update(t,c,a);return F1({memo:{...a,...c}})};S.forEach((a)=>W.__trackDep__(B,a,{...u,...x},{nodetype:"macro",nodepath:N,deppath:`${N}.${F}`,target:"spread-attr",$fragment:null,boundaries:L,update:g,syntax:_}))}else if(W.__isReactive__(E,u)){const S=W.__extractExpressionDeps__(E,u),g=(a)=>{if(P.map.beforeSpreadAttrs.includes(F))return;const c=E?W.__evaluate__(E,a):!0;return n[F]=c,W.__updateArgumentsDepNodes__(N,n),R.renderer.update([F],{[F]:{value:c,type:"arg"}},a),F1({memo:a})};S.forEach((a)=>W.__trackDep__(B,a,{...u,...x},{nodetype:"macro",nodepath:N,deppath:`${N}.${F}`,target:"attr",$fragment:null,boundaries:L,update:g,syntax:_}))}}),C=C.add(L.end),W.metrics.inc("elementCount"),C}function l(K){if(!K.length||!K.prop("tagName"))return K;const D=K.is("svg")||G,I=D?W0.default(document.createElementNS("http://www.w3.org/2000/svg",K.prop("tagName").toLowerCase())):W0.default(`<${K.prop("tagName").toLowerCase()}/>`),N=K.contents(),L=j("element"),P=z();N.length&&I.append(W.__withPath__(L,()=>W.render(L+g5,N,P,B,D).$log));const{attrs:$,events:u}=W.__getAttributes__(K);$.literals&&Object.entries($.literals).forEach(([x,k])=>{if(x===S0)return;const C=K.is(`[${S0}]`)&&["title","placeholder"].includes(x);I.attr(x,C?W.lips.i18n.translate(k).text:k);const v=(R)=>{I.attr(x,C?W.lips.i18n.translate(k).text:k),C&&W.__trackTranslationDep__(R,{nodetype:"element",nodepath:L,deppath:`${L}.${x}`,target:"attr",$fragment:I,update:v})};C&&W.__trackTranslationDep__(P,{nodetype:"element",nodepath:L,deppath:`${L}.${x}`,target:"attr",$fragment:I,update:v})});const n=(x,k=!1)=>{x&&Object.entries(x).forEach(([C,v])=>{switch(C){case"@html":{const R=(h)=>{I.html(W.__evaluate__(v,h))};if(R(P),k&&W.__isReactive__(v,P))W.__extractExpressionDeps__(v,P).forEach((F)=>W.__trackDep__(B,F,P,{nodetype:"element",nodepath:L,deppath:`${L}.${C}`,target:"meta-attr",$fragment:I,update:R}))}break;case"@text":{const R=K.is(`[${S0}]`),h=(F)=>{I.text(W.__evaluate__(v,F,{translate:R})),R&&W.__trackTranslationDep__(F,{nodetype:"element",nodepath:L,deppath:`${L}.${C}`,target:"meta-attr",$fragment:I,update:h})};if(h(P),k&&W.__isReactive__(v,P))W.__extractExpressionDeps__(v,P).forEach((E)=>W.__trackDep__(B,E,P,{nodetype:"element",nodepath:L,deppath:`${L}.${C}`,target:"meta-attr",$fragment:I,update:h}));R&&W.__trackTranslationDep__(P,{nodetype:"element",nodepath:L,deppath:`${L}.${C}`,target:"meta-attr",$fragment:I,update:h})}break;case"@format":{const[R,h]=v.split(",").map((E)=>E.trim());if(!R)throw new Error("Invalid @format reference");if(!h)throw new Error("Invalid @format parameters");const F=(E)=>{const _=W.__evaluate__(`!${h.trim()}`,E);if(typeof _!=="object")throw new Error("Invalid @format parameters");const S=W.lips.i18n.format(R,_);S!==void 0&&I.text(S),W.__trackTranslationDep__(E,{nodetype:"element",nodepath:L,deppath:`${L}.${C}`,target:"meta-attr",$fragment:I,update:F})};F(P),W.__extractExpressionDeps__(h,P).forEach((E)=>W.__trackDep__(B,E,P,{nodetype:"element",nodepath:L,deppath:`${L}.${C}`,target:"meta-attr",$fragment:I,update:F}))}break;case"style":if(k&&W.__isReactive__(v,P)){const R=(F)=>{const E=W.__evaluate__(v,F);if(typeof E==="object"){let _="";Object.entries(E).forEach(([S,g])=>_+=`${S}:${g};`),_.length&&I.attr("style",_)}else I.attr("style",E)};R(P),W.__extractExpressionDeps__(v,P).forEach((F)=>W.__trackDep__(B,F,P,{nodetype:"element",nodepath:L,deppath:`${L}.${C}`,target:"attr",$fragment:I,update:R}))}else I.attr("style",v);break;default:{const R=K.is(`[${S0}]`)&&["title","placeholder"].includes(C),h=(F)=>{const E=v&&W.__isReactive__(v,P)?W.__evaluate__(v,F,{translate:R}):v!==void 0?v:!0;if(E===void 0||E===!1)I.removeAttr(C);else I.attr(C,E),R&&W.__trackTranslationDep__(F,{nodetype:"element",nodepath:L,deppath:`${L}.${C}`,target:"attr",$fragment:I,update:h})};if(h(P),k&&W.__isReactive__(v,P))W.__extractExpressionDeps__(v,P).forEach((E)=>W.__trackDep__(B,E,P,{nodetype:"element",nodepath:L,deppath:`${L}.${C}`,target:"attr",$fragment:I,update:h}));R&&W.__trackTranslationDep__(P,{nodetype:"element",nodepath:L,deppath:`${L}.${C}`,target:"attr",$fragment:I,update:h})}}})};return $.expressions&&Object.keys($.expressions).forEach((x)=>{if(!U0.test(x))return;let k=[];const C=(v,R,h=!1)=>{const F={};W.__evaluateSpreadAttr__(x,{memo:v,get keystore(){return k},set keystore(E){k=E},each:(E,_)=>{if(!h&&$.map.afterSpreadAttrs.includes(E))return;F[E]=_},nullify:(E)=>E.forEach((_)=>I.removeAttr(_))}),Object.keys(F).length&&n(F)};if(delete $.expressions[x],C(P,"",!0),x&&W.__isReactive__(x,P))W.__extractExpressionDeps__(x,P).forEach((R)=>W.__trackDep__(B,R,P,{nodetype:"element",nodepath:L,deppath:`${L}.${x}`,target:"spread-attr",$fragment:I,update:C}))}),n($.expressions,!0),u&&Object.entries(u).forEach(([x,k])=>{Y.push({nodepath:L,element:I,_event:x,instruction:k,scope:P,get __dependencies__(){return B}})}),W.metrics.inc("elementCount"),W.metrics.inc("domInsertsCount"),I}function J0(K){const D=K.text(),I=z(),N=j("element"),L=K.parent().is(`[${S0}]`),P=W0.default(document.createTextNode(W.__interpolate__(D,I,L))),$=(u)=>{const n=W.__interpolate__(D,u,L);if(!P[0])return;P[0].textContent=n,L&&W.__trackTranslationDep__(u,{nodetype:"text",nodepath:N,target:"value",$fragment:P,update:$})};if(D&&W.__isReactive__(D,I))W.__extractTextDeps__(D,I).forEach((n)=>W.__trackDep__(B,n,I,{nodetype:"text",nodepath:N,deppath:`${N}.${n}`,target:"value",$fragment:P,update:$}));return L&&W.__trackTranslationDep__(I,{nodetype:"text",nodepath:N,target:"value",$fragment:P,update:$}),W.metrics.inc("elementCount"),W.metrics.inc("domInsertsCount"),P}function d(K){if(K.get(0)?.nodeType===Node.COMMENT_NODE)return K;if(K.get(0)?.nodeType===Node.TEXT_NODE)return J0(K);if(K.is("let"))return X0(K);else if(K.is("const"))return s(K);else if(K.is("lips")&&K.attr(":dtag"))return T(K);else if(K.is("log"))return p(K);else if(W.__macros.has(K.prop("tagName")?.toLowerCase()))return o(K);else if(K.is("if, for, switch, async")||W.lips.has(K.prop("tagName")?.toLowerCase()))return m(K);else if(K.is("else-if, else"))return;return l(K)}try{this.__renderDepth__++,Z=!Z&&W0.default(this.__template__).length>1?W0.default("<template>").html(this.__template__).contents():Z||W0.default(this.__template__),Z.each(function(){const K=d(W0.default(this));if(K)M=M.add(K)}),Y.forEach(this.__attachEvent__.bind(this)),W.metrics.inc("renderCount")}catch(K){console.error("Rendering Failed --",K),W.metrics.trackError(K)}finally{if(this.__renderDepth__--,this.metrics.endRender(),this.metrics.trackMemory(),this.__renderDepth__===0)this.__inpath__="",this.__inpathCounter__=0}return{$log:M,dependencies:B,events:Y}}destroy(){this.ICE.dispose(),this.stylesheet?.clear(),this.metrics.dispose(),this.lips.IUC.unregister(this.__path__),this.lips.watcher.unwatch(this),this.VER.forEach(this.__detachEvent__.bind(this)),this.VER=[];for(let J in this.PCC){const Z=this.PCC.get(J);Z?.destroy(),Z?.delete(J)}if(this.$?.remove(),this.PCC?.clear(),this.FGUD?.clear(),this.FGUDMemory?.clear(),this.__macros.clear(),this.__i18nDeps.clear(),this.__previous=null,this.state=null,this.input=null,this.context=null,this.$)this.$.each((J,Z)=>{W0.default(Z).off()}),this.$=null;typeof this.onDestroy==="function"&&this.onDestroy.bind(this)(),this.emit("component:destroy")}__meshwire__(J,Z){const X=this,{$node:H,meshPath:G,fragmentPath:W,fragmentBoundaries:B,argv:Y,xmlns:M,declaration:z,useAttributes:j}=J;let U;const b=new Map,f=W+y1,T=(i,m,o)=>{if(U=H.contents(),!U?.length)return null;m=m||J.scope;const l=f+(o||""),{$log:J0,dependencies:d,events:K}=X.__withPath__(l,()=>{return X.render(l,U,{...m,...i},void 0,M)}),D=o||o0;return!b.has(D)&&b.set(D,new Set),b.get(D)?.add(l),d?.forEach((I,N)=>{!X.FGUD?.has(N)&&X.FGUD.set(N,new Map),I.forEach((L,P)=>{if(L.garbage)return;L.partial?.length?L.partial.push(l):L.partial=[l],X.FGUD.get(N)?.set(P,L)})}),X.metrics.inc("partialCount"),J0},p=(i,m,o,l,J0)=>{if(!b.get(J0||o0)?.size)return;o=o||J.scope,l=l||B,X.metrics.startRender();const d=Array.from(b.get(J0||o0)||[]);i.forEach((K)=>{const D=X.FGUD.get(K);if(!D)return;D.forEach((I)=>{const N=d.find(($)=>{return I.partial?.find((u)=>$==u||X.__hasSamePathParent__(u,$))});if(!I.partial||!N)return;const L=I.deppath||I.nodepath,P=this.FGUDMemory.get(I.nodepath);if(I.garbage||l?.start&&!document.contains(l.start)){D.delete(L),X.__unbindMemo__(I);return}if(!P){console.warn(`unexpected occurence: <${L}> has no memo`);return}if(P.memo?.[K]&&m?.[K]&&!w0(P.memo[K],m[K]))P.memo={...o,...P.memo,...m};X.UQS.queue({dep:K,deppath:L,priority:I.priority}),X.metrics.inc("dependencyUpdateCount")}),!D.size&&X.FGUD.delete(K)}),X.metrics.inc("partialUpdateCount"),X.metrics.endRender()},X0=(i,m)=>{if(X.FGUD.forEach((o,l)=>{o.forEach((J0,d)=>{if(!X.__hasSamePathParent__(d,f+(m||"")))return;X.__unbindMemo__(J0),J0.garbage=!0}),!o.size&&X.FGUD.delete(l)}),b.delete(typeof m==="string"&&m||o0),i=i||B,X.__emptyBoundaries__(i),m)i.start.remove(),i.end.remove()},s={renderer:{path:G,argv:Y,mesh:T,update:p,cleanup:X0,fill(i,m){X.__fillBoundaries__(i,m||B)},demarcate(i,m){const o=X.__getBoundaries__(f+(m||""));let l=W0.default(o.start);return l=l.add(i),l=l.add(o.end),{$partial:l,boundaries:o}}}};if(j&&G){const{attrs:i}=X.__getAttributes__(H);i.literals&&Object.entries(i.literals).forEach(([m,o])=>s[m]=o),i.expressions&&Object.entries(i.expressions).forEach(([m,o])=>{if(U0.test(m)){let l=[];X.__evaluateSpreadAttr__(m,{memo:J.scope,get keystore(){return l},set keystore(J0){l=J0},each:(J0,d)=>s[J0]=d}),Z[`${z?.syntax?T0:""}${G}.${m}`]=o}else s[m]=o?X.__evaluate__(o,J.scope):!0,Z[`${z?.syntax?T0:""}${G}.${m}`]=o})}return s}__getBoundaries__(J){return this.metrics.inc("domOperations"),this.metrics.inc("domInsertsCount"),{start:document.createComment(`s:${J}`),end:document.createComment(`e:${J}`)}}__emptyBoundaries__(J){const Z=[];let X=J.start.nextSibling;while(X&&X!==J.end)Z.push(X),X=X.nextSibling;W0.default(Z).remove()}__fillBoundaries__(J,Z){if(!document.contains(Z.start)||!document.contains(Z.end)){console.warn("Dynamic element boundaries not found");return}this.__emptyBoundaries__(Z),J.length&&W0.default(Z.start).after(J)}__getAttributes__(J){const Z=J.attrs(),X={},H={},G={literals:{},expressions:{},map:{explicitAttrs:[],spreadAttrs:[],beforeSpreadAttrs:[],afterSpreadAttrs:[],metaAttrs:[]}},W=Object.keys(Z).find((M)=>U0.test(M));let B=[],Y=!1;return Z&&Object.entries(Z).forEach(([M,z])=>{if(M==":dtag")return;if(M.startsWith(":")||M.startsWith(L0)||M.startsWith(g0)||U0.test(M)||D1.test(M))if(D1.test(M)){const[j,U]=M.match(D1)||[];B=U.split(",")}else if(M.startsWith(g0))X[M.replace(g0,"")]=z;else if(M.startsWith(L0))H[M.replace(L0,"")]=z;else{if(M.startsWith(":"))M=M.slice(1,M.length);if(W)if(U0.test(M))G.map.spreadAttrs.push(M),Y=!0;else G.map.explicitAttrs.push(M),!Y?G.map.beforeSpreadAttrs.push(M):G.map.afterSpreadAttrs.push(M);G.expressions[M]=z||""}else if(G.literals[M]=z,W)G.map.explicitAttrs.push(M),!Y?G.map.beforeSpreadAttrs.push(M):G.map.afterSpreadAttrs.push(M)}),{argv:B,events:X,functions:H,attrs:G}}__withPath__(J,Z){const X=this.__inpath__;this.__inpath__=J;const H=Z();return this.__inpath__=X,H}__getPathParent__(J){const Z=J.split("/");if(Z.length>1)Z.pop();return Z.join("/")}__hasSamePathParent__(J,Z){return J.startsWith(Z)&&!J.replace(Z,"").startsWith(".")||J.startsWith(`${Z+y1}`)}__evaluate__(J,Z,X){J=typeof J==="string"?J.trim():J;try{const H=(G)=>{const W=this.state.toJSON(),B=(M,...z)=>{try{return M(...z)}catch(j){!X?.mute&&console.error("Eval error --",j);return}};let Y=`return ${G};`;if(Z){let M={},z;for(let U in Z){if(U==="__arguments__")continue;M[U]=Z[U].value}if(typeof Z.__arguments__==="object")z=Z.__arguments__;Y=`with( scope ){ ${Y} }`;const j=new Function("self","input","state","static","context","scope","arguments",Y);return B(j,this,this.input,W,this.static,this.context,M||{},z)}else{const M=new Function("self","input","state","static","context",Y);return B(M,this,this.input,W,this.static,this.context)}};if(/{\s*([^{}]+)\s*}/.test(J)){if(J.startsWith("!{")&&J.endsWith("}"))return H(J.slice(1));return J.replace(_1,(G,W)=>H(W))}return H(J)}catch(H){!X?.mute&&console.error("Expression evaluation error --",H);return}}__evaluateFunction__(J,Z,X){if(/(\s*\w+|\s*\([^)]*\)|\s*)\s*=>\s*(\s*\{[^}]*\}|\s*[^\n;"]+)/g.test(J))return this.__evaluate__(J,X)(...Z);else{let[H,...G]=J.split(/\s*,\s*/),W;const B=this.__evaluate__(H,X,{mute:!0});if(typeof B==="function")W=B;else{if(typeof this[H]!=="function")throw new Error(`Undefined <${H}> handler method`);W=this[H].bind(this)}if(typeof W!=="function")throw new Error(`Expected <${H}> to be a function or handler method`);let Y=G.map((M)=>this.__evaluate__(M,X));if(Z.length)Y=[...Y,...Z];return W(...Y)}}__evaluateSpreadAttr__(J,Z){const X=this.__evaluate__(J.replace(U0,""),Z.memo);if(!X){if(!Z.keystore.length)throw new Error(`Undefined spread operator ${J}`);typeof Z.nullify==="function"&&Z.nullify(Z.keystore);return}if(typeof X!=="object"||Array.isArray(X))throw new Error(`Invalid spread operator ${J}`);if(Z.keystore=Object.keys(X)||[],typeof Z.each==="function")for(let H in X)Z.each(H,X[H])}__interpolate__(J,Z,X){if(J=J.replace(_1,(H,G)=>this.__evaluate__(G,Z)),X)J=this.lips.i18n.translate(J).text;return J}__attachEvent__(J){const{element:Z,nodepath:X,_event:H,instruction:G,scope:W,__dependencies__:B}=J;let Y=W;if(Z.on(H,(...M)=>this.__evaluateFunction__(G,M,Y)),this.VER.push(J),this.metrics.inc("domUpdatesCount"),this.metrics.inc("domRemovalsCount"),this.__isReactive__(G,W))this.__extractExpressionDeps__(G,W).forEach((z)=>this.__trackDep__(B,z,W||{},{nodetype:"event",nodepath:X,deppath:`${X}.${H}`,target:"event-handler",$fragment:!(Z instanceof k0)?Z:null,boundaries:Z instanceof k0?Z.__boundaries__:void 0,update:(j)=>{Y=j}}))}__detachEvent__({element:J,nodepath:Z,_event:X,instruction:H,scope:G,__dependencies__:W}){if(J.off(X),this.__isReactive__(H,G)){const B=this.__extractExpressionDeps__(H,G),Y=`${Z}.${X}`;B.forEach((M)=>{W.get(M)?.delete(Y),this.FGUD.get(M)?.delete(Y)})}this.metrics.inc("domOperations"),this.metrics.inc("domRemovalsCount")}__extractTextDeps__(J,Z){const X=new Set;return(J.match(/{\s*([^{}]+)\s*}/g)||[]).forEach((G)=>{const W=G.replace(/[{}]/g,"").trim();this.__extractExpressionDeps__(W,Z).forEach((Y)=>X.add(Y))}),Array.from(X)}__extractExpressionDeps__(J,Z){const X=/\b(state|input|context|arguments)(?:\.[a-zA-Z_]\w*)+(?=\[|\.|$|\s|;|,|\))/g,H=/\b(self)(?:\.[a-zA-Z_]\w*)+(?=\()/g,G=/\b(arguments)((?:\.[a-zA-Z_]\w*)+)?(?=\[|\.|$|\s|;|,|\))/g;let W=[...Array.from(J.matchAll(X)),...Array.from(J.matchAll(H)),...Array.from(J.matchAll(G))];if(Z&&Object.keys(Z).length){const B=new RegExp(`\\b(?<!\\.)(${Object.keys(Z).join("|")})`,"g"),Y=new RegExp(`(?:(?<=\\.\\.\\.))(${Object.keys(Z).join("|")})\\b`,"g");W=[...W,...Array.from(J.matchAll(B)),...Array.from(J.matchAll(Y))]}return[...new Set(W.map((B)=>B[0]))]}__isReactive__(J,Z){if(/(self|state|input|context|arguments)(\.[\w.]+)?/.test(J))return!0;if(Z&&Object.keys(Z).length&&new RegExp(Object.keys(Z).join("|")).test(J))return!0;return!1}__bindMemo__(J,Z){const X=Z.deppath||Z.nodepath,H=this.FGUDMemory.get(Z.nodepath);if(H)H.tracks.set(X,Z.priority||2),H.memo=J,this.FGUDMemory.set(Z.nodepath,H);else{const G=new Map;G.set(X,Z.priority),this.FGUDMemory.set(Z.nodepath,{tracks:G,memo:J})}}__unbindMemo__(J){const Z=J.deppath||J.nodepath,X=this.FGUDMemory.get(J.nodepath);if(!X||!X.tracks.get(Z))return;X.tracks.delete(Z),!X.tracks.size&&this.FGUDMemory.delete(J.nodepath)}__trackDep__(J,Z,X,H){if(X&&X[Z]&&X[Z].type==="let")H.haslet=!0;if(H.priority===void 0)if(H.target==="attr"&&Z.split(".").find((W)=>b5.includes(W)))H.priority=0;else if(H.syntax)H.priority=1;else if(["event"].includes(H.nodetype))H.priority=3;else H.priority=2;const G=H.deppath||H.nodepath;H.level=G.split(/\//g).length,H.priority=H.level*h5+H.priority,!J.has(Z)&&J.set(Z,new Map),J.get(Z)?.set(G,H),this.__bindMemo__(X,H),this.metrics.inc("dependencyTrackCount")}__trackTranslationDep__(J,Z){this.__i18nDeps.set(Z.deppath||Z.nodepath,Z),this.__bindMemo__(J,Z),this.metrics.inc("i18nTrackCount")}__valueDep__(J,Z){return Z.reduce((X,H)=>X?.[H],J)}__shouldUpdate__(J,Z){if(J==="self")return!0;const X={state:this.state,input:this.input,context:this.context},H=this.__valueDep__(this.__previous[J],Z),G=this.__valueDep__(X[J],Z);return!w0(H,G)}__updateDepNodes__(){if(!this.FGUD?.size)return;this.metrics.inc("componentUpdateCount"),this.metrics.startRender(),this.FGUD.forEach((J,Z)=>{const[X,...H]=Z.split(".");if(!this.__shouldUpdate__(X,H))return;J.forEach((G)=>{try{const W=G.deppath||G.nodepath;if(G.garbage||G.boundaries?.start&&!document.contains(G.boundaries.start)||G.$fragment!==null&&!G.$fragment.closest("body").length){J.delete(W),this.__unbindMemo__(G);return}this.UQS.queue({dep:Z,deppath:W,priority:G.priority}),this.metrics.inc("dependencyUpdateCount")}catch(W){console.error("failed to update dependency nodes --",W);return}}),!J.size&&this.FGUD?.delete(Z)}),this.metrics.endRender()}__updateVarDepNodes__(J,Z,X){if(!this.FGUD?.size)return;this.metrics.inc("partialUpdateCount"),this.metrics.startRender(),this.FGUD.get(J)?.forEach((H,G)=>{if(!H.haslet||!this.__hasSamePathParent__(G,this.__getPathParent__(Z)))return;const W=H.deppath||H.nodepath,B=this.FGUDMemory.get(H.nodepath);if(!B){console.warn(`unexpected occurence: <${W}> has no memo`);return}B.memo={...B.memo,...X},this.UQS.queue({dep:J,deppath:W,priority:H.priority}),this.metrics.inc("dependencyUpdateCount")}),this.metrics.endRender()}__updateArgumentsDepNodes__(J,Z){if(!this.FGUD?.size)return;this.metrics.inc("partialUpdateCount"),this.metrics.startRender();const X="arguments";this.FGUD.get(X)?.forEach((H,G)=>{if(!this.__hasSamePathParent__(G,J))return;const W=H.deppath||H.nodepath,B=this.FGUDMemory.get(H.nodepath);if(!B){console.warn(`unexpected occurence: <${W}> has no memo`);return}B.memo.__arguments__=Z,this.UQS.queue({dep:X,deppath:W,priority:H.priority}),this.metrics.inc("dependencyUpdateCount")}),this.metrics.endRender()}__updateI18nDepNodes__(){if(!this.__i18nDeps?.size)return;this.metrics.inc("i18nUpdateCount"),this.metrics.startRender(),this.__i18nDeps?.forEach((J,Z)=>{if(!J.$fragment.closest("body").length){this.__i18nDeps.delete(Z);return}const X=this.FGUDMemory.get(J.nodepath);if(!X){console.warn(`unexpected occurence: <${J.deppath||J.nodepath}> has no memo`);return}J.update(X.memo,"i18n-partial-updator"),this.metrics.inc("dependencyUpdateCount")}),this.metrics.endRender()}appendTo(J){return(typeof J=="string"?W0.default(J):J).append(this.node),this.metrics.inc("domOperations"),this}prependTo(J){return typeof J=="string"?W0.default(J):J.prepend(this.node),this.metrics.inc("domOperations"),this}replaceWith(J){return(typeof J=="string"?W0.default(J):J).replaceWith(this.node),this.metrics.inc("domOperations"),this}}var u1={};i0(u1,{handler:()=>{{return A8}},declaration:()=>{{return E8}},_static:()=>{{return T8}}});var E8={name:"if",syntax:!0,tags:{"else-if":{type:"nexted",many:!0,optional:!0},else:{type:"nexted",alts:["else-if"],optional:!0}}},T8={initialized:!1,prevRenderer:null},A8={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,X=!1){if(!J.renderer)return;if(J.by){this.static.prevRenderer?.cleanup();const H=J.renderer.mesh({},Z);if(this.static.prevRenderer=J.renderer,!H?.length)return;if(X)return H;J.renderer.fill(H)}else{this.static.prevRenderer?.cleanup();let H=!1,G;if(Array.isArray(J["else-if"])&&J["else-if"].length)for(let W of J["else-if"]){if(!W.by)continue;if(G=W.renderer.mesh({},Z),this.static.prevRenderer=W.renderer,!G?.length)return;if(X)return G;G?.length&&W.renderer.fill(G),H=!0;break}if(!H&&J.else){const W=J.else.renderer.mesh({},Z);if(this.static.prevRenderer=J.else.renderer,!W?.length)return;if(X)return W;J.else.renderer.fill(W)}}}};var m1={};i0(m1,{handler:()=>{{return b8}},declaration:()=>{{return $8}},_static:()=>{{return S8}}});var C0=e0(c0(),1);var $8={name:"for",syntax:!0},S8={lastIn:null,argvlist:null,initialized:!1,prevRenderer:null,processingBatch:!1},b8={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,X=!1){if(this.static.processingBatch)return;if(!J.renderer)throw new Error("Undefined mesh renderer");let{in:H,from:G,to:W}=J;if(H===void 0&&G===void 0)throw new Error("Invalid <for> arguments");this.static.processingBatch=!0;try{if(G!==void 0)return this.asFromTo(J.renderer,G,W,Z,X);else if(Array.isArray(H))return this.asArray(J.renderer,H,Z,X);else if(H instanceof Map)return this.asMap(J.renderer,H,Z,X);else if(typeof H=="object")return this.asObject(J.renderer,H,Z,X)}finally{this.static.processingBatch=!1}},addItem(J,Z,X,H){if(!this.static.argvlist)this.static.argvlist=[];const G=`[${H}]`,W=J.mesh(X,Z,G);if(!W)return;const{boundaries:B,$partial:Y}=J.demarcate(W,G);return this.static.prevRenderer=J,this.static.argvlist.push({argvalues:X,boundaries:B}),Y},updateItem(J,Z,X,H){if(!this.static.argvlist?.[H])return;this.static.argvlist[H].argvalues=X,J.update(Object.keys(X),X,Z,this.static.argvlist[H].boundaries,`[${H}]`)},removeItem(J,Z){if(!this.static.argvlist?.[Z])return;J.cleanup(this.static.argvlist[Z].boundaries,`[${Z}]`),this.static.argvlist.splice(Z,1)},asFromTo(J,Z,X,H,G){if(Z=parseFloat(String(Z)),X==null)throw new Error("Expected <from> <to> attributes of the for loop to be defined");X=parseFloat(String(X));const W=Z<X,B=Math.abs(X-Z)+1;if(Array.isArray(this.static.argvlist)){const[M]=J.argv;if(M){let z=Z;if(this.static.argvlist.length===B){for(let U=0;U<this.static.argvlist.length;U++)this.static.argvlist[U].argvalues[M].value!==z&&this.updateItem(J,H,{[M]:{value:z,type:"arg"}},U),z=W?z+1:z-1;return}const j=Math.min(this.static.argvlist.length,B);for(let U=0;U<j;U++)this.updateItem(J,H,{[M]:{value:U,type:"arg"}},U);if(B>this.static.argvlist.length)for(let U=this.static.argvlist.length;U<B;U++){const b={[M]:{value:U,type:"arg"}};this.boundaries&&C0.default(this.boundaries.end).before(this.addItem(J,H,b,U))}else if(B<this.static.argvlist.length)for(let U=this.static.argvlist.length-1;U>=B;U--)this.removeItem(J,U)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let Y=C0.default();for(let M=Z;W?M<=X:M>=X;W?M++:M--){const z={},[j]=J.argv;if(j)z[j]={value:M,type:"arg"};Y=Y.add(this.addItem(J,H,z,M))}if(!Y?.length)return;if(G)return Y;J.fill(Y)},asArray(J,Z,X,H){if(this.static.argvlist&&this.static.lastIn&&Z===this.static.lastIn)return;if(!Z.length){if(!this.static.lastIn)console.warn("For loop with empty initial rendering <in> attribute array value will not update")}if(this.static.lastIn=Z,Array.isArray(this.static.argvlist)){const[B,Y]=J.argv;if(B){if(this.static.argvlist.length===Z.length){for(let z=0;z<this.static.argvlist.length;z++)!w0(this.static.argvlist[z].argvalues[B].value,Z[z])&&this.updateItem(J,X,{[B]:{value:Z[z],type:"arg"},[Y]:{value:z,type:"arg"}},z);return}const M=Math.min(this.static.argvlist.length,Z.length);for(let z=0;z<M;z++)this.updateItem(J,X,{[B]:{value:Z[z],type:"arg"},[Y]:{value:z,type:"arg"}},z);if(Z.length>this.static.argvlist.length)for(let z=this.static.argvlist.length;z<Z.length;z++){const j={[B]:{value:Z[z],type:"arg"},[Y]:{value:z,type:"arg"}};this.boundaries&&C0.default(this.boundaries.end).before(this.addItem(J,X,j,z))}else if(Z.length<this.static.argvlist.length)for(let z=this.static.argvlist.length-1;z>=Z.length;z--)this.removeItem(J,z)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let G=C0.default(),W=0;for(let B of Z){const Y={},[M,z]=J.argv;if(M)Y[M]={value:B,type:"arg"};if(z)Y[z]={value:W,type:"arg"};G=G.add(this.addItem(J,X,Y,W)),W++}if(!G?.length)return;if(H)return G;J.fill(G)},asMap(J,Z,X,H){if(this.static.argvlist&&this.static.lastIn&&Z===this.static.lastIn)return;if(!Z.size){if(!this.static.lastIn)console.warn("For loop with empty initial rendering <in> attribute map value will not update")}if(this.static.lastIn=Z,Array.isArray(this.static.argvlist)){const[B,Y,M]=J.argv,z=Array.from(Z.entries());if(B){if(this.static.argvlist.length===z.length){for(let U=0;U<this.static.argvlist.length;U++)!w0(this.static.argvlist[U].argvalues[B].value,z[U][0])||!w0(this.static.argvlist[U].argvalues[Y].value,z[U][1])&&this.updateItem(J,X,{[B]:{value:z[U][0],type:"arg"},[Y]:{value:z[U][1],type:"arg"},[M]:{value:U,type:"arg"}},U);return}const j=Math.min(this.static.argvlist.length,z.length);for(let U=0;U<j;U++)this.updateItem(J,X,{[B]:{value:z[U][0],type:"arg"},[Y]:{value:z[U][1],type:"arg"},[M]:{value:U,type:"arg"}},U);if(z.length>this.static.argvlist.length)for(let U=this.static.argvlist.length;U<z.length;U++){const b={[B]:{value:z[U][0],type:"arg"},[Y]:{value:z[U][1],type:"arg"},[M]:{value:U,type:"arg"}};this.boundaries&&C0.default(this.boundaries.end).before(this.addItem(J,X,b,U))}else if(z.length<this.static.argvlist.length)for(let U=this.static.argvlist.length-1;U>=z.length;U--)this.removeItem(J,U)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let G=C0.default(),W=0;for(let[B,Y]of Z){const M={},[z,j,U]=J.argv;if(z)M[z]={value:B,type:"arg"};if(j)M[j]={value:Y,type:"arg"};if(U)M[U]={value:W,type:"arg"};G=G.add(this.addItem(J,X,M,W)),W++}if(!G?.length)return;if(H)return G;J.fill(G)},asObject(J,Z,X,H){if(this.static.argvlist&&this.static.lastIn&&Z===this.static.lastIn)return;if(!Object.keys(Z).length){if(!this.static.lastIn)console.warn("For loop with empty initial rendering <in> attribute object value will not update")}if(this.static.lastIn=Z,Array.isArray(this.static.argvlist)){const[B,Y,M]=J.argv,z=Object.entries(Z);if(B){if(this.static.argvlist.length===z.length){for(let U=0;U<this.static.argvlist.length;U++)!w0(this.static.argvlist[U].argvalues[B].value,z[U][0])||!w0(this.static.argvlist[U].argvalues[Y].value,z[U][1])&&this.updateItem(J,X,{[B]:{value:z[U][0],type:"arg"},[Y]:{value:z[U][1],type:"arg"},[M]:{value:U,type:"arg"}},U);return}const j=Math.min(this.static.argvlist.length,z.length);for(let U=0;U<j;U++)this.updateItem(J,X,{[B]:{value:z[U][0],type:"arg"},[Y]:{value:z[U][1],type:"arg"},[M]:{value:U,type:"arg"}},U);if(z.length>this.static.argvlist.length){let U=C0.default();for(let b=this.static.argvlist.length;b<z.length;b++){const f={[B]:{value:z[b][0],type:"arg"},[Y]:{value:z[b][1],type:"arg"},[M]:{value:b,type:"arg"}},T=this.addItem(J,X,f,b);U=U.add(T)}this.boundaries&&C0.default(this.boundaries.end).before(U)}else if(z.length<this.static.argvlist.length)for(let U=this.static.argvlist.length-1;U>=z.length;U--)this.removeItem(J,U)}return}this.static.prevRenderer?.cleanup(),this.static.argvlist=[];let G=C0.default(),W=0;for(let B in Z){const Y={},[M,z,j]=J.argv;if(M)Y[M]={value:B,type:"arg"};if(z)Y[z]={value:Z[B],type:"arg"};if(j)Y[j]={value:W,type:"arg"};G=G.add(this.addItem(J,X,Y,W)),W++}if(!G?.length)return;if(H)return G;J.fill(G)},onDestroy(){this.static.prevRenderer?.cleanup(void 0,!0),this.static.prevRenderer=null,this.static.argvlist=null,this.static.lastIn=null}};var d1={};i0(d1,{handler:()=>{{return k8}},declaration:()=>{{return g8}},_static:()=>{{return x8}}});var g8={name:"async",syntax:!0,tags:{then:{type:"child"},catch:{type:"child",optional:!0},loading:{type:"child",optional:!0}}},x8={initialized:!1,finalized:!1,prevRenderer:null},k8={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,X=!1){if(!J.await)throw new Error("Undefined async <await> attribute");if(!(J.await instanceof Promise))throw new Error("Expected async <await> attribute value to be a function");if(this.static.finalized=!1,J.loading){this.static.prevRenderer?.cleanup();const H=J.loading.renderer.mesh({},Z);if(this.static.prevRenderer=J.loading.renderer,this.execute(J,Z,!0),this.static.finalized)return;if(!H?.length)return;if(X)return H;J.loading.renderer.fill(H)}else this.execute(J,Z)},execute(J,Z,X=!1){J.await.then((H)=>{if(this.static.prevRenderer?.cleanup(),!J.then)return;const[G]=J.then.renderer.argv,W={[G]:{value:H,type:"arg"}},B=J.then.renderer.mesh(W,Z);if(this.static.prevRenderer=J.then.renderer,!B?.length)return;if(!X)return B;J.then.renderer.fill(B)}).catch((H)=>{if(this.static.prevRenderer?.cleanup(),!J.catch)return;const[G]=J.catch.renderer.argv,W={[G]:{value:H,type:"arg"}},B=J.catch.renderer.mesh(W,Z);if(this.static.prevRenderer=J.catch.renderer,!B?.length)return;if(!X)return B;J.catch.renderer.fill(B)}).finally(()=>this.static.finalized=!0)}};var i1={};i0(i1,{handler:()=>{{return _8}},declaration:()=>{{return f8}},_static:()=>{{return h8}}});var f8={name:"switch",syntax:!0,tags:{case:{type:"child",many:!0},default:{type:"child"}}},h8={initialized:!1,prevRenderer:null},_8={onInput(J){this.static.initialized&&this.processor(this.input,J)},onSelfRender(){const J=this.processor(this.input,void 0,!0);return this.static.initialized=!0,J},processor(J,Z,X=!1){let H=[];this.static.prevRenderer?.cleanup();for(let G of J.case)if(G.is==J.by||Array.isArray(G.is)&&G.is.includes(J.by)){Array.isArray(G.is)?H=[...new Set([...H,...G.is])]:H.push(G.is);const W=G.renderer.mesh({},Z);if(this.static.prevRenderer=G.renderer,!W?.length)return;if(X)return W;G.renderer.fill(W)}if(H.includes(J.by))return;if(J.default){const G=J.default.renderer.mesh({},Z);if(this.static.prevRenderer=J.default.renderer,!G?.length)return;if(X)return G;J.default.renderer.fill(G)}else this.static.prevRenderer=null}};var c1={};i0(c1,{state:()=>{{return y8}},handler:()=>{{return d8}},default:()=>{{return i8}},context:()=>{{return u8}},_static:()=>{{return v8}}});var m8=function(J){const Z={};return J.split("&").map((H)=>{const[G,W]=H.split("=");Z[G]=W}),Z},y8={page:null,params:{},query:{}},v8={global:!1,routes:[],defaultPath:null,currentPath:null,currentRoute:null},u8=["navigate"],d8={onInput(){this.processor(this.input)},processor(J){if(!J.routes)return;if(J.global)this.static.global=J.global;if(this.static.routes=J.routes.map(({path:Z,template:X,default:H})=>{if(H)this.static.defaultPath=Z;const G=Z.match(/:[^\/]*(\/|$)/gi)||[],W=Z.replaceAll("/","\\/").replaceAll(/:[^\/]*(\/|$)/gi,"([^\\/]+)(?:\\/|$)");return{path:Z,template:X,default:H,pathVars:G,pathRegex:new RegExp(`${W}\$`,"i")}}),J.global){const Z=window.location.pathname;this.static.defaultPath=this.static.defaultPath&&Z=="/"&&Z!==this.static.defaultPath?this.static.defaultPath:Z?Z+window.location.search:this.static.routes[0].path}},onAttach(){if(this.input.global)window.navigate=this.navigate.bind(this),window.addEventListener("popstate",(J)=>J.state&&this.navigate(J.state.path,!0));this.setContext("navigate",this.navigate.bind(this)),this.static.defaultPath&&this.navigate(this.static.defaultPath)},navigate(J,Z){!Z&&this.static.global&&history.pushState({path:J},"",J);const X=J.split("?");J=X[0];const H=X[1]?m8(X[1]):{};let G=null;if(this.static.currentRoute)G={path:this.static.currentRoute.path,params:this.state.params},this.emit("before",{fromState:G,toState:{path:J,query:H}});const W=this.match(J);if(!W){this.static.currentRoute=null,this.state.params={},this.state.query={},this.emit("not-found",J);return}const{route:B,params:Y}=W;this.emit("after",{fromState:G,toState:{path:B.path,params:Y,query:H}}),this.static.currentPath=J,this.static.currentRoute=B,this.state.params=Y,this.state.query=H,this.state.page=B.template},match(J){const Z={};let X=!1;for(let H of this.static.routes){const{pathVars:G,pathRegex:W}=H,B=J.match(W);if(B!==null&&B.index===0){for(let Y=0;Y+1<B.length&&Y<G.length;Y++)Z[G[Y].replaceAll(/[\/:]/g,"")]=B[Y+1];X=H;break}}return X?{route:X,params:Z}:!1}},i8="<{state.page} params=state.params query=state.query/>";class r0{debug=!1;stylesheets=[];config={};store={};__root;i18n=new X1;watcher;IUC;__setLang;__getLang;__setContext;__getContext;constructor(J){if(this.config=J,this.config?.debug)this.debug=this.config.debug;this.watcher=new W1,this.IUC=new Z1;const[Z,X]=x0(this.i18n.lang),[H,G]=x0(J?.context||{});this.__setLang=X,this.__getLang=Z,this.__setContext=G,this.__getContext=H,this.register("if",u1),this.register("for",m1),this.register("async",d1),this.register("switch",i1),this.register("router",c1)}register(J,Z){return this.store[J]=Z,this}unregister(J){return delete this.store[J],this}has(J){return J in this.store}import(J){if(!this.has(J))throw new Error(`<${J}> component not found`);if(!this.store[J].declaration?.syntax&&!this.store[J].default)throw new Error(`Invalid <${J}> component`);return this.store[J]}render(J,Z,X){const{default:H,...G}=Z,W={debug:this.debug,prepath:"0",lips:this},B=new k0(J,H||"",{...G,input:X},W);return window.addEventListener("beforeunload",()=>{return this.dispose(),B.destroy(),null}),window.addEventListener("pagehide",(Y)=>{!Y.persisted&&this.dispose()}),document.addEventListener("visibilitychange",()=>{if(document.visibilityState!=="hidden")return;this.IUC.prepareForPotentialUnload()}),B}root(J,Z){if(this.__root=this.render("__ROOT__",J),this.__root.appendTo(Z),this.config?.stylesheets)this.stylesheets=this.config.stylesheets.map((X)=>new d0("root",{sheet:X,meta:!0}));return this.__root}setLanguage(J){this.i18n.lang=J,this.__setLang(J)}getLanguage(){return this.__getLang()}setContext(J,Z){const X=this.__getContext();if(typeof J==="string"){const H={...X,[J]:Z};B0(X,H)&&this.__setContext(H)}else if(!Array.isArray(J)){const H={...X,...J};B0(X,H)&&this.__setContext(H)}else throw new Error("Invalid context data")}getContext(){return this.__getContext()}useContext(J,Z){if(!J.length)return;l0(()=>{const X=this.__getContext();if(!X)return;const H=Object.fromEntries(J.map((G)=>[G,X[G]]));H&&typeof Z==="function"&&Object.keys(H).length&&Z(H)})}useTranslator(J,Z){l0(()=>{const X=this.__getLang();if(!X)return;(J==="*"||Array.isArray(J)&&J.includes(X))&&typeof Z==="function"&&Z(X)})}dispose(){this.watcher?.dispose(),this.__root?.destroy(),this.stylesheets.forEach((J)=>J.clear())}}var c8=function(){const J={rainbow:[],fire:[],ocean:[],grayscale:[]};for(let W=0;W<360;W++)J.rainbow.push(`hsl(${W}, 80%, 60%)`);for(let W=0;W<60;W++)J.fire.push(`hsl(${W+10}, 90%, 60%)`);for(let W=0;W<60;W++)J.ocean.push(`hsl(${W+180}, 85%, 55%)`);for(let W=0;W<200;W++){const B=W+55;J.grayscale.push(`rgb(${B}, ${B}, ${B})`)}const Z={title:"Interactive Particle System",width:800,height:500,particleCount:200,maxParticleSize:15,minParticleSize:2,speedFactor:1,colorScheme:"rainbow",interactive:!0,showStats:!0,useGravity:!0},X={_static:{animationFrame:0},state:{particles:[],particlePool:[],isRunning:!1,mouseX:0,mouseY:0,hasMouseInput:!1,emissionRate:3,frameCount:0,lastFrameTime:0,lastUpdateTime:0,fps:0,statsUpdateCounter:0,emitterX:0,emitterY:0,gravity:0.1,wind:0,turbulence:0.05},handler:{onCreate(){if(!this.input.width)this.input.width=Z.width;if(!this.input.height)this.input.height=Z.height;if(!this.input.title)this.input.title=Z.title;if(!this.input.particleCount)this.input.particleCount=Z.particleCount;if(!this.input.maxParticleSize)this.input.maxParticleSize=Z.maxParticleSize;if(!this.input.minParticleSize)this.input.minParticleSize=Z.minParticleSize;if(!this.input.speedFactor)this.input.speedFactor=Z.speedFactor;if(!this.input.colorScheme)this.input.colorScheme=Z.colorScheme;if(this.input.interactive===void 0)this.input.interactive=Z.interactive;if(this.input.showStats===void 0)this.input.showStats=Z.showStats;if(this.input.useGravity===void 0)this.input.useGravity=Z.useGravity;if(this.input.width&&this.input.height)this.state.emitterX=this.input.width/2,this.state.emitterY=this.input.height/2;this.initializeParticlePool(this.input.particleCount||200)},initializeParticlePool(W){for(let B=0;B<W;B++)this.state.particlePool.push(this.createInactiveParticle())},createInactiveParticle(){const W=this.input.minParticleSize||2,B=this.input.maxParticleSize||15,Y=W+Math.random()*(B-W);let M;if(Y<5)M="circle";else if(Y<10)M="rect";else M="polygon";return{id:Math.random()*1e5|0,x:0,y:0,size:Y,vx:0,vy:0,color:"",alpha:0,rotation:0,rotationSpeed:0,life:Number.MAX_SAFE_INTEGER,maxLife:0,type:M}},onMount(){if(this.input.interactive){const W=document.querySelector(".particle-system-container");if(W)this.boundMouseMove=this.handleMouseMove.bind(this),this.boundMouseLeave=this.handleMouseLeave.bind(this),W.addEventListener("mousemove",this.boundMouseMove),W.addEventListener("mouseleave",this.boundMouseLeave)}},onDestroy(){if(this.stopAnimation(),this.input.interactive){const W=document.querySelector(".particle-system-container");if(W)W.removeEventListener("mousemove",this.boundMouseMove),W.removeEventListener("mouseleave",this.boundMouseLeave)}this.state.particles=[],this.state.particlePool=[]},handleMouseMove(W){const Y=W.currentTarget.getBoundingClientRect();this.state.mouseX=W.clientX-Y.left,this.state.mouseY=W.clientY-Y.top,this.state.hasMouseInput=!0,this.state.emitterX=this.state.mouseX,this.state.emitterY=this.state.mouseY},handleMouseLeave(){if(this.state.hasMouseInput=!1,this.input.width&&this.input.height)this.state.emitterX=this.input.width/2,this.state.emitterY=this.input.height/2},getRandomColor(){const W=this.input.colorScheme||"rainbow",B=J[W];if(!B||B.length===0){if(W==="rainbow")return`hsl(${Math.random()*360}, 80%, 60%)`;else if(W==="fire"){const Y=Math.random()*60+10,M=80+Math.random()*20,z=50+Math.random()*20;return`hsl(${Y}, ${M}%, ${z}%)`}else if(W==="ocean"){const Y=Math.random()*60+180,M=70+Math.random()*30,z=40+Math.random()*30;return`hsl(${Y}, ${M}%, ${z}%)`}else if(W==="grayscale"){const Y=Math.floor(Math.random()*200+55);return`rgb(${Y}, ${Y}, ${Y})`}return`hsl(${Math.random()*360}, 80%, 60%)`}return B[Math.floor(Math.random()*B.length)]},activateParticle(){let W;for(let z=0;z<this.state.particlePool.length;z++)if(this.state.particlePool[z].life>this.state.particlePool[z].maxLife){W=this.state.particlePool[z];break}if(!W){if(W=this.createInactiveParticle(),!W)return null;this.state.particlePool.push(W)}if(!W||!this.input.width||!this.input.height)return null;W.x=this.state.emitterX,W.y=this.state.emitterY;const B=this.input.speedFactor||1,Y=Math.random()*Math.PI*2,M=(0.5+Math.random()*2)*B;return W.vx=Math.cos(Y)*M,W.vy=Math.sin(Y)*M,W.rotation=Math.random()*Math.PI*2,W.rotationSpeed=(Math.random()-0.5)*0.1,W.maxLife=50+Math.random()*100,W.life=0,W.alpha=0.7+Math.random()*0.3,W.color=this.getRandomColor(),W},updateParticles(){if(!this.input.width||!this.input.height)return;const W=performance.now(),B=(W-this.state.lastUpdateTime)/1000;this.state.lastUpdateTime=W;const Y=0.016666666666666666,M=this.input.useGravity?this.state.gravity:0,z=this.state.wind,j=this.state.turbulence,U=[],b=Math.min(this.state.emissionRate,(this.input.particleCount||200)-this.state.particles.length);for(let f=0;f<b;f++){const T=this.activateParticle();if(T)this.state.particles.push(T)}for(let f=0;f<this.state.particles.length;f++){const T=this.state.particles[f];if(T.life>=T.maxLife)continue;const p=Math.min(B,0.1);T.x+=T.vx*p*60,T.y+=T.vy*p*60,T.vy+=M*p*60,T.vx+=z*p*60,T.vx+=(Math.random()-0.5)*j*p*60,T.vy+=(Math.random()-0.5)*j*p*60,T.rotation+=T.rotationSpeed*p*60,T.life+=p*60;const X0=T.life/T.maxLife;T.alpha=1-Math.pow(X0,2);const s=T.size/2;if(T.x-s<0)T.x=s,T.vx=-T.vx*0.5;else if(T.x+s>this.input.width)T.x=this.input.width-s,T.vx=-T.vx*0.5;if(T.y+s>this.input.height)if(T.y=this.input.height-s,Math.abs(T.vy)>0.5)T.vy=-T.vy*0.4;else T.vy=0,T.vx*=0.95;if(T.life<T.maxLife)U.push(T)}if(this.state.particles.length!==U.length)this.state.particles=U},getParticlePoints(W){const B=[],M=W.size/2,z=W.size/4;for(let j=0;j<10;j++){const U=j%2===0?M:z,b=Math.PI/5*j,f=W.x+U*Math.sin(b),T=W.y+U*Math.cos(b);B.push(`${f},${T}`)}return B.join(" ")},startAnimation(){if(this.state.isRunning)return;if(this.state.isRunning=!0,this.state.lastFrameTime=performance.now(),this.state.lastUpdateTime=performance.now(),!this.boundAnimate)this.boundAnimate=this.animate.bind(this);this.static.animationFrame=requestAnimationFrame(this.boundAnimate)},animate(){if(!this.state.isRunning)return;const W=performance.now(),B=W-this.state.lastFrameTime;if(this.state.lastFrameTime=W,this.state.statsUpdateCounter++,this.state.statsUpdateCounter>=10)this.state.fps=Math.round(1000/B),this.state.statsUpdateCounter=0;this.updateParticles(),this.state.frameCount++;const Y=this.state.frameCount%628,M=Math.sin(Y*0.01),z=Math.sin(Y*0.005);this.state.wind=M*0.05,this.state.turbulence=0.03+z*0.02,this.static.animationFrame=requestAnimationFrame(this.boundAnimate)},stopAnimation(){this.state.isRunning=!1,cancelAnimationFrame(this.static.animationFrame)},toggleAnimation(){if(this.state.isRunning)this.stopAnimation();else this.startAnimation()},changeColorScheme(W){this.input.colorScheme=W},increaseParticleCount(){if(this.input.particleCount){const W=Math.min(1000,this.input.particleCount+50);if(W>this.state.particlePool.length){const B=W-this.state.particlePool.length;for(let Y=0;Y<B;Y++)this.state.particlePool.push(this.createInactiveParticle())}this.input.particleCount=W}},decreaseParticleCount(){if(this.input.particleCount){if(this.input.particleCount=Math.max(50,this.input.particleCount-50),this.state.particles.length>this.input.particleCount)this.state.particles.length=this.input.particleCount}},toggleGravity(){if(this.input.useGravity=!this.input.useGravity,!this.input.useGravity)for(let W=0;W<this.state.particles.length;W++)this.state.particles[W].vy*=0.5},increaseEmissionRate(){this.state.emissionRate=Math.min(20,this.state.emissionRate+1)},decreaseEmissionRate(){this.state.emissionRate=Math.max(1,this.state.emissionRate-1)}},default:`
2
2
  <div class="particle-system-container" style="width: {Number(input.width) + 40}px; height: {Number(input.height) + 280}px">
3
3
  <h2 class="particle-system-title">{input.title}</h2>
4
4
 
@@ -220,7 +220,7 @@ var U4=Object.create;var{defineProperty:g1,getPrototypeOf:K4,getOwnPropertyNames
220
220
  .color-button.grayscale {
221
221
  background: linear-gradient(to bottom, white, gray, black);
222
222
  }
223
- `},H=new l0({debug:!1});H.register("particle-system",X);const G={default:`
223
+ `},H=new r0({debug:!1});H.register("particle-system",X);const G={default:`
224
224
  <div style="max-width: 1200px; margin: 0 auto; padding: 20px; background-color: #121212;">
225
225
  <h1 style="color: white; text-align: center;">Particle System Performance Test</h1>
226
226
  <p style="color: #ccc; text-align: center;">This demo creates multiple particle systems with different configurations to test Lips performance.</p>
@@ -278,6 +278,6 @@ var U4=Object.create;var{defineProperty:g1,getPrototypeOf:K4,getOwnPropertyNames
278
278
  useGravity="true"/>
279
279
  </div>
280
280
  </div>
281
- `};H.render("ParticleSystemDemo",G).appendTo("body")},X8=new l0({debug:!0});c4();
281
+ `};H.render("ParticleSystemDemo",G).appendTo("body")},X6=new r0({debug:!0});c8();
282
282
 
283
- //# debugId=3281710AEE33312164756e2164756e21
283
+ //# debugId=37ACBBACC360587164756e2164756e21