<commit_before>'use strict';

var assign          = require('es5-ext/object/assign')
  , forEach         = require('es5-ext/object/for-each')
  , startsWith      = require('es5-ext/string/#/starts-with')
  , toArray         = require('es5-ext/array/to-array')
  , d               = require('d')
  , autoBind        = require('d/auto-bind')
  , memoize         = require('memoizee/plain')
  , isObservable    = require('observable-value/is-observable')
  , makeElement     = require('dom-ext/document/#/make-element')
  , castAttribute   = require('dom-ext/element/#/cast-attribute')
  , replaceContent  = require('dom-ext/element/#/replace-content')
  , resolveProperty = require('dbjs/_setup/utils/resolve-property-path')
  , DOMComposite    = require('../_composite')
  , htmlAttributes  = require('../_html-attributes')
  , setup           = require('../')
  , componentRender = require('./get-component-render')('li')

  , defineProperty = Object.defineProperty
  , getObservable, Fieldset;

getObservable = function (name) {
	var result = resolveProperty(this, name);
	return result.object.getObservable(result.key);
};

Fieldset = function (document, list/*, options*/) {
	var options = Object(arguments[2]);

	this.document = document;
	this.list = list;
	this.items = {};
	this.options = Object(options.control);
	if (this.options.render == null) this.options.render = componentRender;
	this.customOptions = Object(options.controls);
	this.prepend = options.prepend;
	this.append = options.append;

	this.list = list.map(this.renderItem, this);
	if (isObservable(this.list)) this.list.on('change', this.reload);

	this.render();
	forEach(options, function (value, name) {
		if (!htmlAttributes[name] && !startsWith.call(name, 'data-')) return;
		castAttribute.call(this.dom, name, value);<commit_msg>Do not unify component with list item<commit_after>'use strict';

var assign          = require('es5-ext/object/assign')
  , forEach         = require('es5-ext/object/for-each')
  , startsWith      = require('es5-ext/string/#/starts-with')
  , toArray         = require('es5-ext/array/to-array')
  , d               = require('d')
  , autoBind        = require('d/auto-bind')
  , memoize         = require('memoizee/plain')
  , isObservable    = require('observable-value/is-observable')
  , makeElement     = require('dom-ext/document/#/make-element')
  , castAttribute   = require('dom-ext/element/#/cast-attribute')
  , replaceContent  = require('dom-ext/element/#/replace-content')
  , resolveProperty = require('dbjs/_setup/utils/resolve-property-path')
  , DOMComposite    = require('../_composite')
  , htmlAttributes  = require('../_html-attributes')
  , setup           = require('../')

  , defineProperty = Object.defineProperty
  , getObservable, Fieldset;

getObservable = function (name) {
	var result = resolveProperty(this, name);
	return result.object.getObservable(result.key);
};

Fieldset = function (document, list/*, options*/) {
	var options = Object(arguments[2]);

	this.document = document;
	this.list = list;
	this.items = {};
	this.options = Object(options.control);
	this.customOptions = Object(options.controls);
	this.prepend = options.prepend;
	this.append = options.append;

	this.list = list.map(this.renderItem, this);
	if (isObservable(this.list)) this.list.on('change', this.reload);

	this.render();
	forEach(options, function (value, name) {
		if (!htmlAttributes[name] && !startsWith.call(name, 'data-')) return;
		castAttribute.call(this.dom, name, value);
{'fraction_non_alphanumeric': 0.1643366619115549, 'fraction_numerical': 0.0028530670470756064, 'mean_word_length': 3.718707940780619, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1424260', 'n_tokens_mistral': 1114, 'n_tokens_neox': 1103, 'n_words': 186}