<!-- from /src/demo/index.pug - converted, and adapted -->

<!DOCTYPE html>
<html ng-app="App">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
    <meta name="description" content="UI-Carousel lightweight module">
    <link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
    <link href="https://fonts.googleapis.com/css?family=Lato:400,500,700,900" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css?family=Pacifico" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.css">
    <!-- build:css style.css-->
    <!--<link rel="stylesheet" type="text/css" href="../bower_components/prism/themes/prism-okaidia.css">-->
    <link rel="stylesheet" type="text/css" href="ui-carousel.css">
    <link rel="stylesheet" type="text/css" href="style.css">
    <!-- endbuild-->
    <title>UI-Carousel - simple lightweight carousel for angular app</title>
  </head>
  <body ng-controller="CarouselDemoCtrl as demo">
    <main class="main" role="main">
      <section class="screen">
        <div class="container">
          <div class="content-box">
            <ui-carousel slides="[]" settings="demo.settings">
              <carousel-item>
                <h3>{{ item + 1 }}</h3>
              </carousel-item>
            </ui-carousel>
          </div>
        </div>
      </section>
      <div>
        Number of slides <input type="text" ng-model="demo.settings.numberOfSlides">
        <br>
        <input type="checkbox" id="autoplay" ng-model="demo.settings.autoplay"> <label for="autoplay">Autoplay</label>
        <br>
        <input type="checkbox" id="dots" ng-model="demo.settings.dots"> <label for="dots">Dots</label>
        <br>
        <pre>{{demo.settings}}</pre>
      </div>
    </main>

    <!-- build:js main.js-->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.0/angular.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular-sanitize/1.6.0/angular-sanitize.js"></script>
    <!--<script src="../bower_components/prism/prism.js"></script>-->
    <script src="ui-carousel.js"></script>
    <script src="main.js"></script>
    <!-- endbuild-->
  </body>
</html>
// from /src/demo/main.js - converted

'use strict';

function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }

var app = angular.module('App', ['ui.carousel', 'ngSanitize']);

app.run(['Carousel', function (Carousel) {
  Carousel.setOptions({});
}]);

app.controller('CarouselDemoCtrl', ['$scope', 'Carousel', function ($scope, Carousel) {
  'use strict';

  var vm = this;

  activate();
  function activate() {
    vm.settings = {
      numberOfSlides: 6,
      slidesToShow: 3,
      slidesToScroll: 1,
      initialSlide: 0,
      autoplay: true,
      autoplaySpeed: 2000,
      dots: false
    };
  }
  
  $scope.$watch('demo.settings.numberOfSlides', function (newValue) {
    console.log(newValue);
    vm.settings.slides = [].concat(_toConsumableArray(Array(newValue).keys()));
  });
}]);

/* from /src/demo/style.scss - converted */

body {
  font-size: 16px;
  line-height: 20px;
  font-family: 'Roboto', sans-serif;
  background-color: #fafafa;
}
.container {
  max-width: 360px;
}
.header {
  padding: 50px 0 10px;
  color: #3498db;
  background: #fff;
  text-align: center;
}
.header h1 {
  margin-bottom: 40px;
}
h1 {
  font-weight: 400;
  font-family: 'Pacifico', cursive;
  font-size: 70px;
}
h2.title {
  font-weight: bold;
  font-size: 40px;
  font-family: 'Pacifico', cursive;
  margin-bottom: 40px;
}
.footer {
  font-size: 14px;
  padding: 30px 0;
  color: #99979c;
  background-color: #2a2730;
}
.footer p {
  margin-bottom: 0;
}
.footer-links {
  padding: 0;
  list-style: none;
}
.footer-links li {
  display: inline;
  margin-right: 15px;
}
.footer a {
  color: #fff;
}
.main {
  background-color: #3498db;
  color: #fff;
  padding: 30px 0 50px;
  position: relative;
  min-height: 500px;
  text-align: center;
}
.main input { color: black; }
.divider {
  display: block;
  float: none;
  max-width: 500px;
  height: 1px;
  margin: 40px auto;
  clear: both;
  float: none;
  background-color: #fff;
}
ul.features {
  padding: 0;
  list-style: none;
}
ul.features li {
  padding: 7px 0;
}
h3 {
  font-weight: 700;
  background: #fff;
  color: #3498db;
  font-size: 36px;
  line-height: 100px;
  margin: 10px;
  padding: 10px;
  position: relative;
  text-align: center;
}
.ui-carousel {
  margin-bottom: 50px;
}
.ui-carousel .image {
  padding: 10px;
}
.ui-carousel .image img {
  display: block;
  border: 5px solid #fff;
  width: 100%;
}
pre[class*="language-"] {
  background-color: #fdfdfd;
  margin-bottom: 1em;
  margin-left: 10px;
  margin-right: 10px;
  border-radius: 0;
}
code[class*="language"] {
  background: black;
  max-height: inherit;
  padding: 15px;
  display: block;
  overflow: auto;
  text-shadow: none;
}
.buttons {
  padding: 0 20px 20px;
  margin-bottom: 10px;
}
.button {
  float: left;
  background: #fff;
  color: #3498db;
  display: block;
  font-size: 16px;
  margin: 20px auto;
  padding: 20px;
  text-align: center;
  text-decoration: none;
  width: 48%;
  margin-right: 2%;
  cursor: pointer;
}
.button:hover {
  text-decoration: none;
}
// from /dist/ui-carousel.js

'use strict';

(function (angular) {
  // Create all modules and define dependencies to make sure they exist
  // and are loaded in the correct order to satisfy dependency injection
  // before all nested files are concatenated by Gulp

  // Config
  angular.module('ui.carousel.config', []).value('ui.carousel.config', {
    debug: true
  });
 
  // Modules
  angular.module('ui.carousel.providers', []);
  angular.module('ui.carousel.controllers', []);
  angular.module('ui.carousel.directives', []);
  angular.module('ui.carousel', ['ui.carousel.config', 'ui.carousel.directives', 'ui.carousel.controllers', 'ui.carousel.providers']);
})(angular);
'use strict';

/**
 * angular-ui-carousel
 * for example:
 * length = 8, show = 4, scroll = 3, current = 0
 *          ---------
 *          |       |
 *  |4|5|6|7|0|1|2|3|4|5|6|7|1|2|3|4
 *          |       |
 *          ---------
 * rectangle is visible for users
 */
angular.module('ui.carousel.controllers').controller('CarouselController', ['$scope', '$element', '$timeout', '$q', 'Carousel', '$window', function ($scope, $element, $timeout, $q, Carousel, $window) {
  var _this = this;

  /**
   * Initial carousel
   *
   * Mirgate to angularjs 1.6
   * @see https://docs.angularjs.org/guide/migration#commit-bcd0d4
   */
  this.$onInit = function () {
    _this.initOptions();
    _this.initRanges();
    _this.setProps();
    _this.setupInfinite();
  };

  /**
   * Init option based on directive config
   */
  this.initOptions = function () {
    _this.options = angular.extend({}, Carousel.getOptions());

    // TODO customize attribute from directive
    if (_this.initialSlide !== undefined) {
      _this.options.initialSlide = _this.initialSlide;
    }
    if (_this.fade !== undefined) {
      _this.options.fade = _this.fade;
    }
    if (_this.autoplay !== undefined) {
      _this.options.autoplay = _this.autoplay;
    }
    if (_this.autoplaySpeed !== undefined) {
      _this.options.autoplaySpeed = _this.autoplaySpeed;
    }
    if (_this.cssEase !== undefined) {
      _this.options.cssEase = _this.cssEase;
    }
    if (_this.speed !== undefined) {
      _this.options.speed = _this.speed;
    }
    if (_this.infinite !== undefined) {
      _this.options.infinite = _this.infinite;
    }
    if (_this.arrows !== undefined) {
      _this.options.arrows = _this.arrows;
    }
    if (_this.dots !== undefined) {
      _this.options.dots = _this.dots;
    }
    if (_this.visiblePrev !== undefined) {
      _this.options.visiblePrev = _this.visiblePrev;
    }
    if (_this.visibleNext !== undefined) {
      _this.options.visibleNext = _this.visibleNext;
    }

    // TODO write more options for fade mode
    // In fade mode we have to setting slides-to-show and slides-to-scroll
    // to 1 slide
    if (_this.options.fade) {
      _this.options.slidesToShow = 1;
      _this.options.slidesToScroll = 1;
    } else {
      if (_this.show) {
        _this.options.slidesToShow = _this.show;
      }
      if (_this.scroll) {
        _this.options.slidesToScroll = _this.scroll;
      }
    }
  };

  /**
   * init variables, slides, ..
   */
  this.initRanges = function () {
    if (!_this.slides) {
      _this.slides = [];
    }

    _this.isCarouselReady = false;
    _this.isTrackMoving = false;
    _this.track = $element.find('.track');
    _this.width = 1; // Fake width
    _this.currentSlide = _this.options.initialSlide;
    _this.trackStyle = {};
    _this.slideStyle = {};

    _this.isVisibleDots = false;
    _this.isVisiblePrev = _this.options.visiblePrev;
    _this.isVisibleNext = _this.options.visibleNext;

    _this.isClickablePrev = false;
    _this.isClickableNext = false;

    _this.animType = null;
    _this.transformType = null;
    _this.transitionType = null;
  };

  /**
   * Init UI and carousel track
   */
  this.initUI = function () {
    _this.width = $element[0].clientWidth;

    // Update track width first
    _this.initTrack();

    // Then item style
    $timeout(function () {
      _this.updateItemStyle();
    }, 200);
  };

  /**
   * update common style for each carousel item
   */
  this.updateItemStyle = function () {
    _this.itemWidth = _this.width / _this.options.slidesToShow;
    _this.slideStyle = {
      'width': _this.itemWidth + 'px'
    };
  };

  /**
   * init carousel track
   * also make Carousel is Ready
   */
  this.initTrack = function () {
    var itemWidth = _this.width / _this.options.slidesToShow;
    var trackWidth = itemWidth * _this.slidesInTrack.length;

    _this.trackStyle.width = trackWidth + 'px';

    _this.slideHandler(_this.currentSlide).finally(function () {
      _this.isCarouselReady = true;

      if (!_this.options.fade) {
        _this.refreshTrackStyle();
      }

      // onInit callback
      if (_this.onInit) {
        _this.onInit();
      }
    }).catch(function () {
      // Catch err
    });
  };

  /**
   * @see https://github.com/kenwheeler/slick/blob/master/slick/slick.js#L680
   *
   * Sync slide to place it should be
   * for example:
   * - 9 total, 3 show, 3 scroll, current 1
   *   => next index = 3 (previous index counted = 0)
   *
   * and scroll to next page:
   * - 6 total, 1 show, 1 scroll, current 0 => next index = 1
   * - 9 total, 3 show, 3 scroll, current 1 => next index = 3
   * - 9 total, 3 show, 3 scroll, current 3 => next index = 6
   * - 9 total, 3 show, 3 scroll, current 8 => next index = 3
   * - 8 total, 4 show, 3 scroll, current 1 => next index = 4
   */
  this.next = function () {
    if (!_this.isClickableNext) {
      return false;
    }

    var indexOffset = _this.getIndexOffset();
    var slideOffset = indexOffset === 0 ? _this.options.slidesToScroll : indexOffset;

    _this.slideHandler(_this.currentSlide + slideOffset).catch(function () {
      // Catch err
    });
  };

  /**
   * move to previous slide
   * same calculate with next
   * @see next function
   */
  this.prev = function () {
    if (!_this.isClickablePrev) {
      return false;
    }

    var indexOffset = _this.getIndexOffset();
    var slideOffset = indexOffset === 0 ? _this.options.slidesToScroll : _this.options.slidesToShow - indexOffset;

    _this.slideHandler(_this.currentSlide - slideOffset).catch(function () {
      // Catch err
    });
  };

  /**
   * Get index offset
   */
  this.getIndexOffset = function () {
    var scrollOffset = _this.slides.length % _this.options.slidesToScroll !== 0;
    var indexOffset = scrollOffset ? 0 : (_this.slides.length - _this.currentSlide) % _this.options.slidesToScroll;

    return indexOffset;
  };

  /**
   * move to page
   * @params int page
   * Page counter from 0 (start = 0)
   */
  this.movePage = function (page) {
    var target = _this.options.slidesToScroll * page;
    _this.slideHandler(target).catch(function () {
      // Catch err
    });
  };

  /**
   * hanlder carousel
   * @description move carousel to correct page
   *
   * @params int index
   */
  this.slideHandler = function (index) {
    // TODO prevent when slides not exists
    if (!_this.slides) {
      return $q.reject('Carousel not fully setup');
    }

    // TODO Prevent when track is moving
    if (_this.isTrackMoving) {
      return $q.reject('Track is moving');
    }

    var len = _this.slides.length;
    var show = _this.options.slidesToShow;

    if (len <= show) {
      _this.correctTrack();
      return $q.reject('Length of slides smaller than slides to show');
    }

    // We need target to destination
    // and a anim slide to translate track
    //
    // anim = animSlide (which we use to move)
    // target = targetSlide
    var anim = index;
    var target = null;

    if (anim < 0) {
      if (len % _this.options.slidesToScroll !== 0) {
        target = len - len % _this.options.slidesToScroll;
      } else {
        target = len + anim;
      }
    } else if (anim >= len) {
      if (len % _this.options.slidesToScroll !== 0) {
        target = 0;
      } else {
        target = anim - len;
      }
    } else {
      target = anim;
    }

    if (_this.onBeforeChange) {
      // @see https://docs.angularjs.org/guide/directive
      _this.onBeforeChange({ currentSlide: _this.currentSlide, target: target });
    }

    // Fade handler
    if (_this.options.fade) {
      _this.currentSlide = target;

      // XXX
      // afterChange method
      // fire after faded
      // Should be revised
      $timeout(function () {
        _this.autoplayTrack();

        if (_this.onAfterChange) {
          _this.onAfterChange({ currentSlide: _this.currentSlide });
        }
      }, _this.options.speed);
      return $q.when('Handler fade');
    }

    // No-fade handler
    var itemWidth = _this.width / _this.options.slidesToShow;
    var left = -1 * target * itemWidth;
    if (_this.options.infinite) {
      left = -1 * (anim + show) * itemWidth;
    }

    _this.isTrackMoving = true;
    return _this.moveTrack(left).then(function () {
      _this.isTrackMoving = false;
      _this.currentSlide = target;
      _this.autoplayTrack();

      if (target !== anim) {
        _this.correctTrack();
      }

      if (!_this.options.infinite) {
        if (_this.currentSlide === 0) {
          _this.isClickablePrev = false;
          _this.isClickableNext = true;
        } else if (_this.currentSlide === _this.slidesInTrack.length - _this.options.slidesToShow) {
          _this.isClickableNext = false;
          _this.isClickablePrev = true;
        } else {
          _this.isClickablePrev = true;
          _this.isClickableNext = true;
        }
      }

      // XXX
      // afterChange method
      // fire after 200ms wakeup and correct track
      // Should be revised
      $timeout(function () {
        if (_this.onAfterChange) {
          _this.onAfterChange({ currentSlide: _this.currentSlide });
        }
      }, 200);
    });
  };

  /**
   * moveTrack
   * move track to left position using css3 translate
   * for example left: -1000px
   */
  this.moveTrack = function (left) {
    var deferred = $q.defer();
    if (_this.options.vertical === false) {
      _this.trackStyle[_this.animType] = 'translate3d(' + left + 'px, 0px, 0px)';
    } else {
      _this.trackStyle[_this.animType] = 'translate3d(0px, ' + left + 'px, 0px)';
    }

    $timeout(function () {
      deferred.resolve('Track moved');
    }, _this.options.speed);

    return deferred.promise;
  };

  /**
   * correctTrack
   * @description correct track after move to animSlide we have to move track
   * to exactly its position
   */
  this.correctTrack = function () {
    if (_this.options.infinite) {
      (function () {
        var left = 0;
        if (_this.slides.length > _this.options.slidesToShow) {
          left = -1 * (_this.currentSlide + _this.options.slidesToShow) * _this.itemWidth;
        }

        // Move without anim
        _this.trackStyle[_this.transitionType] = _this.transformType + ' ' + 0 + 'ms ' + _this.options.cssEase;

        _this.isTrackMoving = true;
        $timeout(function () {
          _this.trackStyle[_this.animType] = 'translate3d(' + left + 'px, 0, 0px)';

          // Revert animation
          $timeout(function () {
            _this.refreshTrackStyle();
            _this.isTrackMoving = false;
          }, 200);
        });
      })();
    }
  };

  /**
   * Refresh track style
   */
  this.refreshTrackStyle = function () {
    _this.trackStyle[_this.transitionType] = _this.transformType + ' ' + _this.options.speed + 'ms ' + _this.options.cssEase;
  };

  /**
   * autoplay track
   * @description autoplay = true
   */
  this.autoplayTrack = function () {
    if (_this.options.autoplay) {
      if (_this.timeout) {
        $timeout.cancel(_this.timeout);
      }

      _this.timeout = $timeout(function () {
        _this.next();

        $timeout.cancel(_this.timeout);
        _this.timeout = null;
      }, _this.options.autoplaySpeed);
    }
  };

  this.getSlideStyle = function (index) {
    var style = _this.slideStyle;
    if (_this.options.fade) {
      var left = -1 * index * _this.itemWidth;
      var uniqueStyle = {
        position: 'relative',
        top: '0px',
        left: left + 'px',
        'z-index': index === _this.currentSlide ? 10 : 9,
        opacity: index === _this.currentSlide ? 1 : 0
      };

      if (index >= _this.currentSlide - 1 && index <= _this.currentSlide + 1) {
        uniqueStyle.transition = 'opacity 250ms linear';
      }

      style = angular.extend(style, uniqueStyle);
    }

    return style;
  };

  /**
   * setupInfinite
   * To make carouse infinite we need close number of slidesToShow elements to
   * previous elements and to after elements
   *
   * length = 8, show = 4, scroll = 3, current = 0
   *          ---------
   *          |       |
   *  |4|5|6|7|0|1|2|3|4|5|6|7|1|2|3|4
   *          |       |
   *          ---------
   */
  this.setupInfinite = function () {
    // Clone
    var len = _this.slides.length;
    var show = _this.options.slidesToShow;

    var tmpTrack = angular.copy(_this.slides);

    if (_this.options.infinite && _this.options.fade === false) {
      if (len > show) {
        var number = show;
        for (var i = 0; i < number; i++) {
          tmpTrack.push(angular.copy(_this.slides[i]));
        }
        for (var _i = len - 1; _i >= len - show; _i--) {
          tmpTrack.unshift(angular.copy(_this.slides[_i]));
        }
      }
    }

    _this.slidesInTrack = tmpTrack;
  };

  /**
   * get number of dosts
   *
   * @return Array
   */
  this.getDots = function () {
    if (!_this.slides) {
      return [];
    }

    var dots = Math.ceil(_this.slides.length / _this.options.slidesToScroll);

    var res = [];
    for (var i = 0; i < dots; i++) {
      res.push(i);
    }
    return res;
  };

  /**
   * set carousel property
   *
   * - animType
   * - transformType
   * - transitionType
   */
  this.setProps = function () {
    var bodyStyle = document.body.style;

    /* eslint-disable */
    if (bodyStyle.OTransform !== undefined) {
      _this.animType = 'OTransform';
      _this.transformType = '-o-transform';
      _this.transitionType = 'OTransition';
    }
    if (bodyStyle.MozTransform !== undefined) {
      _this.animType = 'MozTransform';
      _this.transformType = '-moz-transform';
      _this.transitionType = 'MozTransition';
    }
    if (bodyStyle.webkitTransform !== undefined) {
      _this.animType = 'webkitTransform';
      _this.transformType = '-webkit-transform';
      _this.transitionType = 'webkitTransition';
    }
    if (bodyStyle.msTransform !== undefined) {
      _this.animType = 'msTransform';
      _this.transformType = '-ms-transform';
      _this.transitionType = 'msTransition';
    }
    if (bodyStyle.transform !== undefined && _this.animType !== false) {
      _this.animType = 'transform';
      _this.transformType = 'transform';
      _this.transitionType = 'transition';
    }
    /* eslint-enable */

    _this.transformsEnabled = true;
  };

  /**
   * Refresh carousel
   */
  this.refreshCarousel = function () {
    if (_this.slides && _this.slides.length && _this.slides.length > _this.options.slidesToShow) {
      _this.isVisibleDots = true;
      _this.isVisiblePrev = true;
      _this.isVisibleNext = true;
      _this.isClickablePrev = true;
      _this.isClickableNext = true;
    } else {
      _this.isVisibleDots = false;
      _this.isVisiblePrev = _this.options.visiblePrev || false;
      _this.isVisibleNext = _this.options.visibleNext || false;
      _this.isClickablePrev = false;
      _this.isClickableNext = false;
    }

    // Re-init UI
    _this.initUI();
  };

  /**
   * refresh model
   */
  // *** RR
  $scope.$watch('ctrl.settings', function (newValue) {
    //update settings
    newValue = newValue || {};
    if (newValue.slidesToShow) newValue.show = newValue.slidesToShow;
    _this = angular.extend(_this, newValue);

    console.log(88, _this);
    //reset
    _this.$onInit();
    //_this.initRanges();
    _this.refreshCarousel();
  }, true);

  $scope.$watch('ctrl.autoplay', function (newValue) {
    _this.options.autoplay = newValue;
    $timeout.cancel(_this.timeout);
    _this.autoplayTrack();
  });

  $scope.$watchCollection('ctrl.slides', function (slides) {
    if (!slides) {
      return;
    }

    // Init carousel
    if (_this.currentSlide > slides.length - 1) {
      _this.currentSlide = slides.length - 1;
    }

    _this.setupInfinite();
    _this.refreshCarousel();
  });

  /**
   * update when resize
   *
   * @see https://github.com/mihnsen/ui-carousel/issues/10
   * @author tarkant
   */
  angular.element($window).on('resize', this.refreshCarousel);

  /**
   * cleanup when done
   *
   * @see https://github.com/mihnsen/ui-carousel/issues/10
   * @author tarkant
   */
  $scope.$on('$destroy', function () {
    angular.element($window).off('resize');
  });

  // Prior to v1.5, we need to call `$onInit()` manually.
  // (Bindings will always be pre-assigned in these versions.)
  if (angular.version.major === 1 && angular.version.minor < 5) {
    this.$onInit();
  }
}]);
'use strict';

angular.module('ui.carousel.directives').directive('uiCarousel', ['$compile', '$templateCache', '$sce', function ($compile, $templateCache, $sce) {

  return { restrict: 'AE',
    bindToController: true,
    scope: {
      name: '=?',
      slides: '=',
      show: '=?slidesToShow',
      scroll: '=?slidesToScroll',
      classes: '@',
      fade: '=?',
      onChange: '=?',
      disableArrow: '=?',
      autoplay: '=?',
      autoplaySpeed: '=?',
      cssEase: '=?',
      speed: '=?',
      infinite: '=?',
      arrows: '=?',
      dots: '=?',
      initialSlide: '=?',
      visibleNext: '=?',
      visiblePrev: '=?',

      // Method
      onBeforeChange: '&',
      onAfterChange: '&',
      onInit: '&',
      
      // RR
      refresh: '=?',
      settings: '=?'
    },
    link: function link($scope, el) {
      var template = angular.element($templateCache.get('ui-carousel/carousel.template.html'));

      // dynamic injections to override the inner layers' components
      var injectComponentMap = {
        'carousel-item': '.carousel-item',
        'carousel-prev': '.carousel-prev',
        'carousel-next': '.carousel-next'
      };

      var templateInstance = template.clone();
      angular.forEach(injectComponentMap, function (innerSelector, outerSelector) {
        var outerElement = el[0].querySelector(outerSelector);
        if (outerElement) {
          angular.element(templateInstance[0].querySelector(innerSelector)).html(outerElement.innerHTML);
        }
      });

      var compiledElement = $compile(templateInstance)($scope);
      el.addClass('ui-carousel').html('').append(compiledElement);
    },

    controller: 'CarouselController',
    controllerAs: 'ctrl'
  };
}]);
'use strict';

angular.module('ui.carousel.providers').provider('Carousel', function () {
  var _this = this;

  this.options = {
    // Init like Slick carousel
    // XXX Should be revised
    arrows: true,
    autoplay: false,
    autoplaySpeed: 3000,
    cssEase: 'ease',
    dots: false,

    easing: 'linear',
    fade: false,
    infinite: true,
    initialSlide: 0,

    slidesToShow: 1,
    slidesToScroll: 1,
    speed: 500,

    visiblePrev: false,
    visibleNext: false,

    // Not available right now
    draggable: true,

    lazyLoad: 'ondemand',

    swipe: true,
    swipeToSlide: false,
    touchMove: true,

    vertical: false,
    verticalSwiping: false
  };
  this.$get = [function () {
    return {
      setOptions: function setOptions(options) {
        _this.options = angular.extend(_this.options, options);
      },
      getOptions: function getOptions() {
        return _this.options;
      }
    };
  }];
});
'use strict';

(function (module) {
  try {
    module = angular.module('ui.carousel');
  } catch (e) {
    module = angular.module('ui.carousel', []);
  }
  module.run(['$templateCache', function ($templateCache) {
    $templateCache.put('ui-carousel/carousel.template.html', '<div class="carousel-wrapper" ng-show="ctrl.isCarouselReady"><div class="track-wrapper"><div class="track" ng-style="ctrl.trackStyle"><div class="slide" ng-repeat="item in ctrl.slidesInTrack track by $index" ng-style="ctrl.getSlideStyle($index)"><div class="carousel-item"></div></div></div></div><div class="carousel-prev" ng-if="!ctrl.disableArrow" ng-show="ctrl.isVisiblePrev &amp;&amp; ctrl.options.arrows" ng-class="{\'carousel-disable\': !ctrl.isClickablePrev}" ng-click="ctrl.prev()"><button class="carousel-btn"><i class="ui-icon-prev"></i></button></div><div class="carousel-next" ng-if="!ctrl.disableArrow" ng-show="ctrl.isVisibleNext &amp;&amp; ctrl.options.arrows" ng-class="{\'carousel-disable\': !ctrl.isClickableNext}" ng-click="ctrl.next()"><button class="carousel-btn"><i class="ui-icon-next"></i></button></div><ul class="carousel-dots" ng-show="ctrl.isVisibleDots &amp;&amp; ctrl.options.dots"><li ng-repeat="dot in ctrl.getDots()" ng-class="{ \'carousel-active\': dot == ctrl.currentSlide/ctrl.options.slidesToScroll }" ng-click="ctrl.movePage(dot)"><button>{{ dot }}</button></li></ul></div>');
  }]);
})();
/* from /dist/ui-carousel.css - adapted */

.v-middle, .ui-carousel .carousel-btn {
  display: block;
  position: absolute;
  top: 50%;
  -webkit-transform: translate(0, -50%);
  -ms-transform: translate(0, -50%);
  -o-transform: translate(0, -50%);
  transform: translate(0, -50%); }

@font-face {
  font-family: "ui-carousel";
  src: url("https://mihnsen.github.io/ui-carousel/fonts/ui-carousel.eot");
  src: url("https://mihnsen.github.io/ui-carousel/fonts/ui-carousel.eot?#iefix") format("embedded-opentype"), url("https://mihnsen.github.io/ui-carousel/fonts/ui-carousel.woff") format("woff"), url("https://mihnsen.github.io/ui-carousel/fonts/ui-carousel.ttf") format("truetype"), url("https://mihnsen.github.io/ui-carousel/fonts/ui-carousel.svg#ui-carousel") format("svg");
  font-weight: normal;
  font-style: normal; }

[data-icon]:before {
  font-family: "ui-carousel" !important;
  content: attr(data-icon);
  font-style: normal !important;
  font-weight: normal !important;
  font-variant: normal !important;
  text-transform: none !important;
  speak: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; }

[class^="ui-icon-"]:before,
[class*=" ui-icon-"]:before {
  font-family: "ui-carousel" !important;
  font-style: normal !important;
  font-weight: normal !important;
  font-variant: normal !important;
  text-transform: none !important;
  speak: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; }

.ui-icon-prev:before {
  content: "\61"; }

.ui-icon-next:before {
  content: "\62"; }

.ui-icon-dot:before {
  content: "\63"; }

.ui-carousel {
  display: block;
  margin-bottom: 30px; }
  .ui-carousel .carousel-wrapper {
    position: relative; }
  .ui-carousel .track-wrapper {
    position: relative;
    display: block;
    overflow: hidden;
    margin: 0;
    padding: 0; }
  .ui-carousel .track {
    position: relative;
    display: block;
    float: left; }
  .ui-carousel .slide {
    float: left;
    height: 100%;
    min-height: 1px; }
  .ui-carousel .carousel-btn {
    position: absolute;
    z-index: 10;
    background-color: transparent;
    outline: none;
    border: none;
    font-size: 20px;
    opacity: .75; }
    .ui-carousel .carousel-btn:hover {
      opacity: 1; }
  .ui-carousel .carousel-prev .carousel-btn {
    left: -25px; }
  .ui-carousel .carousel-next .carousel-btn {
    right: -25px; }
  .ui-carousel .carousel-disable {
    opacity: 0.5; }
    .ui-carousel .carousel-disable .carousel-btn:hover {
      opacity: .75; }

.carousel-dots {
  position: absolute;
  bottom: -30px;
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
  text-align: center; }
  .carousel-dots li {
    position: relative;
    display: inline-block;
    width: 15px;
    height: 15px;
    margin: 0 5px;
    padding: 0;
    cursor: pointer; }
    .carousel-dots li button {
      font-size: 0;
      line-height: 0;
      display: block;
      width: 15px;
      height: 15px;
      padding: 5px;
      cursor: pointer;
      color: transparent;
      border: 0;
      outline: none;
      background: transparent; }
      .carousel-dots li button:before {
        font-family: ui-carousel;
        font-size: 9px;
        line-height: 15px;
        position: absolute;
        top: 0px;
        left: 0px;
        width: 15px;
        height: 15px;
        content: "\63";
        text-align: center;
        opacity: 0.25;
        color: black;
        -webkit-font-smoothing: antialiased; }
    .carousel-dots li.carousel-active button:before {
      opacity: .75; }
0001 0000 000d 0080 0003 0050 4646 544d
7475 4998 0000 06a0 0000 001c 4744 4546
0033 0006 0000 0680 0000 0020 4f53 2f32
4fd6 5c83 0000 0158 0000 0056 636d 6170
04db 0360 0000 01c4 0000 014a 6761 7370
ffff 0003 0000 0678 0000 0008 676c 7966
dabb e3f6 0000 0320 0000 0160 6865 6164
0955 e7c5 0000 00dc 0000 0036 6868 6561
03e5 0205 0000 0114 0000 0024 686d 7478
0625 004a 0000 01b0 0000 0014 6c6f 6361
00f6 008c 0000 0310 0000 000e 6d61 7870
004a 0030 0000 0138 0000 0020 6e61 6d65
da7f 3a93 0000 0480 0000 01b9 706f 7374
e63e 6362 0000 063c 0000 003c 0001 0000
0001 0000 bdc5 412d 5f0f 3cf5 000b 0200
0000 0000 d41b d364 0000 0000 d41b d364
0025 0025 01db 01db 0000 0008 0002 0000
0000 0000 0001 0000 01db 0000 002e 0200
0000 0000 01db 0001 0000 0000 0000 0000
0000 0000 0000 0004 0001 0000 0006 002d
0002 0000 0000 0002 0000 0001 0001 0000
0040 0000 0000 0000 0001 0200 0190 0005
0008 014c 0166 0000 0047 014c 0166 0000
00f5 0019 0084 0000 0200 0509 0000 0000
0000 0000 0001 0000 0000 0000 0000 0000
0000 5066 4564 0040 0061 0063 01e0 ffe0
002e 01db ffdb 0000 0001 0000 0000 0000
0200 0000 0000 0000 0200 0000 0200 0025
0025 0025 0000 0003 0000 0003 0000 001c
0001 0000 0000 0044 0003 0001 0000 001c
0004 0028 0000 0006 0004 0001 0002 0000
0063 ffff 0000 0000 0061 ffff 0000 ffa2
0001 0000 0000 0000 0000 0106 0000 0100
0000 0000 0000 0102 0000 0002 0000 0000
0000 0000 0000 0000 0000 0001 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0003
0405 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0046 008c 00b0 0000
0002 0025 0025 01db 01db 0018 002c 0000
2537 3635 342f 0137 3635 342f 0126 2322
0f01 0614 1f01 1633 3236 1407 0607 0622
2726 2726 3437 3637 3632 1716 1701 281d
0606 5757 0606 1d05 0807 0582 0606 8205
0708 b81d 1e32 307c 3032 1e1d 1d1e 3230
7c30 321e 711e 0507 0904 5858 0409 0705
1e05 0582 060e 0682 05d2 7c30 321e 1d1d
1e32 307c 3032 1e1d 1d1e 3200 0002 0025
0025 01db 01db 0018 002c 0000 3f01 3634
2f01 2623 220f 0106 1514 1f01 0706 1514
1f01 1633 3236 1407 0607 0622 2726 2726
3437 3637 3632 1716 17f1 8206 0682 0507
0805 1d06 0657 5706 061d 0508 07ef 1d1e
3230 7c30 321e 1d1d 1e32 307c 3032 1e71
8206 0e06 8205 051e 0507 0904 5858 0409
0705 1e05 d27c 3032 1e1d 1d1e 3230 7c30
321e 1d1d 1e32 0000 0001 0025 0025 01db
01db 0013 0000 0014 0706 0706 2227 2627
2634 3736 3736 3217 1617 01db 1d1e 3230
7c30 321e 1d1d 1e32 307c 3032 1e01 3e7c
3032 1e1d 1d1e 3230 7c30 321e 1d1d 1e32
0000 000c 0096 0001 0000 0000 0001 000b
0018 0001 0000 0000 0002 0008 0036 0001
0000 0000 0003 0027 008f 0001 0000 0000
0004 000b 00cf 0001 0000 0000 0005 000b
00f3 0001 0000 0000 0006 000b 0117 0003
0001 0409 0001 0016 0000 0003 0001 0409
0002 0010 0024 0003 0001 0409 0003 004e
003f 0003 0001 0409 0004 0016 00b7 0003
0001 0409 0005 0016 00db 0003 0001 0409
0006 0016 00ff 0075 0069 002d 0063 0061
0072 006f 0075 0073 0065 006c 0000 7569
2d63 6172 6f75 7365 6c00 0063 0061 0072
006f 0075 0073 0065 006c 0000 6361 726f
7573 656c 0000 4600 6f00 6e00 7400 4600
6f00 7200 6700 6500 2000 3200 2e00 3000
2000 3a00 2000 7500 6900 2d00 6300 6100
7200 6f00 7500 7300 6500 6c00 2000 3a00
2000 3600 2d00 3100 3000 2d00 3200 3000
3100 3600 0046 6f6e 7446 6f72 6765 2032
2e30 203a 2075 692d 6361 726f 7573 656c
203a 2036 2d31 302d 3230 3136 0000 7500
6900 2d00 6300 6100 7200 6f00 7500 7300
6500 6c00 0075 692d 6361 726f 7573 656c
0000 5600 6500 7200 7300 6900 6f00 6e00
2000 3100 2e00 3000 0056 6572 7369 6f6e
2031 2e30 0000 7500 6900 2d00 6300 6100
7200 6f00 7500 7300 6500 6c00 0075 692d
6361 726f 7573 656c 0000 0000 0002 0000
0000 0000 0000 0000 0000 0001 0000 0000
0000 0000 0000 0000 0000 0000 0006 0000
0001 0002 0102 0103 0104 0470 7265 7604
6e65 7874 0364 6f74 0000 0001 ffff 0002
0001 0000 000e 0000 0018 0000 0000 0002
0001 0003 0005 0001 0004 0000 0002 0000
0000 0001 0000 0000 cc3d a2cf 0000 0000
d41b d364 0000 0000 d41b d364 
774f 4646 4f54 544f 0000 0490 000b 0000
0000 06b8 0001 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 4346 4620
0000 0108 0000 016c 0000 01c5 2c5a 3eb6
4646 544d 0000 0274 0000 001a 0000 001c
7475 4998 4744 4546 0000 0290 0000 001d
0000 0020 0031 0004 4f53 2f32 0000 02b0
0000 004a 0000 0060 4ff8 5e7f 636d 6170
0000 02fc 0000 0041 0000 014a 02d9 0257
6865 6164 0000 0340 0000 002f 0000 0036
0955 e7c5 6868 6561 0000 0370 0000 001c
0000 0024 03e5 0203 686d 7478 0000 038c
0000 000c 0000 000c 0425 004a 6d61 7870
0000 0398 0000 0006 0000 0006 0004 5000
6e61 6d65 0000 03a0 0000 00e0 0000 01b9
da7f 3a93 706f 7374 0000 0480 0000 0010
0000 0020 0003 0001 789c 4d90 414b 0241
14c7 dfe8 6e4d b658 995a c162 d131 e8a4
5fa0 6b74 eb13 d8a6 a094 9ba6 d959 6867
97d7 ee6c b087 6e9e 0405 8505 afd1 b10f
a21f a1c3 2e78 a899 45a2 cb9b c77f defb
fde0 1150 1420 8468 bdc6 b951 ed98 bdc7
da1d 9014 10b8 884b a9f8 381d 1f2a af1a
412d 8d9a 52ca c0d1 75ee 07f1 afd1 36c3
3036 6353 d5c1 ddd1 0176 7508 f674 c8eb
a49a 0355 6254 d802 0d0e e0f4 a153 7b6a
d59e bbb7 66f7 9feb bf16 8030 6213 0714
4252 379f 5fd9 e823 520b b66d 3916 5ac8
5cdb a3ab 6254 5419 7738 fae8 bb9c 731a
c9c4 f3b8 ebcb c8f1 6c3a be57 b9ed 32b1
2216 994d 2be5 4559 2656 9230 9144 6782
7b92 c946 2f09 9f25 7c4b f25b 1395 796b
bacf 3dba 5856 9632 f1d7 3e8f 8e27 c2e6
2736 2e6d 5171 5554 395b fb18 63f4 fb5d
b263 330a 9237 c863 21c4 f812 1137 deb4
8c38 cebe 3cf8 15ce 0761 7fda 9fb5 478d
6173 580f 0c34 b03e 68f6 1bfd 765b 94e6
a08e 0645 23a8 8bdf c6a8 3d13 b3e1 608e
730c 83e9 7036 1c8d 4499 0621 cee9 f62f
3685 b2f0 789c 6360 6060 6400 8233 b68b
ce83 e82b d297 5360 3400 4a55 06c8 0000
789c 6360 6460 60e0 0362 0906 1060 6260
0442 6620 6601 f318 0004 6b00 3600 0000
789c 6360 6662 609c c0c0 cac0 c1e8 c398
c6c0 c0e0 0ea5 bf32 4832 b430 3030 31b0
7232 c000 2303 1208 4873 4d61 7060 4864
4866 7cf0 ff01 831e e3ed ffb7 616a 1841
2c05 2064 0400 0dba 0d1b 0000 789c 6360
6060 6680 6019 0646 0610 7001 f218 c17c
1606 0d20 cd06 a419 1998 80ac e4ff ffc1
2a12 41f4 ff05 50f5 40c0 c8c6 80e0 d00a
3032 31d3 da0a 4a00 00de 4607 2f00 0000
789c 6360 6460 6000 e299 f7f2 aec4 f3db
7c65 e066 6200 812b d297 53e0 b42a 832a
e36d c6db 402e 0703 581a 003f a40a c000
789c 6360 6460 60bc cdc0 c0a0 c7c4 0002
4036 2303 2a60 0200 3062 01ed 0200 0000
0200 0025 0025 0025 0000 5000 0004 0000
789c 8d8e 314e c340 1045 9f13 2702 8582
0a28 b740 a25a 6bed c245 1aba 9494 e9a3
c88a 2c45 5e69 1d9f 838e ab70 0c0e c031
3800 7c9b 9140 8222 2bad f6cd fc3f b31f
b8e2 858c f164 acb8 339e 7141 6d3c e781
67e3 5c9e 37e3 85f8 c378 c92a bb95 33cb
2fd5 b999 a646 9e71 cdbd f19c 271e 8d73
795e 8d17 e277 e3a5 f893 8116 cf9e 1d89
a8aa a7e1 0843 ebf7 bb14 87be 51f1 47fd
9136 6a77 9ca6 3771 90ec a828 087a d7ba
ffaf ffd6 6a29 a59c 5e13 4154 6b5d ec4e
9b98 0e8d ab8a e0d6 ee57 0c55 b52f 83af
4229 e339 b1b7 ea25 29ed 94d1 e987 3117
db26 f56d ec5c 5984 b3f6 7c01 fc75 46f3
789c 6360 6640 068c 0c68 0000 008e 0005