/* js/src/Labeled.js 
Wrapper allowing vertex labeling.
514778
function Labeled(G, V, labels) {

			this.G = G;
			this.V = V;
			this.labels = labels;
		}
851326
function(graph, opt) {

        opt = opt || {};

        var glGraphType = _.pick(opt, 'directed', 'compound', 'multigraph');
        var glGraph = new graphlib.Graph(glGraphType);
        var setNodeLabel = opt.setNodeLabel || _.noop;
        var setEdgeLabel = opt.setEdgeLabel || _.noop;
        var setEdgeName = opt.setEdgeName || _.noop;

        graph.get('cells').each(function(cell) {

            if (cell.isLink()) {

                var source = cell.get('source');
                var target = cell.get('target');

                // Links that end at a point are ignored.
                if (!source.id || !target.id) return;

                // Note that if we are creating a multigraph we can name the edges. If
                // we try to name edges on a non-multigraph an exception is thrown.
                glGraph.setEdge(source.id, target.id, setEdgeLabel(cell), setEdgeName(cell));

            } else {

                glGraph.setNode(cell.id, setNodeLabel(cell));

                // For the compound graphs we have to take embeds into account.
                if (glGraph.isCompound() && cell.has('parent')) {
                    glGraph.setParent(cell.id, cell.get('parent'));
                }
            }
        });

        return glGraph;
    }
385704
function wrapDefine( src, path ){

        path = path.replace('src/', '');

        var deps = ['physicsjs'];
        var l = path.split('/').length;
        var pfx = l > 0 ? (new Array( l )).join('../') : './';
        src.replace(/@requires\s([\w-_\/]+(\.js)?)/g, function( match, dep ){

            var i = dep.indexOf('.js');

            if ( i > -1 ){
                // must be a 3rd party dep
                dep = dep.substr( 0, i );
                deps.push( dep );
            } else {
                // just get the dependency
                deps.push( pfx + dep );
            }
            // no effect
            return match;
        });

        var data = {
            src: src.replace(/\n/g, '\n    '),
            path: path,
            deps: deps
        };

        return grunt.template.process(config.banner, config) +
            grunt.template.process(config.extensionWrapper, {data: data});
    }
487628
function displayNameDOM(node){
    $('.nodeLabel').remove();
    var nodePos = layout.getNodePosition(node._id);
    var domPos = {
        x: nodePos.x,
        y: nodePos.y
    };

    graphics.transformGraphToClientCoordinates(domPos);

    var labelStyle = generateDOMLabel(node).style;
    labelStyle.left = domPos.x;
    labelStyle.top = domPos.y;
}
989994
function LabelAtlas (opts) {
    LabelAtlas.superclass.constructor.call(this, {
        file: opts.charMapFile,
        itemWidth: opts.itemWidth,
        itemHeight: opts.itemHeight,
        itemsToRender: opts.string.length,
        size: new geo.Size(opts.itemWidth * opts.string.length, opts.itemHeight)
    })

    events.addPropertyListener(this, 'string', 'change', this.updateAtlasValue.bind(this))

    this.mapStartChar = opts.startCharMap.charCodeAt(0)
    this.string = opts.string

    this.contentSize = new geo.Size(opts.itemWidth * this.string.length, opts.itemHeight)
}
347323
function addlabel(name, opts) {
    opts = opts || {};

    var type  = opts.type;
    var token = opts.token;
    var islet = opts.islet;

    // Define label in the current function in the current scope.
    if (type === "exception") {
      if (_.has(funct["(context)"], name)) {
        if (funct[name] !== true && !state.option.node) {
          warning("W002", state.tokens.next, name);
        }
      }
    }

    if (_.has(funct, name) && !funct["(global)"]) {
      if (funct[name] === true) {
        if (state.option.latedef) {
          if ((state.option.latedef === true && _.contains([funct[name], type], "unction")) ||
              !_.contains([funct[name], type], "unction")) {
            warning("W003", state.tokens.next, name);
          }
        }
      } else {
        if ((!state.option.shadow || _.contains([ "inner", "outer" ], state.option.shadow)) &&
            type !== "exception" || funct["(blockscope)"].getlabel(name)) {
          warning("W004", state.tokens.next, name);
        }
      }
    }

    if (funct["(context)"] && _.has(funct["(context)"], name) && type !== "function") {
      if (state.option.shadow === "outer") {
        warning("W123", state.tokens.next, name);
      }
    }

    // if the identifier is from a let, adds it only to the current blockscope
    if (islet) {
      funct["(blockscope)"].current.add(name, type, state.tokens.curr);
    } else {
      funct["(blockscope)"].shadow(name);
      funct[name] = type;

      if (token) {
        funct["(tokens)"][name] = token;
      }

      setprop(funct, name, { unused: opts.unused || false });

      if (funct["(global)"]) {
        global[name] = funct;
        if (_.has(implied, name)) {
          if (state.option.latedef) {
            if ((state.option.latedef === true && _.contains([funct[name], type], "unction")) ||
                !_.contains([funct[name], type], "unction")) {
              warning("W003", state.tokens.next, name);
            }
          }

          delete implied[name];
        }
      } else {
        scope[name] = funct;
      }
    }
  }
52354
function(tag, node, controller){
    var pos = node.pos.getc(true), canvas = this.viz.canvas;
    var radius = canvas.getSize();
    var labelPos = {
      x: Math.round(pos.x + radius.width / 2),
      y: Math.round(pos.y + radius.height / 2)
    };
    tag.setAttribute('x', labelPos.x);
    tag.setAttribute('y', labelPos.y);

    controller.onPlaceLabel(tag, node);
  }
271728
function labeledByATab(element) {
        if (element.hasAttribute('aria-labelledby')) {
            var labelingElements = document.querySelectorAll('#' + element.getAttribute('aria-labelledby'));
            return labelingElements.length === 1 && labelingElements[0].getAttribute('role') === 'tab';
        }
        return false;
    }
1095428
def labels(self, text=None, coordinates=None, colorlist=None, sizes=None, fonts=None, opacity=1.0):
        ''''''
        if coordinates is None:
            coordinates=self.coordinates
        l=len(coordinates)
        if text is None:
            if len(self.topology.get('atom_types'))==l:
                text=[self.topology['atom_types'][i]+str(i+1) for i in range(l)]
            else:
                text=[str(i+1) for i in range(l)]

        text_representation = self.add_representation('text', {'coordinates':   coordinates,
                                                               'text':        text,
                                                               'colors':      colorlist,
                                                               'sizes':       sizes,
                                                               'fonts':       fonts,
                                                               'opacity':     opacity})
        def update(self=self, text_representation=text_representation):
            self.update_representation(text_representation, {'coordinates': coordinates})

        self.update_callbacks.append(update)
1327750
function Label({ onMouseEnter, onMouseLeave, ...other }) {
  const {
    downshift: { getLabelProps }
  } = useDropdownContext();
  const { setIsLabelHovered } = useFieldContext();

  const labelProps = getLabelProps({
    onMouseEnter: composeEventHandlers(onMouseEnter, () => {
      setIsLabelHovered(true);
    }),
    onMouseLeave: composeEventHandlers(onMouseLeave, () => {
      setIsLabelHovered(false);
    }),
    ...other
  });

  return <StyledLabel {...labelProps} />;
}
767387
function (src, x, y, width, height) {
		var attribs = {
				preserveAspectRatio: NONE
			},
			elemWrapper;

		// optional properties
		if (arguments.length > 1) {
			extend(attribs, {
				x: x,
				y: y,
				width: width,
				height: height
			});
		}

		elemWrapper = this.createElement('image').attr(attribs);

		// set the href in the xlink namespace
		if (elemWrapper.element.setAttributeNS) {
			elemWrapper.element.setAttributeNS('http://www.w3.org/1999/xlink',
				'href', src);
		} else {
			// could be exporting in IE
			// using href throws "not supported" in ie7 and under, requries regex shim to fix later
			elemWrapper.element.setAttribute('hc-svg-href', src);
	}

		return elemWrapper;
	}
592584
function UMLAttributeView() {
        LabelView.apply(this, arguments);
        this.selectable = Core.SK_YES;
        this.sizable = Core.SZ_NONE;
        this.movable = Core.MM_NONE;
        this.parentStyle = true;
        this.horizontalAlignment = Graphics.AL_LEFT;
    }
1342299
function browserifyAnonymousLabeler(bundler) {
  var isValid = bundler && (typeof bundler === 'object') &&
    (typeof bundler.on === 'function') && (typeof bundler.pipeline === 'object');
  if (isValid) {
    bundler.pipeline
      .get('label')
      .push(anonymousLabeler());
  }
  else {
    throw new Error('Expected a browserify bundler instance');
  }
}
1096771
function (vertices) {
        if (vertices.length > 0) {
            var min = this.min;
            var max = this.max;
            var minArr = min.array;
            var maxArr = max.array;
            vec3Copy(minArr, vertices[0]);
            vec3Copy(maxArr, vertices[0]);
            for (var i = 1; i < vertices.length; i++) {
                var vertex = vertices[i];

                if (vertex[0] < minArr[0]) { minArr[0] = vertex[0]; }
                if (vertex[1] < minArr[1]) { minArr[1] = vertex[1]; }
                if (vertex[2] < minArr[2]) { minArr[2] = vertex[2]; }

                if (vertex[0] > maxArr[0]) { maxArr[0] = vertex[0]; }
                if (vertex[1] > maxArr[1]) { maxArr[1] = vertex[1]; }
                if (vertex[2] > maxArr[2]) { maxArr[2] = vertex[2]; }
            }
            min._dirty = true;
            max._dirty = true;
        }
    }
537842
function updateInputGraph(inputGraph, layoutGraph) {
  _.forEach(inputGraph.nodes(), function(v) {
    var inputLabel = inputGraph.node(v);
    var layoutLabel = layoutGraph.node(v);

    if (inputLabel) {
      inputLabel.x = layoutLabel.x;
      inputLabel.y = layoutLabel.y;

      if (layoutGraph.children(v).length) {
        inputLabel.width = layoutLabel.width;
        inputLabel.height = layoutLabel.height;
      }
    }
  });

  _.forEach(inputGraph.edges(), function(e) {
    var inputLabel = inputGraph.edge(e);
    var layoutLabel = layoutGraph.edge(e);

    inputLabel.points = layoutLabel.points;
    if (_.has(layoutLabel, "x")) {
      inputLabel.x = layoutLabel.x;
      inputLabel.y = layoutLabel.y;
    }
  });

  inputGraph.graph().width = layoutGraph.graph().width;
  inputGraph.graph().height = layoutGraph.graph().height;
}
12035
function(other, t) {
            var newpos = this.pos.lerp(other.pos, t);
            return new CSG.Vertex(newpos);
        }
825895
function(tpl, data, label) {
    var t = String(tpl),
      s = label || /#\{([^}]*)\}/mg,
      trim = String.trim ||
      function(str) {
          return str.replace(/^\s+|\s+$/g, "")
      }
    return t.replace(s, function(value, name) {
      value = data[trim(name)]
      // only handle `undefined`
      return value === undefined ? "" : value
    })
  }