text: /* */ 
  define(['exports'], function (exports) {
    'use strict';
  
    exports.__esModule = true;
    exports.viewsRequireLifecycle = viewsRequireLifecycle;
    var lifecycleOptionalBehaviors = ['focus', 'if', 'repeat', 'show', 'with'];
  
    exports.lifecycleOptionalBehaviors = lifecycleOptionalBehaviors;
    function behaviorRequiresLifecycle(instruction) {
      var t = instruction.type;
      var name = t.elementName !== null ? t.elementName : t.attributeName;
      if (lifecycleOptionalBehaviors.indexOf(name) === -1) {
        return t.handlesAttached || t.handlesBind || t.handlesCreated || t.handlesDetached || t.handlesUnbind;
      }
      return instruction.viewFactory && viewsRequireLifecycle(instruction.viewFactory);
    }
  
    function targetRequiresLifecycle(instruction) {
      var behaviors = instruction.behaviorInstructions;
      if (behaviors) {
        var i = behaviors.length;
        while (i--) {
          if (behaviorRequiresLifecycle(behaviors[i])) {
            return true;
          }
        }
      }
  
      return instruction.viewFactory && viewsRequireLifecycle(instruction.viewFactory);
    }
  
    function viewsRequireLifecycle(viewFactory) {
      if ('_viewsRequireLifecycle' in viewFactory) {
        return viewFactory._viewsRequireLifecycle;
      }
  
      if (viewFactory.viewFactory) {
        viewFactory._viewsRequireLifecycle = viewsRequireLifecycle(viewFactory.viewFactory);
        return viewFactory._viewsRequireLifecycle;
      }
  
      if (viewFactory.template.querySelector('.au-animate')) {
        viewFactory._viewsRequireLifecycle = true;
        return true;
      }
  
      for (var id in viewFactory.instructions) {
        if (targetRequiresLifecycle(viewFactory.instructions[id])) {
          viewFactory._viewsRequireLifecycle = true;
          return true;
        }
      }
  
      viewFactory._viewsRequireLifecycle = false;
      return false;
    }
  });