-
Notifications
You must be signed in to change notification settings - Fork 0
/
groups_runtime.min.1.0.js
9 lines (8 loc) · 2.64 KB
/
groups_runtime.min.1.0.js
1
2
3
4
5
6
7
8
9
(function(){function n(c){var b=0;return function(){return b<c.length?{done:!1,value:c[b++]}:{done:!0}}}function r(c){var b="undefined"!=typeof Symbol&&Symbol.iterator&&c[Symbol.iterator];return b?b.call(c):{next:n(c)}};/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
function t(c){var b=0,d;for(d in c)b++;return b}function v(c,b){return null!==c&&b in c}function w(c,b){b in c&&delete c[b]};function x(c){c&&c.parentNode&&c.parentNode.removeChild(c)};function y(c,b,d,e){var a={u:d,index:e.index,o:e.index};e.m[d]=a;e.l.push(a);e.s[d]=!0;e.index++;d=b[d];for(var g=d.i.length-1;0<=g;g--){var h=d.i[g];v(e.m,h.h)?v(e.s,h.h)&&a.o>e.m[h.h].o&&(x(h.instance.g),d.i.splice(g,1)):y(c,b,h.h,e)}if(a.index==a.o)for(;c=e.l[e.l.length-1],w(e.s,c.u),e.l.pop(),c!=a;);}function A(c,b){c=r(c.childNodes);for(var d=c.next();!d.done;d=c.next())b.appendChild(d.value.cloneNode(!0))};document.addEventListener("DOMContentLoaded",function B(){document.removeEventListener("DOMContentLoaded",B,!1);var b=document,d={},e;if("content"in document.createElement("template")){var a=b.getElementById("gwd-group-definitions");a&&(e=document.importNode(a.content,!0).querySelectorAll("[data-gwd-group-def]"))}e||(e=b.querySelectorAll("[data-gwd-group-def]"));e=r(e);for(a=e.next();!a.done;a=e.next()){a=a.value;var g=a.getAttribute("data-gwd-group-def");g?d[g]?x(a):d[g]={g:a,i:[]}:x(a)}e=[];a=Array.prototype.slice.call(b.querySelectorAll("[data-gwd-group]"));
if("content"in document.createElement("template")&&b.getElementById("gwd-group-definitions"))for(var h in d){var m=Array.prototype.slice.call(d[h].g.querySelectorAll("[data-gwd-group]"));if(0<m.length){g=a.push;var l=g.apply;if(!(m instanceof Array)){for(var u=r(m),z=[];!(m=u.next()).done;)z.push(m.value);m=z}l.call(g,a,m)}}h=r(a);for(a=h.next();!a.done;a=h.next()){a=a.value;g=a.childNodes;for(l=g.length-1;0<=l;l--)8!=g[l].nodeType&&a.removeChild(g[l]);a={g:a,j:a.getAttribute("data-gwd-group")};if(g=
d[a.j]){l=a.g.parentNode;for(m=!1;l&&l!=b;){if((u=l.getAttribute("data-gwd-group-def"))&&d[u]){g.i.push({instance:a,h:u});m=!0;break}l=l.parentNode}m||e.push(a)}else x(a.g)}h={index:0,m:{},l:[],s:{}};for(var p in d)v(h.m,p)||y(b,d,p,h);b={};for(var f in d)b[f]={};for(var q in d)for(p=r(d[q].i),f=p.next();!f.done;f=p.next())f=b[f.value.h],q in f?f[q]++:f[q]=1;q=[];for(var k in b)0==t(b[k])&&(q.push(k),w(b,k));k=r(q);for(f=k.next();!f.done;f=k.next())for(p=d[f.value],h=r(p.i),f=h.next();!f.done;f=h.next())f=
f.value,A(p.g,f.instance.g),a=b[f.h],a[f.instance.j]--,0==a[f.instance.j]&&(w(a,f.instance.j),0==t(a)&&(q.push(f.h),w(b,f.h)));e=r(e);for(k=e.next();!k.done;k=e.next())k=k.value,A(d[k.j].g,k.g)},!1);}).call(this);