Entries group
@constructor
439817
function() {
    this.uuid = undefined;
    this.name = undefined;
    this.notes = undefined;
    this.icon = undefined;
    this.customIcon = undefined;
    this.times = new KdbxTimes();
    this.expanded = undefined;
    this.defaultAutoTypeSeq = undefined;
    this.enableAutoType = undefined;
    this.enableSearching = undefined;
    this.lastTopVisibleEntry = undefined;
    this.groups = [];
    this.entries = [];
    this.parentGroup = undefined;
    this.customData = undefined;
    Object.preventExtensions(this);
}
1288787
function registerConditionsToGroup(conditions) {
            for (let i = 0; i < conditions.length; ++i) {
                const condition = conditions[i];

                if (condition.group) {
                    let group = groupMap.get(condition.group);

                    if (!group) {
                        group = [];
                        groupMap.set(condition.group, group);
                    }
                    group.push(condition);
                }
            }
        }
900938
function groupsFactory() {
  let list = []

  const getGroupsByRoot = function(root) {
    for (let i = 0; i < list.length; i++) {
      let groups = list[i]
      if (groups.rootEl === root) {
        return groups
      }
    }
    return null
  }

  return {
    add: function(root, group) {
      let groups = getGroupsByRoot(root)
      if (!groups) {
        groups = new Groups(root, [])
        list.push(groups)
      }
      if (group) {
        group._list = groups
        group.resolve()

        groups.add(group)
      }
    },
    groups: function() {
      return list.length === 1 ? list[0] : list
    }
  }
}
573720
function groupBy(keySelector, elementSelector, resultSelector, keyComparator) {
            __assertFunction(keySelector);
            __assertFunction(elementSelector);
            __assert(__isUndefined(resultSelector) || __isFunction(resultSelector), 'resultSelector must be undefined or function!');
            __assertFunction(keyComparator);
            let groups = new Map();
            let result;
            for (let val of self) {
                // Instead of checking groups.has we use our custom function since we want to treat some keys as equal even if they aren't for the Map
                const key = __Collection.__getEqualKey(groups, keySelector(val), keyComparator);
                const elem = elementSelector(val);
                if (groups.has(key)) {
                    groups.get(key).push(elem);
                }
                else {
                    groups.set(key, [elem]);
                }
            }
            if (resultSelector) {
                // If we want to select the final result with the resultSelector, we use the built-in Select function and retrieve a new Collection
                result = __Collection.from(groups).select((g) => resultSelector(...g));
            }
            else {
                // our result is just the groups -> return the Map
                result = groups;
            }
            return result;
        }
536702
function(instances, grouped) {
    instances.forEach(function(instance) {
      var fk = instance.getAttribute(this.foreignKeyAttr);
      var results = grouped[fk] || [];
      this.associateFetchedObjects(instance, results);
    }, this);
  }
435179
function (module) {
        "use strict";
    
        var plugins = {};
    
        var order;
        Object.defineProperty(this, 'order', {
            'get': function () {
                return order;
            },
            'set': function (value) {
                order = value;
            }
        });
    
        this.register = function (ID, plugin, group) {
    
            if (!group) group = 'default';
            if (!plugins[group]) plugins[group] = {};
    
            plugins[group][ID] = plugin;
    
        };
    
        this.get = function (group) {
    
            if (!group) group = 'default';
            var group = plugins[group];
    
            var ordered = [];
            for (var i in order) {
    
                var name = order[i];
                if (group[name]) ordered.push(group[name]);
    
            }
    
            // set all the plugins not in the ordered list
            for (var name in group) {
    
                if (!order || order.indexOf(name) === -1) ordered.push(group[name]);
    
            }
    
            return ordered;
    
        };
    
    }
735718
function groupByName(attrs) {
            const attributes = new Map()
            for (const node of attrs) {
                const name = node.key
                const list =
                    attributes.get(name) ||
                    (() => {
                        const a = []
                        attributes.set(name, a)
                        return a
                    })()
                list.push(node)
            }
            return attributes
        }
310874
function addGroupToList(group, list) {
    if (!group) {
      return list;
    }

    if (group.length > 1) {
      list.push(group);
    } else {
      list = list.concat(group);
    }

    return list;
  }
972199
function groupby (args) {
    if (this.typecheck) t.typecheck('groupby', [args]);
    if ('string'===typeof args) args = [args];
    return 'group by '+args.join();
}
698792
function (cb, scope) {
            var es = this.__entrySet(), l = es.length, f = cb.bind(scope || this);
            es.forEach.apply(es, arguments);
        }
627905
function groupData(data, fieldIndex) {
    const hashMap = new Map();
    const groupedData = [];

    data.forEach((datum) => {
        const fieldVal = datum[fieldIndex];
        if (hashMap.has(fieldVal)) {
            groupedData[hashMap.get(fieldVal)][1].push(datum);
        } else {
            groupedData.push([fieldVal, [datum]]);
            hashMap.set(fieldVal, groupedData.length - 1);
        }
    });

    return groupedData;
}
871693
function () {
        var foundOne
        sortGroups()

        var i
        for (i = 0; i < groupsMainTable.children.length; i++) {
          var row = groupsMainTable.children[i]
          row.trashMe = true
        }

        for (var g = 0; g < groups.length; g++) {
          // var book = groups[g][0]
          var name = groups[g][1]
          var group = groups[g][2]

          // selectedGroups[group.uri] = false
          foundOne = false

          for (i = 0; i < groupsMainTable.children.length; i++) {
            let row = groupsMainTable.children[i]
            if (row.subject && row.subject.sameTerm(group)) {
              row.trashMe = false
              foundOne = true
              break
            }
          }
          if (!foundOne) {
            var groupRow = groupsMainTable.appendChild(dom.createElement('tr'))
            groupRow.subject = group
            UI.widgets.makeDraggable(groupRow, group)

            groupRow.setAttribute('style', dataCellStyle)
            groupRow.textContent = name
            var foo = function addNewGroupRow2 (groupRow, group, name) {
              // Is something is dropped on a group, add people to group
              var handleURIsDroppedOnGroup = function (uris) {
                uris.forEach(function (u) {
                  console.log('Dropped on group: ' + u)
                  var thing = kb.sym(u)
                  var toBeFetched = [thing.doc(), group.doc()]

                  kb.fetcher.load(toBeFetched).then(function (xhrs) {
                    var types = kb.findTypeURIs(thing)
                    for (var ty in types) {
                      console.log('    drop object type includes: ' + ty) // @@ Allow email addresses and phone numbers to be dropped?
                    }
                    if (ns.vcard('Individual').uri in types || ns.vcard('Organization').uri in types) {
                      var pname = kb.any(thing, ns.vcard('fn'))
                      if (!pname) return alert('No vcard name known for ' + thing)
                      var already = kb.holds(group, ns.vcard('hasMember'), thing, group.doc())
                      if (already) return alert('ALREADY added ' + pname + ' to group ' + name)
                      var message = 'Add ' + pname + ' to group ' + name + '?'
                      if (confirm(message)) {
                        var ins = [ $rdf.st(group, ns.vcard('hasMember'), thing, group.doc()),
                          $rdf.st(thing, ns.vcard('fn'), pname, group.doc())]
                        kb.updater.update([], ins, function (uri, ok, err) {
                          if (!ok) return complain('Error adding member to group ' + group + ': ' + err)
                          console.log('Added ' + pname + ' to group ' + name)
                          // @@ refresh UI
                        })
                      }
                    }
                  }).catch(function (e) {
                    complain('Error looking up dropped thing ' + thing + ' and group: ' + e)
                  })
                })
              }
              UI.widgets.makeDropTarget(groupRow, handleURIsDroppedOnGroup)

              UI.widgets.deleteButtonWithCheck(dom, groupRow, 'group ' + name, function () {
                deleteThing(group)
                syncGroupTable()
              })
              groupRow.addEventListener('click', function (event) {
                event.preventDefault()
                var groupList = kb.sym(group.uri.split('#')[0])
                if (!event.metaKey) {
                  selectedGroups = {} // If Command key pressed, accumulate multiple
                }
                selectedGroups[group.uri] = !selectedGroups[group.uri]
                refreshGroupsSelected()
                peopleMainTable.innerHTML = '' // clear in case refreshNames doesn't work for unknown reason

                kb.fetcher.nowOrWhenFetched(groupList.uri, undefined, function (ok, message) {
                  if (!ok) return complainIfBad(ok, "Can't load group file: " + groupList + ': ' + message)
                  refreshNames()

                  if (!event.metaKey) { // If only one group has beeen selected show ACL
                    cardMain.innerHTML = ''
                    var visible = false
                    var aclControl = UI.aclControl.ACLControlBox5(group, dom, 'group', kb, function (ok, body) {
                      if (!ok) cardMain.innerHTML = 'Failed: ' + body
                    })
                    var sharingButton = cardMain.appendChild(dom.createElement('button'))
                    sharingButton.style.cssText = 'padding: 1em; margin: 1em'
                    var img = sharingButton.appendChild(dom.createElement('img'))
                    img.style.cssText = 'width: 1.5em; height: 1.5em'
                    img.setAttribute('src', UI.icons.iconBase + 'noun_123691.svg')
                    sharingButton.addEventListener('click', function () {
                      visible = !visible
                      if (visible) {
                        cardMain.appendChild(aclControl)
                      } else {
                        cardMain.removeChild(aclControl)
                      }
                    })
                  }
                })
              }, true)
            }
            foo(groupRow, group, name)
          } // if not foundOne
        } // loop g

        for (i = 0; i < groupsMainTable.children.length; i++) {
          let r = groupsMainTable.children[i]
          if (r.trashMe) {
            groupsMainTable.removeChild(r)
          }
        }
        refreshGroupsSelected()
      }
469633
private function addEntry($entry)
	{
		if($entry != null)
		{
			if($this->entries == null)
				$this->entries = array();
			$this->entries[] = $entry;
		}
	}
945314
function(data, options) {
    if (typeof data.length !== 'undefined') {
      if (typeof data[0].length !== 'undefined') {
        this.grouped = true;

        // TODO: Find longest?
        this.group_size = data[0].length;
        var o = {}, k, i = 0;
        for (k in options.labels) {
          k = options.labels[k];
          o[k] = data[i];
          i++;
        }
        return o;
      } else {
        return { 'one': data };
      }
    } else {
      return data;
    }
  }
836198
function groupBy(keySelector, elementSelector, resultSelector, keyComparator) {
                            __assertFunction(keySelector);
                            __assertFunction(elementSelector);
                            __assert(__isUndefined(resultSelector) || __isFunction(resultSelector), 'resultSelector must be undefined or function!');
                            __assertFunction(keyComparator);
                            var groups = new Map();
                            var result = void 0;
                            var _iteratorNormalCompletion15 = true;
                            var _didIteratorError15 = false;
                            var _iteratorError15 = undefined;

                            try {
                                for (var _iterator15 = self[Symbol.iterator](), _step15; !(_iteratorNormalCompletion15 = (_step15 = _iterator15.next()).done); _iteratorNormalCompletion15 = true) {
                                    var val = _step15.value;

                                    // Instead of checking groups.has we use our custom function since we want to treat some keys as equal even if they aren't for the Map
                                    var key = __Collection.__getEqualKey(groups, keySelector(val), keyComparator);
                                    var elem = elementSelector(val);
                                    if (groups.has(key)) {
                                        groups.get(key).push(elem);
                                    } else {
                                        groups.set(key, [elem]);
                                    }
                                }
                            } catch (err) {
                                _didIteratorError15 = true;
                                _iteratorError15 = err;
                            } finally {
                                try {
                                    if (!_iteratorNormalCompletion15 && _iterator15.return) {
                                        _iterator15.return();
                                    }
                                } finally {
                                    if (_didIteratorError15) {
                                        throw _iteratorError15;
                                    }
                                }
                            }

                            if (resultSelector) {
                                // If we want to select the final result with the resultSelector, we use the built-in Select function and retrieve a new Collection
                                result = __Collection.from(groups).select(function (g) {
                                    return resultSelector.apply(undefined, _toConsumableArray(g));
                                });
                            } else {
                                // our result is just the groups -> return the Map
                                result = groups;
                            }
                            return result;
                        }
252776
function createGroups(node) {
            if (node.properties.length === 1) {
                return [node.properties];
            }

            return node.properties.reduce((groups, property) => {
                const currentGroup = last(groups),
                    prev = last(currentGroup);

                if (!prev || continuesPropertyGroup(prev, property)) {
                    currentGroup.push(property);
                } else {
                    groups.push([property]);
                }

                return groups;
            }, [
                []
            ]);
        }
787812
function buildContainerGroups() {
            let container = svg
              .append('g')
                .classed('legend-container-group', true)
                .attr('transform', `translate(${margin.left},${margin.top})`);

            container
              .append('g')
                .classed('legend-group', true);
        }