Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var div, extend, extendAttrs, pipe, see, setAutoWidth, text, _ref, _ref1;
_ref = require('lazy-flow'), see = _ref.see, pipe = _ref.pipe;
extend = require('extend').extend;
_ref1 = require('../core/tag'), text = _ref1.text, div = _ref1.div;
extendAttrs = require('../core/property').extendAttrs;
exports.setAutoWidth = setAutoWidth = function(container, options) {
var initialWidth, inputAttrs, inputComponent, inputEventHandler, inputEvents, inputText$, inputTextWidth$, spaceWidth, testSubject, testSubjectStyle;
if (options == null) {
options = {};
}
initialWidth = options.initialWidth || 48;
spaceWidth = options.spaceWidth || 40;
inputTextWidth$ = see(initialWidth);
inputEvents = options.inputEvents || "onkeydown";
inputComponent = options.inputComponent || container.children[0];
inputText$ = see("");
/** @module accordion
* @directive accordion
*/
var Component, a, accordion, accordionGroup, div, each, exports, extend, extendAttrs, h4, img, span, _ref;
extend = require('extend').extend;
each = require('../core/instantiate').each;
_ref = require('../core/tag'), div = _ref.div, h4 = _ref.h4, a = _ref.a, span = _ref.span, img = _ref.img;
extendAttrs = require('../core/property').extendAttrs;
Component = require('../core/base/Component').Component;
module.exports = exports = accordion = function(attrs, accordionGroupList, options) {
var accordionOptions, comp;
attrs = extendAttrs({
"class": "panel-group"
}, attrs || {});
accordionOptions = options || {};
return comp = div(attrs, each(accordionGroupList, function(group, index) {