package.dist.mikado.light.min.js Maven / Gradle / Ivy
/**!
* Mikado.js v0.8.329 (Light)
* Copyright 2019-2024 Nextapps GmbH
* Author: Thomas Wilkerling
* Licence: Apache-2.0
* https://github.com/nextapps-de/mikado
*/
(function(){'use strict';var m;function p(a,b,c){let d;c&&(d=a._mkc)&&(a._mkc=null);const g=b.length,k=[],e={};for(let l=0,q,n,r,v,w=null;l"===t)h=h.firstChild;else{if("|"===t){r=[h.firstChild,h];break a}if("@"===t){r=[h.style,h];break a}h=h.nextSibling}e[x]=h}}r=[h]}v=r[0];r=r[1]||v}}else v=r=a;c&&(w=d?d[l]:{},r._mkc=w);k[l]=new y(w,v,"")}return a._mkp=k}
function z(a,b,c,d,g,k){const e=g||(b.tag?b.svg?document.createElementNS("http://www.w3.org/2000/svg",b.tag):document.createElement(b.tag):document.createTextNode(b.text));let h,f;if(f=b.class)"object"===typeof f?c.push(new y(h={_c:""},e,d)):g||(e.className=f);if(f=b.attr)for(const l in f){let q=f[l];"object"===typeof q?(h||c.push(new y(h={},e,d)),h["_a"+l]=!1):g||e.setAttribute(l,q)}if(f=b.style)"object"===typeof f?(c.push(new y(h||(h={}),e.style,d+"@")),h._s=""):g||(e.style.cssText=f);if(f=b.text)"object"===
typeof f?(a=e,f=f[0],b.tag?(d+="|",a=!g&&e.firstChild,a||(a=document.createTextNode(f),e.appendChild(a))):h={},(h||(h={}))._t=f,c.push(new y(h,a,d))):g||(b.tag?e.textContent=f:e.nodeValue=f);else if(f=b.child){if(g&&(g=g.firstChild,!g))return null;f.constructor!==Array&&(f=[f]);for(let l=0,q,n=f.length;l",b=z(a,q,c,d,g,1),g){if(lk?n:k,v=0;for(e||(e=0);e=n;let u,A,x;if(!f&&(u=c[e],A=w[g],x=u._mkk,x===
A)){this.update(u,w,b,e);continue}if(f||!d[A]){f||!this.pool?(n++,r=n>k?n:k,this.add(w,b,e)):this.replace(u,w,b,e);continue}let t,B;for(f=e+1;f=B+v?(h=c[t-1],this.root.insertBefore(h,u),this.update(h,w,b,e),t===B?(1n?n:h)-1),v--,e--);h=1;break}}h||(this.remove(e),n--,r=n>k?n:k,e--)}return this}this.update(l,
q,b,e)}if(ea?this.length+a:a,a=this.g[d]):d=this.index(a));var g;if(this.key){var k=b[this.key];if(g=this.j[k]){if(g!==a){k=this.index(g);const e=ka?this.length+a-1:a,a=this.g[d]):d=this.index(a));this.apply(b,c||this.state,d,a._mkp||p(a,this.i._mkp,this.cache));return this};
m.create=function(a,b,c,d){const g=this.key,k=g&&a[g];let e;var h;let f,l;this.pool&&(g?(h=this.h)&&(e=h.get(k))&&(h.delete(k),l=1):(h=this.l)&&h.length&&(e=h.pop()));e||(e=f=this.i,f||(this.i=e=f=z(this,this.tpl.tpl,[],""),F(this)));let q;this.apply&&(h=e._mkp||p(e,this.i._mkp,!!f||this.cache),q=f&&this.cache&&Array(h.length),this.apply(a,b||this.state,c,h,!!f,q));f&&(e=f.cloneNode(!0),q&&!0!==q&&(e._mkc=q));g&&(l||(e._mkk=k),d&&(this.j[k]=e));return e};
m.add=function(a,b,c){let d;"number"===typeof b?(c=0>b?this.length+b:b,b=null,d=cc&&(c+=this.length),d=cc;b--)a[b]=a[b-1];a[c]=g}m.append=function(a,b,c){let d;"number"===typeof b?(c=0>b?this.length+b:b,b=null,d=1):"number"===typeof c&&(0>c&&(c+=this.length),d=1);const g=a.length;for(let k=0;ka&&(a=c+a));if(!c||a>=c)return this;b?0>b&&(a-=b+1,0>a&&(a=0),b*=-1):b=1;let d;!a&&b>=c?(d=this.g,b=d.length,this.root.textContent="",this.root._mkd=this.g=[],c=0):(d=this.g.splice(a,b),c-=b);const g=this.pool&&!this.key,k=this.key||this.pool;(a=this.key&&this.pool)&&b>=a&&(this.h=new Map,a=0);for(let e=0,h;ea.pool&&a.h.delete(a.h.keys().next().value)):a.l[a.l.length]=b)}m.flush=function(){this.l=[];this.h=new Map;return this};
m.destroy=function(){for(let a=0,b;a
© 2015 - 2025 Weber Informatics LLC | Privacy Policy