{"version":3,"sources":["underscore.js","jquery.js","angular.js","angular-ui-router.js","ocLazyLoad.js","moment.js","l2s.js","ngSanitize.js","ng-stats.js","promise-tracker.js","notify.js","common.js","angular-cookies.js","xeditable.js","angular-file-upload.js","ui-bootstrap-tpls.min.js","translation.js","translation-tmpl.js","select.js","ui-utils.js","jquery.inputmask.bundle.js","form.js","form-tmpl.js","jquery.mmenu.all.min.js","infrastructure.js","infrastructure-tmpl.js","angular-ui-tree.js","entity.js","entity-tmpl.js","event.js","event-tmpl.js","ngStorage.js","account.js","account-tmpl.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5gDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACr/RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC13qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACjxIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACzzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1nGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClpHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5gBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3ZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACtFA;AACA;ACDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC9MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC/gFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACvUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACTA;AACA;AACA;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3uCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC14EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;ACp2EA;AACA;AACA;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC3MA;AACA;AACA;AACA;AACA;ACJA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC1KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC30CA;AACA;AACA;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AClPA;AACA;AACA;AACA;ACHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC5RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AC7OA;AACA;AACA;AACA;AACA;AACA;AACA;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"global.js","sourcesContent":["//     Underscore.js 1.8.3\n//     http://underscorejs.org\n//     (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n//     Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n  // Baseline setup\n  // --------------\n\n  // Establish the root object, `window` in the browser, or `exports` on the server.\n  var root = this;\n\n  // Save the previous value of the `_` variable.\n  var previousUnderscore = root._;\n\n  // Save bytes in the minified (but not gzipped) version:\n  var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;\n\n  // Create quick reference variables for speed access to core prototypes.\n  var\n    push             = ArrayProto.push,\n    slice            = ArrayProto.slice,\n    toString         = ObjProto.toString,\n    hasOwnProperty   = ObjProto.hasOwnProperty;\n\n  // All **ECMAScript 5** native function implementations that we hope to use\n  // are declared here.\n  var\n    nativeIsArray      = Array.isArray,\n    nativeKeys         = Object.keys,\n    nativeBind         = FuncProto.bind,\n    nativeCreate       = Object.create;\n\n  // Naked function reference for surrogate-prototype-swapping.\n  var Ctor = function(){};\n\n  // Create a safe reference to the Underscore object for use below.\n  var _ = function(obj) {\n    if (obj instanceof _) return obj;\n    if (!(this instanceof _)) return new _(obj);\n    this._wrapped = obj;\n  };\n\n  // Export the Underscore object for **Node.js**, with\n  // backwards-compatibility for the old `require()` API. If we're in\n  // the browser, add `_` as a global object.\n  if (typeof exports !== 'undefined') {\n    if (typeof module !== 'undefined' && module.exports) {\n      exports = module.exports = _;\n    }\n    exports._ = _;\n  } else {\n    root._ = _;\n  }\n\n  // Current version.\n  _.VERSION = '1.8.3';\n\n  // Internal function that returns an efficient (for current engines) version\n  // of the passed-in callback, to be repeatedly applied in other Underscore\n  // functions.\n  var optimizeCb = function(func, context, argCount) {\n    if (context === void 0) return func;\n    switch (argCount == null ? 3 : argCount) {\n      case 1: return function(value) {\n        return func.call(context, value);\n      };\n      case 2: return function(value, other) {\n        return func.call(context, value, other);\n      };\n      case 3: return function(value, index, collection) {\n        return func.call(context, value, index, collection);\n      };\n      case 4: return function(accumulator, value, index, collection) {\n        return func.call(context, accumulator, value, index, collection);\n      };\n    }\n    return function() {\n      return func.apply(context, arguments);\n    };\n  };\n\n  // A mostly-internal function to generate callbacks that can be applied\n  // to each element in a collection, returning the desired result — either\n  // identity, an arbitrary callback, a property matcher, or a property accessor.\n  var cb = function(value, context, argCount) {\n    if (value == null) return _.identity;\n    if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n    if (_.isObject(value)) return _.matcher(value);\n    return _.property(value);\n  };\n  _.iteratee = function(value, context) {\n    return cb(value, context, Infinity);\n  };\n\n  // An internal function for creating assigner functions.\n  var createAssigner = function(keysFunc, undefinedOnly) {\n    return function(obj) {\n      var length = arguments.length;\n      if (length < 2 || obj == null) return obj;\n      for (var index = 1; index < length; index++) {\n        var source = arguments[index],\n            keys = keysFunc(source),\n            l = keys.length;\n        for (var i = 0; i < l; i++) {\n          var key = keys[i];\n          if (!undefinedOnly || obj[key] === void 0) obj[key] = source[key];\n        }\n      }\n      return obj;\n    };\n  };\n\n  // An internal function for creating a new object that inherits from another.\n  var baseCreate = function(prototype) {\n    if (!_.isObject(prototype)) return {};\n    if (nativeCreate) return nativeCreate(prototype);\n    Ctor.prototype = prototype;\n    var result = new Ctor;\n    Ctor.prototype = null;\n    return result;\n  };\n\n  var property = function(key) {\n    return function(obj) {\n      return obj == null ? void 0 : obj[key];\n    };\n  };\n\n  // Helper for collection methods to determine whether a collection\n  // should be iterated as an array or as an object\n  // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n  // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n  var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n  var getLength = property('length');\n  var isArrayLike = function(collection) {\n    var length = getLength(collection);\n    return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n  };\n\n  // Collection Functions\n  // --------------------\n\n  // The cornerstone, an `each` implementation, aka `forEach`.\n  // Handles raw objects in addition to array-likes. Treats all\n  // sparse array-likes as if they were dense.\n  _.each = _.forEach = function(obj, iteratee, context) {\n    iteratee = optimizeCb(iteratee, context);\n    var i, length;\n    if (isArrayLike(obj)) {\n      for (i = 0, length = obj.length; i < length; i++) {\n        iteratee(obj[i], i, obj);\n      }\n    } else {\n      var keys = _.keys(obj);\n      for (i = 0, length = keys.length; i < length; i++) {\n        iteratee(obj[keys[i]], keys[i], obj);\n      }\n    }\n    return obj;\n  };\n\n  // Return the results of applying the iteratee to each element.\n  _.map = _.collect = function(obj, iteratee, context) {\n    iteratee = cb(iteratee, context);\n    var keys = !isArrayLike(obj) && _.keys(obj),\n        length = (keys || obj).length,\n        results = Array(length);\n    for (var index = 0; index < length; index++) {\n      var currentKey = keys ? keys[index] : index;\n      results[index] = iteratee(obj[currentKey], currentKey, obj);\n    }\n    return results;\n  };\n\n  // Create a reducing function iterating left or right.\n  function createReduce(dir) {\n    // Optimized iterator function as using arguments.length\n    // in the main function will deoptimize the, see #1991.\n    function iterator(obj, iteratee, memo, keys, index, length) {\n      for (; index >= 0 && index < length; index += dir) {\n        var currentKey = keys ? keys[index] : index;\n        memo = iteratee(memo, obj[currentKey], currentKey, obj);\n      }\n      return memo;\n    }\n\n    return function(obj, iteratee, memo, context) {\n      iteratee = optimizeCb(iteratee, context, 4);\n      var keys = !isArrayLike(obj) && _.keys(obj),\n          length = (keys || obj).length,\n          index = dir > 0 ? 0 : length - 1;\n      // Determine the initial value if none is provided.\n      if (arguments.length < 3) {\n        memo = obj[keys ? keys[index] : index];\n        index += dir;\n      }\n      return iterator(obj, iteratee, memo, keys, index, length);\n    };\n  }\n\n  // **Reduce** builds up a single result from a list of values, aka `inject`,\n  // or `foldl`.\n  _.reduce = _.foldl = _.inject = createReduce(1);\n\n  // The right-associative version of reduce, also known as `foldr`.\n  _.reduceRight = _.foldr = createReduce(-1);\n\n  // Return the first value which passes a truth test. Aliased as `detect`.\n  _.find = _.detect = function(obj, predicate, context) {\n    var key;\n    if (isArrayLike(obj)) {\n      key = _.findIndex(obj, predicate, context);\n    } else {\n      key = _.findKey(obj, predicate, context);\n    }\n    if (key !== void 0 && key !== -1) return obj[key];\n  };\n\n  // Return all the elements that pass a truth test.\n  // Aliased as `select`.\n  _.filter = _.select = function(obj, predicate, context) {\n    var results = [];\n    predicate = cb(predicate, context);\n    _.each(obj, function(value, index, list) {\n      if (predicate(value, index, list)) results.push(value);\n    });\n    return results;\n  };\n\n  // Return all the elements for which a truth test fails.\n  _.reject = function(obj, predicate, context) {\n    return _.filter(obj, _.negate(cb(predicate)), context);\n  };\n\n  // Determine whether all of the elements match a truth test.\n  // Aliased as `all`.\n  _.every = _.all = function(obj, predicate, context) {\n    predicate = cb(predicate, context);\n    var keys = !isArrayLike(obj) && _.keys(obj),\n        length = (keys || obj).length;\n    for (var index = 0; index < length; index++) {\n      var currentKey = keys ? keys[index] : index;\n      if (!predicate(obj[currentKey], currentKey, obj)) return false;\n    }\n    return true;\n  };\n\n  // Determine if at least one element in the object matches a truth test.\n  // Aliased as `any`.\n  _.some = _.any = function(obj, predicate, context) {\n    predicate = cb(predicate, context);\n    var keys = !isArrayLike(obj) && _.keys(obj),\n        length = (keys || obj).length;\n    for (var index = 0; index < length; index++) {\n      var currentKey = keys ? keys[index] : index;\n      if (predicate(obj[currentKey], currentKey, obj)) return true;\n    }\n    return false;\n  };\n\n  // Determine if the array or object contains a given item (using `===`).\n  // Aliased as `includes` and `include`.\n  _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n    if (!isArrayLike(obj)) obj = _.values(obj);\n    if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n    return _.indexOf(obj, item, fromIndex) >= 0;\n  };\n\n  // Invoke a method (with arguments) on every item in a collection.\n  _.invoke = function(obj, method) {\n    var args = slice.call(arguments, 2);\n    var isFunc = _.isFunction(method);\n    return _.map(obj, function(value) {\n      var func = isFunc ? method : value[method];\n      return func == null ? func : func.apply(value, args);\n    });\n  };\n\n  // Convenience version of a common use case of `map`: fetching a property.\n  _.pluck = function(obj, key) {\n    return _.map(obj, _.property(key));\n  };\n\n  // Convenience version of a common use case of `filter`: selecting only objects\n  // containing specific `key:value` pairs.\n  _.where = function(obj, attrs) {\n    return _.filter(obj, _.matcher(attrs));\n  };\n\n  // Convenience version of a common use case of `find`: getting the first object\n  // containing specific `key:value` pairs.\n  _.findWhere = function(obj, attrs) {\n    return _.find(obj, _.matcher(attrs));\n  };\n\n  // Return the maximum element (or element-based computation).\n  _.max = function(obj, iteratee, context) {\n    var result = -Infinity, lastComputed = -Infinity,\n        value, computed;\n    if (iteratee == null && obj != null) {\n      obj = isArrayLike(obj) ? obj : _.values(obj);\n      for (var i = 0, length = obj.length; i < length; i++) {\n        value = obj[i];\n        if (value > result) {\n          result = value;\n        }\n      }\n    } else {\n      iteratee = cb(iteratee, context);\n      _.each(obj, function(value, index, list) {\n        computed = iteratee(value, index, list);\n        if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n          result = value;\n          lastComputed = computed;\n        }\n      });\n    }\n    return result;\n  };\n\n  // Return the minimum element (or element-based computation).\n  _.min = function(obj, iteratee, context) {\n    var result = Infinity, lastComputed = Infinity,\n        value, computed;\n    if (iteratee == null && obj != null) {\n      obj = isArrayLike(obj) ? obj : _.values(obj);\n      for (var i = 0, length = obj.length; i < length; i++) {\n        value = obj[i];\n        if (value < result) {\n          result = value;\n        }\n      }\n    } else {\n      iteratee = cb(iteratee, context);\n      _.each(obj, function(value, index, list) {\n        computed = iteratee(value, index, list);\n        if (computed < lastComputed || computed === Infinity && result === Infinity) {\n          result = value;\n          lastComputed = computed;\n        }\n      });\n    }\n    return result;\n  };\n\n  // Shuffle a collection, using the modern version of the\n  // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n  _.shuffle = function(obj) {\n    var set = isArrayLike(obj) ? obj : _.values(obj);\n    var length = set.length;\n    var shuffled = Array(length);\n    for (var index = 0, rand; index < length; index++) {\n      rand = _.random(0, index);\n      if (rand !== index) shuffled[index] = shuffled[rand];\n      shuffled[rand] = set[index];\n    }\n    return shuffled;\n  };\n\n  // Sample **n** random values from a collection.\n  // If **n** is not specified, returns a single random element.\n  // The internal `guard` argument allows it to work with `map`.\n  _.sample = function(obj, n, guard) {\n    if (n == null || guard) {\n      if (!isArrayLike(obj)) obj = _.values(obj);\n      return obj[_.random(obj.length - 1)];\n    }\n    return _.shuffle(obj).slice(0, Math.max(0, n));\n  };\n\n  // Sort the object's values by a criterion produced by an iteratee.\n  _.sortBy = function(obj, iteratee, context) {\n    iteratee = cb(iteratee, context);\n    return _.pluck(_.map(obj, function(value, index, list) {\n      return {\n        value: value,\n        index: index,\n        criteria: iteratee(value, index, list)\n      };\n    }).sort(function(left, right) {\n      var a = left.criteria;\n      var b = right.criteria;\n      if (a !== b) {\n        if (a > b || a === void 0) return 1;\n        if (a < b || b === void 0) return -1;\n      }\n      return left.index - right.index;\n    }), 'value');\n  };\n\n  // An internal function used for aggregate \"group by\" operations.\n  var group = function(behavior) {\n    return function(obj, iteratee, context) {\n      var result = {};\n      iteratee = cb(iteratee, context);\n      _.each(obj, function(value, index) {\n        var key = iteratee(value, index, obj);\n        behavior(result, value, key);\n      });\n      return result;\n    };\n  };\n\n  // Groups the object's values by a criterion. Pass either a string attribute\n  // to group by, or a function that returns the criterion.\n  _.groupBy = group(function(result, value, key) {\n    if (_.has(result, key)) result[key].push(value); else result[key] = [value];\n  });\n\n  // Indexes the object's values by a criterion, similar to `groupBy`, but for\n  // when you know that your index values will be unique.\n  _.indexBy = group(function(result, value, key) {\n    result[key] = value;\n  });\n\n  // Counts instances of an object that group by a certain criterion. Pass\n  // either a string attribute to count by, or a function that returns the\n  // criterion.\n  _.countBy = group(function(result, value, key) {\n    if (_.has(result, key)) result[key]++; else result[key] = 1;\n  });\n\n  // Safely create a real, live array from anything iterable.\n  _.toArray = function(obj) {\n    if (!obj) return [];\n    if (_.isArray(obj)) return slice.call(obj);\n    if (isArrayLike(obj)) return _.map(obj, _.identity);\n    return _.values(obj);\n  };\n\n  // Return the number of elements in an object.\n  _.size = function(obj) {\n    if (obj == null) return 0;\n    return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n  };\n\n  // Split a collection into two arrays: one whose elements all satisfy the given\n  // predicate, and one whose elements all do not satisfy the predicate.\n  _.partition = function(obj, predicate, context) {\n    predicate = cb(predicate, context);\n    var pass = [], fail = [];\n    _.each(obj, function(value, key, obj) {\n      (predicate(value, key, obj) ? pass : fail).push(value);\n    });\n    return [pass, fail];\n  };\n\n  // Array Functions\n  // ---------------\n\n  // Get the first element of an array. Passing **n** will return the first N\n  // values in the array. Aliased as `head` and `take`. The **guard** check\n  // allows it to work with `_.map`.\n  _.first = _.head = _.take = function(array, n, guard) {\n    if (array == null) return void 0;\n    if (n == null || guard) return array[0];\n    return _.initial(array, array.length - n);\n  };\n\n  // Returns everything but the last entry of the array. Especially useful on\n  // the arguments object. Passing **n** will return all the values in\n  // the array, excluding the last N.\n  _.initial = function(array, n, guard) {\n    return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n  };\n\n  // Get the last element of an array. Passing **n** will return the last N\n  // values in the array.\n  _.last = function(array, n, guard) {\n    if (array == null) return void 0;\n    if (n == null || guard) return array[array.length - 1];\n    return _.rest(array, Math.max(0, array.length - n));\n  };\n\n  // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n  // Especially useful on the arguments object. Passing an **n** will return\n  // the rest N values in the array.\n  _.rest = _.tail = _.drop = function(array, n, guard) {\n    return slice.call(array, n == null || guard ? 1 : n);\n  };\n\n  // Trim out all falsy values from an array.\n  _.compact = function(array) {\n    return _.filter(array, _.identity);\n  };\n\n  // Internal implementation of a recursive `flatten` function.\n  var flatten = function(input, shallow, strict, startIndex) {\n    var output = [], idx = 0;\n    for (var i = startIndex || 0, length = getLength(input); i < length; i++) {\n      var value = input[i];\n      if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n        //flatten current level of array or arguments object\n        if (!shallow) value = flatten(value, shallow, strict);\n        var j = 0, len = value.length;\n        output.length += len;\n        while (j < len) {\n          output[idx++] = value[j++];\n        }\n      } else if (!strict) {\n        output[idx++] = value;\n      }\n    }\n    return output;\n  };\n\n  // Flatten out an array, either recursively (by default), or just one level.\n  _.flatten = function(array, shallow) {\n    return flatten(array, shallow, false);\n  };\n\n  // Return a version of the array that does not contain the specified value(s).\n  _.without = function(array) {\n    return _.difference(array, slice.call(arguments, 1));\n  };\n\n  // Produce a duplicate-free version of the array. If the array has already\n  // been sorted, you have the option of using a faster algorithm.\n  // Aliased as `unique`.\n  _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n    if (!_.isBoolean(isSorted)) {\n      context = iteratee;\n      iteratee = isSorted;\n      isSorted = false;\n    }\n    if (iteratee != null) iteratee = cb(iteratee, context);\n    var result = [];\n    var seen = [];\n    for (var i = 0, length = getLength(array); i < length; i++) {\n      var value = array[i],\n          computed = iteratee ? iteratee(value, i, array) : value;\n      if (isSorted) {\n        if (!i || seen !== computed) result.push(value);\n        seen = computed;\n      } else if (iteratee) {\n        if (!_.contains(seen, computed)) {\n          seen.push(computed);\n          result.push(value);\n        }\n      } else if (!_.contains(result, value)) {\n        result.push(value);\n      }\n    }\n    return result;\n  };\n\n  // Produce an array that contains the union: each distinct element from all of\n  // the passed-in arrays.\n  _.union = function() {\n    return _.uniq(flatten(arguments, true, true));\n  };\n\n  // Produce an array that contains every item shared between all the\n  // passed-in arrays.\n  _.intersection = function(array) {\n    var result = [];\n    var argsLength = arguments.length;\n    for (var i = 0, length = getLength(array); i < length; i++) {\n      var item = array[i];\n      if (_.contains(result, item)) continue;\n      for (var j = 1; j < argsLength; j++) {\n        if (!_.contains(arguments[j], item)) break;\n      }\n      if (j === argsLength) result.push(item);\n    }\n    return result;\n  };\n\n  // Take the difference between one array and a number of other arrays.\n  // Only the elements present in just the first array will remain.\n  _.difference = function(array) {\n    var rest = flatten(arguments, true, true, 1);\n    return _.filter(array, function(value){\n      return !_.contains(rest, value);\n    });\n  };\n\n  // Zip together multiple lists into a single array -- elements that share\n  // an index go together.\n  _.zip = function() {\n    return _.unzip(arguments);\n  };\n\n  // Complement of _.zip. Unzip accepts an array of arrays and groups\n  // each array's elements on shared indices\n  _.unzip = function(array) {\n    var length = array && _.max(array, getLength).length || 0;\n    var result = Array(length);\n\n    for (var index = 0; index < length; index++) {\n      result[index] = _.pluck(array, index);\n    }\n    return result;\n  };\n\n  // Converts lists into objects. Pass either a single array of `[key, value]`\n  // pairs, or two parallel arrays of the same length -- one of keys, and one of\n  // the corresponding values.\n  _.object = function(list, values) {\n    var result = {};\n    for (var i = 0, length = getLength(list); i < length; i++) {\n      if (values) {\n        result[list[i]] = values[i];\n      } else {\n        result[list[i][0]] = list[i][1];\n      }\n    }\n    return result;\n  };\n\n  // Generator function to create the findIndex and findLastIndex functions\n  function createPredicateIndexFinder(dir) {\n    return function(array, predicate, context) {\n      predicate = cb(predicate, context);\n      var length = getLength(array);\n      var index = dir > 0 ? 0 : length - 1;\n      for (; index >= 0 && index < length; index += dir) {\n        if (predicate(array[index], index, array)) return index;\n      }\n      return -1;\n    };\n  }\n\n  // Returns the first index on an array-like that passes a predicate test\n  _.findIndex = createPredicateIndexFinder(1);\n  _.findLastIndex = createPredicateIndexFinder(-1);\n\n  // Use a comparator function to figure out the smallest index at which\n  // an object should be inserted so as to maintain order. Uses binary search.\n  _.sortedIndex = function(array, obj, iteratee, context) {\n    iteratee = cb(iteratee, context, 1);\n    var value = iteratee(obj);\n    var low = 0, high = getLength(array);\n    while (low < high) {\n      var mid = Math.floor((low + high) / 2);\n      if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n    }\n    return low;\n  };\n\n  // Generator function to create the indexOf and lastIndexOf functions\n  function createIndexFinder(dir, predicateFind, sortedIndex) {\n    return function(array, item, idx) {\n      var i = 0, length = getLength(array);\n      if (typeof idx == 'number') {\n        if (dir > 0) {\n            i = idx >= 0 ? idx : Math.max(idx + length, i);\n        } else {\n            length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n        }\n      } else if (sortedIndex && idx && length) {\n        idx = sortedIndex(array, item);\n        return array[idx] === item ? idx : -1;\n      }\n      if (item !== item) {\n        idx = predicateFind(slice.call(array, i, length), _.isNaN);\n        return idx >= 0 ? idx + i : -1;\n      }\n      for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n        if (array[idx] === item) return idx;\n      }\n      return -1;\n    };\n  }\n\n  // Return the position of the first occurrence of an item in an array,\n  // or -1 if the item is not included in the array.\n  // If the array is large and already in sort order, pass `true`\n  // for **isSorted** to use binary search.\n  _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n  _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n  // Generate an integer Array containing an arithmetic progression. A port of\n  // the native Python `range()` function. See\n  // [the Python documentation](http://docs.python.org/library/functions.html#range).\n  _.range = function(start, stop, step) {\n    if (stop == null) {\n      stop = start || 0;\n      start = 0;\n    }\n    step = step || 1;\n\n    var length = Math.max(Math.ceil((stop - start) / step), 0);\n    var range = Array(length);\n\n    for (var idx = 0; idx < length; idx++, start += step) {\n      range[idx] = start;\n    }\n\n    return range;\n  };\n\n  // Function (ahem) Functions\n  // ------------------\n\n  // Determines whether to execute a function as a constructor\n  // or a normal function with the provided arguments\n  var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n    if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n    var self = baseCreate(sourceFunc.prototype);\n    var result = sourceFunc.apply(self, args);\n    if (_.isObject(result)) return result;\n    return self;\n  };\n\n  // Create a function bound to a given object (assigning `this`, and arguments,\n  // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n  // available.\n  _.bind = function(func, context) {\n    if (nativeBind && func.bind === nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));\n    if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n    var args = slice.call(arguments, 2);\n    var bound = function() {\n      return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));\n    };\n    return bound;\n  };\n\n  // Partially apply a function by creating a version that has had some of its\n  // arguments pre-filled, without changing its dynamic `this` context. _ acts\n  // as a placeholder, allowing any combination of arguments to be pre-filled.\n  _.partial = function(func) {\n    var boundArgs = slice.call(arguments, 1);\n    var bound = function() {\n      var position = 0, length = boundArgs.length;\n      var args = Array(length);\n      for (var i = 0; i < length; i++) {\n        args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];\n      }\n      while (position < arguments.length) args.push(arguments[position++]);\n      return executeBound(func, bound, this, this, args);\n    };\n    return bound;\n  };\n\n  // Bind a number of an object's methods to that object. Remaining arguments\n  // are the method names to be bound. Useful for ensuring that all callbacks\n  // defined on an object belong to it.\n  _.bindAll = function(obj) {\n    var i, length = arguments.length, key;\n    if (length <= 1) throw new Error('bindAll must be passed function names');\n    for (i = 1; i < length; i++) {\n      key = arguments[i];\n      obj[key] = _.bind(obj[key], obj);\n    }\n    return obj;\n  };\n\n  // Memoize an expensive function by storing its results.\n  _.memoize = function(func, hasher) {\n    var memoize = function(key) {\n      var cache = memoize.cache;\n      var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n      if (!_.has(cache, address)) cache[address] = func.apply(this, arguments);\n      return cache[address];\n    };\n    memoize.cache = {};\n    return memoize;\n  };\n\n  // Delays a function for the given number of milliseconds, and then calls\n  // it with the arguments supplied.\n  _.delay = function(func, wait) {\n    var args = slice.call(arguments, 2);\n    return setTimeout(function(){\n      return func.apply(null, args);\n    }, wait);\n  };\n\n  // Defers a function, scheduling it to run after the current call stack has\n  // cleared.\n  _.defer = _.partial(_.delay, _, 1);\n\n  // Returns a function, that, when invoked, will only be triggered at most once\n  // during a given window of time. Normally, the throttled function will run\n  // as much as it can, without ever going more than once per `wait` duration;\n  // but if you'd like to disable the execution on the leading edge, pass\n  // `{leading: false}`. To disable execution on the trailing edge, ditto.\n  _.throttle = function(func, wait, options) {\n    var context, args, result;\n    var timeout = null;\n    var previous = 0;\n    if (!options) options = {};\n    var later = function() {\n      previous = options.leading === false ? 0 : _.now();\n      timeout = null;\n      result = func.apply(context, args);\n      if (!timeout) context = args = null;\n    };\n    return function() {\n      var now = _.now();\n      if (!previous && options.leading === false) previous = now;\n      var remaining = wait - (now - previous);\n      context = this;\n      args = arguments;\n      if (remaining <= 0 || remaining > wait) {\n        if (timeout) {\n          clearTimeout(timeout);\n          timeout = null;\n        }\n        previous = now;\n        result = func.apply(context, args);\n        if (!timeout) context = args = null;\n      } else if (!timeout && options.trailing !== false) {\n        timeout = setTimeout(later, remaining);\n      }\n      return result;\n    };\n  };\n\n  // Returns a function, that, as long as it continues to be invoked, will not\n  // be triggered. The function will be called after it stops being called for\n  // N milliseconds. If `immediate` is passed, trigger the function on the\n  // leading edge, instead of the trailing.\n  _.debounce = function(func, wait, immediate) {\n    var timeout, args, context, timestamp, result;\n\n    var later = function() {\n      var last = _.now() - timestamp;\n\n      if (last < wait && last >= 0) {\n        timeout = setTimeout(later, wait - last);\n      } else {\n        timeout = null;\n        if (!immediate) {\n          result = func.apply(context, args);\n          if (!timeout) context = args = null;\n        }\n      }\n    };\n\n    return function() {\n      context = this;\n      args = arguments;\n      timestamp = _.now();\n      var callNow = immediate && !timeout;\n      if (!timeout) timeout = setTimeout(later, wait);\n      if (callNow) {\n        result = func.apply(context, args);\n        context = args = null;\n      }\n\n      return result;\n    };\n  };\n\n  // Returns the first function passed as an argument to the second,\n  // allowing you to adjust arguments, run code before and after, and\n  // conditionally execute the original function.\n  _.wrap = function(func, wrapper) {\n    return _.partial(wrapper, func);\n  };\n\n  // Returns a negated version of the passed-in predicate.\n  _.negate = function(predicate) {\n    return function() {\n      return !predicate.apply(this, arguments);\n    };\n  };\n\n  // Returns a function that is the composition of a list of functions, each\n  // consuming the return value of the function that follows.\n  _.compose = function() {\n    var args = arguments;\n    var start = args.length - 1;\n    return function() {\n      var i = start;\n      var result = args[start].apply(this, arguments);\n      while (i--) result = args[i].call(this, result);\n      return result;\n    };\n  };\n\n  // Returns a function that will only be executed on and after the Nth call.\n  _.after = function(times, func) {\n    return function() {\n      if (--times < 1) {\n        return func.apply(this, arguments);\n      }\n    };\n  };\n\n  // Returns a function that will only be executed up to (but not including) the Nth call.\n  _.before = function(times, func) {\n    var memo;\n    return function() {\n      if (--times > 0) {\n        memo = func.apply(this, arguments);\n      }\n      if (times <= 1) func = null;\n      return memo;\n    };\n  };\n\n  // Returns a function that will be executed at most one time, no matter how\n  // often you call it. Useful for lazy initialization.\n  _.once = _.partial(_.before, 2);\n\n  // Object Functions\n  // ----------------\n\n  // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n  var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n  var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n                      'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n  function collectNonEnumProps(obj, keys) {\n    var nonEnumIdx = nonEnumerableProps.length;\n    var constructor = obj.constructor;\n    var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;\n\n    // Constructor is a special case.\n    var prop = 'constructor';\n    if (_.has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n    while (nonEnumIdx--) {\n      prop = nonEnumerableProps[nonEnumIdx];\n      if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n        keys.push(prop);\n      }\n    }\n  }\n\n  // Retrieve the names of an object's own properties.\n  // Delegates to **ECMAScript 5**'s native `Object.keys`\n  _.keys = function(obj) {\n    if (!_.isObject(obj)) return [];\n    if (nativeKeys) return nativeKeys(obj);\n    var keys = [];\n    for (var key in obj) if (_.has(obj, key)) keys.push(key);\n    // Ahem, IE < 9.\n    if (hasEnumBug) collectNonEnumProps(obj, keys);\n    return keys;\n  };\n\n  // Retrieve all the property names of an object.\n  _.allKeys = function(obj) {\n    if (!_.isObject(obj)) return [];\n    var keys = [];\n    for (var key in obj) keys.push(key);\n    // Ahem, IE < 9.\n    if (hasEnumBug) collectNonEnumProps(obj, keys);\n    return keys;\n  };\n\n  // Retrieve the values of an object's properties.\n  _.values = function(obj) {\n    var keys = _.keys(obj);\n    var length = keys.length;\n    var values = Array(length);\n    for (var i = 0; i < length; i++) {\n      values[i] = obj[keys[i]];\n    }\n    return values;\n  };\n\n  // Returns the results of applying the iteratee to each element of the object\n  // In contrast to _.map it returns an object\n  _.mapObject = function(obj, iteratee, context) {\n    iteratee = cb(iteratee, context);\n    var keys =  _.keys(obj),\n          length = keys.length,\n          results = {},\n          currentKey;\n      for (var index = 0; index < length; index++) {\n        currentKey = keys[index];\n        results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n      }\n      return results;\n  };\n\n  // Convert an object into a list of `[key, value]` pairs.\n  _.pairs = function(obj) {\n    var keys = _.keys(obj);\n    var length = keys.length;\n    var pairs = Array(length);\n    for (var i = 0; i < length; i++) {\n      pairs[i] = [keys[i], obj[keys[i]]];\n    }\n    return pairs;\n  };\n\n  // Invert the keys and values of an object. The values must be serializable.\n  _.invert = function(obj) {\n    var result = {};\n    var keys = _.keys(obj);\n    for (var i = 0, length = keys.length; i < length; i++) {\n      result[obj[keys[i]]] = keys[i];\n    }\n    return result;\n  };\n\n  // Return a sorted list of the function names available on the object.\n  // Aliased as `methods`\n  _.functions = _.methods = function(obj) {\n    var names = [];\n    for (var key in obj) {\n      if (_.isFunction(obj[key])) names.push(key);\n    }\n    return names.sort();\n  };\n\n  // Extend a given object with all the properties in passed-in object(s).\n  _.extend = createAssigner(_.allKeys);\n\n  // Assigns a given object with all the own properties in the passed-in object(s)\n  // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n  _.extendOwn = _.assign = createAssigner(_.keys);\n\n  // Returns the first key on an object that passes a predicate test\n  _.findKey = function(obj, predicate, context) {\n    predicate = cb(predicate, context);\n    var keys = _.keys(obj), key;\n    for (var i = 0, length = keys.length; i < length; i++) {\n      key = keys[i];\n      if (predicate(obj[key], key, obj)) return key;\n    }\n  };\n\n  // Return a copy of the object only containing the whitelisted properties.\n  _.pick = function(object, oiteratee, context) {\n    var result = {}, obj = object, iteratee, keys;\n    if (obj == null) return result;\n    if (_.isFunction(oiteratee)) {\n      keys = _.allKeys(obj);\n      iteratee = optimizeCb(oiteratee, context);\n    } else {\n      keys = flatten(arguments, false, false, 1);\n      iteratee = function(value, key, obj) { return key in obj; };\n      obj = Object(obj);\n    }\n    for (var i = 0, length = keys.length; i < length; i++) {\n      var key = keys[i];\n      var value = obj[key];\n      if (iteratee(value, key, obj)) result[key] = value;\n    }\n    return result;\n  };\n\n   // Return a copy of the object without the blacklisted properties.\n  _.omit = function(obj, iteratee, context) {\n    if (_.isFunction(iteratee)) {\n      iteratee = _.negate(iteratee);\n    } else {\n      var keys = _.map(flatten(arguments, false, false, 1), String);\n      iteratee = function(value, key) {\n        return !_.contains(keys, key);\n      };\n    }\n    return _.pick(obj, iteratee, context);\n  };\n\n  // Fill in a given object with default properties.\n  _.defaults = createAssigner(_.allKeys, true);\n\n  // Creates an object that inherits from the given prototype object.\n  // If additional properties are provided then they will be added to the\n  // created object.\n  _.create = function(prototype, props) {\n    var result = baseCreate(prototype);\n    if (props) _.extendOwn(result, props);\n    return result;\n  };\n\n  // Create a (shallow-cloned) duplicate of an object.\n  _.clone = function(obj) {\n    if (!_.isObject(obj)) return obj;\n    return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n  };\n\n  // Invokes interceptor with the obj, and then returns obj.\n  // The primary purpose of this method is to \"tap into\" a method chain, in\n  // order to perform operations on intermediate results within the chain.\n  _.tap = function(obj, interceptor) {\n    interceptor(obj);\n    return obj;\n  };\n\n  // Returns whether an object has a given set of `key:value` pairs.\n  _.isMatch = function(object, attrs) {\n    var keys = _.keys(attrs), length = keys.length;\n    if (object == null) return !length;\n    var obj = Object(object);\n    for (var i = 0; i < length; i++) {\n      var key = keys[i];\n      if (attrs[key] !== obj[key] || !(key in obj)) return false;\n    }\n    return true;\n  };\n\n\n  // Internal recursive comparison function for `isEqual`.\n  var eq = function(a, b, aStack, bStack) {\n    // Identical objects are equal. `0 === -0`, but they aren't identical.\n    // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n    if (a === b) return a !== 0 || 1 / a === 1 / b;\n    // A strict comparison is necessary because `null == undefined`.\n    if (a == null || b == null) return a === b;\n    // Unwrap any wrapped objects.\n    if (a instanceof _) a = a._wrapped;\n    if (b instanceof _) b = b._wrapped;\n    // Compare `[[Class]]` names.\n    var className = toString.call(a);\n    if (className !== toString.call(b)) return false;\n    switch (className) {\n      // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n      case '[object RegExp]':\n      // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n      case '[object String]':\n        // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n        // equivalent to `new String(\"5\")`.\n        return '' + a === '' + b;\n      case '[object Number]':\n        // `NaN`s are equivalent, but non-reflexive.\n        // Object(NaN) is equivalent to NaN\n        if (+a !== +a) return +b !== +b;\n        // An `egal` comparison is performed for other numeric values.\n        return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n      case '[object Date]':\n      case '[object Boolean]':\n        // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n        // millisecond representations. Note that invalid dates with millisecond representations\n        // of `NaN` are not equivalent.\n        return +a === +b;\n    }\n\n    var areArrays = className === '[object Array]';\n    if (!areArrays) {\n      if (typeof a != 'object' || typeof b != 'object') return false;\n\n      // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n      // from different frames are.\n      var aCtor = a.constructor, bCtor = b.constructor;\n      if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n                               _.isFunction(bCtor) && bCtor instanceof bCtor)\n                          && ('constructor' in a && 'constructor' in b)) {\n        return false;\n      }\n    }\n    // Assume equality for cyclic structures. The algorithm for detecting cyclic\n    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n    // Initializing stack of traversed objects.\n    // It's done here since we only need them for objects and arrays comparison.\n    aStack = aStack || [];\n    bStack = bStack || [];\n    var length = aStack.length;\n    while (length--) {\n      // Linear search. Performance is inversely proportional to the number of\n      // unique nested structures.\n      if (aStack[length] === a) return bStack[length] === b;\n    }\n\n    // Add the first object to the stack of traversed objects.\n    aStack.push(a);\n    bStack.push(b);\n\n    // Recursively compare objects and arrays.\n    if (areArrays) {\n      // Compare array lengths to determine if a deep comparison is necessary.\n      length = a.length;\n      if (length !== b.length) return false;\n      // Deep compare the contents, ignoring non-numeric properties.\n      while (length--) {\n        if (!eq(a[length], b[length], aStack, bStack)) return false;\n      }\n    } else {\n      // Deep compare objects.\n      var keys = _.keys(a), key;\n      length = keys.length;\n      // Ensure that both objects contain the same number of properties before comparing deep equality.\n      if (_.keys(b).length !== length) return false;\n      while (length--) {\n        // Deep compare each member\n        key = keys[length];\n        if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n      }\n    }\n    // Remove the first object from the stack of traversed objects.\n    aStack.pop();\n    bStack.pop();\n    return true;\n  };\n\n  // Perform a deep comparison to check if two objects are equal.\n  _.isEqual = function(a, b) {\n    return eq(a, b);\n  };\n\n  // Is a given array, string, or object empty?\n  // An \"empty\" object has no enumerable own-properties.\n  _.isEmpty = function(obj) {\n    if (obj == null) return true;\n    if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n    return _.keys(obj).length === 0;\n  };\n\n  // Is a given value a DOM element?\n  _.isElement = function(obj) {\n    return !!(obj && obj.nodeType === 1);\n  };\n\n  // Is a given value an array?\n  // Delegates to ECMA5's native Array.isArray\n  _.isArray = nativeIsArray || function(obj) {\n    return toString.call(obj) === '[object Array]';\n  };\n\n  // Is a given variable an object?\n  _.isObject = function(obj) {\n    var type = typeof obj;\n    return type === 'function' || type === 'object' && !!obj;\n  };\n\n  // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError.\n  _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {\n    _['is' + name] = function(obj) {\n      return toString.call(obj) === '[object ' + name + ']';\n    };\n  });\n\n  // Define a fallback version of the method in browsers (ahem, IE < 9), where\n  // there isn't any inspectable \"Arguments\" type.\n  if (!_.isArguments(arguments)) {\n    _.isArguments = function(obj) {\n      return _.has(obj, 'callee');\n    };\n  }\n\n  // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n  // IE 11 (#1621), and in Safari 8 (#1929).\n  if (typeof /./ != 'function' && typeof Int8Array != 'object') {\n    _.isFunction = function(obj) {\n      return typeof obj == 'function' || false;\n    };\n  }\n\n  // Is a given object a finite number?\n  _.isFinite = function(obj) {\n    return isFinite(obj) && !isNaN(parseFloat(obj));\n  };\n\n  // Is the given value `NaN`? (NaN is the only number which does not equal itself).\n  _.isNaN = function(obj) {\n    return _.isNumber(obj) && obj !== +obj;\n  };\n\n  // Is a given value a boolean?\n  _.isBoolean = function(obj) {\n    return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n  };\n\n  // Is a given value equal to null?\n  _.isNull = function(obj) {\n    return obj === null;\n  };\n\n  // Is a given variable undefined?\n  _.isUndefined = function(obj) {\n    return obj === void 0;\n  };\n\n  // Shortcut function for checking if an object has a given property directly\n  // on itself (in other words, not on a prototype).\n  _.has = function(obj, key) {\n    return obj != null && hasOwnProperty.call(obj, key);\n  };\n\n  // Utility Functions\n  // -----------------\n\n  // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n  // previous owner. Returns a reference to the Underscore object.\n  _.noConflict = function() {\n    root._ = previousUnderscore;\n    return this;\n  };\n\n  // Keep the identity function around for default iteratees.\n  _.identity = function(value) {\n    return value;\n  };\n\n  // Predicate-generating functions. Often useful outside of Underscore.\n  _.constant = function(value) {\n    return function() {\n      return value;\n    };\n  };\n\n  _.noop = function(){};\n\n  _.property = property;\n\n  // Generates a function for a given object that returns a given property.\n  _.propertyOf = function(obj) {\n    return obj == null ? function(){} : function(key) {\n      return obj[key];\n    };\n  };\n\n  // Returns a predicate for checking whether an object has a given set of\n  // `key:value` pairs.\n  _.matcher = _.matches = function(attrs) {\n    attrs = _.extendOwn({}, attrs);\n    return function(obj) {\n      return _.isMatch(obj, attrs);\n    };\n  };\n\n  // Run a function **n** times.\n  _.times = function(n, iteratee, context) {\n    var accum = Array(Math.max(0, n));\n    iteratee = optimizeCb(iteratee, context, 1);\n    for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n    return accum;\n  };\n\n  // Return a random integer between min and max (inclusive).\n  _.random = function(min, max) {\n    if (max == null) {\n      max = min;\n      min = 0;\n    }\n    return min + Math.floor(Math.random() * (max - min + 1));\n  };\n\n  // A (possibly faster) way to get the current timestamp as an integer.\n  _.now = Date.now || function() {\n    return new Date().getTime();\n  };\n\n   // List of HTML entities for escaping.\n  var escapeMap = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#x27;',\n    '`': '&#x60;'\n  };\n  var unescapeMap = _.invert(escapeMap);\n\n  // Functions for escaping and unescaping strings to/from HTML interpolation.\n  var createEscaper = function(map) {\n    var escaper = function(match) {\n      return map[match];\n    };\n    // Regexes for identifying a key that needs to be escaped\n    var source = '(?:' + _.keys(map).join('|') + ')';\n    var testRegexp = RegExp(source);\n    var replaceRegexp = RegExp(source, 'g');\n    return function(string) {\n      string = string == null ? '' : '' + string;\n      return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n    };\n  };\n  _.escape = createEscaper(escapeMap);\n  _.unescape = createEscaper(unescapeMap);\n\n  // If the value of the named `property` is a function then invoke it with the\n  // `object` as context; otherwise, return it.\n  _.result = function(object, property, fallback) {\n    var value = object == null ? void 0 : object[property];\n    if (value === void 0) {\n      value = fallback;\n    }\n    return _.isFunction(value) ? value.call(object) : value;\n  };\n\n  // Generate a unique integer id (unique within the entire client session).\n  // Useful for temporary DOM ids.\n  var idCounter = 0;\n  _.uniqueId = function(prefix) {\n    var id = ++idCounter + '';\n    return prefix ? prefix + id : id;\n  };\n\n  // By default, Underscore uses ERB-style template delimiters, change the\n  // following template settings to use alternative delimiters.\n  _.templateSettings = {\n    evaluate    : /<%([\\s\\S]+?)%>/g,\n    interpolate : /<%=([\\s\\S]+?)%>/g,\n    escape      : /<%-([\\s\\S]+?)%>/g\n  };\n\n  // When customizing `templateSettings`, if you don't want to define an\n  // interpolation, evaluation or escaping regex, we need one that is\n  // guaranteed not to match.\n  var noMatch = /(.)^/;\n\n  // Certain characters need to be escaped so that they can be put into a\n  // string literal.\n  var escapes = {\n    \"'\":      \"'\",\n    '\\\\':     '\\\\',\n    '\\r':     'r',\n    '\\n':     'n',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  var escaper = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n  var escapeChar = function(match) {\n    return '\\\\' + escapes[match];\n  };\n\n  // JavaScript micro-templating, similar to John Resig's implementation.\n  // Underscore templating handles arbitrary delimiters, preserves whitespace,\n  // and correctly escapes quotes within interpolated code.\n  // NB: `oldSettings` only exists for backwards compatibility.\n  _.template = function(text, settings, oldSettings) {\n    if (!settings && oldSettings) settings = oldSettings;\n    settings = _.defaults({}, settings, _.templateSettings);\n\n    // Combine delimiters into one regular expression via alternation.\n    var matcher = RegExp([\n      (settings.escape || noMatch).source,\n      (settings.interpolate || noMatch).source,\n      (settings.evaluate || noMatch).source\n    ].join('|') + '|$', 'g');\n\n    // Compile the template source, escaping string literals appropriately.\n    var index = 0;\n    var source = \"__p+='\";\n    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n      source += text.slice(index, offset).replace(escaper, escapeChar);\n      index = offset + match.length;\n\n      if (escape) {\n        source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n      } else if (interpolate) {\n        source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n      } else if (evaluate) {\n        source += \"';\\n\" + evaluate + \"\\n__p+='\";\n      }\n\n      // Adobe VMs need the match returned to produce the correct offest.\n      return match;\n    });\n    source += \"';\\n\";\n\n    // If a variable is not specified, place data values in local scope.\n    if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n    source = \"var __t,__p='',__j=Array.prototype.join,\" +\n      \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n      source + 'return __p;\\n';\n\n    try {\n      var render = new Function(settings.variable || 'obj', '_', source);\n    } catch (e) {\n      e.source = source;\n      throw e;\n    }\n\n    var template = function(data) {\n      return render.call(this, data, _);\n    };\n\n    // Provide the compiled source as a convenience for precompilation.\n    var argument = settings.variable || 'obj';\n    template.source = 'function(' + argument + '){\\n' + source + '}';\n\n    return template;\n  };\n\n  // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n  _.chain = function(obj) {\n    var instance = _(obj);\n    instance._chain = true;\n    return instance;\n  };\n\n  // OOP\n  // ---------------\n  // If Underscore is called as a function, it returns a wrapped object that\n  // can be used OO-style. This wrapper holds altered versions of all the\n  // underscore functions. Wrapped objects may be chained.\n\n  // Helper function to continue chaining intermediate results.\n  var result = function(instance, obj) {\n    return instance._chain ? _(obj).chain() : obj;\n  };\n\n  // Add your own custom functions to the Underscore object.\n  _.mixin = function(obj) {\n    _.each(_.functions(obj), function(name) {\n      var func = _[name] = obj[name];\n      _.prototype[name] = function() {\n        var args = [this._wrapped];\n        push.apply(args, arguments);\n        return result(this, func.apply(_, args));\n      };\n    });\n  };\n\n  // Add all of the Underscore functions to the wrapper object.\n  _.mixin(_);\n\n  // Add all mutator Array functions to the wrapper.\n  _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n    var method = ArrayProto[name];\n    _.prototype[name] = function() {\n      var obj = this._wrapped;\n      method.apply(obj, arguments);\n      if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n      return result(this, obj);\n    };\n  });\n\n  // Add all accessor Array functions to the wrapper.\n  _.each(['concat', 'join', 'slice'], function(name) {\n    var method = ArrayProto[name];\n    _.prototype[name] = function() {\n      return result(this, method.apply(this._wrapped, arguments));\n    };\n  });\n\n  // Extracts the result from a wrapped and chained object.\n  _.prototype.value = function() {\n    return this._wrapped;\n  };\n\n  // Provide unwrapping proxy for some methods used in engine operations\n  // such as arithmetic and JSON stringification.\n  _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n  _.prototype.toString = function() {\n    return '' + this._wrapped;\n  };\n\n  // AMD registration happens at the end for compatibility with AMD loaders\n  // that may not enforce next-turn semantics on modules. Even though general\n  // practice for AMD registration is to be anonymous, underscore registers\n  // as a named module because, like jQuery, it is a base library that is\n  // popular enough to be bundled in a third party lib, but not be part of\n  // an AMD load request. Those cases could generate an error when an\n  // anonymous define() is called outside of a loader request.\n  if (typeof define === 'function' && define.amd) {\n    define('underscore', [], function() {\n      return _;\n    });\n  }\n}.call(this));\n","/*!\n * jQuery JavaScript Library v2.1.3\n * http://jquery.com/\n *\n * Includes Sizzle.js\n * http://sizzlejs.com/\n *\n * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2014-12-18T15:11Z\n */\n\n(function( global, factory ) {\n\n\tif ( typeof module === \"object\" && typeof module.exports === \"object\" ) {\n\t\t// For CommonJS and CommonJS-like environments where a proper `window`\n\t\t// is present, execute the factory and get jQuery.\n\t\t// For environments that do not have a `window` with a `document`\n\t\t// (such as Node.js), expose a factory as module.exports.\n\t\t// This accentuates the need for the creation of a real `window`.\n\t\t// e.g. var jQuery = require(\"jquery\")(window);\n\t\t// See ticket #14549 for more info.\n\t\tmodule.exports = global.document ?\n\t\t\tfactory( global, true ) :\n\t\t\tfunction( w ) {\n\t\t\t\tif ( !w.document ) {\n\t\t\t\t\tthrow new Error( \"jQuery requires a window with a document\" );\n\t\t\t\t}\n\t\t\t\treturn factory( w );\n\t\t\t};\n\t} else {\n\t\tfactory( global );\n\t}\n\n// Pass this if window is not defined yet\n}(typeof window !== \"undefined\" ? window : this, function( window, noGlobal ) {\n\n// Support: Firefox 18+\n// Can't be in strict mode, several libs including ASP.NET trace\n// the stack via arguments.caller.callee and Firefox dies if\n// you try to trace through \"use strict\" call chains. (#13335)\n//\n\nvar arr = [];\n\nvar slice = arr.slice;\n\nvar concat = arr.concat;\n\nvar push = arr.push;\n\nvar indexOf = arr.indexOf;\n\nvar class2type = {};\n\nvar toString = class2type.toString;\n\nvar hasOwn = class2type.hasOwnProperty;\n\nvar support = {};\n\n\n\nvar\n\t// Use the correct document accordingly with window argument (sandbox)\n\tdocument = window.document,\n\n\tversion = \"2.1.3\",\n\n\t// Define a local copy of jQuery\n\tjQuery = function( selector, context ) {\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\t// Need init if jQuery is called (just allow error to be thrown if not included)\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// Support: Android<4.1\n\t// Make sure we trim BOM and NBSP\n\trtrim = /^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g,\n\n\t// Matches dashed string for camelizing\n\trmsPrefix = /^-ms-/,\n\trdashAlpha = /-([\\da-z])/gi,\n\n\t// Used by jQuery.camelCase as callback to replace()\n\tfcamelCase = function( all, letter ) {\n\t\treturn letter.toUpperCase();\n\t};\n\njQuery.fn = jQuery.prototype = {\n\t// The current version of jQuery being used\n\tjquery: version,\n\n\tconstructor: jQuery,\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The default length of a jQuery object is 0\n\tlength: 0,\n\n\ttoArray: function() {\n\t\treturn slice.call( this );\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num != null ?\n\n\t\t\t// Return just the one element from the set\n\t\t\t( num < 0 ? this[ num + this.length ] : this[ num ] ) :\n\n\t\t\t// Return all the elements in a clean array\n\t\t\tslice.call( this );\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems ) {\n\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery.merge( this.constructor(), elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\t\tret.context = this.context;\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\t// (You can seed the arguments with an array of args, but this is\n\t// only used internally.)\n\teach: function( callback, args ) {\n\t\treturn jQuery.each( this, callback, args );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map(this, function( elem, i ) {\n\t\t\treturn callback.call( elem, i, elem );\n\t\t}));\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( slice.apply( this, arguments ) );\n\t},\n\n\tfirst: function() {\n\t\treturn this.eq( 0 );\n\t},\n\n\tlast: function() {\n\t\treturn this.eq( -1 );\n\t},\n\n\teq: function( i ) {\n\t\tvar len = this.length,\n\t\t\tj = +i + ( i < 0 ? len : 0 );\n\t\treturn this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || this.constructor(null);\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: push,\n\tsort: arr.sort,\n\tsplice: arr.splice\n};\n\njQuery.extend = jQuery.fn.extend = function() {\n\tvar options, name, src, copy, copyIsArray, clone,\n\t\ttarget = arguments[0] || {},\n\t\ti = 1,\n\t\tlength = arguments.length,\n\t\tdeep = false;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\n\t\t// Skip the boolean and the target\n\t\ttarget = arguments[ i ] || {};\n\t\ti++;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) ) {\n\t\ttarget = {};\n\t}\n\n\t// Extend jQuery itself if only one argument is passed\n\tif ( i === length ) {\n\t\ttarget = this;\n\t\ti--;\n\t}\n\n\tfor ( ; i < length; i++ ) {\n\t\t// Only deal with non-null/undefined values\n\t\tif ( (options = arguments[ i ]) != null ) {\n\t\t\t// Extend the base object\n\t\t\tfor ( name in options ) {\n\t\t\t\tsrc = target[ name ];\n\t\t\t\tcopy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Recurse if we're merging plain objects or arrays\n\t\t\t\tif ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {\n\t\t\t\t\tif ( copyIsArray ) {\n\t\t\t\t\t\tcopyIsArray = false;\n\t\t\t\t\t\tclone = src && jQuery.isArray(src) ? src : [];\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tclone = src && jQuery.isPlainObject(src) ? src : {};\n\t\t\t\t\t}\n\n\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, clone, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\t} else if ( copy !== undefined ) {\n\t\t\t\t\ttarget[ name ] = copy;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\njQuery.extend({\n\t// Unique for each copy of jQuery on the page\n\texpando: \"jQuery\" + ( version + Math.random() ).replace( /\\D/g, \"\" ),\n\n\t// Assume jQuery is ready without the ready module\n\tisReady: true,\n\n\terror: function( msg ) {\n\t\tthrow new Error( msg );\n\t},\n\n\tnoop: function() {},\n\n\tisFunction: function( obj ) {\n\t\treturn jQuery.type(obj) === \"function\";\n\t},\n\n\tisArray: Array.isArray,\n\n\tisWindow: function( obj ) {\n\t\treturn obj != null && obj === obj.window;\n\t},\n\n\tisNumeric: function( obj ) {\n\t\t// parseFloat NaNs numeric-cast false positives (null|true|false|\"\")\n\t\t// ...but misinterprets leading-number strings, particularly hex literals (\"0x...\")\n\t\t// subtraction forces infinities to NaN\n\t\t// adding 1 corrects loss of precision from parseFloat (#15100)\n\t\treturn !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0;\n\t},\n\n\tisPlainObject: function( obj ) {\n\t\t// Not plain objects:\n\t\t// - Any object or value whose internal [[Class]] property is not \"[object Object]\"\n\t\t// - DOM nodes\n\t\t// - window\n\t\tif ( jQuery.type( obj ) !== \"object\" || obj.nodeType || jQuery.isWindow( obj ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( obj.constructor &&\n\t\t\t\t!hasOwn.call( obj.constructor.prototype, \"isPrototypeOf\" ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the function hasn't returned already, we're confident that\n\t\t// |obj| is a plain object, created by {} or constructed with new Object\n\t\treturn true;\n\t},\n\n\tisEmptyObject: function( obj ) {\n\t\tvar name;\n\t\tfor ( name in obj ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t},\n\n\ttype: function( obj ) {\n\t\tif ( obj == null ) {\n\t\t\treturn obj + \"\";\n\t\t}\n\t\t// Support: Android<4.0, iOS<6 (functionish RegExp)\n\t\treturn typeof obj === \"object\" || typeof obj === \"function\" ?\n\t\t\tclass2type[ toString.call(obj) ] || \"object\" :\n\t\t\ttypeof obj;\n\t},\n\n\t// Evaluates a script in a global context\n\tglobalEval: function( code ) {\n\t\tvar script,\n\t\t\tindirect = eval;\n\n\t\tcode = jQuery.trim( code );\n\n\t\tif ( code ) {\n\t\t\t// If the code includes a valid, prologue position\n\t\t\t// strict mode pragma, execute code by injecting a\n\t\t\t// script tag into the document.\n\t\t\tif ( code.indexOf(\"use strict\") === 1 ) {\n\t\t\t\tscript = document.createElement(\"script\");\n\t\t\t\tscript.text = code;\n\t\t\t\tdocument.head.appendChild( script ).parentNode.removeChild( script );\n\t\t\t} else {\n\t\t\t// Otherwise, avoid the DOM node creation, insertion\n\t\t\t// and removal by using an indirect global eval\n\t\t\t\tindirect( code );\n\t\t\t}\n\t\t}\n\t},\n\n\t// Convert dashed to camelCase; used by the css and data modules\n\t// Support: IE9-11+\n\t// Microsoft forgot to hump their vendor prefix (#9572)\n\tcamelCase: function( string ) {\n\t\treturn string.replace( rmsPrefix, \"ms-\" ).replace( rdashAlpha, fcamelCase );\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\t},\n\n\t// args is for internal usage only\n\teach: function( obj, callback, args ) {\n\t\tvar value,\n\t\t\ti = 0,\n\t\t\tlength = obj.length,\n\t\t\tisArray = isArraylike( obj );\n\n\t\tif ( args ) {\n\t\t\tif ( isArray ) {\n\t\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( i in obj ) {\n\t\t\t\t\tvalue = callback.apply( obj[ i ], args );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// A special, fast, case for the most common use of each\n\t\t} else {\n\t\t\tif ( isArray ) {\n\t\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( i in obj ) {\n\t\t\t\t\tvalue = callback.call( obj[ i ], i, obj[ i ] );\n\n\t\t\t\t\tif ( value === false ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn obj;\n\t},\n\n\t// Support: Android<4.1\n\ttrim: function( text ) {\n\t\treturn text == null ?\n\t\t\t\"\" :\n\t\t\t( text + \"\" ).replace( rtrim, \"\" );\n\t},\n\n\t// results is for internal usage only\n\tmakeArray: function( arr, results ) {\n\t\tvar ret = results || [];\n\n\t\tif ( arr != null ) {\n\t\t\tif ( isArraylike( Object(arr) ) ) {\n\t\t\t\tjQuery.merge( ret,\n\t\t\t\t\ttypeof arr === \"string\" ?\n\t\t\t\t\t[ arr ] : arr\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tpush.call( ret, arr );\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tinArray: function( elem, arr, i ) {\n\t\treturn arr == null ? -1 : indexOf.call( arr, elem, i );\n\t},\n\n\tmerge: function( first, second ) {\n\t\tvar len = +second.length,\n\t\t\tj = 0,\n\t\t\ti = first.length;\n\n\t\tfor ( ; j < len; j++ ) {\n\t\t\tfirst[ i++ ] = second[ j ];\n\t\t}\n\n\t\tfirst.length = i;\n\n\t\treturn first;\n\t},\n\n\tgrep: function( elems, callback, invert ) {\n\t\tvar callbackInverse,\n\t\t\tmatches = [],\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tcallbackExpect = !invert;\n\n\t\t// Go through the array, only saving the items\n\t\t// that pass the validator function\n\t\tfor ( ; i < length; i++ ) {\n\t\t\tcallbackInverse = !callback( elems[ i ], i );\n\t\t\tif ( callbackInverse !== callbackExpect ) {\n\t\t\t\tmatches.push( elems[ i ] );\n\t\t\t}\n\t\t}\n\n\t\treturn matches;\n\t},\n\n\t// arg is for internal usage only\n\tmap: function( elems, callback, arg ) {\n\t\tvar value,\n\t\t\ti = 0,\n\t\t\tlength = elems.length,\n\t\t\tisArray = isArraylike( elems ),\n\t\t\tret = [];\n\n\t\t// Go through the array, translating each of the items to their new values\n\t\tif ( isArray ) {\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Go through every key on the object,\n\t\t} else {\n\t\t\tfor ( i in elems ) {\n\t\t\t\tvalue = callback( elems[ i ], i, arg );\n\n\t\t\t\tif ( value != null ) {\n\t\t\t\t\tret.push( value );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Flatten any nested arrays\n\t\treturn concat.apply( [], ret );\n\t},\n\n\t// A global GUID counter for objects\n\tguid: 1,\n\n\t// Bind a function to a context, optionally partially applying any\n\t// arguments.\n\tproxy: function( fn, context ) {\n\t\tvar tmp, args, proxy;\n\n\t\tif ( typeof context === \"string\" ) {\n\t\t\ttmp = fn[ context ];\n\t\t\tcontext = fn;\n\t\t\tfn = tmp;\n\t\t}\n\n\t\t// Quick check to determine if target is callable, in the spec\n\t\t// this throws a TypeError, but we will just return undefined.\n\t\tif ( !jQuery.isFunction( fn ) ) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\t// Simulated bind\n\t\targs = slice.call( arguments, 2 );\n\t\tproxy = function() {\n\t\t\treturn fn.apply( context || this, args.concat( slice.call( arguments ) ) );\n\t\t};\n\n\t\t// Set the guid of unique handler to the same of original handler, so it can be removed\n\t\tproxy.guid = fn.guid = fn.guid || jQuery.guid++;\n\n\t\treturn proxy;\n\t},\n\n\tnow: Date.now,\n\n\t// jQuery.support is not used in Core but other projects attach their\n\t// properties to it so it needs to exist.\n\tsupport: support\n});\n\n// Populate the class2type map\njQuery.each(\"Boolean Number String Function Array Date RegExp Object Error\".split(\" \"), function(i, name) {\n\tclass2type[ \"[object \" + name + \"]\" ] = name.toLowerCase();\n});\n\nfunction isArraylike( obj ) {\n\tvar length = obj.length,\n\t\ttype = jQuery.type( obj );\n\n\tif ( type === \"function\" || jQuery.isWindow( obj ) ) {\n\t\treturn false;\n\t}\n\n\tif ( obj.nodeType === 1 && length ) {\n\t\treturn true;\n\t}\n\n\treturn type === \"array\" || length === 0 ||\n\t\ttypeof length === \"number\" && length > 0 && ( length - 1 ) in obj;\n}\nvar Sizzle =\n/*!\n * Sizzle CSS Selector Engine v2.2.0-pre\n * http://sizzlejs.com/\n *\n * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors\n * Released under the MIT license\n * http://jquery.org/license\n *\n * Date: 2014-12-16\n */\n(function( window ) {\n\nvar i,\n\tsupport,\n\tExpr,\n\tgetText,\n\tisXML,\n\ttokenize,\n\tcompile,\n\tselect,\n\toutermostContext,\n\tsortInput,\n\thasDuplicate,\n\n\t// Local document vars\n\tsetDocument,\n\tdocument,\n\tdocElem,\n\tdocumentIsHTML,\n\trbuggyQSA,\n\trbuggyMatches,\n\tmatches,\n\tcontains,\n\n\t// Instance-specific data\n\texpando = \"sizzle\" + 1 * new Date(),\n\tpreferredDoc = window.document,\n\tdirruns = 0,\n\tdone = 0,\n\tclassCache = createCache(),\n\ttokenCache = createCache(),\n\tcompilerCache = createCache(),\n\tsortOrder = function( a, b ) {\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t}\n\t\treturn 0;\n\t},\n\n\t// General-purpose constants\n\tMAX_NEGATIVE = 1 << 31,\n\n\t// Instance methods\n\thasOwn = ({}).hasOwnProperty,\n\tarr = [],\n\tpop = arr.pop,\n\tpush_native = arr.push,\n\tpush = arr.push,\n\tslice = arr.slice,\n\t// Use a stripped-down indexOf as it's faster than native\n\t// http://jsperf.com/thor-indexof-vs-for/5\n\tindexOf = function( list, elem ) {\n\t\tvar i = 0,\n\t\t\tlen = list.length;\n\t\tfor ( ; i < len; i++ ) {\n\t\t\tif ( list[i] === elem ) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t},\n\n\tbooleans = \"checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped\",\n\n\t// Regular expressions\n\n\t// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace\n\twhitespace = \"[\\\\x20\\\\t\\\\r\\\\n\\\\f]\",\n\t// http://www.w3.org/TR/css3-syntax/#characters\n\tcharacterEncoding = \"(?:\\\\\\\\.|[\\\\w-]|[^\\\\x00-\\\\xa0])+\",\n\n\t// Loosely modeled on CSS identifier characters\n\t// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors\n\t// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier\n\tidentifier = characterEncoding.replace( \"w\", \"w#\" ),\n\n\t// Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors\n\tattributes = \"\\\\[\" + whitespace + \"*(\" + characterEncoding + \")(?:\" + whitespace +\n\t\t// Operator (capture 2)\n\t\t\"*([*^$|!~]?=)\" + whitespace +\n\t\t// \"Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]\"\n\t\t\"*(?:'((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\"|(\" + identifier + \"))|)\" + whitespace +\n\t\t\"*\\\\]\",\n\n\tpseudos = \":(\" + characterEncoding + \")(?:\\\\((\" +\n\t\t// To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:\n\t\t// 1. quoted (capture 3; capture 4 or capture 5)\n\t\t\"('((?:\\\\\\\\.|[^\\\\\\\\'])*)'|\\\"((?:\\\\\\\\.|[^\\\\\\\\\\\"])*)\\\")|\" +\n\t\t// 2. simple (capture 6)\n\t\t\"((?:\\\\\\\\.|[^\\\\\\\\()[\\\\]]|\" + attributes + \")*)|\" +\n\t\t// 3. anything else (capture 2)\n\t\t\".*\" +\n\t\t\")\\\\)|)\",\n\n\t// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter\n\trwhitespace = new RegExp( whitespace + \"+\", \"g\" ),\n\trtrim = new RegExp( \"^\" + whitespace + \"+|((?:^|[^\\\\\\\\])(?:\\\\\\\\.)*)\" + whitespace + \"+$\", \"g\" ),\n\n\trcomma = new RegExp( \"^\" + whitespace + \"*,\" + whitespace + \"*\" ),\n\trcombinators = new RegExp( \"^\" + whitespace + \"*([>+~]|\" + whitespace + \")\" + whitespace + \"*\" ),\n\n\trattributeQuotes = new RegExp( \"=\" + whitespace + \"*([^\\\\]'\\\"]*?)\" + whitespace + \"*\\\\]\", \"g\" ),\n\n\trpseudo = new RegExp( pseudos ),\n\tridentifier = new RegExp( \"^\" + identifier + \"$\" ),\n\n\tmatchExpr = {\n\t\t\"ID\": new RegExp( \"^#(\" + characterEncoding + \")\" ),\n\t\t\"CLASS\": new RegExp( \"^\\\\.(\" + characterEncoding + \")\" ),\n\t\t\"TAG\": new RegExp( \"^(\" + characterEncoding.replace( \"w\", \"w*\" ) + \")\" ),\n\t\t\"ATTR\": new RegExp( \"^\" + attributes ),\n\t\t\"PSEUDO\": new RegExp( \"^\" + pseudos ),\n\t\t\"CHILD\": new RegExp( \"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\\\(\" + whitespace +\n\t\t\t\"*(even|odd|(([+-]|)(\\\\d*)n|)\" + whitespace + \"*(?:([+-]|)\" + whitespace +\n\t\t\t\"*(\\\\d+)|))\" + whitespace + \"*\\\\)|)\", \"i\" ),\n\t\t\"bool\": new RegExp( \"^(?:\" + booleans + \")$\", \"i\" ),\n\t\t// For use in libraries implementing .is()\n\t\t// We use this for POS matching in `select`\n\t\t\"needsContext\": new RegExp( \"^\" + whitespace + \"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\\\(\" +\n\t\t\twhitespace + \"*((?:-\\\\d)?\\\\d*)\" + whitespace + \"*\\\\)|)(?=[^-]|$)\", \"i\" )\n\t},\n\n\trinputs = /^(?:input|select|textarea|button)$/i,\n\trheader = /^h\\d$/i,\n\n\trnative = /^[^{]+\\{\\s*\\[native \\w/,\n\n\t// Easily-parseable/retrievable ID or TAG or CLASS selectors\n\trquickExpr = /^(?:#([\\w-]+)|(\\w+)|\\.([\\w-]+))$/,\n\n\trsibling = /[+~]/,\n\trescape = /'|\\\\/g,\n\n\t// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters\n\trunescape = new RegExp( \"\\\\\\\\([\\\\da-f]{1,6}\" + whitespace + \"?|(\" + whitespace + \")|.)\", \"ig\" ),\n\tfunescape = function( _, escaped, escapedWhitespace ) {\n\t\tvar high = \"0x\" + escaped - 0x10000;\n\t\t// NaN means non-codepoint\n\t\t// Support: Firefox<24\n\t\t// Workaround erroneous numeric interpretation of +\"0x\"\n\t\treturn high !== high || escapedWhitespace ?\n\t\t\tescaped :\n\t\t\thigh < 0 ?\n\t\t\t\t// BMP codepoint\n\t\t\t\tString.fromCharCode( high + 0x10000 ) :\n\t\t\t\t// Supplemental Plane codepoint (surrogate pair)\n\t\t\t\tString.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );\n\t},\n\n\t// Used for iframes\n\t// See setDocument()\n\t// Removing the function wrapper causes a \"Permission Denied\"\n\t// error in IE\n\tunloadHandler = function() {\n\t\tsetDocument();\n\t};\n\n// Optimize for push.apply( _, NodeList )\ntry {\n\tpush.apply(\n\t\t(arr = slice.call( preferredDoc.childNodes )),\n\t\tpreferredDoc.childNodes\n\t);\n\t// Support: Android<4.0\n\t// Detect silently failing push.apply\n\tarr[ preferredDoc.childNodes.length ].nodeType;\n} catch ( e ) {\n\tpush = { apply: arr.length ?\n\n\t\t// Leverage slice if possible\n\t\tfunction( target, els ) {\n\t\t\tpush_native.apply( target, slice.call(els) );\n\t\t} :\n\n\t\t// Support: IE<9\n\t\t// Otherwise append directly\n\t\tfunction( target, els ) {\n\t\t\tvar j = target.length,\n\t\t\t\ti = 0;\n\t\t\t// Can't trust NodeList.length\n\t\t\twhile ( (target[j++] = els[i++]) ) {}\n\t\t\ttarget.length = j - 1;\n\t\t}\n\t};\n}\n\nfunction Sizzle( selector, context, results, seed ) {\n\tvar match, elem, m, nodeType,\n\t\t// QSA vars\n\t\ti, groups, old, nid, newContext, newSelector;\n\n\tif ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\n\tcontext = context || document;\n\tresults = results || [];\n\tnodeType = context.nodeType;\n\n\tif ( typeof selector !== \"string\" || !selector ||\n\t\tnodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {\n\n\t\treturn results;\n\t}\n\n\tif ( !seed && documentIsHTML ) {\n\n\t\t// Try to shortcut find operations when possible (e.g., not under DocumentFragment)\n\t\tif ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {\n\t\t\t// Speed-up: Sizzle(\"#ID\")\n\t\t\tif ( (m = match[1]) ) {\n\t\t\t\tif ( nodeType === 9 ) {\n\t\t\t\t\telem = context.getElementById( m );\n\t\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t\t// nodes that are no longer in the document (jQuery #6963)\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t// Handle the case where IE, Opera, and Webkit return items\n\t\t\t\t\t\t// by name instead of ID\n\t\t\t\t\t\tif ( elem.id === m ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Context is not a document\n\t\t\t\t\tif ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&\n\t\t\t\t\t\tcontains( context, elem ) && elem.id === m ) {\n\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Speed-up: Sizzle(\"TAG\")\n\t\t\t} else if ( match[2] ) {\n\t\t\t\tpush.apply( results, context.getElementsByTagName( selector ) );\n\t\t\t\treturn results;\n\n\t\t\t// Speed-up: Sizzle(\".CLASS\")\n\t\t\t} else if ( (m = match[3]) && support.getElementsByClassName ) {\n\t\t\t\tpush.apply( results, context.getElementsByClassName( m ) );\n\t\t\t\treturn results;\n\t\t\t}\n\t\t}\n\n\t\t// QSA path\n\t\tif ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {\n\t\t\tnid = old = expando;\n\t\t\tnewContext = context;\n\t\t\tnewSelector = nodeType !== 1 && selector;\n\n\t\t\t// qSA works strangely on Element-rooted queries\n\t\t\t// We can work around this by specifying an extra ID on the root\n\t\t\t// and working up from there (Thanks to Andrew Dupont for the technique)\n\t\t\t// IE 8 doesn't work on object elements\n\t\t\tif ( nodeType === 1 && context.nodeName.toLowerCase() !== \"object\" ) {\n\t\t\t\tgroups = tokenize( selector );\n\n\t\t\t\tif ( (old = context.getAttribute(\"id\")) ) {\n\t\t\t\t\tnid = old.replace( rescape, \"\\\\$&\" );\n\t\t\t\t} else {\n\t\t\t\t\tcontext.setAttribute( \"id\", nid );\n\t\t\t\t}\n\t\t\t\tnid = \"[id='\" + nid + \"'] \";\n\n\t\t\t\ti = groups.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tgroups[i] = nid + toSelector( groups[i] );\n\t\t\t\t}\n\t\t\t\tnewContext = rsibling.test( selector ) && testContext( context.parentNode ) || context;\n\t\t\t\tnewSelector = groups.join(\",\");\n\t\t\t}\n\n\t\t\tif ( newSelector ) {\n\t\t\t\ttry {\n\t\t\t\t\tpush.apply( results,\n\t\t\t\t\t\tnewContext.querySelectorAll( newSelector )\n\t\t\t\t\t);\n\t\t\t\t\treturn results;\n\t\t\t\t} catch(qsaError) {\n\t\t\t\t} finally {\n\t\t\t\t\tif ( !old ) {\n\t\t\t\t\t\tcontext.removeAttribute(\"id\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// All others\n\treturn select( selector.replace( rtrim, \"$1\" ), context, results, seed );\n}\n\n/**\n * Create key-value caches of limited size\n * @returns {Function(string, Object)} Returns the Object data after storing it on itself with\n *\tproperty name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)\n *\tdeleting the oldest entry\n */\nfunction createCache() {\n\tvar keys = [];\n\n\tfunction cache( key, value ) {\n\t\t// Use (key + \" \") to avoid collision with native prototype properties (see Issue #157)\n\t\tif ( keys.push( key + \" \" ) > Expr.cacheLength ) {\n\t\t\t// Only keep the most recent entries\n\t\t\tdelete cache[ keys.shift() ];\n\t\t}\n\t\treturn (cache[ key + \" \" ] = value);\n\t}\n\treturn cache;\n}\n\n/**\n * Mark a function for special use by Sizzle\n * @param {Function} fn The function to mark\n */\nfunction markFunction( fn ) {\n\tfn[ expando ] = true;\n\treturn fn;\n}\n\n/**\n * Support testing using an element\n * @param {Function} fn Passed the created div and expects a boolean result\n */\nfunction assert( fn ) {\n\tvar div = document.createElement(\"div\");\n\n\ttry {\n\t\treturn !!fn( div );\n\t} catch (e) {\n\t\treturn false;\n\t} finally {\n\t\t// Remove from its parent by default\n\t\tif ( div.parentNode ) {\n\t\t\tdiv.parentNode.removeChild( div );\n\t\t}\n\t\t// release memory in IE\n\t\tdiv = null;\n\t}\n}\n\n/**\n * Adds the same handler for all of the specified attrs\n * @param {String} attrs Pipe-separated list of attributes\n * @param {Function} handler The method that will be applied\n */\nfunction addHandle( attrs, handler ) {\n\tvar arr = attrs.split(\"|\"),\n\t\ti = attrs.length;\n\n\twhile ( i-- ) {\n\t\tExpr.attrHandle[ arr[i] ] = handler;\n\t}\n}\n\n/**\n * Checks document order of two siblings\n * @param {Element} a\n * @param {Element} b\n * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b\n */\nfunction siblingCheck( a, b ) {\n\tvar cur = b && a,\n\t\tdiff = cur && a.nodeType === 1 && b.nodeType === 1 &&\n\t\t\t( ~b.sourceIndex || MAX_NEGATIVE ) -\n\t\t\t( ~a.sourceIndex || MAX_NEGATIVE );\n\n\t// Use IE sourceIndex if available on both nodes\n\tif ( diff ) {\n\t\treturn diff;\n\t}\n\n\t// Check if b follows a\n\tif ( cur ) {\n\t\twhile ( (cur = cur.nextSibling) ) {\n\t\t\tif ( cur === b ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn a ? 1 : -1;\n}\n\n/**\n * Returns a function to use in pseudos for input types\n * @param {String} type\n */\nfunction createInputPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn name === \"input\" && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for buttons\n * @param {String} type\n */\nfunction createButtonPseudo( type ) {\n\treturn function( elem ) {\n\t\tvar name = elem.nodeName.toLowerCase();\n\t\treturn (name === \"input\" || name === \"button\") && elem.type === type;\n\t};\n}\n\n/**\n * Returns a function to use in pseudos for positionals\n * @param {Function} fn\n */\nfunction createPositionalPseudo( fn ) {\n\treturn markFunction(function( argument ) {\n\t\targument = +argument;\n\t\treturn markFunction(function( seed, matches ) {\n\t\t\tvar j,\n\t\t\t\tmatchIndexes = fn( [], seed.length, argument ),\n\t\t\t\ti = matchIndexes.length;\n\n\t\t\t// Match elements found at the specified indexes\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( seed[ (j = matchIndexes[i]) ] ) {\n\t\t\t\t\tseed[j] = !(matches[j] = seed[j]);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t});\n}\n\n/**\n * Checks a node for validity as a Sizzle context\n * @param {Element|Object=} context\n * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value\n */\nfunction testContext( context ) {\n\treturn context && typeof context.getElementsByTagName !== \"undefined\" && context;\n}\n\n// Expose support vars for convenience\nsupport = Sizzle.support = {};\n\n/**\n * Detects XML nodes\n * @param {Element|Object} elem An element or a document\n * @returns {Boolean} True iff elem is a non-HTML XML node\n */\nisXML = Sizzle.isXML = function( elem ) {\n\t// documentElement is verified for cases where it doesn't yet exist\n\t// (such as loading iframes in IE - #4833)\n\tvar documentElement = elem && (elem.ownerDocument || elem).documentElement;\n\treturn documentElement ? documentElement.nodeName !== \"HTML\" : false;\n};\n\n/**\n * Sets document-related variables once based on the current document\n * @param {Element|Object} [doc] An element or document object to use to set the document\n * @returns {Object} Returns the current document\n */\nsetDocument = Sizzle.setDocument = function( node ) {\n\tvar hasCompare, parent,\n\t\tdoc = node ? node.ownerDocument || node : preferredDoc;\n\n\t// If no document and documentElement is available, return\n\tif ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {\n\t\treturn document;\n\t}\n\n\t// Set our document\n\tdocument = doc;\n\tdocElem = doc.documentElement;\n\tparent = doc.defaultView;\n\n\t// Support: IE>8\n\t// If iframe document is assigned to \"document\" variable and if iframe has been reloaded,\n\t// IE will throw \"permission denied\" error when accessing \"document\" variable, see jQuery #13936\n\t// IE6-8 do not support the defaultView property so parent will be undefined\n\tif ( parent && parent !== parent.top ) {\n\t\t// IE11 does not have attachEvent, so all must suffer\n\t\tif ( parent.addEventListener ) {\n\t\t\tparent.addEventListener( \"unload\", unloadHandler, false );\n\t\t} else if ( parent.attachEvent ) {\n\t\t\tparent.attachEvent( \"onunload\", unloadHandler );\n\t\t}\n\t}\n\n\t/* Support tests\n\t---------------------------------------------------------------------- */\n\tdocumentIsHTML = !isXML( doc );\n\n\t/* Attributes\n\t---------------------------------------------------------------------- */\n\n\t// Support: IE<8\n\t// Verify that getAttribute really returns attributes and not properties\n\t// (excepting IE8 booleans)\n\tsupport.attributes = assert(function( div ) {\n\t\tdiv.className = \"i\";\n\t\treturn !div.getAttribute(\"className\");\n\t});\n\n\t/* getElement(s)By*\n\t---------------------------------------------------------------------- */\n\n\t// Check if getElementsByTagName(\"*\") returns only elements\n\tsupport.getElementsByTagName = assert(function( div ) {\n\t\tdiv.appendChild( doc.createComment(\"\") );\n\t\treturn !div.getElementsByTagName(\"*\").length;\n\t});\n\n\t// Support: IE<9\n\tsupport.getElementsByClassName = rnative.test( doc.getElementsByClassName );\n\n\t// Support: IE<10\n\t// Check if getElementById returns elements by name\n\t// The broken getElementById methods don't pick up programatically-set names,\n\t// so use a roundabout getElementsByName test\n\tsupport.getById = assert(function( div ) {\n\t\tdocElem.appendChild( div ).id = expando;\n\t\treturn !doc.getElementsByName || !doc.getElementsByName( expando ).length;\n\t});\n\n\t// ID find and filter\n\tif ( support.getById ) {\n\t\tExpr.find[\"ID\"] = function( id, context ) {\n\t\t\tif ( typeof context.getElementById !== \"undefined\" && documentIsHTML ) {\n\t\t\t\tvar m = context.getElementById( id );\n\t\t\t\t// Check parentNode to catch when Blackberry 4.6 returns\n\t\t\t\t// nodes that are no longer in the document #6963\n\t\t\t\treturn m && m.parentNode ? [ m ] : [];\n\t\t\t}\n\t\t};\n\t\tExpr.filter[\"ID\"] = function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn elem.getAttribute(\"id\") === attrId;\n\t\t\t};\n\t\t};\n\t} else {\n\t\t// Support: IE6/7\n\t\t// getElementById is not reliable as a find shortcut\n\t\tdelete Expr.find[\"ID\"];\n\n\t\tExpr.filter[\"ID\"] =  function( id ) {\n\t\t\tvar attrId = id.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\tvar node = typeof elem.getAttributeNode !== \"undefined\" && elem.getAttributeNode(\"id\");\n\t\t\t\treturn node && node.value === attrId;\n\t\t\t};\n\t\t};\n\t}\n\n\t// Tag\n\tExpr.find[\"TAG\"] = support.getElementsByTagName ?\n\t\tfunction( tag, context ) {\n\t\t\tif ( typeof context.getElementsByTagName !== \"undefined\" ) {\n\t\t\t\treturn context.getElementsByTagName( tag );\n\n\t\t\t// DocumentFragment nodes don't have gEBTN\n\t\t\t} else if ( support.qsa ) {\n\t\t\t\treturn context.querySelectorAll( tag );\n\t\t\t}\n\t\t} :\n\n\t\tfunction( tag, context ) {\n\t\t\tvar elem,\n\t\t\t\ttmp = [],\n\t\t\t\ti = 0,\n\t\t\t\t// By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too\n\t\t\t\tresults = context.getElementsByTagName( tag );\n\n\t\t\t// Filter out possible comments\n\t\t\tif ( tag === \"*\" ) {\n\t\t\t\twhile ( (elem = results[i++]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\ttmp.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t\treturn results;\n\t\t};\n\n\t// Class\n\tExpr.find[\"CLASS\"] = support.getElementsByClassName && function( className, context ) {\n\t\tif ( documentIsHTML ) {\n\t\t\treturn context.getElementsByClassName( className );\n\t\t}\n\t};\n\n\t/* QSA/matchesSelector\n\t---------------------------------------------------------------------- */\n\n\t// QSA and matchesSelector support\n\n\t// matchesSelector(:active) reports false when true (IE9/Opera 11.5)\n\trbuggyMatches = [];\n\n\t// qSa(:focus) reports false when true (Chrome 21)\n\t// We allow this because of a bug in IE8/9 that throws an error\n\t// whenever `document.activeElement` is accessed on an iframe\n\t// So, we allow :focus to pass through QSA all the time to avoid the IE error\n\t// See http://bugs.jquery.com/ticket/13378\n\trbuggyQSA = [];\n\n\tif ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {\n\t\t// Build QSA regex\n\t\t// Regex strategy adopted from Diego Perini\n\t\tassert(function( div ) {\n\t\t\t// Select is set to empty string on purpose\n\t\t\t// This is to test IE's treatment of not explicitly\n\t\t\t// setting a boolean content attribute,\n\t\t\t// since its presence should be enough\n\t\t\t// http://bugs.jquery.com/ticket/12359\n\t\t\tdocElem.appendChild( div ).innerHTML = \"<a id='\" + expando + \"'></a>\" +\n\t\t\t\t\"<select id='\" + expando + \"-\\f]' msallowcapture=''>\" +\n\t\t\t\t\"<option selected=''></option></select>\";\n\n\t\t\t// Support: IE8, Opera 11-12.16\n\t\t\t// Nothing should be selected when empty strings follow ^= or $= or *=\n\t\t\t// The test attribute must be unknown in Opera but \"safe\" for WinRT\n\t\t\t// http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section\n\t\t\tif ( div.querySelectorAll(\"[msallowcapture^='']\").length ) {\n\t\t\t\trbuggyQSA.push( \"[*^$]=\" + whitespace + \"*(?:''|\\\"\\\")\" );\n\t\t\t}\n\n\t\t\t// Support: IE8\n\t\t\t// Boolean attributes and \"value\" are not treated correctly\n\t\t\tif ( !div.querySelectorAll(\"[selected]\").length ) {\n\t\t\t\trbuggyQSA.push( \"\\\\[\" + whitespace + \"*(?:value|\" + booleans + \")\" );\n\t\t\t}\n\n\t\t\t// Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+\n\t\t\tif ( !div.querySelectorAll( \"[id~=\" + expando + \"-]\" ).length ) {\n\t\t\t\trbuggyQSA.push(\"~=\");\n\t\t\t}\n\n\t\t\t// Webkit/Opera - :checked should return selected option elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":checked\").length ) {\n\t\t\t\trbuggyQSA.push(\":checked\");\n\t\t\t}\n\n\t\t\t// Support: Safari 8+, iOS 8+\n\t\t\t// https://bugs.webkit.org/show_bug.cgi?id=136851\n\t\t\t// In-page `selector#id sibing-combinator selector` fails\n\t\t\tif ( !div.querySelectorAll( \"a#\" + expando + \"+*\" ).length ) {\n\t\t\t\trbuggyQSA.push(\".#.+[+~]\");\n\t\t\t}\n\t\t});\n\n\t\tassert(function( div ) {\n\t\t\t// Support: Windows 8 Native Apps\n\t\t\t// The type and name attributes are restricted during .innerHTML assignment\n\t\t\tvar input = doc.createElement(\"input\");\n\t\t\tinput.setAttribute( \"type\", \"hidden\" );\n\t\t\tdiv.appendChild( input ).setAttribute( \"name\", \"D\" );\n\n\t\t\t// Support: IE8\n\t\t\t// Enforce case-sensitivity of name attribute\n\t\t\tif ( div.querySelectorAll(\"[name=d]\").length ) {\n\t\t\t\trbuggyQSA.push( \"name\" + whitespace + \"*[*^$|!~]?=\" );\n\t\t\t}\n\n\t\t\t// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)\n\t\t\t// IE8 throws error here and will not see later tests\n\t\t\tif ( !div.querySelectorAll(\":enabled\").length ) {\n\t\t\t\trbuggyQSA.push( \":enabled\", \":disabled\" );\n\t\t\t}\n\n\t\t\t// Opera 10-11 does not throw on post-comma invalid pseudos\n\t\t\tdiv.querySelectorAll(\"*,:x\");\n\t\t\trbuggyQSA.push(\",.*:\");\n\t\t});\n\t}\n\n\tif ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||\n\t\tdocElem.webkitMatchesSelector ||\n\t\tdocElem.mozMatchesSelector ||\n\t\tdocElem.oMatchesSelector ||\n\t\tdocElem.msMatchesSelector) )) ) {\n\n\t\tassert(function( div ) {\n\t\t\t// Check to see if it's possible to do matchesSelector\n\t\t\t// on a disconnected node (IE 9)\n\t\t\tsupport.disconnectedMatch = matches.call( div, \"div\" );\n\n\t\t\t// This should fail with an exception\n\t\t\t// Gecko does not error, returns false instead\n\t\t\tmatches.call( div, \"[s!='']:x\" );\n\t\t\trbuggyMatches.push( \"!=\", pseudos );\n\t\t});\n\t}\n\n\trbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join(\"|\") );\n\trbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join(\"|\") );\n\n\t/* Contains\n\t---------------------------------------------------------------------- */\n\thasCompare = rnative.test( docElem.compareDocumentPosition );\n\n\t// Element contains another\n\t// Purposefully does not implement inclusive descendent\n\t// As in, an element does not contain itself\n\tcontains = hasCompare || rnative.test( docElem.contains ) ?\n\t\tfunction( a, b ) {\n\t\t\tvar adown = a.nodeType === 9 ? a.documentElement : a,\n\t\t\t\tbup = b && b.parentNode;\n\t\t\treturn a === bup || !!( bup && bup.nodeType === 1 && (\n\t\t\t\tadown.contains ?\n\t\t\t\t\tadown.contains( bup ) :\n\t\t\t\t\ta.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n\t\t\t));\n\t\t} :\n\t\tfunction( a, b ) {\n\t\t\tif ( b ) {\n\t\t\t\twhile ( (b = b.parentNode) ) {\n\t\t\t\t\tif ( b === a ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\n\t/* Sorting\n\t---------------------------------------------------------------------- */\n\n\t// Document order sorting\n\tsortOrder = hasCompare ?\n\tfunction( a, b ) {\n\n\t\t// Flag for duplicate removal\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\t// Sort on method existence if only one input has compareDocumentPosition\n\t\tvar compare = !a.compareDocumentPosition - !b.compareDocumentPosition;\n\t\tif ( compare ) {\n\t\t\treturn compare;\n\t\t}\n\n\t\t// Calculate position if both inputs belong to the same document\n\t\tcompare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?\n\t\t\ta.compareDocumentPosition( b ) :\n\n\t\t\t// Otherwise we know they are disconnected\n\t\t\t1;\n\n\t\t// Disconnected nodes\n\t\tif ( compare & 1 ||\n\t\t\t(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {\n\n\t\t\t// Choose the first element that is related to our preferred document\n\t\t\tif ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\tif ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\t// Maintain original order\n\t\t\treturn sortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\t\t}\n\n\t\treturn compare & 4 ? -1 : 1;\n\t} :\n\tfunction( a, b ) {\n\t\t// Exit early if the nodes are identical\n\t\tif ( a === b ) {\n\t\t\thasDuplicate = true;\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\taup = a.parentNode,\n\t\t\tbup = b.parentNode,\n\t\t\tap = [ a ],\n\t\t\tbp = [ b ];\n\n\t\t// Parentless nodes are either documents or disconnected\n\t\tif ( !aup || !bup ) {\n\t\t\treturn a === doc ? -1 :\n\t\t\t\tb === doc ? 1 :\n\t\t\t\taup ? -1 :\n\t\t\t\tbup ? 1 :\n\t\t\t\tsortInput ?\n\t\t\t\t( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :\n\t\t\t\t0;\n\n\t\t// If the nodes are siblings, we can do a quick check\n\t\t} else if ( aup === bup ) {\n\t\t\treturn siblingCheck( a, b );\n\t\t}\n\n\t\t// Otherwise we need full lists of their ancestors for comparison\n\t\tcur = a;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tap.unshift( cur );\n\t\t}\n\t\tcur = b;\n\t\twhile ( (cur = cur.parentNode) ) {\n\t\t\tbp.unshift( cur );\n\t\t}\n\n\t\t// Walk down the tree looking for a discrepancy\n\t\twhile ( ap[i] === bp[i] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i ?\n\t\t\t// Do a sibling check if the nodes have a common ancestor\n\t\t\tsiblingCheck( ap[i], bp[i] ) :\n\n\t\t\t// Otherwise nodes in our document sort first\n\t\t\tap[i] === preferredDoc ? -1 :\n\t\t\tbp[i] === preferredDoc ? 1 :\n\t\t\t0;\n\t};\n\n\treturn doc;\n};\n\nSizzle.matches = function( expr, elements ) {\n\treturn Sizzle( expr, null, null, elements );\n};\n\nSizzle.matchesSelector = function( elem, expr ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\t// Make sure that attribute selectors are quoted\n\texpr = expr.replace( rattributeQuotes, \"='$1']\" );\n\n\tif ( support.matchesSelector && documentIsHTML &&\n\t\t( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&\n\t\t( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {\n\n\t\ttry {\n\t\t\tvar ret = matches.call( elem, expr );\n\n\t\t\t// IE 9's matchesSelector returns false on disconnected nodes\n\t\t\tif ( ret || support.disconnectedMatch ||\n\t\t\t\t\t// As well, disconnected nodes are said to be in a document\n\t\t\t\t\t// fragment in IE 9\n\t\t\t\t\telem.document && elem.document.nodeType !== 11 ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t} catch (e) {}\n\t}\n\n\treturn Sizzle( expr, document, null, [ elem ] ).length > 0;\n};\n\nSizzle.contains = function( context, elem ) {\n\t// Set document vars if needed\n\tif ( ( context.ownerDocument || context ) !== document ) {\n\t\tsetDocument( context );\n\t}\n\treturn contains( context, elem );\n};\n\nSizzle.attr = function( elem, name ) {\n\t// Set document vars if needed\n\tif ( ( elem.ownerDocument || elem ) !== document ) {\n\t\tsetDocument( elem );\n\t}\n\n\tvar fn = Expr.attrHandle[ name.toLowerCase() ],\n\t\t// Don't get fooled by Object.prototype properties (jQuery #13807)\n\t\tval = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?\n\t\t\tfn( elem, name, !documentIsHTML ) :\n\t\t\tundefined;\n\n\treturn val !== undefined ?\n\t\tval :\n\t\tsupport.attributes || !documentIsHTML ?\n\t\t\telem.getAttribute( name ) :\n\t\t\t(val = elem.getAttributeNode(name)) && val.specified ?\n\t\t\t\tval.value :\n\t\t\t\tnull;\n};\n\nSizzle.error = function( msg ) {\n\tthrow new Error( \"Syntax error, unrecognized expression: \" + msg );\n};\n\n/**\n * Document sorting and removing duplicates\n * @param {ArrayLike} results\n */\nSizzle.uniqueSort = function( results ) {\n\tvar elem,\n\t\tduplicates = [],\n\t\tj = 0,\n\t\ti = 0;\n\n\t// Unless we *know* we can detect duplicates, assume their presence\n\thasDuplicate = !support.detectDuplicates;\n\tsortInput = !support.sortStable && results.slice( 0 );\n\tresults.sort( sortOrder );\n\n\tif ( hasDuplicate ) {\n\t\twhile ( (elem = results[i++]) ) {\n\t\t\tif ( elem === results[ i ] ) {\n\t\t\t\tj = duplicates.push( i );\n\t\t\t}\n\t\t}\n\t\twhile ( j-- ) {\n\t\t\tresults.splice( duplicates[ j ], 1 );\n\t\t}\n\t}\n\n\t// Clear input after sorting to release objects\n\t// See https://github.com/jquery/sizzle/pull/225\n\tsortInput = null;\n\n\treturn results;\n};\n\n/**\n * Utility function for retrieving the text value of an array of DOM nodes\n * @param {Array|Element} elem\n */\ngetText = Sizzle.getText = function( elem ) {\n\tvar node,\n\t\tret = \"\",\n\t\ti = 0,\n\t\tnodeType = elem.nodeType;\n\n\tif ( !nodeType ) {\n\t\t// If no nodeType, this is expected to be an array\n\t\twhile ( (node = elem[i++]) ) {\n\t\t\t// Do not traverse comment nodes\n\t\t\tret += getText( node );\n\t\t}\n\t} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {\n\t\t// Use textContent for elements\n\t\t// innerText usage removed for consistency of new lines (jQuery #11153)\n\t\tif ( typeof elem.textContent === \"string\" ) {\n\t\t\treturn elem.textContent;\n\t\t} else {\n\t\t\t// Traverse its children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tret += getText( elem );\n\t\t\t}\n\t\t}\n\t} else if ( nodeType === 3 || nodeType === 4 ) {\n\t\treturn elem.nodeValue;\n\t}\n\t// Do not include comment or processing instruction nodes\n\n\treturn ret;\n};\n\nExpr = Sizzle.selectors = {\n\n\t// Can be adjusted by the user\n\tcacheLength: 50,\n\n\tcreatePseudo: markFunction,\n\n\tmatch: matchExpr,\n\n\tattrHandle: {},\n\n\tfind: {},\n\n\trelative: {\n\t\t\">\": { dir: \"parentNode\", first: true },\n\t\t\" \": { dir: \"parentNode\" },\n\t\t\"+\": { dir: \"previousSibling\", first: true },\n\t\t\"~\": { dir: \"previousSibling\" }\n\t},\n\n\tpreFilter: {\n\t\t\"ATTR\": function( match ) {\n\t\t\tmatch[1] = match[1].replace( runescape, funescape );\n\n\t\t\t// Move the given value to match[3] whether quoted or unquoted\n\t\t\tmatch[3] = ( match[3] || match[4] || match[5] || \"\" ).replace( runescape, funescape );\n\n\t\t\tif ( match[2] === \"~=\" ) {\n\t\t\t\tmatch[3] = \" \" + match[3] + \" \";\n\t\t\t}\n\n\t\t\treturn match.slice( 0, 4 );\n\t\t},\n\n\t\t\"CHILD\": function( match ) {\n\t\t\t/* matches from matchExpr[\"CHILD\"]\n\t\t\t\t1 type (only|nth|...)\n\t\t\t\t2 what (child|of-type)\n\t\t\t\t3 argument (even|odd|\\d*|\\d*n([+-]\\d+)?|...)\n\t\t\t\t4 xn-component of xn+y argument ([+-]?\\d*n|)\n\t\t\t\t5 sign of xn-component\n\t\t\t\t6 x of xn-component\n\t\t\t\t7 sign of y-component\n\t\t\t\t8 y of y-component\n\t\t\t*/\n\t\t\tmatch[1] = match[1].toLowerCase();\n\n\t\t\tif ( match[1].slice( 0, 3 ) === \"nth\" ) {\n\t\t\t\t// nth-* requires argument\n\t\t\t\tif ( !match[3] ) {\n\t\t\t\t\tSizzle.error( match[0] );\n\t\t\t\t}\n\n\t\t\t\t// numeric x and y parameters for Expr.filter.CHILD\n\t\t\t\t// remember that false/true cast respectively to 0/1\n\t\t\t\tmatch[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === \"even\" || match[3] === \"odd\" ) );\n\t\t\t\tmatch[5] = +( ( match[7] + match[8] ) || match[3] === \"odd\" );\n\n\t\t\t// other types prohibit arguments\n\t\t\t} else if ( match[3] ) {\n\t\t\t\tSizzle.error( match[0] );\n\t\t\t}\n\n\t\t\treturn match;\n\t\t},\n\n\t\t\"PSEUDO\": function( match ) {\n\t\t\tvar excess,\n\t\t\t\tunquoted = !match[6] && match[2];\n\n\t\t\tif ( matchExpr[\"CHILD\"].test( match[0] ) ) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t// Accept quoted arguments as-is\n\t\t\tif ( match[3] ) {\n\t\t\t\tmatch[2] = match[4] || match[5] || \"\";\n\n\t\t\t// Strip excess characters from unquoted arguments\n\t\t\t} else if ( unquoted && rpseudo.test( unquoted ) &&\n\t\t\t\t// Get excess from tokenize (recursively)\n\t\t\t\t(excess = tokenize( unquoted, true )) &&\n\t\t\t\t// advance to the next closing parenthesis\n\t\t\t\t(excess = unquoted.indexOf( \")\", unquoted.length - excess ) - unquoted.length) ) {\n\n\t\t\t\t// excess is a negative index\n\t\t\t\tmatch[0] = match[0].slice( 0, excess );\n\t\t\t\tmatch[2] = unquoted.slice( 0, excess );\n\t\t\t}\n\n\t\t\t// Return only captures needed by the pseudo filter method (type and argument)\n\t\t\treturn match.slice( 0, 3 );\n\t\t}\n\t},\n\n\tfilter: {\n\n\t\t\"TAG\": function( nodeNameSelector ) {\n\t\t\tvar nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn nodeNameSelector === \"*\" ?\n\t\t\t\tfunction() { return true; } :\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn elem.nodeName && elem.nodeName.toLowerCase() === nodeName;\n\t\t\t\t};\n\t\t},\n\n\t\t\"CLASS\": function( className ) {\n\t\t\tvar pattern = classCache[ className + \" \" ];\n\n\t\t\treturn pattern ||\n\t\t\t\t(pattern = new RegExp( \"(^|\" + whitespace + \")\" + className + \"(\" + whitespace + \"|$)\" )) &&\n\t\t\t\tclassCache( className, function( elem ) {\n\t\t\t\t\treturn pattern.test( typeof elem.className === \"string\" && elem.className || typeof elem.getAttribute !== \"undefined\" && elem.getAttribute(\"class\") || \"\" );\n\t\t\t\t});\n\t\t},\n\n\t\t\"ATTR\": function( name, operator, check ) {\n\t\t\treturn function( elem ) {\n\t\t\t\tvar result = Sizzle.attr( elem, name );\n\n\t\t\t\tif ( result == null ) {\n\t\t\t\t\treturn operator === \"!=\";\n\t\t\t\t}\n\t\t\t\tif ( !operator ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\n\t\t\t\tresult += \"\";\n\n\t\t\t\treturn operator === \"=\" ? result === check :\n\t\t\t\t\toperator === \"!=\" ? result !== check :\n\t\t\t\t\toperator === \"^=\" ? check && result.indexOf( check ) === 0 :\n\t\t\t\t\toperator === \"*=\" ? check && result.indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"$=\" ? check && result.slice( -check.length ) === check :\n\t\t\t\t\toperator === \"~=\" ? ( \" \" + result.replace( rwhitespace, \" \" ) + \" \" ).indexOf( check ) > -1 :\n\t\t\t\t\toperator === \"|=\" ? result === check || result.slice( 0, check.length + 1 ) === check + \"-\" :\n\t\t\t\t\tfalse;\n\t\t\t};\n\t\t},\n\n\t\t\"CHILD\": function( type, what, argument, first, last ) {\n\t\t\tvar simple = type.slice( 0, 3 ) !== \"nth\",\n\t\t\t\tforward = type.slice( -4 ) !== \"last\",\n\t\t\t\tofType = what === \"of-type\";\n\n\t\t\treturn first === 1 && last === 0 ?\n\n\t\t\t\t// Shortcut for :nth-*(n)\n\t\t\t\tfunction( elem ) {\n\t\t\t\t\treturn !!elem.parentNode;\n\t\t\t\t} :\n\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tvar cache, outerCache, node, diff, nodeIndex, start,\n\t\t\t\t\t\tdir = simple !== forward ? \"nextSibling\" : \"previousSibling\",\n\t\t\t\t\t\tparent = elem.parentNode,\n\t\t\t\t\t\tname = ofType && elem.nodeName.toLowerCase(),\n\t\t\t\t\t\tuseCache = !xml && !ofType;\n\n\t\t\t\t\tif ( parent ) {\n\n\t\t\t\t\t\t// :(first|last|only)-(child|of-type)\n\t\t\t\t\t\tif ( simple ) {\n\t\t\t\t\t\t\twhile ( dir ) {\n\t\t\t\t\t\t\t\tnode = elem;\n\t\t\t\t\t\t\t\twhile ( (node = node[ dir ]) ) {\n\t\t\t\t\t\t\t\t\tif ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {\n\t\t\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// Reverse direction for :only-* (if we haven't yet done so)\n\t\t\t\t\t\t\t\tstart = dir = type === \"only\" && !start && \"nextSibling\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tstart = [ forward ? parent.firstChild : parent.lastChild ];\n\n\t\t\t\t\t\t// non-xml :nth-child(...) stores cache data on `parent`\n\t\t\t\t\t\tif ( forward && useCache ) {\n\t\t\t\t\t\t\t// Seek `elem` from a previously-cached index\n\t\t\t\t\t\t\touterCache = parent[ expando ] || (parent[ expando ] = {});\n\t\t\t\t\t\t\tcache = outerCache[ type ] || [];\n\t\t\t\t\t\t\tnodeIndex = cache[0] === dirruns && cache[1];\n\t\t\t\t\t\t\tdiff = cache[0] === dirruns && cache[2];\n\t\t\t\t\t\t\tnode = nodeIndex && parent.childNodes[ nodeIndex ];\n\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\n\t\t\t\t\t\t\t\t// Fallback to seeking `elem` from the start\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\t// When found, cache indexes on `parent` and break\n\t\t\t\t\t\t\t\tif ( node.nodeType === 1 && ++diff && node === elem ) {\n\t\t\t\t\t\t\t\t\touterCache[ type ] = [ dirruns, nodeIndex, diff ];\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Use previously-cached element index if available\n\t\t\t\t\t\t} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {\n\t\t\t\t\t\t\tdiff = cache[1];\n\n\t\t\t\t\t\t// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Use the same loop as above to seek `elem` from the start\n\t\t\t\t\t\t\twhile ( (node = ++nodeIndex && node && node[ dir ] ||\n\t\t\t\t\t\t\t\t(diff = nodeIndex = 0) || start.pop()) ) {\n\n\t\t\t\t\t\t\t\tif ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {\n\t\t\t\t\t\t\t\t\t// Cache the index of each encountered element\n\t\t\t\t\t\t\t\t\tif ( useCache ) {\n\t\t\t\t\t\t\t\t\t\t(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\tif ( node === elem ) {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Incorporate the offset, then check against cycle size\n\t\t\t\t\t\tdiff -= last;\n\t\t\t\t\t\treturn diff === first || ( diff % first === 0 && diff / first >= 0 );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t},\n\n\t\t\"PSEUDO\": function( pseudo, argument ) {\n\t\t\t// pseudo-class names are case-insensitive\n\t\t\t// http://www.w3.org/TR/selectors/#pseudo-classes\n\t\t\t// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters\n\t\t\t// Remember that setFilters inherits from pseudos\n\t\t\tvar args,\n\t\t\t\tfn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||\n\t\t\t\t\tSizzle.error( \"unsupported pseudo: \" + pseudo );\n\n\t\t\t// The user may use createPseudo to indicate that\n\t\t\t// arguments are needed to create the filter function\n\t\t\t// just as Sizzle does\n\t\t\tif ( fn[ expando ] ) {\n\t\t\t\treturn fn( argument );\n\t\t\t}\n\n\t\t\t// But maintain support for old signatures\n\t\t\tif ( fn.length > 1 ) {\n\t\t\t\targs = [ pseudo, pseudo, \"\", argument ];\n\t\t\t\treturn Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?\n\t\t\t\t\tmarkFunction(function( seed, matches ) {\n\t\t\t\t\t\tvar idx,\n\t\t\t\t\t\t\tmatched = fn( seed, argument ),\n\t\t\t\t\t\t\ti = matched.length;\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tidx = indexOf( seed, matched[i] );\n\t\t\t\t\t\t\tseed[ idx ] = !( matches[ idx ] = matched[i] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}) :\n\t\t\t\t\tfunction( elem ) {\n\t\t\t\t\t\treturn fn( elem, 0, args );\n\t\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn fn;\n\t\t}\n\t},\n\n\tpseudos: {\n\t\t// Potentially complex pseudos\n\t\t\"not\": markFunction(function( selector ) {\n\t\t\t// Trim the selector passed to compile\n\t\t\t// to avoid treating leading and trailing\n\t\t\t// spaces as combinators\n\t\t\tvar input = [],\n\t\t\t\tresults = [],\n\t\t\t\tmatcher = compile( selector.replace( rtrim, \"$1\" ) );\n\n\t\t\treturn matcher[ expando ] ?\n\t\t\t\tmarkFunction(function( seed, matches, context, xml ) {\n\t\t\t\t\tvar elem,\n\t\t\t\t\t\tunmatched = matcher( seed, null, xml, [] ),\n\t\t\t\t\t\ti = seed.length;\n\n\t\t\t\t\t// Match elements unmatched by `matcher`\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = unmatched[i]) ) {\n\t\t\t\t\t\t\tseed[i] = !(matches[i] = elem);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}) :\n\t\t\t\tfunction( elem, context, xml ) {\n\t\t\t\t\tinput[0] = elem;\n\t\t\t\t\tmatcher( input, null, xml, results );\n\t\t\t\t\t// Don't keep the element (issue #299)\n\t\t\t\t\tinput[0] = null;\n\t\t\t\t\treturn !results.pop();\n\t\t\t\t};\n\t\t}),\n\n\t\t\"has\": markFunction(function( selector ) {\n\t\t\treturn function( elem ) {\n\t\t\t\treturn Sizzle( selector, elem ).length > 0;\n\t\t\t};\n\t\t}),\n\n\t\t\"contains\": markFunction(function( text ) {\n\t\t\ttext = text.replace( runescape, funescape );\n\t\t\treturn function( elem ) {\n\t\t\t\treturn ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;\n\t\t\t};\n\t\t}),\n\n\t\t// \"Whether an element is represented by a :lang() selector\n\t\t// is based solely on the element's language value\n\t\t// being equal to the identifier C,\n\t\t// or beginning with the identifier C immediately followed by \"-\".\n\t\t// The matching of C against the element's language value is performed case-insensitively.\n\t\t// The identifier C does not have to be a valid language name.\"\n\t\t// http://www.w3.org/TR/selectors/#lang-pseudo\n\t\t\"lang\": markFunction( function( lang ) {\n\t\t\t// lang value must be a valid identifier\n\t\t\tif ( !ridentifier.test(lang || \"\") ) {\n\t\t\t\tSizzle.error( \"unsupported lang: \" + lang );\n\t\t\t}\n\t\t\tlang = lang.replace( runescape, funescape ).toLowerCase();\n\t\t\treturn function( elem ) {\n\t\t\t\tvar elemLang;\n\t\t\t\tdo {\n\t\t\t\t\tif ( (elemLang = documentIsHTML ?\n\t\t\t\t\t\telem.lang :\n\t\t\t\t\t\telem.getAttribute(\"xml:lang\") || elem.getAttribute(\"lang\")) ) {\n\n\t\t\t\t\t\telemLang = elemLang.toLowerCase();\n\t\t\t\t\t\treturn elemLang === lang || elemLang.indexOf( lang + \"-\" ) === 0;\n\t\t\t\t\t}\n\t\t\t\t} while ( (elem = elem.parentNode) && elem.nodeType === 1 );\n\t\t\t\treturn false;\n\t\t\t};\n\t\t}),\n\n\t\t// Miscellaneous\n\t\t\"target\": function( elem ) {\n\t\t\tvar hash = window.location && window.location.hash;\n\t\t\treturn hash && hash.slice( 1 ) === elem.id;\n\t\t},\n\n\t\t\"root\": function( elem ) {\n\t\t\treturn elem === docElem;\n\t\t},\n\n\t\t\"focus\": function( elem ) {\n\t\t\treturn elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);\n\t\t},\n\n\t\t// Boolean properties\n\t\t\"enabled\": function( elem ) {\n\t\t\treturn elem.disabled === false;\n\t\t},\n\n\t\t\"disabled\": function( elem ) {\n\t\t\treturn elem.disabled === true;\n\t\t},\n\n\t\t\"checked\": function( elem ) {\n\t\t\t// In CSS3, :checked should return both checked and selected elements\n\t\t\t// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked\n\t\t\tvar nodeName = elem.nodeName.toLowerCase();\n\t\t\treturn (nodeName === \"input\" && !!elem.checked) || (nodeName === \"option\" && !!elem.selected);\n\t\t},\n\n\t\t\"selected\": function( elem ) {\n\t\t\t// Accessing this property makes selected-by-default\n\t\t\t// options in Safari work properly\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\telem.parentNode.selectedIndex;\n\t\t\t}\n\n\t\t\treturn elem.selected === true;\n\t\t},\n\n\t\t// Contents\n\t\t\"empty\": function( elem ) {\n\t\t\t// http://www.w3.org/TR/selectors/#empty-pseudo\n\t\t\t// :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),\n\t\t\t//   but not by others (comment: 8; processing instruction: 7; etc.)\n\t\t\t// nodeType < 6 works because attributes (2) do not appear as children\n\t\t\tfor ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {\n\t\t\t\tif ( elem.nodeType < 6 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t},\n\n\t\t\"parent\": function( elem ) {\n\t\t\treturn !Expr.pseudos[\"empty\"]( elem );\n\t\t},\n\n\t\t// Element/input types\n\t\t\"header\": function( elem ) {\n\t\t\treturn rheader.test( elem.nodeName );\n\t\t},\n\n\t\t\"input\": function( elem ) {\n\t\t\treturn rinputs.test( elem.nodeName );\n\t\t},\n\n\t\t\"button\": function( elem ) {\n\t\t\tvar name = elem.nodeName.toLowerCase();\n\t\t\treturn name === \"input\" && elem.type === \"button\" || name === \"button\";\n\t\t},\n\n\t\t\"text\": function( elem ) {\n\t\t\tvar attr;\n\t\t\treturn elem.nodeName.toLowerCase() === \"input\" &&\n\t\t\t\telem.type === \"text\" &&\n\n\t\t\t\t// Support: IE<8\n\t\t\t\t// New HTML5 attribute values (e.g., \"search\") appear with elem.type === \"text\"\n\t\t\t\t( (attr = elem.getAttribute(\"type\")) == null || attr.toLowerCase() === \"text\" );\n\t\t},\n\n\t\t// Position-in-collection\n\t\t\"first\": createPositionalPseudo(function() {\n\t\t\treturn [ 0 ];\n\t\t}),\n\n\t\t\"last\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\treturn [ length - 1 ];\n\t\t}),\n\n\t\t\"eq\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\treturn [ argument < 0 ? argument + length : argument ];\n\t\t}),\n\n\t\t\"even\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"odd\": createPositionalPseudo(function( matchIndexes, length ) {\n\t\t\tvar i = 1;\n\t\t\tfor ( ; i < length; i += 2 ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"lt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; --i >= 0; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t}),\n\n\t\t\"gt\": createPositionalPseudo(function( matchIndexes, length, argument ) {\n\t\t\tvar i = argument < 0 ? argument + length : argument;\n\t\t\tfor ( ; ++i < length; ) {\n\t\t\t\tmatchIndexes.push( i );\n\t\t\t}\n\t\t\treturn matchIndexes;\n\t\t})\n\t}\n};\n\nExpr.pseudos[\"nth\"] = Expr.pseudos[\"eq\"];\n\n// Add button/input type pseudos\nfor ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {\n\tExpr.pseudos[ i ] = createInputPseudo( i );\n}\nfor ( i in { submit: true, reset: true } ) {\n\tExpr.pseudos[ i ] = createButtonPseudo( i );\n}\n\n// Easy API for creating new setFilters\nfunction setFilters() {}\nsetFilters.prototype = Expr.filters = Expr.pseudos;\nExpr.setFilters = new setFilters();\n\ntokenize = Sizzle.tokenize = function( selector, parseOnly ) {\n\tvar matched, match, tokens, type,\n\t\tsoFar, groups, preFilters,\n\t\tcached = tokenCache[ selector + \" \" ];\n\n\tif ( cached ) {\n\t\treturn parseOnly ? 0 : cached.slice( 0 );\n\t}\n\n\tsoFar = selector;\n\tgroups = [];\n\tpreFilters = Expr.preFilter;\n\n\twhile ( soFar ) {\n\n\t\t// Comma and first run\n\t\tif ( !matched || (match = rcomma.exec( soFar )) ) {\n\t\t\tif ( match ) {\n\t\t\t\t// Don't consume trailing commas as valid\n\t\t\t\tsoFar = soFar.slice( match[0].length ) || soFar;\n\t\t\t}\n\t\t\tgroups.push( (tokens = []) );\n\t\t}\n\n\t\tmatched = false;\n\n\t\t// Combinators\n\t\tif ( (match = rcombinators.exec( soFar )) ) {\n\t\t\tmatched = match.shift();\n\t\t\ttokens.push({\n\t\t\t\tvalue: matched,\n\t\t\t\t// Cast descendant combinators to space\n\t\t\t\ttype: match[0].replace( rtrim, \" \" )\n\t\t\t});\n\t\t\tsoFar = soFar.slice( matched.length );\n\t\t}\n\n\t\t// Filters\n\t\tfor ( type in Expr.filter ) {\n\t\t\tif ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||\n\t\t\t\t(match = preFilters[ type ]( match ))) ) {\n\t\t\t\tmatched = match.shift();\n\t\t\t\ttokens.push({\n\t\t\t\t\tvalue: matched,\n\t\t\t\t\ttype: type,\n\t\t\t\t\tmatches: match\n\t\t\t\t});\n\t\t\t\tsoFar = soFar.slice( matched.length );\n\t\t\t}\n\t\t}\n\n\t\tif ( !matched ) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t// Return the length of the invalid excess\n\t// if we're just parsing\n\t// Otherwise, throw an error or return tokens\n\treturn parseOnly ?\n\t\tsoFar.length :\n\t\tsoFar ?\n\t\t\tSizzle.error( selector ) :\n\t\t\t// Cache the tokens\n\t\t\ttokenCache( selector, groups ).slice( 0 );\n};\n\nfunction toSelector( tokens ) {\n\tvar i = 0,\n\t\tlen = tokens.length,\n\t\tselector = \"\";\n\tfor ( ; i < len; i++ ) {\n\t\tselector += tokens[i].value;\n\t}\n\treturn selector;\n}\n\nfunction addCombinator( matcher, combinator, base ) {\n\tvar dir = combinator.dir,\n\t\tcheckNonElements = base && dir === \"parentNode\",\n\t\tdoneName = done++;\n\n\treturn combinator.first ?\n\t\t// Check against closest ancestor/preceding element\n\t\tfunction( elem, context, xml ) {\n\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\treturn matcher( elem, context, xml );\n\t\t\t\t}\n\t\t\t}\n\t\t} :\n\n\t\t// Check against all ancestor/preceding elements\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar oldCache, outerCache,\n\t\t\t\tnewCache = [ dirruns, doneName ];\n\n\t\t\t// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching\n\t\t\tif ( xml ) {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ( (elem = elem[ dir ]) ) {\n\t\t\t\t\tif ( elem.nodeType === 1 || checkNonElements ) {\n\t\t\t\t\t\touterCache = elem[ expando ] || (elem[ expando ] = {});\n\t\t\t\t\t\tif ( (oldCache = outerCache[ dir ]) &&\n\t\t\t\t\t\t\toldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {\n\n\t\t\t\t\t\t\t// Assign to newCache so results back-propagate to previous elements\n\t\t\t\t\t\t\treturn (newCache[ 2 ] = oldCache[ 2 ]);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Reuse newcache so results back-propagate to previous elements\n\t\t\t\t\t\t\touterCache[ dir ] = newCache;\n\n\t\t\t\t\t\t\t// A match means we're done; a fail means we have to keep checking\n\t\t\t\t\t\t\tif ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n}\n\nfunction elementMatcher( matchers ) {\n\treturn matchers.length > 1 ?\n\t\tfunction( elem, context, xml ) {\n\t\t\tvar i = matchers.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( !matchers[i]( elem, context, xml ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} :\n\t\tmatchers[0];\n}\n\nfunction multipleContexts( selector, contexts, results ) {\n\tvar i = 0,\n\t\tlen = contexts.length;\n\tfor ( ; i < len; i++ ) {\n\t\tSizzle( selector, contexts[i], results );\n\t}\n\treturn results;\n}\n\nfunction condense( unmatched, map, filter, context, xml ) {\n\tvar elem,\n\t\tnewUnmatched = [],\n\t\ti = 0,\n\t\tlen = unmatched.length,\n\t\tmapped = map != null;\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (elem = unmatched[i]) ) {\n\t\t\tif ( !filter || filter( elem, context, xml ) ) {\n\t\t\t\tnewUnmatched.push( elem );\n\t\t\t\tif ( mapped ) {\n\t\t\t\t\tmap.push( i );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn newUnmatched;\n}\n\nfunction setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {\n\tif ( postFilter && !postFilter[ expando ] ) {\n\t\tpostFilter = setMatcher( postFilter );\n\t}\n\tif ( postFinder && !postFinder[ expando ] ) {\n\t\tpostFinder = setMatcher( postFinder, postSelector );\n\t}\n\treturn markFunction(function( seed, results, context, xml ) {\n\t\tvar temp, i, elem,\n\t\t\tpreMap = [],\n\t\t\tpostMap = [],\n\t\t\tpreexisting = results.length,\n\n\t\t\t// Get initial elements from seed or context\n\t\t\telems = seed || multipleContexts( selector || \"*\", context.nodeType ? [ context ] : context, [] ),\n\n\t\t\t// Prefilter to get matcher input, preserving a map for seed-results synchronization\n\t\t\tmatcherIn = preFilter && ( seed || !selector ) ?\n\t\t\t\tcondense( elems, preMap, preFilter, context, xml ) :\n\t\t\t\telems,\n\n\t\t\tmatcherOut = matcher ?\n\t\t\t\t// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,\n\t\t\t\tpostFinder || ( seed ? preFilter : preexisting || postFilter ) ?\n\n\t\t\t\t\t// ...intermediate processing is necessary\n\t\t\t\t\t[] :\n\n\t\t\t\t\t// ...otherwise use results directly\n\t\t\t\t\tresults :\n\t\t\t\tmatcherIn;\n\n\t\t// Find primary matches\n\t\tif ( matcher ) {\n\t\t\tmatcher( matcherIn, matcherOut, context, xml );\n\t\t}\n\n\t\t// Apply postFilter\n\t\tif ( postFilter ) {\n\t\t\ttemp = condense( matcherOut, postMap );\n\t\t\tpostFilter( temp, [], context, xml );\n\n\t\t\t// Un-match failing elements by moving them back to matcherIn\n\t\t\ti = temp.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tif ( (elem = temp[i]) ) {\n\t\t\t\t\tmatcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( seed ) {\n\t\t\tif ( postFinder || preFilter ) {\n\t\t\t\tif ( postFinder ) {\n\t\t\t\t\t// Get the final matcherOut by condensing this intermediate into postFinder contexts\n\t\t\t\t\ttemp = [];\n\t\t\t\t\ti = matcherOut.length;\n\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\tif ( (elem = matcherOut[i]) ) {\n\t\t\t\t\t\t\t// Restore matcherIn since elem is not yet a final match\n\t\t\t\t\t\t\ttemp.push( (matcherIn[i] = elem) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tpostFinder( null, (matcherOut = []), temp, xml );\n\t\t\t\t}\n\n\t\t\t\t// Move matched elements from seed to results to keep them synchronized\n\t\t\t\ti = matcherOut.length;\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\tif ( (elem = matcherOut[i]) &&\n\t\t\t\t\t\t(temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {\n\n\t\t\t\t\t\tseed[temp] = !(results[temp] = elem);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t// Add elements to results, through postFinder if defined\n\t\t} else {\n\t\t\tmatcherOut = condense(\n\t\t\t\tmatcherOut === results ?\n\t\t\t\t\tmatcherOut.splice( preexisting, matcherOut.length ) :\n\t\t\t\t\tmatcherOut\n\t\t\t);\n\t\t\tif ( postFinder ) {\n\t\t\t\tpostFinder( null, results, matcherOut, xml );\n\t\t\t} else {\n\t\t\t\tpush.apply( results, matcherOut );\n\t\t\t}\n\t\t}\n\t});\n}\n\nfunction matcherFromTokens( tokens ) {\n\tvar checkContext, matcher, j,\n\t\tlen = tokens.length,\n\t\tleadingRelative = Expr.relative[ tokens[0].type ],\n\t\timplicitRelative = leadingRelative || Expr.relative[\" \"],\n\t\ti = leadingRelative ? 1 : 0,\n\n\t\t// The foundational matcher ensures that elements are reachable from top-level context(s)\n\t\tmatchContext = addCombinator( function( elem ) {\n\t\t\treturn elem === checkContext;\n\t\t}, implicitRelative, true ),\n\t\tmatchAnyContext = addCombinator( function( elem ) {\n\t\t\treturn indexOf( checkContext, elem ) > -1;\n\t\t}, implicitRelative, true ),\n\t\tmatchers = [ function( elem, context, xml ) {\n\t\t\tvar ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (\n\t\t\t\t(checkContext = context).nodeType ?\n\t\t\t\t\tmatchContext( elem, context, xml ) :\n\t\t\t\t\tmatchAnyContext( elem, context, xml ) );\n\t\t\t// Avoid hanging onto element (issue #299)\n\t\t\tcheckContext = null;\n\t\t\treturn ret;\n\t\t} ];\n\n\tfor ( ; i < len; i++ ) {\n\t\tif ( (matcher = Expr.relative[ tokens[i].type ]) ) {\n\t\t\tmatchers = [ addCombinator(elementMatcher( matchers ), matcher) ];\n\t\t} else {\n\t\t\tmatcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );\n\n\t\t\t// Return special upon seeing a positional matcher\n\t\t\tif ( matcher[ expando ] ) {\n\t\t\t\t// Find the next relative operator (if any) for proper handling\n\t\t\t\tj = ++i;\n\t\t\t\tfor ( ; j < len; j++ ) {\n\t\t\t\t\tif ( Expr.relative[ tokens[j].type ] ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn setMatcher(\n\t\t\t\t\ti > 1 && elementMatcher( matchers ),\n\t\t\t\t\ti > 1 && toSelector(\n\t\t\t\t\t\t// If the preceding token was a descendant combinator, insert an implicit any-element `*`\n\t\t\t\t\t\ttokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === \" \" ? \"*\" : \"\" })\n\t\t\t\t\t).replace( rtrim, \"$1\" ),\n\t\t\t\t\tmatcher,\n\t\t\t\t\ti < j && matcherFromTokens( tokens.slice( i, j ) ),\n\t\t\t\t\tj < len && matcherFromTokens( (tokens = tokens.slice( j )) ),\n\t\t\t\t\tj < len && toSelector( tokens )\n\t\t\t\t);\n\t\t\t}\n\t\t\tmatchers.push( matcher );\n\t\t}\n\t}\n\n\treturn elementMatcher( matchers );\n}\n\nfunction matcherFromGroupMatchers( elementMatchers, setMatchers ) {\n\tvar bySet = setMatchers.length > 0,\n\t\tbyElement = elementMatchers.length > 0,\n\t\tsuperMatcher = function( seed, context, xml, results, outermost ) {\n\t\t\tvar elem, j, matcher,\n\t\t\t\tmatchedCount = 0,\n\t\t\t\ti = \"0\",\n\t\t\t\tunmatched = seed && [],\n\t\t\t\tsetMatched = [],\n\t\t\t\tcontextBackup = outermostContext,\n\t\t\t\t// We must always have either seed elements or outermost context\n\t\t\t\telems = seed || byElement && Expr.find[\"TAG\"]( \"*\", outermost ),\n\t\t\t\t// Use integer dirruns iff this is the outermost matcher\n\t\t\t\tdirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),\n\t\t\t\tlen = elems.length;\n\n\t\t\tif ( outermost ) {\n\t\t\t\toutermostContext = context !== document && context;\n\t\t\t}\n\n\t\t\t// Add elements passing elementMatchers directly to results\n\t\t\t// Keep `i` a string if there are no elements so `matchedCount` will be \"00\" below\n\t\t\t// Support: IE<9, Safari\n\t\t\t// Tolerate NodeList properties (IE: \"length\"; Safari: <number>) matching elements by id\n\t\t\tfor ( ; i !== len && (elem = elems[i]) != null; i++ ) {\n\t\t\t\tif ( byElement && elem ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( (matcher = elementMatchers[j++]) ) {\n\t\t\t\t\t\tif ( matcher( elem, context, xml ) ) {\n\t\t\t\t\t\t\tresults.push( elem );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( outermost ) {\n\t\t\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Track unmatched elements for set filters\n\t\t\t\tif ( bySet ) {\n\t\t\t\t\t// They will have gone through all possible matchers\n\t\t\t\t\tif ( (elem = !matcher && elem) ) {\n\t\t\t\t\t\tmatchedCount--;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Lengthen the array for every element, matched or not\n\t\t\t\t\tif ( seed ) {\n\t\t\t\t\t\tunmatched.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Apply set filters to unmatched elements\n\t\t\tmatchedCount += i;\n\t\t\tif ( bySet && i !== matchedCount ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (matcher = setMatchers[j++]) ) {\n\t\t\t\t\tmatcher( unmatched, setMatched, context, xml );\n\t\t\t\t}\n\n\t\t\t\tif ( seed ) {\n\t\t\t\t\t// Reintegrate element matches to eliminate the need for sorting\n\t\t\t\t\tif ( matchedCount > 0 ) {\n\t\t\t\t\t\twhile ( i-- ) {\n\t\t\t\t\t\t\tif ( !(unmatched[i] || setMatched[i]) ) {\n\t\t\t\t\t\t\t\tsetMatched[i] = pop.call( results );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Discard index placeholder values to get only actual matches\n\t\t\t\t\tsetMatched = condense( setMatched );\n\t\t\t\t}\n\n\t\t\t\t// Add matches to results\n\t\t\t\tpush.apply( results, setMatched );\n\n\t\t\t\t// Seedless set matches succeeding multiple successful matchers stipulate sorting\n\t\t\t\tif ( outermost && !seed && setMatched.length > 0 &&\n\t\t\t\t\t( matchedCount + setMatchers.length ) > 1 ) {\n\n\t\t\t\t\tSizzle.uniqueSort( results );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Override manipulation of globals by nested matchers\n\t\t\tif ( outermost ) {\n\t\t\t\tdirruns = dirrunsUnique;\n\t\t\t\toutermostContext = contextBackup;\n\t\t\t}\n\n\t\t\treturn unmatched;\n\t\t};\n\n\treturn bySet ?\n\t\tmarkFunction( superMatcher ) :\n\t\tsuperMatcher;\n}\n\ncompile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {\n\tvar i,\n\t\tsetMatchers = [],\n\t\telementMatchers = [],\n\t\tcached = compilerCache[ selector + \" \" ];\n\n\tif ( !cached ) {\n\t\t// Generate a function of recursive functions that can be used to check each element\n\t\tif ( !match ) {\n\t\t\tmatch = tokenize( selector );\n\t\t}\n\t\ti = match.length;\n\t\twhile ( i-- ) {\n\t\t\tcached = matcherFromTokens( match[i] );\n\t\t\tif ( cached[ expando ] ) {\n\t\t\t\tsetMatchers.push( cached );\n\t\t\t} else {\n\t\t\t\telementMatchers.push( cached );\n\t\t\t}\n\t\t}\n\n\t\t// Cache the compiled function\n\t\tcached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );\n\n\t\t// Save selector and tokenization\n\t\tcached.selector = selector;\n\t}\n\treturn cached;\n};\n\n/**\n * A low-level selection function that works with Sizzle's compiled\n *  selector functions\n * @param {String|Function} selector A selector or a pre-compiled\n *  selector function built with Sizzle.compile\n * @param {Element} context\n * @param {Array} [results]\n * @param {Array} [seed] A set of elements to match against\n */\nselect = Sizzle.select = function( selector, context, results, seed ) {\n\tvar i, tokens, token, type, find,\n\t\tcompiled = typeof selector === \"function\" && selector,\n\t\tmatch = !seed && tokenize( (selector = compiled.selector || selector) );\n\n\tresults = results || [];\n\n\t// Try to minimize operations if there is no seed and only one group\n\tif ( match.length === 1 ) {\n\n\t\t// Take a shortcut and set the context if the root selector is an ID\n\t\ttokens = match[0] = match[0].slice( 0 );\n\t\tif ( tokens.length > 2 && (token = tokens[0]).type === \"ID\" &&\n\t\t\t\tsupport.getById && context.nodeType === 9 && documentIsHTML &&\n\t\t\t\tExpr.relative[ tokens[1].type ] ) {\n\n\t\t\tcontext = ( Expr.find[\"ID\"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];\n\t\t\tif ( !context ) {\n\t\t\t\treturn results;\n\n\t\t\t// Precompiled matchers will still verify ancestry, so step up a level\n\t\t\t} else if ( compiled ) {\n\t\t\t\tcontext = context.parentNode;\n\t\t\t}\n\n\t\t\tselector = selector.slice( tokens.shift().value.length );\n\t\t}\n\n\t\t// Fetch a seed set for right-to-left matching\n\t\ti = matchExpr[\"needsContext\"].test( selector ) ? 0 : tokens.length;\n\t\twhile ( i-- ) {\n\t\t\ttoken = tokens[i];\n\n\t\t\t// Abort if we hit a combinator\n\t\t\tif ( Expr.relative[ (type = token.type) ] ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( (find = Expr.find[ type ]) ) {\n\t\t\t\t// Search, expanding context for leading sibling combinators\n\t\t\t\tif ( (seed = find(\n\t\t\t\t\ttoken.matches[0].replace( runescape, funescape ),\n\t\t\t\t\trsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context\n\t\t\t\t)) ) {\n\n\t\t\t\t\t// If seed is empty or no tokens remain, we can return early\n\t\t\t\t\ttokens.splice( i, 1 );\n\t\t\t\t\tselector = seed.length && toSelector( tokens );\n\t\t\t\t\tif ( !selector ) {\n\t\t\t\t\t\tpush.apply( results, seed );\n\t\t\t\t\t\treturn results;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// Compile and execute a filtering function if one is not provided\n\t// Provide `match` to avoid retokenization if we modified the selector above\n\t( compiled || compile( selector, match ) )(\n\t\tseed,\n\t\tcontext,\n\t\t!documentIsHTML,\n\t\tresults,\n\t\trsibling.test( selector ) && testContext( context.parentNode ) || context\n\t);\n\treturn results;\n};\n\n// One-time assignments\n\n// Sort stability\nsupport.sortStable = expando.split(\"\").sort( sortOrder ).join(\"\") === expando;\n\n// Support: Chrome 14-35+\n// Always assume duplicates if they aren't passed to the comparison function\nsupport.detectDuplicates = !!hasDuplicate;\n\n// Initialize against the default document\nsetDocument();\n\n// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)\n// Detached nodes confoundingly follow *each other*\nsupport.sortDetached = assert(function( div1 ) {\n\t// Should return 1, but returns 4 (following)\n\treturn div1.compareDocumentPosition( document.createElement(\"div\") ) & 1;\n});\n\n// Support: IE<8\n// Prevent attribute/property \"interpolation\"\n// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx\nif ( !assert(function( div ) {\n\tdiv.innerHTML = \"<a href='#'></a>\";\n\treturn div.firstChild.getAttribute(\"href\") === \"#\" ;\n}) ) {\n\taddHandle( \"type|href|height|width\", function( elem, name, isXML ) {\n\t\tif ( !isXML ) {\n\t\t\treturn elem.getAttribute( name, name.toLowerCase() === \"type\" ? 1 : 2 );\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use defaultValue in place of getAttribute(\"value\")\nif ( !support.attributes || !assert(function( div ) {\n\tdiv.innerHTML = \"<input/>\";\n\tdiv.firstChild.setAttribute( \"value\", \"\" );\n\treturn div.firstChild.getAttribute( \"value\" ) === \"\";\n}) ) {\n\taddHandle( \"value\", function( elem, name, isXML ) {\n\t\tif ( !isXML && elem.nodeName.toLowerCase() === \"input\" ) {\n\t\t\treturn elem.defaultValue;\n\t\t}\n\t});\n}\n\n// Support: IE<9\n// Use getAttributeNode to fetch booleans when getAttribute lies\nif ( !assert(function( div ) {\n\treturn div.getAttribute(\"disabled\") == null;\n}) ) {\n\taddHandle( booleans, function( elem, name, isXML ) {\n\t\tvar val;\n\t\tif ( !isXML ) {\n\t\t\treturn elem[ name ] === true ? name.toLowerCase() :\n\t\t\t\t\t(val = elem.getAttributeNode( name )) && val.specified ?\n\t\t\t\t\tval.value :\n\t\t\t\tnull;\n\t\t}\n\t});\n}\n\nreturn Sizzle;\n\n})( window );\n\n\n\njQuery.find = Sizzle;\njQuery.expr = Sizzle.selectors;\njQuery.expr[\":\"] = jQuery.expr.pseudos;\njQuery.unique = Sizzle.uniqueSort;\njQuery.text = Sizzle.getText;\njQuery.isXMLDoc = Sizzle.isXML;\njQuery.contains = Sizzle.contains;\n\n\n\nvar rneedsContext = jQuery.expr.match.needsContext;\n\nvar rsingleTag = (/^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/);\n\n\n\nvar risSimple = /^.[^:#\\[\\.,]*$/;\n\n// Implement the identical functionality for filter and not\nfunction winnow( elements, qualifier, not ) {\n\tif ( jQuery.isFunction( qualifier ) ) {\n\t\treturn jQuery.grep( elements, function( elem, i ) {\n\t\t\t/* jshint -W018 */\n\t\t\treturn !!qualifier.call( elem, i, elem ) !== not;\n\t\t});\n\n\t}\n\n\tif ( qualifier.nodeType ) {\n\t\treturn jQuery.grep( elements, function( elem ) {\n\t\t\treturn ( elem === qualifier ) !== not;\n\t\t});\n\n\t}\n\n\tif ( typeof qualifier === \"string\" ) {\n\t\tif ( risSimple.test( qualifier ) ) {\n\t\t\treturn jQuery.filter( qualifier, elements, not );\n\t\t}\n\n\t\tqualifier = jQuery.filter( qualifier, elements );\n\t}\n\n\treturn jQuery.grep( elements, function( elem ) {\n\t\treturn ( indexOf.call( qualifier, elem ) >= 0 ) !== not;\n\t});\n}\n\njQuery.filter = function( expr, elems, not ) {\n\tvar elem = elems[ 0 ];\n\n\tif ( not ) {\n\t\texpr = \":not(\" + expr + \")\";\n\t}\n\n\treturn elems.length === 1 && elem.nodeType === 1 ?\n\t\tjQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :\n\t\tjQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {\n\t\t\treturn elem.nodeType === 1;\n\t\t}));\n};\n\njQuery.fn.extend({\n\tfind: function( selector ) {\n\t\tvar i,\n\t\t\tlen = this.length,\n\t\t\tret = [],\n\t\t\tself = this;\n\n\t\tif ( typeof selector !== \"string\" ) {\n\t\t\treturn this.pushStack( jQuery( selector ).filter(function() {\n\t\t\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( jQuery.contains( self[ i ], this ) ) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}) );\n\t\t}\n\n\t\tfor ( i = 0; i < len; i++ ) {\n\t\t\tjQuery.find( selector, self[ i ], ret );\n\t\t}\n\n\t\t// Needed because $( selector, context ) becomes $( context ).find( selector )\n\t\tret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );\n\t\tret.selector = this.selector ? this.selector + \" \" + selector : selector;\n\t\treturn ret;\n\t},\n\tfilter: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector || [], false) );\n\t},\n\tnot: function( selector ) {\n\t\treturn this.pushStack( winnow(this, selector || [], true) );\n\t},\n\tis: function( selector ) {\n\t\treturn !!winnow(\n\t\t\tthis,\n\n\t\t\t// If this is a positional/relative selector, check membership in the returned set\n\t\t\t// so $(\"p:first\").is(\"p:last\") won't return true for a doc with two \"p\".\n\t\t\ttypeof selector === \"string\" && rneedsContext.test( selector ) ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tselector || [],\n\t\t\tfalse\n\t\t).length;\n\t}\n});\n\n\n// Initialize a jQuery object\n\n\n// A central reference to the root jQuery(document)\nvar rootjQuery,\n\n\t// A simple way to check for HTML strings\n\t// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)\n\t// Strict HTML recognition (#11290: must start with <)\n\trquickExpr = /^(?:\\s*(<[\\w\\W]+>)[^>]*|#([\\w-]*))$/,\n\n\tinit = jQuery.fn.init = function( selector, context ) {\n\t\tvar match, elem;\n\n\t\t// HANDLE: $(\"\"), $(null), $(undefined), $(false)\n\t\tif ( !selector ) {\n\t\t\treturn this;\n\t\t}\n\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\tif ( selector[0] === \"<\" && selector[ selector.length - 1 ] === \">\" && selector.length >= 3 ) {\n\t\t\t\t// Assume that strings that start and end with <> are HTML and skip the regex check\n\t\t\t\tmatch = [ null, selector, null ];\n\n\t\t\t} else {\n\t\t\t\tmatch = rquickExpr.exec( selector );\n\t\t\t}\n\n\t\t\t// Match html or make sure no context is specified for #id\n\t\t\tif ( match && (match[1] || !context) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[1] ) {\n\t\t\t\t\tcontext = context instanceof jQuery ? context[0] : context;\n\n\t\t\t\t\t// Option to run scripts is true for back-compat\n\t\t\t\t\t// Intentionally let the error be thrown if parseHTML is not present\n\t\t\t\t\tjQuery.merge( this, jQuery.parseHTML(\n\t\t\t\t\t\tmatch[1],\n\t\t\t\t\t\tcontext && context.nodeType ? context.ownerDocument || context : document,\n\t\t\t\t\t\ttrue\n\t\t\t\t\t) );\n\n\t\t\t\t\t// HANDLE: $(html, props)\n\t\t\t\t\tif ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {\n\t\t\t\t\t\tfor ( match in context ) {\n\t\t\t\t\t\t\t// Properties of context are called as methods if possible\n\t\t\t\t\t\t\tif ( jQuery.isFunction( this[ match ] ) ) {\n\t\t\t\t\t\t\t\tthis[ match ]( context[ match ] );\n\n\t\t\t\t\t\t\t// ...and otherwise set as attributes\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.attr( match, context[ match ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this;\n\n\t\t\t\t// HANDLE: $(#id)\n\t\t\t\t} else {\n\t\t\t\t\telem = document.getElementById( match[2] );\n\n\t\t\t\t\t// Support: Blackberry 4.6\n\t\t\t\t\t// gEBID returns nodes no longer in the document (#6963)\n\t\t\t\t\tif ( elem && elem.parentNode ) {\n\t\t\t\t\t\t// Inject the element directly into the jQuery object\n\t\t\t\t\t\tthis.length = 1;\n\t\t\t\t\t\tthis[0] = elem;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.context = document;\n\t\t\t\t\tthis.selector = selector;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, $(...))\n\t\t\t} else if ( !context || context.jquery ) {\n\t\t\t\treturn ( context || rootjQuery ).find( selector );\n\n\t\t\t// HANDLE: $(expr, context)\n\t\t\t// (which is just equivalent to: $(context).find(expr)\n\t\t\t} else {\n\t\t\t\treturn this.constructor( context ).find( selector );\n\t\t\t}\n\n\t\t// HANDLE: $(DOMElement)\n\t\t} else if ( selector.nodeType ) {\n\t\t\tthis.context = this[0] = selector;\n\t\t\tthis.length = 1;\n\t\t\treturn this;\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) ) {\n\t\t\treturn typeof rootjQuery.ready !== \"undefined\" ?\n\t\t\t\trootjQuery.ready( selector ) :\n\t\t\t\t// Execute immediately if ready is not present\n\t\t\t\tselector( jQuery );\n\t\t}\n\n\t\tif ( selector.selector !== undefined ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn jQuery.makeArray( selector, this );\n\t};\n\n// Give the init function the jQuery prototype for later instantiation\ninit.prototype = jQuery.fn;\n\n// Initialize central reference\nrootjQuery = jQuery( document );\n\n\nvar rparentsprev = /^(?:parents|prev(?:Until|All))/,\n\t// Methods guaranteed to produce a unique set when starting from a unique set\n\tguaranteedUnique = {\n\t\tchildren: true,\n\t\tcontents: true,\n\t\tnext: true,\n\t\tprev: true\n\t};\n\njQuery.extend({\n\tdir: function( elem, dir, until ) {\n\t\tvar matched = [],\n\t\t\ttruncate = until !== undefined;\n\n\t\twhile ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\tif ( truncate && jQuery( elem ).is( until ) ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tmatched.push( elem );\n\t\t\t}\n\t\t}\n\t\treturn matched;\n\t},\n\n\tsibling: function( n, elem ) {\n\t\tvar matched = [];\n\n\t\tfor ( ; n; n = n.nextSibling ) {\n\t\t\tif ( n.nodeType === 1 && n !== elem ) {\n\t\t\t\tmatched.push( n );\n\t\t\t}\n\t\t}\n\n\t\treturn matched;\n\t}\n});\n\njQuery.fn.extend({\n\thas: function( target ) {\n\t\tvar targets = jQuery( target, this ),\n\t\t\tl = targets.length;\n\n\t\treturn this.filter(function() {\n\t\t\tvar i = 0;\n\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\tif ( jQuery.contains( this, targets[i] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t},\n\n\tclosest: function( selectors, context ) {\n\t\tvar cur,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tmatched = [],\n\t\t\tpos = rneedsContext.test( selectors ) || typeof selectors !== \"string\" ?\n\t\t\t\tjQuery( selectors, context || this.context ) :\n\t\t\t\t0;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tfor ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {\n\t\t\t\t// Always skip document fragments\n\t\t\t\tif ( cur.nodeType < 11 && (pos ?\n\t\t\t\t\tpos.index(cur) > -1 :\n\n\t\t\t\t\t// Don't pass non-elements to Sizzle\n\t\t\t\t\tcur.nodeType === 1 &&\n\t\t\t\t\t\tjQuery.find.matchesSelector(cur, selectors)) ) {\n\n\t\t\t\t\tmatched.push( cur );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched );\n\t},\n\n\t// Determine the position of an element within the set\n\tindex: function( elem ) {\n\n\t\t// No argument, return index in parent\n\t\tif ( !elem ) {\n\t\t\treturn ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;\n\t\t}\n\n\t\t// Index in selector\n\t\tif ( typeof elem === \"string\" ) {\n\t\t\treturn indexOf.call( jQuery( elem ), this[ 0 ] );\n\t\t}\n\n\t\t// Locate the position of the desired element\n\t\treturn indexOf.call( this,\n\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem.jquery ? elem[ 0 ] : elem\n\t\t);\n\t},\n\n\tadd: function( selector, context ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.unique(\n\t\t\t\tjQuery.merge( this.get(), jQuery( selector, context ) )\n\t\t\t)\n\t\t);\n\t},\n\n\taddBack: function( selector ) {\n\t\treturn this.add( selector == null ?\n\t\t\tthis.prevObject : this.prevObject.filter(selector)\n\t\t);\n\t}\n});\n\nfunction sibling( cur, dir ) {\n\twhile ( (cur = cur[dir]) && cur.nodeType !== 1 ) {}\n\treturn cur;\n}\n\njQuery.each({\n\tparent: function( elem ) {\n\t\tvar parent = elem.parentNode;\n\t\treturn parent && parent.nodeType !== 11 ? parent : null;\n\t},\n\tparents: function( elem ) {\n\t\treturn jQuery.dir( elem, \"parentNode\" );\n\t},\n\tparentsUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"parentNode\", until );\n\t},\n\tnext: function( elem ) {\n\t\treturn sibling( elem, \"nextSibling\" );\n\t},\n\tprev: function( elem ) {\n\t\treturn sibling( elem, \"previousSibling\" );\n\t},\n\tnextAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\" );\n\t},\n\tprevAll: function( elem ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\" );\n\t},\n\tnextUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"nextSibling\", until );\n\t},\n\tprevUntil: function( elem, i, until ) {\n\t\treturn jQuery.dir( elem, \"previousSibling\", until );\n\t},\n\tsiblings: function( elem ) {\n\t\treturn jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );\n\t},\n\tchildren: function( elem ) {\n\t\treturn jQuery.sibling( elem.firstChild );\n\t},\n\tcontents: function( elem ) {\n\t\treturn elem.contentDocument || jQuery.merge( [], elem.childNodes );\n\t}\n}, function( name, fn ) {\n\tjQuery.fn[ name ] = function( until, selector ) {\n\t\tvar matched = jQuery.map( this, fn, until );\n\n\t\tif ( name.slice( -5 ) !== \"Until\" ) {\n\t\t\tselector = until;\n\t\t}\n\n\t\tif ( selector && typeof selector === \"string\" ) {\n\t\t\tmatched = jQuery.filter( selector, matched );\n\t\t}\n\n\t\tif ( this.length > 1 ) {\n\t\t\t// Remove duplicates\n\t\t\tif ( !guaranteedUnique[ name ] ) {\n\t\t\t\tjQuery.unique( matched );\n\t\t\t}\n\n\t\t\t// Reverse order for parents* and prev-derivatives\n\t\t\tif ( rparentsprev.test( name ) ) {\n\t\t\t\tmatched.reverse();\n\t\t\t}\n\t\t}\n\n\t\treturn this.pushStack( matched );\n\t};\n});\nvar rnotwhite = (/\\S+/g);\n\n\n\n// String to Object options format cache\nvar optionsCache = {};\n\n// Convert String-formatted options into Object-formatted ones and store in cache\nfunction createOptions( options ) {\n\tvar object = optionsCache[ options ] = {};\n\tjQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {\n\t\tobject[ flag ] = true;\n\t});\n\treturn object;\n}\n\n/*\n * Create a callback list using the following parameters:\n *\n *\toptions: an optional list of space-separated options that will change how\n *\t\t\tthe callback list behaves or a more traditional option object\n *\n * By default a callback list will act like an event callback list and can be\n * \"fired\" multiple times.\n *\n * Possible options:\n *\n *\tonce:\t\t\twill ensure the callback list can only be fired once (like a Deferred)\n *\n *\tmemory:\t\t\twill keep track of previous values and will call any callback added\n *\t\t\t\t\tafter the list has been fired right away with the latest \"memorized\"\n *\t\t\t\t\tvalues (like a Deferred)\n *\n *\tunique:\t\t\twill ensure a callback can only be added once (no duplicate in the list)\n *\n *\tstopOnFalse:\tinterrupt callings when a callback returns false\n *\n */\njQuery.Callbacks = function( options ) {\n\n\t// Convert options from String-formatted to Object-formatted if needed\n\t// (we check in cache first)\n\toptions = typeof options === \"string\" ?\n\t\t( optionsCache[ options ] || createOptions( options ) ) :\n\t\tjQuery.extend( {}, options );\n\n\tvar // Last fire value (for non-forgettable lists)\n\t\tmemory,\n\t\t// Flag to know if list was already fired\n\t\tfired,\n\t\t// Flag to know if list is currently firing\n\t\tfiring,\n\t\t// First callback to fire (used internally by add and fireWith)\n\t\tfiringStart,\n\t\t// End of the loop when firing\n\t\tfiringLength,\n\t\t// Index of currently firing callback (modified by remove if needed)\n\t\tfiringIndex,\n\t\t// Actual callback list\n\t\tlist = [],\n\t\t// Stack of fire calls for repeatable lists\n\t\tstack = !options.once && [],\n\t\t// Fire callbacks\n\t\tfire = function( data ) {\n\t\t\tmemory = options.memory && data;\n\t\t\tfired = true;\n\t\t\tfiringIndex = firingStart || 0;\n\t\t\tfiringStart = 0;\n\t\t\tfiringLength = list.length;\n\t\t\tfiring = true;\n\t\t\tfor ( ; list && firingIndex < firingLength; firingIndex++ ) {\n\t\t\t\tif ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {\n\t\t\t\t\tmemory = false; // To prevent further calls using add\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfiring = false;\n\t\t\tif ( list ) {\n\t\t\t\tif ( stack ) {\n\t\t\t\t\tif ( stack.length ) {\n\t\t\t\t\t\tfire( stack.shift() );\n\t\t\t\t\t}\n\t\t\t\t} else if ( memory ) {\n\t\t\t\t\tlist = [];\n\t\t\t\t} else {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\t// Actual Callbacks object\n\t\tself = {\n\t\t\t// Add a callback or a collection of callbacks to the list\n\t\t\tadd: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\t// First, we save the current length\n\t\t\t\t\tvar start = list.length;\n\t\t\t\t\t(function add( args ) {\n\t\t\t\t\t\tjQuery.each( args, function( _, arg ) {\n\t\t\t\t\t\t\tvar type = jQuery.type( arg );\n\t\t\t\t\t\t\tif ( type === \"function\" ) {\n\t\t\t\t\t\t\t\tif ( !options.unique || !self.has( arg ) ) {\n\t\t\t\t\t\t\t\t\tlist.push( arg );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( arg && arg.length && type !== \"string\" ) {\n\t\t\t\t\t\t\t\t// Inspect recursively\n\t\t\t\t\t\t\t\tadd( arg );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t})( arguments );\n\t\t\t\t\t// Do we need to add the callbacks to the\n\t\t\t\t\t// current firing batch?\n\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\tfiringLength = list.length;\n\t\t\t\t\t// With memory, if we're not firing then\n\t\t\t\t\t// we should call right away\n\t\t\t\t\t} else if ( memory ) {\n\t\t\t\t\t\tfiringStart = start;\n\t\t\t\t\t\tfire( memory );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Remove a callback from the list\n\t\t\tremove: function() {\n\t\t\t\tif ( list ) {\n\t\t\t\t\tjQuery.each( arguments, function( _, arg ) {\n\t\t\t\t\t\tvar index;\n\t\t\t\t\t\twhile ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {\n\t\t\t\t\t\t\tlist.splice( index, 1 );\n\t\t\t\t\t\t\t// Handle firing indexes\n\t\t\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\t\t\tif ( index <= firingLength ) {\n\t\t\t\t\t\t\t\t\tfiringLength--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif ( index <= firingIndex ) {\n\t\t\t\t\t\t\t\t\tfiringIndex--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Check if a given callback is in the list.\n\t\t\t// If no argument is given, return whether or not list has callbacks attached.\n\t\t\thas: function( fn ) {\n\t\t\t\treturn fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );\n\t\t\t},\n\t\t\t// Remove all callbacks from the list\n\t\t\tempty: function() {\n\t\t\t\tlist = [];\n\t\t\t\tfiringLength = 0;\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Have the list do nothing anymore\n\t\t\tdisable: function() {\n\t\t\t\tlist = stack = memory = undefined;\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Is it disabled?\n\t\t\tdisabled: function() {\n\t\t\t\treturn !list;\n\t\t\t},\n\t\t\t// Lock the list in its current state\n\t\t\tlock: function() {\n\t\t\t\tstack = undefined;\n\t\t\t\tif ( !memory ) {\n\t\t\t\t\tself.disable();\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Is it locked?\n\t\t\tlocked: function() {\n\t\t\t\treturn !stack;\n\t\t\t},\n\t\t\t// Call all callbacks with the given context and arguments\n\t\t\tfireWith: function( context, args ) {\n\t\t\t\tif ( list && ( !fired || stack ) ) {\n\t\t\t\t\targs = args || [];\n\t\t\t\t\targs = [ context, args.slice ? args.slice() : args ];\n\t\t\t\t\tif ( firing ) {\n\t\t\t\t\t\tstack.push( args );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfire( args );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// Call all the callbacks with the given arguments\n\t\t\tfire: function() {\n\t\t\t\tself.fireWith( this, arguments );\n\t\t\t\treturn this;\n\t\t\t},\n\t\t\t// To know if the callbacks have already been called at least once\n\t\t\tfired: function() {\n\t\t\t\treturn !!fired;\n\t\t\t}\n\t\t};\n\n\treturn self;\n};\n\n\njQuery.extend({\n\n\tDeferred: function( func ) {\n\t\tvar tuples = [\n\t\t\t\t// action, add listener, listener list, final state\n\t\t\t\t[ \"resolve\", \"done\", jQuery.Callbacks(\"once memory\"), \"resolved\" ],\n\t\t\t\t[ \"reject\", \"fail\", jQuery.Callbacks(\"once memory\"), \"rejected\" ],\n\t\t\t\t[ \"notify\", \"progress\", jQuery.Callbacks(\"memory\") ]\n\t\t\t],\n\t\t\tstate = \"pending\",\n\t\t\tpromise = {\n\t\t\t\tstate: function() {\n\t\t\t\t\treturn state;\n\t\t\t\t},\n\t\t\t\talways: function() {\n\t\t\t\t\tdeferred.done( arguments ).fail( arguments );\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\t\t\t\tthen: function( /* fnDone, fnFail, fnProgress */ ) {\n\t\t\t\t\tvar fns = arguments;\n\t\t\t\t\treturn jQuery.Deferred(function( newDefer ) {\n\t\t\t\t\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\t\t\t\t\tvar fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];\n\t\t\t\t\t\t\t// deferred[ done | fail | progress ] for forwarding actions to newDefer\n\t\t\t\t\t\t\tdeferred[ tuple[1] ](function() {\n\t\t\t\t\t\t\t\tvar returned = fn && fn.apply( this, arguments );\n\t\t\t\t\t\t\t\tif ( returned && jQuery.isFunction( returned.promise ) ) {\n\t\t\t\t\t\t\t\t\treturned.promise()\n\t\t\t\t\t\t\t\t\t\t.done( newDefer.resolve )\n\t\t\t\t\t\t\t\t\t\t.fail( newDefer.reject )\n\t\t\t\t\t\t\t\t\t\t.progress( newDefer.notify );\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tnewDefer[ tuple[ 0 ] + \"With\" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t});\n\t\t\t\t\t\tfns = null;\n\t\t\t\t\t}).promise();\n\t\t\t\t},\n\t\t\t\t// Get a promise for this deferred\n\t\t\t\t// If obj is provided, the promise aspect is added to the object\n\t\t\t\tpromise: function( obj ) {\n\t\t\t\t\treturn obj != null ? jQuery.extend( obj, promise ) : promise;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdeferred = {};\n\n\t\t// Keep pipe for back-compat\n\t\tpromise.pipe = promise.then;\n\n\t\t// Add list-specific methods\n\t\tjQuery.each( tuples, function( i, tuple ) {\n\t\t\tvar list = tuple[ 2 ],\n\t\t\t\tstateString = tuple[ 3 ];\n\n\t\t\t// promise[ done | fail | progress ] = list.add\n\t\t\tpromise[ tuple[1] ] = list.add;\n\n\t\t\t// Handle state\n\t\t\tif ( stateString ) {\n\t\t\t\tlist.add(function() {\n\t\t\t\t\t// state = [ resolved | rejected ]\n\t\t\t\t\tstate = stateString;\n\n\t\t\t\t// [ reject_list | resolve_list ].disable; progress_list.lock\n\t\t\t\t}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );\n\t\t\t}\n\n\t\t\t// deferred[ resolve | reject | notify ]\n\t\t\tdeferred[ tuple[0] ] = function() {\n\t\t\t\tdeferred[ tuple[0] + \"With\" ]( this === deferred ? promise : this, arguments );\n\t\t\t\treturn this;\n\t\t\t};\n\t\t\tdeferred[ tuple[0] + \"With\" ] = list.fireWith;\n\t\t});\n\n\t\t// Make the deferred a promise\n\t\tpromise.promise( deferred );\n\n\t\t// Call given func if any\n\t\tif ( func ) {\n\t\t\tfunc.call( deferred, deferred );\n\t\t}\n\n\t\t// All done!\n\t\treturn deferred;\n\t},\n\n\t// Deferred helper\n\twhen: function( subordinate /* , ..., subordinateN */ ) {\n\t\tvar i = 0,\n\t\t\tresolveValues = slice.call( arguments ),\n\t\t\tlength = resolveValues.length,\n\n\t\t\t// the count of uncompleted subordinates\n\t\t\tremaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,\n\n\t\t\t// the master Deferred. If resolveValues consist of only a single Deferred, just use that.\n\t\t\tdeferred = remaining === 1 ? subordinate : jQuery.Deferred(),\n\n\t\t\t// Update function for both resolve and progress values\n\t\t\tupdateFunc = function( i, contexts, values ) {\n\t\t\t\treturn function( value ) {\n\t\t\t\t\tcontexts[ i ] = this;\n\t\t\t\t\tvalues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;\n\t\t\t\t\tif ( values === progressValues ) {\n\t\t\t\t\t\tdeferred.notifyWith( contexts, values );\n\t\t\t\t\t} else if ( !( --remaining ) ) {\n\t\t\t\t\t\tdeferred.resolveWith( contexts, values );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t},\n\n\t\t\tprogressValues, progressContexts, resolveContexts;\n\n\t\t// Add listeners to Deferred subordinates; treat others as resolved\n\t\tif ( length > 1 ) {\n\t\t\tprogressValues = new Array( length );\n\t\t\tprogressContexts = new Array( length );\n\t\t\tresolveContexts = new Array( length );\n\t\t\tfor ( ; i < length; i++ ) {\n\t\t\t\tif ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {\n\t\t\t\t\tresolveValues[ i ].promise()\n\t\t\t\t\t\t.done( updateFunc( i, resolveContexts, resolveValues ) )\n\t\t\t\t\t\t.fail( deferred.reject )\n\t\t\t\t\t\t.progress( updateFunc( i, progressContexts, progressValues ) );\n\t\t\t\t} else {\n\t\t\t\t\t--remaining;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// If we're not waiting on anything, resolve the master\n\t\tif ( !remaining ) {\n\t\t\tdeferred.resolveWith( resolveContexts, resolveValues );\n\t\t}\n\n\t\treturn deferred.promise();\n\t}\n});\n\n\n// The deferred used on DOM ready\nvar readyList;\n\njQuery.fn.ready = function( fn ) {\n\t// Add the callback\n\tjQuery.ready.promise().done( fn );\n\n\treturn this;\n};\n\njQuery.extend({\n\t// Is the DOM ready to be used? Set to true once it occurs.\n\tisReady: false,\n\n\t// A counter to track how many items to wait for before\n\t// the ready event fires. See #6781\n\treadyWait: 1,\n\n\t// Hold (or release) the ready event\n\tholdReady: function( hold ) {\n\t\tif ( hold ) {\n\t\t\tjQuery.readyWait++;\n\t\t} else {\n\t\t\tjQuery.ready( true );\n\t\t}\n\t},\n\n\t// Handle when the DOM is ready\n\tready: function( wait ) {\n\n\t\t// Abort if there are pending holds or we're already ready\n\t\tif ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Remember that the DOM is ready\n\t\tjQuery.isReady = true;\n\n\t\t// If a normal DOM Ready event fired, decrement, and wait if need be\n\t\tif ( wait !== true && --jQuery.readyWait > 0 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If there are functions bound, to execute\n\t\treadyList.resolveWith( document, [ jQuery ] );\n\n\t\t// Trigger any bound ready events\n\t\tif ( jQuery.fn.triggerHandler ) {\n\t\t\tjQuery( document ).triggerHandler( \"ready\" );\n\t\t\tjQuery( document ).off( \"ready\" );\n\t\t}\n\t}\n});\n\n/**\n * The ready event handler and self cleanup method\n */\nfunction completed() {\n\tdocument.removeEventListener( \"DOMContentLoaded\", completed, false );\n\twindow.removeEventListener( \"load\", completed, false );\n\tjQuery.ready();\n}\n\njQuery.ready.promise = function( obj ) {\n\tif ( !readyList ) {\n\n\t\treadyList = jQuery.Deferred();\n\n\t\t// Catch cases where $(document).ready() is called after the browser event has already occurred.\n\t\t// We once tried to use readyState \"interactive\" here, but it caused issues like the one\n\t\t// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15\n\t\tif ( document.readyState === \"complete\" ) {\n\t\t\t// Handle it asynchronously to allow scripts the opportunity to delay ready\n\t\t\tsetTimeout( jQuery.ready );\n\n\t\t} else {\n\n\t\t\t// Use the handy event callback\n\t\t\tdocument.addEventListener( \"DOMContentLoaded\", completed, false );\n\n\t\t\t// A fallback to window.onload, that will always work\n\t\t\twindow.addEventListener( \"load\", completed, false );\n\t\t}\n\t}\n\treturn readyList.promise( obj );\n};\n\n// Kick off the DOM ready check even if the user does not\njQuery.ready.promise();\n\n\n\n\n// Multifunctional method to get and set values of a collection\n// The value/s can optionally be executed if it's a function\nvar access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) {\n\tvar i = 0,\n\t\tlen = elems.length,\n\t\tbulk = key == null;\n\n\t// Sets many values\n\tif ( jQuery.type( key ) === \"object\" ) {\n\t\tchainable = true;\n\t\tfor ( i in key ) {\n\t\t\tjQuery.access( elems, fn, i, key[i], true, emptyGet, raw );\n\t\t}\n\n\t// Sets one value\n\t} else if ( value !== undefined ) {\n\t\tchainable = true;\n\n\t\tif ( !jQuery.isFunction( value ) ) {\n\t\t\traw = true;\n\t\t}\n\n\t\tif ( bulk ) {\n\t\t\t// Bulk operations run against the entire set\n\t\t\tif ( raw ) {\n\t\t\t\tfn.call( elems, value );\n\t\t\t\tfn = null;\n\n\t\t\t// ...except when executing function values\n\t\t\t} else {\n\t\t\t\tbulk = fn;\n\t\t\t\tfn = function( elem, key, value ) {\n\t\t\t\t\treturn bulk.call( jQuery( elem ), value );\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\tif ( fn ) {\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\tfn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn chainable ?\n\t\telems :\n\n\t\t// Gets\n\t\tbulk ?\n\t\t\tfn.call( elems ) :\n\t\t\tlen ? fn( elems[0], key ) : emptyGet;\n};\n\n\n/**\n * Determines whether an object can have data\n */\njQuery.acceptData = function( owner ) {\n\t// Accepts only:\n\t//  - Node\n\t//    - Node.ELEMENT_NODE\n\t//    - Node.DOCUMENT_NODE\n\t//  - Object\n\t//    - Any\n\t/* jshint -W018 */\n\treturn owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );\n};\n\n\nfunction Data() {\n\t// Support: Android<4,\n\t// Old WebKit does not have Object.preventExtensions/freeze method,\n\t// return new empty object instead with no [[set]] accessor\n\tObject.defineProperty( this.cache = {}, 0, {\n\t\tget: function() {\n\t\t\treturn {};\n\t\t}\n\t});\n\n\tthis.expando = jQuery.expando + Data.uid++;\n}\n\nData.uid = 1;\nData.accepts = jQuery.acceptData;\n\nData.prototype = {\n\tkey: function( owner ) {\n\t\t// We can accept data for non-element nodes in modern browsers,\n\t\t// but we should not, see #8335.\n\t\t// Always return the key for a frozen object.\n\t\tif ( !Data.accepts( owner ) ) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tvar descriptor = {},\n\t\t\t// Check if the owner object already has a cache key\n\t\t\tunlock = owner[ this.expando ];\n\n\t\t// If not, create one\n\t\tif ( !unlock ) {\n\t\t\tunlock = Data.uid++;\n\n\t\t\t// Secure it in a non-enumerable, non-writable property\n\t\t\ttry {\n\t\t\t\tdescriptor[ this.expando ] = { value: unlock };\n\t\t\t\tObject.defineProperties( owner, descriptor );\n\n\t\t\t// Support: Android<4\n\t\t\t// Fallback to a less secure definition\n\t\t\t} catch ( e ) {\n\t\t\t\tdescriptor[ this.expando ] = unlock;\n\t\t\t\tjQuery.extend( owner, descriptor );\n\t\t\t}\n\t\t}\n\n\t\t// Ensure the cache object\n\t\tif ( !this.cache[ unlock ] ) {\n\t\t\tthis.cache[ unlock ] = {};\n\t\t}\n\n\t\treturn unlock;\n\t},\n\tset: function( owner, data, value ) {\n\t\tvar prop,\n\t\t\t// There may be an unlock assigned to this node,\n\t\t\t// if there is no entry for this \"owner\", create one inline\n\t\t\t// and set the unlock as though an owner entry had always existed\n\t\t\tunlock = this.key( owner ),\n\t\t\tcache = this.cache[ unlock ];\n\n\t\t// Handle: [ owner, key, value ] args\n\t\tif ( typeof data === \"string\" ) {\n\t\t\tcache[ data ] = value;\n\n\t\t// Handle: [ owner, { properties } ] args\n\t\t} else {\n\t\t\t// Fresh assignments by object are shallow copied\n\t\t\tif ( jQuery.isEmptyObject( cache ) ) {\n\t\t\t\tjQuery.extend( this.cache[ unlock ], data );\n\t\t\t// Otherwise, copy the properties one-by-one to the cache object\n\t\t\t} else {\n\t\t\t\tfor ( prop in data ) {\n\t\t\t\t\tcache[ prop ] = data[ prop ];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn cache;\n\t},\n\tget: function( owner, key ) {\n\t\t// Either a valid cache is found, or will be created.\n\t\t// New caches will be created and the unlock returned,\n\t\t// allowing direct access to the newly created\n\t\t// empty data object. A valid owner object must be provided.\n\t\tvar cache = this.cache[ this.key( owner ) ];\n\n\t\treturn key === undefined ?\n\t\t\tcache : cache[ key ];\n\t},\n\taccess: function( owner, key, value ) {\n\t\tvar stored;\n\t\t// In cases where either:\n\t\t//\n\t\t//   1. No key was specified\n\t\t//   2. A string key was specified, but no value provided\n\t\t//\n\t\t// Take the \"read\" path and allow the get method to determine\n\t\t// which value to return, respectively either:\n\t\t//\n\t\t//   1. The entire cache object\n\t\t//   2. The data stored at the key\n\t\t//\n\t\tif ( key === undefined ||\n\t\t\t\t((key && typeof key === \"string\") && value === undefined) ) {\n\n\t\t\tstored = this.get( owner, key );\n\n\t\t\treturn stored !== undefined ?\n\t\t\t\tstored : this.get( owner, jQuery.camelCase(key) );\n\t\t}\n\n\t\t// [*]When the key is not a string, or both a key and value\n\t\t// are specified, set or extend (existing objects) with either:\n\t\t//\n\t\t//   1. An object of properties\n\t\t//   2. A key and value\n\t\t//\n\t\tthis.set( owner, key, value );\n\n\t\t// Since the \"set\" path can have two possible entry points\n\t\t// return the expected data based on which path was taken[*]\n\t\treturn value !== undefined ? value : key;\n\t},\n\tremove: function( owner, key ) {\n\t\tvar i, name, camel,\n\t\t\tunlock = this.key( owner ),\n\t\t\tcache = this.cache[ unlock ];\n\n\t\tif ( key === undefined ) {\n\t\t\tthis.cache[ unlock ] = {};\n\n\t\t} else {\n\t\t\t// Support array or space separated string of keys\n\t\t\tif ( jQuery.isArray( key ) ) {\n\t\t\t\t// If \"name\" is an array of keys...\n\t\t\t\t// When data is initially created, via (\"key\", \"val\") signature,\n\t\t\t\t// keys will be converted to camelCase.\n\t\t\t\t// Since there is no way to tell _how_ a key was added, remove\n\t\t\t\t// both plain key and camelCase key. #12786\n\t\t\t\t// This will only penalize the array argument path.\n\t\t\t\tname = key.concat( key.map( jQuery.camelCase ) );\n\t\t\t} else {\n\t\t\t\tcamel = jQuery.camelCase( key );\n\t\t\t\t// Try the string as a key before any manipulation\n\t\t\t\tif ( key in cache ) {\n\t\t\t\t\tname = [ key, camel ];\n\t\t\t\t} else {\n\t\t\t\t\t// If a key with the spaces exists, use it.\n\t\t\t\t\t// Otherwise, create an array by matching non-whitespace\n\t\t\t\t\tname = camel;\n\t\t\t\t\tname = name in cache ?\n\t\t\t\t\t\t[ name ] : ( name.match( rnotwhite ) || [] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\ti = name.length;\n\t\t\twhile ( i-- ) {\n\t\t\t\tdelete cache[ name[ i ] ];\n\t\t\t}\n\t\t}\n\t},\n\thasData: function( owner ) {\n\t\treturn !jQuery.isEmptyObject(\n\t\t\tthis.cache[ owner[ this.expando ] ] || {}\n\t\t);\n\t},\n\tdiscard: function( owner ) {\n\t\tif ( owner[ this.expando ] ) {\n\t\t\tdelete this.cache[ owner[ this.expando ] ];\n\t\t}\n\t}\n};\nvar data_priv = new Data();\n\nvar data_user = new Data();\n\n\n\n//\tImplementation Summary\n//\n//\t1. Enforce API surface and semantic compatibility with 1.9.x branch\n//\t2. Improve the module's maintainability by reducing the storage\n//\t\tpaths to a single mechanism.\n//\t3. Use the same single mechanism to support \"private\" and \"user\" data.\n//\t4. _Never_ expose \"private\" data to user code (TODO: Drop _data, _removeData)\n//\t5. Avoid exposing implementation details on user objects (eg. expando properties)\n//\t6. Provide a clear path for implementation upgrade to WeakMap in 2014\n\nvar rbrace = /^(?:\\{[\\w\\W]*\\}|\\[[\\w\\W]*\\])$/,\n\trmultiDash = /([A-Z])/g;\n\nfunction dataAttr( elem, key, data ) {\n\tvar name;\n\n\t// If nothing was found internally, try to fetch any\n\t// data from the HTML5 data-* attribute\n\tif ( data === undefined && elem.nodeType === 1 ) {\n\t\tname = \"data-\" + key.replace( rmultiDash, \"-$1\" ).toLowerCase();\n\t\tdata = elem.getAttribute( name );\n\n\t\tif ( typeof data === \"string\" ) {\n\t\t\ttry {\n\t\t\t\tdata = data === \"true\" ? true :\n\t\t\t\t\tdata === \"false\" ? false :\n\t\t\t\t\tdata === \"null\" ? null :\n\t\t\t\t\t// Only convert to a number if it doesn't change the string\n\t\t\t\t\t+data + \"\" === data ? +data :\n\t\t\t\t\trbrace.test( data ) ? jQuery.parseJSON( data ) :\n\t\t\t\t\tdata;\n\t\t\t} catch( e ) {}\n\n\t\t\t// Make sure we set the data so it isn't changed later\n\t\t\tdata_user.set( elem, key, data );\n\t\t} else {\n\t\t\tdata = undefined;\n\t\t}\n\t}\n\treturn data;\n}\n\njQuery.extend({\n\thasData: function( elem ) {\n\t\treturn data_user.hasData( elem ) || data_priv.hasData( elem );\n\t},\n\n\tdata: function( elem, name, data ) {\n\t\treturn data_user.access( elem, name, data );\n\t},\n\n\tremoveData: function( elem, name ) {\n\t\tdata_user.remove( elem, name );\n\t},\n\n\t// TODO: Now that all calls to _data and _removeData have been replaced\n\t// with direct calls to data_priv methods, these can be deprecated.\n\t_data: function( elem, name, data ) {\n\t\treturn data_priv.access( elem, name, data );\n\t},\n\n\t_removeData: function( elem, name ) {\n\t\tdata_priv.remove( elem, name );\n\t}\n});\n\njQuery.fn.extend({\n\tdata: function( key, value ) {\n\t\tvar i, name, data,\n\t\t\telem = this[ 0 ],\n\t\t\tattrs = elem && elem.attributes;\n\n\t\t// Gets all values\n\t\tif ( key === undefined ) {\n\t\t\tif ( this.length ) {\n\t\t\t\tdata = data_user.get( elem );\n\n\t\t\t\tif ( elem.nodeType === 1 && !data_priv.get( elem, \"hasDataAttrs\" ) ) {\n\t\t\t\t\ti = attrs.length;\n\t\t\t\t\twhile ( i-- ) {\n\n\t\t\t\t\t\t// Support: IE11+\n\t\t\t\t\t\t// The attrs elements can be null (#14894)\n\t\t\t\t\t\tif ( attrs[ i ] ) {\n\t\t\t\t\t\t\tname = attrs[ i ].name;\n\t\t\t\t\t\t\tif ( name.indexOf( \"data-\" ) === 0 ) {\n\t\t\t\t\t\t\t\tname = jQuery.camelCase( name.slice(5) );\n\t\t\t\t\t\t\t\tdataAttr( elem, name, data[ name ] );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdata_priv.set( elem, \"hasDataAttrs\", true );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn data;\n\t\t}\n\n\t\t// Sets multiple values\n\t\tif ( typeof key === \"object\" ) {\n\t\t\treturn this.each(function() {\n\t\t\t\tdata_user.set( this, key );\n\t\t\t});\n\t\t}\n\n\t\treturn access( this, function( value ) {\n\t\t\tvar data,\n\t\t\t\tcamelKey = jQuery.camelCase( key );\n\n\t\t\t// The calling jQuery object (element matches) is not empty\n\t\t\t// (and therefore has an element appears at this[ 0 ]) and the\n\t\t\t// `value` parameter was not undefined. An empty jQuery object\n\t\t\t// will result in `undefined` for elem = this[ 0 ] which will\n\t\t\t// throw an exception if an attempt to read a data cache is made.\n\t\t\tif ( elem && value === undefined ) {\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// with the key as-is\n\t\t\t\tdata = data_user.get( elem, key );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to get data from the cache\n\t\t\t\t// with the key camelized\n\t\t\t\tdata = data_user.get( elem, camelKey );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// Attempt to \"discover\" the data in\n\t\t\t\t// HTML5 custom data-* attrs\n\t\t\t\tdata = dataAttr( elem, camelKey, undefined );\n\t\t\t\tif ( data !== undefined ) {\n\t\t\t\t\treturn data;\n\t\t\t\t}\n\n\t\t\t\t// We tried really hard, but the data doesn't exist.\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Set the data...\n\t\t\tthis.each(function() {\n\t\t\t\t// First, attempt to store a copy or reference of any\n\t\t\t\t// data that might've been store with a camelCased key.\n\t\t\t\tvar data = data_user.get( this, camelKey );\n\n\t\t\t\t// For HTML5 data-* attribute interop, we have to\n\t\t\t\t// store property names with dashes in a camelCase form.\n\t\t\t\t// This might not apply to all properties...*\n\t\t\t\tdata_user.set( this, camelKey, value );\n\n\t\t\t\t// *... In the case of properties that might _actually_\n\t\t\t\t// have dashes, we need to also store a copy of that\n\t\t\t\t// unchanged property.\n\t\t\t\tif ( key.indexOf(\"-\") !== -1 && data !== undefined ) {\n\t\t\t\t\tdata_user.set( this, key, value );\n\t\t\t\t}\n\t\t\t});\n\t\t}, null, value, arguments.length > 1, null, true );\n\t},\n\n\tremoveData: function( key ) {\n\t\treturn this.each(function() {\n\t\t\tdata_user.remove( this, key );\n\t\t});\n\t}\n});\n\n\njQuery.extend({\n\tqueue: function( elem, type, data ) {\n\t\tvar queue;\n\n\t\tif ( elem ) {\n\t\t\ttype = ( type || \"fx\" ) + \"queue\";\n\t\t\tqueue = data_priv.get( elem, type );\n\n\t\t\t// Speed up dequeue by getting out quickly if this is just a lookup\n\t\t\tif ( data ) {\n\t\t\t\tif ( !queue || jQuery.isArray( data ) ) {\n\t\t\t\t\tqueue = data_priv.access( elem, type, jQuery.makeArray(data) );\n\t\t\t\t} else {\n\t\t\t\t\tqueue.push( data );\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn queue || [];\n\t\t}\n\t},\n\n\tdequeue: function( elem, type ) {\n\t\ttype = type || \"fx\";\n\n\t\tvar queue = jQuery.queue( elem, type ),\n\t\t\tstartLength = queue.length,\n\t\t\tfn = queue.shift(),\n\t\t\thooks = jQuery._queueHooks( elem, type ),\n\t\t\tnext = function() {\n\t\t\t\tjQuery.dequeue( elem, type );\n\t\t\t};\n\n\t\t// If the fx queue is dequeued, always remove the progress sentinel\n\t\tif ( fn === \"inprogress\" ) {\n\t\t\tfn = queue.shift();\n\t\t\tstartLength--;\n\t\t}\n\n\t\tif ( fn ) {\n\n\t\t\t// Add a progress sentinel to prevent the fx queue from being\n\t\t\t// automatically dequeued\n\t\t\tif ( type === \"fx\" ) {\n\t\t\t\tqueue.unshift( \"inprogress\" );\n\t\t\t}\n\n\t\t\t// Clear up the last queue stop function\n\t\t\tdelete hooks.stop;\n\t\t\tfn.call( elem, next, hooks );\n\t\t}\n\n\t\tif ( !startLength && hooks ) {\n\t\t\thooks.empty.fire();\n\t\t}\n\t},\n\n\t// Not public - generate a queueHooks object, or return the current one\n\t_queueHooks: function( elem, type ) {\n\t\tvar key = type + \"queueHooks\";\n\t\treturn data_priv.get( elem, key ) || data_priv.access( elem, key, {\n\t\t\tempty: jQuery.Callbacks(\"once memory\").add(function() {\n\t\t\t\tdata_priv.remove( elem, [ type + \"queue\", key ] );\n\t\t\t})\n\t\t});\n\t}\n});\n\njQuery.fn.extend({\n\tqueue: function( type, data ) {\n\t\tvar setter = 2;\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tdata = type;\n\t\t\ttype = \"fx\";\n\t\t\tsetter--;\n\t\t}\n\n\t\tif ( arguments.length < setter ) {\n\t\t\treturn jQuery.queue( this[0], type );\n\t\t}\n\n\t\treturn data === undefined ?\n\t\t\tthis :\n\t\t\tthis.each(function() {\n\t\t\t\tvar queue = jQuery.queue( this, type, data );\n\n\t\t\t\t// Ensure a hooks for this queue\n\t\t\t\tjQuery._queueHooks( this, type );\n\n\t\t\t\tif ( type === \"fx\" && queue[0] !== \"inprogress\" ) {\n\t\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t\t}\n\t\t\t});\n\t},\n\tdequeue: function( type ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.dequeue( this, type );\n\t\t});\n\t},\n\tclearQueue: function( type ) {\n\t\treturn this.queue( type || \"fx\", [] );\n\t},\n\t// Get a promise resolved when queues of a certain type\n\t// are emptied (fx is the type by default)\n\tpromise: function( type, obj ) {\n\t\tvar tmp,\n\t\t\tcount = 1,\n\t\t\tdefer = jQuery.Deferred(),\n\t\t\telements = this,\n\t\t\ti = this.length,\n\t\t\tresolve = function() {\n\t\t\t\tif ( !( --count ) ) {\n\t\t\t\t\tdefer.resolveWith( elements, [ elements ] );\n\t\t\t\t}\n\t\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tobj = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\ttype = type || \"fx\";\n\n\t\twhile ( i-- ) {\n\t\t\ttmp = data_priv.get( elements[ i ], type + \"queueHooks\" );\n\t\t\tif ( tmp && tmp.empty ) {\n\t\t\t\tcount++;\n\t\t\t\ttmp.empty.add( resolve );\n\t\t\t}\n\t\t}\n\t\tresolve();\n\t\treturn defer.promise( obj );\n\t}\n});\nvar pnum = (/[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/).source;\n\nvar cssExpand = [ \"Top\", \"Right\", \"Bottom\", \"Left\" ];\n\nvar isHidden = function( elem, el ) {\n\t\t// isHidden might be called from jQuery#filter function;\n\t\t// in that case, element will be second argument\n\t\telem = el || elem;\n\t\treturn jQuery.css( elem, \"display\" ) === \"none\" || !jQuery.contains( elem.ownerDocument, elem );\n\t};\n\nvar rcheckableType = (/^(?:checkbox|radio)$/i);\n\n\n\n(function() {\n\tvar fragment = document.createDocumentFragment(),\n\t\tdiv = fragment.appendChild( document.createElement( \"div\" ) ),\n\t\tinput = document.createElement( \"input\" );\n\n\t// Support: Safari<=5.1\n\t// Check state lost if the name is set (#11217)\n\t// Support: Windows Web Apps (WWA)\n\t// `name` and `type` must use .setAttribute for WWA (#14901)\n\tinput.setAttribute( \"type\", \"radio\" );\n\tinput.setAttribute( \"checked\", \"checked\" );\n\tinput.setAttribute( \"name\", \"t\" );\n\n\tdiv.appendChild( input );\n\n\t// Support: Safari<=5.1, Android<4.2\n\t// Older WebKit doesn't clone checked state correctly in fragments\n\tsupport.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;\n\n\t// Support: IE<=11+\n\t// Make sure textarea (and checkbox) defaultValue is properly cloned\n\tdiv.innerHTML = \"<textarea>x</textarea>\";\n\tsupport.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;\n})();\nvar strundefined = typeof undefined;\n\n\n\nsupport.focusinBubbles = \"onfocusin\" in window;\n\n\nvar\n\trkeyEvent = /^key/,\n\trmouseEvent = /^(?:mouse|pointer|contextmenu)|click/,\n\trfocusMorph = /^(?:focusinfocus|focusoutblur)$/,\n\trtypenamespace = /^([^.]*)(?:\\.(.+)|)$/;\n\nfunction returnTrue() {\n\treturn true;\n}\n\nfunction returnFalse() {\n\treturn false;\n}\n\nfunction safeActiveElement() {\n\ttry {\n\t\treturn document.activeElement;\n\t} catch ( err ) { }\n}\n\n/*\n * Helper functions for managing events -- not part of the public interface.\n * Props to Dean Edwards' addEvent library for many of the ideas.\n */\njQuery.event = {\n\n\tglobal: {},\n\n\tadd: function( elem, types, handler, data, selector ) {\n\n\t\tvar handleObjIn, eventHandle, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = data_priv.get( elem );\n\n\t\t// Don't attach events to noData or text/comment nodes (but allow plain objects)\n\t\tif ( !elemData ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Caller can pass in an object of custom data in lieu of the handler\n\t\tif ( handler.handler ) {\n\t\t\thandleObjIn = handler;\n\t\t\thandler = handleObjIn.handler;\n\t\t\tselector = handleObjIn.selector;\n\t\t}\n\n\t\t// Make sure that the handler has a unique ID, used to find/remove it later\n\t\tif ( !handler.guid ) {\n\t\t\thandler.guid = jQuery.guid++;\n\t\t}\n\n\t\t// Init the element's event structure and main handler, if this is the first\n\t\tif ( !(events = elemData.events) ) {\n\t\t\tevents = elemData.events = {};\n\t\t}\n\t\tif ( !(eventHandle = elemData.handle) ) {\n\t\t\teventHandle = elemData.handle = function( e ) {\n\t\t\t\t// Discard the second event of a jQuery.event.trigger() and\n\t\t\t\t// when an event is called after a page has unloaded\n\t\t\t\treturn typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ?\n\t\t\t\t\tjQuery.event.dispatch.apply( elem, arguments ) : undefined;\n\t\t\t};\n\t\t}\n\n\t\t// Handle multiple events separated by a space\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\n\t\t\ttype = origType = tmp[1];\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// There *must* be a type, no attaching namespace-only handlers\n\t\t\tif ( !type ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// If event changes its type, use the special event handlers for the changed type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// If selector defined, determine special event api type, otherwise given type\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\n\t\t\t// Update special based on newly reset type\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\n\t\t\t// handleObj is passed to all event handlers\n\t\t\thandleObj = jQuery.extend({\n\t\t\t\ttype: type,\n\t\t\t\torigType: origType,\n\t\t\t\tdata: data,\n\t\t\t\thandler: handler,\n\t\t\t\tguid: handler.guid,\n\t\t\t\tselector: selector,\n\t\t\t\tneedsContext: selector && jQuery.expr.match.needsContext.test( selector ),\n\t\t\t\tnamespace: namespaces.join(\".\")\n\t\t\t}, handleObjIn );\n\n\t\t\t// Init the event handler queue if we're the first\n\t\t\tif ( !(handlers = events[ type ]) ) {\n\t\t\t\thandlers = events[ type ] = [];\n\t\t\t\thandlers.delegateCount = 0;\n\n\t\t\t\t// Only use addEventListener if the special events handler returns false\n\t\t\t\tif ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {\n\t\t\t\t\tif ( elem.addEventListener ) {\n\t\t\t\t\t\telem.addEventListener( type, eventHandle, false );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( special.add ) {\n\t\t\t\tspecial.add.call( elem, handleObj );\n\n\t\t\t\tif ( !handleObj.handler.guid ) {\n\t\t\t\t\thandleObj.handler.guid = handler.guid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add to the element's handler list, delegates in front\n\t\t\tif ( selector ) {\n\t\t\t\thandlers.splice( handlers.delegateCount++, 0, handleObj );\n\t\t\t} else {\n\t\t\t\thandlers.push( handleObj );\n\t\t\t}\n\n\t\t\t// Keep track of which events have ever been used, for event optimization\n\t\t\tjQuery.event.global[ type ] = true;\n\t\t}\n\n\t},\n\n\t// Detach an event or set of events from an element\n\tremove: function( elem, types, handler, selector, mappedTypes ) {\n\n\t\tvar j, origCount, tmp,\n\t\t\tevents, t, handleObj,\n\t\t\tspecial, handlers, type, namespaces, origType,\n\t\t\telemData = data_priv.hasData( elem ) && data_priv.get( elem );\n\n\t\tif ( !elemData || !(events = elemData.events) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once for each type.namespace in types; type may be omitted\n\t\ttypes = ( types || \"\" ).match( rnotwhite ) || [ \"\" ];\n\t\tt = types.length;\n\t\twhile ( t-- ) {\n\t\t\ttmp = rtypenamespace.exec( types[t] ) || [];\n\t\t\ttype = origType = tmp[1];\n\t\t\tnamespaces = ( tmp[2] || \"\" ).split( \".\" ).sort();\n\n\t\t\t// Unbind all events (on this namespace, if provided) for the element\n\t\t\tif ( !type ) {\n\t\t\t\tfor ( type in events ) {\n\t\t\t\t\tjQuery.event.remove( elem, type + types[ t ], handler, selector, true );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tspecial = jQuery.event.special[ type ] || {};\n\t\t\ttype = ( selector ? special.delegateType : special.bindType ) || type;\n\t\t\thandlers = events[ type ] || [];\n\t\t\ttmp = tmp[2] && new RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" );\n\n\t\t\t// Remove matching events\n\t\t\torigCount = j = handlers.length;\n\t\t\twhile ( j-- ) {\n\t\t\t\thandleObj = handlers[ j ];\n\n\t\t\t\tif ( ( mappedTypes || origType === handleObj.origType ) &&\n\t\t\t\t\t( !handler || handler.guid === handleObj.guid ) &&\n\t\t\t\t\t( !tmp || tmp.test( handleObj.namespace ) ) &&\n\t\t\t\t\t( !selector || selector === handleObj.selector || selector === \"**\" && handleObj.selector ) ) {\n\t\t\t\t\thandlers.splice( j, 1 );\n\n\t\t\t\t\tif ( handleObj.selector ) {\n\t\t\t\t\t\thandlers.delegateCount--;\n\t\t\t\t\t}\n\t\t\t\t\tif ( special.remove ) {\n\t\t\t\t\t\tspecial.remove.call( elem, handleObj );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Remove generic event handler if we removed something and no more handlers exist\n\t\t\t// (avoids potential for endless recursion during removal of special event handlers)\n\t\t\tif ( origCount && !handlers.length ) {\n\t\t\t\tif ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {\n\t\t\t\t\tjQuery.removeEvent( elem, type, elemData.handle );\n\t\t\t\t}\n\n\t\t\t\tdelete events[ type ];\n\t\t\t}\n\t\t}\n\n\t\t// Remove the expando if it's no longer used\n\t\tif ( jQuery.isEmptyObject( events ) ) {\n\t\t\tdelete elemData.handle;\n\t\t\tdata_priv.remove( elem, \"events\" );\n\t\t}\n\t},\n\n\ttrigger: function( event, data, elem, onlyHandlers ) {\n\n\t\tvar i, cur, tmp, bubbleType, ontype, handle, special,\n\t\t\teventPath = [ elem || document ],\n\t\t\ttype = hasOwn.call( event, \"type\" ) ? event.type : event,\n\t\t\tnamespaces = hasOwn.call( event, \"namespace\" ) ? event.namespace.split(\".\") : [];\n\n\t\tcur = tmp = elem = elem || document;\n\n\t\t// Don't do events on text and comment nodes\n\t\tif ( elem.nodeType === 3 || elem.nodeType === 8 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// focus/blur morphs to focusin/out; ensure we're not firing them right now\n\t\tif ( rfocusMorph.test( type + jQuery.event.triggered ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( type.indexOf(\".\") >= 0 ) {\n\t\t\t// Namespaced trigger; create a regexp to match event type in handle()\n\t\t\tnamespaces = type.split(\".\");\n\t\t\ttype = namespaces.shift();\n\t\t\tnamespaces.sort();\n\t\t}\n\t\tontype = type.indexOf(\":\") < 0 && \"on\" + type;\n\n\t\t// Caller can pass in a jQuery.Event object, Object, or just an event type string\n\t\tevent = event[ jQuery.expando ] ?\n\t\t\tevent :\n\t\t\tnew jQuery.Event( type, typeof event === \"object\" && event );\n\n\t\t// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)\n\t\tevent.isTrigger = onlyHandlers ? 2 : 3;\n\t\tevent.namespace = namespaces.join(\".\");\n\t\tevent.namespace_re = event.namespace ?\n\t\t\tnew RegExp( \"(^|\\\\.)\" + namespaces.join(\"\\\\.(?:.*\\\\.|)\") + \"(\\\\.|$)\" ) :\n\t\t\tnull;\n\n\t\t// Clean up the event in case it is being reused\n\t\tevent.result = undefined;\n\t\tif ( !event.target ) {\n\t\t\tevent.target = elem;\n\t\t}\n\n\t\t// Clone any incoming data and prepend the event, creating the handler arg list\n\t\tdata = data == null ?\n\t\t\t[ event ] :\n\t\t\tjQuery.makeArray( data, [ event ] );\n\n\t\t// Allow special events to draw outside the lines\n\t\tspecial = jQuery.event.special[ type ] || {};\n\t\tif ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine event propagation path in advance, per W3C events spec (#9951)\n\t\t// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)\n\t\tif ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {\n\n\t\t\tbubbleType = special.delegateType || type;\n\t\t\tif ( !rfocusMorph.test( bubbleType + type ) ) {\n\t\t\t\tcur = cur.parentNode;\n\t\t\t}\n\t\t\tfor ( ; cur; cur = cur.parentNode ) {\n\t\t\t\teventPath.push( cur );\n\t\t\t\ttmp = cur;\n\t\t\t}\n\n\t\t\t// Only add window if we got to document (e.g., not plain obj or detached DOM)\n\t\t\tif ( tmp === (elem.ownerDocument || document) ) {\n\t\t\t\teventPath.push( tmp.defaultView || tmp.parentWindow || window );\n\t\t\t}\n\t\t}\n\n\t\t// Fire handlers on the event path\n\t\ti = 0;\n\t\twhile ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {\n\n\t\t\tevent.type = i > 1 ?\n\t\t\t\tbubbleType :\n\t\t\t\tspecial.bindType || type;\n\n\t\t\t// jQuery handler\n\t\t\thandle = ( data_priv.get( cur, \"events\" ) || {} )[ event.type ] && data_priv.get( cur, \"handle\" );\n\t\t\tif ( handle ) {\n\t\t\t\thandle.apply( cur, data );\n\t\t\t}\n\n\t\t\t// Native handler\n\t\t\thandle = ontype && cur[ ontype ];\n\t\t\tif ( handle && handle.apply && jQuery.acceptData( cur ) ) {\n\t\t\t\tevent.result = handle.apply( cur, data );\n\t\t\t\tif ( event.result === false ) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tevent.type = type;\n\n\t\t// If nobody prevented the default action, do it now\n\t\tif ( !onlyHandlers && !event.isDefaultPrevented() ) {\n\n\t\t\tif ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&\n\t\t\t\tjQuery.acceptData( elem ) ) {\n\n\t\t\t\t// Call a native DOM method on the target with the same name name as the event.\n\t\t\t\t// Don't do default actions on window, that's where global variables be (#6170)\n\t\t\t\tif ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) {\n\n\t\t\t\t\t// Don't re-trigger an onFOO event when we call its FOO() method\n\t\t\t\t\ttmp = elem[ ontype ];\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = null;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Prevent re-triggering of the same event, since we already bubbled it above\n\t\t\t\t\tjQuery.event.triggered = type;\n\t\t\t\t\telem[ type ]();\n\t\t\t\t\tjQuery.event.triggered = undefined;\n\n\t\t\t\t\tif ( tmp ) {\n\t\t\t\t\t\telem[ ontype ] = tmp;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\tdispatch: function( event ) {\n\n\t\t// Make a writable jQuery.Event from the native event object\n\t\tevent = jQuery.event.fix( event );\n\n\t\tvar i, j, ret, matched, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\targs = slice.call( arguments ),\n\t\t\thandlers = ( data_priv.get( this, \"events\" ) || {} )[ event.type ] || [],\n\t\t\tspecial = jQuery.event.special[ event.type ] || {};\n\n\t\t// Use the fix-ed jQuery.Event rather than the (read-only) native event\n\t\targs[0] = event;\n\t\tevent.delegateTarget = this;\n\n\t\t// Call the preDispatch hook for the mapped type, and let it bail if desired\n\t\tif ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Determine handlers\n\t\thandlerQueue = jQuery.event.handlers.call( this, event, handlers );\n\n\t\t// Run delegates first; they may want to stop propagation beneath us\n\t\ti = 0;\n\t\twhile ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {\n\t\t\tevent.currentTarget = matched.elem;\n\n\t\t\tj = 0;\n\t\t\twhile ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {\n\n\t\t\t\t// Triggered event must either 1) have no namespace, or 2) have namespace(s)\n\t\t\t\t// a subset or equal to those in the bound event (both can have no namespace).\n\t\t\t\tif ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {\n\n\t\t\t\t\tevent.handleObj = handleObj;\n\t\t\t\t\tevent.data = handleObj.data;\n\n\t\t\t\t\tret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )\n\t\t\t\t\t\t\t.apply( matched.elem, args );\n\n\t\t\t\t\tif ( ret !== undefined ) {\n\t\t\t\t\t\tif ( (event.result = ret) === false ) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Call the postDispatch hook for the mapped type\n\t\tif ( special.postDispatch ) {\n\t\t\tspecial.postDispatch.call( this, event );\n\t\t}\n\n\t\treturn event.result;\n\t},\n\n\thandlers: function( event, handlers ) {\n\t\tvar i, matches, sel, handleObj,\n\t\t\thandlerQueue = [],\n\t\t\tdelegateCount = handlers.delegateCount,\n\t\t\tcur = event.target;\n\n\t\t// Find delegate handlers\n\t\t// Black-hole SVG <use> instance trees (#13180)\n\t\t// Avoid non-left-click bubbling in Firefox (#3861)\n\t\tif ( delegateCount && cur.nodeType && (!event.button || event.type !== \"click\") ) {\n\n\t\t\tfor ( ; cur !== this; cur = cur.parentNode || this ) {\n\n\t\t\t\t// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)\n\t\t\t\tif ( cur.disabled !== true || event.type !== \"click\" ) {\n\t\t\t\t\tmatches = [];\n\t\t\t\t\tfor ( i = 0; i < delegateCount; i++ ) {\n\t\t\t\t\t\thandleObj = handlers[ i ];\n\n\t\t\t\t\t\t// Don't conflict with Object.prototype properties (#13203)\n\t\t\t\t\t\tsel = handleObj.selector + \" \";\n\n\t\t\t\t\t\tif ( matches[ sel ] === undefined ) {\n\t\t\t\t\t\t\tmatches[ sel ] = handleObj.needsContext ?\n\t\t\t\t\t\t\t\tjQuery( sel, this ).index( cur ) >= 0 :\n\t\t\t\t\t\t\t\tjQuery.find( sel, this, null, [ cur ] ).length;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( matches[ sel ] ) {\n\t\t\t\t\t\t\tmatches.push( handleObj );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( matches.length ) {\n\t\t\t\t\t\thandlerQueue.push({ elem: cur, handlers: matches });\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Add the remaining (directly-bound) handlers\n\t\tif ( delegateCount < handlers.length ) {\n\t\t\thandlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });\n\t\t}\n\n\t\treturn handlerQueue;\n\t},\n\n\t// Includes some event props shared by KeyEvent and MouseEvent\n\tprops: \"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which\".split(\" \"),\n\n\tfixHooks: {},\n\n\tkeyHooks: {\n\t\tprops: \"char charCode key keyCode\".split(\" \"),\n\t\tfilter: function( event, original ) {\n\n\t\t\t// Add which for key events\n\t\t\tif ( event.which == null ) {\n\t\t\t\tevent.which = original.charCode != null ? original.charCode : original.keyCode;\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tmouseHooks: {\n\t\tprops: \"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement\".split(\" \"),\n\t\tfilter: function( event, original ) {\n\t\t\tvar eventDoc, doc, body,\n\t\t\t\tbutton = original.button;\n\n\t\t\t// Calculate pageX/Y if missing and clientX/Y available\n\t\t\tif ( event.pageX == null && original.clientX != null ) {\n\t\t\t\teventDoc = event.target.ownerDocument || document;\n\t\t\t\tdoc = eventDoc.documentElement;\n\t\t\t\tbody = eventDoc.body;\n\n\t\t\t\tevent.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );\n\t\t\t\tevent.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );\n\t\t\t}\n\n\t\t\t// Add which for click: 1 === left; 2 === middle; 3 === right\n\t\t\t// Note: button is not normalized, so don't use it\n\t\t\tif ( !event.which && button !== undefined ) {\n\t\t\t\tevent.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );\n\t\t\t}\n\n\t\t\treturn event;\n\t\t}\n\t},\n\n\tfix: function( event ) {\n\t\tif ( event[ jQuery.expando ] ) {\n\t\t\treturn event;\n\t\t}\n\n\t\t// Create a writable copy of the event object and normalize some properties\n\t\tvar i, prop, copy,\n\t\t\ttype = event.type,\n\t\t\toriginalEvent = event,\n\t\t\tfixHook = this.fixHooks[ type ];\n\n\t\tif ( !fixHook ) {\n\t\t\tthis.fixHooks[ type ] = fixHook =\n\t\t\t\trmouseEvent.test( type ) ? this.mouseHooks :\n\t\t\t\trkeyEvent.test( type ) ? this.keyHooks :\n\t\t\t\t{};\n\t\t}\n\t\tcopy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;\n\n\t\tevent = new jQuery.Event( originalEvent );\n\n\t\ti = copy.length;\n\t\twhile ( i-- ) {\n\t\t\tprop = copy[ i ];\n\t\t\tevent[ prop ] = originalEvent[ prop ];\n\t\t}\n\n\t\t// Support: Cordova 2.5 (WebKit) (#13255)\n\t\t// All events should have a target; Cordova deviceready doesn't\n\t\tif ( !event.target ) {\n\t\t\tevent.target = document;\n\t\t}\n\n\t\t// Support: Safari 6.0+, Chrome<28\n\t\t// Target should not be a text node (#504, #13143)\n\t\tif ( event.target.nodeType === 3 ) {\n\t\t\tevent.target = event.target.parentNode;\n\t\t}\n\n\t\treturn fixHook.filter ? fixHook.filter( event, originalEvent ) : event;\n\t},\n\n\tspecial: {\n\t\tload: {\n\t\t\t// Prevent triggered image.load events from bubbling to window.load\n\t\t\tnoBubble: true\n\t\t},\n\t\tfocus: {\n\t\t\t// Fire native event if possible so blur/focus sequence is correct\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this !== safeActiveElement() && this.focus ) {\n\t\t\t\t\tthis.focus();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusin\"\n\t\t},\n\t\tblur: {\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this === safeActiveElement() && this.blur ) {\n\t\t\t\t\tthis.blur();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t\tdelegateType: \"focusout\"\n\t\t},\n\t\tclick: {\n\t\t\t// For checkbox, fire native event so checked state will be right\n\t\t\ttrigger: function() {\n\t\t\t\tif ( this.type === \"checkbox\" && this.click && jQuery.nodeName( this, \"input\" ) ) {\n\t\t\t\t\tthis.click();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// For cross-browser consistency, don't fire native .click() on links\n\t\t\t_default: function( event ) {\n\t\t\t\treturn jQuery.nodeName( event.target, \"a\" );\n\t\t\t}\n\t\t},\n\n\t\tbeforeunload: {\n\t\t\tpostDispatch: function( event ) {\n\n\t\t\t\t// Support: Firefox 20+\n\t\t\t\t// Firefox doesn't alert if the returnValue field is not set.\n\t\t\t\tif ( event.result !== undefined && event.originalEvent ) {\n\t\t\t\t\tevent.originalEvent.returnValue = event.result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\tsimulate: function( type, elem, event, bubble ) {\n\t\t// Piggyback on a donor event to simulate a different one.\n\t\t// Fake originalEvent to avoid donor's stopPropagation, but if the\n\t\t// simulated event prevents default then we do the same on the donor.\n\t\tvar e = jQuery.extend(\n\t\t\tnew jQuery.Event(),\n\t\t\tevent,\n\t\t\t{\n\t\t\t\ttype: type,\n\t\t\t\tisSimulated: true,\n\t\t\t\toriginalEvent: {}\n\t\t\t}\n\t\t);\n\t\tif ( bubble ) {\n\t\t\tjQuery.event.trigger( e, null, elem );\n\t\t} else {\n\t\t\tjQuery.event.dispatch.call( elem, e );\n\t\t}\n\t\tif ( e.isDefaultPrevented() ) {\n\t\t\tevent.preventDefault();\n\t\t}\n\t}\n};\n\njQuery.removeEvent = function( elem, type, handle ) {\n\tif ( elem.removeEventListener ) {\n\t\telem.removeEventListener( type, handle, false );\n\t}\n};\n\njQuery.Event = function( src, props ) {\n\t// Allow instantiation without the 'new' keyword\n\tif ( !(this instanceof jQuery.Event) ) {\n\t\treturn new jQuery.Event( src, props );\n\t}\n\n\t// Event object\n\tif ( src && src.type ) {\n\t\tthis.originalEvent = src;\n\t\tthis.type = src.type;\n\n\t\t// Events bubbling up the document may have been marked as prevented\n\t\t// by a handler lower down the tree; reflect the correct value.\n\t\tthis.isDefaultPrevented = src.defaultPrevented ||\n\t\t\t\tsrc.defaultPrevented === undefined &&\n\t\t\t\t// Support: Android<4.0\n\t\t\t\tsrc.returnValue === false ?\n\t\t\treturnTrue :\n\t\t\treturnFalse;\n\n\t// Event type\n\t} else {\n\t\tthis.type = src;\n\t}\n\n\t// Put explicitly provided properties onto the event object\n\tif ( props ) {\n\t\tjQuery.extend( this, props );\n\t}\n\n\t// Create a timestamp if incoming event doesn't have one\n\tthis.timeStamp = src && src.timeStamp || jQuery.now();\n\n\t// Mark it as fixed\n\tthis[ jQuery.expando ] = true;\n};\n\n// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding\n// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html\njQuery.Event.prototype = {\n\tisDefaultPrevented: returnFalse,\n\tisPropagationStopped: returnFalse,\n\tisImmediatePropagationStopped: returnFalse,\n\n\tpreventDefault: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isDefaultPrevented = returnTrue;\n\n\t\tif ( e && e.preventDefault ) {\n\t\t\te.preventDefault();\n\t\t}\n\t},\n\tstopPropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isPropagationStopped = returnTrue;\n\n\t\tif ( e && e.stopPropagation ) {\n\t\t\te.stopPropagation();\n\t\t}\n\t},\n\tstopImmediatePropagation: function() {\n\t\tvar e = this.originalEvent;\n\n\t\tthis.isImmediatePropagationStopped = returnTrue;\n\n\t\tif ( e && e.stopImmediatePropagation ) {\n\t\t\te.stopImmediatePropagation();\n\t\t}\n\n\t\tthis.stopPropagation();\n\t}\n};\n\n// Create mouseenter/leave events using mouseover/out and event-time checks\n// Support: Chrome 15+\njQuery.each({\n\tmouseenter: \"mouseover\",\n\tmouseleave: \"mouseout\",\n\tpointerenter: \"pointerover\",\n\tpointerleave: \"pointerout\"\n}, function( orig, fix ) {\n\tjQuery.event.special[ orig ] = {\n\t\tdelegateType: fix,\n\t\tbindType: fix,\n\n\t\thandle: function( event ) {\n\t\t\tvar ret,\n\t\t\t\ttarget = this,\n\t\t\t\trelated = event.relatedTarget,\n\t\t\t\thandleObj = event.handleObj;\n\n\t\t\t// For mousenter/leave call the handler if related is outside the target.\n\t\t\t// NB: No relatedTarget if the mouse left/entered the browser window\n\t\t\tif ( !related || (related !== target && !jQuery.contains( target, related )) ) {\n\t\t\t\tevent.type = handleObj.origType;\n\t\t\t\tret = handleObj.handler.apply( this, arguments );\n\t\t\t\tevent.type = fix;\n\t\t\t}\n\t\t\treturn ret;\n\t\t}\n\t};\n});\n\n// Support: Firefox, Chrome, Safari\n// Create \"bubbling\" focus and blur events\nif ( !support.focusinBubbles ) {\n\tjQuery.each({ focus: \"focusin\", blur: \"focusout\" }, function( orig, fix ) {\n\n\t\t// Attach a single capturing handler on the document while someone wants focusin/focusout\n\t\tvar handler = function( event ) {\n\t\t\t\tjQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );\n\t\t\t};\n\n\t\tjQuery.event.special[ fix ] = {\n\t\t\tsetup: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = data_priv.access( doc, fix );\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.addEventListener( orig, handler, true );\n\t\t\t\t}\n\t\t\t\tdata_priv.access( doc, fix, ( attaches || 0 ) + 1 );\n\t\t\t},\n\t\t\tteardown: function() {\n\t\t\t\tvar doc = this.ownerDocument || this,\n\t\t\t\t\tattaches = data_priv.access( doc, fix ) - 1;\n\n\t\t\t\tif ( !attaches ) {\n\t\t\t\t\tdoc.removeEventListener( orig, handler, true );\n\t\t\t\t\tdata_priv.remove( doc, fix );\n\n\t\t\t\t} else {\n\t\t\t\t\tdata_priv.access( doc, fix, attaches );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t});\n}\n\njQuery.fn.extend({\n\n\ton: function( types, selector, data, fn, /*INTERNAL*/ one ) {\n\t\tvar origFn, type;\n\n\t\t// Types can be a map of types/handlers\n\t\tif ( typeof types === \"object\" ) {\n\t\t\t// ( types-Object, selector, data )\n\t\t\tif ( typeof selector !== \"string\" ) {\n\t\t\t\t// ( types-Object, data )\n\t\t\t\tdata = data || selector;\n\t\t\t\tselector = undefined;\n\t\t\t}\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.on( type, selector, data, types[ type ], one );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( data == null && fn == null ) {\n\t\t\t// ( types, fn )\n\t\t\tfn = selector;\n\t\t\tdata = selector = undefined;\n\t\t} else if ( fn == null ) {\n\t\t\tif ( typeof selector === \"string\" ) {\n\t\t\t\t// ( types, selector, fn )\n\t\t\t\tfn = data;\n\t\t\t\tdata = undefined;\n\t\t\t} else {\n\t\t\t\t// ( types, data, fn )\n\t\t\t\tfn = data;\n\t\t\t\tdata = selector;\n\t\t\t\tselector = undefined;\n\t\t\t}\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t} else if ( !fn ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tif ( one === 1 ) {\n\t\t\torigFn = fn;\n\t\t\tfn = function( event ) {\n\t\t\t\t// Can use an empty set, since event contains the info\n\t\t\t\tjQuery().off( event );\n\t\t\t\treturn origFn.apply( this, arguments );\n\t\t\t};\n\t\t\t// Use same guid so caller can remove using origFn\n\t\t\tfn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );\n\t\t}\n\t\treturn this.each( function() {\n\t\t\tjQuery.event.add( this, types, fn, data, selector );\n\t\t});\n\t},\n\tone: function( types, selector, data, fn ) {\n\t\treturn this.on( types, selector, data, fn, 1 );\n\t},\n\toff: function( types, selector, fn ) {\n\t\tvar handleObj, type;\n\t\tif ( types && types.preventDefault && types.handleObj ) {\n\t\t\t// ( event )  dispatched jQuery.Event\n\t\t\thandleObj = types.handleObj;\n\t\t\tjQuery( types.delegateTarget ).off(\n\t\t\t\thandleObj.namespace ? handleObj.origType + \".\" + handleObj.namespace : handleObj.origType,\n\t\t\t\thandleObj.selector,\n\t\t\t\thandleObj.handler\n\t\t\t);\n\t\t\treturn this;\n\t\t}\n\t\tif ( typeof types === \"object\" ) {\n\t\t\t// ( types-object [, selector] )\n\t\t\tfor ( type in types ) {\n\t\t\t\tthis.off( type, selector, types[ type ] );\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\tif ( selector === false || typeof selector === \"function\" ) {\n\t\t\t// ( types [, fn] )\n\t\t\tfn = selector;\n\t\t\tselector = undefined;\n\t\t}\n\t\tif ( fn === false ) {\n\t\t\tfn = returnFalse;\n\t\t}\n\t\treturn this.each(function() {\n\t\t\tjQuery.event.remove( this, types, fn, selector );\n\t\t});\n\t},\n\n\ttrigger: function( type, data ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.event.trigger( type, data, this );\n\t\t});\n\t},\n\ttriggerHandler: function( type, data ) {\n\t\tvar elem = this[0];\n\t\tif ( elem ) {\n\t\t\treturn jQuery.event.trigger( type, data, elem, true );\n\t\t}\n\t}\n});\n\n\nvar\n\trxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi,\n\trtagName = /<([\\w:]+)/,\n\trhtml = /<|&#?\\w+;/,\n\trnoInnerhtml = /<(?:script|style|link)/i,\n\t// checked=\"checked\" or checked\n\trchecked = /checked\\s*(?:[^=]|=\\s*.checked.)/i,\n\trscriptType = /^$|\\/(?:java|ecma)script/i,\n\trscriptTypeMasked = /^true\\/(.*)/,\n\trcleanScript = /^\\s*<!(?:\\[CDATA\\[|--)|(?:\\]\\]|--)>\\s*$/g,\n\n\t// We have to close these tags to support XHTML (#13200)\n\twrapMap = {\n\n\t\t// Support: IE9\n\t\toption: [ 1, \"<select multiple='multiple'>\", \"</select>\" ],\n\n\t\tthead: [ 1, \"<table>\", \"</table>\" ],\n\t\tcol: [ 2, \"<table><colgroup>\", \"</colgroup></table>\" ],\n\t\ttr: [ 2, \"<table><tbody>\", \"</tbody></table>\" ],\n\t\ttd: [ 3, \"<table><tbody><tr>\", \"</tr></tbody></table>\" ],\n\n\t\t_default: [ 0, \"\", \"\" ]\n\t};\n\n// Support: IE9\nwrapMap.optgroup = wrapMap.option;\n\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\n// Support: 1.x compatibility\n// Manipulating tables requires a tbody\nfunction manipulationTarget( elem, content ) {\n\treturn jQuery.nodeName( elem, \"table\" ) &&\n\t\tjQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, \"tr\" ) ?\n\n\t\telem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\telem.appendChild( elem.ownerDocument.createElement(\"tbody\") ) :\n\t\telem;\n}\n\n// Replace/restore the type attribute of script elements for safe DOM manipulation\nfunction disableScript( elem ) {\n\telem.type = (elem.getAttribute(\"type\") !== null) + \"/\" + elem.type;\n\treturn elem;\n}\nfunction restoreScript( elem ) {\n\tvar match = rscriptTypeMasked.exec( elem.type );\n\n\tif ( match ) {\n\t\telem.type = match[ 1 ];\n\t} else {\n\t\telem.removeAttribute(\"type\");\n\t}\n\n\treturn elem;\n}\n\n// Mark scripts as having already been evaluated\nfunction setGlobalEval( elems, refElements ) {\n\tvar i = 0,\n\t\tl = elems.length;\n\n\tfor ( ; i < l; i++ ) {\n\t\tdata_priv.set(\n\t\t\telems[ i ], \"globalEval\", !refElements || data_priv.get( refElements[ i ], \"globalEval\" )\n\t\t);\n\t}\n}\n\nfunction cloneCopyEvent( src, dest ) {\n\tvar i, l, type, pdataOld, pdataCur, udataOld, udataCur, events;\n\n\tif ( dest.nodeType !== 1 ) {\n\t\treturn;\n\t}\n\n\t// 1. Copy private data: events, handlers, etc.\n\tif ( data_priv.hasData( src ) ) {\n\t\tpdataOld = data_priv.access( src );\n\t\tpdataCur = data_priv.set( dest, pdataOld );\n\t\tevents = pdataOld.events;\n\n\t\tif ( events ) {\n\t\t\tdelete pdataCur.handle;\n\t\t\tpdataCur.events = {};\n\n\t\t\tfor ( type in events ) {\n\t\t\t\tfor ( i = 0, l = events[ type ].length; i < l; i++ ) {\n\t\t\t\t\tjQuery.event.add( dest, type, events[ type ][ i ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// 2. Copy user data\n\tif ( data_user.hasData( src ) ) {\n\t\tudataOld = data_user.access( src );\n\t\tudataCur = jQuery.extend( {}, udataOld );\n\n\t\tdata_user.set( dest, udataCur );\n\t}\n}\n\nfunction getAll( context, tag ) {\n\tvar ret = context.getElementsByTagName ? context.getElementsByTagName( tag || \"*\" ) :\n\t\t\tcontext.querySelectorAll ? context.querySelectorAll( tag || \"*\" ) :\n\t\t\t[];\n\n\treturn tag === undefined || tag && jQuery.nodeName( context, tag ) ?\n\t\tjQuery.merge( [ context ], ret ) :\n\t\tret;\n}\n\n// Fix IE bugs, see support tests\nfunction fixInput( src, dest ) {\n\tvar nodeName = dest.nodeName.toLowerCase();\n\n\t// Fails to persist the checked state of a cloned checkbox or radio button.\n\tif ( nodeName === \"input\" && rcheckableType.test( src.type ) ) {\n\t\tdest.checked = src.checked;\n\n\t// Fails to return the selected option to the default selected state when cloning options\n\t} else if ( nodeName === \"input\" || nodeName === \"textarea\" ) {\n\t\tdest.defaultValue = src.defaultValue;\n\t}\n}\n\njQuery.extend({\n\tclone: function( elem, dataAndEvents, deepDataAndEvents ) {\n\t\tvar i, l, srcElements, destElements,\n\t\t\tclone = elem.cloneNode( true ),\n\t\t\tinPage = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t// Fix IE cloning issues\n\t\tif ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) &&\n\t\t\t\t!jQuery.isXMLDoc( elem ) ) {\n\n\t\t\t// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2\n\t\t\tdestElements = getAll( clone );\n\t\t\tsrcElements = getAll( elem );\n\n\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\tfixInput( srcElements[ i ], destElements[ i ] );\n\t\t\t}\n\t\t}\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( dataAndEvents ) {\n\t\t\tif ( deepDataAndEvents ) {\n\t\t\t\tsrcElements = srcElements || getAll( elem );\n\t\t\t\tdestElements = destElements || getAll( clone );\n\n\t\t\t\tfor ( i = 0, l = srcElements.length; i < l; i++ ) {\n\t\t\t\t\tcloneCopyEvent( srcElements[ i ], destElements[ i ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcloneCopyEvent( elem, clone );\n\t\t\t}\n\t\t}\n\n\t\t// Preserve script evaluation history\n\t\tdestElements = getAll( clone, \"script\" );\n\t\tif ( destElements.length > 0 ) {\n\t\t\tsetGlobalEval( destElements, !inPage && getAll( elem, \"script\" ) );\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn clone;\n\t},\n\n\tbuildFragment: function( elems, context, scripts, selection ) {\n\t\tvar elem, tmp, tag, wrap, contains, j,\n\t\t\tfragment = context.createDocumentFragment(),\n\t\t\tnodes = [],\n\t\t\ti = 0,\n\t\t\tl = elems.length;\n\n\t\tfor ( ; i < l; i++ ) {\n\t\t\telem = elems[ i ];\n\n\t\t\tif ( elem || elem === 0 ) {\n\n\t\t\t\t// Add nodes directly\n\t\t\t\tif ( jQuery.type( elem ) === \"object\" ) {\n\t\t\t\t\t// Support: QtWebKit, PhantomJS\n\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\tjQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );\n\n\t\t\t\t// Convert non-html into a text node\n\t\t\t\t} else if ( !rhtml.test( elem ) ) {\n\t\t\t\t\tnodes.push( context.createTextNode( elem ) );\n\n\t\t\t\t// Convert html into DOM nodes\n\t\t\t\t} else {\n\t\t\t\t\ttmp = tmp || fragment.appendChild( context.createElement(\"div\") );\n\n\t\t\t\t\t// Deserialize a standard representation\n\t\t\t\t\ttag = ( rtagName.exec( elem ) || [ \"\", \"\" ] )[ 1 ].toLowerCase();\n\t\t\t\t\twrap = wrapMap[ tag ] || wrapMap._default;\n\t\t\t\t\ttmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, \"<$1></$2>\" ) + wrap[ 2 ];\n\n\t\t\t\t\t// Descend through wrappers to the right content\n\t\t\t\t\tj = wrap[ 0 ];\n\t\t\t\t\twhile ( j-- ) {\n\t\t\t\t\t\ttmp = tmp.lastChild;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Support: QtWebKit, PhantomJS\n\t\t\t\t\t// push.apply(_, arraylike) throws on ancient WebKit\n\t\t\t\t\tjQuery.merge( nodes, tmp.childNodes );\n\n\t\t\t\t\t// Remember the top-level container\n\t\t\t\t\ttmp = fragment.firstChild;\n\n\t\t\t\t\t// Ensure the created nodes are orphaned (#12392)\n\t\t\t\t\ttmp.textContent = \"\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Remove wrapper from fragment\n\t\tfragment.textContent = \"\";\n\n\t\ti = 0;\n\t\twhile ( (elem = nodes[ i++ ]) ) {\n\n\t\t\t// #4087 - If origin and destination elements are the same, and this is\n\t\t\t// that element, do not do anything\n\t\t\tif ( selection && jQuery.inArray( elem, selection ) !== -1 ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tcontains = jQuery.contains( elem.ownerDocument, elem );\n\n\t\t\t// Append to fragment\n\t\t\ttmp = getAll( fragment.appendChild( elem ), \"script\" );\n\n\t\t\t// Preserve script evaluation history\n\t\t\tif ( contains ) {\n\t\t\t\tsetGlobalEval( tmp );\n\t\t\t}\n\n\t\t\t// Capture executables\n\t\t\tif ( scripts ) {\n\t\t\t\tj = 0;\n\t\t\t\twhile ( (elem = tmp[ j++ ]) ) {\n\t\t\t\t\tif ( rscriptType.test( elem.type || \"\" ) ) {\n\t\t\t\t\t\tscripts.push( elem );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn fragment;\n\t},\n\n\tcleanData: function( elems ) {\n\t\tvar data, elem, type, key,\n\t\t\tspecial = jQuery.event.special,\n\t\t\ti = 0;\n\n\t\tfor ( ; (elem = elems[ i ]) !== undefined; i++ ) {\n\t\t\tif ( jQuery.acceptData( elem ) ) {\n\t\t\t\tkey = elem[ data_priv.expando ];\n\n\t\t\t\tif ( key && (data = data_priv.cache[ key ]) ) {\n\t\t\t\t\tif ( data.events ) {\n\t\t\t\t\t\tfor ( type in data.events ) {\n\t\t\t\t\t\t\tif ( special[ type ] ) {\n\t\t\t\t\t\t\t\tjQuery.event.remove( elem, type );\n\n\t\t\t\t\t\t\t// This is a shortcut to avoid jQuery.event.remove's overhead\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.removeEvent( elem, type, data.handle );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ( data_priv.cache[ key ] ) {\n\t\t\t\t\t\t// Discard any remaining `private` data\n\t\t\t\t\t\tdelete data_priv.cache[ key ];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Discard any remaining `user` data\n\t\t\tdelete data_user.cache[ elem[ data_user.expando ] ];\n\t\t}\n\t}\n});\n\njQuery.fn.extend({\n\ttext: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\treturn value === undefined ?\n\t\t\t\tjQuery.text( this ) :\n\t\t\t\tthis.empty().each(function() {\n\t\t\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\t\t\tthis.textContent = value;\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t}, null, value, arguments.length );\n\t},\n\n\tappend: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.appendChild( elem );\n\t\t\t}\n\t\t});\n\t},\n\n\tprepend: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {\n\t\t\t\tvar target = manipulationTarget( this, elem );\n\t\t\t\ttarget.insertBefore( elem, target.firstChild );\n\t\t\t}\n\t\t});\n\t},\n\n\tbefore: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t\t}\n\t\t});\n\t},\n\n\tafter: function() {\n\t\treturn this.domManip( arguments, function( elem ) {\n\t\t\tif ( this.parentNode ) {\n\t\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t\t}\n\t\t});\n\t},\n\n\tremove: function( selector, keepData /* Internal Use Only */ ) {\n\t\tvar elem,\n\t\t\telems = selector ? jQuery.filter( selector, this ) : this,\n\t\t\ti = 0;\n\n\t\tfor ( ; (elem = elems[i]) != null; i++ ) {\n\t\t\tif ( !keepData && elem.nodeType === 1 ) {\n\t\t\t\tjQuery.cleanData( getAll( elem ) );\n\t\t\t}\n\n\t\t\tif ( elem.parentNode ) {\n\t\t\t\tif ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\t\t\tsetGlobalEval( getAll( elem, \"script\" ) );\n\t\t\t\t}\n\t\t\t\telem.parentNode.removeChild( elem );\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tempty: function() {\n\t\tvar elem,\n\t\t\ti = 0;\n\n\t\tfor ( ; (elem = this[i]) != null; i++ ) {\n\t\t\tif ( elem.nodeType === 1 ) {\n\n\t\t\t\t// Prevent memory leaks\n\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\n\t\t\t\t// Remove any remaining nodes\n\t\t\t\telem.textContent = \"\";\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tclone: function( dataAndEvents, deepDataAndEvents ) {\n\t\tdataAndEvents = dataAndEvents == null ? false : dataAndEvents;\n\t\tdeepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;\n\n\t\treturn this.map(function() {\n\t\t\treturn jQuery.clone( this, dataAndEvents, deepDataAndEvents );\n\t\t});\n\t},\n\n\thtml: function( value ) {\n\t\treturn access( this, function( value ) {\n\t\t\tvar elem = this[ 0 ] || {},\n\t\t\t\ti = 0,\n\t\t\t\tl = this.length;\n\n\t\t\tif ( value === undefined && elem.nodeType === 1 ) {\n\t\t\t\treturn elem.innerHTML;\n\t\t\t}\n\n\t\t\t// See if we can take a shortcut and just use innerHTML\n\t\t\tif ( typeof value === \"string\" && !rnoInnerhtml.test( value ) &&\n\t\t\t\t!wrapMap[ ( rtagName.exec( value ) || [ \"\", \"\" ] )[ 1 ].toLowerCase() ] ) {\n\n\t\t\t\tvalue = value.replace( rxhtmlTag, \"<$1></$2>\" );\n\n\t\t\t\ttry {\n\t\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\t\telem = this[ i ] || {};\n\n\t\t\t\t\t\t// Remove element nodes and prevent memory leaks\n\t\t\t\t\t\tif ( elem.nodeType === 1 ) {\n\t\t\t\t\t\t\tjQuery.cleanData( getAll( elem, false ) );\n\t\t\t\t\t\t\telem.innerHTML = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\telem = 0;\n\n\t\t\t\t// If using innerHTML throws an exception, use the fallback method\n\t\t\t\t} catch( e ) {}\n\t\t\t}\n\n\t\t\tif ( elem ) {\n\t\t\t\tthis.empty().append( value );\n\t\t\t}\n\t\t}, null, value, arguments.length );\n\t},\n\n\treplaceWith: function() {\n\t\tvar arg = arguments[ 0 ];\n\n\t\t// Make the changes, replacing each context element with the new content\n\t\tthis.domManip( arguments, function( elem ) {\n\t\t\targ = this.parentNode;\n\n\t\t\tjQuery.cleanData( getAll( this ) );\n\n\t\t\tif ( arg ) {\n\t\t\t\targ.replaceChild( elem, this );\n\t\t\t}\n\t\t});\n\n\t\t// Force removal if there was no new content (e.g., from empty arguments)\n\t\treturn arg && (arg.length || arg.nodeType) ? this : this.remove();\n\t},\n\n\tdetach: function( selector ) {\n\t\treturn this.remove( selector, true );\n\t},\n\n\tdomManip: function( args, callback ) {\n\n\t\t// Flatten any nested arrays\n\t\targs = concat.apply( [], args );\n\n\t\tvar fragment, first, scripts, hasScripts, node, doc,\n\t\t\ti = 0,\n\t\t\tl = this.length,\n\t\t\tset = this,\n\t\t\tiNoClone = l - 1,\n\t\t\tvalue = args[ 0 ],\n\t\t\tisFunction = jQuery.isFunction( value );\n\n\t\t// We can't cloneNode fragments that contain checked, in WebKit\n\t\tif ( isFunction ||\n\t\t\t\t( l > 1 && typeof value === \"string\" &&\n\t\t\t\t\t!support.checkClone && rchecked.test( value ) ) ) {\n\t\t\treturn this.each(function( index ) {\n\t\t\t\tvar self = set.eq( index );\n\t\t\t\tif ( isFunction ) {\n\t\t\t\t\targs[ 0 ] = value.call( this, index, self.html() );\n\t\t\t\t}\n\t\t\t\tself.domManip( args, callback );\n\t\t\t});\n\t\t}\n\n\t\tif ( l ) {\n\t\t\tfragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this );\n\t\t\tfirst = fragment.firstChild;\n\n\t\t\tif ( fragment.childNodes.length === 1 ) {\n\t\t\t\tfragment = first;\n\t\t\t}\n\n\t\t\tif ( first ) {\n\t\t\t\tscripts = jQuery.map( getAll( fragment, \"script\" ), disableScript );\n\t\t\t\thasScripts = scripts.length;\n\n\t\t\t\t// Use the original fragment for the last item instead of the first because it can end up\n\t\t\t\t// being emptied incorrectly in certain situations (#8070).\n\t\t\t\tfor ( ; i < l; i++ ) {\n\t\t\t\t\tnode = fragment;\n\n\t\t\t\t\tif ( i !== iNoClone ) {\n\t\t\t\t\t\tnode = jQuery.clone( node, true, true );\n\n\t\t\t\t\t\t// Keep references to cloned scripts for later restoration\n\t\t\t\t\t\tif ( hasScripts ) {\n\t\t\t\t\t\t\t// Support: QtWebKit\n\t\t\t\t\t\t\t// jQuery.merge because push.apply(_, arraylike) throws\n\t\t\t\t\t\t\tjQuery.merge( scripts, getAll( node, \"script\" ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tcallback.call( this[ i ], node, i );\n\t\t\t\t}\n\n\t\t\t\tif ( hasScripts ) {\n\t\t\t\t\tdoc = scripts[ scripts.length - 1 ].ownerDocument;\n\n\t\t\t\t\t// Reenable scripts\n\t\t\t\t\tjQuery.map( scripts, restoreScript );\n\n\t\t\t\t\t// Evaluate executable scripts on first document insertion\n\t\t\t\t\tfor ( i = 0; i < hasScripts; i++ ) {\n\t\t\t\t\t\tnode = scripts[ i ];\n\t\t\t\t\t\tif ( rscriptType.test( node.type || \"\" ) &&\n\t\t\t\t\t\t\t!data_priv.access( node, \"globalEval\" ) && jQuery.contains( doc, node ) ) {\n\n\t\t\t\t\t\t\tif ( node.src ) {\n\t\t\t\t\t\t\t\t// Optional AJAX dependency, but won't run scripts if not present\n\t\t\t\t\t\t\t\tif ( jQuery._evalUrl ) {\n\t\t\t\t\t\t\t\t\tjQuery._evalUrl( node.src );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery.globalEval( node.textContent.replace( rcleanScript, \"\" ) );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t}\n});\n\njQuery.each({\n\tappendTo: \"append\",\n\tprependTo: \"prepend\",\n\tinsertBefore: \"before\",\n\tinsertAfter: \"after\",\n\treplaceAll: \"replaceWith\"\n}, function( name, original ) {\n\tjQuery.fn[ name ] = function( selector ) {\n\t\tvar elems,\n\t\t\tret = [],\n\t\t\tinsert = jQuery( selector ),\n\t\t\tlast = insert.length - 1,\n\t\t\ti = 0;\n\n\t\tfor ( ; i <= last; i++ ) {\n\t\t\telems = i === last ? this : this.clone( true );\n\t\t\tjQuery( insert[ i ] )[ original ]( elems );\n\n\t\t\t// Support: QtWebKit\n\t\t\t// .get() because push.apply(_, arraylike) throws\n\t\t\tpush.apply( ret, elems.get() );\n\t\t}\n\n\t\treturn this.pushStack( ret );\n\t};\n});\n\n\nvar iframe,\n\telemdisplay = {};\n\n/**\n * Retrieve the actual display of a element\n * @param {String} name nodeName of the element\n * @param {Object} doc Document object\n */\n// Called only from within defaultDisplay\nfunction actualDisplay( name, doc ) {\n\tvar style,\n\t\telem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),\n\n\t\t// getDefaultComputedStyle might be reliably used only on attached element\n\t\tdisplay = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ?\n\n\t\t\t// Use of this method is a temporary fix (more like optimization) until something better comes along,\n\t\t\t// since it was removed from specification and supported only in FF\n\t\t\tstyle.display : jQuery.css( elem[ 0 ], \"display\" );\n\n\t// We don't have any data stored on the element,\n\t// so use \"detach\" method as fast way to get rid of the element\n\telem.detach();\n\n\treturn display;\n}\n\n/**\n * Try to determine the default display value of an element\n * @param {String} nodeName\n */\nfunction defaultDisplay( nodeName ) {\n\tvar doc = document,\n\t\tdisplay = elemdisplay[ nodeName ];\n\n\tif ( !display ) {\n\t\tdisplay = actualDisplay( nodeName, doc );\n\n\t\t// If the simple way fails, read from inside an iframe\n\t\tif ( display === \"none\" || !display ) {\n\n\t\t\t// Use the already-created iframe if possible\n\t\t\tiframe = (iframe || jQuery( \"<iframe frameborder='0' width='0' height='0'/>\" )).appendTo( doc.documentElement );\n\n\t\t\t// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse\n\t\t\tdoc = iframe[ 0 ].contentDocument;\n\n\t\t\t// Support: IE\n\t\t\tdoc.write();\n\t\t\tdoc.close();\n\n\t\t\tdisplay = actualDisplay( nodeName, doc );\n\t\t\tiframe.detach();\n\t\t}\n\n\t\t// Store the correct default display\n\t\telemdisplay[ nodeName ] = display;\n\t}\n\n\treturn display;\n}\nvar rmargin = (/^margin/);\n\nvar rnumnonpx = new RegExp( \"^(\" + pnum + \")(?!px)[a-z%]+$\", \"i\" );\n\nvar getStyles = function( elem ) {\n\t\t// Support: IE<=11+, Firefox<=30+ (#15098, #14150)\n\t\t// IE throws on elements created in popups\n\t\t// FF meanwhile throws on frame elements through \"defaultView.getComputedStyle\"\n\t\tif ( elem.ownerDocument.defaultView.opener ) {\n\t\t\treturn elem.ownerDocument.defaultView.getComputedStyle( elem, null );\n\t\t}\n\n\t\treturn window.getComputedStyle( elem, null );\n\t};\n\n\n\nfunction curCSS( elem, name, computed ) {\n\tvar width, minWidth, maxWidth, ret,\n\t\tstyle = elem.style;\n\n\tcomputed = computed || getStyles( elem );\n\n\t// Support: IE9\n\t// getPropertyValue is only needed for .css('filter') (#12537)\n\tif ( computed ) {\n\t\tret = computed.getPropertyValue( name ) || computed[ name ];\n\t}\n\n\tif ( computed ) {\n\n\t\tif ( ret === \"\" && !jQuery.contains( elem.ownerDocument, elem ) ) {\n\t\t\tret = jQuery.style( elem, name );\n\t\t}\n\n\t\t// Support: iOS < 6\n\t\t// A tribute to the \"awesome hack by Dean Edwards\"\n\t\t// iOS < 6 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels\n\t\t// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values\n\t\tif ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {\n\n\t\t\t// Remember the original values\n\t\t\twidth = style.width;\n\t\t\tminWidth = style.minWidth;\n\t\t\tmaxWidth = style.maxWidth;\n\n\t\t\t// Put in the new values to get a computed value out\n\t\t\tstyle.minWidth = style.maxWidth = style.width = ret;\n\t\t\tret = computed.width;\n\n\t\t\t// Revert the changed values\n\t\t\tstyle.width = width;\n\t\t\tstyle.minWidth = minWidth;\n\t\t\tstyle.maxWidth = maxWidth;\n\t\t}\n\t}\n\n\treturn ret !== undefined ?\n\t\t// Support: IE\n\t\t// IE returns zIndex value as an integer.\n\t\tret + \"\" :\n\t\tret;\n}\n\n\nfunction addGetHookIf( conditionFn, hookFn ) {\n\t// Define the hook, we'll check on the first run if it's really needed.\n\treturn {\n\t\tget: function() {\n\t\t\tif ( conditionFn() ) {\n\t\t\t\t// Hook not needed (or it's not possible to use it due\n\t\t\t\t// to missing dependency), remove it.\n\t\t\t\tdelete this.get;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Hook needed; redefine it so that the support test is not executed again.\n\t\t\treturn (this.get = hookFn).apply( this, arguments );\n\t\t}\n\t};\n}\n\n\n(function() {\n\tvar pixelPositionVal, boxSizingReliableVal,\n\t\tdocElem = document.documentElement,\n\t\tcontainer = document.createElement( \"div\" ),\n\t\tdiv = document.createElement( \"div\" );\n\n\tif ( !div.style ) {\n\t\treturn;\n\t}\n\n\t// Support: IE9-11+\n\t// Style of cloned element affects source element cloned (#8908)\n\tdiv.style.backgroundClip = \"content-box\";\n\tdiv.cloneNode( true ).style.backgroundClip = \"\";\n\tsupport.clearCloneStyle = div.style.backgroundClip === \"content-box\";\n\n\tcontainer.style.cssText = \"border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;\" +\n\t\t\"position:absolute\";\n\tcontainer.appendChild( div );\n\n\t// Executing both pixelPosition & boxSizingReliable tests require only one layout\n\t// so they're executed at the same time to save the second computation.\n\tfunction computePixelPositionAndBoxSizingReliable() {\n\t\tdiv.style.cssText =\n\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t// Vendor-prefix box-sizing\n\t\t\t\"-webkit-box-sizing:border-box;-moz-box-sizing:border-box;\" +\n\t\t\t\"box-sizing:border-box;display:block;margin-top:1%;top:1%;\" +\n\t\t\t\"border:1px;padding:1px;width:4px;position:absolute\";\n\t\tdiv.innerHTML = \"\";\n\t\tdocElem.appendChild( container );\n\n\t\tvar divStyle = window.getComputedStyle( div, null );\n\t\tpixelPositionVal = divStyle.top !== \"1%\";\n\t\tboxSizingReliableVal = divStyle.width === \"4px\";\n\n\t\tdocElem.removeChild( container );\n\t}\n\n\t// Support: node.js jsdom\n\t// Don't assume that getComputedStyle is a property of the global object\n\tif ( window.getComputedStyle ) {\n\t\tjQuery.extend( support, {\n\t\t\tpixelPosition: function() {\n\n\t\t\t\t// This test is executed only once but we still do memoizing\n\t\t\t\t// since we can use the boxSizingReliable pre-computing.\n\t\t\t\t// No need to check if the test was already performed, though.\n\t\t\t\tcomputePixelPositionAndBoxSizingReliable();\n\t\t\t\treturn pixelPositionVal;\n\t\t\t},\n\t\t\tboxSizingReliable: function() {\n\t\t\t\tif ( boxSizingReliableVal == null ) {\n\t\t\t\t\tcomputePixelPositionAndBoxSizingReliable();\n\t\t\t\t}\n\t\t\t\treturn boxSizingReliableVal;\n\t\t\t},\n\t\t\treliableMarginRight: function() {\n\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Check if div with explicit width and no margin-right incorrectly\n\t\t\t\t// gets computed margin-right based on width of container. (#3333)\n\t\t\t\t// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right\n\t\t\t\t// This support function is only executed once so no memoizing is needed.\n\t\t\t\tvar ret,\n\t\t\t\t\tmarginDiv = div.appendChild( document.createElement( \"div\" ) );\n\n\t\t\t\t// Reset CSS: box-sizing; display; margin; border; padding\n\t\t\t\tmarginDiv.style.cssText = div.style.cssText =\n\t\t\t\t\t// Support: Firefox<29, Android 2.3\n\t\t\t\t\t// Vendor-prefix box-sizing\n\t\t\t\t\t\"-webkit-box-sizing:content-box;-moz-box-sizing:content-box;\" +\n\t\t\t\t\t\"box-sizing:content-box;display:block;margin:0;border:0;padding:0\";\n\t\t\t\tmarginDiv.style.marginRight = marginDiv.style.width = \"0\";\n\t\t\t\tdiv.style.width = \"1px\";\n\t\t\t\tdocElem.appendChild( container );\n\n\t\t\t\tret = !parseFloat( window.getComputedStyle( marginDiv, null ).marginRight );\n\n\t\t\t\tdocElem.removeChild( container );\n\t\t\t\tdiv.removeChild( marginDiv );\n\n\t\t\t\treturn ret;\n\t\t\t}\n\t\t});\n\t}\n})();\n\n\n// A method for quickly swapping in/out CSS properties to get correct calculations.\njQuery.swap = function( elem, options, callback, args ) {\n\tvar ret, name,\n\t\told = {};\n\n\t// Remember the old values, and insert the new ones\n\tfor ( name in options ) {\n\t\told[ name ] = elem.style[ name ];\n\t\telem.style[ name ] = options[ name ];\n\t}\n\n\tret = callback.apply( elem, args || [] );\n\n\t// Revert the old values\n\tfor ( name in options ) {\n\t\telem.style[ name ] = old[ name ];\n\t}\n\n\treturn ret;\n};\n\n\nvar\n\t// Swappable if display is none or starts with table except \"table\", \"table-cell\", or \"table-caption\"\n\t// See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display\n\trdisplayswap = /^(none|table(?!-c[ea]).+)/,\n\trnumsplit = new RegExp( \"^(\" + pnum + \")(.*)$\", \"i\" ),\n\trrelNum = new RegExp( \"^([+-])=(\" + pnum + \")\", \"i\" ),\n\n\tcssShow = { position: \"absolute\", visibility: \"hidden\", display: \"block\" },\n\tcssNormalTransform = {\n\t\tletterSpacing: \"0\",\n\t\tfontWeight: \"400\"\n\t},\n\n\tcssPrefixes = [ \"Webkit\", \"O\", \"Moz\", \"ms\" ];\n\n// Return a css property mapped to a potentially vendor prefixed property\nfunction vendorPropName( style, name ) {\n\n\t// Shortcut for names that are not vendor prefixed\n\tif ( name in style ) {\n\t\treturn name;\n\t}\n\n\t// Check for vendor prefixed names\n\tvar capName = name[0].toUpperCase() + name.slice(1),\n\t\torigName = name,\n\t\ti = cssPrefixes.length;\n\n\twhile ( i-- ) {\n\t\tname = cssPrefixes[ i ] + capName;\n\t\tif ( name in style ) {\n\t\t\treturn name;\n\t\t}\n\t}\n\n\treturn origName;\n}\n\nfunction setPositiveNumber( elem, value, subtract ) {\n\tvar matches = rnumsplit.exec( value );\n\treturn matches ?\n\t\t// Guard against undefined \"subtract\", e.g., when used as in cssHooks\n\t\tMath.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || \"px\" ) :\n\t\tvalue;\n}\n\nfunction augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {\n\tvar i = extra === ( isBorderBox ? \"border\" : \"content\" ) ?\n\t\t// If we already have the right measurement, avoid augmentation\n\t\t4 :\n\t\t// Otherwise initialize for horizontal or vertical properties\n\t\tname === \"width\" ? 1 : 0,\n\n\t\tval = 0;\n\n\tfor ( ; i < 4; i += 2 ) {\n\t\t// Both box models exclude margin, so add it if we want it\n\t\tif ( extra === \"margin\" ) {\n\t\t\tval += jQuery.css( elem, extra + cssExpand[ i ], true, styles );\n\t\t}\n\n\t\tif ( isBorderBox ) {\n\t\t\t// border-box includes padding, so remove it if we want content\n\t\t\tif ( extra === \"content\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\t\t\t}\n\n\t\t\t// At this point, extra isn't border nor margin, so remove border\n\t\t\tif ( extra !== \"margin\" ) {\n\t\t\t\tval -= jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t} else {\n\t\t\t// At this point, extra isn't content, so add padding\n\t\t\tval += jQuery.css( elem, \"padding\" + cssExpand[ i ], true, styles );\n\n\t\t\t// At this point, extra isn't content nor padding, so add border\n\t\t\tif ( extra !== \"padding\" ) {\n\t\t\t\tval += jQuery.css( elem, \"border\" + cssExpand[ i ] + \"Width\", true, styles );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn val;\n}\n\nfunction getWidthOrHeight( elem, name, extra ) {\n\n\t// Start with offset property, which is equivalent to the border-box value\n\tvar valueIsBorderBox = true,\n\t\tval = name === \"width\" ? elem.offsetWidth : elem.offsetHeight,\n\t\tstyles = getStyles( elem ),\n\t\tisBorderBox = jQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\";\n\n\t// Some non-html elements return undefined for offsetWidth, so check for null/undefined\n\t// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285\n\t// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668\n\tif ( val <= 0 || val == null ) {\n\t\t// Fall back to computed then uncomputed css if necessary\n\t\tval = curCSS( elem, name, styles );\n\t\tif ( val < 0 || val == null ) {\n\t\t\tval = elem.style[ name ];\n\t\t}\n\n\t\t// Computed unit is not pixels. Stop here and return.\n\t\tif ( rnumnonpx.test(val) ) {\n\t\t\treturn val;\n\t\t}\n\n\t\t// Check for style in case a browser which returns unreliable values\n\t\t// for getComputedStyle silently falls back to the reliable elem.style\n\t\tvalueIsBorderBox = isBorderBox &&\n\t\t\t( support.boxSizingReliable() || val === elem.style[ name ] );\n\n\t\t// Normalize \"\", auto, and prepare for extra\n\t\tval = parseFloat( val ) || 0;\n\t}\n\n\t// Use the active box-sizing model to add/subtract irrelevant styles\n\treturn ( val +\n\t\taugmentWidthOrHeight(\n\t\t\telem,\n\t\t\tname,\n\t\t\textra || ( isBorderBox ? \"border\" : \"content\" ),\n\t\t\tvalueIsBorderBox,\n\t\t\tstyles\n\t\t)\n\t) + \"px\";\n}\n\nfunction showHide( elements, show ) {\n\tvar display, elem, hidden,\n\t\tvalues = [],\n\t\tindex = 0,\n\t\tlength = elements.length;\n\n\tfor ( ; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tvalues[ index ] = data_priv.get( elem, \"olddisplay\" );\n\t\tdisplay = elem.style.display;\n\t\tif ( show ) {\n\t\t\t// Reset the inline display of this element to learn if it is\n\t\t\t// being hidden by cascaded rules or not\n\t\t\tif ( !values[ index ] && display === \"none\" ) {\n\t\t\t\telem.style.display = \"\";\n\t\t\t}\n\n\t\t\t// Set elements which have been overridden with display: none\n\t\t\t// in a stylesheet to whatever the default browser style is\n\t\t\t// for such an element\n\t\t\tif ( elem.style.display === \"\" && isHidden( elem ) ) {\n\t\t\t\tvalues[ index ] = data_priv.access( elem, \"olddisplay\", defaultDisplay(elem.nodeName) );\n\t\t\t}\n\t\t} else {\n\t\t\thidden = isHidden( elem );\n\n\t\t\tif ( display !== \"none\" || !hidden ) {\n\t\t\t\tdata_priv.set( elem, \"olddisplay\", hidden ? display : jQuery.css( elem, \"display\" ) );\n\t\t\t}\n\t\t}\n\t}\n\n\t// Set the display of most of the elements in a second loop\n\t// to avoid the constant reflow\n\tfor ( index = 0; index < length; index++ ) {\n\t\telem = elements[ index ];\n\t\tif ( !elem.style ) {\n\t\t\tcontinue;\n\t\t}\n\t\tif ( !show || elem.style.display === \"none\" || elem.style.display === \"\" ) {\n\t\t\telem.style.display = show ? values[ index ] || \"\" : \"none\";\n\t\t}\n\t}\n\n\treturn elements;\n}\n\njQuery.extend({\n\n\t// Add in style property hooks for overriding the default\n\t// behavior of getting and setting a style property\n\tcssHooks: {\n\t\topacity: {\n\t\t\tget: function( elem, computed ) {\n\t\t\t\tif ( computed ) {\n\n\t\t\t\t\t// We should always get a number back from opacity\n\t\t\t\t\tvar ret = curCSS( elem, \"opacity\" );\n\t\t\t\t\treturn ret === \"\" ? \"1\" : ret;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t// Don't automatically add \"px\" to these possibly-unitless properties\n\tcssNumber: {\n\t\t\"columnCount\": true,\n\t\t\"fillOpacity\": true,\n\t\t\"flexGrow\": true,\n\t\t\"flexShrink\": true,\n\t\t\"fontWeight\": true,\n\t\t\"lineHeight\": true,\n\t\t\"opacity\": true,\n\t\t\"order\": true,\n\t\t\"orphans\": true,\n\t\t\"widows\": true,\n\t\t\"zIndex\": true,\n\t\t\"zoom\": true\n\t},\n\n\t// Add in properties whose names you wish to fix before\n\t// setting or getting the value\n\tcssProps: {\n\t\t\"float\": \"cssFloat\"\n\t},\n\n\t// Get and set the style property on a DOM Node\n\tstyle: function( elem, name, value, extra ) {\n\n\t\t// Don't set styles on text and comment nodes\n\t\tif ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Make sure that we're working with the right name\n\t\tvar ret, type, hooks,\n\t\t\torigName = jQuery.camelCase( name ),\n\t\t\tstyle = elem.style;\n\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );\n\n\t\t// Gets hook for the prefixed version, then unprefixed version\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// Check if we're setting a value\n\t\tif ( value !== undefined ) {\n\t\t\ttype = typeof value;\n\n\t\t\t// Convert \"+=\" or \"-=\" to relative numbers (#7345)\n\t\t\tif ( type === \"string\" && (ret = rrelNum.exec( value )) ) {\n\t\t\t\tvalue = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );\n\t\t\t\t// Fixes bug #9237\n\t\t\t\ttype = \"number\";\n\t\t\t}\n\n\t\t\t// Make sure that null and NaN values aren't set (#7116)\n\t\t\tif ( value == null || value !== value ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If a number, add 'px' to the (except for certain CSS properties)\n\t\t\tif ( type === \"number\" && !jQuery.cssNumber[ origName ] ) {\n\t\t\t\tvalue += \"px\";\n\t\t\t}\n\n\t\t\t// Support: IE9-11+\n\t\t\t// background-* props affect original clone's values\n\t\t\tif ( !support.clearCloneStyle && value === \"\" && name.indexOf( \"background\" ) === 0 ) {\n\t\t\t\tstyle[ name ] = \"inherit\";\n\t\t\t}\n\n\t\t\t// If a hook was provided, use that value, otherwise just set the specified value\n\t\t\tif ( !hooks || !(\"set\" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {\n\t\t\t\tstyle[ name ] = value;\n\t\t\t}\n\n\t\t} else {\n\t\t\t// If a hook was provided get the non-computed value from there\n\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {\n\t\t\t\treturn ret;\n\t\t\t}\n\n\t\t\t// Otherwise just get the value from the style object\n\t\t\treturn style[ name ];\n\t\t}\n\t},\n\n\tcss: function( elem, name, extra, styles ) {\n\t\tvar val, num, hooks,\n\t\t\torigName = jQuery.camelCase( name );\n\n\t\t// Make sure that we're working with the right name\n\t\tname = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );\n\n\t\t// Try prefixed name followed by the unprefixed name\n\t\thooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];\n\n\t\t// If a hook was provided get the computed value from there\n\t\tif ( hooks && \"get\" in hooks ) {\n\t\t\tval = hooks.get( elem, true, extra );\n\t\t}\n\n\t\t// Otherwise, if a way to get the computed value exists, use that\n\t\tif ( val === undefined ) {\n\t\t\tval = curCSS( elem, name, styles );\n\t\t}\n\n\t\t// Convert \"normal\" to computed value\n\t\tif ( val === \"normal\" && name in cssNormalTransform ) {\n\t\t\tval = cssNormalTransform[ name ];\n\t\t}\n\n\t\t// Make numeric if forced or a qualifier was provided and val looks numeric\n\t\tif ( extra === \"\" || extra ) {\n\t\t\tnum = parseFloat( val );\n\t\t\treturn extra === true || jQuery.isNumeric( num ) ? num || 0 : val;\n\t\t}\n\t\treturn val;\n\t}\n});\n\njQuery.each([ \"height\", \"width\" ], function( i, name ) {\n\tjQuery.cssHooks[ name ] = {\n\t\tget: function( elem, computed, extra ) {\n\t\t\tif ( computed ) {\n\n\t\t\t\t// Certain elements can have dimension info if we invisibly show them\n\t\t\t\t// but it must have a current display style that would benefit\n\t\t\t\treturn rdisplayswap.test( jQuery.css( elem, \"display\" ) ) && elem.offsetWidth === 0 ?\n\t\t\t\t\tjQuery.swap( elem, cssShow, function() {\n\t\t\t\t\t\treturn getWidthOrHeight( elem, name, extra );\n\t\t\t\t\t}) :\n\t\t\t\t\tgetWidthOrHeight( elem, name, extra );\n\t\t\t}\n\t\t},\n\n\t\tset: function( elem, value, extra ) {\n\t\t\tvar styles = extra && getStyles( elem );\n\t\t\treturn setPositiveNumber( elem, value, extra ?\n\t\t\t\taugmentWidthOrHeight(\n\t\t\t\t\telem,\n\t\t\t\t\tname,\n\t\t\t\t\textra,\n\t\t\t\t\tjQuery.css( elem, \"boxSizing\", false, styles ) === \"border-box\",\n\t\t\t\t\tstyles\n\t\t\t\t) : 0\n\t\t\t);\n\t\t}\n\t};\n});\n\n// Support: Android 2.3\njQuery.cssHooks.marginRight = addGetHookIf( support.reliableMarginRight,\n\tfunction( elem, computed ) {\n\t\tif ( computed ) {\n\t\t\treturn jQuery.swap( elem, { \"display\": \"inline-block\" },\n\t\t\t\tcurCSS, [ elem, \"marginRight\" ] );\n\t\t}\n\t}\n);\n\n// These hooks are used by animate to expand properties\njQuery.each({\n\tmargin: \"\",\n\tpadding: \"\",\n\tborder: \"Width\"\n}, function( prefix, suffix ) {\n\tjQuery.cssHooks[ prefix + suffix ] = {\n\t\texpand: function( value ) {\n\t\t\tvar i = 0,\n\t\t\t\texpanded = {},\n\n\t\t\t\t// Assumes a single number if not a string\n\t\t\t\tparts = typeof value === \"string\" ? value.split(\" \") : [ value ];\n\n\t\t\tfor ( ; i < 4; i++ ) {\n\t\t\t\texpanded[ prefix + cssExpand[ i ] + suffix ] =\n\t\t\t\t\tparts[ i ] || parts[ i - 2 ] || parts[ 0 ];\n\t\t\t}\n\n\t\t\treturn expanded;\n\t\t}\n\t};\n\n\tif ( !rmargin.test( prefix ) ) {\n\t\tjQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;\n\t}\n});\n\njQuery.fn.extend({\n\tcss: function( name, value ) {\n\t\treturn access( this, function( elem, name, value ) {\n\t\t\tvar styles, len,\n\t\t\t\tmap = {},\n\t\t\t\ti = 0;\n\n\t\t\tif ( jQuery.isArray( name ) ) {\n\t\t\t\tstyles = getStyles( elem );\n\t\t\t\tlen = name.length;\n\n\t\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\t\tmap[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );\n\t\t\t\t}\n\n\t\t\t\treturn map;\n\t\t\t}\n\n\t\t\treturn value !== undefined ?\n\t\t\t\tjQuery.style( elem, name, value ) :\n\t\t\t\tjQuery.css( elem, name );\n\t\t}, name, value, arguments.length > 1 );\n\t},\n\tshow: function() {\n\t\treturn showHide( this, true );\n\t},\n\thide: function() {\n\t\treturn showHide( this );\n\t},\n\ttoggle: function( state ) {\n\t\tif ( typeof state === \"boolean\" ) {\n\t\t\treturn state ? this.show() : this.hide();\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tif ( isHidden( this ) ) {\n\t\t\t\tjQuery( this ).show();\n\t\t\t} else {\n\t\t\t\tjQuery( this ).hide();\n\t\t\t}\n\t\t});\n\t}\n});\n\n\nfunction Tween( elem, options, prop, end, easing ) {\n\treturn new Tween.prototype.init( elem, options, prop, end, easing );\n}\njQuery.Tween = Tween;\n\nTween.prototype = {\n\tconstructor: Tween,\n\tinit: function( elem, options, prop, end, easing, unit ) {\n\t\tthis.elem = elem;\n\t\tthis.prop = prop;\n\t\tthis.easing = easing || \"swing\";\n\t\tthis.options = options;\n\t\tthis.start = this.now = this.cur();\n\t\tthis.end = end;\n\t\tthis.unit = unit || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" );\n\t},\n\tcur: function() {\n\t\tvar hooks = Tween.propHooks[ this.prop ];\n\n\t\treturn hooks && hooks.get ?\n\t\t\thooks.get( this ) :\n\t\t\tTween.propHooks._default.get( this );\n\t},\n\trun: function( percent ) {\n\t\tvar eased,\n\t\t\thooks = Tween.propHooks[ this.prop ];\n\n\t\tif ( this.options.duration ) {\n\t\t\tthis.pos = eased = jQuery.easing[ this.easing ](\n\t\t\t\tpercent, this.options.duration * percent, 0, 1, this.options.duration\n\t\t\t);\n\t\t} else {\n\t\t\tthis.pos = eased = percent;\n\t\t}\n\t\tthis.now = ( this.end - this.start ) * eased + this.start;\n\n\t\tif ( this.options.step ) {\n\t\t\tthis.options.step.call( this.elem, this.now, this );\n\t\t}\n\n\t\tif ( hooks && hooks.set ) {\n\t\t\thooks.set( this );\n\t\t} else {\n\t\t\tTween.propHooks._default.set( this );\n\t\t}\n\t\treturn this;\n\t}\n};\n\nTween.prototype.init.prototype = Tween.prototype;\n\nTween.propHooks = {\n\t_default: {\n\t\tget: function( tween ) {\n\t\t\tvar result;\n\n\t\t\tif ( tween.elem[ tween.prop ] != null &&\n\t\t\t\t(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {\n\t\t\t\treturn tween.elem[ tween.prop ];\n\t\t\t}\n\n\t\t\t// Passing an empty string as a 3rd parameter to .css will automatically\n\t\t\t// attempt a parseFloat and fallback to a string if the parse fails.\n\t\t\t// Simple values such as \"10px\" are parsed to Float;\n\t\t\t// complex values such as \"rotate(1rad)\" are returned as-is.\n\t\t\tresult = jQuery.css( tween.elem, tween.prop, \"\" );\n\t\t\t// Empty strings, null, undefined and \"auto\" are converted to 0.\n\t\t\treturn !result || result === \"auto\" ? 0 : result;\n\t\t},\n\t\tset: function( tween ) {\n\t\t\t// Use step hook for back compat.\n\t\t\t// Use cssHook if its there.\n\t\t\t// Use .style if available and use plain properties where available.\n\t\t\tif ( jQuery.fx.step[ tween.prop ] ) {\n\t\t\t\tjQuery.fx.step[ tween.prop ]( tween );\n\t\t\t} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {\n\t\t\t\tjQuery.style( tween.elem, tween.prop, tween.now + tween.unit );\n\t\t\t} else {\n\t\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t\t}\n\t\t}\n\t}\n};\n\n// Support: IE9\n// Panic based approach to setting things on disconnected nodes\nTween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {\n\tset: function( tween ) {\n\t\tif ( tween.elem.nodeType && tween.elem.parentNode ) {\n\t\t\ttween.elem[ tween.prop ] = tween.now;\n\t\t}\n\t}\n};\n\njQuery.easing = {\n\tlinear: function( p ) {\n\t\treturn p;\n\t},\n\tswing: function( p ) {\n\t\treturn 0.5 - Math.cos( p * Math.PI ) / 2;\n\t}\n};\n\njQuery.fx = Tween.prototype.init;\n\n// Back Compat <1.8 extension point\njQuery.fx.step = {};\n\n\n\n\nvar\n\tfxNow, timerId,\n\trfxtypes = /^(?:toggle|show|hide)$/,\n\trfxnum = new RegExp( \"^(?:([+-])=|)(\" + pnum + \")([a-z%]*)$\", \"i\" ),\n\trrun = /queueHooks$/,\n\tanimationPrefilters = [ defaultPrefilter ],\n\ttweeners = {\n\t\t\"*\": [ function( prop, value ) {\n\t\t\tvar tween = this.createTween( prop, value ),\n\t\t\t\ttarget = tween.cur(),\n\t\t\t\tparts = rfxnum.exec( value ),\n\t\t\t\tunit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? \"\" : \"px\" ),\n\n\t\t\t\t// Starting value computation is required for potential unit mismatches\n\t\t\t\tstart = ( jQuery.cssNumber[ prop ] || unit !== \"px\" && +target ) &&\n\t\t\t\t\trfxnum.exec( jQuery.css( tween.elem, prop ) ),\n\t\t\t\tscale = 1,\n\t\t\t\tmaxIterations = 20;\n\n\t\t\tif ( start && start[ 3 ] !== unit ) {\n\t\t\t\t// Trust units reported by jQuery.css\n\t\t\t\tunit = unit || start[ 3 ];\n\n\t\t\t\t// Make sure we update the tween properties later on\n\t\t\t\tparts = parts || [];\n\n\t\t\t\t// Iteratively approximate from a nonzero starting point\n\t\t\t\tstart = +target || 1;\n\n\t\t\t\tdo {\n\t\t\t\t\t// If previous iteration zeroed out, double until we get *something*.\n\t\t\t\t\t// Use string for doubling so we don't accidentally see scale as unchanged below\n\t\t\t\t\tscale = scale || \".5\";\n\n\t\t\t\t\t// Adjust and apply\n\t\t\t\t\tstart = start / scale;\n\t\t\t\t\tjQuery.style( tween.elem, prop, start + unit );\n\n\t\t\t\t// Update scale, tolerating zero or NaN from tween.cur(),\n\t\t\t\t// break the loop if scale is unchanged or perfect, or if we've just had enough\n\t\t\t\t} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );\n\t\t\t}\n\n\t\t\t// Update tween properties\n\t\t\tif ( parts ) {\n\t\t\t\tstart = tween.start = +start || +target || 0;\n\t\t\t\ttween.unit = unit;\n\t\t\t\t// If a +=/-= token was provided, we're doing a relative animation\n\t\t\t\ttween.end = parts[ 1 ] ?\n\t\t\t\t\tstart + ( parts[ 1 ] + 1 ) * parts[ 2 ] :\n\t\t\t\t\t+parts[ 2 ];\n\t\t\t}\n\n\t\t\treturn tween;\n\t\t} ]\n\t};\n\n// Animations created synchronously will run synchronously\nfunction createFxNow() {\n\tsetTimeout(function() {\n\t\tfxNow = undefined;\n\t});\n\treturn ( fxNow = jQuery.now() );\n}\n\n// Generate parameters to create a standard animation\nfunction genFx( type, includeWidth ) {\n\tvar which,\n\t\ti = 0,\n\t\tattrs = { height: type };\n\n\t// If we include width, step value is 1 to do all cssExpand values,\n\t// otherwise step value is 2 to skip over Left and Right\n\tincludeWidth = includeWidth ? 1 : 0;\n\tfor ( ; i < 4 ; i += 2 - includeWidth ) {\n\t\twhich = cssExpand[ i ];\n\t\tattrs[ \"margin\" + which ] = attrs[ \"padding\" + which ] = type;\n\t}\n\n\tif ( includeWidth ) {\n\t\tattrs.opacity = attrs.width = type;\n\t}\n\n\treturn attrs;\n}\n\nfunction createTween( value, prop, animation ) {\n\tvar tween,\n\t\tcollection = ( tweeners[ prop ] || [] ).concat( tweeners[ \"*\" ] ),\n\t\tindex = 0,\n\t\tlength = collection.length;\n\tfor ( ; index < length; index++ ) {\n\t\tif ( (tween = collection[ index ].call( animation, prop, value )) ) {\n\n\t\t\t// We're done with this property\n\t\t\treturn tween;\n\t\t}\n\t}\n}\n\nfunction defaultPrefilter( elem, props, opts ) {\n\t/* jshint validthis: true */\n\tvar prop, value, toggle, tween, hooks, oldfire, display, checkDisplay,\n\t\tanim = this,\n\t\torig = {},\n\t\tstyle = elem.style,\n\t\thidden = elem.nodeType && isHidden( elem ),\n\t\tdataShow = data_priv.get( elem, \"fxshow\" );\n\n\t// Handle queue: false promises\n\tif ( !opts.queue ) {\n\t\thooks = jQuery._queueHooks( elem, \"fx\" );\n\t\tif ( hooks.unqueued == null ) {\n\t\t\thooks.unqueued = 0;\n\t\t\toldfire = hooks.empty.fire;\n\t\t\thooks.empty.fire = function() {\n\t\t\t\tif ( !hooks.unqueued ) {\n\t\t\t\t\toldfire();\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\t\thooks.unqueued++;\n\n\t\tanim.always(function() {\n\t\t\t// Ensure the complete handler is called before this completes\n\t\t\tanim.always(function() {\n\t\t\t\thooks.unqueued--;\n\t\t\t\tif ( !jQuery.queue( elem, \"fx\" ).length ) {\n\t\t\t\t\thooks.empty.fire();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\t// Height/width overflow pass\n\tif ( elem.nodeType === 1 && ( \"height\" in props || \"width\" in props ) ) {\n\t\t// Make sure that nothing sneaks out\n\t\t// Record all 3 overflow attributes because IE9-10 do not\n\t\t// change the overflow attribute when overflowX and\n\t\t// overflowY are set to the same value\n\t\topts.overflow = [ style.overflow, style.overflowX, style.overflowY ];\n\n\t\t// Set display property to inline-block for height/width\n\t\t// animations on inline elements that are having width/height animated\n\t\tdisplay = jQuery.css( elem, \"display\" );\n\n\t\t// Test default display if display is currently \"none\"\n\t\tcheckDisplay = display === \"none\" ?\n\t\t\tdata_priv.get( elem, \"olddisplay\" ) || defaultDisplay( elem.nodeName ) : display;\n\n\t\tif ( checkDisplay === \"inline\" && jQuery.css( elem, \"float\" ) === \"none\" ) {\n\t\t\tstyle.display = \"inline-block\";\n\t\t}\n\t}\n\n\tif ( opts.overflow ) {\n\t\tstyle.overflow = \"hidden\";\n\t\tanim.always(function() {\n\t\t\tstyle.overflow = opts.overflow[ 0 ];\n\t\t\tstyle.overflowX = opts.overflow[ 1 ];\n\t\t\tstyle.overflowY = opts.overflow[ 2 ];\n\t\t});\n\t}\n\n\t// show/hide pass\n\tfor ( prop in props ) {\n\t\tvalue = props[ prop ];\n\t\tif ( rfxtypes.exec( value ) ) {\n\t\t\tdelete props[ prop ];\n\t\t\ttoggle = toggle || value === \"toggle\";\n\t\t\tif ( value === ( hidden ? \"hide\" : \"show\" ) ) {\n\n\t\t\t\t// If there is dataShow left over from a stopped hide or show and we are going to proceed with show, we should pretend to be hidden\n\t\t\t\tif ( value === \"show\" && dataShow && dataShow[ prop ] !== undefined ) {\n\t\t\t\t\thidden = true;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\torig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );\n\n\t\t// Any non-fx value stops us from restoring the original display value\n\t\t} else {\n\t\t\tdisplay = undefined;\n\t\t}\n\t}\n\n\tif ( !jQuery.isEmptyObject( orig ) ) {\n\t\tif ( dataShow ) {\n\t\t\tif ( \"hidden\" in dataShow ) {\n\t\t\t\thidden = dataShow.hidden;\n\t\t\t}\n\t\t} else {\n\t\t\tdataShow = data_priv.access( elem, \"fxshow\", {} );\n\t\t}\n\n\t\t// Store state if its toggle - enables .stop().toggle() to \"reverse\"\n\t\tif ( toggle ) {\n\t\t\tdataShow.hidden = !hidden;\n\t\t}\n\t\tif ( hidden ) {\n\t\t\tjQuery( elem ).show();\n\t\t} else {\n\t\t\tanim.done(function() {\n\t\t\t\tjQuery( elem ).hide();\n\t\t\t});\n\t\t}\n\t\tanim.done(function() {\n\t\t\tvar prop;\n\n\t\t\tdata_priv.remove( elem, \"fxshow\" );\n\t\t\tfor ( prop in orig ) {\n\t\t\t\tjQuery.style( elem, prop, orig[ prop ] );\n\t\t\t}\n\t\t});\n\t\tfor ( prop in orig ) {\n\t\t\ttween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );\n\n\t\t\tif ( !( prop in dataShow ) ) {\n\t\t\t\tdataShow[ prop ] = tween.start;\n\t\t\t\tif ( hidden ) {\n\t\t\t\t\ttween.end = tween.start;\n\t\t\t\t\ttween.start = prop === \"width\" || prop === \"height\" ? 1 : 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t// If this is a noop like .hide().hide(), restore an overwritten display value\n\t} else if ( (display === \"none\" ? defaultDisplay( elem.nodeName ) : display) === \"inline\" ) {\n\t\tstyle.display = display;\n\t}\n}\n\nfunction propFilter( props, specialEasing ) {\n\tvar index, name, easing, value, hooks;\n\n\t// camelCase, specialEasing and expand cssHook pass\n\tfor ( index in props ) {\n\t\tname = jQuery.camelCase( index );\n\t\teasing = specialEasing[ name ];\n\t\tvalue = props[ index ];\n\t\tif ( jQuery.isArray( value ) ) {\n\t\t\teasing = value[ 1 ];\n\t\t\tvalue = props[ index ] = value[ 0 ];\n\t\t}\n\n\t\tif ( index !== name ) {\n\t\t\tprops[ name ] = value;\n\t\t\tdelete props[ index ];\n\t\t}\n\n\t\thooks = jQuery.cssHooks[ name ];\n\t\tif ( hooks && \"expand\" in hooks ) {\n\t\t\tvalue = hooks.expand( value );\n\t\t\tdelete props[ name ];\n\n\t\t\t// Not quite $.extend, this won't overwrite existing keys.\n\t\t\t// Reusing 'index' because we have the correct \"name\"\n\t\t\tfor ( index in value ) {\n\t\t\t\tif ( !( index in props ) ) {\n\t\t\t\t\tprops[ index ] = value[ index ];\n\t\t\t\t\tspecialEasing[ index ] = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tspecialEasing[ name ] = easing;\n\t\t}\n\t}\n}\n\nfunction Animation( elem, properties, options ) {\n\tvar result,\n\t\tstopped,\n\t\tindex = 0,\n\t\tlength = animationPrefilters.length,\n\t\tdeferred = jQuery.Deferred().always( function() {\n\t\t\t// Don't match elem in the :animated selector\n\t\t\tdelete tick.elem;\n\t\t}),\n\t\ttick = function() {\n\t\t\tif ( stopped ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tvar currentTime = fxNow || createFxNow(),\n\t\t\t\tremaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),\n\t\t\t\t// Support: Android 2.3\n\t\t\t\t// Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497)\n\t\t\t\ttemp = remaining / animation.duration || 0,\n\t\t\t\tpercent = 1 - temp,\n\t\t\t\tindex = 0,\n\t\t\t\tlength = animation.tweens.length;\n\n\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\tanimation.tweens[ index ].run( percent );\n\t\t\t}\n\n\t\t\tdeferred.notifyWith( elem, [ animation, percent, remaining ]);\n\n\t\t\tif ( percent < 1 && length ) {\n\t\t\t\treturn remaining;\n\t\t\t} else {\n\t\t\t\tdeferred.resolveWith( elem, [ animation ] );\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n\t\tanimation = deferred.promise({\n\t\t\telem: elem,\n\t\t\tprops: jQuery.extend( {}, properties ),\n\t\t\topts: jQuery.extend( true, { specialEasing: {} }, options ),\n\t\t\toriginalProperties: properties,\n\t\t\toriginalOptions: options,\n\t\t\tstartTime: fxNow || createFxNow(),\n\t\t\tduration: options.duration,\n\t\t\ttweens: [],\n\t\t\tcreateTween: function( prop, end ) {\n\t\t\t\tvar tween = jQuery.Tween( elem, animation.opts, prop, end,\n\t\t\t\t\t\tanimation.opts.specialEasing[ prop ] || animation.opts.easing );\n\t\t\t\tanimation.tweens.push( tween );\n\t\t\t\treturn tween;\n\t\t\t},\n\t\t\tstop: function( gotoEnd ) {\n\t\t\t\tvar index = 0,\n\t\t\t\t\t// If we are going to the end, we want to run all the tweens\n\t\t\t\t\t// otherwise we skip this part\n\t\t\t\t\tlength = gotoEnd ? animation.tweens.length : 0;\n\t\t\t\tif ( stopped ) {\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tstopped = true;\n\t\t\t\tfor ( ; index < length ; index++ ) {\n\t\t\t\t\tanimation.tweens[ index ].run( 1 );\n\t\t\t\t}\n\n\t\t\t\t// Resolve when we played the last frame; otherwise, reject\n\t\t\t\tif ( gotoEnd ) {\n\t\t\t\t\tdeferred.resolveWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t} else {\n\t\t\t\t\tdeferred.rejectWith( elem, [ animation, gotoEnd ] );\n\t\t\t\t}\n\t\t\t\treturn this;\n\t\t\t}\n\t\t}),\n\t\tprops = animation.props;\n\n\tpropFilter( props, animation.opts.specialEasing );\n\n\tfor ( ; index < length ; index++ ) {\n\t\tresult = animationPrefilters[ index ].call( animation, elem, props, animation.opts );\n\t\tif ( result ) {\n\t\t\treturn result;\n\t\t}\n\t}\n\n\tjQuery.map( props, createTween, animation );\n\n\tif ( jQuery.isFunction( animation.opts.start ) ) {\n\t\tanimation.opts.start.call( elem, animation );\n\t}\n\n\tjQuery.fx.timer(\n\t\tjQuery.extend( tick, {\n\t\t\telem: elem,\n\t\t\tanim: animation,\n\t\t\tqueue: animation.opts.queue\n\t\t})\n\t);\n\n\t// attach callbacks from options\n\treturn animation.progress( animation.opts.progress )\n\t\t.done( animation.opts.done, animation.opts.complete )\n\t\t.fail( animation.opts.fail )\n\t\t.always( animation.opts.always );\n}\n\njQuery.Animation = jQuery.extend( Animation, {\n\n\ttweener: function( props, callback ) {\n\t\tif ( jQuery.isFunction( props ) ) {\n\t\t\tcallback = props;\n\t\t\tprops = [ \"*\" ];\n\t\t} else {\n\t\t\tprops = props.split(\" \");\n\t\t}\n\n\t\tvar prop,\n\t\t\tindex = 0,\n\t\t\tlength = props.length;\n\n\t\tfor ( ; index < length ; index++ ) {\n\t\t\tprop = props[ index ];\n\t\t\ttweeners[ prop ] = tweeners[ prop ] || [];\n\t\t\ttweeners[ prop ].unshift( callback );\n\t\t}\n\t},\n\n\tprefilter: function( callback, prepend ) {\n\t\tif ( prepend ) {\n\t\t\tanimationPrefilters.unshift( callback );\n\t\t} else {\n\t\t\tanimationPrefilters.push( callback );\n\t\t}\n\t}\n});\n\njQuery.speed = function( speed, easing, fn ) {\n\tvar opt = speed && typeof speed === \"object\" ? jQuery.extend( {}, speed ) : {\n\t\tcomplete: fn || !fn && easing ||\n\t\t\tjQuery.isFunction( speed ) && speed,\n\t\tduration: speed,\n\t\teasing: fn && easing || easing && !jQuery.isFunction( easing ) && easing\n\t};\n\n\topt.duration = jQuery.fx.off ? 0 : typeof opt.duration === \"number\" ? opt.duration :\n\t\topt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;\n\n\t// Normalize opt.queue - true/undefined/null -> \"fx\"\n\tif ( opt.queue == null || opt.queue === true ) {\n\t\topt.queue = \"fx\";\n\t}\n\n\t// Queueing\n\topt.old = opt.complete;\n\n\topt.complete = function() {\n\t\tif ( jQuery.isFunction( opt.old ) ) {\n\t\t\topt.old.call( this );\n\t\t}\n\n\t\tif ( opt.queue ) {\n\t\t\tjQuery.dequeue( this, opt.queue );\n\t\t}\n\t};\n\n\treturn opt;\n};\n\njQuery.fn.extend({\n\tfadeTo: function( speed, to, easing, callback ) {\n\n\t\t// Show any hidden elements after setting opacity to 0\n\t\treturn this.filter( isHidden ).css( \"opacity\", 0 ).show()\n\n\t\t\t// Animate to the value specified\n\t\t\t.end().animate({ opacity: to }, speed, easing, callback );\n\t},\n\tanimate: function( prop, speed, easing, callback ) {\n\t\tvar empty = jQuery.isEmptyObject( prop ),\n\t\t\toptall = jQuery.speed( speed, easing, callback ),\n\t\t\tdoAnimation = function() {\n\t\t\t\t// Operate on a copy of prop so per-property easing won't be lost\n\t\t\t\tvar anim = Animation( this, jQuery.extend( {}, prop ), optall );\n\n\t\t\t\t// Empty animations, or finishing resolves immediately\n\t\t\t\tif ( empty || data_priv.get( this, \"finish\" ) ) {\n\t\t\t\t\tanim.stop( true );\n\t\t\t\t}\n\t\t\t};\n\t\t\tdoAnimation.finish = doAnimation;\n\n\t\treturn empty || optall.queue === false ?\n\t\t\tthis.each( doAnimation ) :\n\t\t\tthis.queue( optall.queue, doAnimation );\n\t},\n\tstop: function( type, clearQueue, gotoEnd ) {\n\t\tvar stopQueue = function( hooks ) {\n\t\t\tvar stop = hooks.stop;\n\t\t\tdelete hooks.stop;\n\t\t\tstop( gotoEnd );\n\t\t};\n\n\t\tif ( typeof type !== \"string\" ) {\n\t\t\tgotoEnd = clearQueue;\n\t\t\tclearQueue = type;\n\t\t\ttype = undefined;\n\t\t}\n\t\tif ( clearQueue && type !== false ) {\n\t\t\tthis.queue( type || \"fx\", [] );\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tvar dequeue = true,\n\t\t\t\tindex = type != null && type + \"queueHooks\",\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tdata = data_priv.get( this );\n\n\t\t\tif ( index ) {\n\t\t\t\tif ( data[ index ] && data[ index ].stop ) {\n\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor ( index in data ) {\n\t\t\t\t\tif ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {\n\t\t\t\t\t\tstopQueue( data[ index ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {\n\t\t\t\t\ttimers[ index ].anim.stop( gotoEnd );\n\t\t\t\t\tdequeue = false;\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Start the next in the queue if the last step wasn't forced.\n\t\t\t// Timers currently will call their complete callbacks, which\n\t\t\t// will dequeue but only if they were gotoEnd.\n\t\t\tif ( dequeue || !gotoEnd ) {\n\t\t\t\tjQuery.dequeue( this, type );\n\t\t\t}\n\t\t});\n\t},\n\tfinish: function( type ) {\n\t\tif ( type !== false ) {\n\t\t\ttype = type || \"fx\";\n\t\t}\n\t\treturn this.each(function() {\n\t\t\tvar index,\n\t\t\t\tdata = data_priv.get( this ),\n\t\t\t\tqueue = data[ type + \"queue\" ],\n\t\t\t\thooks = data[ type + \"queueHooks\" ],\n\t\t\t\ttimers = jQuery.timers,\n\t\t\t\tlength = queue ? queue.length : 0;\n\n\t\t\t// Enable finishing flag on private data\n\t\t\tdata.finish = true;\n\n\t\t\t// Empty the queue first\n\t\t\tjQuery.queue( this, type, [] );\n\n\t\t\tif ( hooks && hooks.stop ) {\n\t\t\t\thooks.stop.call( this, true );\n\t\t\t}\n\n\t\t\t// Look for any active animations, and finish them\n\t\t\tfor ( index = timers.length; index--; ) {\n\t\t\t\tif ( timers[ index ].elem === this && timers[ index ].queue === type ) {\n\t\t\t\t\ttimers[ index ].anim.stop( true );\n\t\t\t\t\ttimers.splice( index, 1 );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Look for any animations in the old queue and finish them\n\t\t\tfor ( index = 0; index < length; index++ ) {\n\t\t\t\tif ( queue[ index ] && queue[ index ].finish ) {\n\t\t\t\t\tqueue[ index ].finish.call( this );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Turn off finishing flag\n\t\t\tdelete data.finish;\n\t\t});\n\t}\n});\n\njQuery.each([ \"toggle\", \"show\", \"hide\" ], function( i, name ) {\n\tvar cssFn = jQuery.fn[ name ];\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn speed == null || typeof speed === \"boolean\" ?\n\t\t\tcssFn.apply( this, arguments ) :\n\t\t\tthis.animate( genFx( name, true ), speed, easing, callback );\n\t};\n});\n\n// Generate shortcuts for custom animations\njQuery.each({\n\tslideDown: genFx(\"show\"),\n\tslideUp: genFx(\"hide\"),\n\tslideToggle: genFx(\"toggle\"),\n\tfadeIn: { opacity: \"show\" },\n\tfadeOut: { opacity: \"hide\" },\n\tfadeToggle: { opacity: \"toggle\" }\n}, function( name, props ) {\n\tjQuery.fn[ name ] = function( speed, easing, callback ) {\n\t\treturn this.animate( props, speed, easing, callback );\n\t};\n});\n\njQuery.timers = [];\njQuery.fx.tick = function() {\n\tvar timer,\n\t\ti = 0,\n\t\ttimers = jQuery.timers;\n\n\tfxNow = jQuery.now();\n\n\tfor ( ; i < timers.length; i++ ) {\n\t\ttimer = timers[ i ];\n\t\t// Checks the timer has not already been removed\n\t\tif ( !timer() && timers[ i ] === timer ) {\n\t\t\ttimers.splice( i--, 1 );\n\t\t}\n\t}\n\n\tif ( !timers.length ) {\n\t\tjQuery.fx.stop();\n\t}\n\tfxNow = undefined;\n};\n\njQuery.fx.timer = function( timer ) {\n\tjQuery.timers.push( timer );\n\tif ( timer() ) {\n\t\tjQuery.fx.start();\n\t} else {\n\t\tjQuery.timers.pop();\n\t}\n};\n\njQuery.fx.interval = 13;\n\njQuery.fx.start = function() {\n\tif ( !timerId ) {\n\t\ttimerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );\n\t}\n};\n\njQuery.fx.stop = function() {\n\tclearInterval( timerId );\n\ttimerId = null;\n};\n\njQuery.fx.speeds = {\n\tslow: 600,\n\tfast: 200,\n\t// Default speed\n\t_default: 400\n};\n\n\n// Based off of the plugin by Clint Helfers, with permission.\n// http://blindsignals.com/index.php/2009/07/jquery-delay/\njQuery.fn.delay = function( time, type ) {\n\ttime = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;\n\ttype = type || \"fx\";\n\n\treturn this.queue( type, function( next, hooks ) {\n\t\tvar timeout = setTimeout( next, time );\n\t\thooks.stop = function() {\n\t\t\tclearTimeout( timeout );\n\t\t};\n\t});\n};\n\n\n(function() {\n\tvar input = document.createElement( \"input\" ),\n\t\tselect = document.createElement( \"select\" ),\n\t\topt = select.appendChild( document.createElement( \"option\" ) );\n\n\tinput.type = \"checkbox\";\n\n\t// Support: iOS<=5.1, Android<=4.2+\n\t// Default value for a checkbox should be \"on\"\n\tsupport.checkOn = input.value !== \"\";\n\n\t// Support: IE<=11+\n\t// Must access selectedIndex to make default options select\n\tsupport.optSelected = opt.selected;\n\n\t// Support: Android<=2.3\n\t// Options inside disabled selects are incorrectly marked as disabled\n\tselect.disabled = true;\n\tsupport.optDisabled = !opt.disabled;\n\n\t// Support: IE<=11+\n\t// An input loses its value after becoming a radio\n\tinput = document.createElement( \"input\" );\n\tinput.value = \"t\";\n\tinput.type = \"radio\";\n\tsupport.radioValue = input.value === \"t\";\n})();\n\n\nvar nodeHook, boolHook,\n\tattrHandle = jQuery.expr.attrHandle;\n\njQuery.fn.extend({\n\tattr: function( name, value ) {\n\t\treturn access( this, jQuery.attr, name, value, arguments.length > 1 );\n\t},\n\n\tremoveAttr: function( name ) {\n\t\treturn this.each(function() {\n\t\t\tjQuery.removeAttr( this, name );\n\t\t});\n\t}\n});\n\njQuery.extend({\n\tattr: function( elem, name, value ) {\n\t\tvar hooks, ret,\n\t\t\tnType = elem.nodeType;\n\n\t\t// don't get/set attributes on text, comment and attribute nodes\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Fallback to prop when attributes are not supported\n\t\tif ( typeof elem.getAttribute === strundefined ) {\n\t\t\treturn jQuery.prop( elem, name, value );\n\t\t}\n\n\t\t// All attributes are lowercase\n\t\t// Grab necessary hook if one is defined\n\t\tif ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {\n\t\t\tname = name.toLowerCase();\n\t\t\thooks = jQuery.attrHooks[ name ] ||\n\t\t\t\t( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\n\t\t\tif ( value === null ) {\n\t\t\t\tjQuery.removeAttr( elem, name );\n\n\t\t\t} else if ( hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {\n\t\t\t\treturn ret;\n\n\t\t\t} else {\n\t\t\t\telem.setAttribute( name, value + \"\" );\n\t\t\t\treturn value;\n\t\t\t}\n\n\t\t} else if ( hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ) {\n\t\t\treturn ret;\n\n\t\t} else {\n\t\t\tret = jQuery.find.attr( elem, name );\n\n\t\t\t// Non-existent attributes return null, we normalize to undefined\n\t\t\treturn ret == null ?\n\t\t\t\tundefined :\n\t\t\t\tret;\n\t\t}\n\t},\n\n\tremoveAttr: function( elem, value ) {\n\t\tvar name, propName,\n\t\t\ti = 0,\n\t\t\tattrNames = value && value.match( rnotwhite );\n\n\t\tif ( attrNames && elem.nodeType === 1 ) {\n\t\t\twhile ( (name = attrNames[i++]) ) {\n\t\t\t\tpropName = jQuery.propFix[ name ] || name;\n\n\t\t\t\t// Boolean attributes get special treatment (#10870)\n\t\t\t\tif ( jQuery.expr.match.bool.test( name ) ) {\n\t\t\t\t\t// Set corresponding property to false\n\t\t\t\t\telem[ propName ] = false;\n\t\t\t\t}\n\n\t\t\t\telem.removeAttribute( name );\n\t\t\t}\n\t\t}\n\t},\n\n\tattrHooks: {\n\t\ttype: {\n\t\t\tset: function( elem, value ) {\n\t\t\t\tif ( !support.radioValue && value === \"radio\" &&\n\t\t\t\t\tjQuery.nodeName( elem, \"input\" ) ) {\n\t\t\t\t\tvar val = elem.value;\n\t\t\t\t\telem.setAttribute( \"type\", value );\n\t\t\t\t\tif ( val ) {\n\t\t\t\t\t\telem.value = val;\n\t\t\t\t\t}\n\t\t\t\t\treturn value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n});\n\n// Hooks for boolean attributes\nboolHook = {\n\tset: function( elem, value, name ) {\n\t\tif ( value === false ) {\n\t\t\t// Remove boolean attributes when set to false\n\t\t\tjQuery.removeAttr( elem, name );\n\t\t} else {\n\t\t\telem.setAttribute( name, name );\n\t\t}\n\t\treturn name;\n\t}\n};\njQuery.each( jQuery.expr.match.bool.source.match( /\\w+/g ), function( i, name ) {\n\tvar getter = attrHandle[ name ] || jQuery.find.attr;\n\n\tattrHandle[ name ] = function( elem, name, isXML ) {\n\t\tvar ret, handle;\n\t\tif ( !isXML ) {\n\t\t\t// Avoid an infinite loop by temporarily removing this function from the getter\n\t\t\thandle = attrHandle[ name ];\n\t\t\tattrHandle[ name ] = ret;\n\t\t\tret = getter( elem, name, isXML ) != null ?\n\t\t\t\tname.toLowerCase() :\n\t\t\t\tnull;\n\t\t\tattrHandle[ name ] = handle;\n\t\t}\n\t\treturn ret;\n\t};\n});\n\n\n\n\nvar rfocusable = /^(?:input|select|textarea|button)$/i;\n\njQuery.fn.extend({\n\tprop: function( name, value ) {\n\t\treturn access( this, jQuery.prop, name, value, arguments.length > 1 );\n\t},\n\n\tremoveProp: function( name ) {\n\t\treturn this.each(function() {\n\t\t\tdelete this[ jQuery.propFix[ name ] || name ];\n\t\t});\n\t}\n});\n\njQuery.extend({\n\tpropFix: {\n\t\t\"for\": \"htmlFor\",\n\t\t\"class\": \"className\"\n\t},\n\n\tprop: function( elem, name, value ) {\n\t\tvar ret, hooks, notxml,\n\t\t\tnType = elem.nodeType;\n\n\t\t// Don't get/set properties on text, comment and attribute nodes\n\t\tif ( !elem || nType === 3 || nType === 8 || nType === 2 ) {\n\t\t\treturn;\n\t\t}\n\n\t\tnotxml = nType !== 1 || !jQuery.isXMLDoc( elem );\n\n\t\tif ( notxml ) {\n\t\t\t// Fix name and attach hooks\n\t\t\tname = jQuery.propFix[ name ] || name;\n\t\t\thooks = jQuery.propHooks[ name ];\n\t\t}\n\n\t\tif ( value !== undefined ) {\n\t\t\treturn hooks && \"set\" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?\n\t\t\t\tret :\n\t\t\t\t( elem[ name ] = value );\n\n\t\t} else {\n\t\t\treturn hooks && \"get\" in hooks && (ret = hooks.get( elem, name )) !== null ?\n\t\t\t\tret :\n\t\t\t\telem[ name ];\n\t\t}\n\t},\n\n\tpropHooks: {\n\t\ttabIndex: {\n\t\t\tget: function( elem ) {\n\t\t\t\treturn elem.hasAttribute( \"tabindex\" ) || rfocusable.test( elem.nodeName ) || elem.href ?\n\t\t\t\t\telem.tabIndex :\n\t\t\t\t\t-1;\n\t\t\t}\n\t\t}\n\t}\n});\n\nif ( !support.optSelected ) {\n\tjQuery.propHooks.selected = {\n\t\tget: function( elem ) {\n\t\t\tvar parent = elem.parentNode;\n\t\t\tif ( parent && parent.parentNode ) {\n\t\t\t\tparent.parentNode.selectedIndex;\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t};\n}\n\njQuery.each([\n\t\"tabIndex\",\n\t\"readOnly\",\n\t\"maxLength\",\n\t\"cellSpacing\",\n\t\"cellPadding\",\n\t\"rowSpan\",\n\t\"colSpan\",\n\t\"useMap\",\n\t\"frameBorder\",\n\t\"contentEditable\"\n], function() {\n\tjQuery.propFix[ this.toLowerCase() ] = this;\n});\n\n\n\n\nvar rclass = /[\\t\\r\\n\\f]/g;\n\njQuery.fn.extend({\n\taddClass: function( value ) {\n\t\tvar classes, elem, cur, clazz, j, finalValue,\n\t\t\tproceed = typeof value === \"string\" && value,\n\t\t\ti = 0,\n\t\t\tlen = this.length;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( j ) {\n\t\t\t\tjQuery( this ).addClass( value.call( this, j, this.className ) );\n\t\t\t});\n\t\t}\n\n\t\tif ( proceed ) {\n\t\t\t// The disjunction here is for better compressibility (see removeClass)\n\t\t\tclasses = ( value || \"\" ).match( rnotwhite ) || [];\n\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\telem = this[ i ];\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\n\t\t\t\t\t\" \"\n\t\t\t\t);\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\n\t\t\t\t\t\tif ( cur.indexOf( \" \" + clazz + \" \" ) < 0 ) {\n\t\t\t\t\t\t\tcur += clazz + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = jQuery.trim( cur );\n\t\t\t\t\tif ( elem.className !== finalValue ) {\n\t\t\t\t\t\telem.className = finalValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\tremoveClass: function( value ) {\n\t\tvar classes, elem, cur, clazz, j, finalValue,\n\t\t\tproceed = arguments.length === 0 || typeof value === \"string\" && value,\n\t\t\ti = 0,\n\t\t\tlen = this.length;\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( j ) {\n\t\t\t\tjQuery( this ).removeClass( value.call( this, j, this.className ) );\n\t\t\t});\n\t\t}\n\t\tif ( proceed ) {\n\t\t\tclasses = ( value || \"\" ).match( rnotwhite ) || [];\n\n\t\t\tfor ( ; i < len; i++ ) {\n\t\t\t\telem = this[ i ];\n\t\t\t\t// This expression is here for better compressibility (see addClass)\n\t\t\t\tcur = elem.nodeType === 1 && ( elem.className ?\n\t\t\t\t\t( \" \" + elem.className + \" \" ).replace( rclass, \" \" ) :\n\t\t\t\t\t\"\"\n\t\t\t\t);\n\n\t\t\t\tif ( cur ) {\n\t\t\t\t\tj = 0;\n\t\t\t\t\twhile ( (clazz = classes[j++]) ) {\n\t\t\t\t\t\t// Remove *all* instances\n\t\t\t\t\t\twhile ( cur.indexOf( \" \" + clazz + \" \" ) >= 0 ) {\n\t\t\t\t\t\t\tcur = cur.replace( \" \" + clazz + \" \", \" \" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only assign if different to avoid unneeded rendering.\n\t\t\t\t\tfinalValue = value ? jQuery.trim( cur ) : \"\";\n\t\t\t\t\tif ( elem.className !== finalValue ) {\n\t\t\t\t\t\telem.className = finalValue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn this;\n\t},\n\n\ttoggleClass: function( value, stateVal ) {\n\t\tvar type = typeof value;\n\n\t\tif ( typeof stateVal === \"boolean\" && type === \"string\" ) {\n\t\t\treturn stateVal ? this.addClass( value ) : this.removeClass( value );\n\t\t}\n\n\t\tif ( jQuery.isFunction( value ) ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tif ( type === \"string\" ) {\n\t\t\t\t// Toggle individual class names\n\t\t\t\tvar className,\n\t\t\t\t\ti = 0,\n\t\t\t\t\tself = jQuery( this ),\n\t\t\t\t\tclassNames = value.match( rnotwhite ) || [];\n\n\t\t\t\twhile ( (className = classNames[ i++ ]) ) {\n\t\t\t\t\t// Check each className given, space separated list\n\t\t\t\t\tif ( self.hasClass( className ) ) {\n\t\t\t\t\t\tself.removeClass( className );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself.addClass( className );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t// Toggle whole class name\n\t\t\t} else if ( type === strundefined || type === \"boolean\" ) {\n\t\t\t\tif ( this.className ) {\n\t\t\t\t\t// store className if set\n\t\t\t\t\tdata_priv.set( this, \"__className__\", this.className );\n\t\t\t\t}\n\n\t\t\t\t// If the element has a class name or if we're passed `false`,\n\t\t\t\t// then remove the whole classname (if there was one, the above saved it).\n\t\t\t\t// Otherwise bring back whatever was previously saved (if anything),\n\t\t\t\t// falling back to the empty string if nothing was stored.\n\t\t\t\tthis.className = this.className || value === false ? \"\" : data_priv.get( this, \"__className__\" ) || \"\";\n\t\t\t}\n\t\t});\n\t},\n\n\thasClass: function( selector ) {\n\t\tvar className = \" \" + selector + \" \",\n\t\t\ti = 0,\n\t\t\tl = this.length;\n\t\tfor ( ; i < l; i++ ) {\n\t\t\tif ( this[i].nodeType === 1 && (\" \" + this[i].className + \" \").replace(rclass, \" \").indexOf( className ) >= 0 ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n});\n\n\n\n\nvar rreturn = /\\r/g;\n\njQuery.fn.extend({\n\tval: function( value ) {\n\t\tvar hooks, ret, isFunction,\n\t\t\telem = this[0];\n\n\t\tif ( !arguments.length ) {\n\t\t\tif ( elem ) {\n\t\t\t\thooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];\n\n\t\t\t\tif ( hooks && \"get\" in hooks && (ret = hooks.get( elem, \"value\" )) !== undefined ) {\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t\tret = elem.value;\n\n\t\t\t\treturn typeof ret === \"string\" ?\n\t\t\t\t\t// Handle most common string cases\n\t\t\t\t\tret.replace(rreturn, \"\") :\n\t\t\t\t\t// Handle cases where value is null/undef or number\n\t\t\t\t\tret == null ? \"\" : ret;\n\t\t\t}\n\n\t\t\treturn;\n\t\t}\n\n\t\tisFunction = jQuery.isFunction( value );\n\n\t\treturn this.each(function( i ) {\n\t\t\tvar val;\n\n\t\t\tif ( this.nodeType !== 1 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( isFunction ) {\n\t\t\t\tval = value.call( this, i, jQuery( this ).val() );\n\t\t\t} else {\n\t\t\t\tval = value;\n\t\t\t}\n\n\t\t\t// Treat null/undefined as \"\"; convert numbers to string\n\t\t\tif ( val == null ) {\n\t\t\t\tval = \"\";\n\n\t\t\t} else if ( typeof val === \"number\" ) {\n\t\t\t\tval += \"\";\n\n\t\t\t} else if ( jQuery.isArray( val ) ) {\n\t\t\t\tval = jQuery.map( val, function( value ) {\n\t\t\t\t\treturn value == null ? \"\" : value + \"\";\n\t\t\t\t});\n\t\t\t}\n\n\t\t\thooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];\n\n\t\t\t// If set returns undefined, fall back to normal setting\n\t\t\tif ( !hooks || !(\"set\" in hooks) || hooks.set( this, val, \"value\" ) === undefined ) {\n\t\t\t\tthis.value = val;\n\t\t\t}\n\t\t});\n\t}\n});\n\njQuery.extend({\n\tvalHooks: {\n\t\toption: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar val = jQuery.find.attr( elem, \"value\" );\n\t\t\t\treturn val != null ?\n\t\t\t\t\tval :\n\t\t\t\t\t// Support: IE10-11+\n\t\t\t\t\t// option.text throws exceptions (#14686, #14858)\n\t\t\t\t\tjQuery.trim( jQuery.text( elem ) );\n\t\t\t}\n\t\t},\n\t\tselect: {\n\t\t\tget: function( elem ) {\n\t\t\t\tvar value, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tindex = elem.selectedIndex,\n\t\t\t\t\tone = elem.type === \"select-one\" || index < 0,\n\t\t\t\t\tvalues = one ? null : [],\n\t\t\t\t\tmax = one ? index + 1 : options.length,\n\t\t\t\t\ti = index < 0 ?\n\t\t\t\t\t\tmax :\n\t\t\t\t\t\tone ? index : 0;\n\n\t\t\t\t// Loop through all the selected options\n\t\t\t\tfor ( ; i < max; i++ ) {\n\t\t\t\t\toption = options[ i ];\n\n\t\t\t\t\t// IE6-9 doesn't update selected after form reset (#2551)\n\t\t\t\t\tif ( ( option.selected || i === index ) &&\n\t\t\t\t\t\t\t// Don't return options that are disabled or in a disabled optgroup\n\t\t\t\t\t\t\t( support.optDisabled ? !option.disabled : option.getAttribute( \"disabled\" ) === null ) &&\n\t\t\t\t\t\t\t( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, \"optgroup\" ) ) ) {\n\n\t\t\t\t\t\t// Get the specific value for the option\n\t\t\t\t\t\tvalue = jQuery( option ).val();\n\n\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\tif ( one ) {\n\t\t\t\t\t\t\treturn value;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn values;\n\t\t\t},\n\n\t\t\tset: function( elem, value ) {\n\t\t\t\tvar optionSet, option,\n\t\t\t\t\toptions = elem.options,\n\t\t\t\t\tvalues = jQuery.makeArray( value ),\n\t\t\t\t\ti = options.length;\n\n\t\t\t\twhile ( i-- ) {\n\t\t\t\t\toption = options[ i ];\n\t\t\t\t\tif ( (option.selected = jQuery.inArray( option.value, values ) >= 0) ) {\n\t\t\t\t\t\toptionSet = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Force browsers to behave consistently when non-matching value is set\n\t\t\t\tif ( !optionSet ) {\n\t\t\t\t\telem.selectedIndex = -1;\n\t\t\t\t}\n\t\t\t\treturn values;\n\t\t\t}\n\t\t}\n\t}\n});\n\n// Radios and checkboxes getter/setter\njQuery.each([ \"radio\", \"checkbox\" ], function() {\n\tjQuery.valHooks[ this ] = {\n\t\tset: function( elem, value ) {\n\t\t\tif ( jQuery.isArray( value ) ) {\n\t\t\t\treturn ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );\n\t\t\t}\n\t\t}\n\t};\n\tif ( !support.checkOn ) {\n\t\tjQuery.valHooks[ this ].get = function( elem ) {\n\t\t\treturn elem.getAttribute(\"value\") === null ? \"on\" : elem.value;\n\t\t};\n\t}\n});\n\n\n\n\n// Return jQuery for attributes-only inclusion\n\n\njQuery.each( (\"blur focus focusin focusout load resize scroll unload click dblclick \" +\n\t\"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave \" +\n\t\"change select submit keydown keypress keyup error contextmenu\").split(\" \"), function( i, name ) {\n\n\t// Handle event binding\n\tjQuery.fn[ name ] = function( data, fn ) {\n\t\treturn arguments.length > 0 ?\n\t\t\tthis.on( name, null, data, fn ) :\n\t\t\tthis.trigger( name );\n\t};\n});\n\njQuery.fn.extend({\n\thover: function( fnOver, fnOut ) {\n\t\treturn this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );\n\t},\n\n\tbind: function( types, data, fn ) {\n\t\treturn this.on( types, null, data, fn );\n\t},\n\tunbind: function( types, fn ) {\n\t\treturn this.off( types, null, fn );\n\t},\n\n\tdelegate: function( selector, types, data, fn ) {\n\t\treturn this.on( types, selector, data, fn );\n\t},\n\tundelegate: function( selector, types, fn ) {\n\t\t// ( namespace ) or ( selector, types [, fn] )\n\t\treturn arguments.length === 1 ? this.off( selector, \"**\" ) : this.off( types, selector || \"**\", fn );\n\t}\n});\n\n\nvar nonce = jQuery.now();\n\nvar rquery = (/\\?/);\n\n\n\n// Support: Android 2.3\n// Workaround failure to string-cast null input\njQuery.parseJSON = function( data ) {\n\treturn JSON.parse( data + \"\" );\n};\n\n\n// Cross-browser xml parsing\njQuery.parseXML = function( data ) {\n\tvar xml, tmp;\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\n\t// Support: IE9\n\ttry {\n\t\ttmp = new DOMParser();\n\t\txml = tmp.parseFromString( data, \"text/xml\" );\n\t} catch ( e ) {\n\t\txml = undefined;\n\t}\n\n\tif ( !xml || xml.getElementsByTagName( \"parsererror\" ).length ) {\n\t\tjQuery.error( \"Invalid XML: \" + data );\n\t}\n\treturn xml;\n};\n\n\nvar\n\trhash = /#.*$/,\n\trts = /([?&])_=[^&]*/,\n\trheaders = /^(.*?):[ \\t]*([^\\r\\n]*)$/mg,\n\t// #7653, #8125, #8152: local protocol detection\n\trlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,\n\trnoContent = /^(?:GET|HEAD)$/,\n\trprotocol = /^\\/\\//,\n\trurl = /^([\\w.+-]+:)(?:\\/\\/(?:[^\\/?#]*@|)([^\\/?#:]*)(?::(\\d+)|)|)/,\n\n\t/* Prefilters\n\t * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)\n\t * 2) These are called:\n\t *    - BEFORE asking for a transport\n\t *    - AFTER param serialization (s.data is a string if s.processData is true)\n\t * 3) key is the dataType\n\t * 4) the catchall symbol \"*\" can be used\n\t * 5) execution will start with transport dataType and THEN continue down to \"*\" if needed\n\t */\n\tprefilters = {},\n\n\t/* Transports bindings\n\t * 1) key is the dataType\n\t * 2) the catchall symbol \"*\" can be used\n\t * 3) selection will start with transport dataType and THEN go to \"*\" if needed\n\t */\n\ttransports = {},\n\n\t// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression\n\tallTypes = \"*/\".concat( \"*\" ),\n\n\t// Document location\n\tajaxLocation = window.location.href,\n\n\t// Segment location into parts\n\tajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];\n\n// Base \"constructor\" for jQuery.ajaxPrefilter and jQuery.ajaxTransport\nfunction addToPrefiltersOrTransports( structure ) {\n\n\t// dataTypeExpression is optional and defaults to \"*\"\n\treturn function( dataTypeExpression, func ) {\n\n\t\tif ( typeof dataTypeExpression !== \"string\" ) {\n\t\t\tfunc = dataTypeExpression;\n\t\t\tdataTypeExpression = \"*\";\n\t\t}\n\n\t\tvar dataType,\n\t\t\ti = 0,\n\t\t\tdataTypes = dataTypeExpression.toLowerCase().match( rnotwhite ) || [];\n\n\t\tif ( jQuery.isFunction( func ) ) {\n\t\t\t// For each dataType in the dataTypeExpression\n\t\t\twhile ( (dataType = dataTypes[i++]) ) {\n\t\t\t\t// Prepend if requested\n\t\t\t\tif ( dataType[0] === \"+\" ) {\n\t\t\t\t\tdataType = dataType.slice( 1 ) || \"*\";\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).unshift( func );\n\n\t\t\t\t// Otherwise append\n\t\t\t\t} else {\n\t\t\t\t\t(structure[ dataType ] = structure[ dataType ] || []).push( func );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}\n\n// Base inspection function for prefilters and transports\nfunction inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {\n\n\tvar inspected = {},\n\t\tseekingTransport = ( structure === transports );\n\n\tfunction inspect( dataType ) {\n\t\tvar selected;\n\t\tinspected[ dataType ] = true;\n\t\tjQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {\n\t\t\tvar dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );\n\t\t\tif ( typeof dataTypeOrTransport === \"string\" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {\n\t\t\t\toptions.dataTypes.unshift( dataTypeOrTransport );\n\t\t\t\tinspect( dataTypeOrTransport );\n\t\t\t\treturn false;\n\t\t\t} else if ( seekingTransport ) {\n\t\t\t\treturn !( selected = dataTypeOrTransport );\n\t\t\t}\n\t\t});\n\t\treturn selected;\n\t}\n\n\treturn inspect( options.dataTypes[ 0 ] ) || !inspected[ \"*\" ] && inspect( \"*\" );\n}\n\n// A special extend for ajax options\n// that takes \"flat\" options (not to be deep extended)\n// Fixes #9887\nfunction ajaxExtend( target, src ) {\n\tvar key, deep,\n\t\tflatOptions = jQuery.ajaxSettings.flatOptions || {};\n\n\tfor ( key in src ) {\n\t\tif ( src[ key ] !== undefined ) {\n\t\t\t( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];\n\t\t}\n\t}\n\tif ( deep ) {\n\t\tjQuery.extend( true, target, deep );\n\t}\n\n\treturn target;\n}\n\n/* Handles responses to an ajax request:\n * - finds the right dataType (mediates between content-type and expected dataType)\n * - returns the corresponding response\n */\nfunction ajaxHandleResponses( s, jqXHR, responses ) {\n\n\tvar ct, type, finalDataType, firstDataType,\n\t\tcontents = s.contents,\n\t\tdataTypes = s.dataTypes;\n\n\t// Remove auto dataType and get content-type in the process\n\twhile ( dataTypes[ 0 ] === \"*\" ) {\n\t\tdataTypes.shift();\n\t\tif ( ct === undefined ) {\n\t\t\tct = s.mimeType || jqXHR.getResponseHeader(\"Content-Type\");\n\t\t}\n\t}\n\n\t// Check if we're dealing with a known content-type\n\tif ( ct ) {\n\t\tfor ( type in contents ) {\n\t\t\tif ( contents[ type ] && contents[ type ].test( ct ) ) {\n\t\t\t\tdataTypes.unshift( type );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Check to see if we have a response for the expected dataType\n\tif ( dataTypes[ 0 ] in responses ) {\n\t\tfinalDataType = dataTypes[ 0 ];\n\t} else {\n\t\t// Try convertible dataTypes\n\t\tfor ( type in responses ) {\n\t\t\tif ( !dataTypes[ 0 ] || s.converters[ type + \" \" + dataTypes[0] ] ) {\n\t\t\t\tfinalDataType = type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ( !firstDataType ) {\n\t\t\t\tfirstDataType = type;\n\t\t\t}\n\t\t}\n\t\t// Or just use first one\n\t\tfinalDataType = finalDataType || firstDataType;\n\t}\n\n\t// If we found a dataType\n\t// We add the dataType to the list if needed\n\t// and return the corresponding response\n\tif ( finalDataType ) {\n\t\tif ( finalDataType !== dataTypes[ 0 ] ) {\n\t\t\tdataTypes.unshift( finalDataType );\n\t\t}\n\t\treturn responses[ finalDataType ];\n\t}\n}\n\n/* Chain conversions given the request and the original response\n * Also sets the responseXXX fields on the jqXHR instance\n */\nfunction ajaxConvert( s, response, jqXHR, isSuccess ) {\n\tvar conv2, current, conv, tmp, prev,\n\t\tconverters = {},\n\t\t// Work with a copy of dataTypes in case we need to modify it for conversion\n\t\tdataTypes = s.dataTypes.slice();\n\n\t// Create converters map with lowercased keys\n\tif ( dataTypes[ 1 ] ) {\n\t\tfor ( conv in s.converters ) {\n\t\t\tconverters[ conv.toLowerCase() ] = s.converters[ conv ];\n\t\t}\n\t}\n\n\tcurrent = dataTypes.shift();\n\n\t// Convert to each sequential dataType\n\twhile ( current ) {\n\n\t\tif ( s.responseFields[ current ] ) {\n\t\t\tjqXHR[ s.responseFields[ current ] ] = response;\n\t\t}\n\n\t\t// Apply the dataFilter if provided\n\t\tif ( !prev && isSuccess && s.dataFilter ) {\n\t\t\tresponse = s.dataFilter( response, s.dataType );\n\t\t}\n\n\t\tprev = current;\n\t\tcurrent = dataTypes.shift();\n\n\t\tif ( current ) {\n\n\t\t// There's only work to do if current dataType is non-auto\n\t\t\tif ( current === \"*\" ) {\n\n\t\t\t\tcurrent = prev;\n\n\t\t\t// Convert response if prev dataType is non-auto and differs from current\n\t\t\t} else if ( prev !== \"*\" && prev !== current ) {\n\n\t\t\t\t// Seek a direct converter\n\t\t\t\tconv = converters[ prev + \" \" + current ] || converters[ \"* \" + current ];\n\n\t\t\t\t// If none found, seek a pair\n\t\t\t\tif ( !conv ) {\n\t\t\t\t\tfor ( conv2 in converters ) {\n\n\t\t\t\t\t\t// If conv2 outputs current\n\t\t\t\t\t\ttmp = conv2.split( \" \" );\n\t\t\t\t\t\tif ( tmp[ 1 ] === current ) {\n\n\t\t\t\t\t\t\t// If prev can be converted to accepted input\n\t\t\t\t\t\t\tconv = converters[ prev + \" \" + tmp[ 0 ] ] ||\n\t\t\t\t\t\t\t\tconverters[ \"* \" + tmp[ 0 ] ];\n\t\t\t\t\t\t\tif ( conv ) {\n\t\t\t\t\t\t\t\t// Condense equivalence converters\n\t\t\t\t\t\t\t\tif ( conv === true ) {\n\t\t\t\t\t\t\t\t\tconv = converters[ conv2 ];\n\n\t\t\t\t\t\t\t\t// Otherwise, insert the intermediate dataType\n\t\t\t\t\t\t\t\t} else if ( converters[ conv2 ] !== true ) {\n\t\t\t\t\t\t\t\t\tcurrent = tmp[ 0 ];\n\t\t\t\t\t\t\t\t\tdataTypes.unshift( tmp[ 1 ] );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Apply converter (if not an equivalence)\n\t\t\t\tif ( conv !== true ) {\n\n\t\t\t\t\t// Unless errors are allowed to bubble, catch and return them\n\t\t\t\t\tif ( conv && s[ \"throws\" ] ) {\n\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tresponse = conv( response );\n\t\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\t\treturn { state: \"parsererror\", error: conv ? e : \"No conversion from \" + prev + \" to \" + current };\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn { state: \"success\", data: response };\n}\n\njQuery.extend({\n\n\t// Counter for holding the number of active queries\n\tactive: 0,\n\n\t// Last-Modified header cache for next request\n\tlastModified: {},\n\tetag: {},\n\n\tajaxSettings: {\n\t\turl: ajaxLocation,\n\t\ttype: \"GET\",\n\t\tisLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),\n\t\tglobal: true,\n\t\tprocessData: true,\n\t\tasync: true,\n\t\tcontentType: \"application/x-www-form-urlencoded; charset=UTF-8\",\n\t\t/*\n\t\ttimeout: 0,\n\t\tdata: null,\n\t\tdataType: null,\n\t\tusername: null,\n\t\tpassword: null,\n\t\tcache: null,\n\t\tthrows: false,\n\t\ttraditional: false,\n\t\theaders: {},\n\t\t*/\n\n\t\taccepts: {\n\t\t\t\"*\": allTypes,\n\t\t\ttext: \"text/plain\",\n\t\t\thtml: \"text/html\",\n\t\t\txml: \"application/xml, text/xml\",\n\t\t\tjson: \"application/json, text/javascript\"\n\t\t},\n\n\t\tcontents: {\n\t\t\txml: /xml/,\n\t\t\thtml: /html/,\n\t\t\tjson: /json/\n\t\t},\n\n\t\tresponseFields: {\n\t\t\txml: \"responseXML\",\n\t\t\ttext: \"responseText\",\n\t\t\tjson: \"responseJSON\"\n\t\t},\n\n\t\t// Data converters\n\t\t// Keys separate source (or catchall \"*\") and destination types with a single space\n\t\tconverters: {\n\n\t\t\t// Convert anything to text\n\t\t\t\"* text\": String,\n\n\t\t\t// Text to html (true = no transformation)\n\t\t\t\"text html\": true,\n\n\t\t\t// Evaluate text as a json expression\n\t\t\t\"text json\": jQuery.parseJSON,\n\n\t\t\t// Parse text as xml\n\t\t\t\"text xml\": jQuery.parseXML\n\t\t},\n\n\t\t// For options that shouldn't be deep extended:\n\t\t// you can add your own custom options here if\n\t\t// and when you create one that shouldn't be\n\t\t// deep extended (see ajaxExtend)\n\t\tflatOptions: {\n\t\t\turl: true,\n\t\t\tcontext: true\n\t\t}\n\t},\n\n\t// Creates a full fledged settings object into target\n\t// with both ajaxSettings and settings fields.\n\t// If target is omitted, writes into ajaxSettings.\n\tajaxSetup: function( target, settings ) {\n\t\treturn settings ?\n\n\t\t\t// Building a settings object\n\t\t\tajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :\n\n\t\t\t// Extending ajaxSettings\n\t\t\tajaxExtend( jQuery.ajaxSettings, target );\n\t},\n\n\tajaxPrefilter: addToPrefiltersOrTransports( prefilters ),\n\tajaxTransport: addToPrefiltersOrTransports( transports ),\n\n\t// Main method\n\tajax: function( url, options ) {\n\n\t\t// If url is an object, simulate pre-1.5 signature\n\t\tif ( typeof url === \"object\" ) {\n\t\t\toptions = url;\n\t\t\turl = undefined;\n\t\t}\n\n\t\t// Force options to be an object\n\t\toptions = options || {};\n\n\t\tvar transport,\n\t\t\t// URL without anti-cache param\n\t\t\tcacheURL,\n\t\t\t// Response headers\n\t\t\tresponseHeadersString,\n\t\t\tresponseHeaders,\n\t\t\t// timeout handle\n\t\t\ttimeoutTimer,\n\t\t\t// Cross-domain detection vars\n\t\t\tparts,\n\t\t\t// To know if global events are to be dispatched\n\t\t\tfireGlobals,\n\t\t\t// Loop variable\n\t\t\ti,\n\t\t\t// Create the final options object\n\t\t\ts = jQuery.ajaxSetup( {}, options ),\n\t\t\t// Callbacks context\n\t\t\tcallbackContext = s.context || s,\n\t\t\t// Context for global events is callbackContext if it is a DOM node or jQuery collection\n\t\t\tglobalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?\n\t\t\t\tjQuery( callbackContext ) :\n\t\t\t\tjQuery.event,\n\t\t\t// Deferreds\n\t\t\tdeferred = jQuery.Deferred(),\n\t\t\tcompleteDeferred = jQuery.Callbacks(\"once memory\"),\n\t\t\t// Status-dependent callbacks\n\t\t\tstatusCode = s.statusCode || {},\n\t\t\t// Headers (they are sent all at once)\n\t\t\trequestHeaders = {},\n\t\t\trequestHeadersNames = {},\n\t\t\t// The jqXHR state\n\t\t\tstate = 0,\n\t\t\t// Default abort message\n\t\t\tstrAbort = \"canceled\",\n\t\t\t// Fake xhr\n\t\t\tjqXHR = {\n\t\t\t\treadyState: 0,\n\n\t\t\t\t// Builds headers hashtable if needed\n\t\t\t\tgetResponseHeader: function( key ) {\n\t\t\t\t\tvar match;\n\t\t\t\t\tif ( state === 2 ) {\n\t\t\t\t\t\tif ( !responseHeaders ) {\n\t\t\t\t\t\t\tresponseHeaders = {};\n\t\t\t\t\t\t\twhile ( (match = rheaders.exec( responseHeadersString )) ) {\n\t\t\t\t\t\t\t\tresponseHeaders[ match[1].toLowerCase() ] = match[ 2 ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmatch = responseHeaders[ key.toLowerCase() ];\n\t\t\t\t\t}\n\t\t\t\t\treturn match == null ? null : match;\n\t\t\t\t},\n\n\t\t\t\t// Raw string\n\t\t\t\tgetAllResponseHeaders: function() {\n\t\t\t\t\treturn state === 2 ? responseHeadersString : null;\n\t\t\t\t},\n\n\t\t\t\t// Caches the header\n\t\t\t\tsetRequestHeader: function( name, value ) {\n\t\t\t\t\tvar lname = name.toLowerCase();\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\tname = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;\n\t\t\t\t\t\trequestHeaders[ name ] = value;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Overrides response content-type header\n\t\t\t\toverrideMimeType: function( type ) {\n\t\t\t\t\tif ( !state ) {\n\t\t\t\t\t\ts.mimeType = type;\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Status-dependent callbacks\n\t\t\t\tstatusCode: function( map ) {\n\t\t\t\t\tvar code;\n\t\t\t\t\tif ( map ) {\n\t\t\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\t\t\tfor ( code in map ) {\n\t\t\t\t\t\t\t\t// Lazy-add the new callback in a way that preserves old ones\n\t\t\t\t\t\t\t\tstatusCode[ code ] = [ statusCode[ code ], map[ code ] ];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Execute the appropriate callbacks\n\t\t\t\t\t\t\tjqXHR.always( map[ jqXHR.status ] );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t},\n\n\t\t\t\t// Cancel the request\n\t\t\t\tabort: function( statusText ) {\n\t\t\t\t\tvar finalText = statusText || strAbort;\n\t\t\t\t\tif ( transport ) {\n\t\t\t\t\t\ttransport.abort( finalText );\n\t\t\t\t\t}\n\t\t\t\t\tdone( 0, finalText );\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t};\n\n\t\t// Attach deferreds\n\t\tdeferred.promise( jqXHR ).complete = completeDeferred.add;\n\t\tjqXHR.success = jqXHR.done;\n\t\tjqXHR.error = jqXHR.fail;\n\n\t\t// Remove hash character (#7531: and string promotion)\n\t\t// Add protocol if not provided (prefilters might expect it)\n\t\t// Handle falsy url in the settings object (#10093: consistency with old signature)\n\t\t// We also use the url parameter if available\n\t\ts.url = ( ( url || s.url || ajaxLocation ) + \"\" ).replace( rhash, \"\" )\n\t\t\t.replace( rprotocol, ajaxLocParts[ 1 ] + \"//\" );\n\n\t\t// Alias method option to type as per ticket #12004\n\t\ts.type = options.method || options.type || s.method || s.type;\n\n\t\t// Extract dataTypes list\n\t\ts.dataTypes = jQuery.trim( s.dataType || \"*\" ).toLowerCase().match( rnotwhite ) || [ \"\" ];\n\n\t\t// A cross-domain request is in order when we have a protocol:host:port mismatch\n\t\tif ( s.crossDomain == null ) {\n\t\t\tparts = rurl.exec( s.url.toLowerCase() );\n\t\t\ts.crossDomain = !!( parts &&\n\t\t\t\t( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||\n\t\t\t\t\t( parts[ 3 ] || ( parts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) !==\n\t\t\t\t\t\t( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === \"http:\" ? \"80\" : \"443\" ) ) )\n\t\t\t);\n\t\t}\n\n\t\t// Convert data if not already a string\n\t\tif ( s.data && s.processData && typeof s.data !== \"string\" ) {\n\t\t\ts.data = jQuery.param( s.data, s.traditional );\n\t\t}\n\n\t\t// Apply prefilters\n\t\tinspectPrefiltersOrTransports( prefilters, s, options, jqXHR );\n\n\t\t// If request was aborted inside a prefilter, stop there\n\t\tif ( state === 2 ) {\n\t\t\treturn jqXHR;\n\t\t}\n\n\t\t// We can fire global events as of now if asked to\n\t\t// Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118)\n\t\tfireGlobals = jQuery.event && s.global;\n\n\t\t// Watch for a new set of requests\n\t\tif ( fireGlobals && jQuery.active++ === 0 ) {\n\t\t\tjQuery.event.trigger(\"ajaxStart\");\n\t\t}\n\n\t\t// Uppercase the type\n\t\ts.type = s.type.toUpperCase();\n\n\t\t// Determine if request has content\n\t\ts.hasContent = !rnoContent.test( s.type );\n\n\t\t// Save the URL in case we're toying with the If-Modified-Since\n\t\t// and/or If-None-Match header later on\n\t\tcacheURL = s.url;\n\n\t\t// More options handling for requests with no content\n\t\tif ( !s.hasContent ) {\n\n\t\t\t// If data is available, append data to url\n\t\t\tif ( s.data ) {\n\t\t\t\tcacheURL = ( s.url += ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + s.data );\n\t\t\t\t// #9682: remove data so that it's not used in an eventual retry\n\t\t\t\tdelete s.data;\n\t\t\t}\n\n\t\t\t// Add anti-cache in url if needed\n\t\t\tif ( s.cache === false ) {\n\t\t\t\ts.url = rts.test( cacheURL ) ?\n\n\t\t\t\t\t// If there is already a '_' parameter, set its value\n\t\t\t\t\tcacheURL.replace( rts, \"$1_=\" + nonce++ ) :\n\n\t\t\t\t\t// Otherwise add one to the end\n\t\t\t\t\tcacheURL + ( rquery.test( cacheURL ) ? \"&\" : \"?\" ) + \"_=\" + nonce++;\n\t\t\t}\n\t\t}\n\n\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\tif ( s.ifModified ) {\n\t\t\tif ( jQuery.lastModified[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-Modified-Since\", jQuery.lastModified[ cacheURL ] );\n\t\t\t}\n\t\t\tif ( jQuery.etag[ cacheURL ] ) {\n\t\t\t\tjqXHR.setRequestHeader( \"If-None-Match\", jQuery.etag[ cacheURL ] );\n\t\t\t}\n\t\t}\n\n\t\t// Set the correct header, if data is being sent\n\t\tif ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {\n\t\t\tjqXHR.setRequestHeader( \"Content-Type\", s.contentType );\n\t\t}\n\n\t\t// Set the Accepts header for the server, depending on the dataType\n\t\tjqXHR.setRequestHeader(\n\t\t\t\"Accept\",\n\t\t\ts.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?\n\t\t\t\ts.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== \"*\" ? \", \" + allTypes + \"; q=0.01\" : \"\" ) :\n\t\t\t\ts.accepts[ \"*\" ]\n\t\t);\n\n\t\t// Check for headers option\n\t\tfor ( i in s.headers ) {\n\t\t\tjqXHR.setRequestHeader( i, s.headers[ i ] );\n\t\t}\n\n\t\t// Allow custom headers/mimetypes and early abort\n\t\tif ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {\n\t\t\t// Abort if not done already and return\n\t\t\treturn jqXHR.abort();\n\t\t}\n\n\t\t// Aborting is no longer a cancellation\n\t\tstrAbort = \"abort\";\n\n\t\t// Install callbacks on deferreds\n\t\tfor ( i in { success: 1, error: 1, complete: 1 } ) {\n\t\t\tjqXHR[ i ]( s[ i ] );\n\t\t}\n\n\t\t// Get transport\n\t\ttransport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );\n\n\t\t// If no transport, we auto-abort\n\t\tif ( !transport ) {\n\t\t\tdone( -1, \"No Transport\" );\n\t\t} else {\n\t\t\tjqXHR.readyState = 1;\n\n\t\t\t// Send global event\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxSend\", [ jqXHR, s ] );\n\t\t\t}\n\t\t\t// Timeout\n\t\t\tif ( s.async && s.timeout > 0 ) {\n\t\t\t\ttimeoutTimer = setTimeout(function() {\n\t\t\t\t\tjqXHR.abort(\"timeout\");\n\t\t\t\t}, s.timeout );\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tstate = 1;\n\t\t\t\ttransport.send( requestHeaders, done );\n\t\t\t} catch ( e ) {\n\t\t\t\t// Propagate exception as error if not done\n\t\t\t\tif ( state < 2 ) {\n\t\t\t\t\tdone( -1, e );\n\t\t\t\t// Simply rethrow otherwise\n\t\t\t\t} else {\n\t\t\t\t\tthrow e;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Callback for when everything is done\n\t\tfunction done( status, nativeStatusText, responses, headers ) {\n\t\t\tvar isSuccess, success, error, response, modified,\n\t\t\t\tstatusText = nativeStatusText;\n\n\t\t\t// Called once\n\t\t\tif ( state === 2 ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// State is \"done\" now\n\t\t\tstate = 2;\n\n\t\t\t// Clear timeout if it exists\n\t\t\tif ( timeoutTimer ) {\n\t\t\t\tclearTimeout( timeoutTimer );\n\t\t\t}\n\n\t\t\t// Dereference transport for early garbage collection\n\t\t\t// (no matter how long the jqXHR object will be used)\n\t\t\ttransport = undefined;\n\n\t\t\t// Cache response headers\n\t\t\tresponseHeadersString = headers || \"\";\n\n\t\t\t// Set readyState\n\t\t\tjqXHR.readyState = status > 0 ? 4 : 0;\n\n\t\t\t// Determine if successful\n\t\t\tisSuccess = status >= 200 && status < 300 || status === 304;\n\n\t\t\t// Get response data\n\t\t\tif ( responses ) {\n\t\t\t\tresponse = ajaxHandleResponses( s, jqXHR, responses );\n\t\t\t}\n\n\t\t\t// Convert no matter what (that way responseXXX fields are always set)\n\t\t\tresponse = ajaxConvert( s, response, jqXHR, isSuccess );\n\n\t\t\t// If successful, handle type chaining\n\t\t\tif ( isSuccess ) {\n\n\t\t\t\t// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.\n\t\t\t\tif ( s.ifModified ) {\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"Last-Modified\");\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.lastModified[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t\tmodified = jqXHR.getResponseHeader(\"etag\");\n\t\t\t\t\tif ( modified ) {\n\t\t\t\t\t\tjQuery.etag[ cacheURL ] = modified;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// if no content\n\t\t\t\tif ( status === 204 || s.type === \"HEAD\" ) {\n\t\t\t\t\tstatusText = \"nocontent\";\n\n\t\t\t\t// if not modified\n\t\t\t\t} else if ( status === 304 ) {\n\t\t\t\t\tstatusText = \"notmodified\";\n\n\t\t\t\t// If we have data, let's convert it\n\t\t\t\t} else {\n\t\t\t\t\tstatusText = response.state;\n\t\t\t\t\tsuccess = response.data;\n\t\t\t\t\terror = response.error;\n\t\t\t\t\tisSuccess = !error;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Extract error from statusText and normalize for non-aborts\n\t\t\t\terror = statusText;\n\t\t\t\tif ( status || !statusText ) {\n\t\t\t\t\tstatusText = \"error\";\n\t\t\t\t\tif ( status < 0 ) {\n\t\t\t\t\t\tstatus = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Set data for the fake xhr object\n\t\t\tjqXHR.status = status;\n\t\t\tjqXHR.statusText = ( nativeStatusText || statusText ) + \"\";\n\n\t\t\t// Success/Error\n\t\t\tif ( isSuccess ) {\n\t\t\t\tdeferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );\n\t\t\t} else {\n\t\t\t\tdeferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );\n\t\t\t}\n\n\t\t\t// Status-dependent callbacks\n\t\t\tjqXHR.statusCode( statusCode );\n\t\t\tstatusCode = undefined;\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( isSuccess ? \"ajaxSuccess\" : \"ajaxError\",\n\t\t\t\t\t[ jqXHR, s, isSuccess ? success : error ] );\n\t\t\t}\n\n\t\t\t// Complete\n\t\t\tcompleteDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );\n\n\t\t\tif ( fireGlobals ) {\n\t\t\t\tglobalEventContext.trigger( \"ajaxComplete\", [ jqXHR, s ] );\n\t\t\t\t// Handle the global AJAX counter\n\t\t\t\tif ( !( --jQuery.active ) ) {\n\t\t\t\t\tjQuery.event.trigger(\"ajaxStop\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn jqXHR;\n\t},\n\n\tgetJSON: function( url, data, callback ) {\n\t\treturn jQuery.get( url, data, callback, \"json\" );\n\t},\n\n\tgetScript: function( url, callback ) {\n\t\treturn jQuery.get( url, undefined, callback, \"script\" );\n\t}\n});\n\njQuery.each( [ \"get\", \"post\" ], function( i, method ) {\n\tjQuery[ method ] = function( url, data, callback, type ) {\n\t\t// Shift arguments if data argument was omitted\n\t\tif ( jQuery.isFunction( data ) ) {\n\t\t\ttype = type || callback;\n\t\t\tcallback = data;\n\t\t\tdata = undefined;\n\t\t}\n\n\t\treturn jQuery.ajax({\n\t\t\turl: url,\n\t\t\ttype: method,\n\t\t\tdataType: type,\n\t\t\tdata: data,\n\t\t\tsuccess: callback\n\t\t});\n\t};\n});\n\n\njQuery._evalUrl = function( url ) {\n\treturn jQuery.ajax({\n\t\turl: url,\n\t\ttype: \"GET\",\n\t\tdataType: \"script\",\n\t\tasync: false,\n\t\tglobal: false,\n\t\t\"throws\": true\n\t});\n};\n\n\njQuery.fn.extend({\n\twrapAll: function( html ) {\n\t\tvar wrap;\n\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery( this ).wrapAll( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\tif ( this[ 0 ] ) {\n\n\t\t\t// The elements to wrap the target around\n\t\t\twrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true );\n\n\t\t\tif ( this[ 0 ].parentNode ) {\n\t\t\t\twrap.insertBefore( this[ 0 ] );\n\t\t\t}\n\n\t\t\twrap.map(function() {\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstElementChild ) {\n\t\t\t\t\telem = elem.firstElementChild;\n\t\t\t\t}\n\n\t\t\t\treturn elem;\n\t\t\t}).append( this );\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\tif ( jQuery.isFunction( html ) ) {\n\t\t\treturn this.each(function( i ) {\n\t\t\t\tjQuery( this ).wrapInner( html.call(this, i) );\n\t\t\t});\n\t\t}\n\n\t\treturn this.each(function() {\n\t\t\tvar self = jQuery( this ),\n\t\t\t\tcontents = self.contents();\n\n\t\t\tif ( contents.length ) {\n\t\t\t\tcontents.wrapAll( html );\n\n\t\t\t} else {\n\t\t\t\tself.append( html );\n\t\t\t}\n\t\t});\n\t},\n\n\twrap: function( html ) {\n\t\tvar isFunction = jQuery.isFunction( html );\n\n\t\treturn this.each(function( i ) {\n\t\t\tjQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );\n\t\t});\n\t},\n\n\tunwrap: function() {\n\t\treturn this.parent().each(function() {\n\t\t\tif ( !jQuery.nodeName( this, \"body\" ) ) {\n\t\t\t\tjQuery( this ).replaceWith( this.childNodes );\n\t\t\t}\n\t\t}).end();\n\t}\n});\n\n\njQuery.expr.filters.hidden = function( elem ) {\n\t// Support: Opera <= 12.12\n\t// Opera reports offsetWidths and offsetHeights less than zero on some elements\n\treturn elem.offsetWidth <= 0 && elem.offsetHeight <= 0;\n};\njQuery.expr.filters.visible = function( elem ) {\n\treturn !jQuery.expr.filters.hidden( elem );\n};\n\n\n\n\nvar r20 = /%20/g,\n\trbracket = /\\[\\]$/,\n\trCRLF = /\\r?\\n/g,\n\trsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,\n\trsubmittable = /^(?:input|select|textarea|keygen)/i;\n\nfunction buildParams( prefix, obj, traditional, add ) {\n\tvar name;\n\n\tif ( jQuery.isArray( obj ) ) {\n\t\t// Serialize array item.\n\t\tjQuery.each( obj, function( i, v ) {\n\t\t\tif ( traditional || rbracket.test( prefix ) ) {\n\t\t\t\t// Treat each array item as a scalar.\n\t\t\t\tadd( prefix, v );\n\n\t\t\t} else {\n\t\t\t\t// Item is non-scalar (array or object), encode its numeric index.\n\t\t\t\tbuildParams( prefix + \"[\" + ( typeof v === \"object\" ? i : \"\" ) + \"]\", v, traditional, add );\n\t\t\t}\n\t\t});\n\n\t} else if ( !traditional && jQuery.type( obj ) === \"object\" ) {\n\t\t// Serialize object item.\n\t\tfor ( name in obj ) {\n\t\t\tbuildParams( prefix + \"[\" + name + \"]\", obj[ name ], traditional, add );\n\t\t}\n\n\t} else {\n\t\t// Serialize scalar item.\n\t\tadd( prefix, obj );\n\t}\n}\n\n// Serialize an array of form elements or a set of\n// key/values into a query string\njQuery.param = function( a, traditional ) {\n\tvar prefix,\n\t\ts = [],\n\t\tadd = function( key, value ) {\n\t\t\t// If value is a function, invoke it and return its value\n\t\t\tvalue = jQuery.isFunction( value ) ? value() : ( value == null ? \"\" : value );\n\t\t\ts[ s.length ] = encodeURIComponent( key ) + \"=\" + encodeURIComponent( value );\n\t\t};\n\n\t// Set traditional to true for jQuery <= 1.3.2 behavior.\n\tif ( traditional === undefined ) {\n\t\ttraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;\n\t}\n\n\t// If an array was passed in, assume that it is an array of form elements.\n\tif ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {\n\t\t// Serialize the form elements\n\t\tjQuery.each( a, function() {\n\t\t\tadd( this.name, this.value );\n\t\t});\n\n\t} else {\n\t\t// If traditional, encode the \"old\" way (the way 1.3.2 or older\n\t\t// did it), otherwise encode params recursively.\n\t\tfor ( prefix in a ) {\n\t\t\tbuildParams( prefix, a[ prefix ], traditional, add );\n\t\t}\n\t}\n\n\t// Return the resulting serialization\n\treturn s.join( \"&\" ).replace( r20, \"+\" );\n};\n\njQuery.fn.extend({\n\tserialize: function() {\n\t\treturn jQuery.param( this.serializeArray() );\n\t},\n\tserializeArray: function() {\n\t\treturn this.map(function() {\n\t\t\t// Can add propHook for \"elements\" to filter or add form elements\n\t\t\tvar elements = jQuery.prop( this, \"elements\" );\n\t\t\treturn elements ? jQuery.makeArray( elements ) : this;\n\t\t})\n\t\t.filter(function() {\n\t\t\tvar type = this.type;\n\n\t\t\t// Use .is( \":disabled\" ) so that fieldset[disabled] works\n\t\t\treturn this.name && !jQuery( this ).is( \":disabled\" ) &&\n\t\t\t\trsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&\n\t\t\t\t( this.checked || !rcheckableType.test( type ) );\n\t\t})\n\t\t.map(function( i, elem ) {\n\t\t\tvar val = jQuery( this ).val();\n\n\t\t\treturn val == null ?\n\t\t\t\tnull :\n\t\t\t\tjQuery.isArray( val ) ?\n\t\t\t\t\tjQuery.map( val, function( val ) {\n\t\t\t\t\t\treturn { name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t\t\t\t}) :\n\t\t\t\t\t{ name: elem.name, value: val.replace( rCRLF, \"\\r\\n\" ) };\n\t\t}).get();\n\t}\n});\n\n\njQuery.ajaxSettings.xhr = function() {\n\ttry {\n\t\treturn new XMLHttpRequest();\n\t} catch( e ) {}\n};\n\nvar xhrId = 0,\n\txhrCallbacks = {},\n\txhrSuccessStatus = {\n\t\t// file protocol always yields status code 0, assume 200\n\t\t0: 200,\n\t\t// Support: IE9\n\t\t// #1450: sometimes IE returns 1223 when it should be 204\n\t\t1223: 204\n\t},\n\txhrSupported = jQuery.ajaxSettings.xhr();\n\n// Support: IE9\n// Open requests must be manually aborted on unload (#5280)\n// See https://support.microsoft.com/kb/2856746 for more info\nif ( window.attachEvent ) {\n\twindow.attachEvent( \"onunload\", function() {\n\t\tfor ( var key in xhrCallbacks ) {\n\t\t\txhrCallbacks[ key ]();\n\t\t}\n\t});\n}\n\nsupport.cors = !!xhrSupported && ( \"withCredentials\" in xhrSupported );\nsupport.ajax = xhrSupported = !!xhrSupported;\n\njQuery.ajaxTransport(function( options ) {\n\tvar callback;\n\n\t// Cross domain only allowed if supported through XMLHttpRequest\n\tif ( support.cors || xhrSupported && !options.crossDomain ) {\n\t\treturn {\n\t\t\tsend: function( headers, complete ) {\n\t\t\t\tvar i,\n\t\t\t\t\txhr = options.xhr(),\n\t\t\t\t\tid = ++xhrId;\n\n\t\t\t\txhr.open( options.type, options.url, options.async, options.username, options.password );\n\n\t\t\t\t// Apply custom fields if provided\n\t\t\t\tif ( options.xhrFields ) {\n\t\t\t\t\tfor ( i in options.xhrFields ) {\n\t\t\t\t\t\txhr[ i ] = options.xhrFields[ i ];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Override mime type if needed\n\t\t\t\tif ( options.mimeType && xhr.overrideMimeType ) {\n\t\t\t\t\txhr.overrideMimeType( options.mimeType );\n\t\t\t\t}\n\n\t\t\t\t// X-Requested-With header\n\t\t\t\t// For cross-domain requests, seeing as conditions for a preflight are\n\t\t\t\t// akin to a jigsaw puzzle, we simply never set it to be sure.\n\t\t\t\t// (it can always be set on a per-request basis or even using ajaxSetup)\n\t\t\t\t// For same-domain requests, won't change header if already provided.\n\t\t\t\tif ( !options.crossDomain && !headers[\"X-Requested-With\"] ) {\n\t\t\t\t\theaders[\"X-Requested-With\"] = \"XMLHttpRequest\";\n\t\t\t\t}\n\n\t\t\t\t// Set headers\n\t\t\t\tfor ( i in headers ) {\n\t\t\t\t\txhr.setRequestHeader( i, headers[ i ] );\n\t\t\t\t}\n\n\t\t\t\t// Callback\n\t\t\t\tcallback = function( type ) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\t\tdelete xhrCallbacks[ id ];\n\t\t\t\t\t\t\tcallback = xhr.onload = xhr.onerror = null;\n\n\t\t\t\t\t\t\tif ( type === \"abort\" ) {\n\t\t\t\t\t\t\t\txhr.abort();\n\t\t\t\t\t\t\t} else if ( type === \"error\" ) {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\t// file: protocol always yields status 0; see #8605, #14207\n\t\t\t\t\t\t\t\t\txhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tcomplete(\n\t\t\t\t\t\t\t\t\txhrSuccessStatus[ xhr.status ] || xhr.status,\n\t\t\t\t\t\t\t\t\txhr.statusText,\n\t\t\t\t\t\t\t\t\t// Support: IE9\n\t\t\t\t\t\t\t\t\t// Accessing binary-data responseText throws an exception\n\t\t\t\t\t\t\t\t\t// (#11426)\n\t\t\t\t\t\t\t\t\ttypeof xhr.responseText === \"string\" ? {\n\t\t\t\t\t\t\t\t\t\ttext: xhr.responseText\n\t\t\t\t\t\t\t\t\t} : undefined,\n\t\t\t\t\t\t\t\t\txhr.getAllResponseHeaders()\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t};\n\n\t\t\t\t// Listen to events\n\t\t\t\txhr.onload = callback();\n\t\t\t\txhr.onerror = callback(\"error\");\n\n\t\t\t\t// Create the abort callback\n\t\t\t\tcallback = xhrCallbacks[ id ] = callback(\"abort\");\n\n\t\t\t\ttry {\n\t\t\t\t\t// Do send the request (this may raise an exception)\n\t\t\t\t\txhr.send( options.hasContent && options.data || null );\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\t// #14683: Only rethrow if this hasn't been notified as an error yet\n\t\t\t\t\tif ( callback ) {\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n});\n\n\n\n\n// Install script dataType\njQuery.ajaxSetup({\n\taccepts: {\n\t\tscript: \"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript\"\n\t},\n\tcontents: {\n\t\tscript: /(?:java|ecma)script/\n\t},\n\tconverters: {\n\t\t\"text script\": function( text ) {\n\t\t\tjQuery.globalEval( text );\n\t\t\treturn text;\n\t\t}\n\t}\n});\n\n// Handle cache's special case and crossDomain\njQuery.ajaxPrefilter( \"script\", function( s ) {\n\tif ( s.cache === undefined ) {\n\t\ts.cache = false;\n\t}\n\tif ( s.crossDomain ) {\n\t\ts.type = \"GET\";\n\t}\n});\n\n// Bind script tag hack transport\njQuery.ajaxTransport( \"script\", function( s ) {\n\t// This transport only deals with cross domain requests\n\tif ( s.crossDomain ) {\n\t\tvar script, callback;\n\t\treturn {\n\t\t\tsend: function( _, complete ) {\n\t\t\t\tscript = jQuery(\"<script>\").prop({\n\t\t\t\t\tasync: true,\n\t\t\t\t\tcharset: s.scriptCharset,\n\t\t\t\t\tsrc: s.url\n\t\t\t\t}).on(\n\t\t\t\t\t\"load error\",\n\t\t\t\t\tcallback = function( evt ) {\n\t\t\t\t\t\tscript.remove();\n\t\t\t\t\t\tcallback = null;\n\t\t\t\t\t\tif ( evt ) {\n\t\t\t\t\t\t\tcomplete( evt.type === \"error\" ? 404 : 200, evt.type );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\tdocument.head.appendChild( script[ 0 ] );\n\t\t\t},\n\t\t\tabort: function() {\n\t\t\t\tif ( callback ) {\n\t\t\t\t\tcallback();\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}\n});\n\n\n\n\nvar oldCallbacks = [],\n\trjsonp = /(=)\\?(?=&|$)|\\?\\?/;\n\n// Default jsonp settings\njQuery.ajaxSetup({\n\tjsonp: \"callback\",\n\tjsonpCallback: function() {\n\t\tvar callback = oldCallbacks.pop() || ( jQuery.expando + \"_\" + ( nonce++ ) );\n\t\tthis[ callback ] = true;\n\t\treturn callback;\n\t}\n});\n\n// Detect, normalize options and install callbacks for jsonp requests\njQuery.ajaxPrefilter( \"json jsonp\", function( s, originalSettings, jqXHR ) {\n\n\tvar callbackName, overwritten, responseContainer,\n\t\tjsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?\n\t\t\t\"url\" :\n\t\t\ttypeof s.data === \"string\" && !( s.contentType || \"\" ).indexOf(\"application/x-www-form-urlencoded\") && rjsonp.test( s.data ) && \"data\"\n\t\t);\n\n\t// Handle iff the expected data type is \"jsonp\" or we have a parameter to set\n\tif ( jsonProp || s.dataTypes[ 0 ] === \"jsonp\" ) {\n\n\t\t// Get callback name, remembering preexisting value associated with it\n\t\tcallbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?\n\t\t\ts.jsonpCallback() :\n\t\t\ts.jsonpCallback;\n\n\t\t// Insert callback into url or form data\n\t\tif ( jsonProp ) {\n\t\t\ts[ jsonProp ] = s[ jsonProp ].replace( rjsonp, \"$1\" + callbackName );\n\t\t} else if ( s.jsonp !== false ) {\n\t\t\ts.url += ( rquery.test( s.url ) ? \"&\" : \"?\" ) + s.jsonp + \"=\" + callbackName;\n\t\t}\n\n\t\t// Use data converter to retrieve json after script execution\n\t\ts.converters[\"script json\"] = function() {\n\t\t\tif ( !responseContainer ) {\n\t\t\t\tjQuery.error( callbackName + \" was not called\" );\n\t\t\t}\n\t\t\treturn responseContainer[ 0 ];\n\t\t};\n\n\t\t// force json dataType\n\t\ts.dataTypes[ 0 ] = \"json\";\n\n\t\t// Install callback\n\t\toverwritten = window[ callbackName ];\n\t\twindow[ callbackName ] = function() {\n\t\t\tresponseContainer = arguments;\n\t\t};\n\n\t\t// Clean-up function (fires after converters)\n\t\tjqXHR.always(function() {\n\t\t\t// Restore preexisting value\n\t\t\twindow[ callbackName ] = overwritten;\n\n\t\t\t// Save back as free\n\t\t\tif ( s[ callbackName ] ) {\n\t\t\t\t// make sure that re-using the options doesn't screw things around\n\t\t\t\ts.jsonpCallback = originalSettings.jsonpCallback;\n\n\t\t\t\t// save the callback name for future use\n\t\t\t\toldCallbacks.push( callbackName );\n\t\t\t}\n\n\t\t\t// Call if it was a function and we have a response\n\t\t\tif ( responseContainer && jQuery.isFunction( overwritten ) ) {\n\t\t\t\toverwritten( responseContainer[ 0 ] );\n\t\t\t}\n\n\t\t\tresponseContainer = overwritten = undefined;\n\t\t});\n\n\t\t// Delegate to script\n\t\treturn \"script\";\n\t}\n});\n\n\n\n\n// data: string of html\n// context (optional): If specified, the fragment will be created in this context, defaults to document\n// keepScripts (optional): If true, will include scripts passed in the html string\njQuery.parseHTML = function( data, context, keepScripts ) {\n\tif ( !data || typeof data !== \"string\" ) {\n\t\treturn null;\n\t}\n\tif ( typeof context === \"boolean\" ) {\n\t\tkeepScripts = context;\n\t\tcontext = false;\n\t}\n\tcontext = context || document;\n\n\tvar parsed = rsingleTag.exec( data ),\n\t\tscripts = !keepScripts && [];\n\n\t// Single tag\n\tif ( parsed ) {\n\t\treturn [ context.createElement( parsed[1] ) ];\n\t}\n\n\tparsed = jQuery.buildFragment( [ data ], context, scripts );\n\n\tif ( scripts && scripts.length ) {\n\t\tjQuery( scripts ).remove();\n\t}\n\n\treturn jQuery.merge( [], parsed.childNodes );\n};\n\n\n// Keep a copy of the old load method\nvar _load = jQuery.fn.load;\n\n/**\n * Load a url into a page\n */\njQuery.fn.load = function( url, params, callback ) {\n\tif ( typeof url !== \"string\" && _load ) {\n\t\treturn _load.apply( this, arguments );\n\t}\n\n\tvar selector, type, response,\n\t\tself = this,\n\t\toff = url.indexOf(\" \");\n\n\tif ( off >= 0 ) {\n\t\tselector = jQuery.trim( url.slice( off ) );\n\t\turl = url.slice( 0, off );\n\t}\n\n\t// If it's a function\n\tif ( jQuery.isFunction( params ) ) {\n\n\t\t// We assume that it's the callback\n\t\tcallback = params;\n\t\tparams = undefined;\n\n\t// Otherwise, build a param string\n\t} else if ( params && typeof params === \"object\" ) {\n\t\ttype = \"POST\";\n\t}\n\n\t// If we have elements to modify, make the request\n\tif ( self.length > 0 ) {\n\t\tjQuery.ajax({\n\t\t\turl: url,\n\n\t\t\t// if \"type\" variable is undefined, then \"GET\" method will be used\n\t\t\ttype: type,\n\t\t\tdataType: \"html\",\n\t\t\tdata: params\n\t\t}).done(function( responseText ) {\n\n\t\t\t// Save response for use in complete callback\n\t\t\tresponse = arguments;\n\n\t\t\tself.html( selector ?\n\n\t\t\t\t// If a selector was specified, locate the right elements in a dummy div\n\t\t\t\t// Exclude scripts to avoid IE 'Permission Denied' errors\n\t\t\t\tjQuery(\"<div>\").append( jQuery.parseHTML( responseText ) ).find( selector ) :\n\n\t\t\t\t// Otherwise use the full result\n\t\t\t\tresponseText );\n\n\t\t}).complete( callback && function( jqXHR, status ) {\n\t\t\tself.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );\n\t\t});\n\t}\n\n\treturn this;\n};\n\n\n\n\n// Attach a bunch of functions for handling common AJAX events\njQuery.each( [ \"ajaxStart\", \"ajaxStop\", \"ajaxComplete\", \"ajaxError\", \"ajaxSuccess\", \"ajaxSend\" ], function( i, type ) {\n\tjQuery.fn[ type ] = function( fn ) {\n\t\treturn this.on( type, fn );\n\t};\n});\n\n\n\n\njQuery.expr.filters.animated = function( elem ) {\n\treturn jQuery.grep(jQuery.timers, function( fn ) {\n\t\treturn elem === fn.elem;\n\t}).length;\n};\n\n\n\n\nvar docElem = window.document.documentElement;\n\n/**\n * Gets a window from an element\n */\nfunction getWindow( elem ) {\n\treturn jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView;\n}\n\njQuery.offset = {\n\tsetOffset: function( elem, options, i ) {\n\t\tvar curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition,\n\t\t\tposition = jQuery.css( elem, \"position\" ),\n\t\t\tcurElem = jQuery( elem ),\n\t\t\tprops = {};\n\n\t\t// Set position first, in-case top/left are set even on static elem\n\t\tif ( position === \"static\" ) {\n\t\t\telem.style.position = \"relative\";\n\t\t}\n\n\t\tcurOffset = curElem.offset();\n\t\tcurCSSTop = jQuery.css( elem, \"top\" );\n\t\tcurCSSLeft = jQuery.css( elem, \"left\" );\n\t\tcalculatePosition = ( position === \"absolute\" || position === \"fixed\" ) &&\n\t\t\t( curCSSTop + curCSSLeft ).indexOf(\"auto\") > -1;\n\n\t\t// Need to be able to calculate position if either\n\t\t// top or left is auto and position is either absolute or fixed\n\t\tif ( calculatePosition ) {\n\t\t\tcurPosition = curElem.position();\n\t\t\tcurTop = curPosition.top;\n\t\t\tcurLeft = curPosition.left;\n\n\t\t} else {\n\t\t\tcurTop = parseFloat( curCSSTop ) || 0;\n\t\t\tcurLeft = parseFloat( curCSSLeft ) || 0;\n\t\t}\n\n\t\tif ( jQuery.isFunction( options ) ) {\n\t\t\toptions = options.call( elem, i, curOffset );\n\t\t}\n\n\t\tif ( options.top != null ) {\n\t\t\tprops.top = ( options.top - curOffset.top ) + curTop;\n\t\t}\n\t\tif ( options.left != null ) {\n\t\t\tprops.left = ( options.left - curOffset.left ) + curLeft;\n\t\t}\n\n\t\tif ( \"using\" in options ) {\n\t\t\toptions.using.call( elem, props );\n\n\t\t} else {\n\t\t\tcurElem.css( props );\n\t\t}\n\t}\n};\n\njQuery.fn.extend({\n\toffset: function( options ) {\n\t\tif ( arguments.length ) {\n\t\t\treturn options === undefined ?\n\t\t\t\tthis :\n\t\t\t\tthis.each(function( i ) {\n\t\t\t\t\tjQuery.offset.setOffset( this, options, i );\n\t\t\t\t});\n\t\t}\n\n\t\tvar docElem, win,\n\t\t\telem = this[ 0 ],\n\t\t\tbox = { top: 0, left: 0 },\n\t\t\tdoc = elem && elem.ownerDocument;\n\n\t\tif ( !doc ) {\n\t\t\treturn;\n\t\t}\n\n\t\tdocElem = doc.documentElement;\n\n\t\t// Make sure it's not a disconnected DOM node\n\t\tif ( !jQuery.contains( docElem, elem ) ) {\n\t\t\treturn box;\n\t\t}\n\n\t\t// Support: BlackBerry 5, iOS 3 (original iPhone)\n\t\t// If we don't have gBCR, just use 0,0 rather than error\n\t\tif ( typeof elem.getBoundingClientRect !== strundefined ) {\n\t\t\tbox = elem.getBoundingClientRect();\n\t\t}\n\t\twin = getWindow( doc );\n\t\treturn {\n\t\t\ttop: box.top + win.pageYOffset - docElem.clientTop,\n\t\t\tleft: box.left + win.pageXOffset - docElem.clientLeft\n\t\t};\n\t},\n\n\tposition: function() {\n\t\tif ( !this[ 0 ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar offsetParent, offset,\n\t\t\telem = this[ 0 ],\n\t\t\tparentOffset = { top: 0, left: 0 };\n\n\t\t// Fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is its only offset parent\n\t\tif ( jQuery.css( elem, \"position\" ) === \"fixed\" ) {\n\t\t\t// Assume getBoundingClientRect is there when computed position is fixed\n\t\t\toffset = elem.getBoundingClientRect();\n\n\t\t} else {\n\t\t\t// Get *real* offsetParent\n\t\t\toffsetParent = this.offsetParent();\n\n\t\t\t// Get correct offsets\n\t\t\toffset = this.offset();\n\t\t\tif ( !jQuery.nodeName( offsetParent[ 0 ], \"html\" ) ) {\n\t\t\t\tparentOffset = offsetParent.offset();\n\t\t\t}\n\n\t\t\t// Add offsetParent borders\n\t\t\tparentOffset.top += jQuery.css( offsetParent[ 0 ], \"borderTopWidth\", true );\n\t\t\tparentOffset.left += jQuery.css( offsetParent[ 0 ], \"borderLeftWidth\", true );\n\t\t}\n\n\t\t// Subtract parent offsets and element margins\n\t\treturn {\n\t\t\ttop: offset.top - parentOffset.top - jQuery.css( elem, \"marginTop\", true ),\n\t\t\tleft: offset.left - parentOffset.left - jQuery.css( elem, \"marginLeft\", true )\n\t\t};\n\t},\n\n\toffsetParent: function() {\n\t\treturn this.map(function() {\n\t\t\tvar offsetParent = this.offsetParent || docElem;\n\n\t\t\twhile ( offsetParent && ( !jQuery.nodeName( offsetParent, \"html\" ) && jQuery.css( offsetParent, \"position\" ) === \"static\" ) ) {\n\t\t\t\toffsetParent = offsetParent.offsetParent;\n\t\t\t}\n\n\t\t\treturn offsetParent || docElem;\n\t\t});\n\t}\n});\n\n// Create scrollLeft and scrollTop methods\njQuery.each( { scrollLeft: \"pageXOffset\", scrollTop: \"pageYOffset\" }, function( method, prop ) {\n\tvar top = \"pageYOffset\" === prop;\n\n\tjQuery.fn[ method ] = function( val ) {\n\t\treturn access( this, function( elem, method, val ) {\n\t\t\tvar win = getWindow( elem );\n\n\t\t\tif ( val === undefined ) {\n\t\t\t\treturn win ? win[ prop ] : elem[ method ];\n\t\t\t}\n\n\t\t\tif ( win ) {\n\t\t\t\twin.scrollTo(\n\t\t\t\t\t!top ? val : window.pageXOffset,\n\t\t\t\t\ttop ? val : window.pageYOffset\n\t\t\t\t);\n\n\t\t\t} else {\n\t\t\t\telem[ method ] = val;\n\t\t\t}\n\t\t}, method, val, arguments.length, null );\n\t};\n});\n\n// Support: Safari<7+, Chrome<37+\n// Add the top/left cssHooks using jQuery.fn.position\n// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084\n// Blink bug: https://code.google.com/p/chromium/issues/detail?id=229280\n// getComputedStyle returns percent when specified for top/left/bottom/right;\n// rather than make the css module depend on the offset module, just check for it here\njQuery.each( [ \"top\", \"left\" ], function( i, prop ) {\n\tjQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition,\n\t\tfunction( elem, computed ) {\n\t\t\tif ( computed ) {\n\t\t\t\tcomputed = curCSS( elem, prop );\n\t\t\t\t// If curCSS returns percentage, fallback to offset\n\t\t\t\treturn rnumnonpx.test( computed ) ?\n\t\t\t\t\tjQuery( elem ).position()[ prop ] + \"px\" :\n\t\t\t\t\tcomputed;\n\t\t\t}\n\t\t}\n\t);\n});\n\n\n// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods\njQuery.each( { Height: \"height\", Width: \"width\" }, function( name, type ) {\n\tjQuery.each( { padding: \"inner\" + name, content: type, \"\": \"outer\" + name }, function( defaultExtra, funcName ) {\n\t\t// Margin is only for outerHeight, outerWidth\n\t\tjQuery.fn[ funcName ] = function( margin, value ) {\n\t\t\tvar chainable = arguments.length && ( defaultExtra || typeof margin !== \"boolean\" ),\n\t\t\t\textra = defaultExtra || ( margin === true || value === true ? \"margin\" : \"border\" );\n\n\t\t\treturn access( this, function( elem, type, value ) {\n\t\t\t\tvar doc;\n\n\t\t\t\tif ( jQuery.isWindow( elem ) ) {\n\t\t\t\t\t// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there\n\t\t\t\t\t// isn't a whole lot we can do. See pull request at this URL for discussion:\n\t\t\t\t\t// https://github.com/jquery/jquery/pull/764\n\t\t\t\t\treturn elem.document.documentElement[ \"client\" + name ];\n\t\t\t\t}\n\n\t\t\t\t// Get document width or height\n\t\t\t\tif ( elem.nodeType === 9 ) {\n\t\t\t\t\tdoc = elem.documentElement;\n\n\t\t\t\t\t// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height],\n\t\t\t\t\t// whichever is greatest\n\t\t\t\t\treturn Math.max(\n\t\t\t\t\t\telem.body[ \"scroll\" + name ], doc[ \"scroll\" + name ],\n\t\t\t\t\t\telem.body[ \"offset\" + name ], doc[ \"offset\" + name ],\n\t\t\t\t\t\tdoc[ \"client\" + name ]\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\treturn value === undefined ?\n\t\t\t\t\t// Get width or height on the element, requesting but not forcing parseFloat\n\t\t\t\t\tjQuery.css( elem, type, extra ) :\n\n\t\t\t\t\t// Set width or height on the element\n\t\t\t\t\tjQuery.style( elem, type, value, extra );\n\t\t\t}, type, chainable ? margin : undefined, chainable, null );\n\t\t};\n\t});\n});\n\n\n// The number of elements contained in the matched element set\njQuery.fn.size = function() {\n\treturn this.length;\n};\n\njQuery.fn.andSelf = jQuery.fn.addBack;\n\n\n\n\n// Register as a named AMD module, since jQuery can be concatenated with other\n// files that may use define, but not via a proper concatenation script that\n// understands anonymous AMD modules. A named AMD is safest and most robust\n// way to register. Lowercase jquery is used because AMD module names are\n// derived from file names, and jQuery is normally delivered in a lowercase\n// file name. Do this after creating the global so that if an AMD module wants\n// to call noConflict to hide this version of jQuery, it will work.\n\n// Note that for maximum portability, libraries that are not jQuery should\n// declare themselves as anonymous modules, and avoid setting a global if an\n// AMD loader is present. jQuery is a special case. For more information, see\n// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon\n\nif ( typeof define === \"function\" && define.amd ) {\n\tdefine( \"jquery\", [], function() {\n\t\treturn jQuery;\n\t});\n}\n\n\n\n\nvar\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\n\t// Map over the $ in case of overwrite\n\t_$ = window.$;\n\njQuery.noConflict = function( deep ) {\n\tif ( window.$ === jQuery ) {\n\t\twindow.$ = _$;\n\t}\n\n\tif ( deep && window.jQuery === jQuery ) {\n\t\twindow.jQuery = _jQuery;\n\t}\n\n\treturn jQuery;\n};\n\n// Expose jQuery and $ identifiers, even in AMD\n// (#7102#comment:10, https://github.com/jquery/jquery/pull/557)\n// and CommonJS for browser emulators (#13566)\nif ( typeof noGlobal === strundefined ) {\n\twindow.jQuery = window.$ = jQuery;\n}\n\n\n\n\nreturn jQuery;\n\n}));\n","/**\n * @license AngularJS v1.2.21\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, document, undefined) {'use strict';\n\n/**\n * @description\n *\n * This object provides a utility for producing rich Error messages within\n * Angular. It can be called as follows:\n *\n * var exampleMinErr = minErr('example');\n * throw exampleMinErr('one', 'This {0} is {1}', foo, bar);\n *\n * The above creates an instance of minErr in the example namespace. The\n * resulting error will have a namespaced error code of example.one.  The\n * resulting error will replace {0} with the value of foo, and {1} with the\n * value of bar. The object is not restricted in the number of arguments it can\n * take.\n *\n * If fewer arguments are specified than necessary for interpolation, the extra\n * interpolation markers will be preserved in the final string.\n *\n * Since data will be parsed statically during a build step, some restrictions\n * are applied with respect to how minErr instances are created and called.\n * Instances should have names of the form namespaceMinErr for a minErr created\n * using minErr('namespace') . Error codes, namespaces and template strings\n * should all be static strings, not variables or general expressions.\n *\n * @param {string} module The namespace to use for the new minErr instance.\n * @returns {function(code:string, template:string, ...templateArgs): Error} minErr instance\n */\n\nfunction minErr(module) {\n  return function () {\n    var code = arguments[0],\n      prefix = '[' + (module ? module + ':' : '') + code + '] ',\n      template = arguments[1],\n      templateArgs = arguments,\n      stringify = function (obj) {\n        if (typeof obj === 'function') {\n          return obj.toString().replace(/ \\{[\\s\\S]*$/, '');\n        } else if (typeof obj === 'undefined') {\n          return 'undefined';\n        } else if (typeof obj !== 'string') {\n          return JSON.stringify(obj);\n        }\n        return obj;\n      },\n      message, i;\n\n    message = prefix + template.replace(/\\{\\d+\\}/g, function (match) {\n      var index = +match.slice(1, -1), arg;\n\n      if (index + 2 < templateArgs.length) {\n        arg = templateArgs[index + 2];\n        if (typeof arg === 'function') {\n          return arg.toString().replace(/ ?\\{[\\s\\S]*$/, '');\n        } else if (typeof arg === 'undefined') {\n          return 'undefined';\n        } else if (typeof arg !== 'string') {\n          return toJson(arg);\n        }\n        return arg;\n      }\n      return match;\n    });\n\n    message = message + '\\nhttp://errors.angularjs.org/1.2.21/' +\n      (module ? module + '/' : '') + code;\n    for (i = 2; i < arguments.length; i++) {\n      message = message + (i == 2 ? '?' : '&') + 'p' + (i-2) + '=' +\n        encodeURIComponent(stringify(arguments[i]));\n    }\n\n    return new Error(message);\n  };\n}\n\n/* We need to tell jshint what variables are being exported */\n/* global angular: true,\n    msie: true,\n    jqLite: true,\n    jQuery: true,\n    slice: true,\n    push: true,\n    toString: true,\n    ngMinErr: true,\n    angularModule: true,\n    nodeName_: true,\n    uid: true,\n    VALIDITY_STATE_PROPERTY: true,\n\n    lowercase: true,\n    uppercase: true,\n    manualLowercase: true,\n    manualUppercase: true,\n    nodeName_: true,\n    isArrayLike: true,\n    forEach: true,\n    sortedKeys: true,\n    forEachSorted: true,\n    reverseParams: true,\n    nextUid: true,\n    setHashKey: true,\n    extend: true,\n    int: true,\n    inherit: true,\n    noop: true,\n    identity: true,\n    valueFn: true,\n    isUndefined: true,\n    isDefined: true,\n    isObject: true,\n    isString: true,\n    isNumber: true,\n    isDate: true,\n    isArray: true,\n    isFunction: true,\n    isRegExp: true,\n    isWindow: true,\n    isScope: true,\n    isFile: true,\n    isBlob: true,\n    isBoolean: true,\n    isPromiseLike: true,\n    trim: true,\n    isElement: true,\n    makeMap: true,\n    map: true,\n    size: true,\n    includes: true,\n    indexOf: true,\n    arrayRemove: true,\n    isLeafNode: true,\n    copy: true,\n    shallowCopy: true,\n    equals: true,\n    csp: true,\n    concat: true,\n    sliceArgs: true,\n    bind: true,\n    toJsonReplacer: true,\n    toJson: true,\n    fromJson: true,\n    toBoolean: true,\n    startingTag: true,\n    tryDecodeURIComponent: true,\n    parseKeyValue: true,\n    toKeyValue: true,\n    encodeUriSegment: true,\n    encodeUriQuery: true,\n    angularInit: true,\n    bootstrap: true,\n    snake_case: true,\n    bindJQuery: true,\n    assertArg: true,\n    assertArgFn: true,\n    assertNotHasOwnProperty: true,\n    getter: true,\n    getBlockElements: true,\n    hasOwnProperty: true,\n*/\n\n////////////////////////////////////\n\n/**\n * @ngdoc module\n * @name ng\n * @module ng\n * @description\n *\n * # ng (core module)\n * The ng module is loaded by default when an AngularJS application is started. The module itself\n * contains the essential components for an AngularJS application to function. The table below\n * lists a high level breakdown of each of the services/factories, filters, directives and testing\n * components available within this core module.\n *\n * <div doc-module-components=\"ng\"></div>\n */\n\n// The name of a form control's ValidityState property.\n// This is used so that it's possible for internal tests to create mock ValidityStates.\nvar VALIDITY_STATE_PROPERTY = 'validity';\n\n/**\n * @ngdoc function\n * @name angular.lowercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to lowercase.\n * @param {string} string String to be converted to lowercase.\n * @returns {string} Lowercased string.\n */\nvar lowercase = function(string){return isString(string) ? string.toLowerCase() : string;};\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\n/**\n * @ngdoc function\n * @name angular.uppercase\n * @module ng\n * @kind function\n *\n * @description Converts the specified string to uppercase.\n * @param {string} string String to be converted to uppercase.\n * @returns {string} Uppercased string.\n */\nvar uppercase = function(string){return isString(string) ? string.toUpperCase() : string;};\n\n\nvar manualLowercase = function(s) {\n  /* jshint bitwise: false */\n  return isString(s)\n      ? s.replace(/[A-Z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) | 32);})\n      : s;\n};\nvar manualUppercase = function(s) {\n  /* jshint bitwise: false */\n  return isString(s)\n      ? s.replace(/[a-z]/g, function(ch) {return String.fromCharCode(ch.charCodeAt(0) & ~32);})\n      : s;\n};\n\n\n// String#toLowerCase and String#toUpperCase don't produce correct results in browsers with Turkish\n// locale, for this reason we need to detect this case and redefine lowercase/uppercase methods\n// with correct but slower alternatives.\nif ('i' !== 'I'.toLowerCase()) {\n  lowercase = manualLowercase;\n  uppercase = manualUppercase;\n}\n\n\nvar /** holds major version number for IE or NaN for real browsers */\n    msie,\n    jqLite,           // delay binding since jQuery could be loaded after us.\n    jQuery,           // delay binding\n    slice             = [].slice,\n    push              = [].push,\n    toString          = Object.prototype.toString,\n    ngMinErr          = minErr('ng'),\n\n    /** @name angular */\n    angular           = window.angular || (window.angular = {}),\n    angularModule,\n    nodeName_,\n    uid               = ['0', '0', '0'];\n\n/**\n * IE 11 changed the format of the UserAgent string.\n * See http://msdn.microsoft.com/en-us/library/ms537503.aspx\n */\nmsie = int((/msie (\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\nif (isNaN(msie)) {\n  msie = int((/trident\\/.*; rv:(\\d+)/.exec(lowercase(navigator.userAgent)) || [])[1]);\n}\n\n\n/**\n * @private\n * @param {*} obj\n * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments,\n *                   String ...)\n */\nfunction isArrayLike(obj) {\n  if (obj == null || isWindow(obj)) {\n    return false;\n  }\n\n  var length = obj.length;\n\n  if (obj.nodeType === 1 && length) {\n    return true;\n  }\n\n  return isString(obj) || isArray(obj) || length === 0 ||\n         typeof length === 'number' && length > 0 && (length - 1) in obj;\n}\n\n/**\n * @ngdoc function\n * @name angular.forEach\n * @module ng\n * @kind function\n *\n * @description\n * Invokes the `iterator` function once for each item in `obj` collection, which can be either an\n * object or an array. The `iterator` function is invoked with `iterator(value, key)`, where `value`\n * is the value of an object property or an array element and `key` is the object property key or\n * array element index. Specifying a `context` for the function is optional.\n *\n * It is worth noting that `.forEach` does not iterate over inherited properties because it filters\n * using the `hasOwnProperty` method.\n *\n   ```js\n     var values = {name: 'misko', gender: 'male'};\n     var log = [];\n     angular.forEach(values, function(value, key) {\n       this.push(key + ': ' + value);\n     }, log);\n     expect(log).toEqual(['name: misko', 'gender: male']);\n   ```\n *\n * @param {Object|Array} obj Object to iterate over.\n * @param {Function} iterator Iterator function.\n * @param {Object=} context Object to become context (`this`) for the iterator function.\n * @returns {Object|Array} Reference to `obj`.\n */\nfunction forEach(obj, iterator, context) {\n  var key;\n  if (obj) {\n    if (isFunction(obj)) {\n      for (key in obj) {\n        // Need to check if hasOwnProperty exists,\n        // as on IE8 the result of querySelectorAll is an object without a hasOwnProperty function\n        if (key != 'prototype' && key != 'length' && key != 'name' && (!obj.hasOwnProperty || obj.hasOwnProperty(key))) {\n          iterator.call(context, obj[key], key);\n        }\n      }\n    } else if (isArray(obj) || isArrayLike(obj)) {\n      for (key = 0; key < obj.length; key++) {\n        iterator.call(context, obj[key], key);\n      }\n    } else if (obj.forEach && obj.forEach !== forEach) {\n        obj.forEach(iterator, context);\n    } else {\n      for (key in obj) {\n        if (obj.hasOwnProperty(key)) {\n          iterator.call(context, obj[key], key);\n        }\n      }\n    }\n  }\n  return obj;\n}\n\nfunction sortedKeys(obj) {\n  var keys = [];\n  for (var key in obj) {\n    if (obj.hasOwnProperty(key)) {\n      keys.push(key);\n    }\n  }\n  return keys.sort();\n}\n\nfunction forEachSorted(obj, iterator, context) {\n  var keys = sortedKeys(obj);\n  for ( var i = 0; i < keys.length; i++) {\n    iterator.call(context, obj[keys[i]], keys[i]);\n  }\n  return keys;\n}\n\n\n/**\n * when using forEach the params are value, key, but it is often useful to have key, value.\n * @param {function(string, *)} iteratorFn\n * @returns {function(*, string)}\n */\nfunction reverseParams(iteratorFn) {\n  return function(value, key) { iteratorFn(key, value); };\n}\n\n/**\n * A consistent way of creating unique IDs in angular. The ID is a sequence of alpha numeric\n * characters such as '012ABC'. The reason why we are not using simply a number counter is that\n * the number string gets longer over time, and it can also overflow, where as the nextId\n * will grow much slower, it is a string, and it will never overflow.\n *\n * @returns {string} an unique alpha-numeric string\n */\nfunction nextUid() {\n  var index = uid.length;\n  var digit;\n\n  while(index) {\n    index--;\n    digit = uid[index].charCodeAt(0);\n    if (digit == 57 /*'9'*/) {\n      uid[index] = 'A';\n      return uid.join('');\n    }\n    if (digit == 90  /*'Z'*/) {\n      uid[index] = '0';\n    } else {\n      uid[index] = String.fromCharCode(digit + 1);\n      return uid.join('');\n    }\n  }\n  uid.unshift('0');\n  return uid.join('');\n}\n\n\n/**\n * Set or clear the hashkey for an object.\n * @param obj object\n * @param h the hashkey (!truthy to delete the hashkey)\n */\nfunction setHashKey(obj, h) {\n  if (h) {\n    obj.$$hashKey = h;\n  }\n  else {\n    delete obj.$$hashKey;\n  }\n}\n\n/**\n * @ngdoc function\n * @name angular.extend\n * @module ng\n * @kind function\n *\n * @description\n * Extends the destination object `dst` by copying all of the properties from the `src` object(s)\n * to `dst`. You can specify multiple `src` objects.\n *\n * @param {Object} dst Destination object.\n * @param {...Object} src Source object(s).\n * @returns {Object} Reference to `dst`.\n */\nfunction extend(dst) {\n  var h = dst.$$hashKey;\n  forEach(arguments, function(obj) {\n    if (obj !== dst) {\n      forEach(obj, function(value, key) {\n        dst[key] = value;\n      });\n    }\n  });\n\n  setHashKey(dst,h);\n  return dst;\n}\n\nfunction int(str) {\n  return parseInt(str, 10);\n}\n\n\nfunction inherit(parent, extra) {\n  return extend(new (extend(function() {}, {prototype:parent}))(), extra);\n}\n\n/**\n * @ngdoc function\n * @name angular.noop\n * @module ng\n * @kind function\n *\n * @description\n * A function that performs no operations. This function can be useful when writing code in the\n * functional style.\n   ```js\n     function foo(callback) {\n       var result = calculateResult();\n       (callback || angular.noop)(result);\n     }\n   ```\n */\nfunction noop() {}\nnoop.$inject = [];\n\n\n/**\n * @ngdoc function\n * @name angular.identity\n * @module ng\n * @kind function\n *\n * @description\n * A function that returns its first argument. This function is useful when writing code in the\n * functional style.\n *\n   ```js\n     function transformer(transformationFn, value) {\n       return (transformationFn || angular.identity)(value);\n     };\n   ```\n */\nfunction identity($) {return $;}\nidentity.$inject = [];\n\n\nfunction valueFn(value) {return function() {return value;};}\n\n/**\n * @ngdoc function\n * @name angular.isUndefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is undefined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is undefined.\n */\nfunction isUndefined(value){return typeof value === 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDefined\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is defined.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is defined.\n */\nfunction isDefined(value){return typeof value !== 'undefined';}\n\n\n/**\n * @ngdoc function\n * @name angular.isObject\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Object`. Unlike `typeof` in JavaScript, `null`s are not\n * considered to be objects. Note that JavaScript arrays are objects.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Object` but not `null`.\n */\nfunction isObject(value){return value != null && typeof value === 'object';}\n\n\n/**\n * @ngdoc function\n * @name angular.isString\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `String`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `String`.\n */\nfunction isString(value){return typeof value === 'string';}\n\n\n/**\n * @ngdoc function\n * @name angular.isNumber\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Number`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Number`.\n */\nfunction isNumber(value){return typeof value === 'number';}\n\n\n/**\n * @ngdoc function\n * @name angular.isDate\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a value is a date.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Date`.\n */\nfunction isDate(value) {\n  return toString.call(value) === '[object Date]';\n}\n\n\n/**\n * @ngdoc function\n * @name angular.isArray\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is an `Array`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is an `Array`.\n */\nvar isArray = (function() {\n  if (!isFunction(Array.isArray)) {\n    return function(value) {\n      return toString.call(value) === '[object Array]';\n    };\n  }\n  return Array.isArray;\n})();\n\n/**\n * @ngdoc function\n * @name angular.isFunction\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a `Function`.\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `Function`.\n */\nfunction isFunction(value){return typeof value === 'function';}\n\n\n/**\n * Determines if a value is a regular expression object.\n *\n * @private\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a `RegExp`.\n */\nfunction isRegExp(value) {\n  return toString.call(value) === '[object RegExp]';\n}\n\n\n/**\n * Checks if `obj` is a window object.\n *\n * @private\n * @param {*} obj Object to check\n * @returns {boolean} True if `obj` is a window obj.\n */\nfunction isWindow(obj) {\n  return obj && obj.document && obj.location && obj.alert && obj.setInterval;\n}\n\n\nfunction isScope(obj) {\n  return obj && obj.$evalAsync && obj.$watch;\n}\n\n\nfunction isFile(obj) {\n  return toString.call(obj) === '[object File]';\n}\n\n\nfunction isBlob(obj) {\n  return toString.call(obj) === '[object Blob]';\n}\n\n\nfunction isBoolean(value) {\n  return typeof value === 'boolean';\n}\n\n\nfunction isPromiseLike(obj) {\n  return obj && isFunction(obj.then);\n}\n\n\nvar trim = (function() {\n  // native trim is way faster: http://jsperf.com/angular-trim-test\n  // but IE doesn't have it... :-(\n  // TODO: we should move this into IE/ES5 polyfill\n  if (!String.prototype.trim) {\n    return function(value) {\n      return isString(value) ? value.replace(/^\\s\\s*/, '').replace(/\\s\\s*$/, '') : value;\n    };\n  }\n  return function(value) {\n    return isString(value) ? value.trim() : value;\n  };\n})();\n\n\n/**\n * @ngdoc function\n * @name angular.isElement\n * @module ng\n * @kind function\n *\n * @description\n * Determines if a reference is a DOM element (or wrapped jQuery element).\n *\n * @param {*} value Reference to check.\n * @returns {boolean} True if `value` is a DOM element (or wrapped jQuery element).\n */\nfunction isElement(node) {\n  return !!(node &&\n    (node.nodeName  // we are a direct element\n    || (node.prop && node.attr && node.find)));  // we have an on and find method part of jQuery API\n}\n\n/**\n * @param str 'key1,key2,...'\n * @returns {object} in the form of {key1:true, key2:true, ...}\n */\nfunction makeMap(str) {\n  var obj = {}, items = str.split(\",\"), i;\n  for ( i = 0; i < items.length; i++ )\n    obj[ items[i] ] = true;\n  return obj;\n}\n\n\nif (msie < 9) {\n  nodeName_ = function(element) {\n    element = element.nodeName ? element : element[0];\n    return (element.scopeName && element.scopeName != 'HTML')\n      ? uppercase(element.scopeName + ':' + element.nodeName) : element.nodeName;\n  };\n} else {\n  nodeName_ = function(element) {\n    return element.nodeName ? element.nodeName : element[0].nodeName;\n  };\n}\n\n\nfunction map(obj, iterator, context) {\n  var results = [];\n  forEach(obj, function(value, index, list) {\n    results.push(iterator.call(context, value, index, list));\n  });\n  return results;\n}\n\n\n/**\n * @description\n * Determines the number of elements in an array, the number of properties an object has, or\n * the length of a string.\n *\n * Note: This function is used to augment the Object type in Angular expressions. See\n * {@link angular.Object} for more information about Angular arrays.\n *\n * @param {Object|Array|string} obj Object, array, or string to inspect.\n * @param {boolean} [ownPropsOnly=false] Count only \"own\" properties in an object\n * @returns {number} The size of `obj` or `0` if `obj` is neither an object nor an array.\n */\nfunction size(obj, ownPropsOnly) {\n  var count = 0, key;\n\n  if (isArray(obj) || isString(obj)) {\n    return obj.length;\n  } else if (isObject(obj)) {\n    for (key in obj)\n      if (!ownPropsOnly || obj.hasOwnProperty(key))\n        count++;\n  }\n\n  return count;\n}\n\n\nfunction includes(array, obj) {\n  return indexOf(array, obj) != -1;\n}\n\nfunction indexOf(array, obj) {\n  if (array.indexOf) return array.indexOf(obj);\n\n  for (var i = 0; i < array.length; i++) {\n    if (obj === array[i]) return i;\n  }\n  return -1;\n}\n\nfunction arrayRemove(array, value) {\n  var index = indexOf(array, value);\n  if (index >=0)\n    array.splice(index, 1);\n  return value;\n}\n\nfunction isLeafNode (node) {\n  if (node) {\n    switch (node.nodeName) {\n    case \"OPTION\":\n    case \"PRE\":\n    case \"TITLE\":\n      return true;\n    }\n  }\n  return false;\n}\n\n/**\n * @ngdoc function\n * @name angular.copy\n * @module ng\n * @kind function\n *\n * @description\n * Creates a deep copy of `source`, which should be an object or an array.\n *\n * * If no destination is supplied, a copy of the object or array is created.\n * * If a destination is provided, all of its elements (for array) or properties (for objects)\n *   are deleted and then all elements/properties from the source are copied to it.\n * * If `source` is not an object or array (inc. `null` and `undefined`), `source` is returned.\n * * If `source` is identical to 'destination' an exception will be thrown.\n *\n * @param {*} source The source that will be used to make a copy.\n *                   Can be any type, including primitives, `null`, and `undefined`.\n * @param {(Object|Array)=} destination Destination into which the source is copied. If\n *     provided, must be of the same type as `source`.\n * @returns {*} The copy or updated `destination`, if `destination` was specified.\n *\n * @example\n <example module=\"copyExample\">\n <file name=\"index.html\">\n <div ng-controller=\"ExampleController\">\n <form novalidate class=\"simple-form\">\n Name: <input type=\"text\" ng-model=\"user.name\" /><br />\n E-mail: <input type=\"email\" ng-model=\"user.email\" /><br />\n Gender: <input type=\"radio\" ng-model=\"user.gender\" value=\"male\" />male\n <input type=\"radio\" ng-model=\"user.gender\" value=\"female\" />female<br />\n <button ng-click=\"reset()\">RESET</button>\n <button ng-click=\"update(user)\">SAVE</button>\n </form>\n <pre>form = {{user | json}}</pre>\n <pre>master = {{master | json}}</pre>\n </div>\n\n <script>\n  angular.module('copyExample', [])\n    .controller('ExampleController', ['$scope', function($scope) {\n      $scope.master= {};\n\n      $scope.update = function(user) {\n        // Example with 1 argument\n        $scope.master= angular.copy(user);\n      };\n\n      $scope.reset = function() {\n        // Example with 2 arguments\n        angular.copy($scope.master, $scope.user);\n      };\n\n      $scope.reset();\n    }]);\n </script>\n </file>\n </example>\n */\nfunction copy(source, destination, stackSource, stackDest) {\n  if (isWindow(source) || isScope(source)) {\n    throw ngMinErr('cpws',\n      \"Can't copy! Making copies of Window or Scope instances is not supported.\");\n  }\n\n  if (!destination) {\n    destination = source;\n    if (source) {\n      if (isArray(source)) {\n        destination = copy(source, [], stackSource, stackDest);\n      } else if (isDate(source)) {\n        destination = new Date(source.getTime());\n      } else if (isRegExp(source)) {\n        destination = new RegExp(source.source, source.toString().match(/[^\\/]*$/)[0]);\n        destination.lastIndex = source.lastIndex;\n      } else if (isObject(source)) {\n        destination = copy(source, {}, stackSource, stackDest);\n      }\n    }\n  } else {\n    if (source === destination) throw ngMinErr('cpi',\n      \"Can't copy! Source and destination are identical.\");\n\n    stackSource = stackSource || [];\n    stackDest = stackDest || [];\n\n    if (isObject(source)) {\n      var index = indexOf(stackSource, source);\n      if (index !== -1) return stackDest[index];\n\n      stackSource.push(source);\n      stackDest.push(destination);\n    }\n\n    var result;\n    if (isArray(source)) {\n      destination.length = 0;\n      for ( var i = 0; i < source.length; i++) {\n        result = copy(source[i], null, stackSource, stackDest);\n        if (isObject(source[i])) {\n          stackSource.push(source[i]);\n          stackDest.push(result);\n        }\n        destination.push(result);\n      }\n    } else {\n      var h = destination.$$hashKey;\n      forEach(destination, function(value, key) {\n        delete destination[key];\n      });\n      for ( var key in source) {\n        result = copy(source[key], null, stackSource, stackDest);\n        if (isObject(source[key])) {\n          stackSource.push(source[key]);\n          stackDest.push(result);\n        }\n        destination[key] = result;\n      }\n      setHashKey(destination,h);\n    }\n\n  }\n  return destination;\n}\n\n/**\n * Creates a shallow copy of an object, an array or a primitive\n */\nfunction shallowCopy(src, dst) {\n  if (isArray(src)) {\n    dst = dst || [];\n\n    for ( var i = 0; i < src.length; i++) {\n      dst[i] = src[i];\n    }\n  } else if (isObject(src)) {\n    dst = dst || {};\n\n    for (var key in src) {\n      if (hasOwnProperty.call(src, key) && !(key.charAt(0) === '$' && key.charAt(1) === '$')) {\n        dst[key] = src[key];\n      }\n    }\n  }\n\n  return dst || src;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.equals\n * @module ng\n * @kind function\n *\n * @description\n * Determines if two objects or two values are equivalent. Supports value types, regular\n * expressions, arrays and objects.\n *\n * Two objects or values are considered equivalent if at least one of the following is true:\n *\n * * Both objects or values pass `===` comparison.\n * * Both objects or values are of the same type and all of their properties are equal by\n *   comparing them with `angular.equals`.\n * * Both values are NaN. (In JavaScript, NaN == NaN => false. But we consider two NaN as equal)\n * * Both values represent the same regular expression (In JavaScript,\n *   /abc/ == /abc/ => false. But we consider two regular expressions as equal when their textual\n *   representation matches).\n *\n * During a property comparison, properties of `function` type and properties with names\n * that begin with `$` are ignored.\n *\n * Scope and DOMWindow objects are being compared only by identify (`===`).\n *\n * @param {*} o1 Object or value to compare.\n * @param {*} o2 Object or value to compare.\n * @returns {boolean} True if arguments are equal.\n */\nfunction equals(o1, o2) {\n  if (o1 === o2) return true;\n  if (o1 === null || o2 === null) return false;\n  if (o1 !== o1 && o2 !== o2) return true; // NaN === NaN\n  var t1 = typeof o1, t2 = typeof o2, length, key, keySet;\n  if (t1 == t2) {\n    if (t1 == 'object') {\n      if (isArray(o1)) {\n        if (!isArray(o2)) return false;\n        if ((length = o1.length) == o2.length) {\n          for(key=0; key<length; key++) {\n            if (!equals(o1[key], o2[key])) return false;\n          }\n          return true;\n        }\n      } else if (isDate(o1)) {\n        return isDate(o2) && o1.getTime() == o2.getTime();\n      } else if (isRegExp(o1) && isRegExp(o2)) {\n        return o1.toString() == o2.toString();\n      } else {\n        if (isScope(o1) || isScope(o2) || isWindow(o1) || isWindow(o2) || isArray(o2)) return false;\n        keySet = {};\n        for(key in o1) {\n          if (key.charAt(0) === '$' || isFunction(o1[key])) continue;\n          if (!equals(o1[key], o2[key])) return false;\n          keySet[key] = true;\n        }\n        for(key in o2) {\n          if (!keySet.hasOwnProperty(key) &&\n              key.charAt(0) !== '$' &&\n              o2[key] !== undefined &&\n              !isFunction(o2[key])) return false;\n        }\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\nvar csp = function() {\n  if (isDefined(csp.isActive_)) return csp.isActive_;\n\n  var active = !!(document.querySelector('[ng-csp]') ||\n                  document.querySelector('[data-ng-csp]'));\n\n  if (!active) {\n    try {\n      /* jshint -W031, -W054 */\n      new Function('');\n      /* jshint +W031, +W054 */\n    } catch (e) {\n      active = true;\n    }\n  }\n\n  return (csp.isActive_ = active);\n};\n\n\n\nfunction concat(array1, array2, index) {\n  return array1.concat(slice.call(array2, index));\n}\n\nfunction sliceArgs(args, startIndex) {\n  return slice.call(args, startIndex || 0);\n}\n\n\n/* jshint -W101 */\n/**\n * @ngdoc function\n * @name angular.bind\n * @module ng\n * @kind function\n *\n * @description\n * Returns a function which calls function `fn` bound to `self` (`self` becomes the `this` for\n * `fn`). You can supply optional `args` that are prebound to the function. This feature is also\n * known as [partial application](http://en.wikipedia.org/wiki/Partial_application), as\n * distinguished from [function currying](http://en.wikipedia.org/wiki/Currying#Contrast_with_partial_function_application).\n *\n * @param {Object} self Context which `fn` should be evaluated in.\n * @param {function()} fn Function to be bound.\n * @param {...*} args Optional arguments to be prebound to the `fn` function call.\n * @returns {function()} Function that wraps the `fn` with all the specified bindings.\n */\n/* jshint +W101 */\nfunction bind(self, fn) {\n  var curryArgs = arguments.length > 2 ? sliceArgs(arguments, 2) : [];\n  if (isFunction(fn) && !(fn instanceof RegExp)) {\n    return curryArgs.length\n      ? function() {\n          return arguments.length\n            ? fn.apply(self, curryArgs.concat(slice.call(arguments, 0)))\n            : fn.apply(self, curryArgs);\n        }\n      : function() {\n          return arguments.length\n            ? fn.apply(self, arguments)\n            : fn.call(self);\n        };\n  } else {\n    // in IE, native methods are not functions so they cannot be bound (note: they don't need to be)\n    return fn;\n  }\n}\n\n\nfunction toJsonReplacer(key, value) {\n  var val = value;\n\n  if (typeof key === 'string' && key.charAt(0) === '$') {\n    val = undefined;\n  } else if (isWindow(value)) {\n    val = '$WINDOW';\n  } else if (value &&  document === value) {\n    val = '$DOCUMENT';\n  } else if (isScope(value)) {\n    val = '$SCOPE';\n  }\n\n  return val;\n}\n\n\n/**\n * @ngdoc function\n * @name angular.toJson\n * @module ng\n * @kind function\n *\n * @description\n * Serializes input into a JSON-formatted string. Properties with leading $ characters will be\n * stripped since angular uses this notation internally.\n *\n * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON.\n * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.\n * @returns {string|undefined} JSON-ified string representing `obj`.\n */\nfunction toJson(obj, pretty) {\n  if (typeof obj === 'undefined') return undefined;\n  return JSON.stringify(obj, toJsonReplacer, pretty ? '  ' : null);\n}\n\n\n/**\n * @ngdoc function\n * @name angular.fromJson\n * @module ng\n * @kind function\n *\n * @description\n * Deserializes a JSON string.\n *\n * @param {string} json JSON string to deserialize.\n * @returns {Object|Array|string|number} Deserialized thingy.\n */\nfunction fromJson(json) {\n  return isString(json)\n      ? JSON.parse(json)\n      : json;\n}\n\n\nfunction toBoolean(value) {\n  if (typeof value === 'function') {\n    value = true;\n  } else if (value && value.length !== 0) {\n    var v = lowercase(\"\" + value);\n    value = !(v == 'f' || v == '0' || v == 'false' || v == 'no' || v == 'n' || v == '[]');\n  } else {\n    value = false;\n  }\n  return value;\n}\n\n/**\n * @returns {string} Returns the string representation of the element.\n */\nfunction startingTag(element) {\n  element = jqLite(element).clone();\n  try {\n    // turns out IE does not let you set .html() on elements which\n    // are not allowed to have children. So we just ignore it.\n    element.empty();\n  } catch(e) {}\n  // As Per DOM Standards\n  var TEXT_NODE = 3;\n  var elemHtml = jqLite('<div>').append(element).html();\n  try {\n    return element[0].nodeType === TEXT_NODE ? lowercase(elemHtml) :\n        elemHtml.\n          match(/^(<[^>]+>)/)[1].\n          replace(/^<([\\w\\-]+)/, function(match, nodeName) { return '<' + lowercase(nodeName); });\n  } catch(e) {\n    return lowercase(elemHtml);\n  }\n\n}\n\n\n/////////////////////////////////////////////////\n\n/**\n * Tries to decode the URI component without throwing an exception.\n *\n * @private\n * @param str value potential URI component to check.\n * @returns {boolean} True if `value` can be decoded\n * with the decodeURIComponent function.\n */\nfunction tryDecodeURIComponent(value) {\n  try {\n    return decodeURIComponent(value);\n  } catch(e) {\n    // Ignore any invalid uri component\n  }\n}\n\n\n/**\n * Parses an escaped url query string into key-value pairs.\n * @returns {Object.<string,boolean|Array>}\n */\nfunction parseKeyValue(/**string*/keyValue) {\n  var obj = {}, key_value, key;\n  forEach((keyValue || \"\").split('&'), function(keyValue) {\n    if ( keyValue ) {\n      key_value = keyValue.replace(/\\+/g,'%20').split('=');\n      key = tryDecodeURIComponent(key_value[0]);\n      if ( isDefined(key) ) {\n        var val = isDefined(key_value[1]) ? tryDecodeURIComponent(key_value[1]) : true;\n        if (!hasOwnProperty.call(obj, key)) {\n          obj[key] = val;\n        } else if(isArray(obj[key])) {\n          obj[key].push(val);\n        } else {\n          obj[key] = [obj[key],val];\n        }\n      }\n    }\n  });\n  return obj;\n}\n\nfunction toKeyValue(obj) {\n  var parts = [];\n  forEach(obj, function(value, key) {\n    if (isArray(value)) {\n      forEach(value, function(arrayValue) {\n        parts.push(encodeUriQuery(key, true) +\n                   (arrayValue === true ? '' : '=' + encodeUriQuery(arrayValue, true)));\n      });\n    } else {\n    parts.push(encodeUriQuery(key, true) +\n               (value === true ? '' : '=' + encodeUriQuery(value, true)));\n    }\n  });\n  return parts.length ? parts.join('&') : '';\n}\n\n\n/**\n * We need our custom method because encodeURIComponent is too aggressive and doesn't follow\n * http://www.ietf.org/rfc/rfc3986.txt with regards to the character set (pchar) allowed in path\n * segments:\n *    segment       = *pchar\n *    pchar         = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n *    pct-encoded   = \"%\" HEXDIG HEXDIG\n *    unreserved    = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n *    sub-delims    = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n *                     / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriSegment(val) {\n  return encodeUriQuery(val, true).\n             replace(/%26/gi, '&').\n             replace(/%3D/gi, '=').\n             replace(/%2B/gi, '+');\n}\n\n\n/**\n * This method is intended for encoding *key* or *value* parts of query component. We need a custom\n * method because encodeURIComponent is too aggressive and encodes stuff that doesn't have to be\n * encoded per http://tools.ietf.org/html/rfc3986:\n *    query       = *( pchar / \"/\" / \"?\" )\n *    pchar         = unreserved / pct-encoded / sub-delims / \":\" / \"@\"\n *    unreserved    = ALPHA / DIGIT / \"-\" / \".\" / \"_\" / \"~\"\n *    pct-encoded   = \"%\" HEXDIG HEXDIG\n *    sub-delims    = \"!\" / \"$\" / \"&\" / \"'\" / \"(\" / \")\"\n *                     / \"*\" / \"+\" / \",\" / \";\" / \"=\"\n */\nfunction encodeUriQuery(val, pctEncodeSpaces) {\n  return encodeURIComponent(val).\n             replace(/%40/gi, '@').\n             replace(/%3A/gi, ':').\n             replace(/%24/g, '$').\n             replace(/%2C/gi, ',').\n             replace(/%20/g, (pctEncodeSpaces ? '%20' : '+'));\n}\n\n\n/**\n * @ngdoc directive\n * @name ngApp\n * @module ng\n *\n * @element ANY\n * @param {angular.Module} ngApp an optional application\n *   {@link angular.module module} name to load.\n *\n * @description\n *\n * Use this directive to **auto-bootstrap** an AngularJS application. The `ngApp` directive\n * designates the **root element** of the application and is typically placed near the root element\n * of the page - e.g. on the `<body>` or `<html>` tags.\n *\n * Only one AngularJS application can be auto-bootstrapped per HTML document. The first `ngApp`\n * found in the document will be used to define the root element to auto-bootstrap as an\n * application. To run multiple applications in an HTML document you must manually bootstrap them using\n * {@link angular.bootstrap} instead. AngularJS applications cannot be nested within each other.\n *\n * You can specify an **AngularJS module** to be used as the root module for the application.  This\n * module will be loaded into the {@link auto.$injector} when the application is bootstrapped and\n * should contain the application code needed or have dependencies on other modules that will\n * contain the code. See {@link angular.module} for more information.\n *\n * In the example below if the `ngApp` directive were not placed on the `html` element then the\n * document would not be compiled, the `AppController` would not be instantiated and the `{{ a+b }}`\n * would not be resolved to `3`.\n *\n * `ngApp` is the easiest, and most common, way to bootstrap an application.\n *\n <example module=\"ngAppDemo\">\n   <file name=\"index.html\">\n   <div ng-controller=\"ngAppDemoController\">\n     I can add: {{a}} + {{b}} =  {{ a+b }}\n   </div>\n   </file>\n   <file name=\"script.js\">\n   angular.module('ngAppDemo', []).controller('ngAppDemoController', function($scope) {\n     $scope.a = 1;\n     $scope.b = 2;\n   });\n   </file>\n </example>\n *\n */\nfunction angularInit(element, bootstrap) {\n  var elements = [element],\n      appElement,\n      module,\n      names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\n      NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/;\n\n  function append(element) {\n    element && elements.push(element);\n  }\n\n  forEach(names, function(name) {\n    names[name] = true;\n    append(document.getElementById(name));\n    name = name.replace(':', '\\\\:');\n    if (element.querySelectorAll) {\n      forEach(element.querySelectorAll('.' + name), append);\n      forEach(element.querySelectorAll('.' + name + '\\\\:'), append);\n      forEach(element.querySelectorAll('[' + name + ']'), append);\n    }\n  });\n\n  forEach(elements, function(element) {\n    if (!appElement) {\n      var className = ' ' + element.className + ' ';\n      var match = NG_APP_CLASS_REGEXP.exec(className);\n      if (match) {\n        appElement = element;\n        module = (match[2] || '').replace(/\\s+/g, ',');\n      } else {\n        forEach(element.attributes, function(attr) {\n          if (!appElement && names[attr.name]) {\n            appElement = element;\n            module = attr.value;\n          }\n        });\n      }\n    }\n  });\n  if (appElement) {\n    bootstrap(appElement, module ? [module] : []);\n  }\n}\n\n/**\n * @ngdoc function\n * @name angular.bootstrap\n * @module ng\n * @description\n * Use this function to manually start up angular application.\n *\n * See: {@link guide/bootstrap Bootstrap}\n *\n * Note that ngScenario-based end-to-end tests cannot use this function to bootstrap manually.\n * They must use {@link ng.directive:ngApp ngApp}.\n *\n * Angular will detect if it has been loaded into the browser more than once and only allow the\n * first loaded script to be bootstrapped and will report a warning to the browser console for\n * each of the subsequent scripts. This prevents strange results in applications, where otherwise\n * multiple instances of Angular try to work on the DOM.\n *\n * <example name=\"multi-bootstrap\" module=\"multi-bootstrap\">\n * <file name=\"index.html\">\n * <script src=\"../../../angular.js\"></script>\n * <div ng-controller=\"BrokenTable\">\n *   <table>\n *   <tr>\n *     <th ng-repeat=\"heading in headings\">{{heading}}</th>\n *   </tr>\n *   <tr ng-repeat=\"filling in fillings\">\n *     <td ng-repeat=\"fill in filling\">{{fill}}</td>\n *   </tr>\n * </table>\n * </div>\n * </file>\n * <file name=\"controller.js\">\n * var app = angular.module('multi-bootstrap', [])\n *\n * .controller('BrokenTable', function($scope) {\n *     $scope.headings = ['One', 'Two', 'Three'];\n *     $scope.fillings = [[1, 2, 3], ['A', 'B', 'C'], [7, 8, 9]];\n * });\n * </file>\n * <file name=\"protractor.js\" type=\"protractor\">\n * it('should only insert one table cell for each item in $scope.fillings', function() {\n *  expect(element.all(by.css('td')).count())\n *      .toBe(9);\n * });\n * </file>\n * </example>\n *\n * @param {DOMElement} element DOM element which is the root of angular application.\n * @param {Array<String|Function|Array>=} modules an array of modules to load into the application.\n *     Each item in the array should be the name of a predefined module or a (DI annotated)\n *     function that will be invoked by the injector as a run block.\n *     See: {@link angular.module modules}\n * @returns {auto.$injector} Returns the newly created injector for this app.\n */\nfunction bootstrap(element, modules) {\n  var doBootstrap = function() {\n    element = jqLite(element);\n\n    if (element.injector()) {\n      var tag = (element[0] === document) ? 'document' : startingTag(element);\n      throw ngMinErr('btstrpd', \"App Already Bootstrapped with this Element '{0}'\", tag);\n    }\n\n    modules = modules || [];\n    modules.unshift(['$provide', function($provide) {\n      $provide.value('$rootElement', element);\n    }]);\n    modules.unshift('ng');\n    var injector = createInjector(modules);\n    injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', '$animate',\n       function(scope, element, compile, injector, animate) {\n        scope.$apply(function() {\n          element.data('$injector', injector);\n          compile(element)(scope);\n        });\n      }]\n    );\n    return injector;\n  };\n\n  var NG_DEFER_BOOTSTRAP = /^NG_DEFER_BOOTSTRAP!/;\n\n  if (window && !NG_DEFER_BOOTSTRAP.test(window.name)) {\n    return doBootstrap();\n  }\n\n  window.name = window.name.replace(NG_DEFER_BOOTSTRAP, '');\n  angular.resumeBootstrap = function(extraModules) {\n    forEach(extraModules, function(module) {\n      modules.push(module);\n    });\n    doBootstrap();\n  };\n}\n\nvar SNAKE_CASE_REGEXP = /[A-Z]/g;\nfunction snake_case(name, separator) {\n  separator = separator || '_';\n  return name.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n    return (pos ? separator : '') + letter.toLowerCase();\n  });\n}\n\nfunction bindJQuery() {\n  // bind to jQuery if present;\n  jQuery = window.jQuery;\n  // Use jQuery if it exists with proper functionality, otherwise default to us.\n  // Angular 1.2+ requires jQuery 1.7.1+ for on()/off() support.\n  if (jQuery && jQuery.fn.on) {\n    jqLite = jQuery;\n    extend(jQuery.fn, {\n      scope: JQLitePrototype.scope,\n      isolateScope: JQLitePrototype.isolateScope,\n      controller: JQLitePrototype.controller,\n      injector: JQLitePrototype.injector,\n      inheritedData: JQLitePrototype.inheritedData\n    });\n    // Method signature:\n    //     jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments)\n    jqLitePatchJQueryRemove('remove', true, true, false);\n    jqLitePatchJQueryRemove('empty', false, false, false);\n    jqLitePatchJQueryRemove('html', false, false, true);\n  } else {\n    jqLite = JQLite;\n  }\n  angular.element = jqLite;\n}\n\n/**\n * throw error if the argument is falsy.\n */\nfunction assertArg(arg, name, reason) {\n  if (!arg) {\n    throw ngMinErr('areq', \"Argument '{0}' is {1}\", (name || '?'), (reason || \"required\"));\n  }\n  return arg;\n}\n\nfunction assertArgFn(arg, name, acceptArrayAnnotation) {\n  if (acceptArrayAnnotation && isArray(arg)) {\n      arg = arg[arg.length - 1];\n  }\n\n  assertArg(isFunction(arg), name, 'not a function, got ' +\n      (arg && typeof arg === 'object' ? arg.constructor.name || 'Object' : typeof arg));\n  return arg;\n}\n\n/**\n * throw error if the name given is hasOwnProperty\n * @param  {String} name    the name to test\n * @param  {String} context the context in which the name is used, such as module or directive\n */\nfunction assertNotHasOwnProperty(name, context) {\n  if (name === 'hasOwnProperty') {\n    throw ngMinErr('badname', \"hasOwnProperty is not a valid {0} name\", context);\n  }\n}\n\n/**\n * Return the value accessible from the object by path. Any undefined traversals are ignored\n * @param {Object} obj starting object\n * @param {String} path path to traverse\n * @param {boolean} [bindFnToScope=true]\n * @returns {Object} value as accessible by path\n */\n//TODO(misko): this function needs to be removed\nfunction getter(obj, path, bindFnToScope) {\n  if (!path) return obj;\n  var keys = path.split('.');\n  var key;\n  var lastInstance = obj;\n  var len = keys.length;\n\n  for (var i = 0; i < len; i++) {\n    key = keys[i];\n    if (obj) {\n      obj = (lastInstance = obj)[key];\n    }\n  }\n  if (!bindFnToScope && isFunction(obj)) {\n    return bind(lastInstance, obj);\n  }\n  return obj;\n}\n\n/**\n * Return the DOM siblings between the first and last node in the given array.\n * @param {Array} array like object\n * @returns {DOMElement} object containing the elements\n */\nfunction getBlockElements(nodes) {\n  var startNode = nodes[0],\n      endNode = nodes[nodes.length - 1];\n  if (startNode === endNode) {\n    return jqLite(startNode);\n  }\n\n  var element = startNode;\n  var elements = [element];\n\n  do {\n    element = element.nextSibling;\n    if (!element) break;\n    elements.push(element);\n  } while (element !== endNode);\n\n  return jqLite(elements);\n}\n\n/**\n * @ngdoc type\n * @name angular.Module\n * @module ng\n * @description\n *\n * Interface for configuring angular {@link angular.module modules}.\n */\n\nfunction setupModuleLoader(window) {\n\n  var $injectorMinErr = minErr('$injector');\n  var ngMinErr = minErr('ng');\n\n  function ensure(obj, name, factory) {\n    return obj[name] || (obj[name] = factory());\n  }\n\n  var angular = ensure(window, 'angular', Object);\n\n  // We need to expose `angular.$$minErr` to modules such as `ngResource` that reference it during bootstrap\n  angular.$$minErr = angular.$$minErr || minErr;\n\n  return ensure(angular, 'module', function() {\n    /** @type {Object.<string, angular.Module>} */\n    var modules = {};\n\n    /**\n     * @ngdoc function\n     * @name angular.module\n     * @module ng\n     * @description\n     *\n     * The `angular.module` is a global place for creating, registering and retrieving Angular\n     * modules.\n     * All modules (angular core or 3rd party) that should be available to an application must be\n     * registered using this mechanism.\n     *\n     * When passed two or more arguments, a new module is created.  If passed only one argument, an\n     * existing module (the name passed as the first argument to `module`) is retrieved.\n     *\n     *\n     * # Module\n     *\n     * A module is a collection of services, directives, controllers, filters, and configuration information.\n     * `angular.module` is used to configure the {@link auto.$injector $injector}.\n     *\n     * ```js\n     * // Create a new module\n     * var myModule = angular.module('myModule', []);\n     *\n     * // register a new service\n     * myModule.value('appName', 'MyCoolApp');\n     *\n     * // configure existing services inside initialization blocks.\n     * myModule.config(['$locationProvider', function($locationProvider) {\n     *   // Configure existing providers\n     *   $locationProvider.hashPrefix('!');\n     * }]);\n     * ```\n     *\n     * Then you can create an injector and load your modules like this:\n     *\n     * ```js\n     * var injector = angular.injector(['ng', 'myModule'])\n     * ```\n     *\n     * However it's more likely that you'll just use\n     * {@link ng.directive:ngApp ngApp} or\n     * {@link angular.bootstrap} to simplify this process for you.\n     *\n     * @param {!string} name The name of the module to create or retrieve.\n     * @param {!Array.<string>=} requires If specified then new module is being created. If\n     *        unspecified then the module is being retrieved for further configuration.\n     * @param {Function=} configFn Optional configuration function for the module. Same as\n     *        {@link angular.Module#config Module#config()}.\n     * @returns {module} new module with the {@link angular.Module} api.\n     */\n    return function module(name, requires, configFn) {\n      var assertNotHasOwnProperty = function(name, context) {\n        if (name === 'hasOwnProperty') {\n          throw ngMinErr('badname', 'hasOwnProperty is not a valid {0} name', context);\n        }\n      };\n\n      assertNotHasOwnProperty(name, 'module');\n      if (requires && modules.hasOwnProperty(name)) {\n        modules[name] = null;\n      }\n      return ensure(modules, name, function() {\n        if (!requires) {\n          throw $injectorMinErr('nomod', \"Module '{0}' is not available! You either misspelled \" +\n             \"the module name or forgot to load it. If registering a module ensure that you \" +\n             \"specify the dependencies as the second argument.\", name);\n        }\n\n        /** @type {!Array.<Array.<*>>} */\n        var invokeQueue = [];\n\n        /** @type {!Array.<Function>} */\n        var runBlocks = [];\n\n        var config = invokeLater('$injector', 'invoke');\n\n        /** @type {angular.Module} */\n        var moduleInstance = {\n          // Private state\n          _invokeQueue: invokeQueue,\n          _runBlocks: runBlocks,\n\n          /**\n           * @ngdoc property\n           * @name angular.Module#requires\n           * @module ng\n           * @returns {Array.<string>} List of module names which must be loaded before this module.\n           * @description\n           * Holds the list of modules which the injector will load before the current module is\n           * loaded.\n           */\n          requires: requires,\n\n          /**\n           * @ngdoc property\n           * @name angular.Module#name\n           * @module ng\n           * @returns {string} Name of the module.\n           * @description\n           */\n          name: name,\n\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#provider\n           * @module ng\n           * @param {string} name service name\n           * @param {Function} providerType Construction function for creating new instance of the\n           *                                service.\n           * @description\n           * See {@link auto.$provide#provider $provide.provider()}.\n           */\n          provider: invokeLater('$provide', 'provider'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#factory\n           * @module ng\n           * @param {string} name service name\n           * @param {Function} providerFunction Function for creating new instance of the service.\n           * @description\n           * See {@link auto.$provide#factory $provide.factory()}.\n           */\n          factory: invokeLater('$provide', 'factory'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#service\n           * @module ng\n           * @param {string} name service name\n           * @param {Function} constructor A constructor function that will be instantiated.\n           * @description\n           * See {@link auto.$provide#service $provide.service()}.\n           */\n          service: invokeLater('$provide', 'service'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#value\n           * @module ng\n           * @param {string} name service name\n           * @param {*} object Service instance object.\n           * @description\n           * See {@link auto.$provide#value $provide.value()}.\n           */\n          value: invokeLater('$provide', 'value'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#constant\n           * @module ng\n           * @param {string} name constant name\n           * @param {*} object Constant value.\n           * @description\n           * Because the constant are fixed, they get applied before other provide methods.\n           * See {@link auto.$provide#constant $provide.constant()}.\n           */\n          constant: invokeLater('$provide', 'constant', 'unshift'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#animation\n           * @module ng\n           * @param {string} name animation name\n           * @param {Function} animationFactory Factory function for creating new instance of an\n           *                                    animation.\n           * @description\n           *\n           * **NOTE**: animations take effect only if the **ngAnimate** module is loaded.\n           *\n           *\n           * Defines an animation hook that can be later used with\n           * {@link ngAnimate.$animate $animate} service and directives that use this service.\n           *\n           * ```js\n           * module.animation('.animation-name', function($inject1, $inject2) {\n           *   return {\n           *     eventName : function(element, done) {\n           *       //code to run the animation\n           *       //once complete, then run done()\n           *       return function cancellationFunction(element) {\n           *         //code to cancel the animation\n           *       }\n           *     }\n           *   }\n           * })\n           * ```\n           *\n           * See {@link ngAnimate.$animateProvider#register $animateProvider.register()} and\n           * {@link ngAnimate ngAnimate module} for more information.\n           */\n          animation: invokeLater('$animateProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#filter\n           * @module ng\n           * @param {string} name Filter name.\n           * @param {Function} filterFactory Factory function for creating new instance of filter.\n           * @description\n           * See {@link ng.$filterProvider#register $filterProvider.register()}.\n           */\n          filter: invokeLater('$filterProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#controller\n           * @module ng\n           * @param {string|Object} name Controller name, or an object map of controllers where the\n           *    keys are the names and the values are the constructors.\n           * @param {Function} constructor Controller constructor function.\n           * @description\n           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.\n           */\n          controller: invokeLater('$controllerProvider', 'register'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#directive\n           * @module ng\n           * @param {string|Object} name Directive name, or an object map of directives where the\n           *    keys are the names and the values are the factories.\n           * @param {Function} directiveFactory Factory function for creating new instance of\n           * directives.\n           * @description\n           * See {@link ng.$compileProvider#directive $compileProvider.directive()}.\n           */\n          directive: invokeLater('$compileProvider', 'directive'),\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#config\n           * @module ng\n           * @param {Function} configFn Execute this function on module load. Useful for service\n           *    configuration.\n           * @description\n           * Use this method to register work which needs to be performed on module loading.\n           * For more about how to configure services, see\n           * {@link providers#providers_provider-recipe Provider Recipe}.\n           */\n          config: config,\n\n          /**\n           * @ngdoc method\n           * @name angular.Module#run\n           * @module ng\n           * @param {Function} initializationFn Execute this function after injector creation.\n           *    Useful for application initialization.\n           * @description\n           * Use this method to register work which should be performed when the injector is done\n           * loading all modules.\n           */\n          run: function(block) {\n            runBlocks.push(block);\n            return this;\n          }\n        };\n\n        if (configFn) {\n          config(configFn);\n        }\n\n        return  moduleInstance;\n\n        /**\n         * @param {string} provider\n         * @param {string} method\n         * @param {String=} insertMethod\n         * @returns {angular.Module}\n         */\n        function invokeLater(provider, method, insertMethod) {\n          return function() {\n            invokeQueue[insertMethod || 'push']([provider, method, arguments]);\n            return moduleInstance;\n          };\n        }\n      });\n    };\n  });\n\n}\n\n/* global angularModule: true,\n  version: true,\n\n  $LocaleProvider,\n  $CompileProvider,\n\n    htmlAnchorDirective,\n    inputDirective,\n    inputDirective,\n    formDirective,\n    scriptDirective,\n    selectDirective,\n    styleDirective,\n    optionDirective,\n    ngBindDirective,\n    ngBindHtmlDirective,\n    ngBindTemplateDirective,\n    ngClassDirective,\n    ngClassEvenDirective,\n    ngClassOddDirective,\n    ngCspDirective,\n    ngCloakDirective,\n    ngControllerDirective,\n    ngFormDirective,\n    ngHideDirective,\n    ngIfDirective,\n    ngIncludeDirective,\n    ngIncludeFillContentDirective,\n    ngInitDirective,\n    ngNonBindableDirective,\n    ngPluralizeDirective,\n    ngRepeatDirective,\n    ngShowDirective,\n    ngStyleDirective,\n    ngSwitchDirective,\n    ngSwitchWhenDirective,\n    ngSwitchDefaultDirective,\n    ngOptionsDirective,\n    ngTranscludeDirective,\n    ngModelDirective,\n    ngListDirective,\n    ngChangeDirective,\n    requiredDirective,\n    requiredDirective,\n    ngValueDirective,\n    ngAttributeAliasDirectives,\n    ngEventDirectives,\n\n    $AnchorScrollProvider,\n    $AnimateProvider,\n    $BrowserProvider,\n    $CacheFactoryProvider,\n    $ControllerProvider,\n    $DocumentProvider,\n    $ExceptionHandlerProvider,\n    $FilterProvider,\n    $InterpolateProvider,\n    $IntervalProvider,\n    $HttpProvider,\n    $HttpBackendProvider,\n    $LocationProvider,\n    $LogProvider,\n    $ParseProvider,\n    $RootScopeProvider,\n    $QProvider,\n    $$SanitizeUriProvider,\n    $SceProvider,\n    $SceDelegateProvider,\n    $SnifferProvider,\n    $TemplateCacheProvider,\n    $TimeoutProvider,\n    $$RAFProvider,\n    $$AsyncCallbackProvider,\n    $WindowProvider\n*/\n\n\n/**\n * @ngdoc object\n * @name angular.version\n * @module ng\n * @description\n * An object that contains information about the current AngularJS version. This object has the\n * following properties:\n *\n * - `full` – `{string}` – Full version string, such as \"0.9.18\".\n * - `major` – `{number}` – Major version number, such as \"0\".\n * - `minor` – `{number}` – Minor version number, such as \"9\".\n * - `dot` – `{number}` – Dot version number, such as \"18\".\n * - `codeName` – `{string}` – Code name of the release, such as \"jiggling-armfat\".\n */\nvar version = {\n  full: '1.2.21',    // all of these placeholder strings will be replaced by grunt's\n  major: 1,    // package task\n  minor: 2,\n  dot: 21,\n  codeName: 'wizard-props'\n};\n\n\nfunction publishExternalAPI(angular){\n  extend(angular, {\n    'bootstrap': bootstrap,\n    'copy': copy,\n    'extend': extend,\n    'equals': equals,\n    'element': jqLite,\n    'forEach': forEach,\n    'injector': createInjector,\n    'noop':noop,\n    'bind':bind,\n    'toJson': toJson,\n    'fromJson': fromJson,\n    'identity':identity,\n    'isUndefined': isUndefined,\n    'isDefined': isDefined,\n    'isString': isString,\n    'isFunction': isFunction,\n    'isObject': isObject,\n    'isNumber': isNumber,\n    'isElement': isElement,\n    'isArray': isArray,\n    'version': version,\n    'isDate': isDate,\n    'lowercase': lowercase,\n    'uppercase': uppercase,\n    'callbacks': {counter: 0},\n    '$$minErr': minErr,\n    '$$csp': csp\n  });\n\n  angularModule = setupModuleLoader(window);\n  try {\n    angularModule('ngLocale');\n  } catch (e) {\n    angularModule('ngLocale', []).provider('$locale', $LocaleProvider);\n  }\n\n  angularModule('ng', ['ngLocale'], ['$provide',\n    function ngModule($provide) {\n      // $$sanitizeUriProvider needs to be before $compileProvider as it is used by it.\n      $provide.provider({\n        $$sanitizeUri: $$SanitizeUriProvider\n      });\n      $provide.provider('$compile', $CompileProvider).\n        directive({\n            a: htmlAnchorDirective,\n            input: inputDirective,\n            textarea: inputDirective,\n            form: formDirective,\n            script: scriptDirective,\n            select: selectDirective,\n            style: styleDirective,\n            option: optionDirective,\n            ngBind: ngBindDirective,\n            ngBindHtml: ngBindHtmlDirective,\n            ngBindTemplate: ngBindTemplateDirective,\n            ngClass: ngClassDirective,\n            ngClassEven: ngClassEvenDirective,\n            ngClassOdd: ngClassOddDirective,\n            ngCloak: ngCloakDirective,\n            ngController: ngControllerDirective,\n            ngForm: ngFormDirective,\n            ngHide: ngHideDirective,\n            ngIf: ngIfDirective,\n            ngInclude: ngIncludeDirective,\n            ngInit: ngInitDirective,\n            ngNonBindable: ngNonBindableDirective,\n            ngPluralize: ngPluralizeDirective,\n            ngRepeat: ngRepeatDirective,\n            ngShow: ngShowDirective,\n            ngStyle: ngStyleDirective,\n            ngSwitch: ngSwitchDirective,\n            ngSwitchWhen: ngSwitchWhenDirective,\n            ngSwitchDefault: ngSwitchDefaultDirective,\n            ngOptions: ngOptionsDirective,\n            ngTransclude: ngTranscludeDirective,\n            ngModel: ngModelDirective,\n            ngList: ngListDirective,\n            ngChange: ngChangeDirective,\n            required: requiredDirective,\n            ngRequired: requiredDirective,\n            ngValue: ngValueDirective\n        }).\n        directive({\n          ngInclude: ngIncludeFillContentDirective\n        }).\n        directive(ngAttributeAliasDirectives).\n        directive(ngEventDirectives);\n      $provide.provider({\n        $anchorScroll: $AnchorScrollProvider,\n        $animate: $AnimateProvider,\n        $browser: $BrowserProvider,\n        $cacheFactory: $CacheFactoryProvider,\n        $controller: $ControllerProvider,\n        $document: $DocumentProvider,\n        $exceptionHandler: $ExceptionHandlerProvider,\n        $filter: $FilterProvider,\n        $interpolate: $InterpolateProvider,\n        $interval: $IntervalProvider,\n        $http: $HttpProvider,\n        $httpBackend: $HttpBackendProvider,\n        $location: $LocationProvider,\n        $log: $LogProvider,\n        $parse: $ParseProvider,\n        $rootScope: $RootScopeProvider,\n        $q: $QProvider,\n        $sce: $SceProvider,\n        $sceDelegate: $SceDelegateProvider,\n        $sniffer: $SnifferProvider,\n        $templateCache: $TemplateCacheProvider,\n        $timeout: $TimeoutProvider,\n        $window: $WindowProvider,\n        $$rAF: $$RAFProvider,\n        $$asyncCallback : $$AsyncCallbackProvider\n      });\n    }\n  ]);\n}\n\n/* global JQLitePrototype: true,\n  addEventListenerFn: true,\n  removeEventListenerFn: true,\n  BOOLEAN_ATTR: true\n*/\n\n//////////////////////////////////\n//JQLite\n//////////////////////////////////\n\n/**\n * @ngdoc function\n * @name angular.element\n * @module ng\n * @kind function\n *\n * @description\n * Wraps a raw DOM element or HTML string as a [jQuery](http://jquery.com) element.\n *\n * If jQuery is available, `angular.element` is an alias for the\n * [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`\n * delegates to Angular's built-in subset of jQuery, called \"jQuery lite\" or \"jqLite.\"\n *\n * <div class=\"alert alert-success\">jqLite is a tiny, API-compatible subset of jQuery that allows\n * Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most\n * commonly needed functionality with the goal of having a very small footprint.</div>\n *\n * To use jQuery, simply load it before `DOMContentLoaded` event fired.\n *\n * <div class=\"alert\">**Note:** all element references in Angular are always wrapped with jQuery or\n * jqLite; they are never raw DOM references.</div>\n *\n * ## Angular's jqLite\n * jqLite provides only the following jQuery methods:\n *\n * - [`addClass()`](http://api.jquery.com/addClass/)\n * - [`after()`](http://api.jquery.com/after/)\n * - [`append()`](http://api.jquery.com/append/)\n * - [`attr()`](http://api.jquery.com/attr/)\n * - [`bind()`](http://api.jquery.com/bind/) - Does not support namespaces, selectors or eventData\n * - [`children()`](http://api.jquery.com/children/) - Does not support selectors\n * - [`clone()`](http://api.jquery.com/clone/)\n * - [`contents()`](http://api.jquery.com/contents/)\n * - [`css()`](http://api.jquery.com/css/)\n * - [`data()`](http://api.jquery.com/data/)\n * - [`empty()`](http://api.jquery.com/empty/)\n * - [`eq()`](http://api.jquery.com/eq/)\n * - [`find()`](http://api.jquery.com/find/) - Limited to lookups by tag name\n * - [`hasClass()`](http://api.jquery.com/hasClass/)\n * - [`html()`](http://api.jquery.com/html/)\n * - [`next()`](http://api.jquery.com/next/) - Does not support selectors\n * - [`on()`](http://api.jquery.com/on/) - Does not support namespaces, selectors or eventData\n * - [`off()`](http://api.jquery.com/off/) - Does not support namespaces or selectors\n * - [`one()`](http://api.jquery.com/one/) - Does not support namespaces or selectors\n * - [`parent()`](http://api.jquery.com/parent/) - Does not support selectors\n * - [`prepend()`](http://api.jquery.com/prepend/)\n * - [`prop()`](http://api.jquery.com/prop/)\n * - [`ready()`](http://api.jquery.com/ready/)\n * - [`remove()`](http://api.jquery.com/remove/)\n * - [`removeAttr()`](http://api.jquery.com/removeAttr/)\n * - [`removeClass()`](http://api.jquery.com/removeClass/)\n * - [`removeData()`](http://api.jquery.com/removeData/)\n * - [`replaceWith()`](http://api.jquery.com/replaceWith/)\n * - [`text()`](http://api.jquery.com/text/)\n * - [`toggleClass()`](http://api.jquery.com/toggleClass/)\n * - [`triggerHandler()`](http://api.jquery.com/triggerHandler/) - Passes a dummy event object to handlers.\n * - [`unbind()`](http://api.jquery.com/unbind/) - Does not support namespaces\n * - [`val()`](http://api.jquery.com/val/)\n * - [`wrap()`](http://api.jquery.com/wrap/)\n *\n * ## jQuery/jqLite Extras\n * Angular also provides the following additional methods and events to both jQuery and jqLite:\n *\n * ### Events\n * - `$destroy` - AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires this event\n *    on all DOM nodes being removed.  This can be used to clean up any 3rd party bindings to the DOM\n *    element before it is removed.\n *\n * ### Methods\n * - `controller(name)` - retrieves the controller of the current element or its parent. By default\n *   retrieves controller associated with the `ngController` directive. If `name` is provided as\n *   camelCase directive name, then the controller for this directive will be retrieved (e.g.\n *   `'ngModel'`).\n * - `injector()` - retrieves the injector of the current element or its parent.\n * - `scope()` - retrieves the {@link ng.$rootScope.Scope scope} of the current\n *   element or its parent.\n * - `isolateScope()` - retrieves an isolate {@link ng.$rootScope.Scope scope} if one is attached directly to the\n *   current element. This getter should be used only on elements that contain a directive which starts a new isolate\n *   scope. Calling `scope()` on this element always returns the original non-isolate scope.\n * - `inheritedData()` - same as `data()`, but walks up the DOM until a value is found or the top\n *   parent element is reached.\n *\n * @param {string|DOMElement} element HTML string or DOMElement to be wrapped into jQuery.\n * @returns {Object} jQuery object.\n */\n\nJQLite.expando = 'ng339';\n\nvar jqCache = JQLite.cache = {},\n    jqId = 1,\n    addEventListenerFn = (window.document.addEventListener\n      ? function(element, type, fn) {element.addEventListener(type, fn, false);}\n      : function(element, type, fn) {element.attachEvent('on' + type, fn);}),\n    removeEventListenerFn = (window.document.removeEventListener\n      ? function(element, type, fn) {element.removeEventListener(type, fn, false); }\n      : function(element, type, fn) {element.detachEvent('on' + type, fn); });\n\n/*\n * !!! This is an undocumented \"private\" function !!!\n */\nvar jqData = JQLite._data = function(node) {\n  //jQuery always returns an object on cache miss\n  return this.cache[node[this.expando]] || {};\n};\n\nfunction jqNextId() { return ++jqId; }\n\n\nvar SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\nvar MOZ_HACK_REGEXP = /^moz([A-Z])/;\nvar jqLiteMinErr = minErr('jqLite');\n\n/**\n * Converts snake_case to camelCase.\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction camelCase(name) {\n  return name.\n    replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n      return offset ? letter.toUpperCase() : letter;\n    }).\n    replace(MOZ_HACK_REGEXP, 'Moz$1');\n}\n\n/////////////////////////////////////////////\n// jQuery mutation patch\n//\n// In conjunction with bindJQuery intercepts all jQuery's DOM destruction apis and fires a\n// $destroy event on all DOM nodes being removed.\n//\n/////////////////////////////////////////////\n\nfunction jqLitePatchJQueryRemove(name, dispatchThis, filterElems, getterIfNoArguments) {\n  var originalJqFn = jQuery.fn[name];\n  originalJqFn = originalJqFn.$original || originalJqFn;\n  removePatch.$original = originalJqFn;\n  jQuery.fn[name] = removePatch;\n\n  function removePatch(param) {\n    // jshint -W040\n    var list = filterElems && param ? [this.filter(param)] : [this],\n        fireEvent = dispatchThis,\n        set, setIndex, setLength,\n        element, childIndex, childLength, children;\n\n    if (!getterIfNoArguments || param != null) {\n      while(list.length) {\n        set = list.shift();\n        for(setIndex = 0, setLength = set.length; setIndex < setLength; setIndex++) {\n          element = jqLite(set[setIndex]);\n          if (fireEvent) {\n            element.triggerHandler('$destroy');\n          } else {\n            fireEvent = !fireEvent;\n          }\n          for(childIndex = 0, childLength = (children = element.children()).length;\n              childIndex < childLength;\n              childIndex++) {\n            list.push(jQuery(children[childIndex]));\n          }\n        }\n      }\n    }\n    return originalJqFn.apply(this, arguments);\n  }\n}\n\nvar SINGLE_TAG_REGEXP = /^<(\\w+)\\s*\\/?>(?:<\\/\\1>|)$/;\nvar HTML_REGEXP = /<|&#?\\w+;/;\nvar TAG_NAME_REGEXP = /<([\\w:]+)/;\nvar XHTML_TAG_REGEXP = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\\w:]+)[^>]*)\\/>/gi;\n\nvar wrapMap = {\n  'option': [1, '<select multiple=\"multiple\">', '</select>'],\n\n  'thead': [1, '<table>', '</table>'],\n  'col': [2, '<table><colgroup>', '</colgroup></table>'],\n  'tr': [2, '<table><tbody>', '</tbody></table>'],\n  'td': [3, '<table><tbody><tr>', '</tr></tbody></table>'],\n  '_default': [0, \"\", \"\"]\n};\n\nwrapMap.optgroup = wrapMap.option;\nwrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;\nwrapMap.th = wrapMap.td;\n\nfunction jqLiteIsTextNode(html) {\n  return !HTML_REGEXP.test(html);\n}\n\nfunction jqLiteBuildFragment(html, context) {\n  var elem, tmp, tag, wrap,\n      fragment = context.createDocumentFragment(),\n      nodes = [], i, j, jj;\n\n  if (jqLiteIsTextNode(html)) {\n    // Convert non-html into a text node\n    nodes.push(context.createTextNode(html));\n  } else {\n    tmp = fragment.appendChild(context.createElement('div'));\n    // Convert html into DOM nodes\n    tag = (TAG_NAME_REGEXP.exec(html) || [\"\", \"\"])[1].toLowerCase();\n    wrap = wrapMap[tag] || wrapMap._default;\n    tmp.innerHTML = '<div>&#160;</div>' +\n      wrap[1] + html.replace(XHTML_TAG_REGEXP, \"<$1></$2>\") + wrap[2];\n    tmp.removeChild(tmp.firstChild);\n\n    // Descend through wrappers to the right content\n    i = wrap[0];\n    while (i--) {\n      tmp = tmp.lastChild;\n    }\n\n    for (j=0, jj=tmp.childNodes.length; j<jj; ++j) nodes.push(tmp.childNodes[j]);\n\n    tmp = fragment.firstChild;\n    tmp.textContent = \"\";\n  }\n\n  // Remove wrapper from fragment\n  fragment.textContent = \"\";\n  fragment.innerHTML = \"\"; // Clear inner HTML\n  return nodes;\n}\n\nfunction jqLiteParseHTML(html, context) {\n  context = context || document;\n  var parsed;\n\n  if ((parsed = SINGLE_TAG_REGEXP.exec(html))) {\n    return [context.createElement(parsed[1])];\n  }\n\n  return jqLiteBuildFragment(html, context);\n}\n\n/////////////////////////////////////////////\nfunction JQLite(element) {\n  if (element instanceof JQLite) {\n    return element;\n  }\n  if (isString(element)) {\n    element = trim(element);\n  }\n  if (!(this instanceof JQLite)) {\n    if (isString(element) && element.charAt(0) != '<') {\n      throw jqLiteMinErr('nosel', 'Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element');\n    }\n    return new JQLite(element);\n  }\n\n  if (isString(element)) {\n    jqLiteAddNodes(this, jqLiteParseHTML(element));\n    var fragment = jqLite(document.createDocumentFragment());\n    fragment.append(this);\n  } else {\n    jqLiteAddNodes(this, element);\n  }\n}\n\nfunction jqLiteClone(element) {\n  return element.cloneNode(true);\n}\n\nfunction jqLiteDealoc(element){\n  jqLiteRemoveData(element);\n  for ( var i = 0, children = element.childNodes || []; i < children.length; i++) {\n    jqLiteDealoc(children[i]);\n  }\n}\n\nfunction jqLiteOff(element, type, fn, unsupported) {\n  if (isDefined(unsupported)) throw jqLiteMinErr('offargs', 'jqLite#off() does not support the `selector` argument');\n\n  var events = jqLiteExpandoStore(element, 'events'),\n      handle = jqLiteExpandoStore(element, 'handle');\n\n  if (!handle) return; //no listeners registered\n\n  if (isUndefined(type)) {\n    forEach(events, function(eventHandler, type) {\n      removeEventListenerFn(element, type, eventHandler);\n      delete events[type];\n    });\n  } else {\n    forEach(type.split(' '), function(type) {\n      if (isUndefined(fn)) {\n        removeEventListenerFn(element, type, events[type]);\n        delete events[type];\n      } else {\n        arrayRemove(events[type] || [], fn);\n      }\n    });\n  }\n}\n\nfunction jqLiteRemoveData(element, name) {\n  var expandoId = element.ng339,\n      expandoStore = jqCache[expandoId];\n\n  if (expandoStore) {\n    if (name) {\n      delete jqCache[expandoId].data[name];\n      return;\n    }\n\n    if (expandoStore.handle) {\n      expandoStore.events.$destroy && expandoStore.handle({}, '$destroy');\n      jqLiteOff(element);\n    }\n    delete jqCache[expandoId];\n    element.ng339 = undefined; // don't delete DOM expandos. IE and Chrome don't like it\n  }\n}\n\nfunction jqLiteExpandoStore(element, key, value) {\n  var expandoId = element.ng339,\n      expandoStore = jqCache[expandoId || -1];\n\n  if (isDefined(value)) {\n    if (!expandoStore) {\n      element.ng339 = expandoId = jqNextId();\n      expandoStore = jqCache[expandoId] = {};\n    }\n    expandoStore[key] = value;\n  } else {\n    return expandoStore && expandoStore[key];\n  }\n}\n\nfunction jqLiteData(element, key, value) {\n  var data = jqLiteExpandoStore(element, 'data'),\n      isSetter = isDefined(value),\n      keyDefined = !isSetter && isDefined(key),\n      isSimpleGetter = keyDefined && !isObject(key);\n\n  if (!data && !isSimpleGetter) {\n    jqLiteExpandoStore(element, 'data', data = {});\n  }\n\n  if (isSetter) {\n    data[key] = value;\n  } else {\n    if (keyDefined) {\n      if (isSimpleGetter) {\n        // don't create data in this case.\n        return data && data[key];\n      } else {\n        extend(data, key);\n      }\n    } else {\n      return data;\n    }\n  }\n}\n\nfunction jqLiteHasClass(element, selector) {\n  if (!element.getAttribute) return false;\n  return ((\" \" + (element.getAttribute('class') || '') + \" \").replace(/[\\n\\t]/g, \" \").\n      indexOf( \" \" + selector + \" \" ) > -1);\n}\n\nfunction jqLiteRemoveClass(element, cssClasses) {\n  if (cssClasses && element.setAttribute) {\n    forEach(cssClasses.split(' '), function(cssClass) {\n      element.setAttribute('class', trim(\n          (\" \" + (element.getAttribute('class') || '') + \" \")\n          .replace(/[\\n\\t]/g, \" \")\n          .replace(\" \" + trim(cssClass) + \" \", \" \"))\n      );\n    });\n  }\n}\n\nfunction jqLiteAddClass(element, cssClasses) {\n  if (cssClasses && element.setAttribute) {\n    var existingClasses = (' ' + (element.getAttribute('class') || '') + ' ')\n                            .replace(/[\\n\\t]/g, \" \");\n\n    forEach(cssClasses.split(' '), function(cssClass) {\n      cssClass = trim(cssClass);\n      if (existingClasses.indexOf(' ' + cssClass + ' ') === -1) {\n        existingClasses += cssClass + ' ';\n      }\n    });\n\n    element.setAttribute('class', trim(existingClasses));\n  }\n}\n\nfunction jqLiteAddNodes(root, elements) {\n  if (elements) {\n    elements = (!elements.nodeName && isDefined(elements.length) && !isWindow(elements))\n      ? elements\n      : [ elements ];\n    for(var i=0; i < elements.length; i++) {\n      root.push(elements[i]);\n    }\n  }\n}\n\nfunction jqLiteController(element, name) {\n  return jqLiteInheritedData(element, '$' + (name || 'ngController' ) + 'Controller');\n}\n\nfunction jqLiteInheritedData(element, name, value) {\n  // if element is the document object work with the html element instead\n  // this makes $(document).scope() possible\n  if(element.nodeType == 9) {\n    element = element.documentElement;\n  }\n  var names = isArray(name) ? name : [name];\n\n  while (element) {\n    for (var i = 0, ii = names.length; i < ii; i++) {\n      if ((value = jqLite.data(element, names[i])) !== undefined) return value;\n    }\n\n    // If dealing with a document fragment node with a host element, and no parent, use the host\n    // element as the parent. This enables directives within a Shadow DOM or polyfilled Shadow DOM\n    // to lookup parent controllers.\n    element = element.parentNode || (element.nodeType === 11 && element.host);\n  }\n}\n\nfunction jqLiteEmpty(element) {\n  for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {\n    jqLiteDealoc(childNodes[i]);\n  }\n  while (element.firstChild) {\n    element.removeChild(element.firstChild);\n  }\n}\n\n//////////////////////////////////////////\n// Functions which are declared directly.\n//////////////////////////////////////////\nvar JQLitePrototype = JQLite.prototype = {\n  ready: function(fn) {\n    var fired = false;\n\n    function trigger() {\n      if (fired) return;\n      fired = true;\n      fn();\n    }\n\n    // check if document already is loaded\n    if (document.readyState === 'complete'){\n      setTimeout(trigger);\n    } else {\n      this.on('DOMContentLoaded', trigger); // works for modern browsers and IE9\n      // we can not use jqLite since we are not done loading and jQuery could be loaded later.\n      // jshint -W064\n      JQLite(window).on('load', trigger); // fallback to window.onload for others\n      // jshint +W064\n    }\n  },\n  toString: function() {\n    var value = [];\n    forEach(this, function(e){ value.push('' + e);});\n    return '[' + value.join(', ') + ']';\n  },\n\n  eq: function(index) {\n      return (index >= 0) ? jqLite(this[index]) : jqLite(this[this.length + index]);\n  },\n\n  length: 0,\n  push: push,\n  sort: [].sort,\n  splice: [].splice\n};\n\n//////////////////////////////////////////\n// Functions iterating getter/setters.\n// these functions return self on setter and\n// value on get.\n//////////////////////////////////////////\nvar BOOLEAN_ATTR = {};\nforEach('multiple,selected,checked,disabled,readOnly,required,open'.split(','), function(value) {\n  BOOLEAN_ATTR[lowercase(value)] = value;\n});\nvar BOOLEAN_ELEMENTS = {};\nforEach('input,select,option,textarea,button,form,details'.split(','), function(value) {\n  BOOLEAN_ELEMENTS[uppercase(value)] = true;\n});\n\nfunction getBooleanAttrName(element, name) {\n  // check dom last since we will most likely fail on name\n  var booleanAttr = BOOLEAN_ATTR[name.toLowerCase()];\n\n  // booleanAttr is here twice to minimize DOM access\n  return booleanAttr && BOOLEAN_ELEMENTS[element.nodeName] && booleanAttr;\n}\n\nforEach({\n  data: jqLiteData,\n  removeData: jqLiteRemoveData\n}, function(fn, name) {\n  JQLite[name] = fn;\n});\n\nforEach({\n  data: jqLiteData,\n  inheritedData: jqLiteInheritedData,\n\n  scope: function(element) {\n    // Can't use jqLiteData here directly so we stay compatible with jQuery!\n    return jqLite.data(element, '$scope') || jqLiteInheritedData(element.parentNode || element, ['$isolateScope', '$scope']);\n  },\n\n  isolateScope: function(element) {\n    // Can't use jqLiteData here directly so we stay compatible with jQuery!\n    return jqLite.data(element, '$isolateScope') || jqLite.data(element, '$isolateScopeNoTemplate');\n  },\n\n  controller: jqLiteController,\n\n  injector: function(element) {\n    return jqLiteInheritedData(element, '$injector');\n  },\n\n  removeAttr: function(element,name) {\n    element.removeAttribute(name);\n  },\n\n  hasClass: jqLiteHasClass,\n\n  css: function(element, name, value) {\n    name = camelCase(name);\n\n    if (isDefined(value)) {\n      element.style[name] = value;\n    } else {\n      var val;\n\n      if (msie <= 8) {\n        // this is some IE specific weirdness that jQuery 1.6.4 does not sure why\n        val = element.currentStyle && element.currentStyle[name];\n        if (val === '') val = 'auto';\n      }\n\n      val = val || element.style[name];\n\n      if (msie <= 8) {\n        // jquery weirdness :-/\n        val = (val === '') ? undefined : val;\n      }\n\n      return  val;\n    }\n  },\n\n  attr: function(element, name, value){\n    var lowercasedName = lowercase(name);\n    if (BOOLEAN_ATTR[lowercasedName]) {\n      if (isDefined(value)) {\n        if (!!value) {\n          element[name] = true;\n          element.setAttribute(name, lowercasedName);\n        } else {\n          element[name] = false;\n          element.removeAttribute(lowercasedName);\n        }\n      } else {\n        return (element[name] ||\n                 (element.attributes.getNamedItem(name)|| noop).specified)\n               ? lowercasedName\n               : undefined;\n      }\n    } else if (isDefined(value)) {\n      element.setAttribute(name, value);\n    } else if (element.getAttribute) {\n      // the extra argument \"2\" is to get the right thing for a.href in IE, see jQuery code\n      // some elements (e.g. Document) don't have get attribute, so return undefined\n      var ret = element.getAttribute(name, 2);\n      // normalize non-existing attributes to undefined (as jQuery)\n      return ret === null ? undefined : ret;\n    }\n  },\n\n  prop: function(element, name, value) {\n    if (isDefined(value)) {\n      element[name] = value;\n    } else {\n      return element[name];\n    }\n  },\n\n  text: (function() {\n    var NODE_TYPE_TEXT_PROPERTY = [];\n    if (msie < 9) {\n      NODE_TYPE_TEXT_PROPERTY[1] = 'innerText';    /** Element **/\n      NODE_TYPE_TEXT_PROPERTY[3] = 'nodeValue';    /** Text **/\n    } else {\n      NODE_TYPE_TEXT_PROPERTY[1] =                 /** Element **/\n      NODE_TYPE_TEXT_PROPERTY[3] = 'textContent';  /** Text **/\n    }\n    getText.$dv = '';\n    return getText;\n\n    function getText(element, value) {\n      var textProp = NODE_TYPE_TEXT_PROPERTY[element.nodeType];\n      if (isUndefined(value)) {\n        return textProp ? element[textProp] : '';\n      }\n      element[textProp] = value;\n    }\n  })(),\n\n  val: function(element, value) {\n    if (isUndefined(value)) {\n      if (nodeName_(element) === 'SELECT' && element.multiple) {\n        var result = [];\n        forEach(element.options, function (option) {\n          if (option.selected) {\n            result.push(option.value || option.text);\n          }\n        });\n        return result.length === 0 ? null : result;\n      }\n      return element.value;\n    }\n    element.value = value;\n  },\n\n  html: function(element, value) {\n    if (isUndefined(value)) {\n      return element.innerHTML;\n    }\n    for (var i = 0, childNodes = element.childNodes; i < childNodes.length; i++) {\n      jqLiteDealoc(childNodes[i]);\n    }\n    element.innerHTML = value;\n  },\n\n  empty: jqLiteEmpty\n}, function(fn, name){\n  /**\n   * Properties: writes return selection, reads return first value\n   */\n  JQLite.prototype[name] = function(arg1, arg2) {\n    var i, key;\n    var nodeCount = this.length;\n\n    // jqLiteHasClass has only two arguments, but is a getter-only fn, so we need to special-case it\n    // in a way that survives minification.\n    // jqLiteEmpty takes no arguments but is a setter.\n    if (fn !== jqLiteEmpty &&\n        (((fn.length == 2 && (fn !== jqLiteHasClass && fn !== jqLiteController)) ? arg1 : arg2) === undefined)) {\n      if (isObject(arg1)) {\n\n        // we are a write, but the object properties are the key/values\n        for (i = 0; i < nodeCount; i++) {\n          if (fn === jqLiteData) {\n            // data() takes the whole object in jQuery\n            fn(this[i], arg1);\n          } else {\n            for (key in arg1) {\n              fn(this[i], key, arg1[key]);\n            }\n          }\n        }\n        // return self for chaining\n        return this;\n      } else {\n        // we are a read, so read the first child.\n        // TODO: do we still need this?\n        var value = fn.$dv;\n        // Only if we have $dv do we iterate over all, otherwise it is just the first element.\n        var jj = (value === undefined) ? Math.min(nodeCount, 1) : nodeCount;\n        for (var j = 0; j < jj; j++) {\n          var nodeValue = fn(this[j], arg1, arg2);\n          value = value ? value + nodeValue : nodeValue;\n        }\n        return value;\n      }\n    } else {\n      // we are a write, so apply to all children\n      for (i = 0; i < nodeCount; i++) {\n        fn(this[i], arg1, arg2);\n      }\n      // return self for chaining\n      return this;\n    }\n  };\n});\n\nfunction createEventHandler(element, events) {\n  var eventHandler = function (event, type) {\n    if (!event.preventDefault) {\n      event.preventDefault = function() {\n        event.returnValue = false; //ie\n      };\n    }\n\n    if (!event.stopPropagation) {\n      event.stopPropagation = function() {\n        event.cancelBubble = true; //ie\n      };\n    }\n\n    if (!event.target) {\n      event.target = event.srcElement || document;\n    }\n\n    if (isUndefined(event.defaultPrevented)) {\n      var prevent = event.preventDefault;\n      event.preventDefault = function() {\n        event.defaultPrevented = true;\n        prevent.call(event);\n      };\n      event.defaultPrevented = false;\n    }\n\n    event.isDefaultPrevented = function() {\n      return event.defaultPrevented || event.returnValue === false;\n    };\n\n    // Copy event handlers in case event handlers array is modified during execution.\n    var eventHandlersCopy = shallowCopy(events[type || event.type] || []);\n\n    forEach(eventHandlersCopy, function(fn) {\n      fn.call(element, event);\n    });\n\n    // Remove monkey-patched methods (IE),\n    // as they would cause memory leaks in IE8.\n    if (msie <= 8) {\n      // IE7/8 does not allow to delete property on native object\n      event.preventDefault = null;\n      event.stopPropagation = null;\n      event.isDefaultPrevented = null;\n    } else {\n      // It shouldn't affect normal browsers (native methods are defined on prototype).\n      delete event.preventDefault;\n      delete event.stopPropagation;\n      delete event.isDefaultPrevented;\n    }\n  };\n  eventHandler.elem = element;\n  return eventHandler;\n}\n\n//////////////////////////////////////////\n// Functions iterating traversal.\n// These functions chain results into a single\n// selector.\n//////////////////////////////////////////\nforEach({\n  removeData: jqLiteRemoveData,\n\n  dealoc: jqLiteDealoc,\n\n  on: function onFn(element, type, fn, unsupported){\n    if (isDefined(unsupported)) throw jqLiteMinErr('onargs', 'jqLite#on() does not support the `selector` or `eventData` parameters');\n\n    var events = jqLiteExpandoStore(element, 'events'),\n        handle = jqLiteExpandoStore(element, 'handle');\n\n    if (!events) jqLiteExpandoStore(element, 'events', events = {});\n    if (!handle) jqLiteExpandoStore(element, 'handle', handle = createEventHandler(element, events));\n\n    forEach(type.split(' '), function(type){\n      var eventFns = events[type];\n\n      if (!eventFns) {\n        if (type == 'mouseenter' || type == 'mouseleave') {\n          var contains = document.body.contains || document.body.compareDocumentPosition ?\n          function( a, b ) {\n            // jshint bitwise: false\n            var adown = a.nodeType === 9 ? a.documentElement : a,\n            bup = b && b.parentNode;\n            return a === bup || !!( bup && bup.nodeType === 1 && (\n              adown.contains ?\n              adown.contains( bup ) :\n              a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16\n              ));\n            } :\n            function( a, b ) {\n              if ( b ) {\n                while ( (b = b.parentNode) ) {\n                  if ( b === a ) {\n                    return true;\n                  }\n                }\n              }\n              return false;\n            };\n\n          events[type] = [];\n\n          // Refer to jQuery's implementation of mouseenter & mouseleave\n          // Read about mouseenter and mouseleave:\n          // http://www.quirksmode.org/js/events_mouse.html#link8\n          var eventmap = { mouseleave : \"mouseout\", mouseenter : \"mouseover\"};\n\n          onFn(element, eventmap[type], function(event) {\n            var target = this, related = event.relatedTarget;\n            // For mousenter/leave call the handler if related is outside the target.\n            // NB: No relatedTarget if the mouse left/entered the browser window\n            if ( !related || (related !== target && !contains(target, related)) ){\n              handle(event, type);\n            }\n          });\n\n        } else {\n          addEventListenerFn(element, type, handle);\n          events[type] = [];\n        }\n        eventFns = events[type];\n      }\n      eventFns.push(fn);\n    });\n  },\n\n  off: jqLiteOff,\n\n  one: function(element, type, fn) {\n    element = jqLite(element);\n\n    //add the listener twice so that when it is called\n    //you can remove the original function and still be\n    //able to call element.off(ev, fn) normally\n    element.on(type, function onFn() {\n      element.off(type, fn);\n      element.off(type, onFn);\n    });\n    element.on(type, fn);\n  },\n\n  replaceWith: function(element, replaceNode) {\n    var index, parent = element.parentNode;\n    jqLiteDealoc(element);\n    forEach(new JQLite(replaceNode), function(node){\n      if (index) {\n        parent.insertBefore(node, index.nextSibling);\n      } else {\n        parent.replaceChild(node, element);\n      }\n      index = node;\n    });\n  },\n\n  children: function(element) {\n    var children = [];\n    forEach(element.childNodes, function(element){\n      if (element.nodeType === 1)\n        children.push(element);\n    });\n    return children;\n  },\n\n  contents: function(element) {\n    return element.contentDocument || element.childNodes || [];\n  },\n\n  append: function(element, node) {\n    forEach(new JQLite(node), function(child){\n      if (element.nodeType === 1 || element.nodeType === 11) {\n        element.appendChild(child);\n      }\n    });\n  },\n\n  prepend: function(element, node) {\n    if (element.nodeType === 1) {\n      var index = element.firstChild;\n      forEach(new JQLite(node), function(child){\n        element.insertBefore(child, index);\n      });\n    }\n  },\n\n  wrap: function(element, wrapNode) {\n    wrapNode = jqLite(wrapNode)[0];\n    var parent = element.parentNode;\n    if (parent) {\n      parent.replaceChild(wrapNode, element);\n    }\n    wrapNode.appendChild(element);\n  },\n\n  remove: function(element) {\n    jqLiteDealoc(element);\n    var parent = element.parentNode;\n    if (parent) parent.removeChild(element);\n  },\n\n  after: function(element, newElement) {\n    var index = element, parent = element.parentNode;\n    forEach(new JQLite(newElement), function(node){\n      parent.insertBefore(node, index.nextSibling);\n      index = node;\n    });\n  },\n\n  addClass: jqLiteAddClass,\n  removeClass: jqLiteRemoveClass,\n\n  toggleClass: function(element, selector, condition) {\n    if (selector) {\n      forEach(selector.split(' '), function(className){\n        var classCondition = condition;\n        if (isUndefined(classCondition)) {\n          classCondition = !jqLiteHasClass(element, className);\n        }\n        (classCondition ? jqLiteAddClass : jqLiteRemoveClass)(element, className);\n      });\n    }\n  },\n\n  parent: function(element) {\n    var parent = element.parentNode;\n    return parent && parent.nodeType !== 11 ? parent : null;\n  },\n\n  next: function(element) {\n    if (element.nextElementSibling) {\n      return element.nextElementSibling;\n    }\n\n    // IE8 doesn't have nextElementSibling\n    var elm = element.nextSibling;\n    while (elm != null && elm.nodeType !== 1) {\n      elm = elm.nextSibling;\n    }\n    return elm;\n  },\n\n  find: function(element, selector) {\n    if (element.getElementsByTagName) {\n      return element.getElementsByTagName(selector);\n    } else {\n      return [];\n    }\n  },\n\n  clone: jqLiteClone,\n\n  triggerHandler: function(element, eventName, eventData) {\n    // Copy event handlers in case event handlers array is modified during execution.\n    var eventFns = (jqLiteExpandoStore(element, 'events') || {})[eventName],\n        eventFnsCopy = shallowCopy(eventFns || []);\n\n    eventData = eventData || [];\n\n    var event = [{\n      preventDefault: noop,\n      stopPropagation: noop\n    }];\n\n    forEach(eventFnsCopy, function(fn) {\n      fn.apply(element, event.concat(eventData));\n    });\n  }\n}, function(fn, name){\n  /**\n   * chaining functions\n   */\n  JQLite.prototype[name] = function(arg1, arg2, arg3) {\n    var value;\n    for(var i=0; i < this.length; i++) {\n      if (isUndefined(value)) {\n        value = fn(this[i], arg1, arg2, arg3);\n        if (isDefined(value)) {\n          // any function which returns a value needs to be wrapped\n          value = jqLite(value);\n        }\n      } else {\n        jqLiteAddNodes(value, fn(this[i], arg1, arg2, arg3));\n      }\n    }\n    return isDefined(value) ? value : this;\n  };\n\n  // bind legacy bind/unbind to on/off\n  JQLite.prototype.bind = JQLite.prototype.on;\n  JQLite.prototype.unbind = JQLite.prototype.off;\n});\n\n/**\n * Computes a hash of an 'obj'.\n * Hash of a:\n *  string is string\n *  number is number as string\n *  object is either result of calling $$hashKey function on the object or uniquely generated id,\n *         that is also assigned to the $$hashKey property of the object.\n *\n * @param obj\n * @returns {string} hash string such that the same input will have the same hash string.\n *         The resulting string key is in 'type:hashKey' format.\n */\nfunction hashKey(obj, nextUidFn) {\n  var objType = typeof obj,\n      key;\n\n  if (objType == 'function' || (objType == 'object' && obj !== null)) {\n    if (typeof (key = obj.$$hashKey) == 'function') {\n      // must invoke on object to keep the right this\n      key = obj.$$hashKey();\n    } else if (key === undefined) {\n      key = obj.$$hashKey = (nextUidFn || nextUid)();\n    }\n  } else {\n    key = obj;\n  }\n\n  return objType + ':' + key;\n}\n\n/**\n * HashMap which can use objects as keys\n */\nfunction HashMap(array, isolatedUid) {\n  if (isolatedUid) {\n    var uid = 0;\n    this.nextUid = function() {\n      return ++uid;\n    };\n  }\n  forEach(array, this.put, this);\n}\nHashMap.prototype = {\n  /**\n   * Store key value pair\n   * @param key key to store can be any type\n   * @param value value to store can be any type\n   */\n  put: function(key, value) {\n    this[hashKey(key, this.nextUid)] = value;\n  },\n\n  /**\n   * @param key\n   * @returns {Object} the value for the key\n   */\n  get: function(key) {\n    return this[hashKey(key, this.nextUid)];\n  },\n\n  /**\n   * Remove the key/value pair\n   * @param key\n   */\n  remove: function(key) {\n    var value = this[key = hashKey(key, this.nextUid)];\n    delete this[key];\n    return value;\n  }\n};\n\n/**\n * @ngdoc function\n * @module ng\n * @name angular.injector\n * @kind function\n *\n * @description\n * Creates an injector function that can be used for retrieving services as well as for\n * dependency injection (see {@link guide/di dependency injection}).\n *\n\n * @param {Array.<string|Function>} modules A list of module functions or their aliases. See\n *        {@link angular.module}. The `ng` module must be explicitly added.\n * @returns {function()} Injector function. See {@link auto.$injector $injector}.\n *\n * @example\n * Typical usage\n * ```js\n *   // create an injector\n *   var $injector = angular.injector(['ng']);\n *\n *   // use the injector to kick off your application\n *   // use the type inference to auto inject arguments, or use implicit injection\n *   $injector.invoke(function($rootScope, $compile, $document){\n *     $compile($document)($rootScope);\n *     $rootScope.$digest();\n *   });\n * ```\n *\n * Sometimes you want to get access to the injector of a currently running Angular app\n * from outside Angular. Perhaps, you want to inject and compile some markup after the\n * application has been bootstrapped. You can do this using the extra `injector()` added\n * to JQuery/jqLite elements. See {@link angular.element}.\n *\n * *This is fairly rare but could be the case if a third party library is injecting the\n * markup.*\n *\n * In the following example a new block of HTML containing a `ng-controller`\n * directive is added to the end of the document body by JQuery. We then compile and link\n * it into the current AngularJS scope.\n *\n * ```js\n * var $div = $('<div ng-controller=\"MyCtrl\">{{content.label}}</div>');\n * $(document.body).append($div);\n *\n * angular.element(document).injector().invoke(function($compile) {\n *   var scope = angular.element($div).scope();\n *   $compile($div)(scope);\n * });\n * ```\n */\n\n\n/**\n * @ngdoc module\n * @name auto\n * @description\n *\n * Implicit module which gets automatically added to each {@link auto.$injector $injector}.\n */\n\nvar FN_ARGS = /^function\\s*[^\\(]*\\(\\s*([^\\)]*)\\)/m;\nvar FN_ARG_SPLIT = /,/;\nvar FN_ARG = /^\\s*(_?)(\\S+?)\\1\\s*$/;\nvar STRIP_COMMENTS = /((\\/\\/.*$)|(\\/\\*[\\s\\S]*?\\*\\/))/mg;\nvar $injectorMinErr = minErr('$injector');\nfunction annotate(fn) {\n  var $inject,\n      fnText,\n      argDecl,\n      last;\n\n  if (typeof fn === 'function') {\n    if (!($inject = fn.$inject)) {\n      $inject = [];\n      if (fn.length) {\n        fnText = fn.toString().replace(STRIP_COMMENTS, '');\n        argDecl = fnText.match(FN_ARGS);\n        forEach(argDecl[1].split(FN_ARG_SPLIT), function(arg){\n          arg.replace(FN_ARG, function(all, underscore, name){\n            $inject.push(name);\n          });\n        });\n      }\n      fn.$inject = $inject;\n    }\n  } else if (isArray(fn)) {\n    last = fn.length - 1;\n    assertArgFn(fn[last], 'fn');\n    $inject = fn.slice(0, last);\n  } else {\n    assertArgFn(fn, 'fn', true);\n  }\n  return $inject;\n}\n\n///////////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $injector\n * @kind function\n *\n * @description\n *\n * `$injector` is used to retrieve object instances as defined by\n * {@link auto.$provide provider}, instantiate types, invoke methods,\n * and load modules.\n *\n * The following always holds true:\n *\n * ```js\n *   var $injector = angular.injector();\n *   expect($injector.get('$injector')).toBe($injector);\n *   expect($injector.invoke(function($injector){\n *     return $injector;\n *   }).toBe($injector);\n * ```\n *\n * # Injection Function Annotation\n *\n * JavaScript does not have annotations, and annotations are needed for dependency injection. The\n * following are all valid ways of annotating function with injection arguments and are equivalent.\n *\n * ```js\n *   // inferred (only works if code not minified/obfuscated)\n *   $injector.invoke(function(serviceA){});\n *\n *   // annotated\n *   function explicit(serviceA) {};\n *   explicit.$inject = ['serviceA'];\n *   $injector.invoke(explicit);\n *\n *   // inline\n *   $injector.invoke(['serviceA', function(serviceA){}]);\n * ```\n *\n * ## Inference\n *\n * In JavaScript calling `toString()` on a function returns the function definition. The definition\n * can then be parsed and the function arguments can be extracted. *NOTE:* This does not work with\n * minification, and obfuscation tools since these tools change the argument names.\n *\n * ## `$inject` Annotation\n * By adding an `$inject` property onto a function the injection parameters can be specified.\n *\n * ## Inline\n * As an array of injection names, where the last item in the array is the function to call.\n */\n\n/**\n * @ngdoc method\n * @name $injector#get\n *\n * @description\n * Return an instance of the service.\n *\n * @param {string} name The name of the instance to retrieve.\n * @return {*} The instance.\n */\n\n/**\n * @ngdoc method\n * @name $injector#invoke\n *\n * @description\n * Invoke the method and supply the method arguments from the `$injector`.\n *\n * @param {!Function} fn The function to invoke. Function parameters are injected according to the\n *   {@link guide/di $inject Annotation} rules.\n * @param {Object=} self The `this` for the invoked method.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n *                         object first, before the `$injector` is consulted.\n * @returns {*} the value returned by the invoked `fn` function.\n */\n\n/**\n * @ngdoc method\n * @name $injector#has\n *\n * @description\n * Allows the user to query if the particular service exists.\n *\n * @param {string} Name of the service to query.\n * @returns {boolean} returns true if injector has given service.\n */\n\n/**\n * @ngdoc method\n * @name $injector#instantiate\n * @description\n * Create a new instance of JS type. The method takes a constructor function, invokes the new\n * operator, and supplies all of the arguments to the constructor function as specified by the\n * constructor annotation.\n *\n * @param {Function} Type Annotated constructor function.\n * @param {Object=} locals Optional object. If preset then any argument names are read from this\n * object first, before the `$injector` is consulted.\n * @returns {Object} new instance of `Type`.\n */\n\n/**\n * @ngdoc method\n * @name $injector#annotate\n *\n * @description\n * Returns an array of service names which the function is requesting for injection. This API is\n * used by the injector to determine which services need to be injected into the function when the\n * function is invoked. There are three ways in which the function can be annotated with the needed\n * dependencies.\n *\n * # Argument names\n *\n * The simplest form is to extract the dependencies from the arguments of the function. This is done\n * by converting the function into a string using `toString()` method and extracting the argument\n * names.\n * ```js\n *   // Given\n *   function MyController($scope, $route) {\n *     // ...\n *   }\n *\n *   // Then\n *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * This method does not work with code minification / obfuscation. For this reason the following\n * annotation strategies are supported.\n *\n * # The `$inject` property\n *\n * If a function has an `$inject` property and its value is an array of strings, then the strings\n * represent names of services to be injected into the function.\n * ```js\n *   // Given\n *   var MyController = function(obfuscatedScope, obfuscatedRoute) {\n *     // ...\n *   }\n *   // Define function dependencies\n *   MyController['$inject'] = ['$scope', '$route'];\n *\n *   // Then\n *   expect(injector.annotate(MyController)).toEqual(['$scope', '$route']);\n * ```\n *\n * # The array notation\n *\n * It is often desirable to inline Injected functions and that's when setting the `$inject` property\n * is very inconvenient. In these situations using the array notation to specify the dependencies in\n * a way that survives minification is a better choice:\n *\n * ```js\n *   // We wish to write this (not minification / obfuscation safe)\n *   injector.invoke(function($compile, $rootScope) {\n *     // ...\n *   });\n *\n *   // We are forced to write break inlining\n *   var tmpFn = function(obfuscatedCompile, obfuscatedRootScope) {\n *     // ...\n *   };\n *   tmpFn.$inject = ['$compile', '$rootScope'];\n *   injector.invoke(tmpFn);\n *\n *   // To better support inline function the inline annotation is supported\n *   injector.invoke(['$compile', '$rootScope', function(obfCompile, obfRootScope) {\n *     // ...\n *   }]);\n *\n *   // Therefore\n *   expect(injector.annotate(\n *      ['$compile', '$rootScope', function(obfus_$compile, obfus_$rootScope) {}])\n *    ).toEqual(['$compile', '$rootScope']);\n * ```\n *\n * @param {Function|Array.<string|Function>} fn Function for which dependent service names need to\n * be retrieved as described above.\n *\n * @returns {Array.<string>} The names of the services which the function requires.\n */\n\n\n\n\n/**\n * @ngdoc service\n * @name $provide\n *\n * @description\n *\n * The {@link auto.$provide $provide} service has a number of methods for registering components\n * with the {@link auto.$injector $injector}. Many of these functions are also exposed on\n * {@link angular.Module}.\n *\n * An Angular **service** is a singleton object created by a **service factory**.  These **service\n * factories** are functions which, in turn, are created by a **service provider**.\n * The **service providers** are constructor functions. When instantiated they must contain a\n * property called `$get`, which holds the **service factory** function.\n *\n * When you request a service, the {@link auto.$injector $injector} is responsible for finding the\n * correct **service provider**, instantiating it and then calling its `$get` **service factory**\n * function to get the instance of the **service**.\n *\n * Often services have no configuration options and there is no need to add methods to the service\n * provider.  The provider will be no more than a constructor function with a `$get` property. For\n * these cases the {@link auto.$provide $provide} service has additional helper methods to register\n * services without specifying a provider.\n *\n * * {@link auto.$provide#provider provider(provider)} - registers a **service provider** with the\n *     {@link auto.$injector $injector}\n * * {@link auto.$provide#constant constant(obj)} - registers a value/object that can be accessed by\n *     providers and services.\n * * {@link auto.$provide#value value(obj)} - registers a value/object that can only be accessed by\n *     services, not providers.\n * * {@link auto.$provide#factory factory(fn)} - registers a service **factory function**, `fn`,\n *     that will be wrapped in a **service provider** object, whose `$get` property will contain the\n *     given factory function.\n * * {@link auto.$provide#service service(class)} - registers a **constructor function**, `class`\n *     that will be wrapped in a **service provider** object, whose `$get` property will instantiate\n *      a new object using the given constructor function.\n *\n * See the individual methods for more information and examples.\n */\n\n/**\n * @ngdoc method\n * @name $provide#provider\n * @description\n *\n * Register a **provider function** with the {@link auto.$injector $injector}. Provider functions\n * are constructor functions, whose instances are responsible for \"providing\" a factory for a\n * service.\n *\n * Service provider names start with the name of the service they provide followed by `Provider`.\n * For example, the {@link ng.$log $log} service has a provider called\n * {@link ng.$logProvider $logProvider}.\n *\n * Service provider objects can have additional methods which allow configuration of the provider\n * and its service. Importantly, you can configure what kind of service is created by the `$get`\n * method, or how that service will act. For example, the {@link ng.$logProvider $logProvider} has a\n * method {@link ng.$logProvider#debugEnabled debugEnabled}\n * which lets you specify whether the {@link ng.$log $log} service will log debug messages to the\n * console or not.\n *\n * @param {string} name The name of the instance. NOTE: the provider will be available under `name +\n                        'Provider'` key.\n * @param {(Object|function())} provider If the provider is:\n *\n *   - `Object`: then it should have a `$get` method. The `$get` method will be invoked using\n *     {@link auto.$injector#invoke $injector.invoke()} when an instance needs to be created.\n *   - `Constructor`: a new instance of the provider will be created using\n *     {@link auto.$injector#instantiate $injector.instantiate()}, then treated as `object`.\n *\n * @returns {Object} registered provider instance\n\n * @example\n *\n * The following example shows how to create a simple event tracking service and register it using\n * {@link auto.$provide#provider $provide.provider()}.\n *\n * ```js\n *  // Define the eventTracker provider\n *  function EventTrackerProvider() {\n *    var trackingUrl = '/track';\n *\n *    // A provider method for configuring where the tracked events should been saved\n *    this.setTrackingUrl = function(url) {\n *      trackingUrl = url;\n *    };\n *\n *    // The service factory function\n *    this.$get = ['$http', function($http) {\n *      var trackedEvents = {};\n *      return {\n *        // Call this to track an event\n *        event: function(event) {\n *          var count = trackedEvents[event] || 0;\n *          count += 1;\n *          trackedEvents[event] = count;\n *          return count;\n *        },\n *        // Call this to save the tracked events to the trackingUrl\n *        save: function() {\n *          $http.post(trackingUrl, trackedEvents);\n *        }\n *      };\n *    }];\n *  }\n *\n *  describe('eventTracker', function() {\n *    var postSpy;\n *\n *    beforeEach(module(function($provide) {\n *      // Register the eventTracker provider\n *      $provide.provider('eventTracker', EventTrackerProvider);\n *    }));\n *\n *    beforeEach(module(function(eventTrackerProvider) {\n *      // Configure eventTracker provider\n *      eventTrackerProvider.setTrackingUrl('/custom-track');\n *    }));\n *\n *    it('tracks events', inject(function(eventTracker) {\n *      expect(eventTracker.event('login')).toEqual(1);\n *      expect(eventTracker.event('login')).toEqual(2);\n *    }));\n *\n *    it('saves to the tracking url', inject(function(eventTracker, $http) {\n *      postSpy = spyOn($http, 'post');\n *      eventTracker.event('login');\n *      eventTracker.save();\n *      expect(postSpy).toHaveBeenCalled();\n *      expect(postSpy.mostRecentCall.args[0]).not.toEqual('/track');\n *      expect(postSpy.mostRecentCall.args[0]).toEqual('/custom-track');\n *      expect(postSpy.mostRecentCall.args[1]).toEqual({ 'login': 1 });\n *    }));\n *  });\n * ```\n */\n\n/**\n * @ngdoc method\n * @name $provide#factory\n * @description\n *\n * Register a **service factory**, which will be called to return the service instance.\n * This is short for registering a service where its provider consists of only a `$get` property,\n * which is the given service factory function.\n * You should use {@link auto.$provide#factory $provide.factory(getFn)} if you do not need to\n * configure your service in a provider.\n *\n * @param {string} name The name of the instance.\n * @param {function()} $getFn The $getFn for the instance creation. Internally this is a short hand\n *                            for `$provide.provider(name, {$get: $getFn})`.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service\n * ```js\n *   $provide.factory('ping', ['$http', function($http) {\n *     return function ping() {\n *       return $http.send('/ping');\n *     };\n *   }]);\n * ```\n * You would then inject and use this service like this:\n * ```js\n *   someModule.controller('Ctrl', ['ping', function(ping) {\n *     ping();\n *   }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#service\n * @description\n *\n * Register a **service constructor**, which will be invoked with `new` to create the service\n * instance.\n * This is short for registering a service where its provider's `$get` property is the service\n * constructor function that will be used to instantiate the service instance.\n *\n * You should use {@link auto.$provide#service $provide.service(class)} if you define your service\n * as a type/class.\n *\n * @param {string} name The name of the instance.\n * @param {Function} constructor A class (constructor function) that will be instantiated.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here is an example of registering a service using\n * {@link auto.$provide#service $provide.service(class)}.\n * ```js\n *   var Ping = function($http) {\n *     this.$http = $http;\n *   };\n *\n *   Ping.$inject = ['$http'];\n *\n *   Ping.prototype.send = function() {\n *     return this.$http.get('/ping');\n *   };\n *   $provide.service('ping', Ping);\n * ```\n * You would then inject and use this service like this:\n * ```js\n *   someModule.controller('Ctrl', ['ping', function(ping) {\n *     ping.send();\n *   }]);\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#value\n * @description\n *\n * Register a **value service** with the {@link auto.$injector $injector}, such as a string, a\n * number, an array, an object or a function.  This is short for registering a service where its\n * provider's `$get` property is a factory function that takes no arguments and returns the **value\n * service**.\n *\n * Value services are similar to constant services, except that they cannot be injected into a\n * module configuration function (see {@link angular.Module#config}) but they can be overridden by\n * an Angular\n * {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the instance.\n * @param {*} value The value.\n * @returns {Object} registered provider instance\n *\n * @example\n * Here are some examples of creating value services.\n * ```js\n *   $provide.value('ADMIN_USER', 'admin');\n *\n *   $provide.value('RoleLookup', { admin: 0, writer: 1, reader: 2 });\n *\n *   $provide.value('halfOf', function(value) {\n *     return value / 2;\n *   });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#constant\n * @description\n *\n * Register a **constant service**, such as a string, a number, an array, an object or a function,\n * with the {@link auto.$injector $injector}. Unlike {@link auto.$provide#value value} it can be\n * injected into a module configuration function (see {@link angular.Module#config}) and it cannot\n * be overridden by an Angular {@link auto.$provide#decorator decorator}.\n *\n * @param {string} name The name of the constant.\n * @param {*} value The constant value.\n * @returns {Object} registered instance\n *\n * @example\n * Here a some examples of creating constants:\n * ```js\n *   $provide.constant('SHARD_HEIGHT', 306);\n *\n *   $provide.constant('MY_COLOURS', ['red', 'blue', 'grey']);\n *\n *   $provide.constant('double', function(value) {\n *     return value * 2;\n *   });\n * ```\n */\n\n\n/**\n * @ngdoc method\n * @name $provide#decorator\n * @description\n *\n * Register a **service decorator** with the {@link auto.$injector $injector}. A service decorator\n * intercepts the creation of a service, allowing it to override or modify the behaviour of the\n * service. The object returned by the decorator may be the original service, or a new service\n * object which replaces or wraps and delegates to the original service.\n *\n * @param {string} name The name of the service to decorate.\n * @param {function()} decorator This function will be invoked when the service needs to be\n *    instantiated and should return the decorated service instance. The function is called using\n *    the {@link auto.$injector#invoke injector.invoke} method and is therefore fully injectable.\n *    Local injection arguments:\n *\n *    * `$delegate` - The original service instance, which can be monkey patched, configured,\n *      decorated or delegated to.\n *\n * @example\n * Here we decorate the {@link ng.$log $log} service to convert warnings to errors by intercepting\n * calls to {@link ng.$log#error $log.warn()}.\n * ```js\n *   $provide.decorator('$log', ['$delegate', function($delegate) {\n *     $delegate.warn = $delegate.error;\n *     return $delegate;\n *   }]);\n * ```\n */\n\n\nfunction createInjector(modulesToLoad) {\n  var INSTANTIATING = {},\n      providerSuffix = 'Provider',\n      path = [],\n      loadedModules = new HashMap([], true),\n      providerCache = {\n        $provide: {\n            provider: supportObject(provider),\n            factory: supportObject(factory),\n            service: supportObject(service),\n            value: supportObject(value),\n            constant: supportObject(constant),\n            decorator: decorator\n          }\n      },\n      providerInjector = (providerCache.$injector =\n          createInternalInjector(providerCache, function() {\n            throw $injectorMinErr('unpr', \"Unknown provider: {0}\", path.join(' <- '));\n          })),\n      instanceCache = {},\n      instanceInjector = (instanceCache.$injector =\n          createInternalInjector(instanceCache, function(servicename) {\n            var provider = providerInjector.get(servicename + providerSuffix);\n            return instanceInjector.invoke(provider.$get, provider);\n          }));\n\n\n  forEach(loadModules(modulesToLoad), function(fn) { instanceInjector.invoke(fn || noop); });\n\n  return instanceInjector;\n\n  ////////////////////////////////////\n  // $provider\n  ////////////////////////////////////\n\n  function supportObject(delegate) {\n    return function(key, value) {\n      if (isObject(key)) {\n        forEach(key, reverseParams(delegate));\n      } else {\n        return delegate(key, value);\n      }\n    };\n  }\n\n  function provider(name, provider_) {\n    assertNotHasOwnProperty(name, 'service');\n    if (isFunction(provider_) || isArray(provider_)) {\n      provider_ = providerInjector.instantiate(provider_);\n    }\n    if (!provider_.$get) {\n      throw $injectorMinErr('pget', \"Provider '{0}' must define $get factory method.\", name);\n    }\n    return providerCache[name + providerSuffix] = provider_;\n  }\n\n  function factory(name, factoryFn) { return provider(name, { $get: factoryFn }); }\n\n  function service(name, constructor) {\n    return factory(name, ['$injector', function($injector) {\n      return $injector.instantiate(constructor);\n    }]);\n  }\n\n  function value(name, val) { return factory(name, valueFn(val)); }\n\n  function constant(name, value) {\n    assertNotHasOwnProperty(name, 'constant');\n    providerCache[name] = value;\n    instanceCache[name] = value;\n  }\n\n  function decorator(serviceName, decorFn) {\n    var origProvider = providerInjector.get(serviceName + providerSuffix),\n        orig$get = origProvider.$get;\n\n    origProvider.$get = function() {\n      var origInstance = instanceInjector.invoke(orig$get, origProvider);\n      return instanceInjector.invoke(decorFn, null, {$delegate: origInstance});\n    };\n  }\n\n  ////////////////////////////////////\n  // Module Loading\n  ////////////////////////////////////\n  function loadModules(modulesToLoad){\n    var runBlocks = [], moduleFn, invokeQueue, i, ii;\n    forEach(modulesToLoad, function(module) {\n      if (loadedModules.get(module)) return;\n      loadedModules.put(module, true);\n\n      try {\n        if (isString(module)) {\n          moduleFn = angularModule(module);\n          runBlocks = runBlocks.concat(loadModules(moduleFn.requires)).concat(moduleFn._runBlocks);\n\n          for(invokeQueue = moduleFn._invokeQueue, i = 0, ii = invokeQueue.length; i < ii; i++) {\n            var invokeArgs = invokeQueue[i],\n                provider = providerInjector.get(invokeArgs[0]);\n\n            provider[invokeArgs[1]].apply(provider, invokeArgs[2]);\n          }\n        } else if (isFunction(module)) {\n            runBlocks.push(providerInjector.invoke(module));\n        } else if (isArray(module)) {\n            runBlocks.push(providerInjector.invoke(module));\n        } else {\n          assertArgFn(module, 'module');\n        }\n      } catch (e) {\n        if (isArray(module)) {\n          module = module[module.length - 1];\n        }\n        if (e.message && e.stack && e.stack.indexOf(e.message) == -1) {\n          // Safari & FF's stack traces don't contain error.message content\n          // unlike those of Chrome and IE\n          // So if stack doesn't contain message, we create a new string that contains both.\n          // Since error.stack is read-only in Safari, I'm overriding e and not e.stack here.\n          /* jshint -W022 */\n          e = e.message + '\\n' + e.stack;\n        }\n        throw $injectorMinErr('modulerr', \"Failed to instantiate module {0} due to:\\n{1}\",\n                  module, e.stack || e.message || e);\n      }\n    });\n    return runBlocks;\n  }\n\n  ////////////////////////////////////\n  // internal Injector\n  ////////////////////////////////////\n\n  function createInternalInjector(cache, factory) {\n\n    function getService(serviceName) {\n      if (cache.hasOwnProperty(serviceName)) {\n        if (cache[serviceName] === INSTANTIATING) {\n          throw $injectorMinErr('cdep', 'Circular dependency found: {0}',\n                    serviceName + ' <- ' + path.join(' <- '));\n        }\n        return cache[serviceName];\n      } else {\n        try {\n          path.unshift(serviceName);\n          cache[serviceName] = INSTANTIATING;\n          return cache[serviceName] = factory(serviceName);\n        } catch (err) {\n          if (cache[serviceName] === INSTANTIATING) {\n            delete cache[serviceName];\n          }\n          throw err;\n        } finally {\n          path.shift();\n        }\n      }\n    }\n\n    function invoke(fn, self, locals){\n      var args = [],\n          $inject = annotate(fn),\n          length, i,\n          key;\n\n      for(i = 0, length = $inject.length; i < length; i++) {\n        key = $inject[i];\n        if (typeof key !== 'string') {\n          throw $injectorMinErr('itkn',\n                  'Incorrect injection token! Expected service name as string, got {0}', key);\n        }\n        args.push(\n          locals && locals.hasOwnProperty(key)\n          ? locals[key]\n          : getService(key)\n        );\n      }\n      if (isArray(fn)) {\n        fn = fn[length];\n      }\n\n      // http://jsperf.com/angularjs-invoke-apply-vs-switch\n      // #5388\n      return fn.apply(self, args);\n    }\n\n    function instantiate(Type, locals) {\n      var Constructor = function() {},\n          instance, returnedValue;\n\n      // Check if Type is annotated and use just the given function at n-1 as parameter\n      // e.g. someModule.factory('greeter', ['$window', function(renamed$window) {}]);\n      Constructor.prototype = (isArray(Type) ? Type[Type.length - 1] : Type).prototype;\n      instance = new Constructor();\n      returnedValue = invoke(Type, instance, locals);\n\n      return isObject(returnedValue) || isFunction(returnedValue) ? returnedValue : instance;\n    }\n\n    return {\n      invoke: invoke,\n      instantiate: instantiate,\n      get: getService,\n      annotate: annotate,\n      has: function(name) {\n        return providerCache.hasOwnProperty(name + providerSuffix) || cache.hasOwnProperty(name);\n      }\n    };\n  }\n}\n\n/**\n * @ngdoc service\n * @name $anchorScroll\n * @kind function\n * @requires $window\n * @requires $location\n * @requires $rootScope\n *\n * @description\n * When called, it checks current value of `$location.hash()` and scrolls to the related element,\n * according to rules specified in\n * [Html5 spec](http://dev.w3.org/html5/spec/Overview.html#the-indicated-part-of-the-document).\n *\n * It also watches the `$location.hash()` and scrolls whenever it changes to match any anchor.\n * This can be disabled by calling `$anchorScrollProvider.disableAutoScrolling()`.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n       <div id=\"scrollArea\" ng-controller=\"ScrollCtrl\">\n         <a ng-click=\"gotoBottom()\">Go to bottom</a>\n         <a id=\"bottom\"></a> You're at the bottom!\n       </div>\n     </file>\n     <file name=\"script.js\">\n       function ScrollCtrl($scope, $location, $anchorScroll) {\n         $scope.gotoBottom = function (){\n           // set the location.hash to the id of\n           // the element you wish to scroll to.\n           $location.hash('bottom');\n\n           // call $anchorScroll()\n           $anchorScroll();\n         };\n       }\n     </file>\n     <file name=\"style.css\">\n       #scrollArea {\n         height: 350px;\n         overflow: auto;\n       }\n\n       #bottom {\n         display: block;\n         margin-top: 2000px;\n       }\n     </file>\n   </example>\n */\nfunction $AnchorScrollProvider() {\n\n  var autoScrollingEnabled = true;\n\n  this.disableAutoScrolling = function() {\n    autoScrollingEnabled = false;\n  };\n\n  this.$get = ['$window', '$location', '$rootScope', function($window, $location, $rootScope) {\n    var document = $window.document;\n\n    // helper function to get first anchor from a NodeList\n    // can't use filter.filter, as it accepts only instances of Array\n    // and IE can't convert NodeList to an array using [].slice\n    // TODO(vojta): use filter if we change it to accept lists as well\n    function getFirstAnchor(list) {\n      var result = null;\n      forEach(list, function(element) {\n        if (!result && lowercase(element.nodeName) === 'a') result = element;\n      });\n      return result;\n    }\n\n    function scroll() {\n      var hash = $location.hash(), elm;\n\n      // empty hash, scroll to the top of the page\n      if (!hash) $window.scrollTo(0, 0);\n\n      // element with given id\n      else if ((elm = document.getElementById(hash))) elm.scrollIntoView();\n\n      // first anchor with given name :-D\n      else if ((elm = getFirstAnchor(document.getElementsByName(hash)))) elm.scrollIntoView();\n\n      // no element and hash == 'top', scroll to the top of the page\n      else if (hash === 'top') $window.scrollTo(0, 0);\n    }\n\n    // does not scroll when user clicks on anchor link that is currently on\n    // (no url change, no $location.hash() change), browser native does scroll\n    if (autoScrollingEnabled) {\n      $rootScope.$watch(function autoScrollWatch() {return $location.hash();},\n        function autoScrollWatchAction() {\n          $rootScope.$evalAsync(scroll);\n        });\n    }\n\n    return scroll;\n  }];\n}\n\nvar $animateMinErr = minErr('$animate');\n\n/**\n * @ngdoc provider\n * @name $animateProvider\n *\n * @description\n * Default implementation of $animate that doesn't perform any animations, instead just\n * synchronously performs DOM\n * updates and calls done() callbacks.\n *\n * In order to enable animations the ngAnimate module has to be loaded.\n *\n * To see the functional implementation check out src/ngAnimate/animate.js\n */\nvar $AnimateProvider = ['$provide', function($provide) {\n\n\n  this.$$selectors = {};\n\n\n  /**\n   * @ngdoc method\n   * @name $animateProvider#register\n   *\n   * @description\n   * Registers a new injectable animation factory function. The factory function produces the\n   * animation object which contains callback functions for each event that is expected to be\n   * animated.\n   *\n   *   * `eventFn`: `function(Element, doneFunction)` The element to animate, the `doneFunction`\n   *   must be called once the element animation is complete. If a function is returned then the\n   *   animation service will use this function to cancel the animation whenever a cancel event is\n   *   triggered.\n   *\n   *\n   * ```js\n   *   return {\n     *     eventFn : function(element, done) {\n     *       //code to run the animation\n     *       //once complete, then run done()\n     *       return function cancellationFunction() {\n     *         //code to cancel the animation\n     *       }\n     *     }\n     *   }\n   * ```\n   *\n   * @param {string} name The name of the animation.\n   * @param {Function} factory The factory function that will be executed to return the animation\n   *                           object.\n   */\n  this.register = function(name, factory) {\n    var key = name + '-animation';\n    if (name && name.charAt(0) != '.') throw $animateMinErr('notcsel',\n        \"Expecting class selector starting with '.' got '{0}'.\", name);\n    this.$$selectors[name.substr(1)] = key;\n    $provide.factory(key, factory);\n  };\n\n  /**\n   * @ngdoc method\n   * @name $animateProvider#classNameFilter\n   *\n   * @description\n   * Sets and/or returns the CSS class regular expression that is checked when performing\n   * an animation. Upon bootstrap the classNameFilter value is not set at all and will\n   * therefore enable $animate to attempt to perform an animation on any element.\n   * When setting the classNameFilter value, animations will only be performed on elements\n   * that successfully match the filter expression. This in turn can boost performance\n   * for low-powered devices as well as applications containing a lot of structural operations.\n   * @param {RegExp=} expression The className expression which will be checked against all animations\n   * @return {RegExp} The current CSS className expression value. If null then there is no expression value\n   */\n  this.classNameFilter = function(expression) {\n    if(arguments.length === 1) {\n      this.$$classNameFilter = (expression instanceof RegExp) ? expression : null;\n    }\n    return this.$$classNameFilter;\n  };\n\n  this.$get = ['$timeout', '$$asyncCallback', function($timeout, $$asyncCallback) {\n\n    function async(fn) {\n      fn && $$asyncCallback(fn);\n    }\n\n    /**\n     *\n     * @ngdoc service\n     * @name $animate\n     * @description The $animate service provides rudimentary DOM manipulation functions to\n     * insert, remove and move elements within the DOM, as well as adding and removing classes.\n     * This service is the core service used by the ngAnimate $animator service which provides\n     * high-level animation hooks for CSS and JavaScript.\n     *\n     * $animate is available in the AngularJS core, however, the ngAnimate module must be included\n     * to enable full out animation support. Otherwise, $animate will only perform simple DOM\n     * manipulation operations.\n     *\n     * To learn more about enabling animation support, click here to visit the {@link ngAnimate\n     * ngAnimate module page} as well as the {@link ngAnimate.$animate ngAnimate $animate service\n     * page}.\n     */\n    return {\n\n      /**\n       *\n       * @ngdoc method\n       * @name $animate#enter\n       * @kind function\n       * @description Inserts the element into the DOM either after the `after` element or within\n       *   the `parent` element. Once complete, the done() callback will be fired (if provided).\n       * @param {DOMElement} element the element which will be inserted into the DOM\n       * @param {DOMElement} parent the parent element which will append the element as\n       *   a child (if the after element is not present)\n       * @param {DOMElement} after the sibling element which will append the element\n       *   after itself\n       * @param {Function=} done callback function that will be called after the element has been\n       *   inserted into the DOM\n       */\n      enter : function(element, parent, after, done) {\n        if (after) {\n          after.after(element);\n        } else {\n          if (!parent || !parent[0]) {\n            parent = after.parent();\n          }\n          parent.append(element);\n        }\n        async(done);\n      },\n\n      /**\n       *\n       * @ngdoc method\n       * @name $animate#leave\n       * @kind function\n       * @description Removes the element from the DOM. Once complete, the done() callback will be\n       *   fired (if provided).\n       * @param {DOMElement} element the element which will be removed from the DOM\n       * @param {Function=} done callback function that will be called after the element has been\n       *   removed from the DOM\n       */\n      leave : function(element, done) {\n        element.remove();\n        async(done);\n      },\n\n      /**\n       *\n       * @ngdoc method\n       * @name $animate#move\n       * @kind function\n       * @description Moves the position of the provided element within the DOM to be placed\n       * either after the `after` element or inside of the `parent` element. Once complete, the\n       * done() callback will be fired (if provided).\n       *\n       * @param {DOMElement} element the element which will be moved around within the\n       *   DOM\n       * @param {DOMElement} parent the parent element where the element will be\n       *   inserted into (if the after element is not present)\n       * @param {DOMElement} after the sibling element where the element will be\n       *   positioned next to\n       * @param {Function=} done the callback function (if provided) that will be fired after the\n       *   element has been moved to its new position\n       */\n      move : function(element, parent, after, done) {\n        // Do not remove element before insert. Removing will cause data associated with the\n        // element to be dropped. Insert will implicitly do the remove.\n        this.enter(element, parent, after, done);\n      },\n\n      /**\n       *\n       * @ngdoc method\n       * @name $animate#addClass\n       * @kind function\n       * @description Adds the provided className CSS class value to the provided element. Once\n       * complete, the done() callback will be fired (if provided).\n       * @param {DOMElement} element the element which will have the className value\n       *   added to it\n       * @param {string} className the CSS class which will be added to the element\n       * @param {Function=} done the callback function (if provided) that will be fired after the\n       *   className value has been added to the element\n       */\n      addClass : function(element, className, done) {\n        className = isString(className) ?\n                      className :\n                      isArray(className) ? className.join(' ') : '';\n        forEach(element, function (element) {\n          jqLiteAddClass(element, className);\n        });\n        async(done);\n      },\n\n      /**\n       *\n       * @ngdoc method\n       * @name $animate#removeClass\n       * @kind function\n       * @description Removes the provided className CSS class value from the provided element.\n       * Once complete, the done() callback will be fired (if provided).\n       * @param {DOMElement} element the element which will have the className value\n       *   removed from it\n       * @param {string} className the CSS class which will be removed from the element\n       * @param {Function=} done the callback function (if provided) that will be fired after the\n       *   className value has been removed from the element\n       */\n      removeClass : function(element, className, done) {\n        className = isString(className) ?\n                      className :\n                      isArray(className) ? className.join(' ') : '';\n        forEach(element, function (element) {\n          jqLiteRemoveClass(element, className);\n        });\n        async(done);\n      },\n\n      /**\n       *\n       * @ngdoc method\n       * @name $animate#setClass\n       * @kind function\n       * @description Adds and/or removes the given CSS classes to and from the element.\n       * Once complete, the done() callback will be fired (if provided).\n       * @param {DOMElement} element the element which will have its CSS classes changed\n       *   removed from it\n       * @param {string} add the CSS classes which will be added to the element\n       * @param {string} remove the CSS class which will be removed from the element\n       * @param {Function=} done the callback function (if provided) that will be fired after the\n       *   CSS classes have been set on the element\n       */\n      setClass : function(element, add, remove, done) {\n        forEach(element, function (element) {\n          jqLiteAddClass(element, add);\n          jqLiteRemoveClass(element, remove);\n        });\n        async(done);\n      },\n\n      enabled : noop\n    };\n  }];\n}];\n\nfunction $$AsyncCallbackProvider(){\n  this.$get = ['$$rAF', '$timeout', function($$rAF, $timeout) {\n    return $$rAF.supported\n      ? function(fn) { return $$rAF(fn); }\n      : function(fn) {\n        return $timeout(fn, 0, false);\n      };\n  }];\n}\n\n/**\n * ! This is a private undocumented service !\n *\n * @name $browser\n * @requires $log\n * @description\n * This object has two goals:\n *\n * - hide all the global state in the browser caused by the window object\n * - abstract away all the browser specific features and inconsistencies\n *\n * For tests we provide {@link ngMock.$browser mock implementation} of the `$browser`\n * service, which can be used for convenient testing of the application without the interaction with\n * the real browser apis.\n */\n/**\n * @param {object} window The global window object.\n * @param {object} document jQuery wrapped document.\n * @param {function()} XHR XMLHttpRequest constructor.\n * @param {object} $log console.log or an object with the same interface.\n * @param {object} $sniffer $sniffer service\n */\nfunction Browser(window, document, $log, $sniffer) {\n  var self = this,\n      rawDocument = document[0],\n      location = window.location,\n      history = window.history,\n      setTimeout = window.setTimeout,\n      clearTimeout = window.clearTimeout,\n      pendingDeferIds = {};\n\n  self.isMock = false;\n\n  var outstandingRequestCount = 0;\n  var outstandingRequestCallbacks = [];\n\n  // TODO(vojta): remove this temporary api\n  self.$$completeOutstandingRequest = completeOutstandingRequest;\n  self.$$incOutstandingRequestCount = function() { outstandingRequestCount++; };\n\n  /**\n   * Executes the `fn` function(supports currying) and decrements the `outstandingRequestCallbacks`\n   * counter. If the counter reaches 0, all the `outstandingRequestCallbacks` are executed.\n   */\n  function completeOutstandingRequest(fn) {\n    try {\n      fn.apply(null, sliceArgs(arguments, 1));\n    } finally {\n      outstandingRequestCount--;\n      if (outstandingRequestCount === 0) {\n        while(outstandingRequestCallbacks.length) {\n          try {\n            outstandingRequestCallbacks.pop()();\n          } catch (e) {\n            $log.error(e);\n          }\n        }\n      }\n    }\n  }\n\n  /**\n   * @private\n   * Note: this method is used only by scenario runner\n   * TODO(vojta): prefix this method with $$ ?\n   * @param {function()} callback Function that will be called when no outstanding request\n   */\n  self.notifyWhenNoOutstandingRequests = function(callback) {\n    // force browser to execute all pollFns - this is needed so that cookies and other pollers fire\n    // at some deterministic time in respect to the test runner's actions. Leaving things up to the\n    // regular poller would result in flaky tests.\n    forEach(pollFns, function(pollFn){ pollFn(); });\n\n    if (outstandingRequestCount === 0) {\n      callback();\n    } else {\n      outstandingRequestCallbacks.push(callback);\n    }\n  };\n\n  //////////////////////////////////////////////////////////////\n  // Poll Watcher API\n  //////////////////////////////////////////////////////////////\n  var pollFns = [],\n      pollTimeout;\n\n  /**\n   * @name $browser#addPollFn\n   *\n   * @param {function()} fn Poll function to add\n   *\n   * @description\n   * Adds a function to the list of functions that poller periodically executes,\n   * and starts polling if not started yet.\n   *\n   * @returns {function()} the added function\n   */\n  self.addPollFn = function(fn) {\n    if (isUndefined(pollTimeout)) startPoller(100, setTimeout);\n    pollFns.push(fn);\n    return fn;\n  };\n\n  /**\n   * @param {number} interval How often should browser call poll functions (ms)\n   * @param {function()} setTimeout Reference to a real or fake `setTimeout` function.\n   *\n   * @description\n   * Configures the poller to run in the specified intervals, using the specified\n   * setTimeout fn and kicks it off.\n   */\n  function startPoller(interval, setTimeout) {\n    (function check() {\n      forEach(pollFns, function(pollFn){ pollFn(); });\n      pollTimeout = setTimeout(check, interval);\n    })();\n  }\n\n  //////////////////////////////////////////////////////////////\n  // URL API\n  //////////////////////////////////////////////////////////////\n\n  var lastBrowserUrl = location.href,\n      baseElement = document.find('base'),\n      newLocation = null;\n\n  /**\n   * @name $browser#url\n   *\n   * @description\n   * GETTER:\n   * Without any argument, this method just returns current value of location.href.\n   *\n   * SETTER:\n   * With at least one argument, this method sets url to new value.\n   * If html5 history api supported, pushState/replaceState is used, otherwise\n   * location.href/location.replace is used.\n   * Returns its own instance to allow chaining\n   *\n   * NOTE: this api is intended for use only by the $location service. Please use the\n   * {@link ng.$location $location service} to change url.\n   *\n   * @param {string} url New url (when used as setter)\n   * @param {boolean=} replace Should new url replace current history record ?\n   */\n  self.url = function(url, replace) {\n    // Android Browser BFCache causes location, history reference to become stale.\n    if (location !== window.location) location = window.location;\n    if (history !== window.history) history = window.history;\n\n    // setter\n    if (url) {\n      if (lastBrowserUrl == url) return;\n      lastBrowserUrl = url;\n      if ($sniffer.history) {\n        if (replace) history.replaceState(null, '', url);\n        else {\n          history.pushState(null, '', url);\n          // Crazy Opera Bug: http://my.opera.com/community/forums/topic.dml?id=1185462\n          baseElement.attr('href', baseElement.attr('href'));\n        }\n      } else {\n        newLocation = url;\n        if (replace) {\n          location.replace(url);\n        } else {\n          location.href = url;\n        }\n      }\n      return self;\n    // getter\n    } else {\n      // - newLocation is a workaround for an IE7-9 issue with location.replace and location.href\n      //   methods not updating location.href synchronously.\n      // - the replacement is a workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=407172\n      return newLocation || location.href.replace(/%27/g,\"'\");\n    }\n  };\n\n  var urlChangeListeners = [],\n      urlChangeInit = false;\n\n  function fireUrlChange() {\n    newLocation = null;\n    if (lastBrowserUrl == self.url()) return;\n\n    lastBrowserUrl = self.url();\n    forEach(urlChangeListeners, function(listener) {\n      listener(self.url());\n    });\n  }\n\n  /**\n   * @name $browser#onUrlChange\n   *\n   * @description\n   * Register callback function that will be called, when url changes.\n   *\n   * It's only called when the url is changed from outside of angular:\n   * - user types different url into address bar\n   * - user clicks on history (forward/back) button\n   * - user clicks on a link\n   *\n   * It's not called when url is changed by $browser.url() method\n   *\n   * The listener gets called with new url as parameter.\n   *\n   * NOTE: this api is intended for use only by the $location service. Please use the\n   * {@link ng.$location $location service} to monitor url changes in angular apps.\n   *\n   * @param {function(string)} listener Listener function to be called when url changes.\n   * @return {function(string)} Returns the registered listener fn - handy if the fn is anonymous.\n   */\n  self.onUrlChange = function(callback) {\n    // TODO(vojta): refactor to use node's syntax for events\n    if (!urlChangeInit) {\n      // We listen on both (hashchange/popstate) when available, as some browsers (e.g. Opera)\n      // don't fire popstate when user change the address bar and don't fire hashchange when url\n      // changed by push/replaceState\n\n      // html5 history api - popstate event\n      if ($sniffer.history) jqLite(window).on('popstate', fireUrlChange);\n      // hashchange event\n      if ($sniffer.hashchange) jqLite(window).on('hashchange', fireUrlChange);\n      // polling\n      else self.addPollFn(fireUrlChange);\n\n      urlChangeInit = true;\n    }\n\n    urlChangeListeners.push(callback);\n    return callback;\n  };\n\n  //////////////////////////////////////////////////////////////\n  // Misc API\n  //////////////////////////////////////////////////////////////\n\n  /**\n   * @name $browser#baseHref\n   *\n   * @description\n   * Returns current <base href>\n   * (always relative - without domain)\n   *\n   * @returns {string} The current base href\n   */\n  self.baseHref = function() {\n    var href = baseElement.attr('href');\n    return href ? href.replace(/^(https?\\:)?\\/\\/[^\\/]*/, '') : '';\n  };\n\n  //////////////////////////////////////////////////////////////\n  // Cookies API\n  //////////////////////////////////////////////////////////////\n  var lastCookies = {};\n  var lastCookieString = '';\n  var cookiePath = self.baseHref();\n\n  /**\n   * @name $browser#cookies\n   *\n   * @param {string=} name Cookie name\n   * @param {string=} value Cookie value\n   *\n   * @description\n   * The cookies method provides a 'private' low level access to browser cookies.\n   * It is not meant to be used directly, use the $cookie service instead.\n   *\n   * The return values vary depending on the arguments that the method was called with as follows:\n   *\n   * - cookies() -> hash of all cookies, this is NOT a copy of the internal state, so do not modify\n   *   it\n   * - cookies(name, value) -> set name to value, if value is undefined delete the cookie\n   * - cookies(name) -> the same as (name, undefined) == DELETES (no one calls it right now that\n   *   way)\n   *\n   * @returns {Object} Hash of all cookies (if called without any parameter)\n   */\n  self.cookies = function(name, value) {\n    /* global escape: false, unescape: false */\n    var cookieLength, cookieArray, cookie, i, index;\n\n    if (name) {\n      if (value === undefined) {\n        rawDocument.cookie = escape(name) + \"=;path=\" + cookiePath +\n                                \";expires=Thu, 01 Jan 1970 00:00:00 GMT\";\n      } else {\n        if (isString(value)) {\n          cookieLength = (rawDocument.cookie = escape(name) + '=' + escape(value) +\n                                ';path=' + cookiePath).length + 1;\n\n          // per http://www.ietf.org/rfc/rfc2109.txt browser must allow at minimum:\n          // - 300 cookies\n          // - 20 cookies per unique domain\n          // - 4096 bytes per cookie\n          if (cookieLength > 4096) {\n            $log.warn(\"Cookie '\"+ name +\n              \"' possibly not set or overflowed because it was too large (\"+\n              cookieLength + \" > 4096 bytes)!\");\n          }\n        }\n      }\n    } else {\n      if (rawDocument.cookie !== lastCookieString) {\n        lastCookieString = rawDocument.cookie;\n        cookieArray = lastCookieString.split(\"; \");\n        lastCookies = {};\n\n        for (i = 0; i < cookieArray.length; i++) {\n          cookie = cookieArray[i];\n          index = cookie.indexOf('=');\n          if (index > 0) { //ignore nameless cookies\n            name = unescape(cookie.substring(0, index));\n            // the first value that is seen for a cookie is the most\n            // specific one.  values for the same cookie name that\n            // follow are for less specific paths.\n            if (lastCookies[name] === undefined) {\n              lastCookies[name] = unescape(cookie.substring(index + 1));\n            }\n          }\n        }\n      }\n      return lastCookies;\n    }\n  };\n\n\n  /**\n   * @name $browser#defer\n   * @param {function()} fn A function, who's execution should be deferred.\n   * @param {number=} [delay=0] of milliseconds to defer the function execution.\n   * @returns {*} DeferId that can be used to cancel the task via `$browser.defer.cancel()`.\n   *\n   * @description\n   * Executes a fn asynchronously via `setTimeout(fn, delay)`.\n   *\n   * Unlike when calling `setTimeout` directly, in test this function is mocked and instead of using\n   * `setTimeout` in tests, the fns are queued in an array, which can be programmatically flushed\n   * via `$browser.defer.flush()`.\n   *\n   */\n  self.defer = function(fn, delay) {\n    var timeoutId;\n    outstandingRequestCount++;\n    timeoutId = setTimeout(function() {\n      delete pendingDeferIds[timeoutId];\n      completeOutstandingRequest(fn);\n    }, delay || 0);\n    pendingDeferIds[timeoutId] = true;\n    return timeoutId;\n  };\n\n\n  /**\n   * @name $browser#defer.cancel\n   *\n   * @description\n   * Cancels a deferred task identified with `deferId`.\n   *\n   * @param {*} deferId Token returned by the `$browser.defer` function.\n   * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n   *                    canceled.\n   */\n  self.defer.cancel = function(deferId) {\n    if (pendingDeferIds[deferId]) {\n      delete pendingDeferIds[deferId];\n      clearTimeout(deferId);\n      completeOutstandingRequest(noop);\n      return true;\n    }\n    return false;\n  };\n\n}\n\nfunction $BrowserProvider(){\n  this.$get = ['$window', '$log', '$sniffer', '$document',\n      function( $window,   $log,   $sniffer,   $document){\n        return new Browser($window, $document, $log, $sniffer);\n      }];\n}\n\n/**\n * @ngdoc service\n * @name $cacheFactory\n *\n * @description\n * Factory that constructs {@link $cacheFactory.Cache Cache} objects and gives access to\n * them.\n *\n * ```js\n *\n *  var cache = $cacheFactory('cacheId');\n *  expect($cacheFactory.get('cacheId')).toBe(cache);\n *  expect($cacheFactory.get('noSuchCacheId')).not.toBeDefined();\n *\n *  cache.put(\"key\", \"value\");\n *  cache.put(\"another key\", \"another value\");\n *\n *  // We've specified no options on creation\n *  expect(cache.info()).toEqual({id: 'cacheId', size: 2});\n *\n * ```\n *\n *\n * @param {string} cacheId Name or id of the newly created cache.\n * @param {object=} options Options object that specifies the cache behavior. Properties:\n *\n *   - `{number=}` `capacity` — turns the cache into LRU cache.\n *\n * @returns {object} Newly created cache object with the following set of methods:\n *\n * - `{object}` `info()` — Returns id, size, and options of cache.\n * - `{{*}}` `put({string} key, {*} value)` — Puts a new key-value pair into the cache and returns\n *   it.\n * - `{{*}}` `get({string} key)` — Returns cached value for `key` or undefined for cache miss.\n * - `{void}` `remove({string} key)` — Removes a key-value pair from the cache.\n * - `{void}` `removeAll()` — Removes all cached values.\n * - `{void}` `destroy()` — Removes references to this cache from $cacheFactory.\n *\n * @example\n   <example module=\"cacheExampleApp\">\n     <file name=\"index.html\">\n       <div ng-controller=\"CacheController\">\n         <input ng-model=\"newCacheKey\" placeholder=\"Key\">\n         <input ng-model=\"newCacheValue\" placeholder=\"Value\">\n         <button ng-click=\"put(newCacheKey, newCacheValue)\">Cache</button>\n\n         <p ng-if=\"keys.length\">Cached Values</p>\n         <div ng-repeat=\"key in keys\">\n           <span ng-bind=\"key\"></span>\n           <span>: </span>\n           <b ng-bind=\"cache.get(key)\"></b>\n         </div>\n\n         <p>Cache Info</p>\n         <div ng-repeat=\"(key, value) in cache.info()\">\n           <span ng-bind=\"key\"></span>\n           <span>: </span>\n           <b ng-bind=\"value\"></b>\n         </div>\n       </div>\n     </file>\n     <file name=\"script.js\">\n       angular.module('cacheExampleApp', []).\n         controller('CacheController', ['$scope', '$cacheFactory', function($scope, $cacheFactory) {\n           $scope.keys = [];\n           $scope.cache = $cacheFactory('cacheId');\n           $scope.put = function(key, value) {\n             $scope.cache.put(key, value);\n             $scope.keys.push(key);\n           };\n         }]);\n     </file>\n     <file name=\"style.css\">\n       p {\n         margin: 10px 0 3px;\n       }\n     </file>\n   </example>\n */\nfunction $CacheFactoryProvider() {\n\n  this.$get = function() {\n    var caches = {};\n\n    function cacheFactory(cacheId, options) {\n      if (cacheId in caches) {\n        throw minErr('$cacheFactory')('iid', \"CacheId '{0}' is already taken!\", cacheId);\n      }\n\n      var size = 0,\n          stats = extend({}, options, {id: cacheId}),\n          data = {},\n          capacity = (options && options.capacity) || Number.MAX_VALUE,\n          lruHash = {},\n          freshEnd = null,\n          staleEnd = null;\n\n      /**\n       * @ngdoc type\n       * @name $cacheFactory.Cache\n       *\n       * @description\n       * A cache object used to store and retrieve data, primarily used by\n       * {@link $http $http} and the {@link ng.directive:script script} directive to cache\n       * templates and other data.\n       *\n       * ```js\n       *  angular.module('superCache')\n       *    .factory('superCache', ['$cacheFactory', function($cacheFactory) {\n       *      return $cacheFactory('super-cache');\n       *    }]);\n       * ```\n       *\n       * Example test:\n       *\n       * ```js\n       *  it('should behave like a cache', inject(function(superCache) {\n       *    superCache.put('key', 'value');\n       *    superCache.put('another key', 'another value');\n       *\n       *    expect(superCache.info()).toEqual({\n       *      id: 'super-cache',\n       *      size: 2\n       *    });\n       *\n       *    superCache.remove('another key');\n       *    expect(superCache.get('another key')).toBeUndefined();\n       *\n       *    superCache.removeAll();\n       *    expect(superCache.info()).toEqual({\n       *      id: 'super-cache',\n       *      size: 0\n       *    });\n       *  }));\n       * ```\n       */\n      return caches[cacheId] = {\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#put\n         * @kind function\n         *\n         * @description\n         * Inserts a named entry into the {@link $cacheFactory.Cache Cache} object to be\n         * retrieved later, and incrementing the size of the cache if the key was not already\n         * present in the cache. If behaving like an LRU cache, it will also remove stale\n         * entries from the set.\n         *\n         * It will not insert undefined values into the cache.\n         *\n         * @param {string} key the key under which the cached data is stored.\n         * @param {*} value the value to store alongside the key. If it is undefined, the key\n         *    will not be stored.\n         * @returns {*} the value stored.\n         */\n        put: function(key, value) {\n          if (capacity < Number.MAX_VALUE) {\n            var lruEntry = lruHash[key] || (lruHash[key] = {key: key});\n\n            refresh(lruEntry);\n          }\n\n          if (isUndefined(value)) return;\n          if (!(key in data)) size++;\n          data[key] = value;\n\n          if (size > capacity) {\n            this.remove(staleEnd.key);\n          }\n\n          return value;\n        },\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#get\n         * @kind function\n         *\n         * @description\n         * Retrieves named data stored in the {@link $cacheFactory.Cache Cache} object.\n         *\n         * @param {string} key the key of the data to be retrieved\n         * @returns {*} the value stored.\n         */\n        get: function(key) {\n          if (capacity < Number.MAX_VALUE) {\n            var lruEntry = lruHash[key];\n\n            if (!lruEntry) return;\n\n            refresh(lruEntry);\n          }\n\n          return data[key];\n        },\n\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#remove\n         * @kind function\n         *\n         * @description\n         * Removes an entry from the {@link $cacheFactory.Cache Cache} object.\n         *\n         * @param {string} key the key of the entry to be removed\n         */\n        remove: function(key) {\n          if (capacity < Number.MAX_VALUE) {\n            var lruEntry = lruHash[key];\n\n            if (!lruEntry) return;\n\n            if (lruEntry == freshEnd) freshEnd = lruEntry.p;\n            if (lruEntry == staleEnd) staleEnd = lruEntry.n;\n            link(lruEntry.n,lruEntry.p);\n\n            delete lruHash[key];\n          }\n\n          delete data[key];\n          size--;\n        },\n\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#removeAll\n         * @kind function\n         *\n         * @description\n         * Clears the cache object of any entries.\n         */\n        removeAll: function() {\n          data = {};\n          size = 0;\n          lruHash = {};\n          freshEnd = staleEnd = null;\n        },\n\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#destroy\n         * @kind function\n         *\n         * @description\n         * Destroys the {@link $cacheFactory.Cache Cache} object entirely,\n         * removing it from the {@link $cacheFactory $cacheFactory} set.\n         */\n        destroy: function() {\n          data = null;\n          stats = null;\n          lruHash = null;\n          delete caches[cacheId];\n        },\n\n\n        /**\n         * @ngdoc method\n         * @name $cacheFactory.Cache#info\n         * @kind function\n         *\n         * @description\n         * Retrieve information regarding a particular {@link $cacheFactory.Cache Cache}.\n         *\n         * @returns {object} an object with the following properties:\n         *   <ul>\n         *     <li>**id**: the id of the cache instance</li>\n         *     <li>**size**: the number of entries kept in the cache instance</li>\n         *     <li>**...**: any additional properties from the options object when creating the\n         *       cache.</li>\n         *   </ul>\n         */\n        info: function() {\n          return extend({}, stats, {size: size});\n        }\n      };\n\n\n      /**\n       * makes the `entry` the freshEnd of the LRU linked list\n       */\n      function refresh(entry) {\n        if (entry != freshEnd) {\n          if (!staleEnd) {\n            staleEnd = entry;\n          } else if (staleEnd == entry) {\n            staleEnd = entry.n;\n          }\n\n          link(entry.n, entry.p);\n          link(entry, freshEnd);\n          freshEnd = entry;\n          freshEnd.n = null;\n        }\n      }\n\n\n      /**\n       * bidirectionally links two entries of the LRU linked list\n       */\n      function link(nextEntry, prevEntry) {\n        if (nextEntry != prevEntry) {\n          if (nextEntry) nextEntry.p = prevEntry; //p stands for previous, 'prev' didn't minify\n          if (prevEntry) prevEntry.n = nextEntry; //n stands for next, 'next' didn't minify\n        }\n      }\n    }\n\n\n  /**\n   * @ngdoc method\n   * @name $cacheFactory#info\n   *\n   * @description\n   * Get information about all the caches that have been created\n   *\n   * @returns {Object} - key-value map of `cacheId` to the result of calling `cache#info`\n   */\n    cacheFactory.info = function() {\n      var info = {};\n      forEach(caches, function(cache, cacheId) {\n        info[cacheId] = cache.info();\n      });\n      return info;\n    };\n\n\n  /**\n   * @ngdoc method\n   * @name $cacheFactory#get\n   *\n   * @description\n   * Get access to a cache object by the `cacheId` used when it was created.\n   *\n   * @param {string} cacheId Name or id of a cache to access.\n   * @returns {object} Cache object identified by the cacheId or undefined if no such cache.\n   */\n    cacheFactory.get = function(cacheId) {\n      return caches[cacheId];\n    };\n\n\n    return cacheFactory;\n  };\n}\n\n/**\n * @ngdoc service\n * @name $templateCache\n *\n * @description\n * The first time a template is used, it is loaded in the template cache for quick retrieval. You\n * can load templates directly into the cache in a `script` tag, or by consuming the\n * `$templateCache` service directly.\n *\n * Adding via the `script` tag:\n *\n * ```html\n *   <script type=\"text/ng-template\" id=\"templateId.html\">\n *     <p>This is the content of the template</p>\n *   </script>\n * ```\n *\n * **Note:** the `script` tag containing the template does not need to be included in the `head` of\n * the document, but it must be below the `ng-app` definition.\n *\n * Adding via the $templateCache service:\n *\n * ```js\n * var myApp = angular.module('myApp', []);\n * myApp.run(function($templateCache) {\n *   $templateCache.put('templateId.html', 'This is the content of the template');\n * });\n * ```\n *\n * To retrieve the template later, simply use it in your HTML:\n * ```html\n * <div ng-include=\" 'templateId.html' \"></div>\n * ```\n *\n * or get it via Javascript:\n * ```js\n * $templateCache.get('templateId.html')\n * ```\n *\n * See {@link ng.$cacheFactory $cacheFactory}.\n *\n */\nfunction $TemplateCacheProvider() {\n  this.$get = ['$cacheFactory', function($cacheFactory) {\n    return $cacheFactory('templates');\n  }];\n}\n\n/* ! VARIABLE/FUNCTION NAMING CONVENTIONS THAT APPLY TO THIS FILE!\n *\n * DOM-related variables:\n *\n * - \"node\" - DOM Node\n * - \"element\" - DOM Element or Node\n * - \"$node\" or \"$element\" - jqLite-wrapped node or element\n *\n *\n * Compiler related stuff:\n *\n * - \"linkFn\" - linking fn of a single directive\n * - \"nodeLinkFn\" - function that aggregates all linking fns for a particular node\n * - \"childLinkFn\" -  function that aggregates all linking fns for child nodes of a particular node\n * - \"compositeLinkFn\" - function that aggregates all linking fns for a compilation root (nodeList)\n */\n\n\n/**\n * @ngdoc service\n * @name $compile\n * @kind function\n *\n * @description\n * Compiles an HTML string or DOM into a template and produces a template function, which\n * can then be used to link {@link ng.$rootScope.Scope `scope`} and the template together.\n *\n * The compilation is a process of walking the DOM tree and matching DOM elements to\n * {@link ng.$compileProvider#directive directives}.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** This document is an in-depth reference of all directive options.\n * For a gentle introduction to directives with examples of common use cases,\n * see the {@link guide/directive directive guide}.\n * </div>\n *\n * ## Comprehensive Directive API\n *\n * There are many different options for a directive.\n *\n * The difference resides in the return value of the factory function.\n * You can either return a \"Directive Definition Object\" (see below) that defines the directive properties,\n * or just the `postLink` function (all other properties will have the default values).\n *\n * <div class=\"alert alert-success\">\n * **Best Practice:** It's recommended to use the \"directive definition object\" form.\n * </div>\n *\n * Here's an example directive declared with a Directive Definition Object:\n *\n * ```js\n *   var myModule = angular.module(...);\n *\n *   myModule.directive('directiveName', function factory(injectables) {\n *     var directiveDefinitionObject = {\n *       priority: 0,\n *       template: '<div></div>', // or // function(tElement, tAttrs) { ... },\n *       // or\n *       // templateUrl: 'directive.html', // or // function(tElement, tAttrs) { ... },\n *       transclude: false,\n *       restrict: 'A',\n *       scope: false,\n *       controller: function($scope, $element, $attrs, $transclude, otherInjectables) { ... },\n *       controllerAs: 'stringAlias',\n *       require: 'siblingDirectiveName', // or // ['^parentDirectiveName', '?optionalDirectiveName', '?^optionalParent'],\n *       compile: function compile(tElement, tAttrs, transclude) {\n *         return {\n *           pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n *           post: function postLink(scope, iElement, iAttrs, controller) { ... }\n *         }\n *         // or\n *         // return function postLink( ... ) { ... }\n *       },\n *       // or\n *       // link: {\n *       //  pre: function preLink(scope, iElement, iAttrs, controller) { ... },\n *       //  post: function postLink(scope, iElement, iAttrs, controller) { ... }\n *       // }\n *       // or\n *       // link: function postLink( ... ) { ... }\n *     };\n *     return directiveDefinitionObject;\n *   });\n * ```\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Any unspecified options will use the default value. You can see the default values below.\n * </div>\n *\n * Therefore the above can be simplified as:\n *\n * ```js\n *   var myModule = angular.module(...);\n *\n *   myModule.directive('directiveName', function factory(injectables) {\n *     var directiveDefinitionObject = {\n *       link: function postLink(scope, iElement, iAttrs) { ... }\n *     };\n *     return directiveDefinitionObject;\n *     // or\n *     // return function postLink(scope, iElement, iAttrs) { ... }\n *   });\n * ```\n *\n *\n *\n * ### Directive Definition Object\n *\n * The directive definition object provides instructions to the {@link ng.$compile\n * compiler}. The attributes are:\n *\n * #### `priority`\n * When there are multiple directives defined on a single DOM element, sometimes it\n * is necessary to specify the order in which the directives are applied. The `priority` is used\n * to sort the directives before their `compile` functions get called. Priority is defined as a\n * number. Directives with greater numerical `priority` are compiled first. Pre-link functions\n * are also run in priority order, but post-link functions are run in reverse order. The order\n * of directives with the same priority is undefined. The default priority is `0`.\n *\n * #### `terminal`\n * If set to true then the current `priority` will be the last set of directives\n * which will execute (any directives at the current priority will still execute\n * as the order of execution on same `priority` is undefined).\n *\n * #### `scope`\n * **If set to `true`,** then a new scope will be created for this directive. If multiple directives on the\n * same element request a new scope, only one new scope is created. The new scope rule does not\n * apply for the root of the template since the root of the template always gets a new scope.\n *\n * **If set to `{}` (object hash),** then a new \"isolate\" scope is created. The 'isolate' scope differs from\n * normal scope in that it does not prototypically inherit from the parent scope. This is useful\n * when creating reusable components, which should not accidentally read or modify data in the\n * parent scope.\n *\n * The 'isolate' scope takes an object hash which defines a set of local scope properties\n * derived from the parent scope. These local properties are useful for aliasing values for\n * templates. Locals definition is a hash of local scope property to its source:\n *\n * * `@` or `@attr` - bind a local scope property to the value of DOM attribute. The result is\n *   always a string since DOM attributes are strings. If no `attr` name is specified  then the\n *   attribute name is assumed to be the same as the local name.\n *   Given `<widget my-attr=\"hello {{name}}\">` and widget definition\n *   of `scope: { localName:'@myAttr' }`, then widget scope property `localName` will reflect\n *   the interpolated value of `hello {{name}}`. As the `name` attribute changes so will the\n *   `localName` property on the widget scope. The `name` is read from the parent scope (not\n *   component scope).\n *\n * * `=` or `=attr` - set up bi-directional binding between a local scope property and the\n *   parent scope property of name defined via the value of the `attr` attribute. If no `attr`\n *   name is specified then the attribute name is assumed to be the same as the local name.\n *   Given `<widget my-attr=\"parentModel\">` and widget definition of\n *   `scope: { localModel:'=myAttr' }`, then widget scope property `localModel` will reflect the\n *   value of `parentModel` on the parent scope. Any changes to `parentModel` will be reflected\n *   in `localModel` and any changes in `localModel` will reflect in `parentModel`. If the parent\n *   scope property doesn't exist, it will throw a NON_ASSIGNABLE_MODEL_EXPRESSION exception. You\n *   can avoid this behavior using `=?` or `=?attr` in order to flag the property as optional.\n *\n * * `&` or `&attr` - provides a way to execute an expression in the context of the parent scope.\n *   If no `attr` name is specified then the attribute name is assumed to be the same as the\n *   local name. Given `<widget my-attr=\"count = count + value\">` and widget definition of\n *   `scope: { localFn:'&myAttr' }`, then isolate scope property `localFn` will point to\n *   a function wrapper for the `count = count + value` expression. Often it's desirable to\n *   pass data from the isolated scope via an expression to the parent scope, this can be\n *   done by passing a map of local variable names and values into the expression wrapper fn.\n *   For example, if the expression is `increment(amount)` then we can specify the amount value\n *   by calling the `localFn` as `localFn({amount: 22})`.\n *\n *\n *\n * #### `controller`\n * Controller constructor function. The controller is instantiated before the\n * pre-linking phase and it is shared with other directives (see\n * `require` attribute). This allows the directives to communicate with each other and augment\n * each other's behavior. The controller is injectable (and supports bracket notation) with the following locals:\n *\n * * `$scope` - Current scope associated with the element\n * * `$element` - Current element\n * * `$attrs` - Current attributes object for the element\n * * `$transclude` - A transclude linking function pre-bound to the correct transclusion scope.\n *    The scope can be overridden by an optional first argument.\n *   `function([scope], cloneLinkingFn)`.\n *\n *\n * #### `require`\n * Require another directive and inject its controller as the fourth argument to the linking function. The\n * `require` takes a string name (or array of strings) of the directive(s) to pass in. If an array is used, the\n * injected argument will be an array in corresponding order. If no such directive can be\n * found, or if the directive does not have a controller, then an error is raised. The name can be prefixed with:\n *\n * * (no prefix) - Locate the required controller on the current element. Throw an error if not found.\n * * `?` - Attempt to locate the required controller or pass `null` to the `link` fn if not found.\n * * `^` - Locate the required controller by searching the element's parents. Throw an error if not found.\n * * `?^` - Attempt to locate the required controller by searching the element's parents or pass `null` to the\n *   `link` fn if not found.\n *\n *\n * #### `controllerAs`\n * Controller alias at the directive scope. An alias for the controller so it\n * can be referenced at the directive template. The directive needs to define a scope for this\n * configuration to be used. Useful in the case when directive is used as component.\n *\n *\n * #### `restrict`\n * String of subset of `EACM` which restricts the directive to a specific directive\n * declaration style. If omitted, the default (attributes only) is used.\n *\n * * `E` - Element name: `<my-directive></my-directive>`\n * * `A` - Attribute (default): `<div my-directive=\"exp\"></div>`\n * * `C` - Class: `<div class=\"my-directive: exp;\"></div>`\n * * `M` - Comment: `<!-- directive: my-directive exp -->`\n *\n *\n * #### `template`\n * HTML markup that may:\n * * Replace the contents of the directive's element (defualt).\n * * Replace the directive's element itself (if `replace` is true - DEPRECATED).\n * * Wrap the contents of the directive's element (if `transclude` is true).\n *\n * Value may be:\n *\n * * A string. For example `<div red-on-hover>{{delete_str}}</div>`.\n * * A function which takes two arguments `tElement` and `tAttrs` (described in the `compile`\n *   function api below) and returns a string value.\n *\n *\n * #### `templateUrl`\n * Same as `template` but the template is loaded from the specified URL. Because\n * the template loading is asynchronous the compilation/linking is suspended until the template\n * is loaded.\n *\n * You can specify `templateUrl` as a string representing the URL or as a function which takes two\n * arguments `tElement` and `tAttrs` (described in the `compile` function api below) and returns\n * a string value representing the url.  In either case, the template URL is passed through {@link\n * api/ng.$sce#getTrustedResourceUrl $sce.getTrustedResourceUrl}.\n *\n *\n * #### `replace` ([*DEPRECATED*!], will be removed in next major release)\n * specify what the template should replace. Defaults to `false`.\n *\n * * `true` - the template will replace the directive's element.\n * * `false` - the template will replace the contents of the directive's element.\n *\n * The replacement process migrates all of the attributes / classes from the old element to the new\n * one. See the {@link guide/directive#creating-custom-directives_creating-directives_template-expanding-directive\n * Directives Guide} for an example.\n *\n * #### `transclude`\n * compile the content of the element and make it available to the directive.\n * Typically used with {@link ng.directive:ngTransclude\n * ngTransclude}. The advantage of transclusion is that the linking function receives a\n * transclusion function which is pre-bound to the correct scope. In a typical setup the widget\n * creates an `isolate` scope, but the transclusion is not a child, but a sibling of the `isolate`\n * scope. This makes it possible for the widget to have private state, and the transclusion to\n * be bound to the parent (pre-`isolate`) scope.\n *\n * * `true` - transclude the content of the directive.\n * * `'element'` - transclude the whole element including any directives defined at lower priority.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** When testing an element transclude directive you must not place the directive at the root of the\n * DOM fragment that is being compiled. See {@link guide/unit-testing#testing-transclusion-directives\n * Testing Transclusion Directives}.\n * </div>\n *\n * #### `compile`\n *\n * ```js\n *   function compile(tElement, tAttrs, transclude) { ... }\n * ```\n *\n * The compile function deals with transforming the template DOM. Since most directives do not do\n * template transformation, it is not used often. The compile function takes the following arguments:\n *\n *   * `tElement` - template element - The element where the directive has been declared. It is\n *     safe to do template transformation on the element and child elements only.\n *\n *   * `tAttrs` - template attributes - Normalized list of attributes declared on this element shared\n *     between all directive compile functions.\n *\n *   * `transclude` -  [*DEPRECATED*!] A transclude linking function: `function(scope, cloneLinkingFn)`\n *\n * <div class=\"alert alert-warning\">\n * **Note:** The template instance and the link instance may be different objects if the template has\n * been cloned. For this reason it is **not** safe to do anything other than DOM transformations that\n * apply to all cloned DOM nodes within the compile function. Specifically, DOM listener registration\n * should be done in a linking function rather than in a compile function.\n * </div>\n\n * <div class=\"alert alert-warning\">\n * **Note:** The compile function cannot handle directives that recursively use themselves in their\n * own templates or compile functions. Compiling these directives results in an infinite loop and a\n * stack overflow errors.\n *\n * This can be avoided by manually using $compile in the postLink function to imperatively compile\n * a directive's template instead of relying on automatic template compilation via `template` or\n * `templateUrl` declaration or manual compilation inside the compile function.\n * </div>\n *\n * <div class=\"alert alert-error\">\n * **Note:** The `transclude` function that is passed to the compile function is deprecated, as it\n *   e.g. does not know about the right outer scope. Please use the transclude function that is passed\n *   to the link function instead.\n * </div>\n\n * A compile function can have a return value which can be either a function or an object.\n *\n * * returning a (post-link) function - is equivalent to registering the linking function via the\n *   `link` property of the config object when the compile function is empty.\n *\n * * returning an object with function(s) registered via `pre` and `post` properties - allows you to\n *   control when a linking function should be called during the linking phase. See info about\n *   pre-linking and post-linking functions below.\n *\n *\n * #### `link`\n * This property is used only if the `compile` property is not defined.\n *\n * ```js\n *   function link(scope, iElement, iAttrs, controller, transcludeFn) { ... }\n * ```\n *\n * The link function is responsible for registering DOM listeners as well as updating the DOM. It is\n * executed after the template has been cloned. This is where most of the directive logic will be\n * put.\n *\n *   * `scope` - {@link ng.$rootScope.Scope Scope} - The scope to be used by the\n *     directive for registering {@link ng.$rootScope.Scope#$watch watches}.\n *\n *   * `iElement` - instance element - The element where the directive is to be used. It is safe to\n *     manipulate the children of the element only in `postLink` function since the children have\n *     already been linked.\n *\n *   * `iAttrs` - instance attributes - Normalized list of attributes declared on this element shared\n *     between all directive linking functions.\n *\n *   * `controller` - a controller instance - A controller instance if at least one directive on the\n *     element defines a controller. The controller is shared among all the directives, which allows\n *     the directives to use the controllers as a communication channel.\n *\n *   * `transcludeFn` - A transclude linking function pre-bound to the correct transclusion scope.\n *     The scope can be overridden by an optional first argument. This is the same as the `$transclude`\n *     parameter of directive controllers.\n *     `function([scope], cloneLinkingFn)`.\n *\n *\n * #### Pre-linking function\n *\n * Executed before the child elements are linked. Not safe to do DOM transformation since the\n * compiler linking function will fail to locate the correct elements for linking.\n *\n * #### Post-linking function\n *\n * Executed after the child elements are linked. It is safe to do DOM transformation in the post-linking function.\n *\n * <a name=\"Attributes\"></a>\n * ### Attributes\n *\n * The {@link ng.$compile.directive.Attributes Attributes} object - passed as a parameter in the\n * `link()` or `compile()` functions. It has a variety of uses.\n *\n * accessing *Normalized attribute names:*\n * Directives like 'ngBind' can be expressed in many ways: 'ng:bind', `data-ng-bind`, or 'x-ng-bind'.\n * the attributes object allows for normalized access to\n *   the attributes.\n *\n * * *Directive inter-communication:* All directives share the same instance of the attributes\n *   object which allows the directives to use the attributes object as inter directive\n *   communication.\n *\n * * *Supports interpolation:* Interpolation attributes are assigned to the attribute object\n *   allowing other directives to read the interpolated value.\n *\n * * *Observing interpolated attributes:* Use `$observe` to observe the value changes of attributes\n *   that contain interpolation (e.g. `src=\"{{bar}}\"`). Not only is this very efficient but it's also\n *   the only way to easily get the actual value because during the linking phase the interpolation\n *   hasn't been evaluated yet and so the value is at this time set to `undefined`.\n *\n * ```js\n * function linkingFn(scope, elm, attrs, ctrl) {\n *   // get the attribute value\n *   console.log(attrs.ngModel);\n *\n *   // change the attribute\n *   attrs.$set('ngModel', 'new value');\n *\n *   // observe changes to interpolated attribute\n *   attrs.$observe('ngModel', function(value) {\n *     console.log('ngModel has changed value to ' + value);\n *   });\n * }\n * ```\n *\n * Below is an example using `$compileProvider`.\n *\n * <div class=\"alert alert-warning\">\n * **Note**: Typically directives are registered with `module.directive`. The example below is\n * to illustrate how `$compile` works.\n * </div>\n *\n <example module=\"compileExample\">\n   <file name=\"index.html\">\n    <script>\n      angular.module('compileExample', [], function($compileProvider) {\n        // configure new 'compile' directive by passing a directive\n        // factory function. The factory function injects the '$compile'\n        $compileProvider.directive('compile', function($compile) {\n          // directive factory creates a link function\n          return function(scope, element, attrs) {\n            scope.$watch(\n              function(scope) {\n                 // watch the 'compile' expression for changes\n                return scope.$eval(attrs.compile);\n              },\n              function(value) {\n                // when the 'compile' expression changes\n                // assign it into the current DOM\n                element.html(value);\n\n                // compile the new DOM and link it to the current\n                // scope.\n                // NOTE: we only compile .childNodes so that\n                // we don't get into infinite loop compiling ourselves\n                $compile(element.contents())(scope);\n              }\n            );\n          };\n        });\n      })\n      .controller('GreeterController', ['$scope', function($scope) {\n        $scope.name = 'Angular';\n        $scope.html = 'Hello {{name}}';\n      }]);\n    </script>\n    <div ng-controller=\"GreeterController\">\n      <input ng-model=\"name\"> <br>\n      <textarea ng-model=\"html\"></textarea> <br>\n      <div compile=\"html\"></div>\n    </div>\n   </file>\n   <file name=\"protractor.js\" type=\"protractor\">\n     it('should auto compile', function() {\n       var textarea = $('textarea');\n       var output = $('div[compile]');\n       // The initial state reads 'Hello Angular'.\n       expect(output.getText()).toBe('Hello Angular');\n       textarea.clear();\n       textarea.sendKeys('{{name}}!');\n       expect(output.getText()).toBe('Angular!');\n     });\n   </file>\n </example>\n\n *\n *\n * @param {string|DOMElement} element Element or HTML string to compile into a template function.\n * @param {function(angular.Scope, cloneAttachFn=)} transclude function available to directives.\n * @param {number} maxPriority only apply directives lower than given priority (Only effects the\n *                 root element(s), not their children)\n * @returns {function(scope, cloneAttachFn=)} a link function which is used to bind template\n * (a DOM element/tree) to a scope. Where:\n *\n *  * `scope` - A {@link ng.$rootScope.Scope Scope} to bind to.\n *  * `cloneAttachFn` - If `cloneAttachFn` is provided, then the link function will clone the\n *  `template` and call the `cloneAttachFn` function allowing the caller to attach the\n *  cloned elements to the DOM document at the appropriate place. The `cloneAttachFn` is\n *  called as: <br> `cloneAttachFn(clonedElement, scope)` where:\n *\n *      * `clonedElement` - is a clone of the original `element` passed into the compiler.\n *      * `scope` - is the current scope with which the linking function is working with.\n *\n * Calling the linking function returns the element of the template. It is either the original\n * element passed in, or the clone of the element if the `cloneAttachFn` is provided.\n *\n * After linking the view is not updated until after a call to $digest which typically is done by\n * Angular automatically.\n *\n * If you need access to the bound view, there are two ways to do it:\n *\n * - If you are not asking the linking function to clone the template, create the DOM element(s)\n *   before you send them to the compiler and keep this reference around.\n *   ```js\n *     var element = $compile('<p>{{total}}</p>')(scope);\n *   ```\n *\n * - if on the other hand, you need the element to be cloned, the view reference from the original\n *   example would not point to the clone, but rather to the original template that was cloned. In\n *   this case, you can access the clone via the cloneAttachFn:\n *   ```js\n *     var templateElement = angular.element('<p>{{total}}</p>'),\n *         scope = ....;\n *\n *     var clonedElement = $compile(templateElement)(scope, function(clonedElement, scope) {\n *       //attach the clone to DOM document at the right place\n *     });\n *\n *     //now we have reference to the cloned DOM via `clonedElement`\n *   ```\n *\n *\n * For information on how the compiler works, see the\n * {@link guide/compiler Angular HTML Compiler} section of the Developer Guide.\n */\n\nvar $compileMinErr = minErr('$compile');\n\n/**\n * @ngdoc provider\n * @name $compileProvider\n * @kind function\n *\n * @description\n */\n$CompileProvider.$inject = ['$provide', '$$sanitizeUriProvider'];\nfunction $CompileProvider($provide, $$sanitizeUriProvider) {\n  var hasDirectives = {},\n      Suffix = 'Directive',\n      COMMENT_DIRECTIVE_REGEXP = /^\\s*directive\\:\\s*([\\d\\w_\\-]+)\\s+(.*)$/,\n      CLASS_DIRECTIVE_REGEXP = /(([\\d\\w_\\-]+)(?:\\:([^;]+))?;?)/;\n\n  // Ref: http://developers.whatwg.org/webappapis.html#event-handler-idl-attributes\n  // The assumption is that future DOM event attribute names will begin with\n  // 'on' and be composed of only English letters.\n  var EVENT_HANDLER_ATTR_REGEXP = /^(on[a-z]+|formaction)$/;\n\n  /**\n   * @ngdoc method\n   * @name $compileProvider#directive\n   * @kind function\n   *\n   * @description\n   * Register a new directive with the compiler.\n   *\n   * @param {string|Object} name Name of the directive in camel-case (i.e. <code>ngBind</code> which\n   *    will match as <code>ng-bind</code>), or an object map of directives where the keys are the\n   *    names and the values are the factories.\n   * @param {Function|Array} directiveFactory An injectable directive factory function. See\n   *    {@link guide/directive} for more info.\n   * @returns {ng.$compileProvider} Self for chaining.\n   */\n   this.directive = function registerDirective(name, directiveFactory) {\n    assertNotHasOwnProperty(name, 'directive');\n    if (isString(name)) {\n      assertArg(directiveFactory, 'directiveFactory');\n      if (!hasDirectives.hasOwnProperty(name)) {\n        hasDirectives[name] = [];\n        $provide.factory(name + Suffix, ['$injector', '$exceptionHandler',\n          function($injector, $exceptionHandler) {\n            var directives = [];\n            forEach(hasDirectives[name], function(directiveFactory, index) {\n              try {\n                var directive = $injector.invoke(directiveFactory);\n                if (isFunction(directive)) {\n                  directive = { compile: valueFn(directive) };\n                } else if (!directive.compile && directive.link) {\n                  directive.compile = valueFn(directive.link);\n                }\n                directive.priority = directive.priority || 0;\n                directive.index = index;\n                directive.name = directive.name || name;\n                directive.require = directive.require || (directive.controller && directive.name);\n                directive.restrict = directive.restrict || 'A';\n                directives.push(directive);\n              } catch (e) {\n                $exceptionHandler(e);\n              }\n            });\n            return directives;\n          }]);\n      }\n      hasDirectives[name].push(directiveFactory);\n    } else {\n      forEach(name, reverseParams(registerDirective));\n    }\n    return this;\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $compileProvider#aHrefSanitizationWhitelist\n   * @kind function\n   *\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during a[href] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.aHrefSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      $$sanitizeUriProvider.aHrefSanitizationWhitelist(regexp);\n      return this;\n    } else {\n      return $$sanitizeUriProvider.aHrefSanitizationWhitelist();\n    }\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $compileProvider#imgSrcSanitizationWhitelist\n   * @kind function\n   *\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during img[src] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.imgSrcSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      $$sanitizeUriProvider.imgSrcSanitizationWhitelist(regexp);\n      return this;\n    } else {\n      return $$sanitizeUriProvider.imgSrcSanitizationWhitelist();\n    }\n  };\n\n  this.$get = [\n            '$injector', '$interpolate', '$exceptionHandler', '$http', '$templateCache', '$parse',\n            '$controller', '$rootScope', '$document', '$sce', '$animate', '$$sanitizeUri',\n    function($injector,   $interpolate,   $exceptionHandler,   $http,   $templateCache,   $parse,\n             $controller,   $rootScope,   $document,   $sce,   $animate,   $$sanitizeUri) {\n\n    var Attributes = function(element, attr) {\n      this.$$element = element;\n      this.$attr = attr || {};\n    };\n\n    Attributes.prototype = {\n      $normalize: directiveNormalize,\n\n\n      /**\n       * @ngdoc method\n       * @name $compile.directive.Attributes#$addClass\n       * @kind function\n       *\n       * @description\n       * Adds the CSS class value specified by the classVal parameter to the element. If animations\n       * are enabled then an animation will be triggered for the class addition.\n       *\n       * @param {string} classVal The className value that will be added to the element\n       */\n      $addClass : function(classVal) {\n        if(classVal && classVal.length > 0) {\n          $animate.addClass(this.$$element, classVal);\n        }\n      },\n\n      /**\n       * @ngdoc method\n       * @name $compile.directive.Attributes#$removeClass\n       * @kind function\n       *\n       * @description\n       * Removes the CSS class value specified by the classVal parameter from the element. If\n       * animations are enabled then an animation will be triggered for the class removal.\n       *\n       * @param {string} classVal The className value that will be removed from the element\n       */\n      $removeClass : function(classVal) {\n        if(classVal && classVal.length > 0) {\n          $animate.removeClass(this.$$element, classVal);\n        }\n      },\n\n      /**\n       * @ngdoc method\n       * @name $compile.directive.Attributes#$updateClass\n       * @kind function\n       *\n       * @description\n       * Adds and removes the appropriate CSS class values to the element based on the difference\n       * between the new and old CSS class values (specified as newClasses and oldClasses).\n       *\n       * @param {string} newClasses The current CSS className value\n       * @param {string} oldClasses The former CSS className value\n       */\n      $updateClass : function(newClasses, oldClasses) {\n        var toAdd = tokenDifference(newClasses, oldClasses);\n        var toRemove = tokenDifference(oldClasses, newClasses);\n\n        if(toAdd.length === 0) {\n          $animate.removeClass(this.$$element, toRemove);\n        } else if(toRemove.length === 0) {\n          $animate.addClass(this.$$element, toAdd);\n        } else {\n          $animate.setClass(this.$$element, toAdd, toRemove);\n        }\n      },\n\n      /**\n       * Set a normalized attribute on the element in a way such that all directives\n       * can share the attribute. This function properly handles boolean attributes.\n       * @param {string} key Normalized key. (ie ngAttribute)\n       * @param {string|boolean} value The value to set. If `null` attribute will be deleted.\n       * @param {boolean=} writeAttr If false, does not write the value to DOM element attribute.\n       *     Defaults to true.\n       * @param {string=} attrName Optional none normalized name. Defaults to key.\n       */\n      $set: function(key, value, writeAttr, attrName) {\n        // TODO: decide whether or not to throw an error if \"class\"\n        //is set through this function since it may cause $updateClass to\n        //become unstable.\n\n        var booleanKey = getBooleanAttrName(this.$$element[0], key),\n            normalizedVal,\n            nodeName;\n\n        if (booleanKey) {\n          this.$$element.prop(key, value);\n          attrName = booleanKey;\n        }\n\n        this[key] = value;\n\n        // translate normalized key to actual key\n        if (attrName) {\n          this.$attr[key] = attrName;\n        } else {\n          attrName = this.$attr[key];\n          if (!attrName) {\n            this.$attr[key] = attrName = snake_case(key, '-');\n          }\n        }\n\n        nodeName = nodeName_(this.$$element);\n\n        // sanitize a[href] and img[src] values\n        if ((nodeName === 'A' && key === 'href') ||\n            (nodeName === 'IMG' && key === 'src')) {\n          this[key] = value = $$sanitizeUri(value, key === 'src');\n        }\n\n        if (writeAttr !== false) {\n          if (value === null || value === undefined) {\n            this.$$element.removeAttr(attrName);\n          } else {\n            this.$$element.attr(attrName, value);\n          }\n        }\n\n        // fire observers\n        var $$observers = this.$$observers;\n        $$observers && forEach($$observers[key], function(fn) {\n          try {\n            fn(value);\n          } catch (e) {\n            $exceptionHandler(e);\n          }\n        });\n      },\n\n\n      /**\n       * @ngdoc method\n       * @name $compile.directive.Attributes#$observe\n       * @kind function\n       *\n       * @description\n       * Observes an interpolated attribute.\n       *\n       * The observer function will be invoked once during the next `$digest` following\n       * compilation. The observer is then invoked whenever the interpolated value\n       * changes.\n       *\n       * @param {string} key Normalized key. (ie ngAttribute) .\n       * @param {function(interpolatedValue)} fn Function that will be called whenever\n                the interpolated value of the attribute changes.\n       *        See the {@link guide/directive#Attributes Directives} guide for more info.\n       * @returns {function()} the `fn` parameter.\n       */\n      $observe: function(key, fn) {\n        var attrs = this,\n            $$observers = (attrs.$$observers || (attrs.$$observers = {})),\n            listeners = ($$observers[key] || ($$observers[key] = []));\n\n        listeners.push(fn);\n        $rootScope.$evalAsync(function() {\n          if (!listeners.$$inter) {\n            // no one registered attribute interpolation function, so lets call it manually\n            fn(attrs[key]);\n          }\n        });\n        return fn;\n      }\n    };\n\n    var startSymbol = $interpolate.startSymbol(),\n        endSymbol = $interpolate.endSymbol(),\n        denormalizeTemplate = (startSymbol == '{{' || endSymbol  == '}}')\n            ? identity\n            : function denormalizeTemplate(template) {\n              return template.replace(/\\{\\{/g, startSymbol).replace(/}}/g, endSymbol);\n        },\n        NG_ATTR_BINDING = /^ngAttr[A-Z]/;\n\n\n    return compile;\n\n    //================================\n\n    function compile($compileNodes, transcludeFn, maxPriority, ignoreDirective,\n                        previousCompileContext) {\n      if (!($compileNodes instanceof jqLite)) {\n        // jquery always rewraps, whereas we need to preserve the original selector so that we can\n        // modify it.\n        $compileNodes = jqLite($compileNodes);\n      }\n      // We can not compile top level text elements since text nodes can be merged and we will\n      // not be able to attach scope data to them, so we will wrap them in <span>\n      forEach($compileNodes, function(node, index){\n        if (node.nodeType == 3 /* text node */ && node.nodeValue.match(/\\S+/) /* non-empty */ ) {\n          $compileNodes[index] = node = jqLite(node).wrap('<span></span>').parent()[0];\n        }\n      });\n      var compositeLinkFn =\n              compileNodes($compileNodes, transcludeFn, $compileNodes,\n                           maxPriority, ignoreDirective, previousCompileContext);\n      safeAddClass($compileNodes, 'ng-scope');\n      return function publicLinkFn(scope, cloneConnectFn, transcludeControllers, parentBoundTranscludeFn){\n        assertArg(scope, 'scope');\n        // important!!: we must call our jqLite.clone() since the jQuery one is trying to be smart\n        // and sometimes changes the structure of the DOM.\n        var $linkNode = cloneConnectFn\n          ? JQLitePrototype.clone.call($compileNodes) // IMPORTANT!!!\n          : $compileNodes;\n\n        forEach(transcludeControllers, function(instance, name) {\n          $linkNode.data('$' + name + 'Controller', instance);\n        });\n\n        // Attach scope only to non-text nodes.\n        for(var i = 0, ii = $linkNode.length; i<ii; i++) {\n          var node = $linkNode[i],\n              nodeType = node.nodeType;\n          if (nodeType === 1 /* element */ || nodeType === 9 /* document */) {\n            $linkNode.eq(i).data('$scope', scope);\n          }\n        }\n\n        if (cloneConnectFn) cloneConnectFn($linkNode, scope);\n        if (compositeLinkFn) compositeLinkFn(scope, $linkNode, $linkNode, parentBoundTranscludeFn);\n        return $linkNode;\n      };\n    }\n\n    function safeAddClass($element, className) {\n      try {\n        $element.addClass(className);\n      } catch(e) {\n        // ignore, since it means that we are trying to set class on\n        // SVG element, where class name is read-only.\n      }\n    }\n\n    /**\n     * Compile function matches each node in nodeList against the directives. Once all directives\n     * for a particular node are collected their compile functions are executed. The compile\n     * functions return values - the linking functions - are combined into a composite linking\n     * function, which is the a linking function for the node.\n     *\n     * @param {NodeList} nodeList an array of nodes or NodeList to compile\n     * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n     *        scope argument is auto-generated to the new child of the transcluded parent scope.\n     * @param {DOMElement=} $rootElement If the nodeList is the root of the compilation tree then\n     *        the rootElement must be set the jqLite collection of the compile root. This is\n     *        needed so that the jqLite collection items can be replaced with widgets.\n     * @param {number=} maxPriority Max directive priority.\n     * @returns {Function} A composite linking function of all of the matched directives or null.\n     */\n    function compileNodes(nodeList, transcludeFn, $rootElement, maxPriority, ignoreDirective,\n                            previousCompileContext) {\n      var linkFns = [],\n          attrs, directives, nodeLinkFn, childNodes, childLinkFn, linkFnFound;\n\n      for (var i = 0; i < nodeList.length; i++) {\n        attrs = new Attributes();\n\n        // we must always refer to nodeList[i] since the nodes can be replaced underneath us.\n        directives = collectDirectives(nodeList[i], [], attrs, i === 0 ? maxPriority : undefined,\n                                        ignoreDirective);\n\n        nodeLinkFn = (directives.length)\n            ? applyDirectivesToNode(directives, nodeList[i], attrs, transcludeFn, $rootElement,\n                                      null, [], [], previousCompileContext)\n            : null;\n\n        if (nodeLinkFn && nodeLinkFn.scope) {\n          safeAddClass(attrs.$$element, 'ng-scope');\n        }\n\n        childLinkFn = (nodeLinkFn && nodeLinkFn.terminal ||\n                      !(childNodes = nodeList[i].childNodes) ||\n                      !childNodes.length)\n            ? null\n            : compileNodes(childNodes,\n                 nodeLinkFn ? (\n                  (nodeLinkFn.transcludeOnThisElement || !nodeLinkFn.templateOnThisElement)\n                     && nodeLinkFn.transclude) : transcludeFn);\n\n        linkFns.push(nodeLinkFn, childLinkFn);\n        linkFnFound = linkFnFound || nodeLinkFn || childLinkFn;\n        //use the previous context only for the first element in the virtual group\n        previousCompileContext = null;\n      }\n\n      // return a linking function if we have found anything, null otherwise\n      return linkFnFound ? compositeLinkFn : null;\n\n      function compositeLinkFn(scope, nodeList, $rootElement, parentBoundTranscludeFn) {\n        var nodeLinkFn, childLinkFn, node, childScope, i, ii, n, childBoundTranscludeFn;\n\n        // copy nodeList so that linking doesn't break due to live list updates.\n        var nodeListLength = nodeList.length,\n            stableNodeList = new Array(nodeListLength);\n        for (i = 0; i < nodeListLength; i++) {\n          stableNodeList[i] = nodeList[i];\n        }\n\n        for(i = 0, n = 0, ii = linkFns.length; i < ii; n++) {\n          node = stableNodeList[n];\n          nodeLinkFn = linkFns[i++];\n          childLinkFn = linkFns[i++];\n\n          if (nodeLinkFn) {\n            if (nodeLinkFn.scope) {\n              childScope = scope.$new();\n              jqLite.data(node, '$scope', childScope);\n            } else {\n              childScope = scope;\n            }\n\n            if ( nodeLinkFn.transcludeOnThisElement ) {\n              childBoundTranscludeFn = createBoundTranscludeFn(scope, nodeLinkFn.transclude, parentBoundTranscludeFn);\n\n            } else if (!nodeLinkFn.templateOnThisElement && parentBoundTranscludeFn) {\n              childBoundTranscludeFn = parentBoundTranscludeFn;\n\n            } else if (!parentBoundTranscludeFn && transcludeFn) {\n              childBoundTranscludeFn = createBoundTranscludeFn(scope, transcludeFn);\n\n            } else {\n              childBoundTranscludeFn = null;\n            }\n\n            nodeLinkFn(childLinkFn, childScope, node, $rootElement, childBoundTranscludeFn);\n\n          } else if (childLinkFn) {\n            childLinkFn(scope, node.childNodes, undefined, parentBoundTranscludeFn);\n          }\n        }\n      }\n    }\n\n    function createBoundTranscludeFn(scope, transcludeFn, previousBoundTranscludeFn) {\n\n      var boundTranscludeFn = function(transcludedScope, cloneFn, controllers) {\n        var scopeCreated = false;\n\n        if (!transcludedScope) {\n          transcludedScope = scope.$new();\n          transcludedScope.$$transcluded = true;\n          scopeCreated = true;\n        }\n\n        var clone = transcludeFn(transcludedScope, cloneFn, controllers, previousBoundTranscludeFn);\n        if (scopeCreated) {\n          clone.on('$destroy', function() { transcludedScope.$destroy(); });\n        }\n        return clone;\n      };\n\n      return boundTranscludeFn;\n    }\n\n    /**\n     * Looks for directives on the given node and adds them to the directive collection which is\n     * sorted.\n     *\n     * @param node Node to search.\n     * @param directives An array to which the directives are added to. This array is sorted before\n     *        the function returns.\n     * @param attrs The shared attrs object which is used to populate the normalized attributes.\n     * @param {number=} maxPriority Max directive priority.\n     */\n    function collectDirectives(node, directives, attrs, maxPriority, ignoreDirective) {\n      var nodeType = node.nodeType,\n          attrsMap = attrs.$attr,\n          match,\n          className;\n\n      switch(nodeType) {\n        case 1: /* Element */\n          // use the node name: <directive>\n          addDirective(directives,\n              directiveNormalize(nodeName_(node).toLowerCase()), 'E', maxPriority, ignoreDirective);\n\n          // iterate over the attributes\n          for (var attr, name, nName, ngAttrName, value, isNgAttr, nAttrs = node.attributes,\n                   j = 0, jj = nAttrs && nAttrs.length; j < jj; j++) {\n            var attrStartName = false;\n            var attrEndName = false;\n\n            attr = nAttrs[j];\n            if (!msie || msie >= 8 || attr.specified) {\n              name = attr.name;\n              value = trim(attr.value);\n\n              // support ngAttr attribute binding\n              ngAttrName = directiveNormalize(name);\n              if (isNgAttr = NG_ATTR_BINDING.test(ngAttrName)) {\n                name = snake_case(ngAttrName.substr(6), '-');\n              }\n\n              var directiveNName = ngAttrName.replace(/(Start|End)$/, '');\n              if (ngAttrName === directiveNName + 'Start') {\n                attrStartName = name;\n                attrEndName = name.substr(0, name.length - 5) + 'end';\n                name = name.substr(0, name.length - 6);\n              }\n\n              nName = directiveNormalize(name.toLowerCase());\n              attrsMap[nName] = name;\n              if (isNgAttr || !attrs.hasOwnProperty(nName)) {\n                  attrs[nName] = value;\n                  if (getBooleanAttrName(node, nName)) {\n                    attrs[nName] = true; // presence means true\n                  }\n              }\n              addAttrInterpolateDirective(node, directives, value, nName);\n              addDirective(directives, nName, 'A', maxPriority, ignoreDirective, attrStartName,\n                            attrEndName);\n            }\n          }\n\n          // use class as directive\n          className = node.className;\n          if (isString(className) && className !== '') {\n            while (match = CLASS_DIRECTIVE_REGEXP.exec(className)) {\n              nName = directiveNormalize(match[2]);\n              if (addDirective(directives, nName, 'C', maxPriority, ignoreDirective)) {\n                attrs[nName] = trim(match[3]);\n              }\n              className = className.substr(match.index + match[0].length);\n            }\n          }\n          break;\n        case 3: /* Text Node */\n          addTextInterpolateDirective(directives, node.nodeValue);\n          break;\n        case 8: /* Comment */\n          try {\n            match = COMMENT_DIRECTIVE_REGEXP.exec(node.nodeValue);\n            if (match) {\n              nName = directiveNormalize(match[1]);\n              if (addDirective(directives, nName, 'M', maxPriority, ignoreDirective)) {\n                attrs[nName] = trim(match[2]);\n              }\n            }\n          } catch (e) {\n            // turns out that under some circumstances IE9 throws errors when one attempts to read\n            // comment's node value.\n            // Just ignore it and continue. (Can't seem to reproduce in test case.)\n          }\n          break;\n      }\n\n      directives.sort(byPriority);\n      return directives;\n    }\n\n    /**\n     * Given a node with an directive-start it collects all of the siblings until it finds\n     * directive-end.\n     * @param node\n     * @param attrStart\n     * @param attrEnd\n     * @returns {*}\n     */\n    function groupScan(node, attrStart, attrEnd) {\n      var nodes = [];\n      var depth = 0;\n      if (attrStart && node.hasAttribute && node.hasAttribute(attrStart)) {\n        var startNode = node;\n        do {\n          if (!node) {\n            throw $compileMinErr('uterdir',\n                      \"Unterminated attribute, found '{0}' but no matching '{1}' found.\",\n                      attrStart, attrEnd);\n          }\n          if (node.nodeType == 1 /** Element **/) {\n            if (node.hasAttribute(attrStart)) depth++;\n            if (node.hasAttribute(attrEnd)) depth--;\n          }\n          nodes.push(node);\n          node = node.nextSibling;\n        } while (depth > 0);\n      } else {\n        nodes.push(node);\n      }\n\n      return jqLite(nodes);\n    }\n\n    /**\n     * Wrapper for linking function which converts normal linking function into a grouped\n     * linking function.\n     * @param linkFn\n     * @param attrStart\n     * @param attrEnd\n     * @returns {Function}\n     */\n    function groupElementsLinkFnWrapper(linkFn, attrStart, attrEnd) {\n      return function(scope, element, attrs, controllers, transcludeFn) {\n        element = groupScan(element[0], attrStart, attrEnd);\n        return linkFn(scope, element, attrs, controllers, transcludeFn);\n      };\n    }\n\n    /**\n     * Once the directives have been collected, their compile functions are executed. This method\n     * is responsible for inlining directive templates as well as terminating the application\n     * of the directives if the terminal directive has been reached.\n     *\n     * @param {Array} directives Array of collected directives to execute their compile function.\n     *        this needs to be pre-sorted by priority order.\n     * @param {Node} compileNode The raw DOM node to apply the compile functions to\n     * @param {Object} templateAttrs The shared attribute function\n     * @param {function(angular.Scope, cloneAttachFn=)} transcludeFn A linking function, where the\n     *                                                  scope argument is auto-generated to the new\n     *                                                  child of the transcluded parent scope.\n     * @param {JQLite} jqCollection If we are working on the root of the compile tree then this\n     *                              argument has the root jqLite array so that we can replace nodes\n     *                              on it.\n     * @param {Object=} originalReplaceDirective An optional directive that will be ignored when\n     *                                           compiling the transclusion.\n     * @param {Array.<Function>} preLinkFns\n     * @param {Array.<Function>} postLinkFns\n     * @param {Object} previousCompileContext Context used for previous compilation of the current\n     *                                        node\n     * @returns {Function} linkFn\n     */\n    function applyDirectivesToNode(directives, compileNode, templateAttrs, transcludeFn,\n                                   jqCollection, originalReplaceDirective, preLinkFns, postLinkFns,\n                                   previousCompileContext) {\n      previousCompileContext = previousCompileContext || {};\n\n      var terminalPriority = -Number.MAX_VALUE,\n          newScopeDirective,\n          controllerDirectives = previousCompileContext.controllerDirectives,\n          newIsolateScopeDirective = previousCompileContext.newIsolateScopeDirective,\n          templateDirective = previousCompileContext.templateDirective,\n          nonTlbTranscludeDirective = previousCompileContext.nonTlbTranscludeDirective,\n          hasTranscludeDirective = false,\n          hasTemplate = false,\n          hasElementTranscludeDirective = previousCompileContext.hasElementTranscludeDirective,\n          $compileNode = templateAttrs.$$element = jqLite(compileNode),\n          directive,\n          directiveName,\n          $template,\n          replaceDirective = originalReplaceDirective,\n          childTranscludeFn = transcludeFn,\n          linkFn,\n          directiveValue;\n\n      // executes all directives on the current element\n      for(var i = 0, ii = directives.length; i < ii; i++) {\n        directive = directives[i];\n        var attrStart = directive.$$start;\n        var attrEnd = directive.$$end;\n\n        // collect multiblock sections\n        if (attrStart) {\n          $compileNode = groupScan(compileNode, attrStart, attrEnd);\n        }\n        $template = undefined;\n\n        if (terminalPriority > directive.priority) {\n          break; // prevent further processing of directives\n        }\n\n        if (directiveValue = directive.scope) {\n          newScopeDirective = newScopeDirective || directive;\n\n          // skip the check for directives with async templates, we'll check the derived sync\n          // directive when the template arrives\n          if (!directive.templateUrl) {\n            assertNoDuplicate('new/isolated scope', newIsolateScopeDirective, directive,\n                              $compileNode);\n            if (isObject(directiveValue)) {\n              newIsolateScopeDirective = directive;\n            }\n          }\n        }\n\n        directiveName = directive.name;\n\n        if (!directive.templateUrl && directive.controller) {\n          directiveValue = directive.controller;\n          controllerDirectives = controllerDirectives || {};\n          assertNoDuplicate(\"'\" + directiveName + \"' controller\",\n              controllerDirectives[directiveName], directive, $compileNode);\n          controllerDirectives[directiveName] = directive;\n        }\n\n        if (directiveValue = directive.transclude) {\n          hasTranscludeDirective = true;\n\n          // Special case ngIf and ngRepeat so that we don't complain about duplicate transclusion.\n          // This option should only be used by directives that know how to safely handle element transclusion,\n          // where the transcluded nodes are added or replaced after linking.\n          if (!directive.$$tlb) {\n            assertNoDuplicate('transclusion', nonTlbTranscludeDirective, directive, $compileNode);\n            nonTlbTranscludeDirective = directive;\n          }\n\n          if (directiveValue == 'element') {\n            hasElementTranscludeDirective = true;\n            terminalPriority = directive.priority;\n            $template = $compileNode;\n            $compileNode = templateAttrs.$$element =\n                jqLite(document.createComment(' ' + directiveName + ': ' +\n                                              templateAttrs[directiveName] + ' '));\n            compileNode = $compileNode[0];\n            replaceWith(jqCollection, sliceArgs($template), compileNode);\n\n            childTranscludeFn = compile($template, transcludeFn, terminalPriority,\n                                        replaceDirective && replaceDirective.name, {\n                                          // Don't pass in:\n                                          // - controllerDirectives - otherwise we'll create duplicates controllers\n                                          // - newIsolateScopeDirective or templateDirective - combining templates with\n                                          //   element transclusion doesn't make sense.\n                                          //\n                                          // We need only nonTlbTranscludeDirective so that we prevent putting transclusion\n                                          // on the same element more than once.\n                                          nonTlbTranscludeDirective: nonTlbTranscludeDirective\n                                        });\n          } else {\n            $template = jqLite(jqLiteClone(compileNode)).contents();\n            $compileNode.empty(); // clear contents\n            childTranscludeFn = compile($template, transcludeFn);\n          }\n        }\n\n        if (directive.template) {\n          hasTemplate = true;\n          assertNoDuplicate('template', templateDirective, directive, $compileNode);\n          templateDirective = directive;\n\n          directiveValue = (isFunction(directive.template))\n              ? directive.template($compileNode, templateAttrs)\n              : directive.template;\n\n          directiveValue = denormalizeTemplate(directiveValue);\n\n          if (directive.replace) {\n            replaceDirective = directive;\n            if (jqLiteIsTextNode(directiveValue)) {\n              $template = [];\n            } else {\n              $template = jqLite(trim(directiveValue));\n            }\n            compileNode = $template[0];\n\n            if ($template.length != 1 || compileNode.nodeType !== 1) {\n              throw $compileMinErr('tplrt',\n                  \"Template for directive '{0}' must have exactly one root element. {1}\",\n                  directiveName, '');\n            }\n\n            replaceWith(jqCollection, $compileNode, compileNode);\n\n            var newTemplateAttrs = {$attr: {}};\n\n            // combine directives from the original node and from the template:\n            // - take the array of directives for this element\n            // - split it into two parts, those that already applied (processed) and those that weren't (unprocessed)\n            // - collect directives from the template and sort them by priority\n            // - combine directives as: processed + template + unprocessed\n            var templateDirectives = collectDirectives(compileNode, [], newTemplateAttrs);\n            var unprocessedDirectives = directives.splice(i + 1, directives.length - (i + 1));\n\n            if (newIsolateScopeDirective) {\n              markDirectivesAsIsolate(templateDirectives);\n            }\n            directives = directives.concat(templateDirectives).concat(unprocessedDirectives);\n            mergeTemplateAttributes(templateAttrs, newTemplateAttrs);\n\n            ii = directives.length;\n          } else {\n            $compileNode.html(directiveValue);\n          }\n        }\n\n        if (directive.templateUrl) {\n          hasTemplate = true;\n          assertNoDuplicate('template', templateDirective, directive, $compileNode);\n          templateDirective = directive;\n\n          if (directive.replace) {\n            replaceDirective = directive;\n          }\n\n          nodeLinkFn = compileTemplateUrl(directives.splice(i, directives.length - i), $compileNode,\n              templateAttrs, jqCollection, hasTranscludeDirective && childTranscludeFn, preLinkFns, postLinkFns, {\n                controllerDirectives: controllerDirectives,\n                newIsolateScopeDirective: newIsolateScopeDirective,\n                templateDirective: templateDirective,\n                nonTlbTranscludeDirective: nonTlbTranscludeDirective\n              });\n          ii = directives.length;\n        } else if (directive.compile) {\n          try {\n            linkFn = directive.compile($compileNode, templateAttrs, childTranscludeFn);\n            if (isFunction(linkFn)) {\n              addLinkFns(null, linkFn, attrStart, attrEnd);\n            } else if (linkFn) {\n              addLinkFns(linkFn.pre, linkFn.post, attrStart, attrEnd);\n            }\n          } catch (e) {\n            $exceptionHandler(e, startingTag($compileNode));\n          }\n        }\n\n        if (directive.terminal) {\n          nodeLinkFn.terminal = true;\n          terminalPriority = Math.max(terminalPriority, directive.priority);\n        }\n\n      }\n\n      nodeLinkFn.scope = newScopeDirective && newScopeDirective.scope === true;\n      nodeLinkFn.transcludeOnThisElement = hasTranscludeDirective;\n      nodeLinkFn.templateOnThisElement = hasTemplate;\n      nodeLinkFn.transclude = childTranscludeFn;\n\n      previousCompileContext.hasElementTranscludeDirective = hasElementTranscludeDirective;\n\n      // might be normal or delayed nodeLinkFn depending on if templateUrl is present\n      return nodeLinkFn;\n\n      ////////////////////\n\n      function addLinkFns(pre, post, attrStart, attrEnd) {\n        if (pre) {\n          if (attrStart) pre = groupElementsLinkFnWrapper(pre, attrStart, attrEnd);\n          pre.require = directive.require;\n          pre.directiveName = directiveName;\n          if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n            pre = cloneAndAnnotateFn(pre, {isolateScope: true});\n          }\n          preLinkFns.push(pre);\n        }\n        if (post) {\n          if (attrStart) post = groupElementsLinkFnWrapper(post, attrStart, attrEnd);\n          post.require = directive.require;\n          post.directiveName = directiveName;\n          if (newIsolateScopeDirective === directive || directive.$$isolateScope) {\n            post = cloneAndAnnotateFn(post, {isolateScope: true});\n          }\n          postLinkFns.push(post);\n        }\n      }\n\n\n      function getControllers(directiveName, require, $element, elementControllers) {\n        var value, retrievalMethod = 'data', optional = false;\n        if (isString(require)) {\n          while((value = require.charAt(0)) == '^' || value == '?') {\n            require = require.substr(1);\n            if (value == '^') {\n              retrievalMethod = 'inheritedData';\n            }\n            optional = optional || value == '?';\n          }\n          value = null;\n\n          if (elementControllers && retrievalMethod === 'data') {\n            value = elementControllers[require];\n          }\n          value = value || $element[retrievalMethod]('$' + require + 'Controller');\n\n          if (!value && !optional) {\n            throw $compileMinErr('ctreq',\n                \"Controller '{0}', required by directive '{1}', can't be found!\",\n                require, directiveName);\n          }\n          return value;\n        } else if (isArray(require)) {\n          value = [];\n          forEach(require, function(require) {\n            value.push(getControllers(directiveName, require, $element, elementControllers));\n          });\n        }\n        return value;\n      }\n\n\n      function nodeLinkFn(childLinkFn, scope, linkNode, $rootElement, boundTranscludeFn) {\n        var attrs, $element, i, ii, linkFn, controller, isolateScope, elementControllers = {}, transcludeFn;\n\n        attrs = (compileNode === linkNode)\n          ? templateAttrs\n          : shallowCopy(templateAttrs, new Attributes(jqLite(linkNode), templateAttrs.$attr));\n        $element = attrs.$$element;\n\n        if (newIsolateScopeDirective) {\n          var LOCAL_REGEXP = /^\\s*([@=&])(\\??)\\s*(\\w*)\\s*$/;\n\n          isolateScope = scope.$new(true);\n\n          if (templateDirective && (templateDirective === newIsolateScopeDirective ||\n              templateDirective === newIsolateScopeDirective.$$originalDirective)) {\n            $element.data('$isolateScope', isolateScope);\n          } else {\n            $element.data('$isolateScopeNoTemplate', isolateScope);\n          }\n\n\n\n          safeAddClass($element, 'ng-isolate-scope');\n\n          forEach(newIsolateScopeDirective.scope, function(definition, scopeName) {\n            var match = definition.match(LOCAL_REGEXP) || [],\n                attrName = match[3] || scopeName,\n                optional = (match[2] == '?'),\n                mode = match[1], // @, =, or &\n                lastValue,\n                parentGet, parentSet, compare;\n\n            isolateScope.$$isolateBindings[scopeName] = mode + attrName;\n\n            switch (mode) {\n\n              case '@':\n                attrs.$observe(attrName, function(value) {\n                  isolateScope[scopeName] = value;\n                });\n                attrs.$$observers[attrName].$$scope = scope;\n                if( attrs[attrName] ) {\n                  // If the attribute has been provided then we trigger an interpolation to ensure\n                  // the value is there for use in the link fn\n                  isolateScope[scopeName] = $interpolate(attrs[attrName])(scope);\n                }\n                break;\n\n              case '=':\n                if (optional && !attrs[attrName]) {\n                  return;\n                }\n                parentGet = $parse(attrs[attrName]);\n                if (parentGet.literal) {\n                  compare = equals;\n                } else {\n                  compare = function(a,b) { return a === b; };\n                }\n                parentSet = parentGet.assign || function() {\n                  // reset the change, or we will throw this exception on every $digest\n                  lastValue = isolateScope[scopeName] = parentGet(scope);\n                  throw $compileMinErr('nonassign',\n                      \"Expression '{0}' used with directive '{1}' is non-assignable!\",\n                      attrs[attrName], newIsolateScopeDirective.name);\n                };\n                lastValue = isolateScope[scopeName] = parentGet(scope);\n                isolateScope.$watch(function parentValueWatch() {\n                  var parentValue = parentGet(scope);\n                  if (!compare(parentValue, isolateScope[scopeName])) {\n                    // we are out of sync and need to copy\n                    if (!compare(parentValue, lastValue)) {\n                      // parent changed and it has precedence\n                      isolateScope[scopeName] = parentValue;\n                    } else {\n                      // if the parent can be assigned then do so\n                      parentSet(scope, parentValue = isolateScope[scopeName]);\n                    }\n                  }\n                  return lastValue = parentValue;\n                }, null, parentGet.literal);\n                break;\n\n              case '&':\n                parentGet = $parse(attrs[attrName]);\n                isolateScope[scopeName] = function(locals) {\n                  return parentGet(scope, locals);\n                };\n                break;\n\n              default:\n                throw $compileMinErr('iscp',\n                    \"Invalid isolate scope definition for directive '{0}'.\" +\n                    \" Definition: {... {1}: '{2}' ...}\",\n                    newIsolateScopeDirective.name, scopeName, definition);\n            }\n          });\n        }\n        transcludeFn = boundTranscludeFn && controllersBoundTransclude;\n        if (controllerDirectives) {\n          forEach(controllerDirectives, function(directive) {\n            var locals = {\n              $scope: directive === newIsolateScopeDirective || directive.$$isolateScope ? isolateScope : scope,\n              $element: $element,\n              $attrs: attrs,\n              $transclude: transcludeFn\n            }, controllerInstance;\n\n            controller = directive.controller;\n            if (controller == '@') {\n              controller = attrs[directive.name];\n            }\n\n            controllerInstance = $controller(controller, locals);\n            // For directives with element transclusion the element is a comment,\n            // but jQuery .data doesn't support attaching data to comment nodes as it's hard to\n            // clean up (http://bugs.jquery.com/ticket/8335).\n            // Instead, we save the controllers for the element in a local hash and attach to .data\n            // later, once we have the actual element.\n            elementControllers[directive.name] = controllerInstance;\n            if (!hasElementTranscludeDirective) {\n              $element.data('$' + directive.name + 'Controller', controllerInstance);\n            }\n\n            if (directive.controllerAs) {\n              locals.$scope[directive.controllerAs] = controllerInstance;\n            }\n          });\n        }\n\n        // PRELINKING\n        for(i = 0, ii = preLinkFns.length; i < ii; i++) {\n          try {\n            linkFn = preLinkFns[i];\n            linkFn(linkFn.isolateScope ? isolateScope : scope, $element, attrs,\n                linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), transcludeFn);\n          } catch (e) {\n            $exceptionHandler(e, startingTag($element));\n          }\n        }\n\n        // RECURSION\n        // We only pass the isolate scope, if the isolate directive has a template,\n        // otherwise the child elements do not belong to the isolate directive.\n        var scopeToChild = scope;\n        if (newIsolateScopeDirective && (newIsolateScopeDirective.template || newIsolateScopeDirective.templateUrl === null)) {\n          scopeToChild = isolateScope;\n        }\n        childLinkFn && childLinkFn(scopeToChild, linkNode.childNodes, undefined, boundTranscludeFn);\n\n        // POSTLINKING\n        for(i = postLinkFns.length - 1; i >= 0; i--) {\n          try {\n            linkFn = postLinkFns[i];\n            linkFn(linkFn.isolateScope ? isolateScope : scope, $element, attrs,\n                linkFn.require && getControllers(linkFn.directiveName, linkFn.require, $element, elementControllers), transcludeFn);\n          } catch (e) {\n            $exceptionHandler(e, startingTag($element));\n          }\n        }\n\n        // This is the function that is injected as `$transclude`.\n        function controllersBoundTransclude(scope, cloneAttachFn) {\n          var transcludeControllers;\n\n          // no scope passed\n          if (arguments.length < 2) {\n            cloneAttachFn = scope;\n            scope = undefined;\n          }\n\n          if (hasElementTranscludeDirective) {\n            transcludeControllers = elementControllers;\n          }\n\n          return boundTranscludeFn(scope, cloneAttachFn, transcludeControllers);\n        }\n      }\n    }\n\n    function markDirectivesAsIsolate(directives) {\n      // mark all directives as needing isolate scope.\n      for (var j = 0, jj = directives.length; j < jj; j++) {\n        directives[j] = inherit(directives[j], {$$isolateScope: true});\n      }\n    }\n\n    /**\n     * looks up the directive and decorates it with exception handling and proper parameters. We\n     * call this the boundDirective.\n     *\n     * @param {string} name name of the directive to look up.\n     * @param {string} location The directive must be found in specific format.\n     *   String containing any of theses characters:\n     *\n     *   * `E`: element name\n     *   * `A': attribute\n     *   * `C`: class\n     *   * `M`: comment\n     * @returns {boolean} true if directive was added.\n     */\n    function addDirective(tDirectives, name, location, maxPriority, ignoreDirective, startAttrName,\n                          endAttrName) {\n      if (name === ignoreDirective) return null;\n      var match = null;\n      if (hasDirectives.hasOwnProperty(name)) {\n        for(var directive, directives = $injector.get(name + Suffix),\n            i = 0, ii = directives.length; i<ii; i++) {\n          try {\n            directive = directives[i];\n            if ( (maxPriority === undefined || maxPriority > directive.priority) &&\n                 directive.restrict.indexOf(location) != -1) {\n              if (startAttrName) {\n                directive = inherit(directive, {$$start: startAttrName, $$end: endAttrName});\n              }\n              tDirectives.push(directive);\n              match = directive;\n            }\n          } catch(e) { $exceptionHandler(e); }\n        }\n      }\n      return match;\n    }\n\n\n    /**\n     * When the element is replaced with HTML template then the new attributes\n     * on the template need to be merged with the existing attributes in the DOM.\n     * The desired effect is to have both of the attributes present.\n     *\n     * @param {object} dst destination attributes (original DOM)\n     * @param {object} src source attributes (from the directive template)\n     */\n    function mergeTemplateAttributes(dst, src) {\n      var srcAttr = src.$attr,\n          dstAttr = dst.$attr,\n          $element = dst.$$element;\n\n      // reapply the old attributes to the new element\n      forEach(dst, function(value, key) {\n        if (key.charAt(0) != '$') {\n          if (src[key] && src[key] !== value) {\n            value += (key === 'style' ? ';' : ' ') + src[key];\n          }\n          dst.$set(key, value, true, srcAttr[key]);\n        }\n      });\n\n      // copy the new attributes on the old attrs object\n      forEach(src, function(value, key) {\n        if (key == 'class') {\n          safeAddClass($element, value);\n          dst['class'] = (dst['class'] ? dst['class'] + ' ' : '') + value;\n        } else if (key == 'style') {\n          $element.attr('style', $element.attr('style') + ';' + value);\n          dst['style'] = (dst['style'] ? dst['style'] + ';' : '') + value;\n          // `dst` will never contain hasOwnProperty as DOM parser won't let it.\n          // You will get an \"InvalidCharacterError: DOM Exception 5\" error if you\n          // have an attribute like \"has-own-property\" or \"data-has-own-property\", etc.\n        } else if (key.charAt(0) != '$' && !dst.hasOwnProperty(key)) {\n          dst[key] = value;\n          dstAttr[key] = srcAttr[key];\n        }\n      });\n    }\n\n\n    function compileTemplateUrl(directives, $compileNode, tAttrs,\n        $rootElement, childTranscludeFn, preLinkFns, postLinkFns, previousCompileContext) {\n      var linkQueue = [],\n          afterTemplateNodeLinkFn,\n          afterTemplateChildLinkFn,\n          beforeTemplateCompileNode = $compileNode[0],\n          origAsyncDirective = directives.shift(),\n          // The fact that we have to copy and patch the directive seems wrong!\n          derivedSyncDirective = extend({}, origAsyncDirective, {\n            templateUrl: null, transclude: null, replace: null, $$originalDirective: origAsyncDirective\n          }),\n          templateUrl = (isFunction(origAsyncDirective.templateUrl))\n              ? origAsyncDirective.templateUrl($compileNode, tAttrs)\n              : origAsyncDirective.templateUrl;\n\n      $compileNode.empty();\n\n      $http.get($sce.getTrustedResourceUrl(templateUrl), {cache: $templateCache}).\n        success(function(content) {\n          var compileNode, tempTemplateAttrs, $template, childBoundTranscludeFn;\n\n          content = denormalizeTemplate(content);\n\n          if (origAsyncDirective.replace) {\n            if (jqLiteIsTextNode(content)) {\n              $template = [];\n            } else {\n              $template = jqLite(trim(content));\n            }\n            compileNode = $template[0];\n\n            if ($template.length != 1 || compileNode.nodeType !== 1) {\n              throw $compileMinErr('tplrt',\n                  \"Template for directive '{0}' must have exactly one root element. {1}\",\n                  origAsyncDirective.name, templateUrl);\n            }\n\n            tempTemplateAttrs = {$attr: {}};\n            replaceWith($rootElement, $compileNode, compileNode);\n            var templateDirectives = collectDirectives(compileNode, [], tempTemplateAttrs);\n\n            if (isObject(origAsyncDirective.scope)) {\n              markDirectivesAsIsolate(templateDirectives);\n            }\n            directives = templateDirectives.concat(directives);\n            mergeTemplateAttributes(tAttrs, tempTemplateAttrs);\n          } else {\n            compileNode = beforeTemplateCompileNode;\n            $compileNode.html(content);\n          }\n\n          directives.unshift(derivedSyncDirective);\n\n          afterTemplateNodeLinkFn = applyDirectivesToNode(directives, compileNode, tAttrs,\n              childTranscludeFn, $compileNode, origAsyncDirective, preLinkFns, postLinkFns,\n              previousCompileContext);\n          forEach($rootElement, function(node, i) {\n            if (node == compileNode) {\n              $rootElement[i] = $compileNode[0];\n            }\n          });\n          afterTemplateChildLinkFn = compileNodes($compileNode[0].childNodes, childTranscludeFn);\n\n          while(linkQueue.length) {\n            var scope = linkQueue.shift(),\n                beforeTemplateLinkNode = linkQueue.shift(),\n                linkRootElement = linkQueue.shift(),\n                boundTranscludeFn = linkQueue.shift(),\n                linkNode = $compileNode[0];\n\n            if (beforeTemplateLinkNode !== beforeTemplateCompileNode) {\n              var oldClasses = beforeTemplateLinkNode.className;\n\n              if (!(previousCompileContext.hasElementTranscludeDirective &&\n                  origAsyncDirective.replace)) {\n                // it was cloned therefore we have to clone as well.\n                linkNode = jqLiteClone(compileNode);\n              }\n\n              replaceWith(linkRootElement, jqLite(beforeTemplateLinkNode), linkNode);\n\n              // Copy in CSS classes from original node\n              safeAddClass(jqLite(linkNode), oldClasses);\n            }\n            if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n              childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n            } else {\n              childBoundTranscludeFn = boundTranscludeFn;\n            }\n            afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, linkNode, $rootElement,\n              childBoundTranscludeFn);\n          }\n          linkQueue = null;\n        }).\n        error(function(response, code, headers, config) {\n          throw $compileMinErr('tpload', 'Failed to load template: {0}', config.url);\n        });\n\n      return function delayedNodeLinkFn(ignoreChildLinkFn, scope, node, rootElement, boundTranscludeFn) {\n        var childBoundTranscludeFn = boundTranscludeFn;\n        if (linkQueue) {\n          linkQueue.push(scope);\n          linkQueue.push(node);\n          linkQueue.push(rootElement);\n          linkQueue.push(childBoundTranscludeFn);\n        } else {\n          if (afterTemplateNodeLinkFn.transcludeOnThisElement) {\n            childBoundTranscludeFn = createBoundTranscludeFn(scope, afterTemplateNodeLinkFn.transclude, boundTranscludeFn);\n          }\n          afterTemplateNodeLinkFn(afterTemplateChildLinkFn, scope, node, rootElement, childBoundTranscludeFn);\n        }\n      };\n    }\n\n\n    /**\n     * Sorting function for bound directives.\n     */\n    function byPriority(a, b) {\n      var diff = b.priority - a.priority;\n      if (diff !== 0) return diff;\n      if (a.name !== b.name) return (a.name < b.name) ? -1 : 1;\n      return a.index - b.index;\n    }\n\n\n    function assertNoDuplicate(what, previousDirective, directive, element) {\n      if (previousDirective) {\n        throw $compileMinErr('multidir', 'Multiple directives [{0}, {1}] asking for {2} on: {3}',\n            previousDirective.name, directive.name, what, startingTag(element));\n      }\n    }\n\n\n      function addTextInterpolateDirective(directives, text) {\n        var interpolateFn = $interpolate(text, true);\n        if (interpolateFn) {\n          directives.push({\n            priority: 0,\n            compile: function textInterpolateCompileFn(templateNode) {\n              // when transcluding a template that has bindings in the root\n              // then we don't have a parent and should do this in the linkFn\n              var parent = templateNode.parent(), hasCompileParent = parent.length;\n              if (hasCompileParent) safeAddClass(templateNode.parent(), 'ng-binding');\n\n              return function textInterpolateLinkFn(scope, node) {\n                var parent = node.parent(),\n                  bindings = parent.data('$binding') || [];\n                bindings.push(interpolateFn);\n                parent.data('$binding', bindings);\n                if (!hasCompileParent) safeAddClass(parent, 'ng-binding');\n                scope.$watch(interpolateFn, function interpolateFnWatchAction(value) {\n                  node[0].nodeValue = value;\n                });\n              };\n            }\n          });\n        }\n      }\n\n\n    function getTrustedContext(node, attrNormalizedName) {\n      if (attrNormalizedName == \"srcdoc\") {\n        return $sce.HTML;\n      }\n      var tag = nodeName_(node);\n      // maction[xlink:href] can source SVG.  It's not limited to <maction>.\n      if (attrNormalizedName == \"xlinkHref\" ||\n          (tag == \"FORM\" && attrNormalizedName == \"action\") ||\n          (tag != \"IMG\" && (attrNormalizedName == \"src\" ||\n                            attrNormalizedName == \"ngSrc\"))) {\n        return $sce.RESOURCE_URL;\n      }\n    }\n\n\n    function addAttrInterpolateDirective(node, directives, value, name) {\n      var interpolateFn = $interpolate(value, true);\n\n      // no interpolation found -> ignore\n      if (!interpolateFn) return;\n\n\n      if (name === \"multiple\" && nodeName_(node) === \"SELECT\") {\n        throw $compileMinErr(\"selmulti\",\n            \"Binding to the 'multiple' attribute is not supported. Element: {0}\",\n            startingTag(node));\n      }\n\n      directives.push({\n        priority: 100,\n        compile: function() {\n            return {\n              pre: function attrInterpolatePreLinkFn(scope, element, attr) {\n                var $$observers = (attr.$$observers || (attr.$$observers = {}));\n\n                if (EVENT_HANDLER_ATTR_REGEXP.test(name)) {\n                  throw $compileMinErr('nodomevents',\n                      \"Interpolations for HTML DOM event attributes are disallowed.  Please use the \" +\n                          \"ng- versions (such as ng-click instead of onclick) instead.\");\n                }\n\n                // we need to interpolate again, in case the attribute value has been updated\n                // (e.g. by another directive's compile function)\n                interpolateFn = $interpolate(attr[name], true, getTrustedContext(node, name));\n\n                // if attribute was updated so that there is no interpolation going on we don't want to\n                // register any observers\n                if (!interpolateFn) return;\n\n                // TODO(i): this should likely be attr.$set(name, iterpolateFn(scope) so that we reset the\n                // actual attr value\n                attr[name] = interpolateFn(scope);\n                ($$observers[name] || ($$observers[name] = [])).$$inter = true;\n                (attr.$$observers && attr.$$observers[name].$$scope || scope).\n                  $watch(interpolateFn, function interpolateFnWatchAction(newValue, oldValue) {\n                    //special case for class attribute addition + removal\n                    //so that class changes can tap into the animation\n                    //hooks provided by the $animate service. Be sure to\n                    //skip animations when the first digest occurs (when\n                    //both the new and the old values are the same) since\n                    //the CSS classes are the non-interpolated values\n                    if(name === 'class' && newValue != oldValue) {\n                      attr.$updateClass(newValue, oldValue);\n                    } else {\n                      attr.$set(name, newValue);\n                    }\n                  });\n              }\n            };\n          }\n      });\n    }\n\n\n    /**\n     * This is a special jqLite.replaceWith, which can replace items which\n     * have no parents, provided that the containing jqLite collection is provided.\n     *\n     * @param {JqLite=} $rootElement The root of the compile tree. Used so that we can replace nodes\n     *                               in the root of the tree.\n     * @param {JqLite} elementsToRemove The jqLite element which we are going to replace. We keep\n     *                                  the shell, but replace its DOM node reference.\n     * @param {Node} newNode The new DOM node.\n     */\n    function replaceWith($rootElement, elementsToRemove, newNode) {\n      var firstElementToRemove = elementsToRemove[0],\n          removeCount = elementsToRemove.length,\n          parent = firstElementToRemove.parentNode,\n          i, ii;\n\n      if ($rootElement) {\n        for(i = 0, ii = $rootElement.length; i < ii; i++) {\n          if ($rootElement[i] == firstElementToRemove) {\n            $rootElement[i++] = newNode;\n            for (var j = i, j2 = j + removeCount - 1,\n                     jj = $rootElement.length;\n                 j < jj; j++, j2++) {\n              if (j2 < jj) {\n                $rootElement[j] = $rootElement[j2];\n              } else {\n                delete $rootElement[j];\n              }\n            }\n            $rootElement.length -= removeCount - 1;\n            break;\n          }\n        }\n      }\n\n      if (parent) {\n        parent.replaceChild(newNode, firstElementToRemove);\n      }\n      var fragment = document.createDocumentFragment();\n      fragment.appendChild(firstElementToRemove);\n      newNode[jqLite.expando] = firstElementToRemove[jqLite.expando];\n      for (var k = 1, kk = elementsToRemove.length; k < kk; k++) {\n        var element = elementsToRemove[k];\n        jqLite(element).remove(); // must do this way to clean up expando\n        fragment.appendChild(element);\n        delete elementsToRemove[k];\n      }\n\n      elementsToRemove[0] = newNode;\n      elementsToRemove.length = 1;\n    }\n\n\n    function cloneAndAnnotateFn(fn, annotation) {\n      return extend(function() { return fn.apply(null, arguments); }, fn, annotation);\n    }\n  }];\n}\n\nvar PREFIX_REGEXP = /^(x[\\:\\-_]|data[\\:\\-_])/i;\n/**\n * Converts all accepted directives format into proper directive name.\n * All of these will become 'myDirective':\n *   my:Directive\n *   my-directive\n *   x-my-directive\n *   data-my:directive\n *\n * Also there is special case for Moz prefix starting with upper case letter.\n * @param name Name to normalize\n */\nfunction directiveNormalize(name) {\n  return camelCase(name.replace(PREFIX_REGEXP, ''));\n}\n\n/**\n * @ngdoc type\n * @name $compile.directive.Attributes\n *\n * @description\n * A shared object between directive compile / linking functions which contains normalized DOM\n * element attributes. The values reflect current binding state `{{ }}`. The normalization is\n * needed since all of these are treated as equivalent in Angular:\n *\n * ```\n *    <span ng:bind=\"a\" ng-bind=\"a\" data-ng-bind=\"a\" x-ng-bind=\"a\">\n * ```\n */\n\n/**\n * @ngdoc property\n * @name $compile.directive.Attributes#$attr\n * @returns {object} A map of DOM element attribute names to the normalized name. This is\n *                   needed to do reverse lookup from normalized name back to actual name.\n */\n\n\n/**\n * @ngdoc method\n * @name $compile.directive.Attributes#$set\n * @kind function\n *\n * @description\n * Set DOM element attribute value.\n *\n *\n * @param {string} name Normalized element attribute name of the property to modify. The name is\n *          reverse-translated using the {@link ng.$compile.directive.Attributes#$attr $attr}\n *          property to the original name.\n * @param {string} value Value to set the attribute to. The value can be an interpolated string.\n */\n\n\n\n/**\n * Closure compiler type information\n */\n\nfunction nodesetLinkingFn(\n  /* angular.Scope */ scope,\n  /* NodeList */ nodeList,\n  /* Element */ rootElement,\n  /* function(Function) */ boundTranscludeFn\n){}\n\nfunction directiveLinkingFn(\n  /* nodesetLinkingFn */ nodesetLinkingFn,\n  /* angular.Scope */ scope,\n  /* Node */ node,\n  /* Element */ rootElement,\n  /* function(Function) */ boundTranscludeFn\n){}\n\nfunction tokenDifference(str1, str2) {\n  var values = '',\n      tokens1 = str1.split(/\\s+/),\n      tokens2 = str2.split(/\\s+/);\n\n  outer:\n  for(var i = 0; i < tokens1.length; i++) {\n    var token = tokens1[i];\n    for(var j = 0; j < tokens2.length; j++) {\n      if(token == tokens2[j]) continue outer;\n    }\n    values += (values.length > 0 ? ' ' : '') + token;\n  }\n  return values;\n}\n\n/**\n * @ngdoc provider\n * @name $controllerProvider\n * @description\n * The {@link ng.$controller $controller service} is used by Angular to create new\n * controllers.\n *\n * This provider allows controller registration via the\n * {@link ng.$controllerProvider#register register} method.\n */\nfunction $ControllerProvider() {\n  var controllers = {},\n      CNTRL_REG = /^(\\S+)(\\s+as\\s+(\\w+))?$/;\n\n\n  /**\n   * @ngdoc method\n   * @name $controllerProvider#register\n   * @param {string|Object} name Controller name, or an object map of controllers where the keys are\n   *    the names and the values are the constructors.\n   * @param {Function|Array} constructor Controller constructor fn (optionally decorated with DI\n   *    annotations in the array notation).\n   */\n  this.register = function(name, constructor) {\n    assertNotHasOwnProperty(name, 'controller');\n    if (isObject(name)) {\n      extend(controllers, name);\n    } else {\n      controllers[name] = constructor;\n    }\n  };\n\n\n  this.$get = ['$injector', '$window', function($injector, $window) {\n\n    /**\n     * @ngdoc service\n     * @name $controller\n     * @requires $injector\n     *\n     * @param {Function|string} constructor If called with a function then it's considered to be the\n     *    controller constructor function. Otherwise it's considered to be a string which is used\n     *    to retrieve the controller constructor using the following steps:\n     *\n     *    * check if a controller with given name is registered via `$controllerProvider`\n     *    * check if evaluating the string on the current scope returns a constructor\n     *    * check `window[constructor]` on the global `window` object\n     *\n     * @param {Object} locals Injection locals for Controller.\n     * @return {Object} Instance of given controller.\n     *\n     * @description\n     * `$controller` service is responsible for instantiating controllers.\n     *\n     * It's just a simple call to {@link auto.$injector $injector}, but extracted into\n     * a service, so that one can override this service with [BC version](https://gist.github.com/1649788).\n     */\n    return function(expression, locals) {\n      var instance, match, constructor, identifier;\n\n      if(isString(expression)) {\n        match = expression.match(CNTRL_REG),\n        constructor = match[1],\n        identifier = match[3];\n        expression = controllers.hasOwnProperty(constructor)\n            ? controllers[constructor]\n            : getter(locals.$scope, constructor, true) || getter($window, constructor, true);\n\n        assertArgFn(expression, constructor, true);\n      }\n\n      instance = $injector.instantiate(expression, locals);\n\n      if (identifier) {\n        if (!(locals && typeof locals.$scope === 'object')) {\n          throw minErr('$controller')('noscp',\n              \"Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.\",\n              constructor || expression.name, identifier);\n        }\n\n        locals.$scope[identifier] = instance;\n      }\n\n      return instance;\n    };\n  }];\n}\n\n/**\n * @ngdoc service\n * @name $document\n * @requires $window\n *\n * @description\n * A {@link angular.element jQuery or jqLite} wrapper for the browser's `window.document` object.\n *\n * @example\n   <example module=\"documentExample\">\n     <file name=\"index.html\">\n       <div ng-controller=\"ExampleController\">\n         <p>$document title: <b ng-bind=\"title\"></b></p>\n         <p>window.document title: <b ng-bind=\"windowTitle\"></b></p>\n       </div>\n     </file>\n     <file name=\"script.js\">\n       angular.module('documentExample', [])\n         .controller('ExampleController', ['$scope', '$document', function($scope, $document) {\n           $scope.title = $document[0].title;\n           $scope.windowTitle = angular.element(window.document)[0].title;\n         }]);\n     </file>\n   </example>\n */\nfunction $DocumentProvider(){\n  this.$get = ['$window', function(window){\n    return jqLite(window.document);\n  }];\n}\n\n/**\n * @ngdoc service\n * @name $exceptionHandler\n * @requires ng.$log\n *\n * @description\n * Any uncaught exception in angular expressions is delegated to this service.\n * The default implementation simply delegates to `$log.error` which logs it into\n * the browser console.\n *\n * In unit tests, if `angular-mocks.js` is loaded, this service is overridden by\n * {@link ngMock.$exceptionHandler mock $exceptionHandler} which aids in testing.\n *\n * ## Example:\n *\n * ```js\n *   angular.module('exceptionOverride', []).factory('$exceptionHandler', function () {\n *     return function (exception, cause) {\n *       exception.message += ' (caused by \"' + cause + '\")';\n *       throw exception;\n *     };\n *   });\n * ```\n *\n * This example will override the normal action of `$exceptionHandler`, to make angular\n * exceptions fail hard when they happen, instead of just logging to the console.\n *\n * @param {Error} exception Exception associated with the error.\n * @param {string=} cause optional information about the context in which\n *       the error was thrown.\n *\n */\nfunction $ExceptionHandlerProvider() {\n  this.$get = ['$log', function($log) {\n    return function(exception, cause) {\n      $log.error.apply($log, arguments);\n    };\n  }];\n}\n\n/**\n * Parse headers into key value object\n *\n * @param {string} headers Raw headers as a string\n * @returns {Object} Parsed headers as key value object\n */\nfunction parseHeaders(headers) {\n  var parsed = {}, key, val, i;\n\n  if (!headers) return parsed;\n\n  forEach(headers.split('\\n'), function(line) {\n    i = line.indexOf(':');\n    key = lowercase(trim(line.substr(0, i)));\n    val = trim(line.substr(i + 1));\n\n    if (key) {\n      parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n    }\n  });\n\n  return parsed;\n}\n\n\n/**\n * Returns a function that provides access to parsed headers.\n *\n * Headers are lazy parsed when first requested.\n * @see parseHeaders\n *\n * @param {(string|Object)} headers Headers to provide access to.\n * @returns {function(string=)} Returns a getter function which if called with:\n *\n *   - if called with single an argument returns a single header value or null\n *   - if called with no arguments returns an object containing all headers.\n */\nfunction headersGetter(headers) {\n  var headersObj = isObject(headers) ? headers : undefined;\n\n  return function(name) {\n    if (!headersObj) headersObj =  parseHeaders(headers);\n\n    if (name) {\n      return headersObj[lowercase(name)] || null;\n    }\n\n    return headersObj;\n  };\n}\n\n\n/**\n * Chain all given functions\n *\n * This function is used for both request and response transforming\n *\n * @param {*} data Data to transform.\n * @param {function(string=)} headers Http headers getter fn.\n * @param {(Function|Array.<Function>)} fns Function or an array of functions.\n * @returns {*} Transformed data.\n */\nfunction transformData(data, headers, fns) {\n  if (isFunction(fns))\n    return fns(data, headers);\n\n  forEach(fns, function(fn) {\n    data = fn(data, headers);\n  });\n\n  return data;\n}\n\n\nfunction isSuccess(status) {\n  return 200 <= status && status < 300;\n}\n\n\n/**\n * @ngdoc provider\n * @name $httpProvider\n * @description\n * Use `$httpProvider` to change the default behavior of the {@link ng.$http $http} service.\n * */\nfunction $HttpProvider() {\n  var JSON_START = /^\\s*(\\[|\\{[^\\{])/,\n      JSON_END = /[\\}\\]]\\s*$/,\n      PROTECTION_PREFIX = /^\\)\\]\\}',?\\n/,\n      CONTENT_TYPE_APPLICATION_JSON = {'Content-Type': 'application/json;charset=utf-8'};\n\n  /**\n   * @ngdoc property\n   * @name $httpProvider#defaults\n   * @description\n   *\n   * Object containing default values for all {@link ng.$http $http} requests.\n   *\n   * - **`defaults.xsrfCookieName`** - {string} - Name of cookie containing the XSRF token.\n   * Defaults value is `'XSRF-TOKEN'`.\n   *\n   * - **`defaults.xsrfHeaderName`** - {string} - Name of HTTP header to populate with the\n   * XSRF token. Defaults value is `'X-XSRF-TOKEN'`.\n   *\n   * - **`defaults.headers`** - {Object} - Default headers for all $http requests.\n   * Refer to {@link ng.$http#setting-http-headers $http} for documentation on\n   * setting default headers.\n   *     - **`defaults.headers.common`**\n   *     - **`defaults.headers.post`**\n   *     - **`defaults.headers.put`**\n   *     - **`defaults.headers.patch`**\n   **/\n  var defaults = this.defaults = {\n    // transform incoming response data\n    transformResponse: [function(data) {\n      if (isString(data)) {\n        // strip json vulnerability protection prefix\n        data = data.replace(PROTECTION_PREFIX, '');\n        if (JSON_START.test(data) && JSON_END.test(data))\n          data = fromJson(data);\n      }\n      return data;\n    }],\n\n    // transform outgoing request data\n    transformRequest: [function(d) {\n      return isObject(d) && !isFile(d) && !isBlob(d) ? toJson(d) : d;\n    }],\n\n    // default headers\n    headers: {\n      common: {\n        'Accept': 'application/json, text/plain, */*'\n      },\n      post:   shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n      put:    shallowCopy(CONTENT_TYPE_APPLICATION_JSON),\n      patch:  shallowCopy(CONTENT_TYPE_APPLICATION_JSON)\n    },\n\n    xsrfCookieName: 'XSRF-TOKEN',\n    xsrfHeaderName: 'X-XSRF-TOKEN'\n  };\n\n  /**\n   * Are ordered by request, i.e. they are applied in the same order as the\n   * array, on request, but reverse order, on response.\n   */\n  var interceptorFactories = this.interceptors = [];\n\n  /**\n   * For historical reasons, response interceptors are ordered by the order in which\n   * they are applied to the response. (This is the opposite of interceptorFactories)\n   */\n  var responseInterceptorFactories = this.responseInterceptors = [];\n\n  this.$get = ['$httpBackend', '$browser', '$cacheFactory', '$rootScope', '$q', '$injector',\n      function($httpBackend, $browser, $cacheFactory, $rootScope, $q, $injector) {\n\n    var defaultCache = $cacheFactory('$http');\n\n    /**\n     * Interceptors stored in reverse order. Inner interceptors before outer interceptors.\n     * The reversal is needed so that we can build up the interception chain around the\n     * server request.\n     */\n    var reversedInterceptors = [];\n\n    forEach(interceptorFactories, function(interceptorFactory) {\n      reversedInterceptors.unshift(isString(interceptorFactory)\n          ? $injector.get(interceptorFactory) : $injector.invoke(interceptorFactory));\n    });\n\n    forEach(responseInterceptorFactories, function(interceptorFactory, index) {\n      var responseFn = isString(interceptorFactory)\n          ? $injector.get(interceptorFactory)\n          : $injector.invoke(interceptorFactory);\n\n      /**\n       * Response interceptors go before \"around\" interceptors (no real reason, just\n       * had to pick one.) But they are already reversed, so we can't use unshift, hence\n       * the splice.\n       */\n      reversedInterceptors.splice(index, 0, {\n        response: function(response) {\n          return responseFn($q.when(response));\n        },\n        responseError: function(response) {\n          return responseFn($q.reject(response));\n        }\n      });\n    });\n\n\n    /**\n     * @ngdoc service\n     * @kind function\n     * @name $http\n     * @requires ng.$httpBackend\n     * @requires $cacheFactory\n     * @requires $rootScope\n     * @requires $q\n     * @requires $injector\n     *\n     * @description\n     * The `$http` service is a core Angular service that facilitates communication with the remote\n     * HTTP servers via the browser's [XMLHttpRequest](https://developer.mozilla.org/en/xmlhttprequest)\n     * object or via [JSONP](http://en.wikipedia.org/wiki/JSONP).\n     *\n     * For unit testing applications that use `$http` service, see\n     * {@link ngMock.$httpBackend $httpBackend mock}.\n     *\n     * For a higher level of abstraction, please check out the {@link ngResource.$resource\n     * $resource} service.\n     *\n     * The $http API is based on the {@link ng.$q deferred/promise APIs} exposed by\n     * the $q service. While for simple usage patterns this doesn't matter much, for advanced usage\n     * it is important to familiarize yourself with these APIs and the guarantees they provide.\n     *\n     *\n     * # General usage\n     * The `$http` service is a function which takes a single argument — a configuration object —\n     * that is used to generate an HTTP request and returns  a {@link ng.$q promise}\n     * with two $http specific methods: `success` and `error`.\n     *\n     * ```js\n     *   $http({method: 'GET', url: '/someUrl'}).\n     *     success(function(data, status, headers, config) {\n     *       // this callback will be called asynchronously\n     *       // when the response is available\n     *     }).\n     *     error(function(data, status, headers, config) {\n     *       // called asynchronously if an error occurs\n     *       // or server returns response with an error status.\n     *     });\n     * ```\n     *\n     * Since the returned value of calling the $http function is a `promise`, you can also use\n     * the `then` method to register callbacks, and these callbacks will receive a single argument –\n     * an object representing the response. See the API signature and type info below for more\n     * details.\n     *\n     * A response status code between 200 and 299 is considered a success status and\n     * will result in the success callback being called. Note that if the response is a redirect,\n     * XMLHttpRequest will transparently follow it, meaning that the error callback will not be\n     * called for such responses.\n     *\n     * # Writing Unit Tests that use $http\n     * When unit testing (using {@link ngMock ngMock}), it is necessary to call\n     * {@link ngMock.$httpBackend#flush $httpBackend.flush()} to flush each pending\n     * request using trained responses.\n     *\n     * ```\n     * $httpBackend.expectGET(...);\n     * $http.get(...);\n     * $httpBackend.flush();\n     * ```\n     *\n     * # Shortcut methods\n     *\n     * Shortcut methods are also available. All shortcut methods require passing in the URL, and\n     * request data must be passed in for POST/PUT requests.\n     *\n     * ```js\n     *   $http.get('/someUrl').success(successCallback);\n     *   $http.post('/someUrl', data).success(successCallback);\n     * ```\n     *\n     * Complete list of shortcut methods:\n     *\n     * - {@link ng.$http#get $http.get}\n     * - {@link ng.$http#head $http.head}\n     * - {@link ng.$http#post $http.post}\n     * - {@link ng.$http#put $http.put}\n     * - {@link ng.$http#delete $http.delete}\n     * - {@link ng.$http#jsonp $http.jsonp}\n     *\n     *\n     * # Setting HTTP Headers\n     *\n     * The $http service will automatically add certain HTTP headers to all requests. These defaults\n     * can be fully configured by accessing the `$httpProvider.defaults.headers` configuration\n     * object, which currently contains this default configuration:\n     *\n     * - `$httpProvider.defaults.headers.common` (headers that are common for all requests):\n     *   - `Accept: application/json, text/plain, * / *`\n     * - `$httpProvider.defaults.headers.post`: (header defaults for POST requests)\n     *   - `Content-Type: application/json`\n     * - `$httpProvider.defaults.headers.put` (header defaults for PUT requests)\n     *   - `Content-Type: application/json`\n     *\n     * To add or overwrite these defaults, simply add or remove a property from these configuration\n     * objects. To add headers for an HTTP method other than POST or PUT, simply add a new object\n     * with the lowercased HTTP method name as the key, e.g.\n     * `$httpProvider.defaults.headers.get = { 'My-Header' : 'value' }.\n     *\n     * The defaults can also be set at runtime via the `$http.defaults` object in the same\n     * fashion. For example:\n     *\n     * ```\n     * module.run(function($http) {\n     *   $http.defaults.headers.common.Authorization = 'Basic YmVlcDpib29w'\n     * });\n     * ```\n     *\n     * In addition, you can supply a `headers` property in the config object passed when\n     * calling `$http(config)`, which overrides the defaults without changing them globally.\n     *\n     *\n     * # Transforming Requests and Responses\n     *\n     * Both requests and responses can be transformed using transform functions. By default, Angular\n     * applies these transformations:\n     *\n     * Request transformations:\n     *\n     * - If the `data` property of the request configuration object contains an object, serialize it\n     *   into JSON format.\n     *\n     * Response transformations:\n     *\n     *  - If XSRF prefix is detected, strip it (see Security Considerations section below).\n     *  - If JSON response is detected, deserialize it using a JSON parser.\n     *\n     * To globally augment or override the default transforms, modify the\n     * `$httpProvider.defaults.transformRequest` and `$httpProvider.defaults.transformResponse`\n     * properties. These properties are by default an array of transform functions, which allows you\n     * to `push` or `unshift` a new transformation function into the transformation chain. You can\n     * also decide to completely override any default transformations by assigning your\n     * transformation functions to these properties directly without the array wrapper.  These defaults\n     * are again available on the $http factory at run-time, which may be useful if you have run-time\n     * services you wish to be involved in your transformations.\n     *\n     * Similarly, to locally override the request/response transforms, augment the\n     * `transformRequest` and/or `transformResponse` properties of the configuration object passed\n     * into `$http`.\n     *\n     *\n     * # Caching\n     *\n     * To enable caching, set the request configuration `cache` property to `true` (to use default\n     * cache) or to a custom cache object (built with {@link ng.$cacheFactory `$cacheFactory`}).\n     * When the cache is enabled, `$http` stores the response from the server in the specified\n     * cache. The next time the same request is made, the response is served from the cache without\n     * sending a request to the server.\n     *\n     * Note that even if the response is served from cache, delivery of the data is asynchronous in\n     * the same way that real requests are.\n     *\n     * If there are multiple GET requests for the same URL that should be cached using the same\n     * cache, but the cache is not populated yet, only one request to the server will be made and\n     * the remaining requests will be fulfilled using the response from the first request.\n     *\n     * You can change the default cache to a new object (built with\n     * {@link ng.$cacheFactory `$cacheFactory`}) by updating the\n     * {@link ng.$http#properties_defaults `$http.defaults.cache`} property. All requests who set\n     * their `cache` property to `true` will now use this cache object.\n     *\n     * If you set the default cache to `false` then only requests that specify their own custom\n     * cache object will be cached.\n     *\n     * # Interceptors\n     *\n     * Before you start creating interceptors, be sure to understand the\n     * {@link ng.$q $q and deferred/promise APIs}.\n     *\n     * For purposes of global error handling, authentication, or any kind of synchronous or\n     * asynchronous pre-processing of request or postprocessing of responses, it is desirable to be\n     * able to intercept requests before they are handed to the server and\n     * responses before they are handed over to the application code that\n     * initiated these requests. The interceptors leverage the {@link ng.$q\n     * promise APIs} to fulfill this need for both synchronous and asynchronous pre-processing.\n     *\n     * The interceptors are service factories that are registered with the `$httpProvider` by\n     * adding them to the `$httpProvider.interceptors` array. The factory is called and\n     * injected with dependencies (if specified) and returns the interceptor.\n     *\n     * There are two kinds of interceptors (and two kinds of rejection interceptors):\n     *\n     *   * `request`: interceptors get called with a http `config` object. The function is free to\n     *     modify the `config` object or create a new one. The function needs to return the `config`\n     *     object directly, or a promise containing the `config` or a new `config` object.\n     *   * `requestError`: interceptor gets called when a previous interceptor threw an error or\n     *     resolved with a rejection.\n     *   * `response`: interceptors get called with http `response` object. The function is free to\n     *     modify the `response` object or create a new one. The function needs to return the `response`\n     *     object directly, or as a promise containing the `response` or a new `response` object.\n     *   * `responseError`: interceptor gets called when a previous interceptor threw an error or\n     *     resolved with a rejection.\n     *\n     *\n     * ```js\n     *   // register the interceptor as a service\n     *   $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n     *     return {\n     *       // optional method\n     *       'request': function(config) {\n     *         // do something on success\n     *         return config;\n     *       },\n     *\n     *       // optional method\n     *      'requestError': function(rejection) {\n     *         // do something on error\n     *         if (canRecover(rejection)) {\n     *           return responseOrNewPromise\n     *         }\n     *         return $q.reject(rejection);\n     *       },\n     *\n     *\n     *\n     *       // optional method\n     *       'response': function(response) {\n     *         // do something on success\n     *         return response;\n     *       },\n     *\n     *       // optional method\n     *      'responseError': function(rejection) {\n     *         // do something on error\n     *         if (canRecover(rejection)) {\n     *           return responseOrNewPromise\n     *         }\n     *         return $q.reject(rejection);\n     *       }\n     *     };\n     *   });\n     *\n     *   $httpProvider.interceptors.push('myHttpInterceptor');\n     *\n     *\n     *   // alternatively, register the interceptor via an anonymous factory\n     *   $httpProvider.interceptors.push(function($q, dependency1, dependency2) {\n     *     return {\n     *      'request': function(config) {\n     *          // same as above\n     *       },\n     *\n     *       'response': function(response) {\n     *          // same as above\n     *       }\n     *     };\n     *   });\n     * ```\n     *\n     * # Response interceptors (DEPRECATED)\n     *\n     * Before you start creating interceptors, be sure to understand the\n     * {@link ng.$q $q and deferred/promise APIs}.\n     *\n     * For purposes of global error handling, authentication or any kind of synchronous or\n     * asynchronous preprocessing of received responses, it is desirable to be able to intercept\n     * responses for http requests before they are handed over to the application code that\n     * initiated these requests. The response interceptors leverage the {@link ng.$q\n     * promise apis} to fulfil this need for both synchronous and asynchronous preprocessing.\n     *\n     * The interceptors are service factories that are registered with the $httpProvider by\n     * adding them to the `$httpProvider.responseInterceptors` array. The factory is called and\n     * injected with dependencies (if specified) and returns the interceptor  — a function that\n     * takes a {@link ng.$q promise} and returns the original or a new promise.\n     *\n     * ```js\n     *   // register the interceptor as a service\n     *   $provide.factory('myHttpInterceptor', function($q, dependency1, dependency2) {\n     *     return function(promise) {\n     *       return promise.then(function(response) {\n     *         // do something on success\n     *         return response;\n     *       }, function(response) {\n     *         // do something on error\n     *         if (canRecover(response)) {\n     *           return responseOrNewPromise\n     *         }\n     *         return $q.reject(response);\n     *       });\n     *     }\n     *   });\n     *\n     *   $httpProvider.responseInterceptors.push('myHttpInterceptor');\n     *\n     *\n     *   // register the interceptor via an anonymous factory\n     *   $httpProvider.responseInterceptors.push(function($q, dependency1, dependency2) {\n     *     return function(promise) {\n     *       // same as above\n     *     }\n     *   });\n     * ```\n     *\n     *\n     * # Security Considerations\n     *\n     * When designing web applications, consider security threats from:\n     *\n     * - [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n     * - [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)\n     *\n     * Both server and the client must cooperate in order to eliminate these threats. Angular comes\n     * pre-configured with strategies that address these issues, but for this to work backend server\n     * cooperation is required.\n     *\n     * ## JSON Vulnerability Protection\n     *\n     * A [JSON vulnerability](http://haacked.com/archive/2008/11/20/anatomy-of-a-subtle-json-vulnerability.aspx)\n     * allows third party website to turn your JSON resource URL into\n     * [JSONP](http://en.wikipedia.org/wiki/JSONP) request under some conditions. To\n     * counter this your server can prefix all JSON requests with following string `\")]}',\\n\"`.\n     * Angular will automatically strip the prefix before processing it as JSON.\n     *\n     * For example if your server needs to return:\n     * ```js\n     * ['one','two']\n     * ```\n     *\n     * which is vulnerable to attack, your server can return:\n     * ```js\n     * )]}',\n     * ['one','two']\n     * ```\n     *\n     * Angular will strip the prefix, before processing the JSON.\n     *\n     *\n     * ## Cross Site Request Forgery (XSRF) Protection\n     *\n     * [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) is a technique by which\n     * an unauthorized site can gain your user's private data. Angular provides a mechanism\n     * to counter XSRF. When performing XHR requests, the $http service reads a token from a cookie\n     * (by default, `XSRF-TOKEN`) and sets it as an HTTP header (`X-XSRF-TOKEN`). Since only\n     * JavaScript that runs on your domain could read the cookie, your server can be assured that\n     * the XHR came from JavaScript running on your domain. The header will not be set for\n     * cross-domain requests.\n     *\n     * To take advantage of this, your server needs to set a token in a JavaScript readable session\n     * cookie called `XSRF-TOKEN` on the first HTTP GET request. On subsequent XHR requests the\n     * server can verify that the cookie matches `X-XSRF-TOKEN` HTTP header, and therefore be sure\n     * that only JavaScript running on your domain could have sent the request. The token must be\n     * unique for each user and must be verifiable by the server (to prevent the JavaScript from\n     * making up its own tokens). We recommend that the token is a digest of your site's\n     * authentication cookie with a [salt](https://en.wikipedia.org/wiki/Salt_(cryptography))\n     * for added security.\n     *\n     * The name of the headers can be specified using the xsrfHeaderName and xsrfCookieName\n     * properties of either $httpProvider.defaults at config-time, $http.defaults at run-time,\n     * or the per-request config object.\n     *\n     *\n     * @param {object} config Object describing the request to be made and how it should be\n     *    processed. The object has following properties:\n     *\n     *    - **method** – `{string}` – HTTP method (e.g. 'GET', 'POST', etc)\n     *    - **url** – `{string}` – Absolute or relative URL of the resource that is being requested.\n     *    - **params** – `{Object.<string|Object>}` – Map of strings or objects which will be turned\n     *      to `?key1=value1&key2=value2` after the url. If the value is not a string, it will be\n     *      JSONified.\n     *    - **data** – `{string|Object}` – Data to be sent as the request message data.\n     *    - **headers** – `{Object}` – Map of strings or functions which return strings representing\n     *      HTTP headers to send to the server. If the return value of a function is null, the\n     *      header will not be sent.\n     *    - **xsrfHeaderName** – `{string}` – Name of HTTP header to populate with the XSRF token.\n     *    - **xsrfCookieName** – `{string}` – Name of cookie containing the XSRF token.\n     *    - **transformRequest** –\n     *      `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –\n     *      transform function or an array of such functions. The transform function takes the http\n     *      request body and headers and returns its transformed (typically serialized) version.\n     *    - **transformResponse** –\n     *      `{function(data, headersGetter)|Array.<function(data, headersGetter)>}` –\n     *      transform function or an array of such functions. The transform function takes the http\n     *      response body and headers and returns its transformed (typically deserialized) version.\n     *    - **cache** – `{boolean|Cache}` – If true, a default $http cache will be used to cache the\n     *      GET request, otherwise if a cache instance built with\n     *      {@link ng.$cacheFactory $cacheFactory}, this cache will be used for\n     *      caching.\n     *    - **timeout** – `{number|Promise}` – timeout in milliseconds, or {@link ng.$q promise}\n     *      that should abort the request when resolved.\n     *    - **withCredentials** - `{boolean}` - whether to set the `withCredentials` flag on the\n     *      XHR object. See [requests with credentials]https://developer.mozilla.org/en/http_access_control#section_5\n     *      for more information.\n     *    - **responseType** - `{string}` - see\n     *      [requestType](https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#responseType).\n     *\n     * @returns {HttpPromise} Returns a {@link ng.$q promise} object with the\n     *   standard `then` method and two http specific methods: `success` and `error`. The `then`\n     *   method takes two arguments a success and an error callback which will be called with a\n     *   response object. The `success` and `error` methods take a single argument - a function that\n     *   will be called when the request succeeds or fails respectively. The arguments passed into\n     *   these functions are destructured representation of the response object passed into the\n     *   `then` method. The response object has these properties:\n     *\n     *   - **data** – `{string|Object}` – The response body transformed with the transform\n     *     functions.\n     *   - **status** – `{number}` – HTTP status code of the response.\n     *   - **headers** – `{function([headerName])}` – Header getter function.\n     *   - **config** – `{Object}` – The configuration object that was used to generate the request.\n     *   - **statusText** – `{string}` – HTTP status text of the response.\n     *\n     * @property {Array.<Object>} pendingRequests Array of config objects for currently pending\n     *   requests. This is primarily meant to be used for debugging purposes.\n     *\n     *\n     * @example\n<example module=\"httpExample\">\n<file name=\"index.html\">\n  <div ng-controller=\"FetchController\">\n    <select ng-model=\"method\">\n      <option>GET</option>\n      <option>JSONP</option>\n    </select>\n    <input type=\"text\" ng-model=\"url\" size=\"80\"/>\n    <button id=\"fetchbtn\" ng-click=\"fetch()\">fetch</button><br>\n    <button id=\"samplegetbtn\" ng-click=\"updateModel('GET', 'http-hello.html')\">Sample GET</button>\n    <button id=\"samplejsonpbtn\"\n      ng-click=\"updateModel('JSONP',\n                    'https://angularjs.org/greet.php?callback=JSON_CALLBACK&name=Super%20Hero')\">\n      Sample JSONP\n    </button>\n    <button id=\"invalidjsonpbtn\"\n      ng-click=\"updateModel('JSONP', 'https://angularjs.org/doesntexist&callback=JSON_CALLBACK')\">\n        Invalid JSONP\n      </button>\n    <pre>http status code: {{status}}</pre>\n    <pre>http response data: {{data}}</pre>\n  </div>\n</file>\n<file name=\"script.js\">\n  angular.module('httpExample', [])\n    .controller('FetchController', ['$scope', '$http', '$templateCache',\n      function($scope, $http, $templateCache) {\n        $scope.method = 'GET';\n        $scope.url = 'http-hello.html';\n\n        $scope.fetch = function() {\n          $scope.code = null;\n          $scope.response = null;\n\n          $http({method: $scope.method, url: $scope.url, cache: $templateCache}).\n            success(function(data, status) {\n              $scope.status = status;\n              $scope.data = data;\n            }).\n            error(function(data, status) {\n              $scope.data = data || \"Request failed\";\n              $scope.status = status;\n          });\n        };\n\n        $scope.updateModel = function(method, url) {\n          $scope.method = method;\n          $scope.url = url;\n        };\n      }]);\n</file>\n<file name=\"http-hello.html\">\n  Hello, $http!\n</file>\n<file name=\"protractor.js\" type=\"protractor\">\n  var status = element(by.binding('status'));\n  var data = element(by.binding('data'));\n  var fetchBtn = element(by.id('fetchbtn'));\n  var sampleGetBtn = element(by.id('samplegetbtn'));\n  var sampleJsonpBtn = element(by.id('samplejsonpbtn'));\n  var invalidJsonpBtn = element(by.id('invalidjsonpbtn'));\n\n  it('should make an xhr GET request', function() {\n    sampleGetBtn.click();\n    fetchBtn.click();\n    expect(status.getText()).toMatch('200');\n    expect(data.getText()).toMatch(/Hello, \\$http!/);\n  });\n\n  it('should make a JSONP request to angularjs.org', function() {\n    sampleJsonpBtn.click();\n    fetchBtn.click();\n    expect(status.getText()).toMatch('200');\n    expect(data.getText()).toMatch(/Super Hero!/);\n  });\n\n  it('should make JSONP request to invalid URL and invoke the error handler',\n      function() {\n    invalidJsonpBtn.click();\n    fetchBtn.click();\n    expect(status.getText()).toMatch('0');\n    expect(data.getText()).toMatch('Request failed');\n  });\n</file>\n</example>\n     */\n    function $http(requestConfig) {\n      var config = {\n        method: 'get',\n        transformRequest: defaults.transformRequest,\n        transformResponse: defaults.transformResponse\n      };\n      var headers = mergeHeaders(requestConfig);\n\n      extend(config, requestConfig);\n      config.headers = headers;\n      config.method = uppercase(config.method);\n\n      var serverRequest = function(config) {\n        headers = config.headers;\n        var reqData = transformData(config.data, headersGetter(headers), config.transformRequest);\n\n        // strip content-type if data is undefined\n        if (isUndefined(reqData)) {\n          forEach(headers, function(value, header) {\n            if (lowercase(header) === 'content-type') {\n                delete headers[header];\n            }\n          });\n        }\n\n        if (isUndefined(config.withCredentials) && !isUndefined(defaults.withCredentials)) {\n          config.withCredentials = defaults.withCredentials;\n        }\n\n        // send request\n        return sendReq(config, reqData, headers).then(transformResponse, transformResponse);\n      };\n\n      var chain = [serverRequest, undefined];\n      var promise = $q.when(config);\n\n      // apply interceptors\n      forEach(reversedInterceptors, function(interceptor) {\n        if (interceptor.request || interceptor.requestError) {\n          chain.unshift(interceptor.request, interceptor.requestError);\n        }\n        if (interceptor.response || interceptor.responseError) {\n          chain.push(interceptor.response, interceptor.responseError);\n        }\n      });\n\n      while(chain.length) {\n        var thenFn = chain.shift();\n        var rejectFn = chain.shift();\n\n        promise = promise.then(thenFn, rejectFn);\n      }\n\n      promise.success = function(fn) {\n        promise.then(function(response) {\n          fn(response.data, response.status, response.headers, config);\n        });\n        return promise;\n      };\n\n      promise.error = function(fn) {\n        promise.then(null, function(response) {\n          fn(response.data, response.status, response.headers, config);\n        });\n        return promise;\n      };\n\n      return promise;\n\n      function transformResponse(response) {\n        // make a copy since the response must be cacheable\n        var resp = extend({}, response, {\n          data: transformData(response.data, response.headers, config.transformResponse)\n        });\n        return (isSuccess(response.status))\n          ? resp\n          : $q.reject(resp);\n      }\n\n      function mergeHeaders(config) {\n        var defHeaders = defaults.headers,\n            reqHeaders = extend({}, config.headers),\n            defHeaderName, lowercaseDefHeaderName, reqHeaderName;\n\n        defHeaders = extend({}, defHeaders.common, defHeaders[lowercase(config.method)]);\n\n        // using for-in instead of forEach to avoid unecessary iteration after header has been found\n        defaultHeadersIteration:\n        for (defHeaderName in defHeaders) {\n          lowercaseDefHeaderName = lowercase(defHeaderName);\n\n          for (reqHeaderName in reqHeaders) {\n            if (lowercase(reqHeaderName) === lowercaseDefHeaderName) {\n              continue defaultHeadersIteration;\n            }\n          }\n\n          reqHeaders[defHeaderName] = defHeaders[defHeaderName];\n        }\n\n        // execute if header value is a function for merged headers\n        execHeaders(reqHeaders);\n        return reqHeaders;\n\n        function execHeaders(headers) {\n          var headerContent;\n\n          forEach(headers, function(headerFn, header) {\n            if (isFunction(headerFn)) {\n              headerContent = headerFn();\n              if (headerContent != null) {\n                headers[header] = headerContent;\n              } else {\n                delete headers[header];\n              }\n            }\n          });\n        }\n      }\n    }\n\n    $http.pendingRequests = [];\n\n    /**\n     * @ngdoc method\n     * @name $http#get\n     *\n     * @description\n     * Shortcut method to perform `GET` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name $http#delete\n     *\n     * @description\n     * Shortcut method to perform `DELETE` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name $http#head\n     *\n     * @description\n     * Shortcut method to perform `HEAD` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name $http#jsonp\n     *\n     * @description\n     * Shortcut method to perform `JSONP` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request.\n     *                     The name of the callback should be the string `JSON_CALLBACK`.\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n    createShortMethods('get', 'delete', 'head', 'jsonp');\n\n    /**\n     * @ngdoc method\n     * @name $http#post\n     *\n     * @description\n     * Shortcut method to perform `POST` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {*} data Request content\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n\n    /**\n     * @ngdoc method\n     * @name $http#put\n     *\n     * @description\n     * Shortcut method to perform `PUT` request.\n     *\n     * @param {string} url Relative or absolute URL specifying the destination of the request\n     * @param {*} data Request content\n     * @param {Object=} config Optional configuration object\n     * @returns {HttpPromise} Future object\n     */\n    createShortMethodsWithData('post', 'put');\n\n        /**\n         * @ngdoc property\n         * @name $http#defaults\n         *\n         * @description\n         * Runtime equivalent of the `$httpProvider.defaults` property. Allows configuration of\n         * default headers, withCredentials as well as request and response transformations.\n         *\n         * See \"Setting HTTP Headers\" and \"Transforming Requests and Responses\" sections above.\n         */\n    $http.defaults = defaults;\n\n\n    return $http;\n\n\n    function createShortMethods(names) {\n      forEach(arguments, function(name) {\n        $http[name] = function(url, config) {\n          return $http(extend(config || {}, {\n            method: name,\n            url: url\n          }));\n        };\n      });\n    }\n\n\n    function createShortMethodsWithData(name) {\n      forEach(arguments, function(name) {\n        $http[name] = function(url, data, config) {\n          return $http(extend(config || {}, {\n            method: name,\n            url: url,\n            data: data\n          }));\n        };\n      });\n    }\n\n\n    /**\n     * Makes the request.\n     *\n     * !!! ACCESSES CLOSURE VARS:\n     * $httpBackend, defaults, $log, $rootScope, defaultCache, $http.pendingRequests\n     */\n    function sendReq(config, reqData, reqHeaders) {\n      var deferred = $q.defer(),\n          promise = deferred.promise,\n          cache,\n          cachedResp,\n          url = buildUrl(config.url, config.params);\n\n      $http.pendingRequests.push(config);\n      promise.then(removePendingReq, removePendingReq);\n\n\n      if ((config.cache || defaults.cache) && config.cache !== false && config.method == 'GET') {\n        cache = isObject(config.cache) ? config.cache\n              : isObject(defaults.cache) ? defaults.cache\n              : defaultCache;\n      }\n\n      if (cache) {\n        cachedResp = cache.get(url);\n        if (isDefined(cachedResp)) {\n          if (isPromiseLike(cachedResp)) {\n            // cached request has already been sent, but there is no response yet\n            cachedResp.then(removePendingReq, removePendingReq);\n            return cachedResp;\n          } else {\n            // serving from cache\n            if (isArray(cachedResp)) {\n              resolvePromise(cachedResp[1], cachedResp[0], shallowCopy(cachedResp[2]), cachedResp[3]);\n            } else {\n              resolvePromise(cachedResp, 200, {}, 'OK');\n            }\n          }\n        } else {\n          // put the promise for the non-transformed response into cache as a placeholder\n          cache.put(url, promise);\n        }\n      }\n\n\n      // if we won't have the response in cache, set the xsrf headers and\n      // send the request to the backend\n      if (isUndefined(cachedResp)) {\n        var xsrfValue = urlIsSameOrigin(config.url)\n            ? $browser.cookies()[config.xsrfCookieName || defaults.xsrfCookieName]\n            : undefined;\n        if (xsrfValue) {\n          reqHeaders[(config.xsrfHeaderName || defaults.xsrfHeaderName)] = xsrfValue;\n        }\n\n        $httpBackend(config.method, url, reqData, done, reqHeaders, config.timeout,\n            config.withCredentials, config.responseType);\n      }\n\n      return promise;\n\n\n      /**\n       * Callback registered to $httpBackend():\n       *  - caches the response if desired\n       *  - resolves the raw $http promise\n       *  - calls $apply\n       */\n      function done(status, response, headersString, statusText) {\n        if (cache) {\n          if (isSuccess(status)) {\n            cache.put(url, [status, response, parseHeaders(headersString), statusText]);\n          } else {\n            // remove promise from the cache\n            cache.remove(url);\n          }\n        }\n\n        resolvePromise(response, status, headersString, statusText);\n        if (!$rootScope.$$phase) $rootScope.$apply();\n      }\n\n\n      /**\n       * Resolves the raw $http promise.\n       */\n      function resolvePromise(response, status, headers, statusText) {\n        // normalize internal statuses to 0\n        status = Math.max(status, 0);\n\n        (isSuccess(status) ? deferred.resolve : deferred.reject)({\n          data: response,\n          status: status,\n          headers: headersGetter(headers),\n          config: config,\n          statusText : statusText\n        });\n      }\n\n\n      function removePendingReq() {\n        var idx = indexOf($http.pendingRequests, config);\n        if (idx !== -1) $http.pendingRequests.splice(idx, 1);\n      }\n    }\n\n\n    function buildUrl(url, params) {\n      if (!params) return url;\n      var parts = [];\n      forEachSorted(params, function(value, key) {\n        if (value === null || isUndefined(value)) return;\n        if (!isArray(value)) value = [value];\n\n        forEach(value, function(v) {\n          if (isObject(v)) {\n            if (isDate(v)){\n              v = v.toISOString();\n            } else if (isObject(v)) {\n              v = toJson(v);\n            }\n          }\n          parts.push(encodeUriQuery(key) + '=' +\n                     encodeUriQuery(v));\n        });\n      });\n      if(parts.length > 0) {\n        url += ((url.indexOf('?') == -1) ? '?' : '&') + parts.join('&');\n      }\n      return url;\n    }\n  }];\n}\n\nfunction createXhr(method) {\n    //if IE and the method is not RFC2616 compliant, or if XMLHttpRequest\n    //is not available, try getting an ActiveXObject. Otherwise, use XMLHttpRequest\n    //if it is available\n    if (msie <= 8 && (!method.match(/^(get|post|head|put|delete|options)$/i) ||\n      !window.XMLHttpRequest)) {\n      return new window.ActiveXObject(\"Microsoft.XMLHTTP\");\n    } else if (window.XMLHttpRequest) {\n      return new window.XMLHttpRequest();\n    }\n\n    throw minErr('$httpBackend')('noxhr', \"This browser does not support XMLHttpRequest.\");\n}\n\n/**\n * @ngdoc service\n * @name $httpBackend\n * @requires $window\n * @requires $document\n *\n * @description\n * HTTP backend used by the {@link ng.$http service} that delegates to\n * XMLHttpRequest object or JSONP and deals with browser incompatibilities.\n *\n * You should never need to use this service directly, instead use the higher-level abstractions:\n * {@link ng.$http $http} or {@link ngResource.$resource $resource}.\n *\n * During testing this implementation is swapped with {@link ngMock.$httpBackend mock\n * $httpBackend} which can be trained with responses.\n */\nfunction $HttpBackendProvider() {\n  this.$get = ['$browser', '$window', '$document', function($browser, $window, $document) {\n    return createHttpBackend($browser, createXhr, $browser.defer, $window.angular.callbacks, $document[0]);\n  }];\n}\n\nfunction createHttpBackend($browser, createXhr, $browserDefer, callbacks, rawDocument) {\n  var ABORTED = -1;\n\n  // TODO(vojta): fix the signature\n  return function(method, url, post, callback, headers, timeout, withCredentials, responseType) {\n    var status;\n    $browser.$$incOutstandingRequestCount();\n    url = url || $browser.url();\n\n    if (lowercase(method) == 'jsonp') {\n      var callbackId = '_' + (callbacks.counter++).toString(36);\n      callbacks[callbackId] = function(data) {\n        callbacks[callbackId].data = data;\n        callbacks[callbackId].called = true;\n      };\n\n      var jsonpDone = jsonpReq(url.replace('JSON_CALLBACK', 'angular.callbacks.' + callbackId),\n          callbackId, function(status, text) {\n        completeRequest(callback, status, callbacks[callbackId].data, \"\", text);\n        callbacks[callbackId] = noop;\n      });\n    } else {\n\n      var xhr = createXhr(method);\n\n      xhr.open(method, url, true);\n      forEach(headers, function(value, key) {\n        if (isDefined(value)) {\n            xhr.setRequestHeader(key, value);\n        }\n      });\n\n      // In IE6 and 7, this might be called synchronously when xhr.send below is called and the\n      // response is in the cache. the promise api will ensure that to the app code the api is\n      // always async\n      xhr.onreadystatechange = function() {\n        // onreadystatechange might get called multiple times with readyState === 4 on mobile webkit caused by\n        // xhrs that are resolved while the app is in the background (see #5426).\n        // since calling completeRequest sets the `xhr` variable to null, we just check if it's not null before\n        // continuing\n        //\n        // we can't set xhr.onreadystatechange to undefined or delete it because that breaks IE8 (method=PATCH) and\n        // Safari respectively.\n        if (xhr && xhr.readyState == 4) {\n          var responseHeaders = null,\n              response = null,\n              statusText = '';\n\n          if(status !== ABORTED) {\n            responseHeaders = xhr.getAllResponseHeaders();\n\n            // responseText is the old-school way of retrieving response (supported by IE8 & 9)\n            // response/responseType properties were introduced in XHR Level2 spec (supported by IE10)\n            response = ('response' in xhr) ? xhr.response : xhr.responseText;\n          }\n\n          // Accessing statusText on an aborted xhr object will\n          // throw an 'c00c023f error' in IE9 and lower, don't touch it.\n          if (!(status === ABORTED && msie < 10)) {\n            statusText = xhr.statusText;\n          }\n\n          completeRequest(callback,\n              status || xhr.status,\n              response,\n              responseHeaders,\n              statusText);\n        }\n      };\n\n      if (withCredentials) {\n        xhr.withCredentials = true;\n      }\n\n      if (responseType) {\n        try {\n          xhr.responseType = responseType;\n        } catch (e) {\n          // WebKit added support for the json responseType value on 09/03/2013\n          // https://bugs.webkit.org/show_bug.cgi?id=73648. Versions of Safari prior to 7 are\n          // known to throw when setting the value \"json\" as the response type. Other older\n          // browsers implementing the responseType\n          //\n          // The json response type can be ignored if not supported, because JSON payloads are\n          // parsed on the client-side regardless.\n          if (responseType !== 'json') {\n            throw e;\n          }\n        }\n      }\n\n      xhr.send(post || null);\n    }\n\n    if (timeout > 0) {\n      var timeoutId = $browserDefer(timeoutRequest, timeout);\n    } else if (isPromiseLike(timeout)) {\n      timeout.then(timeoutRequest);\n    }\n\n\n    function timeoutRequest() {\n      status = ABORTED;\n      jsonpDone && jsonpDone();\n      xhr && xhr.abort();\n    }\n\n    function completeRequest(callback, status, response, headersString, statusText) {\n      // cancel timeout and subsequent timeout promise resolution\n      timeoutId && $browserDefer.cancel(timeoutId);\n      jsonpDone = xhr = null;\n\n      // fix status code when it is 0 (0 status is undocumented).\n      // Occurs when accessing file resources or on Android 4.1 stock browser\n      // while retrieving files from application cache.\n      if (status === 0) {\n        status = response ? 200 : urlResolve(url).protocol == 'file' ? 404 : 0;\n      }\n\n      // normalize IE bug (http://bugs.jquery.com/ticket/1450)\n      status = status === 1223 ? 204 : status;\n      statusText = statusText || '';\n\n      callback(status, response, headersString, statusText);\n      $browser.$$completeOutstandingRequest(noop);\n    }\n  };\n\n  function jsonpReq(url, callbackId, done) {\n    // we can't use jQuery/jqLite here because jQuery does crazy shit with script elements, e.g.:\n    // - fetches local scripts via XHR and evals them\n    // - adds and immediately removes script elements from the document\n    var script = rawDocument.createElement('script'), callback = null;\n    script.type = \"text/javascript\";\n    script.src = url;\n    script.async = true;\n\n    callback = function(event) {\n      removeEventListenerFn(script, \"load\", callback);\n      removeEventListenerFn(script, \"error\", callback);\n      rawDocument.body.removeChild(script);\n      script = null;\n      var status = -1;\n      var text = \"unknown\";\n\n      if (event) {\n        if (event.type === \"load\" && !callbacks[callbackId].called) {\n          event = { type: \"error\" };\n        }\n        text = event.type;\n        status = event.type === \"error\" ? 404 : 200;\n      }\n\n      if (done) {\n        done(status, text);\n      }\n    };\n\n    addEventListenerFn(script, \"load\", callback);\n    addEventListenerFn(script, \"error\", callback);\n\n    if (msie <= 8) {\n      script.onreadystatechange = function() {\n        if (isString(script.readyState) && /loaded|complete/.test(script.readyState)) {\n          script.onreadystatechange = null;\n          callback({\n            type: 'load'\n          });\n        }\n      };\n    }\n\n    rawDocument.body.appendChild(script);\n    return callback;\n  }\n}\n\nvar $interpolateMinErr = minErr('$interpolate');\n\n/**\n * @ngdoc provider\n * @name $interpolateProvider\n * @kind function\n *\n * @description\n *\n * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.\n *\n * @example\n<example module=\"customInterpolationApp\">\n<file name=\"index.html\">\n<script>\n  var customInterpolationApp = angular.module('customInterpolationApp', []);\n\n  customInterpolationApp.config(function($interpolateProvider) {\n    $interpolateProvider.startSymbol('//');\n    $interpolateProvider.endSymbol('//');\n  });\n\n\n  customInterpolationApp.controller('DemoController', function() {\n      this.label = \"This binding is brought you by // interpolation symbols.\";\n  });\n</script>\n<div ng-app=\"App\" ng-controller=\"DemoController as demo\">\n    //demo.label//\n</div>\n</file>\n<file name=\"protractor.js\" type=\"protractor\">\n  it('should interpolate binding with custom symbols', function() {\n    expect(element(by.binding('demo.label')).getText()).toBe('This binding is brought you by // interpolation symbols.');\n  });\n</file>\n</example>\n */\nfunction $InterpolateProvider() {\n  var startSymbol = '{{';\n  var endSymbol = '}}';\n\n  /**\n   * @ngdoc method\n   * @name $interpolateProvider#startSymbol\n   * @description\n   * Symbol to denote start of expression in the interpolated string. Defaults to `{{`.\n   *\n   * @param {string=} value new value to set the starting symbol to.\n   * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n   */\n  this.startSymbol = function(value){\n    if (value) {\n      startSymbol = value;\n      return this;\n    } else {\n      return startSymbol;\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name $interpolateProvider#endSymbol\n   * @description\n   * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n   *\n   * @param {string=} value new value to set the ending symbol to.\n   * @returns {string|self} Returns the symbol when used as getter and self if used as setter.\n   */\n  this.endSymbol = function(value){\n    if (value) {\n      endSymbol = value;\n      return this;\n    } else {\n      return endSymbol;\n    }\n  };\n\n\n  this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {\n    var startSymbolLength = startSymbol.length,\n        endSymbolLength = endSymbol.length;\n\n    /**\n     * @ngdoc service\n     * @name $interpolate\n     * @kind function\n     *\n     * @requires $parse\n     * @requires $sce\n     *\n     * @description\n     *\n     * Compiles a string with markup into an interpolation function. This service is used by the\n     * HTML {@link ng.$compile $compile} service for data binding. See\n     * {@link ng.$interpolateProvider $interpolateProvider} for configuring the\n     * interpolation markup.\n     *\n     *\n     * ```js\n     *   var $interpolate = ...; // injected\n     *   var exp = $interpolate('Hello {{name | uppercase}}!');\n     *   expect(exp({name:'Angular'}).toEqual('Hello ANGULAR!');\n     * ```\n     *\n     *\n     * @param {string} text The text with markup to interpolate.\n     * @param {boolean=} mustHaveExpression if set to true then the interpolation string must have\n     *    embedded expression in order to return an interpolation function. Strings with no\n     *    embedded expression will return null for the interpolation function.\n     * @param {string=} trustedContext when provided, the returned function passes the interpolated\n     *    result through {@link ng.$sce#getTrusted $sce.getTrusted(interpolatedResult,\n     *    trustedContext)} before returning it.  Refer to the {@link ng.$sce $sce} service that\n     *    provides Strict Contextual Escaping for details.\n     * @returns {function(context)} an interpolation function which is used to compute the\n     *    interpolated string. The function has these parameters:\n     *\n     *    * `context`: an object against which any expressions embedded in the strings are evaluated\n     *      against.\n     *\n     */\n    function $interpolate(text, mustHaveExpression, trustedContext) {\n      var startIndex,\n          endIndex,\n          index = 0,\n          parts = [],\n          length = text.length,\n          hasInterpolation = false,\n          fn,\n          exp,\n          concat = [];\n\n      while(index < length) {\n        if ( ((startIndex = text.indexOf(startSymbol, index)) != -1) &&\n             ((endIndex = text.indexOf(endSymbol, startIndex + startSymbolLength)) != -1) ) {\n          (index != startIndex) && parts.push(text.substring(index, startIndex));\n          parts.push(fn = $parse(exp = text.substring(startIndex + startSymbolLength, endIndex)));\n          fn.exp = exp;\n          index = endIndex + endSymbolLength;\n          hasInterpolation = true;\n        } else {\n          // we did not find anything, so we have to add the remainder to the parts array\n          (index != length) && parts.push(text.substring(index));\n          index = length;\n        }\n      }\n\n      if (!(length = parts.length)) {\n        // we added, nothing, must have been an empty string.\n        parts.push('');\n        length = 1;\n      }\n\n      // Concatenating expressions makes it hard to reason about whether some combination of\n      // concatenated values are unsafe to use and could easily lead to XSS.  By requiring that a\n      // single expression be used for iframe[src], object[src], etc., we ensure that the value\n      // that's used is assigned or constructed by some JS code somewhere that is more testable or\n      // make it obvious that you bound the value to some user controlled value.  This helps reduce\n      // the load when auditing for XSS issues.\n      if (trustedContext && parts.length > 1) {\n          throw $interpolateMinErr('noconcat',\n              \"Error while interpolating: {0}\\nStrict Contextual Escaping disallows \" +\n              \"interpolations that concatenate multiple expressions when a trusted value is \" +\n              \"required.  See http://docs.angularjs.org/api/ng.$sce\", text);\n      }\n\n      if (!mustHaveExpression  || hasInterpolation) {\n        concat.length = length;\n        fn = function(context) {\n          try {\n            for(var i = 0, ii = length, part; i<ii; i++) {\n              if (typeof (part = parts[i]) == 'function') {\n                part = part(context);\n                if (trustedContext) {\n                  part = $sce.getTrusted(trustedContext, part);\n                } else {\n                  part = $sce.valueOf(part);\n                }\n                if (part == null) { // null || undefined\n                  part = '';\n                } else {\n                  switch (typeof part) {\n                    case 'string':\n                    {\n                      break;\n                    }\n                    case 'number':\n                    {\n                      part = '' + part;\n                      break;\n                    }\n                    default:\n                    {\n                      part = toJson(part);\n                    }\n                  }\n                }\n              }\n              concat[i] = part;\n            }\n            return concat.join('');\n          }\n          catch(err) {\n            var newErr = $interpolateMinErr('interr', \"Can't interpolate: {0}\\n{1}\", text,\n                err.toString());\n            $exceptionHandler(newErr);\n          }\n        };\n        fn.exp = text;\n        fn.parts = parts;\n        return fn;\n      }\n    }\n\n\n    /**\n     * @ngdoc method\n     * @name $interpolate#startSymbol\n     * @description\n     * Symbol to denote the start of expression in the interpolated string. Defaults to `{{`.\n     *\n     * Use {@link ng.$interpolateProvider#startSymbol $interpolateProvider#startSymbol} to change\n     * the symbol.\n     *\n     * @returns {string} start symbol.\n     */\n    $interpolate.startSymbol = function() {\n      return startSymbol;\n    };\n\n\n    /**\n     * @ngdoc method\n     * @name $interpolate#endSymbol\n     * @description\n     * Symbol to denote the end of expression in the interpolated string. Defaults to `}}`.\n     *\n     * Use {@link ng.$interpolateProvider#endSymbol $interpolateProvider#endSymbol} to change\n     * the symbol.\n     *\n     * @returns {string} end symbol.\n     */\n    $interpolate.endSymbol = function() {\n      return endSymbol;\n    };\n\n    return $interpolate;\n  }];\n}\n\nfunction $IntervalProvider() {\n  this.$get = ['$rootScope', '$window', '$q',\n       function($rootScope,   $window,   $q) {\n    var intervals = {};\n\n\n     /**\n      * @ngdoc service\n      * @name $interval\n      *\n      * @description\n      * Angular's wrapper for `window.setInterval`. The `fn` function is executed every `delay`\n      * milliseconds.\n      *\n      * The return value of registering an interval function is a promise. This promise will be\n      * notified upon each tick of the interval, and will be resolved after `count` iterations, or\n      * run indefinitely if `count` is not defined. The value of the notification will be the\n      * number of iterations that have run.\n      * To cancel an interval, call `$interval.cancel(promise)`.\n      *\n      * In tests you can use {@link ngMock.$interval#flush `$interval.flush(millis)`} to\n      * move forward by `millis` milliseconds and trigger any functions scheduled to run in that\n      * time.\n      *\n      * <div class=\"alert alert-warning\">\n      * **Note**: Intervals created by this service must be explicitly destroyed when you are finished\n      * with them.  In particular they are not automatically destroyed when a controller's scope or a\n      * directive's element are destroyed.\n      * You should take this into consideration and make sure to always cancel the interval at the\n      * appropriate moment.  See the example below for more details on how and when to do this.\n      * </div>\n      *\n      * @param {function()} fn A function that should be called repeatedly.\n      * @param {number} delay Number of milliseconds between each function call.\n      * @param {number=} [count=0] Number of times to repeat. If not set, or 0, will repeat\n      *   indefinitely.\n      * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n      *   will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n      * @returns {promise} A promise which will be notified on each iteration.\n      *\n      * @example\n      * <example module=\"intervalExample\">\n      * <file name=\"index.html\">\n      *   <script>\n      *     angular.module('intervalExample', [])\n      *       .controller('ExampleController', ['$scope', '$interval',\n      *         function($scope, $interval) {\n      *           $scope.format = 'M/d/yy h:mm:ss a';\n      *           $scope.blood_1 = 100;\n      *           $scope.blood_2 = 120;\n      *\n      *           var stop;\n      *           $scope.fight = function() {\n      *             // Don't start a new fight if we are already fighting\n      *             if ( angular.isDefined(stop) ) return;\n      *\n      *           stop = $interval(function() {\n      *             if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {\n      *               $scope.blood_1 = $scope.blood_1 - 3;\n      *               $scope.blood_2 = $scope.blood_2 - 4;\n      *             } else {\n      *               $scope.stopFight();\n      *             }\n      *           }, 100);\n      *         };\n      *\n      *         $scope.stopFight = function() {\n      *           if (angular.isDefined(stop)) {\n      *             $interval.cancel(stop);\n      *             stop = undefined;\n      *           }\n      *         };\n      *\n      *         $scope.resetFight = function() {\n      *           $scope.blood_1 = 100;\n      *           $scope.blood_2 = 120;\n      *         };\n      *\n      *         $scope.$on('$destroy', function() {\n      *           // Make sure that the interval nis destroyed too\n      *           $scope.stopFight();\n      *         });\n      *       }])\n      *       // Register the 'myCurrentTime' directive factory method.\n      *       // We inject $interval and dateFilter service since the factory method is DI.\n      *       .directive('myCurrentTime', ['$interval', 'dateFilter',\n      *         function($interval, dateFilter) {\n      *           // return the directive link function. (compile function not needed)\n      *           return function(scope, element, attrs) {\n      *             var format,  // date format\n      *                 stopTime; // so that we can cancel the time updates\n      *\n      *             // used to update the UI\n      *             function updateTime() {\n      *               element.text(dateFilter(new Date(), format));\n      *             }\n      *\n      *             // watch the expression, and update the UI on change.\n      *             scope.$watch(attrs.myCurrentTime, function(value) {\n      *               format = value;\n      *               updateTime();\n      *             });\n      *\n      *             stopTime = $interval(updateTime, 1000);\n      *\n      *             // listen on DOM destroy (removal) event, and cancel the next UI update\n      *             // to prevent updating time after the DOM element was removed.\n      *             element.bind('$destroy', function() {\n      *               $interval.cancel(stopTime);\n      *             });\n      *           }\n      *         }]);\n      *   </script>\n      *\n      *   <div>\n      *     <div ng-controller=\"ExampleController\">\n      *       Date format: <input ng-model=\"format\"> <hr/>\n      *       Current time is: <span my-current-time=\"format\"></span>\n      *       <hr/>\n      *       Blood 1 : <font color='red'>{{blood_1}}</font>\n      *       Blood 2 : <font color='red'>{{blood_2}}</font>\n      *       <button type=\"button\" data-ng-click=\"fight()\">Fight</button>\n      *       <button type=\"button\" data-ng-click=\"stopFight()\">StopFight</button>\n      *       <button type=\"button\" data-ng-click=\"resetFight()\">resetFight</button>\n      *     </div>\n      *   </div>\n      *\n      * </file>\n      * </example>\n      */\n    function interval(fn, delay, count, invokeApply) {\n      var setInterval = $window.setInterval,\n          clearInterval = $window.clearInterval,\n          deferred = $q.defer(),\n          promise = deferred.promise,\n          iteration = 0,\n          skipApply = (isDefined(invokeApply) && !invokeApply);\n\n      count = isDefined(count) ? count : 0;\n\n      promise.then(null, null, fn);\n\n      promise.$$intervalId = setInterval(function tick() {\n        deferred.notify(iteration++);\n\n        if (count > 0 && iteration >= count) {\n          deferred.resolve(iteration);\n          clearInterval(promise.$$intervalId);\n          delete intervals[promise.$$intervalId];\n        }\n\n        if (!skipApply) $rootScope.$apply();\n\n      }, delay);\n\n      intervals[promise.$$intervalId] = deferred;\n\n      return promise;\n    }\n\n\n     /**\n      * @ngdoc method\n      * @name $interval#cancel\n      *\n      * @description\n      * Cancels a task associated with the `promise`.\n      *\n      * @param {promise} promise returned by the `$interval` function.\n      * @returns {boolean} Returns `true` if the task was successfully canceled.\n      */\n    interval.cancel = function(promise) {\n      if (promise && promise.$$intervalId in intervals) {\n        intervals[promise.$$intervalId].reject('canceled');\n        $window.clearInterval(promise.$$intervalId);\n        delete intervals[promise.$$intervalId];\n        return true;\n      }\n      return false;\n    };\n\n    return interval;\n  }];\n}\n\n/**\n * @ngdoc service\n * @name $locale\n *\n * @description\n * $locale service provides localization rules for various Angular components. As of right now the\n * only public api is:\n *\n * * `id` – `{string}` – locale id formatted as `languageId-countryId` (e.g. `en-us`)\n */\nfunction $LocaleProvider(){\n  this.$get = function() {\n    return {\n      id: 'en-us',\n\n      NUMBER_FORMATS: {\n        DECIMAL_SEP: '.',\n        GROUP_SEP: ',',\n        PATTERNS: [\n          { // Decimal Pattern\n            minInt: 1,\n            minFrac: 0,\n            maxFrac: 3,\n            posPre: '',\n            posSuf: '',\n            negPre: '-',\n            negSuf: '',\n            gSize: 3,\n            lgSize: 3\n          },{ //Currency Pattern\n            minInt: 1,\n            minFrac: 2,\n            maxFrac: 2,\n            posPre: '\\u00A4',\n            posSuf: '',\n            negPre: '(\\u00A4',\n            negSuf: ')',\n            gSize: 3,\n            lgSize: 3\n          }\n        ],\n        CURRENCY_SYM: '$'\n      },\n\n      DATETIME_FORMATS: {\n        MONTH:\n            'January,February,March,April,May,June,July,August,September,October,November,December'\n            .split(','),\n        SHORTMONTH:  'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split(','),\n        DAY: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday'.split(','),\n        SHORTDAY: 'Sun,Mon,Tue,Wed,Thu,Fri,Sat'.split(','),\n        AMPMS: ['AM','PM'],\n        medium: 'MMM d, y h:mm:ss a',\n        short: 'M/d/yy h:mm a',\n        fullDate: 'EEEE, MMMM d, y',\n        longDate: 'MMMM d, y',\n        mediumDate: 'MMM d, y',\n        shortDate: 'M/d/yy',\n        mediumTime: 'h:mm:ss a',\n        shortTime: 'h:mm a'\n      },\n\n      pluralCat: function(num) {\n        if (num === 1) {\n          return 'one';\n        }\n        return 'other';\n      }\n    };\n  };\n}\n\nvar PATH_MATCH = /^([^\\?#]*)(\\?([^#]*))?(#(.*))?$/,\n    DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};\nvar $locationMinErr = minErr('$location');\n\n\n/**\n * Encode path using encodeUriSegment, ignoring forward slashes\n *\n * @param {string} path Path to encode\n * @returns {string}\n */\nfunction encodePath(path) {\n  var segments = path.split('/'),\n      i = segments.length;\n\n  while (i--) {\n    segments[i] = encodeUriSegment(segments[i]);\n  }\n\n  return segments.join('/');\n}\n\nfunction parseAbsoluteUrl(absoluteUrl, locationObj, appBase) {\n  var parsedUrl = urlResolve(absoluteUrl, appBase);\n\n  locationObj.$$protocol = parsedUrl.protocol;\n  locationObj.$$host = parsedUrl.hostname;\n  locationObj.$$port = int(parsedUrl.port) || DEFAULT_PORTS[parsedUrl.protocol] || null;\n}\n\n\nfunction parseAppUrl(relativeUrl, locationObj, appBase) {\n  var prefixed = (relativeUrl.charAt(0) !== '/');\n  if (prefixed) {\n    relativeUrl = '/' + relativeUrl;\n  }\n  var match = urlResolve(relativeUrl, appBase);\n  locationObj.$$path = decodeURIComponent(prefixed && match.pathname.charAt(0) === '/' ?\n      match.pathname.substring(1) : match.pathname);\n  locationObj.$$search = parseKeyValue(match.search);\n  locationObj.$$hash = decodeURIComponent(match.hash);\n\n  // make sure path starts with '/';\n  if (locationObj.$$path && locationObj.$$path.charAt(0) != '/') {\n    locationObj.$$path = '/' + locationObj.$$path;\n  }\n}\n\n\n/**\n *\n * @param {string} begin\n * @param {string} whole\n * @returns {string} returns text from whole after begin or undefined if it does not begin with\n *                   expected string.\n */\nfunction beginsWith(begin, whole) {\n  if (whole.indexOf(begin) === 0) {\n    return whole.substr(begin.length);\n  }\n}\n\n\nfunction stripHash(url) {\n  var index = url.indexOf('#');\n  return index == -1 ? url : url.substr(0, index);\n}\n\n\nfunction stripFile(url) {\n  return url.substr(0, stripHash(url).lastIndexOf('/') + 1);\n}\n\n/* return the server only (scheme://host:port) */\nfunction serverBase(url) {\n  return url.substring(0, url.indexOf('/', url.indexOf('//') + 2));\n}\n\n\n/**\n * LocationHtml5Url represents an url\n * This object is exposed as $location service when HTML5 mode is enabled and supported\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} basePrefix url path prefix\n */\nfunction LocationHtml5Url(appBase, basePrefix) {\n  this.$$html5 = true;\n  basePrefix = basePrefix || '';\n  var appBaseNoFile = stripFile(appBase);\n  parseAbsoluteUrl(appBase, this, appBase);\n\n\n  /**\n   * Parse given html5 (regular) url string into properties\n   * @param {string} newAbsoluteUrl HTML5 url\n   * @private\n   */\n  this.$$parse = function(url) {\n    var pathUrl = beginsWith(appBaseNoFile, url);\n    if (!isString(pathUrl)) {\n      throw $locationMinErr('ipthprfx', 'Invalid url \"{0}\", missing path prefix \"{1}\".', url,\n          appBaseNoFile);\n    }\n\n    parseAppUrl(pathUrl, this, appBase);\n\n    if (!this.$$path) {\n      this.$$path = '/';\n    }\n\n    this.$$compose();\n  };\n\n  /**\n   * Compose url and update `absUrl` property\n   * @private\n   */\n  this.$$compose = function() {\n    var search = toKeyValue(this.$$search),\n        hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n    this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n    this.$$absUrl = appBaseNoFile + this.$$url.substr(1); // first char is always '/'\n  };\n\n  this.$$rewrite = function(url) {\n    var appUrl, prevAppUrl;\n\n    if ( (appUrl = beginsWith(appBase, url)) !== undefined ) {\n      prevAppUrl = appUrl;\n      if ( (appUrl = beginsWith(basePrefix, appUrl)) !== undefined ) {\n        return appBaseNoFile + (beginsWith('/', appUrl) || appUrl);\n      } else {\n        return appBase + prevAppUrl;\n      }\n    } else if ( (appUrl = beginsWith(appBaseNoFile, url)) !== undefined ) {\n      return appBaseNoFile + appUrl;\n    } else if (appBaseNoFile == url + '/') {\n      return appBaseNoFile;\n    }\n  };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when developer doesn't opt into html5 mode.\n * It also serves as the base class for html5 mode fallback on legacy browsers.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangUrl(appBase, hashPrefix) {\n  var appBaseNoFile = stripFile(appBase);\n\n  parseAbsoluteUrl(appBase, this, appBase);\n\n\n  /**\n   * Parse given hashbang url into properties\n   * @param {string} url Hashbang url\n   * @private\n   */\n  this.$$parse = function(url) {\n    var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);\n    var withoutHashUrl = withoutBaseUrl.charAt(0) == '#'\n        ? beginsWith(hashPrefix, withoutBaseUrl)\n        : (this.$$html5)\n          ? withoutBaseUrl\n          : '';\n\n    if (!isString(withoutHashUrl)) {\n      throw $locationMinErr('ihshprfx', 'Invalid url \"{0}\", missing hash prefix \"{1}\".', url,\n          hashPrefix);\n    }\n    parseAppUrl(withoutHashUrl, this, appBase);\n\n    this.$$path = removeWindowsDriveName(this.$$path, withoutHashUrl, appBase);\n\n    this.$$compose();\n\n    /*\n     * In Windows, on an anchor node on documents loaded from\n     * the filesystem, the browser will return a pathname\n     * prefixed with the drive name ('/C:/path') when a\n     * pathname without a drive is set:\n     *  * a.setAttribute('href', '/foo')\n     *   * a.pathname === '/C:/foo' //true\n     *\n     * Inside of Angular, we're always using pathnames that\n     * do not include drive names for routing.\n     */\n    function removeWindowsDriveName (path, url, base) {\n      /*\n      Matches paths for file protocol on windows,\n      such as /C:/foo/bar, and captures only /foo/bar.\n      */\n      var windowsFilePathExp = /^\\/[A-Z]:(\\/.*)/;\n\n      var firstPathSegmentMatch;\n\n      //Get the relative path from the input URL.\n      if (url.indexOf(base) === 0) {\n        url = url.replace(base, '');\n      }\n\n      // The input URL intentionally contains a first path segment that ends with a colon.\n      if (windowsFilePathExp.exec(url)) {\n        return path;\n      }\n\n      firstPathSegmentMatch = windowsFilePathExp.exec(path);\n      return firstPathSegmentMatch ? firstPathSegmentMatch[1] : path;\n    }\n  };\n\n  /**\n   * Compose hashbang url and update `absUrl` property\n   * @private\n   */\n  this.$$compose = function() {\n    var search = toKeyValue(this.$$search),\n        hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n    this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n    this.$$absUrl = appBase + (this.$$url ? hashPrefix + this.$$url : '');\n  };\n\n  this.$$rewrite = function(url) {\n    if(stripHash(appBase) == stripHash(url)) {\n      return url;\n    }\n  };\n}\n\n\n/**\n * LocationHashbangUrl represents url\n * This object is exposed as $location service when html5 history api is enabled but the browser\n * does not support it.\n *\n * @constructor\n * @param {string} appBase application base URL\n * @param {string} hashPrefix hashbang prefix\n */\nfunction LocationHashbangInHtml5Url(appBase, hashPrefix) {\n  this.$$html5 = true;\n  LocationHashbangUrl.apply(this, arguments);\n\n  var appBaseNoFile = stripFile(appBase);\n\n  this.$$rewrite = function(url) {\n    var appUrl;\n\n    if ( appBase == stripHash(url) ) {\n      return url;\n    } else if ( (appUrl = beginsWith(appBaseNoFile, url)) ) {\n      return appBase + hashPrefix + appUrl;\n    } else if ( appBaseNoFile === url + '/') {\n      return appBaseNoFile;\n    }\n  };\n\n  this.$$compose = function() {\n    var search = toKeyValue(this.$$search),\n        hash = this.$$hash ? '#' + encodeUriSegment(this.$$hash) : '';\n\n    this.$$url = encodePath(this.$$path) + (search ? '?' + search : '') + hash;\n    // include hashPrefix in $$absUrl when $$url is empty so IE8 & 9 do not reload page because of removal of '#'\n    this.$$absUrl = appBase + hashPrefix + this.$$url;\n  };\n\n}\n\n\nLocationHashbangInHtml5Url.prototype =\n  LocationHashbangUrl.prototype =\n  LocationHtml5Url.prototype = {\n\n  /**\n   * Are we in html5 mode?\n   * @private\n   */\n  $$html5: false,\n\n  /**\n   * Has any change been replacing ?\n   * @private\n   */\n  $$replace: false,\n\n  /**\n   * @ngdoc method\n   * @name $location#absUrl\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return full url representation with all segments encoded according to rules specified in\n   * [RFC 3986](http://www.ietf.org/rfc/rfc3986.txt).\n   *\n   * @return {string} full url\n   */\n  absUrl: locationGetter('$$absUrl'),\n\n  /**\n   * @ngdoc method\n   * @name $location#url\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return url (e.g. `/path?a=b#hash`) when called without any parameter.\n   *\n   * Change path, search and hash, when called with parameter and return `$location`.\n   *\n   * @param {string=} url New url without base prefix (e.g. `/path?a=b#hash`)\n   * @param {string=} replace The path that will be changed\n   * @return {string} url\n   */\n  url: function(url, replace) {\n    if (isUndefined(url))\n      return this.$$url;\n\n    var match = PATH_MATCH.exec(url);\n    if (match[1]) this.path(decodeURIComponent(match[1]));\n    if (match[2] || match[1]) this.search(match[3] || '');\n    this.hash(match[5] || '', replace);\n\n    return this;\n  },\n\n  /**\n   * @ngdoc method\n   * @name $location#protocol\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return protocol of current url.\n   *\n   * @return {string} protocol of current url\n   */\n  protocol: locationGetter('$$protocol'),\n\n  /**\n   * @ngdoc method\n   * @name $location#host\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return host of current url.\n   *\n   * @return {string} host of current url.\n   */\n  host: locationGetter('$$host'),\n\n  /**\n   * @ngdoc method\n   * @name $location#port\n   *\n   * @description\n   * This method is getter only.\n   *\n   * Return port of current url.\n   *\n   * @return {Number} port\n   */\n  port: locationGetter('$$port'),\n\n  /**\n   * @ngdoc method\n   * @name $location#path\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return path of current url when called without any parameter.\n   *\n   * Change path when called with parameter and return `$location`.\n   *\n   * Note: Path should always begin with forward slash (/), this method will add the forward slash\n   * if it is missing.\n   *\n   * @param {string=} path New path\n   * @return {string} path\n   */\n  path: locationGetterSetter('$$path', function(path) {\n    return path.charAt(0) == '/' ? path : '/' + path;\n  }),\n\n  /**\n   * @ngdoc method\n   * @name $location#search\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return search part (as object) of current url when called without any parameter.\n   *\n   * Change search part when called with parameter and return `$location`.\n   *\n   *\n   * ```js\n   * // given url http://example.com/#/some/path?foo=bar&baz=xoxo\n   * var searchObject = $location.search();\n   * // => {foo: 'bar', baz: 'xoxo'}\n   *\n   *\n   * // set foo to 'yipee'\n   * $location.search('foo', 'yipee');\n   * // => $location\n   * ```\n   *\n   * @param {string|Object.<string>|Object.<Array.<string>>} search New search params - string or\n   * hash object.\n   *\n   * When called with a single argument the method acts as a setter, setting the `search` component\n   * of `$location` to the specified value.\n   *\n   * If the argument is a hash object containing an array of values, these values will be encoded\n   * as duplicate search parameters in the url.\n   *\n   * @param {(string|Array<string>|boolean)=} paramValue If `search` is a string, then `paramValue`\n   * will override only a single search property.\n   *\n   * If `paramValue` is an array, it will override the property of the `search` component of\n   * `$location` specified via the first argument.\n   *\n   * If `paramValue` is `null`, the property specified via the first argument will be deleted.\n   *\n   * If `paramValue` is `true`, the property specified via the first argument will be added with no\n   * value nor trailing equal sign.\n   *\n   * @return {Object} If called with no arguments returns the parsed `search` object. If called with\n   * one or more arguments returns `$location` object itself.\n   */\n  search: function(search, paramValue) {\n    switch (arguments.length) {\n      case 0:\n        return this.$$search;\n      case 1:\n        if (isString(search)) {\n          this.$$search = parseKeyValue(search);\n        } else if (isObject(search)) {\n          // remove object undefined or null properties\n          forEach(search, function(value, key) {\n            if (value == null) delete search[key];\n          });\n\n          this.$$search = search;\n        } else {\n          throw $locationMinErr('isrcharg',\n              'The first argument of the `$location#search()` call must be a string or an object.');\n        }\n        break;\n      default:\n        if (isUndefined(paramValue) || paramValue === null) {\n          delete this.$$search[search];\n        } else {\n          this.$$search[search] = paramValue;\n        }\n    }\n\n    this.$$compose();\n    return this;\n  },\n\n  /**\n   * @ngdoc method\n   * @name $location#hash\n   *\n   * @description\n   * This method is getter / setter.\n   *\n   * Return hash fragment when called without any parameter.\n   *\n   * Change hash fragment when called with parameter and return `$location`.\n   *\n   * @param {string=} hash New hash fragment\n   * @return {string} hash\n   */\n  hash: locationGetterSetter('$$hash', identity),\n\n  /**\n   * @ngdoc method\n   * @name $location#replace\n   *\n   * @description\n   * If called, all changes to $location during current `$digest` will be replacing current history\n   * record, instead of adding new one.\n   */\n  replace: function() {\n    this.$$replace = true;\n    return this;\n  }\n};\n\nfunction locationGetter(property) {\n  return function() {\n    return this[property];\n  };\n}\n\n\nfunction locationGetterSetter(property, preprocess) {\n  return function(value) {\n    if (isUndefined(value))\n      return this[property];\n\n    this[property] = preprocess(value);\n    this.$$compose();\n\n    return this;\n  };\n}\n\n\n/**\n * @ngdoc service\n * @name $location\n *\n * @requires $rootElement\n *\n * @description\n * The $location service parses the URL in the browser address bar (based on the\n * [window.location](https://developer.mozilla.org/en/window.location)) and makes the URL\n * available to your application. Changes to the URL in the address bar are reflected into\n * $location service and changes to $location are reflected into the browser address bar.\n *\n * **The $location service:**\n *\n * - Exposes the current URL in the browser address bar, so you can\n *   - Watch and observe the URL.\n *   - Change the URL.\n * - Synchronizes the URL with the browser when the user\n *   - Changes the address bar.\n *   - Clicks the back or forward button (or clicks a History link).\n *   - Clicks on a link.\n * - Represents the URL object as a set of methods (protocol, host, port, path, search, hash).\n *\n * For more information see {@link guide/$location Developer Guide: Using $location}\n */\n\n/**\n * @ngdoc provider\n * @name $locationProvider\n * @description\n * Use the `$locationProvider` to configure how the application deep linking paths are stored.\n */\nfunction $LocationProvider(){\n  var hashPrefix = '',\n      html5Mode = false;\n\n  /**\n   * @ngdoc method\n   * @name $locationProvider#hashPrefix\n   * @description\n   * @param {string=} prefix Prefix for hash part (containing path and search)\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   */\n  this.hashPrefix = function(prefix) {\n    if (isDefined(prefix)) {\n      hashPrefix = prefix;\n      return this;\n    } else {\n      return hashPrefix;\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name $locationProvider#html5Mode\n   * @description\n   * @param {boolean=} mode Use HTML5 strategy if available.\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   */\n  this.html5Mode = function(mode) {\n    if (isDefined(mode)) {\n      html5Mode = mode;\n      return this;\n    } else {\n      return html5Mode;\n    }\n  };\n\n  /**\n   * @ngdoc event\n   * @name $location#$locationChangeStart\n   * @eventType broadcast on root scope\n   * @description\n   * Broadcasted before a URL will change. This change can be prevented by calling\n   * `preventDefault` method of the event. See {@link ng.$rootScope.Scope#$on} for more\n   * details about event object. Upon successful change\n   * {@link ng.$location#events_$locationChangeSuccess $locationChangeSuccess} is fired.\n   *\n   * @param {Object} angularEvent Synthetic event object.\n   * @param {string} newUrl New URL\n   * @param {string=} oldUrl URL that was before it was changed.\n   */\n\n  /**\n   * @ngdoc event\n   * @name $location#$locationChangeSuccess\n   * @eventType broadcast on root scope\n   * @description\n   * Broadcasted after a URL was changed.\n   *\n   * @param {Object} angularEvent Synthetic event object.\n   * @param {string} newUrl New URL\n   * @param {string=} oldUrl URL that was before it was changed.\n   */\n\n  this.$get = ['$rootScope', '$browser', '$sniffer', '$rootElement',\n      function( $rootScope,   $browser,   $sniffer,   $rootElement) {\n    var $location,\n        LocationMode,\n        baseHref = $browser.baseHref(), // if base[href] is undefined, it defaults to ''\n        initialUrl = $browser.url(),\n        appBase;\n\n    if (html5Mode) {\n      appBase = serverBase(initialUrl) + (baseHref || '/');\n      LocationMode = $sniffer.history ? LocationHtml5Url : LocationHashbangInHtml5Url;\n    } else {\n      appBase = stripHash(initialUrl);\n      LocationMode = LocationHashbangUrl;\n    }\n    $location = new LocationMode(appBase, '#' + hashPrefix);\n    $location.$$parse($location.$$rewrite(initialUrl));\n\n    $rootElement.on('click', function(event) {\n      // TODO(vojta): rewrite link when opening in new tab/window (in legacy browser)\n      // currently we open nice url link and redirect then\n\n      if (event.ctrlKey || event.metaKey || event.which == 2) return;\n\n      var elm = jqLite(event.target);\n\n      // traverse the DOM up to find first A tag\n      while (lowercase(elm[0].nodeName) !== 'a') {\n        // ignore rewriting if no A tag (reached root element, or no parent - removed from document)\n        if (elm[0] === $rootElement[0] || !(elm = elm.parent())[0]) return;\n      }\n\n      var absHref = elm.prop('href');\n\n      if (isObject(absHref) && absHref.toString() === '[object SVGAnimatedString]') {\n        // SVGAnimatedString.animVal should be identical to SVGAnimatedString.baseVal, unless during\n        // an animation.\n        absHref = urlResolve(absHref.animVal).href;\n      }\n\n      // Make relative links work in HTML5 mode for legacy browsers (or at least IE8 & 9)\n      // The href should be a regular url e.g. /link/somewhere or link/somewhere or ../somewhere or\n      // somewhere#anchor or http://example.com/somewhere\n      if (LocationMode === LocationHashbangInHtml5Url) {\n        // get the actual href attribute - see\n        // http://msdn.microsoft.com/en-us/library/ie/dd347148(v=vs.85).aspx\n        var href = elm.attr('href') || elm.attr('xlink:href');\n\n        if (href.indexOf('://') < 0) {         // Ignore absolute URLs\n          var prefix = '#' + hashPrefix;\n          if (href[0] == '/') {\n            // absolute path - replace old path\n            absHref = appBase + prefix + href;\n          } else if (href[0] == '#') {\n            // local anchor\n            absHref = appBase + prefix + ($location.path() || '/') + href;\n          } else {\n            // relative path - join with current path\n            var stack = $location.path().split(\"/\"),\n              parts = href.split(\"/\");\n            for (var i=0; i<parts.length; i++) {\n              if (parts[i] == \".\")\n                continue;\n              else if (parts[i] == \"..\")\n                stack.pop();\n              else if (parts[i].length)\n                stack.push(parts[i]);\n            }\n            absHref = appBase + prefix + stack.join('/');\n          }\n        }\n      }\n\n      var rewrittenUrl = $location.$$rewrite(absHref);\n\n      if (absHref && !elm.attr('target') && rewrittenUrl && !event.isDefaultPrevented()) {\n        event.preventDefault();\n        if (rewrittenUrl != $browser.url()) {\n          // update location manually\n          $location.$$parse(rewrittenUrl);\n          $rootScope.$apply();\n          // hack to work around FF6 bug 684208 when scenario runner clicks on links\n          window.angular['ff-684208-preventDefault'] = true;\n        }\n      }\n    });\n\n\n    // rewrite hashbang url <> html5 url\n    if ($location.absUrl() != initialUrl) {\n      $browser.url($location.absUrl(), true);\n    }\n\n    // update $location when $browser url changes\n    $browser.onUrlChange(function(newUrl) {\n      if ($location.absUrl() != newUrl) {\n        $rootScope.$evalAsync(function() {\n          var oldUrl = $location.absUrl();\n\n          $location.$$parse(newUrl);\n          if ($rootScope.$broadcast('$locationChangeStart', newUrl,\n                                    oldUrl).defaultPrevented) {\n            $location.$$parse(oldUrl);\n            $browser.url(oldUrl);\n          } else {\n            afterLocationChange(oldUrl);\n          }\n        });\n        if (!$rootScope.$$phase) $rootScope.$digest();\n      }\n    });\n\n    // update browser\n    var changeCounter = 0;\n    $rootScope.$watch(function $locationWatch() {\n      var oldUrl = $browser.url();\n      var currentReplace = $location.$$replace;\n\n      if (!changeCounter || oldUrl != $location.absUrl()) {\n        changeCounter++;\n        $rootScope.$evalAsync(function() {\n          if ($rootScope.$broadcast('$locationChangeStart', $location.absUrl(), oldUrl).\n              defaultPrevented) {\n            $location.$$parse(oldUrl);\n          } else {\n            $browser.url($location.absUrl(), currentReplace);\n            afterLocationChange(oldUrl);\n          }\n        });\n      }\n      $location.$$replace = false;\n\n      return changeCounter;\n    });\n\n    return $location;\n\n    function afterLocationChange(oldUrl) {\n      $rootScope.$broadcast('$locationChangeSuccess', $location.absUrl(), oldUrl);\n    }\n}];\n}\n\n/**\n * @ngdoc service\n * @name $log\n * @requires $window\n *\n * @description\n * Simple service for logging. Default implementation safely writes the message\n * into the browser's console (if present).\n *\n * The main purpose of this service is to simplify debugging and troubleshooting.\n *\n * The default is to log `debug` messages. You can use\n * {@link ng.$logProvider ng.$logProvider#debugEnabled} to change this.\n *\n * @example\n   <example module=\"logExample\">\n     <file name=\"script.js\">\n       angular.module('logExample', [])\n         .controller('LogController', ['$scope', '$log', function($scope, $log) {\n           $scope.$log = $log;\n           $scope.message = 'Hello World!';\n         }]);\n     </file>\n     <file name=\"index.html\">\n       <div ng-controller=\"LogController\">\n         <p>Reload this page with open console, enter text and hit the log button...</p>\n         Message:\n         <input type=\"text\" ng-model=\"message\"/>\n         <button ng-click=\"$log.log(message)\">log</button>\n         <button ng-click=\"$log.warn(message)\">warn</button>\n         <button ng-click=\"$log.info(message)\">info</button>\n         <button ng-click=\"$log.error(message)\">error</button>\n       </div>\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc provider\n * @name $logProvider\n * @description\n * Use the `$logProvider` to configure how the application logs messages\n */\nfunction $LogProvider(){\n  var debug = true,\n      self = this;\n\n  /**\n   * @ngdoc method\n   * @name $logProvider#debugEnabled\n   * @description\n   * @param {boolean=} flag enable or disable debug level messages\n   * @returns {*} current value if used as getter or itself (chaining) if used as setter\n   */\n  this.debugEnabled = function(flag) {\n    if (isDefined(flag)) {\n      debug = flag;\n    return this;\n    } else {\n      return debug;\n    }\n  };\n\n  this.$get = ['$window', function($window){\n    return {\n      /**\n       * @ngdoc method\n       * @name $log#log\n       *\n       * @description\n       * Write a log message\n       */\n      log: consoleLog('log'),\n\n      /**\n       * @ngdoc method\n       * @name $log#info\n       *\n       * @description\n       * Write an information message\n       */\n      info: consoleLog('info'),\n\n      /**\n       * @ngdoc method\n       * @name $log#warn\n       *\n       * @description\n       * Write a warning message\n       */\n      warn: consoleLog('warn'),\n\n      /**\n       * @ngdoc method\n       * @name $log#error\n       *\n       * @description\n       * Write an error message\n       */\n      error: consoleLog('error'),\n\n      /**\n       * @ngdoc method\n       * @name $log#debug\n       *\n       * @description\n       * Write a debug message\n       */\n      debug: (function () {\n        var fn = consoleLog('debug');\n\n        return function() {\n          if (debug) {\n            fn.apply(self, arguments);\n          }\n        };\n      }())\n    };\n\n    function formatError(arg) {\n      if (arg instanceof Error) {\n        if (arg.stack) {\n          arg = (arg.message && arg.stack.indexOf(arg.message) === -1)\n              ? 'Error: ' + arg.message + '\\n' + arg.stack\n              : arg.stack;\n        } else if (arg.sourceURL) {\n          arg = arg.message + '\\n' + arg.sourceURL + ':' + arg.line;\n        }\n      }\n      return arg;\n    }\n\n    function consoleLog(type) {\n      var console = $window.console || {},\n          logFn = console[type] || console.log || noop,\n          hasApply = false;\n\n      // Note: reading logFn.apply throws an error in IE11 in IE8 document mode.\n      // The reason behind this is that console.log has type \"object\" in IE8...\n      try {\n        hasApply = !!logFn.apply;\n      } catch (e) {}\n\n      if (hasApply) {\n        return function() {\n          var args = [];\n          forEach(arguments, function(arg) {\n            args.push(formatError(arg));\n          });\n          return logFn.apply(console, args);\n        };\n      }\n\n      // we are IE which either doesn't have window.console => this is noop and we do nothing,\n      // or we are IE where console.log doesn't have apply so we log at least first 2 args\n      return function(arg1, arg2) {\n        logFn(arg1, arg2 == null ? '' : arg2);\n      };\n    }\n  }];\n}\n\nvar $parseMinErr = minErr('$parse');\nvar promiseWarningCache = {};\nvar promiseWarning;\n\n// Sandboxing Angular Expressions\n// ------------------------------\n// Angular expressions are generally considered safe because these expressions only have direct\n// access to $scope and locals. However, one can obtain the ability to execute arbitrary JS code by\n// obtaining a reference to native JS functions such as the Function constructor.\n//\n// As an example, consider the following Angular expression:\n//\n//   {}.toString.constructor('alert(\"evil JS code\")')\n//\n// This sandboxing technique is not perfect and doesn't aim to be. The goal is to prevent exploits\n// against the expression language, but not to prevent exploits that were enabled by exposing\n// sensitive JavaScript or browser apis on Scope. Exposing such objects on a Scope is never a good\n// practice and therefore we are not even trying to protect against interaction with an object\n// explicitly exposed in this way.\n//\n// In general, it is not possible to access a Window object from an angular expression unless a\n// window or some DOM object that has a reference to window is published onto a Scope.\n// Similarly we prevent invocations of function known to be dangerous, as well as assignments to\n// native objects.\n\n\nfunction ensureSafeMemberName(name, fullExpression) {\n  if (name === \"__defineGetter__\" || name === \"__defineSetter__\"\n      || name === \"__lookupGetter__\" || name === \"__lookupSetter__\"\n      || name === \"__proto__\") {\n    throw $parseMinErr('isecfld',\n        'Attempting to access a disallowed field in Angular expressions! '\n        +'Expression: {0}', fullExpression);\n  }\n  return name;\n}\n\nfunction ensureSafeObject(obj, fullExpression) {\n  // nifty check if obj is Function that is fast and works across iframes and other contexts\n  if (obj) {\n    if (obj.constructor === obj) {\n      throw $parseMinErr('isecfn',\n          'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    } else if (// isWindow(obj)\n        obj.document && obj.location && obj.alert && obj.setInterval) {\n      throw $parseMinErr('isecwindow',\n          'Referencing the Window in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    } else if (// isElement(obj)\n        obj.children && (obj.nodeName || (obj.prop && obj.attr && obj.find))) {\n      throw $parseMinErr('isecdom',\n          'Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    } else if (// block Object so that we can't get hold of dangerous Object.* methods\n        obj === Object) {\n      throw $parseMinErr('isecobj',\n          'Referencing Object in Angular expressions is disallowed! Expression: {0}',\n          fullExpression);\n    }\n  }\n  return obj;\n}\n\nvar CALL = Function.prototype.call;\nvar APPLY = Function.prototype.apply;\nvar BIND = Function.prototype.bind;\n\nfunction ensureSafeFunction(obj, fullExpression) {\n  if (obj) {\n    if (obj.constructor === obj) {\n      throw $parseMinErr('isecfn',\n        'Referencing Function in Angular expressions is disallowed! Expression: {0}',\n        fullExpression);\n    } else if (obj === CALL || obj === APPLY || (BIND && obj === BIND)) {\n      throw $parseMinErr('isecff',\n        'Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}',\n        fullExpression);\n    }\n  }\n}\n\nvar OPERATORS = {\n    /* jshint bitwise : false */\n    'null':function(){return null;},\n    'true':function(){return true;},\n    'false':function(){return false;},\n    undefined:noop,\n    '+':function(self, locals, a,b){\n      a=a(self, locals); b=b(self, locals);\n      if (isDefined(a)) {\n        if (isDefined(b)) {\n          return a + b;\n        }\n        return a;\n      }\n      return isDefined(b)?b:undefined;},\n    '-':function(self, locals, a,b){\n          a=a(self, locals); b=b(self, locals);\n          return (isDefined(a)?a:0)-(isDefined(b)?b:0);\n        },\n    '*':function(self, locals, a,b){return a(self, locals)*b(self, locals);},\n    '/':function(self, locals, a,b){return a(self, locals)/b(self, locals);},\n    '%':function(self, locals, a,b){return a(self, locals)%b(self, locals);},\n    '^':function(self, locals, a,b){return a(self, locals)^b(self, locals);},\n    '=':noop,\n    '===':function(self, locals, a, b){return a(self, locals)===b(self, locals);},\n    '!==':function(self, locals, a, b){return a(self, locals)!==b(self, locals);},\n    '==':function(self, locals, a,b){return a(self, locals)==b(self, locals);},\n    '!=':function(self, locals, a,b){return a(self, locals)!=b(self, locals);},\n    '<':function(self, locals, a,b){return a(self, locals)<b(self, locals);},\n    '>':function(self, locals, a,b){return a(self, locals)>b(self, locals);},\n    '<=':function(self, locals, a,b){return a(self, locals)<=b(self, locals);},\n    '>=':function(self, locals, a,b){return a(self, locals)>=b(self, locals);},\n    '&&':function(self, locals, a,b){return a(self, locals)&&b(self, locals);},\n    '||':function(self, locals, a,b){return a(self, locals)||b(self, locals);},\n    '&':function(self, locals, a,b){return a(self, locals)&b(self, locals);},\n//    '|':function(self, locals, a,b){return a|b;},\n    '|':function(self, locals, a,b){return b(self, locals)(self, locals, a(self, locals));},\n    '!':function(self, locals, a){return !a(self, locals);}\n};\n/* jshint bitwise: true */\nvar ESCAPE = {\"n\":\"\\n\", \"f\":\"\\f\", \"r\":\"\\r\", \"t\":\"\\t\", \"v\":\"\\v\", \"'\":\"'\", '\"':'\"'};\n\n\n/////////////////////////////////////////\n\n\n/**\n * @constructor\n */\nvar Lexer = function (options) {\n  this.options = options;\n};\n\nLexer.prototype = {\n  constructor: Lexer,\n\n  lex: function (text) {\n    this.text = text;\n\n    this.index = 0;\n    this.ch = undefined;\n    this.lastCh = ':'; // can start regexp\n\n    this.tokens = [];\n\n    while (this.index < this.text.length) {\n      this.ch = this.text.charAt(this.index);\n      if (this.is('\"\\'')) {\n        this.readString(this.ch);\n      } else if (this.isNumber(this.ch) || this.is('.') && this.isNumber(this.peek())) {\n        this.readNumber();\n      } else if (this.isIdent(this.ch)) {\n        this.readIdent();\n      } else if (this.is('(){}[].,;:?')) {\n        this.tokens.push({\n          index: this.index,\n          text: this.ch\n        });\n        this.index++;\n      } else if (this.isWhitespace(this.ch)) {\n        this.index++;\n        continue;\n      } else {\n        var ch2 = this.ch + this.peek();\n        var ch3 = ch2 + this.peek(2);\n        var fn = OPERATORS[this.ch];\n        var fn2 = OPERATORS[ch2];\n        var fn3 = OPERATORS[ch3];\n        if (fn3) {\n          this.tokens.push({index: this.index, text: ch3, fn: fn3});\n          this.index += 3;\n        } else if (fn2) {\n          this.tokens.push({index: this.index, text: ch2, fn: fn2});\n          this.index += 2;\n        } else if (fn) {\n          this.tokens.push({\n            index: this.index,\n            text: this.ch,\n            fn: fn\n          });\n          this.index += 1;\n        } else {\n          this.throwError('Unexpected next character ', this.index, this.index + 1);\n        }\n      }\n      this.lastCh = this.ch;\n    }\n    return this.tokens;\n  },\n\n  is: function(chars) {\n    return chars.indexOf(this.ch) !== -1;\n  },\n\n  was: function(chars) {\n    return chars.indexOf(this.lastCh) !== -1;\n  },\n\n  peek: function(i) {\n    var num = i || 1;\n    return (this.index + num < this.text.length) ? this.text.charAt(this.index + num) : false;\n  },\n\n  isNumber: function(ch) {\n    return ('0' <= ch && ch <= '9');\n  },\n\n  isWhitespace: function(ch) {\n    // IE treats non-breaking space as \\u00A0\n    return (ch === ' ' || ch === '\\r' || ch === '\\t' ||\n            ch === '\\n' || ch === '\\v' || ch === '\\u00A0');\n  },\n\n  isIdent: function(ch) {\n    return ('a' <= ch && ch <= 'z' ||\n            'A' <= ch && ch <= 'Z' ||\n            '_' === ch || ch === '$');\n  },\n\n  isExpOperator: function(ch) {\n    return (ch === '-' || ch === '+' || this.isNumber(ch));\n  },\n\n  throwError: function(error, start, end) {\n    end = end || this.index;\n    var colStr = (isDefined(start)\n            ? 's ' + start +  '-' + this.index + ' [' + this.text.substring(start, end) + ']'\n            : ' ' + end);\n    throw $parseMinErr('lexerr', 'Lexer Error: {0} at column{1} in expression [{2}].',\n        error, colStr, this.text);\n  },\n\n  readNumber: function() {\n    var number = '';\n    var start = this.index;\n    while (this.index < this.text.length) {\n      var ch = lowercase(this.text.charAt(this.index));\n      if (ch == '.' || this.isNumber(ch)) {\n        number += ch;\n      } else {\n        var peekCh = this.peek();\n        if (ch == 'e' && this.isExpOperator(peekCh)) {\n          number += ch;\n        } else if (this.isExpOperator(ch) &&\n            peekCh && this.isNumber(peekCh) &&\n            number.charAt(number.length - 1) == 'e') {\n          number += ch;\n        } else if (this.isExpOperator(ch) &&\n            (!peekCh || !this.isNumber(peekCh)) &&\n            number.charAt(number.length - 1) == 'e') {\n          this.throwError('Invalid exponent');\n        } else {\n          break;\n        }\n      }\n      this.index++;\n    }\n    number = 1 * number;\n    this.tokens.push({\n      index: start,\n      text: number,\n      literal: true,\n      constant: true,\n      fn: function() { return number; }\n    });\n  },\n\n  readIdent: function() {\n    var parser = this;\n\n    var ident = '';\n    var start = this.index;\n\n    var lastDot, peekIndex, methodName, ch;\n\n    while (this.index < this.text.length) {\n      ch = this.text.charAt(this.index);\n      if (ch === '.' || this.isIdent(ch) || this.isNumber(ch)) {\n        if (ch === '.') lastDot = this.index;\n        ident += ch;\n      } else {\n        break;\n      }\n      this.index++;\n    }\n\n    //check if this is not a method invocation and if it is back out to last dot\n    if (lastDot) {\n      peekIndex = this.index;\n      while (peekIndex < this.text.length) {\n        ch = this.text.charAt(peekIndex);\n        if (ch === '(') {\n          methodName = ident.substr(lastDot - start + 1);\n          ident = ident.substr(0, lastDot - start);\n          this.index = peekIndex;\n          break;\n        }\n        if (this.isWhitespace(ch)) {\n          peekIndex++;\n        } else {\n          break;\n        }\n      }\n    }\n\n\n    var token = {\n      index: start,\n      text: ident\n    };\n\n    // OPERATORS is our own object so we don't need to use special hasOwnPropertyFn\n    if (OPERATORS.hasOwnProperty(ident)) {\n      token.fn = OPERATORS[ident];\n      token.literal = true;\n      token.constant = true;\n    } else {\n      var getter = getterFn(ident, this.options, this.text);\n      token.fn = extend(function(self, locals) {\n        return (getter(self, locals));\n      }, {\n        assign: function(self, value) {\n          return setter(self, ident, value, parser.text, parser.options);\n        }\n      });\n    }\n\n    this.tokens.push(token);\n\n    if (methodName) {\n      this.tokens.push({\n        index:lastDot,\n        text: '.'\n      });\n      this.tokens.push({\n        index: lastDot + 1,\n        text: methodName\n      });\n    }\n  },\n\n  readString: function(quote) {\n    var start = this.index;\n    this.index++;\n    var string = '';\n    var rawString = quote;\n    var escape = false;\n    while (this.index < this.text.length) {\n      var ch = this.text.charAt(this.index);\n      rawString += ch;\n      if (escape) {\n        if (ch === 'u') {\n          var hex = this.text.substring(this.index + 1, this.index + 5);\n          if (!hex.match(/[\\da-f]{4}/i))\n            this.throwError('Invalid unicode escape [\\\\u' + hex + ']');\n          this.index += 4;\n          string += String.fromCharCode(parseInt(hex, 16));\n        } else {\n          var rep = ESCAPE[ch];\n          string = string + (rep || ch);\n        }\n        escape = false;\n      } else if (ch === '\\\\') {\n        escape = true;\n      } else if (ch === quote) {\n        this.index++;\n        this.tokens.push({\n          index: start,\n          text: rawString,\n          string: string,\n          literal: true,\n          constant: true,\n          fn: function() { return string; }\n        });\n        return;\n      } else {\n        string += ch;\n      }\n      this.index++;\n    }\n    this.throwError('Unterminated quote', start);\n  }\n};\n\n\n/**\n * @constructor\n */\nvar Parser = function (lexer, $filter, options) {\n  this.lexer = lexer;\n  this.$filter = $filter;\n  this.options = options;\n};\n\nParser.ZERO = extend(function () {\n  return 0;\n}, {\n  constant: true\n});\n\nParser.prototype = {\n  constructor: Parser,\n\n  parse: function (text) {\n    this.text = text;\n\n    this.tokens = this.lexer.lex(text);\n\n    var value = this.statements();\n\n    if (this.tokens.length !== 0) {\n      this.throwError('is an unexpected token', this.tokens[0]);\n    }\n\n    value.literal = !!value.literal;\n    value.constant = !!value.constant;\n\n    return value;\n  },\n\n  primary: function () {\n    var primary;\n    if (this.expect('(')) {\n      primary = this.filterChain();\n      this.consume(')');\n    } else if (this.expect('[')) {\n      primary = this.arrayDeclaration();\n    } else if (this.expect('{')) {\n      primary = this.object();\n    } else {\n      var token = this.expect();\n      primary = token.fn;\n      if (!primary) {\n        this.throwError('not a primary expression', token);\n      }\n      primary.literal = !!token.literal;\n      primary.constant = !!token.constant;\n    }\n\n    var next, context;\n    while ((next = this.expect('(', '[', '.'))) {\n      if (next.text === '(') {\n        primary = this.functionCall(primary, context);\n        context = null;\n      } else if (next.text === '[') {\n        context = primary;\n        primary = this.objectIndex(primary);\n      } else if (next.text === '.') {\n        context = primary;\n        primary = this.fieldAccess(primary);\n      } else {\n        this.throwError('IMPOSSIBLE');\n      }\n    }\n    return primary;\n  },\n\n  throwError: function(msg, token) {\n    throw $parseMinErr('syntax',\n        'Syntax Error: Token \\'{0}\\' {1} at column {2} of the expression [{3}] starting at [{4}].',\n          token.text, msg, (token.index + 1), this.text, this.text.substring(token.index));\n  },\n\n  peekToken: function() {\n    if (this.tokens.length === 0)\n      throw $parseMinErr('ueoe', 'Unexpected end of expression: {0}', this.text);\n    return this.tokens[0];\n  },\n\n  peek: function(e1, e2, e3, e4) {\n    if (this.tokens.length > 0) {\n      var token = this.tokens[0];\n      var t = token.text;\n      if (t === e1 || t === e2 || t === e3 || t === e4 ||\n          (!e1 && !e2 && !e3 && !e4)) {\n        return token;\n      }\n    }\n    return false;\n  },\n\n  expect: function(e1, e2, e3, e4){\n    var token = this.peek(e1, e2, e3, e4);\n    if (token) {\n      this.tokens.shift();\n      return token;\n    }\n    return false;\n  },\n\n  consume: function(e1){\n    if (!this.expect(e1)) {\n      this.throwError('is unexpected, expecting [' + e1 + ']', this.peek());\n    }\n  },\n\n  unaryFn: function(fn, right) {\n    return extend(function(self, locals) {\n      return fn(self, locals, right);\n    }, {\n      constant:right.constant\n    });\n  },\n\n  ternaryFn: function(left, middle, right){\n    return extend(function(self, locals){\n      return left(self, locals) ? middle(self, locals) : right(self, locals);\n    }, {\n      constant: left.constant && middle.constant && right.constant\n    });\n  },\n\n  binaryFn: function(left, fn, right) {\n    return extend(function(self, locals) {\n      return fn(self, locals, left, right);\n    }, {\n      constant:left.constant && right.constant\n    });\n  },\n\n  statements: function() {\n    var statements = [];\n    while (true) {\n      if (this.tokens.length > 0 && !this.peek('}', ')', ';', ']'))\n        statements.push(this.filterChain());\n      if (!this.expect(';')) {\n        // optimize for the common case where there is only one statement.\n        // TODO(size): maybe we should not support multiple statements?\n        return (statements.length === 1)\n            ? statements[0]\n            : function(self, locals) {\n                var value;\n                for (var i = 0; i < statements.length; i++) {\n                  var statement = statements[i];\n                  if (statement) {\n                    value = statement(self, locals);\n                  }\n                }\n                return value;\n              };\n      }\n    }\n  },\n\n  filterChain: function() {\n    var left = this.expression();\n    var token;\n    while (true) {\n      if ((token = this.expect('|'))) {\n        left = this.binaryFn(left, token.fn, this.filter());\n      } else {\n        return left;\n      }\n    }\n  },\n\n  filter: function() {\n    var token = this.expect();\n    var fn = this.$filter(token.text);\n    var argsFn = [];\n    while (true) {\n      if ((token = this.expect(':'))) {\n        argsFn.push(this.expression());\n      } else {\n        var fnInvoke = function(self, locals, input) {\n          var args = [input];\n          for (var i = 0; i < argsFn.length; i++) {\n            args.push(argsFn[i](self, locals));\n          }\n          return fn.apply(self, args);\n        };\n        return function() {\n          return fnInvoke;\n        };\n      }\n    }\n  },\n\n  expression: function() {\n    return this.assignment();\n  },\n\n  assignment: function() {\n    var left = this.ternary();\n    var right;\n    var token;\n    if ((token = this.expect('='))) {\n      if (!left.assign) {\n        this.throwError('implies assignment but [' +\n            this.text.substring(0, token.index) + '] can not be assigned to', token);\n      }\n      right = this.ternary();\n      return function(scope, locals) {\n        return left.assign(scope, right(scope, locals), locals);\n      };\n    }\n    return left;\n  },\n\n  ternary: function() {\n    var left = this.logicalOR();\n    var middle;\n    var token;\n    if ((token = this.expect('?'))) {\n      middle = this.ternary();\n      if ((token = this.expect(':'))) {\n        return this.ternaryFn(left, middle, this.ternary());\n      } else {\n        this.throwError('expected :', token);\n      }\n    } else {\n      return left;\n    }\n  },\n\n  logicalOR: function() {\n    var left = this.logicalAND();\n    var token;\n    while (true) {\n      if ((token = this.expect('||'))) {\n        left = this.binaryFn(left, token.fn, this.logicalAND());\n      } else {\n        return left;\n      }\n    }\n  },\n\n  logicalAND: function() {\n    var left = this.equality();\n    var token;\n    if ((token = this.expect('&&'))) {\n      left = this.binaryFn(left, token.fn, this.logicalAND());\n    }\n    return left;\n  },\n\n  equality: function() {\n    var left = this.relational();\n    var token;\n    if ((token = this.expect('==','!=','===','!=='))) {\n      left = this.binaryFn(left, token.fn, this.equality());\n    }\n    return left;\n  },\n\n  relational: function() {\n    var left = this.additive();\n    var token;\n    if ((token = this.expect('<', '>', '<=', '>='))) {\n      left = this.binaryFn(left, token.fn, this.relational());\n    }\n    return left;\n  },\n\n  additive: function() {\n    var left = this.multiplicative();\n    var token;\n    while ((token = this.expect('+','-'))) {\n      left = this.binaryFn(left, token.fn, this.multiplicative());\n    }\n    return left;\n  },\n\n  multiplicative: function() {\n    var left = this.unary();\n    var token;\n    while ((token = this.expect('*','/','%'))) {\n      left = this.binaryFn(left, token.fn, this.unary());\n    }\n    return left;\n  },\n\n  unary: function() {\n    var token;\n    if (this.expect('+')) {\n      return this.primary();\n    } else if ((token = this.expect('-'))) {\n      return this.binaryFn(Parser.ZERO, token.fn, this.unary());\n    } else if ((token = this.expect('!'))) {\n      return this.unaryFn(token.fn, this.unary());\n    } else {\n      return this.primary();\n    }\n  },\n\n  fieldAccess: function(object) {\n    var parser = this;\n    var field = this.expect().text;\n    var getter = getterFn(field, this.options, this.text);\n\n    return extend(function(scope, locals, self) {\n      return getter(self || object(scope, locals));\n    }, {\n      assign: function(scope, value, locals) {\n        return setter(object(scope, locals), field, value, parser.text, parser.options);\n      }\n    });\n  },\n\n  objectIndex: function(obj) {\n    var parser = this;\n\n    var indexFn = this.expression();\n    this.consume(']');\n\n    return extend(function(self, locals) {\n      var o = obj(self, locals),\n          i = indexFn(self, locals),\n          v, p;\n\n      ensureSafeMemberName(i, parser.text);\n      if (!o) return undefined;\n      v = ensureSafeObject(o[i], parser.text);\n      if (v && v.then && parser.options.unwrapPromises) {\n        p = v;\n        if (!('$$v' in v)) {\n          p.$$v = undefined;\n          p.then(function(val) { p.$$v = val; });\n        }\n        v = v.$$v;\n      }\n      return v;\n    }, {\n      assign: function(self, value, locals) {\n        var key = indexFn(self, locals);\n        // prevent overwriting of Function.constructor which would break ensureSafeObject check\n        var safe = ensureSafeObject(obj(self, locals), parser.text);\n        return safe[key] = value;\n      }\n    });\n  },\n\n  functionCall: function(fn, contextGetter) {\n    var argsFn = [];\n    if (this.peekToken().text !== ')') {\n      do {\n        argsFn.push(this.expression());\n      } while (this.expect(','));\n    }\n    this.consume(')');\n\n    var parser = this;\n\n    return function(scope, locals) {\n      var args = [];\n      var context = contextGetter ? contextGetter(scope, locals) : scope;\n\n      for (var i = 0; i < argsFn.length; i++) {\n        args.push(argsFn[i](scope, locals));\n      }\n      var fnPtr = fn(scope, locals, context) || noop;\n\n      ensureSafeObject(context, parser.text);\n      ensureSafeFunction(fnPtr, parser.text);\n\n      // IE stupidity! (IE doesn't have apply for some native functions)\n      var v = fnPtr.apply\n            ? fnPtr.apply(context, args)\n            : fnPtr(args[0], args[1], args[2], args[3], args[4]);\n\n      return ensureSafeObject(v, parser.text);\n    };\n  },\n\n  // This is used with json array declaration\n  arrayDeclaration: function () {\n    var elementFns = [];\n    var allConstant = true;\n    if (this.peekToken().text !== ']') {\n      do {\n        if (this.peek(']')) {\n          // Support trailing commas per ES5.1.\n          break;\n        }\n        var elementFn = this.expression();\n        elementFns.push(elementFn);\n        if (!elementFn.constant) {\n          allConstant = false;\n        }\n      } while (this.expect(','));\n    }\n    this.consume(']');\n\n    return extend(function(self, locals) {\n      var array = [];\n      for (var i = 0; i < elementFns.length; i++) {\n        array.push(elementFns[i](self, locals));\n      }\n      return array;\n    }, {\n      literal: true,\n      constant: allConstant\n    });\n  },\n\n  object: function () {\n    var keyValues = [];\n    var allConstant = true;\n    if (this.peekToken().text !== '}') {\n      do {\n        if (this.peek('}')) {\n          // Support trailing commas per ES5.1.\n          break;\n        }\n        var token = this.expect(),\n        key = token.string || token.text;\n        this.consume(':');\n        var value = this.expression();\n        keyValues.push({key: key, value: value});\n        if (!value.constant) {\n          allConstant = false;\n        }\n      } while (this.expect(','));\n    }\n    this.consume('}');\n\n    return extend(function(self, locals) {\n      var object = {};\n      for (var i = 0; i < keyValues.length; i++) {\n        var keyValue = keyValues[i];\n        object[keyValue.key] = keyValue.value(self, locals);\n      }\n      return object;\n    }, {\n      literal: true,\n      constant: allConstant\n    });\n  }\n};\n\n\n//////////////////////////////////////////////////\n// Parser helper functions\n//////////////////////////////////////////////////\n\nfunction setter(obj, path, setValue, fullExp, options) {\n  //needed?\n  options = options || {};\n\n  var element = path.split('.'), key;\n  for (var i = 0; element.length > 1; i++) {\n    key = ensureSafeMemberName(element.shift(), fullExp);\n    var propertyObj = obj[key];\n    if (!propertyObj) {\n      propertyObj = {};\n      obj[key] = propertyObj;\n    }\n    obj = propertyObj;\n    if (obj.then && options.unwrapPromises) {\n      promiseWarning(fullExp);\n      if (!(\"$$v\" in obj)) {\n        (function(promise) {\n          promise.then(function(val) { promise.$$v = val; }); }\n        )(obj);\n      }\n      if (obj.$$v === undefined) {\n        obj.$$v = {};\n      }\n      obj = obj.$$v;\n    }\n  }\n  key = ensureSafeMemberName(element.shift(), fullExp);\n  ensureSafeObject(obj, fullExp);\n  ensureSafeObject(obj[key], fullExp);\n  obj[key] = setValue;\n  return setValue;\n}\n\nvar getterFnCache = {};\n\n/**\n * Implementation of the \"Black Hole\" variant from:\n * - http://jsperf.com/angularjs-parse-getter/4\n * - http://jsperf.com/path-evaluation-simplified/7\n */\nfunction cspSafeGetterFn(key0, key1, key2, key3, key4, fullExp, options) {\n  ensureSafeMemberName(key0, fullExp);\n  ensureSafeMemberName(key1, fullExp);\n  ensureSafeMemberName(key2, fullExp);\n  ensureSafeMemberName(key3, fullExp);\n  ensureSafeMemberName(key4, fullExp);\n\n  return !options.unwrapPromises\n      ? function cspSafeGetter(scope, locals) {\n          var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope;\n\n          if (pathVal == null) return pathVal;\n          pathVal = pathVal[key0];\n\n          if (!key1) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key1];\n\n          if (!key2) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key2];\n\n          if (!key3) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key3];\n\n          if (!key4) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key4];\n\n          return pathVal;\n        }\n      : function cspSafePromiseEnabledGetter(scope, locals) {\n          var pathVal = (locals && locals.hasOwnProperty(key0)) ? locals : scope,\n              promise;\n\n          if (pathVal == null) return pathVal;\n\n          pathVal = pathVal[key0];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key1) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key1];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key2) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key2];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key3) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key3];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n\n          if (!key4) return pathVal;\n          if (pathVal == null) return undefined;\n          pathVal = pathVal[key4];\n          if (pathVal && pathVal.then) {\n            promiseWarning(fullExp);\n            if (!(\"$$v\" in pathVal)) {\n              promise = pathVal;\n              promise.$$v = undefined;\n              promise.then(function(val) { promise.$$v = val; });\n            }\n            pathVal = pathVal.$$v;\n          }\n          return pathVal;\n        };\n}\n\nfunction getterFn(path, options, fullExp) {\n  // Check whether the cache has this getter already.\n  // We can use hasOwnProperty directly on the cache because we ensure,\n  // see below, that the cache never stores a path called 'hasOwnProperty'\n  if (getterFnCache.hasOwnProperty(path)) {\n    return getterFnCache[path];\n  }\n\n  var pathKeys = path.split('.'),\n      pathKeysLength = pathKeys.length,\n      fn;\n\n  // http://jsperf.com/angularjs-parse-getter/6\n  if (options.csp) {\n    if (pathKeysLength < 6) {\n      fn = cspSafeGetterFn(pathKeys[0], pathKeys[1], pathKeys[2], pathKeys[3], pathKeys[4], fullExp,\n                          options);\n    } else {\n      fn = function(scope, locals) {\n        var i = 0, val;\n        do {\n          val = cspSafeGetterFn(pathKeys[i++], pathKeys[i++], pathKeys[i++], pathKeys[i++],\n                                pathKeys[i++], fullExp, options)(scope, locals);\n\n          locals = undefined; // clear after first iteration\n          scope = val;\n        } while (i < pathKeysLength);\n        return val;\n      };\n    }\n  } else {\n    var code = 'var p;\\n';\n    forEach(pathKeys, function(key, index) {\n      ensureSafeMemberName(key, fullExp);\n      code += 'if(s == null) return undefined;\\n' +\n              's='+ (index\n                      // we simply dereference 's' on any .dot notation\n                      ? 's'\n                      // but if we are first then we check locals first, and if so read it first\n                      : '((k&&k.hasOwnProperty(\"' + key + '\"))?k:s)') + '[\"' + key + '\"]' + ';\\n' +\n              (options.unwrapPromises\n                ? 'if (s && s.then) {\\n' +\n                  ' pw(\"' + fullExp.replace(/([\"\\r\\n])/g, '\\\\$1') + '\");\\n' +\n                  ' if (!(\"$$v\" in s)) {\\n' +\n                    ' p=s;\\n' +\n                    ' p.$$v = undefined;\\n' +\n                    ' p.then(function(v) {p.$$v=v;});\\n' +\n                    '}\\n' +\n                  ' s=s.$$v\\n' +\n                '}\\n'\n                : '');\n    });\n    code += 'return s;';\n\n    /* jshint -W054 */\n    var evaledFnGetter = new Function('s', 'k', 'pw', code); // s=scope, k=locals, pw=promiseWarning\n    /* jshint +W054 */\n    evaledFnGetter.toString = valueFn(code);\n    fn = options.unwrapPromises ? function(scope, locals) {\n      return evaledFnGetter(scope, locals, promiseWarning);\n    } : evaledFnGetter;\n  }\n\n  // Only cache the value if it's not going to mess up the cache object\n  // This is more performant that using Object.prototype.hasOwnProperty.call\n  if (path !== 'hasOwnProperty') {\n    getterFnCache[path] = fn;\n  }\n  return fn;\n}\n\n///////////////////////////////////\n\n/**\n * @ngdoc service\n * @name $parse\n * @kind function\n *\n * @description\n *\n * Converts Angular {@link guide/expression expression} into a function.\n *\n * ```js\n *   var getter = $parse('user.name');\n *   var setter = getter.assign;\n *   var context = {user:{name:'angular'}};\n *   var locals = {user:{name:'local'}};\n *\n *   expect(getter(context)).toEqual('angular');\n *   setter(context, 'newValue');\n *   expect(context.user.name).toEqual('newValue');\n *   expect(getter(context, locals)).toEqual('local');\n * ```\n *\n *\n * @param {string} expression String expression to compile.\n * @returns {function(context, locals)} a function which represents the compiled expression:\n *\n *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n *      are evaluated against (typically a scope object).\n *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n *      `context`.\n *\n *    The returned function also has the following properties:\n *      * `literal` – `{boolean}` – whether the expression's top-level node is a JavaScript\n *        literal.\n *      * `constant` – `{boolean}` – whether the expression is made entirely of JavaScript\n *        constant literals.\n *      * `assign` – `{?function(context, value)}` – if the expression is assignable, this will be\n *        set to a function to change its value on the given context.\n *\n */\n\n\n/**\n * @ngdoc provider\n * @name $parseProvider\n * @kind function\n *\n * @description\n * `$parseProvider` can be used for configuring the default behavior of the {@link ng.$parse $parse}\n *  service.\n */\nfunction $ParseProvider() {\n  var cache = {};\n\n  var $parseOptions = {\n    csp: false,\n    unwrapPromises: false,\n    logPromiseWarnings: true\n  };\n\n\n  /**\n   * @deprecated Promise unwrapping via $parse is deprecated and will be removed in the future.\n   *\n   * @ngdoc method\n   * @name $parseProvider#unwrapPromises\n   * @description\n   *\n   * **This feature is deprecated, see deprecation notes below for more info**\n   *\n   * If set to true (default is false), $parse will unwrap promises automatically when a promise is\n   * found at any part of the expression. In other words, if set to true, the expression will always\n   * result in a non-promise value.\n   *\n   * While the promise is unresolved, it's treated as undefined, but once resolved and fulfilled,\n   * the fulfillment value is used in place of the promise while evaluating the expression.\n   *\n   * **Deprecation notice**\n   *\n   * This is a feature that didn't prove to be wildly useful or popular, primarily because of the\n   * dichotomy between data access in templates (accessed as raw values) and controller code\n   * (accessed as promises).\n   *\n   * In most code we ended up resolving promises manually in controllers anyway and thus unifying\n   * the model access there.\n   *\n   * Other downsides of automatic promise unwrapping:\n   *\n   * - when building components it's often desirable to receive the raw promises\n   * - adds complexity and slows down expression evaluation\n   * - makes expression code pre-generation unattractive due to the amount of code that needs to be\n   *   generated\n   * - makes IDE auto-completion and tool support hard\n   *\n   * **Warning Logs**\n   *\n   * If the unwrapping is enabled, Angular will log a warning about each expression that unwraps a\n   * promise (to reduce the noise, each expression is logged only once). To disable this logging use\n   * `$parseProvider.logPromiseWarnings(false)` api.\n   *\n   *\n   * @param {boolean=} value New value.\n   * @returns {boolean|self} Returns the current setting when used as getter and self if used as\n   *                         setter.\n   */\n  this.unwrapPromises = function(value) {\n    if (isDefined(value)) {\n      $parseOptions.unwrapPromises = !!value;\n      return this;\n    } else {\n      return $parseOptions.unwrapPromises;\n    }\n  };\n\n\n  /**\n   * @deprecated Promise unwrapping via $parse is deprecated and will be removed in the future.\n   *\n   * @ngdoc method\n   * @name $parseProvider#logPromiseWarnings\n   * @description\n   *\n   * Controls whether Angular should log a warning on any encounter of a promise in an expression.\n   *\n   * The default is set to `true`.\n   *\n   * This setting applies only if `$parseProvider.unwrapPromises` setting is set to true as well.\n   *\n   * @param {boolean=} value New value.\n   * @returns {boolean|self} Returns the current setting when used as getter and self if used as\n   *                         setter.\n   */\n this.logPromiseWarnings = function(value) {\n    if (isDefined(value)) {\n      $parseOptions.logPromiseWarnings = value;\n      return this;\n    } else {\n      return $parseOptions.logPromiseWarnings;\n    }\n  };\n\n\n  this.$get = ['$filter', '$sniffer', '$log', function($filter, $sniffer, $log) {\n    $parseOptions.csp = $sniffer.csp;\n\n    promiseWarning = function promiseWarningFn(fullExp) {\n      if (!$parseOptions.logPromiseWarnings || promiseWarningCache.hasOwnProperty(fullExp)) return;\n      promiseWarningCache[fullExp] = true;\n      $log.warn('[$parse] Promise found in the expression `' + fullExp + '`. ' +\n          'Automatic unwrapping of promises in Angular expressions is deprecated.');\n    };\n\n    return function(exp) {\n      var parsedExpression;\n\n      switch (typeof exp) {\n        case 'string':\n\n          if (cache.hasOwnProperty(exp)) {\n            return cache[exp];\n          }\n\n          var lexer = new Lexer($parseOptions);\n          var parser = new Parser(lexer, $filter, $parseOptions);\n          parsedExpression = parser.parse(exp);\n\n          if (exp !== 'hasOwnProperty') {\n            // Only cache the value if it's not going to mess up the cache object\n            // This is more performant that using Object.prototype.hasOwnProperty.call\n            cache[exp] = parsedExpression;\n          }\n\n          return parsedExpression;\n\n        case 'function':\n          return exp;\n\n        default:\n          return noop;\n      }\n    };\n  }];\n}\n\n/**\n * @ngdoc service\n * @name $q\n * @requires $rootScope\n *\n * @description\n * A promise/deferred implementation inspired by [Kris Kowal's Q](https://github.com/kriskowal/q).\n *\n * [The CommonJS Promise proposal](http://wiki.commonjs.org/wiki/Promises) describes a promise as an\n * interface for interacting with an object that represents the result of an action that is\n * performed asynchronously, and may or may not be finished at any given point in time.\n *\n * From the perspective of dealing with error handling, deferred and promise APIs are to\n * asynchronous programming what `try`, `catch` and `throw` keywords are to synchronous programming.\n *\n * ```js\n *   // for the purpose of this example let's assume that variables `$q`, `scope` and `okToGreet`\n *   // are available in the current lexical scope (they could have been injected or passed in).\n *\n *   function asyncGreet(name) {\n *     var deferred = $q.defer();\n *\n *     setTimeout(function() {\n *       deferred.notify('About to greet ' + name + '.');\n *\n *       if (okToGreet(name)) {\n *         deferred.resolve('Hello, ' + name + '!');\n *       } else {\n *         deferred.reject('Greeting ' + name + ' is not allowed.');\n *       }\n *     }, 1000);\n *\n *     return deferred.promise;\n *   }\n *\n *   var promise = asyncGreet('Robin Hood');\n *   promise.then(function(greeting) {\n *     alert('Success: ' + greeting);\n *   }, function(reason) {\n *     alert('Failed: ' + reason);\n *   }, function(update) {\n *     alert('Got notification: ' + update);\n *   });\n * ```\n *\n * At first it might not be obvious why this extra complexity is worth the trouble. The payoff\n * comes in the way of guarantees that promise and deferred APIs make, see\n * https://github.com/kriskowal/uncommonjs/blob/master/promises/specification.md.\n *\n * Additionally the promise api allows for composition that is very hard to do with the\n * traditional callback ([CPS](http://en.wikipedia.org/wiki/Continuation-passing_style)) approach.\n * For more on this please see the [Q documentation](https://github.com/kriskowal/q) especially the\n * section on serial or parallel joining of promises.\n *\n *\n * # The Deferred API\n *\n * A new instance of deferred is constructed by calling `$q.defer()`.\n *\n * The purpose of the deferred object is to expose the associated Promise instance as well as APIs\n * that can be used for signaling the successful or unsuccessful completion, as well as the status\n * of the task.\n *\n * **Methods**\n *\n * - `resolve(value)` – resolves the derived promise with the `value`. If the value is a rejection\n *   constructed via `$q.reject`, the promise will be rejected instead.\n * - `reject(reason)` – rejects the derived promise with the `reason`. This is equivalent to\n *   resolving it with a rejection constructed via `$q.reject`.\n * - `notify(value)` - provides updates on the status of the promise's execution. This may be called\n *   multiple times before the promise is either resolved or rejected.\n *\n * **Properties**\n *\n * - promise – `{Promise}` – promise object associated with this deferred.\n *\n *\n * # The Promise API\n *\n * A new promise instance is created when a deferred instance is created and can be retrieved by\n * calling `deferred.promise`.\n *\n * The purpose of the promise object is to allow for interested parties to get access to the result\n * of the deferred task when it completes.\n *\n * **Methods**\n *\n * - `then(successCallback, errorCallback, notifyCallback)` – regardless of when the promise was or\n *   will be resolved or rejected, `then` calls one of the success or error callbacks asynchronously\n *   as soon as the result is available. The callbacks are called with a single argument: the result\n *   or rejection reason. Additionally, the notify callback may be called zero or more times to\n *   provide a progress indication, before the promise is resolved or rejected.\n *\n *   This method *returns a new promise* which is resolved or rejected via the return value of the\n *   `successCallback`, `errorCallback`. It also notifies via the return value of the\n *   `notifyCallback` method. The promise can not be resolved or rejected from the notifyCallback\n *   method.\n *\n * - `catch(errorCallback)` – shorthand for `promise.then(null, errorCallback)`\n *\n * - `finally(callback)` – allows you to observe either the fulfillment or rejection of a promise,\n *   but to do so without modifying the final value. This is useful to release resources or do some\n *   clean-up that needs to be done whether the promise was rejected or resolved. See the [full\n *   specification](https://github.com/kriskowal/q/wiki/API-Reference#promisefinallycallback) for\n *   more information.\n *\n *   Because `finally` is a reserved word in JavaScript and reserved keywords are not supported as\n *   property names by ES3, you'll need to invoke the method like `promise['finally'](callback)` to\n *   make your code IE8 and Android 2.x compatible.\n *\n * # Chaining promises\n *\n * Because calling the `then` method of a promise returns a new derived promise, it is easily\n * possible to create a chain of promises:\n *\n * ```js\n *   promiseB = promiseA.then(function(result) {\n *     return result + 1;\n *   });\n *\n *   // promiseB will be resolved immediately after promiseA is resolved and its value\n *   // will be the result of promiseA incremented by 1\n * ```\n *\n * It is possible to create chains of any length and since a promise can be resolved with another\n * promise (which will defer its resolution further), it is possible to pause/defer resolution of\n * the promises at any point in the chain. This makes it possible to implement powerful APIs like\n * $http's response interceptors.\n *\n *\n * # Differences between Kris Kowal's Q and $q\n *\n *  There are two main differences:\n *\n * - $q is integrated with the {@link ng.$rootScope.Scope} Scope model observation\n *   mechanism in angular, which means faster propagation of resolution or rejection into your\n *   models and avoiding unnecessary browser repaints, which would result in flickering UI.\n * - Q has many more features than $q, but that comes at a cost of bytes. $q is tiny, but contains\n *   all the important functionality needed for common async tasks.\n *\n *  # Testing\n *\n *  ```js\n *    it('should simulate promise', inject(function($q, $rootScope) {\n *      var deferred = $q.defer();\n *      var promise = deferred.promise;\n *      var resolvedValue;\n *\n *      promise.then(function(value) { resolvedValue = value; });\n *      expect(resolvedValue).toBeUndefined();\n *\n *      // Simulate resolving of promise\n *      deferred.resolve(123);\n *      // Note that the 'then' function does not get called synchronously.\n *      // This is because we want the promise API to always be async, whether or not\n *      // it got called synchronously or asynchronously.\n *      expect(resolvedValue).toBeUndefined();\n *\n *      // Propagate promise resolution to 'then' functions using $apply().\n *      $rootScope.$apply();\n *      expect(resolvedValue).toEqual(123);\n *    }));\n *  ```\n */\nfunction $QProvider() {\n\n  this.$get = ['$rootScope', '$exceptionHandler', function($rootScope, $exceptionHandler) {\n    return qFactory(function(callback) {\n      $rootScope.$evalAsync(callback);\n    }, $exceptionHandler);\n  }];\n}\n\n\n/**\n * Constructs a promise manager.\n *\n * @param {function(Function)} nextTick Function for executing functions in the next turn.\n * @param {function(...*)} exceptionHandler Function into which unexpected exceptions are passed for\n *     debugging purposes.\n * @returns {object} Promise manager.\n */\nfunction qFactory(nextTick, exceptionHandler) {\n\n  /**\n   * @ngdoc method\n   * @name $q#defer\n   * @kind function\n   *\n   * @description\n   * Creates a `Deferred` object which represents a task which will finish in the future.\n   *\n   * @returns {Deferred} Returns a new instance of deferred.\n   */\n  var defer = function() {\n    var pending = [],\n        value, deferred;\n\n    deferred = {\n\n      resolve: function(val) {\n        if (pending) {\n          var callbacks = pending;\n          pending = undefined;\n          value = ref(val);\n\n          if (callbacks.length) {\n            nextTick(function() {\n              var callback;\n              for (var i = 0, ii = callbacks.length; i < ii; i++) {\n                callback = callbacks[i];\n                value.then(callback[0], callback[1], callback[2]);\n              }\n            });\n          }\n        }\n      },\n\n\n      reject: function(reason) {\n        deferred.resolve(createInternalRejectedPromise(reason));\n      },\n\n\n      notify: function(progress) {\n        if (pending) {\n          var callbacks = pending;\n\n          if (pending.length) {\n            nextTick(function() {\n              var callback;\n              for (var i = 0, ii = callbacks.length; i < ii; i++) {\n                callback = callbacks[i];\n                callback[2](progress);\n              }\n            });\n          }\n        }\n      },\n\n\n      promise: {\n        then: function(callback, errback, progressback) {\n          var result = defer();\n\n          var wrappedCallback = function(value) {\n            try {\n              result.resolve((isFunction(callback) ? callback : defaultCallback)(value));\n            } catch(e) {\n              result.reject(e);\n              exceptionHandler(e);\n            }\n          };\n\n          var wrappedErrback = function(reason) {\n            try {\n              result.resolve((isFunction(errback) ? errback : defaultErrback)(reason));\n            } catch(e) {\n              result.reject(e);\n              exceptionHandler(e);\n            }\n          };\n\n          var wrappedProgressback = function(progress) {\n            try {\n              result.notify((isFunction(progressback) ? progressback : defaultCallback)(progress));\n            } catch(e) {\n              exceptionHandler(e);\n            }\n          };\n\n          if (pending) {\n            pending.push([wrappedCallback, wrappedErrback, wrappedProgressback]);\n          } else {\n            value.then(wrappedCallback, wrappedErrback, wrappedProgressback);\n          }\n\n          return result.promise;\n        },\n\n        \"catch\": function(callback) {\n          return this.then(null, callback);\n        },\n\n        \"finally\": function(callback) {\n\n          function makePromise(value, resolved) {\n            var result = defer();\n            if (resolved) {\n              result.resolve(value);\n            } else {\n              result.reject(value);\n            }\n            return result.promise;\n          }\n\n          function handleCallback(value, isResolved) {\n            var callbackOutput = null;\n            try {\n              callbackOutput = (callback ||defaultCallback)();\n            } catch(e) {\n              return makePromise(e, false);\n            }\n            if (isPromiseLike(callbackOutput)) {\n              return callbackOutput.then(function() {\n                return makePromise(value, isResolved);\n              }, function(error) {\n                return makePromise(error, false);\n              });\n            } else {\n              return makePromise(value, isResolved);\n            }\n          }\n\n          return this.then(function(value) {\n            return handleCallback(value, true);\n          }, function(error) {\n            return handleCallback(error, false);\n          });\n        }\n      }\n    };\n\n    return deferred;\n  };\n\n\n  var ref = function(value) {\n    if (isPromiseLike(value)) return value;\n    return {\n      then: function(callback) {\n        var result = defer();\n        nextTick(function() {\n          result.resolve(callback(value));\n        });\n        return result.promise;\n      }\n    };\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $q#reject\n   * @kind function\n   *\n   * @description\n   * Creates a promise that is resolved as rejected with the specified `reason`. This api should be\n   * used to forward rejection in a chain of promises. If you are dealing with the last promise in\n   * a promise chain, you don't need to worry about it.\n   *\n   * When comparing deferreds/promises to the familiar behavior of try/catch/throw, think of\n   * `reject` as the `throw` keyword in JavaScript. This also means that if you \"catch\" an error via\n   * a promise error callback and you want to forward the error to the promise derived from the\n   * current promise, you have to \"rethrow\" the error by returning a rejection constructed via\n   * `reject`.\n   *\n   * ```js\n   *   promiseB = promiseA.then(function(result) {\n   *     // success: do something and resolve promiseB\n   *     //          with the old or a new result\n   *     return result;\n   *   }, function(reason) {\n   *     // error: handle the error if possible and\n   *     //        resolve promiseB with newPromiseOrValue,\n   *     //        otherwise forward the rejection to promiseB\n   *     if (canHandle(reason)) {\n   *      // handle the error and recover\n   *      return newPromiseOrValue;\n   *     }\n   *     return $q.reject(reason);\n   *   });\n   * ```\n   *\n   * @param {*} reason Constant, message, exception or an object representing the rejection reason.\n   * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`.\n   */\n  var reject = function(reason) {\n    var result = defer();\n    result.reject(reason);\n    return result.promise;\n  };\n\n  var createInternalRejectedPromise = function(reason) {\n    return {\n      then: function(callback, errback) {\n        var result = defer();\n        nextTick(function() {\n          try {\n            result.resolve((isFunction(errback) ? errback : defaultErrback)(reason));\n          } catch(e) {\n            result.reject(e);\n            exceptionHandler(e);\n          }\n        });\n        return result.promise;\n      }\n    };\n  };\n\n\n  /**\n   * @ngdoc method\n   * @name $q#when\n   * @kind function\n   *\n   * @description\n   * Wraps an object that might be a value or a (3rd party) then-able promise into a $q promise.\n   * This is useful when you are dealing with an object that might or might not be a promise, or if\n   * the promise comes from a source that can't be trusted.\n   *\n   * @param {*} value Value or a promise\n   * @returns {Promise} Returns a promise of the passed value or promise\n   */\n  var when = function(value, callback, errback, progressback) {\n    var result = defer(),\n        done;\n\n    var wrappedCallback = function(value) {\n      try {\n        return (isFunction(callback) ? callback : defaultCallback)(value);\n      } catch (e) {\n        exceptionHandler(e);\n        return reject(e);\n      }\n    };\n\n    var wrappedErrback = function(reason) {\n      try {\n        return (isFunction(errback) ? errback : defaultErrback)(reason);\n      } catch (e) {\n        exceptionHandler(e);\n        return reject(e);\n      }\n    };\n\n    var wrappedProgressback = function(progress) {\n      try {\n        return (isFunction(progressback) ? progressback : defaultCallback)(progress);\n      } catch (e) {\n        exceptionHandler(e);\n      }\n    };\n\n    nextTick(function() {\n      ref(value).then(function(value) {\n        if (done) return;\n        done = true;\n        result.resolve(ref(value).then(wrappedCallback, wrappedErrback, wrappedProgressback));\n      }, function(reason) {\n        if (done) return;\n        done = true;\n        result.resolve(wrappedErrback(reason));\n      }, function(progress) {\n        if (done) return;\n        result.notify(wrappedProgressback(progress));\n      });\n    });\n\n    return result.promise;\n  };\n\n\n  function defaultCallback(value) {\n    return value;\n  }\n\n\n  function defaultErrback(reason) {\n    return reject(reason);\n  }\n\n\n  /**\n   * @ngdoc method\n   * @name $q#all\n   * @kind function\n   *\n   * @description\n   * Combines multiple promises into a single promise that is resolved when all of the input\n   * promises are resolved.\n   *\n   * @param {Array.<Promise>|Object.<Promise>} promises An array or hash of promises.\n   * @returns {Promise} Returns a single promise that will be resolved with an array/hash of values,\n   *   each value corresponding to the promise at the same index/key in the `promises` array/hash.\n   *   If any of the promises is resolved with a rejection, this resulting promise will be rejected\n   *   with the same rejection value.\n   */\n  function all(promises) {\n    var deferred = defer(),\n        counter = 0,\n        results = isArray(promises) ? [] : {};\n\n    forEach(promises, function(promise, key) {\n      counter++;\n      ref(promise).then(function(value) {\n        if (results.hasOwnProperty(key)) return;\n        results[key] = value;\n        if (!(--counter)) deferred.resolve(results);\n      }, function(reason) {\n        if (results.hasOwnProperty(key)) return;\n        deferred.reject(reason);\n      });\n    });\n\n    if (counter === 0) {\n      deferred.resolve(results);\n    }\n\n    return deferred.promise;\n  }\n\n  return {\n    defer: defer,\n    reject: reject,\n    when: when,\n    all: all\n  };\n}\n\nfunction $$RAFProvider(){ //rAF\n  this.$get = ['$window', '$timeout', function($window, $timeout) {\n    var requestAnimationFrame = $window.requestAnimationFrame ||\n                                $window.webkitRequestAnimationFrame ||\n                                $window.mozRequestAnimationFrame;\n\n    var cancelAnimationFrame = $window.cancelAnimationFrame ||\n                               $window.webkitCancelAnimationFrame ||\n                               $window.mozCancelAnimationFrame ||\n                               $window.webkitCancelRequestAnimationFrame;\n\n    var rafSupported = !!requestAnimationFrame;\n    var raf = rafSupported\n      ? function(fn) {\n          var id = requestAnimationFrame(fn);\n          return function() {\n            cancelAnimationFrame(id);\n          };\n        }\n      : function(fn) {\n          var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666\n          return function() {\n            $timeout.cancel(timer);\n          };\n        };\n\n    raf.supported = rafSupported;\n\n    return raf;\n  }];\n}\n\n/**\n * DESIGN NOTES\n *\n * The design decisions behind the scope are heavily favored for speed and memory consumption.\n *\n * The typical use of scope is to watch the expressions, which most of the time return the same\n * value as last time so we optimize the operation.\n *\n * Closures construction is expensive in terms of speed as well as memory:\n *   - No closures, instead use prototypical inheritance for API\n *   - Internal state needs to be stored on scope directly, which means that private state is\n *     exposed as $$____ properties\n *\n * Loop operations are optimized by using while(count--) { ... }\n *   - this means that in order to keep the same order of execution as addition we have to add\n *     items to the array at the beginning (unshift) instead of at the end (push)\n *\n * Child scopes are created and removed often\n *   - Using an array would be slow since inserts in middle are expensive so we use linked list\n *\n * There are few watches then a lot of observers. This is why you don't want the observer to be\n * implemented in the same way as watch. Watch requires return of initialization function which\n * are expensive to construct.\n */\n\n\n/**\n * @ngdoc provider\n * @name $rootScopeProvider\n * @description\n *\n * Provider for the $rootScope service.\n */\n\n/**\n * @ngdoc method\n * @name $rootScopeProvider#digestTtl\n * @description\n *\n * Sets the number of `$digest` iterations the scope should attempt to execute before giving up and\n * assuming that the model is unstable.\n *\n * The current default is 10 iterations.\n *\n * In complex applications it's possible that the dependencies between `$watch`s will result in\n * several digest iterations. However if an application needs more than the default 10 digest\n * iterations for its model to stabilize then you should investigate what is causing the model to\n * continuously change during the digest.\n *\n * Increasing the TTL could have performance implications, so you should not change it without\n * proper justification.\n *\n * @param {number} limit The number of digest iterations.\n */\n\n\n/**\n * @ngdoc service\n * @name $rootScope\n * @description\n *\n * Every application has a single root {@link ng.$rootScope.Scope scope}.\n * All other scopes are descendant scopes of the root scope. Scopes provide separation\n * between the model and the view, via a mechanism for watching the model for changes.\n * They also provide an event emission/broadcast and subscription facility. See the\n * {@link guide/scope developer guide on scopes}.\n */\nfunction $RootScopeProvider(){\n  var TTL = 10;\n  var $rootScopeMinErr = minErr('$rootScope');\n  var lastDirtyWatch = null;\n\n  this.digestTtl = function(value) {\n    if (arguments.length) {\n      TTL = value;\n    }\n    return TTL;\n  };\n\n  this.$get = ['$injector', '$exceptionHandler', '$parse', '$browser',\n      function( $injector,   $exceptionHandler,   $parse,   $browser) {\n\n    /**\n     * @ngdoc type\n     * @name $rootScope.Scope\n     *\n     * @description\n     * A root scope can be retrieved using the {@link ng.$rootScope $rootScope} key from the\n     * {@link auto.$injector $injector}. Child scopes are created using the\n     * {@link ng.$rootScope.Scope#$new $new()} method. (Most scopes are created automatically when\n     * compiled HTML template is executed.)\n     *\n     * Here is a simple scope snippet to show how you can interact with the scope.\n     * ```html\n     * <file src=\"./test/ng/rootScopeSpec.js\" tag=\"docs1\" />\n     * ```\n     *\n     * # Inheritance\n     * A scope can inherit from a parent scope, as in this example:\n     * ```js\n         var parent = $rootScope;\n         var child = parent.$new();\n\n         parent.salutation = \"Hello\";\n         child.name = \"World\";\n         expect(child.salutation).toEqual('Hello');\n\n         child.salutation = \"Welcome\";\n         expect(child.salutation).toEqual('Welcome');\n         expect(parent.salutation).toEqual('Hello');\n     * ```\n     *\n     *\n     * @param {Object.<string, function()>=} providers Map of service factory which need to be\n     *                                       provided for the current scope. Defaults to {@link ng}.\n     * @param {Object.<string, *>=} instanceCache Provides pre-instantiated services which should\n     *                              append/override services provided by `providers`. This is handy\n     *                              when unit-testing and having the need to override a default\n     *                              service.\n     * @returns {Object} Newly created scope.\n     *\n     */\n    function Scope() {\n      this.$id = nextUid();\n      this.$$phase = this.$parent = this.$$watchers =\n                     this.$$nextSibling = this.$$prevSibling =\n                     this.$$childHead = this.$$childTail = null;\n      this['this'] = this.$root =  this;\n      this.$$destroyed = false;\n      this.$$asyncQueue = [];\n      this.$$postDigestQueue = [];\n      this.$$listeners = {};\n      this.$$listenerCount = {};\n      this.$$isolateBindings = {};\n    }\n\n    /**\n     * @ngdoc property\n     * @name $rootScope.Scope#$id\n     * @returns {number} Unique scope ID (monotonically increasing alphanumeric sequence) useful for\n     *   debugging.\n     */\n\n\n    Scope.prototype = {\n      constructor: Scope,\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$new\n       * @kind function\n       *\n       * @description\n       * Creates a new child {@link ng.$rootScope.Scope scope}.\n       *\n       * The parent scope will propagate the {@link ng.$rootScope.Scope#$digest $digest()} and\n       * {@link ng.$rootScope.Scope#$digest $digest()} events. The scope can be removed from the\n       * scope hierarchy using {@link ng.$rootScope.Scope#$destroy $destroy()}.\n       *\n       * {@link ng.$rootScope.Scope#$destroy $destroy()} must be called on a scope when it is\n       * desired for the scope and its child scopes to be permanently detached from the parent and\n       * thus stop participating in model change detection and listener notification by invoking.\n       *\n       * @param {boolean} isolate If true, then the scope does not prototypically inherit from the\n       *         parent scope. The scope is isolated, as it can not see parent scope properties.\n       *         When creating widgets, it is useful for the widget to not accidentally read parent\n       *         state.\n       *\n       * @returns {Object} The newly created child scope.\n       *\n       */\n      $new: function(isolate) {\n        var ChildScope,\n            child;\n\n        if (isolate) {\n          child = new Scope();\n          child.$root = this.$root;\n          // ensure that there is just one async queue per $rootScope and its children\n          child.$$asyncQueue = this.$$asyncQueue;\n          child.$$postDigestQueue = this.$$postDigestQueue;\n        } else {\n          // Only create a child scope class if somebody asks for one,\n          // but cache it to allow the VM to optimize lookups.\n          if (!this.$$childScopeClass) {\n            this.$$childScopeClass = function() {\n              this.$$watchers = this.$$nextSibling =\n                  this.$$childHead = this.$$childTail = null;\n              this.$$listeners = {};\n              this.$$listenerCount = {};\n              this.$id = nextUid();\n              this.$$childScopeClass = null;\n            };\n            this.$$childScopeClass.prototype = this;\n          }\n          child = new this.$$childScopeClass();\n        }\n        child['this'] = child;\n        child.$parent = this;\n        child.$$prevSibling = this.$$childTail;\n        if (this.$$childHead) {\n          this.$$childTail.$$nextSibling = child;\n          this.$$childTail = child;\n        } else {\n          this.$$childHead = this.$$childTail = child;\n        }\n        return child;\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$watch\n       * @kind function\n       *\n       * @description\n       * Registers a `listener` callback to be executed whenever the `watchExpression` changes.\n       *\n       * - The `watchExpression` is called on every call to {@link ng.$rootScope.Scope#$digest\n       *   $digest()} and should return the value that will be watched. (Since\n       *   {@link ng.$rootScope.Scope#$digest $digest()} reruns when it detects changes the\n       *   `watchExpression` can execute multiple times per\n       *   {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)\n       * - The `listener` is called only when the value from the current `watchExpression` and the\n       *   previous call to `watchExpression` are not equal (with the exception of the initial run,\n       *   see below). Inequality is determined according to reference inequality,\n       *   [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)\n       *    via the `!==` Javascript operator, unless `objectEquality == true`\n       *   (see next point)\n       * - When `objectEquality == true`, inequality of the `watchExpression` is determined\n       *   according to the {@link angular.equals} function. To save the value of the object for\n       *   later comparison, the {@link angular.copy} function is used. This therefore means that\n       *   watching complex objects will have adverse memory and performance implications.\n       * - The watch `listener` may change the model, which may trigger other `listener`s to fire.\n       *   This is achieved by rerunning the watchers until no changes are detected. The rerun\n       *   iteration limit is 10 to prevent an infinite loop deadlock.\n       *\n       *\n       * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,\n       * you can register a `watchExpression` function with no `listener`. (Since `watchExpression`\n       * can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a\n       * change is detected, be prepared for multiple calls to your listener.)\n       *\n       * After a watcher is registered with the scope, the `listener` fn is called asynchronously\n       * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the\n       * watcher. In rare cases, this is undesirable because the listener is called when the result\n       * of `watchExpression` didn't change. To detect this scenario within the `listener` fn, you\n       * can compare the `newVal` and `oldVal`. If these two values are identical (`===`) then the\n       * listener was called due to initialization.\n       *\n       * The example below contains an illustration of using a function as your $watch listener\n       *\n       *\n       * # Example\n       * ```js\n           // let's assume that scope was dependency injected as the $rootScope\n           var scope = $rootScope;\n           scope.name = 'misko';\n           scope.counter = 0;\n\n           expect(scope.counter).toEqual(0);\n           scope.$watch('name', function(newValue, oldValue) {\n             scope.counter = scope.counter + 1;\n           });\n           expect(scope.counter).toEqual(0);\n\n           scope.$digest();\n           // the listener is always called during the first $digest loop after it was registered\n           expect(scope.counter).toEqual(1);\n\n           scope.$digest();\n           // but now it will not be called unless the value changes\n           expect(scope.counter).toEqual(1);\n\n           scope.name = 'adam';\n           scope.$digest();\n           expect(scope.counter).toEqual(2);\n\n\n\n           // Using a listener function\n           var food;\n           scope.foodCounter = 0;\n           expect(scope.foodCounter).toEqual(0);\n           scope.$watch(\n             // This is the listener function\n             function() { return food; },\n             // This is the change handler\n             function(newValue, oldValue) {\n               if ( newValue !== oldValue ) {\n                 // Only increment the counter if the value changed\n                 scope.foodCounter = scope.foodCounter + 1;\n               }\n             }\n           );\n           // No digest has been run so the counter will be zero\n           expect(scope.foodCounter).toEqual(0);\n\n           // Run the digest but since food has not changed count will still be zero\n           scope.$digest();\n           expect(scope.foodCounter).toEqual(0);\n\n           // Update food and run digest.  Now the counter will increment\n           food = 'cheeseburger';\n           scope.$digest();\n           expect(scope.foodCounter).toEqual(1);\n\n       * ```\n       *\n       *\n       *\n       * @param {(function()|string)} watchExpression Expression that is evaluated on each\n       *    {@link ng.$rootScope.Scope#$digest $digest} cycle. A change in the return value triggers\n       *    a call to the `listener`.\n       *\n       *    - `string`: Evaluated as {@link guide/expression expression}\n       *    - `function(scope)`: called with current `scope` as a parameter.\n       * @param {(function()|string)=} listener Callback called whenever the return value of\n       *   the `watchExpression` changes.\n       *\n       *    - `string`: Evaluated as {@link guide/expression expression}\n       *    - `function(newValue, oldValue, scope)`: called with current and previous values as\n       *      parameters.\n       *\n       * @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of\n       *     comparing for reference equality.\n       * @returns {function()} Returns a deregistration function for this listener.\n       */\n      $watch: function(watchExp, listener, objectEquality) {\n        var scope = this,\n            get = compileToFn(watchExp, 'watch'),\n            array = scope.$$watchers,\n            watcher = {\n              fn: listener,\n              last: initWatchVal,\n              get: get,\n              exp: watchExp,\n              eq: !!objectEquality\n            };\n\n        lastDirtyWatch = null;\n\n        // in the case user pass string, we need to compile it, do we really need this ?\n        if (!isFunction(listener)) {\n          var listenFn = compileToFn(listener || noop, 'listener');\n          watcher.fn = function(newVal, oldVal, scope) {listenFn(scope);};\n        }\n\n        if (typeof watchExp == 'string' && get.constant) {\n          var originalFn = watcher.fn;\n          watcher.fn = function(newVal, oldVal, scope) {\n            originalFn.call(this, newVal, oldVal, scope);\n            arrayRemove(array, watcher);\n          };\n        }\n\n        if (!array) {\n          array = scope.$$watchers = [];\n        }\n        // we use unshift since we use a while loop in $digest for speed.\n        // the while loop reads in reverse order.\n        array.unshift(watcher);\n\n        return function deregisterWatch() {\n          arrayRemove(array, watcher);\n          lastDirtyWatch = null;\n        };\n      },\n\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$watchCollection\n       * @kind function\n       *\n       * @description\n       * Shallow watches the properties of an object and fires whenever any of the properties change\n       * (for arrays, this implies watching the array items; for object maps, this implies watching\n       * the properties). If a change is detected, the `listener` callback is fired.\n       *\n       * - The `obj` collection is observed via standard $watch operation and is examined on every\n       *   call to $digest() to see if any items have been added, removed, or moved.\n       * - The `listener` is called whenever anything within the `obj` has changed. Examples include\n       *   adding, removing, and moving items belonging to an object or array.\n       *\n       *\n       * # Example\n       * ```js\n          $scope.names = ['igor', 'matias', 'misko', 'james'];\n          $scope.dataCount = 4;\n\n          $scope.$watchCollection('names', function(newNames, oldNames) {\n            $scope.dataCount = newNames.length;\n          });\n\n          expect($scope.dataCount).toEqual(4);\n          $scope.$digest();\n\n          //still at 4 ... no changes\n          expect($scope.dataCount).toEqual(4);\n\n          $scope.names.pop();\n          $scope.$digest();\n\n          //now there's been a change\n          expect($scope.dataCount).toEqual(3);\n       * ```\n       *\n       *\n       * @param {string|function(scope)} obj Evaluated as {@link guide/expression expression}. The\n       *    expression value should evaluate to an object or an array which is observed on each\n       *    {@link ng.$rootScope.Scope#$digest $digest} cycle. Any shallow change within the\n       *    collection will trigger a call to the `listener`.\n       *\n       * @param {function(newCollection, oldCollection, scope)} listener a callback function called\n       *    when a change is detected.\n       *    - The `newCollection` object is the newly modified data obtained from the `obj` expression\n       *    - The `oldCollection` object is a copy of the former collection data.\n       *      Due to performance considerations, the`oldCollection` value is computed only if the\n       *      `listener` function declares two or more arguments.\n       *    - The `scope` argument refers to the current scope.\n       *\n       * @returns {function()} Returns a de-registration function for this listener. When the\n       *    de-registration function is executed, the internal watch operation is terminated.\n       */\n      $watchCollection: function(obj, listener) {\n        var self = this;\n        // the current value, updated on each dirty-check run\n        var newValue;\n        // a shallow copy of the newValue from the last dirty-check run,\n        // updated to match newValue during dirty-check run\n        var oldValue;\n        // a shallow copy of the newValue from when the last change happened\n        var veryOldValue;\n        // only track veryOldValue if the listener is asking for it\n        var trackVeryOldValue = (listener.length > 1);\n        var changeDetected = 0;\n        var objGetter = $parse(obj);\n        var internalArray = [];\n        var internalObject = {};\n        var initRun = true;\n        var oldLength = 0;\n\n        function $watchCollectionWatch() {\n          newValue = objGetter(self);\n          var newLength, key, bothNaN;\n\n          if (!isObject(newValue)) { // if primitive\n            if (oldValue !== newValue) {\n              oldValue = newValue;\n              changeDetected++;\n            }\n          } else if (isArrayLike(newValue)) {\n            if (oldValue !== internalArray) {\n              // we are transitioning from something which was not an array into array.\n              oldValue = internalArray;\n              oldLength = oldValue.length = 0;\n              changeDetected++;\n            }\n\n            newLength = newValue.length;\n\n            if (oldLength !== newLength) {\n              // if lengths do not match we need to trigger change notification\n              changeDetected++;\n              oldValue.length = oldLength = newLength;\n            }\n            // copy the items to oldValue and look for changes.\n            for (var i = 0; i < newLength; i++) {\n              bothNaN = (oldValue[i] !== oldValue[i]) &&\n                  (newValue[i] !== newValue[i]);\n              if (!bothNaN && (oldValue[i] !== newValue[i])) {\n                changeDetected++;\n                oldValue[i] = newValue[i];\n              }\n            }\n          } else {\n            if (oldValue !== internalObject) {\n              // we are transitioning from something which was not an object into object.\n              oldValue = internalObject = {};\n              oldLength = 0;\n              changeDetected++;\n            }\n            // copy the items to oldValue and look for changes.\n            newLength = 0;\n            for (key in newValue) {\n              if (newValue.hasOwnProperty(key)) {\n                newLength++;\n                if (oldValue.hasOwnProperty(key)) {\n                  bothNaN = (oldValue[key] !== oldValue[key]) &&\n                      (newValue[key] !== newValue[key]);\n                  if (!bothNaN && (oldValue[key] !== newValue[key])) {\n                    changeDetected++;\n                    oldValue[key] = newValue[key];\n                  }\n                } else {\n                  oldLength++;\n                  oldValue[key] = newValue[key];\n                  changeDetected++;\n                }\n              }\n            }\n            if (oldLength > newLength) {\n              // we used to have more keys, need to find them and destroy them.\n              changeDetected++;\n              for(key in oldValue) {\n                if (oldValue.hasOwnProperty(key) && !newValue.hasOwnProperty(key)) {\n                  oldLength--;\n                  delete oldValue[key];\n                }\n              }\n            }\n          }\n          return changeDetected;\n        }\n\n        function $watchCollectionAction() {\n          if (initRun) {\n            initRun = false;\n            listener(newValue, newValue, self);\n          } else {\n            listener(newValue, veryOldValue, self);\n          }\n\n          // make a copy for the next time a collection is changed\n          if (trackVeryOldValue) {\n            if (!isObject(newValue)) {\n              //primitive\n              veryOldValue = newValue;\n            } else if (isArrayLike(newValue)) {\n              veryOldValue = new Array(newValue.length);\n              for (var i = 0; i < newValue.length; i++) {\n                veryOldValue[i] = newValue[i];\n              }\n            } else { // if object\n              veryOldValue = {};\n              for (var key in newValue) {\n                if (hasOwnProperty.call(newValue, key)) {\n                  veryOldValue[key] = newValue[key];\n                }\n              }\n            }\n          }\n        }\n\n        return this.$watch($watchCollectionWatch, $watchCollectionAction);\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$digest\n       * @kind function\n       *\n       * @description\n       * Processes all of the {@link ng.$rootScope.Scope#$watch watchers} of the current scope and\n       * its children. Because a {@link ng.$rootScope.Scope#$watch watcher}'s listener can change\n       * the model, the `$digest()` keeps calling the {@link ng.$rootScope.Scope#$watch watchers}\n       * until no more listeners are firing. This means that it is possible to get into an infinite\n       * loop. This function will throw `'Maximum iteration limit exceeded.'` if the number of\n       * iterations exceeds 10.\n       *\n       * Usually, you don't call `$digest()` directly in\n       * {@link ng.directive:ngController controllers} or in\n       * {@link ng.$compileProvider#directive directives}.\n       * Instead, you should call {@link ng.$rootScope.Scope#$apply $apply()} (typically from within\n       * a {@link ng.$compileProvider#directive directives}), which will force a `$digest()`.\n       *\n       * If you want to be notified whenever `$digest()` is called,\n       * you can register a `watchExpression` function with\n       * {@link ng.$rootScope.Scope#$watch $watch()} with no `listener`.\n       *\n       * In unit tests, you may need to call `$digest()` to simulate the scope life cycle.\n       *\n       * # Example\n       * ```js\n           var scope = ...;\n           scope.name = 'misko';\n           scope.counter = 0;\n\n           expect(scope.counter).toEqual(0);\n           scope.$watch('name', function(newValue, oldValue) {\n             scope.counter = scope.counter + 1;\n           });\n           expect(scope.counter).toEqual(0);\n\n           scope.$digest();\n           // the listener is always called during the first $digest loop after it was registered\n           expect(scope.counter).toEqual(1);\n\n           scope.$digest();\n           // but now it will not be called unless the value changes\n           expect(scope.counter).toEqual(1);\n\n           scope.name = 'adam';\n           scope.$digest();\n           expect(scope.counter).toEqual(2);\n       * ```\n       *\n       */\n      $digest: function() {\n        var watch, value, last,\n            watchers,\n            asyncQueue = this.$$asyncQueue,\n            postDigestQueue = this.$$postDigestQueue,\n            length,\n            dirty, ttl = TTL,\n            next, current, target = this,\n            watchLog = [],\n            logIdx, logMsg, asyncTask;\n\n        beginPhase('$digest');\n\n        lastDirtyWatch = null;\n\n        do { // \"while dirty\" loop\n          dirty = false;\n          current = target;\n\n          while(asyncQueue.length) {\n            try {\n              asyncTask = asyncQueue.shift();\n              asyncTask.scope.$eval(asyncTask.expression);\n            } catch (e) {\n              clearPhase();\n              $exceptionHandler(e);\n            }\n            lastDirtyWatch = null;\n          }\n\n          traverseScopesLoop:\n          do { // \"traverse the scopes\" loop\n            if ((watchers = current.$$watchers)) {\n              // process our watches\n              length = watchers.length;\n              while (length--) {\n                try {\n                  watch = watchers[length];\n                  // Most common watches are on primitives, in which case we can short\n                  // circuit it with === operator, only when === fails do we use .equals\n                  if (watch) {\n                    if ((value = watch.get(current)) !== (last = watch.last) &&\n                        !(watch.eq\n                            ? equals(value, last)\n                            : (typeof value === 'number' && typeof last === 'number'\n                               && isNaN(value) && isNaN(last)))) {\n                      dirty = true;\n                      lastDirtyWatch = watch;\n                      watch.last = watch.eq ? copy(value, null) : value;\n                      watch.fn(value, ((last === initWatchVal) ? value : last), current);\n                      if (ttl < 5) {\n                        logIdx = 4 - ttl;\n                        if (!watchLog[logIdx]) watchLog[logIdx] = [];\n                        logMsg = (isFunction(watch.exp))\n                            ? 'fn: ' + (watch.exp.name || watch.exp.toString())\n                            : watch.exp;\n                        logMsg += '; newVal: ' + toJson(value) + '; oldVal: ' + toJson(last);\n                        watchLog[logIdx].push(logMsg);\n                      }\n                    } else if (watch === lastDirtyWatch) {\n                      // If the most recently dirty watcher is now clean, short circuit since the remaining watchers\n                      // have already been tested.\n                      dirty = false;\n                      break traverseScopesLoop;\n                    }\n                  }\n                } catch (e) {\n                  clearPhase();\n                  $exceptionHandler(e);\n                }\n              }\n            }\n\n            // Insanity Warning: scope depth-first traversal\n            // yes, this code is a bit crazy, but it works and we have tests to prove it!\n            // this piece should be kept in sync with the traversal in $broadcast\n            if (!(next = (current.$$childHead ||\n                (current !== target && current.$$nextSibling)))) {\n              while(current !== target && !(next = current.$$nextSibling)) {\n                current = current.$parent;\n              }\n            }\n          } while ((current = next));\n\n          // `break traverseScopesLoop;` takes us to here\n\n          if((dirty || asyncQueue.length) && !(ttl--)) {\n            clearPhase();\n            throw $rootScopeMinErr('infdig',\n                '{0} $digest() iterations reached. Aborting!\\n' +\n                'Watchers fired in the last 5 iterations: {1}',\n                TTL, toJson(watchLog));\n          }\n\n        } while (dirty || asyncQueue.length);\n\n        clearPhase();\n\n        while(postDigestQueue.length) {\n          try {\n            postDigestQueue.shift()();\n          } catch (e) {\n            $exceptionHandler(e);\n          }\n        }\n      },\n\n\n      /**\n       * @ngdoc event\n       * @name $rootScope.Scope#$destroy\n       * @eventType broadcast on scope being destroyed\n       *\n       * @description\n       * Broadcasted when a scope and its children are being destroyed.\n       *\n       * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n       * clean up DOM bindings before an element is removed from the DOM.\n       */\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$destroy\n       * @kind function\n       *\n       * @description\n       * Removes the current scope (and all of its children) from the parent scope. Removal implies\n       * that calls to {@link ng.$rootScope.Scope#$digest $digest()} will no longer\n       * propagate to the current scope and its children. Removal also implies that the current\n       * scope is eligible for garbage collection.\n       *\n       * The `$destroy()` is usually used by directives such as\n       * {@link ng.directive:ngRepeat ngRepeat} for managing the\n       * unrolling of the loop.\n       *\n       * Just before a scope is destroyed, a `$destroy` event is broadcasted on this scope.\n       * Application code can register a `$destroy` event handler that will give it a chance to\n       * perform any necessary cleanup.\n       *\n       * Note that, in AngularJS, there is also a `$destroy` jQuery event, which can be used to\n       * clean up DOM bindings before an element is removed from the DOM.\n       */\n      $destroy: function() {\n        // we can't destroy the root scope or a scope that has been already destroyed\n        if (this.$$destroyed) return;\n        var parent = this.$parent;\n\n        this.$broadcast('$destroy');\n        this.$$destroyed = true;\n        if (this === $rootScope) return;\n\n        forEach(this.$$listenerCount, bind(null, decrementListenerCount, this));\n\n        // sever all the references to parent scopes (after this cleanup, the current scope should\n        // not be retained by any of our references and should be eligible for garbage collection)\n        if (parent.$$childHead == this) parent.$$childHead = this.$$nextSibling;\n        if (parent.$$childTail == this) parent.$$childTail = this.$$prevSibling;\n        if (this.$$prevSibling) this.$$prevSibling.$$nextSibling = this.$$nextSibling;\n        if (this.$$nextSibling) this.$$nextSibling.$$prevSibling = this.$$prevSibling;\n\n\n        // All of the code below is bogus code that works around V8's memory leak via optimized code\n        // and inline caches.\n        //\n        // see:\n        // - https://code.google.com/p/v8/issues/detail?id=2073#c26\n        // - https://github.com/angular/angular.js/issues/6794#issuecomment-38648909\n        // - https://github.com/angular/angular.js/issues/1313#issuecomment-10378451\n\n        this.$parent = this.$$nextSibling = this.$$prevSibling = this.$$childHead =\n            this.$$childTail = this.$root = null;\n\n        // don't reset these to null in case some async task tries to register a listener/watch/task\n        this.$$listeners = {};\n        this.$$watchers = this.$$asyncQueue = this.$$postDigestQueue = [];\n\n        // prevent NPEs since these methods have references to properties we nulled out\n        this.$destroy = this.$digest = this.$apply = noop;\n        this.$on = this.$watch = function() { return noop; };\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$eval\n       * @kind function\n       *\n       * @description\n       * Executes the `expression` on the current scope and returns the result. Any exceptions in\n       * the expression are propagated (uncaught). This is useful when evaluating Angular\n       * expressions.\n       *\n       * # Example\n       * ```js\n           var scope = ng.$rootScope.Scope();\n           scope.a = 1;\n           scope.b = 2;\n\n           expect(scope.$eval('a+b')).toEqual(3);\n           expect(scope.$eval(function(scope){ return scope.a + scope.b; })).toEqual(3);\n       * ```\n       *\n       * @param {(string|function())=} expression An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in  {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with the current `scope` parameter.\n       *\n       * @param {(object)=} locals Local variables object, useful for overriding values in scope.\n       * @returns {*} The result of evaluating the expression.\n       */\n      $eval: function(expr, locals) {\n        return $parse(expr)(this, locals);\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$evalAsync\n       * @kind function\n       *\n       * @description\n       * Executes the expression on the current scope at a later point in time.\n       *\n       * The `$evalAsync` makes no guarantees as to when the `expression` will be executed, only\n       * that:\n       *\n       *   - it will execute after the function that scheduled the evaluation (preferably before DOM\n       *     rendering).\n       *   - at least one {@link ng.$rootScope.Scope#$digest $digest cycle} will be performed after\n       *     `expression` execution.\n       *\n       * Any exceptions from the execution of the expression are forwarded to the\n       * {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * __Note:__ if this function is called outside of a `$digest` cycle, a new `$digest` cycle\n       * will be scheduled. However, it is encouraged to always call code that changes the model\n       * from within an `$apply` call. That includes code evaluated via `$evalAsync`.\n       *\n       * @param {(string|function())=} expression An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with the current `scope` parameter.\n       *\n       */\n      $evalAsync: function(expr) {\n        // if we are outside of an $digest loop and this is the first time we are scheduling async\n        // task also schedule async auto-flush\n        if (!$rootScope.$$phase && !$rootScope.$$asyncQueue.length) {\n          $browser.defer(function() {\n            if ($rootScope.$$asyncQueue.length) {\n              $rootScope.$digest();\n            }\n          });\n        }\n\n        this.$$asyncQueue.push({scope: this, expression: expr});\n      },\n\n      $$postDigest : function(fn) {\n        this.$$postDigestQueue.push(fn);\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$apply\n       * @kind function\n       *\n       * @description\n       * `$apply()` is used to execute an expression in angular from outside of the angular\n       * framework. (For example from browser DOM events, setTimeout, XHR or third party libraries).\n       * Because we are calling into the angular framework we need to perform proper scope life\n       * cycle of {@link ng.$exceptionHandler exception handling},\n       * {@link ng.$rootScope.Scope#$digest executing watches}.\n       *\n       * ## Life cycle\n       *\n       * # Pseudo-Code of `$apply()`\n       * ```js\n           function $apply(expr) {\n             try {\n               return $eval(expr);\n             } catch (e) {\n               $exceptionHandler(e);\n             } finally {\n               $root.$digest();\n             }\n           }\n       * ```\n       *\n       *\n       * Scope's `$apply()` method transitions through the following stages:\n       *\n       * 1. The {@link guide/expression expression} is executed using the\n       *    {@link ng.$rootScope.Scope#$eval $eval()} method.\n       * 2. Any exceptions from the execution of the expression are forwarded to the\n       *    {@link ng.$exceptionHandler $exceptionHandler} service.\n       * 3. The {@link ng.$rootScope.Scope#$watch watch} listeners are fired immediately after the\n       *    expression was executed using the {@link ng.$rootScope.Scope#$digest $digest()} method.\n       *\n       *\n       * @param {(string|function())=} exp An angular expression to be executed.\n       *\n       *    - `string`: execute using the rules as defined in {@link guide/expression expression}.\n       *    - `function(scope)`: execute the function with current `scope` parameter.\n       *\n       * @returns {*} The result of evaluating the expression.\n       */\n      $apply: function(expr) {\n        try {\n          beginPhase('$apply');\n          return this.$eval(expr);\n        } catch (e) {\n          $exceptionHandler(e);\n        } finally {\n          clearPhase();\n          try {\n            $rootScope.$digest();\n          } catch (e) {\n            $exceptionHandler(e);\n            throw e;\n          }\n        }\n      },\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$on\n       * @kind function\n       *\n       * @description\n       * Listens on events of a given type. See {@link ng.$rootScope.Scope#$emit $emit} for\n       * discussion of event life cycle.\n       *\n       * The event listener function format is: `function(event, args...)`. The `event` object\n       * passed into the listener has the following attributes:\n       *\n       *   - `targetScope` - `{Scope}`: the scope on which the event was `$emit`-ed or\n       *     `$broadcast`-ed.\n       *   - `currentScope` - `{Scope}`: the current scope which is handling the event.\n       *   - `name` - `{string}`: name of the event.\n       *   - `stopPropagation` - `{function=}`: calling `stopPropagation` function will cancel\n       *     further event propagation (available only for events that were `$emit`-ed).\n       *   - `preventDefault` - `{function}`: calling `preventDefault` sets `defaultPrevented` flag\n       *     to true.\n       *   - `defaultPrevented` - `{boolean}`: true if `preventDefault` was called.\n       *\n       * @param {string} name Event name to listen on.\n       * @param {function(event, ...args)} listener Function to call when the event is emitted.\n       * @returns {function()} Returns a deregistration function for this listener.\n       */\n      $on: function(name, listener) {\n        var namedListeners = this.$$listeners[name];\n        if (!namedListeners) {\n          this.$$listeners[name] = namedListeners = [];\n        }\n        namedListeners.push(listener);\n\n        var current = this;\n        do {\n          if (!current.$$listenerCount[name]) {\n            current.$$listenerCount[name] = 0;\n          }\n          current.$$listenerCount[name]++;\n        } while ((current = current.$parent));\n\n        var self = this;\n        return function() {\n          namedListeners[indexOf(namedListeners, listener)] = null;\n          decrementListenerCount(self, 1, name);\n        };\n      },\n\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$emit\n       * @kind function\n       *\n       * @description\n       * Dispatches an event `name` upwards through the scope hierarchy notifying the\n       * registered {@link ng.$rootScope.Scope#$on} listeners.\n       *\n       * The event life cycle starts at the scope on which `$emit` was called. All\n       * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n       * notified. Afterwards, the event traverses upwards toward the root scope and calls all\n       * registered listeners along the way. The event will stop propagating if one of the listeners\n       * cancels it.\n       *\n       * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n       * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * @param {string} name Event name to emit.\n       * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n       * @return {Object} Event object (see {@link ng.$rootScope.Scope#$on}).\n       */\n      $emit: function(name, args) {\n        var empty = [],\n            namedListeners,\n            scope = this,\n            stopPropagation = false,\n            event = {\n              name: name,\n              targetScope: scope,\n              stopPropagation: function() {stopPropagation = true;},\n              preventDefault: function() {\n                event.defaultPrevented = true;\n              },\n              defaultPrevented: false\n            },\n            listenerArgs = concat([event], arguments, 1),\n            i, length;\n\n        do {\n          namedListeners = scope.$$listeners[name] || empty;\n          event.currentScope = scope;\n          for (i=0, length=namedListeners.length; i<length; i++) {\n\n            // if listeners were deregistered, defragment the array\n            if (!namedListeners[i]) {\n              namedListeners.splice(i, 1);\n              i--;\n              length--;\n              continue;\n            }\n            try {\n              //allow all listeners attached to the current scope to run\n              namedListeners[i].apply(null, listenerArgs);\n            } catch (e) {\n              $exceptionHandler(e);\n            }\n          }\n          //if any listener on the current scope stops propagation, prevent bubbling\n          if (stopPropagation) return event;\n          //traverse upwards\n          scope = scope.$parent;\n        } while (scope);\n\n        return event;\n      },\n\n\n      /**\n       * @ngdoc method\n       * @name $rootScope.Scope#$broadcast\n       * @kind function\n       *\n       * @description\n       * Dispatches an event `name` downwards to all child scopes (and their children) notifying the\n       * registered {@link ng.$rootScope.Scope#$on} listeners.\n       *\n       * The event life cycle starts at the scope on which `$broadcast` was called. All\n       * {@link ng.$rootScope.Scope#$on listeners} listening for `name` event on this scope get\n       * notified. Afterwards, the event propagates to all direct and indirect scopes of the current\n       * scope and calls all registered listeners along the way. The event cannot be canceled.\n       *\n       * Any exception emitted from the {@link ng.$rootScope.Scope#$on listeners} will be passed\n       * onto the {@link ng.$exceptionHandler $exceptionHandler} service.\n       *\n       * @param {string} name Event name to broadcast.\n       * @param {...*} args Optional one or more arguments which will be passed onto the event listeners.\n       * @return {Object} Event object, see {@link ng.$rootScope.Scope#$on}\n       */\n      $broadcast: function(name, args) {\n        var target = this,\n            current = target,\n            next = target,\n            event = {\n              name: name,\n              targetScope: target,\n              preventDefault: function() {\n                event.defaultPrevented = true;\n              },\n              defaultPrevented: false\n            },\n            listenerArgs = concat([event], arguments, 1),\n            listeners, i, length;\n\n        //down while you can, then up and next sibling or up and next sibling until back at root\n        while ((current = next)) {\n          event.currentScope = current;\n          listeners = current.$$listeners[name] || [];\n          for (i=0, length = listeners.length; i<length; i++) {\n            // if listeners were deregistered, defragment the array\n            if (!listeners[i]) {\n              listeners.splice(i, 1);\n              i--;\n              length--;\n              continue;\n            }\n\n            try {\n              listeners[i].apply(null, listenerArgs);\n            } catch(e) {\n              $exceptionHandler(e);\n            }\n          }\n\n          // Insanity Warning: scope depth-first traversal\n          // yes, this code is a bit crazy, but it works and we have tests to prove it!\n          // this piece should be kept in sync with the traversal in $digest\n          // (though it differs due to having the extra check for $$listenerCount)\n          if (!(next = ((current.$$listenerCount[name] && current.$$childHead) ||\n              (current !== target && current.$$nextSibling)))) {\n            while(current !== target && !(next = current.$$nextSibling)) {\n              current = current.$parent;\n            }\n          }\n        }\n\n        return event;\n      }\n    };\n\n    var $rootScope = new Scope();\n\n    return $rootScope;\n\n\n    function beginPhase(phase) {\n      if ($rootScope.$$phase) {\n        throw $rootScopeMinErr('inprog', '{0} already in progress', $rootScope.$$phase);\n      }\n\n      $rootScope.$$phase = phase;\n    }\n\n    function clearPhase() {\n      $rootScope.$$phase = null;\n    }\n\n    function compileToFn(exp, name) {\n      var fn = $parse(exp);\n      assertArgFn(fn, name);\n      return fn;\n    }\n\n    function decrementListenerCount(current, count, name) {\n      do {\n        current.$$listenerCount[name] -= count;\n\n        if (current.$$listenerCount[name] === 0) {\n          delete current.$$listenerCount[name];\n        }\n      } while ((current = current.$parent));\n    }\n\n    /**\n     * function used as an initial value for watchers.\n     * because it's unique we can easily tell it apart from other values\n     */\n    function initWatchVal() {}\n  }];\n}\n\n/**\n * @description\n * Private service to sanitize uris for links and images. Used by $compile and $sanitize.\n */\nfunction $$SanitizeUriProvider() {\n  var aHrefSanitizationWhitelist = /^\\s*(https?|ftp|mailto|tel|file):/,\n    imgSrcSanitizationWhitelist = /^\\s*(https?|ftp|file):|data:image\\//;\n\n  /**\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during a[href] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to a[href] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `aHrefSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.aHrefSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      aHrefSanitizationWhitelist = regexp;\n      return this;\n    }\n    return aHrefSanitizationWhitelist;\n  };\n\n\n  /**\n   * @description\n   * Retrieves or overrides the default regular expression that is used for whitelisting of safe\n   * urls during img[src] sanitization.\n   *\n   * The sanitization is a security measure aimed at prevent XSS attacks via html links.\n   *\n   * Any url about to be assigned to img[src] via data-binding is first normalized and turned into\n   * an absolute url. Afterwards, the url is matched against the `imgSrcSanitizationWhitelist`\n   * regular expression. If a match is found, the original url is written into the dom. Otherwise,\n   * the absolute url is prefixed with `'unsafe:'` string and only then is it written into the DOM.\n   *\n   * @param {RegExp=} regexp New regexp to whitelist urls with.\n   * @returns {RegExp|ng.$compileProvider} Current RegExp if called without value or self for\n   *    chaining otherwise.\n   */\n  this.imgSrcSanitizationWhitelist = function(regexp) {\n    if (isDefined(regexp)) {\n      imgSrcSanitizationWhitelist = regexp;\n      return this;\n    }\n    return imgSrcSanitizationWhitelist;\n  };\n\n  this.$get = function() {\n    return function sanitizeUri(uri, isImage) {\n      var regex = isImage ? imgSrcSanitizationWhitelist : aHrefSanitizationWhitelist;\n      var normalizedVal;\n      // NOTE: urlResolve() doesn't support IE < 8 so we don't sanitize for that case.\n      if (!msie || msie >= 8 ) {\n        normalizedVal = urlResolve(uri).href;\n        if (normalizedVal !== '' && !normalizedVal.match(regex)) {\n          return 'unsafe:'+normalizedVal;\n        }\n      }\n      return uri;\n    };\n  };\n}\n\nvar $sceMinErr = minErr('$sce');\n\nvar SCE_CONTEXTS = {\n  HTML: 'html',\n  CSS: 'css',\n  URL: 'url',\n  // RESOURCE_URL is a subtype of URL used in contexts where a privileged resource is sourced from a\n  // url.  (e.g. ng-include, script src, templateUrl)\n  RESOURCE_URL: 'resourceUrl',\n  JS: 'js'\n};\n\n// Helper functions follow.\n\n// Copied from:\n// http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962\n// Prereq: s is a string.\nfunction escapeForRegexp(s) {\n  return s.replace(/([-()\\[\\]{}+?*.$\\^|,:#<!\\\\])/g, '\\\\$1').\n           replace(/\\x08/g, '\\\\x08');\n}\n\n\nfunction adjustMatcher(matcher) {\n  if (matcher === 'self') {\n    return matcher;\n  } else if (isString(matcher)) {\n    // Strings match exactly except for 2 wildcards - '*' and '**'.\n    // '*' matches any character except those from the set ':/.?&'.\n    // '**' matches any character (like .* in a RegExp).\n    // More than 2 *'s raises an error as it's ill defined.\n    if (matcher.indexOf('***') > -1) {\n      throw $sceMinErr('iwcard',\n          'Illegal sequence *** in string matcher.  String: {0}', matcher);\n    }\n    matcher = escapeForRegexp(matcher).\n                  replace('\\\\*\\\\*', '.*').\n                  replace('\\\\*', '[^:/.?&;]*');\n    return new RegExp('^' + matcher + '$');\n  } else if (isRegExp(matcher)) {\n    // The only other type of matcher allowed is a Regexp.\n    // Match entire URL / disallow partial matches.\n    // Flags are reset (i.e. no global, ignoreCase or multiline)\n    return new RegExp('^' + matcher.source + '$');\n  } else {\n    throw $sceMinErr('imatcher',\n        'Matchers may only be \"self\", string patterns or RegExp objects');\n  }\n}\n\n\nfunction adjustMatchers(matchers) {\n  var adjustedMatchers = [];\n  if (isDefined(matchers)) {\n    forEach(matchers, function(matcher) {\n      adjustedMatchers.push(adjustMatcher(matcher));\n    });\n  }\n  return adjustedMatchers;\n}\n\n\n/**\n * @ngdoc service\n * @name $sceDelegate\n * @kind function\n *\n * @description\n *\n * `$sceDelegate` is a service that is used by the `$sce` service to provide {@link ng.$sce Strict\n * Contextual Escaping (SCE)} services to AngularJS.\n *\n * Typically, you would configure or override the {@link ng.$sceDelegate $sceDelegate} instead of\n * the `$sce` service to customize the way Strict Contextual Escaping works in AngularJS.  This is\n * because, while the `$sce` provides numerous shorthand methods, etc., you really only need to\n * override 3 core functions (`trustAs`, `getTrusted` and `valueOf`) to replace the way things\n * work because `$sce` delegates to `$sceDelegate` for these operations.\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} to configure this service.\n *\n * The default instance of `$sceDelegate` should work out of the box with little pain.  While you\n * can override it completely to change the behavior of `$sce`, the common case would\n * involve configuring the {@link ng.$sceDelegateProvider $sceDelegateProvider} instead by setting\n * your own whitelists and blacklists for trusting URLs used for loading AngularJS resources such as\n * templates.  Refer {@link ng.$sceDelegateProvider#resourceUrlWhitelist\n * $sceDelegateProvider.resourceUrlWhitelist} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n */\n\n/**\n * @ngdoc provider\n * @name $sceDelegateProvider\n * @description\n *\n * The `$sceDelegateProvider` provider allows developers to configure the {@link ng.$sceDelegate\n * $sceDelegate} service.  This allows one to get/set the whitelists and blacklists used to ensure\n * that the URLs used for sourcing Angular templates are safe.  Refer {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist $sceDelegateProvider.resourceUrlWhitelist} and\n * {@link ng.$sceDelegateProvider#resourceUrlBlacklist $sceDelegateProvider.resourceUrlBlacklist}\n *\n * For the general details about this service in Angular, read the main page for {@link ng.$sce\n * Strict Contextual Escaping (SCE)}.\n *\n * **Example**:  Consider the following case. <a name=\"example\"></a>\n *\n * - your app is hosted at url `http://myapp.example.com/`\n * - but some of your templates are hosted on other domains you control such as\n *   `http://srv01.assets.example.com/`,  `http://srv02.assets.example.com/`, etc.\n * - and you have an open redirect at `http://myapp.example.com/clickThru?...`.\n *\n * Here is what a secure configuration for this scenario might look like:\n *\n * ```\n *  angular.module('myApp', []).config(function($sceDelegateProvider) {\n *    $sceDelegateProvider.resourceUrlWhitelist([\n *      // Allow same origin resource loads.\n *      'self',\n *      // Allow loading from our assets domain.  Notice the difference between * and **.\n *      'http://srv*.assets.example.com/**'\n *    ]);\n *\n *    // The blacklist overrides the whitelist so the open redirect here is blocked.\n *    $sceDelegateProvider.resourceUrlBlacklist([\n *      'http://myapp.example.com/clickThru**'\n *    ]);\n *  });\n * ```\n */\n\nfunction $SceDelegateProvider() {\n  this.SCE_CONTEXTS = SCE_CONTEXTS;\n\n  // Resource URLs can also be trusted by policy.\n  var resourceUrlWhitelist = ['self'],\n      resourceUrlBlacklist = [];\n\n  /**\n   * @ngdoc method\n   * @name $sceDelegateProvider#resourceUrlWhitelist\n   * @kind function\n   *\n   * @param {Array=} whitelist When provided, replaces the resourceUrlWhitelist with the value\n   *     provided.  This must be an array or null.  A snapshot of this array is used so further\n   *     changes to the array are ignored.\n   *\n   *     Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n   *     allowed in this array.\n   *\n   *     Note: **an empty whitelist array will block all URLs**!\n   *\n   * @return {Array} the currently set whitelist array.\n   *\n   * The **default value** when no whitelist has been explicitly set is `['self']` allowing only\n   * same origin resource requests.\n   *\n   * @description\n   * Sets/Gets the whitelist of trusted resource URLs.\n   */\n  this.resourceUrlWhitelist = function (value) {\n    if (arguments.length) {\n      resourceUrlWhitelist = adjustMatchers(value);\n    }\n    return resourceUrlWhitelist;\n  };\n\n  /**\n   * @ngdoc method\n   * @name $sceDelegateProvider#resourceUrlBlacklist\n   * @kind function\n   *\n   * @param {Array=} blacklist When provided, replaces the resourceUrlBlacklist with the value\n   *     provided.  This must be an array or null.  A snapshot of this array is used so further\n   *     changes to the array are ignored.\n   *\n   *     Follow {@link ng.$sce#resourceUrlPatternItem this link} for a description of the items\n   *     allowed in this array.\n   *\n   *     The typical usage for the blacklist is to **block\n   *     [open redirects](http://cwe.mitre.org/data/definitions/601.html)** served by your domain as\n   *     these would otherwise be trusted but actually return content from the redirected domain.\n   *\n   *     Finally, **the blacklist overrides the whitelist** and has the final say.\n   *\n   * @return {Array} the currently set blacklist array.\n   *\n   * The **default value** when no whitelist has been explicitly set is the empty array (i.e. there\n   * is no blacklist.)\n   *\n   * @description\n   * Sets/Gets the blacklist of trusted resource URLs.\n   */\n\n  this.resourceUrlBlacklist = function (value) {\n    if (arguments.length) {\n      resourceUrlBlacklist = adjustMatchers(value);\n    }\n    return resourceUrlBlacklist;\n  };\n\n  this.$get = ['$injector', function($injector) {\n\n    var htmlSanitizer = function htmlSanitizer(html) {\n      throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n    };\n\n    if ($injector.has('$sanitize')) {\n      htmlSanitizer = $injector.get('$sanitize');\n    }\n\n\n    function matchUrl(matcher, parsedUrl) {\n      if (matcher === 'self') {\n        return urlIsSameOrigin(parsedUrl);\n      } else {\n        // definitely a regex.  See adjustMatchers()\n        return !!matcher.exec(parsedUrl.href);\n      }\n    }\n\n    function isResourceUrlAllowedByPolicy(url) {\n      var parsedUrl = urlResolve(url.toString());\n      var i, n, allowed = false;\n      // Ensure that at least one item from the whitelist allows this url.\n      for (i = 0, n = resourceUrlWhitelist.length; i < n; i++) {\n        if (matchUrl(resourceUrlWhitelist[i], parsedUrl)) {\n          allowed = true;\n          break;\n        }\n      }\n      if (allowed) {\n        // Ensure that no item from the blacklist blocked this url.\n        for (i = 0, n = resourceUrlBlacklist.length; i < n; i++) {\n          if (matchUrl(resourceUrlBlacklist[i], parsedUrl)) {\n            allowed = false;\n            break;\n          }\n        }\n      }\n      return allowed;\n    }\n\n    function generateHolderType(Base) {\n      var holderType = function TrustedValueHolderType(trustedValue) {\n        this.$$unwrapTrustedValue = function() {\n          return trustedValue;\n        };\n      };\n      if (Base) {\n        holderType.prototype = new Base();\n      }\n      holderType.prototype.valueOf = function sceValueOf() {\n        return this.$$unwrapTrustedValue();\n      };\n      holderType.prototype.toString = function sceToString() {\n        return this.$$unwrapTrustedValue().toString();\n      };\n      return holderType;\n    }\n\n    var trustedValueHolderBase = generateHolderType(),\n        byType = {};\n\n    byType[SCE_CONTEXTS.HTML] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.CSS] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.URL] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.JS] = generateHolderType(trustedValueHolderBase);\n    byType[SCE_CONTEXTS.RESOURCE_URL] = generateHolderType(byType[SCE_CONTEXTS.URL]);\n\n    /**\n     * @ngdoc method\n     * @name $sceDelegate#trustAs\n     *\n     * @description\n     * Returns an object that is trusted by angular for use in specified strict\n     * contextual escaping contexts (such as ng-bind-html, ng-include, any src\n     * attribute interpolation, any dom event binding attribute interpolation\n     * such as for onclick,  etc.) that uses the provided value.\n     * See {@link ng.$sce $sce} for enabling strict contextual escaping.\n     *\n     * @param {string} type The kind of context in which this value is safe for use.  e.g. url,\n     *   resourceUrl, html, js and css.\n     * @param {*} value The value that that should be considered trusted/safe.\n     * @returns {*} A value that can be used to stand in for the provided `value` in places\n     * where Angular expects a $sce.trustAs() return value.\n     */\n    function trustAs(type, trustedValue) {\n      var Constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n      if (!Constructor) {\n        throw $sceMinErr('icontext',\n            'Attempted to trust a value in invalid context. Context: {0}; Value: {1}',\n            type, trustedValue);\n      }\n      if (trustedValue === null || trustedValue === undefined || trustedValue === '') {\n        return trustedValue;\n      }\n      // All the current contexts in SCE_CONTEXTS happen to be strings.  In order to avoid trusting\n      // mutable objects, we ensure here that the value passed in is actually a string.\n      if (typeof trustedValue !== 'string') {\n        throw $sceMinErr('itype',\n            'Attempted to trust a non-string value in a content requiring a string: Context: {0}',\n            type);\n      }\n      return new Constructor(trustedValue);\n    }\n\n    /**\n     * @ngdoc method\n     * @name $sceDelegate#valueOf\n     *\n     * @description\n     * If the passed parameter had been returned by a prior call to {@link ng.$sceDelegate#trustAs\n     * `$sceDelegate.trustAs`}, returns the value that had been passed to {@link\n     * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.\n     *\n     * If the passed parameter is not a value that had been returned by {@link\n     * ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}, returns it as-is.\n     *\n     * @param {*} value The result of a prior {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}\n     *      call or anything else.\n     * @returns {*} The `value` that was originally provided to {@link ng.$sceDelegate#trustAs\n     *     `$sceDelegate.trustAs`} if `value` is the result of such a call.  Otherwise, returns\n     *     `value` unchanged.\n     */\n    function valueOf(maybeTrusted) {\n      if (maybeTrusted instanceof trustedValueHolderBase) {\n        return maybeTrusted.$$unwrapTrustedValue();\n      } else {\n        return maybeTrusted;\n      }\n    }\n\n    /**\n     * @ngdoc method\n     * @name $sceDelegate#getTrusted\n     *\n     * @description\n     * Takes the result of a {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`} call and\n     * returns the originally supplied value if the queried context type is a supertype of the\n     * created type.  If this condition isn't satisfied, throws an exception.\n     *\n     * @param {string} type The kind of context in which this value is to be used.\n     * @param {*} maybeTrusted The result of a prior {@link ng.$sceDelegate#trustAs\n     *     `$sceDelegate.trustAs`} call.\n     * @returns {*} The value the was originally provided to {@link ng.$sceDelegate#trustAs\n     *     `$sceDelegate.trustAs`} if valid in this context.  Otherwise, throws an exception.\n     */\n    function getTrusted(type, maybeTrusted) {\n      if (maybeTrusted === null || maybeTrusted === undefined || maybeTrusted === '') {\n        return maybeTrusted;\n      }\n      var constructor = (byType.hasOwnProperty(type) ? byType[type] : null);\n      if (constructor && maybeTrusted instanceof constructor) {\n        return maybeTrusted.$$unwrapTrustedValue();\n      }\n      // If we get here, then we may only take one of two actions.\n      // 1. sanitize the value for the requested type, or\n      // 2. throw an exception.\n      if (type === SCE_CONTEXTS.RESOURCE_URL) {\n        if (isResourceUrlAllowedByPolicy(maybeTrusted)) {\n          return maybeTrusted;\n        } else {\n          throw $sceMinErr('insecurl',\n              'Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}',\n              maybeTrusted.toString());\n        }\n      } else if (type === SCE_CONTEXTS.HTML) {\n        return htmlSanitizer(maybeTrusted);\n      }\n      throw $sceMinErr('unsafe', 'Attempting to use an unsafe value in a safe context.');\n    }\n\n    return { trustAs: trustAs,\n             getTrusted: getTrusted,\n             valueOf: valueOf };\n  }];\n}\n\n\n/**\n * @ngdoc provider\n * @name $sceProvider\n * @description\n *\n * The $sceProvider provider allows developers to configure the {@link ng.$sce $sce} service.\n * -   enable/disable Strict Contextual Escaping (SCE) in a module\n * -   override the default implementation with a custom delegate\n *\n * Read more about {@link ng.$sce Strict Contextual Escaping (SCE)}.\n */\n\n/* jshint maxlen: false*/\n\n/**\n * @ngdoc service\n * @name $sce\n * @kind function\n *\n * @description\n *\n * `$sce` is a service that provides Strict Contextual Escaping services to AngularJS.\n *\n * # Strict Contextual Escaping\n *\n * Strict Contextual Escaping (SCE) is a mode in which AngularJS requires bindings in certain\n * contexts to result in a value that is marked as safe to use for that context.  One example of\n * such a context is binding arbitrary html controlled by the user via `ng-bind-html`.  We refer\n * to these contexts as privileged or SCE contexts.\n *\n * As of version 1.2, Angular ships with SCE enabled by default.\n *\n * Note:  When enabled (the default), IE8 in quirks mode is not supported.  In this mode, IE8 allows\n * one to execute arbitrary javascript by the use of the expression() syntax.  Refer\n * <http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx> to learn more about them.\n * You can ensure your document is in standards mode and not quirks mode by adding `<!doctype html>`\n * to the top of your HTML document.\n *\n * SCE assists in writing code in way that (a) is secure by default and (b) makes auditing for\n * security vulnerabilities such as XSS, clickjacking, etc. a lot easier.\n *\n * Here's an example of a binding in a privileged context:\n *\n * ```\n * <input ng-model=\"userHtml\">\n * <div ng-bind-html=\"userHtml\"></div>\n * ```\n *\n * Notice that `ng-bind-html` is bound to `userHtml` controlled by the user.  With SCE\n * disabled, this application allows the user to render arbitrary HTML into the DIV.\n * In a more realistic example, one may be rendering user comments, blog articles, etc. via\n * bindings.  (HTML is just one example of a context where rendering user controlled input creates\n * security vulnerabilities.)\n *\n * For the case of HTML, you might use a library, either on the client side, or on the server side,\n * to sanitize unsafe HTML before binding to the value and rendering it in the document.\n *\n * How would you ensure that every place that used these types of bindings was bound to a value that\n * was sanitized by your library (or returned as safe for rendering by your server?)  How can you\n * ensure that you didn't accidentally delete the line that sanitized the value, or renamed some\n * properties/fields and forgot to update the binding to the sanitized value?\n *\n * To be secure by default, you want to ensure that any such bindings are disallowed unless you can\n * determine that something explicitly says it's safe to use a value for binding in that\n * context.  You can then audit your code (a simple grep would do) to ensure that this is only done\n * for those values that you can easily tell are safe - because they were received from your server,\n * sanitized by your library, etc.  You can organize your codebase to help with this - perhaps\n * allowing only the files in a specific directory to do this.  Ensuring that the internal API\n * exposed by that code doesn't markup arbitrary values as safe then becomes a more manageable task.\n *\n * In the case of AngularJS' SCE service, one uses {@link ng.$sce#trustAs $sce.trustAs}\n * (and shorthand methods such as {@link ng.$sce#trustAsHtml $sce.trustAsHtml}, etc.) to\n * obtain values that will be accepted by SCE / privileged contexts.\n *\n *\n * ## How does it work?\n *\n * In privileged contexts, directives and code will bind to the result of {@link ng.$sce#getTrusted\n * $sce.getTrusted(context, value)} rather than to the value directly.  Directives use {@link\n * ng.$sce#parse $sce.parseAs} rather than `$parse` to watch attribute bindings, which performs the\n * {@link ng.$sce#getTrusted $sce.getTrusted} behind the scenes on non-constant literals.\n *\n * As an example, {@link ng.directive:ngBindHtml ngBindHtml} uses {@link\n * ng.$sce#parseAsHtml $sce.parseAsHtml(binding expression)}.  Here's the actual code (slightly\n * simplified):\n *\n * ```\n * var ngBindHtmlDirective = ['$sce', function($sce) {\n *   return function(scope, element, attr) {\n *     scope.$watch($sce.parseAsHtml(attr.ngBindHtml), function(value) {\n *       element.html(value || '');\n *     });\n *   };\n * }];\n * ```\n *\n * ## Impact on loading templates\n *\n * This applies both to the {@link ng.directive:ngInclude `ng-include`} directive as well as\n * `templateUrl`'s specified by {@link guide/directive directives}.\n *\n * By default, Angular only loads templates from the same domain and protocol as the application\n * document.  This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on the template URL.  To load templates from other domains and/or\n * protocols, you may either either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist\n * them} or {@link ng.$sce#trustAsResourceUrl wrap it} into a trusted value.\n *\n * *Please note*:\n * The browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy apply in addition to this and may further restrict whether the template is successfully\n * loaded.  This means that without the right CORS policy, loading templates from a different domain\n * won't work on all browsers.  Also, loading templates from `file://` URL does not work on some\n * browsers.\n *\n * ## This feels like too much overhead for the developer?\n *\n * It's important to remember that SCE only applies to interpolation expressions.\n *\n * If your expressions are constant literals, they're automatically trusted and you don't need to\n * call `$sce.trustAs` on them (remember to include the `ngSanitize` module) (e.g.\n * `<div ng-bind-html=\"'<b>implicitly trusted</b>'\"></div>`) just works.\n *\n * Additionally, `a[href]` and `img[src]` automatically sanitize their URLs and do not pass them\n * through {@link ng.$sce#getTrusted $sce.getTrusted}.  SCE doesn't play a role here.\n *\n * The included {@link ng.$sceDelegate $sceDelegate} comes with sane defaults to allow you to load\n * templates in `ng-include` from your application's domain without having to even know about SCE.\n * It blocks loading templates from other domains or loading templates over http from an https\n * served document.  You can change these by setting your own custom {@link\n * ng.$sceDelegateProvider#resourceUrlWhitelist whitelists} and {@link\n * ng.$sceDelegateProvider#resourceUrlBlacklist blacklists} for matching such URLs.\n *\n * This significantly reduces the overhead.  It is far easier to pay the small overhead and have an\n * application that's secure and can be audited to verify that with much more ease than bolting\n * security onto an application later.\n *\n * <a name=\"contexts\"></a>\n * ## What trusted context types are supported?\n *\n * | Context             | Notes          |\n * |---------------------|----------------|\n * | `$sce.HTML`         | For HTML that's safe to source into the application.  The {@link ng.directive:ngBindHtml ngBindHtml} directive uses this context for bindings. If an unsafe value is encountered and the {@link ngSanitize $sanitize} module is present this will sanitize the value instead of throwing an error. |\n * | `$sce.CSS`          | For CSS that's safe to source into the application.  Currently unused.  Feel free to use it in your own directives. |\n * | `$sce.URL`          | For URLs that are safe to follow as links.  Currently unused (`<a href=` and `<img src=` sanitize their urls and don't constitute an SCE context. |\n * | `$sce.RESOURCE_URL` | For URLs that are not only safe to follow as links, but whose contents are also safe to include in your application.  Examples include `ng-include`, `src` / `ngSrc` bindings for tags other than `IMG` (e.g. `IFRAME`, `OBJECT`, etc.)  <br><br>Note that `$sce.RESOURCE_URL` makes a stronger statement about the URL than `$sce.URL` does and therefore contexts requiring values trusted for `$sce.RESOURCE_URL` can be used anywhere that values trusted for `$sce.URL` are required. |\n * | `$sce.JS`           | For JavaScript that is safe to execute in your application's context.  Currently unused.  Feel free to use it in your own directives. |\n *\n * ## Format of items in {@link ng.$sceDelegateProvider#resourceUrlWhitelist resourceUrlWhitelist}/{@link ng.$sceDelegateProvider#resourceUrlBlacklist Blacklist} <a name=\"resourceUrlPatternItem\"></a>\n *\n *  Each element in these arrays must be one of the following:\n *\n *  - **'self'**\n *    - The special **string**, `'self'`, can be used to match against all URLs of the **same\n *      domain** as the application document using the **same protocol**.\n *  - **String** (except the special value `'self'`)\n *    - The string is matched against the full *normalized / absolute URL* of the resource\n *      being tested (substring matches are not good enough.)\n *    - There are exactly **two wildcard sequences** - `*` and `**`.  All other characters\n *      match themselves.\n *    - `*`: matches zero or more occurrences of any character other than one of the following 6\n *      characters: '`:`', '`/`', '`.`', '`?`', '`&`' and ';'.  It's a useful wildcard for use\n *      in a whitelist.\n *    - `**`: matches zero or more occurrences of *any* character.  As such, it's not\n *      not appropriate to use in for a scheme, domain, etc. as it would match too much.  (e.g.\n *      http://**.example.com/ would match http://evil.com/?ignore=.example.com/ and that might\n *      not have been the intention.)  Its usage at the very end of the path is ok.  (e.g.\n *      http://foo.example.com/templates/**).\n *  - **RegExp** (*see caveat below*)\n *    - *Caveat*:  While regular expressions are powerful and offer great flexibility,  their syntax\n *      (and all the inevitable escaping) makes them *harder to maintain*.  It's easy to\n *      accidentally introduce a bug when one updates a complex expression (imho, all regexes should\n *      have good test coverage.).  For instance, the use of `.` in the regex is correct only in a\n *      small number of cases.  A `.` character in the regex used when matching the scheme or a\n *      subdomain could be matched against a `:` or literal `.` that was likely not intended.   It\n *      is highly recommended to use the string patterns and only fall back to regular expressions\n *      if they as a last resort.\n *    - The regular expression must be an instance of RegExp (i.e. not a string.)  It is\n *      matched against the **entire** *normalized / absolute URL* of the resource being tested\n *      (even when the RegExp did not have the `^` and `$` codes.)  In addition, any flags\n *      present on the RegExp (such as multiline, global, ignoreCase) are ignored.\n *    - If you are generating your JavaScript from some other templating engine (not\n *      recommended, e.g. in issue [#4006](https://github.com/angular/angular.js/issues/4006)),\n *      remember to escape your regular expression (and be aware that you might need more than\n *      one level of escaping depending on your templating engine and the way you interpolated\n *      the value.)  Do make use of your platform's escaping mechanism as it might be good\n *      enough before coding your own.  e.g. Ruby has\n *      [Regexp.escape(str)](http://www.ruby-doc.org/core-2.0.0/Regexp.html#method-c-escape)\n *      and Python has [re.escape](http://docs.python.org/library/re.html#re.escape).\n *      Javascript lacks a similar built in function for escaping.  Take a look at Google\n *      Closure library's [goog.string.regExpEscape(s)](\n *      http://docs.closure-library.googlecode.com/git/closure_goog_string_string.js.source.html#line962).\n *\n * Refer {@link ng.$sceDelegateProvider $sceDelegateProvider} for an example.\n *\n * ## Show me an example using SCE.\n *\n * <example module=\"mySceApp\" deps=\"angular-sanitize.js\">\n * <file name=\"index.html\">\n *   <div ng-controller=\"myAppController as myCtrl\">\n *     <i ng-bind-html=\"myCtrl.explicitlyTrustedHtml\" id=\"explicitlyTrustedHtml\"></i><br><br>\n *     <b>User comments</b><br>\n *     By default, HTML that isn't explicitly trusted (e.g. Alice's comment) is sanitized when\n *     $sanitize is available.  If $sanitize isn't available, this results in an error instead of an\n *     exploit.\n *     <div class=\"well\">\n *       <div ng-repeat=\"userComment in myCtrl.userComments\">\n *         <b>{{userComment.name}}</b>:\n *         <span ng-bind-html=\"userComment.htmlComment\" class=\"htmlComment\"></span>\n *         <br>\n *       </div>\n *     </div>\n *   </div>\n * </file>\n *\n * <file name=\"script.js\">\n *   var mySceApp = angular.module('mySceApp', ['ngSanitize']);\n *\n *   mySceApp.controller(\"myAppController\", function myAppController($http, $templateCache, $sce) {\n *     var self = this;\n *     $http.get(\"test_data.json\", {cache: $templateCache}).success(function(userComments) {\n *       self.userComments = userComments;\n *     });\n *     self.explicitlyTrustedHtml = $sce.trustAsHtml(\n *         '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n *         'sanitization.&quot;\">Hover over this text.</span>');\n *   });\n * </file>\n *\n * <file name=\"test_data.json\">\n * [\n *   { \"name\": \"Alice\",\n *     \"htmlComment\":\n *         \"<span onmouseover='this.textContent=\\\"PWN3D!\\\"'>Is <i>anyone</i> reading this?</span>\"\n *   },\n *   { \"name\": \"Bob\",\n *     \"htmlComment\": \"<i>Yes!</i>  Am I the only other one?\"\n *   }\n * ]\n * </file>\n *\n * <file name=\"protractor.js\" type=\"protractor\">\n *   describe('SCE doc demo', function() {\n *     it('should sanitize untrusted values', function() {\n *       expect(element.all(by.css('.htmlComment')).first().getInnerHtml())\n *           .toBe('<span>Is <i>anyone</i> reading this?</span>');\n *     });\n *\n *     it('should NOT sanitize explicitly trusted values', function() {\n *       expect(element(by.id('explicitlyTrustedHtml')).getInnerHtml()).toBe(\n *           '<span onmouseover=\"this.textContent=&quot;Explicitly trusted HTML bypasses ' +\n *           'sanitization.&quot;\">Hover over this text.</span>');\n *     });\n *   });\n * </file>\n * </example>\n *\n *\n *\n * ## Can I disable SCE completely?\n *\n * Yes, you can.  However, this is strongly discouraged.  SCE gives you a lot of security benefits\n * for little coding overhead.  It will be much harder to take an SCE disabled application and\n * either secure it on your own or enable SCE at a later stage.  It might make sense to disable SCE\n * for cases where you have a lot of existing code that was written before SCE was introduced and\n * you're migrating them a module at a time.\n *\n * That said, here's how you can completely disable SCE:\n *\n * ```\n * angular.module('myAppWithSceDisabledmyApp', []).config(function($sceProvider) {\n *   // Completely disable SCE.  For demonstration purposes only!\n *   // Do not use in new projects.\n *   $sceProvider.enabled(false);\n * });\n * ```\n *\n */\n/* jshint maxlen: 100 */\n\nfunction $SceProvider() {\n  var enabled = true;\n\n  /**\n   * @ngdoc method\n   * @name $sceProvider#enabled\n   * @kind function\n   *\n   * @param {boolean=} value If provided, then enables/disables SCE.\n   * @return {boolean} true if SCE is enabled, false otherwise.\n   *\n   * @description\n   * Enables/disables SCE and returns the current value.\n   */\n  this.enabled = function (value) {\n    if (arguments.length) {\n      enabled = !!value;\n    }\n    return enabled;\n  };\n\n\n  /* Design notes on the default implementation for SCE.\n   *\n   * The API contract for the SCE delegate\n   * -------------------------------------\n   * The SCE delegate object must provide the following 3 methods:\n   *\n   * - trustAs(contextEnum, value)\n   *     This method is used to tell the SCE service that the provided value is OK to use in the\n   *     contexts specified by contextEnum.  It must return an object that will be accepted by\n   *     getTrusted() for a compatible contextEnum and return this value.\n   *\n   * - valueOf(value)\n   *     For values that were not produced by trustAs(), return them as is.  For values that were\n   *     produced by trustAs(), return the corresponding input value to trustAs.  Basically, if\n   *     trustAs is wrapping the given values into some type, this operation unwraps it when given\n   *     such a value.\n   *\n   * - getTrusted(contextEnum, value)\n   *     This function should return the a value that is safe to use in the context specified by\n   *     contextEnum or throw and exception otherwise.\n   *\n   * NOTE: This contract deliberately does NOT state that values returned by trustAs() must be\n   * opaque or wrapped in some holder object.  That happens to be an implementation detail.  For\n   * instance, an implementation could maintain a registry of all trusted objects by context.  In\n   * such a case, trustAs() would return the same object that was passed in.  getTrusted() would\n   * return the same object passed in if it was found in the registry under a compatible context or\n   * throw an exception otherwise.  An implementation might only wrap values some of the time based\n   * on some criteria.  getTrusted() might return a value and not throw an exception for special\n   * constants or objects even if not wrapped.  All such implementations fulfill this contract.\n   *\n   *\n   * A note on the inheritance model for SCE contexts\n   * ------------------------------------------------\n   * I've used inheritance and made RESOURCE_URL wrapped types a subtype of URL wrapped types.  This\n   * is purely an implementation details.\n   *\n   * The contract is simply this:\n   *\n   *     getTrusted($sce.RESOURCE_URL, value) succeeding implies that getTrusted($sce.URL, value)\n   *     will also succeed.\n   *\n   * Inheritance happens to capture this in a natural way.  In some future, we\n   * may not use inheritance anymore.  That is OK because no code outside of\n   * sce.js and sceSpecs.js would need to be aware of this detail.\n   */\n\n  this.$get = ['$parse', '$sniffer', '$sceDelegate', function(\n                $parse,   $sniffer,   $sceDelegate) {\n    // Prereq: Ensure that we're not running in IE8 quirks mode.  In that mode, IE allows\n    // the \"expression(javascript expression)\" syntax which is insecure.\n    if (enabled && $sniffer.msie && $sniffer.msieDocumentMode < 8) {\n      throw $sceMinErr('iequirks',\n        'Strict Contextual Escaping does not support Internet Explorer version < 9 in quirks ' +\n        'mode.  You can fix this by adding the text <!doctype html> to the top of your HTML ' +\n        'document.  See http://docs.angularjs.org/api/ng.$sce for more information.');\n    }\n\n    var sce = shallowCopy(SCE_CONTEXTS);\n\n    /**\n     * @ngdoc method\n     * @name $sce#isEnabled\n     * @kind function\n     *\n     * @return {Boolean} true if SCE is enabled, false otherwise.  If you want to set the value, you\n     * have to do it at module config time on {@link ng.$sceProvider $sceProvider}.\n     *\n     * @description\n     * Returns a boolean indicating if SCE is enabled.\n     */\n    sce.isEnabled = function () {\n      return enabled;\n    };\n    sce.trustAs = $sceDelegate.trustAs;\n    sce.getTrusted = $sceDelegate.getTrusted;\n    sce.valueOf = $sceDelegate.valueOf;\n\n    if (!enabled) {\n      sce.trustAs = sce.getTrusted = function(type, value) { return value; };\n      sce.valueOf = identity;\n    }\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAs\n     *\n     * @description\n     * Converts Angular {@link guide/expression expression} into a function.  This is like {@link\n     * ng.$parse $parse} and is identical when the expression is a literal constant.  Otherwise, it\n     * wraps the expression in a call to {@link ng.$sce#getTrusted $sce.getTrusted(*type*,\n     * *result*)}\n     *\n     * @param {string} type The kind of SCE context in which this result will be used.\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n    sce.parseAs = function sceParseAs(type, expr) {\n      var parsed = $parse(expr);\n      if (parsed.literal && parsed.constant) {\n        return parsed;\n      } else {\n        return function sceParseAsTrusted(self, locals) {\n          return sce.getTrusted(type, parsed(self, locals));\n        };\n      }\n    };\n\n    /**\n     * @ngdoc method\n     * @name $sce#trustAs\n     *\n     * @description\n     * Delegates to {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs`}.  As such,\n     * returns an object that is trusted by angular for use in specified strict contextual\n     * escaping contexts (such as ng-bind-html, ng-include, any src attribute\n     * interpolation, any dom event binding attribute interpolation such as for onclick,  etc.)\n     * that uses the provided value.  See * {@link ng.$sce $sce} for enabling strict contextual\n     * escaping.\n     *\n     * @param {string} type The kind of context in which this value is safe for use.  e.g. url,\n     *   resource_url, html, js and css.\n     * @param {*} value The value that that should be considered trusted/safe.\n     * @returns {*} A value that can be used to stand in for the provided `value` in places\n     * where Angular expects a $sce.trustAs() return value.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#trustAsHtml\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsHtml(value)` →\n     *     {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.HTML, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedHtml\n     *     $sce.getTrustedHtml(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#trustAsUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsUrl(value)` →\n     *     {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.URL, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedUrl\n     *     $sce.getTrustedUrl(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#trustAsResourceUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsResourceUrl(value)` →\n     *     {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.RESOURCE_URL, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedResourceUrl\n     *     $sce.getTrustedResourceUrl(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the return\n     *     value of {@link ng.$sce#trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#trustAsJs\n     *\n     * @description\n     * Shorthand method.  `$sce.trustAsJs(value)` →\n     *     {@link ng.$sceDelegate#trustAs `$sceDelegate.trustAs($sce.JS, value)`}\n     *\n     * @param {*} value The value to trustAs.\n     * @returns {*} An object that can be passed to {@link ng.$sce#getTrustedJs\n     *     $sce.getTrustedJs(value)} to obtain the original value.  (privileged directives\n     *     only accept expressions that are either literal constants or are the\n     *     return value of {@link ng.$sce#trustAs $sce.trustAs}.)\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrusted\n     *\n     * @description\n     * Delegates to {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted`}.  As such,\n     * takes the result of a {@link ng.$sce#trustAs `$sce.trustAs`}() call and returns the\n     * originally supplied value if the queried context type is a supertype of the created type.\n     * If this condition isn't satisfied, throws an exception.\n     *\n     * @param {string} type The kind of context in which this value is to be used.\n     * @param {*} maybeTrusted The result of a prior {@link ng.$sce#trustAs `$sce.trustAs`}\n     *                         call.\n     * @returns {*} The value the was originally provided to\n     *              {@link ng.$sce#trustAs `$sce.trustAs`} if valid in this context.\n     *              Otherwise, throws an exception.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrustedHtml\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedHtml(value)` →\n     *     {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.HTML, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.HTML, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrustedCss\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedCss(value)` →\n     *     {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.CSS, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.CSS, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrustedUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedUrl(value)` →\n     *     {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.URL, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.URL, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrustedResourceUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedResourceUrl(value)` →\n     *     {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.RESOURCE_URL, value)`}\n     *\n     * @param {*} value The value to pass to `$sceDelegate.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.RESOURCE_URL, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#getTrustedJs\n     *\n     * @description\n     * Shorthand method.  `$sce.getTrustedJs(value)` →\n     *     {@link ng.$sceDelegate#getTrusted `$sceDelegate.getTrusted($sce.JS, value)`}\n     *\n     * @param {*} value The value to pass to `$sce.getTrusted`.\n     * @returns {*} The return value of `$sce.getTrusted($sce.JS, value)`\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAsHtml\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsHtml(expression string)` →\n     *     {@link ng.$sce#parse `$sce.parseAs($sce.HTML, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAsCss\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsCss(value)` →\n     *     {@link ng.$sce#parse `$sce.parseAs($sce.CSS, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAsUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsUrl(value)` →\n     *     {@link ng.$sce#parse `$sce.parseAs($sce.URL, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAsResourceUrl\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsResourceUrl(value)` →\n     *     {@link ng.$sce#parse `$sce.parseAs($sce.RESOURCE_URL, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    /**\n     * @ngdoc method\n     * @name $sce#parseAsJs\n     *\n     * @description\n     * Shorthand method.  `$sce.parseAsJs(value)` →\n     *     {@link ng.$sce#parse `$sce.parseAs($sce.JS, value)`}\n     *\n     * @param {string} expression String expression to compile.\n     * @returns {function(context, locals)} a function which represents the compiled expression:\n     *\n     *    * `context` – `{object}` – an object against which any expressions embedded in the strings\n     *      are evaluated against (typically a scope object).\n     *    * `locals` – `{object=}` – local variables context object, useful for overriding values in\n     *      `context`.\n     */\n\n    // Shorthand delegations.\n    var parse = sce.parseAs,\n        getTrusted = sce.getTrusted,\n        trustAs = sce.trustAs;\n\n    forEach(SCE_CONTEXTS, function (enumValue, name) {\n      var lName = lowercase(name);\n      sce[camelCase(\"parse_as_\" + lName)] = function (expr) {\n        return parse(enumValue, expr);\n      };\n      sce[camelCase(\"get_trusted_\" + lName)] = function (value) {\n        return getTrusted(enumValue, value);\n      };\n      sce[camelCase(\"trust_as_\" + lName)] = function (value) {\n        return trustAs(enumValue, value);\n      };\n    });\n\n    return sce;\n  }];\n}\n\n/**\n * !!! This is an undocumented \"private\" service !!!\n *\n * @name $sniffer\n * @requires $window\n * @requires $document\n *\n * @property {boolean} history Does the browser support html5 history api ?\n * @property {boolean} hashchange Does the browser support hashchange event ?\n * @property {boolean} transitions Does the browser support CSS transition events ?\n * @property {boolean} animations Does the browser support CSS animation events ?\n *\n * @description\n * This is very simple implementation of testing browser's features.\n */\nfunction $SnifferProvider() {\n  this.$get = ['$window', '$document', function($window, $document) {\n    var eventSupport = {},\n        android =\n          int((/android (\\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]),\n        boxee = /Boxee/i.test(($window.navigator || {}).userAgent),\n        document = $document[0] || {},\n        documentMode = document.documentMode,\n        vendorPrefix,\n        vendorRegex = /^(Moz|webkit|O|ms)(?=[A-Z])/,\n        bodyStyle = document.body && document.body.style,\n        transitions = false,\n        animations = false,\n        match;\n\n    if (bodyStyle) {\n      for(var prop in bodyStyle) {\n        if(match = vendorRegex.exec(prop)) {\n          vendorPrefix = match[0];\n          vendorPrefix = vendorPrefix.substr(0, 1).toUpperCase() + vendorPrefix.substr(1);\n          break;\n        }\n      }\n\n      if(!vendorPrefix) {\n        vendorPrefix = ('WebkitOpacity' in bodyStyle) && 'webkit';\n      }\n\n      transitions = !!(('transition' in bodyStyle) || (vendorPrefix + 'Transition' in bodyStyle));\n      animations  = !!(('animation' in bodyStyle) || (vendorPrefix + 'Animation' in bodyStyle));\n\n      if (android && (!transitions||!animations)) {\n        transitions = isString(document.body.style.webkitTransition);\n        animations = isString(document.body.style.webkitAnimation);\n      }\n    }\n\n\n    return {\n      // Android has history.pushState, but it does not update location correctly\n      // so let's not use the history API at all.\n      // http://code.google.com/p/android/issues/detail?id=17471\n      // https://github.com/angular/angular.js/issues/904\n\n      // older webkit browser (533.9) on Boxee box has exactly the same problem as Android has\n      // so let's not use the history API also\n      // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined\n      // jshint -W018\n      history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee),\n      // jshint +W018\n      hashchange: 'onhashchange' in $window &&\n                  // IE8 compatible mode lies\n                  (!documentMode || documentMode > 7),\n      hasEvent: function(event) {\n        // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have\n        // it. In particular the event is not fired when backspace or delete key are pressed or\n        // when cut operation is performed.\n        if (event == 'input' && msie == 9) return false;\n\n        if (isUndefined(eventSupport[event])) {\n          var divElm = document.createElement('div');\n          eventSupport[event] = 'on' + event in divElm;\n        }\n\n        return eventSupport[event];\n      },\n      csp: csp(),\n      vendorPrefix: vendorPrefix,\n      transitions : transitions,\n      animations : animations,\n      android: android,\n      msie : msie,\n      msieDocumentMode: documentMode\n    };\n  }];\n}\n\nfunction $TimeoutProvider() {\n  this.$get = ['$rootScope', '$browser', '$q', '$exceptionHandler',\n       function($rootScope,   $browser,   $q,   $exceptionHandler) {\n    var deferreds = {};\n\n\n     /**\n      * @ngdoc service\n      * @name $timeout\n      *\n      * @description\n      * Angular's wrapper for `window.setTimeout`. The `fn` function is wrapped into a try/catch\n      * block and delegates any exceptions to\n      * {@link ng.$exceptionHandler $exceptionHandler} service.\n      *\n      * The return value of registering a timeout function is a promise, which will be resolved when\n      * the timeout is reached and the timeout function is executed.\n      *\n      * To cancel a timeout request, call `$timeout.cancel(promise)`.\n      *\n      * In tests you can use {@link ngMock.$timeout `$timeout.flush()`} to\n      * synchronously flush the queue of deferred functions.\n      *\n      * @param {function()} fn A function, whose execution should be delayed.\n      * @param {number=} [delay=0] Delay in milliseconds.\n      * @param {boolean=} [invokeApply=true] If set to `false` skips model dirty checking, otherwise\n      *   will invoke `fn` within the {@link ng.$rootScope.Scope#$apply $apply} block.\n      * @returns {Promise} Promise that will be resolved when the timeout is reached. The value this\n      *   promise will be resolved with is the return value of the `fn` function.\n      *\n      */\n    function timeout(fn, delay, invokeApply) {\n      var deferred = $q.defer(),\n          promise = deferred.promise,\n          skipApply = (isDefined(invokeApply) && !invokeApply),\n          timeoutId;\n\n      timeoutId = $browser.defer(function() {\n        try {\n          deferred.resolve(fn());\n        } catch(e) {\n          deferred.reject(e);\n          $exceptionHandler(e);\n        }\n        finally {\n          delete deferreds[promise.$$timeoutId];\n        }\n\n        if (!skipApply) $rootScope.$apply();\n      }, delay);\n\n      promise.$$timeoutId = timeoutId;\n      deferreds[timeoutId] = deferred;\n\n      return promise;\n    }\n\n\n     /**\n      * @ngdoc method\n      * @name $timeout#cancel\n      *\n      * @description\n      * Cancels a task associated with the `promise`. As a result of this, the promise will be\n      * resolved with a rejection.\n      *\n      * @param {Promise=} promise Promise returned by the `$timeout` function.\n      * @returns {boolean} Returns `true` if the task hasn't executed yet and was successfully\n      *   canceled.\n      */\n    timeout.cancel = function(promise) {\n      if (promise && promise.$$timeoutId in deferreds) {\n        deferreds[promise.$$timeoutId].reject('canceled');\n        delete deferreds[promise.$$timeoutId];\n        return $browser.defer.cancel(promise.$$timeoutId);\n      }\n      return false;\n    };\n\n    return timeout;\n  }];\n}\n\n// NOTE:  The usage of window and document instead of $window and $document here is\n// deliberate.  This service depends on the specific behavior of anchor nodes created by the\n// browser (resolving and parsing URLs) that is unlikely to be provided by mock objects and\n// cause us to break tests.  In addition, when the browser resolves a URL for XHR, it\n// doesn't know about mocked locations and resolves URLs to the real document - which is\n// exactly the behavior needed here.  There is little value is mocking these out for this\n// service.\nvar urlParsingNode = document.createElement(\"a\");\nvar originUrl = urlResolve(window.location.href, true);\n\n\n/**\n *\n * Implementation Notes for non-IE browsers\n * ----------------------------------------\n * Assigning a URL to the href property of an anchor DOM node, even one attached to the DOM,\n * results both in the normalizing and parsing of the URL.  Normalizing means that a relative\n * URL will be resolved into an absolute URL in the context of the application document.\n * Parsing means that the anchor node's host, hostname, protocol, port, pathname and related\n * properties are all populated to reflect the normalized URL.  This approach has wide\n * compatibility - Safari 1+, Mozilla 1+, Opera 7+,e etc.  See\n * http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *\n * Implementation Notes for IE\n * ---------------------------\n * IE >= 8 and <= 10 normalizes the URL when assigned to the anchor node similar to the other\n * browsers.  However, the parsed components will not be set if the URL assigned did not specify\n * them.  (e.g. if you assign a.href = \"foo\", then a.protocol, a.host, etc. will be empty.)  We\n * work around that by performing the parsing in a 2nd step by taking a previously normalized\n * URL (e.g. by assigning to a.href) and assigning it a.href again.  This correctly populates the\n * properties such as protocol, hostname, port, etc.\n *\n * IE7 does not normalize the URL when assigned to an anchor node.  (Apparently, it does, if one\n * uses the inner HTML approach to assign the URL as part of an HTML snippet -\n * http://stackoverflow.com/a/472729)  However, setting img[src] does normalize the URL.\n * Unfortunately, setting img[src] to something like \"javascript:foo\" on IE throws an exception.\n * Since the primary usage for normalizing URLs is to sanitize such URLs, we can't use that\n * method and IE < 8 is unsupported.\n *\n * References:\n *   http://developer.mozilla.org/en-US/docs/Web/API/HTMLAnchorElement\n *   http://www.aptana.com/reference/html/api/HTMLAnchorElement.html\n *   http://url.spec.whatwg.org/#urlutils\n *   https://github.com/angular/angular.js/pull/2902\n *   http://james.padolsey.com/javascript/parsing-urls-with-the-dom/\n *\n * @kind function\n * @param {string} url The URL to be parsed.\n * @description Normalizes and parses a URL.\n * @returns {object} Returns the normalized URL as a dictionary.\n *\n *   | member name   | Description    |\n *   |---------------|----------------|\n *   | href          | A normalized version of the provided URL if it was not an absolute URL |\n *   | protocol      | The protocol including the trailing colon                              |\n *   | host          | The host and port (if the port is non-default) of the normalizedUrl    |\n *   | search        | The search params, minus the question mark                             |\n *   | hash          | The hash string, minus the hash symbol\n *   | hostname      | The hostname\n *   | port          | The port, without \":\"\n *   | pathname      | The pathname, beginning with \"/\"\n *\n */\nfunction urlResolve(url, base) {\n  var href = url;\n\n  if (msie) {\n    // Normalize before parse.  Refer Implementation Notes on why this is\n    // done in two steps on IE.\n    urlParsingNode.setAttribute(\"href\", href);\n    href = urlParsingNode.href;\n  }\n\n  urlParsingNode.setAttribute('href', href);\n\n  // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n  return {\n    href: urlParsingNode.href,\n    protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n    host: urlParsingNode.host,\n    search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n    hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n    hostname: urlParsingNode.hostname,\n    port: urlParsingNode.port,\n    pathname: (urlParsingNode.pathname.charAt(0) === '/')\n      ? urlParsingNode.pathname\n      : '/' + urlParsingNode.pathname\n  };\n}\n\n/**\n * Parse a request URL and determine whether this is a same-origin request as the application document.\n *\n * @param {string|object} requestUrl The url of the request as a string that will be resolved\n * or a parsed URL object.\n * @returns {boolean} Whether the request is for the same origin as the application document.\n */\nfunction urlIsSameOrigin(requestUrl) {\n  var parsed = (isString(requestUrl)) ? urlResolve(requestUrl) : requestUrl;\n  return (parsed.protocol === originUrl.protocol &&\n          parsed.host === originUrl.host);\n}\n\n/**\n * @ngdoc service\n * @name $window\n *\n * @description\n * A reference to the browser's `window` object. While `window`\n * is globally available in JavaScript, it causes testability problems, because\n * it is a global variable. In angular we always refer to it through the\n * `$window` service, so it may be overridden, removed or mocked for testing.\n *\n * Expressions, like the one defined for the `ngClick` directive in the example\n * below, are evaluated with respect to the current scope.  Therefore, there is\n * no risk of inadvertently coding in a dependency on a global value in such an\n * expression.\n *\n * @example\n   <example module=\"windowExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('windowExample', [])\n           .controller('ExampleController', ['$scope', '$window', function ($scope, $window) {\n             $scope.greeting = 'Hello, World!';\n             $scope.doGreeting = function(greeting) {\n               $window.alert(greeting);\n             };\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         <input type=\"text\" ng-model=\"greeting\" />\n         <button ng-click=\"doGreeting(greeting)\">ALERT</button>\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n      it('should display the greeting in the input box', function() {\n       element(by.model('greeting')).sendKeys('Hello, E2E Tests');\n       // If we click the button it will block the test runner\n       // element(':button').click();\n      });\n     </file>\n   </example>\n */\nfunction $WindowProvider(){\n  this.$get = valueFn(window);\n}\n\n/* global currencyFilter: true,\n dateFilter: true,\n filterFilter: true,\n jsonFilter: true,\n limitToFilter: true,\n lowercaseFilter: true,\n numberFilter: true,\n orderByFilter: true,\n uppercaseFilter: true,\n */\n\n/**\n * @ngdoc provider\n * @name $filterProvider\n * @description\n *\n * Filters are just functions which transform input to an output. However filters need to be\n * Dependency Injected. To achieve this a filter definition consists of a factory function which is\n * annotated with dependencies and is responsible for creating a filter function.\n *\n * ```js\n *   // Filter registration\n *   function MyModule($provide, $filterProvider) {\n *     // create a service to demonstrate injection (not always needed)\n *     $provide.value('greet', function(name){\n *       return 'Hello ' + name + '!';\n *     });\n *\n *     // register a filter factory which uses the\n *     // greet service to demonstrate DI.\n *     $filterProvider.register('greet', function(greet){\n *       // return the filter function which uses the greet service\n *       // to generate salutation\n *       return function(text) {\n *         // filters need to be forgiving so check input validity\n *         return text && greet(text) || text;\n *       };\n *     });\n *   }\n * ```\n *\n * The filter function is registered with the `$injector` under the filter name suffix with\n * `Filter`.\n *\n * ```js\n *   it('should be the same instance', inject(\n *     function($filterProvider) {\n *       $filterProvider.register('reverse', function(){\n *         return ...;\n *       });\n *     },\n *     function($filter, reverseFilter) {\n *       expect($filter('reverse')).toBe(reverseFilter);\n *     });\n * ```\n *\n *\n * For more information about how angular filters work, and how to create your own filters, see\n * {@link guide/filter Filters} in the Angular Developer Guide.\n */\n/**\n * @ngdoc method\n * @name $filterProvider#register\n * @description\n * Register filter factory function.\n *\n * @param {String} name Name of the filter.\n * @param {Function} fn The filter factory function which is injectable.\n */\n\n\n/**\n * @ngdoc service\n * @name $filter\n * @kind function\n * @description\n * Filters are used for formatting data displayed to the user.\n *\n * The general syntax in templates is as follows:\n *\n *         {{ expression [| filter_name[:parameter_value] ... ] }}\n *\n * @param {String} name Name of the filter function to retrieve\n * @return {Function} the filter function\n * @example\n   <example name=\"$filter\" module=\"filterExample\">\n     <file name=\"index.html\">\n       <div ng-controller=\"MainCtrl\">\n        <h3>{{ originalText }}</h3>\n        <h3>{{ filteredText }}</h3>\n       </div>\n     </file>\n\n     <file name=\"script.js\">\n      angular.module('filterExample', [])\n      .controller('MainCtrl', function($scope, $filter) {\n        $scope.originalText = 'hello';\n        $scope.filteredText = $filter('uppercase')($scope.originalText);\n      });\n     </file>\n   </example>\n  */\n$FilterProvider.$inject = ['$provide'];\nfunction $FilterProvider($provide) {\n  var suffix = 'Filter';\n\n  /**\n   * @ngdoc method\n   * @name $controllerProvider#register\n   * @param {string|Object} name Name of the filter function, or an object map of filters where\n   *    the keys are the filter names and the values are the filter factories.\n   * @returns {Object} Registered filter instance, or if a map of filters was provided then a map\n   *    of the registered filter instances.\n   */\n  function register(name, factory) {\n    if(isObject(name)) {\n      var filters = {};\n      forEach(name, function(filter, key) {\n        filters[key] = register(key, filter);\n      });\n      return filters;\n    } else {\n      return $provide.factory(name + suffix, factory);\n    }\n  }\n  this.register = register;\n\n  this.$get = ['$injector', function($injector) {\n    return function(name) {\n      return $injector.get(name + suffix);\n    };\n  }];\n\n  ////////////////////////////////////////\n\n  /* global\n    currencyFilter: false,\n    dateFilter: false,\n    filterFilter: false,\n    jsonFilter: false,\n    limitToFilter: false,\n    lowercaseFilter: false,\n    numberFilter: false,\n    orderByFilter: false,\n    uppercaseFilter: false,\n  */\n\n  register('currency', currencyFilter);\n  register('date', dateFilter);\n  register('filter', filterFilter);\n  register('json', jsonFilter);\n  register('limitTo', limitToFilter);\n  register('lowercase', lowercaseFilter);\n  register('number', numberFilter);\n  register('orderBy', orderByFilter);\n  register('uppercase', uppercaseFilter);\n}\n\n/**\n * @ngdoc filter\n * @name filter\n * @kind function\n *\n * @description\n * Selects a subset of items from `array` and returns it as a new array.\n *\n * @param {Array} array The source array.\n * @param {string|Object|function()} expression The predicate to be used for selecting items from\n *   `array`.\n *\n *   Can be one of:\n *\n *   - `string`: The string is evaluated as an expression and the resulting value is used for substring match against\n *     the contents of the `array`. All strings or objects with string properties in `array` that contain this string\n *     will be returned. The predicate can be negated by prefixing the string with `!`.\n *\n *   - `Object`: A pattern object can be used to filter specific properties on objects contained\n *     by `array`. For example `{name:\"M\", phone:\"1\"}` predicate will return an array of items\n *     which have property `name` containing \"M\" and property `phone` containing \"1\". A special\n *     property name `$` can be used (as in `{$:\"text\"}`) to accept a match against any\n *     property of the object. That's equivalent to the simple substring match with a `string`\n *     as described above.\n *\n *   - `function(value)`: A predicate function can be used to write arbitrary filters. The function is\n *     called for each element of `array`. The final result is an array of those elements that\n *     the predicate returned true for.\n *\n * @param {function(actual, expected)|true|undefined} comparator Comparator which is used in\n *     determining if the expected value (from the filter expression) and actual value (from\n *     the object in the array) should be considered a match.\n *\n *   Can be one of:\n *\n *   - `function(actual, expected)`:\n *     The function will be given the object value and the predicate value to compare and\n *     should return true if the item should be included in filtered result.\n *\n *   - `true`: A shorthand for `function(actual, expected) { return angular.equals(expected, actual)}`.\n *     this is essentially strict comparison of expected and actual.\n *\n *   - `false|undefined`: A short hand for a function which will look for a substring match in case\n *     insensitive way.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n       <div ng-init=\"friends = [{name:'John', phone:'555-1276'},\n                                {name:'Mary', phone:'800-BIG-MARY'},\n                                {name:'Mike', phone:'555-4321'},\n                                {name:'Adam', phone:'555-5678'},\n                                {name:'Julie', phone:'555-8765'},\n                                {name:'Juliette', phone:'555-5678'}]\"></div>\n\n       Search: <input ng-model=\"searchText\">\n       <table id=\"searchTextResults\">\n         <tr><th>Name</th><th>Phone</th></tr>\n         <tr ng-repeat=\"friend in friends | filter:searchText\">\n           <td>{{friend.name}}</td>\n           <td>{{friend.phone}}</td>\n         </tr>\n       </table>\n       <hr>\n       Any: <input ng-model=\"search.$\"> <br>\n       Name only <input ng-model=\"search.name\"><br>\n       Phone only <input ng-model=\"search.phone\"><br>\n       Equality <input type=\"checkbox\" ng-model=\"strict\"><br>\n       <table id=\"searchObjResults\">\n         <tr><th>Name</th><th>Phone</th></tr>\n         <tr ng-repeat=\"friendObj in friends | filter:search:strict\">\n           <td>{{friendObj.name}}</td>\n           <td>{{friendObj.phone}}</td>\n         </tr>\n       </table>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       var expectFriendNames = function(expectedNames, key) {\n         element.all(by.repeater(key + ' in friends').column(key + '.name')).then(function(arr) {\n           arr.forEach(function(wd, i) {\n             expect(wd.getText()).toMatch(expectedNames[i]);\n           });\n         });\n       };\n\n       it('should search across all fields when filtering with a string', function() {\n         var searchText = element(by.model('searchText'));\n         searchText.clear();\n         searchText.sendKeys('m');\n         expectFriendNames(['Mary', 'Mike', 'Adam'], 'friend');\n\n         searchText.clear();\n         searchText.sendKeys('76');\n         expectFriendNames(['John', 'Julie'], 'friend');\n       });\n\n       it('should search in specific fields when filtering with a predicate object', function() {\n         var searchAny = element(by.model('search.$'));\n         searchAny.clear();\n         searchAny.sendKeys('i');\n         expectFriendNames(['Mary', 'Mike', 'Julie', 'Juliette'], 'friendObj');\n       });\n       it('should use a equal comparison when comparator is true', function() {\n         var searchName = element(by.model('search.name'));\n         var strict = element(by.model('strict'));\n         searchName.clear();\n         searchName.sendKeys('Julie');\n         strict.click();\n         expectFriendNames(['Julie'], 'friendObj');\n       });\n     </file>\n   </example>\n */\nfunction filterFilter() {\n  return function(array, expression, comparator) {\n    if (!isArray(array)) return array;\n\n    var comparatorType = typeof(comparator),\n        predicates = [];\n\n    predicates.check = function(value) {\n      for (var j = 0; j < predicates.length; j++) {\n        if(!predicates[j](value)) {\n          return false;\n        }\n      }\n      return true;\n    };\n\n    if (comparatorType !== 'function') {\n      if (comparatorType === 'boolean' && comparator) {\n        comparator = function(obj, text) {\n          return angular.equals(obj, text);\n        };\n      } else {\n        comparator = function(obj, text) {\n          if (obj && text && typeof obj === 'object' && typeof text === 'object') {\n            for (var objKey in obj) {\n              if (objKey.charAt(0) !== '$' && hasOwnProperty.call(obj, objKey) &&\n                  comparator(obj[objKey], text[objKey])) {\n                return true;\n              }\n            }\n            return false;\n          }\n          text = (''+text).toLowerCase();\n          return (''+obj).toLowerCase().indexOf(text) > -1;\n        };\n      }\n    }\n\n    var search = function(obj, text){\n      if (typeof text == 'string' && text.charAt(0) === '!') {\n        return !search(obj, text.substr(1));\n      }\n      switch (typeof obj) {\n        case \"boolean\":\n        case \"number\":\n        case \"string\":\n          return comparator(obj, text);\n        case \"object\":\n          switch (typeof text) {\n            case \"object\":\n              return comparator(obj, text);\n            default:\n              for ( var objKey in obj) {\n                if (objKey.charAt(0) !== '$' && search(obj[objKey], text)) {\n                  return true;\n                }\n              }\n              break;\n          }\n          return false;\n        case \"array\":\n          for ( var i = 0; i < obj.length; i++) {\n            if (search(obj[i], text)) {\n              return true;\n            }\n          }\n          return false;\n        default:\n          return false;\n      }\n    };\n    switch (typeof expression) {\n      case \"boolean\":\n      case \"number\":\n      case \"string\":\n        // Set up expression object and fall through\n        expression = {$:expression};\n        // jshint -W086\n      case \"object\":\n        // jshint +W086\n        for (var key in expression) {\n          (function(path) {\n            if (typeof expression[path] === 'undefined') return;\n            predicates.push(function(value) {\n              return search(path == '$' ? value : (value && value[path]), expression[path]);\n            });\n          })(key);\n        }\n        break;\n      case 'function':\n        predicates.push(expression);\n        break;\n      default:\n        return array;\n    }\n    var filtered = [];\n    for ( var j = 0; j < array.length; j++) {\n      var value = array[j];\n      if (predicates.check(value)) {\n        filtered.push(value);\n      }\n    }\n    return filtered;\n  };\n}\n\n/**\n * @ngdoc filter\n * @name currency\n * @kind function\n *\n * @description\n * Formats a number as a currency (ie $1,234.56). When no currency symbol is provided, default\n * symbol for current locale is used.\n *\n * @param {number} amount Input to filter.\n * @param {string=} symbol Currency symbol or identifier to be displayed.\n * @returns {string} Formatted number.\n *\n *\n * @example\n   <example module=\"currencyExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('currencyExample', [])\n           .controller('ExampleController', ['$scope', function($scope) {\n             $scope.amount = 1234.56;\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         <input type=\"number\" ng-model=\"amount\"> <br>\n         default currency symbol ($): <span id=\"currency-default\">{{amount | currency}}</span><br>\n         custom currency identifier (USD$): <span>{{amount | currency:\"USD$\"}}</span>\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should init with 1234.56', function() {\n         expect(element(by.id('currency-default')).getText()).toBe('$1,234.56');\n         expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('USD$1,234.56');\n       });\n       it('should update', function() {\n         if (browser.params.browser == 'safari') {\n           // Safari does not understand the minus key. See\n           // https://github.com/angular/protractor/issues/481\n           return;\n         }\n         element(by.model('amount')).clear();\n         element(by.model('amount')).sendKeys('-1234');\n         expect(element(by.id('currency-default')).getText()).toBe('($1,234.00)');\n         expect(element(by.binding('amount | currency:\"USD$\"')).getText()).toBe('(USD$1,234.00)');\n       });\n     </file>\n   </example>\n */\ncurrencyFilter.$inject = ['$locale'];\nfunction currencyFilter($locale) {\n  var formats = $locale.NUMBER_FORMATS;\n  return function(amount, currencySymbol){\n    if (isUndefined(currencySymbol)) currencySymbol = formats.CURRENCY_SYM;\n    return formatNumber(amount, formats.PATTERNS[1], formats.GROUP_SEP, formats.DECIMAL_SEP, 2).\n                replace(/\\u00A4/g, currencySymbol);\n  };\n}\n\n/**\n * @ngdoc filter\n * @name number\n * @kind function\n *\n * @description\n * Formats a number as text.\n *\n * If the input is not a number an empty string is returned.\n *\n * @param {number|string} number Number to format.\n * @param {(number|string)=} fractionSize Number of decimal places to round the number to.\n * If this is not provided then the fraction size is computed from the current locale's number\n * formatting pattern. In the case of the default locale, it will be 3.\n * @returns {string} Number rounded to decimalPlaces and places a “,” after each third digit.\n *\n * @example\n   <example module=\"numberFilterExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('numberFilterExample', [])\n           .controller('ExampleController', ['$scope', function($scope) {\n             $scope.val = 1234.56789;\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         Enter number: <input ng-model='val'><br>\n         Default formatting: <span id='number-default'>{{val | number}}</span><br>\n         No fractions: <span>{{val | number:0}}</span><br>\n         Negative number: <span>{{-val | number:4}}</span>\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should format numbers', function() {\n         expect(element(by.id('number-default')).getText()).toBe('1,234.568');\n         expect(element(by.binding('val | number:0')).getText()).toBe('1,235');\n         expect(element(by.binding('-val | number:4')).getText()).toBe('-1,234.5679');\n       });\n\n       it('should update', function() {\n         element(by.model('val')).clear();\n         element(by.model('val')).sendKeys('3374.333');\n         expect(element(by.id('number-default')).getText()).toBe('3,374.333');\n         expect(element(by.binding('val | number:0')).getText()).toBe('3,374');\n         expect(element(by.binding('-val | number:4')).getText()).toBe('-3,374.3330');\n      });\n     </file>\n   </example>\n */\n\n\nnumberFilter.$inject = ['$locale'];\nfunction numberFilter($locale) {\n  var formats = $locale.NUMBER_FORMATS;\n  return function(number, fractionSize) {\n    return formatNumber(number, formats.PATTERNS[0], formats.GROUP_SEP, formats.DECIMAL_SEP,\n      fractionSize);\n  };\n}\n\nvar DECIMAL_SEP = '.';\nfunction formatNumber(number, pattern, groupSep, decimalSep, fractionSize) {\n  if (number == null || !isFinite(number) || isObject(number)) return '';\n\n  var isNegative = number < 0;\n  number = Math.abs(number);\n  var numStr = number + '',\n      formatedText = '',\n      parts = [];\n\n  var hasExponent = false;\n  if (numStr.indexOf('e') !== -1) {\n    var match = numStr.match(/([\\d\\.]+)e(-?)(\\d+)/);\n    if (match && match[2] == '-' && match[3] > fractionSize + 1) {\n      numStr = '0';\n      number = 0;\n    } else {\n      formatedText = numStr;\n      hasExponent = true;\n    }\n  }\n\n  if (!hasExponent) {\n    var fractionLen = (numStr.split(DECIMAL_SEP)[1] || '').length;\n\n    // determine fractionSize if it is not specified\n    if (isUndefined(fractionSize)) {\n      fractionSize = Math.min(Math.max(pattern.minFrac, fractionLen), pattern.maxFrac);\n    }\n\n    // safely round numbers in JS without hitting imprecisions of floating-point arithmetics\n    // inspired by:\n    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/round\n    number = +(Math.round(+(number.toString() + 'e' + fractionSize)).toString() + 'e' + -fractionSize);\n\n    var fraction = ('' + number).split(DECIMAL_SEP);\n    var whole = fraction[0];\n    fraction = fraction[1] || '';\n\n    var i, pos = 0,\n        lgroup = pattern.lgSize,\n        group = pattern.gSize;\n\n    if (whole.length >= (lgroup + group)) {\n      pos = whole.length - lgroup;\n      for (i = 0; i < pos; i++) {\n        if ((pos - i)%group === 0 && i !== 0) {\n          formatedText += groupSep;\n        }\n        formatedText += whole.charAt(i);\n      }\n    }\n\n    for (i = pos; i < whole.length; i++) {\n      if ((whole.length - i)%lgroup === 0 && i !== 0) {\n        formatedText += groupSep;\n      }\n      formatedText += whole.charAt(i);\n    }\n\n    // format fraction part.\n    while(fraction.length < fractionSize) {\n      fraction += '0';\n    }\n\n    if (fractionSize && fractionSize !== \"0\") formatedText += decimalSep + fraction.substr(0, fractionSize);\n  } else {\n\n    if (fractionSize > 0 && number > -1 && number < 1) {\n      formatedText = number.toFixed(fractionSize);\n    }\n  }\n\n  parts.push(isNegative ? pattern.negPre : pattern.posPre);\n  parts.push(formatedText);\n  parts.push(isNegative ? pattern.negSuf : pattern.posSuf);\n  return parts.join('');\n}\n\nfunction padNumber(num, digits, trim) {\n  var neg = '';\n  if (num < 0) {\n    neg =  '-';\n    num = -num;\n  }\n  num = '' + num;\n  while(num.length < digits) num = '0' + num;\n  if (trim)\n    num = num.substr(num.length - digits);\n  return neg + num;\n}\n\n\nfunction dateGetter(name, size, offset, trim) {\n  offset = offset || 0;\n  return function(date) {\n    var value = date['get' + name]();\n    if (offset > 0 || value > -offset)\n      value += offset;\n    if (value === 0 && offset == -12 ) value = 12;\n    return padNumber(value, size, trim);\n  };\n}\n\nfunction dateStrGetter(name, shortForm) {\n  return function(date, formats) {\n    var value = date['get' + name]();\n    var get = uppercase(shortForm ? ('SHORT' + name) : name);\n\n    return formats[get][value];\n  };\n}\n\nfunction timeZoneGetter(date) {\n  var zone = -1 * date.getTimezoneOffset();\n  var paddedZone = (zone >= 0) ? \"+\" : \"\";\n\n  paddedZone += padNumber(Math[zone > 0 ? 'floor' : 'ceil'](zone / 60), 2) +\n                padNumber(Math.abs(zone % 60), 2);\n\n  return paddedZone;\n}\n\nfunction ampmGetter(date, formats) {\n  return date.getHours() < 12 ? formats.AMPMS[0] : formats.AMPMS[1];\n}\n\nvar DATE_FORMATS = {\n  yyyy: dateGetter('FullYear', 4),\n    yy: dateGetter('FullYear', 2, 0, true),\n     y: dateGetter('FullYear', 1),\n  MMMM: dateStrGetter('Month'),\n   MMM: dateStrGetter('Month', true),\n    MM: dateGetter('Month', 2, 1),\n     M: dateGetter('Month', 1, 1),\n    dd: dateGetter('Date', 2),\n     d: dateGetter('Date', 1),\n    HH: dateGetter('Hours', 2),\n     H: dateGetter('Hours', 1),\n    hh: dateGetter('Hours', 2, -12),\n     h: dateGetter('Hours', 1, -12),\n    mm: dateGetter('Minutes', 2),\n     m: dateGetter('Minutes', 1),\n    ss: dateGetter('Seconds', 2),\n     s: dateGetter('Seconds', 1),\n     // while ISO 8601 requires fractions to be prefixed with `.` or `,`\n     // we can be just safely rely on using `sss` since we currently don't support single or two digit fractions\n   sss: dateGetter('Milliseconds', 3),\n  EEEE: dateStrGetter('Day'),\n   EEE: dateStrGetter('Day', true),\n     a: ampmGetter,\n     Z: timeZoneGetter\n};\n\nvar DATE_FORMATS_SPLIT = /((?:[^yMdHhmsaZE']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z))(.*)/,\n    NUMBER_STRING = /^\\-?\\d+$/;\n\n/**\n * @ngdoc filter\n * @name date\n * @kind function\n *\n * @description\n *   Formats `date` to a string based on the requested `format`.\n *\n *   `format` string can be composed of the following elements:\n *\n *   * `'yyyy'`: 4 digit representation of year (e.g. AD 1 => 0001, AD 2010 => 2010)\n *   * `'yy'`: 2 digit representation of year, padded (00-99). (e.g. AD 2001 => 01, AD 2010 => 10)\n *   * `'y'`: 1 digit representation of year, e.g. (AD 1 => 1, AD 199 => 199)\n *   * `'MMMM'`: Month in year (January-December)\n *   * `'MMM'`: Month in year (Jan-Dec)\n *   * `'MM'`: Month in year, padded (01-12)\n *   * `'M'`: Month in year (1-12)\n *   * `'dd'`: Day in month, padded (01-31)\n *   * `'d'`: Day in month (1-31)\n *   * `'EEEE'`: Day in Week,(Sunday-Saturday)\n *   * `'EEE'`: Day in Week, (Sun-Sat)\n *   * `'HH'`: Hour in day, padded (00-23)\n *   * `'H'`: Hour in day (0-23)\n *   * `'hh'`: Hour in am/pm, padded (01-12)\n *   * `'h'`: Hour in am/pm, (1-12)\n *   * `'mm'`: Minute in hour, padded (00-59)\n *   * `'m'`: Minute in hour (0-59)\n *   * `'ss'`: Second in minute, padded (00-59)\n *   * `'s'`: Second in minute (0-59)\n *   * `'.sss' or ',sss'`: Millisecond in second, padded (000-999)\n *   * `'a'`: am/pm marker\n *   * `'Z'`: 4 digit (+sign) representation of the timezone offset (-1200-+1200)\n *\n *   `format` string can also be one of the following predefined\n *   {@link guide/i18n localizable formats}:\n *\n *   * `'medium'`: equivalent to `'MMM d, y h:mm:ss a'` for en_US locale\n *     (e.g. Sep 3, 2010 12:05:08 pm)\n *   * `'short'`: equivalent to `'M/d/yy h:mm a'` for en_US  locale (e.g. 9/3/10 12:05 pm)\n *   * `'fullDate'`: equivalent to `'EEEE, MMMM d,y'` for en_US  locale\n *     (e.g. Friday, September 3, 2010)\n *   * `'longDate'`: equivalent to `'MMMM d, y'` for en_US  locale (e.g. September 3, 2010)\n *   * `'mediumDate'`: equivalent to `'MMM d, y'` for en_US  locale (e.g. Sep 3, 2010)\n *   * `'shortDate'`: equivalent to `'M/d/yy'` for en_US locale (e.g. 9/3/10)\n *   * `'mediumTime'`: equivalent to `'h:mm:ss a'` for en_US locale (e.g. 12:05:08 pm)\n *   * `'shortTime'`: equivalent to `'h:mm a'` for en_US locale (e.g. 12:05 pm)\n *\n *   `format` string can contain literal values. These need to be quoted with single quotes (e.g.\n *   `\"h 'in the morning'\"`). In order to output single quote, use two single quotes in a sequence\n *   (e.g. `\"h 'o''clock'\"`).\n *\n * @param {(Date|number|string)} date Date to format either as Date object, milliseconds (string or\n *    number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.SSSZ and its\n *    shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is\n *    specified in the string input, the time is considered to be in the local timezone.\n * @param {string=} format Formatting rules (see Description). If not specified,\n *    `mediumDate` is used.\n * @returns {string} Formatted string or the input if input is not recognized as date/millis.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n       <span ng-non-bindable>{{1288323623006 | date:'medium'}}</span>:\n           <span>{{1288323623006 | date:'medium'}}</span><br>\n       <span ng-non-bindable>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span>:\n          <span>{{1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'}}</span><br>\n       <span ng-non-bindable>{{1288323623006 | date:'MM/dd/yyyy @ h:mma'}}</span>:\n          <span>{{'1288323623006' | date:'MM/dd/yyyy @ h:mma'}}</span><br>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should format date', function() {\n         expect(element(by.binding(\"1288323623006 | date:'medium'\")).getText()).\n            toMatch(/Oct 2\\d, 2010 \\d{1,2}:\\d{2}:\\d{2} (AM|PM)/);\n         expect(element(by.binding(\"1288323623006 | date:'yyyy-MM-dd HH:mm:ss Z'\")).getText()).\n            toMatch(/2010\\-10\\-2\\d \\d{2}:\\d{2}:\\d{2} (\\-|\\+)?\\d{4}/);\n         expect(element(by.binding(\"'1288323623006' | date:'MM/dd/yyyy @ h:mma'\")).getText()).\n            toMatch(/10\\/2\\d\\/2010 @ \\d{1,2}:\\d{2}(AM|PM)/);\n       });\n     </file>\n   </example>\n */\ndateFilter.$inject = ['$locale'];\nfunction dateFilter($locale) {\n\n\n  var R_ISO8601_STR = /^(\\d{4})-?(\\d\\d)-?(\\d\\d)(?:T(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:\\.(\\d+))?)?)?(Z|([+-])(\\d\\d):?(\\d\\d))?)?$/;\n                     // 1        2       3         4          5          6          7          8  9     10      11\n  function jsonStringToDate(string) {\n    var match;\n    if (match = string.match(R_ISO8601_STR)) {\n      var date = new Date(0),\n          tzHour = 0,\n          tzMin  = 0,\n          dateSetter = match[8] ? date.setUTCFullYear : date.setFullYear,\n          timeSetter = match[8] ? date.setUTCHours : date.setHours;\n\n      if (match[9]) {\n        tzHour = int(match[9] + match[10]);\n        tzMin = int(match[9] + match[11]);\n      }\n      dateSetter.call(date, int(match[1]), int(match[2]) - 1, int(match[3]));\n      var h = int(match[4]||0) - tzHour;\n      var m = int(match[5]||0) - tzMin;\n      var s = int(match[6]||0);\n      var ms = Math.round(parseFloat('0.' + (match[7]||0)) * 1000);\n      timeSetter.call(date, h, m, s, ms);\n      return date;\n    }\n    return string;\n  }\n\n\n  return function(date, format) {\n    var text = '',\n        parts = [],\n        fn, match;\n\n    format = format || 'mediumDate';\n    format = $locale.DATETIME_FORMATS[format] || format;\n    if (isString(date)) {\n      date = NUMBER_STRING.test(date) ? int(date) : jsonStringToDate(date);\n    }\n\n    if (isNumber(date)) {\n      date = new Date(date);\n    }\n\n    if (!isDate(date)) {\n      return date;\n    }\n\n    while(format) {\n      match = DATE_FORMATS_SPLIT.exec(format);\n      if (match) {\n        parts = concat(parts, match, 1);\n        format = parts.pop();\n      } else {\n        parts.push(format);\n        format = null;\n      }\n    }\n\n    forEach(parts, function(value){\n      fn = DATE_FORMATS[value];\n      text += fn ? fn(date, $locale.DATETIME_FORMATS)\n                 : value.replace(/(^'|'$)/g, '').replace(/''/g, \"'\");\n    });\n\n    return text;\n  };\n}\n\n\n/**\n * @ngdoc filter\n * @name json\n * @kind function\n *\n * @description\n *   Allows you to convert a JavaScript object into JSON string.\n *\n *   This filter is mostly useful for debugging. When using the double curly {{value}} notation\n *   the binding is automatically converted to JSON.\n *\n * @param {*} object Any JavaScript object (including arrays and primitive types) to filter.\n * @returns {string} JSON string.\n *\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n       <pre>{{ {'name':'value'} | json }}</pre>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should jsonify filtered objects', function() {\n         expect(element(by.binding(\"{'name':'value'}\")).getText()).toMatch(/\\{\\n  \"name\": ?\"value\"\\n}/);\n       });\n     </file>\n   </example>\n *\n */\nfunction jsonFilter() {\n  return function(object) {\n    return toJson(object, true);\n  };\n}\n\n\n/**\n * @ngdoc filter\n * @name lowercase\n * @kind function\n * @description\n * Converts string to lowercase.\n * @see angular.lowercase\n */\nvar lowercaseFilter = valueFn(lowercase);\n\n\n/**\n * @ngdoc filter\n * @name uppercase\n * @kind function\n * @description\n * Converts string to uppercase.\n * @see angular.uppercase\n */\nvar uppercaseFilter = valueFn(uppercase);\n\n/**\n * @ngdoc filter\n * @name limitTo\n * @kind function\n *\n * @description\n * Creates a new array or string containing only a specified number of elements. The elements\n * are taken from either the beginning or the end of the source array or string, as specified by\n * the value and sign (positive or negative) of `limit`.\n *\n * @param {Array|string} input Source array or string to be limited.\n * @param {string|number} limit The length of the returned array or string. If the `limit` number\n *     is positive, `limit` number of items from the beginning of the source array/string are copied.\n *     If the number is negative, `limit` number  of items from the end of the source array/string\n *     are copied. The `limit` will be trimmed if it exceeds `array.length`\n * @returns {Array|string} A new sub-array or substring of length `limit` or less if input array\n *     had less than `limit` elements.\n *\n * @example\n   <example module=\"limitToExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('limitToExample', [])\n           .controller('ExampleController', ['$scope', function($scope) {\n             $scope.numbers = [1,2,3,4,5,6,7,8,9];\n             $scope.letters = \"abcdefghi\";\n             $scope.numLimit = 3;\n             $scope.letterLimit = 3;\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         Limit {{numbers}} to: <input type=\"integer\" ng-model=\"numLimit\">\n         <p>Output numbers: {{ numbers | limitTo:numLimit }}</p>\n         Limit {{letters}} to: <input type=\"integer\" ng-model=\"letterLimit\">\n         <p>Output letters: {{ letters | limitTo:letterLimit }}</p>\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       var numLimitInput = element(by.model('numLimit'));\n       var letterLimitInput = element(by.model('letterLimit'));\n       var limitedNumbers = element(by.binding('numbers | limitTo:numLimit'));\n       var limitedLetters = element(by.binding('letters | limitTo:letterLimit'));\n\n       it('should limit the number array to first three items', function() {\n         expect(numLimitInput.getAttribute('value')).toBe('3');\n         expect(letterLimitInput.getAttribute('value')).toBe('3');\n         expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3]');\n         expect(limitedLetters.getText()).toEqual('Output letters: abc');\n       });\n\n       it('should update the output when -3 is entered', function() {\n         numLimitInput.clear();\n         numLimitInput.sendKeys('-3');\n         letterLimitInput.clear();\n         letterLimitInput.sendKeys('-3');\n         expect(limitedNumbers.getText()).toEqual('Output numbers: [7,8,9]');\n         expect(limitedLetters.getText()).toEqual('Output letters: ghi');\n       });\n\n       it('should not exceed the maximum size of input array', function() {\n         numLimitInput.clear();\n         numLimitInput.sendKeys('100');\n         letterLimitInput.clear();\n         letterLimitInput.sendKeys('100');\n         expect(limitedNumbers.getText()).toEqual('Output numbers: [1,2,3,4,5,6,7,8,9]');\n         expect(limitedLetters.getText()).toEqual('Output letters: abcdefghi');\n       });\n     </file>\n   </example>\n */\nfunction limitToFilter(){\n  return function(input, limit) {\n    if (!isArray(input) && !isString(input)) return input;\n\n    if (Math.abs(Number(limit)) === Infinity) {\n      limit = Number(limit);\n    } else {\n      limit = int(limit);\n    }\n\n    if (isString(input)) {\n      //NaN check on limit\n      if (limit) {\n        return limit >= 0 ? input.slice(0, limit) : input.slice(limit, input.length);\n      } else {\n        return \"\";\n      }\n    }\n\n    var out = [],\n      i, n;\n\n    // if abs(limit) exceeds maximum length, trim it\n    if (limit > input.length)\n      limit = input.length;\n    else if (limit < -input.length)\n      limit = -input.length;\n\n    if (limit > 0) {\n      i = 0;\n      n = limit;\n    } else {\n      i = input.length + limit;\n      n = input.length;\n    }\n\n    for (; i<n; i++) {\n      out.push(input[i]);\n    }\n\n    return out;\n  };\n}\n\n/**\n * @ngdoc filter\n * @name orderBy\n * @kind function\n *\n * @description\n * Orders a specified `array` by the `expression` predicate. It is ordered alphabetically\n * for strings and numerically for numbers. Note: if you notice numbers are not being sorted\n * correctly, make sure they are actually being saved as numbers and not strings.\n *\n * @param {Array} array The array to sort.\n * @param {function(*)|string|Array.<(function(*)|string)>} expression A predicate to be\n *    used by the comparator to determine the order of elements.\n *\n *    Can be one of:\n *\n *    - `function`: Getter function. The result of this function will be sorted using the\n *      `<`, `=`, `>` operator.\n *    - `string`: An Angular expression which evaluates to an object to order by, such as 'name'\n *      to sort by a property called 'name'. Optionally prefixed with `+` or `-` to control\n *      ascending or descending sort order (for example, +name or -name).\n *    - `Array`: An array of function or string predicates. The first predicate in the array\n *      is used for sorting, but when two items are equivalent, the next predicate is used.\n *\n * @param {boolean=} reverse Reverse the order of the array.\n * @returns {Array} Sorted copy of the source array.\n *\n * @example\n   <example module=\"orderByExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('orderByExample', [])\n           .controller('ExampleController', ['$scope', function($scope) {\n             $scope.friends =\n                 [{name:'John', phone:'555-1212', age:10},\n                  {name:'Mary', phone:'555-9876', age:19},\n                  {name:'Mike', phone:'555-4321', age:21},\n                  {name:'Adam', phone:'555-5678', age:35},\n                  {name:'Julie', phone:'555-8765', age:29}];\n             $scope.predicate = '-age';\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         <pre>Sorting predicate = {{predicate}}; reverse = {{reverse}}</pre>\n         <hr/>\n         [ <a href=\"\" ng-click=\"predicate=''\">unsorted</a> ]\n         <table class=\"friend\">\n           <tr>\n             <th><a href=\"\" ng-click=\"predicate = 'name'; reverse=false\">Name</a>\n                 (<a href=\"\" ng-click=\"predicate = '-name'; reverse=false\">^</a>)</th>\n             <th><a href=\"\" ng-click=\"predicate = 'phone'; reverse=!reverse\">Phone Number</a></th>\n             <th><a href=\"\" ng-click=\"predicate = 'age'; reverse=!reverse\">Age</a></th>\n           </tr>\n           <tr ng-repeat=\"friend in friends | orderBy:predicate:reverse\">\n             <td>{{friend.name}}</td>\n             <td>{{friend.phone}}</td>\n             <td>{{friend.age}}</td>\n           </tr>\n         </table>\n       </div>\n     </file>\n   </example>\n *\n * It's also possible to call the orderBy filter manually, by injecting `$filter`, retrieving the\n * filter routine with `$filter('orderBy')`, and calling the returned filter routine with the\n * desired parameters.\n *\n * Example:\n *\n * @example\n  <example module=\"orderByExample\">\n    <file name=\"index.html\">\n      <div ng-controller=\"ExampleController\">\n        <table class=\"friend\">\n          <tr>\n            <th><a href=\"\" ng-click=\"reverse=false;order('name', false)\">Name</a>\n              (<a href=\"\" ng-click=\"order('-name',false)\">^</a>)</th>\n            <th><a href=\"\" ng-click=\"reverse=!reverse;order('phone', reverse)\">Phone Number</a></th>\n            <th><a href=\"\" ng-click=\"reverse=!reverse;order('age',reverse)\">Age</a></th>\n          </tr>\n          <tr ng-repeat=\"friend in friends\">\n            <td>{{friend.name}}</td>\n            <td>{{friend.phone}}</td>\n            <td>{{friend.age}}</td>\n          </tr>\n        </table>\n      </div>\n    </file>\n\n    <file name=\"script.js\">\n      angular.module('orderByExample', [])\n        .controller('ExampleController', ['$scope', '$filter', function($scope, $filter) {\n          var orderBy = $filter('orderBy');\n          $scope.friends = [\n            { name: 'John',    phone: '555-1212',    age: 10 },\n            { name: 'Mary',    phone: '555-9876',    age: 19 },\n            { name: 'Mike',    phone: '555-4321',    age: 21 },\n            { name: 'Adam',    phone: '555-5678',    age: 35 },\n            { name: 'Julie',   phone: '555-8765',    age: 29 }\n          ];\n          $scope.order = function(predicate, reverse) {\n            $scope.friends = orderBy($scope.friends, predicate, reverse);\n          };\n          $scope.order('-age',false);\n        }]);\n    </file>\n</example>\n */\norderByFilter.$inject = ['$parse'];\nfunction orderByFilter($parse){\n  return function(array, sortPredicate, reverseOrder) {\n    if (!isArray(array)) return array;\n    if (!sortPredicate) return array;\n    sortPredicate = isArray(sortPredicate) ? sortPredicate: [sortPredicate];\n    sortPredicate = map(sortPredicate, function(predicate){\n      var descending = false, get = predicate || identity;\n      if (isString(predicate)) {\n        if ((predicate.charAt(0) == '+' || predicate.charAt(0) == '-')) {\n          descending = predicate.charAt(0) == '-';\n          predicate = predicate.substring(1);\n        }\n        get = $parse(predicate);\n        if (get.constant) {\n          var key = get();\n          return reverseComparator(function(a,b) {\n            return compare(a[key], b[key]);\n          }, descending);\n        }\n      }\n      return reverseComparator(function(a,b){\n        return compare(get(a),get(b));\n      }, descending);\n    });\n    var arrayCopy = [];\n    for ( var i = 0; i < array.length; i++) { arrayCopy.push(array[i]); }\n    return arrayCopy.sort(reverseComparator(comparator, reverseOrder));\n\n    function comparator(o1, o2){\n      for ( var i = 0; i < sortPredicate.length; i++) {\n        var comp = sortPredicate[i](o1, o2);\n        if (comp !== 0) return comp;\n      }\n      return 0;\n    }\n    function reverseComparator(comp, descending) {\n      return toBoolean(descending)\n          ? function(a,b){return comp(b,a);}\n          : comp;\n    }\n    function compare(v1, v2){\n      var t1 = typeof v1;\n      var t2 = typeof v2;\n      if (t1 == t2) {\n        if (isDate(v1) && isDate(v2)) {\n          v1 = v1.valueOf();\n          v2 = v2.valueOf();\n        }\n        if (t1 == \"string\") {\n           v1 = v1.toLowerCase();\n           v2 = v2.toLowerCase();\n        }\n        if (v1 === v2) return 0;\n        return v1 < v2 ? -1 : 1;\n      } else {\n        return t1 < t2 ? -1 : 1;\n      }\n    }\n  };\n}\n\nfunction ngDirective(directive) {\n  if (isFunction(directive)) {\n    directive = {\n      link: directive\n    };\n  }\n  directive.restrict = directive.restrict || 'AC';\n  return valueFn(directive);\n}\n\n/**\n * @ngdoc directive\n * @name a\n * @restrict E\n *\n * @description\n * Modifies the default behavior of the html A tag so that the default action is prevented when\n * the href attribute is empty.\n *\n * This change permits the easy creation of action links with the `ngClick` directive\n * without changing the location or causing page reloads, e.g.:\n * `<a href=\"\" ng-click=\"list.addItem()\">Add Item</a>`\n */\nvar htmlAnchorDirective = valueFn({\n  restrict: 'E',\n  compile: function(element, attr) {\n\n    if (msie <= 8) {\n\n      // turn <a href ng-click=\"..\">link</a> into a stylable link in IE\n      // but only if it doesn't have name attribute, in which case it's an anchor\n      if (!attr.href && !attr.name) {\n        attr.$set('href', '');\n      }\n\n      // add a comment node to anchors to workaround IE bug that causes element content to be reset\n      // to new attribute content if attribute is updated with value containing @ and element also\n      // contains value with @\n      // see issue #1949\n      element.append(document.createComment('IE fix'));\n    }\n\n    if (!attr.href && !attr.xlinkHref && !attr.name) {\n      return function(scope, element) {\n        // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n        var href = toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n                   'xlink:href' : 'href';\n        element.on('click', function(event){\n          // if we have no href url, then don't navigate anywhere.\n          if (!element.attr(href)) {\n            event.preventDefault();\n          }\n        });\n      };\n    }\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ngHref\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in an href attribute will\n * make the link go to the wrong URL if the user clicks it before\n * Angular has a chance to replace the `{{hash}}` markup with its\n * value. Until Angular replaces the markup the link will be broken\n * and will most likely return a 404 error.\n *\n * The `ngHref` directive solves this problem.\n *\n * The wrong way to write it:\n * ```html\n * <a href=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <a ng-href=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * ```\n *\n * @element A\n * @param {template} ngHref any string which can contain `{{}}` markup.\n *\n * @example\n * This example shows various combinations of `href`, `ng-href` and `ng-click` attributes\n * in links and their different behaviors:\n    <example>\n      <file name=\"index.html\">\n        <input ng-model=\"value\" /><br />\n        <a id=\"link-1\" href ng-click=\"value = 1\">link 1</a> (link, don't reload)<br />\n        <a id=\"link-2\" href=\"\" ng-click=\"value = 2\">link 2</a> (link, don't reload)<br />\n        <a id=\"link-3\" ng-href=\"/{{'123'}}\">link 3</a> (link, reload!)<br />\n        <a id=\"link-4\" href=\"\" name=\"xx\" ng-click=\"value = 4\">anchor</a> (link, don't reload)<br />\n        <a id=\"link-5\" name=\"xxx\" ng-click=\"value = 5\">anchor</a> (no link)<br />\n        <a id=\"link-6\" ng-href=\"{{value}}\">link</a> (link, change location)\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should execute ng-click but not reload when href without value', function() {\n          element(by.id('link-1')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('1');\n          expect(element(by.id('link-1')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click but not reload when href empty string', function() {\n          element(by.id('link-2')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('2');\n          expect(element(by.id('link-2')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click and change url when ng-href specified', function() {\n          expect(element(by.id('link-3')).getAttribute('href')).toMatch(/\\/123$/);\n\n          element(by.id('link-3')).click();\n\n          // At this point, we navigate away from an Angular page, so we need\n          // to use browser.driver to get the base webdriver.\n\n          browser.wait(function() {\n            return browser.driver.getCurrentUrl().then(function(url) {\n              return url.match(/\\/123$/);\n            });\n          }, 5000, 'page should navigate to /123');\n        });\n\n        xit('should execute ng-click but not reload when href empty string and name specified', function() {\n          element(by.id('link-4')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('4');\n          expect(element(by.id('link-4')).getAttribute('href')).toBe('');\n        });\n\n        it('should execute ng-click but not reload when no href but name specified', function() {\n          element(by.id('link-5')).click();\n          expect(element(by.model('value')).getAttribute('value')).toEqual('5');\n          expect(element(by.id('link-5')).getAttribute('href')).toBe(null);\n        });\n\n        it('should only change url when only ng-href', function() {\n          element(by.model('value')).clear();\n          element(by.model('value')).sendKeys('6');\n          expect(element(by.id('link-6')).getAttribute('href')).toMatch(/\\/6$/);\n\n          element(by.id('link-6')).click();\n\n          // At this point, we navigate away from an Angular page, so we need\n          // to use browser.driver to get the base webdriver.\n          browser.wait(function() {\n            return browser.driver.getCurrentUrl().then(function(url) {\n              return url.match(/\\/6$/);\n            });\n          }, 5000, 'page should navigate to /6');\n        });\n      </file>\n    </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngSrc\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `src` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrc` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * <img src=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <img ng-src=\"http://www.gravatar.com/avatar/{{hash}}\"/>\n * ```\n *\n * @element IMG\n * @param {template} ngSrc any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngSrcset\n * @restrict A\n * @priority 99\n *\n * @description\n * Using Angular markup like `{{hash}}` in a `srcset` attribute doesn't\n * work right: The browser will fetch from the URL with the literal\n * text `{{hash}}` until Angular replaces the expression inside\n * `{{hash}}`. The `ngSrcset` directive solves this problem.\n *\n * The buggy way to write it:\n * ```html\n * <img srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\"/>\n * ```\n *\n * The correct way to write it:\n * ```html\n * <img ng-srcset=\"http://www.gravatar.com/avatar/{{hash}} 2x\"/>\n * ```\n *\n * @element IMG\n * @param {template} ngSrcset any string which can contain `{{}}` markup.\n */\n\n/**\n * @ngdoc directive\n * @name ngDisabled\n * @restrict A\n * @priority 100\n *\n * @description\n *\n * The following markup will make the button enabled on Chrome/Firefox but not on IE8 and older IEs:\n * ```html\n * <div ng-init=\"scope = { isDisabled: false }\">\n *  <button disabled=\"{{scope.isDisabled}}\">Disabled</button>\n * </div>\n * ```\n *\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as disabled. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngDisabled` directive solves this problem for the `disabled` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n    <example>\n      <file name=\"index.html\">\n        Click me to toggle: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n        <button ng-model=\"button\" ng-disabled=\"checked\">Button</button>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should toggle button', function() {\n          expect(element(by.css('button')).getAttribute('disabled')).toBeFalsy();\n          element(by.model('checked')).click();\n          expect(element(by.css('button')).getAttribute('disabled')).toBeTruthy();\n        });\n      </file>\n    </example>\n *\n * @element INPUT\n * @param {expression} ngDisabled If the {@link guide/expression expression} is truthy,\n *     then special attribute \"disabled\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngChecked\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as checked. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngChecked` directive solves this problem for the `checked` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n    <example>\n      <file name=\"index.html\">\n        Check me to check both: <input type=\"checkbox\" ng-model=\"master\"><br/>\n        <input id=\"checkSlave\" type=\"checkbox\" ng-checked=\"master\">\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should check both checkBoxes', function() {\n          expect(element(by.id('checkSlave')).getAttribute('checked')).toBeFalsy();\n          element(by.model('master')).click();\n          expect(element(by.id('checkSlave')).getAttribute('checked')).toBeTruthy();\n        });\n      </file>\n    </example>\n *\n * @element INPUT\n * @param {expression} ngChecked If the {@link guide/expression expression} is truthy,\n *     then special attribute \"checked\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngReadonly\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as readonly. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngReadonly` directive solves this problem for the `readonly` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n    <example>\n      <file name=\"index.html\">\n        Check me to make text readonly: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n        <input type=\"text\" ng-readonly=\"checked\" value=\"I'm Angular\"/>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should toggle readonly attr', function() {\n          expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeFalsy();\n          element(by.model('checked')).click();\n          expect(element(by.css('[type=\"text\"]')).getAttribute('readonly')).toBeTruthy();\n        });\n      </file>\n    </example>\n *\n * @element INPUT\n * @param {expression} ngReadonly If the {@link guide/expression expression} is truthy,\n *     then special attribute \"readonly\" will be set on the element\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSelected\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as selected. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngSelected` directive solves this problem for the `selected` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n *\n * @example\n    <example>\n      <file name=\"index.html\">\n        Check me to select: <input type=\"checkbox\" ng-model=\"selected\"><br/>\n        <select>\n          <option>Hello!</option>\n          <option id=\"greet\" ng-selected=\"selected\">Greetings!</option>\n        </select>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should select Greetings!', function() {\n          expect(element(by.id('greet')).getAttribute('selected')).toBeFalsy();\n          element(by.model('selected')).click();\n          expect(element(by.id('greet')).getAttribute('selected')).toBeTruthy();\n        });\n      </file>\n    </example>\n *\n * @element OPTION\n * @param {expression} ngSelected If the {@link guide/expression expression} is truthy,\n *     then special attribute \"selected\" will be set on the element\n */\n\n/**\n * @ngdoc directive\n * @name ngOpen\n * @restrict A\n * @priority 100\n *\n * @description\n * The HTML specification does not require browsers to preserve the values of boolean attributes\n * such as open. (Their presence means true and their absence means false.)\n * If we put an Angular interpolation expression into such an attribute then the\n * binding information would be lost when the browser removes the attribute.\n * The `ngOpen` directive solves this problem for the `open` attribute.\n * This complementary directive is not removed by the browser and so provides\n * a permanent reliable place to store the binding information.\n * @example\n     <example>\n       <file name=\"index.html\">\n         Check me check multiple: <input type=\"checkbox\" ng-model=\"open\"><br/>\n         <details id=\"details\" ng-open=\"open\">\n            <summary>Show/Hide me</summary>\n         </details>\n       </file>\n       <file name=\"protractor.js\" type=\"protractor\">\n         it('should toggle open', function() {\n           expect(element(by.id('details')).getAttribute('open')).toBeFalsy();\n           element(by.model('open')).click();\n           expect(element(by.id('details')).getAttribute('open')).toBeTruthy();\n         });\n       </file>\n     </example>\n *\n * @element DETAILS\n * @param {expression} ngOpen If the {@link guide/expression expression} is truthy,\n *     then special attribute \"open\" will be set on the element\n */\n\nvar ngAttributeAliasDirectives = {};\n\n\n// boolean attrs are evaluated\nforEach(BOOLEAN_ATTR, function(propName, attrName) {\n  // binding to multiple is not supported\n  if (propName == \"multiple\") return;\n\n  var normalized = directiveNormalize('ng-' + attrName);\n  ngAttributeAliasDirectives[normalized] = function() {\n    return {\n      priority: 100,\n      link: function(scope, element, attr) {\n        scope.$watch(attr[normalized], function ngBooleanAttrWatchAction(value) {\n          attr.$set(attrName, !!value);\n        });\n      }\n    };\n  };\n});\n\n\n// ng-src, ng-srcset, ng-href are interpolated\nforEach(['src', 'srcset', 'href'], function(attrName) {\n  var normalized = directiveNormalize('ng-' + attrName);\n  ngAttributeAliasDirectives[normalized] = function() {\n    return {\n      priority: 99, // it needs to run after the attributes are interpolated\n      link: function(scope, element, attr) {\n        var propName = attrName,\n            name = attrName;\n\n        if (attrName === 'href' &&\n            toString.call(element.prop('href')) === '[object SVGAnimatedString]') {\n          name = 'xlinkHref';\n          attr.$attr[name] = 'xlink:href';\n          propName = null;\n        }\n\n        attr.$observe(normalized, function(value) {\n          if (!value)\n             return;\n\n          attr.$set(name, value);\n\n          // on IE, if \"ng:src\" directive declaration is used and \"src\" attribute doesn't exist\n          // then calling element.setAttribute('src', 'foo') doesn't do anything, so we need\n          // to set the property as well to achieve the desired effect.\n          // we use attr[attrName] value since $set can sanitize the url.\n          if (msie && propName) element.prop(propName, attr[name]);\n        });\n      }\n    };\n  };\n});\n\n/* global -nullFormCtrl */\nvar nullFormCtrl = {\n  $addControl: noop,\n  $removeControl: noop,\n  $setValidity: noop,\n  $setDirty: noop,\n  $setPristine: noop\n};\n\n/**\n * @ngdoc type\n * @name form.FormController\n *\n * @property {boolean} $pristine True if user has not interacted with the form yet.\n * @property {boolean} $dirty True if user has already interacted with the form.\n * @property {boolean} $valid True if all of the containing forms and controls are valid.\n * @property {boolean} $invalid True if at least one containing control or form is invalid.\n *\n * @property {Object} $error Is an object hash, containing references to all invalid controls or\n *  forms, where:\n *\n *  - keys are validation tokens (error names),\n *  - values are arrays of controls or forms that are invalid for given error name.\n *\n *\n *  Built-in validation tokens:\n *\n *  - `email`\n *  - `max`\n *  - `maxlength`\n *  - `min`\n *  - `minlength`\n *  - `number`\n *  - `pattern`\n *  - `required`\n *  - `url`\n *\n * @description\n * `FormController` keeps track of all its controls and nested forms as well as the state of them,\n * such as being valid/invalid or dirty/pristine.\n *\n * Each {@link ng.directive:form form} directive creates an instance\n * of `FormController`.\n *\n */\n//asks for $scope to fool the BC controller module\nFormController.$inject = ['$element', '$attrs', '$scope', '$animate'];\nfunction FormController(element, attrs, $scope, $animate) {\n  var form = this,\n      parentForm = element.parent().controller('form') || nullFormCtrl,\n      invalidCount = 0, // used to easily determine if we are valid\n      errors = form.$error = {},\n      controls = [];\n\n  // init state\n  form.$name = attrs.name || attrs.ngForm;\n  form.$dirty = false;\n  form.$pristine = true;\n  form.$valid = true;\n  form.$invalid = false;\n\n  parentForm.$addControl(form);\n\n  // Setup initial state of the control\n  element.addClass(PRISTINE_CLASS);\n  toggleValidCss(true);\n\n  // convenience method for easy toggling of classes\n  function toggleValidCss(isValid, validationErrorKey) {\n    validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n    $animate.removeClass(element, (isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey);\n    $animate.addClass(element, (isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);\n  }\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$addControl\n   *\n   * @description\n   * Register a control with the form.\n   *\n   * Input elements using ngModelController do this automatically when they are linked.\n   */\n  form.$addControl = function(control) {\n    // Breaking change - before, inputs whose name was \"hasOwnProperty\" were quietly ignored\n    // and not added to the scope.  Now we throw an error.\n    assertNotHasOwnProperty(control.$name, 'input');\n    controls.push(control);\n\n    if (control.$name) {\n      form[control.$name] = control;\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$removeControl\n   *\n   * @description\n   * Deregister a control from the form.\n   *\n   * Input elements using ngModelController do this automatically when they are destroyed.\n   */\n  form.$removeControl = function(control) {\n    if (control.$name && form[control.$name] === control) {\n      delete form[control.$name];\n    }\n    forEach(errors, function(queue, validationToken) {\n      form.$setValidity(validationToken, true, control);\n    });\n\n    arrayRemove(controls, control);\n  };\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$setValidity\n   *\n   * @description\n   * Sets the validity of a form control.\n   *\n   * This method will also propagate to parent forms.\n   */\n  form.$setValidity = function(validationToken, isValid, control) {\n    var queue = errors[validationToken];\n\n    if (isValid) {\n      if (queue) {\n        arrayRemove(queue, control);\n        if (!queue.length) {\n          invalidCount--;\n          if (!invalidCount) {\n            toggleValidCss(isValid);\n            form.$valid = true;\n            form.$invalid = false;\n          }\n          errors[validationToken] = false;\n          toggleValidCss(true, validationToken);\n          parentForm.$setValidity(validationToken, true, form);\n        }\n      }\n\n    } else {\n      if (!invalidCount) {\n        toggleValidCss(isValid);\n      }\n      if (queue) {\n        if (includes(queue, control)) return;\n      } else {\n        errors[validationToken] = queue = [];\n        invalidCount++;\n        toggleValidCss(false, validationToken);\n        parentForm.$setValidity(validationToken, false, form);\n      }\n      queue.push(control);\n\n      form.$valid = false;\n      form.$invalid = true;\n    }\n  };\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$setDirty\n   *\n   * @description\n   * Sets the form to a dirty state.\n   *\n   * This method can be called to add the 'ng-dirty' class and set the form to a dirty\n   * state (ng-dirty class). This method will also propagate to parent forms.\n   */\n  form.$setDirty = function() {\n    $animate.removeClass(element, PRISTINE_CLASS);\n    $animate.addClass(element, DIRTY_CLASS);\n    form.$dirty = true;\n    form.$pristine = false;\n    parentForm.$setDirty();\n  };\n\n  /**\n   * @ngdoc method\n   * @name form.FormController#$setPristine\n   *\n   * @description\n   * Sets the form to its pristine state.\n   *\n   * This method can be called to remove the 'ng-dirty' class and set the form to its pristine\n   * state (ng-pristine class). This method will also propagate to all the controls contained\n   * in this form.\n   *\n   * Setting a form back to a pristine state is often useful when we want to 'reuse' a form after\n   * saving or resetting it.\n   */\n  form.$setPristine = function () {\n    $animate.removeClass(element, DIRTY_CLASS);\n    $animate.addClass(element, PRISTINE_CLASS);\n    form.$dirty = false;\n    form.$pristine = true;\n    forEach(controls, function(control) {\n      control.$setPristine();\n    });\n  };\n}\n\n\n/**\n * @ngdoc directive\n * @name ngForm\n * @restrict EAC\n *\n * @description\n * Nestable alias of {@link ng.directive:form `form`} directive. HTML\n * does not allow nesting of form elements. It is useful to nest forms, for example if the validity of a\n * sub-group of controls needs to be determined.\n *\n * Note: the purpose of `ngForm` is to group controls,\n * but not to be a replacement for the `<form>` tag with all of its capabilities\n * (e.g. posting to the server, ...).\n *\n * @param {string=} ngForm|name Name of the form. If specified, the form controller will be published into\n *                       related scope, under this name.\n *\n */\n\n /**\n * @ngdoc directive\n * @name form\n * @restrict E\n *\n * @description\n * Directive that instantiates\n * {@link form.FormController FormController}.\n *\n * If the `name` attribute is specified, the form controller is published onto the current scope under\n * this name.\n *\n * # Alias: {@link ng.directive:ngForm `ngForm`}\n *\n * In Angular forms can be nested. This means that the outer form is valid when all of the child\n * forms are valid as well. However, browsers do not allow nesting of `<form>` elements, so\n * Angular provides the {@link ng.directive:ngForm `ngForm`} directive which behaves identically to\n * `<form>` but can be nested.  This allows you to have nested forms, which is very useful when\n * using Angular validation directives in forms that are dynamically generated using the\n * {@link ng.directive:ngRepeat `ngRepeat`} directive. Since you cannot dynamically generate the `name`\n * attribute of input elements using interpolation, you have to wrap each set of repeated inputs in an\n * `ngForm` directive and nest these in an outer `form` element.\n *\n *\n * # CSS classes\n *  - `ng-valid` is set if the form is valid.\n *  - `ng-invalid` is set if the form is invalid.\n *  - `ng-pristine` is set if the form is pristine.\n *  - `ng-dirty` is set if the form is dirty.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n *\n * # Submitting a form and preventing the default action\n *\n * Since the role of forms in client-side Angular applications is different than in classical\n * roundtrip apps, it is desirable for the browser not to translate the form submission into a full\n * page reload that sends the data to the server. Instead some javascript logic should be triggered\n * to handle the form submission in an application-specific way.\n *\n * For this reason, Angular prevents the default action (form submission to the server) unless the\n * `<form>` element has an `action` attribute specified.\n *\n * You can use one of the following two ways to specify what javascript method should be called when\n * a form is submitted:\n *\n * - {@link ng.directive:ngSubmit ngSubmit} directive on the form element\n * - {@link ng.directive:ngClick ngClick} directive on the first\n  *  button or input field of type submit (input[type=submit])\n *\n * To prevent double execution of the handler, use only one of the {@link ng.directive:ngSubmit ngSubmit}\n * or {@link ng.directive:ngClick ngClick} directives.\n * This is because of the following form submission rules in the HTML specification:\n *\n * - If a form has only one input field then hitting enter in this field triggers form submit\n * (`ngSubmit`)\n * - if a form has 2+ input fields and no buttons or input[type=submit] then hitting enter\n * doesn't trigger submit\n * - if a form has one or more input fields and one or more buttons or input[type=submit] then\n * hitting enter in any of the input fields will trigger the click handler on the *first* button or\n * input[type=submit] (`ngClick`) *and* a submit handler on the enclosing form (`ngSubmit`)\n *\n * @param {string=} name Name of the form. If specified, the form controller will be published into\n *                       related scope, under this name.\n *\n * ## Animation Hooks\n *\n * Animations in ngForm are triggered when any of the associated CSS classes are added and removed.\n * These classes are: `.ng-pristine`, `.ng-dirty`, `.ng-invalid` and `.ng-valid` as well as any\n * other validations that are performed within the form. Animations in ngForm are similar to how\n * they work in ngClass and animations can be hooked into using CSS transitions, keyframes as well\n * as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style a form element\n * that has been rendered as invalid after it has been validated:\n *\n * <pre>\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-form {\n *   transition:0.5s linear all;\n *   background: white;\n * }\n * .my-form.ng-invalid {\n *   background: red;\n *   color:white;\n * }\n * </pre>\n *\n * @example\n    <example deps=\"angular-animate.js\" animations=\"true\" fixBase=\"true\" module=\"formExample\">\n      <file name=\"index.html\">\n       <script>\n         angular.module('formExample', [])\n           .controller('FormController', ['$scope', function($scope) {\n             $scope.userType = 'guest';\n           }]);\n       </script>\n       <style>\n        .my-form {\n          -webkit-transition:all linear 0.5s;\n          transition:all linear 0.5s;\n          background: transparent;\n        }\n        .my-form.ng-invalid {\n          background: red;\n        }\n       </style>\n       <form name=\"myForm\" ng-controller=\"FormController\" class=\"my-form\">\n         userType: <input name=\"input\" ng-model=\"userType\" required>\n         <span class=\"error\" ng-show=\"myForm.input.$error.required\">Required!</span><br>\n         <tt>userType = {{userType}}</tt><br>\n         <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br>\n         <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br>\n         <tt>myForm.$valid = {{myForm.$valid}}</tt><br>\n         <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>\n        </form>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should initialize to model', function() {\n          var userType = element(by.binding('userType'));\n          var valid = element(by.binding('myForm.input.$valid'));\n\n          expect(userType.getText()).toContain('guest');\n          expect(valid.getText()).toContain('true');\n        });\n\n        it('should be invalid if empty', function() {\n          var userType = element(by.binding('userType'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var userInput = element(by.model('userType'));\n\n          userInput.clear();\n          userInput.sendKeys('');\n\n          expect(userType.getText()).toEqual('userType =');\n          expect(valid.getText()).toContain('false');\n        });\n      </file>\n    </example>\n *\n */\nvar formDirectiveFactory = function(isNgForm) {\n  return ['$timeout', function($timeout) {\n    var formDirective = {\n      name: 'form',\n      restrict: isNgForm ? 'EAC' : 'E',\n      controller: FormController,\n      compile: function() {\n        return {\n          pre: function(scope, formElement, attr, controller) {\n            if (!attr.action) {\n              // we can't use jq events because if a form is destroyed during submission the default\n              // action is not prevented. see #1238\n              //\n              // IE 9 is not affected because it doesn't fire a submit event and try to do a full\n              // page reload if the form was destroyed by submission of the form via a click handler\n              // on a button in the form. Looks like an IE9 specific bug.\n              var preventDefaultListener = function(event) {\n                event.preventDefault\n                  ? event.preventDefault()\n                  : event.returnValue = false; // IE\n              };\n\n              addEventListenerFn(formElement[0], 'submit', preventDefaultListener);\n\n              // unregister the preventDefault listener so that we don't not leak memory but in a\n              // way that will achieve the prevention of the default action.\n              formElement.on('$destroy', function() {\n                $timeout(function() {\n                  removeEventListenerFn(formElement[0], 'submit', preventDefaultListener);\n                }, 0, false);\n              });\n            }\n\n            var parentFormCtrl = formElement.parent().controller('form'),\n                alias = attr.name || attr.ngForm;\n\n            if (alias) {\n              setter(scope, alias, controller, alias);\n            }\n            if (parentFormCtrl) {\n              formElement.on('$destroy', function() {\n                parentFormCtrl.$removeControl(controller);\n                if (alias) {\n                  setter(scope, alias, undefined, alias);\n                }\n                extend(controller, nullFormCtrl); //stop propagating child destruction handlers upwards\n              });\n            }\n          }\n        };\n      }\n    };\n\n    return formDirective;\n  }];\n};\n\nvar formDirective = formDirectiveFactory();\nvar ngFormDirective = formDirectiveFactory(true);\n\n/* global VALID_CLASS: true,\n    INVALID_CLASS: true,\n    PRISTINE_CLASS: true,\n    DIRTY_CLASS: true\n*/\n\nvar URL_REGEXP = /^(ftp|http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$/;\nvar EMAIL_REGEXP = /^[a-z0-9!#$%&'*+\\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i;\nvar NUMBER_REGEXP = /^\\s*(\\-|\\+)?(\\d+|(\\d*(\\.\\d*)))\\s*$/;\n\nvar inputType = {\n\n  /**\n   * @ngdoc input\n   * @name input[text]\n   *\n   * @description\n   * Standard HTML text input with angular data binding.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Adds `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n   *\n   * @example\n      <example name=\"text-input-directive\" module=\"textInputExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('textInputExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.text = 'guest';\n               $scope.word = /^\\s*\\w*\\s*$/;\n             }]);\n         </script>\n         <form name=\"myForm\" ng-controller=\"ExampleController\">\n           Single word: <input type=\"text\" name=\"input\" ng-model=\"text\"\n                               ng-pattern=\"word\" required ng-trim=\"false\">\n           <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n             Required!</span>\n           <span class=\"error\" ng-show=\"myForm.input.$error.pattern\">\n             Single word only!</span>\n\n           <tt>text = {{text}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n          </form>\n        </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          var text = element(by.binding('text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('text'));\n\n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('guest');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if multi word', function() {\n            input.clear();\n            input.sendKeys('hello world');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </file>\n      </example>\n   */\n  'text': textInputType,\n\n\n  /**\n   * @ngdoc input\n   * @name input[number]\n   *\n   * @description\n   * Text input with number validation and transformation. Sets the `number` validation\n   * error if not a valid number.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} min Sets the `min` validation error key if the value entered is less than `min`.\n   * @param {string=} max Sets the `max` validation error key if the value entered is greater than `max`.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <example name=\"number-input-directive\" module=\"numberExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('numberExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.value = 12;\n             }]);\n         </script>\n         <form name=\"myForm\" ng-controller=\"ExampleController\">\n           Number: <input type=\"number\" name=\"input\" ng-model=\"value\"\n                          min=\"0\" max=\"99\" required>\n           <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n             Required!</span>\n           <span class=\"error\" ng-show=\"myForm.input.$error.number\">\n             Not valid number!</span>\n           <tt>value = {{value}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n          </form>\n        </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          var value = element(by.binding('value'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('value'));\n\n          it('should initialize to model', function() {\n            expect(value.getText()).toContain('12');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n            expect(value.getText()).toEqual('value =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if over max', function() {\n            input.clear();\n            input.sendKeys('123');\n            expect(value.getText()).toEqual('value =');\n            expect(valid.getText()).toContain('false');\n          });\n        </file>\n      </example>\n   */\n  'number': numberInputType,\n\n\n  /**\n   * @ngdoc input\n   * @name input[url]\n   *\n   * @description\n   * Text input with URL validation. Sets the `url` validation error key if the content is not a\n   * valid URL.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <example name=\"url-input-directive\" module=\"urlExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('urlExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.text = 'http://google.com';\n             }]);\n         </script>\n         <form name=\"myForm\" ng-controller=\"ExampleController\">\n           URL: <input type=\"url\" name=\"input\" ng-model=\"text\" required>\n           <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n             Required!</span>\n           <span class=\"error\" ng-show=\"myForm.input.$error.url\">\n             Not valid url!</span>\n           <tt>text = {{text}}</tt><br/>\n           <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n           <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n           <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n           <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n           <tt>myForm.$error.url = {{!!myForm.$error.url}}</tt><br/>\n          </form>\n        </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          var text = element(by.binding('text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('text'));\n\n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('http://google.com');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if not url', function() {\n            input.clear();\n            input.sendKeys('box');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </file>\n      </example>\n   */\n  'url': urlInputType,\n\n\n  /**\n   * @ngdoc input\n   * @name input[email]\n   *\n   * @description\n   * Text input with email validation. Sets the `email` validation error key if not a valid email\n   * address.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} required Sets `required` validation error key if the value is not entered.\n   * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n   *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n   *    `required` when you want to data-bind to the `required` attribute.\n   * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n   *    minlength.\n   * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n   *    maxlength.\n   * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n   *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n   *    patterns defined as scope expressions.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <example name=\"email-input-directive\" module=\"emailExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('emailExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.text = 'me@example.com';\n             }]);\n         </script>\n           <form name=\"myForm\" ng-controller=\"ExampleController\">\n             Email: <input type=\"email\" name=\"input\" ng-model=\"text\" required>\n             <span class=\"error\" ng-show=\"myForm.input.$error.required\">\n               Required!</span>\n             <span class=\"error\" ng-show=\"myForm.input.$error.email\">\n               Not valid email!</span>\n             <tt>text = {{text}}</tt><br/>\n             <tt>myForm.input.$valid = {{myForm.input.$valid}}</tt><br/>\n             <tt>myForm.input.$error = {{myForm.input.$error}}</tt><br/>\n             <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n             <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n             <tt>myForm.$error.email = {{!!myForm.$error.email}}</tt><br/>\n           </form>\n         </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          var text = element(by.binding('text'));\n          var valid = element(by.binding('myForm.input.$valid'));\n          var input = element(by.model('text'));\n\n          it('should initialize to model', function() {\n            expect(text.getText()).toContain('me@example.com');\n            expect(valid.getText()).toContain('true');\n          });\n\n          it('should be invalid if empty', function() {\n            input.clear();\n            input.sendKeys('');\n            expect(text.getText()).toEqual('text =');\n            expect(valid.getText()).toContain('false');\n          });\n\n          it('should be invalid if not email', function() {\n            input.clear();\n            input.sendKeys('xxx');\n\n            expect(valid.getText()).toContain('false');\n          });\n        </file>\n      </example>\n   */\n  'email': emailInputType,\n\n\n  /**\n   * @ngdoc input\n   * @name input[radio]\n   *\n   * @description\n   * HTML radio button.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string} value The value to which the expression should be set when selected.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   * @param {string} ngValue Angular expression which sets the value to which the expression should\n   *    be set when selected.\n   *\n   * @example\n      <example name=\"radio-input-directive\" module=\"radioExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('radioExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.color = 'blue';\n               $scope.specialValue = {\n                 \"id\": \"12345\",\n                 \"value\": \"green\"\n               };\n             }]);\n         </script>\n         <form name=\"myForm\" ng-controller=\"ExampleController\">\n           <input type=\"radio\" ng-model=\"color\" value=\"red\">  Red <br/>\n           <input type=\"radio\" ng-model=\"color\" ng-value=\"specialValue\"> Green <br/>\n           <input type=\"radio\" ng-model=\"color\" value=\"blue\"> Blue <br/>\n           <tt>color = {{color | json}}</tt><br/>\n          </form>\n          Note that `ng-value=\"specialValue\"` sets radio item's value to be the value of `$scope.specialValue`.\n        </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          it('should change state', function() {\n            var color = element(by.binding('color'));\n\n            expect(color.getText()).toContain('blue');\n\n            element.all(by.model('color')).get(0).click();\n\n            expect(color.getText()).toContain('red');\n          });\n        </file>\n      </example>\n   */\n  'radio': radioInputType,\n\n\n  /**\n   * @ngdoc input\n   * @name input[checkbox]\n   *\n   * @description\n   * HTML checkbox.\n   *\n   * @param {string} ngModel Assignable angular expression to data-bind to.\n   * @param {string=} name Property name of the form under which the control is published.\n   * @param {string=} ngTrueValue The value to which the expression should be set when selected.\n   * @param {string=} ngFalseValue The value to which the expression should be set when not selected.\n   * @param {string=} ngChange Angular expression to be executed when input changes due to user\n   *    interaction with the input element.\n   *\n   * @example\n      <example name=\"checkbox-input-directive\" module=\"checkboxExample\">\n        <file name=\"index.html\">\n         <script>\n           angular.module('checkboxExample', [])\n             .controller('ExampleController', ['$scope', function($scope) {\n               $scope.value1 = true;\n               $scope.value2 = 'YES'\n             }]);\n         </script>\n         <form name=\"myForm\" ng-controller=\"ExampleController\">\n           Value1: <input type=\"checkbox\" ng-model=\"value1\"> <br/>\n           Value2: <input type=\"checkbox\" ng-model=\"value2\"\n                          ng-true-value=\"YES\" ng-false-value=\"NO\"> <br/>\n           <tt>value1 = {{value1}}</tt><br/>\n           <tt>value2 = {{value2}}</tt><br/>\n          </form>\n        </file>\n        <file name=\"protractor.js\" type=\"protractor\">\n          it('should change state', function() {\n            var value1 = element(by.binding('value1'));\n            var value2 = element(by.binding('value2'));\n\n            expect(value1.getText()).toContain('true');\n            expect(value2.getText()).toContain('YES');\n\n            element(by.model('value1')).click();\n            element(by.model('value2')).click();\n\n            expect(value1.getText()).toContain('false');\n            expect(value2.getText()).toContain('NO');\n          });\n        </file>\n      </example>\n   */\n  'checkbox': checkboxInputType,\n\n  'hidden': noop,\n  'button': noop,\n  'submit': noop,\n  'reset': noop,\n  'file': noop\n};\n\n// A helper function to call $setValidity and return the value / undefined,\n// a pattern that is repeated a lot in the input validation logic.\nfunction validate(ctrl, validatorName, validity, value){\n  ctrl.$setValidity(validatorName, validity);\n  return validity ? value : undefined;\n}\n\nfunction testFlags(validity, flags) {\n  var i, flag;\n  if (flags) {\n    for (i=0; i<flags.length; ++i) {\n      flag = flags[i];\n      if (validity[flag]) {\n        return true;\n      }\n    }\n  }\n  return false;\n}\n\n// Pass validity so that behaviour can be mocked easier.\nfunction addNativeHtml5Validators(ctrl, validatorName, badFlags, ignoreFlags, validity) {\n  if (isObject(validity)) {\n    ctrl.$$hasNativeValidators = true;\n    var validator = function(value) {\n      // Don't overwrite previous validation, don't consider valueMissing to apply (ng-required can\n      // perform the required validation)\n      if (!ctrl.$error[validatorName] &&\n          !testFlags(validity, ignoreFlags) &&\n          testFlags(validity, badFlags)) {\n        ctrl.$setValidity(validatorName, false);\n        return;\n      }\n      return value;\n    };\n    ctrl.$parsers.push(validator);\n  }\n}\n\nfunction textInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  var validity = element.prop(VALIDITY_STATE_PROPERTY);\n  var placeholder = element[0].placeholder, noevent = {};\n  ctrl.$$validityState = validity;\n\n  // In composition mode, users are still inputing intermediate text buffer,\n  // hold the listener until composition is done.\n  // More about composition events: https://developer.mozilla.org/en-US/docs/Web/API/CompositionEvent\n  if (!$sniffer.android) {\n    var composing = false;\n\n    element.on('compositionstart', function(data) {\n      composing = true;\n    });\n\n    element.on('compositionend', function() {\n      composing = false;\n      listener();\n    });\n  }\n\n  var listener = function(ev) {\n    if (composing) return;\n    var value = element.val();\n\n    // IE (11 and under) seem to emit an 'input' event if the placeholder value changes.\n    // We don't want to dirty the value when this happens, so we abort here. Unfortunately,\n    // IE also sends input events for other non-input-related things, (such as focusing on a\n    // form control), so this change is not entirely enough to solve this.\n    if (msie && (ev || noevent).type === 'input' && element[0].placeholder !== placeholder) {\n      placeholder = element[0].placeholder;\n      return;\n    }\n\n    // By default we will trim the value\n    // If the attribute ng-trim exists we will avoid trimming\n    // e.g. <input ng-model=\"foo\" ng-trim=\"false\">\n    if (toBoolean(attr.ngTrim || 'T')) {\n      value = trim(value);\n    }\n\n    // If a control is suffering from bad input, browsers discard its value, so it may be\n    // necessary to revalidate even if the control's value is the same empty value twice in\n    // a row.\n    var revalidate = validity && ctrl.$$hasNativeValidators;\n    if (ctrl.$viewValue !== value || (value === '' && revalidate)) {\n      if (scope.$$phase) {\n        ctrl.$setViewValue(value);\n      } else {\n        scope.$apply(function() {\n          ctrl.$setViewValue(value);\n        });\n      }\n    }\n  };\n\n  // if the browser does support \"input\" event, we are fine - except on IE9 which doesn't fire the\n  // input event on backspace, delete or cut\n  if ($sniffer.hasEvent('input')) {\n    element.on('input', listener);\n  } else {\n    var timeout;\n\n    var deferListener = function() {\n      if (!timeout) {\n        timeout = $browser.defer(function() {\n          listener();\n          timeout = null;\n        });\n      }\n    };\n\n    element.on('keydown', function(event) {\n      var key = event.keyCode;\n\n      // ignore\n      //    command            modifiers                   arrows\n      if (key === 91 || (15 < key && key < 19) || (37 <= key && key <= 40)) return;\n\n      deferListener();\n    });\n\n    // if user modifies input value using context menu in IE, we need \"paste\" and \"cut\" events to catch it\n    if ($sniffer.hasEvent('paste')) {\n      element.on('paste cut', deferListener);\n    }\n  }\n\n  // if user paste into input using mouse on older browser\n  // or form autocomplete on newer browser, we need \"change\" event to catch it\n  element.on('change', listener);\n\n  ctrl.$render = function() {\n    element.val(ctrl.$isEmpty(ctrl.$viewValue) ? '' : ctrl.$viewValue);\n  };\n\n  // pattern validator\n  var pattern = attr.ngPattern,\n      patternValidator,\n      match;\n\n  if (pattern) {\n    var validateRegex = function(regexp, value) {\n      return validate(ctrl, 'pattern', ctrl.$isEmpty(value) || regexp.test(value), value);\n    };\n    match = pattern.match(/^\\/(.*)\\/([gim]*)$/);\n    if (match) {\n      pattern = new RegExp(match[1], match[2]);\n      patternValidator = function(value) {\n        return validateRegex(pattern, value);\n      };\n    } else {\n      patternValidator = function(value) {\n        var patternObj = scope.$eval(pattern);\n\n        if (!patternObj || !patternObj.test) {\n          throw minErr('ngPattern')('noregexp',\n            'Expected {0} to be a RegExp but was {1}. Element: {2}', pattern,\n            patternObj, startingTag(element));\n        }\n        return validateRegex(patternObj, value);\n      };\n    }\n\n    ctrl.$formatters.push(patternValidator);\n    ctrl.$parsers.push(patternValidator);\n  }\n\n  // min length validator\n  if (attr.ngMinlength) {\n    var minlength = int(attr.ngMinlength);\n    var minLengthValidator = function(value) {\n      return validate(ctrl, 'minlength', ctrl.$isEmpty(value) || value.length >= minlength, value);\n    };\n\n    ctrl.$parsers.push(minLengthValidator);\n    ctrl.$formatters.push(minLengthValidator);\n  }\n\n  // max length validator\n  if (attr.ngMaxlength) {\n    var maxlength = int(attr.ngMaxlength);\n    var maxLengthValidator = function(value) {\n      return validate(ctrl, 'maxlength', ctrl.$isEmpty(value) || value.length <= maxlength, value);\n    };\n\n    ctrl.$parsers.push(maxLengthValidator);\n    ctrl.$formatters.push(maxLengthValidator);\n  }\n}\n\nvar numberBadFlags = ['badInput'];\n\nfunction numberInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  textInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n  ctrl.$parsers.push(function(value) {\n    var empty = ctrl.$isEmpty(value);\n    if (empty || NUMBER_REGEXP.test(value)) {\n      ctrl.$setValidity('number', true);\n      return value === '' ? null : (empty ? value : parseFloat(value));\n    } else {\n      ctrl.$setValidity('number', false);\n      return undefined;\n    }\n  });\n\n  addNativeHtml5Validators(ctrl, 'number', numberBadFlags, null, ctrl.$$validityState);\n\n  ctrl.$formatters.push(function(value) {\n    return ctrl.$isEmpty(value) ? '' : '' + value;\n  });\n\n  if (attr.min) {\n    var minValidator = function(value) {\n      var min = parseFloat(attr.min);\n      return validate(ctrl, 'min', ctrl.$isEmpty(value) || value >= min, value);\n    };\n\n    ctrl.$parsers.push(minValidator);\n    ctrl.$formatters.push(minValidator);\n  }\n\n  if (attr.max) {\n    var maxValidator = function(value) {\n      var max = parseFloat(attr.max);\n      return validate(ctrl, 'max', ctrl.$isEmpty(value) || value <= max, value);\n    };\n\n    ctrl.$parsers.push(maxValidator);\n    ctrl.$formatters.push(maxValidator);\n  }\n\n  ctrl.$formatters.push(function(value) {\n    return validate(ctrl, 'number', ctrl.$isEmpty(value) || isNumber(value), value);\n  });\n}\n\nfunction urlInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  textInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n  var urlValidator = function(value) {\n    return validate(ctrl, 'url', ctrl.$isEmpty(value) || URL_REGEXP.test(value), value);\n  };\n\n  ctrl.$formatters.push(urlValidator);\n  ctrl.$parsers.push(urlValidator);\n}\n\nfunction emailInputType(scope, element, attr, ctrl, $sniffer, $browser) {\n  textInputType(scope, element, attr, ctrl, $sniffer, $browser);\n\n  var emailValidator = function(value) {\n    return validate(ctrl, 'email', ctrl.$isEmpty(value) || EMAIL_REGEXP.test(value), value);\n  };\n\n  ctrl.$formatters.push(emailValidator);\n  ctrl.$parsers.push(emailValidator);\n}\n\nfunction radioInputType(scope, element, attr, ctrl) {\n  // make the name unique, if not defined\n  if (isUndefined(attr.name)) {\n    element.attr('name', nextUid());\n  }\n\n  element.on('click', function() {\n    if (element[0].checked) {\n      scope.$apply(function() {\n        ctrl.$setViewValue(attr.value);\n      });\n    }\n  });\n\n  ctrl.$render = function() {\n    var value = attr.value;\n    element[0].checked = (value == ctrl.$viewValue);\n  };\n\n  attr.$observe('value', ctrl.$render);\n}\n\nfunction checkboxInputType(scope, element, attr, ctrl) {\n  var trueValue = attr.ngTrueValue,\n      falseValue = attr.ngFalseValue;\n\n  if (!isString(trueValue)) trueValue = true;\n  if (!isString(falseValue)) falseValue = false;\n\n  element.on('click', function() {\n    scope.$apply(function() {\n      ctrl.$setViewValue(element[0].checked);\n    });\n  });\n\n  ctrl.$render = function() {\n    element[0].checked = ctrl.$viewValue;\n  };\n\n  // Override the standard `$isEmpty` because a value of `false` means empty in a checkbox.\n  ctrl.$isEmpty = function(value) {\n    return value !== trueValue;\n  };\n\n  ctrl.$formatters.push(function(value) {\n    return value === trueValue;\n  });\n\n  ctrl.$parsers.push(function(value) {\n    return value ? trueValue : falseValue;\n  });\n}\n\n\n/**\n * @ngdoc directive\n * @name textarea\n * @restrict E\n *\n * @description\n * HTML textarea element control with angular data-binding. The data-binding and validation\n * properties of this element are exactly the same as those of the\n * {@link ng.directive:input input element}.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n *    `required` when you want to data-bind to the `required` attribute.\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n *    minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n *    maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n *    patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n *    interaction with the input element.\n * @param {boolean=} [ngTrim=true] If set to false Angular will not automatically trim the input.\n */\n\n\n/**\n * @ngdoc directive\n * @name input\n * @restrict E\n *\n * @description\n * HTML input element control with angular data-binding. Input control follows HTML5 input types\n * and polyfills the HTML5 validation behavior for older browsers.\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required Sets `required` validation error key if the value is not entered.\n * @param {boolean=} ngRequired Sets `required` attribute if set to true\n * @param {number=} ngMinlength Sets `minlength` validation error key if the value is shorter than\n *    minlength.\n * @param {number=} ngMaxlength Sets `maxlength` validation error key if the value is longer than\n *    maxlength.\n * @param {string=} ngPattern Sets `pattern` validation error key if the value does not match the\n *    RegExp pattern expression. Expected value is `/regexp/` for inline patterns or `regexp` for\n *    patterns defined as scope expressions.\n * @param {string=} ngChange Angular expression to be executed when input changes due to user\n *    interaction with the input element.\n *\n * @example\n    <example name=\"input-directive\" module=\"inputExample\">\n      <file name=\"index.html\">\n       <script>\n          angular.module('inputExample', [])\n            .controller('ExampleController', ['$scope', function($scope) {\n              $scope.user = {name: 'guest', last: 'visitor'};\n            }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         <form name=\"myForm\">\n           User name: <input type=\"text\" name=\"userName\" ng-model=\"user.name\" required>\n           <span class=\"error\" ng-show=\"myForm.userName.$error.required\">\n             Required!</span><br>\n           Last name: <input type=\"text\" name=\"lastName\" ng-model=\"user.last\"\n             ng-minlength=\"3\" ng-maxlength=\"10\">\n           <span class=\"error\" ng-show=\"myForm.lastName.$error.minlength\">\n             Too short!</span>\n           <span class=\"error\" ng-show=\"myForm.lastName.$error.maxlength\">\n             Too long!</span><br>\n         </form>\n         <hr>\n         <tt>user = {{user}}</tt><br/>\n         <tt>myForm.userName.$valid = {{myForm.userName.$valid}}</tt><br>\n         <tt>myForm.userName.$error = {{myForm.userName.$error}}</tt><br>\n         <tt>myForm.lastName.$valid = {{myForm.lastName.$valid}}</tt><br>\n         <tt>myForm.lastName.$error = {{myForm.lastName.$error}}</tt><br>\n         <tt>myForm.$valid = {{myForm.$valid}}</tt><br>\n         <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br>\n         <tt>myForm.$error.minlength = {{!!myForm.$error.minlength}}</tt><br>\n         <tt>myForm.$error.maxlength = {{!!myForm.$error.maxlength}}</tt><br>\n       </div>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        var user = element(by.binding('{{user}}'));\n        var userNameValid = element(by.binding('myForm.userName.$valid'));\n        var lastNameValid = element(by.binding('myForm.lastName.$valid'));\n        var lastNameError = element(by.binding('myForm.lastName.$error'));\n        var formValid = element(by.binding('myForm.$valid'));\n        var userNameInput = element(by.model('user.name'));\n        var userLastInput = element(by.model('user.last'));\n\n        it('should initialize to model', function() {\n          expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"visitor\"}');\n          expect(userNameValid.getText()).toContain('true');\n          expect(formValid.getText()).toContain('true');\n        });\n\n        it('should be invalid if empty when required', function() {\n          userNameInput.clear();\n          userNameInput.sendKeys('');\n\n          expect(user.getText()).toContain('{\"last\":\"visitor\"}');\n          expect(userNameValid.getText()).toContain('false');\n          expect(formValid.getText()).toContain('false');\n        });\n\n        it('should be valid if empty when min length is set', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\",\"last\":\"\"}');\n          expect(lastNameValid.getText()).toContain('true');\n          expect(formValid.getText()).toContain('true');\n        });\n\n        it('should be invalid if less than required min length', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('xx');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\"}');\n          expect(lastNameValid.getText()).toContain('false');\n          expect(lastNameError.getText()).toContain('minlength');\n          expect(formValid.getText()).toContain('false');\n        });\n\n        it('should be invalid if longer than max length', function() {\n          userLastInput.clear();\n          userLastInput.sendKeys('some ridiculously long name');\n\n          expect(user.getText()).toContain('{\"name\":\"guest\"}');\n          expect(lastNameValid.getText()).toContain('false');\n          expect(lastNameError.getText()).toContain('maxlength');\n          expect(formValid.getText()).toContain('false');\n        });\n      </file>\n    </example>\n */\nvar inputDirective = ['$browser', '$sniffer', function($browser, $sniffer) {\n  return {\n    restrict: 'E',\n    require: '?ngModel',\n    link: function(scope, element, attr, ctrl) {\n      if (ctrl) {\n        (inputType[lowercase(attr.type)] || inputType.text)(scope, element, attr, ctrl, $sniffer,\n                                                            $browser);\n      }\n    }\n  };\n}];\n\nvar VALID_CLASS = 'ng-valid',\n    INVALID_CLASS = 'ng-invalid',\n    PRISTINE_CLASS = 'ng-pristine',\n    DIRTY_CLASS = 'ng-dirty';\n\n/**\n * @ngdoc type\n * @name ngModel.NgModelController\n *\n * @property {string} $viewValue Actual string value in the view.\n * @property {*} $modelValue The value in the model, that the control is bound to.\n * @property {Array.<Function>} $parsers Array of functions to execute, as a pipeline, whenever\n       the control reads value from the DOM.  Each function is called, in turn, passing the value\n       through to the next. The last return value is used to populate the model.\n       Used to sanitize / convert the value as well as validation. For validation,\n       the parsers should update the validity state using\n       {@link ngModel.NgModelController#$setValidity $setValidity()},\n       and return `undefined` for invalid values.\n\n *\n * @property {Array.<Function>} $formatters Array of functions to execute, as a pipeline, whenever\n       the model value changes. Each function is called, in turn, passing the value through to the\n       next. Used to format / convert values for display in the control and validation.\n * ```js\n * function formatter(value) {\n *   if (value) {\n *     return value.toUpperCase();\n *   }\n * }\n * ngModel.$formatters.push(formatter);\n * ```\n *\n * @property {Array.<Function>} $viewChangeListeners Array of functions to execute whenever the\n *     view value has changed. It is called with no arguments, and its return value is ignored.\n *     This can be used in place of additional $watches against the model value.\n *\n * @property {Object} $error An object hash with all errors as keys.\n *\n * @property {boolean} $pristine True if user has not interacted with the control yet.\n * @property {boolean} $dirty True if user has already interacted with the control.\n * @property {boolean} $valid True if there is no error.\n * @property {boolean} $invalid True if at least one error on the control.\n *\n * @description\n *\n * `NgModelController` provides API for the `ng-model` directive. The controller contains\n * services for data-binding, validation, CSS updates, and value formatting and parsing. It\n * purposefully does not contain any logic which deals with DOM rendering or listening to\n * DOM events. Such DOM related logic should be provided by other directives which make use of\n * `NgModelController` for data-binding.\n *\n * ## Custom Control Example\n * This example shows how to use `NgModelController` with a custom control to achieve\n * data-binding. Notice how different directives (`contenteditable`, `ng-model`, and `required`)\n * collaborate together to achieve the desired result.\n *\n * Note that `contenteditable` is an HTML5 attribute, which tells the browser to let the element\n * contents be edited in place by the user.  This will not work on older browsers.\n *\n * We are using the {@link ng.service:$sce $sce} service here and include the {@link ngSanitize $sanitize}\n * module to automatically remove \"bad\" content like inline event listener (e.g. `<span onclick=\"...\">`).\n * However, as we are using `$sce` the model can still decide to to provide unsafe content if it marks\n * that content using the `$sce` service.\n *\n * <example name=\"NgModelController\" module=\"customControl\" deps=\"angular-sanitize.js\">\n    <file name=\"style.css\">\n      [contenteditable] {\n        border: 1px solid black;\n        background-color: white;\n        min-height: 20px;\n      }\n\n      .ng-invalid {\n        border: 1px solid red;\n      }\n\n    </file>\n    <file name=\"script.js\">\n      angular.module('customControl', ['ngSanitize']).\n        directive('contenteditable', ['$sce', function($sce) {\n          return {\n            restrict: 'A', // only activate on element attribute\n            require: '?ngModel', // get a hold of NgModelController\n            link: function(scope, element, attrs, ngModel) {\n              if(!ngModel) return; // do nothing if no ng-model\n\n              // Specify how UI should be updated\n              ngModel.$render = function() {\n                element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));\n              };\n\n              // Listen for change events to enable binding\n              element.on('blur keyup change', function() {\n                scope.$apply(read);\n              });\n              read(); // initialize\n\n              // Write data to the model\n              function read() {\n                var html = element.html();\n                // When we clear the content editable the browser leaves a <br> behind\n                // If strip-br attribute is provided then we strip this out\n                if( attrs.stripBr && html == '<br>' ) {\n                  html = '';\n                }\n                ngModel.$setViewValue(html);\n              }\n            }\n          };\n        }]);\n    </file>\n    <file name=\"index.html\">\n      <form name=\"myForm\">\n       <div contenteditable\n            name=\"myWidget\" ng-model=\"userContent\"\n            strip-br=\"true\"\n            required>Change me!</div>\n        <span ng-show=\"myForm.myWidget.$error.required\">Required!</span>\n       <hr>\n       <textarea ng-model=\"userContent\"></textarea>\n      </form>\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n    it('should data-bind and become invalid', function() {\n      if (browser.params.browser == 'safari' || browser.params.browser == 'firefox') {\n        // SafariDriver can't handle contenteditable\n        // and Firefox driver can't clear contenteditables very well\n        return;\n      }\n      var contentEditable = element(by.css('[contenteditable]'));\n      var content = 'Change me!';\n\n      expect(contentEditable.getText()).toEqual(content);\n\n      contentEditable.clear();\n      contentEditable.sendKeys(protractor.Key.BACK_SPACE);\n      expect(contentEditable.getText()).toEqual('');\n      expect(contentEditable.getAttribute('class')).toMatch(/ng-invalid-required/);\n    });\n    </file>\n * </example>\n *\n *\n */\nvar NgModelController = ['$scope', '$exceptionHandler', '$attrs', '$element', '$parse', '$animate',\n    function($scope, $exceptionHandler, $attr, $element, $parse, $animate) {\n  this.$viewValue = Number.NaN;\n  this.$modelValue = Number.NaN;\n  this.$parsers = [];\n  this.$formatters = [];\n  this.$viewChangeListeners = [];\n  this.$pristine = true;\n  this.$dirty = false;\n  this.$valid = true;\n  this.$invalid = false;\n  this.$name = $attr.name;\n\n  var ngModelGet = $parse($attr.ngModel),\n      ngModelSet = ngModelGet.assign;\n\n  if (!ngModelSet) {\n    throw minErr('ngModel')('nonassign', \"Expression '{0}' is non-assignable. Element: {1}\",\n        $attr.ngModel, startingTag($element));\n  }\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$render\n   *\n   * @description\n   * Called when the view needs to be updated. It is expected that the user of the ng-model\n   * directive will implement this method.\n   */\n  this.$render = noop;\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$isEmpty\n   *\n   * @description\n   * This is called when we need to determine if the value of the input is empty.\n   *\n   * For instance, the required directive does this to work out if the input has data or not.\n   * The default `$isEmpty` function checks whether the value is `undefined`, `''`, `null` or `NaN`.\n   *\n   * You can override this for input directives whose concept of being empty is different to the\n   * default. The `checkboxInputType` directive does this because in its case a value of `false`\n   * implies empty.\n   *\n   * @param {*} value Reference to check.\n   * @returns {boolean} True if `value` is empty.\n   */\n  this.$isEmpty = function(value) {\n    return isUndefined(value) || value === '' || value === null || value !== value;\n  };\n\n  var parentForm = $element.inheritedData('$formController') || nullFormCtrl,\n      invalidCount = 0, // used to easily determine if we are valid\n      $error = this.$error = {}; // keep invalid keys here\n\n\n  // Setup initial state of the control\n  $element.addClass(PRISTINE_CLASS);\n  toggleValidCss(true);\n\n  // convenience method for easy toggling of classes\n  function toggleValidCss(isValid, validationErrorKey) {\n    validationErrorKey = validationErrorKey ? '-' + snake_case(validationErrorKey, '-') : '';\n    $animate.removeClass($element, (isValid ? INVALID_CLASS : VALID_CLASS) + validationErrorKey);\n    $animate.addClass($element, (isValid ? VALID_CLASS : INVALID_CLASS) + validationErrorKey);\n  }\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$setValidity\n   *\n   * @description\n   * Change the validity state, and notifies the form when the control changes validity. (i.e. it\n   * does not notify form if given validator is already marked as invalid).\n   *\n   * This method should be called by validators - i.e. the parser or formatter functions.\n   *\n   * @param {string} validationErrorKey Name of the validator. the `validationErrorKey` will assign\n   *        to `$error[validationErrorKey]=!isValid` so that it is available for data-binding.\n   *        The `validationErrorKey` should be in camelCase and will get converted into dash-case\n   *        for class name. Example: `myError` will result in `ng-valid-my-error` and `ng-invalid-my-error`\n   *        class and can be bound to as  `{{someForm.someControl.$error.myError}}` .\n   * @param {boolean} isValid Whether the current state is valid (true) or invalid (false).\n   */\n  this.$setValidity = function(validationErrorKey, isValid) {\n    // Purposeful use of ! here to cast isValid to boolean in case it is undefined\n    // jshint -W018\n    if ($error[validationErrorKey] === !isValid) return;\n    // jshint +W018\n\n    if (isValid) {\n      if ($error[validationErrorKey]) invalidCount--;\n      if (!invalidCount) {\n        toggleValidCss(true);\n        this.$valid = true;\n        this.$invalid = false;\n      }\n    } else {\n      toggleValidCss(false);\n      this.$invalid = true;\n      this.$valid = false;\n      invalidCount++;\n    }\n\n    $error[validationErrorKey] = !isValid;\n    toggleValidCss(isValid, validationErrorKey);\n\n    parentForm.$setValidity(validationErrorKey, isValid, this);\n  };\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$setPristine\n   *\n   * @description\n   * Sets the control to its pristine state.\n   *\n   * This method can be called to remove the 'ng-dirty' class and set the control to its pristine\n   * state (ng-pristine class).\n   */\n  this.$setPristine = function () {\n    this.$dirty = false;\n    this.$pristine = true;\n    $animate.removeClass($element, DIRTY_CLASS);\n    $animate.addClass($element, PRISTINE_CLASS);\n  };\n\n  /**\n   * @ngdoc method\n   * @name ngModel.NgModelController#$setViewValue\n   *\n   * @description\n   * Update the view value.\n   *\n   * This method should be called when the view value changes, typically from within a DOM event handler.\n   * For example {@link ng.directive:input input} and\n   * {@link ng.directive:select select} directives call it.\n   *\n   * It will update the $viewValue, then pass this value through each of the functions in `$parsers`,\n   * which includes any validators. The value that comes out of this `$parsers` pipeline, be applied to\n   * `$modelValue` and the **expression** specified in the `ng-model` attribute.\n   *\n   * Lastly, all the registered change listeners, in the `$viewChangeListeners` list, are called.\n   *\n   * Note that calling this function does not trigger a `$digest`.\n   *\n   * @param {string} value Value from the view.\n   */\n  this.$setViewValue = function(value) {\n    this.$viewValue = value;\n\n    // change to dirty\n    if (this.$pristine) {\n      this.$dirty = true;\n      this.$pristine = false;\n      $animate.removeClass($element, PRISTINE_CLASS);\n      $animate.addClass($element, DIRTY_CLASS);\n      parentForm.$setDirty();\n    }\n\n    forEach(this.$parsers, function(fn) {\n      value = fn(value);\n    });\n\n    if (this.$modelValue !== value) {\n      this.$modelValue = value;\n      ngModelSet($scope, value);\n      forEach(this.$viewChangeListeners, function(listener) {\n        try {\n          listener();\n        } catch(e) {\n          $exceptionHandler(e);\n        }\n      });\n    }\n  };\n\n  // model -> value\n  var ctrl = this;\n\n  $scope.$watch(function ngModelWatch() {\n    var value = ngModelGet($scope);\n\n    // if scope model value and ngModel value are out of sync\n    if (ctrl.$modelValue !== value) {\n\n      var formatters = ctrl.$formatters,\n          idx = formatters.length;\n\n      ctrl.$modelValue = value;\n      while(idx--) {\n        value = formatters[idx](value);\n      }\n\n      if (ctrl.$viewValue !== value) {\n        ctrl.$viewValue = value;\n        ctrl.$render();\n      }\n    }\n\n    return value;\n  });\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngModel\n *\n * @element input\n *\n * @description\n * The `ngModel` directive binds an `input`,`select`, `textarea` (or custom form control) to a\n * property on the scope using {@link ngModel.NgModelController NgModelController},\n * which is created and exposed by this directive.\n *\n * `ngModel` is responsible for:\n *\n * - Binding the view into the model, which other directives such as `input`, `textarea` or `select`\n *   require.\n * - Providing validation behavior (i.e. required, number, email, url).\n * - Keeping the state of the control (valid/invalid, dirty/pristine, validation errors).\n * - Setting related css classes on the element (`ng-valid`, `ng-invalid`, `ng-dirty`, `ng-pristine`) including animations.\n * - Registering the control with its parent {@link ng.directive:form form}.\n *\n * Note: `ngModel` will try to bind to the property given by evaluating the expression on the\n * current scope. If the property doesn't already exist on this scope, it will be created\n * implicitly and added to the scope.\n *\n * For best practices on using `ngModel`, see:\n *\n *  - [https://github.com/angular/angular.js/wiki/Understanding-Scopes]\n *\n * For basic examples, how to use `ngModel`, see:\n *\n *  - {@link ng.directive:input input}\n *    - {@link input[text] text}\n *    - {@link input[checkbox] checkbox}\n *    - {@link input[radio] radio}\n *    - {@link input[number] number}\n *    - {@link input[email] email}\n *    - {@link input[url] url}\n *  - {@link ng.directive:select select}\n *  - {@link ng.directive:textarea textarea}\n *\n * # CSS classes\n * The following CSS classes are added and removed on the associated input/select/textarea element\n * depending on the validity of the model.\n *\n *  - `ng-valid` is set if the model is valid.\n *  - `ng-invalid` is set if the model is invalid.\n *  - `ng-pristine` is set if the model is pristine.\n *  - `ng-dirty` is set if the model is dirty.\n *\n * Keep in mind that ngAnimate can detect each of these classes when added and removed.\n *\n * ## Animation Hooks\n *\n * Animations within models are triggered when any of the associated CSS classes are added and removed\n * on the input element which is attached to the model. These classes are: `.ng-pristine`, `.ng-dirty`,\n * `.ng-invalid` and `.ng-valid` as well as any other validations that are performed on the model itself.\n * The animations that are triggered within ngModel are similar to how they work in ngClass and\n * animations can be hooked into using CSS transitions, keyframes as well as JS animations.\n *\n * The following example shows a simple way to utilize CSS transitions to style an input element\n * that has been rendered as invalid after it has been validated:\n *\n * <pre>\n * //be sure to include ngAnimate as a module to hook into more\n * //advanced animations\n * .my-input {\n *   transition:0.5s linear all;\n *   background: white;\n * }\n * .my-input.ng-invalid {\n *   background: red;\n *   color:white;\n * }\n * </pre>\n *\n * @example\n * <example deps=\"angular-animate.js\" animations=\"true\" fixBase=\"true\" module=\"inputExample\">\n     <file name=\"index.html\">\n       <script>\n        angular.module('inputExample', [])\n          .controller('ExampleController', ['$scope', function($scope) {\n            $scope.val = '1';\n          }]);\n       </script>\n       <style>\n         .my-input {\n           -webkit-transition:all linear 0.5s;\n           transition:all linear 0.5s;\n           background: transparent;\n         }\n         .my-input.ng-invalid {\n           color:white;\n           background: red;\n         }\n       </style>\n       Update input to see transitions when valid/invalid.\n       Integer is a valid value.\n       <form name=\"testForm\" ng-controller=\"ExampleController\">\n         <input ng-model=\"val\" ng-pattern=\"/^\\d+$/\" name=\"anim\" class=\"my-input\" />\n       </form>\n     </file>\n * </example>\n */\nvar ngModelDirective = function() {\n  return {\n    require: ['ngModel', '^?form'],\n    controller: NgModelController,\n    link: function(scope, element, attr, ctrls) {\n      // notify others, especially parent forms\n\n      var modelCtrl = ctrls[0],\n          formCtrl = ctrls[1] || nullFormCtrl;\n\n      formCtrl.$addControl(modelCtrl);\n\n      scope.$on('$destroy', function() {\n        formCtrl.$removeControl(modelCtrl);\n      });\n    }\n  };\n};\n\n\n/**\n * @ngdoc directive\n * @name ngChange\n *\n * @description\n * Evaluate the given expression when the user changes the input.\n * The expression is evaluated immediately, unlike the JavaScript onchange event\n * which only triggers at the end of a change (usually, when the user leaves the\n * form element or presses the return key).\n * The expression is not evaluated when the value change is coming from the model.\n *\n * Note, this directive requires `ngModel` to be present.\n *\n * @element input\n * @param {expression} ngChange {@link guide/expression Expression} to evaluate upon change\n * in input value.\n *\n * @example\n * <example name=\"ngChange-directive\" module=\"changeExample\">\n *   <file name=\"index.html\">\n *     <script>\n *       angular.module('changeExample', [])\n *         .controller('ExampleController', ['$scope', function($scope) {\n *           $scope.counter = 0;\n *           $scope.change = function() {\n *             $scope.counter++;\n *           };\n *         }]);\n *     </script>\n *     <div ng-controller=\"ExampleController\">\n *       <input type=\"checkbox\" ng-model=\"confirmed\" ng-change=\"change()\" id=\"ng-change-example1\" />\n *       <input type=\"checkbox\" ng-model=\"confirmed\" id=\"ng-change-example2\" />\n *       <label for=\"ng-change-example2\">Confirmed</label><br />\n *       <tt>debug = {{confirmed}}</tt><br/>\n *       <tt>counter = {{counter}}</tt><br/>\n *     </div>\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n *     var counter = element(by.binding('counter'));\n *     var debug = element(by.binding('confirmed'));\n *\n *     it('should evaluate the expression if changing from view', function() {\n *       expect(counter.getText()).toContain('0');\n *\n *       element(by.id('ng-change-example1')).click();\n *\n *       expect(counter.getText()).toContain('1');\n *       expect(debug.getText()).toContain('true');\n *     });\n *\n *     it('should not evaluate the expression if changing from model', function() {\n *       element(by.id('ng-change-example2')).click();\n\n *       expect(counter.getText()).toContain('0');\n *       expect(debug.getText()).toContain('true');\n *     });\n *   </file>\n * </example>\n */\nvar ngChangeDirective = valueFn({\n  require: 'ngModel',\n  link: function(scope, element, attr, ctrl) {\n    ctrl.$viewChangeListeners.push(function() {\n      scope.$eval(attr.ngChange);\n    });\n  }\n});\n\n\nvar requiredDirective = function() {\n  return {\n    require: '?ngModel',\n    link: function(scope, elm, attr, ctrl) {\n      if (!ctrl) return;\n      attr.required = true; // force truthy in case we are on non input element\n\n      var validator = function(value) {\n        if (attr.required && ctrl.$isEmpty(value)) {\n          ctrl.$setValidity('required', false);\n          return;\n        } else {\n          ctrl.$setValidity('required', true);\n          return value;\n        }\n      };\n\n      ctrl.$formatters.push(validator);\n      ctrl.$parsers.unshift(validator);\n\n      attr.$observe('required', function() {\n        validator(ctrl.$viewValue);\n      });\n    }\n  };\n};\n\n\n/**\n * @ngdoc directive\n * @name ngList\n *\n * @description\n * Text input that converts between a delimited string and an array of strings. The delimiter\n * can be a fixed string (by default a comma) or a regular expression.\n *\n * @element input\n * @param {string=} ngList optional delimiter that should be used to split the value. If\n *   specified in form `/something/` then the value will be converted into a regular expression.\n *\n * @example\n    <example name=\"ngList-directive\" module=\"listExample\">\n      <file name=\"index.html\">\n       <script>\n         angular.module('listExample', [])\n           .controller('ExampleController', ['$scope', function($scope) {\n             $scope.names = ['igor', 'misko', 'vojta'];\n           }]);\n       </script>\n       <form name=\"myForm\" ng-controller=\"ExampleController\">\n         List: <input name=\"namesInput\" ng-model=\"names\" ng-list required>\n         <span class=\"error\" ng-show=\"myForm.namesInput.$error.required\">\n           Required!</span>\n         <br>\n         <tt>names = {{names}}</tt><br/>\n         <tt>myForm.namesInput.$valid = {{myForm.namesInput.$valid}}</tt><br/>\n         <tt>myForm.namesInput.$error = {{myForm.namesInput.$error}}</tt><br/>\n         <tt>myForm.$valid = {{myForm.$valid}}</tt><br/>\n         <tt>myForm.$error.required = {{!!myForm.$error.required}}</tt><br/>\n        </form>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        var listInput = element(by.model('names'));\n        var names = element(by.binding('{{names}}'));\n        var valid = element(by.binding('myForm.namesInput.$valid'));\n        var error = element(by.css('span.error'));\n\n        it('should initialize to model', function() {\n          expect(names.getText()).toContain('[\"igor\",\"misko\",\"vojta\"]');\n          expect(valid.getText()).toContain('true');\n          expect(error.getCssValue('display')).toBe('none');\n        });\n\n        it('should be invalid if empty', function() {\n          listInput.clear();\n          listInput.sendKeys('');\n\n          expect(names.getText()).toContain('');\n          expect(valid.getText()).toContain('false');\n          expect(error.getCssValue('display')).not.toBe('none');        });\n      </file>\n    </example>\n */\nvar ngListDirective = function() {\n  return {\n    require: 'ngModel',\n    link: function(scope, element, attr, ctrl) {\n      var match = /\\/(.*)\\//.exec(attr.ngList),\n          separator = match && new RegExp(match[1]) || attr.ngList || ',';\n\n      var parse = function(viewValue) {\n        // If the viewValue is invalid (say required but empty) it will be `undefined`\n        if (isUndefined(viewValue)) return;\n\n        var list = [];\n\n        if (viewValue) {\n          forEach(viewValue.split(separator), function(value) {\n            if (value) list.push(trim(value));\n          });\n        }\n\n        return list;\n      };\n\n      ctrl.$parsers.push(parse);\n      ctrl.$formatters.push(function(value) {\n        if (isArray(value)) {\n          return value.join(', ');\n        }\n\n        return undefined;\n      });\n\n      // Override the standard $isEmpty because an empty array means the input is empty.\n      ctrl.$isEmpty = function(value) {\n        return !value || !value.length;\n      };\n    }\n  };\n};\n\n\nvar CONSTANT_VALUE_REGEXP = /^(true|false|\\d+)$/;\n/**\n * @ngdoc directive\n * @name ngValue\n *\n * @description\n * Binds the given expression to the value of `input[select]` or `input[radio]`, so\n * that when the element is selected, the `ngModel` of that element is set to the\n * bound value.\n *\n * `ngValue` is useful when dynamically generating lists of radio buttons using `ng-repeat`, as\n * shown below.\n *\n * @element input\n * @param {string=} ngValue angular expression, whose value will be bound to the `value` attribute\n *   of the `input` element\n *\n * @example\n    <example name=\"ngValue-directive\" module=\"valueExample\">\n      <file name=\"index.html\">\n       <script>\n          angular.module('valueExample', [])\n            .controller('ExampleController', ['$scope', function($scope) {\n              $scope.names = ['pizza', 'unicorns', 'robots'];\n              $scope.my = { favorite: 'unicorns' };\n            }]);\n       </script>\n        <form ng-controller=\"ExampleController\">\n          <h2>Which is your favorite?</h2>\n            <label ng-repeat=\"name in names\" for=\"{{name}}\">\n              {{name}}\n              <input type=\"radio\"\n                     ng-model=\"my.favorite\"\n                     ng-value=\"name\"\n                     id=\"{{name}}\"\n                     name=\"favorite\">\n            </label>\n          <div>You chose {{my.favorite}}</div>\n        </form>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        var favorite = element(by.binding('my.favorite'));\n\n        it('should initialize to model', function() {\n          expect(favorite.getText()).toContain('unicorns');\n        });\n        it('should bind the values to the inputs', function() {\n          element.all(by.model('my.favorite')).get(0).click();\n          expect(favorite.getText()).toContain('pizza');\n        });\n      </file>\n    </example>\n */\nvar ngValueDirective = function() {\n  return {\n    priority: 100,\n    compile: function(tpl, tplAttr) {\n      if (CONSTANT_VALUE_REGEXP.test(tplAttr.ngValue)) {\n        return function ngValueConstantLink(scope, elm, attr) {\n          attr.$set('value', scope.$eval(attr.ngValue));\n        };\n      } else {\n        return function ngValueLink(scope, elm, attr) {\n          scope.$watch(attr.ngValue, function valueWatchAction(value) {\n            attr.$set('value', value);\n          });\n        };\n      }\n    }\n  };\n};\n\n/**\n * @ngdoc directive\n * @name ngBind\n * @restrict AC\n *\n * @description\n * The `ngBind` attribute tells Angular to replace the text content of the specified HTML element\n * with the value of a given expression, and to update the text content when the value of that\n * expression changes.\n *\n * Typically, you don't use `ngBind` directly, but instead you use the double curly markup like\n * `{{ expression }}` which is similar but less verbose.\n *\n * It is preferable to use `ngBind` instead of `{{ expression }}` if a template is momentarily\n * displayed by the browser in its raw state before Angular compiles it. Since `ngBind` is an\n * element attribute, it makes the bindings invisible to the user while the page is loading.\n *\n * An alternative solution to this problem would be using the\n * {@link ng.directive:ngCloak ngCloak} directive.\n *\n *\n * @element ANY\n * @param {expression} ngBind {@link guide/expression Expression} to evaluate.\n *\n * @example\n * Enter a name in the Live Preview text box; the greeting below the text box changes instantly.\n   <example module=\"bindExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('bindExample', [])\n           .controller('ExampleController', ['$scope', function($scope) {\n             $scope.name = 'Whirled';\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         Enter name: <input type=\"text\" ng-model=\"name\"><br>\n         Hello <span ng-bind=\"name\"></span>!\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-bind', function() {\n         var nameInput = element(by.model('name'));\n\n         expect(element(by.binding('name')).getText()).toBe('Whirled');\n         nameInput.clear();\n         nameInput.sendKeys('world');\n         expect(element(by.binding('name')).getText()).toBe('world');\n       });\n     </file>\n   </example>\n */\nvar ngBindDirective = ngDirective({\n  compile: function(templateElement) {\n    templateElement.addClass('ng-binding');\n    return function (scope, element, attr) {\n      element.data('$binding', attr.ngBind);\n      scope.$watch(attr.ngBind, function ngBindWatchAction(value) {\n        // We are purposefully using == here rather than === because we want to\n        // catch when value is \"null or undefined\"\n        // jshint -W041\n        element.text(value == undefined ? '' : value);\n      });\n    };\n  }\n});\n\n\n/**\n * @ngdoc directive\n * @name ngBindTemplate\n *\n * @description\n * The `ngBindTemplate` directive specifies that the element\n * text content should be replaced with the interpolation of the template\n * in the `ngBindTemplate` attribute.\n * Unlike `ngBind`, the `ngBindTemplate` can contain multiple `{{` `}}`\n * expressions. This directive is needed since some HTML elements\n * (such as TITLE and OPTION) cannot contain SPAN elements.\n *\n * @element ANY\n * @param {string} ngBindTemplate template of form\n *   <tt>{{</tt> <tt>expression</tt> <tt>}}</tt> to eval.\n *\n * @example\n * Try it here: enter text in text box and watch the greeting change.\n   <example module=\"bindExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('bindExample', [])\n           .controller('ExampleController', ['$scope', function ($scope) {\n             $scope.salutation = 'Hello';\n             $scope.name = 'World';\n           }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n        Salutation: <input type=\"text\" ng-model=\"salutation\"><br>\n        Name: <input type=\"text\" ng-model=\"name\"><br>\n        <pre ng-bind-template=\"{{salutation}} {{name}}!\"></pre>\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-bind', function() {\n         var salutationElem = element(by.binding('salutation'));\n         var salutationInput = element(by.model('salutation'));\n         var nameInput = element(by.model('name'));\n\n         expect(salutationElem.getText()).toBe('Hello World!');\n\n         salutationInput.clear();\n         salutationInput.sendKeys('Greetings');\n         nameInput.clear();\n         nameInput.sendKeys('user');\n\n         expect(salutationElem.getText()).toBe('Greetings user!');\n       });\n     </file>\n   </example>\n */\nvar ngBindTemplateDirective = ['$interpolate', function($interpolate) {\n  return function(scope, element, attr) {\n    // TODO: move this to scenario runner\n    var interpolateFn = $interpolate(element.attr(attr.$attr.ngBindTemplate));\n    element.addClass('ng-binding').data('$binding', interpolateFn);\n    attr.$observe('ngBindTemplate', function(value) {\n      element.text(value);\n    });\n  };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngBindHtml\n *\n * @description\n * Creates a binding that will innerHTML the result of evaluating the `expression` into the current\n * element in a secure way.  By default, the innerHTML-ed content will be sanitized using the {@link\n * ngSanitize.$sanitize $sanitize} service.  To utilize this functionality, ensure that `$sanitize`\n * is available, for example, by including {@link ngSanitize} in your module's dependencies (not in\n * core Angular.)  You may also bypass sanitization for values you know are safe. To do so, bind to\n * an explicitly trusted value via {@link ng.$sce#trustAsHtml $sce.trustAsHtml}.  See the example\n * under {@link ng.$sce#Example Strict Contextual Escaping (SCE)}.\n *\n * Note: If a `$sanitize` service is unavailable and the bound value isn't explicitly trusted, you\n * will have an exception (instead of an exploit.)\n *\n * @element ANY\n * @param {expression} ngBindHtml {@link guide/expression Expression} to evaluate.\n *\n * @example\n   Try it here: enter text in text box and watch the greeting change.\n\n   <example module=\"bindHtmlExample\" deps=\"angular-sanitize.js\">\n     <file name=\"index.html\">\n       <div ng-controller=\"ExampleController\">\n        <p ng-bind-html=\"myHTML\"></p>\n       </div>\n     </file>\n\n     <file name=\"script.js\">\n       angular.module('bindHtmlExample', ['ngSanitize'])\n         .controller('ExampleController', ['$scope', function($scope) {\n           $scope.myHTML =\n              'I am an <code>HTML</code>string with ' +\n              '<a href=\"#\">links!</a> and other <em>stuff</em>';\n         }]);\n     </file>\n\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-bind-html', function() {\n         expect(element(by.binding('myHTML')).getText()).toBe(\n             'I am an HTMLstring with links! and other stuff');\n       });\n     </file>\n   </example>\n */\nvar ngBindHtmlDirective = ['$sce', '$parse', function($sce, $parse) {\n  return {\n    compile: function (tElement) {\n      tElement.addClass('ng-binding');\n\n      return function (scope, element, attr) {\n        element.data('$binding', attr.ngBindHtml);\n\n        var parsed = $parse(attr.ngBindHtml);\n\n        function getStringValue() {\n          return (parsed(scope) || '').toString();\n        }\n\n        scope.$watch(getStringValue, function ngBindHtmlWatchAction(value) {\n          element.html($sce.getTrustedHtml(parsed(scope)) || '');\n        });\n      };\n    }\n  };\n}];\n\nfunction classDirective(name, selector) {\n  name = 'ngClass' + name;\n  return ['$animate', function($animate) {\n    return {\n      restrict: 'AC',\n      link: function(scope, element, attr) {\n        var oldVal;\n\n        scope.$watch(attr[name], ngClassWatchAction, true);\n\n        attr.$observe('class', function(value) {\n          ngClassWatchAction(scope.$eval(attr[name]));\n        });\n\n\n        if (name !== 'ngClass') {\n          scope.$watch('$index', function($index, old$index) {\n            // jshint bitwise: false\n            var mod = $index & 1;\n            if (mod !== (old$index & 1)) {\n              var classes = arrayClasses(scope.$eval(attr[name]));\n              mod === selector ?\n                addClasses(classes) :\n                removeClasses(classes);\n            }\n          });\n        }\n\n        function addClasses(classes) {\n          var newClasses = digestClassCounts(classes, 1);\n          attr.$addClass(newClasses);\n        }\n\n        function removeClasses(classes) {\n          var newClasses = digestClassCounts(classes, -1);\n          attr.$removeClass(newClasses);\n        }\n\n        function digestClassCounts (classes, count) {\n          var classCounts = element.data('$classCounts') || {};\n          var classesToUpdate = [];\n          forEach(classes, function (className) {\n            if (count > 0 || classCounts[className]) {\n              classCounts[className] = (classCounts[className] || 0) + count;\n              if (classCounts[className] === +(count > 0)) {\n                classesToUpdate.push(className);\n              }\n            }\n          });\n          element.data('$classCounts', classCounts);\n          return classesToUpdate.join(' ');\n        }\n\n        function updateClasses (oldClasses, newClasses) {\n          var toAdd = arrayDifference(newClasses, oldClasses);\n          var toRemove = arrayDifference(oldClasses, newClasses);\n          toRemove = digestClassCounts(toRemove, -1);\n          toAdd = digestClassCounts(toAdd, 1);\n\n          if (toAdd.length === 0) {\n            $animate.removeClass(element, toRemove);\n          } else if (toRemove.length === 0) {\n            $animate.addClass(element, toAdd);\n          } else {\n            $animate.setClass(element, toAdd, toRemove);\n          }\n        }\n\n        function ngClassWatchAction(newVal) {\n          if (selector === true || scope.$index % 2 === selector) {\n            var newClasses = arrayClasses(newVal || []);\n            if (!oldVal) {\n              addClasses(newClasses);\n            } else if (!equals(newVal,oldVal)) {\n              var oldClasses = arrayClasses(oldVal);\n              updateClasses(oldClasses, newClasses);\n            }\n          }\n          oldVal = shallowCopy(newVal);\n        }\n      }\n    };\n\n    function arrayDifference(tokens1, tokens2) {\n      var values = [];\n\n      outer:\n      for(var i = 0; i < tokens1.length; i++) {\n        var token = tokens1[i];\n        for(var j = 0; j < tokens2.length; j++) {\n          if(token == tokens2[j]) continue outer;\n        }\n        values.push(token);\n      }\n      return values;\n    }\n\n    function arrayClasses (classVal) {\n      if (isArray(classVal)) {\n        return classVal;\n      } else if (isString(classVal)) {\n        return classVal.split(' ');\n      } else if (isObject(classVal)) {\n        var classes = [], i = 0;\n        forEach(classVal, function(v, k) {\n          if (v) {\n            classes = classes.concat(k.split(' '));\n          }\n        });\n        return classes;\n      }\n      return classVal;\n    }\n  }];\n}\n\n/**\n * @ngdoc directive\n * @name ngClass\n * @restrict AC\n *\n * @description\n * The `ngClass` directive allows you to dynamically set CSS classes on an HTML element by databinding\n * an expression that represents all classes to be added.\n *\n * The directive operates in three different ways, depending on which of three types the expression\n * evaluates to:\n *\n * 1. If the expression evaluates to a string, the string should be one or more space-delimited class\n * names.\n *\n * 2. If the expression evaluates to an array, each element of the array should be a string that is\n * one or more space-delimited class names.\n *\n * 3. If the expression evaluates to an object, then for each key-value pair of the\n * object with a truthy value the corresponding key is used as a class name.\n *\n * The directive won't add duplicate classes if a particular class was already set.\n *\n * When the expression changes, the previously added classes are removed and only then the\n * new classes are added.\n *\n * @animations\n * add - happens just before the class is applied to the element\n * remove - happens just before the class is removed from the element\n *\n * @element ANY\n * @param {expression} ngClass {@link guide/expression Expression} to eval. The result\n *   of the evaluation can be a string representing space delimited class\n *   names, an array, or a map of class names to boolean values. In the case of a map, the\n *   names of the properties whose values are truthy will be added as css classes to the\n *   element.\n *\n * @example Example that demonstrates basic bindings via ngClass directive.\n   <example>\n     <file name=\"index.html\">\n       <p ng-class=\"{strike: deleted, bold: important, red: error}\">Map Syntax Example</p>\n       <input type=\"checkbox\" ng-model=\"deleted\"> deleted (apply \"strike\" class)<br>\n       <input type=\"checkbox\" ng-model=\"important\"> important (apply \"bold\" class)<br>\n       <input type=\"checkbox\" ng-model=\"error\"> error (apply \"red\" class)\n       <hr>\n       <p ng-class=\"style\">Using String Syntax</p>\n       <input type=\"text\" ng-model=\"style\" placeholder=\"Type: bold strike red\">\n       <hr>\n       <p ng-class=\"[style1, style2, style3]\">Using Array Syntax</p>\n       <input ng-model=\"style1\" placeholder=\"Type: bold, strike or red\"><br>\n       <input ng-model=\"style2\" placeholder=\"Type: bold, strike or red\"><br>\n       <input ng-model=\"style3\" placeholder=\"Type: bold, strike or red\"><br>\n     </file>\n     <file name=\"style.css\">\n       .strike {\n         text-decoration: line-through;\n       }\n       .bold {\n           font-weight: bold;\n       }\n       .red {\n           color: red;\n       }\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       var ps = element.all(by.css('p'));\n\n       it('should let you toggle the class', function() {\n\n         expect(ps.first().getAttribute('class')).not.toMatch(/bold/);\n         expect(ps.first().getAttribute('class')).not.toMatch(/red/);\n\n         element(by.model('important')).click();\n         expect(ps.first().getAttribute('class')).toMatch(/bold/);\n\n         element(by.model('error')).click();\n         expect(ps.first().getAttribute('class')).toMatch(/red/);\n       });\n\n       it('should let you toggle string example', function() {\n         expect(ps.get(1).getAttribute('class')).toBe('');\n         element(by.model('style')).clear();\n         element(by.model('style')).sendKeys('red');\n         expect(ps.get(1).getAttribute('class')).toBe('red');\n       });\n\n       it('array example should have 3 classes', function() {\n         expect(ps.last().getAttribute('class')).toBe('');\n         element(by.model('style1')).sendKeys('bold');\n         element(by.model('style2')).sendKeys('strike');\n         element(by.model('style3')).sendKeys('red');\n         expect(ps.last().getAttribute('class')).toBe('bold strike red');\n       });\n     </file>\n   </example>\n\n   ## Animations\n\n   The example below demonstrates how to perform animations using ngClass.\n\n   <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n     <file name=\"index.html\">\n      <input id=\"setbtn\" type=\"button\" value=\"set\" ng-click=\"myVar='my-class'\">\n      <input id=\"clearbtn\" type=\"button\" value=\"clear\" ng-click=\"myVar=''\">\n      <br>\n      <span class=\"base-class\" ng-class=\"myVar\">Sample Text</span>\n     </file>\n     <file name=\"style.css\">\n       .base-class {\n         -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n         transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n       }\n\n       .base-class.my-class {\n         color: red;\n         font-size:3em;\n       }\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-class', function() {\n         expect(element(by.css('.base-class')).getAttribute('class')).not.\n           toMatch(/my-class/);\n\n         element(by.id('setbtn')).click();\n\n         expect(element(by.css('.base-class')).getAttribute('class')).\n           toMatch(/my-class/);\n\n         element(by.id('clearbtn')).click();\n\n         expect(element(by.css('.base-class')).getAttribute('class')).not.\n           toMatch(/my-class/);\n       });\n     </file>\n   </example>\n\n\n   ## ngClass and pre-existing CSS3 Transitions/Animations\n   The ngClass directive still supports CSS3 Transitions/Animations even if they do not follow the ngAnimate CSS naming structure.\n   Upon animation ngAnimate will apply supplementary CSS classes to track the start and end of an animation, but this will not hinder\n   any pre-existing CSS transitions already on the element. To get an idea of what happens during a class-based animation, be sure\n   to view the step by step details of {@link ngAnimate.$animate#addclass $animate.addClass} and\n   {@link ngAnimate.$animate#removeclass $animate.removeClass}.\n */\nvar ngClassDirective = classDirective('', true);\n\n/**\n * @ngdoc directive\n * @name ngClassOdd\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassOdd {@link guide/expression Expression} to eval. The result\n *   of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n          <li ng-repeat=\"name in names\">\n           <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n             {{name}}\n           </span>\n          </li>\n        </ol>\n     </file>\n     <file name=\"style.css\">\n       .odd {\n         color: red;\n       }\n       .even {\n         color: blue;\n       }\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-class-odd and ng-class-even', function() {\n         expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n           toMatch(/odd/);\n         expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n           toMatch(/even/);\n       });\n     </file>\n   </example>\n */\nvar ngClassOddDirective = classDirective('Odd', 0);\n\n/**\n * @ngdoc directive\n * @name ngClassEven\n * @restrict AC\n *\n * @description\n * The `ngClassOdd` and `ngClassEven` directives work exactly as\n * {@link ng.directive:ngClass ngClass}, except they work in\n * conjunction with `ngRepeat` and take effect only on odd (even) rows.\n *\n * This directive can be applied only within the scope of an\n * {@link ng.directive:ngRepeat ngRepeat}.\n *\n * @element ANY\n * @param {expression} ngClassEven {@link guide/expression Expression} to eval. The\n *   result of the evaluation can be a string representing space delimited class names or an array.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <ol ng-init=\"names=['John', 'Mary', 'Cate', 'Suz']\">\n          <li ng-repeat=\"name in names\">\n           <span ng-class-odd=\"'odd'\" ng-class-even=\"'even'\">\n             {{name}} &nbsp; &nbsp; &nbsp;\n           </span>\n          </li>\n        </ol>\n     </file>\n     <file name=\"style.css\">\n       .odd {\n         color: red;\n       }\n       .even {\n         color: blue;\n       }\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-class-odd and ng-class-even', function() {\n         expect(element(by.repeater('name in names').row(0).column('name')).getAttribute('class')).\n           toMatch(/odd/);\n         expect(element(by.repeater('name in names').row(1).column('name')).getAttribute('class')).\n           toMatch(/even/);\n       });\n     </file>\n   </example>\n */\nvar ngClassEvenDirective = classDirective('Even', 1);\n\n/**\n * @ngdoc directive\n * @name ngCloak\n * @restrict AC\n *\n * @description\n * The `ngCloak` directive is used to prevent the Angular html template from being briefly\n * displayed by the browser in its raw (uncompiled) form while your application is loading. Use this\n * directive to avoid the undesirable flicker effect caused by the html template display.\n *\n * The directive can be applied to the `<body>` element, but the preferred usage is to apply\n * multiple `ngCloak` directives to small portions of the page to permit progressive rendering\n * of the browser view.\n *\n * `ngCloak` works in cooperation with the following css rule embedded within `angular.js` and\n * `angular.min.js`.\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```css\n * [ng\\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {\n *   display: none !important;\n * }\n * ```\n *\n * When this css rule is loaded by the browser, all html elements (including their children) that\n * are tagged with the `ngCloak` directive are hidden. When Angular encounters this directive\n * during the compilation of the template it deletes the `ngCloak` element attribute, making\n * the compiled element visible.\n *\n * For the best result, the `angular.js` script must be loaded in the head section of the html\n * document; alternatively, the css rule above must be included in the external stylesheet of the\n * application.\n *\n * Legacy browsers, like IE7, do not provide attribute selector support (added in CSS 2.1) so they\n * cannot match the `[ng\\:cloak]` selector. To work around this limitation, you must add the css\n * class `ng-cloak` in addition to the `ngCloak` directive as shown in the example below.\n *\n * @element ANY\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <div id=\"template1\" ng-cloak>{{ 'hello' }}</div>\n        <div id=\"template2\" ng-cloak class=\"ng-cloak\">{{ 'hello IE7' }}</div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should remove the template directive and css class', function() {\n         expect($('#template1').getAttribute('ng-cloak')).\n           toBeNull();\n         expect($('#template2').getAttribute('ng-cloak')).\n           toBeNull();\n       });\n     </file>\n   </example>\n *\n */\nvar ngCloakDirective = ngDirective({\n  compile: function(element, attr) {\n    attr.$set('ngCloak', undefined);\n    element.removeClass('ng-cloak');\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ngController\n *\n * @description\n * The `ngController` directive attaches a controller class to the view. This is a key aspect of how angular\n * supports the principles behind the Model-View-Controller design pattern.\n *\n * MVC components in angular:\n *\n * * Model — Models are the properties of a scope; scopes are attached to the DOM where scope properties\n *   are accessed through bindings.\n * * View — The template (HTML with data bindings) that is rendered into the View.\n * * Controller — The `ngController` directive specifies a Controller class; the class contains business\n *   logic behind the application to decorate the scope with functions and values\n *\n * Note that you can also attach controllers to the DOM by declaring it in a route definition\n * via the {@link ngRoute.$route $route} service. A common mistake is to declare the controller\n * again using `ng-controller` in the template itself.  This will cause the controller to be attached\n * and executed twice.\n *\n * @element ANY\n * @scope\n * @param {expression} ngController Name of a globally accessible constructor function or an\n *     {@link guide/expression expression} that on the current scope evaluates to a\n *     constructor function. The controller instance can be published into a scope property\n *     by specifying `as propertyName`.\n *\n * @example\n * Here is a simple form for editing user contact information. Adding, removing, clearing, and\n * greeting are methods declared on the controller (see source tab). These methods can\n * easily be called from the angular markup. Any changes to the data are automatically reflected\n * in the View without the need for a manual update.\n *\n * Two different declaration styles are included below:\n *\n * * one binds methods and properties directly onto the controller using `this`:\n * `ng-controller=\"SettingsController1 as settings\"`\n * * one injects `$scope` into the controller:\n * `ng-controller=\"SettingsController2\"`\n *\n * The second option is more common in the Angular community, and is generally used in boilerplates\n * and in this guide. However, there are advantages to binding properties directly to the controller\n * and avoiding scope.\n *\n * * Using `controller as` makes it obvious which controller you are accessing in the template when\n * multiple controllers apply to an element.\n * * If you are writing your controllers as classes you have easier access to the properties and\n * methods, which will appear on the scope, from inside the controller code.\n * * Since there is always a `.` in the bindings, you don't have to worry about prototypal\n * inheritance masking primitives.\n *\n * This example demonstrates the `controller as` syntax.\n *\n * <example name=\"ngControllerAs\" module=\"controllerAsExample\">\n *   <file name=\"index.html\">\n *    <div id=\"ctrl-as-exmpl\" ng-controller=\"SettingsController1 as settings\">\n *      Name: <input type=\"text\" ng-model=\"settings.name\"/>\n *      [ <a href=\"\" ng-click=\"settings.greet()\">greet</a> ]<br/>\n *      Contact:\n *      <ul>\n *        <li ng-repeat=\"contact in settings.contacts\">\n *          <select ng-model=\"contact.type\">\n *             <option>phone</option>\n *             <option>email</option>\n *          </select>\n *          <input type=\"text\" ng-model=\"contact.value\"/>\n *          [ <a href=\"\" ng-click=\"settings.clearContact(contact)\">clear</a>\n *          | <a href=\"\" ng-click=\"settings.removeContact(contact)\">X</a> ]\n *        </li>\n *        <li>[ <a href=\"\" ng-click=\"settings.addContact()\">add</a> ]</li>\n *     </ul>\n *    </div>\n *   </file>\n *   <file name=\"app.js\">\n *    angular.module('controllerAsExample', [])\n *      .controller('SettingsController1', SettingsController1);\n *\n *    function SettingsController1() {\n *      this.name = \"John Smith\";\n *      this.contacts = [\n *        {type: 'phone', value: '408 555 1212'},\n *        {type: 'email', value: 'john.smith@example.org'} ];\n *    }\n *\n *    SettingsController1.prototype.greet = function() {\n *      alert(this.name);\n *    };\n *\n *    SettingsController1.prototype.addContact = function() {\n *      this.contacts.push({type: 'email', value: 'yourname@example.org'});\n *    };\n *\n *    SettingsController1.prototype.removeContact = function(contactToRemove) {\n *     var index = this.contacts.indexOf(contactToRemove);\n *      this.contacts.splice(index, 1);\n *    };\n *\n *    SettingsController1.prototype.clearContact = function(contact) {\n *      contact.type = 'phone';\n *      contact.value = '';\n *    };\n *   </file>\n *   <file name=\"protractor.js\" type=\"protractor\">\n *     it('should check controller as', function() {\n *       var container = element(by.id('ctrl-as-exmpl'));\n *         expect(container.element(by.model('settings.name'))\n *           .getAttribute('value')).toBe('John Smith');\n *\n *       var firstRepeat =\n *           container.element(by.repeater('contact in settings.contacts').row(0));\n *       var secondRepeat =\n *           container.element(by.repeater('contact in settings.contacts').row(1));\n *\n *       expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n *           .toBe('408 555 1212');\n *\n *       expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n *           .toBe('john.smith@example.org');\n *\n *       firstRepeat.element(by.linkText('clear')).click();\n *\n *       expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n *           .toBe('');\n *\n *       container.element(by.linkText('add')).click();\n *\n *       expect(container.element(by.repeater('contact in settings.contacts').row(2))\n *           .element(by.model('contact.value'))\n *           .getAttribute('value'))\n *           .toBe('yourname@example.org');\n *     });\n *   </file>\n * </example>\n *\n * This example demonstrates the \"attach to `$scope`\" style of controller.\n *\n * <example name=\"ngController\" module=\"controllerExample\">\n *  <file name=\"index.html\">\n *   <div id=\"ctrl-exmpl\" ng-controller=\"SettingsController2\">\n *     Name: <input type=\"text\" ng-model=\"name\"/>\n *     [ <a href=\"\" ng-click=\"greet()\">greet</a> ]<br/>\n *     Contact:\n *     <ul>\n *       <li ng-repeat=\"contact in contacts\">\n *         <select ng-model=\"contact.type\">\n *            <option>phone</option>\n *            <option>email</option>\n *         </select>\n *         <input type=\"text\" ng-model=\"contact.value\"/>\n *         [ <a href=\"\" ng-click=\"clearContact(contact)\">clear</a>\n *         | <a href=\"\" ng-click=\"removeContact(contact)\">X</a> ]\n *       </li>\n *       <li>[ <a href=\"\" ng-click=\"addContact()\">add</a> ]</li>\n *    </ul>\n *   </div>\n *  </file>\n *  <file name=\"app.js\">\n *   angular.module('controllerExample', [])\n *     .controller('SettingsController2', ['$scope', SettingsController2]);\n *\n *   function SettingsController2($scope) {\n *     $scope.name = \"John Smith\";\n *     $scope.contacts = [\n *       {type:'phone', value:'408 555 1212'},\n *       {type:'email', value:'john.smith@example.org'} ];\n *\n *     $scope.greet = function() {\n *       alert($scope.name);\n *     };\n *\n *     $scope.addContact = function() {\n *       $scope.contacts.push({type:'email', value:'yourname@example.org'});\n *     };\n *\n *     $scope.removeContact = function(contactToRemove) {\n *       var index = $scope.contacts.indexOf(contactToRemove);\n *       $scope.contacts.splice(index, 1);\n *     };\n *\n *     $scope.clearContact = function(contact) {\n *       contact.type = 'phone';\n *       contact.value = '';\n *     };\n *   }\n *  </file>\n *  <file name=\"protractor.js\" type=\"protractor\">\n *    it('should check controller', function() {\n *      var container = element(by.id('ctrl-exmpl'));\n *\n *      expect(container.element(by.model('name'))\n *          .getAttribute('value')).toBe('John Smith');\n *\n *      var firstRepeat =\n *          container.element(by.repeater('contact in contacts').row(0));\n *      var secondRepeat =\n *          container.element(by.repeater('contact in contacts').row(1));\n *\n *      expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n *          .toBe('408 555 1212');\n *      expect(secondRepeat.element(by.model('contact.value')).getAttribute('value'))\n *          .toBe('john.smith@example.org');\n *\n *      firstRepeat.element(by.linkText('clear')).click();\n *\n *      expect(firstRepeat.element(by.model('contact.value')).getAttribute('value'))\n *          .toBe('');\n *\n *      container.element(by.linkText('add')).click();\n *\n *      expect(container.element(by.repeater('contact in contacts').row(2))\n *          .element(by.model('contact.value'))\n *          .getAttribute('value'))\n *          .toBe('yourname@example.org');\n *    });\n *  </file>\n *</example>\n\n */\nvar ngControllerDirective = [function() {\n  return {\n    scope: true,\n    controller: '@',\n    priority: 500\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ngCsp\n *\n * @element html\n * @description\n * Enables [CSP (Content Security Policy)](https://developer.mozilla.org/en/Security/CSP) support.\n *\n * This is necessary when developing things like Google Chrome Extensions.\n *\n * CSP forbids apps to use `eval` or `Function(string)` generated functions (among other things).\n * For Angular to be CSP compatible there are only two things that we need to do differently:\n *\n * - don't use `Function` constructor to generate optimized value getters\n * - don't inject custom stylesheet into the document\n *\n * AngularJS uses `Function(string)` generated functions as a speed optimization. Applying the `ngCsp`\n * directive will cause Angular to use CSP compatibility mode. When this mode is on AngularJS will\n * evaluate all expressions up to 30% slower than in non-CSP mode, but no security violations will\n * be raised.\n *\n * CSP forbids JavaScript to inline stylesheet rules. In non CSP mode Angular automatically\n * includes some CSS rules (e.g. {@link ng.directive:ngCloak ngCloak}).\n * To make those directives work in CSP mode, include the `angular-csp.css` manually.\n *\n * Angular tries to autodetect if CSP is active and automatically turn on the CSP-safe mode. This\n * autodetection however triggers a CSP error to be logged in the console:\n *\n * ```\n * Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of\n * script in the following Content Security Policy directive: \"default-src 'self'\". Note that\n * 'script-src' was not explicitly set, so 'default-src' is used as a fallback.\n * ```\n *\n * This error is harmless but annoying. To prevent the error from showing up, put the `ngCsp`\n * directive on the root element of the application or on the `angular.js` script tag, whichever\n * appears first in the html document.\n *\n * *Note: This directive is only available in the `ng-csp` and `data-ng-csp` attribute form.*\n *\n * @example\n * This example shows how to apply the `ngCsp` directive to the `html` tag.\n   ```html\n     <!doctype html>\n     <html ng-app ng-csp>\n     ...\n     ...\n     </html>\n   ```\n */\n\n// ngCsp is not implemented as a proper directive any more, because we need it be processed while we\n// bootstrap the system (before $parse is instantiated), for this reason we just have\n// the csp.isActive() fn that looks for ng-csp attribute anywhere in the current doc\n\n/**\n * @ngdoc directive\n * @name ngClick\n *\n * @description\n * The ngClick directive allows you to specify custom behavior when\n * an element is clicked.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngClick {@link guide/expression Expression} to evaluate upon\n * click. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-click=\"count = count + 1\" ng-init=\"count=0\">\n        Increment\n      </button>\n      count: {{count}}\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-click', function() {\n         expect(element(by.binding('count')).getText()).toMatch('0');\n         element(by.css('button')).click();\n         expect(element(by.binding('count')).getText()).toMatch('1');\n       });\n     </file>\n   </example>\n */\n/*\n * A directive that allows creation of custom onclick handlers that are defined as angular\n * expressions and are compiled and executed within the current scope.\n *\n * Events that are handled via these handler are always configured not to propagate further.\n */\nvar ngEventDirectives = {};\nforEach(\n  'click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste'.split(' '),\n  function(name) {\n    var directiveName = directiveNormalize('ng-' + name);\n    ngEventDirectives[directiveName] = ['$parse', function($parse) {\n      return {\n        compile: function($element, attr) {\n          var fn = $parse(attr[directiveName]);\n          return function ngEventHandler(scope, element) {\n            element.on(lowercase(name), function(event) {\n              scope.$apply(function() {\n                fn(scope, {$event:event});\n              });\n            });\n          };\n        }\n      };\n    }];\n  }\n);\n\n/**\n * @ngdoc directive\n * @name ngDblclick\n *\n * @description\n * The `ngDblclick` directive allows you to specify custom behavior on a dblclick event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngDblclick {@link guide/expression Expression} to evaluate upon\n * a dblclick. (The Event object is available as `$event`)\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-dblclick=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on double click)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousedown\n *\n * @description\n * The ngMousedown directive allows you to specify custom behavior on mousedown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousedown {@link guide/expression Expression} to evaluate upon\n * mousedown. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mousedown=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on mouse down)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseup\n *\n * @description\n * Specify custom behavior on mouseup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseup {@link guide/expression Expression} to evaluate upon\n * mouseup. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mouseup=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (on mouse up)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngMouseover\n *\n * @description\n * Specify custom behavior on mouseover event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseover {@link guide/expression Expression} to evaluate upon\n * mouseover. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mouseover=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse is over)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseenter\n *\n * @description\n * Specify custom behavior on mouseenter event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseenter {@link guide/expression Expression} to evaluate upon\n * mouseenter. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mouseenter=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse enters)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMouseleave\n *\n * @description\n * Specify custom behavior on mouseleave event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMouseleave {@link guide/expression Expression} to evaluate upon\n * mouseleave. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mouseleave=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse leaves)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngMousemove\n *\n * @description\n * Specify custom behavior on mousemove event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngMousemove {@link guide/expression Expression} to evaluate upon\n * mousemove. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <button ng-mousemove=\"count = count + 1\" ng-init=\"count=0\">\n        Increment (when mouse moves)\n      </button>\n      count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeydown\n *\n * @description\n * Specify custom behavior on keydown event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeydown {@link guide/expression Expression} to evaluate upon\n * keydown. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <input ng-keydown=\"count = count + 1\" ng-init=\"count=0\">\n      key down count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeyup\n *\n * @description\n * Specify custom behavior on keyup event.\n *\n * @element ANY\n * @priority 0\n * @param {expression} ngKeyup {@link guide/expression Expression} to evaluate upon\n * keyup. (Event object is available as `$event` and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n       <p>Typing in the input box below updates the key count</p>\n       <input ng-keyup=\"count = count + 1\" ng-init=\"count=0\"> key up count: {{count}}\n\n       <p>Typing in the input box below updates the keycode</p>\n       <input ng-keyup=\"event=$event\">\n       <p>event keyCode: {{ event.keyCode }}</p>\n       <p>event altKey: {{ event.altKey }}</p>\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngKeypress\n *\n * @description\n * Specify custom behavior on keypress event.\n *\n * @element ANY\n * @param {expression} ngKeypress {@link guide/expression Expression} to evaluate upon\n * keypress. ({@link guide/expression#-event- Event object is available as `$event`}\n * and can be interrogated for keyCode, altKey, etc.)\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <input ng-keypress=\"count = count + 1\" ng-init=\"count=0\">\n      key press count: {{count}}\n     </file>\n   </example>\n */\n\n\n/**\n * @ngdoc directive\n * @name ngSubmit\n *\n * @description\n * Enables binding angular expressions to onsubmit events.\n *\n * Additionally it prevents the default action (which for form means sending the request to the\n * server and reloading the current page), but only if the form does not contain `action`,\n * `data-action`, or `x-action` attributes.\n *\n * @element form\n * @priority 0\n * @param {expression} ngSubmit {@link guide/expression Expression} to eval.\n * ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example module=\"submitExample\">\n     <file name=\"index.html\">\n      <script>\n        angular.module('submitExample', [])\n          .controller('ExampleController', ['$scope', function($scope) {\n            $scope.list = [];\n            $scope.text = 'hello';\n            $scope.submit = function() {\n              if ($scope.text) {\n                $scope.list.push(this.text);\n                $scope.text = '';\n              }\n            };\n          }]);\n      </script>\n      <form ng-submit=\"submit()\" ng-controller=\"ExampleController\">\n        Enter text and hit enter:\n        <input type=\"text\" ng-model=\"text\" name=\"text\" />\n        <input type=\"submit\" id=\"submit\" value=\"Submit\" />\n        <pre>list={{list}}</pre>\n      </form>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-submit', function() {\n         expect(element(by.binding('list')).getText()).toBe('list=[]');\n         element(by.css('#submit')).click();\n         expect(element(by.binding('list')).getText()).toContain('hello');\n         expect(element(by.model('text')).getAttribute('value')).toBe('');\n       });\n       it('should ignore empty strings', function() {\n         expect(element(by.binding('list')).getText()).toBe('list=[]');\n         element(by.css('#submit')).click();\n         element(by.css('#submit')).click();\n         expect(element(by.binding('list')).getText()).toContain('hello');\n        });\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngFocus\n *\n * @description\n * Specify custom behavior on focus event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngFocus {@link guide/expression Expression} to evaluate upon\n * focus. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngBlur\n *\n * @description\n * Specify custom behavior on blur event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngBlur {@link guide/expression Expression} to evaluate upon\n * blur. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n * See {@link ng.directive:ngClick ngClick}\n */\n\n/**\n * @ngdoc directive\n * @name ngCopy\n *\n * @description\n * Specify custom behavior on copy event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCopy {@link guide/expression Expression} to evaluate upon\n * copy. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <input ng-copy=\"copied=true\" ng-init=\"copied=false; value='copy me'\" ng-model=\"value\">\n      copied: {{copied}}\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngCut\n *\n * @description\n * Specify custom behavior on cut event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngCut {@link guide/expression Expression} to evaluate upon\n * cut. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <input ng-cut=\"cut=true\" ng-init=\"cut=false; value='cut me'\" ng-model=\"value\">\n      cut: {{cut}}\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngPaste\n *\n * @description\n * Specify custom behavior on paste event.\n *\n * @element window, input, select, textarea, a\n * @priority 0\n * @param {expression} ngPaste {@link guide/expression Expression} to evaluate upon\n * paste. ({@link guide/expression#-event- Event object is available as `$event`})\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n      <input ng-paste=\"paste=true\" ng-init=\"paste=false\" placeholder='paste here'>\n      pasted: {{paste}}\n     </file>\n   </example>\n */\n\n/**\n * @ngdoc directive\n * @name ngIf\n * @restrict A\n *\n * @description\n * The `ngIf` directive removes or recreates a portion of the DOM tree based on an\n * {expression}. If the expression assigned to `ngIf` evaluates to a false\n * value then the element is removed from the DOM, otherwise a clone of the\n * element is reinserted into the DOM.\n *\n * `ngIf` differs from `ngShow` and `ngHide` in that `ngIf` completely removes and recreates the\n * element in the DOM rather than changing its visibility via the `display` css property.  A common\n * case when this difference is significant is when using css selectors that rely on an element's\n * position within the DOM, such as the `:first-child` or `:last-child` pseudo-classes.\n *\n * Note that when an element is removed using `ngIf` its scope is destroyed and a new scope\n * is created when the element is restored.  The scope created within `ngIf` inherits from\n * its parent scope using\n * [prototypal inheritance](https://github.com/angular/angular.js/wiki/The-Nuances-of-Scope-Prototypal-Inheritance).\n * An important implication of this is if `ngModel` is used within `ngIf` to bind to\n * a javascript primitive defined in the parent scope. In this case any modifications made to the\n * variable within the child scope will override (hide) the value in the parent scope.\n *\n * Also, `ngIf` recreates elements using their compiled state. An example of this behavior\n * is if an element's class attribute is directly modified after it's compiled, using something like\n * jQuery's `.addClass()` method, and the element is later removed. When `ngIf` recreates the element\n * the added class will be lost because the original compiled state is used to regenerate the element.\n *\n * Additionally, you can provide animations via the `ngAnimate` module to animate the `enter`\n * and `leave` effects.\n *\n * @animations\n * enter - happens just after the ngIf contents change and a new DOM element is created and injected into the ngIf container\n * leave - happens just before the ngIf contents are removed from the DOM\n *\n * @element ANY\n * @scope\n * @priority 600\n * @param {expression} ngIf If the {@link guide/expression expression} is falsy then\n *     the element is removed from the DOM tree. If it is truthy a copy of the compiled\n *     element is added to the DOM tree.\n *\n * @example\n  <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n      Click me: <input type=\"checkbox\" ng-model=\"checked\" ng-init=\"checked=true\" /><br/>\n      Show when checked:\n      <span ng-if=\"checked\" class=\"animate-if\">\n        I'm removed when the checkbox is unchecked.\n      </span>\n    </file>\n    <file name=\"animations.css\">\n      .animate-if {\n        background:white;\n        border:1px solid black;\n        padding:10px;\n      }\n\n      .animate-if.ng-enter, .animate-if.ng-leave {\n        -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n      }\n\n      .animate-if.ng-enter,\n      .animate-if.ng-leave.ng-leave-active {\n        opacity:0;\n      }\n\n      .animate-if.ng-leave,\n      .animate-if.ng-enter.ng-enter-active {\n        opacity:1;\n      }\n    </file>\n  </example>\n */\nvar ngIfDirective = ['$animate', function($animate) {\n  return {\n    transclude: 'element',\n    priority: 600,\n    terminal: true,\n    restrict: 'A',\n    $$tlb: true,\n    link: function ($scope, $element, $attr, ctrl, $transclude) {\n        var block, childScope, previousElements;\n        $scope.$watch($attr.ngIf, function ngIfWatchAction(value) {\n\n          if (toBoolean(value)) {\n            if (!childScope) {\n              childScope = $scope.$new();\n              $transclude(childScope, function (clone) {\n                clone[clone.length++] = document.createComment(' end ngIf: ' + $attr.ngIf + ' ');\n                // Note: We only need the first/last node of the cloned nodes.\n                // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n                // by a directive with templateUrl when its template arrives.\n                block = {\n                  clone: clone\n                };\n                $animate.enter(clone, $element.parent(), $element);\n              });\n            }\n          } else {\n            if(previousElements) {\n              previousElements.remove();\n              previousElements = null;\n            }\n            if(childScope) {\n              childScope.$destroy();\n              childScope = null;\n            }\n            if(block) {\n              previousElements = getBlockElements(block.clone);\n              $animate.leave(previousElements, function() {\n                previousElements = null;\n              });\n              block = null;\n            }\n          }\n        });\n    }\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ngInclude\n * @restrict ECA\n *\n * @description\n * Fetches, compiles and includes an external HTML fragment.\n *\n * By default, the template URL is restricted to the same domain and protocol as the\n * application document. This is done by calling {@link ng.$sce#getTrustedResourceUrl\n * $sce.getTrustedResourceUrl} on it. To load templates from other domains or protocols\n * you may either {@link ng.$sceDelegateProvider#resourceUrlWhitelist whitelist them} or\n * [wrap them](ng.$sce#trustAsResourceUrl) as trusted values. Refer to Angular's {@link\n * ng.$sce Strict Contextual Escaping}.\n *\n * In addition, the browser's\n * [Same Origin Policy](https://code.google.com/p/browsersec/wiki/Part2#Same-origin_policy_for_XMLHttpRequest)\n * and [Cross-Origin Resource Sharing (CORS)](http://www.w3.org/TR/cors/)\n * policy may further restrict whether the template is successfully loaded.\n * For example, `ngInclude` won't work for cross-domain requests on all browsers and for `file://`\n * access on some browsers.\n *\n * @animations\n * enter - animation is used to bring new content into the browser.\n * leave - animation is used to animate existing content away.\n *\n * The enter and leave animation occur concurrently.\n *\n * @scope\n * @priority 400\n *\n * @param {string} ngInclude|src angular expression evaluating to URL. If the source is a string constant,\n *                 make sure you wrap it in **single** quotes, e.g. `src=\"'myPartialTemplate.html'\"`.\n * @param {string=} onload Expression to evaluate when a new partial is loaded.\n *\n * @param {string=} autoscroll Whether `ngInclude` should call {@link ng.$anchorScroll\n *                  $anchorScroll} to scroll the viewport after the content is loaded.\n *\n *                  - If the attribute is not set, disable scrolling.\n *                  - If the attribute is set without value, enable scrolling.\n *                  - Otherwise enable scrolling only if the expression evaluates to truthy value.\n *\n * @example\n  <example module=\"includeExample\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n     <div ng-controller=\"ExampleController\">\n       <select ng-model=\"template\" ng-options=\"t.name for t in templates\">\n        <option value=\"\">(blank)</option>\n       </select>\n       url of the template: <tt>{{template.url}}</tt>\n       <hr/>\n       <div class=\"slide-animate-container\">\n         <div class=\"slide-animate\" ng-include=\"template.url\"></div>\n       </div>\n     </div>\n    </file>\n    <file name=\"script.js\">\n      angular.module('includeExample', ['ngAnimate'])\n        .controller('ExampleController', ['$scope', function($scope) {\n          $scope.templates =\n            [ { name: 'template1.html', url: 'template1.html'},\n              { name: 'template2.html', url: 'template2.html'} ];\n          $scope.template = $scope.templates[0];\n        }]);\n     </file>\n    <file name=\"template1.html\">\n      Content of template1.html\n    </file>\n    <file name=\"template2.html\">\n      Content of template2.html\n    </file>\n    <file name=\"animations.css\">\n      .slide-animate-container {\n        position:relative;\n        background:white;\n        border:1px solid black;\n        height:40px;\n        overflow:hidden;\n      }\n\n      .slide-animate {\n        padding:10px;\n      }\n\n      .slide-animate.ng-enter, .slide-animate.ng-leave {\n        -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n        position:absolute;\n        top:0;\n        left:0;\n        right:0;\n        bottom:0;\n        display:block;\n        padding:10px;\n      }\n\n      .slide-animate.ng-enter {\n        top:-50px;\n      }\n      .slide-animate.ng-enter.ng-enter-active {\n        top:0;\n      }\n\n      .slide-animate.ng-leave {\n        top:0;\n      }\n      .slide-animate.ng-leave.ng-leave-active {\n        top:50px;\n      }\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var templateSelect = element(by.model('template'));\n      var includeElem = element(by.css('[ng-include]'));\n\n      it('should load template1.html', function() {\n        expect(includeElem.getText()).toMatch(/Content of template1.html/);\n      });\n\n      it('should load template2.html', function() {\n        if (browser.params.browser == 'firefox') {\n          // Firefox can't handle using selects\n          // See https://github.com/angular/protractor/issues/480\n          return;\n        }\n        templateSelect.click();\n        templateSelect.all(by.css('option')).get(2).click();\n        expect(includeElem.getText()).toMatch(/Content of template2.html/);\n      });\n\n      it('should change to blank', function() {\n        if (browser.params.browser == 'firefox') {\n          // Firefox can't handle using selects\n          return;\n        }\n        templateSelect.click();\n        templateSelect.all(by.css('option')).get(0).click();\n        expect(includeElem.isPresent()).toBe(false);\n      });\n    </file>\n  </example>\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentRequested\n * @eventType emit on the scope ngInclude was declared in\n * @description\n * Emitted every time the ngInclude content is requested.\n */\n\n\n/**\n * @ngdoc event\n * @name ngInclude#$includeContentLoaded\n * @eventType emit on the current ngInclude scope\n * @description\n * Emitted every time the ngInclude content is reloaded.\n */\nvar ngIncludeDirective = ['$http', '$templateCache', '$anchorScroll', '$animate', '$sce',\n                  function($http,   $templateCache,   $anchorScroll,   $animate,   $sce) {\n  return {\n    restrict: 'ECA',\n    priority: 400,\n    terminal: true,\n    transclude: 'element',\n    controller: angular.noop,\n    compile: function(element, attr) {\n      var srcExp = attr.ngInclude || attr.src,\n          onloadExp = attr.onload || '',\n          autoScrollExp = attr.autoscroll;\n\n      return function(scope, $element, $attr, ctrl, $transclude) {\n        var changeCounter = 0,\n            currentScope,\n            previousElement,\n            currentElement;\n\n        var cleanupLastIncludeContent = function() {\n          if(previousElement) {\n            previousElement.remove();\n            previousElement = null;\n          }\n          if(currentScope) {\n            currentScope.$destroy();\n            currentScope = null;\n          }\n          if(currentElement) {\n            $animate.leave(currentElement, function() {\n              previousElement = null;\n            });\n            previousElement = currentElement;\n            currentElement = null;\n          }\n        };\n\n        scope.$watch($sce.parseAsResourceUrl(srcExp), function ngIncludeWatchAction(src) {\n          var afterAnimation = function() {\n            if (isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n              $anchorScroll();\n            }\n          };\n          var thisChangeId = ++changeCounter;\n\n          if (src) {\n            $http.get(src, {cache: $templateCache}).success(function(response) {\n              if (thisChangeId !== changeCounter) return;\n              var newScope = scope.$new();\n              ctrl.template = response;\n\n              // Note: This will also link all children of ng-include that were contained in the original\n              // html. If that content contains controllers, ... they could pollute/change the scope.\n              // However, using ng-include on an element with additional content does not make sense...\n              // Note: We can't remove them in the cloneAttchFn of $transclude as that\n              // function is called before linking the content, which would apply child\n              // directives to non existing elements.\n              var clone = $transclude(newScope, function(clone) {\n                cleanupLastIncludeContent();\n                $animate.enter(clone, null, $element, afterAnimation);\n              });\n\n              currentScope = newScope;\n              currentElement = clone;\n\n              currentScope.$emit('$includeContentLoaded');\n              scope.$eval(onloadExp);\n            }).error(function() {\n              if (thisChangeId === changeCounter) cleanupLastIncludeContent();\n            });\n            scope.$emit('$includeContentRequested');\n          } else {\n            cleanupLastIncludeContent();\n            ctrl.template = null;\n          }\n        });\n      };\n    }\n  };\n}];\n\n// This directive is called during the $transclude call of the first `ngInclude` directive.\n// It will replace and compile the content of the element with the loaded template.\n// We need this directive so that the element content is already filled when\n// the link function of another directive on the same element as ngInclude\n// is called.\nvar ngIncludeFillContentDirective = ['$compile',\n  function($compile) {\n    return {\n      restrict: 'ECA',\n      priority: -400,\n      require: 'ngInclude',\n      link: function(scope, $element, $attr, ctrl) {\n        $element.html(ctrl.template);\n        $compile($element.contents())(scope);\n      }\n    };\n  }];\n\n/**\n * @ngdoc directive\n * @name ngInit\n * @restrict AC\n *\n * @description\n * The `ngInit` directive allows you to evaluate an expression in the\n * current scope.\n *\n * <div class=\"alert alert-error\">\n * The only appropriate use of `ngInit` is for aliasing special properties of\n * {@link ng.directive:ngRepeat `ngRepeat`}, as seen in the demo below. Besides this case, you\n * should use {@link guide/controller controllers} rather than `ngInit`\n * to initialize values on a scope.\n * </div>\n * <div class=\"alert alert-warning\">\n * **Note**: If you have assignment in `ngInit` along with {@link ng.$filter `$filter`}, make\n * sure you have parenthesis for correct precedence:\n * <pre class=\"prettyprint\">\n *   <div ng-init=\"test1 = (data | orderBy:'name')\"></div>\n * </pre>\n * </div>\n *\n * @priority 450\n *\n * @element ANY\n * @param {expression} ngInit {@link guide/expression Expression} to eval.\n *\n * @example\n   <example module=\"initExample\">\n     <file name=\"index.html\">\n   <script>\n     angular.module('initExample', [])\n       .controller('ExampleController', ['$scope', function($scope) {\n         $scope.list = [['a', 'b'], ['c', 'd']];\n       }]);\n   </script>\n   <div ng-controller=\"ExampleController\">\n     <div ng-repeat=\"innerList in list\" ng-init=\"outerIndex = $index\">\n       <div ng-repeat=\"value in innerList\" ng-init=\"innerIndex = $index\">\n          <span class=\"example-init\">list[ {{outerIndex}} ][ {{innerIndex}} ] = {{value}};</span>\n       </div>\n     </div>\n   </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       it('should alias index positions', function() {\n         var elements = element.all(by.css('.example-init'));\n         expect(elements.get(0).getText()).toBe('list[ 0 ][ 0 ] = a;');\n         expect(elements.get(1).getText()).toBe('list[ 0 ][ 1 ] = b;');\n         expect(elements.get(2).getText()).toBe('list[ 1 ][ 0 ] = c;');\n         expect(elements.get(3).getText()).toBe('list[ 1 ][ 1 ] = d;');\n       });\n     </file>\n   </example>\n */\nvar ngInitDirective = ngDirective({\n  priority: 450,\n  compile: function() {\n    return {\n      pre: function(scope, element, attrs) {\n        scope.$eval(attrs.ngInit);\n      }\n    };\n  }\n});\n\n/**\n * @ngdoc directive\n * @name ngNonBindable\n * @restrict AC\n * @priority 1000\n *\n * @description\n * The `ngNonBindable` directive tells Angular not to compile or bind the contents of the current\n * DOM element. This is useful if the element contains what appears to be Angular directives and\n * bindings but which should be ignored by Angular. This could be the case if you have a site that\n * displays snippets of code, for instance.\n *\n * @element ANY\n *\n * @example\n * In this example there are two locations where a simple interpolation binding (`{{}}`) is present,\n * but the one wrapped in `ngNonBindable` is left alone.\n *\n * @example\n    <example>\n      <file name=\"index.html\">\n        <div>Normal: {{1 + 2}}</div>\n        <div ng-non-bindable>Ignored: {{1 + 2}}</div>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n       it('should check ng-non-bindable', function() {\n         expect(element(by.binding('1 + 2')).getText()).toContain('3');\n         expect(element.all(by.css('div')).last().getText()).toMatch(/1 \\+ 2/);\n       });\n      </file>\n    </example>\n */\nvar ngNonBindableDirective = ngDirective({ terminal: true, priority: 1000 });\n\n/**\n * @ngdoc directive\n * @name ngPluralize\n * @restrict EA\n *\n * @description\n * `ngPluralize` is a directive that displays messages according to en-US localization rules.\n * These rules are bundled with angular.js, but can be overridden\n * (see {@link guide/i18n Angular i18n} dev guide). You configure ngPluralize directive\n * by specifying the mappings between\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * and the strings to be displayed.\n *\n * # Plural categories and explicit number rules\n * There are two\n * [plural categories](http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html)\n * in Angular's default en-US locale: \"one\" and \"other\".\n *\n * While a plural category may match many numbers (for example, in en-US locale, \"other\" can match\n * any number that is not 1), an explicit number rule can only match one number. For example, the\n * explicit number rule for \"3\" matches the number 3. There are examples of plural categories\n * and explicit number rules throughout the rest of this documentation.\n *\n * # Configuring ngPluralize\n * You configure ngPluralize by providing 2 attributes: `count` and `when`.\n * You can also provide an optional attribute, `offset`.\n *\n * The value of the `count` attribute can be either a string or an {@link guide/expression\n * Angular expression}; these are evaluated on the current scope for its bound value.\n *\n * The `when` attribute specifies the mappings between plural categories and the actual\n * string to be displayed. The value of the attribute should be a JSON object.\n *\n * The following example shows how to configure ngPluralize:\n *\n * ```html\n * <ng-pluralize count=\"personCount\"\n                 when=\"{'0': 'Nobody is viewing.',\n *                      'one': '1 person is viewing.',\n *                      'other': '{} people are viewing.'}\">\n * </ng-pluralize>\n *```\n *\n * In the example, `\"0: Nobody is viewing.\"` is an explicit number rule. If you did not\n * specify this rule, 0 would be matched to the \"other\" category and \"0 people are viewing\"\n * would be shown instead of \"Nobody is viewing\". You can specify an explicit number rule for\n * other numbers, for example 12, so that instead of showing \"12 people are viewing\", you can\n * show \"a dozen people are viewing\".\n *\n * You can use a set of closed braces (`{}`) as a placeholder for the number that you want substituted\n * into pluralized strings. In the previous example, Angular will replace `{}` with\n * <span ng-non-bindable>`{{personCount}}`</span>. The closed braces `{}` is a placeholder\n * for <span ng-non-bindable>{{numberExpression}}</span>.\n *\n * # Configuring ngPluralize with offset\n * The `offset` attribute allows further customization of pluralized text, which can result in\n * a better user experience. For example, instead of the message \"4 people are viewing this document\",\n * you might display \"John, Kate and 2 others are viewing this document\".\n * The offset attribute allows you to offset a number by any desired value.\n * Let's take a look at an example:\n *\n * ```html\n * <ng-pluralize count=\"personCount\" offset=2\n *               when=\"{'0': 'Nobody is viewing.',\n *                      '1': '{{person1}} is viewing.',\n *                      '2': '{{person1}} and {{person2}} are viewing.',\n *                      'one': '{{person1}}, {{person2}} and one other person are viewing.',\n *                      'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n * </ng-pluralize>\n * ```\n *\n * Notice that we are still using two plural categories(one, other), but we added\n * three explicit number rules 0, 1 and 2.\n * When one person, perhaps John, views the document, \"John is viewing\" will be shown.\n * When three people view the document, no explicit number rule is found, so\n * an offset of 2 is taken off 3, and Angular uses 1 to decide the plural category.\n * In this case, plural category 'one' is matched and \"John, Mary and one other person are viewing\"\n * is shown.\n *\n * Note that when you specify offsets, you must provide explicit number rules for\n * numbers from 0 up to and including the offset. If you use an offset of 3, for example,\n * you must provide explicit number rules for 0, 1, 2 and 3. You must also provide plural strings for\n * plural categories \"one\" and \"other\".\n *\n * @param {string|expression} count The variable to be bound to.\n * @param {string} when The mapping between plural category to its corresponding strings.\n * @param {number=} offset Offset to deduct from the total number.\n *\n * @example\n    <example module=\"pluralizeExample\">\n      <file name=\"index.html\">\n        <script>\n          angular.module('pluralizeExample', [])\n            .controller('ExampleController', ['$scope', function($scope) {\n              $scope.person1 = 'Igor';\n              $scope.person2 = 'Misko';\n              $scope.personCount = 1;\n            }]);\n        </script>\n        <div ng-controller=\"ExampleController\">\n          Person 1:<input type=\"text\" ng-model=\"person1\" value=\"Igor\" /><br/>\n          Person 2:<input type=\"text\" ng-model=\"person2\" value=\"Misko\" /><br/>\n          Number of People:<input type=\"text\" ng-model=\"personCount\" value=\"1\" /><br/>\n\n          <!--- Example with simple pluralization rules for en locale --->\n          Without Offset:\n          <ng-pluralize count=\"personCount\"\n                        when=\"{'0': 'Nobody is viewing.',\n                               'one': '1 person is viewing.',\n                               'other': '{} people are viewing.'}\">\n          </ng-pluralize><br>\n\n          <!--- Example with offset --->\n          With Offset(2):\n          <ng-pluralize count=\"personCount\" offset=2\n                        when=\"{'0': 'Nobody is viewing.',\n                               '1': '{{person1}} is viewing.',\n                               '2': '{{person1}} and {{person2}} are viewing.',\n                               'one': '{{person1}}, {{person2}} and one other person are viewing.',\n                               'other': '{{person1}}, {{person2}} and {} other people are viewing.'}\">\n          </ng-pluralize>\n        </div>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n        it('should show correct pluralized string', function() {\n          var withoutOffset = element.all(by.css('ng-pluralize')).get(0);\n          var withOffset = element.all(by.css('ng-pluralize')).get(1);\n          var countInput = element(by.model('personCount'));\n\n          expect(withoutOffset.getText()).toEqual('1 person is viewing.');\n          expect(withOffset.getText()).toEqual('Igor is viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('0');\n\n          expect(withoutOffset.getText()).toEqual('Nobody is viewing.');\n          expect(withOffset.getText()).toEqual('Nobody is viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('2');\n\n          expect(withoutOffset.getText()).toEqual('2 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor and Misko are viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('3');\n\n          expect(withoutOffset.getText()).toEqual('3 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor, Misko and one other person are viewing.');\n\n          countInput.clear();\n          countInput.sendKeys('4');\n\n          expect(withoutOffset.getText()).toEqual('4 people are viewing.');\n          expect(withOffset.getText()).toEqual('Igor, Misko and 2 other people are viewing.');\n        });\n        it('should show data-bound names', function() {\n          var withOffset = element.all(by.css('ng-pluralize')).get(1);\n          var personCount = element(by.model('personCount'));\n          var person1 = element(by.model('person1'));\n          var person2 = element(by.model('person2'));\n          personCount.clear();\n          personCount.sendKeys('4');\n          person1.clear();\n          person1.sendKeys('Di');\n          person2.clear();\n          person2.sendKeys('Vojta');\n          expect(withOffset.getText()).toEqual('Di, Vojta and 2 other people are viewing.');\n        });\n      </file>\n    </example>\n */\nvar ngPluralizeDirective = ['$locale', '$interpolate', function($locale, $interpolate) {\n  var BRACE = /{}/g;\n  return {\n    restrict: 'EA',\n    link: function(scope, element, attr) {\n      var numberExp = attr.count,\n          whenExp = attr.$attr.when && element.attr(attr.$attr.when), // we have {{}} in attrs\n          offset = attr.offset || 0,\n          whens = scope.$eval(whenExp) || {},\n          whensExpFns = {},\n          startSymbol = $interpolate.startSymbol(),\n          endSymbol = $interpolate.endSymbol(),\n          isWhen = /^when(Minus)?(.+)$/;\n\n      forEach(attr, function(expression, attributeName) {\n        if (isWhen.test(attributeName)) {\n          whens[lowercase(attributeName.replace('when', '').replace('Minus', '-'))] =\n            element.attr(attr.$attr[attributeName]);\n        }\n      });\n      forEach(whens, function(expression, key) {\n        whensExpFns[key] =\n          $interpolate(expression.replace(BRACE, startSymbol + numberExp + '-' +\n            offset + endSymbol));\n      });\n\n      scope.$watch(function ngPluralizeWatch() {\n        var value = parseFloat(scope.$eval(numberExp));\n\n        if (!isNaN(value)) {\n          //if explicit number rule such as 1, 2, 3... is defined, just use it. Otherwise,\n          //check it against pluralization rules in $locale service\n          if (!(value in whens)) value = $locale.pluralCat(value - offset);\n           return whensExpFns[value](scope, element, true);\n        } else {\n          return '';\n        }\n      }, function ngPluralizeWatchAction(newVal) {\n        element.text(newVal);\n      });\n    }\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ngRepeat\n *\n * @description\n * The `ngRepeat` directive instantiates a template once per item from a collection. Each template\n * instance gets its own scope, where the given loop variable is set to the current collection item,\n * and `$index` is set to the item index or key.\n *\n * Special properties are exposed on the local scope of each template instance, including:\n *\n * | Variable  | Type            | Details                                                                     |\n * |-----------|-----------------|-----------------------------------------------------------------------------|\n * | `$index`  | {@type number}  | iterator offset of the repeated element (0..length-1)                       |\n * | `$first`  | {@type boolean} | true if the repeated element is first in the iterator.                      |\n * | `$middle` | {@type boolean} | true if the repeated element is between the first and last in the iterator. |\n * | `$last`   | {@type boolean} | true if the repeated element is last in the iterator.                       |\n * | `$even`   | {@type boolean} | true if the iterator position `$index` is even (otherwise false).           |\n * | `$odd`    | {@type boolean} | true if the iterator position `$index` is odd (otherwise false).            |\n *\n * Creating aliases for these properties is possible with {@link ng.directive:ngInit `ngInit`}.\n * This may be useful when, for instance, nesting ngRepeats.\n *\n * # Special repeat start and end points\n * To repeat a series of elements instead of just one parent element, ngRepeat (as well as other ng directives) supports extending\n * the range of the repeater by defining explicit start and end points by using **ng-repeat-start** and **ng-repeat-end** respectively.\n * The **ng-repeat-start** directive works the same as **ng-repeat**, but will repeat all the HTML code (including the tag it's defined on)\n * up to and including the ending HTML tag where **ng-repeat-end** is placed.\n *\n * The example below makes use of this feature:\n * ```html\n *   <header ng-repeat-start=\"item in items\">\n *     Header {{ item }}\n *   </header>\n *   <div class=\"body\">\n *     Body {{ item }}\n *   </div>\n *   <footer ng-repeat-end>\n *     Footer {{ item }}\n *   </footer>\n * ```\n *\n * And with an input of {@type ['A','B']} for the items variable in the example above, the output will evaluate to:\n * ```html\n *   <header>\n *     Header A\n *   </header>\n *   <div class=\"body\">\n *     Body A\n *   </div>\n *   <footer>\n *     Footer A\n *   </footer>\n *   <header>\n *     Header B\n *   </header>\n *   <div class=\"body\">\n *     Body B\n *   </div>\n *   <footer>\n *     Footer B\n *   </footer>\n * ```\n *\n * The custom start and end points for ngRepeat also support all other HTML directive syntax flavors provided in AngularJS (such\n * as **data-ng-repeat-start**, **x-ng-repeat-start** and **ng:repeat-start**).\n *\n * @animations\n * **.enter** - when a new item is added to the list or when an item is revealed after a filter\n *\n * **.leave** - when an item is removed from the list or when an item is filtered out\n *\n * **.move** - when an adjacent item is filtered out causing a reorder or when the item contents are reordered\n *\n * @element ANY\n * @scope\n * @priority 1000\n * @param {repeat_expression} ngRepeat The expression indicating how to enumerate a collection. These\n *   formats are currently supported:\n *\n *   * `variable in expression` – where variable is the user defined loop variable and `expression`\n *     is a scope expression giving the collection to enumerate.\n *\n *     For example: `album in artist.albums`.\n *\n *   * `(key, value) in expression` – where `key` and `value` can be any user defined identifiers,\n *     and `expression` is the scope expression giving the collection to enumerate.\n *\n *     For example: `(name, age) in {'adam':10, 'amalie':12}`.\n *\n *   * `variable in expression track by tracking_expression` – You can also provide an optional tracking function\n *     which can be used to associate the objects in the collection with the DOM elements. If no tracking function\n *     is specified the ng-repeat associates elements by identity in the collection. It is an error to have\n *     more than one tracking function to resolve to the same key. (This would mean that two distinct objects are\n *     mapped to the same DOM element, which is not possible.)  Filters should be applied to the expression,\n *     before specifying a tracking expression.\n *\n *     For example: `item in items` is equivalent to `item in items track by $id(item)`. This implies that the DOM elements\n *     will be associated by item identity in the array.\n *\n *     For example: `item in items track by $id(item)`. A built in `$id()` function can be used to assign a unique\n *     `$$hashKey` property to each item in the array. This property is then used as a key to associated DOM elements\n *     with the corresponding item in the array by identity. Moving the same object in array would move the DOM\n *     element in the same way in the DOM.\n *\n *     For example: `item in items track by item.id` is a typical pattern when the items come from the database. In this\n *     case the object identity does not matter. Two objects are considered equivalent as long as their `id`\n *     property is same.\n *\n *     For example: `item in items | filter:searchText track by item.id` is a pattern that might be used to apply a filter\n *     to items in conjunction with a tracking expression.\n *\n * @example\n * This example initializes the scope to a list of names and\n * then uses `ngRepeat` to display every person:\n  <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n      <div ng-init=\"friends = [\n        {name:'John', age:25, gender:'boy'},\n        {name:'Jessie', age:30, gender:'girl'},\n        {name:'Johanna', age:28, gender:'girl'},\n        {name:'Joy', age:15, gender:'girl'},\n        {name:'Mary', age:28, gender:'girl'},\n        {name:'Peter', age:95, gender:'boy'},\n        {name:'Sebastian', age:50, gender:'boy'},\n        {name:'Erika', age:27, gender:'girl'},\n        {name:'Patrick', age:40, gender:'boy'},\n        {name:'Samantha', age:60, gender:'girl'}\n      ]\">\n        I have {{friends.length}} friends. They are:\n        <input type=\"search\" ng-model=\"q\" placeholder=\"filter friends...\" />\n        <ul class=\"example-animate-container\">\n          <li class=\"animate-repeat\" ng-repeat=\"friend in friends | filter:q\">\n            [{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.\n          </li>\n        </ul>\n      </div>\n    </file>\n    <file name=\"animations.css\">\n      .example-animate-container {\n        background:white;\n        border:1px solid black;\n        list-style:none;\n        margin:0;\n        padding:0 10px;\n      }\n\n      .animate-repeat {\n        line-height:40px;\n        list-style:none;\n        box-sizing:border-box;\n      }\n\n      .animate-repeat.ng-move,\n      .animate-repeat.ng-enter,\n      .animate-repeat.ng-leave {\n        -webkit-transition:all linear 0.5s;\n        transition:all linear 0.5s;\n      }\n\n      .animate-repeat.ng-leave.ng-leave-active,\n      .animate-repeat.ng-move,\n      .animate-repeat.ng-enter {\n        opacity:0;\n        max-height:0;\n      }\n\n      .animate-repeat.ng-leave,\n      .animate-repeat.ng-move.ng-move-active,\n      .animate-repeat.ng-enter.ng-enter-active {\n        opacity:1;\n        max-height:40px;\n      }\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var friends = element.all(by.repeater('friend in friends'));\n\n      it('should render initial data set', function() {\n        expect(friends.count()).toBe(10);\n        expect(friends.get(0).getText()).toEqual('[1] John who is 25 years old.');\n        expect(friends.get(1).getText()).toEqual('[2] Jessie who is 30 years old.');\n        expect(friends.last().getText()).toEqual('[10] Samantha who is 60 years old.');\n        expect(element(by.binding('friends.length')).getText())\n            .toMatch(\"I have 10 friends. They are:\");\n      });\n\n       it('should update repeater when filter predicate changes', function() {\n         expect(friends.count()).toBe(10);\n\n         element(by.model('q')).sendKeys('ma');\n\n         expect(friends.count()).toBe(2);\n         expect(friends.get(0).getText()).toEqual('[1] Mary who is 28 years old.');\n         expect(friends.last().getText()).toEqual('[2] Samantha who is 60 years old.');\n       });\n      </file>\n    </example>\n */\nvar ngRepeatDirective = ['$parse', '$animate', function($parse, $animate) {\n  var NG_REMOVED = '$$NG_REMOVED';\n  var ngRepeatMinErr = minErr('ngRepeat');\n  return {\n    transclude: 'element',\n    priority: 1000,\n    terminal: true,\n    $$tlb: true,\n    link: function($scope, $element, $attr, ctrl, $transclude){\n        var expression = $attr.ngRepeat;\n        var match = expression.match(/^\\s*([\\s\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/),\n          trackByExp, trackByExpGetter, trackByIdExpFn, trackByIdArrayFn, trackByIdObjFn,\n          lhs, rhs, valueIdentifier, keyIdentifier,\n          hashFnLocals = {$id: hashKey};\n\n        if (!match) {\n          throw ngRepeatMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n            expression);\n        }\n\n        lhs = match[1];\n        rhs = match[2];\n        trackByExp = match[3];\n\n        if (trackByExp) {\n          trackByExpGetter = $parse(trackByExp);\n          trackByIdExpFn = function(key, value, index) {\n            // assign key, value, and $index to the locals so that they can be used in hash functions\n            if (keyIdentifier) hashFnLocals[keyIdentifier] = key;\n            hashFnLocals[valueIdentifier] = value;\n            hashFnLocals.$index = index;\n            return trackByExpGetter($scope, hashFnLocals);\n          };\n        } else {\n          trackByIdArrayFn = function(key, value) {\n            return hashKey(value);\n          };\n          trackByIdObjFn = function(key) {\n            return key;\n          };\n        }\n\n        match = lhs.match(/^(?:([\\$\\w]+)|\\(([\\$\\w]+)\\s*,\\s*([\\$\\w]+)\\))$/);\n        if (!match) {\n          throw ngRepeatMinErr('iidexp', \"'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.\",\n                                                                    lhs);\n        }\n        valueIdentifier = match[3] || match[1];\n        keyIdentifier = match[2];\n\n        // Store a list of elements from previous run. This is a hash where key is the item from the\n        // iterator, and the value is objects with following properties.\n        //   - scope: bound scope\n        //   - element: previous element.\n        //   - index: position\n        var lastBlockMap = {};\n\n        //watch props\n        $scope.$watchCollection(rhs, function ngRepeatAction(collection){\n          var index, length,\n              previousNode = $element[0],     // current position of the node\n              nextNode,\n              // Same as lastBlockMap but it has the current state. It will become the\n              // lastBlockMap on the next iteration.\n              nextBlockMap = {},\n              arrayLength,\n              childScope,\n              key, value, // key/value of iteration\n              trackById,\n              trackByIdFn,\n              collectionKeys,\n              block,       // last object information {scope, element, id}\n              nextBlockOrder = [],\n              elementsToRemove;\n\n\n          if (isArrayLike(collection)) {\n            collectionKeys = collection;\n            trackByIdFn = trackByIdExpFn || trackByIdArrayFn;\n          } else {\n            trackByIdFn = trackByIdExpFn || trackByIdObjFn;\n            // if object, extract keys, sort them and use to determine order of iteration over obj props\n            collectionKeys = [];\n            for (key in collection) {\n              if (collection.hasOwnProperty(key) && key.charAt(0) != '$') {\n                collectionKeys.push(key);\n              }\n            }\n            collectionKeys.sort();\n          }\n\n          arrayLength = collectionKeys.length;\n\n          // locate existing items\n          length = nextBlockOrder.length = collectionKeys.length;\n          for(index = 0; index < length; index++) {\n           key = (collection === collectionKeys) ? index : collectionKeys[index];\n           value = collection[key];\n           trackById = trackByIdFn(key, value, index);\n           assertNotHasOwnProperty(trackById, '`track by` id');\n           if(lastBlockMap.hasOwnProperty(trackById)) {\n             block = lastBlockMap[trackById];\n             delete lastBlockMap[trackById];\n             nextBlockMap[trackById] = block;\n             nextBlockOrder[index] = block;\n           } else if (nextBlockMap.hasOwnProperty(trackById)) {\n             // restore lastBlockMap\n             forEach(nextBlockOrder, function(block) {\n               if (block && block.scope) lastBlockMap[block.id] = block;\n             });\n             // This is a duplicate and we need to throw an error\n             throw ngRepeatMinErr('dupes', \"Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}\",\n                                                                                                                                                    expression,       trackById);\n           } else {\n             // new never before seen block\n             nextBlockOrder[index] = { id: trackById };\n             nextBlockMap[trackById] = false;\n           }\n         }\n\n          // remove existing items\n          for (key in lastBlockMap) {\n            // lastBlockMap is our own object so we don't need to use special hasOwnPropertyFn\n            if (lastBlockMap.hasOwnProperty(key)) {\n              block = lastBlockMap[key];\n              elementsToRemove = getBlockElements(block.clone);\n              $animate.leave(elementsToRemove);\n              forEach(elementsToRemove, function(element) { element[NG_REMOVED] = true; });\n              block.scope.$destroy();\n            }\n          }\n\n          // we are not using forEach for perf reasons (trying to avoid #call)\n          for (index = 0, length = collectionKeys.length; index < length; index++) {\n            key = (collection === collectionKeys) ? index : collectionKeys[index];\n            value = collection[key];\n            block = nextBlockOrder[index];\n            if (nextBlockOrder[index - 1]) previousNode = getBlockEnd(nextBlockOrder[index - 1]);\n\n            if (block.scope) {\n              // if we have already seen this object, then we need to reuse the\n              // associated scope/element\n              childScope = block.scope;\n\n              nextNode = previousNode;\n              do {\n                nextNode = nextNode.nextSibling;\n              } while(nextNode && nextNode[NG_REMOVED]);\n\n              if (getBlockStart(block) != nextNode) {\n                // existing item which got moved\n                $animate.move(getBlockElements(block.clone), null, jqLite(previousNode));\n              }\n              previousNode = getBlockEnd(block);\n            } else {\n              // new item which we don't know about\n              childScope = $scope.$new();\n            }\n\n            childScope[valueIdentifier] = value;\n            if (keyIdentifier) childScope[keyIdentifier] = key;\n            childScope.$index = index;\n            childScope.$first = (index === 0);\n            childScope.$last = (index === (arrayLength - 1));\n            childScope.$middle = !(childScope.$first || childScope.$last);\n            // jshint bitwise: false\n            childScope.$odd = !(childScope.$even = (index&1) === 0);\n            // jshint bitwise: true\n\n            if (!block.scope) {\n              $transclude(childScope, function(clone) {\n                clone[clone.length++] = document.createComment(' end ngRepeat: ' + expression + ' ');\n                $animate.enter(clone, null, jqLite(previousNode));\n                previousNode = clone;\n                block.scope = childScope;\n                // Note: We only need the first/last node of the cloned nodes.\n                // However, we need to keep the reference to the jqlite wrapper as it might be changed later\n                // by a directive with templateUrl when its template arrives.\n                block.clone = clone;\n                nextBlockMap[block.id] = block;\n              });\n            }\n          }\n          lastBlockMap = nextBlockMap;\n        });\n    }\n  };\n\n  function getBlockStart(block) {\n    return block.clone[0];\n  }\n\n  function getBlockEnd(block) {\n    return block.clone[block.clone.length - 1];\n  }\n}];\n\n/**\n * @ngdoc directive\n * @name ngShow\n *\n * @description\n * The `ngShow` directive shows or hides the given HTML element based on the expression\n * provided to the ngShow attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * <!-- when $scope.myValue is truthy (element is visible) -->\n * <div ng-show=\"myValue\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is hidden) -->\n * <div ng-show=\"myValue\" class=\"ng-hide\"></div>\n * ```\n *\n * When the ngShow expression evaluates to false then the ng-hide CSS class is added to the class attribute\n * on the element causing it to become hidden. When true, the ng-hide CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Here is a list of values that ngShow will consider as a falsy value (case insensitive):<br />\n * \"f\" / \"0\" / \"false\" / \"no\" / \"n\" / \"[]\"\n * </div>\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the .ng-hide CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding .ng-hide\n *\n * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n *   //this is just another form of hiding an element\n *   display:block!important;\n *   position:absolute;\n *   top:-9999px;\n *   left:-9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with ngShow\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass except that\n * you must also include the !important flag to override the display property\n * so that you can perform an animation when the element is hidden during the time of the animation.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n *   transition:0.5s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.2.17 (and 1.3.0-beta.11), there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * addClass: .ng-hide - happens after the ngShow expression evaluates to a truthy value and the just before contents are set to visible\n * removeClass: .ng-hide - happens after the ngShow expression evaluates to a non truthy value and just before the contents are set to hidden\n *\n * @element ANY\n * @param {expression} ngShow If the {@link guide/expression expression} is truthy\n *     then the element is shown or hidden respectively.\n *\n * @example\n  <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n      Click me: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n      <div>\n        Show:\n        <div class=\"check-element animate-show\" ng-show=\"checked\">\n          <span class=\"glyphicon glyphicon-thumbs-up\"></span> I show up when your checkbox is checked.\n        </div>\n      </div>\n      <div>\n        Hide:\n        <div class=\"check-element animate-show\" ng-hide=\"checked\">\n          <span class=\"glyphicon glyphicon-thumbs-down\"></span> I hide when your checkbox is checked.\n        </div>\n      </div>\n    </file>\n    <file name=\"glyphicons.css\">\n      @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);\n    </file>\n    <file name=\"animations.css\">\n      .animate-show {\n        -webkit-transition:all linear 0.5s;\n        transition:all linear 0.5s;\n        line-height:20px;\n        opacity:1;\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n\n      .animate-show.ng-hide {\n        line-height:0;\n        opacity:0;\n        padding:0 10px;\n      }\n\n      .check-element {\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n      var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n      it('should check ng-show / ng-hide', function() {\n        expect(thumbsUp.isDisplayed()).toBeFalsy();\n        expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n        element(by.model('checked')).click();\n\n        expect(thumbsUp.isDisplayed()).toBeTruthy();\n        expect(thumbsDown.isDisplayed()).toBeFalsy();\n      });\n    </file>\n  </example>\n */\nvar ngShowDirective = ['$animate', function($animate) {\n  return function(scope, element, attr) {\n    scope.$watch(attr.ngShow, function ngShowWatchAction(value){\n      $animate[toBoolean(value) ? 'removeClass' : 'addClass'](element, 'ng-hide');\n    });\n  };\n}];\n\n\n/**\n * @ngdoc directive\n * @name ngHide\n *\n * @description\n * The `ngHide` directive shows or hides the given HTML element based on the expression\n * provided to the ngHide attribute. The element is shown or hidden by removing or adding\n * the `ng-hide` CSS class onto the element. The `.ng-hide` CSS class is predefined\n * in AngularJS and sets the display style to none (using an !important flag).\n * For CSP mode please add `angular-csp.css` to your html file (see {@link ng.directive:ngCsp ngCsp}).\n *\n * ```html\n * <!-- when $scope.myValue is truthy (element is hidden) -->\n * <div ng-hide=\"myValue\" class=\"ng-hide\"></div>\n *\n * <!-- when $scope.myValue is falsy (element is visible) -->\n * <div ng-hide=\"myValue\"></div>\n * ```\n *\n * When the ngHide expression evaluates to true then the .ng-hide CSS class is added to the class attribute\n * on the element causing it to become hidden. When false, the ng-hide CSS class is removed\n * from the element causing the element not to appear hidden.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** Here is a list of values that ngHide will consider as a falsy value (case insensitive):<br />\n * \"f\" / \"0\" / \"false\" / \"no\" / \"n\" / \"[]\"\n * </div>\n *\n * ## Why is !important used?\n *\n * You may be wondering why !important is used for the .ng-hide CSS class. This is because the `.ng-hide` selector\n * can be easily overridden by heavier selectors. For example, something as simple\n * as changing the display style on a HTML list item would make hidden elements appear visible.\n * This also becomes a bigger issue when dealing with CSS frameworks.\n *\n * By using !important, the show and hide behavior will work as expected despite any clash between CSS selector\n * specificity (when !important isn't used with any conflicting styles). If a developer chooses to override the\n * styling to change how to hide an element then it is just a matter of using !important in their own CSS code.\n *\n * ### Overriding .ng-hide\n *\n * By default, the `.ng-hide` class will style the element with `display:none!important`. If you wish to change\n * the hide behavior with ngShow/ngHide then this can be achieved by restating the styles for the `.ng-hide`\n * class in CSS:\n *\n * ```css\n * .ng-hide {\n *   //this is just another form of hiding an element\n *   display:block!important;\n *   position:absolute;\n *   top:-9999px;\n *   left:-9999px;\n * }\n * ```\n *\n * By default you don't need to override in CSS anything and the animations will work around the display style.\n *\n * ## A note about animations with ngHide\n *\n * Animations in ngShow/ngHide work with the show and hide events that are triggered when the directive expression\n * is true and false. This system works like the animation system present with ngClass, except that the `.ng-hide`\n * CSS class is added and removed for you instead of your own CSS class.\n *\n * ```css\n * //\n * //a working example can be found at the bottom of this page\n * //\n * .my-element.ng-hide-add, .my-element.ng-hide-remove {\n *   transition:0.5s linear all;\n * }\n *\n * .my-element.ng-hide-add { ... }\n * .my-element.ng-hide-add.ng-hide-add-active { ... }\n * .my-element.ng-hide-remove { ... }\n * .my-element.ng-hide-remove.ng-hide-remove-active { ... }\n * ```\n *\n * Keep in mind that, as of AngularJS version 1.2.17 (and 1.3.0-beta.11), there is no need to change the display\n * property to block during animation states--ngAnimate will handle the style toggling automatically for you.\n *\n * @animations\n * removeClass: .ng-hide - happens after the ngHide expression evaluates to a truthy value and just before the contents are set to hidden\n * addClass: .ng-hide - happens after the ngHide expression evaluates to a non truthy value and just before the contents are set to visible\n *\n * @element ANY\n * @param {expression} ngHide If the {@link guide/expression expression} is truthy then\n *     the element is shown or hidden respectively.\n *\n * @example\n  <example module=\"ngAnimate\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n      Click me: <input type=\"checkbox\" ng-model=\"checked\"><br/>\n      <div>\n        Show:\n        <div class=\"check-element animate-hide\" ng-show=\"checked\">\n          <span class=\"glyphicon glyphicon-thumbs-up\"></span> I show up when your checkbox is checked.\n        </div>\n      </div>\n      <div>\n        Hide:\n        <div class=\"check-element animate-hide\" ng-hide=\"checked\">\n          <span class=\"glyphicon glyphicon-thumbs-down\"></span> I hide when your checkbox is checked.\n        </div>\n      </div>\n    </file>\n    <file name=\"glyphicons.css\">\n      @import url(//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css);\n    </file>\n    <file name=\"animations.css\">\n      .animate-hide {\n        -webkit-transition:all linear 0.5s;\n        transition:all linear 0.5s;\n        line-height:20px;\n        opacity:1;\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n\n      .animate-hide.ng-hide {\n        line-height:0;\n        opacity:0;\n        padding:0 10px;\n      }\n\n      .check-element {\n        padding:10px;\n        border:1px solid black;\n        background:white;\n      }\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var thumbsUp = element(by.css('span.glyphicon-thumbs-up'));\n      var thumbsDown = element(by.css('span.glyphicon-thumbs-down'));\n\n      it('should check ng-show / ng-hide', function() {\n        expect(thumbsUp.isDisplayed()).toBeFalsy();\n        expect(thumbsDown.isDisplayed()).toBeTruthy();\n\n        element(by.model('checked')).click();\n\n        expect(thumbsUp.isDisplayed()).toBeTruthy();\n        expect(thumbsDown.isDisplayed()).toBeFalsy();\n      });\n    </file>\n  </example>\n */\nvar ngHideDirective = ['$animate', function($animate) {\n  return function(scope, element, attr) {\n    scope.$watch(attr.ngHide, function ngHideWatchAction(value){\n      $animate[toBoolean(value) ? 'addClass' : 'removeClass'](element, 'ng-hide');\n    });\n  };\n}];\n\n/**\n * @ngdoc directive\n * @name ngStyle\n * @restrict AC\n *\n * @description\n * The `ngStyle` directive allows you to set CSS style on an HTML element conditionally.\n *\n * @element ANY\n * @param {expression} ngStyle\n *\n * {@link guide/expression Expression} which evals to an\n * object whose keys are CSS style names and values are corresponding values for those CSS\n * keys.\n *\n * Since some CSS style names are not valid keys for an object, they must be quoted.\n * See the 'background-color' style in the example below.\n *\n * @example\n   <example>\n     <file name=\"index.html\">\n        <input type=\"button\" value=\"set color\" ng-click=\"myStyle={color:'red'}\">\n        <input type=\"button\" value=\"set background\" ng-click=\"myStyle={'background-color':'blue'}\">\n        <input type=\"button\" value=\"clear\" ng-click=\"myStyle={}\">\n        <br/>\n        <span ng-style=\"myStyle\">Sample Text</span>\n        <pre>myStyle={{myStyle}}</pre>\n     </file>\n     <file name=\"style.css\">\n       span {\n         color: black;\n       }\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n       var colorSpan = element(by.css('span'));\n\n       it('should check ng-style', function() {\n         expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n         element(by.css('input[value=\\'set color\\']')).click();\n         expect(colorSpan.getCssValue('color')).toBe('rgba(255, 0, 0, 1)');\n         element(by.css('input[value=clear]')).click();\n         expect(colorSpan.getCssValue('color')).toBe('rgba(0, 0, 0, 1)');\n       });\n     </file>\n   </example>\n */\nvar ngStyleDirective = ngDirective(function(scope, element, attr) {\n  scope.$watch(attr.ngStyle, function ngStyleWatchAction(newStyles, oldStyles) {\n    if (oldStyles && (newStyles !== oldStyles)) {\n      forEach(oldStyles, function(val, style) { element.css(style, '');});\n    }\n    if (newStyles) element.css(newStyles);\n  }, true);\n});\n\n/**\n * @ngdoc directive\n * @name ngSwitch\n * @restrict EA\n *\n * @description\n * The `ngSwitch` directive is used to conditionally swap DOM structure on your template based on a scope expression.\n * Elements within `ngSwitch` but without `ngSwitchWhen` or `ngSwitchDefault` directives will be preserved at the location\n * as specified in the template.\n *\n * The directive itself works similar to ngInclude, however, instead of downloading template code (or loading it\n * from the template cache), `ngSwitch` simply chooses one of the nested elements and makes it visible based on which element\n * matches the value obtained from the evaluated expression. In other words, you define a container element\n * (where you place the directive), place an expression on the **`on=\"...\"` attribute**\n * (or the **`ng-switch=\"...\"` attribute**), define any inner elements inside of the directive and place\n * a when attribute per element. The when attribute is used to inform ngSwitch which element to display when the on\n * expression is evaluated. If a matching expression is not found via a when attribute then an element with the default\n * attribute is displayed.\n *\n * <div class=\"alert alert-info\">\n * Be aware that the attribute values to match against cannot be expressions. They are interpreted\n * as literal string values to match against.\n * For example, **`ng-switch-when=\"someVal\"`** will match against the string `\"someVal\"` not against the\n * value of the expression `$scope.someVal`.\n * </div>\n\n * @animations\n * enter - happens after the ngSwitch contents change and the matched child element is placed inside the container\n * leave - happens just after the ngSwitch contents change and just before the former contents are removed from the DOM\n *\n * @usage\n *\n * ```\n * <ANY ng-switch=\"expression\">\n *   <ANY ng-switch-when=\"matchValue1\">...</ANY>\n *   <ANY ng-switch-when=\"matchValue2\">...</ANY>\n *   <ANY ng-switch-default>...</ANY>\n * </ANY>\n * ```\n *\n *\n * @scope\n * @priority 800\n * @param {*} ngSwitch|on expression to match against <tt>ng-switch-when</tt>.\n * On child elements add:\n *\n * * `ngSwitchWhen`: the case statement to match against. If match then this\n *   case will be displayed. If the same match appears multiple times, all the\n *   elements will be displayed.\n * * `ngSwitchDefault`: the default case when no other case match. If there\n *   are multiple default cases, all of them will be displayed when no other\n *   case match.\n *\n *\n * @example\n  <example module=\"switchExample\" deps=\"angular-animate.js\" animations=\"true\">\n    <file name=\"index.html\">\n      <div ng-controller=\"ExampleController\">\n        <select ng-model=\"selection\" ng-options=\"item for item in items\">\n        </select>\n        <tt>selection={{selection}}</tt>\n        <hr/>\n        <div class=\"animate-switch-container\"\n          ng-switch on=\"selection\">\n            <div class=\"animate-switch\" ng-switch-when=\"settings\">Settings Div</div>\n            <div class=\"animate-switch\" ng-switch-when=\"home\">Home Span</div>\n            <div class=\"animate-switch\" ng-switch-default>default</div>\n        </div>\n      </div>\n    </file>\n    <file name=\"script.js\">\n      angular.module('switchExample', ['ngAnimate'])\n        .controller('ExampleController', ['$scope', function($scope) {\n          $scope.items = ['settings', 'home', 'other'];\n          $scope.selection = $scope.items[0];\n        }]);\n    </file>\n    <file name=\"animations.css\">\n      .animate-switch-container {\n        position:relative;\n        background:white;\n        border:1px solid black;\n        height:40px;\n        overflow:hidden;\n      }\n\n      .animate-switch {\n        padding:10px;\n      }\n\n      .animate-switch.ng-animate {\n        -webkit-transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n        transition:all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\n\n        position:absolute;\n        top:0;\n        left:0;\n        right:0;\n        bottom:0;\n      }\n\n      .animate-switch.ng-leave.ng-leave-active,\n      .animate-switch.ng-enter {\n        top:-50px;\n      }\n      .animate-switch.ng-leave,\n      .animate-switch.ng-enter.ng-enter-active {\n        top:0;\n      }\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      var switchElem = element(by.css('[ng-switch]'));\n      var select = element(by.model('selection'));\n\n      it('should start in settings', function() {\n        expect(switchElem.getText()).toMatch(/Settings Div/);\n      });\n      it('should change to home', function() {\n        select.all(by.css('option')).get(1).click();\n        expect(switchElem.getText()).toMatch(/Home Span/);\n      });\n      it('should select default', function() {\n        select.all(by.css('option')).get(2).click();\n        expect(switchElem.getText()).toMatch(/default/);\n      });\n    </file>\n  </example>\n */\nvar ngSwitchDirective = ['$animate', function($animate) {\n  return {\n    restrict: 'EA',\n    require: 'ngSwitch',\n\n    // asks for $scope to fool the BC controller module\n    controller: ['$scope', function ngSwitchController() {\n     this.cases = {};\n    }],\n    link: function(scope, element, attr, ngSwitchController) {\n      var watchExpr = attr.ngSwitch || attr.on,\n          selectedTranscludes = [],\n          selectedElements = [],\n          previousElements = [],\n          selectedScopes = [];\n\n      scope.$watch(watchExpr, function ngSwitchWatchAction(value) {\n        var i, ii;\n        for (i = 0, ii = previousElements.length; i < ii; ++i) {\n          previousElements[i].remove();\n        }\n        previousElements.length = 0;\n\n        for (i = 0, ii = selectedScopes.length; i < ii; ++i) {\n          var selected = selectedElements[i];\n          selectedScopes[i].$destroy();\n          previousElements[i] = selected;\n          $animate.leave(selected, function() {\n            previousElements.splice(i, 1);\n          });\n        }\n\n        selectedElements.length = 0;\n        selectedScopes.length = 0;\n\n        if ((selectedTranscludes = ngSwitchController.cases['!' + value] || ngSwitchController.cases['?'])) {\n          scope.$eval(attr.change);\n          forEach(selectedTranscludes, function(selectedTransclude) {\n            var selectedScope = scope.$new();\n            selectedScopes.push(selectedScope);\n            selectedTransclude.transclude(selectedScope, function(caseElement) {\n              var anchor = selectedTransclude.element;\n\n              selectedElements.push(caseElement);\n              $animate.enter(caseElement, anchor.parent(), anchor);\n            });\n          });\n        }\n      });\n    }\n  };\n}];\n\nvar ngSwitchWhenDirective = ngDirective({\n  transclude: 'element',\n  priority: 800,\n  require: '^ngSwitch',\n  link: function(scope, element, attrs, ctrl, $transclude) {\n    ctrl.cases['!' + attrs.ngSwitchWhen] = (ctrl.cases['!' + attrs.ngSwitchWhen] || []);\n    ctrl.cases['!' + attrs.ngSwitchWhen].push({ transclude: $transclude, element: element });\n  }\n});\n\nvar ngSwitchDefaultDirective = ngDirective({\n  transclude: 'element',\n  priority: 800,\n  require: '^ngSwitch',\n  link: function(scope, element, attr, ctrl, $transclude) {\n    ctrl.cases['?'] = (ctrl.cases['?'] || []);\n    ctrl.cases['?'].push({ transclude: $transclude, element: element });\n   }\n});\n\n/**\n * @ngdoc directive\n * @name ngTransclude\n * @restrict AC\n *\n * @description\n * Directive that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.\n *\n * Any existing content of the element that this directive is placed on will be removed before the transcluded content is inserted.\n *\n * @element ANY\n *\n * @example\n   <example module=\"transcludeExample\">\n     <file name=\"index.html\">\n       <script>\n         angular.module('transcludeExample', [])\n          .directive('pane', function(){\n             return {\n               restrict: 'E',\n               transclude: true,\n               scope: { title:'@' },\n               template: '<div style=\"border: 1px solid black;\">' +\n                           '<div style=\"background-color: gray\">{{title}}</div>' +\n                           '<div ng-transclude></div>' +\n                         '</div>'\n             };\n         })\n         .controller('ExampleController', ['$scope', function($scope) {\n           $scope.title = 'Lorem Ipsum';\n           $scope.text = 'Neque porro quisquam est qui dolorem ipsum quia dolor...';\n         }]);\n       </script>\n       <div ng-controller=\"ExampleController\">\n         <input ng-model=\"title\"><br>\n         <textarea ng-model=\"text\"></textarea> <br/>\n         <pane title=\"{{title}}\">{{text}}</pane>\n       </div>\n     </file>\n     <file name=\"protractor.js\" type=\"protractor\">\n        it('should have transcluded', function() {\n          var titleElement = element(by.model('title'));\n          titleElement.clear();\n          titleElement.sendKeys('TITLE');\n          var textElement = element(by.model('text'));\n          textElement.clear();\n          textElement.sendKeys('TEXT');\n          expect(element(by.binding('title')).getText()).toEqual('TITLE');\n          expect(element(by.binding('text')).getText()).toEqual('TEXT');\n        });\n     </file>\n   </example>\n *\n */\nvar ngTranscludeDirective = ngDirective({\n  link: function($scope, $element, $attrs, controller, $transclude) {\n    if (!$transclude) {\n      throw minErr('ngTransclude')('orphan',\n       'Illegal use of ngTransclude directive in the template! ' +\n       'No parent directive that requires a transclusion found. ' +\n       'Element: {0}',\n       startingTag($element));\n    }\n\n    $transclude(function(clone) {\n      $element.empty();\n      $element.append(clone);\n    });\n  }\n});\n\n/**\n * @ngdoc directive\n * @name script\n * @restrict E\n *\n * @description\n * Load the content of a `<script>` element into {@link ng.$templateCache `$templateCache`}, so that the\n * template can be used by {@link ng.directive:ngInclude `ngInclude`},\n * {@link ngRoute.directive:ngView `ngView`}, or {@link guide/directive directives}. The type of the\n * `<script>` element must be specified as `text/ng-template`, and a cache name for the template must be\n * assigned through the element's `id`, which can then be used as a directive's `templateUrl`.\n *\n * @param {string} type Must be set to `'text/ng-template'`.\n * @param {string} id Cache name of the template.\n *\n * @example\n  <example>\n    <file name=\"index.html\">\n      <script type=\"text/ng-template\" id=\"/tpl.html\">\n        Content of the template.\n      </script>\n\n      <a ng-click=\"currentTpl='/tpl.html'\" id=\"tpl-link\">Load inlined template</a>\n      <div id=\"tpl-content\" ng-include src=\"currentTpl\"></div>\n    </file>\n    <file name=\"protractor.js\" type=\"protractor\">\n      it('should load template defined inside script tag', function() {\n        element(by.css('#tpl-link')).click();\n        expect(element(by.css('#tpl-content')).getText()).toMatch(/Content of the template/);\n      });\n    </file>\n  </example>\n */\nvar scriptDirective = ['$templateCache', function($templateCache) {\n  return {\n    restrict: 'E',\n    terminal: true,\n    compile: function(element, attr) {\n      if (attr.type == 'text/ng-template') {\n        var templateUrl = attr.id,\n            // IE is not consistent, in scripts we have to read .text but in other nodes we have to read .textContent\n            text = element[0].text;\n\n        $templateCache.put(templateUrl, text);\n      }\n    }\n  };\n}];\n\nvar ngOptionsMinErr = minErr('ngOptions');\n/**\n * @ngdoc directive\n * @name select\n * @restrict E\n *\n * @description\n * HTML `SELECT` element with angular data-binding.\n *\n * # `ngOptions`\n *\n * The `ngOptions` attribute can be used to dynamically generate a list of `<option>`\n * elements for the `<select>` element using the array or object obtained by evaluating the\n * `ngOptions` comprehension_expression.\n *\n * When an item in the `<select>` menu is selected, the array element or object property\n * represented by the selected option will be bound to the model identified by the `ngModel`\n * directive.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `ngModel` compares by reference, not value. This is important when binding to an\n * array of objects. See an example [in this jsfiddle](http://jsfiddle.net/qWzTb/).\n * </div>\n *\n * Optionally, a single hard-coded `<option>` element, with the value set to an empty string, can\n * be nested into the `<select>` element. This element will then represent the `null` or \"not selected\"\n * option. See example below for demonstration.\n *\n * <div class=\"alert alert-warning\">\n * **Note:** `ngOptions` provides an iterator facility for the `<option>` element which should be used instead\n * of {@link ng.directive:ngRepeat ngRepeat} when you want the\n * `select` model to be bound to a non-string value. This is because an option element can only\n * be bound to string values at present.\n * </div>\n *\n * @param {string} ngModel Assignable angular expression to data-bind to.\n * @param {string=} name Property name of the form under which the control is published.\n * @param {string=} required The control is considered valid only if value is entered.\n * @param {string=} ngRequired Adds `required` attribute and `required` validation constraint to\n *    the element when the ngRequired expression evaluates to true. Use `ngRequired` instead of\n *    `required` when you want to data-bind to the `required` attribute.\n * @param {comprehension_expression=} ngOptions in one of the following forms:\n *\n *   * for array data sources:\n *     * `label` **`for`** `value` **`in`** `array`\n *     * `select` **`as`** `label` **`for`** `value` **`in`** `array`\n *     * `label`  **`group by`** `group` **`for`** `value` **`in`** `array`\n *     * `select` **`as`** `label` **`group by`** `group` **`for`** `value` **`in`** `array` **`track by`** `trackexpr`\n *   * for object data sources:\n *     * `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n *     * `select` **`as`** `label` **`for (`**`key` **`,`** `value`**`) in`** `object`\n *     * `label` **`group by`** `group` **`for (`**`key`**`,`** `value`**`) in`** `object`\n *     * `select` **`as`** `label` **`group by`** `group`\n *         **`for` `(`**`key`**`,`** `value`**`) in`** `object`\n *\n * Where:\n *\n *   * `array` / `object`: an expression which evaluates to an array / object to iterate over.\n *   * `value`: local variable which will refer to each item in the `array` or each property value\n *      of `object` during iteration.\n *   * `key`: local variable which will refer to a property name in `object` during iteration.\n *   * `label`: The result of this expression will be the label for `<option>` element. The\n *     `expression` will most likely refer to the `value` variable (e.g. `value.propertyName`).\n *   * `select`: The result of this expression will be bound to the model of the parent `<select>`\n *      element. If not specified, `select` expression will default to `value`.\n *   * `group`: The result of this expression will be used to group options using the `<optgroup>`\n *      DOM element.\n *   * `trackexpr`: Used when working with an array of objects. The result of this expression will be\n *      used to identify the objects in the array. The `trackexpr` will most likely refer to the\n *     `value` variable (e.g. `value.propertyName`).\n *\n * @example\n    <example module=\"selectExample\">\n      <file name=\"index.html\">\n        <script>\n        angular.module('selectExample', [])\n          .controller('ExampleController', ['$scope', function($scope) {\n            $scope.colors = [\n              {name:'black', shade:'dark'},\n              {name:'white', shade:'light'},\n              {name:'red', shade:'dark'},\n              {name:'blue', shade:'dark'},\n              {name:'yellow', shade:'light'}\n            ];\n            $scope.myColor = $scope.colors[2]; // red\n          }]);\n        </script>\n        <div ng-controller=\"ExampleController\">\n          <ul>\n            <li ng-repeat=\"color in colors\">\n              Name: <input ng-model=\"color.name\">\n              [<a href ng-click=\"colors.splice($index, 1)\">X</a>]\n            </li>\n            <li>\n              [<a href ng-click=\"colors.push({})\">add</a>]\n            </li>\n          </ul>\n          <hr/>\n          Color (null not allowed):\n          <select ng-model=\"myColor\" ng-options=\"color.name for color in colors\"></select><br>\n\n          Color (null allowed):\n          <span  class=\"nullable\">\n            <select ng-model=\"myColor\" ng-options=\"color.name for color in colors\">\n              <option value=\"\">-- choose color --</option>\n            </select>\n          </span><br/>\n\n          Color grouped by shade:\n          <select ng-model=\"myColor\" ng-options=\"color.name group by color.shade for color in colors\">\n          </select><br/>\n\n\n          Select <a href ng-click=\"myColor = { name:'not in list', shade: 'other' }\">bogus</a>.<br>\n          <hr/>\n          Currently selected: {{ {selected_color:myColor}  }}\n          <div style=\"border:solid 1px black; height:20px\"\n               ng-style=\"{'background-color':myColor.name}\">\n          </div>\n        </div>\n      </file>\n      <file name=\"protractor.js\" type=\"protractor\">\n         it('should check ng-options', function() {\n           expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('red');\n           element.all(by.model('myColor')).first().click();\n           element.all(by.css('select[ng-model=\"myColor\"] option')).first().click();\n           expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('black');\n           element(by.css('.nullable select[ng-model=\"myColor\"]')).click();\n           element.all(by.css('.nullable select[ng-model=\"myColor\"] option')).first().click();\n           expect(element(by.binding('{selected_color:myColor}')).getText()).toMatch('null');\n         });\n      </file>\n    </example>\n */\n\nvar ngOptionsDirective = valueFn({ terminal: true });\n// jshint maxlen: false\nvar selectDirective = ['$compile', '$parse', function($compile,   $parse) {\n                         //000011111111110000000000022222222220000000000000000000003333333333000000000000004444444444444440000000005555555555555550000000666666666666666000000000000000777777777700000000000000000008888888888\n  var NG_OPTIONS_REGEXP = /^\\s*([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?(?:\\s+group\\s+by\\s+([\\s\\S]+?))?\\s+for\\s+(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?$/,\n      nullModelCtrl = {$setViewValue: noop};\n// jshint maxlen: 100\n\n  return {\n    restrict: 'E',\n    require: ['select', '?ngModel'],\n    controller: ['$element', '$scope', '$attrs', function($element, $scope, $attrs) {\n      var self = this,\n          optionsMap = {},\n          ngModelCtrl = nullModelCtrl,\n          nullOption,\n          unknownOption;\n\n\n      self.databound = $attrs.ngModel;\n\n\n      self.init = function(ngModelCtrl_, nullOption_, unknownOption_) {\n        ngModelCtrl = ngModelCtrl_;\n        nullOption = nullOption_;\n        unknownOption = unknownOption_;\n      };\n\n\n      self.addOption = function(value) {\n        assertNotHasOwnProperty(value, '\"option value\"');\n        optionsMap[value] = true;\n\n        if (ngModelCtrl.$viewValue == value) {\n          $element.val(value);\n          if (unknownOption.parent()) unknownOption.remove();\n        }\n      };\n\n\n      self.removeOption = function(value) {\n        if (this.hasOption(value)) {\n          delete optionsMap[value];\n          if (ngModelCtrl.$viewValue == value) {\n            this.renderUnknownOption(value);\n          }\n        }\n      };\n\n\n      self.renderUnknownOption = function(val) {\n        var unknownVal = '? ' + hashKey(val) + ' ?';\n        unknownOption.val(unknownVal);\n        $element.prepend(unknownOption);\n        $element.val(unknownVal);\n        unknownOption.prop('selected', true); // needed for IE\n      };\n\n\n      self.hasOption = function(value) {\n        return optionsMap.hasOwnProperty(value);\n      };\n\n      $scope.$on('$destroy', function() {\n        // disable unknown option so that we don't do work when the whole select is being destroyed\n        self.renderUnknownOption = noop;\n      });\n    }],\n\n    link: function(scope, element, attr, ctrls) {\n      // if ngModel is not defined, we don't need to do anything\n      if (!ctrls[1]) return;\n\n      var selectCtrl = ctrls[0],\n          ngModelCtrl = ctrls[1],\n          multiple = attr.multiple,\n          optionsExp = attr.ngOptions,\n          nullOption = false, // if false, user will not be able to select it (used by ngOptions)\n          emptyOption,\n          // we can't just jqLite('<option>') since jqLite is not smart enough\n          // to create it in <select> and IE barfs otherwise.\n          optionTemplate = jqLite(document.createElement('option')),\n          optGroupTemplate =jqLite(document.createElement('optgroup')),\n          unknownOption = optionTemplate.clone();\n\n      // find \"null\" option\n      for(var i = 0, children = element.children(), ii = children.length; i < ii; i++) {\n        if (children[i].value === '') {\n          emptyOption = nullOption = children.eq(i);\n          break;\n        }\n      }\n\n      selectCtrl.init(ngModelCtrl, nullOption, unknownOption);\n\n      // required validator\n      if (multiple) {\n        ngModelCtrl.$isEmpty = function(value) {\n          return !value || value.length === 0;\n        };\n      }\n\n      if (optionsExp) setupAsOptions(scope, element, ngModelCtrl);\n      else if (multiple) setupAsMultiple(scope, element, ngModelCtrl);\n      else setupAsSingle(scope, element, ngModelCtrl, selectCtrl);\n\n\n      ////////////////////////////\n\n\n\n      function setupAsSingle(scope, selectElement, ngModelCtrl, selectCtrl) {\n        ngModelCtrl.$render = function() {\n          var viewValue = ngModelCtrl.$viewValue;\n\n          if (selectCtrl.hasOption(viewValue)) {\n            if (unknownOption.parent()) unknownOption.remove();\n            selectElement.val(viewValue);\n            if (viewValue === '') emptyOption.prop('selected', true); // to make IE9 happy\n          } else {\n            if (isUndefined(viewValue) && emptyOption) {\n              selectElement.val('');\n            } else {\n              selectCtrl.renderUnknownOption(viewValue);\n            }\n          }\n        };\n\n        selectElement.on('change', function() {\n          scope.$apply(function() {\n            if (unknownOption.parent()) unknownOption.remove();\n            ngModelCtrl.$setViewValue(selectElement.val());\n          });\n        });\n      }\n\n      function setupAsMultiple(scope, selectElement, ctrl) {\n        var lastView;\n        ctrl.$render = function() {\n          var items = new HashMap(ctrl.$viewValue);\n          forEach(selectElement.find('option'), function(option) {\n            option.selected = isDefined(items.get(option.value));\n          });\n        };\n\n        // we have to do it on each watch since ngModel watches reference, but\n        // we need to work of an array, so we need to see if anything was inserted/removed\n        scope.$watch(function selectMultipleWatch() {\n          if (!equals(lastView, ctrl.$viewValue)) {\n            lastView = shallowCopy(ctrl.$viewValue);\n            ctrl.$render();\n          }\n        });\n\n        selectElement.on('change', function() {\n          scope.$apply(function() {\n            var array = [];\n            forEach(selectElement.find('option'), function(option) {\n              if (option.selected) {\n                array.push(option.value);\n              }\n            });\n            ctrl.$setViewValue(array);\n          });\n        });\n      }\n\n      function setupAsOptions(scope, selectElement, ctrl) {\n        var match;\n\n        if (!(match = optionsExp.match(NG_OPTIONS_REGEXP))) {\n          throw ngOptionsMinErr('iexp',\n            \"Expected expression in form of \" +\n            \"'_select_ (as _label_)? for (_key_,)?_value_ in _collection_'\" +\n            \" but got '{0}'. Element: {1}\",\n            optionsExp, startingTag(selectElement));\n        }\n\n        var displayFn = $parse(match[2] || match[1]),\n            valueName = match[4] || match[6],\n            keyName = match[5],\n            groupByFn = $parse(match[3] || ''),\n            valueFn = $parse(match[2] ? match[1] : valueName),\n            valuesFn = $parse(match[7]),\n            track = match[8],\n            trackFn = track ? $parse(match[8]) : null,\n            // This is an array of array of existing option groups in DOM.\n            // We try to reuse these if possible\n            // - optionGroupsCache[0] is the options with no option group\n            // - optionGroupsCache[?][0] is the parent: either the SELECT or OPTGROUP element\n            optionGroupsCache = [[{element: selectElement, label:''}]];\n\n        if (nullOption) {\n          // compile the element since there might be bindings in it\n          $compile(nullOption)(scope);\n\n          // remove the class, which is added automatically because we recompile the element and it\n          // becomes the compilation root\n          nullOption.removeClass('ng-scope');\n\n          // we need to remove it before calling selectElement.empty() because otherwise IE will\n          // remove the label from the element. wtf?\n          nullOption.remove();\n        }\n\n        // clear contents, we'll add what's needed based on the model\n        selectElement.empty();\n\n        selectElement.on('change', function() {\n          scope.$apply(function() {\n            var optionGroup,\n                collection = valuesFn(scope) || [],\n                locals = {},\n                key, value, optionElement, index, groupIndex, length, groupLength, trackIndex;\n\n            if (multiple) {\n              value = [];\n              for (groupIndex = 0, groupLength = optionGroupsCache.length;\n                   groupIndex < groupLength;\n                   groupIndex++) {\n                // list of options for that group. (first item has the parent)\n                optionGroup = optionGroupsCache[groupIndex];\n\n                for(index = 1, length = optionGroup.length; index < length; index++) {\n                  if ((optionElement = optionGroup[index].element)[0].selected) {\n                    key = optionElement.val();\n                    if (keyName) locals[keyName] = key;\n                    if (trackFn) {\n                      for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n                        locals[valueName] = collection[trackIndex];\n                        if (trackFn(scope, locals) == key) break;\n                      }\n                    } else {\n                      locals[valueName] = collection[key];\n                    }\n                    value.push(valueFn(scope, locals));\n                  }\n                }\n              }\n            } else {\n              key = selectElement.val();\n              if (key == '?') {\n                value = undefined;\n              } else if (key === ''){\n                value = null;\n              } else {\n                if (trackFn) {\n                  for (trackIndex = 0; trackIndex < collection.length; trackIndex++) {\n                    locals[valueName] = collection[trackIndex];\n                    if (trackFn(scope, locals) == key) {\n                      value = valueFn(scope, locals);\n                      break;\n                    }\n                  }\n                } else {\n                  locals[valueName] = collection[key];\n                  if (keyName) locals[keyName] = key;\n                  value = valueFn(scope, locals);\n                }\n              }\n              // Update the null option's selected property here so $render cleans it up correctly\n              if (optionGroupsCache[0].length > 1) {\n                if (optionGroupsCache[0][1].id !== key) {\n                  optionGroupsCache[0][1].selected = false;\n                }\n              }\n            }\n            ctrl.$setViewValue(value);\n          });\n        });\n\n        ctrl.$render = render;\n\n        // TODO(vojta): can't we optimize this ?\n        scope.$watch(render);\n\n        function render() {\n              // Temporary location for the option groups before we render them\n          var optionGroups = {'':[]},\n              optionGroupNames = [''],\n              optionGroupName,\n              optionGroup,\n              option,\n              existingParent, existingOptions, existingOption,\n              modelValue = ctrl.$modelValue,\n              values = valuesFn(scope) || [],\n              keys = keyName ? sortedKeys(values) : values,\n              key,\n              groupLength, length,\n              groupIndex, index,\n              locals = {},\n              selected,\n              selectedSet = false, // nothing is selected yet\n              lastElement,\n              element,\n              label;\n\n          if (multiple) {\n            if (trackFn && isArray(modelValue)) {\n              selectedSet = new HashMap([]);\n              for (var trackIndex = 0; trackIndex < modelValue.length; trackIndex++) {\n                locals[valueName] = modelValue[trackIndex];\n                selectedSet.put(trackFn(scope, locals), modelValue[trackIndex]);\n              }\n            } else {\n              selectedSet = new HashMap(modelValue);\n            }\n          }\n\n          // We now build up the list of options we need (we merge later)\n          for (index = 0; length = keys.length, index < length; index++) {\n\n            key = index;\n            if (keyName) {\n              key = keys[index];\n              if ( key.charAt(0) === '$' ) continue;\n              locals[keyName] = key;\n            }\n\n            locals[valueName] = values[key];\n\n            optionGroupName = groupByFn(scope, locals) || '';\n            if (!(optionGroup = optionGroups[optionGroupName])) {\n              optionGroup = optionGroups[optionGroupName] = [];\n              optionGroupNames.push(optionGroupName);\n            }\n            if (multiple) {\n              selected = isDefined(\n                selectedSet.remove(trackFn ? trackFn(scope, locals) : valueFn(scope, locals))\n              );\n            } else {\n              if (trackFn) {\n                var modelCast = {};\n                modelCast[valueName] = modelValue;\n                selected = trackFn(scope, modelCast) === trackFn(scope, locals);\n              } else {\n                selected = modelValue === valueFn(scope, locals);\n              }\n              selectedSet = selectedSet || selected; // see if at least one item is selected\n            }\n            label = displayFn(scope, locals); // what will be seen by the user\n\n            // doing displayFn(scope, locals) || '' overwrites zero values\n            label = isDefined(label) ? label : '';\n            optionGroup.push({\n              // either the index into array or key from object\n              id: trackFn ? trackFn(scope, locals) : (keyName ? keys[index] : index),\n              label: label,\n              selected: selected                   // determine if we should be selected\n            });\n          }\n          if (!multiple) {\n            if (nullOption || modelValue === null) {\n              // insert null option if we have a placeholder, or the model is null\n              optionGroups[''].unshift({id:'', label:'', selected:!selectedSet});\n            } else if (!selectedSet) {\n              // option could not be found, we have to insert the undefined item\n              optionGroups[''].unshift({id:'?', label:'', selected:true});\n            }\n          }\n\n          // Now we need to update the list of DOM nodes to match the optionGroups we computed above\n          for (groupIndex = 0, groupLength = optionGroupNames.length;\n               groupIndex < groupLength;\n               groupIndex++) {\n            // current option group name or '' if no group\n            optionGroupName = optionGroupNames[groupIndex];\n\n            // list of options for that group. (first item has the parent)\n            optionGroup = optionGroups[optionGroupName];\n\n            if (optionGroupsCache.length <= groupIndex) {\n              // we need to grow the optionGroups\n              existingParent = {\n                element: optGroupTemplate.clone().attr('label', optionGroupName),\n                label: optionGroup.label\n              };\n              existingOptions = [existingParent];\n              optionGroupsCache.push(existingOptions);\n              selectElement.append(existingParent.element);\n            } else {\n              existingOptions = optionGroupsCache[groupIndex];\n              existingParent = existingOptions[0];  // either SELECT (no group) or OPTGROUP element\n\n              // update the OPTGROUP label if not the same.\n              if (existingParent.label != optionGroupName) {\n                existingParent.element.attr('label', existingParent.label = optionGroupName);\n              }\n            }\n\n            lastElement = null;  // start at the beginning\n            for(index = 0, length = optionGroup.length; index < length; index++) {\n              option = optionGroup[index];\n              if ((existingOption = existingOptions[index+1])) {\n                // reuse elements\n                lastElement = existingOption.element;\n                if (existingOption.label !== option.label) {\n                  lastElement.text(existingOption.label = option.label);\n                }\n                if (existingOption.id !== option.id) {\n                  lastElement.val(existingOption.id = option.id);\n                }\n                // lastElement.prop('selected') provided by jQuery has side-effects\n                if (existingOption.selected !== option.selected) {\n                  lastElement.prop('selected', (existingOption.selected = option.selected));\n                  if (msie) {\n                    // See #7692\n                    // The selected item wouldn't visually update on IE without this.\n                    // Tested on Win7: IE9, IE10 and IE11. Future IEs should be tested as well\n                    lastElement.prop('selected', existingOption.selected);\n                  }\n                }\n              } else {\n                // grow elements\n\n                // if it's a null option\n                if (option.id === '' && nullOption) {\n                  // put back the pre-compiled element\n                  element = nullOption;\n                } else {\n                  // jQuery(v1.4.2) Bug: We should be able to chain the method calls, but\n                  // in this version of jQuery on some browser the .text() returns a string\n                  // rather then the element.\n                  (element = optionTemplate.clone())\n                      .val(option.id)\n                      .prop('selected', option.selected)\n                      .text(option.label);\n                }\n\n                existingOptions.push(existingOption = {\n                    element: element,\n                    label: option.label,\n                    id: option.id,\n                    selected: option.selected\n                });\n                if (lastElement) {\n                  lastElement.after(element);\n                } else {\n                  existingParent.element.append(element);\n                }\n                lastElement = element;\n              }\n            }\n            // remove any excessive OPTIONs in a group\n            index++; // increment since the existingOptions[0] is parent element not OPTION\n            while(existingOptions.length > index) {\n              existingOptions.pop().element.remove();\n            }\n          }\n          // remove any excessive OPTGROUPs from select\n          while(optionGroupsCache.length > groupIndex) {\n            optionGroupsCache.pop()[0].element.remove();\n          }\n        }\n      }\n    }\n  };\n}];\n\nvar optionDirective = ['$interpolate', function($interpolate) {\n  var nullSelectCtrl = {\n    addOption: noop,\n    removeOption: noop\n  };\n\n  return {\n    restrict: 'E',\n    priority: 100,\n    compile: function(element, attr) {\n      if (isUndefined(attr.value)) {\n        var interpolateFn = $interpolate(element.text(), true);\n        if (!interpolateFn) {\n          attr.$set('value', element.text());\n        }\n      }\n\n      return function (scope, element, attr) {\n        var selectCtrlName = '$selectController',\n            parent = element.parent(),\n            selectCtrl = parent.data(selectCtrlName) ||\n              parent.parent().data(selectCtrlName); // in case we are in optgroup\n\n        if (selectCtrl && selectCtrl.databound) {\n          // For some reason Opera defaults to true and if not overridden this messes up the repeater.\n          // We don't want the view to drive the initialization of the model anyway.\n          element.prop('selected', false);\n        } else {\n          selectCtrl = nullSelectCtrl;\n        }\n\n        if (interpolateFn) {\n          scope.$watch(interpolateFn, function interpolateWatchAction(newVal, oldVal) {\n            attr.$set('value', newVal);\n            if (newVal !== oldVal) selectCtrl.removeOption(oldVal);\n            selectCtrl.addOption(newVal);\n          });\n        } else {\n          selectCtrl.addOption(attr.value);\n        }\n\n        element.on('$destroy', function() {\n          selectCtrl.removeOption(attr.value);\n        });\n      };\n    }\n  };\n}];\n\nvar styleDirective = valueFn({\n  restrict: 'E',\n  terminal: true\n});\n\n  if (window.angular.bootstrap) {\n    //AngularJS is already loaded, so we can return here...\n    console.log('WARNING: Tried to load angular more than once.');\n    return;\n  }\n\n  //try to bind to jquery now so that one can write angular.element().read()\n  //but we will rebind on bootstrap again.\n  bindJQuery();\n\n  publishExternalAPI(angular);\n\n  jqLite(document).ready(function() {\n    angularInit(document, bootstrap);\n  });\n\n})(window, document);\n\n!window.angular.$$csp() && window.angular.element(document).find('head').prepend('<style type=\"text/css\">@charset \"UTF-8\";[ng\\\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide{display:none !important;}ng\\\\:form{display:block;}.ng-animate-block-transitions{transition:0s all!important;-webkit-transition:0s all!important;}.ng-hide-add-active,.ng-hide-remove{display:block!important;}</style>');","/**\n * State-based routing for AngularJS\n * @version v0.2.15\n * @link http://angular-ui.github.com/\n * @license MIT License, http://www.opensource.org/licenses/MIT\n */\n\n/* commonjs package manager support (eg componentjs) */\nif (typeof module !== \"undefined\" && typeof exports !== \"undefined\" && module.exports === exports){\n  module.exports = 'ui.router';\n}\n\n(function (window, angular, undefined) {\n/*jshint globalstrict:true*/\n/*global angular:false*/\n'use strict';\n\nvar isDefined = angular.isDefined,\n    isFunction = angular.isFunction,\n    isString = angular.isString,\n    isObject = angular.isObject,\n    isArray = angular.isArray,\n    forEach = angular.forEach,\n    extend = angular.extend,\n    copy = angular.copy;\n\nfunction inherit(parent, extra) {\n  return extend(new (extend(function() {}, { prototype: parent }))(), extra);\n}\n\nfunction merge(dst) {\n  forEach(arguments, function(obj) {\n    if (obj !== dst) {\n      forEach(obj, function(value, key) {\n        if (!dst.hasOwnProperty(key)) dst[key] = value;\n      });\n    }\n  });\n  return dst;\n}\n\n/**\n * Finds the common ancestor path between two states.\n *\n * @param {Object} first The first state.\n * @param {Object} second The second state.\n * @return {Array} Returns an array of state names in descending order, not including the root.\n */\nfunction ancestors(first, second) {\n  var path = [];\n\n  for (var n in first.path) {\n    if (first.path[n] !== second.path[n]) break;\n    path.push(first.path[n]);\n  }\n  return path;\n}\n\n/**\n * IE8-safe wrapper for `Object.keys()`.\n *\n * @param {Object} object A JavaScript object.\n * @return {Array} Returns the keys of the object as an array.\n */\nfunction objectKeys(object) {\n  if (Object.keys) {\n    return Object.keys(object);\n  }\n  var result = [];\n\n  forEach(object, function(val, key) {\n    result.push(key);\n  });\n  return result;\n}\n\n/**\n * IE8-safe wrapper for `Array.prototype.indexOf()`.\n *\n * @param {Array} array A JavaScript array.\n * @param {*} value A value to search the array for.\n * @return {Number} Returns the array index value of `value`, or `-1` if not present.\n */\nfunction indexOf(array, value) {\n  if (Array.prototype.indexOf) {\n    return array.indexOf(value, Number(arguments[2]) || 0);\n  }\n  var len = array.length >>> 0, from = Number(arguments[2]) || 0;\n  from = (from < 0) ? Math.ceil(from) : Math.floor(from);\n\n  if (from < 0) from += len;\n\n  for (; from < len; from++) {\n    if (from in array && array[from] === value) return from;\n  }\n  return -1;\n}\n\n/**\n * Merges a set of parameters with all parameters inherited between the common parents of the\n * current state and a given destination state.\n *\n * @param {Object} currentParams The value of the current state parameters ($stateParams).\n * @param {Object} newParams The set of parameters which will be composited with inherited params.\n * @param {Object} $current Internal definition of object representing the current state.\n * @param {Object} $to Internal definition of object representing state to transition to.\n */\nfunction inheritParams(currentParams, newParams, $current, $to) {\n  var parents = ancestors($current, $to), parentParams, inherited = {}, inheritList = [];\n\n  for (var i in parents) {\n    if (!parents[i].params) continue;\n    parentParams = objectKeys(parents[i].params);\n    if (!parentParams.length) continue;\n\n    for (var j in parentParams) {\n      if (indexOf(inheritList, parentParams[j]) >= 0) continue;\n      inheritList.push(parentParams[j]);\n      inherited[parentParams[j]] = currentParams[parentParams[j]];\n    }\n  }\n  return extend({}, inherited, newParams);\n}\n\n/**\n * Performs a non-strict comparison of the subset of two objects, defined by a list of keys.\n *\n * @param {Object} a The first object.\n * @param {Object} b The second object.\n * @param {Array} keys The list of keys within each object to compare. If the list is empty or not specified,\n *                     it defaults to the list of keys in `a`.\n * @return {Boolean} Returns `true` if the keys match, otherwise `false`.\n */\nfunction equalForKeys(a, b, keys) {\n  if (!keys) {\n    keys = [];\n    for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility\n  }\n\n  for (var i=0; i<keys.length; i++) {\n    var k = keys[i];\n    if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized\n  }\n  return true;\n}\n\n/**\n * Returns the subset of an object, based on a list of keys.\n *\n * @param {Array} keys\n * @param {Object} values\n * @return {Boolean} Returns a subset of `values`.\n */\nfunction filterByKeys(keys, values) {\n  var filtered = {};\n\n  forEach(keys, function (name) {\n    filtered[name] = values[name];\n  });\n  return filtered;\n}\n\n// like _.indexBy\n// when you know that your index values will be unique, or you want last-one-in to win\nfunction indexBy(array, propName) {\n  var result = {};\n  forEach(array, function(item) {\n    result[item[propName]] = item;\n  });\n  return result;\n}\n\n// extracted from underscore.js\n// Return a copy of the object only containing the whitelisted properties.\nfunction pick(obj) {\n  var copy = {};\n  var keys = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1));\n  forEach(keys, function(key) {\n    if (key in obj) copy[key] = obj[key];\n  });\n  return copy;\n}\n\n// extracted from underscore.js\n// Return a copy of the object omitting the blacklisted properties.\nfunction omit(obj) {\n  var copy = {};\n  var keys = Array.prototype.concat.apply(Array.prototype, Array.prototype.slice.call(arguments, 1));\n  for (var key in obj) {\n    if (indexOf(keys, key) == -1) copy[key] = obj[key];\n  }\n  return copy;\n}\n\nfunction pluck(collection, key) {\n  var result = isArray(collection) ? [] : {};\n\n  forEach(collection, function(val, i) {\n    result[i] = isFunction(key) ? key(val) : val[key];\n  });\n  return result;\n}\n\nfunction filter(collection, callback) {\n  var array = isArray(collection);\n  var result = array ? [] : {};\n  forEach(collection, function(val, i) {\n    if (callback(val, i)) {\n      result[array ? result.length : i] = val;\n    }\n  });\n  return result;\n}\n\nfunction map(collection, callback) {\n  var result = isArray(collection) ? [] : {};\n\n  forEach(collection, function(val, i) {\n    result[i] = callback(val, i);\n  });\n  return result;\n}\n\n/**\n * @ngdoc overview\n * @name ui.router.util\n *\n * @description\n * # ui.router.util sub-module\n *\n * This module is a dependency of other sub-modules. Do not include this module as a dependency\n * in your angular app (use {@link ui.router} module instead).\n *\n */\nangular.module('ui.router.util', ['ng']);\n\n/**\n * @ngdoc overview\n * @name ui.router.router\n * \n * @requires ui.router.util\n *\n * @description\n * # ui.router.router sub-module\n *\n * This module is a dependency of other sub-modules. Do not include this module as a dependency\n * in your angular app (use {@link ui.router} module instead).\n */\nangular.module('ui.router.router', ['ui.router.util']);\n\n/**\n * @ngdoc overview\n * @name ui.router.state\n * \n * @requires ui.router.router\n * @requires ui.router.util\n *\n * @description\n * # ui.router.state sub-module\n *\n * This module is a dependency of the main ui.router module. Do not include this module as a dependency\n * in your angular app (use {@link ui.router} module instead).\n * \n */\nangular.module('ui.router.state', ['ui.router.router', 'ui.router.util']);\n\n/**\n * @ngdoc overview\n * @name ui.router\n *\n * @requires ui.router.state\n *\n * @description\n * # ui.router\n * \n * ## The main module for ui.router \n * There are several sub-modules included with the ui.router module, however only this module is needed\n * as a dependency within your angular app. The other modules are for organization purposes. \n *\n * The modules are:\n * * ui.router - the main \"umbrella\" module\n * * ui.router.router - \n * \n * *You'll need to include **only** this module as the dependency within your angular app.*\n * \n * <pre>\n * <!doctype html>\n * <html ng-app=\"myApp\">\n * <head>\n *   <script src=\"js/angular.js\"></script>\n *   <!-- Include the ui-router script -->\n *   <script src=\"js/angular-ui-router.min.js\"></script>\n *   <script>\n *     // ...and add 'ui.router' as a dependency\n *     var myApp = angular.module('myApp', ['ui.router']);\n *   </script>\n * </head>\n * <body>\n * </body>\n * </html>\n * </pre>\n */\nangular.module('ui.router', ['ui.router.state']);\n\nangular.module('ui.router.compat', ['ui.router']);\n\n/**\n * @ngdoc object\n * @name ui.router.util.$resolve\n *\n * @requires $q\n * @requires $injector\n *\n * @description\n * Manages resolution of (acyclic) graphs of promises.\n */\n$Resolve.$inject = ['$q', '$injector'];\nfunction $Resolve(  $q,    $injector) {\n  \n  var VISIT_IN_PROGRESS = 1,\n      VISIT_DONE = 2,\n      NOTHING = {},\n      NO_DEPENDENCIES = [],\n      NO_LOCALS = NOTHING,\n      NO_PARENT = extend($q.when(NOTHING), { $$promises: NOTHING, $$values: NOTHING });\n  \n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$resolve#study\n   * @methodOf ui.router.util.$resolve\n   *\n   * @description\n   * Studies a set of invocables that are likely to be used multiple times.\n   * <pre>\n   * $resolve.study(invocables)(locals, parent, self)\n   * </pre>\n   * is equivalent to\n   * <pre>\n   * $resolve.resolve(invocables, locals, parent, self)\n   * </pre>\n   * but the former is more efficient (in fact `resolve` just calls `study` \n   * internally).\n   *\n   * @param {object} invocables Invocable objects\n   * @return {function} a function to pass in locals, parent and self\n   */\n  this.study = function (invocables) {\n    if (!isObject(invocables)) throw new Error(\"'invocables' must be an object\");\n    var invocableKeys = objectKeys(invocables || {});\n    \n    // Perform a topological sort of invocables to build an ordered plan\n    var plan = [], cycle = [], visited = {};\n    function visit(value, key) {\n      if (visited[key] === VISIT_DONE) return;\n      \n      cycle.push(key);\n      if (visited[key] === VISIT_IN_PROGRESS) {\n        cycle.splice(0, indexOf(cycle, key));\n        throw new Error(\"Cyclic dependency: \" + cycle.join(\" -> \"));\n      }\n      visited[key] = VISIT_IN_PROGRESS;\n      \n      if (isString(value)) {\n        plan.push(key, [ function() { return $injector.get(value); }], NO_DEPENDENCIES);\n      } else {\n        var params = $injector.annotate(value);\n        forEach(params, function (param) {\n          if (param !== key && invocables.hasOwnProperty(param)) visit(invocables[param], param);\n        });\n        plan.push(key, value, params);\n      }\n      \n      cycle.pop();\n      visited[key] = VISIT_DONE;\n    }\n    forEach(invocables, visit);\n    invocables = cycle = visited = null; // plan is all that's required\n    \n    function isResolve(value) {\n      return isObject(value) && value.then && value.$$promises;\n    }\n    \n    return function (locals, parent, self) {\n      if (isResolve(locals) && self === undefined) {\n        self = parent; parent = locals; locals = null;\n      }\n      if (!locals) locals = NO_LOCALS;\n      else if (!isObject(locals)) {\n        throw new Error(\"'locals' must be an object\");\n      }       \n      if (!parent) parent = NO_PARENT;\n      else if (!isResolve(parent)) {\n        throw new Error(\"'parent' must be a promise returned by $resolve.resolve()\");\n      }\n      \n      // To complete the overall resolution, we have to wait for the parent\n      // promise and for the promise for each invokable in our plan.\n      var resolution = $q.defer(),\n          result = resolution.promise,\n          promises = result.$$promises = {},\n          values = extend({}, locals),\n          wait = 1 + plan.length/3,\n          merged = false;\n          \n      function done() {\n        // Merge parent values we haven't got yet and publish our own $$values\n        if (!--wait) {\n          if (!merged) merge(values, parent.$$values); \n          result.$$values = values;\n          result.$$promises = result.$$promises || true; // keep for isResolve()\n          delete result.$$inheritedValues;\n          resolution.resolve(values);\n        }\n      }\n      \n      function fail(reason) {\n        result.$$failure = reason;\n        resolution.reject(reason);\n      }\n\n      // Short-circuit if parent has already failed\n      if (isDefined(parent.$$failure)) {\n        fail(parent.$$failure);\n        return result;\n      }\n      \n      if (parent.$$inheritedValues) {\n        merge(values, omit(parent.$$inheritedValues, invocableKeys));\n      }\n\n      // Merge parent values if the parent has already resolved, or merge\n      // parent promises and wait if the parent resolve is still in progress.\n      extend(promises, parent.$$promises);\n      if (parent.$$values) {\n        merged = merge(values, omit(parent.$$values, invocableKeys));\n        result.$$inheritedValues = omit(parent.$$values, invocableKeys);\n        done();\n      } else {\n        if (parent.$$inheritedValues) {\n          result.$$inheritedValues = omit(parent.$$inheritedValues, invocableKeys);\n        }        \n        parent.then(done, fail);\n      }\n      \n      // Process each invocable in the plan, but ignore any where a local of the same name exists.\n      for (var i=0, ii=plan.length; i<ii; i+=3) {\n        if (locals.hasOwnProperty(plan[i])) done();\n        else invoke(plan[i], plan[i+1], plan[i+2]);\n      }\n      \n      function invoke(key, invocable, params) {\n        // Create a deferred for this invocation. Failures will propagate to the resolution as well.\n        var invocation = $q.defer(), waitParams = 0;\n        function onfailure(reason) {\n          invocation.reject(reason);\n          fail(reason);\n        }\n        // Wait for any parameter that we have a promise for (either from parent or from this\n        // resolve; in that case study() will have made sure it's ordered before us in the plan).\n        forEach(params, function (dep) {\n          if (promises.hasOwnProperty(dep) && !locals.hasOwnProperty(dep)) {\n            waitParams++;\n            promises[dep].then(function (result) {\n              values[dep] = result;\n              if (!(--waitParams)) proceed();\n            }, onfailure);\n          }\n        });\n        if (!waitParams) proceed();\n        function proceed() {\n          if (isDefined(result.$$failure)) return;\n          try {\n            invocation.resolve($injector.invoke(invocable, self, values));\n            invocation.promise.then(function (result) {\n              values[key] = result;\n              done();\n            }, onfailure);\n          } catch (e) {\n            onfailure(e);\n          }\n        }\n        // Publish promise synchronously; invocations further down in the plan may depend on it.\n        promises[key] = invocation.promise;\n      }\n      \n      return result;\n    };\n  };\n  \n  /**\n   * @ngdoc function\n   * @name ui.router.util.$resolve#resolve\n   * @methodOf ui.router.util.$resolve\n   *\n   * @description\n   * Resolves a set of invocables. An invocable is a function to be invoked via \n   * `$injector.invoke()`, and can have an arbitrary number of dependencies. \n   * An invocable can either return a value directly,\n   * or a `$q` promise. If a promise is returned it will be resolved and the \n   * resulting value will be used instead. Dependencies of invocables are resolved \n   * (in this order of precedence)\n   *\n   * - from the specified `locals`\n   * - from another invocable that is part of this `$resolve` call\n   * - from an invocable that is inherited from a `parent` call to `$resolve` \n   *   (or recursively\n   * - from any ancestor `$resolve` of that parent).\n   *\n   * The return value of `$resolve` is a promise for an object that contains \n   * (in this order of precedence)\n   *\n   * - any `locals` (if specified)\n   * - the resolved return values of all injectables\n   * - any values inherited from a `parent` call to `$resolve` (if specified)\n   *\n   * The promise will resolve after the `parent` promise (if any) and all promises \n   * returned by injectables have been resolved. If any invocable \n   * (or `$injector.invoke`) throws an exception, or if a promise returned by an \n   * invocable is rejected, the `$resolve` promise is immediately rejected with the \n   * same error. A rejection of a `parent` promise (if specified) will likewise be \n   * propagated immediately. Once the `$resolve` promise has been rejected, no \n   * further invocables will be called.\n   * \n   * Cyclic dependencies between invocables are not permitted and will caues `$resolve`\n   * to throw an error. As a special case, an injectable can depend on a parameter \n   * with the same name as the injectable, which will be fulfilled from the `parent` \n   * injectable of the same name. This allows inherited values to be decorated. \n   * Note that in this case any other injectable in the same `$resolve` with the same\n   * dependency would see the decorated value, not the inherited value.\n   *\n   * Note that missing dependencies -- unlike cyclic dependencies -- will cause an \n   * (asynchronous) rejection of the `$resolve` promise rather than a (synchronous) \n   * exception.\n   *\n   * Invocables are invoked eagerly as soon as all dependencies are available. \n   * This is true even for dependencies inherited from a `parent` call to `$resolve`.\n   *\n   * As a special case, an invocable can be a string, in which case it is taken to \n   * be a service name to be passed to `$injector.get()`. This is supported primarily \n   * for backwards-compatibility with the `resolve` property of `$routeProvider` \n   * routes.\n   *\n   * @param {object} invocables functions to invoke or \n   * `$injector` services to fetch.\n   * @param {object} locals  values to make available to the injectables\n   * @param {object} parent  a promise returned by another call to `$resolve`.\n   * @param {object} self  the `this` for the invoked methods\n   * @return {object} Promise for an object that contains the resolved return value\n   * of all invocables, as well as any inherited and local values.\n   */\n  this.resolve = function (invocables, locals, parent, self) {\n    return this.study(invocables)(locals, parent, self);\n  };\n}\n\nangular.module('ui.router.util').service('$resolve', $Resolve);\n\n\n/**\n * @ngdoc object\n * @name ui.router.util.$templateFactory\n *\n * @requires $http\n * @requires $templateCache\n * @requires $injector\n *\n * @description\n * Service. Manages loading of templates.\n */\n$TemplateFactory.$inject = ['$http', '$templateCache', '$injector'];\nfunction $TemplateFactory(  $http,   $templateCache,   $injector) {\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$templateFactory#fromConfig\n   * @methodOf ui.router.util.$templateFactory\n   *\n   * @description\n   * Creates a template from a configuration object. \n   *\n   * @param {object} config Configuration object for which to load a template. \n   * The following properties are search in the specified order, and the first one \n   * that is defined is used to create the template:\n   *\n   * @param {string|object} config.template html string template or function to \n   * load via {@link ui.router.util.$templateFactory#fromString fromString}.\n   * @param {string|object} config.templateUrl url to load or a function returning \n   * the url to load via {@link ui.router.util.$templateFactory#fromUrl fromUrl}.\n   * @param {Function} config.templateProvider function to invoke via \n   * {@link ui.router.util.$templateFactory#fromProvider fromProvider}.\n   * @param {object} params  Parameters to pass to the template function.\n   * @param {object} locals Locals to pass to `invoke` if the template is loaded \n   * via a `templateProvider`. Defaults to `{ params: params }`.\n   *\n   * @return {string|object}  The template html as a string, or a promise for \n   * that string,or `null` if no template is configured.\n   */\n  this.fromConfig = function (config, params, locals) {\n    return (\n      isDefined(config.template) ? this.fromString(config.template, params) :\n      isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) :\n      isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, locals) :\n      null\n    );\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$templateFactory#fromString\n   * @methodOf ui.router.util.$templateFactory\n   *\n   * @description\n   * Creates a template from a string or a function returning a string.\n   *\n   * @param {string|object} template html template as a string or function that \n   * returns an html template as a string.\n   * @param {object} params Parameters to pass to the template function.\n   *\n   * @return {string|object} The template html as a string, or a promise for that \n   * string.\n   */\n  this.fromString = function (template, params) {\n    return isFunction(template) ? template(params) : template;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$templateFactory#fromUrl\n   * @methodOf ui.router.util.$templateFactory\n   * \n   * @description\n   * Loads a template from the a URL via `$http` and `$templateCache`.\n   *\n   * @param {string|Function} url url of the template to load, or a function \n   * that returns a url.\n   * @param {Object} params Parameters to pass to the url function.\n   * @return {string|Promise.<string>} The template html as a string, or a promise \n   * for that string.\n   */\n  this.fromUrl = function (url, params) {\n    if (isFunction(url)) url = url(params);\n    if (url == null) return null;\n    else return $http\n        .get(url, { cache: $templateCache, headers: { Accept: 'text/html' }})\n        .then(function(response) { return response.data; });\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$templateFactory#fromProvider\n   * @methodOf ui.router.util.$templateFactory\n   *\n   * @description\n   * Creates a template by invoking an injectable provider function.\n   *\n   * @param {Function} provider Function to invoke via `$injector.invoke`\n   * @param {Object} params Parameters for the template.\n   * @param {Object} locals Locals to pass to `invoke`. Defaults to \n   * `{ params: params }`.\n   * @return {string|Promise.<string>} The template html as a string, or a promise \n   * for that string.\n   */\n  this.fromProvider = function (provider, params, locals) {\n    return $injector.invoke(provider, null, locals || { params: params });\n  };\n}\n\nangular.module('ui.router.util').service('$templateFactory', $TemplateFactory);\n\nvar $$UMFP; // reference to $UrlMatcherFactoryProvider\n\n/**\n * @ngdoc object\n * @name ui.router.util.type:UrlMatcher\n *\n * @description\n * Matches URLs against patterns and extracts named parameters from the path or the search\n * part of the URL. A URL pattern consists of a path pattern, optionally followed by '?' and a list\n * of search parameters. Multiple search parameter names are separated by '&'. Search parameters\n * do not influence whether or not a URL is matched, but their values are passed through into\n * the matched parameters returned by {@link ui.router.util.type:UrlMatcher#methods_exec exec}.\n *\n * Path parameter placeholders can be specified using simple colon/catch-all syntax or curly brace\n * syntax, which optionally allows a regular expression for the parameter to be specified:\n *\n * * `':'` name - colon placeholder\n * * `'*'` name - catch-all placeholder\n * * `'{' name '}'` - curly placeholder\n * * `'{' name ':' regexp|type '}'` - curly placeholder with regexp or type name. Should the\n *   regexp itself contain curly braces, they must be in matched pairs or escaped with a backslash.\n *\n * Parameter names may contain only word characters (latin letters, digits, and underscore) and\n * must be unique within the pattern (across both path and search parameters). For colon\n * placeholders or curly placeholders without an explicit regexp, a path parameter matches any\n * number of characters other than '/'. For catch-all placeholders the path parameter matches\n * any number of characters.\n *\n * Examples:\n *\n * * `'/hello/'` - Matches only if the path is exactly '/hello/'. There is no special treatment for\n *   trailing slashes, and patterns have to match the entire path, not just a prefix.\n * * `'/user/:id'` - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or\n *   '/user/bob/details'. The second path segment will be captured as the parameter 'id'.\n * * `'/user/{id}'` - Same as the previous example, but using curly brace syntax.\n * * `'/user/{id:[^/]*}'` - Same as the previous example.\n * * `'/user/{id:[0-9a-fA-F]{1,8}}'` - Similar to the previous example, but only matches if the id\n *   parameter consists of 1 to 8 hex digits.\n * * `'/files/{path:.*}'` - Matches any URL starting with '/files/' and captures the rest of the\n *   path into the parameter 'path'.\n * * `'/files/*path'` - ditto.\n * * `'/calendar/{start:date}'` - Matches \"/calendar/2014-11-12\" (because the pattern defined\n *   in the built-in  `date` Type matches `2014-11-12`) and provides a Date object in $stateParams.start\n *\n * @param {string} pattern  The pattern to compile into a matcher.\n * @param {Object} config  A configuration object hash:\n * @param {Object=} parentMatcher Used to concatenate the pattern/config onto\n *   an existing UrlMatcher\n *\n * * `caseInsensitive` - `true` if URL matching should be case insensitive, otherwise `false`, the default value (for backward compatibility) is `false`.\n * * `strict` - `false` if matching against a URL with a trailing slash should be treated as equivalent to a URL without a trailing slash, the default value is `true`.\n *\n * @property {string} prefix  A static prefix of this pattern. The matcher guarantees that any\n *   URL matching this matcher (i.e. any string for which {@link ui.router.util.type:UrlMatcher#methods_exec exec()} returns\n *   non-null) will start with this prefix.\n *\n * @property {string} source  The pattern that was passed into the constructor\n *\n * @property {string} sourcePath  The path portion of the source property\n *\n * @property {string} sourceSearch  The search portion of the source property\n *\n * @property {string} regex  The constructed regex that will be used to match against the url when\n *   it is time to determine which url will match.\n *\n * @returns {Object}  New `UrlMatcher` object\n */\nfunction UrlMatcher(pattern, config, parentMatcher) {\n  config = extend({ params: {} }, isObject(config) ? config : {});\n\n  // Find all placeholders and create a compiled pattern, using either classic or curly syntax:\n  //   '*' name\n  //   ':' name\n  //   '{' name '}'\n  //   '{' name ':' regexp '}'\n  // The regular expression is somewhat complicated due to the need to allow curly braces\n  // inside the regular expression. The placeholder regexp breaks down as follows:\n  //    ([:*])([\\w\\[\\]]+)              - classic placeholder ($1 / $2) (search version has - for snake-case)\n  //    \\{([\\w\\[\\]]+)(?:\\:( ... ))?\\}  - curly brace placeholder ($3) with optional regexp/type ... ($4) (search version has - for snake-case\n  //    (?: ... | ... | ... )+         - the regexp consists of any number of atoms, an atom being either\n  //    [^{}\\\\]+                       - anything other than curly braces or backslash\n  //    \\\\.                            - a backslash escape\n  //    \\{(?:[^{}\\\\]+|\\\\.)*\\}          - a matched set of curly braces containing other atoms\n  var placeholder       = /([:*])([\\w\\[\\]]+)|\\{([\\w\\[\\]]+)(?:\\:((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n      searchPlaceholder = /([:]?)([\\w\\[\\]-]+)|\\{([\\w\\[\\]-]+)(?:\\:((?:[^{}\\\\]+|\\\\.|\\{(?:[^{}\\\\]+|\\\\.)*\\})+))?\\}/g,\n      compiled = '^', last = 0, m,\n      segments = this.segments = [],\n      parentParams = parentMatcher ? parentMatcher.params : {},\n      params = this.params = parentMatcher ? parentMatcher.params.$$new() : new $$UMFP.ParamSet(),\n      paramNames = [];\n\n  function addParameter(id, type, config, location) {\n    paramNames.push(id);\n    if (parentParams[id]) return parentParams[id];\n    if (!/^\\w+(-+\\w+)*(?:\\[\\])?$/.test(id)) throw new Error(\"Invalid parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n    if (params[id]) throw new Error(\"Duplicate parameter name '\" + id + \"' in pattern '\" + pattern + \"'\");\n    params[id] = new $$UMFP.Param(id, type, config, location);\n    return params[id];\n  }\n\n  function quoteRegExp(string, pattern, squash, optional) {\n    var surroundPattern = ['',''], result = string.replace(/[\\\\\\[\\]\\^$*+?.()|{}]/g, \"\\\\$&\");\n    if (!pattern) return result;\n    switch(squash) {\n      case false: surroundPattern = ['(', ')' + (optional ? \"?\" : \"\")]; break;\n      case true:  surroundPattern = ['?(', ')?']; break;\n      default:    surroundPattern = ['(' + squash + \"|\", ')?']; break;\n    }\n    return result + surroundPattern[0] + pattern + surroundPattern[1];\n  }\n\n  this.source = pattern;\n\n  // Split into static segments separated by path parameter placeholders.\n  // The number of segments is always 1 more than the number of parameters.\n  function matchDetails(m, isSearch) {\n    var id, regexp, segment, type, cfg, arrayMode;\n    id          = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null\n    cfg         = config.params[id];\n    segment     = pattern.substring(last, m.index);\n    regexp      = isSearch ? m[4] : m[4] || (m[1] == '*' ? '.*' : null);\n    type        = $$UMFP.type(regexp || \"string\") || inherit($$UMFP.type(\"string\"), { pattern: new RegExp(regexp, config.caseInsensitive ? 'i' : undefined) });\n    return {\n      id: id, regexp: regexp, segment: segment, type: type, cfg: cfg\n    };\n  }\n\n  var p, param, segment;\n  while ((m = placeholder.exec(pattern))) {\n    p = matchDetails(m, false);\n    if (p.segment.indexOf('?') >= 0) break; // we're into the search part\n\n    param = addParameter(p.id, p.type, p.cfg, \"path\");\n    compiled += quoteRegExp(p.segment, param.type.pattern.source, param.squash, param.isOptional);\n    segments.push(p.segment);\n    last = placeholder.lastIndex;\n  }\n  segment = pattern.substring(last);\n\n  // Find any search parameter names and remove them from the last segment\n  var i = segment.indexOf('?');\n\n  if (i >= 0) {\n    var search = this.sourceSearch = segment.substring(i);\n    segment = segment.substring(0, i);\n    this.sourcePath = pattern.substring(0, last + i);\n\n    if (search.length > 0) {\n      last = 0;\n      while ((m = searchPlaceholder.exec(search))) {\n        p = matchDetails(m, true);\n        param = addParameter(p.id, p.type, p.cfg, \"search\");\n        last = placeholder.lastIndex;\n        // check if ?&\n      }\n    }\n  } else {\n    this.sourcePath = pattern;\n    this.sourceSearch = '';\n  }\n\n  compiled += quoteRegExp(segment) + (config.strict === false ? '\\/?' : '') + '$';\n  segments.push(segment);\n\n  this.regexp = new RegExp(compiled, config.caseInsensitive ? 'i' : undefined);\n  this.prefix = segments[0];\n  this.$$paramNames = paramNames;\n}\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#concat\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Returns a new matcher for a pattern constructed by appending the path part and adding the\n * search parameters of the specified pattern to this pattern. The current pattern is not\n * modified. This can be understood as creating a pattern for URLs that are relative to (or\n * suffixes of) the current pattern.\n *\n * @example\n * The following two matchers are equivalent:\n * <pre>\n * new UrlMatcher('/user/{id}?q').concat('/details?date');\n * new UrlMatcher('/user/{id}/details?q&date');\n * </pre>\n *\n * @param {string} pattern  The pattern to append.\n * @param {Object} config  An object hash of the configuration for the matcher.\n * @returns {UrlMatcher}  A matcher for the concatenated pattern.\n */\nUrlMatcher.prototype.concat = function (pattern, config) {\n  // Because order of search parameters is irrelevant, we can add our own search\n  // parameters to the end of the new pattern. Parse the new pattern by itself\n  // and then join the bits together, but it's much easier to do this on a string level.\n  var defaultConfig = {\n    caseInsensitive: $$UMFP.caseInsensitive(),\n    strict: $$UMFP.strictMode(),\n    squash: $$UMFP.defaultSquashPolicy()\n  };\n  return new UrlMatcher(this.sourcePath + pattern + this.sourceSearch, extend(defaultConfig, config), this);\n};\n\nUrlMatcher.prototype.toString = function () {\n  return this.source;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#exec\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Tests the specified path against this matcher, and returns an object containing the captured\n * parameter values, or null if the path does not match. The returned object contains the values\n * of any search parameters that are mentioned in the pattern, but their value may be null if\n * they are not present in `searchParams`. This means that search parameters are always treated\n * as optional.\n *\n * @example\n * <pre>\n * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', {\n *   x: '1', q: 'hello'\n * });\n * // returns { id: 'bob', q: 'hello', r: null }\n * </pre>\n *\n * @param {string} path  The URL path to match, e.g. `$location.path()`.\n * @param {Object} searchParams  URL search parameters, e.g. `$location.search()`.\n * @returns {Object}  The captured parameter values.\n */\nUrlMatcher.prototype.exec = function (path, searchParams) {\n  var m = this.regexp.exec(path);\n  if (!m) return null;\n  searchParams = searchParams || {};\n\n  var paramNames = this.parameters(), nTotal = paramNames.length,\n    nPath = this.segments.length - 1,\n    values = {}, i, j, cfg, paramName;\n\n  if (nPath !== m.length - 1) throw new Error(\"Unbalanced capture group in route '\" + this.source + \"'\");\n\n  function decodePathArray(string) {\n    function reverseString(str) { return str.split(\"\").reverse().join(\"\"); }\n    function unquoteDashes(str) { return str.replace(/\\\\-/g, \"-\"); }\n\n    var split = reverseString(string).split(/-(?!\\\\)/);\n    var allReversed = map(split, reverseString);\n    return map(allReversed, unquoteDashes).reverse();\n  }\n\n  for (i = 0; i < nPath; i++) {\n    paramName = paramNames[i];\n    var param = this.params[paramName];\n    var paramVal = m[i+1];\n    // if the param value matches a pre-replace pair, replace the value before decoding.\n    for (j = 0; j < param.replace; j++) {\n      if (param.replace[j].from === paramVal) paramVal = param.replace[j].to;\n    }\n    if (paramVal && param.array === true) paramVal = decodePathArray(paramVal);\n    values[paramName] = param.value(paramVal);\n  }\n  for (/**/; i < nTotal; i++) {\n    paramName = paramNames[i];\n    values[paramName] = this.params[paramName].value(searchParams[paramName]);\n  }\n\n  return values;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#parameters\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Returns the names of all path and search parameters of this pattern in an unspecified order.\n *\n * @returns {Array.<string>}  An array of parameter names. Must be treated as read-only. If the\n *    pattern has no parameters, an empty array is returned.\n */\nUrlMatcher.prototype.parameters = function (param) {\n  if (!isDefined(param)) return this.$$paramNames;\n  return this.params[param] || null;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#validate\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Checks an object hash of parameters to validate their correctness according to the parameter\n * types of this `UrlMatcher`.\n *\n * @param {Object} params The object hash of parameters to validate.\n * @returns {boolean} Returns `true` if `params` validates, otherwise `false`.\n */\nUrlMatcher.prototype.validates = function (params) {\n  return this.params.$$validates(params);\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:UrlMatcher#format\n * @methodOf ui.router.util.type:UrlMatcher\n *\n * @description\n * Creates a URL that matches this pattern by substituting the specified values\n * for the path and search parameters. Null values for path parameters are\n * treated as empty strings.\n *\n * @example\n * <pre>\n * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });\n * // returns '/user/bob?q=yes'\n * </pre>\n *\n * @param {Object} values  the values to substitute for the parameters in this pattern.\n * @returns {string}  the formatted URL (path and optionally search part).\n */\nUrlMatcher.prototype.format = function (values) {\n  values = values || {};\n  var segments = this.segments, params = this.parameters(), paramset = this.params;\n  if (!this.validates(values)) return null;\n\n  var i, search = false, nPath = segments.length - 1, nTotal = params.length, result = segments[0];\n\n  function encodeDashes(str) { // Replace dashes with encoded \"\\-\"\n    return encodeURIComponent(str).replace(/-/g, function(c) { return '%5C%' + c.charCodeAt(0).toString(16).toUpperCase(); });\n  }\n\n  for (i = 0; i < nTotal; i++) {\n    var isPathParam = i < nPath;\n    var name = params[i], param = paramset[name], value = param.value(values[name]);\n    var isDefaultValue = param.isOptional && param.type.equals(param.value(), value);\n    var squash = isDefaultValue ? param.squash : false;\n    var encoded = param.type.encode(value);\n\n    if (isPathParam) {\n      var nextSegment = segments[i + 1];\n      if (squash === false) {\n        if (encoded != null) {\n          if (isArray(encoded)) {\n            result += map(encoded, encodeDashes).join(\"-\");\n          } else {\n            result += encodeURIComponent(encoded);\n          }\n        }\n        result += nextSegment;\n      } else if (squash === true) {\n        var capture = result.match(/\\/$/) ? /\\/?(.*)/ : /(.*)/;\n        result += nextSegment.match(capture)[1];\n      } else if (isString(squash)) {\n        result += squash + nextSegment;\n      }\n    } else {\n      if (encoded == null || (isDefaultValue && squash !== false)) continue;\n      if (!isArray(encoded)) encoded = [ encoded ];\n      encoded = map(encoded, encodeURIComponent).join('&' + name + '=');\n      result += (search ? '&' : '?') + (name + '=' + encoded);\n      search = true;\n    }\n  }\n\n  return result;\n};\n\n/**\n * @ngdoc object\n * @name ui.router.util.type:Type\n *\n * @description\n * Implements an interface to define custom parameter types that can be decoded from and encoded to\n * string parameters matched in a URL. Used by {@link ui.router.util.type:UrlMatcher `UrlMatcher`}\n * objects when matching or formatting URLs, or comparing or validating parameter values.\n *\n * See {@link ui.router.util.$urlMatcherFactory#methods_type `$urlMatcherFactory#type()`} for more\n * information on registering custom types.\n *\n * @param {Object} config  A configuration object which contains the custom type definition.  The object's\n *        properties will override the default methods and/or pattern in `Type`'s public interface.\n * @example\n * <pre>\n * {\n *   decode: function(val) { return parseInt(val, 10); },\n *   encode: function(val) { return val && val.toString(); },\n *   equals: function(a, b) { return this.is(a) && a === b; },\n *   is: function(val) { return angular.isNumber(val) isFinite(val) && val % 1 === 0; },\n *   pattern: /\\d+/\n * }\n * </pre>\n *\n * @property {RegExp} pattern The regular expression pattern used to match values of this type when\n *           coming from a substring of a URL.\n *\n * @returns {Object}  Returns a new `Type` object.\n */\nfunction Type(config) {\n  extend(this, config);\n}\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#is\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Detects whether a value is of a particular type. Accepts a native (decoded) value\n * and determines whether it matches the current `Type` object.\n *\n * @param {*} val  The value to check.\n * @param {string} key  Optional. If the type check is happening in the context of a specific\n *        {@link ui.router.util.type:UrlMatcher `UrlMatcher`} object, this is the name of the\n *        parameter in which `val` is stored. Can be used for meta-programming of `Type` objects.\n * @returns {Boolean}  Returns `true` if the value matches the type, otherwise `false`.\n */\nType.prototype.is = function(val, key) {\n  return true;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#encode\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Encodes a custom/native type value to a string that can be embedded in a URL. Note that the\n * return value does *not* need to be URL-safe (i.e. passed through `encodeURIComponent()`), it\n * only needs to be a representation of `val` that has been coerced to a string.\n *\n * @param {*} val  The value to encode.\n * @param {string} key  The name of the parameter in which `val` is stored. Can be used for\n *        meta-programming of `Type` objects.\n * @returns {string}  Returns a string representation of `val` that can be encoded in a URL.\n */\nType.prototype.encode = function(val, key) {\n  return val;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#decode\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Converts a parameter value (from URL string or transition param) to a custom/native value.\n *\n * @param {string} val  The URL parameter value to decode.\n * @param {string} key  The name of the parameter in which `val` is stored. Can be used for\n *        meta-programming of `Type` objects.\n * @returns {*}  Returns a custom representation of the URL parameter value.\n */\nType.prototype.decode = function(val, key) {\n  return val;\n};\n\n/**\n * @ngdoc function\n * @name ui.router.util.type:Type#equals\n * @methodOf ui.router.util.type:Type\n *\n * @description\n * Determines whether two decoded values are equivalent.\n *\n * @param {*} a  A value to compare against.\n * @param {*} b  A value to compare against.\n * @returns {Boolean}  Returns `true` if the values are equivalent/equal, otherwise `false`.\n */\nType.prototype.equals = function(a, b) {\n  return a == b;\n};\n\nType.prototype.$subPattern = function() {\n  var sub = this.pattern.toString();\n  return sub.substr(1, sub.length - 2);\n};\n\nType.prototype.pattern = /.*/;\n\nType.prototype.toString = function() { return \"{Type:\" + this.name + \"}\"; };\n\n/** Given an encoded string, or a decoded object, returns a decoded object */\nType.prototype.$normalize = function(val) {\n  return this.is(val) ? val : this.decode(val);\n};\n\n/*\n * Wraps an existing custom Type as an array of Type, depending on 'mode'.\n * e.g.:\n * - urlmatcher pattern \"/path?{queryParam[]:int}\"\n * - url: \"/path?queryParam=1&queryParam=2\n * - $stateParams.queryParam will be [1, 2]\n * if `mode` is \"auto\", then\n * - url: \"/path?queryParam=1 will create $stateParams.queryParam: 1\n * - url: \"/path?queryParam=1&queryParam=2 will create $stateParams.queryParam: [1, 2]\n */\nType.prototype.$asArray = function(mode, isSearch) {\n  if (!mode) return this;\n  if (mode === \"auto\" && !isSearch) throw new Error(\"'auto' array mode is for query parameters only\");\n\n  function ArrayType(type, mode) {\n    function bindTo(type, callbackName) {\n      return function() {\n        return type[callbackName].apply(type, arguments);\n      };\n    }\n\n    // Wrap non-array value as array\n    function arrayWrap(val) { return isArray(val) ? val : (isDefined(val) ? [ val ] : []); }\n    // Unwrap array value for \"auto\" mode. Return undefined for empty array.\n    function arrayUnwrap(val) {\n      switch(val.length) {\n        case 0: return undefined;\n        case 1: return mode === \"auto\" ? val[0] : val;\n        default: return val;\n      }\n    }\n    function falsey(val) { return !val; }\n\n    // Wraps type (.is/.encode/.decode) functions to operate on each value of an array\n    function arrayHandler(callback, allTruthyMode) {\n      return function handleArray(val) {\n        val = arrayWrap(val);\n        var result = map(val, callback);\n        if (allTruthyMode === true)\n          return filter(result, falsey).length === 0;\n        return arrayUnwrap(result);\n      };\n    }\n\n    // Wraps type (.equals) functions to operate on each value of an array\n    function arrayEqualsHandler(callback) {\n      return function handleArray(val1, val2) {\n        var left = arrayWrap(val1), right = arrayWrap(val2);\n        if (left.length !== right.length) return false;\n        for (var i = 0; i < left.length; i++) {\n          if (!callback(left[i], right[i])) return false;\n        }\n        return true;\n      };\n    }\n\n    this.encode = arrayHandler(bindTo(type, 'encode'));\n    this.decode = arrayHandler(bindTo(type, 'decode'));\n    this.is     = arrayHandler(bindTo(type, 'is'), true);\n    this.equals = arrayEqualsHandler(bindTo(type, 'equals'));\n    this.pattern = type.pattern;\n    this.$normalize = arrayHandler(bindTo(type, '$normalize'));\n    this.name = type.name;\n    this.$arrayMode = mode;\n  }\n\n  return new ArrayType(this, mode);\n};\n\n\n\n/**\n * @ngdoc object\n * @name ui.router.util.$urlMatcherFactory\n *\n * @description\n * Factory for {@link ui.router.util.type:UrlMatcher `UrlMatcher`} instances. The factory\n * is also available to providers under the name `$urlMatcherFactoryProvider`.\n */\nfunction $UrlMatcherFactory() {\n  $$UMFP = this;\n\n  var isCaseInsensitive = false, isStrictMode = true, defaultSquashPolicy = false;\n\n  function valToString(val) { return val != null ? val.toString().replace(/\\//g, \"%2F\") : val; }\n  function valFromString(val) { return val != null ? val.toString().replace(/%2F/g, \"/\") : val; }\n\n  var $types = {}, enqueue = true, typeQueue = [], injector, defaultTypes = {\n    string: {\n      encode: valToString,\n      decode: valFromString,\n      // TODO: in 1.0, make string .is() return false if value is undefined/null by default.\n      // In 0.2.x, string params are optional by default for backwards compat\n      is: function(val) { return val == null || !isDefined(val) || typeof val === \"string\"; },\n      pattern: /[^/]*/\n    },\n    int: {\n      encode: valToString,\n      decode: function(val) { return parseInt(val, 10); },\n      is: function(val) { return isDefined(val) && this.decode(val.toString()) === val; },\n      pattern: /\\d+/\n    },\n    bool: {\n      encode: function(val) { return val ? 1 : 0; },\n      decode: function(val) { return parseInt(val, 10) !== 0; },\n      is: function(val) { return val === true || val === false; },\n      pattern: /0|1/\n    },\n    date: {\n      encode: function (val) {\n        if (!this.is(val))\n          return undefined;\n        return [ val.getFullYear(),\n          ('0' + (val.getMonth() + 1)).slice(-2),\n          ('0' + val.getDate()).slice(-2)\n        ].join(\"-\");\n      },\n      decode: function (val) {\n        if (this.is(val)) return val;\n        var match = this.capture.exec(val);\n        return match ? new Date(match[1], match[2] - 1, match[3]) : undefined;\n      },\n      is: function(val) { return val instanceof Date && !isNaN(val.valueOf()); },\n      equals: function (a, b) { return this.is(a) && this.is(b) && a.toISOString() === b.toISOString(); },\n      pattern: /[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,\n      capture: /([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/\n    },\n    json: {\n      encode: angular.toJson,\n      decode: angular.fromJson,\n      is: angular.isObject,\n      equals: angular.equals,\n      pattern: /[^/]*/\n    },\n    any: { // does not encode/decode\n      encode: angular.identity,\n      decode: angular.identity,\n      equals: angular.equals,\n      pattern: /.*/\n    }\n  };\n\n  function getDefaultConfig() {\n    return {\n      strict: isStrictMode,\n      caseInsensitive: isCaseInsensitive\n    };\n  }\n\n  function isInjectable(value) {\n    return (isFunction(value) || (isArray(value) && isFunction(value[value.length - 1])));\n  }\n\n  /**\n   * [Internal] Get the default value of a parameter, which may be an injectable function.\n   */\n  $UrlMatcherFactory.$$getDefaultValue = function(config) {\n    if (!isInjectable(config.value)) return config.value;\n    if (!injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n    return injector.invoke(config.value);\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#caseInsensitive\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Defines whether URL matching should be case sensitive (the default behavior), or not.\n   *\n   * @param {boolean} value `false` to match URL in a case sensitive manner; otherwise `true`;\n   * @returns {boolean} the current value of caseInsensitive\n   */\n  this.caseInsensitive = function(value) {\n    if (isDefined(value))\n      isCaseInsensitive = value;\n    return isCaseInsensitive;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#strictMode\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Defines whether URLs should match trailing slashes, or not (the default behavior).\n   *\n   * @param {boolean=} value `false` to match trailing slashes in URLs, otherwise `true`.\n   * @returns {boolean} the current value of strictMode\n   */\n  this.strictMode = function(value) {\n    if (isDefined(value))\n      isStrictMode = value;\n    return isStrictMode;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#defaultSquashPolicy\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Sets the default behavior when generating or matching URLs with default parameter values.\n   *\n   * @param {string} value A string that defines the default parameter URL squashing behavior.\n   *    `nosquash`: When generating an href with a default parameter value, do not squash the parameter value from the URL\n   *    `slash`: When generating an href with a default parameter value, squash (remove) the parameter value, and, if the\n   *             parameter is surrounded by slashes, squash (remove) one slash from the URL\n   *    any other string, e.g. \"~\": When generating an href with a default parameter value, squash (remove)\n   *             the parameter value from the URL and replace it with this string.\n   */\n  this.defaultSquashPolicy = function(value) {\n    if (!isDefined(value)) return defaultSquashPolicy;\n    if (value !== true && value !== false && !isString(value))\n      throw new Error(\"Invalid squash policy: \" + value + \". Valid policies: false, true, arbitrary-string\");\n    defaultSquashPolicy = value;\n    return value;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#compile\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Creates a {@link ui.router.util.type:UrlMatcher `UrlMatcher`} for the specified pattern.\n   *\n   * @param {string} pattern  The URL pattern.\n   * @param {Object} config  The config object hash.\n   * @returns {UrlMatcher}  The UrlMatcher.\n   */\n  this.compile = function (pattern, config) {\n    return new UrlMatcher(pattern, extend(getDefaultConfig(), config));\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#isMatcher\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Returns true if the specified object is a `UrlMatcher`, or false otherwise.\n   *\n   * @param {Object} object  The object to perform the type check against.\n   * @returns {Boolean}  Returns `true` if the object matches the `UrlMatcher` interface, by\n   *          implementing all the same methods.\n   */\n  this.isMatcher = function (o) {\n    if (!isObject(o)) return false;\n    var result = true;\n\n    forEach(UrlMatcher.prototype, function(val, name) {\n      if (isFunction(val)) {\n        result = result && (isDefined(o[name]) && isFunction(o[name]));\n      }\n    });\n    return result;\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.util.$urlMatcherFactory#type\n   * @methodOf ui.router.util.$urlMatcherFactory\n   *\n   * @description\n   * Registers a custom {@link ui.router.util.type:Type `Type`} object that can be used to\n   * generate URLs with typed parameters.\n   *\n   * @param {string} name  The type name.\n   * @param {Object|Function} definition   The type definition. See\n   *        {@link ui.router.util.type:Type `Type`} for information on the values accepted.\n   * @param {Object|Function} definitionFn (optional) A function that is injected before the app\n   *        runtime starts.  The result of this function is merged into the existing `definition`.\n   *        See {@link ui.router.util.type:Type `Type`} for information on the values accepted.\n   *\n   * @returns {Object}  Returns `$urlMatcherFactoryProvider`.\n   *\n   * @example\n   * This is a simple example of a custom type that encodes and decodes items from an\n   * array, using the array index as the URL-encoded value:\n   *\n   * <pre>\n   * var list = ['John', 'Paul', 'George', 'Ringo'];\n   *\n   * $urlMatcherFactoryProvider.type('listItem', {\n   *   encode: function(item) {\n   *     // Represent the list item in the URL using its corresponding index\n   *     return list.indexOf(item);\n   *   },\n   *   decode: function(item) {\n   *     // Look up the list item by index\n   *     return list[parseInt(item, 10)];\n   *   },\n   *   is: function(item) {\n   *     // Ensure the item is valid by checking to see that it appears\n   *     // in the list\n   *     return list.indexOf(item) > -1;\n   *   }\n   * });\n   *\n   * $stateProvider.state('list', {\n   *   url: \"/list/{item:listItem}\",\n   *   controller: function($scope, $stateParams) {\n   *     console.log($stateParams.item);\n   *   }\n   * });\n   *\n   * // ...\n   *\n   * // Changes URL to '/list/3', logs \"Ringo\" to the console\n   * $state.go('list', { item: \"Ringo\" });\n   * </pre>\n   *\n   * This is a more complex example of a type that relies on dependency injection to\n   * interact with services, and uses the parameter name from the URL to infer how to\n   * handle encoding and decoding parameter values:\n   *\n   * <pre>\n   * // Defines a custom type that gets a value from a service,\n   * // where each service gets different types of values from\n   * // a backend API:\n   * $urlMatcherFactoryProvider.type('dbObject', {}, function(Users, Posts) {\n   *\n   *   // Matches up services to URL parameter names\n   *   var services = {\n   *     user: Users,\n   *     post: Posts\n   *   };\n   *\n   *   return {\n   *     encode: function(object) {\n   *       // Represent the object in the URL using its unique ID\n   *       return object.id;\n   *     },\n   *     decode: function(value, key) {\n   *       // Look up the object by ID, using the parameter\n   *       // name (key) to call the correct service\n   *       return services[key].findById(value);\n   *     },\n   *     is: function(object, key) {\n   *       // Check that object is a valid dbObject\n   *       return angular.isObject(object) && object.id && services[key];\n   *     }\n   *     equals: function(a, b) {\n   *       // Check the equality of decoded objects by comparing\n   *       // their unique IDs\n   *       return a.id === b.id;\n   *     }\n   *   };\n   * });\n   *\n   * // In a config() block, you can then attach URLs with\n   * // type-annotated parameters:\n   * $stateProvider.state('users', {\n   *   url: \"/users\",\n   *   // ...\n   * }).state('users.item', {\n   *   url: \"/{user:dbObject}\",\n   *   controller: function($scope, $stateParams) {\n   *     // $stateParams.user will now be an object returned from\n   *     // the Users service\n   *   },\n   *   // ...\n   * });\n   * </pre>\n   */\n  this.type = function (name, definition, definitionFn) {\n    if (!isDefined(definition)) return $types[name];\n    if ($types.hasOwnProperty(name)) throw new Error(\"A type named '\" + name + \"' has already been defined.\");\n\n    $types[name] = new Type(extend({ name: name }, definition));\n    if (definitionFn) {\n      typeQueue.push({ name: name, def: definitionFn });\n      if (!enqueue) flushTypeQueue();\n    }\n    return this;\n  };\n\n  // `flushTypeQueue()` waits until `$urlMatcherFactory` is injected before invoking the queued `definitionFn`s\n  function flushTypeQueue() {\n    while(typeQueue.length) {\n      var type = typeQueue.shift();\n      if (type.pattern) throw new Error(\"You cannot override a type's .pattern at runtime.\");\n      angular.extend($types[type.name], injector.invoke(type.def));\n    }\n  }\n\n  // Register default types. Store them in the prototype of $types.\n  forEach(defaultTypes, function(type, name) { $types[name] = new Type(extend({name: name}, type)); });\n  $types = inherit($types, {});\n\n  /* No need to document $get, since it returns this */\n  this.$get = ['$injector', function ($injector) {\n    injector = $injector;\n    enqueue = false;\n    flushTypeQueue();\n\n    forEach(defaultTypes, function(type, name) {\n      if (!$types[name]) $types[name] = new Type(type);\n    });\n    return this;\n  }];\n\n  this.Param = function Param(id, type, config, location) {\n    var self = this;\n    config = unwrapShorthand(config);\n    type = getType(config, type, location);\n    var arrayMode = getArrayMode();\n    type = arrayMode ? type.$asArray(arrayMode, location === \"search\") : type;\n    if (type.name === \"string\" && !arrayMode && location === \"path\" && config.value === undefined)\n      config.value = \"\"; // for 0.2.x; in 0.3.0+ do not automatically default to \"\"\n    var isOptional = config.value !== undefined;\n    var squash = getSquashPolicy(config, isOptional);\n    var replace = getReplace(config, arrayMode, isOptional, squash);\n\n    function unwrapShorthand(config) {\n      var keys = isObject(config) ? objectKeys(config) : [];\n      var isShorthand = indexOf(keys, \"value\") === -1 && indexOf(keys, \"type\") === -1 &&\n                        indexOf(keys, \"squash\") === -1 && indexOf(keys, \"array\") === -1;\n      if (isShorthand) config = { value: config };\n      config.$$fn = isInjectable(config.value) ? config.value : function () { return config.value; };\n      return config;\n    }\n\n    function getType(config, urlType, location) {\n      if (config.type && urlType) throw new Error(\"Param '\"+id+\"' has two type configurations.\");\n      if (urlType) return urlType;\n      if (!config.type) return (location === \"config\" ? $types.any : $types.string);\n      return config.type instanceof Type ? config.type : new Type(config.type);\n    }\n\n    // array config: param name (param[]) overrides default settings.  explicit config overrides param name.\n    function getArrayMode() {\n      var arrayDefaults = { array: (location === \"search\" ? \"auto\" : false) };\n      var arrayParamNomenclature = id.match(/\\[\\]$/) ? { array: true } : {};\n      return extend(arrayDefaults, arrayParamNomenclature, config).array;\n    }\n\n    /**\n     * returns false, true, or the squash value to indicate the \"default parameter url squash policy\".\n     */\n    function getSquashPolicy(config, isOptional) {\n      var squash = config.squash;\n      if (!isOptional || squash === false) return false;\n      if (!isDefined(squash) || squash == null) return defaultSquashPolicy;\n      if (squash === true || isString(squash)) return squash;\n      throw new Error(\"Invalid squash policy: '\" + squash + \"'. Valid policies: false, true, or arbitrary string\");\n    }\n\n    function getReplace(config, arrayMode, isOptional, squash) {\n      var replace, configuredKeys, defaultPolicy = [\n        { from: \"\",   to: (isOptional || arrayMode ? undefined : \"\") },\n        { from: null, to: (isOptional || arrayMode ? undefined : \"\") }\n      ];\n      replace = isArray(config.replace) ? config.replace : [];\n      if (isString(squash))\n        replace.push({ from: squash, to: undefined });\n      configuredKeys = map(replace, function(item) { return item.from; } );\n      return filter(defaultPolicy, function(item) { return indexOf(configuredKeys, item.from) === -1; }).concat(replace);\n    }\n\n    /**\n     * [Internal] Get the default value of a parameter, which may be an injectable function.\n     */\n    function $$getDefaultValue() {\n      if (!injector) throw new Error(\"Injectable functions cannot be called at configuration time\");\n      var defaultValue = injector.invoke(config.$$fn);\n      if (defaultValue !== null && defaultValue !== undefined && !self.type.is(defaultValue))\n        throw new Error(\"Default value (\" + defaultValue + \") for parameter '\" + self.id + \"' is not an instance of Type (\" + self.type.name + \")\");\n      return defaultValue;\n    }\n\n    /**\n     * [Internal] Gets the decoded representation of a value if the value is defined, otherwise, returns the\n     * default value, which may be the result of an injectable function.\n     */\n    function $value(value) {\n      function hasReplaceVal(val) { return function(obj) { return obj.from === val; }; }\n      function $replace(value) {\n        var replacement = map(filter(self.replace, hasReplaceVal(value)), function(obj) { return obj.to; });\n        return replacement.length ? replacement[0] : value;\n      }\n      value = $replace(value);\n      return !isDefined(value) ? $$getDefaultValue() : self.type.$normalize(value);\n    }\n\n    function toString() { return \"{Param:\" + id + \" \" + type + \" squash: '\" + squash + \"' optional: \" + isOptional + \"}\"; }\n\n    extend(this, {\n      id: id,\n      type: type,\n      location: location,\n      array: arrayMode,\n      squash: squash,\n      replace: replace,\n      isOptional: isOptional,\n      value: $value,\n      dynamic: undefined,\n      config: config,\n      toString: toString\n    });\n  };\n\n  function ParamSet(params) {\n    extend(this, params || {});\n  }\n\n  ParamSet.prototype = {\n    $$new: function() {\n      return inherit(this, extend(new ParamSet(), { $$parent: this}));\n    },\n    $$keys: function () {\n      var keys = [], chain = [], parent = this,\n        ignore = objectKeys(ParamSet.prototype);\n      while (parent) { chain.push(parent); parent = parent.$$parent; }\n      chain.reverse();\n      forEach(chain, function(paramset) {\n        forEach(objectKeys(paramset), function(key) {\n            if (indexOf(keys, key) === -1 && indexOf(ignore, key) === -1) keys.push(key);\n        });\n      });\n      return keys;\n    },\n    $$values: function(paramValues) {\n      var values = {}, self = this;\n      forEach(self.$$keys(), function(key) {\n        values[key] = self[key].value(paramValues && paramValues[key]);\n      });\n      return values;\n    },\n    $$equals: function(paramValues1, paramValues2) {\n      var equal = true, self = this;\n      forEach(self.$$keys(), function(key) {\n        var left = paramValues1 && paramValues1[key], right = paramValues2 && paramValues2[key];\n        if (!self[key].type.equals(left, right)) equal = false;\n      });\n      return equal;\n    },\n    $$validates: function $$validate(paramValues) {\n      var keys = this.$$keys(), i, param, rawVal, normalized, encoded;\n      for (i = 0; i < keys.length; i++) {\n        param = this[keys[i]];\n        rawVal = paramValues[keys[i]];\n        if ((rawVal === undefined || rawVal === null) && param.isOptional)\n          break; // There was no parameter value, but the param is optional\n        normalized = param.type.$normalize(rawVal);\n        if (!param.type.is(normalized))\n          return false; // The value was not of the correct Type, and could not be decoded to the correct Type\n        encoded = param.type.encode(normalized);\n        if (angular.isString(encoded) && !param.type.pattern.exec(encoded))\n          return false; // The value was of the correct type, but when encoded, did not match the Type's regexp\n      }\n      return true;\n    },\n    $$parent: undefined\n  };\n\n  this.ParamSet = ParamSet;\n}\n\n// Register as a provider so it's available to other providers\nangular.module('ui.router.util').provider('$urlMatcherFactory', $UrlMatcherFactory);\nangular.module('ui.router.util').run(['$urlMatcherFactory', function($urlMatcherFactory) { }]);\n\n/**\n * @ngdoc object\n * @name ui.router.router.$urlRouterProvider\n *\n * @requires ui.router.util.$urlMatcherFactoryProvider\n * @requires $locationProvider\n *\n * @description\n * `$urlRouterProvider` has the responsibility of watching `$location`. \n * When `$location` changes it runs through a list of rules one by one until a \n * match is found. `$urlRouterProvider` is used behind the scenes anytime you specify \n * a url in a state configuration. All urls are compiled into a UrlMatcher object.\n *\n * There are several methods on `$urlRouterProvider` that make it useful to use directly\n * in your module config.\n */\n$UrlRouterProvider.$inject = ['$locationProvider', '$urlMatcherFactoryProvider'];\nfunction $UrlRouterProvider(   $locationProvider,   $urlMatcherFactory) {\n  var rules = [], otherwise = null, interceptDeferred = false, listener;\n\n  // Returns a string that is a prefix of all strings matching the RegExp\n  function regExpPrefix(re) {\n    var prefix = /^\\^((?:\\\\[^a-zA-Z0-9]|[^\\\\\\[\\]\\^$*+?.()|{}]+)*)/.exec(re.source);\n    return (prefix != null) ? prefix[1].replace(/\\\\(.)/g, \"$1\") : '';\n  }\n\n  // Interpolates matched values into a String.replace()-style pattern\n  function interpolate(pattern, match) {\n    return pattern.replace(/\\$(\\$|\\d{1,2})/, function (m, what) {\n      return match[what === '$' ? 0 : Number(what)];\n    });\n  }\n\n  /**\n   * @ngdoc function\n   * @name ui.router.router.$urlRouterProvider#rule\n   * @methodOf ui.router.router.$urlRouterProvider\n   *\n   * @description\n   * Defines rules that are used by `$urlRouterProvider` to find matches for\n   * specific URLs.\n   *\n   * @example\n   * <pre>\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *   // Here's an example of how you might allow case insensitive urls\n   *   $urlRouterProvider.rule(function ($injector, $location) {\n   *     var path = $location.path(),\n   *         normalized = path.toLowerCase();\n   *\n   *     if (path !== normalized) {\n   *       return normalized;\n   *     }\n   *   });\n   * });\n   * </pre>\n   *\n   * @param {object} rule Handler function that takes `$injector` and `$location`\n   * services as arguments. You can use them to return a valid path as a string.\n   *\n   * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n   */\n  this.rule = function (rule) {\n    if (!isFunction(rule)) throw new Error(\"'rule' must be a function\");\n    rules.push(rule);\n    return this;\n  };\n\n  /**\n   * @ngdoc object\n   * @name ui.router.router.$urlRouterProvider#otherwise\n   * @methodOf ui.router.router.$urlRouterProvider\n   *\n   * @description\n   * Defines a path that is used when an invalid route is requested.\n   *\n   * @example\n   * <pre>\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *   // if the path doesn't match any of the urls you configured\n   *   // otherwise will take care of routing the user to the\n   *   // specified url\n   *   $urlRouterProvider.otherwise('/index');\n   *\n   *   // Example of using function rule as param\n   *   $urlRouterProvider.otherwise(function ($injector, $location) {\n   *     return '/a/valid/url';\n   *   });\n   * });\n   * </pre>\n   *\n   * @param {string|object} rule The url path you want to redirect to or a function \n   * rule that returns the url path. The function version is passed two params: \n   * `$injector` and `$location` services, and must return a url string.\n   *\n   * @return {object} `$urlRouterProvider` - `$urlRouterProvider` instance\n   */\n  this.otherwise = function (rule) {\n    if (isString(rule)) {\n      var redirect = rule;\n      rule = function () { return redirect; };\n    }\n    else if (!isFunction(rule)) throw new Error(\"'rule' must be a function\");\n    otherwise = rule;\n    return this;\n  };\n\n\n  function handleIfMatch($injector, handler, match) {\n    if (!match) return false;\n    var result = $injector.invoke(handler, handler, { $match: match });\n    return isDefined(result) ? result : true;\n  }\n\n  /**\n   * @ngdoc function\n   * @name ui.router.router.$urlRouterProvider#when\n   * @methodOf ui.router.router.$urlRouterProvider\n   *\n   * @description\n   * Registers a handler for a given url matching. if handle is a string, it is\n   * treated as a redirect, and is interpolated according to the syntax of match\n   * (i.e. like `String.replace()` for `RegExp`, or like a `UrlMatcher` pattern otherwise).\n   *\n   * If the handler is a function, it is injectable. It gets invoked if `$location`\n   * matches. You have the option of inject the match object as `$match`.\n   *\n   * The handler can return\n   *\n   * - **falsy** to indicate that the rule didn't match after all, then `$urlRouter`\n   *   will continue trying to find another one that matches.\n   * - **string** which is treated as a redirect and passed to `$location.url()`\n   * - **void** or any **truthy** value tells `$urlRouter` that the url was handled.\n   *\n   * @example\n   * <pre>\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *   $urlRouterProvider.when($state.url, function ($match, $stateParams) {\n   *     if ($state.$current.navigable !== state ||\n   *         !equalForKeys($match, $stateParams) {\n   *      $state.transitionTo(state, $match, false);\n   *     }\n   *   });\n   * });\n   * </pre>\n   *\n   * @param {string|object} what The incoming path that you want to redirect.\n   * @param {string|object} handler The path you want to redirect your user to.\n   */\n  this.when = function (what, handler) {\n    var redirect, handlerIsString = isString(handler);\n    if (isString(what)) what = $urlMatcherFactory.compile(what);\n\n    if (!handlerIsString && !isFunction(handler) && !isArray(handler))\n      throw new Error(\"invalid 'handler' in when()\");\n\n    var strategies = {\n      matcher: function (what, handler) {\n        if (handlerIsString) {\n          redirect = $urlMatcherFactory.compile(handler);\n          handler = ['$match', function ($match) { return redirect.format($match); }];\n        }\n        return extend(function ($injector, $location) {\n          return handleIfMatch($injector, handler, what.exec($location.path(), $location.search()));\n        }, {\n          prefix: isString(what.prefix) ? what.prefix : ''\n        });\n      },\n      regex: function (what, handler) {\n        if (what.global || what.sticky) throw new Error(\"when() RegExp must not be global or sticky\");\n\n        if (handlerIsString) {\n          redirect = handler;\n          handler = ['$match', function ($match) { return interpolate(redirect, $match); }];\n        }\n        return extend(function ($injector, $location) {\n          return handleIfMatch($injector, handler, what.exec($location.path()));\n        }, {\n          prefix: regExpPrefix(what)\n        });\n      }\n    };\n\n    var check = { matcher: $urlMatcherFactory.isMatcher(what), regex: what instanceof RegExp };\n\n    for (var n in check) {\n      if (check[n]) return this.rule(strategies[n](what, handler));\n    }\n\n    throw new Error(\"invalid 'what' in when()\");\n  };\n\n  /**\n   * @ngdoc function\n   * @name ui.router.router.$urlRouterProvider#deferIntercept\n   * @methodOf ui.router.router.$urlRouterProvider\n   *\n   * @description\n   * Disables (or enables) deferring location change interception.\n   *\n   * If you wish to customize the behavior of syncing the URL (for example, if you wish to\n   * defer a transition but maintain the current URL), call this method at configuration time.\n   * Then, at run time, call `$urlRouter.listen()` after you have configured your own\n   * `$locationChangeSuccess` event handler.\n   *\n   * @example\n   * <pre>\n   * var app = angular.module('app', ['ui.router.router']);\n   *\n   * app.config(function ($urlRouterProvider) {\n   *\n   *   // Prevent $urlRouter from automatically intercepting URL changes;\n   *   // this allows you to configure custom behavior in between\n   *   // location changes and route synchronization:\n   *   $urlRouterProvider.deferIntercept();\n   *\n   * }).run(function ($rootScope, $urlRouter, UserService) {\n   *\n   *   $rootScope.$on('$locationChangeSuccess', function(e) {\n   *     // UserService is an example service for managing user state\n   *     if (UserService.isLoggedIn()) return;\n   *\n   *     // Prevent $urlRouter's default handler from firing\n   *     e.preventDefault();\n   *\n   *     UserService.handleLogin().then(function() {\n   *       // Once the user has logged in, sync the current URL\n   *       // to the router:\n   *       $urlRouter.sync();\n   *     });\n   *   });\n   *\n   *   // Configures $urlRouter's listener *after* your custom listener\n   *   $urlRouter.listen();\n   * });\n   * </pre>\n   *\n   * @param {boolean} defer Indicates whether to defer location change interception. Passing\n            no parameter is equivalent to `true`.\n   */\n  this.deferIntercept = function (defer) {\n    if (defer === undefined) defer = true;\n    interceptDeferred = defer;\n  };\n\n  /**\n   * @ngdoc object\n   * @name ui.router.router.$urlRouter\n   *\n   * @requires $location\n   * @requires $rootScope\n   * @requires $injector\n   * @requires $browser\n   *\n   * @description\n   *\n   */\n  this.$get = $get;\n  $get.$inject = ['$location', '$rootScope', '$injector', '$browser'];\n  function $get(   $location,   $rootScope,   $injector,   $browser) {\n\n    var baseHref = $browser.baseHref(), location = $location.url(), lastPushedUrl;\n\n    function appendBasePath(url, isHtml5, absolute) {\n      if (baseHref === '/') return url;\n      if (isHtml5) return baseHref.slice(0, -1) + url;\n      if (absolute) return baseHref.slice(1) + url;\n      return url;\n    }\n\n    // TODO: Optimize groups of rules with non-empty prefix into some sort of decision tree\n    function update(evt) {\n      if (evt && evt.defaultPrevented) return;\n      var ignoreUpdate = lastPushedUrl && $location.url() === lastPushedUrl;\n      lastPushedUrl = undefined;\n      // TODO: Re-implement this in 1.0 for https://github.com/angular-ui/ui-router/issues/1573\n      //if (ignoreUpdate) return true;\n\n      function check(rule) {\n        var handled = rule($injector, $location);\n\n        if (!handled) return false;\n        if (isString(handled)) $location.replace().url(handled);\n        return true;\n      }\n      var n = rules.length, i;\n\n      for (i = 0; i < n; i++) {\n        if (check(rules[i])) return;\n      }\n      // always check otherwise last to allow dynamic updates to the set of rules\n      if (otherwise) check(otherwise);\n    }\n\n    function listen() {\n      listener = listener || $rootScope.$on('$locationChangeSuccess', update);\n      return listener;\n    }\n\n    if (!interceptDeferred) listen();\n\n    return {\n      /**\n       * @ngdoc function\n       * @name ui.router.router.$urlRouter#sync\n       * @methodOf ui.router.router.$urlRouter\n       *\n       * @description\n       * Triggers an update; the same update that happens when the address bar url changes, aka `$locationChangeSuccess`.\n       * This method is useful when you need to use `preventDefault()` on the `$locationChangeSuccess` event,\n       * perform some custom logic (route protection, auth, config, redirection, etc) and then finally proceed\n       * with the transition by calling `$urlRouter.sync()`.\n       *\n       * @example\n       * <pre>\n       * angular.module('app', ['ui.router'])\n       *   .run(function($rootScope, $urlRouter) {\n       *     $rootScope.$on('$locationChangeSuccess', function(evt) {\n       *       // Halt state change from even starting\n       *       evt.preventDefault();\n       *       // Perform custom logic\n       *       var meetsRequirement = ...\n       *       // Continue with the update and state transition if logic allows\n       *       if (meetsRequirement) $urlRouter.sync();\n       *     });\n       * });\n       * </pre>\n       */\n      sync: function() {\n        update();\n      },\n\n      listen: function() {\n        return listen();\n      },\n\n      update: function(read) {\n        if (read) {\n          location = $location.url();\n          return;\n        }\n        if ($location.url() === location) return;\n\n        $location.url(location);\n        $location.replace();\n      },\n\n      push: function(urlMatcher, params, options) {\n         var url = urlMatcher.format(params || {});\n\n        // Handle the special hash param, if needed\n        if (url !== null && params && params['#']) {\n            url += '#' + params['#'];\n        }\n\n        $location.url(url);\n        lastPushedUrl = options && options.$$avoidResync ? $location.url() : undefined;\n        if (options && options.replace) $location.replace();\n      },\n\n      /**\n       * @ngdoc function\n       * @name ui.router.router.$urlRouter#href\n       * @methodOf ui.router.router.$urlRouter\n       *\n       * @description\n       * A URL generation method that returns the compiled URL for a given\n       * {@link ui.router.util.type:UrlMatcher `UrlMatcher`}, populated with the provided parameters.\n       *\n       * @example\n       * <pre>\n       * $bob = $urlRouter.href(new UrlMatcher(\"/about/:person\"), {\n       *   person: \"bob\"\n       * });\n       * // $bob == \"/about/bob\";\n       * </pre>\n       *\n       * @param {UrlMatcher} urlMatcher The `UrlMatcher` object which is used as the template of the URL to generate.\n       * @param {object=} params An object of parameter values to fill the matcher's required parameters.\n       * @param {object=} options Options object. The options are:\n       *\n       * - **`absolute`** - {boolean=false},  If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n       *\n       * @returns {string} Returns the fully compiled URL, or `null` if `params` fail validation against `urlMatcher`\n       */\n      href: function(urlMatcher, params, options) {\n        if (!urlMatcher.validates(params)) return null;\n\n        var isHtml5 = $locationProvider.html5Mode();\n        if (angular.isObject(isHtml5)) {\n          isHtml5 = isHtml5.enabled;\n        }\n        \n        var url = urlMatcher.format(params);\n        options = options || {};\n\n        if (!isHtml5 && url !== null) {\n          url = \"#\" + $locationProvider.hashPrefix() + url;\n        }\n\n        // Handle special hash param, if needed\n        if (url !== null && params && params['#']) {\n          url += '#' + params['#'];\n        }\n\n        url = appendBasePath(url, isHtml5, options.absolute);\n\n        if (!options.absolute || !url) {\n          return url;\n        }\n\n        var slash = (!isHtml5 && url ? '/' : ''), port = $location.port();\n        port = (port === 80 || port === 443 ? '' : ':' + port);\n\n        return [$location.protocol(), '://', $location.host(), port, slash, url].join('');\n      }\n    };\n  }\n}\n\nangular.module('ui.router.router').provider('$urlRouter', $UrlRouterProvider);\n\n/**\n * @ngdoc object\n * @name ui.router.state.$stateProvider\n *\n * @requires ui.router.router.$urlRouterProvider\n * @requires ui.router.util.$urlMatcherFactoryProvider\n *\n * @description\n * The new `$stateProvider` works similar to Angular's v1 router, but it focuses purely\n * on state.\n *\n * A state corresponds to a \"place\" in the application in terms of the overall UI and\n * navigation. A state describes (via the controller / template / view properties) what\n * the UI looks like and does at that place.\n *\n * States often have things in common, and the primary way of factoring out these\n * commonalities in this model is via the state hierarchy, i.e. parent/child states aka\n * nested states.\n *\n * The `$stateProvider` provides interfaces to declare these states for your app.\n */\n$StateProvider.$inject = ['$urlRouterProvider', '$urlMatcherFactoryProvider'];\nfunction $StateProvider(   $urlRouterProvider,   $urlMatcherFactory) {\n\n  var root, states = {}, $state, queue = {}, abstractKey = 'abstract';\n\n  // Builds state properties from definition passed to registerState()\n  var stateBuilder = {\n\n    // Derive parent state from a hierarchical name only if 'parent' is not explicitly defined.\n    // state.children = [];\n    // if (parent) parent.children.push(state);\n    parent: function(state) {\n      if (isDefined(state.parent) && state.parent) return findState(state.parent);\n      // regex matches any valid composite state name\n      // would match \"contact.list\" but not \"contacts\"\n      var compositeName = /^(.+)\\.[^.]+$/.exec(state.name);\n      return compositeName ? findState(compositeName[1]) : root;\n    },\n\n    // inherit 'data' from parent and override by own values (if any)\n    data: function(state) {\n      if (state.parent && state.parent.data) {\n        state.data = state.self.data = extend({}, state.parent.data, state.data);\n      }\n      return state.data;\n    },\n\n    // Build a URLMatcher if necessary, either via a relative or absolute URL\n    url: function(state) {\n      var url = state.url, config = { params: state.params || {} };\n\n      if (isString(url)) {\n        if (url.charAt(0) == '^') return $urlMatcherFactory.compile(url.substring(1), config);\n        return (state.parent.navigable || root).url.concat(url, config);\n      }\n\n      if (!url || $urlMatcherFactory.isMatcher(url)) return url;\n      throw new Error(\"Invalid url '\" + url + \"' in state '\" + state + \"'\");\n    },\n\n    // Keep track of the closest ancestor state that has a URL (i.e. is navigable)\n    navigable: function(state) {\n      return state.url ? state : (state.parent ? state.parent.navigable : null);\n    },\n\n    // Own parameters for this state. state.url.params is already built at this point. Create and add non-url params\n    ownParams: function(state) {\n      var params = state.url && state.url.params || new $$UMFP.ParamSet();\n      forEach(state.params || {}, function(config, id) {\n        if (!params[id]) params[id] = new $$UMFP.Param(id, null, config, \"config\");\n      });\n      return params;\n    },\n\n    // Derive parameters for this state and ensure they're a super-set of parent's parameters\n    params: function(state) {\n      return state.parent && state.parent.params ? extend(state.parent.params.$$new(), state.ownParams) : new $$UMFP.ParamSet();\n    },\n\n    // If there is no explicit multi-view configuration, make one up so we don't have\n    // to handle both cases in the view directive later. Note that having an explicit\n    // 'views' property will mean the default unnamed view properties are ignored. This\n    // is also a good time to resolve view names to absolute names, so everything is a\n    // straight lookup at link time.\n    views: function(state) {\n      var views = {};\n\n      forEach(isDefined(state.views) ? state.views : { '': state }, function (view, name) {\n        if (name.indexOf('@') < 0) name += '@' + state.parent.name;\n        views[name] = view;\n      });\n      return views;\n    },\n\n    // Keep a full path from the root down to this state as this is needed for state activation.\n    path: function(state) {\n      return state.parent ? state.parent.path.concat(state) : []; // exclude root from path\n    },\n\n    // Speed up $state.contains() as it's used a lot\n    includes: function(state) {\n      var includes = state.parent ? extend({}, state.parent.includes) : {};\n      includes[state.name] = true;\n      return includes;\n    },\n\n    $delegates: {}\n  };\n\n  function isRelative(stateName) {\n    return stateName.indexOf(\".\") === 0 || stateName.indexOf(\"^\") === 0;\n  }\n\n  function findState(stateOrName, base) {\n    if (!stateOrName) return undefined;\n\n    var isStr = isString(stateOrName),\n        name  = isStr ? stateOrName : stateOrName.name,\n        path  = isRelative(name);\n\n    if (path) {\n      if (!base) throw new Error(\"No reference point given for path '\"  + name + \"'\");\n      base = findState(base);\n      \n      var rel = name.split(\".\"), i = 0, pathLength = rel.length, current = base;\n\n      for (; i < pathLength; i++) {\n        if (rel[i] === \"\" && i === 0) {\n          current = base;\n          continue;\n        }\n        if (rel[i] === \"^\") {\n          if (!current.parent) throw new Error(\"Path '\" + name + \"' not valid for state '\" + base.name + \"'\");\n          current = current.parent;\n          continue;\n        }\n        break;\n      }\n      rel = rel.slice(i).join(\".\");\n      name = current.name + (current.name && rel ? \".\" : \"\") + rel;\n    }\n    var state = states[name];\n\n    if (state && (isStr || (!isStr && (state === stateOrName || state.self === stateOrName)))) {\n      return state;\n    }\n    return undefined;\n  }\n\n  function queueState(parentName, state) {\n    if (!queue[parentName]) {\n      queue[parentName] = [];\n    }\n    queue[parentName].push(state);\n  }\n\n  function flushQueuedChildren(parentName) {\n    var queued = queue[parentName] || [];\n    while(queued.length) {\n      registerState(queued.shift());\n    }\n  }\n\n  function registerState(state) {\n    // Wrap a new object around the state so we can store our private details easily.\n    state = inherit(state, {\n      self: state,\n      resolve: state.resolve || {},\n      toString: function() { return this.name; }\n    });\n\n    var name = state.name;\n    if (!isString(name) || name.indexOf('@') >= 0) throw new Error(\"State must have a valid name\");\n    if (states.hasOwnProperty(name)) throw new Error(\"State '\" + name + \"'' is already defined\");\n\n    // Get parent name\n    var parentName = (name.indexOf('.') !== -1) ? name.substring(0, name.lastIndexOf('.'))\n        : (isString(state.parent)) ? state.parent\n        : (isObject(state.parent) && isString(state.parent.name)) ? state.parent.name\n        : '';\n\n    // If parent is not registered yet, add state to queue and register later\n    if (parentName && !states[parentName]) {\n      return queueState(parentName, state.self);\n    }\n\n    for (var key in stateBuilder) {\n      if (isFunction(stateBuilder[key])) state[key] = stateBuilder[key](state, stateBuilder.$delegates[key]);\n    }\n    states[name] = state;\n\n    // Register the state in the global state list and with $urlRouter if necessary.\n    if (!state[abstractKey] && state.url) {\n      $urlRouterProvider.when(state.url, ['$match', '$stateParams', function ($match, $stateParams) {\n        if ($state.$current.navigable != state || !equalForKeys($match, $stateParams)) {\n          $state.transitionTo(state, $match, { inherit: true, location: false });\n        }\n      }]);\n    }\n\n    // Register any queued children\n    flushQueuedChildren(name);\n\n    return state;\n  }\n\n  // Checks text to see if it looks like a glob.\n  function isGlob (text) {\n    return text.indexOf('*') > -1;\n  }\n\n  // Returns true if glob matches current $state name.\n  function doesStateMatchGlob (glob) {\n    var globSegments = glob.split('.'),\n        segments = $state.$current.name.split('.');\n\n    //match single stars\n    for (var i = 0, l = globSegments.length; i < l; i++) {\n      if (globSegments[i] === '*') {\n        segments[i] = '*';\n      }\n    }\n\n    //match greedy starts\n    if (globSegments[0] === '**') {\n       segments = segments.slice(indexOf(segments, globSegments[1]));\n       segments.unshift('**');\n    }\n    //match greedy ends\n    if (globSegments[globSegments.length - 1] === '**') {\n       segments.splice(indexOf(segments, globSegments[globSegments.length - 2]) + 1, Number.MAX_VALUE);\n       segments.push('**');\n    }\n\n    if (globSegments.length != segments.length) {\n      return false;\n    }\n\n    return segments.join('') === globSegments.join('');\n  }\n\n\n  // Implicit root state that is always active\n  root = registerState({\n    name: '',\n    url: '^',\n    views: null,\n    'abstract': true\n  });\n  root.navigable = null;\n\n\n  /**\n   * @ngdoc function\n   * @name ui.router.state.$stateProvider#decorator\n   * @methodOf ui.router.state.$stateProvider\n   *\n   * @description\n   * Allows you to extend (carefully) or override (at your own peril) the \n   * `stateBuilder` object used internally by `$stateProvider`. This can be used \n   * to add custom functionality to ui-router, for example inferring templateUrl \n   * based on the state name.\n   *\n   * When passing only a name, it returns the current (original or decorated) builder\n   * function that matches `name`.\n   *\n   * The builder functions that can be decorated are listed below. Though not all\n   * necessarily have a good use case for decoration, that is up to you to decide.\n   *\n   * In addition, users can attach custom decorators, which will generate new \n   * properties within the state's internal definition. There is currently no clear \n   * use-case for this beyond accessing internal states (i.e. $state.$current), \n   * however, expect this to become increasingly relevant as we introduce additional \n   * meta-programming features.\n   *\n   * **Warning**: Decorators should not be interdependent because the order of \n   * execution of the builder functions in non-deterministic. Builder functions \n   * should only be dependent on the state definition object and super function.\n   *\n   *\n   * Existing builder functions and current return values:\n   *\n   * - **parent** `{object}` - returns the parent state object.\n   * - **data** `{object}` - returns state data, including any inherited data that is not\n   *   overridden by own values (if any).\n   * - **url** `{object}` - returns a {@link ui.router.util.type:UrlMatcher UrlMatcher}\n   *   or `null`.\n   * - **navigable** `{object}` - returns closest ancestor state that has a URL (aka is \n   *   navigable).\n   * - **params** `{object}` - returns an array of state params that are ensured to \n   *   be a super-set of parent's params.\n   * - **views** `{object}` - returns a views object where each key is an absolute view \n   *   name (i.e. \"viewName@stateName\") and each value is the config object \n   *   (template, controller) for the view. Even when you don't use the views object \n   *   explicitly on a state config, one is still created for you internally.\n   *   So by decorating this builder function you have access to decorating template \n   *   and controller properties.\n   * - **ownParams** `{object}` - returns an array of params that belong to the state, \n   *   not including any params defined by ancestor states.\n   * - **path** `{string}` - returns the full path from the root down to this state. \n   *   Needed for state activation.\n   * - **includes** `{object}` - returns an object that includes every state that \n   *   would pass a `$state.includes()` test.\n   *\n   * @example\n   * <pre>\n   * // Override the internal 'views' builder with a function that takes the state\n   * // definition, and a reference to the internal function being overridden:\n   * $stateProvider.decorator('views', function (state, parent) {\n   *   var result = {},\n   *       views = parent(state);\n   *\n   *   angular.forEach(views, function (config, name) {\n   *     var autoName = (state.name + '.' + name).replace('.', '/');\n   *     config.templateUrl = config.templateUrl || '/partials/' + autoName + '.html';\n   *     result[name] = config;\n   *   });\n   *   return result;\n   * });\n   *\n   * $stateProvider.state('home', {\n   *   views: {\n   *     'contact.list': { controller: 'ListController' },\n   *     'contact.item': { controller: 'ItemController' }\n   *   }\n   * });\n   *\n   * // ...\n   *\n   * $state.go('home');\n   * // Auto-populates list and item views with /partials/home/contact/list.html,\n   * // and /partials/home/contact/item.html, respectively.\n   * </pre>\n   *\n   * @param {string} name The name of the builder function to decorate. \n   * @param {object} func A function that is responsible for decorating the original \n   * builder function. The function receives two parameters:\n   *\n   *   - `{object}` - state - The state config object.\n   *   - `{object}` - super - The original builder function.\n   *\n   * @return {object} $stateProvider - $stateProvider instance\n   */\n  this.decorator = decorator;\n  function decorator(name, func) {\n    /*jshint validthis: true */\n    if (isString(name) && !isDefined(func)) {\n      return stateBuilder[name];\n    }\n    if (!isFunction(func) || !isString(name)) {\n      return this;\n    }\n    if (stateBuilder[name] && !stateBuilder.$delegates[name]) {\n      stateBuilder.$delegates[name] = stateBuilder[name];\n    }\n    stateBuilder[name] = func;\n    return this;\n  }\n\n  /**\n   * @ngdoc function\n   * @name ui.router.state.$stateProvider#state\n   * @methodOf ui.router.state.$stateProvider\n   *\n   * @description\n   * Registers a state configuration under a given state name. The stateConfig object\n   * has the following acceptable properties.\n   *\n   * @param {string} name A unique state name, e.g. \"home\", \"about\", \"contacts\".\n   * To create a parent/child state use a dot, e.g. \"about.sales\", \"home.newest\".\n   * @param {object} stateConfig State configuration object.\n   * @param {string|function=} stateConfig.template\n   * <a id='template'></a>\n   *   html template as a string or a function that returns\n   *   an html template as a string which should be used by the uiView directives. This property \n   *   takes precedence over templateUrl.\n   *   \n   *   If `template` is a function, it will be called with the following parameters:\n   *\n   *   - {array.&lt;object&gt;} - state parameters extracted from the current $location.path() by\n   *     applying the current state\n   *\n   * <pre>template:\n   *   \"<h1>inline template definition</h1>\" +\n   *   \"<div ui-view></div>\"</pre>\n   * <pre>template: function(params) {\n   *       return \"<h1>generated template</h1>\"; }</pre>\n   * </div>\n   *\n   * @param {string|function=} stateConfig.templateUrl\n   * <a id='templateUrl'></a>\n   *\n   *   path or function that returns a path to an html\n   *   template that should be used by uiView.\n   *   \n   *   If `templateUrl` is a function, it will be called with the following parameters:\n   *\n   *   - {array.&lt;object&gt;} - state parameters extracted from the current $location.path() by \n   *     applying the current state\n   *\n   * <pre>templateUrl: \"home.html\"</pre>\n   * <pre>templateUrl: function(params) {\n   *     return myTemplates[params.pageId]; }</pre>\n   *\n   * @param {function=} stateConfig.templateProvider\n   * <a id='templateProvider'></a>\n   *    Provider function that returns HTML content string.\n   * <pre> templateProvider:\n   *       function(MyTemplateService, params) {\n   *         return MyTemplateService.getTemplate(params.pageId);\n   *       }</pre>\n   *\n   * @param {string|function=} stateConfig.controller\n   * <a id='controller'></a>\n   *\n   *  Controller fn that should be associated with newly\n   *   related scope or the name of a registered controller if passed as a string.\n   *   Optionally, the ControllerAs may be declared here.\n   * <pre>controller: \"MyRegisteredController\"</pre>\n   * <pre>controller:\n   *     \"MyRegisteredController as fooCtrl\"}</pre>\n   * <pre>controller: function($scope, MyService) {\n   *     $scope.data = MyService.getData(); }</pre>\n   *\n   * @param {function=} stateConfig.controllerProvider\n   * <a id='controllerProvider'></a>\n   *\n   * Injectable provider function that returns the actual controller or string.\n   * <pre>controllerProvider:\n   *   function(MyResolveData) {\n   *     if (MyResolveData.foo)\n   *       return \"FooCtrl\"\n   *     else if (MyResolveData.bar)\n   *       return \"BarCtrl\";\n   *     else return function($scope) {\n   *       $scope.baz = \"Qux\";\n   *     }\n   *   }</pre>\n   *\n   * @param {string=} stateConfig.controllerAs\n   * <a id='controllerAs'></a>\n   * \n   * A controller alias name. If present the controller will be\n   *   published to scope under the controllerAs name.\n   * <pre>controllerAs: \"myCtrl\"</pre>\n   *\n   * @param {string|object=} stateConfig.parent\n   * <a id='parent'></a>\n   * Optionally specifies the parent state of this state.\n   *\n   * <pre>parent: 'parentState'</pre>\n   * <pre>parent: parentState // JS variable</pre>\n   *\n   * @param {object=} stateConfig.resolve\n   * <a id='resolve'></a>\n   *\n   * An optional map&lt;string, function&gt; of dependencies which\n   *   should be injected into the controller. If any of these dependencies are promises, \n   *   the router will wait for them all to be resolved before the controller is instantiated.\n   *   If all the promises are resolved successfully, the $stateChangeSuccess event is fired\n   *   and the values of the resolved promises are injected into any controllers that reference them.\n   *   If any  of the promises are rejected the $stateChangeError event is fired.\n   *\n   *   The map object is:\n   *   \n   *   - key - {string}: name of dependency to be injected into controller\n   *   - factory - {string|function}: If string then it is alias for service. Otherwise if function, \n   *     it is injected and return value it treated as dependency. If result is a promise, it is \n   *     resolved before its value is injected into controller.\n   *\n   * <pre>resolve: {\n   *     myResolve1:\n   *       function($http, $stateParams) {\n   *         return $http.get(\"/api/foos/\"+stateParams.fooID);\n   *       }\n   *     }</pre>\n   *\n   * @param {string=} stateConfig.url\n   * <a id='url'></a>\n   *\n   *   A url fragment with optional parameters. When a state is navigated or\n   *   transitioned to, the `$stateParams` service will be populated with any \n   *   parameters that were passed.\n   *\n   *   (See {@link ui.router.util.type:UrlMatcher UrlMatcher} `UrlMatcher`} for\n   *   more details on acceptable patterns )\n   *\n   * examples:\n   * <pre>url: \"/home\"\n   * url: \"/users/:userid\"\n   * url: \"/books/{bookid:[a-zA-Z_-]}\"\n   * url: \"/books/{categoryid:int}\"\n   * url: \"/books/{publishername:string}/{categoryid:int}\"\n   * url: \"/messages?before&after\"\n   * url: \"/messages?{before:date}&{after:date}\"\n   * url: \"/messages/:mailboxid?{before:date}&{after:date}\"\n   * </pre>\n   *\n   * @param {object=} stateConfig.views\n   * <a id='views'></a>\n   * an optional map&lt;string, object&gt; which defined multiple views, or targets views\n   * manually/explicitly.\n   *\n   * Examples:\n   *\n   * Targets three named `ui-view`s in the parent state's template\n   * <pre>views: {\n   *     header: {\n   *       controller: \"headerCtrl\",\n   *       templateUrl: \"header.html\"\n   *     }, body: {\n   *       controller: \"bodyCtrl\",\n   *       templateUrl: \"body.html\"\n   *     }, footer: {\n   *       controller: \"footCtrl\",\n   *       templateUrl: \"footer.html\"\n   *     }\n   *   }</pre>\n   *\n   * Targets named `ui-view=\"header\"` from grandparent state 'top''s template, and named `ui-view=\"body\" from parent state's template.\n   * <pre>views: {\n   *     'header@top': {\n   *       controller: \"msgHeaderCtrl\",\n   *       templateUrl: \"msgHeader.html\"\n   *     }, 'body': {\n   *       controller: \"messagesCtrl\",\n   *       templateUrl: \"messages.html\"\n   *     }\n   *   }</pre>\n   *\n   * @param {boolean=} [stateConfig.abstract=false]\n   * <a id='abstract'></a>\n   * An abstract state will never be directly activated,\n   *   but can provide inherited properties to its common children states.\n   * <pre>abstract: true</pre>\n   *\n   * @param {function=} stateConfig.onEnter\n   * <a id='onEnter'></a>\n   *\n   * Callback function for when a state is entered. Good way\n   *   to trigger an action or dispatch an event, such as opening a dialog.\n   * If minifying your scripts, make sure to explictly annotate this function,\n   * because it won't be automatically annotated by your build tools.\n   *\n   * <pre>onEnter: function(MyService, $stateParams) {\n   *     MyService.foo($stateParams.myParam);\n   * }</pre>\n   *\n   * @param {function=} stateConfig.onExit\n   * <a id='onExit'></a>\n   *\n   * Callback function for when a state is exited. Good way to\n   *   trigger an action or dispatch an event, such as opening a dialog.\n   * If minifying your scripts, make sure to explictly annotate this function,\n   * because it won't be automatically annotated by your build tools.\n   *\n   * <pre>onExit: function(MyService, $stateParams) {\n   *     MyService.cleanup($stateParams.myParam);\n   * }</pre>\n   *\n   * @param {boolean=} [stateConfig.reloadOnSearch=true]\n   * <a id='reloadOnSearch'></a>\n   *\n   * If `false`, will not retrigger the same state\n   *   just because a search/query parameter has changed (via $location.search() or $location.hash()). \n   *   Useful for when you'd like to modify $location.search() without triggering a reload.\n   * <pre>reloadOnSearch: false</pre>\n   *\n   * @param {object=} stateConfig.data\n   * <a id='data'></a>\n   *\n   * Arbitrary data object, useful for custom configuration.  The parent state's `data` is\n   *   prototypally inherited.  In other words, adding a data property to a state adds it to\n   *   the entire subtree via prototypal inheritance.\n   *\n   * <pre>data: {\n   *     requiredRole: 'foo'\n   * } </pre>\n   *\n   * @param {object=} stateConfig.params\n   * <a id='params'></a>\n   *\n   * A map which optionally configures parameters declared in the `url`, or\n   *   defines additional non-url parameters.  For each parameter being\n   *   configured, add a configuration object keyed to the name of the parameter.\n   *\n   *   Each parameter configuration object may contain the following properties:\n   *\n   *   - ** value ** - {object|function=}: specifies the default value for this\n   *     parameter.  This implicitly sets this parameter as optional.\n   *\n   *     When UI-Router routes to a state and no value is\n   *     specified for this parameter in the URL or transition, the\n   *     default value will be used instead.  If `value` is a function,\n   *     it will be injected and invoked, and the return value used.\n   *\n   *     *Note*: `undefined` is treated as \"no default value\" while `null`\n   *     is treated as \"the default value is `null`\".\n   *\n   *     *Shorthand*: If you only need to configure the default value of the\n   *     parameter, you may use a shorthand syntax.   In the **`params`**\n   *     map, instead mapping the param name to a full parameter configuration\n   *     object, simply set map it to the default parameter value, e.g.:\n   *\n   * <pre>// define a parameter's default value\n   * params: {\n   *     param1: { value: \"defaultValue\" }\n   * }\n   * // shorthand default values\n   * params: {\n   *     param1: \"defaultValue\",\n   *     param2: \"param2Default\"\n   * }</pre>\n   *\n   *   - ** array ** - {boolean=}: *(default: false)* If true, the param value will be\n   *     treated as an array of values.  If you specified a Type, the value will be\n   *     treated as an array of the specified Type.  Note: query parameter values\n   *     default to a special `\"auto\"` mode.\n   *\n   *     For query parameters in `\"auto\"` mode, if multiple  values for a single parameter\n   *     are present in the URL (e.g.: `/foo?bar=1&bar=2&bar=3`) then the values\n   *     are mapped to an array (e.g.: `{ foo: [ '1', '2', '3' ] }`).  However, if\n   *     only one value is present (e.g.: `/foo?bar=1`) then the value is treated as single\n   *     value (e.g.: `{ foo: '1' }`).\n   *\n   * <pre>params: {\n   *     param1: { array: true }\n   * }</pre>\n   *\n   *   - ** squash ** - {bool|string=}: `squash` configures how a default parameter value is represented in the URL when\n   *     the current parameter value is the same as the default value. If `squash` is not set, it uses the\n   *     configured default squash policy.\n   *     (See {@link ui.router.util.$urlMatcherFactory#methods_defaultSquashPolicy `defaultSquashPolicy()`})\n   *\n   *   There are three squash settings:\n   *\n   *     - false: The parameter's default value is not squashed.  It is encoded and included in the URL\n   *     - true: The parameter's default value is omitted from the URL.  If the parameter is preceeded and followed\n   *       by slashes in the state's `url` declaration, then one of those slashes are omitted.\n   *       This can allow for cleaner looking URLs.\n   *     - `\"<arbitrary string>\"`: The parameter's default value is replaced with an arbitrary placeholder of  your choice.\n   *\n   * <pre>params: {\n   *     param1: {\n   *       value: \"defaultId\",\n   *       squash: true\n   * } }\n   * // squash \"defaultValue\" to \"~\"\n   * params: {\n   *     param1: {\n   *       value: \"defaultValue\",\n   *       squash: \"~\"\n   * } }\n   * </pre>\n   *\n   *\n   * @example\n   * <pre>\n   * // Some state name examples\n   *\n   * // stateName can be a single top-level name (must be unique).\n   * $stateProvider.state(\"home\", {});\n   *\n   * // Or it can be a nested state name. This state is a child of the\n   * // above \"home\" state.\n   * $stateProvider.state(\"home.newest\", {});\n   *\n   * // Nest states as deeply as needed.\n   * $stateProvider.state(\"home.newest.abc.xyz.inception\", {});\n   *\n   * // state() returns $stateProvider, so you can chain state declarations.\n   * $stateProvider\n   *   .state(\"home\", {})\n   *   .state(\"about\", {})\n   *   .state(\"contacts\", {});\n   * </pre>\n   *\n   */\n  this.state = state;\n  function state(name, definition) {\n    /*jshint validthis: true */\n    if (isObject(name)) definition = name;\n    else definition.name = name;\n    registerState(definition);\n    return this;\n  }\n\n  /**\n   * @ngdoc object\n   * @name ui.router.state.$state\n   *\n   * @requires $rootScope\n   * @requires $q\n   * @requires ui.router.state.$view\n   * @requires $injector\n   * @requires ui.router.util.$resolve\n   * @requires ui.router.state.$stateParams\n   * @requires ui.router.router.$urlRouter\n   *\n   * @property {object} params A param object, e.g. {sectionId: section.id)}, that \n   * you'd like to test against the current active state.\n   * @property {object} current A reference to the state's config object. However \n   * you passed it in. Useful for accessing custom data.\n   * @property {object} transition Currently pending transition. A promise that'll \n   * resolve or reject.\n   *\n   * @description\n   * `$state` service is responsible for representing states as well as transitioning\n   * between them. It also provides interfaces to ask for current state or even states\n   * you're coming from.\n   */\n  this.$get = $get;\n  $get.$inject = ['$rootScope', '$q', '$view', '$injector', '$resolve', '$stateParams', '$urlRouter', '$location', '$urlMatcherFactory'];\n  function $get(   $rootScope,   $q,   $view,   $injector,   $resolve,   $stateParams,   $urlRouter,   $location,   $urlMatcherFactory) {\n\n    var TransitionSuperseded = $q.reject(new Error('transition superseded'));\n    var TransitionPrevented = $q.reject(new Error('transition prevented'));\n    var TransitionAborted = $q.reject(new Error('transition aborted'));\n    var TransitionFailed = $q.reject(new Error('transition failed'));\n\n    // Handles the case where a state which is the target of a transition is not found, and the user\n    // can optionally retry or defer the transition\n    function handleRedirect(redirect, state, params, options) {\n      /**\n       * @ngdoc event\n       * @name ui.router.state.$state#$stateNotFound\n       * @eventOf ui.router.state.$state\n       * @eventType broadcast on root scope\n       * @description\n       * Fired when a requested state **cannot be found** using the provided state name during transition.\n       * The event is broadcast allowing any handlers a single chance to deal with the error (usually by\n       * lazy-loading the unfound state). A special `unfoundState` object is passed to the listener handler,\n       * you can see its three properties in the example. You can use `event.preventDefault()` to abort the\n       * transition and the promise returned from `go` will be rejected with a `'transition aborted'` value.\n       *\n       * @param {Object} event Event object.\n       * @param {Object} unfoundState Unfound State information. Contains: `to, toParams, options` properties.\n       * @param {State} fromState Current state object.\n       * @param {Object} fromParams Current state params.\n       *\n       * @example\n       *\n       * <pre>\n       * // somewhere, assume lazy.state has not been defined\n       * $state.go(\"lazy.state\", {a:1, b:2}, {inherit:false});\n       *\n       * // somewhere else\n       * $scope.$on('$stateNotFound',\n       * function(event, unfoundState, fromState, fromParams){\n       *     console.log(unfoundState.to); // \"lazy.state\"\n       *     console.log(unfoundState.toParams); // {a:1, b:2}\n       *     console.log(unfoundState.options); // {inherit:false} + default options\n       * })\n       * </pre>\n       */\n      var evt = $rootScope.$broadcast('$stateNotFound', redirect, state, params);\n\n      if (evt.defaultPrevented) {\n        $urlRouter.update();\n        return TransitionAborted;\n      }\n\n      if (!evt.retry) {\n        return null;\n      }\n\n      // Allow the handler to return a promise to defer state lookup retry\n      if (options.$retry) {\n        $urlRouter.update();\n        return TransitionFailed;\n      }\n      var retryTransition = $state.transition = $q.when(evt.retry);\n\n      retryTransition.then(function() {\n        if (retryTransition !== $state.transition) return TransitionSuperseded;\n        redirect.options.$retry = true;\n        return $state.transitionTo(redirect.to, redirect.toParams, redirect.options);\n      }, function() {\n        return TransitionAborted;\n      });\n      $urlRouter.update();\n\n      return retryTransition;\n    }\n\n    root.locals = { resolve: null, globals: { $stateParams: {} } };\n\n    $state = {\n      params: {},\n      current: root.self,\n      $current: root,\n      transition: null\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#reload\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * A method that force reloads the current state. All resolves are re-resolved,\n     * controllers reinstantiated, and events re-fired.\n     *\n     * @example\n     * <pre>\n     * var app angular.module('app', ['ui.router']);\n     *\n     * app.controller('ctrl', function ($scope, $state) {\n     *   $scope.reload = function(){\n     *     $state.reload();\n     *   }\n     * });\n     * </pre>\n     *\n     * `reload()` is just an alias for:\n     * <pre>\n     * $state.transitionTo($state.current, $stateParams, { \n     *   reload: true, inherit: false, notify: true\n     * });\n     * </pre>\n     *\n     * @param {string=|object=} state - A state name or a state object, which is the root of the resolves to be re-resolved.\n     * @example\n     * <pre>\n     * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item' \n     * //and current state is 'contacts.detail.item'\n     * var app angular.module('app', ['ui.router']);\n     *\n     * app.controller('ctrl', function ($scope, $state) {\n     *   $scope.reload = function(){\n     *     //will reload 'contact.detail' and 'contact.detail.item' states\n     *     $state.reload('contact.detail');\n     *   }\n     * });\n     * </pre>\n     *\n     * `reload()` is just an alias for:\n     * <pre>\n     * $state.transitionTo($state.current, $stateParams, { \n     *   reload: true, inherit: false, notify: true\n     * });\n     * </pre>\n\n     * @returns {promise} A promise representing the state of the new transition. See\n     * {@link ui.router.state.$state#methods_go $state.go}.\n     */\n    $state.reload = function reload(state) {\n      return $state.transitionTo($state.current, $stateParams, { reload: state || true, inherit: false, notify: true});\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#go\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * Convenience method for transitioning to a new state. `$state.go` calls \n     * `$state.transitionTo` internally but automatically sets options to \n     * `{ location: true, inherit: true, relative: $state.$current, notify: true }`. \n     * This allows you to easily use an absolute or relative to path and specify \n     * only the parameters you'd like to update (while letting unspecified parameters \n     * inherit from the currently active ancestor states).\n     *\n     * @example\n     * <pre>\n     * var app = angular.module('app', ['ui.router']);\n     *\n     * app.controller('ctrl', function ($scope, $state) {\n     *   $scope.changeState = function () {\n     *     $state.go('contact.detail');\n     *   };\n     * });\n     * </pre>\n     * <img src='../ngdoc_assets/StateGoExamples.png'/>\n     *\n     * @param {string} to Absolute state name or relative state path. Some examples:\n     *\n     * - `$state.go('contact.detail')` - will go to the `contact.detail` state\n     * - `$state.go('^')` - will go to a parent state\n     * - `$state.go('^.sibling')` - will go to a sibling state\n     * - `$state.go('.child.grandchild')` - will go to grandchild state\n     *\n     * @param {object=} params A map of the parameters that will be sent to the state, \n     * will populate $stateParams. Any parameters that are not specified will be inherited from currently \n     * defined parameters. This allows, for example, going to a sibling state that shares parameters\n     * specified in a parent state. Parameter inheritance only works between common ancestor states, I.e.\n     * transitioning to a sibling will get you the parameters for all parents, transitioning to a child\n     * will get you all current parameters, etc.\n     * @param {object=} options Options object. The options are:\n     *\n     * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false`\n     *    will not. If string, must be `\"replace\"`, which will update url and also replace last history record.\n     * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url.\n     * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'), \n     *    defines which state to be relative from.\n     * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events.\n     * - **`reload`** (v0.2.5) - {boolean=false}, If `true` will force transition even if the state or params \n     *    have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd\n     *    use this when you want to force a reload when *everything* is the same, including search params.\n     *\n     * @returns {promise} A promise representing the state of the new transition.\n     *\n     * Possible success values:\n     *\n     * - $state.current\n     *\n     * <br/>Possible rejection values:\n     *\n     * - 'transition superseded' - when a newer transition has been started after this one\n     * - 'transition prevented' - when `event.preventDefault()` has been called in a `$stateChangeStart` listener\n     * - 'transition aborted' - when `event.preventDefault()` has been called in a `$stateNotFound` listener or\n     *   when a `$stateNotFound` `event.retry` promise errors.\n     * - 'transition failed' - when a state has been unsuccessfully found after 2 tries.\n     * - *resolve error* - when an error has occurred with a `resolve`\n     *\n     */\n    $state.go = function go(to, params, options) {\n      return $state.transitionTo(to, params, extend({ inherit: true, relative: $state.$current }, options));\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#transitionTo\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * Low-level method for transitioning to a new state. {@link ui.router.state.$state#methods_go $state.go}\n     * uses `transitionTo` internally. `$state.go` is recommended in most situations.\n     *\n     * @example\n     * <pre>\n     * var app = angular.module('app', ['ui.router']);\n     *\n     * app.controller('ctrl', function ($scope, $state) {\n     *   $scope.changeState = function () {\n     *     $state.transitionTo('contact.detail');\n     *   };\n     * });\n     * </pre>\n     *\n     * @param {string} to State name.\n     * @param {object=} toParams A map of the parameters that will be sent to the state,\n     * will populate $stateParams.\n     * @param {object=} options Options object. The options are:\n     *\n     * - **`location`** - {boolean=true|string=} - If `true` will update the url in the location bar, if `false`\n     *    will not. If string, must be `\"replace\"`, which will update url and also replace last history record.\n     * - **`inherit`** - {boolean=false}, If `true` will inherit url parameters from current url.\n     * - **`relative`** - {object=}, When transitioning with relative path (e.g '^'), \n     *    defines which state to be relative from.\n     * - **`notify`** - {boolean=true}, If `true` will broadcast $stateChangeStart and $stateChangeSuccess events.\n     * - **`reload`** (v0.2.5) - {boolean=false|string=|object=}, If `true` will force transition even if the state or params \n     *    have not changed, aka a reload of the same state. It differs from reloadOnSearch because you'd\n     *    use this when you want to force a reload when *everything* is the same, including search params.\n     *    if String, then will reload the state with the name given in reload, and any children.\n     *    if Object, then a stateObj is expected, will reload the state found in stateObj, and any children.\n     *\n     * @returns {promise} A promise representing the state of the new transition. See\n     * {@link ui.router.state.$state#methods_go $state.go}.\n     */\n    $state.transitionTo = function transitionTo(to, toParams, options) {\n      toParams = toParams || {};\n      options = extend({\n        location: true, inherit: false, relative: null, notify: true, reload: false, $retry: false\n      }, options || {});\n\n      var from = $state.$current, fromParams = $state.params, fromPath = from.path;\n      var evt, toState = findState(to, options.relative);\n\n      // Store the hash param for later (since it will be stripped out by various methods)\n      var hash = toParams['#'];\n\n      if (!isDefined(toState)) {\n        var redirect = { to: to, toParams: toParams, options: options };\n        var redirectResult = handleRedirect(redirect, from.self, fromParams, options);\n\n        if (redirectResult) {\n          return redirectResult;\n        }\n\n        // Always retry once if the $stateNotFound was not prevented\n        // (handles either redirect changed or state lazy-definition)\n        to = redirect.to;\n        toParams = redirect.toParams;\n        options = redirect.options;\n        toState = findState(to, options.relative);\n\n        if (!isDefined(toState)) {\n          if (!options.relative) throw new Error(\"No such state '\" + to + \"'\");\n          throw new Error(\"Could not resolve '\" + to + \"' from state '\" + options.relative + \"'\");\n        }\n      }\n      if (toState[abstractKey]) throw new Error(\"Cannot transition to abstract state '\" + to + \"'\");\n      if (options.inherit) toParams = inheritParams($stateParams, toParams || {}, $state.$current, toState);\n      if (!toState.params.$$validates(toParams)) return TransitionFailed;\n\n      toParams = toState.params.$$values(toParams);\n      to = toState;\n\n      var toPath = to.path;\n\n      // Starting from the root of the path, keep all levels that haven't changed\n      var keep = 0, state = toPath[keep], locals = root.locals, toLocals = [];\n\n      if (!options.reload) {\n        while (state && state === fromPath[keep] && state.ownParams.$$equals(toParams, fromParams)) {\n          locals = toLocals[keep] = state.locals;\n          keep++;\n          state = toPath[keep];\n        }\n      } else if (isString(options.reload) || isObject(options.reload)) {\n        if (isObject(options.reload) && !options.reload.name) {\n          throw new Error('Invalid reload state object');\n        }\n        \n        var reloadState = options.reload === true ? fromPath[0] : findState(options.reload);\n        if (options.reload && !reloadState) {\n          throw new Error(\"No such reload state '\" + (isString(options.reload) ? options.reload : options.reload.name) + \"'\");\n        }\n\n        while (state && state === fromPath[keep] && state !== reloadState) {\n          locals = toLocals[keep] = state.locals;\n          keep++;\n          state = toPath[keep];\n        }\n      }\n\n      // If we're going to the same state and all locals are kept, we've got nothing to do.\n      // But clear 'transition', as we still want to cancel any other pending transitions.\n      // TODO: We may not want to bump 'transition' if we're called from a location change\n      // that we've initiated ourselves, because we might accidentally abort a legitimate\n      // transition initiated from code?\n      if (shouldSkipReload(to, toParams, from, fromParams, locals, options)) {\n        if (hash) toParams['#'] = hash;\n        $state.params = toParams;\n        copy($state.params, $stateParams);\n        if (options.location && to.navigable && to.navigable.url) {\n          $urlRouter.push(to.navigable.url, toParams, {\n            $$avoidResync: true, replace: options.location === 'replace'\n          });\n          $urlRouter.update(true);\n        }\n        $state.transition = null;\n        return $q.when($state.current);\n      }\n\n      // Filter parameters before we pass them to event handlers etc.\n      toParams = filterByKeys(to.params.$$keys(), toParams || {});\n\n      // Broadcast start event and cancel the transition if requested\n      if (options.notify) {\n        /**\n         * @ngdoc event\n         * @name ui.router.state.$state#$stateChangeStart\n         * @eventOf ui.router.state.$state\n         * @eventType broadcast on root scope\n         * @description\n         * Fired when the state transition **begins**. You can use `event.preventDefault()`\n         * to prevent the transition from happening and then the transition promise will be\n         * rejected with a `'transition prevented'` value.\n         *\n         * @param {Object} event Event object.\n         * @param {State} toState The state being transitioned to.\n         * @param {Object} toParams The params supplied to the `toState`.\n         * @param {State} fromState The current state, pre-transition.\n         * @param {Object} fromParams The params supplied to the `fromState`.\n         *\n         * @example\n         *\n         * <pre>\n         * $rootScope.$on('$stateChangeStart',\n         * function(event, toState, toParams, fromState, fromParams){\n         *     event.preventDefault();\n         *     // transitionTo() promise will be rejected with\n         *     // a 'transition prevented' error\n         * })\n         * </pre>\n         */\n        if ($rootScope.$broadcast('$stateChangeStart', to.self, toParams, from.self, fromParams).defaultPrevented) {\n          $rootScope.$broadcast('$stateChangeCancel', to.self, toParams, from.self, fromParams);\n          $urlRouter.update();\n          return TransitionPrevented;\n        }\n      }\n\n      // Resolve locals for the remaining states, but don't update any global state just\n      // yet -- if anything fails to resolve the current state needs to remain untouched.\n      // We also set up an inheritance chain for the locals here. This allows the view directive\n      // to quickly look up the correct definition for each view in the current state. Even\n      // though we create the locals object itself outside resolveState(), it is initially\n      // empty and gets filled asynchronously. We need to keep track of the promise for the\n      // (fully resolved) current locals, and pass this down the chain.\n      var resolved = $q.when(locals);\n\n      for (var l = keep; l < toPath.length; l++, state = toPath[l]) {\n        locals = toLocals[l] = inherit(locals);\n        resolved = resolveState(state, toParams, state === to, resolved, locals, options);\n      }\n\n      // Once everything is resolved, we are ready to perform the actual transition\n      // and return a promise for the new state. We also keep track of what the\n      // current promise is, so that we can detect overlapping transitions and\n      // keep only the outcome of the last transition.\n      var transition = $state.transition = resolved.then(function () {\n        var l, entering, exiting;\n\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        // Exit 'from' states not kept\n        for (l = fromPath.length - 1; l >= keep; l--) {\n          exiting = fromPath[l];\n          if (exiting.self.onExit) {\n            $injector.invoke(exiting.self.onExit, exiting.self, exiting.locals.globals);\n          }\n          exiting.locals = null;\n        }\n\n        // Enter 'to' states not kept\n        for (l = keep; l < toPath.length; l++) {\n          entering = toPath[l];\n          entering.locals = toLocals[l];\n          if (entering.self.onEnter) {\n            $injector.invoke(entering.self.onEnter, entering.self, entering.locals.globals);\n          }\n        }\n\n        // Re-add the saved hash before we start returning things\n        if (hash) toParams['#'] = hash;\n\n        // Run it again, to catch any transitions in callbacks\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        // Update globals in $state\n        $state.$current = to;\n        $state.current = to.self;\n        $state.params = toParams;\n        copy($state.params, $stateParams);\n        $state.transition = null;\n\n        if (options.location && to.navigable) {\n          $urlRouter.push(to.navigable.url, to.navigable.locals.globals.$stateParams, {\n            $$avoidResync: true, replace: options.location === 'replace'\n          });\n        }\n\n        if (options.notify) {\n        /**\n         * @ngdoc event\n         * @name ui.router.state.$state#$stateChangeSuccess\n         * @eventOf ui.router.state.$state\n         * @eventType broadcast on root scope\n         * @description\n         * Fired once the state transition is **complete**.\n         *\n         * @param {Object} event Event object.\n         * @param {State} toState The state being transitioned to.\n         * @param {Object} toParams The params supplied to the `toState`.\n         * @param {State} fromState The current state, pre-transition.\n         * @param {Object} fromParams The params supplied to the `fromState`.\n         */\n          $rootScope.$broadcast('$stateChangeSuccess', to.self, toParams, from.self, fromParams);\n        }\n        $urlRouter.update(true);\n\n        return $state.current;\n      }, function (error) {\n        if ($state.transition !== transition) return TransitionSuperseded;\n\n        $state.transition = null;\n        /**\n         * @ngdoc event\n         * @name ui.router.state.$state#$stateChangeError\n         * @eventOf ui.router.state.$state\n         * @eventType broadcast on root scope\n         * @description\n         * Fired when an **error occurs** during transition. It's important to note that if you\n         * have any errors in your resolve functions (javascript errors, non-existent services, etc)\n         * they will not throw traditionally. You must listen for this $stateChangeError event to\n         * catch **ALL** errors.\n         *\n         * @param {Object} event Event object.\n         * @param {State} toState The state being transitioned to.\n         * @param {Object} toParams The params supplied to the `toState`.\n         * @param {State} fromState The current state, pre-transition.\n         * @param {Object} fromParams The params supplied to the `fromState`.\n         * @param {Error} error The resolve error object.\n         */\n        evt = $rootScope.$broadcast('$stateChangeError', to.self, toParams, from.self, fromParams, error);\n\n        if (!evt.defaultPrevented) {\n            $urlRouter.update();\n        }\n\n        return $q.reject(error);\n      });\n\n      return transition;\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#is\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * Similar to {@link ui.router.state.$state#methods_includes $state.includes},\n     * but only checks for the full state name. If params is supplied then it will be\n     * tested for strict equality against the current active params object, so all params\n     * must match with none missing and no extras.\n     *\n     * @example\n     * <pre>\n     * $state.$current.name = 'contacts.details.item';\n     *\n     * // absolute name\n     * $state.is('contact.details.item'); // returns true\n     * $state.is(contactDetailItemStateObject); // returns true\n     *\n     * // relative name (. and ^), typically from a template\n     * // E.g. from the 'contacts.details' template\n     * <div ng-class=\"{highlighted: $state.is('.item')}\">Item</div>\n     * </pre>\n     *\n     * @param {string|object} stateOrName The state name (absolute or relative) or state object you'd like to check.\n     * @param {object=} params A param object, e.g. `{sectionId: section.id}`, that you'd like\n     * to test against the current active state.\n     * @param {object=} options An options object.  The options are:\n     *\n     * - **`relative`** - {string|object} -  If `stateOrName` is a relative state name and `options.relative` is set, .is will\n     * test relative to `options.relative` state (or name).\n     *\n     * @returns {boolean} Returns true if it is the state.\n     */\n    $state.is = function is(stateOrName, params, options) {\n      options = extend({ relative: $state.$current }, options || {});\n      var state = findState(stateOrName, options.relative);\n\n      if (!isDefined(state)) { return undefined; }\n      if ($state.$current !== state) { return false; }\n      return params ? equalForKeys(state.params.$$values(params), $stateParams) : true;\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#includes\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * A method to determine if the current active state is equal to or is the child of the\n     * state stateName. If any params are passed then they will be tested for a match as well.\n     * Not all the parameters need to be passed, just the ones you'd like to test for equality.\n     *\n     * @example\n     * Partial and relative names\n     * <pre>\n     * $state.$current.name = 'contacts.details.item';\n     *\n     * // Using partial names\n     * $state.includes(\"contacts\"); // returns true\n     * $state.includes(\"contacts.details\"); // returns true\n     * $state.includes(\"contacts.details.item\"); // returns true\n     * $state.includes(\"contacts.list\"); // returns false\n     * $state.includes(\"about\"); // returns false\n     *\n     * // Using relative names (. and ^), typically from a template\n     * // E.g. from the 'contacts.details' template\n     * <div ng-class=\"{highlighted: $state.includes('.item')}\">Item</div>\n     * </pre>\n     *\n     * Basic globbing patterns\n     * <pre>\n     * $state.$current.name = 'contacts.details.item.url';\n     *\n     * $state.includes(\"*.details.*.*\"); // returns true\n     * $state.includes(\"*.details.**\"); // returns true\n     * $state.includes(\"**.item.**\"); // returns true\n     * $state.includes(\"*.details.item.url\"); // returns true\n     * $state.includes(\"*.details.*.url\"); // returns true\n     * $state.includes(\"*.details.*\"); // returns false\n     * $state.includes(\"item.**\"); // returns false\n     * </pre>\n     *\n     * @param {string} stateOrName A partial name, relative name, or glob pattern\n     * to be searched for within the current state name.\n     * @param {object=} params A param object, e.g. `{sectionId: section.id}`,\n     * that you'd like to test against the current active state.\n     * @param {object=} options An options object.  The options are:\n     *\n     * - **`relative`** - {string|object=} -  If `stateOrName` is a relative state reference and `options.relative` is set,\n     * .includes will test relative to `options.relative` state (or name).\n     *\n     * @returns {boolean} Returns true if it does include the state\n     */\n    $state.includes = function includes(stateOrName, params, options) {\n      options = extend({ relative: $state.$current }, options || {});\n      if (isString(stateOrName) && isGlob(stateOrName)) {\n        if (!doesStateMatchGlob(stateOrName)) {\n          return false;\n        }\n        stateOrName = $state.$current.name;\n      }\n\n      var state = findState(stateOrName, options.relative);\n      if (!isDefined(state)) { return undefined; }\n      if (!isDefined($state.$current.includes[state.name])) { return false; }\n      return params ? equalForKeys(state.params.$$values(params), $stateParams, objectKeys(params)) : true;\n    };\n\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#href\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * A url generation method that returns the compiled url for the given state populated with the given params.\n     *\n     * @example\n     * <pre>\n     * expect($state.href(\"about.person\", { person: \"bob\" })).toEqual(\"/about/bob\");\n     * </pre>\n     *\n     * @param {string|object} stateOrName The state name or state object you'd like to generate a url from.\n     * @param {object=} params An object of parameter values to fill the state's required parameters.\n     * @param {object=} options Options object. The options are:\n     *\n     * - **`lossy`** - {boolean=true} -  If true, and if there is no url associated with the state provided in the\n     *    first parameter, then the constructed href url will be built from the first navigable ancestor (aka\n     *    ancestor with a valid url).\n     * - **`inherit`** - {boolean=true}, If `true` will inherit url parameters from current url.\n     * - **`relative`** - {object=$state.$current}, When transitioning with relative path (e.g '^'), \n     *    defines which state to be relative from.\n     * - **`absolute`** - {boolean=false},  If true will generate an absolute url, e.g. \"http://www.example.com/fullurl\".\n     * \n     * @returns {string} compiled state url\n     */\n    $state.href = function href(stateOrName, params, options) {\n      options = extend({\n        lossy:    true,\n        inherit:  true,\n        absolute: false,\n        relative: $state.$current\n      }, options || {});\n\n      var state = findState(stateOrName, options.relative);\n\n      if (!isDefined(state)) return null;\n      if (options.inherit) params = inheritParams($stateParams, params || {}, $state.$current, state);\n      \n      var nav = (state && options.lossy) ? state.navigable : state;\n\n      if (!nav || nav.url === undefined || nav.url === null) {\n        return null;\n      }\n      return $urlRouter.href(nav.url, filterByKeys(state.params.$$keys().concat('#'), params || {}), {\n        absolute: options.absolute\n      });\n    };\n\n    /**\n     * @ngdoc function\n     * @name ui.router.state.$state#get\n     * @methodOf ui.router.state.$state\n     *\n     * @description\n     * Returns the state configuration object for any specific state or all states.\n     *\n     * @param {string|object=} stateOrName (absolute or relative) If provided, will only get the config for\n     * the requested state. If not provided, returns an array of ALL state configs.\n     * @param {string|object=} context When stateOrName is a relative state reference, the state will be retrieved relative to context.\n     * @returns {Object|Array} State configuration object or array of all objects.\n     */\n    $state.get = function (stateOrName, context) {\n      if (arguments.length === 0) return map(objectKeys(states), function(name) { return states[name].self; });\n      var state = findState(stateOrName, context || $state.$current);\n      return (state && state.self) ? state.self : null;\n    };\n\n    function resolveState(state, params, paramsAreFiltered, inherited, dst, options) {\n      // Make a restricted $stateParams with only the parameters that apply to this state if\n      // necessary. In addition to being available to the controller and onEnter/onExit callbacks,\n      // we also need $stateParams to be available for any $injector calls we make during the\n      // dependency resolution process.\n      var $stateParams = (paramsAreFiltered) ? params : filterByKeys(state.params.$$keys(), params);\n      var locals = { $stateParams: $stateParams };\n\n      // Resolve 'global' dependencies for the state, i.e. those not specific to a view.\n      // We're also including $stateParams in this; that way the parameters are restricted\n      // to the set that should be visible to the state, and are independent of when we update\n      // the global $state and $stateParams values.\n      dst.resolve = $resolve.resolve(state.resolve, locals, dst.resolve, state);\n      var promises = [dst.resolve.then(function (globals) {\n        dst.globals = globals;\n      })];\n      if (inherited) promises.push(inherited);\n\n      function resolveViews() {\n        var viewsPromises = [];\n\n        // Resolve template and dependencies for all views.\n        forEach(state.views, function (view, name) {\n          var injectables = (view.resolve && view.resolve !== state.resolve ? view.resolve : {});\n          injectables.$template = [ function () {\n            return $view.load(name, { view: view, locals: dst.globals, params: $stateParams, notify: options.notify }) || '';\n          }];\n\n          viewsPromises.push($resolve.resolve(injectables, dst.globals, dst.resolve, state).then(function (result) {\n            // References to the controller (only instantiated at link time)\n            if (isFunction(view.controllerProvider) || isArray(view.controllerProvider)) {\n              var injectLocals = angular.extend({}, injectables, dst.globals);\n              result.$$controller = $injector.invoke(view.controllerProvider, null, injectLocals);\n            } else {\n              result.$$controller = view.controller;\n            }\n            // Provide access to the state itself for internal use\n            result.$$state = state;\n            result.$$controllerAs = view.controllerAs;\n            dst[name] = result;\n          }));\n        });\n\n        return $q.all(viewsPromises).then(function(){\n          return dst.globals;\n        });\n      }\n\n      // Wait for all the promises and then return the activation object\n      return $q.all(promises).then(resolveViews).then(function (values) {\n        return dst;\n      });\n    }\n\n    return $state;\n  }\n\n  function shouldSkipReload(to, toParams, from, fromParams, locals, options) {\n    // Return true if there are no differences in non-search (path/object) params, false if there are differences\n    function nonSearchParamsEqual(fromAndToState, fromParams, toParams) {\n      // Identify whether all the parameters that differ between `fromParams` and `toParams` were search params.\n      function notSearchParam(key) {\n        return fromAndToState.params[key].location != \"search\";\n      }\n      var nonQueryParamKeys = fromAndToState.params.$$keys().filter(notSearchParam);\n      var nonQueryParams = pick.apply({}, [fromAndToState.params].concat(nonQueryParamKeys));\n      var nonQueryParamSet = new $$UMFP.ParamSet(nonQueryParams);\n      return nonQueryParamSet.$$equals(fromParams, toParams);\n    }\n\n    // If reload was not explicitly requested\n    // and we're transitioning to the same state we're already in\n    // and    the locals didn't change\n    //     or they changed in a way that doesn't merit reloading\n    //        (reloadOnParams:false, or reloadOnSearch.false and only search params changed)\n    // Then return true.\n    if (!options.reload && to === from &&\n      (locals === from.locals || (to.self.reloadOnSearch === false && nonSearchParamsEqual(from, fromParams, toParams)))) {\n      return true;\n    }\n  }\n}\n\nangular.module('ui.router.state')\n  .value('$stateParams', {})\n  .provider('$state', $StateProvider);\n\n\n$ViewProvider.$inject = [];\nfunction $ViewProvider() {\n\n  this.$get = $get;\n  /**\n   * @ngdoc object\n   * @name ui.router.state.$view\n   *\n   * @requires ui.router.util.$templateFactory\n   * @requires $rootScope\n   *\n   * @description\n   *\n   */\n  $get.$inject = ['$rootScope', '$templateFactory'];\n  function $get(   $rootScope,   $templateFactory) {\n    return {\n      // $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... })\n      /**\n       * @ngdoc function\n       * @name ui.router.state.$view#load\n       * @methodOf ui.router.state.$view\n       *\n       * @description\n       *\n       * @param {string} name name\n       * @param {object} options option object.\n       */\n      load: function load(name, options) {\n        var result, defaults = {\n          template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {}\n        };\n        options = extend(defaults, options);\n\n        if (options.view) {\n          result = $templateFactory.fromConfig(options.view, options.params, options.locals);\n        }\n        if (result && options.notify) {\n        /**\n         * @ngdoc event\n         * @name ui.router.state.$state#$viewContentLoading\n         * @eventOf ui.router.state.$view\n         * @eventType broadcast on root scope\n         * @description\n         *\n         * Fired once the view **begins loading**, *before* the DOM is rendered.\n         *\n         * @param {Object} event Event object.\n         * @param {Object} viewConfig The view config properties (template, controller, etc).\n         *\n         * @example\n         *\n         * <pre>\n         * $scope.$on('$viewContentLoading',\n         * function(event, viewConfig){\n         *     // Access to all the view config properties.\n         *     // and one special property 'targetView'\n         *     // viewConfig.targetView\n         * });\n         * </pre>\n         */\n          $rootScope.$broadcast('$viewContentLoading', options);\n        }\n        return result;\n      }\n    };\n  }\n}\n\nangular.module('ui.router.state').provider('$view', $ViewProvider);\n\n/**\n * @ngdoc object\n * @name ui.router.state.$uiViewScrollProvider\n *\n * @description\n * Provider that returns the {@link ui.router.state.$uiViewScroll} service function.\n */\nfunction $ViewScrollProvider() {\n\n  var useAnchorScroll = false;\n\n  /**\n   * @ngdoc function\n   * @name ui.router.state.$uiViewScrollProvider#useAnchorScroll\n   * @methodOf ui.router.state.$uiViewScrollProvider\n   *\n   * @description\n   * Reverts back to using the core [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll) service for\n   * scrolling based on the url anchor.\n   */\n  this.useAnchorScroll = function () {\n    useAnchorScroll = true;\n  };\n\n  /**\n   * @ngdoc object\n   * @name ui.router.state.$uiViewScroll\n   *\n   * @requires $anchorScroll\n   * @requires $timeout\n   *\n   * @description\n   * When called with a jqLite element, it scrolls the element into view (after a\n   * `$timeout` so the DOM has time to refresh).\n   *\n   * If you prefer to rely on `$anchorScroll` to scroll the view to the anchor,\n   * this can be enabled by calling {@link ui.router.state.$uiViewScrollProvider#methods_useAnchorScroll `$uiViewScrollProvider.useAnchorScroll()`}.\n   */\n  this.$get = ['$anchorScroll', '$timeout', function ($anchorScroll, $timeout) {\n    if (useAnchorScroll) {\n      return $anchorScroll;\n    }\n\n    return function ($element) {\n      return $timeout(function () {\n        $element[0].scrollIntoView();\n      }, 0, false);\n    };\n  }];\n}\n\nangular.module('ui.router.state').provider('$uiViewScroll', $ViewScrollProvider);\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-view\n *\n * @requires ui.router.state.$state\n * @requires $compile\n * @requires $controller\n * @requires $injector\n * @requires ui.router.state.$uiViewScroll\n * @requires $document\n *\n * @restrict ECA\n *\n * @description\n * The ui-view directive tells $state where to place your templates.\n *\n * @param {string=} name A view name. The name should be unique amongst the other views in the\n * same state. You can have views of the same name that live in different states.\n *\n * @param {string=} autoscroll It allows you to set the scroll behavior of the browser window\n * when a view is populated. By default, $anchorScroll is overridden by ui-router's custom scroll\n * service, {@link ui.router.state.$uiViewScroll}. This custom service let's you\n * scroll ui-view elements into view when they are populated during a state activation.\n *\n * *Note: To revert back to old [`$anchorScroll`](http://docs.angularjs.org/api/ng.$anchorScroll)\n * functionality, call `$uiViewScrollProvider.useAnchorScroll()`.*\n *\n * @param {string=} onload Expression to evaluate whenever the view updates.\n * \n * @example\n * A view can be unnamed or named. \n * <pre>\n * <!-- Unnamed -->\n * <div ui-view></div> \n * \n * <!-- Named -->\n * <div ui-view=\"viewName\"></div>\n * </pre>\n *\n * You can only have one unnamed view within any template (or root html). If you are only using a \n * single view and it is unnamed then you can populate it like so:\n * <pre>\n * <div ui-view></div> \n * $stateProvider.state(\"home\", {\n *   template: \"<h1>HELLO!</h1>\"\n * })\n * </pre>\n * \n * The above is a convenient shortcut equivalent to specifying your view explicitly with the {@link ui.router.state.$stateProvider#views `views`}\n * config property, by name, in this case an empty name:\n * <pre>\n * $stateProvider.state(\"home\", {\n *   views: {\n *     \"\": {\n *       template: \"<h1>HELLO!</h1>\"\n *     }\n *   }    \n * })\n * </pre>\n * \n * But typically you'll only use the views property if you name your view or have more than one view \n * in the same template. There's not really a compelling reason to name a view if its the only one, \n * but you could if you wanted, like so:\n * <pre>\n * <div ui-view=\"main\"></div>\n * </pre> \n * <pre>\n * $stateProvider.state(\"home\", {\n *   views: {\n *     \"main\": {\n *       template: \"<h1>HELLO!</h1>\"\n *     }\n *   }    \n * })\n * </pre>\n * \n * Really though, you'll use views to set up multiple views:\n * <pre>\n * <div ui-view></div>\n * <div ui-view=\"chart\"></div> \n * <div ui-view=\"data\"></div> \n * </pre>\n * \n * <pre>\n * $stateProvider.state(\"home\", {\n *   views: {\n *     \"\": {\n *       template: \"<h1>HELLO!</h1>\"\n *     },\n *     \"chart\": {\n *       template: \"<chart_thing/>\"\n *     },\n *     \"data\": {\n *       template: \"<data_thing/>\"\n *     }\n *   }    \n * })\n * </pre>\n *\n * Examples for `autoscroll`:\n *\n * <pre>\n * <!-- If autoscroll present with no expression,\n *      then scroll ui-view into view -->\n * <ui-view autoscroll/>\n *\n * <!-- If autoscroll present with valid expression,\n *      then scroll ui-view into view if expression evaluates to true -->\n * <ui-view autoscroll='true'/>\n * <ui-view autoscroll='false'/>\n * <ui-view autoscroll='scopeVariable'/>\n * </pre>\n */\n$ViewDirective.$inject = ['$state', '$injector', '$uiViewScroll', '$interpolate'];\nfunction $ViewDirective(   $state,   $injector,   $uiViewScroll,   $interpolate) {\n\n  function getService() {\n    return ($injector.has) ? function(service) {\n      return $injector.has(service) ? $injector.get(service) : null;\n    } : function(service) {\n      try {\n        return $injector.get(service);\n      } catch (e) {\n        return null;\n      }\n    };\n  }\n\n  var service = getService(),\n      $animator = service('$animator'),\n      $animate = service('$animate');\n\n  // Returns a set of DOM manipulation functions based on which Angular version\n  // it should use\n  function getRenderer(attrs, scope) {\n    var statics = function() {\n      return {\n        enter: function (element, target, cb) { target.after(element); cb(); },\n        leave: function (element, cb) { element.remove(); cb(); }\n      };\n    };\n\n    if ($animate) {\n      return {\n        enter: function(element, target, cb) {\n          var promise = $animate.enter(element, null, target, cb);\n          if (promise && promise.then) promise.then(cb);\n        },\n        leave: function(element, cb) {\n          var promise = $animate.leave(element, cb);\n          if (promise && promise.then) promise.then(cb);\n        }\n      };\n    }\n\n    if ($animator) {\n      var animate = $animator && $animator(scope, attrs);\n\n      return {\n        enter: function(element, target, cb) {animate.enter(element, null, target); cb(); },\n        leave: function(element, cb) { animate.leave(element); cb(); }\n      };\n    }\n\n    return statics();\n  }\n\n  var directive = {\n    restrict: 'ECA',\n    terminal: true,\n    priority: 400,\n    transclude: 'element',\n    compile: function (tElement, tAttrs, $transclude) {\n      return function (scope, $element, attrs) {\n        var previousEl, currentEl, currentScope, latestLocals,\n            onloadExp     = attrs.onload || '',\n            autoScrollExp = attrs.autoscroll,\n            renderer      = getRenderer(attrs, scope);\n\n        scope.$on('$stateChangeSuccess', function() {\n          updateView(false);\n        });\n        scope.$on('$viewContentLoading', function() {\n          updateView(false);\n        });\n\n        updateView(true);\n\n        function cleanupLastView() {\n          if (previousEl) {\n            previousEl.remove();\n            previousEl = null;\n          }\n\n          if (currentScope) {\n            currentScope.$destroy();\n            currentScope = null;\n          }\n\n          if (currentEl) {\n            renderer.leave(currentEl, function() {\n              previousEl = null;\n            });\n\n            previousEl = currentEl;\n            currentEl = null;\n          }\n        }\n\n        function updateView(firstTime) {\n          var newScope,\n              name            = getUiViewName(scope, attrs, $element, $interpolate),\n              previousLocals  = name && $state.$current && $state.$current.locals[name];\n\n          if (!firstTime && previousLocals === latestLocals) return; // nothing to do\n          newScope = scope.$new();\n          latestLocals = $state.$current.locals[name];\n\n          var clone = $transclude(newScope, function(clone) {\n            renderer.enter(clone, $element, function onUiViewEnter() {\n              if(currentScope) {\n                currentScope.$emit('$viewContentAnimationEnded');\n              }\n\n              if (angular.isDefined(autoScrollExp) && !autoScrollExp || scope.$eval(autoScrollExp)) {\n                $uiViewScroll(clone);\n              }\n            });\n            cleanupLastView();\n          });\n\n          currentEl = clone;\n          currentScope = newScope;\n          /**\n           * @ngdoc event\n           * @name ui.router.state.directive:ui-view#$viewContentLoaded\n           * @eventOf ui.router.state.directive:ui-view\n           * @eventType emits on ui-view directive scope\n           * @description           *\n           * Fired once the view is **loaded**, *after* the DOM is rendered.\n           *\n           * @param {Object} event Event object.\n           */\n          currentScope.$emit('$viewContentLoaded');\n          currentScope.$eval(onloadExp);\n        }\n      };\n    }\n  };\n\n  return directive;\n}\n\n$ViewDirectiveFill.$inject = ['$compile', '$controller', '$state', '$interpolate'];\nfunction $ViewDirectiveFill (  $compile,   $controller,   $state,   $interpolate) {\n  return {\n    restrict: 'ECA',\n    priority: -400,\n    compile: function (tElement) {\n      var initial = tElement.html();\n      return function (scope, $element, attrs) {\n        var current = $state.$current,\n            name = getUiViewName(scope, attrs, $element, $interpolate),\n            locals  = current && current.locals[name];\n\n        if (! locals) {\n          return;\n        }\n\n        $element.data('$uiView', { name: name, state: locals.$$state });\n        $element.html(locals.$template ? locals.$template : initial);\n\n        var link = $compile($element.contents());\n\n        if (locals.$$controller) {\n          locals.$scope = scope;\n          locals.$element = $element;\n          var controller = $controller(locals.$$controller, locals);\n          if (locals.$$controllerAs) {\n            scope[locals.$$controllerAs] = controller;\n          }\n          $element.data('$ngControllerController', controller);\n          $element.children().data('$ngControllerController', controller);\n        }\n\n        link(scope);\n      };\n    }\n  };\n}\n\n/**\n * Shared ui-view code for both directives:\n * Given scope, element, and its attributes, return the view's name\n */\nfunction getUiViewName(scope, attrs, element, $interpolate) {\n  var name = $interpolate(attrs.uiView || attrs.name || '')(scope);\n  var inherited = element.inheritedData('$uiView');\n  return name.indexOf('@') >= 0 ?  name :  (name + '@' + (inherited ? inherited.state.name : ''));\n}\n\nangular.module('ui.router.state').directive('uiView', $ViewDirective);\nangular.module('ui.router.state').directive('uiView', $ViewDirectiveFill);\n\nfunction parseStateRef(ref, current) {\n  var preparsed = ref.match(/^\\s*({[^}]*})\\s*$/), parsed;\n  if (preparsed) ref = current + '(' + preparsed[1] + ')';\n  parsed = ref.replace(/\\n/g, \" \").match(/^([^(]+?)\\s*(\\((.*)\\))?$/);\n  if (!parsed || parsed.length !== 4) throw new Error(\"Invalid state ref '\" + ref + \"'\");\n  return { state: parsed[1], paramExpr: parsed[3] || null };\n}\n\nfunction stateContext(el) {\n  var stateData = el.parent().inheritedData('$uiView');\n\n  if (stateData && stateData.state && stateData.state.name) {\n    return stateData.state;\n  }\n}\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-sref\n *\n * @requires ui.router.state.$state\n * @requires $timeout\n *\n * @restrict A\n *\n * @description\n * A directive that binds a link (`<a>` tag) to a state. If the state has an associated \n * URL, the directive will automatically generate & update the `href` attribute via \n * the {@link ui.router.state.$state#methods_href $state.href()} method. Clicking \n * the link will trigger a state transition with optional parameters. \n *\n * Also middle-clicking, right-clicking, and ctrl-clicking on the link will be \n * handled natively by the browser.\n *\n * You can also use relative state paths within ui-sref, just like the relative \n * paths passed to `$state.go()`. You just need to be aware that the path is relative\n * to the state that the link lives in, in other words the state that loaded the \n * template containing the link.\n *\n * You can specify options to pass to {@link ui.router.state.$state#go $state.go()}\n * using the `ui-sref-opts` attribute. Options are restricted to `location`, `inherit`,\n * and `reload`.\n *\n * @example\n * Here's an example of how you'd use ui-sref and how it would compile. If you have the \n * following template:\n * <pre>\n * <a ui-sref=\"home\">Home</a> | <a ui-sref=\"about\">About</a> | <a ui-sref=\"{page: 2}\">Next page</a>\n * \n * <ul>\n *     <li ng-repeat=\"contact in contacts\">\n *         <a ui-sref=\"contacts.detail({ id: contact.id })\">{{ contact.name }}</a>\n *     </li>\n * </ul>\n * </pre>\n * \n * Then the compiled html would be (assuming Html5Mode is off and current state is contacts):\n * <pre>\n * <a href=\"#/home\" ui-sref=\"home\">Home</a> | <a href=\"#/about\" ui-sref=\"about\">About</a> | <a href=\"#/contacts?page=2\" ui-sref=\"{page: 2}\">Next page</a>\n * \n * <ul>\n *     <li ng-repeat=\"contact in contacts\">\n *         <a href=\"#/contacts/1\" ui-sref=\"contacts.detail({ id: contact.id })\">Joe</a>\n *     </li>\n *     <li ng-repeat=\"contact in contacts\">\n *         <a href=\"#/contacts/2\" ui-sref=\"contacts.detail({ id: contact.id })\">Alice</a>\n *     </li>\n *     <li ng-repeat=\"contact in contacts\">\n *         <a href=\"#/contacts/3\" ui-sref=\"contacts.detail({ id: contact.id })\">Bob</a>\n *     </li>\n * </ul>\n *\n * <a ui-sref=\"home\" ui-sref-opts=\"{reload: true}\">Home</a>\n * </pre>\n *\n * @param {string} ui-sref 'stateName' can be any valid absolute or relative state\n * @param {Object} ui-sref-opts options to pass to {@link ui.router.state.$state#go $state.go()}\n */\n$StateRefDirective.$inject = ['$state', '$timeout'];\nfunction $StateRefDirective($state, $timeout) {\n  var allowedOptions = ['location', 'inherit', 'reload', 'absolute'];\n\n  return {\n    restrict: 'A',\n    require: ['?^uiSrefActive', '?^uiSrefActiveEq'],\n    link: function(scope, element, attrs, uiSrefActive) {\n      var ref = parseStateRef(attrs.uiSref, $state.current.name);\n      var params = null, url = null, base = stateContext(element) || $state.$current;\n      // SVGAElement does not use the href attribute, but rather the 'xlinkHref' attribute.\n      var hrefKind = Object.prototype.toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?\n                 'xlink:href' : 'href';\n      var newHref = null, isAnchor = element.prop(\"tagName\").toUpperCase() === \"A\";\n      var isForm = element[0].nodeName === \"FORM\";\n      var attr = isForm ? \"action\" : hrefKind, nav = true;\n\n      var options = { relative: base, inherit: true };\n      var optionsOverride = scope.$eval(attrs.uiSrefOpts) || {};\n\n      angular.forEach(allowedOptions, function(option) {\n        if (option in optionsOverride) {\n          options[option] = optionsOverride[option];\n        }\n      });\n\n      var update = function(newVal) {\n        if (newVal) params = angular.copy(newVal);\n        if (!nav) return;\n\n        newHref = $state.href(ref.state, params, options);\n\n        var activeDirective = uiSrefActive[1] || uiSrefActive[0];\n        if (activeDirective) {\n          activeDirective.$$addStateInfo(ref.state, params);\n        }\n        if (newHref === null) {\n          nav = false;\n          return false;\n        }\n        attrs.$set(attr, newHref);\n      };\n\n      if (ref.paramExpr) {\n        scope.$watch(ref.paramExpr, function(newVal, oldVal) {\n          if (newVal !== params) update(newVal);\n        }, true);\n        params = angular.copy(scope.$eval(ref.paramExpr));\n      }\n      update();\n\n      if (isForm) return;\n\n      element.bind(\"click\", function(e) {\n        var button = e.which || e.button;\n        if ( !(button > 1 || e.ctrlKey || e.metaKey || e.shiftKey || element.attr('target')) ) {\n          // HACK: This is to allow ng-clicks to be processed before the transition is initiated:\n          var transition = $timeout(function() {\n            $state.go(ref.state, params, options);\n          });\n          e.preventDefault();\n\n          // if the state has no URL, ignore one preventDefault from the <a> directive.\n          var ignorePreventDefaultCount = isAnchor && !newHref ? 1: 0;\n          e.preventDefault = function() {\n            if (ignorePreventDefaultCount-- <= 0)\n              $timeout.cancel(transition);\n          };\n        }\n      });\n    }\n  };\n}\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-sref-active\n *\n * @requires ui.router.state.$state\n * @requires ui.router.state.$stateParams\n * @requires $interpolate\n *\n * @restrict A\n *\n * @description\n * A directive working alongside ui-sref to add classes to an element when the\n * related ui-sref directive's state is active, and removing them when it is inactive.\n * The primary use-case is to simplify the special appearance of navigation menus\n * relying on `ui-sref`, by having the \"active\" state's menu button appear different,\n * distinguishing it from the inactive menu items.\n *\n * ui-sref-active can live on the same element as ui-sref or on a parent element. The first\n * ui-sref-active found at the same level or above the ui-sref will be used.\n *\n * Will activate when the ui-sref's target state or any child state is active. If you\n * need to activate only when the ui-sref target state is active and *not* any of\n * it's children, then you will use\n * {@link ui.router.state.directive:ui-sref-active-eq ui-sref-active-eq}\n *\n * @example\n * Given the following template:\n * <pre>\n * <ul>\n *   <li ui-sref-active=\"active\" class=\"item\">\n *     <a href ui-sref=\"app.user({user: 'bilbobaggins'})\">@bilbobaggins</a>\n *   </li>\n * </ul>\n * </pre>\n *\n *\n * When the app state is \"app.user\" (or any children states), and contains the state parameter \"user\" with value \"bilbobaggins\",\n * the resulting HTML will appear as (note the 'active' class):\n * <pre>\n * <ul>\n *   <li ui-sref-active=\"active\" class=\"item active\">\n *     <a ui-sref=\"app.user({user: 'bilbobaggins'})\" href=\"/users/bilbobaggins\">@bilbobaggins</a>\n *   </li>\n * </ul>\n * </pre>\n *\n * The class name is interpolated **once** during the directives link time (any further changes to the\n * interpolated value are ignored).\n *\n * Multiple classes may be specified in a space-separated format:\n * <pre>\n * <ul>\n *   <li ui-sref-active='class1 class2 class3'>\n *     <a ui-sref=\"app.user\">link</a>\n *   </li>\n * </ul>\n * </pre>\n */\n\n/**\n * @ngdoc directive\n * @name ui.router.state.directive:ui-sref-active-eq\n *\n * @requires ui.router.state.$state\n * @requires ui.router.state.$stateParams\n * @requires $interpolate\n *\n * @restrict A\n *\n * @description\n * The same as {@link ui.router.state.directive:ui-sref-active ui-sref-active} but will only activate\n * when the exact target state used in the `ui-sref` is active; no child states.\n *\n */\n$StateRefActiveDirective.$inject = ['$state', '$stateParams', '$interpolate'];\nfunction $StateRefActiveDirective($state, $stateParams, $interpolate) {\n  return  {\n    restrict: \"A\",\n    controller: ['$scope', '$element', '$attrs', function ($scope, $element, $attrs) {\n      var states = [], activeClass;\n\n      // There probably isn't much point in $observing this\n      // uiSrefActive and uiSrefActiveEq share the same directive object with some\n      // slight difference in logic routing\n      activeClass = $interpolate($attrs.uiSrefActiveEq || $attrs.uiSrefActive || '', false)($scope);\n\n      // Allow uiSref to communicate with uiSrefActive[Equals]\n      this.$$addStateInfo = function (newState, newParams) {\n        var state = $state.get(newState, stateContext($element));\n\n        states.push({\n          state: state || { name: newState },\n          params: newParams\n        });\n\n        update();\n      };\n\n      $scope.$on('$stateChangeSuccess', update);\n\n      // Update route state\n      function update() {\n        if (anyMatch()) {\n          $element.addClass(activeClass);\n        } else {\n          $element.removeClass(activeClass);\n        }\n      }\n\n      function anyMatch() {\n        for (var i = 0; i < states.length; i++) {\n          if (isMatch(states[i].state, states[i].params)) {\n            return true;\n          }\n        }\n        return false;\n      }\n\n      function isMatch(state, params) {\n        if (typeof $attrs.uiSrefActiveEq !== 'undefined') {\n          return $state.is(state.name, params);\n        } else {\n          return $state.includes(state.name, params);\n        }\n      }\n    }]\n  };\n}\n\nangular.module('ui.router.state')\n  .directive('uiSref', $StateRefDirective)\n  .directive('uiSrefActive', $StateRefActiveDirective)\n  .directive('uiSrefActiveEq', $StateRefActiveDirective);\n\n/**\n * @ngdoc filter\n * @name ui.router.state.filter:isState\n *\n * @requires ui.router.state.$state\n *\n * @description\n * Translates to {@link ui.router.state.$state#methods_is $state.is(\"stateName\")}.\n */\n$IsStateFilter.$inject = ['$state'];\nfunction $IsStateFilter($state) {\n  var isFilter = function (state) {\n    return $state.is(state);\n  };\n  isFilter.$stateful = true;\n  return isFilter;\n}\n\n/**\n * @ngdoc filter\n * @name ui.router.state.filter:includedByState\n *\n * @requires ui.router.state.$state\n *\n * @description\n * Translates to {@link ui.router.state.$state#methods_includes $state.includes('fullOrPartialStateName')}.\n */\n$IncludedByStateFilter.$inject = ['$state'];\nfunction $IncludedByStateFilter($state) {\n  var includesFilter = function (state) {\n    return $state.includes(state);\n  };\n  includesFilter.$stateful = true;\n  return  includesFilter;\n}\n\nangular.module('ui.router.state')\n  .filter('isState', $IsStateFilter)\n  .filter('includedByState', $IncludedByStateFilter);\n})(window, window.angular);","/**\n * oclazyload - Load modules on demand (lazy load) with angularJS\n * @version v1.0.9\n * @link https://github.com/ocombe/ocLazyLoad\n * @license MIT\n * @author Olivier Combe <olivier.combe@gmail.com>\n */\n(function (angular, window) {\n    'use strict';\n\n    var regModules = ['ng', 'oc.lazyLoad'],\n        regInvokes = {},\n        regConfigs = [],\n        modulesToLoad = [],\n        // modules to load from angular.module or other sources\n    realModules = [],\n        // real modules called from angular.module\n    recordDeclarations = [],\n        broadcast = angular.noop,\n        runBlocks = {},\n        justLoaded = [];\n\n    var ocLazyLoad = angular.module('oc.lazyLoad', ['ng']);\n\n    ocLazyLoad.provider('$ocLazyLoad', [\"$controllerProvider\", \"$provide\", \"$compileProvider\", \"$filterProvider\", \"$injector\", \"$animateProvider\", function ($controllerProvider, $provide, $compileProvider, $filterProvider, $injector, $animateProvider) {\n        var modules = {},\n            providers = {\n            $controllerProvider: $controllerProvider,\n            $compileProvider: $compileProvider,\n            $filterProvider: $filterProvider,\n            $provide: $provide, // other things (constant, decorator, provider, factory, service)\n            $injector: $injector,\n            $animateProvider: $animateProvider\n        },\n            debug = false,\n            events = false,\n            moduleCache = [],\n            modulePromises = {};\n\n        moduleCache.push = function (value) {\n            if (this.indexOf(value) === -1) {\n                Array.prototype.push.apply(this, arguments);\n            }\n        };\n\n        this.config = function (config) {\n            // If we want to define modules configs\n            if (angular.isDefined(config.modules)) {\n                if (angular.isArray(config.modules)) {\n                    angular.forEach(config.modules, function (moduleConfig) {\n                        modules[moduleConfig.name] = moduleConfig;\n                    });\n                } else {\n                    modules[config.modules.name] = config.modules;\n                }\n            }\n\n            if (angular.isDefined(config.debug)) {\n                debug = config.debug;\n            }\n\n            if (angular.isDefined(config.events)) {\n                events = config.events;\n            }\n        };\n\n        /**\n         * Get the list of existing registered modules\n         * @param element\n         */\n        this._init = function _init(element) {\n            // this is probably useless now because we override angular.bootstrap\n            if (modulesToLoad.length === 0) {\n                var elements = [element],\n                    names = ['ng:app', 'ng-app', 'x-ng-app', 'data-ng-app'],\n                    NG_APP_CLASS_REGEXP = /\\sng[:\\-]app(:\\s*([\\w\\d_]+);?)?\\s/,\n                    append = function append(elm) {\n                    return elm && elements.push(elm);\n                };\n\n                angular.forEach(names, function (name) {\n                    names[name] = true;\n                    append(document.getElementById(name));\n                    name = name.replace(':', '\\\\:');\n                    if (typeof element[0] !== 'undefined' && element[0].querySelectorAll) {\n                        angular.forEach(element[0].querySelectorAll('.' + name), append);\n                        angular.forEach(element[0].querySelectorAll('.' + name + '\\\\:'), append);\n                        angular.forEach(element[0].querySelectorAll('[' + name + ']'), append);\n                    }\n                });\n\n                angular.forEach(elements, function (elm) {\n                    if (modulesToLoad.length === 0) {\n                        var className = ' ' + element.className + ' ';\n                        var match = NG_APP_CLASS_REGEXP.exec(className);\n                        if (match) {\n                            modulesToLoad.push((match[2] || '').replace(/\\s+/g, ','));\n                        } else {\n                            angular.forEach(elm.attributes, function (attr) {\n                                if (modulesToLoad.length === 0 && names[attr.name]) {\n                                    modulesToLoad.push(attr.value);\n                                }\n                            });\n                        }\n                    }\n                });\n            }\n\n            if (modulesToLoad.length === 0 && !((window.jasmine || window.mocha) && angular.isDefined(angular.mock))) {\n                console.error('No module found during bootstrap, unable to init ocLazyLoad. You should always use the ng-app directive or angular.boostrap when you use ocLazyLoad.');\n            }\n\n            var addReg = function addReg(moduleName) {\n                if (regModules.indexOf(moduleName) === -1) {\n                    // register existing modules\n                    regModules.push(moduleName);\n                    var mainModule = angular.module(moduleName);\n\n                    // register existing components (directives, services, ...)\n                    _invokeQueue(null, mainModule._invokeQueue, moduleName);\n                    _invokeQueue(null, mainModule._configBlocks, moduleName); // angular 1.3+\n\n                    angular.forEach(mainModule.requires, addReg);\n                }\n            };\n\n            angular.forEach(modulesToLoad, function (moduleName) {\n                addReg(moduleName);\n            });\n\n            modulesToLoad = []; // reset for next bootstrap\n            recordDeclarations.pop(); // wait for the next lazy load\n        };\n\n        /**\n         * Like JSON.stringify but that doesn't throw on circular references\n         * @param obj\n         */\n        var stringify = function stringify(obj) {\n            try {\n                return JSON.stringify(obj);\n            } catch (e) {\n                var cache = [];\n                return JSON.stringify(obj, function (key, value) {\n                    if (angular.isObject(value) && value !== null) {\n                        if (cache.indexOf(value) !== -1) {\n                            // Circular reference found, discard key\n                            return;\n                        }\n                        // Store value in our collection\n                        cache.push(value);\n                    }\n                    return value;\n                });\n            }\n        };\n\n        var hashCode = function hashCode(str) {\n            var hash = 0,\n                i,\n                chr,\n                len;\n            if (str.length == 0) {\n                return hash;\n            }\n            for (i = 0, len = str.length; i < len; i++) {\n                chr = str.charCodeAt(i);\n                hash = (hash << 5) - hash + chr;\n                hash |= 0; // Convert to 32bit integer\n            }\n            return hash;\n        };\n\n        function _register(providers, registerModules, params) {\n            if (registerModules) {\n                var k,\n                    moduleName,\n                    moduleFn,\n                    tempRunBlocks = [];\n                for (k = registerModules.length - 1; k >= 0; k--) {\n                    moduleName = registerModules[k];\n                    if (!angular.isString(moduleName)) {\n                        moduleName = getModuleName(moduleName);\n                    }\n                    if (!moduleName || justLoaded.indexOf(moduleName) !== -1 || modules[moduleName] && realModules.indexOf(moduleName) === -1) {\n                        continue;\n                    }\n                    // new if not registered\n                    var newModule = regModules.indexOf(moduleName) === -1;\n                    moduleFn = ngModuleFct(moduleName);\n                    if (newModule) {\n                        regModules.push(moduleName);\n                        _register(providers, moduleFn.requires, params);\n                    }\n                    if (moduleFn._runBlocks.length > 0) {\n                        // new run blocks detected! Replace the old ones (if existing)\n                        runBlocks[moduleName] = [];\n                        while (moduleFn._runBlocks.length > 0) {\n                            runBlocks[moduleName].push(moduleFn._runBlocks.shift());\n                        }\n                    }\n                    if (angular.isDefined(runBlocks[moduleName]) && (newModule || params.rerun)) {\n                        tempRunBlocks = tempRunBlocks.concat(runBlocks[moduleName]);\n                    }\n                    _invokeQueue(providers, moduleFn._invokeQueue, moduleName, params.reconfig);\n                    _invokeQueue(providers, moduleFn._configBlocks, moduleName, params.reconfig); // angular 1.3+\n                    broadcast(newModule ? 'ocLazyLoad.moduleLoaded' : 'ocLazyLoad.moduleReloaded', moduleName);\n                    registerModules.pop();\n                    justLoaded.push(moduleName);\n                }\n                // execute the run blocks at the end\n                var instanceInjector = providers.getInstanceInjector();\n                angular.forEach(tempRunBlocks, function (fn) {\n                    instanceInjector.invoke(fn);\n                });\n            }\n        }\n\n        function _registerInvokeList(args, moduleName) {\n            var invokeList = args[2][0],\n                type = args[1],\n                newInvoke = false;\n            if (angular.isUndefined(regInvokes[moduleName])) {\n                regInvokes[moduleName] = {};\n            }\n            if (angular.isUndefined(regInvokes[moduleName][type])) {\n                regInvokes[moduleName][type] = {};\n            }\n            var onInvoke = function onInvoke(invokeName, invoke) {\n                if (!regInvokes[moduleName][type].hasOwnProperty(invokeName)) {\n                    regInvokes[moduleName][type][invokeName] = [];\n                }\n                if (checkHashes(invoke, regInvokes[moduleName][type][invokeName])) {\n                    newInvoke = true;\n                    regInvokes[moduleName][type][invokeName].push(invoke);\n                    broadcast('ocLazyLoad.componentLoaded', [moduleName, type, invokeName]);\n                }\n            };\n\n            function checkHashes(potentialNew, invokes) {\n                var isNew = true,\n                    newHash;\n                if (invokes.length) {\n                    newHash = signature(potentialNew);\n                    angular.forEach(invokes, function (invoke) {\n                        isNew = isNew && signature(invoke) !== newHash;\n                    });\n                }\n                return isNew;\n            }\n\n            function signature(data) {\n                if (angular.isArray(data)) {\n                    // arrays are objects, we need to test for it first\n                    return hashCode(data.toString());\n                } else if (angular.isObject(data)) {\n                    // constants & values for example\n                    return hashCode(stringify(data));\n                } else {\n                    if (angular.isDefined(data) && data !== null) {\n                        return hashCode(data.toString());\n                    } else {\n                        // null & undefined constants\n                        return data;\n                    }\n                }\n            }\n\n            if (angular.isString(invokeList)) {\n                onInvoke(invokeList, args[2][1]);\n            } else if (angular.isObject(invokeList)) {\n                angular.forEach(invokeList, function (invoke, key) {\n                    if (angular.isString(invoke)) {\n                        // decorators for example\n                        onInvoke(invoke, invokeList[1]);\n                    } else {\n                        // components registered as object lists {\"componentName\": function() {}}\n                        onInvoke(key, invoke);\n                    }\n                });\n            } else {\n                return false;\n            }\n            return newInvoke;\n        }\n\n        function _invokeQueue(providers, queue, moduleName, reconfig) {\n            if (!queue) {\n                return;\n            }\n\n            var i, len, args, provider;\n            for (i = 0, len = queue.length; i < len; i++) {\n                args = queue[i];\n                if (angular.isArray(args)) {\n                    if (providers !== null) {\n                        if (providers.hasOwnProperty(args[0])) {\n                            provider = providers[args[0]];\n                        } else {\n                            throw new Error('unsupported provider ' + args[0]);\n                        }\n                    }\n                    var isNew = _registerInvokeList(args, moduleName);\n                    if (args[1] !== 'invoke') {\n                        if (isNew && angular.isDefined(provider)) {\n                            provider[args[1]].apply(provider, args[2]);\n                        }\n                    } else {\n                        // config block\n                        var callInvoke = function callInvoke(fct) {\n                            var invoked = regConfigs.indexOf(moduleName + '-' + fct);\n                            if (invoked === -1 || reconfig) {\n                                if (invoked === -1) {\n                                    regConfigs.push(moduleName + '-' + fct);\n                                }\n                                if (angular.isDefined(provider)) {\n                                    provider[args[1]].apply(provider, args[2]);\n                                }\n                            }\n                        };\n                        if (angular.isFunction(args[2][0])) {\n                            callInvoke(args[2][0]);\n                        } else if (angular.isArray(args[2][0])) {\n                            for (var j = 0, jlen = args[2][0].length; j < jlen; j++) {\n                                if (angular.isFunction(args[2][0][j])) {\n                                    callInvoke(args[2][0][j]);\n                                }\n                            }\n                        }\n                    }\n                }\n            }\n        }\n\n        function getModuleName(module) {\n            var moduleName = null;\n            if (angular.isString(module)) {\n                moduleName = module;\n            } else if (angular.isObject(module) && module.hasOwnProperty('name') && angular.isString(module.name)) {\n                moduleName = module.name;\n            }\n            return moduleName;\n        }\n\n        function moduleExists(moduleName) {\n            if (!angular.isString(moduleName)) {\n                return false;\n            }\n            try {\n                return ngModuleFct(moduleName);\n            } catch (e) {\n                if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n                    return false;\n                }\n            }\n        }\n\n        this.$get = [\"$log\", \"$rootElement\", \"$rootScope\", \"$cacheFactory\", \"$q\", function ($log, $rootElement, $rootScope, $cacheFactory, $q) {\n            var instanceInjector,\n                filesCache = $cacheFactory('ocLazyLoad');\n\n            if (!debug) {\n                $log = {};\n                $log['error'] = angular.noop;\n                $log['warn'] = angular.noop;\n                $log['info'] = angular.noop;\n            }\n\n            // Make this lazy because when $get() is called the instance injector hasn't been assigned to the rootElement yet\n            providers.getInstanceInjector = function () {\n                return instanceInjector ? instanceInjector : instanceInjector = $rootElement.data('$injector') || angular.injector();\n            };\n\n            broadcast = function broadcast(eventName, params) {\n                if (events) {\n                    $rootScope.$broadcast(eventName, params);\n                }\n                if (debug) {\n                    $log.info(eventName, params);\n                }\n            };\n\n            function reject(e) {\n                var deferred = $q.defer();\n                $log.error(e.message);\n                deferred.reject(e);\n                return deferred.promise;\n            }\n\n            return {\n                _broadcast: broadcast,\n\n                _$log: $log,\n\n                /**\n                 * Returns the files cache used by the loaders to store the files currently loading\n                 * @returns {*}\n                 */\n                _getFilesCache: function getFilesCache() {\n                    return filesCache;\n                },\n\n                /**\n                 * Let the service know that it should monitor angular.module because files are loading\n                 * @param watch boolean\n                 */\n                toggleWatch: function toggleWatch(watch) {\n                    if (watch) {\n                        recordDeclarations.push(true);\n                    } else {\n                        recordDeclarations.pop();\n                    }\n                },\n\n                /**\n                 * Let you get a module config object\n                 * @param moduleName String the name of the module\n                 * @returns {*}\n                 */\n                getModuleConfig: function getModuleConfig(moduleName) {\n                    if (!angular.isString(moduleName)) {\n                        throw new Error('You need to give the name of the module to get');\n                    }\n                    if (!modules[moduleName]) {\n                        return null;\n                    }\n                    return angular.copy(modules[moduleName]);\n                },\n\n                /**\n                 * Let you define a module config object\n                 * @param moduleConfig Object the module config object\n                 * @returns {*}\n                 */\n                setModuleConfig: function setModuleConfig(moduleConfig) {\n                    if (!angular.isObject(moduleConfig)) {\n                        throw new Error('You need to give the module config object to set');\n                    }\n                    modules[moduleConfig.name] = moduleConfig;\n                    return moduleConfig;\n                },\n\n                /**\n                 * Returns the list of loaded modules\n                 * @returns {string[]}\n                 */\n                getModules: function getModules() {\n                    return regModules;\n                },\n\n                /**\n                 * Let you check if a module has been loaded into Angular or not\n                 * @param modulesNames String/Object a module name, or a list of module names\n                 * @returns {boolean}\n                 */\n                isLoaded: function isLoaded(modulesNames) {\n                    var moduleLoaded = function moduleLoaded(module) {\n                        var isLoaded = regModules.indexOf(module) > -1;\n                        if (!isLoaded) {\n                            isLoaded = !!moduleExists(module);\n                        }\n                        return isLoaded;\n                    };\n                    if (angular.isString(modulesNames)) {\n                        modulesNames = [modulesNames];\n                    }\n                    if (angular.isArray(modulesNames)) {\n                        var i, len;\n                        for (i = 0, len = modulesNames.length; i < len; i++) {\n                            if (!moduleLoaded(modulesNames[i])) {\n                                return false;\n                            }\n                        }\n                        return true;\n                    } else {\n                        throw new Error('You need to define the module(s) name(s)');\n                    }\n                },\n\n                /**\n                 * Given a module, return its name\n                 * @param module\n                 * @returns {String}\n                 */\n                _getModuleName: getModuleName,\n\n                /**\n                 * Returns a module if it exists\n                 * @param moduleName\n                 * @returns {module}\n                 */\n                _getModule: function getModule(moduleName) {\n                    try {\n                        return ngModuleFct(moduleName);\n                    } catch (e) {\n                        // this error message really suxx\n                        if (/No module/.test(e) || e.message.indexOf('$injector:nomod') > -1) {\n                            e.message = 'The module \"' + stringify(moduleName) + '\" that you are trying to load does not exist. ' + e.message;\n                        }\n                        throw e;\n                    }\n                },\n\n                /**\n                 * Check if a module exists and returns it if it does\n                 * @param moduleName\n                 * @returns {boolean}\n                 */\n                moduleExists: moduleExists,\n\n                /**\n                 * Load the dependencies, and might try to load new files depending on the config\n                 * @param moduleName (String or Array of Strings)\n                 * @param localParams\n                 * @returns {*}\n                 * @private\n                 */\n                _loadDependencies: function _loadDependencies(moduleName, localParams) {\n                    var loadedModule,\n                        requires,\n                        diff,\n                        promisesList = [],\n                        self = this;\n\n                    moduleName = self._getModuleName(moduleName);\n\n                    if (moduleName === null) {\n                        return $q.when();\n                    } else {\n                        try {\n                            loadedModule = self._getModule(moduleName);\n                        } catch (e) {\n                            return reject(e);\n                        }\n                        // get unloaded requires\n                        requires = self.getRequires(loadedModule);\n                    }\n\n                    angular.forEach(requires, function (requireEntry) {\n                        // If no configuration is provided, try and find one from a previous load.\n                        // If there isn't one, bail and let the normal flow run\n                        if (angular.isString(requireEntry)) {\n                            var config = self.getModuleConfig(requireEntry);\n                            if (config === null) {\n                                moduleCache.push(requireEntry); // We don't know about this module, but something else might, so push it anyway.\n                                return;\n                            }\n                            requireEntry = config;\n                            // ignore the name because it's probably not a real module name\n                            config.name = undefined;\n                        }\n\n                        // Check if this dependency has been loaded previously\n                        if (self.moduleExists(requireEntry.name)) {\n                            // compare against the already loaded module to see if the new definition adds any new files\n                            diff = requireEntry.files.filter(function (n) {\n                                return self.getModuleConfig(requireEntry.name).files.indexOf(n) < 0;\n                            });\n\n                            // If the module was redefined, advise via the console\n                            if (diff.length !== 0) {\n                                self._$log.warn('Module \"', moduleName, '\" attempted to redefine configuration for dependency. \"', requireEntry.name, '\"\\n Additional Files Loaded:', diff);\n                            }\n\n                            // Push everything to the file loader, it will weed out the duplicates.\n                            if (angular.isDefined(self.filesLoader)) {\n                                // if a files loader is defined\n                                promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n                                    return self._loadDependencies(requireEntry);\n                                }));\n                            } else {\n                                return reject(new Error('Error: New dependencies need to be loaded from external files (' + requireEntry.files + '), but no loader has been defined.'));\n                            }\n                            return;\n                        } else if (angular.isArray(requireEntry)) {\n                            var files = [];\n                            angular.forEach(requireEntry, function (entry) {\n                                // let's check if the entry is a file name or a config name\n                                var config = self.getModuleConfig(entry);\n                                if (config === null) {\n                                    files.push(entry);\n                                } else if (config.files) {\n                                    files = files.concat(config.files);\n                                }\n                            });\n                            if (files.length > 0) {\n                                requireEntry = {\n                                    files: files\n                                };\n                            }\n                        } else if (angular.isObject(requireEntry)) {\n                            if (requireEntry.hasOwnProperty('name') && requireEntry['name']) {\n                                // The dependency doesn't exist in the module cache and is a new configuration, so store and push it.\n                                self.setModuleConfig(requireEntry);\n                                moduleCache.push(requireEntry['name']);\n                            }\n                        }\n\n                        // Check if the dependency has any files that need to be loaded. If there are, push a new promise to the promise list.\n                        if (angular.isDefined(requireEntry.files) && requireEntry.files.length !== 0) {\n                            if (angular.isDefined(self.filesLoader)) {\n                                // if a files loader is defined\n                                promisesList.push(self.filesLoader(requireEntry, localParams).then(function () {\n                                    return self._loadDependencies(requireEntry);\n                                }));\n                            } else {\n                                return reject(new Error('Error: the module \"' + requireEntry.name + '\" is defined in external files (' + requireEntry.files + '), but no loader has been defined.'));\n                            }\n                        }\n                    });\n\n                    // Create a wrapper promise to watch the promise list and resolve it once everything is done.\n                    return $q.all(promisesList);\n                },\n\n                /**\n                 * Inject new modules into Angular\n                 * @param moduleName\n                 * @param localParams\n                 * @param real\n                 */\n                inject: function inject(moduleName) {\n                    var localParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n                    var real = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2];\n\n                    var self = this,\n                        deferred = $q.defer();\n                    if (angular.isDefined(moduleName) && moduleName !== null) {\n                        if (angular.isArray(moduleName)) {\n                            var promisesList = [];\n                            angular.forEach(moduleName, function (module) {\n                                promisesList.push(self.inject(module, localParams, real));\n                            });\n                            return $q.all(promisesList);\n                        } else {\n                            self._addToLoadList(self._getModuleName(moduleName), true, real);\n                        }\n                    }\n                    if (modulesToLoad.length > 0) {\n                        var res = modulesToLoad.slice(); // clean copy\n                        var loadNext = function loadNext(moduleName) {\n                            moduleCache.push(moduleName);\n                            modulePromises[moduleName] = deferred.promise;\n                            self._loadDependencies(moduleName, localParams).then(function success() {\n                                try {\n                                    justLoaded = [];\n                                    _register(providers, moduleCache, localParams);\n                                } catch (e) {\n                                    self._$log.error(e.message);\n                                    deferred.reject(e);\n                                    return;\n                                }\n\n                                if (modulesToLoad.length > 0) {\n                                    loadNext(modulesToLoad.shift()); // load the next in list\n                                } else {\n                                        deferred.resolve(res); // everything has been loaded, resolve\n                                    }\n                            }, function error(err) {\n                                deferred.reject(err);\n                            });\n                        };\n\n                        // load the first in list\n                        loadNext(modulesToLoad.shift());\n                    } else if (localParams && localParams.name && modulePromises[localParams.name]) {\n                        return modulePromises[localParams.name];\n                    } else {\n                        deferred.resolve();\n                    }\n                    return deferred.promise;\n                },\n\n                /**\n                 * Get the list of required modules/services/... for this module\n                 * @param module\n                 * @returns {Array}\n                 */\n                getRequires: function getRequires(module) {\n                    var requires = [];\n                    angular.forEach(module.requires, function (requireModule) {\n                        if (regModules.indexOf(requireModule) === -1) {\n                            requires.push(requireModule);\n                        }\n                    });\n                    return requires;\n                },\n\n                /**\n                 * Invoke the new modules & component by their providers\n                 * @param providers\n                 * @param queue\n                 * @param moduleName\n                 * @param reconfig\n                 * @private\n                 */\n                _invokeQueue: _invokeQueue,\n\n                /**\n                 * Check if a module has been invoked and registers it if not\n                 * @param args\n                 * @param moduleName\n                 * @returns {boolean} is new\n                 */\n                _registerInvokeList: _registerInvokeList,\n\n                /**\n                 * Register a new module and loads it, executing the run/config blocks if needed\n                 * @param providers\n                 * @param registerModules\n                 * @param params\n                 * @private\n                 */\n                _register: _register,\n\n                /**\n                 * Add a module name to the list of modules that will be loaded in the next inject\n                 * @param name\n                 * @param force\n                 * @private\n                 */\n                _addToLoadList: _addToLoadList,\n\n                /**\n                 * Unregister modules (you shouldn't have to use this)\n                 * @param modules\n                 */\n                _unregister: function _unregister(modules) {\n                    if (angular.isDefined(modules)) {\n                        if (angular.isArray(modules)) {\n                            angular.forEach(modules, function (module) {\n                                regInvokes[module] = undefined;\n                            });\n                        }\n                    }\n                }\n            };\n        }];\n\n        // Let's get the list of loaded modules & components\n        this._init(angular.element(window.document));\n    }]);\n\n    var bootstrapFct = angular.bootstrap;\n    angular.bootstrap = function (element, modules, config) {\n        // we use slice to make a clean copy\n        angular.forEach(modules.slice(), function (module) {\n            _addToLoadList(module, true, true);\n        });\n        return bootstrapFct(element, modules, config);\n    };\n\n    var _addToLoadList = function _addToLoadList(name, force, real) {\n        if ((recordDeclarations.length > 0 || force) && angular.isString(name) && modulesToLoad.indexOf(name) === -1) {\n            modulesToLoad.push(name);\n            if (real) {\n                realModules.push(name);\n            }\n        }\n    };\n\n    var ngModuleFct = angular.module;\n    angular.module = function (name, requires, configFn) {\n        _addToLoadList(name, false, true);\n        return ngModuleFct(name, requires, configFn);\n    };\n\n    // CommonJS package manager support:\n    if (typeof module !== 'undefined' && typeof exports !== 'undefined' && module.exports === exports) {\n        module.exports = 'oc.lazyLoad';\n    }\n})(angular, window);\n(function (angular) {\n    'use strict';\n\n    angular.module('oc.lazyLoad').directive('ocLazyLoad', [\"$ocLazyLoad\", \"$compile\", \"$animate\", \"$parse\", \"$timeout\", function ($ocLazyLoad, $compile, $animate, $parse, $timeout) {\n        return {\n            restrict: 'A',\n            terminal: true,\n            priority: 1000,\n            compile: function compile(element, attrs) {\n                // we store the content and remove it before compilation\n                var content = element[0].innerHTML;\n                element.html('');\n\n                return function ($scope, $element, $attr) {\n                    var model = $parse($attr.ocLazyLoad);\n                    $scope.$watch(function () {\n                        return model($scope) || $attr.ocLazyLoad; // it can be a module name (string), an object, an array, or a scope reference to any of this\n                    }, function (moduleName) {\n                        if (angular.isDefined(moduleName)) {\n                            $ocLazyLoad.load(moduleName).then(function () {\n                                // Attach element contents to DOM and then compile them.\n                                // This prevents an issue where IE invalidates saved element objects (HTMLCollections)\n                                // of the compiled contents when attaching to the parent DOM.\n                                $animate.enter(content, $element);\n                                // get the new content & compile it\n                                $compile($element.contents())($scope);\n                            });\n                        }\n                    }, true);\n                };\n            }\n        };\n    }]);\n})(angular);\n(function (angular) {\n    'use strict';\n\n    angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n        $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", \"$window\", \"$interval\", function ($delegate, $q, $window, $interval) {\n            var uaCssChecked = false,\n                useCssLoadPatch = false,\n                anchor = $window.document.getElementsByTagName('head')[0] || $window.document.getElementsByTagName('body')[0];\n\n            /**\n             * Load a js/css file\n             * @param type\n             * @param path\n             * @param params\n             * @returns promise\n             */\n            $delegate.buildElement = function buildElement(type, path, params) {\n                var deferred = $q.defer(),\n                    el,\n                    loaded,\n                    filesCache = $delegate._getFilesCache(),\n                    cacheBuster = function cacheBuster(url) {\n                    var dc = new Date().getTime();\n                    if (url.indexOf('?') >= 0) {\n                        if (url.substring(0, url.length - 1) === '&') {\n                            return url + '_dc=' + dc;\n                        }\n                        return url + '&_dc=' + dc;\n                    } else {\n                        return url + '?_dc=' + dc;\n                    }\n                };\n\n                // Store the promise early so the file load can be detected by other parallel lazy loads\n                // (ie: multiple routes on one page) a 'true' value isn't sufficient\n                // as it causes false positive load results.\n                if (angular.isUndefined(filesCache.get(path))) {\n                    filesCache.put(path, deferred.promise);\n                }\n\n                // Switch in case more content types are added later\n                switch (type) {\n                    case 'css':\n                        el = $window.document.createElement('link');\n                        el.type = 'text/css';\n                        el.rel = 'stylesheet';\n                        el.href = params.cache === false ? cacheBuster(path) : path;\n                        break;\n                    case 'js':\n                        el = $window.document.createElement('script');\n                        el.src = params.cache === false ? cacheBuster(path) : path;\n                        break;\n                    default:\n                        filesCache.remove(path);\n                        deferred.reject(new Error('Requested type \"' + type + '\" is not known. Could not inject \"' + path + '\"'));\n                        break;\n                }\n                el.onload = el['onreadystatechange'] = function (e) {\n                    if (el['readyState'] && !/^c|loade/.test(el['readyState']) || loaded) return;\n                    el.onload = el['onreadystatechange'] = null;\n                    loaded = 1;\n                    $delegate._broadcast('ocLazyLoad.fileLoaded', path);\n                    deferred.resolve();\n                };\n                el.onerror = function () {\n                    filesCache.remove(path);\n                    deferred.reject(new Error('Unable to load ' + path));\n                };\n                el.async = params.serie ? 0 : 1;\n\n                var insertBeforeElem = anchor.lastChild;\n                if (params.insertBefore) {\n                    var element = angular.element(angular.isDefined(window.jQuery) ? params.insertBefore : document.querySelector(params.insertBefore));\n                    if (element && element.length > 0) {\n                        insertBeforeElem = element[0];\n                    }\n                }\n                insertBeforeElem.parentNode.insertBefore(el, insertBeforeElem);\n\n                /*\n                 The event load or readystatechange doesn't fire in:\n                 - iOS < 6       (default mobile browser)\n                 - Android < 4.4 (default mobile browser)\n                 - Safari < 6    (desktop browser)\n                 */\n                if (type == 'css') {\n                    if (!uaCssChecked) {\n                        var ua = $window.navigator.userAgent.toLowerCase();\n\n                        // iOS < 6\n                        if (/iP(hone|od|ad)/.test($window.navigator.platform)) {\n                            var v = $window.navigator.appVersion.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n                            var iOSVersion = parseFloat([parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)].join('.'));\n                            useCssLoadPatch = iOSVersion < 6;\n                        } else if (ua.indexOf(\"android\") > -1) {\n                            // Android < 4.4\n                            var androidVersion = parseFloat(ua.slice(ua.indexOf(\"android\") + 8));\n                            useCssLoadPatch = androidVersion < 4.4;\n                        } else if (ua.indexOf('safari') > -1) {\n                            var versionMatch = ua.match(/version\\/([\\.\\d]+)/i);\n                            useCssLoadPatch = versionMatch && versionMatch[1] && parseFloat(versionMatch[1]) < 6;\n                        }\n                    }\n\n                    if (useCssLoadPatch) {\n                        var tries = 1000; // * 20 = 20000 miliseconds\n                        var interval = $interval(function () {\n                            try {\n                                el.sheet.cssRules;\n                                $interval.cancel(interval);\n                                el.onload();\n                            } catch (e) {\n                                if (--tries <= 0) {\n                                    el.onerror();\n                                }\n                            }\n                        }, 20);\n                    }\n                }\n\n                return deferred.promise;\n            };\n\n            return $delegate;\n        }]);\n    }]);\n})(angular);\n(function (angular) {\n    'use strict';\n\n    angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n        $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n            /**\n             * The function that loads new files\n             * @param config\n             * @param params\n             * @returns {*}\n             */\n            $delegate.filesLoader = function filesLoader(config) {\n                var params = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n                var cssFiles = [],\n                    templatesFiles = [],\n                    jsFiles = [],\n                    promises = [],\n                    cachePromise = null,\n                    filesCache = $delegate._getFilesCache();\n\n                $delegate.toggleWatch(true); // start watching angular.module calls\n\n                angular.extend(params, config);\n\n                var pushFile = function pushFile(path) {\n                    var file_type = null,\n                        m;\n                    if (angular.isObject(path)) {\n                        file_type = path.type;\n                        path = path.path;\n                    }\n                    cachePromise = filesCache.get(path);\n                    if (angular.isUndefined(cachePromise) || params.cache === false) {\n\n                        // always check for requirejs syntax just in case\n                        if ((m = /^(css|less|html|htm|js)?(?=!)/.exec(path)) !== null) {\n                            // Detect file type using preceding type declaration (ala requireJS)\n                            file_type = m[1];\n                            path = path.substr(m[1].length + 1, path.length); // Strip the type from the path\n                        }\n\n                        if (!file_type) {\n                            if ((m = /[.](css|less|html|htm|js)?((\\?|#).*)?$/.exec(path)) !== null) {\n                                // Detect file type via file extension\n                                file_type = m[1];\n                            } else if (!$delegate.jsLoader.hasOwnProperty('ocLazyLoadLoader') && $delegate.jsLoader.hasOwnProperty('requirejs')) {\n                                // requirejs\n                                file_type = 'js';\n                            } else {\n                                $delegate._$log.error('File type could not be determined. ' + path);\n                                return;\n                            }\n                        }\n\n                        if ((file_type === 'css' || file_type === 'less') && cssFiles.indexOf(path) === -1) {\n                            cssFiles.push(path);\n                        } else if ((file_type === 'html' || file_type === 'htm') && templatesFiles.indexOf(path) === -1) {\n                            templatesFiles.push(path);\n                        } else if (file_type === 'js' || jsFiles.indexOf(path) === -1) {\n                            jsFiles.push(path);\n                        } else {\n                            $delegate._$log.error('File type is not valid. ' + path);\n                        }\n                    } else if (cachePromise) {\n                        promises.push(cachePromise);\n                    }\n                };\n\n                if (params.serie) {\n                    pushFile(params.files.shift());\n                } else {\n                    angular.forEach(params.files, function (path) {\n                        pushFile(path);\n                    });\n                }\n\n                if (cssFiles.length > 0) {\n                    var cssDeferred = $q.defer();\n                    $delegate.cssLoader(cssFiles, function (err) {\n                        if (angular.isDefined(err) && $delegate.cssLoader.hasOwnProperty('ocLazyLoadLoader')) {\n                            $delegate._$log.error(err);\n                            cssDeferred.reject(err);\n                        } else {\n                            cssDeferred.resolve();\n                        }\n                    }, params);\n                    promises.push(cssDeferred.promise);\n                }\n\n                if (templatesFiles.length > 0) {\n                    var templatesDeferred = $q.defer();\n                    $delegate.templatesLoader(templatesFiles, function (err) {\n                        if (angular.isDefined(err) && $delegate.templatesLoader.hasOwnProperty('ocLazyLoadLoader')) {\n                            $delegate._$log.error(err);\n                            templatesDeferred.reject(err);\n                        } else {\n                            templatesDeferred.resolve();\n                        }\n                    }, params);\n                    promises.push(templatesDeferred.promise);\n                }\n\n                if (jsFiles.length > 0) {\n                    var jsDeferred = $q.defer();\n                    $delegate.jsLoader(jsFiles, function (err) {\n                        if (angular.isDefined(err) && ($delegate.jsLoader.hasOwnProperty(\"ocLazyLoadLoader\") || $delegate.jsLoader.hasOwnProperty(\"requirejs\"))) {\n                            $delegate._$log.error(err);\n                            jsDeferred.reject(err);\n                        } else {\n                            jsDeferred.resolve();\n                        }\n                    }, params);\n                    promises.push(jsDeferred.promise);\n                }\n\n                if (promises.length === 0) {\n                    var deferred = $q.defer(),\n                        err = \"Error: no file to load has been found, if you're trying to load an existing module you should use the 'inject' method instead of 'load'.\";\n                    $delegate._$log.error(err);\n                    deferred.reject(err);\n                    return deferred.promise;\n                } else if (params.serie && params.files.length > 0) {\n                    return $q.all(promises).then(function () {\n                        return $delegate.filesLoader(config, params);\n                    });\n                } else {\n                    return $q.all(promises)['finally'](function (res) {\n                        $delegate.toggleWatch(false); // stop watching angular.module calls\n                        return res;\n                    });\n                }\n            };\n\n            /**\n             * Load a module or a list of modules into Angular\n             * @param module Mixed the name of a predefined module config object, or a module config object, or an array of either\n             * @param params Object optional parameters\n             * @returns promise\n             */\n            $delegate.load = function (originalModule) {\n                var originalParams = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1];\n\n                var self = this,\n                    config = null,\n                    deferredList = [],\n                    deferred = $q.defer(),\n                    errText;\n\n                // clean copy\n                var module = angular.copy(originalModule);\n                var params = angular.copy(originalParams);\n\n                // If module is an array, break it down\n                if (angular.isArray(module)) {\n                    // Resubmit each entry as a single module\n                    angular.forEach(module, function (m) {\n                        deferredList.push(self.load(m, params));\n                    });\n\n                    // Resolve the promise once everything has loaded\n                    $q.all(deferredList).then(function (res) {\n                        deferred.resolve(res);\n                    }, function (err) {\n                        deferred.reject(err);\n                    });\n\n                    return deferred.promise;\n                }\n\n                // Get or Set a configuration depending on what was passed in\n                if (angular.isString(module)) {\n                    config = self.getModuleConfig(module);\n                    if (!config) {\n                        config = {\n                            files: [module]\n                        };\n                    }\n                } else if (angular.isObject(module)) {\n                    // case {type: 'js', path: lazyLoadUrl + 'testModule.fakejs'}\n                    if (angular.isDefined(module.path) && angular.isDefined(module.type)) {\n                        config = {\n                            files: [module]\n                        };\n                    } else {\n                        config = self.setModuleConfig(module);\n                    }\n                }\n\n                if (config === null) {\n                    var moduleName = self._getModuleName(module);\n                    errText = 'Module \"' + (moduleName || 'unknown') + '\" is not configured, cannot load.';\n                    $delegate._$log.error(errText);\n                    deferred.reject(new Error(errText));\n                    return deferred.promise;\n                } else {\n                    // deprecated\n                    if (angular.isDefined(config.template)) {\n                        if (angular.isUndefined(config.files)) {\n                            config.files = [];\n                        }\n                        if (angular.isString(config.template)) {\n                            config.files.push(config.template);\n                        } else if (angular.isArray(config.template)) {\n                            config.files.concat(config.template);\n                        }\n                    }\n                }\n\n                var localParams = angular.extend({}, params, config);\n\n                // if someone used an external loader and called the load function with just the module name\n                if (angular.isUndefined(config.files) && angular.isDefined(config.name) && $delegate.moduleExists(config.name)) {\n                    return $delegate.inject(config.name, localParams, true);\n                }\n\n                $delegate.filesLoader(config, localParams).then(function () {\n                    $delegate.inject(null, localParams).then(function (res) {\n                        deferred.resolve(res);\n                    }, function (err) {\n                        deferred.reject(err);\n                    });\n                }, function (err) {\n                    deferred.reject(err);\n                });\n\n                return deferred.promise;\n            };\n\n            // return the patched service\n            return $delegate;\n        }]);\n    }]);\n})(angular);\n(function (angular) {\n    'use strict';\n\n    angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n        $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n            /**\n             * cssLoader function\n             * @type Function\n             * @param paths array list of css files to load\n             * @param callback to call when everything is loaded. We use a callback and not a promise\n             * @param params object config parameters\n             * because the user can overwrite cssLoader and it will probably not use promises :(\n             */\n            $delegate.cssLoader = function (paths, callback, params) {\n                var promises = [];\n                angular.forEach(paths, function (path) {\n                    promises.push($delegate.buildElement('css', path, params));\n                });\n                $q.all(promises).then(function () {\n                    callback();\n                }, function (err) {\n                    callback(err);\n                });\n            };\n            $delegate.cssLoader.ocLazyLoadLoader = true;\n\n            return $delegate;\n        }]);\n    }]);\n})(angular);\n(function (angular) {\n    'use strict';\n\n    angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n        $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$q\", function ($delegate, $q) {\n            /**\n             * jsLoader function\n             * @type Function\n             * @param paths array list of js files to load\n             * @param callback to call when everything is loaded. We use a callback and not a promise\n             * @param params object config parameters\n             * because the user can overwrite jsLoader and it will probably not use promises :(\n             */\n            $delegate.jsLoader = function (paths, callback, params) {\n                var promises = [];\n                angular.forEach(paths, function (path) {\n                    promises.push($delegate.buildElement('js', path, params));\n                });\n                $q.all(promises).then(function () {\n                    callback();\n                }, function (err) {\n                    callback(err);\n                });\n            };\n            $delegate.jsLoader.ocLazyLoadLoader = true;\n\n            return $delegate;\n        }]);\n    }]);\n})(angular);\n(function (angular) {\n    'use strict';\n\n    angular.module('oc.lazyLoad').config([\"$provide\", function ($provide) {\n        $provide.decorator('$ocLazyLoad', [\"$delegate\", \"$templateCache\", \"$q\", \"$http\", function ($delegate, $templateCache, $q, $http) {\n            /**\n             * templatesLoader function\n             * @type Function\n             * @param paths array list of css files to load\n             * @param callback to call when everything is loaded. We use a callback and not a promise\n             * @param params object config parameters for $http\n             * because the user can overwrite templatesLoader and it will probably not use promises :(\n             */\n            $delegate.templatesLoader = function (paths, callback, params) {\n                var promises = [],\n                    filesCache = $delegate._getFilesCache();\n\n                angular.forEach(paths, function (url) {\n                    var deferred = $q.defer();\n                    promises.push(deferred.promise);\n                    $http.get(url, params).success(function (data) {\n                        if (angular.isString(data) && data.length > 0) {\n                            angular.forEach(angular.element(data), function (node) {\n                                if (node.nodeName === 'SCRIPT' && node.type === 'text/ng-template') {\n                                    $templateCache.put(node.id, node.innerHTML);\n                                }\n                            });\n                        }\n                        if (angular.isUndefined(filesCache.get(url))) {\n                            filesCache.put(url, true);\n                        }\n                        deferred.resolve();\n                    }).error(function (err) {\n                        deferred.reject(new Error('Unable to load template file \"' + url + '\": ' + err));\n                    });\n                });\n                return $q.all(promises).then(function () {\n                    callback();\n                }, function (err) {\n                    callback(err);\n                });\n            };\n            $delegate.templatesLoader.ocLazyLoadLoader = true;\n\n            return $delegate;\n        }]);\n    }]);\n})(angular);\n// Array.indexOf polyfill for IE8\nif (!Array.prototype.indexOf) {\n    Array.prototype.indexOf = function (searchElement, fromIndex) {\n        var k;\n\n        // 1. Let O be the result of calling ToObject passing\n        //    the this value as the argument.\n        if (this == null) {\n            throw new TypeError('\"this\" is null or not defined');\n        }\n\n        var O = Object(this);\n\n        // 2. Let lenValue be the result of calling the Get\n        //    internal method of O with the argument \"length\".\n        // 3. Let len be ToUint32(lenValue).\n        var len = O.length >>> 0;\n\n        // 4. If len is 0, return -1.\n        if (len === 0) {\n            return -1;\n        }\n\n        // 5. If argument fromIndex was passed let n be\n        //    ToInteger(fromIndex); else let n be 0.\n        var n = +fromIndex || 0;\n\n        if (Math.abs(n) === Infinity) {\n            n = 0;\n        }\n\n        // 6. If n >= len, return -1.\n        if (n >= len) {\n            return -1;\n        }\n\n        // 7. If n >= 0, then Let k be n.\n        // 8. Else, n<0, Let k be len - abs(n).\n        //    If k is less than 0, then let k be 0.\n        k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\n\n        // 9. Repeat, while k < len\n        while (k < len) {\n            // a. Let Pk be ToString(k).\n            //   This is implicit for LHS operands of the in operator\n            // b. Let kPresent be the result of calling the\n            //    HasProperty internal method of O with argument Pk.\n            //   This step can be combined with c\n            // c. If kPresent is true, then\n            //    i.  Let elementK be the result of calling the Get\n            //        internal method of O with the argument ToString(k).\n            //   ii.  Let same be the result of applying the\n            //        Strict Equality Comparison Algorithm to\n            //        searchElement and elementK.\n            //  iii.  If same is true, return k.\n            if (k in O && O[k] === searchElement) {\n                return k;\n            }\n            k++;\n        }\n        return -1;\n    };\n}","//! moment.js\n//! version : 2.10.6\n//! authors : Tim Wood, Iskren Chernev, Moment.js contributors\n//! license : MIT\n//! momentjs.com\n\n(function (global, factory) {\n    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n    typeof define === 'function' && define.amd ? define(factory) :\n    global.moment = factory()\n}(this, function () { 'use strict';\n\n    var hookCallback;\n\n    function utils_hooks__hooks () {\n        return hookCallback.apply(null, arguments);\n    }\n\n    // This is done to register the method called with moment()\n    // without creating circular dependencies.\n    function setHookCallback (callback) {\n        hookCallback = callback;\n    }\n\n    function isArray(input) {\n        return Object.prototype.toString.call(input) === '[object Array]';\n    }\n\n    function isDate(input) {\n        return input instanceof Date || Object.prototype.toString.call(input) === '[object Date]';\n    }\n\n    function map(arr, fn) {\n        var res = [], i;\n        for (i = 0; i < arr.length; ++i) {\n            res.push(fn(arr[i], i));\n        }\n        return res;\n    }\n\n    function hasOwnProp(a, b) {\n        return Object.prototype.hasOwnProperty.call(a, b);\n    }\n\n    function extend(a, b) {\n        for (var i in b) {\n            if (hasOwnProp(b, i)) {\n                a[i] = b[i];\n            }\n        }\n\n        if (hasOwnProp(b, 'toString')) {\n            a.toString = b.toString;\n        }\n\n        if (hasOwnProp(b, 'valueOf')) {\n            a.valueOf = b.valueOf;\n        }\n\n        return a;\n    }\n\n    function create_utc__createUTC (input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, true).utc();\n    }\n\n    function defaultParsingFlags() {\n        // We need to deep clone this object.\n        return {\n            empty           : false,\n            unusedTokens    : [],\n            unusedInput     : [],\n            overflow        : -2,\n            charsLeftOver   : 0,\n            nullInput       : false,\n            invalidMonth    : null,\n            invalidFormat   : false,\n            userInvalidated : false,\n            iso             : false\n        };\n    }\n\n    function getParsingFlags(m) {\n        if (m._pf == null) {\n            m._pf = defaultParsingFlags();\n        }\n        return m._pf;\n    }\n\n    function valid__isValid(m) {\n        if (m._isValid == null) {\n            var flags = getParsingFlags(m);\n            m._isValid = !isNaN(m._d.getTime()) &&\n                flags.overflow < 0 &&\n                !flags.empty &&\n                !flags.invalidMonth &&\n                !flags.invalidWeekday &&\n                !flags.nullInput &&\n                !flags.invalidFormat &&\n                !flags.userInvalidated;\n\n            if (m._strict) {\n                m._isValid = m._isValid &&\n                    flags.charsLeftOver === 0 &&\n                    flags.unusedTokens.length === 0 &&\n                    flags.bigHour === undefined;\n            }\n        }\n        return m._isValid;\n    }\n\n    function valid__createInvalid (flags) {\n        var m = create_utc__createUTC(NaN);\n        if (flags != null) {\n            extend(getParsingFlags(m), flags);\n        }\n        else {\n            getParsingFlags(m).userInvalidated = true;\n        }\n\n        return m;\n    }\n\n    var momentProperties = utils_hooks__hooks.momentProperties = [];\n\n    function copyConfig(to, from) {\n        var i, prop, val;\n\n        if (typeof from._isAMomentObject !== 'undefined') {\n            to._isAMomentObject = from._isAMomentObject;\n        }\n        if (typeof from._i !== 'undefined') {\n            to._i = from._i;\n        }\n        if (typeof from._f !== 'undefined') {\n            to._f = from._f;\n        }\n        if (typeof from._l !== 'undefined') {\n            to._l = from._l;\n        }\n        if (typeof from._strict !== 'undefined') {\n            to._strict = from._strict;\n        }\n        if (typeof from._tzm !== 'undefined') {\n            to._tzm = from._tzm;\n        }\n        if (typeof from._isUTC !== 'undefined') {\n            to._isUTC = from._isUTC;\n        }\n        if (typeof from._offset !== 'undefined') {\n            to._offset = from._offset;\n        }\n        if (typeof from._pf !== 'undefined') {\n            to._pf = getParsingFlags(from);\n        }\n        if (typeof from._locale !== 'undefined') {\n            to._locale = from._locale;\n        }\n\n        if (momentProperties.length > 0) {\n            for (i in momentProperties) {\n                prop = momentProperties[i];\n                val = from[prop];\n                if (typeof val !== 'undefined') {\n                    to[prop] = val;\n                }\n            }\n        }\n\n        return to;\n    }\n\n    var updateInProgress = false;\n\n    // Moment prototype object\n    function Moment(config) {\n        copyConfig(this, config);\n        this._d = new Date(config._d != null ? config._d.getTime() : NaN);\n        // Prevent infinite loop in case updateOffset creates new moment\n        // objects.\n        if (updateInProgress === false) {\n            updateInProgress = true;\n            utils_hooks__hooks.updateOffset(this);\n            updateInProgress = false;\n        }\n    }\n\n    function isMoment (obj) {\n        return obj instanceof Moment || (obj != null && obj._isAMomentObject != null);\n    }\n\n    function absFloor (number) {\n        if (number < 0) {\n            return Math.ceil(number);\n        } else {\n            return Math.floor(number);\n        }\n    }\n\n    function toInt(argumentForCoercion) {\n        var coercedNumber = +argumentForCoercion,\n            value = 0;\n\n        if (coercedNumber !== 0 && isFinite(coercedNumber)) {\n            value = absFloor(coercedNumber);\n        }\n\n        return value;\n    }\n\n    function compareArrays(array1, array2, dontConvert) {\n        var len = Math.min(array1.length, array2.length),\n            lengthDiff = Math.abs(array1.length - array2.length),\n            diffs = 0,\n            i;\n        for (i = 0; i < len; i++) {\n            if ((dontConvert && array1[i] !== array2[i]) ||\n                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) {\n                diffs++;\n            }\n        }\n        return diffs + lengthDiff;\n    }\n\n    function Locale() {\n    }\n\n    var locales = {};\n    var globalLocale;\n\n    function normalizeLocale(key) {\n        return key ? key.toLowerCase().replace('_', '-') : key;\n    }\n\n    // pick the locale from the array\n    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each\n    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root\n    function chooseLocale(names) {\n        var i = 0, j, next, locale, split;\n\n        while (i < names.length) {\n            split = normalizeLocale(names[i]).split('-');\n            j = split.length;\n            next = normalizeLocale(names[i + 1]);\n            next = next ? next.split('-') : null;\n            while (j > 0) {\n                locale = loadLocale(split.slice(0, j).join('-'));\n                if (locale) {\n                    return locale;\n                }\n                if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) {\n                    //the next array item is better than a shallower substring of this one\n                    break;\n                }\n                j--;\n            }\n            i++;\n        }\n        return null;\n    }\n\n    function loadLocale(name) {\n        var oldLocale = null;\n        // TODO: Find a better way to register and load all the locales in Node\n        if (!locales[name] && typeof module !== 'undefined' &&\n                module && module.exports) {\n            try {\n                oldLocale = globalLocale._abbr;\n                require('./locale/' + name);\n                // because defineLocale currently also sets the global locale, we\n                // want to undo that for lazy loaded locales\n                locale_locales__getSetGlobalLocale(oldLocale);\n            } catch (e) { }\n        }\n        return locales[name];\n    }\n\n    // This function will load locale and then set the global locale.  If\n    // no arguments are passed in, it will simply return the current global\n    // locale key.\n    function locale_locales__getSetGlobalLocale (key, values) {\n        var data;\n        if (key) {\n            if (typeof values === 'undefined') {\n                data = locale_locales__getLocale(key);\n            }\n            else {\n                data = defineLocale(key, values);\n            }\n\n            if (data) {\n                // moment.duration._locale = moment._locale = data;\n                globalLocale = data;\n            }\n        }\n\n        return globalLocale._abbr;\n    }\n\n    function defineLocale (name, values) {\n        if (values !== null) {\n            values.abbr = name;\n            locales[name] = locales[name] || new Locale();\n            locales[name].set(values);\n\n            // backwards compat for now: also set the locale\n            locale_locales__getSetGlobalLocale(name);\n\n            return locales[name];\n        } else {\n            // useful for testing\n            delete locales[name];\n            return null;\n        }\n    }\n\n    // returns locale data\n    function locale_locales__getLocale (key) {\n        var locale;\n\n        if (key && key._locale && key._locale._abbr) {\n            key = key._locale._abbr;\n        }\n\n        if (!key) {\n            return globalLocale;\n        }\n\n        if (!isArray(key)) {\n            //short-circuit everything else\n            locale = loadLocale(key);\n            if (locale) {\n                return locale;\n            }\n            key = [key];\n        }\n\n        return chooseLocale(key);\n    }\n\n    var aliases = {};\n\n    function addUnitAlias (unit, shorthand) {\n        var lowerCase = unit.toLowerCase();\n        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;\n    }\n\n    function normalizeUnits(units) {\n        return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;\n    }\n\n    function normalizeObjectUnits(inputObject) {\n        var normalizedInput = {},\n            normalizedProp,\n            prop;\n\n        for (prop in inputObject) {\n            if (hasOwnProp(inputObject, prop)) {\n                normalizedProp = normalizeUnits(prop);\n                if (normalizedProp) {\n                    normalizedInput[normalizedProp] = inputObject[prop];\n                }\n            }\n        }\n\n        return normalizedInput;\n    }\n\n    function makeGetSet (unit, keepTime) {\n        return function (value) {\n            if (value != null) {\n                get_set__set(this, unit, value);\n                utils_hooks__hooks.updateOffset(this, keepTime);\n                return this;\n            } else {\n                return get_set__get(this, unit);\n            }\n        };\n    }\n\n    function get_set__get (mom, unit) {\n        return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]();\n    }\n\n    function get_set__set (mom, unit, value) {\n        return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);\n    }\n\n    // MOMENTS\n\n    function getSet (units, value) {\n        var unit;\n        if (typeof units === 'object') {\n            for (unit in units) {\n                this.set(unit, units[unit]);\n            }\n        } else {\n            units = normalizeUnits(units);\n            if (typeof this[units] === 'function') {\n                return this[units](value);\n            }\n        }\n        return this;\n    }\n\n    function zeroFill(number, targetLength, forceSign) {\n        var absNumber = '' + Math.abs(number),\n            zerosToFill = targetLength - absNumber.length,\n            sign = number >= 0;\n        return (sign ? (forceSign ? '+' : '') : '-') +\n            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;\n    }\n\n    var formattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g;\n\n    var localFormattingTokens = /(\\[[^\\[]*\\])|(\\\\)?(LTS|LT|LL?L?L?|l{1,4})/g;\n\n    var formatFunctions = {};\n\n    var formatTokenFunctions = {};\n\n    // token:    'M'\n    // padded:   ['MM', 2]\n    // ordinal:  'Mo'\n    // callback: function () { this.month() + 1 }\n    function addFormatToken (token, padded, ordinal, callback) {\n        var func = callback;\n        if (typeof callback === 'string') {\n            func = function () {\n                return this[callback]();\n            };\n        }\n        if (token) {\n            formatTokenFunctions[token] = func;\n        }\n        if (padded) {\n            formatTokenFunctions[padded[0]] = function () {\n                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);\n            };\n        }\n        if (ordinal) {\n            formatTokenFunctions[ordinal] = function () {\n                return this.localeData().ordinal(func.apply(this, arguments), token);\n            };\n        }\n    }\n\n    function removeFormattingTokens(input) {\n        if (input.match(/\\[[\\s\\S]/)) {\n            return input.replace(/^\\[|\\]$/g, '');\n        }\n        return input.replace(/\\\\/g, '');\n    }\n\n    function makeFormatFunction(format) {\n        var array = format.match(formattingTokens), i, length;\n\n        for (i = 0, length = array.length; i < length; i++) {\n            if (formatTokenFunctions[array[i]]) {\n                array[i] = formatTokenFunctions[array[i]];\n            } else {\n                array[i] = removeFormattingTokens(array[i]);\n            }\n        }\n\n        return function (mom) {\n            var output = '';\n            for (i = 0; i < length; i++) {\n                output += array[i] instanceof Function ? array[i].call(mom, format) : array[i];\n            }\n            return output;\n        };\n    }\n\n    // format date using native date object\n    function formatMoment(m, format) {\n        if (!m.isValid()) {\n            return m.localeData().invalidDate();\n        }\n\n        format = expandFormat(format, m.localeData());\n        formatFunctions[format] = formatFunctions[format] || makeFormatFunction(format);\n\n        return formatFunctions[format](m);\n    }\n\n    function expandFormat(format, locale) {\n        var i = 5;\n\n        function replaceLongDateFormatTokens(input) {\n            return locale.longDateFormat(input) || input;\n        }\n\n        localFormattingTokens.lastIndex = 0;\n        while (i >= 0 && localFormattingTokens.test(format)) {\n            format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);\n            localFormattingTokens.lastIndex = 0;\n            i -= 1;\n        }\n\n        return format;\n    }\n\n    var match1         = /\\d/;            //       0 - 9\n    var match2         = /\\d\\d/;          //      00 - 99\n    var match3         = /\\d{3}/;         //     000 - 999\n    var match4         = /\\d{4}/;         //    0000 - 9999\n    var match6         = /[+-]?\\d{6}/;    // -999999 - 999999\n    var match1to2      = /\\d\\d?/;         //       0 - 99\n    var match1to3      = /\\d{1,3}/;       //       0 - 999\n    var match1to4      = /\\d{1,4}/;       //       0 - 9999\n    var match1to6      = /[+-]?\\d{1,6}/;  // -999999 - 999999\n\n    var matchUnsigned  = /\\d+/;           //       0 - inf\n    var matchSigned    = /[+-]?\\d+/;      //    -inf - inf\n\n    var matchOffset    = /Z|[+-]\\d\\d:?\\d\\d/gi; // +00:00 -00:00 +0000 -0000 or Z\n\n    var matchTimestamp = /[+-]?\\d+(\\.\\d{1,3})?/; // 123456789 123456789.123\n\n    // any word (or two) characters or numbers including two/three word month in arabic.\n    var matchWord = /[0-9]*['a-z\\u00A0-\\u05FF\\u0700-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]+|[\\u0600-\\u06FF\\/]+(\\s*?[\\u0600-\\u06FF]+){1,2}/i;\n\n    var regexes = {};\n\n    function isFunction (sth) {\n        // https://github.com/moment/moment/issues/2325\n        return typeof sth === 'function' &&\n            Object.prototype.toString.call(sth) === '[object Function]';\n    }\n\n\n    function addRegexToken (token, regex, strictRegex) {\n        regexes[token] = isFunction(regex) ? regex : function (isStrict) {\n            return (isStrict && strictRegex) ? strictRegex : regex;\n        };\n    }\n\n    function getParseRegexForToken (token, config) {\n        if (!hasOwnProp(regexes, token)) {\n            return new RegExp(unescapeFormat(token));\n        }\n\n        return regexes[token](config._strict, config._locale);\n    }\n\n    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript\n    function unescapeFormat(s) {\n        return s.replace('\\\\', '').replace(/\\\\(\\[)|\\\\(\\])|\\[([^\\]\\[]*)\\]|\\\\(.)/g, function (matched, p1, p2, p3, p4) {\n            return p1 || p2 || p3 || p4;\n        }).replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n    }\n\n    var tokens = {};\n\n    function addParseToken (token, callback) {\n        var i, func = callback;\n        if (typeof token === 'string') {\n            token = [token];\n        }\n        if (typeof callback === 'number') {\n            func = function (input, array) {\n                array[callback] = toInt(input);\n            };\n        }\n        for (i = 0; i < token.length; i++) {\n            tokens[token[i]] = func;\n        }\n    }\n\n    function addWeekParseToken (token, callback) {\n        addParseToken(token, function (input, array, config, token) {\n            config._w = config._w || {};\n            callback(input, config._w, config, token);\n        });\n    }\n\n    function addTimeToArrayFromToken(token, input, config) {\n        if (input != null && hasOwnProp(tokens, token)) {\n            tokens[token](input, config._a, config, token);\n        }\n    }\n\n    var YEAR = 0;\n    var MONTH = 1;\n    var DATE = 2;\n    var HOUR = 3;\n    var MINUTE = 4;\n    var SECOND = 5;\n    var MILLISECOND = 6;\n\n    function daysInMonth(year, month) {\n        return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();\n    }\n\n    // FORMATTING\n\n    addFormatToken('M', ['MM', 2], 'Mo', function () {\n        return this.month() + 1;\n    });\n\n    addFormatToken('MMM', 0, 0, function (format) {\n        return this.localeData().monthsShort(this, format);\n    });\n\n    addFormatToken('MMMM', 0, 0, function (format) {\n        return this.localeData().months(this, format);\n    });\n\n    // ALIASES\n\n    addUnitAlias('month', 'M');\n\n    // PARSING\n\n    addRegexToken('M',    match1to2);\n    addRegexToken('MM',   match1to2, match2);\n    addRegexToken('MMM',  matchWord);\n    addRegexToken('MMMM', matchWord);\n\n    addParseToken(['M', 'MM'], function (input, array) {\n        array[MONTH] = toInt(input) - 1;\n    });\n\n    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {\n        var month = config._locale.monthsParse(input, token, config._strict);\n        // if we didn't find a month name, mark the date as invalid.\n        if (month != null) {\n            array[MONTH] = month;\n        } else {\n            getParsingFlags(config).invalidMonth = input;\n        }\n    });\n\n    // LOCALES\n\n    var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_');\n    function localeMonths (m) {\n        return this._months[m.month()];\n    }\n\n    var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_');\n    function localeMonthsShort (m) {\n        return this._monthsShort[m.month()];\n    }\n\n    function localeMonthsParse (monthName, format, strict) {\n        var i, mom, regex;\n\n        if (!this._monthsParse) {\n            this._monthsParse = [];\n            this._longMonthsParse = [];\n            this._shortMonthsParse = [];\n        }\n\n        for (i = 0; i < 12; i++) {\n            // make the regex if we don't have it already\n            mom = create_utc__createUTC([2000, i]);\n            if (strict && !this._longMonthsParse[i]) {\n                this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i');\n                this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i');\n            }\n            if (!strict && !this._monthsParse[i]) {\n                regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');\n                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) {\n                return i;\n            } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) {\n                return i;\n            } else if (!strict && this._monthsParse[i].test(monthName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function setMonth (mom, value) {\n        var dayOfMonth;\n\n        // TODO: Move this out of here!\n        if (typeof value === 'string') {\n            value = mom.localeData().monthsParse(value);\n            // TODO: Another silent failure?\n            if (typeof value !== 'number') {\n                return mom;\n            }\n        }\n\n        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));\n        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);\n        return mom;\n    }\n\n    function getSetMonth (value) {\n        if (value != null) {\n            setMonth(this, value);\n            utils_hooks__hooks.updateOffset(this, true);\n            return this;\n        } else {\n            return get_set__get(this, 'Month');\n        }\n    }\n\n    function getDaysInMonth () {\n        return daysInMonth(this.year(), this.month());\n    }\n\n    function checkOverflow (m) {\n        var overflow;\n        var a = m._a;\n\n        if (a && getParsingFlags(m).overflow === -2) {\n            overflow =\n                a[MONTH]       < 0 || a[MONTH]       > 11  ? MONTH :\n                a[DATE]        < 1 || a[DATE]        > daysInMonth(a[YEAR], a[MONTH]) ? DATE :\n                a[HOUR]        < 0 || a[HOUR]        > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR :\n                a[MINUTE]      < 0 || a[MINUTE]      > 59  ? MINUTE :\n                a[SECOND]      < 0 || a[SECOND]      > 59  ? SECOND :\n                a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND :\n                -1;\n\n            if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {\n                overflow = DATE;\n            }\n\n            getParsingFlags(m).overflow = overflow;\n        }\n\n        return m;\n    }\n\n    function warn(msg) {\n        if (utils_hooks__hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) {\n            console.warn('Deprecation warning: ' + msg);\n        }\n    }\n\n    function deprecate(msg, fn) {\n        var firstTime = true;\n\n        return extend(function () {\n            if (firstTime) {\n                warn(msg + '\\n' + (new Error()).stack);\n                firstTime = false;\n            }\n            return fn.apply(this, arguments);\n        }, fn);\n    }\n\n    var deprecations = {};\n\n    function deprecateSimple(name, msg) {\n        if (!deprecations[name]) {\n            warn(msg);\n            deprecations[name] = true;\n        }\n    }\n\n    utils_hooks__hooks.suppressDeprecationWarnings = false;\n\n    var from_string__isoRegex = /^\\s*(?:[+-]\\d{6}|\\d{4})-(?:(\\d\\d-\\d\\d)|(W\\d\\d$)|(W\\d\\d-\\d)|(\\d\\d\\d))((T| )(\\d\\d(:\\d\\d(:\\d\\d(\\.\\d+)?)?)?)?([\\+\\-]\\d\\d(?::?\\d\\d)?|\\s*Z)?)?$/;\n\n    var isoDates = [\n        ['YYYYYY-MM-DD', /[+-]\\d{6}-\\d{2}-\\d{2}/],\n        ['YYYY-MM-DD', /\\d{4}-\\d{2}-\\d{2}/],\n        ['GGGG-[W]WW-E', /\\d{4}-W\\d{2}-\\d/],\n        ['GGGG-[W]WW', /\\d{4}-W\\d{2}/],\n        ['YYYY-DDD', /\\d{4}-\\d{3}/]\n    ];\n\n    // iso time formats and regexes\n    var isoTimes = [\n        ['HH:mm:ss.SSSS', /(T| )\\d\\d:\\d\\d:\\d\\d\\.\\d+/],\n        ['HH:mm:ss', /(T| )\\d\\d:\\d\\d:\\d\\d/],\n        ['HH:mm', /(T| )\\d\\d:\\d\\d/],\n        ['HH', /(T| )\\d\\d/]\n    ];\n\n    var aspNetJsonRegex = /^\\/?Date\\((\\-?\\d+)/i;\n\n    // date from iso format\n    function configFromISO(config) {\n        var i, l,\n            string = config._i,\n            match = from_string__isoRegex.exec(string);\n\n        if (match) {\n            getParsingFlags(config).iso = true;\n            for (i = 0, l = isoDates.length; i < l; i++) {\n                if (isoDates[i][1].exec(string)) {\n                    config._f = isoDates[i][0];\n                    break;\n                }\n            }\n            for (i = 0, l = isoTimes.length; i < l; i++) {\n                if (isoTimes[i][1].exec(string)) {\n                    // match[6] should be 'T' or space\n                    config._f += (match[6] || ' ') + isoTimes[i][0];\n                    break;\n                }\n            }\n            if (string.match(matchOffset)) {\n                config._f += 'Z';\n            }\n            configFromStringAndFormat(config);\n        } else {\n            config._isValid = false;\n        }\n    }\n\n    // date from iso format or fallback\n    function configFromString(config) {\n        var matched = aspNetJsonRegex.exec(config._i);\n\n        if (matched !== null) {\n            config._d = new Date(+matched[1]);\n            return;\n        }\n\n        configFromISO(config);\n        if (config._isValid === false) {\n            delete config._isValid;\n            utils_hooks__hooks.createFromInputFallback(config);\n        }\n    }\n\n    utils_hooks__hooks.createFromInputFallback = deprecate(\n        'moment construction falls back to js Date. This is ' +\n        'discouraged and will be removed in upcoming major ' +\n        'release. Please refer to ' +\n        'https://github.com/moment/moment/issues/1407 for more info.',\n        function (config) {\n            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));\n        }\n    );\n\n    function createDate (y, m, d, h, M, s, ms) {\n        //can't just apply() to create a date:\n        //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply\n        var date = new Date(y, m, d, h, M, s, ms);\n\n        //the date constructor doesn't accept years < 1970\n        if (y < 1970) {\n            date.setFullYear(y);\n        }\n        return date;\n    }\n\n    function createUTCDate (y) {\n        var date = new Date(Date.UTC.apply(null, arguments));\n        if (y < 1970) {\n            date.setUTCFullYear(y);\n        }\n        return date;\n    }\n\n    addFormatToken(0, ['YY', 2], 0, function () {\n        return this.year() % 100;\n    });\n\n    addFormatToken(0, ['YYYY',   4],       0, 'year');\n    addFormatToken(0, ['YYYYY',  5],       0, 'year');\n    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');\n\n    // ALIASES\n\n    addUnitAlias('year', 'y');\n\n    // PARSING\n\n    addRegexToken('Y',      matchSigned);\n    addRegexToken('YY',     match1to2, match2);\n    addRegexToken('YYYY',   match1to4, match4);\n    addRegexToken('YYYYY',  match1to6, match6);\n    addRegexToken('YYYYYY', match1to6, match6);\n\n    addParseToken(['YYYYY', 'YYYYYY'], YEAR);\n    addParseToken('YYYY', function (input, array) {\n        array[YEAR] = input.length === 2 ? utils_hooks__hooks.parseTwoDigitYear(input) : toInt(input);\n    });\n    addParseToken('YY', function (input, array) {\n        array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input);\n    });\n\n    // HELPERS\n\n    function daysInYear(year) {\n        return isLeapYear(year) ? 366 : 365;\n    }\n\n    function isLeapYear(year) {\n        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;\n    }\n\n    // HOOKS\n\n    utils_hooks__hooks.parseTwoDigitYear = function (input) {\n        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);\n    };\n\n    // MOMENTS\n\n    var getSetYear = makeGetSet('FullYear', false);\n\n    function getIsLeapYear () {\n        return isLeapYear(this.year());\n    }\n\n    addFormatToken('w', ['ww', 2], 'wo', 'week');\n    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');\n\n    // ALIASES\n\n    addUnitAlias('week', 'w');\n    addUnitAlias('isoWeek', 'W');\n\n    // PARSING\n\n    addRegexToken('w',  match1to2);\n    addRegexToken('ww', match1to2, match2);\n    addRegexToken('W',  match1to2);\n    addRegexToken('WW', match1to2, match2);\n\n    addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {\n        week[token.substr(0, 1)] = toInt(input);\n    });\n\n    // HELPERS\n\n    // firstDayOfWeek       0 = sun, 6 = sat\n    //                      the day of the week that starts the week\n    //                      (usually sunday or monday)\n    // firstDayOfWeekOfYear 0 = sun, 6 = sat\n    //                      the first week is the week that contains the first\n    //                      of this day of the week\n    //                      (eg. ISO weeks use thursday (4))\n    function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) {\n        var end = firstDayOfWeekOfYear - firstDayOfWeek,\n            daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(),\n            adjustedMoment;\n\n\n        if (daysToDayOfWeek > end) {\n            daysToDayOfWeek -= 7;\n        }\n\n        if (daysToDayOfWeek < end - 7) {\n            daysToDayOfWeek += 7;\n        }\n\n        adjustedMoment = local__createLocal(mom).add(daysToDayOfWeek, 'd');\n        return {\n            week: Math.ceil(adjustedMoment.dayOfYear() / 7),\n            year: adjustedMoment.year()\n        };\n    }\n\n    // LOCALES\n\n    function localeWeek (mom) {\n        return weekOfYear(mom, this._week.dow, this._week.doy).week;\n    }\n\n    var defaultLocaleWeek = {\n        dow : 0, // Sunday is the first day of the week.\n        doy : 6  // The week that contains Jan 1st is the first week of the year.\n    };\n\n    function localeFirstDayOfWeek () {\n        return this._week.dow;\n    }\n\n    function localeFirstDayOfYear () {\n        return this._week.doy;\n    }\n\n    // MOMENTS\n\n    function getSetWeek (input) {\n        var week = this.localeData().week(this);\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    function getSetISOWeek (input) {\n        var week = weekOfYear(this, 1, 4).week;\n        return input == null ? week : this.add((input - week) * 7, 'd');\n    }\n\n    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');\n\n    // ALIASES\n\n    addUnitAlias('dayOfYear', 'DDD');\n\n    // PARSING\n\n    addRegexToken('DDD',  match1to3);\n    addRegexToken('DDDD', match3);\n    addParseToken(['DDD', 'DDDD'], function (input, array, config) {\n        config._dayOfYear = toInt(input);\n    });\n\n    // HELPERS\n\n    //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday\n    function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) {\n        var week1Jan = 6 + firstDayOfWeek - firstDayOfWeekOfYear, janX = createUTCDate(year, 0, 1 + week1Jan), d = janX.getUTCDay(), dayOfYear;\n        if (d < firstDayOfWeek) {\n            d += 7;\n        }\n\n        weekday = weekday != null ? 1 * weekday : firstDayOfWeek;\n\n        dayOfYear = 1 + week1Jan + 7 * (week - 1) - d + weekday;\n\n        return {\n            year: dayOfYear > 0 ? year : year - 1,\n            dayOfYear: dayOfYear > 0 ?  dayOfYear : daysInYear(year - 1) + dayOfYear\n        };\n    }\n\n    // MOMENTS\n\n    function getSetDayOfYear (input) {\n        var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1;\n        return input == null ? dayOfYear : this.add((input - dayOfYear), 'd');\n    }\n\n    // Pick the first defined of two or three arguments.\n    function defaults(a, b, c) {\n        if (a != null) {\n            return a;\n        }\n        if (b != null) {\n            return b;\n        }\n        return c;\n    }\n\n    function currentDateArray(config) {\n        var now = new Date();\n        if (config._useUTC) {\n            return [now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()];\n        }\n        return [now.getFullYear(), now.getMonth(), now.getDate()];\n    }\n\n    // convert an array to a date.\n    // the array should mirror the parameters below\n    // note: all values past the year are optional and will default to the lowest possible value.\n    // [year, month, day , hour, minute, second, millisecond]\n    function configFromArray (config) {\n        var i, date, input = [], currentDate, yearToUse;\n\n        if (config._d) {\n            return;\n        }\n\n        currentDate = currentDateArray(config);\n\n        //compute day of the year from weeks and weekdays\n        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {\n            dayOfYearFromWeekInfo(config);\n        }\n\n        //if the day of the year is set, figure out what it is\n        if (config._dayOfYear) {\n            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);\n\n            if (config._dayOfYear > daysInYear(yearToUse)) {\n                getParsingFlags(config)._overflowDayOfYear = true;\n            }\n\n            date = createUTCDate(yearToUse, 0, config._dayOfYear);\n            config._a[MONTH] = date.getUTCMonth();\n            config._a[DATE] = date.getUTCDate();\n        }\n\n        // Default to current date.\n        // * if no year, month, day of month are given, default to today\n        // * if day of month is given, default month and year\n        // * if month is given, default only year\n        // * if year is given, don't default anything\n        for (i = 0; i < 3 && config._a[i] == null; ++i) {\n            config._a[i] = input[i] = currentDate[i];\n        }\n\n        // Zero out whatever was not defaulted, including time\n        for (; i < 7; i++) {\n            config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];\n        }\n\n        // Check for 24:00:00.000\n        if (config._a[HOUR] === 24 &&\n                config._a[MINUTE] === 0 &&\n                config._a[SECOND] === 0 &&\n                config._a[MILLISECOND] === 0) {\n            config._nextDay = true;\n            config._a[HOUR] = 0;\n        }\n\n        config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input);\n        // Apply timezone offset from input. The actual utcOffset can be changed\n        // with parseZone.\n        if (config._tzm != null) {\n            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);\n        }\n\n        if (config._nextDay) {\n            config._a[HOUR] = 24;\n        }\n    }\n\n    function dayOfYearFromWeekInfo(config) {\n        var w, weekYear, week, weekday, dow, doy, temp;\n\n        w = config._w;\n        if (w.GG != null || w.W != null || w.E != null) {\n            dow = 1;\n            doy = 4;\n\n            // TODO: We need to take the current isoWeekYear, but that depends on\n            // how we interpret now (local, utc, fixed offset). So create\n            // a now version of current config (take local/utc/offset flags, and\n            // create now).\n            weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year);\n            week = defaults(w.W, 1);\n            weekday = defaults(w.E, 1);\n        } else {\n            dow = config._locale._week.dow;\n            doy = config._locale._week.doy;\n\n            weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year);\n            week = defaults(w.w, 1);\n\n            if (w.d != null) {\n                // weekday -- low day numbers are considered next week\n                weekday = w.d;\n                if (weekday < dow) {\n                    ++week;\n                }\n            } else if (w.e != null) {\n                // local weekday -- counting starts from begining of week\n                weekday = w.e + dow;\n            } else {\n                // default to begining of week\n                weekday = dow;\n            }\n        }\n        temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow);\n\n        config._a[YEAR] = temp.year;\n        config._dayOfYear = temp.dayOfYear;\n    }\n\n    utils_hooks__hooks.ISO_8601 = function () {};\n\n    // date from string and format string\n    function configFromStringAndFormat(config) {\n        // TODO: Move this to another part of the creation flow to prevent circular deps\n        if (config._f === utils_hooks__hooks.ISO_8601) {\n            configFromISO(config);\n            return;\n        }\n\n        config._a = [];\n        getParsingFlags(config).empty = true;\n\n        // This array is used to make a Date, either with `new Date` or `Date.UTC`\n        var string = '' + config._i,\n            i, parsedInput, tokens, token, skipped,\n            stringLength = string.length,\n            totalParsedInputLength = 0;\n\n        tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];\n\n        for (i = 0; i < tokens.length; i++) {\n            token = tokens[i];\n            parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];\n            if (parsedInput) {\n                skipped = string.substr(0, string.indexOf(parsedInput));\n                if (skipped.length > 0) {\n                    getParsingFlags(config).unusedInput.push(skipped);\n                }\n                string = string.slice(string.indexOf(parsedInput) + parsedInput.length);\n                totalParsedInputLength += parsedInput.length;\n            }\n            // don't parse if it's not a known token\n            if (formatTokenFunctions[token]) {\n                if (parsedInput) {\n                    getParsingFlags(config).empty = false;\n                }\n                else {\n                    getParsingFlags(config).unusedTokens.push(token);\n                }\n                addTimeToArrayFromToken(token, parsedInput, config);\n            }\n            else if (config._strict && !parsedInput) {\n                getParsingFlags(config).unusedTokens.push(token);\n            }\n        }\n\n        // add remaining unparsed input length to the string\n        getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;\n        if (string.length > 0) {\n            getParsingFlags(config).unusedInput.push(string);\n        }\n\n        // clear _12h flag if hour is <= 12\n        if (getParsingFlags(config).bigHour === true &&\n                config._a[HOUR] <= 12 &&\n                config._a[HOUR] > 0) {\n            getParsingFlags(config).bigHour = undefined;\n        }\n        // handle meridiem\n        config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem);\n\n        configFromArray(config);\n        checkOverflow(config);\n    }\n\n\n    function meridiemFixWrap (locale, hour, meridiem) {\n        var isPm;\n\n        if (meridiem == null) {\n            // nothing to do\n            return hour;\n        }\n        if (locale.meridiemHour != null) {\n            return locale.meridiemHour(hour, meridiem);\n        } else if (locale.isPM != null) {\n            // Fallback\n            isPm = locale.isPM(meridiem);\n            if (isPm && hour < 12) {\n                hour += 12;\n            }\n            if (!isPm && hour === 12) {\n                hour = 0;\n            }\n            return hour;\n        } else {\n            // this is not supposed to happen\n            return hour;\n        }\n    }\n\n    function configFromStringAndArray(config) {\n        var tempConfig,\n            bestMoment,\n\n            scoreToBeat,\n            i,\n            currentScore;\n\n        if (config._f.length === 0) {\n            getParsingFlags(config).invalidFormat = true;\n            config._d = new Date(NaN);\n            return;\n        }\n\n        for (i = 0; i < config._f.length; i++) {\n            currentScore = 0;\n            tempConfig = copyConfig({}, config);\n            if (config._useUTC != null) {\n                tempConfig._useUTC = config._useUTC;\n            }\n            tempConfig._f = config._f[i];\n            configFromStringAndFormat(tempConfig);\n\n            if (!valid__isValid(tempConfig)) {\n                continue;\n            }\n\n            // if there is any input that was not parsed add a penalty for that format\n            currentScore += getParsingFlags(tempConfig).charsLeftOver;\n\n            //or tokens\n            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;\n\n            getParsingFlags(tempConfig).score = currentScore;\n\n            if (scoreToBeat == null || currentScore < scoreToBeat) {\n                scoreToBeat = currentScore;\n                bestMoment = tempConfig;\n            }\n        }\n\n        extend(config, bestMoment || tempConfig);\n    }\n\n    function configFromObject(config) {\n        if (config._d) {\n            return;\n        }\n\n        var i = normalizeObjectUnits(config._i);\n        config._a = [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond];\n\n        configFromArray(config);\n    }\n\n    function createFromConfig (config) {\n        var res = new Moment(checkOverflow(prepareConfig(config)));\n        if (res._nextDay) {\n            // Adding is smart enough around DST\n            res.add(1, 'd');\n            res._nextDay = undefined;\n        }\n\n        return res;\n    }\n\n    function prepareConfig (config) {\n        var input = config._i,\n            format = config._f;\n\n        config._locale = config._locale || locale_locales__getLocale(config._l);\n\n        if (input === null || (format === undefined && input === '')) {\n            return valid__createInvalid({nullInput: true});\n        }\n\n        if (typeof input === 'string') {\n            config._i = input = config._locale.preparse(input);\n        }\n\n        if (isMoment(input)) {\n            return new Moment(checkOverflow(input));\n        } else if (isArray(format)) {\n            configFromStringAndArray(config);\n        } else if (format) {\n            configFromStringAndFormat(config);\n        } else if (isDate(input)) {\n            config._d = input;\n        } else {\n            configFromInput(config);\n        }\n\n        return config;\n    }\n\n    function configFromInput(config) {\n        var input = config._i;\n        if (input === undefined) {\n            config._d = new Date();\n        } else if (isDate(input)) {\n            config._d = new Date(+input);\n        } else if (typeof input === 'string') {\n            configFromString(config);\n        } else if (isArray(input)) {\n            config._a = map(input.slice(0), function (obj) {\n                return parseInt(obj, 10);\n            });\n            configFromArray(config);\n        } else if (typeof(input) === 'object') {\n            configFromObject(config);\n        } else if (typeof(input) === 'number') {\n            // from milliseconds\n            config._d = new Date(input);\n        } else {\n            utils_hooks__hooks.createFromInputFallback(config);\n        }\n    }\n\n    function createLocalOrUTC (input, format, locale, strict, isUTC) {\n        var c = {};\n\n        if (typeof(locale) === 'boolean') {\n            strict = locale;\n            locale = undefined;\n        }\n        // object construction must be done this way.\n        // https://github.com/moment/moment/issues/1423\n        c._isAMomentObject = true;\n        c._useUTC = c._isUTC = isUTC;\n        c._l = locale;\n        c._i = input;\n        c._f = format;\n        c._strict = strict;\n\n        return createFromConfig(c);\n    }\n\n    function local__createLocal (input, format, locale, strict) {\n        return createLocalOrUTC(input, format, locale, strict, false);\n    }\n\n    var prototypeMin = deprecate(\n         'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548',\n         function () {\n             var other = local__createLocal.apply(null, arguments);\n             return other < this ? this : other;\n         }\n     );\n\n    var prototypeMax = deprecate(\n        'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548',\n        function () {\n            var other = local__createLocal.apply(null, arguments);\n            return other > this ? this : other;\n        }\n    );\n\n    // Pick a moment m from moments so that m[fn](other) is true for all\n    // other. This relies on the function fn to be transitive.\n    //\n    // moments should either be an array of moment objects or an array, whose\n    // first element is an array of moment objects.\n    function pickBy(fn, moments) {\n        var res, i;\n        if (moments.length === 1 && isArray(moments[0])) {\n            moments = moments[0];\n        }\n        if (!moments.length) {\n            return local__createLocal();\n        }\n        res = moments[0];\n        for (i = 1; i < moments.length; ++i) {\n            if (!moments[i].isValid() || moments[i][fn](res)) {\n                res = moments[i];\n            }\n        }\n        return res;\n    }\n\n    // TODO: Use [].sort instead?\n    function min () {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isBefore', args);\n    }\n\n    function max () {\n        var args = [].slice.call(arguments, 0);\n\n        return pickBy('isAfter', args);\n    }\n\n    function Duration (duration) {\n        var normalizedInput = normalizeObjectUnits(duration),\n            years = normalizedInput.year || 0,\n            quarters = normalizedInput.quarter || 0,\n            months = normalizedInput.month || 0,\n            weeks = normalizedInput.week || 0,\n            days = normalizedInput.day || 0,\n            hours = normalizedInput.hour || 0,\n            minutes = normalizedInput.minute || 0,\n            seconds = normalizedInput.second || 0,\n            milliseconds = normalizedInput.millisecond || 0;\n\n        // representation for dateAddRemove\n        this._milliseconds = +milliseconds +\n            seconds * 1e3 + // 1000\n            minutes * 6e4 + // 1000 * 60\n            hours * 36e5; // 1000 * 60 * 60\n        // Because of dateAddRemove treats 24 hours as different from a\n        // day when working around DST, we need to store them separately\n        this._days = +days +\n            weeks * 7;\n        // It is impossible translate months into days without knowing\n        // which months you are are talking about, so we have to store\n        // it separately.\n        this._months = +months +\n            quarters * 3 +\n            years * 12;\n\n        this._data = {};\n\n        this._locale = locale_locales__getLocale();\n\n        this._bubble();\n    }\n\n    function isDuration (obj) {\n        return obj instanceof Duration;\n    }\n\n    function offset (token, separator) {\n        addFormatToken(token, 0, 0, function () {\n            var offset = this.utcOffset();\n            var sign = '+';\n            if (offset < 0) {\n                offset = -offset;\n                sign = '-';\n            }\n            return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2);\n        });\n    }\n\n    offset('Z', ':');\n    offset('ZZ', '');\n\n    // PARSING\n\n    addRegexToken('Z',  matchOffset);\n    addRegexToken('ZZ', matchOffset);\n    addParseToken(['Z', 'ZZ'], function (input, array, config) {\n        config._useUTC = true;\n        config._tzm = offsetFromString(input);\n    });\n\n    // HELPERS\n\n    // timezone chunker\n    // '+10:00' > ['10',  '00']\n    // '-1530'  > ['-15', '30']\n    var chunkOffset = /([\\+\\-]|\\d\\d)/gi;\n\n    function offsetFromString(string) {\n        var matches = ((string || '').match(matchOffset) || []);\n        var chunk   = matches[matches.length - 1] || [];\n        var parts   = (chunk + '').match(chunkOffset) || ['-', 0, 0];\n        var minutes = +(parts[1] * 60) + toInt(parts[2]);\n\n        return parts[0] === '+' ? minutes : -minutes;\n    }\n\n    // Return a moment from input, that is local/utc/zone equivalent to model.\n    function cloneWithOffset(input, model) {\n        var res, diff;\n        if (model._isUTC) {\n            res = model.clone();\n            diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res);\n            // Use low-level api, because this fn is low-level api.\n            res._d.setTime(+res._d + diff);\n            utils_hooks__hooks.updateOffset(res, false);\n            return res;\n        } else {\n            return local__createLocal(input).local();\n        }\n    }\n\n    function getDateOffset (m) {\n        // On Firefox.24 Date#getTimezoneOffset returns a floating point.\n        // https://github.com/moment/moment/pull/1871\n        return -Math.round(m._d.getTimezoneOffset() / 15) * 15;\n    }\n\n    // HOOKS\n\n    // This function will be called whenever a moment is mutated.\n    // It is intended to keep the offset in sync with the timezone.\n    utils_hooks__hooks.updateOffset = function () {};\n\n    // MOMENTS\n\n    // keepLocalTime = true means only change the timezone, without\n    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->\n    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset\n    // +0200, so we adjust the time as needed, to be valid.\n    //\n    // Keeping the time actually adds/subtracts (one hour)\n    // from the actual represented time. That is why we call updateOffset\n    // a second time. In case it wants us to change the offset again\n    // _changeInProgress == true case, then we have to adjust, because\n    // there is no such time in the given timezone.\n    function getSetOffset (input, keepLocalTime) {\n        var offset = this._offset || 0,\n            localAdjust;\n        if (input != null) {\n            if (typeof input === 'string') {\n                input = offsetFromString(input);\n            }\n            if (Math.abs(input) < 16) {\n                input = input * 60;\n            }\n            if (!this._isUTC && keepLocalTime) {\n                localAdjust = getDateOffset(this);\n            }\n            this._offset = input;\n            this._isUTC = true;\n            if (localAdjust != null) {\n                this.add(localAdjust, 'm');\n            }\n            if (offset !== input) {\n                if (!keepLocalTime || this._changeInProgress) {\n                    add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false);\n                } else if (!this._changeInProgress) {\n                    this._changeInProgress = true;\n                    utils_hooks__hooks.updateOffset(this, true);\n                    this._changeInProgress = null;\n                }\n            }\n            return this;\n        } else {\n            return this._isUTC ? offset : getDateOffset(this);\n        }\n    }\n\n    function getSetZone (input, keepLocalTime) {\n        if (input != null) {\n            if (typeof input !== 'string') {\n                input = -input;\n            }\n\n            this.utcOffset(input, keepLocalTime);\n\n            return this;\n        } else {\n            return -this.utcOffset();\n        }\n    }\n\n    function setOffsetToUTC (keepLocalTime) {\n        return this.utcOffset(0, keepLocalTime);\n    }\n\n    function setOffsetToLocal (keepLocalTime) {\n        if (this._isUTC) {\n            this.utcOffset(0, keepLocalTime);\n            this._isUTC = false;\n\n            if (keepLocalTime) {\n                this.subtract(getDateOffset(this), 'm');\n            }\n        }\n        return this;\n    }\n\n    function setOffsetToParsedOffset () {\n        if (this._tzm) {\n            this.utcOffset(this._tzm);\n        } else if (typeof this._i === 'string') {\n            this.utcOffset(offsetFromString(this._i));\n        }\n        return this;\n    }\n\n    function hasAlignedHourOffset (input) {\n        input = input ? local__createLocal(input).utcOffset() : 0;\n\n        return (this.utcOffset() - input) % 60 === 0;\n    }\n\n    function isDaylightSavingTime () {\n        return (\n            this.utcOffset() > this.clone().month(0).utcOffset() ||\n            this.utcOffset() > this.clone().month(5).utcOffset()\n        );\n    }\n\n    function isDaylightSavingTimeShifted () {\n        if (typeof this._isDSTShifted !== 'undefined') {\n            return this._isDSTShifted;\n        }\n\n        var c = {};\n\n        copyConfig(c, this);\n        c = prepareConfig(c);\n\n        if (c._a) {\n            var other = c._isUTC ? create_utc__createUTC(c._a) : local__createLocal(c._a);\n            this._isDSTShifted = this.isValid() &&\n                compareArrays(c._a, other.toArray()) > 0;\n        } else {\n            this._isDSTShifted = false;\n        }\n\n        return this._isDSTShifted;\n    }\n\n    function isLocal () {\n        return !this._isUTC;\n    }\n\n    function isUtcOffset () {\n        return this._isUTC;\n    }\n\n    function isUtc () {\n        return this._isUTC && this._offset === 0;\n    }\n\n    var aspNetRegex = /(\\-)?(?:(\\d*)\\.)?(\\d+)\\:(\\d+)(?:\\:(\\d+)\\.?(\\d{3})?)?/;\n\n    // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html\n    // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere\n    var create__isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;\n\n    function create__createDuration (input, key) {\n        var duration = input,\n            // matching against regexp is expensive, do it on demand\n            match = null,\n            sign,\n            ret,\n            diffRes;\n\n        if (isDuration(input)) {\n            duration = {\n                ms : input._milliseconds,\n                d  : input._days,\n                M  : input._months\n            };\n        } else if (typeof input === 'number') {\n            duration = {};\n            if (key) {\n                duration[key] = input;\n            } else {\n                duration.milliseconds = input;\n            }\n        } else if (!!(match = aspNetRegex.exec(input))) {\n            sign = (match[1] === '-') ? -1 : 1;\n            duration = {\n                y  : 0,\n                d  : toInt(match[DATE])        * sign,\n                h  : toInt(match[HOUR])        * sign,\n                m  : toInt(match[MINUTE])      * sign,\n                s  : toInt(match[SECOND])      * sign,\n                ms : toInt(match[MILLISECOND]) * sign\n            };\n        } else if (!!(match = create__isoRegex.exec(input))) {\n            sign = (match[1] === '-') ? -1 : 1;\n            duration = {\n                y : parseIso(match[2], sign),\n                M : parseIso(match[3], sign),\n                d : parseIso(match[4], sign),\n                h : parseIso(match[5], sign),\n                m : parseIso(match[6], sign),\n                s : parseIso(match[7], sign),\n                w : parseIso(match[8], sign)\n            };\n        } else if (duration == null) {// checks for null or undefined\n            duration = {};\n        } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) {\n            diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to));\n\n            duration = {};\n            duration.ms = diffRes.milliseconds;\n            duration.M = diffRes.months;\n        }\n\n        ret = new Duration(duration);\n\n        if (isDuration(input) && hasOwnProp(input, '_locale')) {\n            ret._locale = input._locale;\n        }\n\n        return ret;\n    }\n\n    create__createDuration.fn = Duration.prototype;\n\n    function parseIso (inp, sign) {\n        // We'd normally use ~~inp for this, but unfortunately it also\n        // converts floats to ints.\n        // inp may be undefined, so careful calling replace on it.\n        var res = inp && parseFloat(inp.replace(',', '.'));\n        // apply sign while we're at it\n        return (isNaN(res) ? 0 : res) * sign;\n    }\n\n    function positiveMomentsDifference(base, other) {\n        var res = {milliseconds: 0, months: 0};\n\n        res.months = other.month() - base.month() +\n            (other.year() - base.year()) * 12;\n        if (base.clone().add(res.months, 'M').isAfter(other)) {\n            --res.months;\n        }\n\n        res.milliseconds = +other - +(base.clone().add(res.months, 'M'));\n\n        return res;\n    }\n\n    function momentsDifference(base, other) {\n        var res;\n        other = cloneWithOffset(other, base);\n        if (base.isBefore(other)) {\n            res = positiveMomentsDifference(base, other);\n        } else {\n            res = positiveMomentsDifference(other, base);\n            res.milliseconds = -res.milliseconds;\n            res.months = -res.months;\n        }\n\n        return res;\n    }\n\n    function createAdder(direction, name) {\n        return function (val, period) {\n            var dur, tmp;\n            //invert the arguments, but complain about it\n            if (period !== null && !isNaN(+period)) {\n                deprecateSimple(name, 'moment().' + name  + '(period, number) is deprecated. Please use moment().' + name + '(number, period).');\n                tmp = val; val = period; period = tmp;\n            }\n\n            val = typeof val === 'string' ? +val : val;\n            dur = create__createDuration(val, period);\n            add_subtract__addSubtract(this, dur, direction);\n            return this;\n        };\n    }\n\n    function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) {\n        var milliseconds = duration._milliseconds,\n            days = duration._days,\n            months = duration._months;\n        updateOffset = updateOffset == null ? true : updateOffset;\n\n        if (milliseconds) {\n            mom._d.setTime(+mom._d + milliseconds * isAdding);\n        }\n        if (days) {\n            get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding);\n        }\n        if (months) {\n            setMonth(mom, get_set__get(mom, 'Month') + months * isAdding);\n        }\n        if (updateOffset) {\n            utils_hooks__hooks.updateOffset(mom, days || months);\n        }\n    }\n\n    var add_subtract__add      = createAdder(1, 'add');\n    var add_subtract__subtract = createAdder(-1, 'subtract');\n\n    function moment_calendar__calendar (time, formats) {\n        // We want to compare the start of today, vs this.\n        // Getting start-of-today depends on whether we're local/utc/offset or not.\n        var now = time || local__createLocal(),\n            sod = cloneWithOffset(now, this).startOf('day'),\n            diff = this.diff(sod, 'days', true),\n            format = diff < -6 ? 'sameElse' :\n                diff < -1 ? 'lastWeek' :\n                diff < 0 ? 'lastDay' :\n                diff < 1 ? 'sameDay' :\n                diff < 2 ? 'nextDay' :\n                diff < 7 ? 'nextWeek' : 'sameElse';\n        return this.format(formats && formats[format] || this.localeData().calendar(format, this, local__createLocal(now)));\n    }\n\n    function clone () {\n        return new Moment(this);\n    }\n\n    function isAfter (input, units) {\n        var inputMs;\n        units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');\n        if (units === 'millisecond') {\n            input = isMoment(input) ? input : local__createLocal(input);\n            return +this > +input;\n        } else {\n            inputMs = isMoment(input) ? +input : +local__createLocal(input);\n            return inputMs < +this.clone().startOf(units);\n        }\n    }\n\n    function isBefore (input, units) {\n        var inputMs;\n        units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond');\n        if (units === 'millisecond') {\n            input = isMoment(input) ? input : local__createLocal(input);\n            return +this < +input;\n        } else {\n            inputMs = isMoment(input) ? +input : +local__createLocal(input);\n            return +this.clone().endOf(units) < inputMs;\n        }\n    }\n\n    function isBetween (from, to, units) {\n        return this.isAfter(from, units) && this.isBefore(to, units);\n    }\n\n    function isSame (input, units) {\n        var inputMs;\n        units = normalizeUnits(units || 'millisecond');\n        if (units === 'millisecond') {\n            input = isMoment(input) ? input : local__createLocal(input);\n            return +this === +input;\n        } else {\n            inputMs = +local__createLocal(input);\n            return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units));\n        }\n    }\n\n    function diff (input, units, asFloat) {\n        var that = cloneWithOffset(input, this),\n            zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4,\n            delta, output;\n\n        units = normalizeUnits(units);\n\n        if (units === 'year' || units === 'month' || units === 'quarter') {\n            output = monthDiff(this, that);\n            if (units === 'quarter') {\n                output = output / 3;\n            } else if (units === 'year') {\n                output = output / 12;\n            }\n        } else {\n            delta = this - that;\n            output = units === 'second' ? delta / 1e3 : // 1000\n                units === 'minute' ? delta / 6e4 : // 1000 * 60\n                units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60\n                units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst\n                units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst\n                delta;\n        }\n        return asFloat ? output : absFloor(output);\n    }\n\n    function monthDiff (a, b) {\n        // difference in months\n        var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()),\n            // b is in (anchor - 1 month, anchor + 1 month)\n            anchor = a.clone().add(wholeMonthDiff, 'months'),\n            anchor2, adjust;\n\n        if (b - anchor < 0) {\n            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor - anchor2);\n        } else {\n            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');\n            // linear across the month\n            adjust = (b - anchor) / (anchor2 - anchor);\n        }\n\n        return -(wholeMonthDiff + adjust);\n    }\n\n    utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';\n\n    function toString () {\n        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');\n    }\n\n    function moment_format__toISOString () {\n        var m = this.clone().utc();\n        if (0 < m.year() && m.year() <= 9999) {\n            if ('function' === typeof Date.prototype.toISOString) {\n                // native implementation is ~50x faster, use it when we can\n                return this.toDate().toISOString();\n            } else {\n                return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n            }\n        } else {\n            return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]');\n        }\n    }\n\n    function format (inputString) {\n        var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat);\n        return this.localeData().postformat(output);\n    }\n\n    function from (time, withoutSuffix) {\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n        return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix);\n    }\n\n    function fromNow (withoutSuffix) {\n        return this.from(local__createLocal(), withoutSuffix);\n    }\n\n    function to (time, withoutSuffix) {\n        if (!this.isValid()) {\n            return this.localeData().invalidDate();\n        }\n        return create__createDuration({from: this, to: time}).locale(this.locale()).humanize(!withoutSuffix);\n    }\n\n    function toNow (withoutSuffix) {\n        return this.to(local__createLocal(), withoutSuffix);\n    }\n\n    function locale (key) {\n        var newLocaleData;\n\n        if (key === undefined) {\n            return this._locale._abbr;\n        } else {\n            newLocaleData = locale_locales__getLocale(key);\n            if (newLocaleData != null) {\n                this._locale = newLocaleData;\n            }\n            return this;\n        }\n    }\n\n    var lang = deprecate(\n        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',\n        function (key) {\n            if (key === undefined) {\n                return this.localeData();\n            } else {\n                return this.locale(key);\n            }\n        }\n    );\n\n    function localeData () {\n        return this._locale;\n    }\n\n    function startOf (units) {\n        units = normalizeUnits(units);\n        // the following switch intentionally omits break keywords\n        // to utilize falling through the cases.\n        switch (units) {\n        case 'year':\n            this.month(0);\n            /* falls through */\n        case 'quarter':\n        case 'month':\n            this.date(1);\n            /* falls through */\n        case 'week':\n        case 'isoWeek':\n        case 'day':\n            this.hours(0);\n            /* falls through */\n        case 'hour':\n            this.minutes(0);\n            /* falls through */\n        case 'minute':\n            this.seconds(0);\n            /* falls through */\n        case 'second':\n            this.milliseconds(0);\n        }\n\n        // weeks are a special case\n        if (units === 'week') {\n            this.weekday(0);\n        }\n        if (units === 'isoWeek') {\n            this.isoWeekday(1);\n        }\n\n        // quarters are also special\n        if (units === 'quarter') {\n            this.month(Math.floor(this.month() / 3) * 3);\n        }\n\n        return this;\n    }\n\n    function endOf (units) {\n        units = normalizeUnits(units);\n        if (units === undefined || units === 'millisecond') {\n            return this;\n        }\n        return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms');\n    }\n\n    function to_type__valueOf () {\n        return +this._d - ((this._offset || 0) * 60000);\n    }\n\n    function unix () {\n        return Math.floor(+this / 1000);\n    }\n\n    function toDate () {\n        return this._offset ? new Date(+this) : this._d;\n    }\n\n    function toArray () {\n        var m = this;\n        return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()];\n    }\n\n    function toObject () {\n        var m = this;\n        return {\n            years: m.year(),\n            months: m.month(),\n            date: m.date(),\n            hours: m.hours(),\n            minutes: m.minutes(),\n            seconds: m.seconds(),\n            milliseconds: m.milliseconds()\n        };\n    }\n\n    function moment_valid__isValid () {\n        return valid__isValid(this);\n    }\n\n    function parsingFlags () {\n        return extend({}, getParsingFlags(this));\n    }\n\n    function invalidAt () {\n        return getParsingFlags(this).overflow;\n    }\n\n    addFormatToken(0, ['gg', 2], 0, function () {\n        return this.weekYear() % 100;\n    });\n\n    addFormatToken(0, ['GG', 2], 0, function () {\n        return this.isoWeekYear() % 100;\n    });\n\n    function addWeekYearFormatToken (token, getter) {\n        addFormatToken(0, [token, token.length], 0, getter);\n    }\n\n    addWeekYearFormatToken('gggg',     'weekYear');\n    addWeekYearFormatToken('ggggg',    'weekYear');\n    addWeekYearFormatToken('GGGG',  'isoWeekYear');\n    addWeekYearFormatToken('GGGGG', 'isoWeekYear');\n\n    // ALIASES\n\n    addUnitAlias('weekYear', 'gg');\n    addUnitAlias('isoWeekYear', 'GG');\n\n    // PARSING\n\n    addRegexToken('G',      matchSigned);\n    addRegexToken('g',      matchSigned);\n    addRegexToken('GG',     match1to2, match2);\n    addRegexToken('gg',     match1to2, match2);\n    addRegexToken('GGGG',   match1to4, match4);\n    addRegexToken('gggg',   match1to4, match4);\n    addRegexToken('GGGGG',  match1to6, match6);\n    addRegexToken('ggggg',  match1to6, match6);\n\n    addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {\n        week[token.substr(0, 2)] = toInt(input);\n    });\n\n    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {\n        week[token] = utils_hooks__hooks.parseTwoDigitYear(input);\n    });\n\n    // HELPERS\n\n    function weeksInYear(year, dow, doy) {\n        return weekOfYear(local__createLocal([year, 11, 31 + dow - doy]), dow, doy).week;\n    }\n\n    // MOMENTS\n\n    function getSetWeekYear (input) {\n        var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year;\n        return input == null ? year : this.add((input - year), 'y');\n    }\n\n    function getSetISOWeekYear (input) {\n        var year = weekOfYear(this, 1, 4).year;\n        return input == null ? year : this.add((input - year), 'y');\n    }\n\n    function getISOWeeksInYear () {\n        return weeksInYear(this.year(), 1, 4);\n    }\n\n    function getWeeksInYear () {\n        var weekInfo = this.localeData()._week;\n        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);\n    }\n\n    addFormatToken('Q', 0, 0, 'quarter');\n\n    // ALIASES\n\n    addUnitAlias('quarter', 'Q');\n\n    // PARSING\n\n    addRegexToken('Q', match1);\n    addParseToken('Q', function (input, array) {\n        array[MONTH] = (toInt(input) - 1) * 3;\n    });\n\n    // MOMENTS\n\n    function getSetQuarter (input) {\n        return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);\n    }\n\n    addFormatToken('D', ['DD', 2], 'Do', 'date');\n\n    // ALIASES\n\n    addUnitAlias('date', 'D');\n\n    // PARSING\n\n    addRegexToken('D',  match1to2);\n    addRegexToken('DD', match1to2, match2);\n    addRegexToken('Do', function (isStrict, locale) {\n        return isStrict ? locale._ordinalParse : locale._ordinalParseLenient;\n    });\n\n    addParseToken(['D', 'DD'], DATE);\n    addParseToken('Do', function (input, array) {\n        array[DATE] = toInt(input.match(match1to2)[0], 10);\n    });\n\n    // MOMENTS\n\n    var getSetDayOfMonth = makeGetSet('Date', true);\n\n    addFormatToken('d', 0, 'do', 'day');\n\n    addFormatToken('dd', 0, 0, function (format) {\n        return this.localeData().weekdaysMin(this, format);\n    });\n\n    addFormatToken('ddd', 0, 0, function (format) {\n        return this.localeData().weekdaysShort(this, format);\n    });\n\n    addFormatToken('dddd', 0, 0, function (format) {\n        return this.localeData().weekdays(this, format);\n    });\n\n    addFormatToken('e', 0, 0, 'weekday');\n    addFormatToken('E', 0, 0, 'isoWeekday');\n\n    // ALIASES\n\n    addUnitAlias('day', 'd');\n    addUnitAlias('weekday', 'e');\n    addUnitAlias('isoWeekday', 'E');\n\n    // PARSING\n\n    addRegexToken('d',    match1to2);\n    addRegexToken('e',    match1to2);\n    addRegexToken('E',    match1to2);\n    addRegexToken('dd',   matchWord);\n    addRegexToken('ddd',  matchWord);\n    addRegexToken('dddd', matchWord);\n\n    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config) {\n        var weekday = config._locale.weekdaysParse(input);\n        // if we didn't get a weekday name, mark the date as invalid\n        if (weekday != null) {\n            week.d = weekday;\n        } else {\n            getParsingFlags(config).invalidWeekday = input;\n        }\n    });\n\n    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {\n        week[token] = toInt(input);\n    });\n\n    // HELPERS\n\n    function parseWeekday(input, locale) {\n        if (typeof input !== 'string') {\n            return input;\n        }\n\n        if (!isNaN(input)) {\n            return parseInt(input, 10);\n        }\n\n        input = locale.weekdaysParse(input);\n        if (typeof input === 'number') {\n            return input;\n        }\n\n        return null;\n    }\n\n    // LOCALES\n\n    var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_');\n    function localeWeekdays (m) {\n        return this._weekdays[m.day()];\n    }\n\n    var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_');\n    function localeWeekdaysShort (m) {\n        return this._weekdaysShort[m.day()];\n    }\n\n    var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_');\n    function localeWeekdaysMin (m) {\n        return this._weekdaysMin[m.day()];\n    }\n\n    function localeWeekdaysParse (weekdayName) {\n        var i, mom, regex;\n\n        this._weekdaysParse = this._weekdaysParse || [];\n\n        for (i = 0; i < 7; i++) {\n            // make the regex if we don't have it already\n            if (!this._weekdaysParse[i]) {\n                mom = local__createLocal([2000, 1]).day(i);\n                regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, '');\n                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');\n            }\n            // test the regex\n            if (this._weekdaysParse[i].test(weekdayName)) {\n                return i;\n            }\n        }\n    }\n\n    // MOMENTS\n\n    function getSetDayOfWeek (input) {\n        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();\n        if (input != null) {\n            input = parseWeekday(input, this.localeData());\n            return this.add(input - day, 'd');\n        } else {\n            return day;\n        }\n    }\n\n    function getSetLocaleDayOfWeek (input) {\n        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;\n        return input == null ? weekday : this.add(input - weekday, 'd');\n    }\n\n    function getSetISODayOfWeek (input) {\n        // behaves the same as moment#day except\n        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)\n        // as a setter, sunday should belong to the previous week.\n        return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7);\n    }\n\n    addFormatToken('H', ['HH', 2], 0, 'hour');\n    addFormatToken('h', ['hh', 2], 0, function () {\n        return this.hours() % 12 || 12;\n    });\n\n    function meridiem (token, lowercase) {\n        addFormatToken(token, 0, 0, function () {\n            return this.localeData().meridiem(this.hours(), this.minutes(), lowercase);\n        });\n    }\n\n    meridiem('a', true);\n    meridiem('A', false);\n\n    // ALIASES\n\n    addUnitAlias('hour', 'h');\n\n    // PARSING\n\n    function matchMeridiem (isStrict, locale) {\n        return locale._meridiemParse;\n    }\n\n    addRegexToken('a',  matchMeridiem);\n    addRegexToken('A',  matchMeridiem);\n    addRegexToken('H',  match1to2);\n    addRegexToken('h',  match1to2);\n    addRegexToken('HH', match1to2, match2);\n    addRegexToken('hh', match1to2, match2);\n\n    addParseToken(['H', 'HH'], HOUR);\n    addParseToken(['a', 'A'], function (input, array, config) {\n        config._isPm = config._locale.isPM(input);\n        config._meridiem = input;\n    });\n    addParseToken(['h', 'hh'], function (input, array, config) {\n        array[HOUR] = toInt(input);\n        getParsingFlags(config).bigHour = true;\n    });\n\n    // LOCALES\n\n    function localeIsPM (input) {\n        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays\n        // Using charAt should be more compatible.\n        return ((input + '').toLowerCase().charAt(0) === 'p');\n    }\n\n    var defaultLocaleMeridiemParse = /[ap]\\.?m?\\.?/i;\n    function localeMeridiem (hours, minutes, isLower) {\n        if (hours > 11) {\n            return isLower ? 'pm' : 'PM';\n        } else {\n            return isLower ? 'am' : 'AM';\n        }\n    }\n\n\n    // MOMENTS\n\n    // Setting the hour should keep the time, because the user explicitly\n    // specified which hour he wants. So trying to maintain the same hour (in\n    // a new timezone) makes sense. Adding/subtracting hours does not follow\n    // this rule.\n    var getSetHour = makeGetSet('Hours', true);\n\n    addFormatToken('m', ['mm', 2], 0, 'minute');\n\n    // ALIASES\n\n    addUnitAlias('minute', 'm');\n\n    // PARSING\n\n    addRegexToken('m',  match1to2);\n    addRegexToken('mm', match1to2, match2);\n    addParseToken(['m', 'mm'], MINUTE);\n\n    // MOMENTS\n\n    var getSetMinute = makeGetSet('Minutes', false);\n\n    addFormatToken('s', ['ss', 2], 0, 'second');\n\n    // ALIASES\n\n    addUnitAlias('second', 's');\n\n    // PARSING\n\n    addRegexToken('s',  match1to2);\n    addRegexToken('ss', match1to2, match2);\n    addParseToken(['s', 'ss'], SECOND);\n\n    // MOMENTS\n\n    var getSetSecond = makeGetSet('Seconds', false);\n\n    addFormatToken('S', 0, 0, function () {\n        return ~~(this.millisecond() / 100);\n    });\n\n    addFormatToken(0, ['SS', 2], 0, function () {\n        return ~~(this.millisecond() / 10);\n    });\n\n    addFormatToken(0, ['SSS', 3], 0, 'millisecond');\n    addFormatToken(0, ['SSSS', 4], 0, function () {\n        return this.millisecond() * 10;\n    });\n    addFormatToken(0, ['SSSSS', 5], 0, function () {\n        return this.millisecond() * 100;\n    });\n    addFormatToken(0, ['SSSSSS', 6], 0, function () {\n        return this.millisecond() * 1000;\n    });\n    addFormatToken(0, ['SSSSSSS', 7], 0, function () {\n        return this.millisecond() * 10000;\n    });\n    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {\n        return this.millisecond() * 100000;\n    });\n    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {\n        return this.millisecond() * 1000000;\n    });\n\n\n    // ALIASES\n\n    addUnitAlias('millisecond', 'ms');\n\n    // PARSING\n\n    addRegexToken('S',    match1to3, match1);\n    addRegexToken('SS',   match1to3, match2);\n    addRegexToken('SSS',  match1to3, match3);\n\n    var token;\n    for (token = 'SSSS'; token.length <= 9; token += 'S') {\n        addRegexToken(token, matchUnsigned);\n    }\n\n    function parseMs(input, array) {\n        array[MILLISECOND] = toInt(('0.' + input) * 1000);\n    }\n\n    for (token = 'S'; token.length <= 9; token += 'S') {\n        addParseToken(token, parseMs);\n    }\n    // MOMENTS\n\n    var getSetMillisecond = makeGetSet('Milliseconds', false);\n\n    addFormatToken('z',  0, 0, 'zoneAbbr');\n    addFormatToken('zz', 0, 0, 'zoneName');\n\n    // MOMENTS\n\n    function getZoneAbbr () {\n        return this._isUTC ? 'UTC' : '';\n    }\n\n    function getZoneName () {\n        return this._isUTC ? 'Coordinated Universal Time' : '';\n    }\n\n    var momentPrototype__proto = Moment.prototype;\n\n    momentPrototype__proto.add          = add_subtract__add;\n    momentPrototype__proto.calendar     = moment_calendar__calendar;\n    momentPrototype__proto.clone        = clone;\n    momentPrototype__proto.diff         = diff;\n    momentPrototype__proto.endOf        = endOf;\n    momentPrototype__proto.format       = format;\n    momentPrototype__proto.from         = from;\n    momentPrototype__proto.fromNow      = fromNow;\n    momentPrototype__proto.to           = to;\n    momentPrototype__proto.toNow        = toNow;\n    momentPrototype__proto.get          = getSet;\n    momentPrototype__proto.invalidAt    = invalidAt;\n    momentPrototype__proto.isAfter      = isAfter;\n    momentPrototype__proto.isBefore     = isBefore;\n    momentPrototype__proto.isBetween    = isBetween;\n    momentPrototype__proto.isSame       = isSame;\n    momentPrototype__proto.isValid      = moment_valid__isValid;\n    momentPrototype__proto.lang         = lang;\n    momentPrototype__proto.locale       = locale;\n    momentPrototype__proto.localeData   = localeData;\n    momentPrototype__proto.max          = prototypeMax;\n    momentPrototype__proto.min          = prototypeMin;\n    momentPrototype__proto.parsingFlags = parsingFlags;\n    momentPrototype__proto.set          = getSet;\n    momentPrototype__proto.startOf      = startOf;\n    momentPrototype__proto.subtract     = add_subtract__subtract;\n    momentPrototype__proto.toArray      = toArray;\n    momentPrototype__proto.toObject     = toObject;\n    momentPrototype__proto.toDate       = toDate;\n    momentPrototype__proto.toISOString  = moment_format__toISOString;\n    momentPrototype__proto.toJSON       = moment_format__toISOString;\n    momentPrototype__proto.toString     = toString;\n    momentPrototype__proto.unix         = unix;\n    momentPrototype__proto.valueOf      = to_type__valueOf;\n\n    // Year\n    momentPrototype__proto.year       = getSetYear;\n    momentPrototype__proto.isLeapYear = getIsLeapYear;\n\n    // Week Year\n    momentPrototype__proto.weekYear    = getSetWeekYear;\n    momentPrototype__proto.isoWeekYear = getSetISOWeekYear;\n\n    // Quarter\n    momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter;\n\n    // Month\n    momentPrototype__proto.month       = getSetMonth;\n    momentPrototype__proto.daysInMonth = getDaysInMonth;\n\n    // Week\n    momentPrototype__proto.week           = momentPrototype__proto.weeks        = getSetWeek;\n    momentPrototype__proto.isoWeek        = momentPrototype__proto.isoWeeks     = getSetISOWeek;\n    momentPrototype__proto.weeksInYear    = getWeeksInYear;\n    momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear;\n\n    // Day\n    momentPrototype__proto.date       = getSetDayOfMonth;\n    momentPrototype__proto.day        = momentPrototype__proto.days             = getSetDayOfWeek;\n    momentPrototype__proto.weekday    = getSetLocaleDayOfWeek;\n    momentPrototype__proto.isoWeekday = getSetISODayOfWeek;\n    momentPrototype__proto.dayOfYear  = getSetDayOfYear;\n\n    // Hour\n    momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour;\n\n    // Minute\n    momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute;\n\n    // Second\n    momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond;\n\n    // Millisecond\n    momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond;\n\n    // Offset\n    momentPrototype__proto.utcOffset            = getSetOffset;\n    momentPrototype__proto.utc                  = setOffsetToUTC;\n    momentPrototype__proto.local                = setOffsetToLocal;\n    momentPrototype__proto.parseZone            = setOffsetToParsedOffset;\n    momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset;\n    momentPrototype__proto.isDST                = isDaylightSavingTime;\n    momentPrototype__proto.isDSTShifted         = isDaylightSavingTimeShifted;\n    momentPrototype__proto.isLocal              = isLocal;\n    momentPrototype__proto.isUtcOffset          = isUtcOffset;\n    momentPrototype__proto.isUtc                = isUtc;\n    momentPrototype__proto.isUTC                = isUtc;\n\n    // Timezone\n    momentPrototype__proto.zoneAbbr = getZoneAbbr;\n    momentPrototype__proto.zoneName = getZoneName;\n\n    // Deprecations\n    momentPrototype__proto.dates  = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth);\n    momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth);\n    momentPrototype__proto.years  = deprecate('years accessor is deprecated. Use year instead', getSetYear);\n    momentPrototype__proto.zone   = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone);\n\n    var momentPrototype = momentPrototype__proto;\n\n    function moment__createUnix (input) {\n        return local__createLocal(input * 1000);\n    }\n\n    function moment__createInZone () {\n        return local__createLocal.apply(null, arguments).parseZone();\n    }\n\n    var defaultCalendar = {\n        sameDay : '[Today at] LT',\n        nextDay : '[Tomorrow at] LT',\n        nextWeek : 'dddd [at] LT',\n        lastDay : '[Yesterday at] LT',\n        lastWeek : '[Last] dddd [at] LT',\n        sameElse : 'L'\n    };\n\n    function locale_calendar__calendar (key, mom, now) {\n        var output = this._calendar[key];\n        return typeof output === 'function' ? output.call(mom, now) : output;\n    }\n\n    var defaultLongDateFormat = {\n        LTS  : 'h:mm:ss A',\n        LT   : 'h:mm A',\n        L    : 'MM/DD/YYYY',\n        LL   : 'MMMM D, YYYY',\n        LLL  : 'MMMM D, YYYY h:mm A',\n        LLLL : 'dddd, MMMM D, YYYY h:mm A'\n    };\n\n    function longDateFormat (key) {\n        var format = this._longDateFormat[key],\n            formatUpper = this._longDateFormat[key.toUpperCase()];\n\n        if (format || !formatUpper) {\n            return format;\n        }\n\n        this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {\n            return val.slice(1);\n        });\n\n        return this._longDateFormat[key];\n    }\n\n    var defaultInvalidDate = 'Invalid date';\n\n    function invalidDate () {\n        return this._invalidDate;\n    }\n\n    var defaultOrdinal = '%d';\n    var defaultOrdinalParse = /\\d{1,2}/;\n\n    function ordinal (number) {\n        return this._ordinal.replace('%d', number);\n    }\n\n    function preParsePostFormat (string) {\n        return string;\n    }\n\n    var defaultRelativeTime = {\n        future : 'in %s',\n        past   : '%s ago',\n        s  : 'a few seconds',\n        m  : 'a minute',\n        mm : '%d minutes',\n        h  : 'an hour',\n        hh : '%d hours',\n        d  : 'a day',\n        dd : '%d days',\n        M  : 'a month',\n        MM : '%d months',\n        y  : 'a year',\n        yy : '%d years'\n    };\n\n    function relative__relativeTime (number, withoutSuffix, string, isFuture) {\n        var output = this._relativeTime[string];\n        return (typeof output === 'function') ?\n            output(number, withoutSuffix, string, isFuture) :\n            output.replace(/%d/i, number);\n    }\n\n    function pastFuture (diff, output) {\n        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];\n        return typeof format === 'function' ? format(output) : format.replace(/%s/i, output);\n    }\n\n    function locale_set__set (config) {\n        var prop, i;\n        for (i in config) {\n            prop = config[i];\n            if (typeof prop === 'function') {\n                this[i] = prop;\n            } else {\n                this['_' + i] = prop;\n            }\n        }\n        // Lenient ordinal parsing accepts just a number in addition to\n        // number + (possibly) stuff coming from _ordinalParseLenient.\n        this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + (/\\d{1,2}/).source);\n    }\n\n    var prototype__proto = Locale.prototype;\n\n    prototype__proto._calendar       = defaultCalendar;\n    prototype__proto.calendar        = locale_calendar__calendar;\n    prototype__proto._longDateFormat = defaultLongDateFormat;\n    prototype__proto.longDateFormat  = longDateFormat;\n    prototype__proto._invalidDate    = defaultInvalidDate;\n    prototype__proto.invalidDate     = invalidDate;\n    prototype__proto._ordinal        = defaultOrdinal;\n    prototype__proto.ordinal         = ordinal;\n    prototype__proto._ordinalParse   = defaultOrdinalParse;\n    prototype__proto.preparse        = preParsePostFormat;\n    prototype__proto.postformat      = preParsePostFormat;\n    prototype__proto._relativeTime   = defaultRelativeTime;\n    prototype__proto.relativeTime    = relative__relativeTime;\n    prototype__proto.pastFuture      = pastFuture;\n    prototype__proto.set             = locale_set__set;\n\n    // Month\n    prototype__proto.months       =        localeMonths;\n    prototype__proto._months      = defaultLocaleMonths;\n    prototype__proto.monthsShort  =        localeMonthsShort;\n    prototype__proto._monthsShort = defaultLocaleMonthsShort;\n    prototype__proto.monthsParse  =        localeMonthsParse;\n\n    // Week\n    prototype__proto.week = localeWeek;\n    prototype__proto._week = defaultLocaleWeek;\n    prototype__proto.firstDayOfYear = localeFirstDayOfYear;\n    prototype__proto.firstDayOfWeek = localeFirstDayOfWeek;\n\n    // Day of Week\n    prototype__proto.weekdays       =        localeWeekdays;\n    prototype__proto._weekdays      = defaultLocaleWeekdays;\n    prototype__proto.weekdaysMin    =        localeWeekdaysMin;\n    prototype__proto._weekdaysMin   = defaultLocaleWeekdaysMin;\n    prototype__proto.weekdaysShort  =        localeWeekdaysShort;\n    prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort;\n    prototype__proto.weekdaysParse  =        localeWeekdaysParse;\n\n    // Hours\n    prototype__proto.isPM = localeIsPM;\n    prototype__proto._meridiemParse = defaultLocaleMeridiemParse;\n    prototype__proto.meridiem = localeMeridiem;\n\n    function lists__get (format, index, field, setter) {\n        var locale = locale_locales__getLocale();\n        var utc = create_utc__createUTC().set(setter, index);\n        return locale[field](utc, format);\n    }\n\n    function list (format, index, field, count, setter) {\n        if (typeof format === 'number') {\n            index = format;\n            format = undefined;\n        }\n\n        format = format || '';\n\n        if (index != null) {\n            return lists__get(format, index, field, setter);\n        }\n\n        var i;\n        var out = [];\n        for (i = 0; i < count; i++) {\n            out[i] = lists__get(format, i, field, setter);\n        }\n        return out;\n    }\n\n    function lists__listMonths (format, index) {\n        return list(format, index, 'months', 12, 'month');\n    }\n\n    function lists__listMonthsShort (format, index) {\n        return list(format, index, 'monthsShort', 12, 'month');\n    }\n\n    function lists__listWeekdays (format, index) {\n        return list(format, index, 'weekdays', 7, 'day');\n    }\n\n    function lists__listWeekdaysShort (format, index) {\n        return list(format, index, 'weekdaysShort', 7, 'day');\n    }\n\n    function lists__listWeekdaysMin (format, index) {\n        return list(format, index, 'weekdaysMin', 7, 'day');\n    }\n\n    locale_locales__getSetGlobalLocale('en', {\n        ordinalParse: /\\d{1,2}(th|st|nd|rd)/,\n        ordinal : function (number) {\n            var b = number % 10,\n                output = (toInt(number % 100 / 10) === 1) ? 'th' :\n                (b === 1) ? 'st' :\n                (b === 2) ? 'nd' :\n                (b === 3) ? 'rd' : 'th';\n            return number + output;\n        }\n    });\n\n    // Side effect imports\n    utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale);\n    utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale);\n\n    var mathAbs = Math.abs;\n\n    function duration_abs__abs () {\n        var data           = this._data;\n\n        this._milliseconds = mathAbs(this._milliseconds);\n        this._days         = mathAbs(this._days);\n        this._months       = mathAbs(this._months);\n\n        data.milliseconds  = mathAbs(data.milliseconds);\n        data.seconds       = mathAbs(data.seconds);\n        data.minutes       = mathAbs(data.minutes);\n        data.hours         = mathAbs(data.hours);\n        data.months        = mathAbs(data.months);\n        data.years         = mathAbs(data.years);\n\n        return this;\n    }\n\n    function duration_add_subtract__addSubtract (duration, input, value, direction) {\n        var other = create__createDuration(input, value);\n\n        duration._milliseconds += direction * other._milliseconds;\n        duration._days         += direction * other._days;\n        duration._months       += direction * other._months;\n\n        return duration._bubble();\n    }\n\n    // supports only 2.0-style add(1, 's') or add(duration)\n    function duration_add_subtract__add (input, value) {\n        return duration_add_subtract__addSubtract(this, input, value, 1);\n    }\n\n    // supports only 2.0-style subtract(1, 's') or subtract(duration)\n    function duration_add_subtract__subtract (input, value) {\n        return duration_add_subtract__addSubtract(this, input, value, -1);\n    }\n\n    function absCeil (number) {\n        if (number < 0) {\n            return Math.floor(number);\n        } else {\n            return Math.ceil(number);\n        }\n    }\n\n    function bubble () {\n        var milliseconds = this._milliseconds;\n        var days         = this._days;\n        var months       = this._months;\n        var data         = this._data;\n        var seconds, minutes, hours, years, monthsFromDays;\n\n        // if we have a mix of positive and negative values, bubble down first\n        // check: https://github.com/moment/moment/issues/2166\n        if (!((milliseconds >= 0 && days >= 0 && months >= 0) ||\n                (milliseconds <= 0 && days <= 0 && months <= 0))) {\n            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;\n            days = 0;\n            months = 0;\n        }\n\n        // The following code bubbles up values, see the tests for\n        // examples of what that means.\n        data.milliseconds = milliseconds % 1000;\n\n        seconds           = absFloor(milliseconds / 1000);\n        data.seconds      = seconds % 60;\n\n        minutes           = absFloor(seconds / 60);\n        data.minutes      = minutes % 60;\n\n        hours             = absFloor(minutes / 60);\n        data.hours        = hours % 24;\n\n        days += absFloor(hours / 24);\n\n        // convert days to months\n        monthsFromDays = absFloor(daysToMonths(days));\n        months += monthsFromDays;\n        days -= absCeil(monthsToDays(monthsFromDays));\n\n        // 12 months -> 1 year\n        years = absFloor(months / 12);\n        months %= 12;\n\n        data.days   = days;\n        data.months = months;\n        data.years  = years;\n\n        return this;\n    }\n\n    function daysToMonths (days) {\n        // 400 years have 146097 days (taking into account leap year rules)\n        // 400 years have 12 months === 4800\n        return days * 4800 / 146097;\n    }\n\n    function monthsToDays (months) {\n        // the reverse of daysToMonths\n        return months * 146097 / 4800;\n    }\n\n    function as (units) {\n        var days;\n        var months;\n        var milliseconds = this._milliseconds;\n\n        units = normalizeUnits(units);\n\n        if (units === 'month' || units === 'year') {\n            days   = this._days   + milliseconds / 864e5;\n            months = this._months + daysToMonths(days);\n            return units === 'month' ? months : months / 12;\n        } else {\n            // handle milliseconds separately because of floating point math errors (issue #1867)\n            days = this._days + Math.round(monthsToDays(this._months));\n            switch (units) {\n                case 'week'   : return days / 7     + milliseconds / 6048e5;\n                case 'day'    : return days         + milliseconds / 864e5;\n                case 'hour'   : return days * 24    + milliseconds / 36e5;\n                case 'minute' : return days * 1440  + milliseconds / 6e4;\n                case 'second' : return days * 86400 + milliseconds / 1000;\n                // Math.floor prevents floating point math errors here\n                case 'millisecond': return Math.floor(days * 864e5) + milliseconds;\n                default: throw new Error('Unknown unit ' + units);\n            }\n        }\n    }\n\n    // TODO: Use this.as('ms')?\n    function duration_as__valueOf () {\n        return (\n            this._milliseconds +\n            this._days * 864e5 +\n            (this._months % 12) * 2592e6 +\n            toInt(this._months / 12) * 31536e6\n        );\n    }\n\n    function makeAs (alias) {\n        return function () {\n            return this.as(alias);\n        };\n    }\n\n    var asMilliseconds = makeAs('ms');\n    var asSeconds      = makeAs('s');\n    var asMinutes      = makeAs('m');\n    var asHours        = makeAs('h');\n    var asDays         = makeAs('d');\n    var asWeeks        = makeAs('w');\n    var asMonths       = makeAs('M');\n    var asYears        = makeAs('y');\n\n    function duration_get__get (units) {\n        units = normalizeUnits(units);\n        return this[units + 's']();\n    }\n\n    function makeGetter(name) {\n        return function () {\n            return this._data[name];\n        };\n    }\n\n    var milliseconds = makeGetter('milliseconds');\n    var seconds      = makeGetter('seconds');\n    var minutes      = makeGetter('minutes');\n    var hours        = makeGetter('hours');\n    var days         = makeGetter('days');\n    var months       = makeGetter('months');\n    var years        = makeGetter('years');\n\n    function weeks () {\n        return absFloor(this.days() / 7);\n    }\n\n    var round = Math.round;\n    var thresholds = {\n        s: 45,  // seconds to minute\n        m: 45,  // minutes to hour\n        h: 22,  // hours to day\n        d: 26,  // days to month\n        M: 11   // months to year\n    };\n\n    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize\n    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {\n        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);\n    }\n\n    function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) {\n        var duration = create__createDuration(posNegDuration).abs();\n        var seconds  = round(duration.as('s'));\n        var minutes  = round(duration.as('m'));\n        var hours    = round(duration.as('h'));\n        var days     = round(duration.as('d'));\n        var months   = round(duration.as('M'));\n        var years    = round(duration.as('y'));\n\n        var a = seconds < thresholds.s && ['s', seconds]  ||\n                minutes === 1          && ['m']           ||\n                minutes < thresholds.m && ['mm', minutes] ||\n                hours   === 1          && ['h']           ||\n                hours   < thresholds.h && ['hh', hours]   ||\n                days    === 1          && ['d']           ||\n                days    < thresholds.d && ['dd', days]    ||\n                months  === 1          && ['M']           ||\n                months  < thresholds.M && ['MM', months]  ||\n                years   === 1          && ['y']           || ['yy', years];\n\n        a[2] = withoutSuffix;\n        a[3] = +posNegDuration > 0;\n        a[4] = locale;\n        return substituteTimeAgo.apply(null, a);\n    }\n\n    // This function allows you to set a threshold for relative time strings\n    function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) {\n        if (thresholds[threshold] === undefined) {\n            return false;\n        }\n        if (limit === undefined) {\n            return thresholds[threshold];\n        }\n        thresholds[threshold] = limit;\n        return true;\n    }\n\n    function humanize (withSuffix) {\n        var locale = this.localeData();\n        var output = duration_humanize__relativeTime(this, !withSuffix, locale);\n\n        if (withSuffix) {\n            output = locale.pastFuture(+this, output);\n        }\n\n        return locale.postformat(output);\n    }\n\n    var iso_string__abs = Math.abs;\n\n    function iso_string__toISOString() {\n        // for ISO strings we do not use the normal bubbling rules:\n        //  * milliseconds bubble up until they become hours\n        //  * days do not bubble at all\n        //  * months bubble up until they become years\n        // This is because there is no context-free conversion between hours and days\n        // (think of clock changes)\n        // and also not between days and months (28-31 days per month)\n        var seconds = iso_string__abs(this._milliseconds) / 1000;\n        var days         = iso_string__abs(this._days);\n        var months       = iso_string__abs(this._months);\n        var minutes, hours, years;\n\n        // 3600 seconds -> 60 minutes -> 1 hour\n        minutes           = absFloor(seconds / 60);\n        hours             = absFloor(minutes / 60);\n        seconds %= 60;\n        minutes %= 60;\n\n        // 12 months -> 1 year\n        years  = absFloor(months / 12);\n        months %= 12;\n\n\n        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js\n        var Y = years;\n        var M = months;\n        var D = days;\n        var h = hours;\n        var m = minutes;\n        var s = seconds;\n        var total = this.asSeconds();\n\n        if (!total) {\n            // this is the same as C#'s (Noda) and python (isodate)...\n            // but not other JS (goog.date)\n            return 'P0D';\n        }\n\n        return (total < 0 ? '-' : '') +\n            'P' +\n            (Y ? Y + 'Y' : '') +\n            (M ? M + 'M' : '') +\n            (D ? D + 'D' : '') +\n            ((h || m || s) ? 'T' : '') +\n            (h ? h + 'H' : '') +\n            (m ? m + 'M' : '') +\n            (s ? s + 'S' : '');\n    }\n\n    var duration_prototype__proto = Duration.prototype;\n\n    duration_prototype__proto.abs            = duration_abs__abs;\n    duration_prototype__proto.add            = duration_add_subtract__add;\n    duration_prototype__proto.subtract       = duration_add_subtract__subtract;\n    duration_prototype__proto.as             = as;\n    duration_prototype__proto.asMilliseconds = asMilliseconds;\n    duration_prototype__proto.asSeconds      = asSeconds;\n    duration_prototype__proto.asMinutes      = asMinutes;\n    duration_prototype__proto.asHours        = asHours;\n    duration_prototype__proto.asDays         = asDays;\n    duration_prototype__proto.asWeeks        = asWeeks;\n    duration_prototype__proto.asMonths       = asMonths;\n    duration_prototype__proto.asYears        = asYears;\n    duration_prototype__proto.valueOf        = duration_as__valueOf;\n    duration_prototype__proto._bubble        = bubble;\n    duration_prototype__proto.get            = duration_get__get;\n    duration_prototype__proto.milliseconds   = milliseconds;\n    duration_prototype__proto.seconds        = seconds;\n    duration_prototype__proto.minutes        = minutes;\n    duration_prototype__proto.hours          = hours;\n    duration_prototype__proto.days           = days;\n    duration_prototype__proto.weeks          = weeks;\n    duration_prototype__proto.months         = months;\n    duration_prototype__proto.years          = years;\n    duration_prototype__proto.humanize       = humanize;\n    duration_prototype__proto.toISOString    = iso_string__toISOString;\n    duration_prototype__proto.toString       = iso_string__toISOString;\n    duration_prototype__proto.toJSON         = iso_string__toISOString;\n    duration_prototype__proto.locale         = locale;\n    duration_prototype__proto.localeData     = localeData;\n\n    // Deprecations\n    duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString);\n    duration_prototype__proto.lang = lang;\n\n    // Side effect imports\n\n    addFormatToken('X', 0, 0, 'unix');\n    addFormatToken('x', 0, 0, 'valueOf');\n\n    // PARSING\n\n    addRegexToken('x', matchSigned);\n    addRegexToken('X', matchTimestamp);\n    addParseToken('X', function (input, array, config) {\n        config._d = new Date(parseFloat(input, 10) * 1000);\n    });\n    addParseToken('x', function (input, array, config) {\n        config._d = new Date(toInt(input));\n    });\n\n    // Side effect imports\n\n\n    utils_hooks__hooks.version = '2.10.6';\n\n    setHookCallback(local__createLocal);\n\n    utils_hooks__hooks.fn                    = momentPrototype;\n    utils_hooks__hooks.min                   = min;\n    utils_hooks__hooks.max                   = max;\n    utils_hooks__hooks.utc                   = create_utc__createUTC;\n    utils_hooks__hooks.unix                  = moment__createUnix;\n    utils_hooks__hooks.months                = lists__listMonths;\n    utils_hooks__hooks.isDate                = isDate;\n    utils_hooks__hooks.locale                = locale_locales__getSetGlobalLocale;\n    utils_hooks__hooks.invalid               = valid__createInvalid;\n    utils_hooks__hooks.duration              = create__createDuration;\n    utils_hooks__hooks.isMoment              = isMoment;\n    utils_hooks__hooks.weekdays              = lists__listWeekdays;\n    utils_hooks__hooks.parseZone             = moment__createInZone;\n    utils_hooks__hooks.localeData            = locale_locales__getLocale;\n    utils_hooks__hooks.isDuration            = isDuration;\n    utils_hooks__hooks.monthsShort           = lists__listMonthsShort;\n    utils_hooks__hooks.weekdaysMin           = lists__listWeekdaysMin;\n    utils_hooks__hooks.defineLocale          = defineLocale;\n    utils_hooks__hooks.weekdaysShort         = lists__listWeekdaysShort;\n    utils_hooks__hooks.normalizeUnits        = normalizeUnits;\n    utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold;\n\n    var _moment = utils_hooks__hooks;\n\n    return _moment;\n\n}));","/**\r\n * @l2s.js\r\n *\r\n * L2S is a client side Javascript SDK for making OAuth2 login on L2S.\r\n * This library is a subset of the excellent hello.js (@copyright Androw Dodson / Knarly)\r\n * easyXDM is used for cross domain api calls\r\n *\r\n * @author Christian Lemasson\r\n * @company ChronoRace - Electronic Timing\r\n *\r\n * @copyright ChronoRace\r\n */\r\n\r\n\r\n\r\n\r\n/**\r\n * easyXDM\r\n * http://easyxdm.net/\r\n * Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n *\r\n * Permission is hereby granted, free of charge, to any person obtaining a copy\r\n * of this software and associated documentation files (the \"Software\"), to deal\r\n * in the Software without restriction, including without limitation the rights\r\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n * copies of the Software, and to permit persons to whom the Software is\r\n * furnished to do so, subject to the following conditions:\r\n *\r\n * The above copyright notice and this permission notice shall be included in\r\n * all copies or substantial portions of the Software.\r\n *\r\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n * THE SOFTWARE.\r\n */\r\n(function (window, document, location, setTimeout, decodeURIComponent, encodeURIComponent) {\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global JSON, XMLHttpRequest, window, escape, unescape, ActiveXObject */\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    var global = this;\r\n    var channelId = Math.floor(Math.random() * 10000); // randomize the initial id in case of multiple closures loaded\r\n    var emptyFn = Function.prototype;\r\n    var reURI = /^((http.?:)\\/\\/([^:\\/\\s]+)(:\\d+)*)/; // returns groups for protocol (2), domain (3) and port (4)\r\n    var reParent = /[\\-\\w]+\\/\\.\\.\\//; // matches a foo/../ expression\r\n    var reDoubleSlash = /([^:])\\/\\//g; // matches // anywhere but in the protocol\r\n    var namespace = \"\"; // stores namespace under which easyXDM object is stored on the page (empty if object is global)\r\n    var easyXDM = {};\r\n    var _easyXDM = window.easyXDM; // map over global easyXDM in case of overwrite\r\n    var IFRAME_PREFIX = \"easyXDM_\";\r\n    var HAS_NAME_PROPERTY_BUG;\r\n    var useHash = false; // whether to use the hash over the query\r\n    var flashVersion; // will be set if using flash\r\n    var HAS_FLASH_THROTTLED_BUG;\r\n\r\n\r\n    // http://peter.michaux.ca/articles/feature-detection-state-of-the-art-browser-scripting\r\n    function isHostMethod(object, property) {\r\n        var t = typeof object[property];\r\n        return t == 'function' ||\r\n            (!!(t == 'object' && object[property])) ||\r\n            t == 'unknown';\r\n    }\r\n\r\n    function isHostObject(object, property) {\r\n        return !!(typeof (object[property]) == 'object' && object[property]);\r\n    }\r\n\r\n    // end\r\n\r\n    // http://perfectionkills.com/instanceof-considered-harmful-or-how-to-write-a-robust-isarray/\r\n    function isArray(o) {\r\n        return Object.prototype.toString.call(o) === '[object Array]';\r\n    }\r\n\r\n    // end\r\n    function hasFlash() {\r\n        var name = \"Shockwave Flash\", mimeType = \"application/x-shockwave-flash\";\r\n\r\n        if (!undef(navigator.plugins) && typeof navigator.plugins[name] == \"object\") {\r\n            // adapted from the swfobject code\r\n            var description = navigator.plugins[name].description;\r\n            if (description && !undef(navigator.mimeTypes) && navigator.mimeTypes[mimeType] && navigator.mimeTypes[mimeType].enabledPlugin) {\r\n                flashVersion = description.match(/\\d+/g);\r\n            }\r\n        }\r\n        if (!flashVersion) {\r\n            var flash;\r\n            try {\r\n                flash = new ActiveXObject(\"ShockwaveFlash.ShockwaveFlash\");\r\n                flashVersion = Array.prototype.slice.call(flash.GetVariable(\"$version\").match(/(\\d+),(\\d+),(\\d+),(\\d+)/), 1);\r\n                flash = null;\r\n            }\r\n            catch (notSupportedException) {\r\n            }\r\n        }\r\n        if (!flashVersion) {\r\n            return false;\r\n        }\r\n        var major = parseInt(flashVersion[0], 10), minor = parseInt(flashVersion[1], 10);\r\n        HAS_FLASH_THROTTLED_BUG = major > 9 && minor > 0;\r\n        return true;\r\n    }\r\n\r\n    /*\r\n     * Cross Browser implementation for adding and removing event listeners.\r\n     */\r\n    var on, un;\r\n    if (isHostMethod(window, \"addEventListener\")) {\r\n        on = function (target, type, listener) {\r\n            target.addEventListener(type, listener, false);\r\n        };\r\n        un = function (target, type, listener) {\r\n            target.removeEventListener(type, listener, false);\r\n        };\r\n    }\r\n    else if (isHostMethod(window, \"attachEvent\")) {\r\n        on = function (object, sEvent, fpNotify) {\r\n            object.attachEvent(\"on\" + sEvent, fpNotify);\r\n        };\r\n        un = function (object, sEvent, fpNotify) {\r\n            object.detachEvent(\"on\" + sEvent, fpNotify);\r\n        };\r\n    }\r\n    else {\r\n        throw new Error(\"Browser not supported\");\r\n    }\r\n\r\n    /*\r\n     * Cross Browser implementation of DOMContentLoaded.\r\n     */\r\n    var domIsReady = false, domReadyQueue = [], readyState;\r\n    if (\"readyState\" in document) {\r\n        // If browser is WebKit-powered, check for both 'loaded' (legacy browsers) and\r\n        // 'interactive' (HTML5 specs, recent WebKit builds) states.\r\n        // https://bugs.webkit.org/show_bug.cgi?id=45119\r\n        readyState = document.readyState;\r\n        domIsReady = readyState == \"complete\" || (~navigator.userAgent.indexOf('AppleWebKit/') && (readyState == \"loaded\" || readyState == \"interactive\"));\r\n    }\r\n    else {\r\n        // If readyState is not supported in the browser, then in order to be able to fire whenReady functions apropriately\r\n        // when added dynamically _after_ DOM load, we have to deduce wether the DOM is ready or not.\r\n        // We only need a body to add elements to, so the existence of document.body is enough for us.\r\n        domIsReady = !!document.body;\r\n    }\r\n\r\n    function dom_onReady() {\r\n        if (domIsReady) {\r\n            return;\r\n        }\r\n        domIsReady = true;\r\n        for (var i = 0; i < domReadyQueue.length; i++) {\r\n            domReadyQueue[i]();\r\n        }\r\n        domReadyQueue.length = 0;\r\n    }\r\n\r\n\r\n    if (!domIsReady) {\r\n        if (isHostMethod(window, \"addEventListener\")) {\r\n            on(document, \"DOMContentLoaded\", dom_onReady);\r\n        }\r\n        else {\r\n            on(document, \"readystatechange\", function () {\r\n                if (document.readyState == \"complete\") {\r\n                    dom_onReady();\r\n                }\r\n            });\r\n            if (document.documentElement.doScroll && window === top) {\r\n                var doScrollCheck = function () {\r\n                    if (domIsReady) {\r\n                        return;\r\n                    }\r\n                    // http://javascript.nwbox.com/IEContentLoaded/\r\n                    try {\r\n                        document.documentElement.doScroll(\"left\");\r\n                    }\r\n                    catch (e) {\r\n                        setTimeout(doScrollCheck, 1);\r\n                        return;\r\n                    }\r\n                    dom_onReady();\r\n                };\r\n                doScrollCheck();\r\n            }\r\n        }\r\n\r\n        // A fallback to window.onload, that will always work\r\n        on(window, \"load\", dom_onReady);\r\n    }\r\n    /**\r\n     * This will add a function to the queue of functions to be run once the DOM reaches a ready state.\r\n     * If functions are added after this event then they will be executed immediately.\r\n     * @param {function} fn The function to add\r\n     * @param {Object} scope An optional scope for the function to be called with.\r\n     */\r\n    function whenReady(fn, scope) {\r\n        if (domIsReady) {\r\n            fn.call(scope);\r\n            return;\r\n        }\r\n        domReadyQueue.push(function () {\r\n            fn.call(scope);\r\n        });\r\n    }\r\n\r\n    /**\r\n     * Returns an instance of easyXDM from the parent window with\r\n     * respect to the namespace.\r\n     *\r\n     * @return An instance of easyXDM (in the parent window)\r\n     */\r\n    function getParentObject() {\r\n        var obj = parent;\r\n        if (namespace !== \"\") {\r\n            for (var i = 0, ii = namespace.split(\".\") ; i < ii.length; i++) {\r\n                obj = obj[ii[i]];\r\n            }\r\n        }\r\n        return obj.easyXDM;\r\n    }\r\n\r\n    /**\r\n     * Removes easyXDM variable from the global scope. It also returns control\r\n     * of the easyXDM variable to whatever code used it before.\r\n     *\r\n     * @param {String} ns A string representation of an object that will hold\r\n     *                    an instance of easyXDM.\r\n     * @return An instance of easyXDM\r\n     */\r\n    function noConflict(ns) {\r\n\r\n        window.easyXDM = _easyXDM;\r\n        namespace = ns;\r\n        if (namespace) {\r\n            IFRAME_PREFIX = \"easyXDM_\" + namespace.replace(\".\", \"_\") + \"_\";\r\n        }\r\n        return easyXDM;\r\n    }\r\n\r\n    /*\r\n     * Methods for working with URLs\r\n     */\r\n    /**\r\n     * Get the domain name from a url.\r\n     * @param {String} url The url to extract the domain from.\r\n     * @return The domain part of the url.\r\n     * @type {String}\r\n     */\r\n    function getDomainName(url) {\r\n        return url.match(reURI)[3];\r\n    }\r\n\r\n    /**\r\n     * Get the port for a given URL, or \"\" if none\r\n     * @param {String} url The url to extract the port from.\r\n     * @return The port part of the url.\r\n     * @type {String}\r\n     */\r\n    function getPort(url) {\r\n        return url.match(reURI)[4] || \"\";\r\n    }\r\n\r\n    /**\r\n     * Returns  a string containing the schema, domain and if present the port\r\n     * @param {String} url The url to extract the location from\r\n     * @return {String} The location part of the url\r\n     */\r\n    function getLocation(url) {\r\n        var m = url.toLowerCase().match(reURI);\r\n        var proto = m[2], domain = m[3], port = m[4] || \"\";\r\n        if ((proto == \"http:\" && port == \":80\") || (proto == \"https:\" && port == \":443\")) {\r\n            port = \"\";\r\n        }\r\n        return proto + \"//\" + domain + port;\r\n    }\r\n\r\n    /**\r\n     * Resolves a relative url into an absolute one.\r\n     * @param {String} url The path to resolve.\r\n     * @return {String} The resolved url.\r\n     */\r\n    function resolveUrl(url) {\r\n\r\n        // replace all // except the one in proto with /\r\n        url = url.replace(reDoubleSlash, \"$1/\");\r\n\r\n        // If the url is a valid url we do nothing\r\n        if (!url.match(/^(http||https):\\/\\//)) {\r\n            // If this is a relative path\r\n            var path = (url.substring(0, 1) === \"/\") ? \"\" : location.pathname;\r\n            if (path.substring(path.length - 1) !== \"/\") {\r\n                path = path.substring(0, path.lastIndexOf(\"/\") + 1);\r\n            }\r\n\r\n            url = location.protocol + \"//\" + location.host + path + url;\r\n        }\r\n\r\n        // reduce all 'xyz/../' to just ''\r\n        while (reParent.test(url)) {\r\n            url = url.replace(reParent, \"\");\r\n        }\r\n\r\n        return url;\r\n    }\r\n\r\n    /**\r\n     * Appends the parameters to the given url.<br/>\r\n     * The base url can contain existing query parameters.\r\n     * @param {String} url The base url.\r\n     * @param {Object} parameters The parameters to add.\r\n     * @return {String} A new valid url with the parameters appended.\r\n     */\r\n    function appendQueryParameters(url, parameters) {\r\n\r\n        var hash = \"\", indexOf = url.indexOf(\"#\");\r\n        if (indexOf !== -1) {\r\n            hash = url.substring(indexOf);\r\n            url = url.substring(0, indexOf);\r\n        }\r\n        var q = [];\r\n        for (var key in parameters) {\r\n            if (parameters.hasOwnProperty(key)) {\r\n                q.push(key + \"=\" + encodeURIComponent(parameters[key]));\r\n            }\r\n        }\r\n        return url + (useHash ? \"#\" : (url.indexOf(\"?\") == -1 ? \"?\" : \"&\")) + q.join(\"&\") + hash;\r\n    }\r\n\r\n\r\n    // build the query object either from location.query, if it contains the xdm_e argument, or from location.hash\r\n    var query = (function (input) {\r\n        input = input.substring(1).split(\"&\");\r\n        var data = {}, pair, i = input.length;\r\n        while (i--) {\r\n            pair = input[i].split(\"=\");\r\n            data[pair[0]] = decodeURIComponent(pair[1]);\r\n        }\r\n        return data;\r\n    }(/xdm_e=/.test(location.search) ? location.search : location.hash));\r\n\r\n    /*\r\n     * Helper methods\r\n     */\r\n    /**\r\n     * Helper for checking if a variable/property is undefined\r\n     * @param {Object} v The variable to test\r\n     * @return {Boolean} True if the passed variable is undefined\r\n     */\r\n    function undef(v) {\r\n        return typeof v === \"undefined\";\r\n    }\r\n\r\n    /**\r\n     * A safe implementation of HTML5 JSON. Feature testing is used to make sure the implementation works.\r\n     * @return {JSON} A valid JSON conforming object, or null if not found.\r\n     */\r\n    var getJSON = function () {\r\n        var cached = {};\r\n        var obj = {\r\n            a: [1, 2, 3]\r\n        }, json = \"{\\\"a\\\":[1,2,3]}\";\r\n\r\n        if (typeof JSON != \"undefined\" && typeof JSON.stringify === \"function\" && JSON.stringify(obj).replace((/\\s/g), \"\") === json) {\r\n            // this is a working JSON instance\r\n            return JSON;\r\n        }\r\n        if (Object.toJSON) {\r\n            if (Object.toJSON(obj).replace((/\\s/g), \"\") === json) {\r\n                // this is a working stringify method\r\n                cached.stringify = Object.toJSON;\r\n            }\r\n        }\r\n\r\n        if (typeof String.prototype.evalJSON === \"function\") {\r\n            obj = json.evalJSON();\r\n            if (obj.a && obj.a.length === 3 && obj.a[2] === 3) {\r\n                // this is a working parse method\r\n                cached.parse = function (str) {\r\n                    return str.evalJSON();\r\n                };\r\n            }\r\n        }\r\n\r\n        if (cached.stringify && cached.parse) {\r\n            // Only memoize the result if we have valid instance\r\n            getJSON = function () {\r\n                return cached;\r\n            };\r\n            return cached;\r\n        }\r\n        return null;\r\n    };\r\n\r\n    /**\r\n     * Applies properties from the source object to the target object.<br/>\r\n     * @param {Object} target The target of the properties.\r\n     * @param {Object} source The source of the properties.\r\n     * @param {Boolean} noOverwrite Set to True to only set non-existing properties.\r\n     */\r\n    function apply(destination, source, noOverwrite) {\r\n        var member;\r\n        for (var prop in source) {\r\n            if (source.hasOwnProperty(prop)) {\r\n                if (prop in destination) {\r\n                    member = source[prop];\r\n                    if (typeof member === \"object\") {\r\n                        apply(destination[prop], member, noOverwrite);\r\n                    }\r\n                    else if (!noOverwrite) {\r\n                        destination[prop] = source[prop];\r\n                    }\r\n                }\r\n                else {\r\n                    destination[prop] = source[prop];\r\n                }\r\n            }\r\n        }\r\n        return destination;\r\n    }\r\n\r\n    // This tests for the bug in IE where setting the [name] property using javascript causes the value to be redirected into [submitName].\r\n    function testForNamePropertyBug() {\r\n        var form = document.body.appendChild(document.createElement(\"form\")), input = form.appendChild(document.createElement(\"input\"));\r\n        input.name = IFRAME_PREFIX + \"TEST\" + channelId; // append channelId in order to avoid caching issues\r\n        HAS_NAME_PROPERTY_BUG = input !== form.elements[input.name];\r\n        document.body.removeChild(form);\r\n    }\r\n\r\n    /**\r\n     * Creates a frame and appends it to the DOM.\r\n     * @param config {object} This object can have the following properties\r\n     * <ul>\r\n     * <li> {object} prop The properties that should be set on the frame. This should include the 'src' property.</li>\r\n     * <li> {object} attr The attributes that should be set on the frame.</li>\r\n     * <li> {DOMElement} container Its parent element (Optional).</li>\r\n     * <li> {function} onLoad A method that should be called with the frames contentWindow as argument when the frame is fully loaded. (Optional)</li>\r\n     * </ul>\r\n     * @return The frames DOMElement\r\n     * @type DOMElement\r\n     */\r\n    function createFrame(config) {\r\n        if (undef(HAS_NAME_PROPERTY_BUG)) {\r\n            testForNamePropertyBug();\r\n        }\r\n        var frame;\r\n        // This is to work around the problems in IE6/7 with setting the name property.\r\n        // Internally this is set as 'submitName' instead when using 'iframe.name = ...'\r\n        // This is not required by easyXDM itself, but is to facilitate other use cases\r\n        if (HAS_NAME_PROPERTY_BUG) {\r\n            frame = document.createElement(\"<iframe name=\\\"\" + config.props.name + \"\\\"/>\");\r\n        }\r\n        else {\r\n            frame = document.createElement(\"IFRAME\");\r\n            frame.name = config.props.name;\r\n        }\r\n\r\n        frame.id = frame.name = config.props.name;\r\n        delete config.props.name;\r\n\r\n        if (typeof config.container == \"string\") {\r\n            config.container = document.getElementById(config.container);\r\n        }\r\n\r\n        if (!config.container) {\r\n            // This needs to be hidden like this, simply setting display:none and the like will cause failures in some browsers.\r\n            apply(frame.style, {\r\n                position: \"absolute\",\r\n                top: \"-2000px\",\r\n                // Avoid potential horizontal scrollbar\r\n                left: \"0px\"\r\n            });\r\n            config.container = document.body;\r\n        }\r\n\r\n        // HACK: IE cannot have the src attribute set when the frame is appended\r\n        //       into the container, so we set it to \"javascript:false\" as a\r\n        //       placeholder for now.  If we left the src undefined, it would\r\n        //       instead default to \"about:blank\", which causes SSL mixed-content\r\n        //       warnings in IE6 when on an SSL parent page.\r\n        var src = config.props.src;\r\n        config.props.src = \"javascript:false\";\r\n\r\n        // transfer properties to the frame\r\n        apply(frame, config.props);\r\n\r\n        frame.border = frame.frameBorder = 0;\r\n        frame.allowTransparency = true;\r\n        config.container.appendChild(frame);\r\n\r\n        if (config.onLoad) {\r\n            on(frame, \"load\", config.onLoad);\r\n        }\r\n\r\n        // set the frame URL to the proper value (we previously set it to\r\n        // \"javascript:false\" to work around the IE issue mentioned above)\r\n        if (config.usePost) {\r\n            var form = config.container.appendChild(document.createElement('form')), input;\r\n            form.target = frame.name;\r\n            form.action = src;\r\n            form.method = 'POST';\r\n            if (typeof (config.usePost) === 'object') {\r\n                for (var i in config.usePost) {\r\n                    if (config.usePost.hasOwnProperty(i)) {\r\n                        if (HAS_NAME_PROPERTY_BUG) {\r\n                            input = document.createElement('<input name=\"' + i + '\"/>');\r\n                        } else {\r\n                            input = document.createElement(\"INPUT\");\r\n                            input.name = i;\r\n                        }\r\n                        input.value = config.usePost[i];\r\n                        form.appendChild(input);\r\n                    }\r\n                }\r\n            }\r\n            form.submit();\r\n            form.parentNode.removeChild(form);\r\n        } else {\r\n            frame.src = src;\r\n        }\r\n        config.props.src = src;\r\n\r\n        return frame;\r\n    }\r\n\r\n    /**\r\n     * Check whether a domain is allowed using an Access Control List.\r\n     * The ACL can contain * and ? as wildcards, or can be regular expressions.\r\n     * If regular expressions they need to begin with ^ and end with $.\r\n     * @param {Array/String} acl The list of allowed domains\r\n     * @param {String} domain The domain to test.\r\n     * @return {Boolean} True if the domain is allowed, false if not.\r\n     */\r\n    function checkAcl(acl, domain) {\r\n        // normalize into an array\r\n        if (typeof acl == \"string\") {\r\n            acl = [acl];\r\n        }\r\n        var re, i = acl.length;\r\n        while (i--) {\r\n            re = acl[i];\r\n            re = new RegExp(re.substr(0, 1) == \"^\" ? re : (\"^\" + re.replace(/(\\*)/g, \".$1\").replace(/\\?/g, \".\") + \"$\"));\r\n            if (re.test(domain)) {\r\n                return true;\r\n            }\r\n        }\r\n        return false;\r\n    }\r\n\r\n    /*\r\n     * Functions related to stacks\r\n     */\r\n    /**\r\n     * Prepares an array of stack-elements suitable for the current configuration\r\n     * @param {Object} config The Transports configuration. See easyXDM.Socket for more.\r\n     * @return {Array} An array of stack-elements with the TransportElement at index 0.\r\n     */\r\n    function prepareTransportStack(config) {\r\n        var protocol = config.protocol, stackEls;\r\n        config.isHost = config.isHost || undef(query.xdm_p);\r\n        useHash = config.hash || false;\r\n\r\n        if (!config.props) {\r\n            config.props = {};\r\n        }\r\n        if (!config.isHost) {\r\n            config.channel = query.xdm_c.replace(/[\"'<>\\\\]/g, \"\");\r\n            config.secret = query.xdm_s;\r\n            config.remote = query.xdm_e.replace(/[\"'<>\\\\]/g, \"\");\r\n            ;\r\n            protocol = query.xdm_p;\r\n            if (config.acl && !checkAcl(config.acl, config.remote)) {\r\n                throw new Error(\"Access denied for \" + config.remote);\r\n            }\r\n        }\r\n        else {\r\n            config.remote = resolveUrl(config.remote);\r\n            config.channel = config.channel || \"default\" + channelId++;\r\n            config.secret = Math.random().toString(16).substring(2);\r\n            if (undef(protocol)) {\r\n                if (getLocation(location.href) == getLocation(config.remote)) {\r\n                    /*\r\n                     * Both documents has the same origin, lets use direct access.\r\n                     */\r\n                    protocol = \"4\";\r\n                }\r\n                else if (isHostMethod(window, \"postMessage\") || isHostMethod(document, \"postMessage\")) {\r\n                    /*\r\n                     * This is supported in IE8+, Firefox 3+, Opera 9+, Chrome 2+ and Safari 4+\r\n                     */\r\n                    protocol = \"1\";\r\n                }\r\n                else if (config.swf && isHostMethod(window, \"ActiveXObject\") && hasFlash()) {\r\n                    /*\r\n                     * The Flash transport superseedes the NixTransport as the NixTransport has been blocked by MS\r\n                     */\r\n                    protocol = \"6\";\r\n                }\r\n                else if (navigator.product === \"Gecko\" && \"frameElement\" in window && navigator.userAgent.indexOf('WebKit') == -1) {\r\n                    /*\r\n                     * This is supported in Gecko (Firefox 1+)\r\n                     */\r\n                    protocol = \"5\";\r\n                }\r\n                else if (config.remoteHelper) {\r\n                    /*\r\n                     * This is supported in all browsers that retains the value of window.name when\r\n                     * navigating from one domain to another, and where parent.frames[foo] can be used\r\n                     * to get access to a frame from the same domain\r\n                     */\r\n                    protocol = \"2\";\r\n                }\r\n                else {\r\n                    /*\r\n                     * This is supported in all browsers where [window].location is writable for all\r\n                     * The resize event will be used if resize is supported and the iframe is not put\r\n                     * into a container, else polling will be used.\r\n                     */\r\n                    protocol = \"0\";\r\n                }\r\n            }\r\n        }\r\n        config.protocol = protocol; // for conditional branching\r\n        switch (protocol) {\r\n            case \"0\":// 0 = HashTransport\r\n                apply(config, {\r\n                    interval: 100,\r\n                    delay: 2000,\r\n                    useResize: true,\r\n                    useParent: false,\r\n                    usePolling: false\r\n                }, true);\r\n                if (config.isHost) {\r\n                    if (!config.local) {\r\n                        // If no local is set then we need to find an image hosted on the current domain\r\n                        var domain = location.protocol + \"//\" + location.host, images = document.body.getElementsByTagName(\"img\"), image;\r\n                        var i = images.length;\r\n                        while (i--) {\r\n                            image = images[i];\r\n                            if (image.src.substring(0, domain.length) === domain) {\r\n                                config.local = image.src;\r\n                                break;\r\n                            }\r\n                        }\r\n                        if (!config.local) {\r\n                            // If no local was set, and we are unable to find a suitable file, then we resort to using the current window\r\n                            config.local = window;\r\n                        }\r\n                    }\r\n\r\n                    var parameters = {\r\n                        xdm_c: config.channel,\r\n                        xdm_p: 0\r\n                    };\r\n\r\n                    if (config.local === window) {\r\n                        // We are using the current window to listen to\r\n                        config.usePolling = true;\r\n                        config.useParent = true;\r\n                        config.local = location.protocol + \"//\" + location.host + location.pathname + location.search;\r\n                        parameters.xdm_e = config.local;\r\n                        parameters.xdm_pa = 1; // use parent\r\n                    }\r\n                    else {\r\n                        parameters.xdm_e = resolveUrl(config.local);\r\n                    }\r\n\r\n                    if (config.container) {\r\n                        config.useResize = false;\r\n                        parameters.xdm_po = 1; // use polling\r\n                    }\r\n                    config.remote = appendQueryParameters(config.remote, parameters);\r\n                }\r\n                else {\r\n                    apply(config, {\r\n                        channel: query.xdm_c,\r\n                        remote: query.xdm_e,\r\n                        useParent: !undef(query.xdm_pa),\r\n                        usePolling: !undef(query.xdm_po),\r\n                        useResize: config.useParent ? false : config.useResize\r\n                    });\r\n                }\r\n                stackEls = [new easyXDM.stack.HashTransport(config), new easyXDM.stack.ReliableBehavior({}), new easyXDM.stack.QueueBehavior({\r\n                    encode: true,\r\n                    maxLength: 4000 - config.remote.length\r\n                }), new easyXDM.stack.VerifyBehavior({\r\n                    initiate: config.isHost\r\n                })];\r\n                break;\r\n            case \"1\":\r\n                stackEls = [new easyXDM.stack.PostMessageTransport(config)];\r\n                break;\r\n            case \"2\":\r\n                if (config.isHost) {\r\n                    config.remoteHelper = resolveUrl(config.remoteHelper);\r\n                }\r\n                stackEls = [new easyXDM.stack.NameTransport(config), new easyXDM.stack.QueueBehavior(), new easyXDM.stack.VerifyBehavior({\r\n                    initiate: config.isHost\r\n                })];\r\n                break;\r\n            case \"3\":\r\n                stackEls = [new easyXDM.stack.NixTransport(config)];\r\n                break;\r\n            case \"4\":\r\n                stackEls = [new easyXDM.stack.SameOriginTransport(config)];\r\n                break;\r\n            case \"5\":\r\n                stackEls = [new easyXDM.stack.FrameElementTransport(config)];\r\n                break;\r\n            case \"6\":\r\n                if (!flashVersion) {\r\n                    hasFlash();\r\n                }\r\n                stackEls = [new easyXDM.stack.FlashTransport(config)];\r\n                break;\r\n        }\r\n        // this behavior is responsible for buffering outgoing messages, and for performing lazy initialization\r\n        stackEls.push(new easyXDM.stack.QueueBehavior({\r\n            lazy: config.lazy,\r\n            remove: true\r\n        }));\r\n        return stackEls;\r\n    }\r\n\r\n    /**\r\n     * Chains all the separate stack elements into a single usable stack.<br/>\r\n     * If an element is missing a necessary method then it will have a pass-through method applied.\r\n     * @param {Array} stackElements An array of stack elements to be linked.\r\n     * @return {easyXDM.stack.StackElement} The last element in the chain.\r\n     */\r\n    function chainStack(stackElements) {\r\n        var stackEl, defaults = {\r\n            incoming: function (message, origin) {\r\n                this.up.incoming(message, origin);\r\n            },\r\n            outgoing: function (message, recipient) {\r\n                this.down.outgoing(message, recipient);\r\n            },\r\n            callback: function (success) {\r\n                this.up.callback(success);\r\n            },\r\n            init: function () {\r\n                this.down.init();\r\n            },\r\n            destroy: function () {\r\n                this.down.destroy();\r\n            }\r\n        };\r\n        for (var i = 0, len = stackElements.length; i < len; i++) {\r\n            stackEl = stackElements[i];\r\n            apply(stackEl, defaults, true);\r\n            if (i !== 0) {\r\n                stackEl.down = stackElements[i - 1];\r\n            }\r\n            if (i !== len - 1) {\r\n                stackEl.up = stackElements[i + 1];\r\n            }\r\n        }\r\n        return stackEl;\r\n    }\r\n\r\n    /**\r\n     * This will remove a stackelement from its stack while leaving the stack functional.\r\n     * @param {Object} element The elment to remove from the stack.\r\n     */\r\n    function removeFromStack(element) {\r\n        element.up.down = element.down;\r\n        element.down.up = element.up;\r\n        element.up = element.down = null;\r\n    }\r\n\r\n    /*\r\n     * Export the main object and any other methods applicable\r\n     */\r\n    /**\r\n     * @class easyXDM\r\n     * A javascript library providing cross-browser, cross-domain messaging/RPC.\r\n     * @version 2.4.19.3\r\n     * @singleton\r\n     */\r\n    apply(easyXDM, {\r\n        /**\r\n         * The version of the library\r\n         * @type {string}\r\n         */\r\n        version: \"2.4.19.3\",\r\n        /**\r\n         * This is a map containing all the query parameters passed to the document.\r\n         * All the values has been decoded using decodeURIComponent.\r\n         * @type {object}\r\n         */\r\n        query: query,\r\n        /**\r\n         * @private\r\n         */\r\n        stack: {},\r\n        /**\r\n         * Applies properties from the source object to the target object.<br/>\r\n         * @param {object} target The target of the properties.\r\n         * @param {object} source The source of the properties.\r\n         * @param {boolean} noOverwrite Set to True to only set non-existing properties.\r\n         */\r\n        apply: apply,\r\n\r\n        /**\r\n         * A safe implementation of HTML5 JSON. Feature testing is used to make sure the implementation works.\r\n         * @return {JSON} A valid JSON conforming object, or null if not found.\r\n         */\r\n        getJSONObject: getJSON,\r\n        /**\r\n         * This will add a function to the queue of functions to be run once the DOM reaches a ready state.\r\n         * If functions are added after this event then they will be executed immediately.\r\n         * @param {function} fn The function to add\r\n         * @param {object} scope An optional scope for the function to be called with.\r\n         */\r\n        whenReady: whenReady,\r\n        /**\r\n         * Removes easyXDM variable from the global scope. It also returns control\r\n         * of the easyXDM variable to whatever code used it before.\r\n         *\r\n         * @param {String} ns A string representation of an object that will hold\r\n         *                    an instance of easyXDM.\r\n         * @return An instance of easyXDM\r\n         */\r\n        noConflict: noConflict\r\n    });\r\n\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global console, _FirebugCommandLine,  easyXDM, window, escape, unescape, isHostObject, undef, _trace, domIsReady, emptyFn, namespace */\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, isHostObject, isHostMethod, un, on, createFrame, debug */\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.DomHelper\r\n     * Contains methods for dealing with the DOM\r\n     * @singleton\r\n     */\r\n    easyXDM.DomHelper = {\r\n        /**\r\n         * Provides a consistent interface for adding eventhandlers\r\n         * @param {Object} target The target to add the event to\r\n         * @param {String} type The name of the event\r\n         * @param {Function} listener The listener\r\n         */\r\n        on: on,\r\n        /**\r\n         * Provides a consistent interface for removing eventhandlers\r\n         * @param {Object} target The target to remove the event from\r\n         * @param {String} type The name of the event\r\n         * @param {Function} listener The listener\r\n         */\r\n        un: un,\r\n        /**\r\n         * Checks for the presence of the JSON object.\r\n         * If it is not present it will use the supplied path to load the JSON2 library.\r\n         * This should be called in the documents head right after the easyXDM script tag.\r\n         * http://json.org/json2.js\r\n         * @param {String} path A valid path to json2.js\r\n         */\r\n        requiresJSON: function (path) {\r\n            if (!isHostObject(window, \"JSON\")) {\r\n                // we need to encode the < in order to avoid an illegal token error\r\n                // when the script is inlined in a document.\r\n                document.write('<' + 'script type=\"text/javascript\" src=\"' + path + '\"><' + '/script>');\r\n            }\r\n        }\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, debug */\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    (function () {\r\n        // The map containing the stored functions\r\n        var _map = {};\r\n\r\n        /**\r\n         * @class easyXDM.Fn\r\n         * This contains methods related to function handling, such as storing callbacks.\r\n         * @singleton\r\n         * @namespace easyXDM\r\n         */\r\n        easyXDM.Fn = {\r\n            /**\r\n             * Stores a function using the given name for reference\r\n             * @param {String} name The name that the function should be referred by\r\n             * @param {Function} fn The function to store\r\n             * @namespace easyXDM.fn\r\n             */\r\n            set: function (name, fn) {\r\n                _map[name] = fn;\r\n            },\r\n            /**\r\n             * Retrieves the function referred to by the given name\r\n             * @param {String} name The name of the function to retrieve\r\n             * @param {Boolean} del If the function should be deleted after retrieval\r\n             * @return {Function} The stored function\r\n             * @namespace easyXDM.fn\r\n             */\r\n            get: function (name, del) {\r\n                if (!_map.hasOwnProperty(name)) {\r\n                    return;\r\n                }\r\n                var fn = _map[name];\r\n\r\n                if (del) {\r\n                    delete _map[name];\r\n                }\r\n                return fn;\r\n            }\r\n        };\r\n\r\n    }());\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, chainStack, prepareTransportStack, getLocation, debug */\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.Socket\r\n     * This class creates a transport channel between two domains that is usable for sending and receiving string-based messages.<br/>\r\n     * The channel is reliable, supports queueing, and ensures that the message originates from the expected domain.<br/>\r\n     * Internally different stacks will be used depending on the browsers features and the available parameters.\r\n     * <h2>How to set up</h2>\r\n     * Setting up the provider:\r\n     * <pre><code>\r\n     * var socket = new easyXDM.Socket({\r\n * &nbsp; local: \"name.html\",\r\n * &nbsp; onReady: function(){\r\n * &nbsp; &nbsp; &#47;&#47; you need to wait for the onReady callback before using the socket\r\n * &nbsp; &nbsp; socket.postMessage(\"foo-message\");\r\n * &nbsp; },\r\n * &nbsp; onMessage: function(message, origin) {\r\n * &nbsp;&nbsp; alert(\"received \" + message + \" from \" + origin);\r\n * &nbsp; }\r\n * });\r\n     * </code></pre>\r\n     * Setting up the consumer:\r\n     * <pre><code>\r\n     * var socket = new easyXDM.Socket({\r\n * &nbsp; remote: \"http:&#47;&#47;remotedomain/page.html\",\r\n * &nbsp; remoteHelper: \"http:&#47;&#47;remotedomain/name.html\",\r\n * &nbsp; onReady: function(){\r\n * &nbsp; &nbsp; &#47;&#47; you need to wait for the onReady callback before using the socket\r\n * &nbsp; &nbsp; socket.postMessage(\"foo-message\");\r\n * &nbsp; },\r\n * &nbsp; onMessage: function(message, origin) {\r\n * &nbsp;&nbsp; alert(\"received \" + message + \" from \" + origin);\r\n * &nbsp; }\r\n * });\r\n     * </code></pre>\r\n     * If you are unable to upload the <code>name.html</code> file to the consumers domain then remove the <code>remoteHelper</code> property\r\n     * and easyXDM will fall back to using the HashTransport instead of the NameTransport when not able to use any of the primary transports.\r\n     * @namespace easyXDM\r\n     * @constructor\r\n     * @cfg {String/Window} local The url to the local name.html document, a local static file, or a reference to the local window.\r\n     * @cfg {Boolean} lazy (Consumer only) Set this to true if you want easyXDM to defer creating the transport until really needed.\r\n     * @cfg {String} remote (Consumer only) The url to the providers document.\r\n     * @cfg {String} remoteHelper (Consumer only) The url to the remote name.html file. This is to support NameTransport as a fallback. Optional.\r\n     * @cfg {Number} delay The number of milliseconds easyXDM should try to get a reference to the local window.  Optional, defaults to 2000.\r\n     * @cfg {Number} interval The interval used when polling for messages. Optional, defaults to 300.\r\n     * @cfg {String} channel (Consumer only) The name of the channel to use. Can be used to set consistent iframe names. Must be unique. Optional.\r\n     * @cfg {Function} onMessage The method that should handle incoming messages.<br/> This method should accept two arguments, the message as a string, and the origin as a string. Optional.\r\n     * @cfg {Function} onReady A method that should be called when the transport is ready. Optional.\r\n     * @cfg {DOMElement|String} container (Consumer only) The element, or the id of the element that the primary iframe should be inserted into. If not set then the iframe will be positioned off-screen. Optional.\r\n     * @cfg {Array/String} acl (Provider only) Here you can specify which '[protocol]://[domain]' patterns that should be allowed to act as the consumer towards this provider.<br/>\r\n     * This can contain the wildcards ? and *.  Examples are 'http://example.com', '*.foo.com' and '*dom?.com'. If you want to use reqular expressions then you pattern needs to start with ^ and end with $.\r\n     * If none of the patterns match an Error will be thrown.\r\n     * @cfg {Object} props (Consumer only) Additional properties that should be applied to the iframe. This can also contain nested objects e.g: <code>{style:{width:\"100px\", height:\"100px\"}}</code>.\r\n     * Properties such as 'name' and 'src' will be overrided. Optional.\r\n     */\r\n    easyXDM.Socket = function (config) {\r\n\r\n        // create the stack\r\n        var stack = chainStack(prepareTransportStack(config).concat([{\r\n            incoming: function (message, origin) {\r\n                config.onMessage(message, origin);\r\n            },\r\n            callback: function (success) {\r\n                if (config.onReady) {\r\n                    config.onReady(success);\r\n                }\r\n            }\r\n        }])), recipient = getLocation(config.remote);\r\n\r\n        // set the origin\r\n        this.origin = getLocation(config.remote);\r\n\r\n        /**\r\n         * Initiates the destruction of the stack.\r\n         */\r\n        this.destroy = function () {\r\n            stack.destroy();\r\n        };\r\n\r\n        /**\r\n         * Posts a message to the remote end of the channel\r\n         * @param {String} message The message to send\r\n         */\r\n        this.postMessage = function (message) {\r\n            stack.outgoing(message, recipient);\r\n        };\r\n\r\n        stack.init();\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, undef,, chainStack, prepareTransportStack, debug, getLocation */\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.Rpc\r\n     * Creates a proxy object that can be used to call methods implemented on the remote end of the channel, and also to provide the implementation\r\n     * of methods to be called from the remote end.<br/>\r\n     * The instantiated object will have methods matching those specified in <code>config.remote</code>.<br/>\r\n     * This requires the JSON object present in the document, either natively, using json.org's json2 or as a wrapper around library spesific methods.\r\n     * <h2>How to set up</h2>\r\n     * <pre><code>\r\n     * var rpc = new easyXDM.Rpc({\r\n * &nbsp; &#47;&#47; this configuration is equal to that used by the Socket.\r\n * &nbsp; remote: \"http:&#47;&#47;remotedomain/...\",\r\n * &nbsp; onReady: function(){\r\n * &nbsp; &nbsp; &#47;&#47; you need to wait for the onReady callback before using the proxy\r\n * &nbsp; &nbsp; rpc.foo(...\r\n * &nbsp; }\r\n * },{\r\n * &nbsp; local: {..},\r\n * &nbsp; remote: {..}\r\n * });\r\n     * </code></pre>\r\n     *\r\n     * <h2>Exposing functions (procedures)</h2>\r\n     * <pre><code>\r\n     * var rpc = new easyXDM.Rpc({\r\n * &nbsp; ...\r\n * },{\r\n * &nbsp; local: {\r\n * &nbsp; &nbsp; nameOfMethod: {\r\n * &nbsp; &nbsp; &nbsp; method: function(arg1, arg2, success, error){\r\n * &nbsp; &nbsp; &nbsp; &nbsp; ...\r\n * &nbsp; &nbsp; &nbsp; }\r\n * &nbsp; &nbsp; },\r\n * &nbsp; &nbsp; &#47;&#47; with shorthand notation\r\n * &nbsp; &nbsp; nameOfAnotherMethod:  function(arg1, arg2, success, error){\r\n * &nbsp; &nbsp; }\r\n * &nbsp; },\r\n * &nbsp; remote: {...}\r\n * });\r\n     * </code></pre>\r\n\r\n     * The function referenced by  [method] will receive the passed arguments followed by the callback functions <code>success</code> and <code>error</code>.<br/>\r\n     * To send a successfull result back you can use\r\n     *     <pre><code>\r\n     *     return foo;\r\n     *     </pre></code>\r\n     * or\r\n     *     <pre><code>\r\n     *     success(foo);\r\n     *     </pre></code>\r\n     *  To return an error you can use\r\n     *     <pre><code>\r\n     *     throw new Error(\"foo error\");\r\n     *     </code></pre>\r\n     * or\r\n     *     <pre><code>\r\n     *     error(\"foo error\");\r\n     *     </code></pre>\r\n     *\r\n     * <h2>Defining remotely exposed methods (procedures/notifications)</h2>\r\n     * The definition of the remote end is quite similar:\r\n     * <pre><code>\r\n     * var rpc = new easyXDM.Rpc({\r\n * &nbsp; ...\r\n * },{\r\n * &nbsp; local: {...},\r\n * &nbsp; remote: {\r\n * &nbsp; &nbsp; nameOfMethod: {}\r\n * &nbsp; }\r\n * });\r\n     * </code></pre>\r\n     * To call a remote method use\r\n     * <pre><code>\r\n     * rpc.nameOfMethod(\"arg1\", \"arg2\", function(value) {\r\n * &nbsp; alert(\"success: \" + value);\r\n * }, function(message) {\r\n * &nbsp; alert(\"error: \" + message + );\r\n * });\r\n     * </code></pre>\r\n     * Both the <code>success</code> and <code>errror</code> callbacks are optional.<br/>\r\n     * When called with no callback a JSON-RPC 2.0 notification will be executed.\r\n     * Be aware that you will not be notified of any errors with this method.\r\n     * <br/>\r\n     * <h2>Specifying a custom serializer</h2>\r\n     * If you do not want to use the JSON2 library for non-native JSON support, but instead capabilities provided by some other library\r\n     * then you can specify a custom serializer using <code>serializer: foo</code>\r\n     * <pre><code>\r\n     * var rpc = new easyXDM.Rpc({\r\n * &nbsp; ...\r\n * },{\r\n * &nbsp; local: {...},\r\n * &nbsp; remote: {...},\r\n * &nbsp; serializer : {\r\n * &nbsp; &nbsp; parse: function(string){ ... },\r\n * &nbsp; &nbsp; stringify: function(object) {...}\r\n * &nbsp; }\r\n * });\r\n     * </code></pre>\r\n     * If <code>serializer</code> is set then the class will not attempt to use the native implementation.\r\n     * @namespace easyXDM\r\n     * @constructor\r\n     * @param {Object} config The underlying transports configuration. See easyXDM.Socket for available parameters.\r\n     * @param {Object} jsonRpcConfig The description of the interface to implement.\r\n     */\r\n    easyXDM.Rpc = function (config, jsonRpcConfig) {\r\n\r\n        // expand shorthand notation\r\n        if (jsonRpcConfig.local) {\r\n            for (var method in jsonRpcConfig.local) {\r\n                if (jsonRpcConfig.local.hasOwnProperty(method)) {\r\n                    var member = jsonRpcConfig.local[method];\r\n                    if (typeof member === \"function\") {\r\n                        jsonRpcConfig.local[method] = {\r\n                            method: member\r\n                        };\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        // create the stack\r\n        var stack = chainStack(prepareTransportStack(config).concat([new easyXDM.stack.RpcBehavior(this, jsonRpcConfig), {\r\n            callback: function (success) {\r\n                if (config.onReady) {\r\n                    config.onReady(success);\r\n                }\r\n            }\r\n        }]));\r\n\r\n        // set the origin\r\n        this.origin = getLocation(config.remote);\r\n\r\n\r\n        /**\r\n         * Initiates the destruction of the stack.\r\n         */\r\n        this.destroy = function () {\r\n            stack.destroy();\r\n        };\r\n\r\n        stack.init();\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, getLocation, appendQueryParameters, createFrame, debug, un, on, apply, whenReady, getParentObject, IFRAME_PREFIX*/\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.stack.SameOriginTransport\r\n     * SameOriginTransport is a transport class that can be used when both domains have the same origin.<br/>\r\n     * This can be useful for testing and for when the main application supports both internal and external sources.\r\n     * @namespace easyXDM.stack\r\n     * @constructor\r\n     * @param {Object} config The transports configuration.\r\n     * @cfg {String} remote The remote document to communicate with.\r\n     */\r\n    easyXDM.stack.SameOriginTransport = function (config) {\r\n        var pub, frame, send, targetOrigin;\r\n\r\n        return (pub = {\r\n            outgoing: function (message, domain, fn) {\r\n                send(message);\r\n                if (fn) {\r\n                    fn();\r\n                }\r\n            },\r\n            destroy: function () {\r\n                if (frame) {\r\n                    frame.parentNode.removeChild(frame);\r\n                    frame = null;\r\n                }\r\n            },\r\n            onDOMReady: function () {\r\n                targetOrigin = getLocation(config.remote);\r\n\r\n                if (config.isHost) {\r\n                    // set up the iframe\r\n                    apply(config.props, {\r\n                        src: appendQueryParameters(config.remote, {\r\n                            xdm_e: location.protocol + \"//\" + location.host + location.pathname,\r\n                            xdm_c: config.channel,\r\n                            xdm_p: 4 // 4 = SameOriginTransport\r\n                        }),\r\n                        name: IFRAME_PREFIX + config.channel + \"_provider\"\r\n                    });\r\n                    frame = createFrame(config);\r\n                    easyXDM.Fn.set(config.channel, function (sendFn) {\r\n                        send = sendFn;\r\n                        setTimeout(function () {\r\n                            pub.up.callback(true);\r\n                        }, 0);\r\n                        return function (msg) {\r\n                            pub.up.incoming(msg, targetOrigin);\r\n                        };\r\n                    });\r\n                }\r\n                else {\r\n                    send = getParentObject().Fn.get(config.channel, true)(function (msg) {\r\n                        pub.up.incoming(msg, targetOrigin);\r\n                    });\r\n                    setTimeout(function () {\r\n                        pub.up.callback(true);\r\n                    }, 0);\r\n                }\r\n            },\r\n            init: function () {\r\n                whenReady(pub.onDOMReady, pub);\r\n            }\r\n        });\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global global, easyXDM, window, getLocation, appendQueryParameters, createFrame, debug, apply, whenReady, IFRAME_PREFIX, namespace, resolveUrl, getDomainName, HAS_FLASH_THROTTLED_BUG, getPort, query*/\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.stack.FlashTransport\r\n     * FlashTransport is a transport class that uses an SWF with LocalConnection to pass messages back and forth.\r\n     * @namespace easyXDM.stack\r\n     * @constructor\r\n     * @param {Object} config The transports configuration.\r\n     * @cfg {String} remote The remote domain to communicate with.\r\n     * @cfg {String} secret the pre-shared secret used to secure the communication.\r\n     * @cfg {String} swf The path to the swf file\r\n     * @cfg {Boolean} swfNoThrottle Set this to true if you want to take steps to avoid beeing throttled when hidden.\r\n     * @cfg {String || DOMElement} swfContainer Set this if you want to control where the swf is placed\r\n     */\r\n    easyXDM.stack.FlashTransport = function (config) {\r\n        var pub, // the public interface\r\n            frame, send, targetOrigin, swf, swfContainer;\r\n\r\n        function onMessage(message, origin) {\r\n            setTimeout(function () {\r\n                pub.up.incoming(message, targetOrigin);\r\n            }, 0);\r\n        }\r\n\r\n        /**\r\n         * This method adds the SWF to the DOM and prepares the initialization of the channel\r\n         */\r\n        function addSwf(domain) {\r\n            // the differentiating query argument is needed in Flash9 to avoid a caching issue where LocalConnection would throw an error.\r\n            var url = config.swf + \"?host=\" + config.isHost;\r\n            var id = \"easyXDM_swf_\" + Math.floor(Math.random() * 10000);\r\n\r\n            // prepare the init function that will fire once the swf is ready\r\n            easyXDM.Fn.set(\"flash_loaded\" + domain.replace(/[\\-.]/g, \"_\"), function () {\r\n                easyXDM.stack.FlashTransport[domain].swf = swf = swfContainer.firstChild;\r\n                var queue = easyXDM.stack.FlashTransport[domain].queue;\r\n                for (var i = 0; i < queue.length; i++) {\r\n                    queue[i]();\r\n                }\r\n                queue.length = 0;\r\n            });\r\n\r\n            if (config.swfContainer) {\r\n                swfContainer = (typeof config.swfContainer == \"string\") ? document.getElementById(config.swfContainer) : config.swfContainer;\r\n            }\r\n            else {\r\n                // create the container that will hold the swf\r\n                swfContainer = document.createElement('div');\r\n\r\n                // http://bugs.adobe.com/jira/browse/FP-4796\r\n                // http://tech.groups.yahoo.com/group/flexcoders/message/162365\r\n                // https://groups.google.com/forum/#!topic/easyxdm/mJZJhWagoLc\r\n                apply(swfContainer.style, HAS_FLASH_THROTTLED_BUG && config.swfNoThrottle ? {\r\n                    height: \"20px\",\r\n                    width: \"20px\",\r\n                    position: \"fixed\",\r\n                    right: 0,\r\n                    top: 0\r\n                } : {\r\n                    height: \"1px\",\r\n                    width: \"1px\",\r\n                    position: \"absolute\",\r\n                    overflow: \"hidden\",\r\n                    right: 0,\r\n                    top: 0\r\n                });\r\n                document.body.appendChild(swfContainer);\r\n            }\r\n\r\n            // create the object/embed\r\n            var flashVars = \"callback=flash_loaded\" + encodeURIComponent(domain.replace(/[\\-.]/g, \"_\"))\r\n                + \"&proto=\" + global.location.protocol\r\n                + \"&domain=\" + encodeURIComponent(getDomainName(global.location.href))\r\n                + \"&port=\" + encodeURIComponent(getPort(global.location.href))\r\n                + \"&ns=\" + encodeURIComponent(namespace);\r\n            swfContainer.innerHTML = \"<object height='20' width='20' type='application/x-shockwave-flash' id='\" + id + \"' data='\" + url + \"'>\" +\r\n                \"<param name='allowScriptAccess' value='always'></param>\" +\r\n                \"<param name='wmode' value='transparent'>\" +\r\n                \"<param name='movie' value='\" +\r\n                url +\r\n                \"'></param>\" +\r\n                \"<param name='flashvars' value='\" +\r\n                flashVars +\r\n                \"'></param>\" +\r\n                \"<embed type='application/x-shockwave-flash' FlashVars='\" +\r\n                flashVars +\r\n                \"' allowScriptAccess='always' wmode='transparent' src='\" +\r\n                url +\r\n                \"' height='1' width='1'></embed>\" +\r\n                \"</object>\";\r\n        }\r\n\r\n        return (pub = {\r\n            outgoing: function (message, domain, fn) {\r\n                swf.postMessage(config.channel, message.toString());\r\n                if (fn) {\r\n                    fn();\r\n                }\r\n            },\r\n            destroy: function () {\r\n                try {\r\n                    swf.destroyChannel(config.channel);\r\n                }\r\n                catch (e) {\r\n                }\r\n                swf = null;\r\n                if (frame) {\r\n                    frame.parentNode.removeChild(frame);\r\n                    frame = null;\r\n                }\r\n            },\r\n            onDOMReady: function () {\r\n\r\n                targetOrigin = config.remote;\r\n\r\n                // Prepare the code that will be run after the swf has been intialized\r\n                easyXDM.Fn.set(\"flash_\" + config.channel + \"_init\", function () {\r\n                    setTimeout(function () {\r\n                        pub.up.callback(true);\r\n                    });\r\n                });\r\n\r\n                // set up the omMessage handler\r\n                easyXDM.Fn.set(\"flash_\" + config.channel + \"_onMessage\", onMessage);\r\n\r\n                config.swf = resolveUrl(config.swf); // reports have been made of requests gone rogue when using relative paths\r\n                var swfdomain = getDomainName(config.swf);\r\n                var fn = function () {\r\n                    // set init to true in case the fn was called was invoked from a separate instance\r\n                    easyXDM.stack.FlashTransport[swfdomain].init = true;\r\n                    swf = easyXDM.stack.FlashTransport[swfdomain].swf;\r\n                    // create the channel\r\n                    swf.createChannel(config.channel, config.secret, getLocation(config.remote), config.isHost);\r\n\r\n                    if (config.isHost) {\r\n                        // if Flash is going to be throttled and we want to avoid this\r\n                        if (HAS_FLASH_THROTTLED_BUG && config.swfNoThrottle) {\r\n                            apply(config.props, {\r\n                                position: \"fixed\",\r\n                                right: 0,\r\n                                top: 0,\r\n                                height: \"20px\",\r\n                                width: \"20px\"\r\n                            });\r\n                        }\r\n                        // set up the iframe\r\n                        apply(config.props, {\r\n                            src: appendQueryParameters(config.remote, {\r\n                                xdm_e: getLocation(location.href),\r\n                                xdm_c: config.channel,\r\n                                xdm_p: 6, // 6 = FlashTransport\r\n                                xdm_s: config.secret\r\n                            }),\r\n                            name: IFRAME_PREFIX + config.channel + \"_provider\"\r\n                        });\r\n                        frame = createFrame(config);\r\n                    }\r\n                };\r\n\r\n                if (easyXDM.stack.FlashTransport[swfdomain] && easyXDM.stack.FlashTransport[swfdomain].init) {\r\n                    // if the swf is in place and we are the consumer\r\n                    fn();\r\n                }\r\n                else {\r\n                    // if the swf does not yet exist\r\n                    if (!easyXDM.stack.FlashTransport[swfdomain]) {\r\n                        // add the queue to hold the init fn's\r\n                        easyXDM.stack.FlashTransport[swfdomain] = {\r\n                            queue: [fn]\r\n                        };\r\n                        addSwf(swfdomain);\r\n                    }\r\n                    else {\r\n                        easyXDM.stack.FlashTransport[swfdomain].queue.push(fn);\r\n                    }\r\n                }\r\n            },\r\n            init: function () {\r\n                whenReady(pub.onDOMReady, pub);\r\n            }\r\n        });\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, getLocation, appendQueryParameters, createFrame, debug, un, on, apply, whenReady, IFRAME_PREFIX*/\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.stack.PostMessageTransport\r\n     * PostMessageTransport is a transport class that uses HTML5 postMessage for communication.<br/>\r\n     * <a href=\"http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx\">http://msdn.microsoft.com/en-us/library/ms644944(VS.85).aspx</a><br/>\r\n     * <a href=\"https://developer.mozilla.org/en/DOM/window.postMessage\">https://developer.mozilla.org/en/DOM/window.postMessage</a>\r\n     * @namespace easyXDM.stack\r\n     * @constructor\r\n     * @param {Object} config The transports configuration.\r\n     * @cfg {String} remote The remote domain to communicate with.\r\n     */\r\n    easyXDM.stack.PostMessageTransport = function (config) {\r\n        var pub, // the public interface\r\n            frame, // the remote frame, if any\r\n            callerWindow, // the window that we will call with\r\n            targetOrigin; // the domain to communicate with\r\n        /**\r\n         * Resolves the origin from the event object\r\n         * @private\r\n         * @param {Object} event The messageevent\r\n         * @return {String} The scheme, host and port of the origin\r\n         */\r\n        function _getOrigin(event) {\r\n            if (event.origin) {\r\n                // This is the HTML5 property\r\n                return getLocation(event.origin);\r\n            }\r\n            if (event.uri) {\r\n                // From earlier implementations\r\n                return getLocation(event.uri);\r\n            }\r\n            if (event.domain) {\r\n                // This is the last option and will fail if the\r\n                // origin is not using the same schema as we are\r\n                return location.protocol + \"//\" + event.domain;\r\n            }\r\n            throw \"Unable to retrieve the origin of the event\";\r\n        }\r\n\r\n        /**\r\n         * This is the main implementation for the onMessage event.<br/>\r\n         * It checks the validity of the origin and passes the message on if appropriate.\r\n         * @private\r\n         * @param {Object} event The messageevent\r\n         */\r\n        function _window_onMessage(event) {\r\n            var origin = _getOrigin(event);\r\n            if (origin == targetOrigin && event.data.substring(0, config.channel.length + 1) == config.channel + \" \") {\r\n                pub.up.incoming(event.data.substring(config.channel.length + 1), origin);\r\n            }\r\n        }\r\n\r\n        return (pub = {\r\n            outgoing: function (message, domain, fn) {\r\n                callerWindow.postMessage(config.channel + \" \" + message, domain || targetOrigin);\r\n                if (fn) {\r\n                    fn();\r\n                }\r\n            },\r\n            destroy: function () {\r\n                un(window, \"message\", _window_onMessage);\r\n                if (frame) {\r\n                    callerWindow = null;\r\n                    frame.parentNode.removeChild(frame);\r\n                    frame = null;\r\n                }\r\n            },\r\n            onDOMReady: function () {\r\n                targetOrigin = getLocation(config.remote);\r\n                if (config.isHost) {\r\n                    // add the event handler for listening\r\n                    var waitForReady = function (event) {\r\n                        if (event.data == config.channel + \"-ready\") {\r\n                            // replace the eventlistener\r\n                            callerWindow = (\"postMessage\" in frame.contentWindow) ? frame.contentWindow : frame.contentWindow.document;\r\n                            un(window, \"message\", waitForReady);\r\n                            on(window, \"message\", _window_onMessage);\r\n                            setTimeout(function () {\r\n                                pub.up.callback(true);\r\n                            }, 0);\r\n                        }\r\n                    };\r\n                    on(window, \"message\", waitForReady);\r\n\r\n                    // set up the iframe\r\n                    apply(config.props, {\r\n                        src: appendQueryParameters(config.remote, {\r\n                            xdm_e: getLocation(location.href),\r\n                            xdm_c: config.channel,\r\n                            xdm_p: 1 // 1 = PostMessage\r\n                        }),\r\n                        name: IFRAME_PREFIX + config.channel + \"_provider\"\r\n                    });\r\n                    frame = createFrame(config);\r\n                }\r\n                else {\r\n                    // add the event handler for listening\r\n                    on(window, \"message\", _window_onMessage);\r\n                    callerWindow = (\"postMessage\" in window.parent) ? window.parent : window.parent.document;\r\n                    callerWindow.postMessage(config.channel + \"-ready\", targetOrigin);\r\n\r\n                    setTimeout(function () {\r\n                        pub.up.callback(true);\r\n                    }, 0);\r\n                }\r\n            },\r\n            init: function () {\r\n                whenReady(pub.onDOMReady, pub);\r\n            }\r\n        });\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, getLocation, appendQueryParameters, createFrame, debug, apply, query, whenReady, IFRAME_PREFIX*/\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.stack.FrameElementTransport\r\n     * FrameElementTransport is a transport class that can be used with Gecko-browser as these allow passing variables using the frameElement property.<br/>\r\n     * Security is maintained as Gecho uses Lexical Authorization to determine under which scope a function is running.\r\n     * @namespace easyXDM.stack\r\n     * @constructor\r\n     * @param {Object} config The transports configuration.\r\n     * @cfg {String} remote The remote document to communicate with.\r\n     */\r\n    easyXDM.stack.FrameElementTransport = function (config) {\r\n        var pub, frame, send, targetOrigin;\r\n\r\n        return (pub = {\r\n            outgoing: function (message, domain, fn) {\r\n                send.call(this, message);\r\n                if (fn) {\r\n                    fn();\r\n                }\r\n            },\r\n            destroy: function () {\r\n                if (frame) {\r\n                    frame.parentNode.removeChild(frame);\r\n                    frame = null;\r\n                }\r\n            },\r\n            onDOMReady: function () {\r\n                targetOrigin = getLocation(config.remote);\r\n\r\n                if (config.isHost) {\r\n                    // set up the iframe\r\n                    apply(config.props, {\r\n                        src: appendQueryParameters(config.remote, {\r\n                            xdm_e: getLocation(location.href),\r\n                            xdm_c: config.channel,\r\n                            xdm_p: 5 // 5 = FrameElementTransport\r\n                        }),\r\n                        name: IFRAME_PREFIX + config.channel + \"_provider\"\r\n                    });\r\n                    frame = createFrame(config);\r\n                    frame.fn = function (sendFn) {\r\n                        delete frame.fn;\r\n                        send = sendFn;\r\n                        setTimeout(function () {\r\n                            pub.up.callback(true);\r\n                        }, 0);\r\n                        // remove the function so that it cannot be used to overwrite the send function later on\r\n                        return function (msg) {\r\n                            pub.up.incoming(msg, targetOrigin);\r\n                        };\r\n                    };\r\n                }\r\n                else {\r\n                    // This is to mitigate origin-spoofing\r\n                    if (document.referrer && getLocation(document.referrer) != query.xdm_e) {\r\n                        window.top.location = query.xdm_e;\r\n                    }\r\n                    send = window.frameElement.fn(function (msg) {\r\n                        pub.up.incoming(msg, targetOrigin);\r\n                    });\r\n                    pub.up.callback(true);\r\n                }\r\n            },\r\n            init: function () {\r\n                whenReady(pub.onDOMReady, pub);\r\n            }\r\n        });\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, undef, getLocation, appendQueryParameters, resolveUrl, createFrame, debug, un, apply, whenReady, IFRAME_PREFIX*/\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.stack.NameTransport\r\n     * NameTransport uses the window.name property to relay data.\r\n     * The <code>local</code> parameter needs to be set on both the consumer and provider,<br/>\r\n     * and the <code>remoteHelper</code> parameter needs to be set on the consumer.\r\n     * @constructor\r\n     * @param {Object} config The transports configuration.\r\n     * @cfg {String} remoteHelper The url to the remote instance of hash.html - this is only needed for the host.\r\n     * @namespace easyXDM.stack\r\n     */\r\n    easyXDM.stack.NameTransport = function (config) {\r\n\r\n        var pub; // the public interface\r\n        var isHost, callerWindow, remoteWindow, readyCount, callback, remoteOrigin, remoteUrl;\r\n\r\n        function _sendMessage(message) {\r\n            var url = config.remoteHelper + (isHost ? \"#_3\" : \"#_2\") + config.channel;\r\n            callerWindow.contentWindow.sendMessage(message, url);\r\n        }\r\n\r\n        function _onReady() {\r\n            if (isHost) {\r\n                if (++readyCount === 2 || !isHost) {\r\n                    pub.up.callback(true);\r\n                }\r\n            }\r\n            else {\r\n                _sendMessage(\"ready\");\r\n                pub.up.callback(true);\r\n            }\r\n        }\r\n\r\n        function _onMessage(message) {\r\n            pub.up.incoming(message, remoteOrigin);\r\n        }\r\n\r\n        function _onLoad() {\r\n            if (callback) {\r\n                setTimeout(function () {\r\n                    callback(true);\r\n                }, 0);\r\n            }\r\n        }\r\n\r\n        return (pub = {\r\n            outgoing: function (message, domain, fn) {\r\n                callback = fn;\r\n                _sendMessage(message);\r\n            },\r\n            destroy: function () {\r\n                callerWindow.parentNode.removeChild(callerWindow);\r\n                callerWindow = null;\r\n                if (isHost) {\r\n                    remoteWindow.parentNode.removeChild(remoteWindow);\r\n                    remoteWindow = null;\r\n                }\r\n            },\r\n            onDOMReady: function () {\r\n                isHost = config.isHost;\r\n                readyCount = 0;\r\n                remoteOrigin = getLocation(config.remote);\r\n                config.local = resolveUrl(config.local);\r\n\r\n                if (isHost) {\r\n                    // Register the callback\r\n                    easyXDM.Fn.set(config.channel, function (message) {\r\n                        if (isHost && message === \"ready\") {\r\n                            // Replace the handler\r\n                            easyXDM.Fn.set(config.channel, _onMessage);\r\n                            _onReady();\r\n                        }\r\n                    });\r\n\r\n                    // Set up the frame that points to the remote instance\r\n                    remoteUrl = appendQueryParameters(config.remote, {\r\n                        xdm_e: config.local,\r\n                        xdm_c: config.channel,\r\n                        xdm_p: 2\r\n                    });\r\n                    apply(config.props, {\r\n                        src: remoteUrl + '#' + config.channel,\r\n                        name: IFRAME_PREFIX + config.channel + \"_provider\"\r\n                    });\r\n                    remoteWindow = createFrame(config);\r\n                }\r\n                else {\r\n                    config.remoteHelper = config.remote;\r\n                    easyXDM.Fn.set(config.channel, _onMessage);\r\n                }\r\n\r\n                // Set up the iframe that will be used for the transport\r\n                var onLoad = function () {\r\n                    // Remove the handler\r\n                    var w = callerWindow || this;\r\n                    un(w, \"load\", onLoad);\r\n                    easyXDM.Fn.set(config.channel + \"_load\", _onLoad);\r\n                    (function test() {\r\n                        if (typeof w.contentWindow.sendMessage == \"function\") {\r\n                            _onReady();\r\n                        }\r\n                        else {\r\n                            setTimeout(test, 50);\r\n                        }\r\n                    }());\r\n                };\r\n\r\n                callerWindow = createFrame({\r\n                    props: {\r\n                        src: config.local + \"#_4\" + config.channel\r\n                    },\r\n                    onLoad: onLoad\r\n                });\r\n            },\r\n            init: function () {\r\n                whenReady(pub.onDOMReady, pub);\r\n            }\r\n        });\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, getLocation, createFrame, debug, un, on, apply, whenReady, IFRAME_PREFIX*/\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.stack.HashTransport\r\n     * HashTransport is a transport class that uses the IFrame URL Technique for communication.<br/>\r\n     * <a href=\"http://msdn.microsoft.com/en-us/library/bb735305.aspx\">http://msdn.microsoft.com/en-us/library/bb735305.aspx</a><br/>\r\n     * @namespace easyXDM.stack\r\n     * @constructor\r\n     * @param {Object} config The transports configuration.\r\n     * @cfg {String/Window} local The url to the local file used for proxying messages, or the local window.\r\n     * @cfg {Number} delay The number of milliseconds easyXDM should try to get a reference to the local window.\r\n     * @cfg {Number} interval The interval used when polling for messages.\r\n     */\r\n    easyXDM.stack.HashTransport = function (config) {\r\n        var pub;\r\n        var me = this, isHost, _timer, pollInterval, _lastMsg, _msgNr, _listenerWindow, _callerWindow;\r\n        var useParent, _remoteOrigin;\r\n\r\n        function _sendMessage(message) {\r\n            if (!_callerWindow) {\r\n                return;\r\n            }\r\n            var url = config.remote + \"#\" + (_msgNr++) + \"_\" + message;\r\n            ((isHost || !useParent) ? _callerWindow.contentWindow : _callerWindow).location = url;\r\n        }\r\n\r\n        function _handleHash(hash) {\r\n            _lastMsg = hash;\r\n            pub.up.incoming(_lastMsg.substring(_lastMsg.indexOf(\"_\") + 1), _remoteOrigin);\r\n        }\r\n\r\n        /**\r\n         * Checks location.hash for a new message and relays this to the receiver.\r\n         * @private\r\n         */\r\n        function _pollHash() {\r\n            if (!_listenerWindow) {\r\n                return;\r\n            }\r\n            var href = _listenerWindow.location.href, hash = \"\", indexOf = href.indexOf(\"#\");\r\n            if (indexOf != -1) {\r\n                hash = href.substring(indexOf);\r\n            }\r\n            if (hash && hash != _lastMsg) {\r\n                _handleHash(hash);\r\n            }\r\n        }\r\n\r\n        function _attachListeners() {\r\n            _timer = setInterval(_pollHash, pollInterval);\r\n        }\r\n\r\n        return (pub = {\r\n            outgoing: function (message, domain) {\r\n                _sendMessage(message);\r\n            },\r\n            destroy: function () {\r\n                window.clearInterval(_timer);\r\n                if (isHost || !useParent) {\r\n                    _callerWindow.parentNode.removeChild(_callerWindow);\r\n                }\r\n                _callerWindow = null;\r\n            },\r\n            onDOMReady: function () {\r\n                isHost = config.isHost;\r\n                pollInterval = config.interval;\r\n                _lastMsg = \"#\" + config.channel;\r\n                _msgNr = 0;\r\n                useParent = config.useParent;\r\n                _remoteOrigin = getLocation(config.remote);\r\n                if (isHost) {\r\n                    apply(config.props, {\r\n                        src: config.remote,\r\n                        name: IFRAME_PREFIX + config.channel + \"_provider\"\r\n                    });\r\n                    if (useParent) {\r\n                        config.onLoad = function () {\r\n                            _listenerWindow = window;\r\n                            _attachListeners();\r\n                            pub.up.callback(true);\r\n                        };\r\n                    }\r\n                    else {\r\n                        var tries = 0, max = config.delay / 50;\r\n                        (function getRef() {\r\n                            if (++tries > max) {\r\n                                throw new Error(\"Unable to reference listenerwindow\");\r\n                            }\r\n                            try {\r\n                                _listenerWindow = _callerWindow.contentWindow.frames[IFRAME_PREFIX + config.channel + \"_consumer\"];\r\n                            }\r\n                            catch (ex) {\r\n                            }\r\n                            if (_listenerWindow) {\r\n                                _attachListeners();\r\n                                pub.up.callback(true);\r\n                            }\r\n                            else {\r\n                                setTimeout(getRef, 50);\r\n                            }\r\n                        }());\r\n                    }\r\n                    _callerWindow = createFrame(config);\r\n                }\r\n                else {\r\n                    _listenerWindow = window;\r\n                    _attachListeners();\r\n                    if (useParent) {\r\n                        _callerWindow = parent;\r\n                        pub.up.callback(true);\r\n                    }\r\n                    else {\r\n                        apply(config, {\r\n                            props: {\r\n                                src: config.remote + \"#\" + config.channel + new Date(),\r\n                                name: IFRAME_PREFIX + config.channel + \"_consumer\"\r\n                            },\r\n                            onLoad: function () {\r\n                                pub.up.callback(true);\r\n                            }\r\n                        });\r\n                        _callerWindow = createFrame(config);\r\n                    }\r\n                }\r\n            },\r\n            init: function () {\r\n                whenReady(pub.onDOMReady, pub);\r\n            }\r\n        });\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, debug */\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.stack.ReliableBehavior\r\n     * This is a behavior that tries to make the underlying transport reliable by using acknowledgements.\r\n     * @namespace easyXDM.stack\r\n     * @constructor\r\n     * @param {Object} config The behaviors configuration.\r\n     */\r\n    easyXDM.stack.ReliableBehavior = function (config) {\r\n        var pub, // the public interface\r\n            callback; // the callback to execute when we have a confirmed success/failure\r\n        var idOut = 0, idIn = 0, currentMessage = \"\";\r\n\r\n        return (pub = {\r\n            incoming: function (message, origin) {\r\n                var indexOf = message.indexOf(\"_\"), ack = message.substring(0, indexOf).split(\",\");\r\n                message = message.substring(indexOf + 1);\r\n\r\n                if (ack[0] == idOut) {\r\n                    currentMessage = \"\";\r\n                    if (callback) {\r\n                        callback(true);\r\n                    }\r\n                }\r\n                if (message.length > 0) {\r\n                    pub.down.outgoing(ack[1] + \",\" + idOut + \"_\" + currentMessage, origin);\r\n                    if (idIn != ack[1]) {\r\n                        idIn = ack[1];\r\n                        pub.up.incoming(message, origin);\r\n                    }\r\n                }\r\n\r\n            },\r\n            outgoing: function (message, origin, fn) {\r\n                currentMessage = message;\r\n                callback = fn;\r\n                pub.down.outgoing(idIn + \",\" + (++idOut) + \"_\" + message, origin);\r\n            }\r\n        });\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, debug, undef, removeFromStack*/\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.stack.QueueBehavior\r\n     * This is a behavior that enables queueing of messages. <br/>\r\n     * It will buffer incoming messages and dispach these as fast as the underlying transport allows.\r\n     * This will also fragment/defragment messages so that the outgoing message is never bigger than the\r\n     * set length.\r\n     * @namespace easyXDM.stack\r\n     * @constructor\r\n     * @param {Object} config The behaviors configuration. Optional.\r\n     * @cfg {Number} maxLength The maximum length of each outgoing message. Set this to enable fragmentation.\r\n     */\r\n    easyXDM.stack.QueueBehavior = function (config) {\r\n        var pub, queue = [], waiting = true, incoming = \"\", destroying, maxLength = 0, lazy = false, doFragment = false;\r\n\r\n        function dispatch() {\r\n            if (config.remove && queue.length === 0) {\r\n                removeFromStack(pub);\r\n                return;\r\n            }\r\n            if (waiting || queue.length === 0 || destroying) {\r\n                return;\r\n            }\r\n            waiting = true;\r\n            var message = queue.shift();\r\n\r\n            pub.down.outgoing(message.data, message.origin, function (success) {\r\n                waiting = false;\r\n                if (message.callback) {\r\n                    setTimeout(function () {\r\n                        message.callback(success);\r\n                    }, 0);\r\n                }\r\n                dispatch();\r\n            });\r\n        }\r\n        return (pub = {\r\n            init: function () {\r\n                if (undef(config)) {\r\n                    config = {};\r\n                }\r\n                if (config.maxLength) {\r\n                    maxLength = config.maxLength;\r\n                    doFragment = true;\r\n                }\r\n                if (config.lazy) {\r\n                    lazy = true;\r\n                }\r\n                else {\r\n                    pub.down.init();\r\n                }\r\n            },\r\n            callback: function (success) {\r\n                waiting = false;\r\n                var up = pub.up; // in case dispatch calls removeFromStack\r\n                dispatch();\r\n                up.callback(success);\r\n            },\r\n            incoming: function (message, origin) {\r\n                if (doFragment) {\r\n                    var indexOf = message.indexOf(\"_\"), seq = parseInt(message.substring(0, indexOf), 10);\r\n                    incoming += message.substring(indexOf + 1);\r\n                    if (seq === 0) {\r\n                        if (config.encode) {\r\n                            incoming = decodeURIComponent(incoming);\r\n                        }\r\n                        pub.up.incoming(incoming, origin);\r\n                        incoming = \"\";\r\n                    }\r\n                }\r\n                else {\r\n                    pub.up.incoming(message, origin);\r\n                }\r\n            },\r\n            outgoing: function (message, origin, fn) {\r\n                if (config.encode) {\r\n                    message = encodeURIComponent(message);\r\n                }\r\n                var fragments = [], fragment;\r\n                if (doFragment) {\r\n                    // fragment into chunks\r\n                    while (message.length !== 0) {\r\n                        fragment = message.substring(0, maxLength);\r\n                        message = message.substring(fragment.length);\r\n                        fragments.push(fragment);\r\n                    }\r\n                    // enqueue the chunks\r\n                    while ((fragment = fragments.shift())) {\r\n                        queue.push({\r\n                            data: fragments.length + \"_\" + fragment,\r\n                            origin: origin,\r\n                            callback: fragments.length === 0 ? fn : null\r\n                        });\r\n                    }\r\n                }\r\n                else {\r\n                    queue.push({\r\n                        data: message,\r\n                        origin: origin,\r\n                        callback: fn\r\n                    });\r\n                }\r\n                if (lazy) {\r\n                    pub.down.init();\r\n                }\r\n                else {\r\n                    dispatch();\r\n                }\r\n            },\r\n            destroy: function () {\r\n                destroying = true;\r\n                pub.down.destroy();\r\n            }\r\n        });\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, undef, debug */\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.stack.VerifyBehavior\r\n     * This behavior will verify that communication with the remote end is possible, and will also sign all outgoing,\r\n     * and verify all incoming messages. This removes the risk of someone hijacking the iframe to send malicious messages.\r\n     * @namespace easyXDM.stack\r\n     * @constructor\r\n     * @param {Object} config The behaviors configuration.\r\n     * @cfg {Boolean} initiate If the verification should be initiated from this end.\r\n     */\r\n    easyXDM.stack.VerifyBehavior = function (config) {\r\n        var pub, mySecret, theirSecret, verified = false;\r\n\r\n        function startVerification() {\r\n            mySecret = Math.random().toString(16).substring(2);\r\n            pub.down.outgoing(mySecret);\r\n        }\r\n\r\n        return (pub = {\r\n            incoming: function (message, origin) {\r\n                var indexOf = message.indexOf(\"_\");\r\n                if (indexOf === -1) {\r\n                    if (message === mySecret) {\r\n                        pub.up.callback(true);\r\n                    }\r\n                    else if (!theirSecret) {\r\n                        theirSecret = message;\r\n                        if (!config.initiate) {\r\n                            startVerification();\r\n                        }\r\n                        pub.down.outgoing(message);\r\n                    }\r\n                }\r\n                else {\r\n                    if (message.substring(0, indexOf) === theirSecret) {\r\n                        pub.up.incoming(message.substring(indexOf + 1), origin);\r\n                    }\r\n                }\r\n            },\r\n            outgoing: function (message, origin, fn) {\r\n                pub.down.outgoing(mySecret + \"_\" + message, origin, fn);\r\n            },\r\n            callback: function (success) {\r\n                if (config.initiate) {\r\n                    startVerification();\r\n                }\r\n            }\r\n        });\r\n    };\r\n    /*jslint evil: true, browser: true, immed: true, passfail: true, undef: true, newcap: true*/\r\n    /*global easyXDM, window, escape, unescape, undef, getJSON, debug, emptyFn, isArray */\r\n    //\r\n    // easyXDM\r\n    // http://easyxdm.net/\r\n    // Copyright(c) 2009-2011, Øyvind Sean Kinsey, oyvind@kinsey.no.\r\n    //\r\n    // Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    // of this software and associated documentation files (the \"Software\"), to deal\r\n    // in the Software without restriction, including without limitation the rights\r\n    // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    // copies of the Software, and to permit persons to whom the Software is\r\n    // furnished to do so, subject to the following conditions:\r\n    //\r\n    // The above copyright notice and this permission notice shall be included in\r\n    // all copies or substantial portions of the Software.\r\n    //\r\n    // THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n    // THE SOFTWARE.\r\n    //\r\n\r\n    /**\r\n     * @class easyXDM.stack.RpcBehavior\r\n     * This uses JSON-RPC 2.0 to expose local methods and to invoke remote methods and have responses returned over the the string based transport stack.<br/>\r\n     * Exposed methods can return values synchronous, asyncronous, or bet set up to not return anything.\r\n     * @namespace easyXDM.stack\r\n     * @constructor\r\n     * @param {Object} proxy The object to apply the methods to.\r\n     * @param {Object} config The definition of the local and remote interface to implement.\r\n     * @cfg {Object} local The local interface to expose.\r\n     * @cfg {Object} remote The remote methods to expose through the proxy.\r\n     * @cfg {Object} serializer The serializer to use for serializing and deserializing the JSON. Should be compatible with the HTML5 JSON object. Optional, will default to JSON.\r\n     */\r\n    easyXDM.stack.RpcBehavior = function (proxy, config) {\r\n        var pub, serializer = config.serializer || getJSON();\r\n        var _callbackCounter = 0, _callbacks = {};\r\n\r\n        /**\r\n         * Serializes and sends the message\r\n         * @private\r\n         * @param {Object} data The JSON-RPC message to be sent. The jsonrpc property will be added.\r\n         */\r\n        function _send(data) {\r\n            data.jsonrpc = \"2.0\";\r\n            pub.down.outgoing(serializer.stringify(data));\r\n        }\r\n\r\n        /**\r\n         * Creates a method that implements the given definition\r\n         * @private\r\n         * @param {Object} The method configuration\r\n         * @param {String} method The name of the method\r\n         * @return {Function} A stub capable of proxying the requested method call\r\n         */\r\n        function _createMethod(definition, method) {\r\n            var slice = Array.prototype.slice;\r\n\r\n            return function () {\r\n                var l = arguments.length, callback, message = {\r\n                    method: method\r\n                };\r\n\r\n                if (l > 0 && typeof arguments[l - 1] === \"function\") {\r\n                    //with callback, procedure\r\n                    if (l > 1 && typeof arguments[l - 2] === \"function\") {\r\n                        // two callbacks, success and error\r\n                        callback = {\r\n                            success: arguments[l - 2],\r\n                            error: arguments[l - 1]\r\n                        };\r\n                        message.params = slice.call(arguments, 0, l - 2);\r\n                    }\r\n                    else {\r\n                        // single callback, success\r\n                        callback = {\r\n                            success: arguments[l - 1]\r\n                        };\r\n                        message.params = slice.call(arguments, 0, l - 1);\r\n                    }\r\n                    _callbacks[\"\" + (++_callbackCounter)] = callback;\r\n                    message.id = _callbackCounter;\r\n                }\r\n                else {\r\n                    // no callbacks, a notification\r\n                    message.params = slice.call(arguments, 0);\r\n                }\r\n                if (definition.namedParams && message.params.length === 1) {\r\n                    message.params = message.params[0];\r\n                }\r\n                // Send the method request\r\n                _send(message);\r\n            };\r\n        }\r\n\r\n        /**\r\n         * Executes the exposed method\r\n         * @private\r\n         * @param {String} method The name of the method\r\n         * @param {Number} id The callback id to use\r\n         * @param {Function} method The exposed implementation\r\n         * @param {Array} params The parameters supplied by the remote end\r\n         */\r\n        function _executeMethod(method, id, fn, params) {\r\n            if (!fn) {\r\n                if (id) {\r\n                    _send({\r\n                        id: id,\r\n                        error: {\r\n                            code: -32601,\r\n                            message: \"Procedure not found.\"\r\n                        }\r\n                    });\r\n                }\r\n                return;\r\n            }\r\n\r\n            var success, error;\r\n            if (id) {\r\n                success = function (result) {\r\n                    success = emptyFn;\r\n                    _send({\r\n                        id: id,\r\n                        result: result\r\n                    });\r\n                };\r\n                error = function (message, data) {\r\n                    error = emptyFn;\r\n                    var msg = {\r\n                        id: id,\r\n                        error: {\r\n                            code: -32099,\r\n                            message: message\r\n                        }\r\n                    };\r\n                    if (data) {\r\n                        msg.error.data = data;\r\n                    }\r\n                    _send(msg);\r\n                };\r\n            }\r\n            else {\r\n                success = error = emptyFn;\r\n            }\r\n            // Call local method\r\n            if (!isArray(params)) {\r\n                params = [params];\r\n            }\r\n            try {\r\n                var result = fn.method.apply(fn.scope, params.concat([success, error]));\r\n                if (!undef(result)) {\r\n                    success(result);\r\n                }\r\n            }\r\n            catch (ex1) {\r\n                error(ex1.message);\r\n            }\r\n        }\r\n\r\n        return (pub = {\r\n            incoming: function (message, origin) {\r\n                var data = serializer.parse(message);\r\n                if (data.method) {\r\n                    // A method call from the remote end\r\n                    if (config.handle) {\r\n                        config.handle(data, _send);\r\n                    }\r\n                    else {\r\n                        _executeMethod(data.method, data.id, config.local[data.method], data.params);\r\n                    }\r\n                }\r\n                else {\r\n                    // A method response from the other end\r\n                    var callback = _callbacks[data.id];\r\n                    if (data.error) {\r\n                        if (callback.error) {\r\n                            callback.error(data.error);\r\n                        }\r\n                    }\r\n                    else if (callback.success) {\r\n                        callback.success(data.result);\r\n                    }\r\n                    delete _callbacks[data.id];\r\n                }\r\n            },\r\n            init: function () {\r\n                if (config.remote) {\r\n                    // Implement the remote sides exposed methods\r\n                    for (var method in config.remote) {\r\n                        if (config.remote.hasOwnProperty(method)) {\r\n                            proxy[method] = _createMethod(config.remote[method], method);\r\n                        }\r\n                    }\r\n                }\r\n                pub.down.init();\r\n            },\r\n            destroy: function () {\r\n                for (var method in config.remote) {\r\n                    if (config.remote.hasOwnProperty(method) && proxy.hasOwnProperty(method)) {\r\n                        delete proxy[method];\r\n                    }\r\n                }\r\n                pub.down.destroy();\r\n            }\r\n        });\r\n    };\r\n    global.easyXDM = easyXDM;\r\n})(window, document, location, window.setTimeout, decodeURIComponent, encodeURIComponent);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\nvar l2s = {\r\n\r\n    opts: {},\r\n\r\n    socket: null,\r\n\r\n    initialized: false,\r\n\r\n    rpcInitialized: false,\r\n\r\n    //\r\n    // merge\r\n    // recursive merge two objects into one, second parameter overides the first\r\n    // @param a array\r\n    //\r\n    merge: function (/*a,b,c,..n*/) {\r\n        var args = Array.prototype.slice.call(arguments);\r\n        args.unshift({});\r\n        return l2s.extend.apply(null, args);\r\n    },\r\n\r\n    //\r\n    // Extend the first object with the properties and methods of the second\r\n    extend: function (r /*, a[, b[, ...]] */) {\r\n\r\n        // Get the arguments as an array but ommit the initial item\r\n        var args = Array.prototype.slice.call(arguments, 1);\r\n\r\n        for (var i = 0; i < args.length; i++) {\r\n            var a = args[i];\r\n            if (r instanceof Object && a instanceof Object && r !== a) {\r\n                for (var x in a) {\r\n                    //if(a.hasOwnProperty(x)){\r\n                    r[x] = l2s.extend(r[x], a[x]);\r\n                    //}\r\n                }\r\n            }\r\n            else {\r\n                r = a;\r\n            }\r\n        }\r\n        return r;\r\n    },\r\n\r\n\r\n    //\r\n    // OAuth/API Response Handler\r\n    //\r\n    responseHandler: function (window, parent) {\r\n\r\n        console.log('---- entering response handler ----');\r\n        console.log('response handler...');\r\n\r\n        //\r\n        var location = window.location;\r\n\r\n        //\r\n        // Add a helper for relocating, instead of window.location  = url;\r\n        //\r\n        var relocate = function (path) {\r\n            if (location.assign) {\r\n                location.assign(path);\r\n            }\r\n            else {\r\n                window.location = path;\r\n            }\r\n        };\r\n\r\n        //\r\n        // Save session, from redirected authentication\r\n        // #access_token has come in?\r\n        //\r\n\r\n        var p = l2s.merge(l2s.param(location.search || ''), l2s.param(location.hash || ''));\r\n\r\n        // if p.state\r\n        if (p && \"state\" in p) {\r\n\r\n            console.log(\"state in handler \" + p.state);\r\n\r\n            // remove any addition information\r\n            // e.g. p.state = 'facebook.page';\r\n            try {\r\n                var a = JSON.parse(p.state);\r\n                l2s.extend(p, a);\r\n                delete p.state;\r\n            } catch (e) {\r\n                console.error(\"Could not decode state parameter\");\r\n            }\r\n\r\n            console.log(\"callback state: \" + JSON.stringify(p));\r\n\r\n            // access_token? || code\r\n            if ((\"access_token\" in p && p.access_token)) {\r\n\r\n                console.log('we have an access token')\r\n\r\n                delete p.state;\r\n\r\n                if (!p.expires_in || parseInt(p.expires_in, 10) === 0) {\r\n                    // If p.expires_in is unset, set to 0\r\n                    p.expires_in = 0;\r\n                }\r\n                p.expires_in = parseInt(p.expires_in, 10);\r\n                p.expires = ((new Date()).getTime() / 1e3) + (p.expires_in || (60 * 60 * 24 * 365));\r\n\r\n                // Lets use the \"state\" to assign it to one of our networks\r\n                authCallback(p, window, parent);\r\n            }\r\n            else if ((\"code\" in p && p.code)) {\r\n                console.log('we have an authorization code')\r\n\r\n                // Lets use the \"state\" to assign it to one of our networks\r\n                authCallback(p, window, parent);\r\n            }\r\n\r\n                //error=?\r\n                //&error_description=?\r\n                //&state=?\r\n            else if ((\"error\" in p && p.error)) {\r\n                // Error object\r\n                p.error = {\r\n                    code: p.error,\r\n                    message: p.error_message || p.error_description\r\n                };\r\n\r\n                // Let the state handler handle it.\r\n                authCallback(p, window, parent);\r\n            }\r\n\r\n                // API Calls\r\n                // IFRAME HACK\r\n                // Result is serialized JSON string.\r\n            else if (p && p.callback && \"result\" in p && p.result) {\r\n                // trigger a function in the parent\r\n                if (p.callback in parent) {\r\n                    parent[p.callback](JSON.parse(p.result));\r\n                }\r\n            }\r\n        }\r\n\r\n            //\r\n            // OAuth redirect, fixes URI fragments from being lost in Safari\r\n            // (URI Fragments within 302 Location URI are lost over HTTPS)\r\n            // Loading the redirect.html before triggering the OAuth Flow seems to fix it.\r\n        else if (\"oauth_redirect\" in p) {\r\n            relocate(decodeURIComponent(p.oauth_redirect));\r\n            return;\r\n        }\r\n\r\n        // redefine\r\n        p = l2s.param(location.search);\r\n\r\n        // IS THIS AN OAUTH2 SERVER RESPONSE? OR AN OAUTH1 SERVER RESPONSE?\r\n        /*  if((p.code&&p.state) || (p.oauth_token&&p.proxy_url)){\r\n         // Add this path as the redirect_uri\r\n         p.redirect_uri = location.href.replace(/[\\?\\#].*$/,'');\r\n         // JSON decode\r\n         var state = JSON.parse(p.state);\r\n         // redirect to the host\r\n         var path = (state.oauth_proxy || p.proxy_url) + \"?\" + utils.param(p);\r\n\r\n         relocate( path );\r\n         }*/\r\n\r\n        //\r\n        // AuthCallback\r\n        // Trigger a callback to authenticate\r\n        //\r\n        function authCallback(obj, window, parent) {\r\n\r\n            // Trigger the callback on the parent\r\n            //utils.store(obj.network, obj );\r\n\r\n            // if this is a page request\r\n            // therefore it has no parent or opener window to handle callbacks\r\n            if ((\"display\" in obj) && obj.display === 'page') {\r\n                return;\r\n            }\r\n\r\n            if (parent) {\r\n                // Call the generic listeners\r\n                //\t\t\t\twin.hello.emit(network+\":auth.\"+(obj.error?'failed':'login'), obj);\r\n                // Call the inline listeners\r\n\r\n                // to do remove from session object...\r\n                var cb = obj.callback;\r\n                try {\r\n                    delete obj.callback;\r\n                } catch (e) { }\r\n\r\n                // Update store\r\n                //utils.store(obj.network,obj);\r\n\r\n                // Call the globalEvent function on the parent\r\n                if (cb in parent) {\r\n\r\n                    // its safer to pass back a string to the parent, rather than an object/array\r\n                    // Better for IE8\r\n                    var str = JSON.stringify(obj);\r\n\r\n                    try {\r\n                        parent[cb](str);\r\n                    }\r\n                    catch (e) {\r\n                        // \"Error thrown whilst executing parent callback\"\r\n                    }\r\n                }\r\n                else {\r\n                    // \"Error: Callback missing from parent window, snap!\"\r\n                }\r\n\r\n            }\r\n\r\n            //console.log(\"merde: \"+JSON.stringify(obj));\r\n            console.log(\"Trying to close window? \"+(\"display\" in obj) && obj.display !== 'none' || !(\"display\" in obj));\r\n\r\n            if ((\"display\" in obj) && obj.display !== 'none' || !(\"display\" in obj)) {\r\n                // Close this current window\r\n                try {\r\n                    window.close();\r\n                }\r\n                catch (e) { }\r\n\r\n                // IOS bug wont let us close a popup if still loading\r\n                if (window.addEventListener) {\r\n                    window.addEventListener('load', function () {\r\n                        window.close();\r\n                    });\r\n                }\r\n            }\r\n\r\n\r\n        }\r\n    },\r\n\r\n\r\n    // Global Events\r\n    // Attach the callback to the window object\r\n    // Return its unique reference\r\n    globalEvent: function (callback, guid) {\r\n        // If the guid has not been supplied then create a new one.\r\n        guid = guid || \"_l2s_\" + parseInt(Math.random() * 1e12, 10).toString(36);\r\n\r\n        // Define the callback function\r\n        window[guid] = function () {\r\n            // Trigger the callback\r\n            try {\r\n                bool = callback.apply(this, arguments);\r\n            }\r\n            catch (e) {\r\n                console.error(e);\r\n            }\r\n\r\n            if (bool) {\r\n                // Remove this handler reference\r\n                try {\r\n                    delete window[guid];\r\n                } catch (e) { }\r\n            }\r\n        };\r\n        return guid;\r\n    },\r\n\r\n    // isEmpty\r\n    isEmpty: function (obj) {\r\n        // scalar?\r\n        if (!obj) {\r\n            return true;\r\n        }\r\n\r\n        // Array?\r\n        if (obj && obj.length > 0) return false;\r\n        if (obj && obj.length === 0) return true;\r\n\r\n        // object?\r\n        for (var key in obj) {\r\n            if (obj.hasOwnProperty(key)) {\r\n                return false;\r\n            }\r\n        }\r\n        return true;\r\n    },\r\n\r\n    //\r\n    // Param\r\n    // Explode/Encode the parameters of an URL string/object\r\n    // @param string s, String to decode\r\n    //\r\n    param: function (s) {\r\n        var b,\r\n            a = {},\r\n            m;\r\n\r\n        if (typeof (s) === 'string') {\r\n\r\n            m = s.replace(/^[\\#\\?]/, '').match(/([^=\\/\\&]+)=([^\\&]+)/g);\r\n            if (m) {\r\n                for (var i = 0; i < m.length; i++) {\r\n                    b = m[i].match(/([^=]+)=(.*)/);\r\n                    a[b[1]] = decodeURIComponent(b[2]);\r\n                }\r\n            }\r\n            return a;\r\n        }\r\n        else {\r\n            var o = s;\r\n\r\n            a = [];\r\n\r\n            for (var x in o) {\r\n                if (o.hasOwnProperty(x)) {\r\n                    if (o.hasOwnProperty(x)) {\r\n                        a.push([x, o[x] === '?' ? '?' : encodeURIComponent(o[x])].join('='));\r\n                    }\r\n                }\r\n            }\r\n\r\n            return a.join('&');\r\n        }\r\n    },\r\n\r\n\r\n    // Append the querystring to a url\r\n    // @param string url\r\n    // @param object parameters\r\n    qs: function (url, params) {\r\n        if (params) {\r\n            var reg;\r\n            for (var x in params) {\r\n                if (url.indexOf(x) > -1) {\r\n                    var str = \"[\\\\?\\\\&]\" + x + \"=[^\\\\&]*\";\r\n                    reg = new RegExp(str);\r\n                    url = url.replace(reg, '');\r\n                }\r\n            }\r\n        }\r\n        return url + (!l2s.isEmpty(params) ? (url.indexOf('?') > -1 ? \"&\" : \"?\") + l2s.param(params) : '');\r\n    },\r\n\r\n    args : function(o,args){\r\n\r\n        var p = {},\r\n            i = 0,\r\n            t = null,\r\n            x = null;\r\n\r\n        // define x\r\n        // x is the first key in the list of object parameters\r\n        for(x in o){if(o.hasOwnProperty(x)){\r\n            break;\r\n        }}\r\n\r\n        // Passing in hash object of arguments?\r\n        // Where the first argument can't be an object\r\n        if((args.length===1)&&(typeof(args[0])==='object')&&o[x]!='o!'){\r\n\r\n            // Could this object still belong to a property?\r\n            // Check the object keys if they match any of the property keys\r\n            for(x in args[0]){if(o.hasOwnProperty(x)){\r\n                // Does this key exist in the property list?\r\n                if( x in o ){\r\n                    // Yes this key does exist so its most likely this function has been invoked with an object parameter\r\n                    // return first argument as the hash of all arguments\r\n                    return args[0];\r\n                }\r\n            }}\r\n        }\r\n\r\n        // else loop through and account for the missing ones.\r\n        for(x in o){if(o.hasOwnProperty(x)){\r\n\r\n            t = typeof( args[i] );\r\n\r\n            if( ( typeof( o[x] ) === 'function' && o[x].test(args[i]) ) || ( typeof( o[x] ) === 'string' && (\r\n                ( o[x].indexOf('s')>-1 && t === 'string' ) ||\r\n                ( o[x].indexOf('o')>-1 && t === 'object' ) ||\r\n                ( o[x].indexOf('i')>-1 && t === 'number' ) ||\r\n                ( o[x].indexOf('a')>-1 && t === 'object' ) ||\r\n                ( o[x].indexOf('f')>-1 && t === 'function' )\r\n                ) )\r\n                ){\r\n                p[x] = args[i++];\r\n            }\r\n\r\n            else if( typeof( o[x] ) === 'string' && o[x].indexOf('!')>-1 ){\r\n                // (\"Whoops! \" + x + \" not defined\");\r\n                return false;\r\n            }\r\n        }}\r\n        return p;\r\n    },\r\n\r\n    //\r\n    // realPath\r\n    // Converts relative URL's to fully qualified URL's\r\n    realPath: function (path) {\r\n\r\n        var location = window.location;\r\n\r\n        if (!path) {\r\n            return location.href;\r\n        }\r\n        if (path.indexOf('/') === 0) {\r\n            path = location.protocol + (path.indexOf('//') === 0 ? path : '//' + location.host + path);\r\n        }\r\n            // Is the redirect_uri relative?\r\n        else if (!path.match(/^https?\\:\\/\\//)) {\r\n            path = (location.href.replace(/#.*/, '').replace(/\\/[^\\/]+$/, '/') + path).replace(/\\/\\.\\//g, '/');\r\n        }\r\n        while (/\\/[^\\/]+\\/\\.\\.\\//g.test(path)) {\r\n            path = path.replace(/\\/[^\\/]+\\/\\.\\.\\//g, '/');\r\n        }\r\n        return path;\r\n    },\r\n\r\n    checkInit: function () {\r\n        if (!l2s.initialized) {\r\n            alert('Please call l2s.init before using any API call!');\r\n            throw \"Please call l2s.init before using any API call!\";\r\n        }\r\n    },\r\n\r\n    getLoginStatus: function (callback) {\r\n        l2s.checkInit();\r\n        l2s.opts.getLoginStatus = callback;\r\n        l2s.socket.postMessage(\"getLoginStatus\");\r\n    },\r\n\r\n    logout: function (callback) {\r\n        l2s.checkInit();\r\n        l2s.opts.logout = callback;\r\n        l2s.socket.postMessage(\"logout\");\r\n    },\r\n\r\n\r\n\r\n    /**\r\n     * @param apiKey\r\n     * @param env\r\n     * @param opts : supported parameters: callback, lng, env (prod|local|staging)\r\n     * @param callback\r\n     */\r\n    init: function (apiKey, env, opts, callback) {\r\n        if (l2s.socket) {\r\n            l2s.socket.destroy();\r\n            l2s.socket = null;\r\n        }\r\n\r\n        l2s.opts.apiKey = apiKey;\r\n        l2s.opts.env = env;\r\n        if (opts) l2s.extend(l2s.opts, opts);\r\n\r\n        console.log(\"proxy url:\" + l2s.getBaseUrl(\"api\") + \"proxy.html\");\r\n\r\n        l2s.socket = new easyXDM.Socket({\r\n            remote: l2s.getBaseUrl(\"api\") + \"proxy.html\", // the path to the provider\r\n            onMessage: function (message, origin) {\r\n                //do something with message\r\n                console.log(\"rpc: \" + message);\r\n                var msg = JSON.parse(message);\r\n                var command = msg.command;\r\n                if (l2s.opts.hasOwnProperty(command)) l2s.opts[command](msg);\r\n\r\n            },\r\n            onReady: function () {\r\n                l2s.initialized = true;\r\n                console.log(\"XDR is ready...\");\r\n                if (callback) callback();\r\n            }\r\n        });\r\n\r\n\r\n    },\r\n\r\n    getBaseUrl: function (type) {\r\n        var env = l2s.opts.env ? l2s.opts.env : (l2s.opts.environment ? l2s.opts.environment : \"prod\");\r\n        var auth = \"https://www.like2sport.com/\";\r\n        switch (env) {\r\n            case \"local\":\r\n                if (type && type == \"api\") return \"http://localhost:6561/\"\r\n                auth = \"http://localhost:20955/\";\r\n                break;\r\n\r\n            case \"staging\":\r\n                auth = \"http://staging-account.like2sport.eu/\";\r\n                break;\r\n\r\n        }\r\n        return auth;\r\n    },\r\n\r\n\r\n    //\r\n    // Create and Append new Dom elements\r\n    // @param node string\r\n    // @param attr object literal\r\n    // @param dom/string\r\n    //\r\n    append: function (node, attr, target) {\r\n\r\n        var n = typeof (node) === 'string' ? document.createElement(node) : node;\r\n\r\n        if (typeof (attr) === 'object') {\r\n            if (\"tagName\" in attr) {\r\n                target = attr;\r\n            }\r\n            else {\r\n                for (var x in attr) {\r\n                    if (attr.hasOwnProperty(x)) {\r\n                        if (typeof (attr[x]) === 'object') {\r\n                            for (var y in attr[x]) {\r\n                                if (attr[x].hasOwnProperty(y)) {\r\n                                    n[x][y] = attr[x][y];\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (x === \"html\") {\r\n                            n.innerHTML = attr[x];\r\n                        }\r\n                            // IE doesn't like us setting methods with setAttribute\r\n                        else if (!/^on/.test(x)) {\r\n                            n.setAttribute(x, attr[x]);\r\n                        }\r\n                        else {\r\n                            n[x] = attr[x];\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        }\r\n\r\n        if (target === 'body') {\r\n            (function self() {\r\n                if (document.body) {\r\n                    document.body.appendChild(n);\r\n                }\r\n                else {\r\n                    setTimeout(self, 16);\r\n                }\r\n            })();\r\n        }\r\n        else if (typeof (target) === 'object') {\r\n            target.appendChild(n);\r\n        }\r\n        else if (typeof (target) === 'string') {\r\n            document.getElementsByTagName(target)[0].appendChild(n);\r\n        }\r\n        return n;\r\n    },\r\n\r\n    remove: function (id) {\r\n        var elem = document.getElementById(id);\r\n        if (elem) elem.parentNode.removeChild(elem);\r\n    },\r\n\r\n    //\r\n    // create IFRAME\r\n    // An easy way to create a hidden iframe\r\n    // @param string src\r\n    //\r\n    iframe: function (src, id) {\r\n        console.log(\"iframe:\" + src + \" / \" + this);\r\n        l2s.remove(id);\r\n        l2s.append('iframe', { id: id, src: src, style: { position: 'absolute', left: \"-1000px\", bottom: 0, height: '1px', width: '1px' } }, 'body');\r\n    },\r\n\r\n    providers: {},\r\n\r\n    providerConfiguration: {\r\n        facebook: {\r\n            basic: 'public_profile',\r\n            email: 'email',\r\n            birthday: 'user_birthday',\r\n            events: 'user_events',\r\n            photos: 'user_photos,user_videos',\r\n            videos: 'user_photos,user_videos',\r\n            friends: 'user_friends',\r\n            files: 'user_photos,user_videos',\r\n            publish_files: 'user_photos,user_videos,publish_stream',\r\n            publish: 'publish_stream'\r\n        },\r\n        google: {\r\n            basic: \"https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile\",\r\n            email: '',\r\n            birthday: '',\r\n            events: '',\r\n            photos: 'https://picasaweb.google.com/data/',\r\n            videos: 'http://gdata.youtube.com',\r\n            friends: 'https://www.google.com/m8/feeds, https://www.googleapis.com/auth/plus.login',\r\n            files: 'https://www.googleapis.com/auth/drive.readonly',\r\n\r\n            publish: '',\r\n            publish_files: 'https://www.googleapis.com/auth/drive',\r\n            create_event: '',\r\n\r\n            offline_access: ''\r\n        },\r\n        windows: {\r\n            basic: 'wl.signin,wl.basic',\r\n            email: 'wl.emails',\r\n            birthday: 'wl.birthday',\r\n            events: 'wl.calendars',\r\n            photos: 'wl.photos',\r\n            videos: 'wl.photos',\r\n            friends: 'wl.contacts_emails',\r\n            files: 'wl.skydrive',\r\n\r\n            publish: 'wl.share',\r\n            publish_files: 'wl.skydrive_update',\r\n            create_event: 'wl.calendars_update,wl.events_create',\r\n\r\n            offline_access: 'wl.offline_access'\r\n        }\r\n    },\r\n\r\n    configure: function (providers) {\r\n\r\n        l2s.providers = providers;\r\n\r\n        l2s.initialized = true;\r\n    },\r\n\r\n    /***\r\n     *\r\n     * @param apiKey\r\n     * @param opts : supported parameters: callback, lng, env (prod|local|staging), response_type:code|token\r\n     * @param callback : callback function\r\n     */\r\n    login: function (opts, providerOptions) {\r\n        l2s.checkInit();\r\n        var tmp = {};\r\n        var auth;\r\n\r\n        // Check if first parameter is string and second is object\r\n        if (typeof(opts) === 'string' && typeof(providerOptions) === 'object') {\r\n            var providerName = opts;\r\n\r\n            if (l2s.providers && l2s.providers[providerName]) {\r\n                opts = l2s.providers[providerName];\r\n                tmp = {};\r\n                l2s.extend(tmp, opts, providerOptions);\r\n                opts = tmp;\r\n\r\n                // Defaults\r\n                opts.name = providerName;\r\n                opts.scope = opts.scope || 'basic';\r\n                opts.display = opts.display || 'popup';\r\n\r\n                console.log(\"Scope in login:\"+opts.scope );\r\n\r\n                //opts.scope = providerOptions.scope || 'basic';\r\n                //opts.callback = providerOptions.callback || function () { };\r\n                //opts.name = providerOptions.name || '';\r\n                //opts.display = providerOptions.display || 'popup';\r\n\r\n                auth = l2s.providers[providerName].authUrl || '';\r\n            } else {\r\n                throw new Error('Provider ' + (providerName || '') + ' not initialized');\r\n            }\r\n        }\r\n\r\n        // If first parameter is an object, do normal flow\r\n        else if (typeof (opts) === 'object') {\r\n            l2s.extend(tmp, l2s.opts, opts);\r\n            opts = tmp;\r\n\r\n            auth = l2s.getBaseUrl();\r\n            auth = auth + \"oauth2/authorize\";\r\n            if (opts.lng) auth = auth + \"?lng=\" + opts.lng;\r\n        }\r\n\r\n\r\n        var redirectUri = window.location.href.split('#')[0];\r\n        if (opts.redirect_uri) redirectUri = opts.redirect_uri;\r\n\r\n        //\r\n        // Callback\r\n        // Save the callback until state comes back.\r\n        //\r\n        var responded = false;\r\n\r\n        var callback = opts.callback;\r\n        var timer;\r\n        var timeout = false;\r\n\r\n        //\r\n        // Create a global listener to capture events triggered out of scope\r\n        var callback_id = l2s.globalEvent(function (str) {\r\n\r\n            console.log(\"callback?\");\r\n\r\n            // remove hidden iframe if exists\r\n            l2s.remove(\"l2s_iframe\");\r\n\r\n\r\n            if (timeout) {\r\n                console.log(\"already timed out... ignore callback\");\r\n                return;\r\n            }\r\n\r\n\r\n            // Save this locally\r\n            // responseHandler returns a string, lets save this locally\r\n            var obj = JSON.parse(str);\r\n\r\n            console.log(\"callback arg: \" + str);\r\n\r\n            //\r\n            // Cancel the popup close listener\r\n            responded = true;\r\n\r\n            if (timer) {\r\n                console.log(\"clear timer\");\r\n                clearInterval(timer);\r\n            }\r\n\r\n            //\r\n            // Handle these response using the local\r\n            // Trigger on the parent\r\n            if (!obj.error) {\r\n\r\n                // Save on the parent window the new credentials\r\n                // This fixes an IE10 bug i think... atleast it does for me.\r\n                //utils.store(obj.network,obj);\r\n\r\n                // Trigger local complete events\r\n                /* self.emit(\"complete success login auth.login auth\", {\r\n                 network : obj.network,\r\n                 authResponse : obj\r\n                 });*/\r\n\r\n                if (callback) callback(obj);\r\n\r\n                //console.log(\"complete success login auth.login auth\");\r\n            }\r\n            else {\r\n                // Trigger local complete events\r\n                /*   self.emit(\"complete error failed auth.failed\", {\r\n                 error : obj.error\r\n                 });*/\r\n\r\n                if (callback) callback({ error: obj.error });\r\n\r\n                //console.log(\"emit complete error failt auth.failed\");\r\n            }\r\n        });\r\n\r\n\r\n\r\n\r\n        /**\r\n         Client:  Represents a client (external app) that is recognized by the authorization server\r\n         Id:  Client identifier, used in requests from client\r\n         ClientSecret:  Secret used to verify client\r\n         Callback:  Optional, if specified enforces a match during the code/implicit flows\r\n         Name:  Display name of client, used when user authorizes the client\r\n         Scopes:  Scopes this client is allowed to use\r\n\r\n         Resource:  Represents a resource (e.g., API) recognized by the authorization server\r\n         AuthenticationTokenName:  Token that identifies whether user has authenticated with the resource\r\n         AuthenticationUrl:  Where the authorization server should redirect the user to authenticate with the resource\r\n         AuthenticationKey:  Shared secret with resource login mechanism to verify token provided is really from there\r\n         PublicTokenEncryptionKey:  Encryption key for resource server to use in encrypting the authorization token.  Resource server has corresponding private key to decrypt\r\n         Scopes:  Scopes supported by this resource\r\n\r\n         Scope:  Represents a scope recognized by the authorization server.  Allows us to relate clients with scopes they are allowed to use, and to relate resources with scopes they support.\r\n         Identifier:  This is the name of the scope that gets passed around in requests\r\n         Description:  For display to user on authorization page to describe what this scope allows the client to do\r\n\r\n         User:  Represents a user recognized by the authorization server\r\n         Id:  User name, comes from resource authentication process\r\n\r\n         Authorization:  Represents an authorization for a client to access a particular resource, optionally by a particular user\r\n         ClientId:  Client being authorized\r\n         UserId:  Authorizing used\r\n         ResourceId:  Resource being authorized\r\n         Scope:  This is a space-delimited list of scopes, for simplicity here\r\n\r\n         See more at: http://www.skylinetechnologies.com/Blog/Article/2526/Building-an-OAuth2-Authorization-Server-with-DotNetOpenAuth.aspx#sthash.7y8MXx3F.dpuf\r\n         */\r\n\r\n        // Get scope\r\n        var scope = '';\r\n\r\n\r\n        if (opts.scope\r\n            && typeof opts.scope === 'string'\r\n            && opts.name) {\r\n\r\n            if (l2s.providerConfiguration[opts.name]) {\r\n                var scopeArray = opts.scope.split(',');\r\n                var mappedScopes = [];\r\n                scope = '';\r\n\r\n                for (var i = 0; i < scopeArray.length; i++) {\r\n                    var prov = l2s.providerConfiguration[opts.name][scopeArray[i]];\r\n\r\n                    if (prov) {\r\n                        mappedScopes.push(prov);\r\n                    }\r\n                    else mappedScopes.push(scopeArray[i]);\r\n                }\r\n\r\n                scope = mappedScopes.join(',');\r\n            } \r\n            else scope=opts.scope;\r\n        }\r\n\r\n        var qs = {\r\n            client_id: opts.apiKey,\r\n            response_type: opts.response_type ? opts.response_type : 'token',\r\n            approval_prompt : opts.approval_prompt ? opts.approval_prompt : 'auto',\r\n            redirect_uri: l2s.realPath(redirectUri),\r\n            scope: scope,      // no scope on L2S now!\r\n            display: opts.display || 'popup',\r\n            state: {\r\n                callback: callback_id,\r\n                state: opts ? opts.state : {},\r\n                redirect_uri: l2s.realPath(redirectUri)\r\n            }\r\n        };\r\n\r\n        console.log(\"qs scopes: \"+qs.scope);\r\n\r\n\r\n        qs.state.display=opts.display;\r\n        // qs.redirect_uri = l2s.realPath(qs.redirectUri);\r\n        //qs.state.auth=auth;\r\n        qs.state = JSON.stringify(qs.state);\r\n\r\n        var url = l2s.qs(auth, qs);\r\n\r\n        console.log(\"auth url: \"+url);\r\n        console.log(\">>redirect URL: \" + redirectUri + \"  /  \" + qs.redirect_uri);\r\n\r\n\r\n        if (opts.display && opts.display === \"none\") {\r\n\r\n            // create hidden iframe with id l2s_iframe\r\n            l2s.iframe(url, \"l2s_iframe\");\r\n\r\n            timer = setTimeout(function () {\r\n                console.log(\"timeout: \" + responded);\r\n                if (!responded && callback) {\r\n                    timeout = true;\r\n                    // remove hidden iframe if exists\r\n                    l2s.remove(\"l2s_iframe\");\r\n                    callback({ error: { code: \"timeout\", message: \"Timeout...\" } });\r\n                }\r\n            }, 10000);\r\n        }\r\n        else {\r\n            var popup = l2s.popup(url, qs.redirect_uri, opts.window_width || 600, opts.window_height || 600);\r\n\r\n            timer = setInterval(function () {\r\n                //console.log('.');\r\n                if (!popup || popup.closed) {\r\n                    clearInterval(timer);\r\n                    if (!responded) {\r\n                        var error = {\r\n                            code: \"cancelled\",\r\n                            message: \"Login has been cancelled\"\r\n                        };\r\n\r\n                        if (!popup) {\r\n                            error = {\r\n                                code: 'blocked',\r\n                                message: 'Popup was blocked'\r\n                            };\r\n\r\n                        }\r\n\r\n                        if (callback) callback({ error: error });\r\n                        console.log(\"complete failed error\", { error: error });\r\n\r\n                        //self.emit(\"complete failed error\", {error:error, network:p.network });\r\n                    }\r\n                }\r\n            }, 100);\r\n        }\r\n        //alert(\"zen: \"+url+\"  / \"+qs.redirect_uri);\r\n    },\r\n\r\n    //\r\n    // Trigger a clientside Popup\r\n    // This has been augmented to support PhoneGap\r\n    //\r\n    popup: function (url, redirect_uri, windowWidth, windowHeight) {\r\n\r\n\r\n        var documentElement = document.documentElement;\r\n\r\n        // Multi Screen Popup Positioning (http://stackoverflow.com/a/16861050)\r\n        //   Credit: http://www.xtf.dk/2011/08/center-new-popup-window-even-on.html\r\n        // Fixes dual-screen position                         Most browsers      Firefox\r\n        var dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : screen.left;\r\n        var dualScreenTop = window.screenTop !== undefined ? window.screenTop : screen.top;\r\n\r\n        var width = window.innerWidth || documentElement.clientWidth || screen.width;\r\n        var height = window.innerHeight || documentElement.clientHeight || screen.height;\r\n\r\n        var left = ((width - windowWidth) / 2) + dualScreenLeft;\r\n        var top = ((height - windowHeight) / 2) + dualScreenTop;\r\n\r\n        // Create a function for reopening the popup, and assigning events to the new popup object\r\n        // This is a fix whereby triggering the\r\n        var open = function (url) {\r\n\r\n            // Trigger callback\r\n            var popup = window.open(\r\n                url,\r\n                '_blank',\r\n                    \"scrollbars=yes,resizeable=true,height=\" + windowHeight + \",width=\" + windowWidth + \",left=\" + left + \",top=\" + top\r\n            );\r\n\r\n\r\n            // PhoneGap support\r\n            // Add an event listener to listen to the change in the popup windows URL\r\n            // This must appear before popup.focus();\r\n            if (popup && popup.addEventListener) {\r\n\r\n                popup.addEventListener('loadstart', function (e) {\r\n                    console.log(\"loadstart\" + e.url);\r\n\r\n\r\n                });\r\n                popup.addEventListener('load', function (e) {\r\n                    console.log(\"load\" + e.url);\r\n\r\n\r\n                });\r\n            }\r\n\r\n            //\r\n            // focus on this popup\r\n            //\r\n            if (popup && popup.focus) {\r\n                popup.focus();\r\n            }\r\n\r\n            return popup;\r\n        };\r\n\r\n        //\r\n        // Call the open() function with the initial path\r\n        //\r\n        // OAuth redirect, fixes URI fragments from being lost in Safari\r\n        // (URI Fragments within 302 Location URI are lost over HTTPS)\r\n        // Loading the redirect.html before triggering the OAuth Flow seems to fix it.\r\n        //\r\n        // FIREFOX, decodes URL fragments when calling location.hash.\r\n        //  - This is bad if the value contains break points which are escaped\r\n        //  - Hence the url must be encoded twice as it contains breakpoints.\r\n        if (navigator.userAgent.indexOf('Safari') !== -1 && navigator.userAgent.indexOf('Chrome') === -1) {\r\n            url = redirect_uri + \"#oauth_redirect=\" + encodeURIComponent(encodeURIComponent(url));\r\n        }\r\n\r\n        return open(url);\r\n    },\r\n\r\n\r\n    RPC : function (url,callback){\r\n        var timer;\r\n        var timeout = false;\r\n        var responded = false;\r\n\r\n        if (!l2s.rpcInitialized)\r\n        {\r\n            console.log(\"listen rpc message\");\r\n            if (window.addEventListener) {\r\n                window.addEventListener(\"message\", l2s.listenMessage, false);\r\n            } else {\r\n                window.attachEvent(\"onmessage\", l2s.listenMessage);\r\n            }\r\n\r\n            l2s.rpcInitialized=true;\r\n        }\r\n\r\n        var popup;\r\n\r\n        // Create a global listener to capture events triggered out of scope\r\n        var cbId = l2s.globalEvent(function (obj) {\r\n\r\n            try {\r\n                if (popup && !popup.closed) popup.close();\r\n            }\r\n            catch (e) { }\r\n\r\n\r\n            if (timer) {\r\n                console.log(\"clear timer\");\r\n                clearInterval(timer);\r\n            }\r\n\r\n            // remove hidden iframe if exists\r\n            l2s.remove(\"l2s_iframe\");\r\n\r\n            if (timeout) {\r\n                console.log(\"already timed out... ignore callback\");\r\n                return;\r\n            }\r\n\r\n            //\r\n            // Cancel the popup close listener\r\n            responded = true;\r\n\r\n            //\r\n            // Handle these response using the local\r\n            // Trigger on the parent\r\n            if (!obj.error) {\r\n\r\n                // Save on the parent window the new credentials\r\n                // This fixes an IE10 bug i think... atleast it does for me.\r\n                //utils.store(obj.network,obj);\r\n\r\n                // Trigger local complete events\r\n                /* self.emit(\"complete success login auth.login auth\", {\r\n                 network : obj.network,\r\n                 authResponse : obj\r\n                 });*/\r\n\r\n                callback(obj);\r\n\r\n                //if (callback) callback(obj);\r\n\r\n                //console.log(\"complete success login auth.login auth\");\r\n            }\r\n            else {\r\n                // Trigger local complete events\r\n                /*   self.emit(\"complete error failed auth.failed\", {\r\n                 error : obj.error\r\n                 });*/\r\n\r\n                //if (callback) callback({ error: obj.error });\r\n\r\n                callback(obj);\r\n\r\n                //console.log(\"emit complete error failt auth.failed\");\r\n            }\r\n        });\r\n\r\n\r\n        var url = l2s.qs(url, {callback: cbId});\r\n\r\n\r\n        console.log(\"CALLBACKID: \"+cbId+ \" : \"+url);\r\n\r\n        popup=l2s.popup(url,null,800,600);\r\n\r\n        timer = setInterval(function () {\r\n            //console.log('.');\r\n            if (!popup || popup.closed) {\r\n                clearInterval(timer);\r\n                if (!responded) {\r\n                    var error = {\r\n                        code: \"cancelled\",\r\n                        message: \"Login has been cancelled\"\r\n                    };\r\n\r\n                    if (!popup) {\r\n                        error = {\r\n                            code: 'blocked',\r\n                            message: 'Popup was blocked'\r\n                        };\r\n                    }\r\n\r\n                    //if (callback) callback({ error: error });\r\n\r\n                    l2s.executeCallBack(cbId,{ error: error });\r\n\r\n\r\n                    //self.emit(\"complete failed error\", {error:error, network:p.network });\r\n                }\r\n            }\r\n        }, 100);\r\n    },\r\n\r\n    executeCallBack: function (cb,msg)\r\n    {\r\n        // Call the globalEvent function on the parent\r\n        if (cb in window) {\r\n\r\n            // its safer to pass back a string to the parent, rather than an object/array\r\n            // Better for IE8\r\n            var str = JSON.stringify(msg);\r\n\r\n            try {\r\n                parent[cb](msg);\r\n            }\r\n            catch (e) {\r\n                // \"Error thrown whilst executing parent callback\"\r\n            }\r\n        }\r\n        else {\r\n            console.log(\"Callback \"+cb+\" not registered\");\r\n\r\n        }\r\n    },\r\n\r\n    listenMessage: function(msg) {\r\n        var cb = msg.data.callback;\r\n\r\n        console.log(\"postmessage: \"+JSON.stringify(msg.data));\r\n\r\n        if (cb) {\r\n            console.log(\"cb: \" + cb);\r\n\r\n            try {\r\n                delete msg.data.callback;\r\n            } catch (e) {\r\n            }\r\n\r\n            l2s.executeCallBack(cb, msg.data);\r\n        }\r\n        //alert(msg);\r\n    }\r\n}\r\n\r\nl2s.responseHandler(window, window.opener || window.parent);","'use strict';\r\n\r\n/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\r\n *     Any commits to this file should be reviewed with security in mind.  *\r\n *   Changes to this file can potentially create security vulnerabilities. *\r\n *          An approval from 2 Core members with history of modifying      *\r\n *                         this file is required.                          *\r\n *                                                                         *\r\n *  Does the change somehow allow for arbitrary javascript to be executed? *\r\n *    Or allows for someone to change the prototype of built-in objects?   *\r\n *     Or gives undesired access to variables likes document or window?    *\r\n * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */\r\n\r\nvar $sanitizeMinErr = angular.$$minErr('$sanitize');\r\n\r\n/**\r\n * @ngdoc module\r\n * @name ngSanitize\r\n * @description\r\n *\r\n * # ngSanitize\r\n *\r\n * The `ngSanitize` module provides functionality to sanitize HTML.\r\n *\r\n *\r\n * <div doc-module-components=\"ngSanitize\"></div>\r\n *\r\n * See {@link ngSanitize.$sanitize `$sanitize`} for usage.\r\n */\r\n\r\n/*\r\n * HTML Parser By Misko Hevery (misko@hevery.com)\r\n * based on:  HTML Parser By John Resig (ejohn.org)\r\n * Original code by Erik Arvidsson, Mozilla Public License\r\n * http://erik.eae.net/simplehtmlparser/simplehtmlparser.js\r\n *\r\n * // Use like so:\r\n * htmlParser(htmlString, {\r\n *     start: function(tag, attrs, unary) {},\r\n *     end: function(tag) {},\r\n *     chars: function(text) {},\r\n *     comment: function(text) {}\r\n * });\r\n *\r\n */\r\n\r\n\r\n/**\r\n * @ngdoc service\r\n * @name $sanitize\r\n * @kind function\r\n *\r\n * @description\r\n *   The input is sanitized by parsing the HTML into tokens. All safe tokens (from a whitelist) are\r\n *   then serialized back to properly escaped html string. This means that no unsafe input can make\r\n *   it into the returned string, however, since our parser is more strict than a typical browser\r\n *   parser, it's possible that some obscure input, which would be recognized as valid HTML by a\r\n *   browser, won't make it through the sanitizer. The input may also contain SVG markup.\r\n *   The whitelist is configured using the functions `aHrefSanitizationWhitelist` and\r\n *   `imgSrcSanitizationWhitelist` of {@link ng.$compileProvider `$compileProvider`}.\r\n *\r\n * @param {string} html HTML input.\r\n * @returns {string} Sanitized HTML.\r\n *\r\n * @example\r\n <example module=\"sanitizeExample\" deps=\"angular-sanitize.js\">\r\n <file name=\"index.html\">\r\n <script>\r\n angular.module('sanitizeExample', ['ngSanitize'])\r\n .controller('ExampleController', ['$scope', '$sce', function($scope, $sce) {\r\n             $scope.snippet =\r\n               '<p style=\"color:blue\">an html\\n' +\r\n               '<em onmouseover=\"this.textContent=\\'PWN3D!\\'\">click here</em>\\n' +\r\n               'snippet</p>';\r\n             $scope.deliberatelyTrustDangerousSnippet = function() {\r\n               return $sce.trustAsHtml($scope.snippet);\r\n             };\r\n           }]);\r\n </script>\r\n <div ng-controller=\"ExampleController\">\r\n Snippet: <textarea ng-model=\"snippet\" cols=\"60\" rows=\"3\"></textarea>\r\n <table>\r\n <tr>\r\n <td>Directive</td>\r\n <td>How</td>\r\n <td>Source</td>\r\n <td>Rendered</td>\r\n </tr>\r\n <tr id=\"bind-html-with-sanitize\">\r\n <td>ng-bind-html</td>\r\n <td>Automatically uses $sanitize</td>\r\n <td><pre>&lt;div ng-bind-html=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\r\n <td><div ng-bind-html=\"snippet\"></div></td>\r\n </tr>\r\n <tr id=\"bind-html-with-trust\">\r\n <td>ng-bind-html</td>\r\n <td>Bypass $sanitize by explicitly trusting the dangerous value</td>\r\n <td>\r\n <pre>&lt;div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"&gt;\r\n &lt;/div&gt;</pre>\r\n </td>\r\n <td><div ng-bind-html=\"deliberatelyTrustDangerousSnippet()\"></div></td>\r\n </tr>\r\n <tr id=\"bind-default\">\r\n <td>ng-bind</td>\r\n <td>Automatically escapes</td>\r\n <td><pre>&lt;div ng-bind=\"snippet\"&gt;<br/>&lt;/div&gt;</pre></td>\r\n <td><div ng-bind=\"snippet\"></div></td>\r\n </tr>\r\n </table>\r\n </div>\r\n </file>\r\n <file name=\"protractor.js\" type=\"protractor\">\r\n it('should sanitize the html snippet by default', function() {\r\n       expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\r\n         toBe('<p>an html\\n<em>click here</em>\\nsnippet</p>');\r\n     });\r\n\r\n it('should inline raw snippet if bound to a trusted value', function() {\r\n       expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).\r\n         toBe(\"<p style=\\\"color:blue\\\">an html\\n\" +\r\n              \"<em onmouseover=\\\"this.textContent='PWN3D!'\\\">click here</em>\\n\" +\r\n              \"snippet</p>\");\r\n     });\r\n\r\n it('should escape snippet without any filter', function() {\r\n       expect(element(by.css('#bind-default div')).getInnerHtml()).\r\n         toBe(\"&lt;p style=\\\"color:blue\\\"&gt;an html\\n\" +\r\n              \"&lt;em onmouseover=\\\"this.textContent='PWN3D!'\\\"&gt;click here&lt;/em&gt;\\n\" +\r\n              \"snippet&lt;/p&gt;\");\r\n     });\r\n\r\n it('should update', function() {\r\n       element(by.model('snippet')).clear();\r\n       element(by.model('snippet')).sendKeys('new <b onclick=\"alert(1)\">text</b>');\r\n       expect(element(by.css('#bind-html-with-sanitize div')).getInnerHtml()).\r\n         toBe('new <b>text</b>');\r\n       expect(element(by.css('#bind-html-with-trust div')).getInnerHtml()).toBe(\r\n         'new <b onclick=\"alert(1)\">text</b>');\r\n       expect(element(by.css('#bind-default div')).getInnerHtml()).toBe(\r\n         \"new &lt;b onclick=\\\"alert(1)\\\"&gt;text&lt;/b&gt;\");\r\n     });\r\n </file>\r\n </example>\r\n */\r\nfunction $SanitizeProvider() {\r\n    this.$get = ['$$sanitizeUri', function($$sanitizeUri) {\r\n        return function(html) {\r\n            var buf = [];\r\n            htmlParser(html, htmlSanitizeWriter(buf, function(uri, isImage) {\r\n                return !/^unsafe/.test($$sanitizeUri(uri, isImage));\r\n            }));\r\n            return buf.join('');\r\n        };\r\n    }];\r\n}\r\n\r\nfunction sanitizeText(chars) {\r\n    var buf = [];\r\n    var writer = htmlSanitizeWriter(buf, angular.noop);\r\n    writer.chars(chars);\r\n    return buf.join('');\r\n}\r\n\r\n\r\n// Regular Expressions for parsing tags and attributes\r\nvar START_TAG_REGEXP =\r\n        /^<((?:[a-zA-Z])[\\w:-]*)((?:\\s+[\\w:-]+(?:\\s*=\\s*(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>\\s]+))?)*)\\s*(\\/?)\\s*(>?)/,\r\n    END_TAG_REGEXP = /^<\\/\\s*([\\w:-]+)[^>]*>/,\r\n    ATTR_REGEXP = /([\\w:-]+)(?:\\s*=\\s*(?:(?:\"((?:[^\"])*)\")|(?:'((?:[^'])*)')|([^>\\s]+)))?/g,\r\n    BEGIN_TAG_REGEXP = /^</,\r\n    BEGING_END_TAGE_REGEXP = /^<\\//,\r\n    COMMENT_REGEXP = /<!--(.*?)-->/g,\r\n    DOCTYPE_REGEXP = /<!DOCTYPE([^>]*?)>/i,\r\n    CDATA_REGEXP = /<!\\[CDATA\\[(.*?)]]>/g,\r\n    SURROGATE_PAIR_REGEXP = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g,\r\n// Match everything outside of normal chars and \" (quote character)\r\n    NON_ALPHANUMERIC_REGEXP = /([^\\#-~| |!])/g;\r\n\r\n\r\n// Good source of info about elements and attributes\r\n// http://dev.w3.org/html5/spec/Overview.html#semantics\r\n// http://simon.html5.org/html-elements\r\n\r\n// Safe Void Elements - HTML5\r\n// http://dev.w3.org/html5/spec/Overview.html#void-elements\r\nvar voidElements = makeMap(\"area,br,col,hr,img,wbr\");\r\n\r\n// Elements that you can, intentionally, leave open (and which close themselves)\r\n// http://dev.w3.org/html5/spec/Overview.html#optional-tags\r\nvar optionalEndTagBlockElements = makeMap(\"colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr\"),\r\n    optionalEndTagInlineElements = makeMap(\"rp,rt\"),\r\n    optionalEndTagElements = angular.extend({},\r\n        optionalEndTagInlineElements,\r\n        optionalEndTagBlockElements);\r\n\r\n// Safe Block Elements - HTML5\r\nvar blockElements = angular.extend({}, optionalEndTagBlockElements, makeMap(\"address,article,\" +\r\n    \"aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,\" +\r\n    \"h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul\"));\r\n\r\n// Inline Elements - HTML5\r\nvar inlineElements = angular.extend({}, optionalEndTagInlineElements, makeMap(\"a,abbr,acronym,b,\" +\r\n    \"bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,\" +\r\n    \"samp,small,span,strike,strong,sub,sup,time,tt,u,var\"));\r\n\r\n// SVG Elements\r\n// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Elements\r\n// Note: the elements animate,animateColor,animateMotion,animateTransform,set are intentionally omitted.\r\n// They can potentially allow for arbitrary javascript to be executed. See #11290\r\nvar svgElements = makeMap(\"circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,\" +\r\n    \"hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,\" +\r\n    \"radialGradient,rect,stop,svg,switch,text,title,tspan,use\");\r\n\r\n// Special Elements (can contain anything)\r\nvar specialElements = makeMap(\"script,style\");\r\n\r\nvar validElements = angular.extend({},\r\n    voidElements,\r\n    blockElements,\r\n    inlineElements,\r\n    optionalEndTagElements,\r\n    svgElements);\r\n\r\n//Attributes that have href and hence need to be sanitized\r\nvar uriAttrs = makeMap(\"background,cite,href,longdesc,src,usemap,xlink:href\");\r\n\r\nvar htmlAttrs = makeMap('abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,' +\r\n    'color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,' +\r\n    'ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,' +\r\n    'scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,' +\r\n    'valign,value,vspace,width');\r\n\r\n// SVG attributes (without \"id\" and \"name\" attributes)\r\n// https://wiki.whatwg.org/wiki/Sanitization_rules#svg_Attributes\r\nvar svgAttrs = makeMap('accent-height,accumulate,additive,alphabetic,arabic-form,ascent,' +\r\n    'baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,' +\r\n    'cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,' +\r\n    'font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,' +\r\n    'height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,' +\r\n    'marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,' +\r\n    'max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,' +\r\n    'path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,' +\r\n    'requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,' +\r\n    'stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,' +\r\n    'stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,' +\r\n    'stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,' +\r\n    'underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,' +\r\n    'width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,' +\r\n    'xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan', true);\r\n\r\nvar validAttrs = angular.extend({},\r\n    uriAttrs,\r\n    svgAttrs,\r\n    htmlAttrs);\r\n\r\nfunction makeMap(str, lowercaseKeys) {\r\n    var obj = {}, items = str.split(','), i;\r\n    for (i = 0; i < items.length; i++) {\r\n        obj[lowercaseKeys ? angular.lowercase(items[i]) : items[i]] = true;\r\n    }\r\n    return obj;\r\n}\r\n\r\n\r\n/**\r\n * @example\r\n * htmlParser(htmlString, {\r\n *     start: function(tag, attrs, unary) {},\r\n *     end: function(tag) {},\r\n *     chars: function(text) {},\r\n *     comment: function(text) {}\r\n * });\r\n *\r\n * @param {string} html string\r\n * @param {object} handler\r\n */\r\nfunction htmlParser(html, handler) {\r\n    if (typeof html !== 'string') {\r\n        if (html === null || typeof html === 'undefined') {\r\n            html = '';\r\n        } else {\r\n            html = '' + html;\r\n        }\r\n    }\r\n    var index, chars, match, stack = [], last = html, text;\r\n    stack.last = function() { return stack[stack.length - 1]; };\r\n\r\n    while (html) {\r\n        text = '';\r\n        chars = true;\r\n\r\n        // Make sure we're not in a script or style element\r\n        if (!stack.last() || !specialElements[stack.last()]) {\r\n\r\n            // Comment\r\n            if (html.indexOf(\"<!--\") === 0) {\r\n                // comments containing -- are not allowed unless they terminate the comment\r\n                index = html.indexOf(\"--\", 4);\r\n\r\n                if (index >= 0 && html.lastIndexOf(\"-->\", index) === index) {\r\n                    if (handler.comment) handler.comment(html.substring(4, index));\r\n                    html = html.substring(index + 3);\r\n                    chars = false;\r\n                }\r\n                // DOCTYPE\r\n            } else if (DOCTYPE_REGEXP.test(html)) {\r\n                match = html.match(DOCTYPE_REGEXP);\r\n\r\n                if (match) {\r\n                    html = html.replace(match[0], '');\r\n                    chars = false;\r\n                }\r\n                // end tag\r\n            } else if (BEGING_END_TAGE_REGEXP.test(html)) {\r\n                match = html.match(END_TAG_REGEXP);\r\n\r\n                if (match) {\r\n                    html = html.substring(match[0].length);\r\n                    match[0].replace(END_TAG_REGEXP, parseEndTag);\r\n                    chars = false;\r\n                }\r\n\r\n                // start tag\r\n            } else if (BEGIN_TAG_REGEXP.test(html)) {\r\n                match = html.match(START_TAG_REGEXP);\r\n\r\n                if (match) {\r\n                    // We only have a valid start-tag if there is a '>'.\r\n                    if (match[4]) {\r\n                        html = html.substring(match[0].length);\r\n                        match[0].replace(START_TAG_REGEXP, parseStartTag);\r\n                    }\r\n                    chars = false;\r\n                } else {\r\n                    // no ending tag found --- this piece should be encoded as an entity.\r\n                    text += '<';\r\n                    html = html.substring(1);\r\n                }\r\n            }\r\n\r\n            if (chars) {\r\n                index = html.indexOf(\"<\");\r\n\r\n                text += index < 0 ? html : html.substring(0, index);\r\n                html = index < 0 ? \"\" : html.substring(index);\r\n\r\n                if (handler.chars) handler.chars(decodeEntities(text));\r\n            }\r\n\r\n        } else {\r\n            // IE versions 9 and 10 do not understand the regex '[^]', so using a workaround with [\\W\\w].\r\n            html = html.replace(new RegExp(\"([\\\\W\\\\w]*)<\\\\s*\\\\/\\\\s*\" + stack.last() + \"[^>]*>\", 'i'),\r\n                function(all, text) {\r\n                    text = text.replace(COMMENT_REGEXP, \"$1\").replace(CDATA_REGEXP, \"$1\");\r\n\r\n                    if (handler.chars) handler.chars(decodeEntities(text));\r\n\r\n                    return \"\";\r\n                });\r\n\r\n            parseEndTag(\"\", stack.last());\r\n        }\r\n\r\n        if (html == last) {\r\n            throw $sanitizeMinErr('badparse', \"The sanitizer was unable to parse the following block \" +\r\n                \"of html: {0}\", html);\r\n        }\r\n        last = html;\r\n    }\r\n\r\n    // Clean up any remaining tags\r\n    parseEndTag();\r\n\r\n    function parseStartTag(tag, tagName, rest, unary) {\r\n        tagName = angular.lowercase(tagName);\r\n        if (blockElements[tagName]) {\r\n            while (stack.last() && inlineElements[stack.last()]) {\r\n                parseEndTag(\"\", stack.last());\r\n            }\r\n        }\r\n\r\n        if (optionalEndTagElements[tagName] && stack.last() == tagName) {\r\n            parseEndTag(\"\", tagName);\r\n        }\r\n\r\n        unary = voidElements[tagName] || !!unary;\r\n\r\n        if (!unary) {\r\n            stack.push(tagName);\r\n        }\r\n\r\n        var attrs = {};\r\n\r\n        rest.replace(ATTR_REGEXP,\r\n            function(match, name, doubleQuotedValue, singleQuotedValue, unquotedValue) {\r\n                var value = doubleQuotedValue\r\n                    || singleQuotedValue\r\n                    || unquotedValue\r\n                    || '';\r\n\r\n                attrs[name] = decodeEntities(value);\r\n            });\r\n        if (handler.start) handler.start(tagName, attrs, unary);\r\n    }\r\n\r\n    function parseEndTag(tag, tagName) {\r\n        var pos = 0, i;\r\n        tagName = angular.lowercase(tagName);\r\n        if (tagName) {\r\n            // Find the closest opened tag of the same type\r\n            for (pos = stack.length - 1; pos >= 0; pos--) {\r\n                if (stack[pos] == tagName) break;\r\n            }\r\n        }\r\n\r\n        if (pos >= 0) {\r\n            // Close all the open elements, up the stack\r\n            for (i = stack.length - 1; i >= pos; i--)\r\n                if (handler.end) handler.end(stack[i]);\r\n\r\n            // Remove the open elements from the stack\r\n            stack.length = pos;\r\n        }\r\n    }\r\n}\r\n\r\nvar hiddenPre=document.createElement(\"pre\");\r\n/**\r\n * decodes all entities into regular string\r\n * @param value\r\n * @returns {string} A string with decoded entities.\r\n */\r\nfunction decodeEntities(value) {\r\n    if (!value) { return ''; }\r\n\r\n    hiddenPre.innerHTML = value.replace(/</g,\"&lt;\");\r\n    // innerText depends on styling as it doesn't display hidden elements.\r\n    // Therefore, it's better to use textContent not to cause unnecessary reflows.\r\n    return hiddenPre.textContent;\r\n}\r\n\r\n/**\r\n * Escapes all potentially dangerous characters, so that the\r\n * resulting string can be safely inserted into attribute or\r\n * element text.\r\n * @param value\r\n * @returns {string} escaped text\r\n */\r\nfunction encodeEntities(value) {\r\n    return value.\r\n        replace(/&/g, '&amp;').\r\n        replace(SURROGATE_PAIR_REGEXP, function(value) {\r\n            var hi = value.charCodeAt(0);\r\n            var low = value.charCodeAt(1);\r\n            return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';';\r\n        }).\r\n        replace(NON_ALPHANUMERIC_REGEXP, function(value) {\r\n            return '&#' + value.charCodeAt(0) + ';';\r\n        }).\r\n        replace(/</g, '&lt;').\r\n        replace(/>/g, '&gt;');\r\n}\r\n\r\n/**\r\n * create an HTML/XML writer which writes to buffer\r\n * @param {Array} buf use buf.jain('') to get out sanitized html string\r\n * @returns {object} in the form of {\r\n *     start: function(tag, attrs, unary) {},\r\n *     end: function(tag) {},\r\n *     chars: function(text) {},\r\n *     comment: function(text) {}\r\n * }\r\n */\r\nfunction htmlSanitizeWriter(buf, uriValidator) {\r\n    var ignore = false;\r\n    var out = angular.bind(buf, buf.push);\r\n    return {\r\n        start: function(tag, attrs, unary) {\r\n            tag = angular.lowercase(tag);\r\n            if (!ignore && specialElements[tag]) {\r\n                ignore = tag;\r\n            }\r\n            if (!ignore && validElements[tag] === true) {\r\n                out('<');\r\n                out(tag);\r\n                angular.forEach(attrs, function(value, key) {\r\n                    var lkey=angular.lowercase(key);\r\n                    var isImage = (tag === 'img' && lkey === 'src') || (lkey === 'background');\r\n                    if (validAttrs[lkey] === true &&\r\n                        (uriAttrs[lkey] !== true || uriValidator(value, isImage))) {\r\n                        out(' ');\r\n                        out(key);\r\n                        out('=\"');\r\n                        out(encodeEntities(value));\r\n                        out('\"');\r\n                    }\r\n                });\r\n                out(unary ? '/>' : '>');\r\n            }\r\n        },\r\n        end: function(tag) {\r\n            tag = angular.lowercase(tag);\r\n            if (!ignore && validElements[tag] === true) {\r\n                out('</');\r\n                out(tag);\r\n                out('>');\r\n            }\r\n            if (tag == ignore) {\r\n                ignore = false;\r\n            }\r\n        },\r\n        chars: function(chars) {\r\n            if (!ignore) {\r\n                out(encodeEntities(chars));\r\n            }\r\n        }\r\n    };\r\n}\r\n\r\n\r\n// define ngSanitize module and register $sanitize service\r\nangular.module('ngSanitize', []).provider('$sanitize', $SanitizeProvider);\r\n\r\n","(function (root, factory) {\r\n  'use strict';\r\n  if (typeof define === 'function' && define.amd) {\r\n    define(factory);\r\n  } else if (typeof module !== 'undefined' && module.exports) {\r\n    module.exports = factory;\r\n  } else {\r\n    root.showAngularStats = factory();\r\n  }\r\n}(window, function() {\r\n  'use strict';\r\n  var autoloadKey = 'showAngularStats_autoload';\r\n  var current = null;\r\n  // define the timer function to use based upon whether or not 'performance is available'\r\n  var timerNow = window.performance && window.performance.now\r\n    ? function() { return window.performance.now(); }\r\n    : function() { return Date.now(); };\r\n\r\n  var lastWatchCountRun = timerNow();\r\n  var watchCountTimeout = null;\r\n  var lastWatchCount = getWatcherCount() || 0;\r\n  var lastDigestLength = 0;\r\n\r\n  var $rootScope;\r\n\r\n  var digestIsHijacked = false;\r\n\r\n  var listeners = {\r\n    digest: [],\r\n    watchCount: [],\r\n    digestLength: []\r\n  };\r\n\r\n  // Hijack $digest to time it and update data on every digest.\r\n  function hijackDigest() {\r\n    if (digestIsHijacked) {\r\n      return;\r\n    }\r\n    digestIsHijacked = true;\r\n    var $rootScope = getRootScope();\r\n    var scopePrototype = Object.getPrototypeOf($rootScope);\r\n    var oldDigest = scopePrototype.$digest;\r\n    scopePrototype.$digest = function $digest() {\r\n      var start = timerNow();\r\n      oldDigest.apply(this, arguments);\r\n      var diff = (timerNow() - start);\r\n      updateData(getWatcherCount(), diff);\r\n    };\r\n  }\r\n\r\n  // check for autoload\r\n/*  var autoloadOptions = sessionStorage[autoloadKey];\r\n  if (autoloadOptions) {\r\n    autoload(JSON.parse(autoloadOptions));\r\n  }*/\r\n\r\n  function autoload(options) {\r\n    if (window.angular && getRootScope()) {\r\n      showAngularStats(options);\r\n    } else {\r\n      // wait for angular to load...\r\n      window.setTimeout(function() {\r\n        autoload(options);\r\n      }, 200);\r\n    }\r\n  }\r\n\r\n  function showAngularStats(opts) {\r\n    // delete the previous one\r\n    if (current) {\r\n      current.$el && current.$el.remove();\r\n      current.active = false;\r\n      current = null;\r\n    }\r\n\r\n    // do nothing if the argument is false\r\n    if (opts === false) {\r\n      sessionStorage.removeItem(autoloadKey);\r\n      return;\r\n    } else {\r\n      opts = angular.extend({\r\n        position: 'top-left',\r\n        digestTimeThreshold: 16,\r\n        autoload: false\r\n      }, opts || {});\r\n    }\r\n\r\n    hijackDigest();\r\n\r\n    // setup the state\r\n    var state = current = { active:true };\r\n\r\n    // auto-load on startup\r\n    if (opts.autoload) {\r\n      sessionStorage.setItem(autoloadKey,JSON.stringify(opts));\r\n    } else {\r\n      sessionStorage.removeItem(autoloadKey);\r\n    }\r\n\r\n    // general variables\r\n    var bodyEl = angular.element(document.body);\r\n    var noDigestSteps = 0;\r\n\r\n    // add the DOM element\r\n    state.$el = angular.element('<div><canvas></canvas><div></div></div>').css({\r\n      position: 'fixed',\r\n      background: 'black',\r\n      borderBottom: '1px solid #666',\r\n      borderRight: '1px solid #666',\r\n      color: 'red',\r\n      fontFamily: 'Courier',\r\n      width: 130,\r\n      zIndex: 9999,\r\n      top: opts.position.indexOf('top') == -1 ? null : 0,\r\n      bottom: opts.position.indexOf('bottom') == -1 ? null : 0,\r\n      right: opts.position.indexOf('right') == -1 ? null : 100,\r\n      left: opts.position.indexOf('left') == -1 ? null : 0,\r\n      textAlign: 'right'\r\n    });\r\n    bodyEl.append(state.$el);\r\n    var $text = state.$el.find('div');\r\n\r\n    // initialize the canvas\r\n    var graphSz = { width: 130, height: 23 };\r\n    var cvs = state.$el.find('canvas').attr(graphSz)[0];\r\n\r\n\r\n    // replace the digest\r\n    listeners.digestLength.push(function(digestLength) {\r\n      addDataToCanvas(null, digestLength);\r\n    });\r\n\r\n    listeners.watchCount.push(function(watchCount) {\r\n      addDataToCanvas(watchCount);\r\n    });\r\n\r\n    function addDataToCanvas(watchCount, digestLength) {\r\n      var averageDigest = digestLength || lastDigestLength;\r\n      var color = (averageDigest > opts.digestTimeThreshold) ? 'red' : 'green';\r\n      lastWatchCount = nullOrUndef(watchCount) ? lastWatchCount : watchCount;\r\n      lastDigestLength = nullOrUndef(digestLength) ? lastDigestLength : digestLength;\r\n      $text.text(lastWatchCount + ' | ' + lastDigestLength.toFixed(2)).css({color:color});\r\n\r\n      if (!digestLength) {\r\n        return;\r\n      }\r\n\r\n      // color the sliver if this is the first step\r\n      var ctx = cvs.getContext('2d');\r\n      if (noDigestSteps > 0) {\r\n        noDigestSteps = 0;\r\n        ctx.fillStyle = '#333';\r\n        ctx.fillRect(graphSz.width - 1, 0, 1, graphSz.height);\r\n      }\r\n\r\n      // mark the point on the graph\r\n      ctx.fillStyle = color;\r\n      ctx.fillRect(graphSz.width-1,Math.max(0,graphSz.height - averageDigest),2,2);\r\n    }\r\n\r\n    //! Shift the canvas to the left.\r\n    function shiftLeft() {\r\n      if (state.active) {\r\n        window.setTimeout(shiftLeft,250);\r\n        var ctx = cvs.getContext('2d');\r\n        var imageData = ctx.getImageData(1,0,graphSz.width-1,graphSz.height);\r\n        ctx.putImageData(imageData,0,0);\r\n        ctx.fillStyle = ((noDigestSteps++)>2) ? 'black' : '#333';\r\n        ctx.fillRect(graphSz.width-1,0,1,graphSz.height);\r\n      }\r\n    }\r\n\r\n    // start everything\r\n    shiftLeft();\r\n    if(!$rootScope.$$phase) {\r\n      $rootScope.$digest();\r\n    }\r\n  }\r\n\r\n  angular.module('angularStats', []).directive('angularStats', function() {\r\n    'use strict';\r\n    return {\r\n      scope: {\r\n        digestLength: '@',\r\n        watchCount: '@',\r\n        watchCountRoot: '@',\r\n        onDigestLengthUpdate: '&?',\r\n        onWatchCountUpdate: '&?'\r\n      },\r\n      link: function(scope, el, attrs) {\r\n        hijackDigest();\r\n\r\n        if (attrs.hasOwnProperty('digestLength')) {\r\n          var digestEl = el;\r\n          if (attrs.digestLength) {\r\n            digestEl = angular.element(el[0].querySelector(attrs.digestLength));\r\n          }\r\n          listeners.digestLength.push(function(length) {\r\n            digestEl.text((length || 0).toFixed(2));\r\n          });\r\n        }\r\n\r\n        if (attrs.hasOwnProperty('watchCount')) {\r\n          var watchCountRoot;\r\n          var watchCountEl = el;\r\n          if (scope.watchCount) {\r\n            watchCountEl = angular.element(el[0].querySelector(attrs.watchCount));\r\n          }\r\n\r\n          if (scope.watchCountRoot) {\r\n            if (scope.watchCountRoot === 'this') {\r\n              watchCountRoot = el;\r\n            } else {\r\n              // In the case this directive is being compiled and it's not in the dom,\r\n              // we're going to do the find from the root of what we have...\r\n              var rootParent;\r\n              if (attrs.hasOwnProperty('watchCountOfChild')) {\r\n                rootParent = el[0];\r\n              } else {\r\n                rootParent = findRootOfElement(el);\r\n              }\r\n              watchCountRoot = angular.element(rootParent.querySelector(scope.watchCountRoot));\r\n              if (!watchCountRoot.length) {\r\n                throw new Error('no element at selector: ' + scope.watchCountRoot);\r\n              }\r\n            }\r\n          }\r\n\r\n          listeners.watchCount.push(function(count) {\r\n            var watchCount = count;\r\n            if (watchCountRoot) {\r\n              watchCount = getWatcherCountForElement(watchCountRoot);\r\n            }\r\n            watchCountEl.text(watchCount);\r\n          });\r\n        }\r\n\r\n        if (scope.onWatchCountUpdate) {\r\n          listeners.watchCount.push(function(count) {\r\n            scope.onWatchCountUpdate({watchCount: count});\r\n          });\r\n        }\r\n\r\n        if (scope.onDigestLengthUpdate) {\r\n          listeners.digestLength.push(function(length) {\r\n            scope.onDigestLengthUpdate({digestLength: length});\r\n          });\r\n        }\r\n      }\r\n    };\r\n\r\n    function findRootOfElement(el) {\r\n      var parent = el[0];\r\n      while (parent.parentElement) {\r\n        parent = parent.parentElement;\r\n      }\r\n      return parent;\r\n    }\r\n  });\r\n\r\n  return showAngularStats;\r\n\r\n\r\n  // UTILITY FUNCTIONS\r\n\r\n  function getRootScope() {\r\n    if ($rootScope) {\r\n      return $rootScope;\r\n    }\r\n    var scopeEl = document.querySelector('.ng-scope');\r\n    if (!scopeEl) {\r\n      return null;\r\n    }\r\n    $rootScope = angular.element(scopeEl).scope().$root;\r\n    return $rootScope;\r\n  }\r\n\r\n  // Uses timeouts to ensure that this is only run every 300ms (it's a perf bottleneck)\r\n  function getWatcherCount() {\r\n    window.clearTimeout(watchCountTimeout);\r\n    var now = timerNow();\r\n    if (now - lastWatchCountRun > 300) {\r\n      lastWatchCountRun = now;\r\n      lastWatchCount = getWatcherCountForScope();\r\n    } else {\r\n      watchCountTimeout = window.setTimeout(function() {\r\n        updateData(getWatcherCount());\r\n      }, 350);\r\n    }\r\n    return lastWatchCount;\r\n  }\r\n\r\n  function getWatcherCountForElement(element) {\r\n    var startingScope = getClosestChildScope(element);\r\n    return getWatcherCountForScope(startingScope);\r\n  }\r\n\r\n  function getClosestChildScope(element) {\r\n    element = angular.element(element);\r\n    var scope = element.scope();\r\n    if (!scope) {\r\n      element = angular.element(element.querySelector('.ng-scope'));\r\n      scope = element.scope();\r\n    }\r\n    return scope;\r\n  }\r\n\r\n  function getWatchersFromScope(scope) {\r\n    return scope && scope.$$watchers ? scope.$$watchers : [];\r\n  }\r\n\r\n  // iterate through listeners to call them with the watchCount and digestLength\r\n  function updateData(watchCount, digestLength) {\r\n    // update the listeners\r\n    if (!nullOrUndef(watchCount)) {\r\n      angular.forEach(listeners.watchCount, function(listener) {\r\n        listener(watchCount);\r\n      });\r\n    }\r\n    if (!nullOrUndef(digestLength)) {\r\n      angular.forEach(listeners.digestLength, function(listener) {\r\n        listener(digestLength);\r\n      });\r\n    }\r\n  }\r\n\r\n  function nullOrUndef(item) {\r\n    return item === null || item === undefined;\r\n  }\r\n\r\n  function getWatcherCountForScope(scope) {\r\n    var count = 0;\r\n    iterateScopes(scope, function(scope) {\r\n      count += getWatchersFromScope(scope).length;\r\n    });\r\n    return count;\r\n  }\r\n\r\n  function iterateScopes(current, fn) {\r\n    if (typeof current === 'function') {\r\n      fn = current;\r\n      current = null;\r\n    }\r\n    current = current || getRootScope();\r\n    current = _makeScopeReference(current);\r\n    if (!current) {\r\n      return;\r\n    }\r\n    var ret = fn(current);\r\n    if (ret === false) {\r\n      return ret;\r\n    }\r\n    return iterateChildren(current, fn);\r\n  }\r\n\r\n  function iterateSiblings(start, fn) {\r\n    var ret;\r\n    while (!!(start = start.$$nextSibling)) {\r\n      ret = fn(start);\r\n      if (ret === false) {\r\n        break;\r\n      }\r\n\r\n      ret = iterateChildren(start, fn);\r\n      if (ret === false) {\r\n        break;\r\n      }\r\n    }\r\n    return ret;\r\n  }\r\n\r\n  function iterateChildren(start, fn) {\r\n    var ret;\r\n    while (!!(start = start.$$childHead)) {\r\n      ret = fn(start);\r\n      if (ret === false) {\r\n        break;\r\n      }\r\n\r\n      ret = iterateSiblings(start, fn);\r\n      if (ret === false) {\r\n        break;\r\n      }\r\n    }\r\n    return ret;\r\n  }\r\n\r\n\r\n  function getScopeById(id) {\r\n    var myScope = null;\r\n    iterateScopes(function(scope) {\r\n      if (scope.$id === id) {\r\n        myScope = scope;\r\n        return false;\r\n      }\r\n    });\r\n    return myScope;\r\n  }\r\n\r\n  function _makeScopeReference(scope) {\r\n    if (_isScopeId(scope)) {\r\n      scope = getScopeById(scope);\r\n    }\r\n    return scope;\r\n  }\r\n\r\n  function _isScopeId(scope) {\r\n    return typeof scope === 'string' || typeof scope === 'number';\r\n  }\r\n\r\n}));\r\n","/*\n * promise-tracker - v2.0.0 - 2014-04-11\n * http://github.com/ajoslin/angular-promise-tracker\n * Created by Andy Joslin; Licensed under Public Domain\n */\n\n(function() {\n\nangular.module('ajoslin.promise-tracker', [])\n\n.provider('promiseTracker', function() {\n  var trackers = {};\n\n  this.$get = ['$q', '$timeout', function($q, $timeout) {\n    function cancelTimeout(promise) {\n      if (promise) {\n        $timeout.cancel(promise);\n      }\n    }\n\n    return function PromiseTracker(options) {\n      //do new if user doesn't\n      if (!(this instanceof PromiseTracker)) {\n        return new PromiseTracker(options);\n      }\n\n      options = options || {};\n\n      //Array of promises being tracked\n      var tracked = [];\n      var self = this;\n\n      //Allow an optional \"minimum duration\" that the tracker has to stay active for.\n      var minDuration = options.minDuration;\n      //Allow a delay that will stop the tracker from activating until that time is reached\n      var activationDelay = options.activationDelay;\n\n      var minDurationPromise;\n      var activationDelayPromise;\n\n      self.active = function() {\n        //Even if we have a promise in our tracker, we aren't active until delay is elapsed\n        if (activationDelayPromise) {\n          return false;\n        }\n        return tracked.length > 0;\n      };\n\n      self.tracking = function() {\n        //Even if we aren't active, we could still have a promise in our tracker\n        return tracked.length > 0;\n      };\n\n      self.destroy = self.cancel = function() {\n        minDurationPromise = cancelTimeout(minDurationPromise);\n        activationDelayPromise = cancelTimeout(activationDelayPromise);\n        for (var i=tracked.length-1; i>=0; i--) {\n          tracked[i].resolve();\n        }\n        tracked.length = 0;\n      };\n\n      //Create a promise that will make our tracker active until it is resolved.\n      // @return deferred - our deferred object that is being tracked\n      self.createPromise = function() {\n        var deferred = $q.defer();\n        tracked.push(deferred);\n\n        //If the tracker was just inactive and this the first in the list of\n        //promises, we reset our delay and minDuration\n        //again.\n        if (tracked.length === 1) {\n          if (activationDelay) {\n            activationDelayPromise = $timeout(function() {\n              activationDelayPromise = cancelTimeout(activationDelayPromise);\n              startMinDuration();\n            }, activationDelay);\n          } else {\n            startMinDuration();\n          }\n        }\n\n        deferred.promise.then(onDone(false), onDone(true));\n\n        return deferred;\n\n        function startMinDuration() {\n          if (minDuration) {\n            minDurationPromise = $timeout(angular.noop, minDuration);\n          }\n        }\n\n        //Create a callback for when this promise is done. It will remove our\n        //tracked promise from the array if once minDuration is complete\n        function onDone(isError) {\n          return function(value) {\n            (minDurationPromise || $q.when()).then(function() {\n              var index = tracked.indexOf(deferred);\n              tracked.splice(index, 1);\n\n              //If this is the last promise, cleanup the timeouts\n              //for activationDelay\n              if (tracked.length === 0) {\n                activationDelayPromise = cancelTimeout(activationDelayPromise);\n              }\n            });\n          };\n        }\n      };\n\n      self.addPromise = function(promise) {\n        var then = promise && (promise.then || promise.$then ||\n                               (promise.$promise && promise.$promise.then));\n        if (!then) {\n          throw new Error(\"promiseTracker#addPromise expects a promise object!\");\n        }\n        var deferred = self.createPromise();\n\n        //When given promise is done, resolve our created promise\n        //Allow $then for angular-resource objects\n        then(function success(value) {\n          deferred.resolve(value);\n          return value;\n        }, function error(value) {\n          deferred.reject(value);\n          return $q.reject(value);\n        });\n\n        return deferred;\n      };\n    };\n  }];\n});\n\n}());","(function ($) {\r\n    $.extend({\r\n        notify: function (content, options) {\r\n            // defaults\r\n            var settings = $.extend({\r\n                animationIn: 'fadeInDown', // [string or false] animation from animate.less\r\n                animationOut: 'fadeOutUp', // [string or false] animation from animate.less\r\n                autoHide: 5000,            // [integer or false] time in ms before hiding notif\r\n                dismissable: true,         // [boolean] hide notif on click\r\n                icon: null,                // [string] the name of an icon from FontAwesome (http://fortawesome.github.io/Font-Awesome/icons/)\r\n                iconPosition: 'left',      // [string] position of the icon relative to the text\r\n                position: 'top right',     // [string] position x and y of the notif\r\n                type: 'info',              // [string] type of notif (info, warning, error, success)\r\n\r\n                onShow: null,              // [function] callback\r\n                onHide: null,              // [function] callback\r\n            }, options),\r\n            s = settings;\r\n\r\n            // check type\r\n            var _validTypes = ['info', 'warning', 'error', 'danger', 'success'];\r\n            if (_validTypes.indexOf(s.type) < 0) {\r\n                s.type = 'info';\r\n            }\r\n\r\n            // add container\r\n            var $container = $('#notify-container');\r\n            if ($container.length === 0) {\r\n                $container = $('<div></div>').addClass(s.position).prop('id', 'notify-container').prependTo('body');\r\n            }\r\n\r\n            // build content\r\n            var $content = $('<p></p>').html(content);\r\n            if (s.icon) {\r\n                var _contentClasses = ['fa', 'fa-' + s.icon, 'fa-' + s.iconPosition];\r\n                $content.addClass(_contentClasses.join(' '));\r\n            }\r\n\r\n            // build notif\r\n            var _itemClasses = ['notify', s.type];\r\n            if (s.animationIn) {\r\n                _itemClasses.push('animated', s.animationIn);\r\n            }\r\n            if (s.dismissable) {\r\n                _itemClasses.push('dismissable');\r\n\r\n            }\r\n            var $notif = $('<div></div>').addClass(_itemClasses.join(' ')).attr('role', 'alert').append($content);\r\n            if (s.dismissable) {\r\n                $notif.prepend('<button type=\"button\" class=\"close\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button>');\r\n            }\r\n\r\n            // show notif\r\n            $notif.appendTo($container);\r\n            if (typeof s.onShow === 'function') {\r\n                s.onShow();\r\n            }\r\n\r\n            // autohide\r\n            if (s.autoHide) {\r\n                window.setTimeout(_hide, s.autoHide);\r\n            }\r\n\r\n            // close notif\r\n            function _hide() {\r\n                if (s.animationOut) {\r\n                    $notif.one('webkitAnimationEnd oanimationend msAnimationEnd animationend', function (e) {\r\n                        $notif.remove();\r\n                    });\r\n                    $notif.removeClass(s.animationIn).addClass(s.animationOut);\r\n                } else {\r\n                    $(this).remove();\r\n                }\r\n                if (typeof s.onHide === 'function') {\r\n                    s.onHide();\r\n                }\r\n            }\r\n\r\n            if (s.dismissable) {\r\n                $notif.find('.close').on('click touch', _hide);\r\n            }\r\n\r\n            return this;\r\n        }\r\n    });\r\n})(jQuery);\r\n","angular.module(\"cr.config\",[]).constant(\"cfg\",{Name:\"crprod - 0.0.133\",ClassicWebDomain:\"https://prod.chronorace.be\",WebApiUrl:\"https://prod.chronorace.be/api/\",EventApiUrl:\"https://prod.chronorace.be/api/\",ActiveDirectoryAppId:\"458218e3-a212-4dc7-91c0-66818c19e970\",EnableTranslations:!0,EnablePerformanceMonitor:!1,UciDhService:\"/api/results/uci/dh/\",ResultsService:\"/api/results/generic/\",ImagePath:\"https://chronorace.blob.core.windows.net/webresources/img/\"}),angular.module(\"cr.common\",[\"angularStats\",\"cr.config\",\"ajoslin.promise-tracker\"]),angular.module(\"cr.common\").filter(\"localTime\",[\"$locale\",function($locale){var convertFormatForMoment=function(format){return format.replace(/d/g,\"D\").replace(/y/g,\"Y\")};return function(input,format){if(input){var m=null;return\"string\"==typeof input?m=moment(input,[moment.ISO_8601,convertFormatForMoment($locale.DATETIME_FORMATS.fullDate),convertFormatForMoment($locale.DATETIME_FORMATS.longDate),convertFormatForMoment($locale.DATETIME_FORMATS.medium),convertFormatForMoment($locale.DATETIME_FORMATS.mediumDate),convertFormatForMoment($locale.DATETIME_FORMATS.mediumTime),convertFormatForMoment($locale.DATETIME_FORMATS[\"short\"]),convertFormatForMoment($locale.DATETIME_FORMATS.shortDate),convertFormatForMoment($locale.DATETIME_FORMATS.shortTime)]):input instanceof Date?m=moment(input):input.isMoment&&input.isMoment()&&(m=input),console.log(\"USERS LOCALE: \",$locale),format||(format=$locale.DATETIME_FORMATS.shortDate),m.format(convertFormatForMoment(format))}return input}}]),angular.module(\"cr.common\").filter(\"mstotime\",function(){return function(input){if(!input)return\"\";var ms=input%1e3;input=(input-ms)/1e3;var secs=input%60+\"\";input=(input-+secs)/60;var mins=input%60+\"\",hrs=(input-+mins)/60+\"\";return+hrs<10&&(hrs=\"0\"+hrs),+mins<10&&(mins=\"0\"+mins),+secs<10&&(secs=\"0\"+secs),hrs+\":\"+mins+\":\"+secs}});var cr;!function(cr){var common;!function(common){var logDecorator=function(){function logDecorator(){}return logDecorator.install=function($delegate){return console.log(\"CR COMMON GETINSTANCE\"),$delegate.getInstance=function(context){return{log:logDecorator.enhanceWithContext($delegate.log,context),info:logDecorator.enhanceWithContext($delegate.info,context),warn:logDecorator.enhanceWithContext($delegate.warn,context),debug:logDecorator.enhanceWithContext($delegate.debug,context),error:logDecorator.enhanceWithContext($delegate.error,context)}},$delegate},logDecorator.enhance=function(method){return function(){var modifiedArguments=[].slice.call(arguments);modifiedArguments[0]=[(new Date).toLocaleTimeString()+\" \"]+modifiedArguments[0],method.apply(null,modifiedArguments)}},logDecorator.enhanceWithContext=function(method,context){return function(){var modifiedArguments=[].slice.call(arguments);modifiedArguments[0]=[(new Date).toLocaleTimeString()+\"::[\"+context+\"]> \"]+modifiedArguments[0],method.apply(null,modifiedArguments)}},logDecorator}();common.logDecorator=logDecorator}(common=cr.common||(cr.common={}))}(cr||(cr={}));var cr;!function(cr){var common;!function(common){var crHttpHeaderService=function(){function crHttpHeaderService(){this.headers={}}return crHttpHeaderService}();angular.module(\"cr.common\").factory(\"crHttpHeaderService\",[function(){return new crHttpHeaderService}])}(common=cr.common||(cr.common={}))}(cr||(cr={})),angular.module(\"cr.common\").directive(\"compareTo\",[function(){return{require:\"ngModel\",scope:{otherModelValue:\"=compareTo\"},link:function(scope,element,attributes,ngModel){var compareTo=function(modelValue){return ngModel.$setValidity(\"compareTo\",modelValue==scope.otherModelValue),modelValue};ngModel.$formatters.unshift(compareTo),ngModel.$parsers.unshift(compareTo),scope.$watch(\"otherModelValue\",function(){compareTo(ngModel.$viewValue)})}}}]);var cr;!function(cr){var common;!function(common){var crAmountDirective=function(){function crAmountDirective(){this.restrict=\"E\",this.replace=!0,this.template=\"<span ng-class='GetClass()'>{{amount|currency:(currency||'&euro;'):2}}</span>\",this.scope={amount:\"@\",currency:\"@?\",type:\"@?\",size:\"@?\",decimals:\"@\",sign:\"@?\"},this.controller=[\"$scope\",function($scope){$scope.GetClass=function(){var type=angular.isDefined($scope.type)&&\"\"!=$scope.type?$scope.type:\"text\";return type+\" \"+type+\"-\"+(angular.isDefined($scope.sign)?\"Income\"==$scope.sign?\"success\":\"danger\":$scope.amount>=0?\"success\":\"danger\")+(angular.isDefined($scope.size)?\" \"+type+\"-\"+$scope.size:\"\")},$scope.GetAmount=function(){return isNaN($scope.amount)?\"\":parseFloat($scope.amount).format(2,3,\".\",\",\")}}]}return crAmountDirective}();angular.module(\"cr.common\").directive(\"crAmount\",[function(){return new crAmountDirective}])}(common=cr.common||(cr.common={}))}(cr||(cr={})),angular.module(\"cr.common\").directive(\"crCollapse\",function(){return{restrict:\"E\",scope:!0,link:function(scope,elem,attrs){scope.collapseStatus=!1,elem.find(\".panel-heading a\").on(\"click\",function(e){e.preventDefault(),scope.$apply(function(){scope.collapseStatus=!scope.collapseStatus})})}}}),angular.module(\"cr.common\").directive(\"crPerformance\",[\"cfg\",function(cfg){return{link:function(scope,element,attrs,ctrl){console.log(\"performance monitor: \"+cfg.EnablePerformanceMonitor),cfg.EnablePerformanceMonitor&&window.showAngularStats({position:\"topright\",digestTimeThreshold:20,autoload:!0})}}}]),angular.module(\"cr.common\").directive(\"ngToggle\",function($timeout){return{restrict:\"E\",replace:!0,scope:{config:\"=?\",ngToggleChange:\"&?\",ngToggleClick:\"&?\",val:\"=ngModel\",ngDefault:\"=?\",ngTrueVal:\"=?\",ngFalseVal:\"=?\",ngNullVal:\"=?\",ngWidth:\"=?\",ngHeight:\"=?\",ngTrueTip:\"=?\",ngFalseTip:\"=?\",ngNullTip:\"=?\",borderRadius:\"=?\"},template:'<div class=\"ng-toggle-wrap\" ng-style=\"styleWrap\" ng-class=\"{\\'vertical\\': vertical}\"><div class=\"ng-toggle-switch\" ng-style=\"styleSwitch\" ng-class=\"{\\'true\\': val==ngTrueVal, \\'false\\': val==ngFalseVal}\" ng-click=\"toggle()\"><div class=\"ng-toggle-false\"></div><div class=\"ng-toggle-true\"></div><div class=\"ng-toggle-handle\" ng-style=\"styleHandle\"></div></div><div class=\"ng-toggle-tooltip\" ng-show=\"tooltip\"><span ng-class=\"{\\'active\\': showTooltip1}\"><span ng-show=\"tooltip1\"></span>{{tooltip1}}&nbsp;&bull;</span><br ng-show=\"triToggle\"><span ng-class=\"{\\'active\\': showTooltip2}\" ng-show=\"triToggle\"><span ng-show=\"tooltip2\"></span>{{tooltip2}}&nbsp;&bull;</span><br><span ng-class=\"{\\'active\\': showTooltip3}\"><span ng-show=\"tooltip3\"></span>{{tooltip3}}&nbsp;&bull;</span></div></div>',link:function(scope,element,attrs){function updateCustomColor(){return angular.equals(scope.val,scope.ngTrueVal)?void(angular.isDefined(attrs.ngTrueColor)&&(scope.styleSwitch[\"background-color\"]=attrs.ngTrueColor)):angular.equals(scope.val,scope.ngFalseVal)?void(angular.isDefined(attrs.ngFalseColor)&&(scope.styleSwitch[\"background-color\"]=attrs.ngFalseColor)):void(scope.triToggle&&angular.isDefined(attrs.ngNullColor)&&(scope.styleSwitch[\"background-color\"]=attrs.ngNullColor))}function updatePosition(){angular.equals(scope.val,scope.ngFalseVal)?angular.isDefined(scope.ngWidth)&&(scope.styleHandle.left=\"3px\"):angular.equals(scope.val,scope.ngNullVal)?scope.triToggle&&(angular.isDefined(attrs.vertical)&&attrs.vertical?angular.isDefined(scope.ngHeight)&&(scope.styleHandle.left=.22*scope.ngHeight+3+\"px\"):angular.isDefined(scope.ngWidth)&&(scope.styleHandle.left=.22*scope.ngWidth+3+\"px\")):angular.isDefined(attrs.vertical)&&attrs.vertical?angular.isDefined(scope.ngHeight)&&(scope.styleHandle.left=.517*scope.ngHeight+\"px\"):angular.isDefined(scope.ngWidth)&&(scope.styleHandle.left=.517*scope.ngWidth+\"px\")}function updateTooltip(){scope.showTooltip1=!1,scope.showTooltip2=!1,scope.showTooltip3=!1,angular.equals(scope.val,scope.ngTrueVal)?scope.vertical?scope.showTooltip1=!0:scope.showTooltip3=!0:angular.equals(scope.val,scope.ngFalseVal)?scope.vertical?scope.showTooltip3=!0:scope.showTooltip1=!0:scope.triToggle&&(scope.showTooltip2=!0)}angular.isDefined(scope.config)&&(angular.isDefined(scope.config.triToggle)&&!angular.isDefined(attrs.triToggle)&&scope.config.triToggle&&(attrs.triToggle=scope.config.triToggle),angular.isDefined(scope.config.change)&&!angular.isDefined(attrs.ngToggleChange)&&(scope.ngToggleChange=scope.config.change),angular.isDefined(scope.config.click)&&!angular.isDefined(attrs.ngToggleClick)&&(scope.ngToggleClick=scope.config.click),angular.isDefined(scope.config.val)&&!angular.isDefined(attrs.val)&&(scope.val=scope.config.val),angular.isDefined(scope.config[\"default\"])&&!angular.isDefined(attrs.ngDefault)&&(scope.ngDefault=scope.config[\"default\"]),angular.isDefined(scope.config.trueVal)&&!angular.isDefined(attrs.ngTrueVal)&&(scope.ngTrueVal=scope.config.trueVal),angular.isDefined(scope.config.falseVal)&&!angular.isDefined(attrs.ngFalseVal)&&(scope.ngFalseVal=scope.config.falseVal),angular.isDefined(scope.config.nullVal)&&!angular.isDefined(attrs.ngNullVal)&&(scope.ngNullVal=scope.config.nullVal),angular.isDefined(scope.config.width)&&!angular.isDefined(attrs.ngWidth)&&(scope.ngWidth=scope.config.width),angular.isDefined(scope.config.height)&&!angular.isDefined(attrs.ngHeight)&&(scope.ngHeight=scope.config.height),angular.isDefined(scope.config.falseColor)&&!angular.isDefined(attrs.ngFalseColor)&&(attrs.ngFalseColor=scope.config.falseColor),angular.isDefined(scope.config.nullColor)&&!angular.isDefined(attrs.ngNullColor)&&(attrs.ngNullColor=scope.config.nullColor),angular.isDefined(scope.config.trueColor)&&!angular.isDefined(attrs.ngTrueColor)&&(attrs.ngTrueColor=scope.config.trueColor),angular.isDefined(scope.config.vertical)&&!angular.isDefined(attrs.vertical)&&(attrs.vertical=scope.config.vertical),angular.isDefined(scope.config.trueTip)&&!angular.isDefined(attrs.ngTrueTip)&&(scope.ngTrueTip=scope.config.trueTip),angular.isDefined(scope.config.falseTip)&&!angular.isDefined(attrs.ngFalseTip)&&(scope.ngFalseTip=scope.config.falseTip),angular.isDefined(scope.config.nullTip)&&!angular.isDefined(attrs.ngNullTip)&&(scope.ngNullTip=scope.config.nullTip),angular.isDefined(scope.ngTrueTip)||angular.isDefined(attrs.ngFalseTip)||angular.isDefined(attrs.ngNullTip)?scope.tooltip=!0:scope.tooltip=!1,angular.isDefined(scope.config.borderRadius)&&!angular.isDefined(attrs.borderRadius)&&(scope.borderRadius=scope.config.borderRadius)),scope.triToggle=!1,scope.vertical=!1,scope.styleWrap={},scope.styleSwitch={},scope.styleHandle={},angular.isDefined(attrs.triToggle)&&(scope.triToggle=!0),angular.isDefined(scope.ngWidth)&&(scope.styleWrap.width=scope.ngWidth+6+\"px\"),angular.isDefined(scope.ngHeight)&&(scope.styleWrap.height=scope.ngHeight+6+\"px\"),angular.isDefined(attrs.vertical)&&attrs.vertical?(scope.vertical=!0,scope.tooltip1=scope.ngTrueTip,scope.tooltip2=scope.ngNullTip,scope.tooltip3=scope.ngFalseTip,angular.isDefined(scope.ngWidth)&&(scope.styleSwitch.height=scope.ngWidth+\"px\",scope.styleHandle.height=scope.ngWidth-6+\"px\"),angular.isDefined(scope.ngHeight)&&(scope.styleSwitch.width=scope.ngHeight+\"px\",scope.styleHandle.width=.428*scope.ngHeight+\"px\")):(scope.tooltip1=scope.ngFalseTip,scope.tooltip2=scope.ngNullTip,scope.tooltip3=scope.ngTrueTip,angular.isDefined(scope.ngWidth)&&(scope.styleSwitch.width=scope.ngWidth+\"px\",scope.styleHandle.width=.428*scope.ngWidth+\"px\"),angular.isDefined(scope.ngHeight)&&(scope.styleSwitch.height=scope.ngHeight+\"px\",scope.styleHandle.height=scope.ngHeight-6+\"px\")),angular.isDefined(scope.borderRadius)?(scope.styleSwitch[\"border-radius\"]=scope.borderRadius+\"px\",scope.styleHandle[\"border-radius\"]=scope.borderRadius+\"px\"):angular.isDefined(scope.ngWidth)&&angular.isDefined(scope.ngHeight)?scope.ngWidth<=scope.ngHeight?(scope.styleSwitch[\"border-radius\"]=(scope.ngHeight+6)/2+\"px\",scope.styleHandle[\"border-radius\"]=scope.ngHeight/2+\"px\"):(scope.styleSwitch[\"border-radius\"]=(scope.ngWidth+6)/2+\"px\",scope.styleHandle[\"border-radius\"]=scope.ngWidth/2+\"px\"):angular.isDefined(scope.ngWidth)?scope.ngWidth<=30?(scope.styleSwitch[\"border-radius\"]=\"18px\",scope.styleHandle[\"border-radius\"]=\"15px\"):(scope.styleSwitch[\"border-radius\"]=(scope.ngWidth+6)/2+\"px\",scope.styleHandle[\"border-radius\"]=scope.ngWidth/2+\"px\"):angular.isDefined(scope.ngHeight)&&(scope.ngHeight>=56?(scope.styleSwitch[\"border-radius\"]=\"31px\",scope.styleHandle[\"border-radius\"]=\"28px\"):(scope.styleSwitch[\"border-radius\"]=(scope.ngHeight+6)/2+\"px\",scope.styleHandle[\"border-radius\"]=scope.ngHeight/2+\"px\")),scope.toggle=function(){scope.val===scope.ngTrueVal?scope.val=scope.ngFalseVal:scope.val===scope.ngFalseVal&&scope.triToggle?scope.val=scope.ngNullVal:scope.val=scope.ngTrueVal,\"undefined\"!=typeof scope.ngToggleClick&&$timeout(function(){scope.ngToggleClick(scope.val)})},scope.$watch(\"val\",function(val){updateCustomColor(),updatePosition(),updateTooltip(),\"undefined\"!=typeof scope.ngToggleChange&&$timeout(function(){scope.ngToggleChange(scope.val)})},!0),angular.isDefined(scope.ngTrueVal)||(scope.ngTrueVal=1),angular.isDefined(scope.ngFalseVal)||(scope.ngFalseVal=0),angular.isDefined(scope.ngNullVal)||(scope.ngNullVal=null),angular.isDefined(scope.val)||(angular.isDefined(scope.ngDefault)?scope.val=scope.ngDefault:scope.val=scope.ngNullVal)}}}),angular.module(\"cr.common\").directive(\"inputMask\",[function(){return{scope:{ngModel:\"=\"},restrict:\"AC\",link:function(scope,el,attrs){el.inputmask(scope.$eval(attrs.inputMask)),el.on(\"change\",function(){scope.ngModel=el.val()})}}}]),angular.module(\"cr.common\").directive(\"ngFocus\",[function(){var FOCUS_CLASS=\"ng-focused\";return{restrict:\"A\",require:\"ngModel\",link:function(scope,element,attrs,ctrl){ctrl.$focused=!1,element.bind(\"focus\",function(){element.addClass(FOCUS_CLASS),scope.$apply(function(){ctrl.$focused=!0})}).bind(\"blur\",function(){element.removeClass(FOCUS_CLASS),scope.$apply(function(){ctrl.$focused=!1})})}}}]),angular.module(\"cr.common\").directive(\"roundNumberInput\",[\"$filter\",function($filter){return{require:\"ngModel\",scope:{roundNumberInput:\"=\"},link:function(scope,elm,attrs,ctrl){ctrl.$formatters.unshift(function(value){return scope.roundNumberInput||0===scope.roundNumberInput?(\"string\"==typeof value&&(value=value.replace(\",\",\".\")),parseFloat(value)?$filter(\"number\")(parseFloat(value),scope.roundNumberInput):value):value}),ctrl.$parsers.unshift(function(viewValue){return scope.roundNumberInput||0===scope.roundNumberInput?(\"string\"==typeof viewValue&&(viewValue=viewValue.replace(\",\",\".\")),parseFloat(viewValue)):viewValue})}}}]),angular.module(\"cr.common\").directive(\"scrollAfterNavigate\",[\"$window\",\"$rootScope\",function($window,$rootScope){return{restrict:\"ACE\",link:function(scope,elem,attrs){$rootScope.$on(\"$stateChangeSuccess\",function(event,toState,toParams,fromState,fromParams){var $scrollToSelector,scrollTop=0;(void 0!==toState&&toState.hasOwnProperty(\"data\")&&toState.data.hasOwnProperty(\"scrollToSelector\")||toParams.scrollToSelector)&&(toParams.scrollToSelector&&($scrollToSelector=$(toParams.scrollToSelector)),$scrollToSelector&&$scrollToSelector.length||($scrollToSelector=$(toState.data.scrollToSelector)),$scrollToSelector.length>0&&(scrollTop=$scrollToSelector.offset().top-$(\"header.navbar-fixed-top\").outerHeight()-$(\"ol.breadcrumb\").outerHeight()-20),toParams.scrollToSelector=null),$(\"html, body\").stop(!0,!0).animate({scrollTop:scrollTop},800)})}}}]),angular.module(\"cr.common\").directive(\"scrollSpy\",[\"$window\",function($window){return{restrict:\"A\",controller:[\"$scope\",function($scope){$scope.spies=[],this.addSpy=function(spyObj){$scope.spies.push(spyObj)}}],link:function(scope,elem,attrs){var spyElems=[];scope.$watch(\"spies\",function(spies){angular.forEach(spies,function(spy){null===spyElems[spy.id]&&(spyElems[spy.id]=elem.find(\"#\"+spy.id))})}),$($window).scroll(function(){var pos,highlightSpy=null;angular.forEach(scope.spies,function(spy){try{spy.out(),spyElems.length&&0!==spyElems[spy.id].length||(spyElems[spy.id]=elem.find(\"#\"+spy.id)),spyElems[spy.id].length&&(pos=spyElems[spy.id].offset().top-$window.scrollY,pos<=0&&(spy.pos=pos,(!highlightSpy||highlightSpy.pos<spy.pos)&&(highlightSpy=spy)))}catch(Exception){}}),highlightSpy&&highlightSpy[\"in\"]()})}}}]).directive(\"spy\",[\"$location\",function($location){return{restrict:\"A\",require:\"^scrollSpy\",link:function(scope,elem,attrs,scrollSpy){attrs.spyClass=attrs.spyClass||\"active\",elem.click(function(){var hash=attrs.spy||attrs.href.split(\"#\")[1];$(\"html, body\").stop(!0,!0).animate({scrollTop:$(\"#\"+hash).offset().top+1},500),scope.$apply(function(){$location.hash(hash)})}),scrollSpy.addSpy({id:attrs.spy,\"in\":function(){elem.addClass(attrs.spyClass)},out:function(){elem.removeClass(attrs.spyClass)}})}}}]),angular.module(\"cr.common\").service(\"ScrollToMe\",[\"$window\",function($window){this.speed=500,this.to=function(idOrName,offset,callback){var el,document=$window.document;return idOrName?(el=document.getElementById(idOrName),el||(el=document.getElementByName(idOrName),el=el&&el.length?el[0]:null),\"function\"==typeof offset&&(callback=offset,offset=0),offset=$(el).offset().top-(offset||0),void(el&&$(\"html, body\").stop(!0,!0).animate({scrollTop:offset},this.speed,callback||function(){}))):$window.scrollTo(0,0)}}]).directive(\"scrollToMe\",[\"ScrollToMe\",function(ScrollToMe){return{restrict:\"AC\",compile:function(){return function(scope,elem,attr){elem.bind(\"click\",function(e){ScrollToMe.to(attr.scrollToMe||attr.href,attr.offset)})}}}}]),angular.module(\"cr.common\").directive(\"scrollToTop\",[\"$window\",function($window){return{restrict:\"ACE\",link:function(scope,elem,attrs){$($window).scroll(function(){$(this).scrollTop()>100?elem.addClass(\"showing\"):elem.removeClass(\"showing\")}),elem.click(function(e){e.preventDefault(),$(\"html, body\").stop(!0,!0).animate({scrollTop:0},800),$(this).blur()})}}}]),angular.module(\"cr.common\").directive(\"validDate\",[function(){function DTE_Check(value){if(0==value.length)return!0;try{var ix1=value.indexOf(\"/\",0);if(0==ix1)return!1;var ix2=value.indexOf(\"/\",ix1+1);if(0==ix2)return!1;var Da=parseInt(value.substring(0,ix1),\"10\"),Mn=parseInt(value.substring(ix1+1,ix2),\"10\")-1,Yr=parseInt(value.substring(ix2+1),\"10\"),dt=new Date(Yr,Mn,Da);return dt.getDate()==Da&&(dt.getMonth()==Mn&&(dt.getFullYear()==Yr&&!(Yr<1900)))}catch(err){return!1}}return{require:\"ngModel\",link:function(scope,element,attributes,ngModel){var validDate=function(modelValue){return console.log(\"valid date called: \"+modelValue),ngModel.$setValidity(\"validDate\",!angular.isDefined(modelValue)||DTE_Check(modelValue)),modelValue};element.on(\"blur\",function(event){validDate(event.target.value),scope.$apply()}),ngModel.$formatters.unshift(validDate),ngModel.$parsers.unshift(validDate)}}}]);var cr;!function(cr){var common;!function(common){angular.module(\"cr.common\").config([\"$provide\",function($provide){$provide.decorator(\"$log\",common.logDecorator.install)}]).run(function($log){}).config([\"$httpProvider\",function($httpProvider){$httpProvider.defaults.headers.get||($httpProvider.defaults.headers.get={}),$httpProvider.defaults.headers.get[\"If-Modified-Since\"]=\"Mon, 26 Jul 1997 05:00:00 GMT\"}]).config([\"$provide\",\"$httpProvider\",function($provide,$httpProvider){console.log(\"cr.account interceptor\"),$provide.factory(\"authHttpInterceptor\",[\"$q\",\"$injector\",\"crHttpHeaderService\",function($q,$injector,crHttpHeaderService){return{request:function(config){return angular.forEach(crHttpHeaderService.headers,function(v,k){config.headers[k]=v}),config||$q.when(config)},requestError:function(rejection){console.log(\"request error\");$injector.get(\"notificationService\");return $q.reject(rejection)},responseError:function(rejection){var statusMap={401:\"You're not authorized to do this action, please contact system administrator\"};statusMap[rejection.status]||\"Something bad has happened, please contact system administrator if the problem persists\",$injector.get(\"notificationService\");return $q.reject(rejection)}}}]),$httpProvider.interceptors.push(\"authHttpInterceptor\")}]).config([\"$sceDelegateProvider\",function($sceDelegateProvider){$sceDelegateProvider.resourceUrlWhitelist([\"self\",\"**\"])}]).filter(\"firstTrueValue\",function(){return function(input){var firstValue={};for(var key in input)if(1==input[key])return firstValue[key]=!0,firstValue;return firstValue}}).run(function($rootScope,$state,$stateParams){$rootScope.$state=$state,$rootScope.$stateParams=$stateParams,$rootScope.$on(\"$stateChangeSuccess\",function(event,toState,toParams,fromState,fromParams){null!=fromState&&null!=fromState.name&&\"\"!=fromState.name&&($rootScope.previousState={name:fromState.name,params:fromParams})})}).run([\"$rootScope\",function($rootScope){$rootScope.log=function(){console.log(Array.prototype.slice.call(arguments))}}])}(common=cr.common||(cr.common={}))}(cr||(cr={}));\n//# sourceMappingURL=common.js.map","/**\n * @license AngularJS v1.3.14\n * (c) 2010-2014 Google, Inc. http://angularjs.org\n * License: MIT\n */\n(function(window, angular, undefined) {'use strict';\n\n/**\n * @ngdoc module\n * @name ngCookies\n * @description\n *\n * # ngCookies\n *\n * The `ngCookies` module provides a convenient wrapper for reading and writing browser cookies.\n *\n *\n * <div doc-module-components=\"ngCookies\"></div>\n *\n * See {@link ngCookies.$cookies `$cookies`} and\n * {@link ngCookies.$cookieStore `$cookieStore`} for usage.\n */\n\n\nangular.module('ngCookies', ['ng']).\n  /**\n   * @ngdoc service\n   * @name $cookies\n   *\n   * @description\n   * Provides read/write access to browser's cookies.\n   *\n   * Only a simple Object is exposed and by adding or removing properties to/from this object, new\n   * cookies are created/deleted at the end of current $eval.\n   * The object's properties can only be strings.\n   *\n   * Requires the {@link ngCookies `ngCookies`} module to be installed.\n   *\n   * @example\n   *\n   * ```js\n   * angular.module('cookiesExample', ['ngCookies'])\n   *   .controller('ExampleController', ['$cookies', function($cookies) {\n   *     // Retrieving a cookie\n   *     var favoriteCookie = $cookies.myFavorite;\n   *     // Setting a cookie\n   *     $cookies.myFavorite = 'oatmeal';\n   *   }]);\n   * ```\n   */\n   factory('$cookies', ['$rootScope', '$browser', function($rootScope, $browser) {\n      var cookies = {},\n          lastCookies = {},\n          lastBrowserCookies,\n          runEval = false,\n          copy = angular.copy,\n          isUndefined = angular.isUndefined;\n\n      //creates a poller fn that copies all cookies from the $browser to service & inits the service\n      $browser.addPollFn(function() {\n        var currentCookies = $browser.cookies();\n        if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl\n          lastBrowserCookies = currentCookies;\n          copy(currentCookies, lastCookies);\n          copy(currentCookies, cookies);\n          if (runEval) $rootScope.$apply();\n        }\n      })();\n\n      runEval = true;\n\n      //at the end of each eval, push cookies\n      //TODO: this should happen before the \"delayed\" watches fire, because if some cookies are not\n      //      strings or browser refuses to store some cookies, we update the model in the push fn.\n      $rootScope.$watch(push);\n\n      return cookies;\n\n\n      /**\n       * Pushes all the cookies from the service to the browser and verifies if all cookies were\n       * stored.\n       */\n      function push() {\n        var name,\n            value,\n            browserCookies,\n            updated;\n\n        //delete any cookies deleted in $cookies\n        for (name in lastCookies) {\n          if (isUndefined(cookies[name])) {\n            $browser.cookies(name, undefined);\n          }\n        }\n\n        //update all cookies updated in $cookies\n        for (name in cookies) {\n          value = cookies[name];\n          if (!angular.isString(value)) {\n            value = '' + value;\n            cookies[name] = value;\n          }\n          if (value !== lastCookies[name]) {\n            $browser.cookies(name, value);\n            updated = true;\n          }\n        }\n\n        //verify what was actually stored\n        if (updated) {\n          updated = false;\n          browserCookies = $browser.cookies();\n\n          for (name in cookies) {\n            if (cookies[name] !== browserCookies[name]) {\n              //delete or reset all cookies that the browser dropped from $cookies\n              if (isUndefined(browserCookies[name])) {\n                delete cookies[name];\n              } else {\n                cookies[name] = browserCookies[name];\n              }\n              updated = true;\n            }\n          }\n        }\n      }\n    }]).\n\n\n  /**\n   * @ngdoc service\n   * @name $cookieStore\n   * @requires $cookies\n   *\n   * @description\n   * Provides a key-value (string-object) storage, that is backed by session cookies.\n   * Objects put or retrieved from this storage are automatically serialized or\n   * deserialized by angular's toJson/fromJson.\n   *\n   * Requires the {@link ngCookies `ngCookies`} module to be installed.\n   *\n   * @example\n   *\n   * ```js\n   * angular.module('cookieStoreExample', ['ngCookies'])\n   *   .controller('ExampleController', ['$cookieStore', function($cookieStore) {\n   *     // Put cookie\n   *     $cookieStore.put('myFavorite','oatmeal');\n   *     // Get cookie\n   *     var favoriteCookie = $cookieStore.get('myFavorite');\n   *     // Removing a cookie\n   *     $cookieStore.remove('myFavorite');\n   *   }]);\n   * ```\n   */\n   factory('$cookieStore', ['$cookies', function($cookies) {\n\n      return {\n        /**\n         * @ngdoc method\n         * @name $cookieStore#get\n         *\n         * @description\n         * Returns the value of given cookie key\n         *\n         * @param {string} key Id to use for lookup.\n         * @returns {Object} Deserialized cookie value.\n         */\n        get: function(key) {\n          var value = $cookies[key];\n          return value ? angular.fromJson(value) : value;\n        },\n\n        /**\n         * @ngdoc method\n         * @name $cookieStore#put\n         *\n         * @description\n         * Sets a value for given cookie key\n         *\n         * @param {string} key Id for the `value`.\n         * @param {Object} value Value to be stored.\n         */\n        put: function(key, value) {\n          $cookies[key] = angular.toJson(value);\n        },\n\n        /**\n         * @ngdoc method\n         * @name $cookieStore#remove\n         *\n         * @description\n         * Remove given cookie\n         *\n         * @param {string} key Id of the key-value pair to delete.\n         */\n        remove: function(key) {\n          delete $cookies[key];\n        }\n      };\n\n    }]);\n\n\n})(window, window.angular);\n","/*!\nangular-xeditable - 0.5.0\nEdit-in-place for angular.js\nBuild date: 2016-10-27 \n*/\n/**\n * Angular-xeditable module \n *\n */\nangular.module('xeditable', [])\n\n\n/**\n * Default options. \n *\n * @namespace editable-options\n */\n//todo: maybe better have editableDefaults, not options...\n.value('editableOptions', {\n  /**\n   * Theme. Possible values `bs3`, `bs2`, `default`.  \n   * Default is `default`\n   * \n   * @var {string} theme\n   * @memberOf editable-options\n   */  \n  theme: 'default',\n  /**\n   * Icon Set. Possible values `font-awesome`, `default`.  \n   * Default is `default`\n   * \n   * @var {string} icon set\n   * @memberOf editable-options\n   */  \n  icon_set: 'default',\n  /**\n   * Whether to show buttons for single editable element.  \n   * Possible values `right`, `no`.  \n   * Default is `right`\n   * \n   * @var {string} buttons\n   * @memberOf editable-options\n   */    \n  buttons: 'right',\n  /**\n   * Default value for `blur` attribute of single editable element.  \n   * Can be `cancel|submit|ignore`.  \n   * Default is `cancel`\n   * \n   * @var {string} blurElem\n   * @memberOf editable-options\n   */\n  blurElem: 'cancel',\n  /**\n   * Default value for `blur` attribute of editable form.  \n   * Can be `cancel|submit|ignore`.  \n   * Default is `ignore`.\n   * \n   * @var {string} blurForm\n   * @memberOf editable-options\n   */\n  blurForm: 'ignore',\n  /**\n   * How input elements get activated. Possible values: `focus|select|none`.  \n   * Default is `focus`\n   *\n   * @var {string} activate\n   * @memberOf editable-options\n   */\n  activate: 'focus',\n  /**\n   * Whether to disable x-editable. Can be overloaded on each element.  \n   * Default is `false`\n   *\n   * @var {boolean} isDisabled\n   * @memberOf editable-options\n   */\n   isDisabled: false,\n  \n  /**\n   * Event, on which the edit mode gets activated. \n   * Can be any event.  \n   * Default is `click`\n   *\n   * @var {string} activationEvent\n   * @memberOf editable-options\n   */\n  activationEvent: 'click',\n\n  /**\n   * The default title of the submit button.  \n   * Default is `Submit`\n   *\n   * @var {string} submitButtonTitle\n   * @memberOf editable-options\n   */\n  submitButtonTitle: 'Submit',\n\n  /**\n   * The default aria label of the submit button.  \n   * Default is `Submit`\n   *\n   * @var {string} submitButtonAriaLabel\n   * @memberOf editable-options\n   */\n  submitButtonAriaLabel: 'Submit',\n\n  /**\n   * The default title of the cancel button.  \n   * Default is `Cancel`\n   *\n   * @var {string} cancelButtonTitle\n   * @memberOf editable-options\n   */\n  cancelButtonTitle: 'Cancel',\n\n  /**\n   * The default aria label of the cancel button.  \n   * Default is `Cancel`\n   *\n   * @var {string} cancelButtonAriaLabel\n   * @memberOf editable-options\n   */\n  cancelButtonAriaLabel: 'Cancel',\n\n  /**\n   * The default title of the clear button.  \n   * Default is `Clear`\n   *\n   * @var {string} clearButtonTitle\n   * @memberOf editable-options\n   */\n  clearButtonTitle: 'Clear',\n\n  /**\n   * The default aria label of the clear button.  \n   * Default is `Clear`\n   *\n   * @var {string} clearButtonAriaLabel\n   * @memberOf editable-options\n   */\n  clearButtonAriaLabel: 'Clear',\n\n  /**\n   * Whether to display the clear button.  \n   * Default is `false`\n   *\n   * @var {boolean} displayClearButton\n   * @memberOf editable-options\n   */\n  displayClearButton: false\n});\n\n/*\n Angular-ui bootstrap datepicker\n http://angular-ui.github.io/bootstrap/#/datepicker\n */\nangular.module('xeditable').directive('editableBsdate', ['editableDirectiveFactory',\n    function(editableDirectiveFactory) {\n        return editableDirectiveFactory({\n            directiveName: 'editableBsdate',\n            inputTpl: '<div></div>',\n            render: function() {\n                /** This basically renders a datepicker as in the example shown in\n                 **  http://angular-ui.github.io/bootstrap/#/datepicker\n                 **  The attributes are all the same as in the bootstrap-ui datepicker with e- as prefix\n                 **/\n                this.parent.render.call(this);\n\n                var inputDatePicker = angular.element('<input type=\"text\" class=\"form-control\" data-ng-model=\"$parent.$data\"/>');\n\n                inputDatePicker.attr('uib-datepicker-popup', this.attrs.eDatepickerPopupXEditable || 'yyyy/MM/dd' );\n                inputDatePicker.attr('is-open', this.attrs.eIsOpen);\n                inputDatePicker.attr('date-disabled', this.attrs.eDateDisabled);\n                inputDatePicker.attr('uib-datepicker-popup', this.attrs.eDatepickerPopup);\n                inputDatePicker.attr('year-range', this.attrs.eYearRange || 20);\n                inputDatePicker.attr('show-button-bar', this.attrs.eShowButtonBar || true);\n                inputDatePicker.attr('current-text', this.attrs.eCurrentText || 'Today');\n                inputDatePicker.attr('clear-text', this.attrs.eClearText || 'Clear');\n                inputDatePicker.attr('close-text', this.attrs.eCloseText || 'Done');\n                inputDatePicker.attr('close-on-date-selection', this.attrs.eCloseOnDateSelection || true);\n                inputDatePicker.attr('datepicker-append-to-body', this.attrs.eDatePickerAppendToBody || false);\n                inputDatePicker.attr('date-disabled', this.attrs.eDateDisabled);\n                inputDatePicker.attr('name', this.attrs.eName);\n                inputDatePicker.attr('on-open-focus', this.attrs.eOnOpenFocus || true);\n                inputDatePicker.attr('ng-readonly', this.attrs.eReadonly || false);\n\n                if (this.attrs.eNgChange) {\n                    inputDatePicker.attr('ng-change', this.attrs.eNgChange);\n                    this.inputEl.removeAttr('ng-change');\n                }\n\n                if (this.attrs.eStyle) {\n                    inputDatePicker.attr('style', this.attrs.eStyle);\n                    this.inputEl.removeAttr('style');\n                }\n\n                this.scope.dateOptions = {\n                    formatDay:  this.attrs.eFormatDay || 'dd',\n                    formatMonth: this.attrs.eFormatMonth || 'MMMM',\n                    formatYear: this.attrs.eFormatYear || 'yyyy',\n                    formatDayHeader: this.attrs.eFormatDayHeader || 'EEE',\n                    formatDayTitle: this.attrs.eFormatDayTitle || 'MMMM yyyy',\n                    formatMonthTitle: this.attrs.eFormatMonthTitle || 'yyyy',\n                    showWeeks: this.attrs.eShowWeeks ? this.attrs.eShowWeeks.toLowerCase() === 'true' : true,\n                    startingDay: this.attrs.eStartingDay || 0,\n                    minMode: this.attrs.eMinMode || 'day',\n                    maxMode: this.attrs.eMaxMode || 'year',\n                    initDate: this.scope.$eval(this.attrs.eInitDate) || new Date(),\n                    datepickerMode: this.attrs.eDatepickerMode || 'day',\n                    maxDate: this.scope.$eval(this.attrs.eMaxDate) || null,\n                    minDate: this.scope.$eval(this.attrs.eMinDate) || null\n                };\n\n                var showCalendarButton = angular.isDefined(this.attrs.eShowCalendarButton) ? this.attrs.eShowCalendarButton : \"true\";\n\n                //See if calendar button should be displayed\n                if (showCalendarButton === \"true\") {\n                    var buttonDatePicker = angular.element('<button type=\"button\" class=\"btn btn-default\"><i class=\"glyphicon glyphicon-calendar\"></i></button>');\n                    var buttonWrapper = angular.element('<span class=\"input-group-btn\"></span>');\n\n                    buttonDatePicker.attr('ng-click', this.attrs.eNgClick);\n\n                    buttonWrapper.append(buttonDatePicker);\n\n                    this.inputEl.append(buttonWrapper);\n                } else {\n                    //If no calendar button, display calendar popup on click of input field\n                    inputDatePicker.attr('ng-click', this.attrs.eNgClick);\n                }\n\n                inputDatePicker.attr('datepicker-options', \"dateOptions\");\n\n                this.inputEl.prepend(inputDatePicker);\n\n                this.inputEl.removeAttr('class');\n                this.inputEl.removeAttr('ng-click');\n                this.inputEl.removeAttr('is-open');\n                this.inputEl.removeAttr('init-date');\n                this.inputEl.removeAttr('datepicker-popup');\n                this.inputEl.removeAttr('required');\n                this.inputEl.removeAttr('ng-model');\n                this.inputEl.removeAttr('date-picker-append-to-body');\n                this.inputEl.removeAttr('name');\n                this.inputEl.attr('class','input-group');\n            }\n\t});\n}]);\n/*\nAngular-ui bootstrap editable timepicker\nhttp://angular-ui.github.io/bootstrap/#/timepicker\n*/\nangular.module('xeditable').directive('editableBstime', ['editableDirectiveFactory',\n  function(editableDirectiveFactory) {\n    return editableDirectiveFactory({\n      directiveName: 'editableBstime',\n      inputTpl: '<uib-timepicker></uib-timepicker>',\n      render: function() {\n        this.parent.render.call(this);\n\n        // timepicker can't update model when ng-model set directly to it\n        // see: https://github.com/angular-ui/bootstrap/issues/1141\n        // so we wrap it into DIV\n        var div = angular.element('<div class=\"well well-small\" style=\"display:inline-block;\"></div>');\n\n        // move ng-model to wrapping div\n        div.attr('ng-model', this.inputEl.attr('ng-model'));\n        this.inputEl.removeAttr('ng-model');\n\n        // move ng-change to wrapping div\n        if(this.attrs.eNgChange) {\n          div.attr('ng-change', this.inputEl.attr('ng-change'));\n          this.inputEl.removeAttr('ng-change');\n        }\n\n        // wrap\n        this.inputEl.wrap(div);\n      }\n    });\n}]);\n//checkbox\nangular.module('xeditable').directive('editableCheckbox', ['editableDirectiveFactory',\n  function(editableDirectiveFactory) {\n    return editableDirectiveFactory({\n      directiveName: 'editableCheckbox',\n      inputTpl: '<input type=\"checkbox\">',\n      render: function() {\n        this.parent.render.call(this);\n        if(this.attrs.eTitle) {\n          this.inputEl.wrap('<label></label>');\n          this.inputEl.parent().append('<span>' + this.attrs.eTitle + '</span>');\n        }\n      },\n      autosubmit: function() {\n        var self = this;\n        self.inputEl.bind('change', function() {\n          setTimeout(function() {\n            self.scope.$apply(function() {\n              self.scope.$form.$submit();\n            });\n          }, 500);\n        });\n      }\n    });\n}]);\n\n// checklist\nangular.module('xeditable').directive('editableChecklist', [\n  'editableDirectiveFactory',\n  'editableNgOptionsParser',\n  function(editableDirectiveFactory, editableNgOptionsParser) {\n    return editableDirectiveFactory({\n      directiveName: 'editableChecklist',\n      inputTpl: '<span></span>',\n      useCopy: true,\n      render: function() {\n        this.parent.render.call(this);\n        var parsed = editableNgOptionsParser(this.attrs.eNgOptions);\n        var ngChangeHtml = '';\n        var ngChecklistComparatorHtml = '';\n\n        if (this.attrs.eNgChange) {\n          ngChangeHtml = ' ng-change=\"' +  this.attrs.eNgChange + '\"';\n        }\n\n        if (this.attrs.eChecklistComparator) {\n          ngChecklistComparatorHtml = ' checklist-comparator=\"' +  this.attrs.eChecklistComparator + '\"';\n        }\n        \n        var html = '<label ng-repeat=\"'+parsed.ngRepeat+'\">'+\n          '<input type=\"checkbox\" checklist-model=\"$parent.$parent.$data\" checklist-value=\"'+parsed.locals.valueFn+'\"' +\n            ngChangeHtml + ngChecklistComparatorHtml + '>'+\n          '<span ng-bind=\"'+parsed.locals.displayFn+'\"></span></label>';\n\n        this.inputEl.removeAttr('ng-model');\n        this.inputEl.removeAttr('ng-options');\n        this.inputEl.removeAttr('ng-change');\n        this.inputEl.removeAttr('checklist-comparator');\n        this.inputEl.html(html);\n      }\n    });\n}]);\n\nangular.module('xeditable').directive('editableCombodate', ['editableDirectiveFactory', 'editableCombodate',\n  function(editableDirectiveFactory, editableCombodate) {\n    return editableDirectiveFactory({\n      directiveName: 'editableCombodate',\n      inputTpl: '<input type=\"text\">',\n      render: function() {\n        this.parent.render.call(this);\n\n        var options = {\n          value: new Date(this.scope.$data)\n        };\n        var self = this;\n        angular.forEach([\"format\", \"template\", \"minYear\", \"maxYear\", \"yearDescending\", \"minuteStep\", \"secondStep\", \"firstItem\", \"errorClass\", \"customClass\", \"roundTime\", \"smartDays\"], function(name) {\n\n          var attrName = \"e\" + name.charAt(0).toUpperCase() + name.slice(1);\n          if (attrName in self.attrs) {\n            options[name] = self.attrs[attrName];\n          }\n        });\n\n        var combodate = editableCombodate.getInstance(this.inputEl, options);\n        combodate.$widget.find('select').bind('change', function(e) {\n          self.scope.$data = (new Date(combodate.getValue())).toISOString();\n        });\n      }\n    });\n  }\n]);\n\n/*\nInput types: text|password|email|tel|number|url|search|color|date|datetime|datetime-local|time|month|week|file\n*/\n\n(function() {\n\n  var camelCase = function(dashDelimitedString) {\n    return dashDelimitedString.toLowerCase().replace(/-(.)/g, function(match, word) {\n      return word.toUpperCase();\n    });\n  };\n\n  var types = 'text|password|email|tel|number|url|search|color|date|datetime|datetime-local|time|month|week|file'.split('|');\n\n  //todo: datalist\n  \n  // generate directives\n  angular.forEach(types, function(type) {\n    var directiveName = camelCase('editable' + '-' + type);\n    angular.module('xeditable').directive(directiveName, ['editableDirectiveFactory',\n      function(editableDirectiveFactory) {\n        return editableDirectiveFactory({\n          directiveName: directiveName,\n          inputTpl: '<input type=\"'+type+'\">',\n          render: function() {\n            this.parent.render.call(this);\n\n            //Add bootstrap simple input groups\n            if (this.attrs.eInputgroupleft || this.attrs.eInputgroupright) {\n              this.inputEl.wrap('<div class=\"input-group\"></div>');\n\n              if (this.attrs.eInputgroupleft) {\n                var inputGroupLeft = angular.element('<span class=\"input-group-addon\">' + this.attrs.eInputgroupleft + '</span>');\n                this.inputEl.parent().prepend(inputGroupLeft);\n              }\n\n              if (this.attrs.eInputgroupright) {\n                var inputGroupRight = angular.element('<span class=\"input-group-addon\">' + this.attrs.eInputgroupright + '</span>');\n                this.inputEl.parent().append(inputGroupRight);\n              }\n            }\n\n            // Add label to the input\n            if (this.attrs.eLabel) {\n              var label = angular.element('<label>' + this.attrs.eLabel + '</label>');\n              if (this.attrs.eInputgroupleft || this.attrs.eInputgroupright) {\n                this.inputEl.parent().parent().prepend(label);\n              } else {\n                this.inputEl.parent().prepend(label);\n              }\n            }\n            \n            // Add classes to the form\n            if (this.attrs.eFormclass) {\n              this.editorEl.addClass(this.attrs.eFormclass);\n            }\n          }\n        });\n    }]);\n  });\n\n  //`range` is bit specific\n  angular.module('xeditable').directive('editableRange', ['editableDirectiveFactory', '$interpolate',\n    function(editableDirectiveFactory, $interpolate) {\n      return editableDirectiveFactory({\n        directiveName: 'editableRange',\n        inputTpl: '<input type=\"range\" id=\"range\" name=\"range\">',\n        render: function() {\n          this.parent.render.call(this);\n          this.inputEl.after('<output>' + $interpolate.startSymbol() + '$data' + $interpolate.endSymbol()  + '</output>');\n        }        \n      });\n  }]);\n\n}());\n\n\n/*\n Tags input directive for AngularJS\n https://github.com/mbenford/ngTagsInput\n */\nangular.module('xeditable').directive('editableTagsInput', ['editableDirectiveFactory', 'editableUtils',\n  function(editableDirectiveFactory, editableUtils) {\n    var dir = editableDirectiveFactory({\n        directiveName: 'editableTagsInput',\n        inputTpl: '<tags-input></tags-input>',\n        render: function () {\n            this.parent.render.call(this);\n            this.inputEl.append(editableUtils.rename('auto-complete', this.attrs.$autoCompleteElement));\n            this.inputEl.removeAttr('ng-model');\n            this.inputEl.attr('ng-model', '$parent.$data');\n        }\n    });\n\n    var linkOrg = dir.link;\n\n    dir.link = function (scope, el, attrs, ctrl) {\n        var autoCompleteEl = el.find('editable-tags-input-auto-complete');\n\n        attrs.$autoCompleteElement = autoCompleteEl.clone();\n\n        autoCompleteEl.remove();\n\n        return linkOrg(scope, el, attrs, ctrl);\n    };\n\n    return dir;\n}]);\n// radiolist\nangular.module('xeditable').directive('editableRadiolist', [\n  'editableDirectiveFactory',\n  'editableNgOptionsParser',\n  '$interpolate',\n  function(editableDirectiveFactory, editableNgOptionsParser, $interpolate) {\n    return editableDirectiveFactory({\n      directiveName: 'editableRadiolist',\n      inputTpl: '<span></span>',\n      render: function() {\n        this.parent.render.call(this);\n        var parsed = editableNgOptionsParser(this.attrs.eNgOptions);\n        var ngChangeHtml = '';\n\n        if (this.attrs.eNgChange) {\n          ngChangeHtml = 'ng-change=\"' +  this.attrs.eNgChange + '\"';\n        }\n\n        var html = '<label data-ng-repeat=\"'+parsed.ngRepeat+'\">'+\n          '<input type=\"radio\" data-ng-disabled=\"::' +\n            this.attrs.eNgDisabled +\n            '\" data-ng-model=\"$parent.$parent.$data\" data-ng-value=\"' + $interpolate.startSymbol() +\n            '::' + parsed.locals.valueFn + $interpolate.endSymbol() +'\"' +\n            ngChangeHtml + '>'+\n          '<span data-ng-bind=\"::'+parsed.locals.displayFn+'\"></span></label>';\n\n        this.inputEl.removeAttr('ng-model');\n        this.inputEl.removeAttr('ng-options');\n        this.inputEl.removeAttr('ng-change');\n        this.inputEl.html(html);\n      },\n      autosubmit: function() {\n        var self = this;\n        self.inputEl.bind('change', function() {\n          setTimeout(function() {\n            self.scope.$apply(function() {\n              self.scope.$form.$submit();\n            });\n          }, 500);\n        });\n      }\n    });\n}]);\n\n//select\nangular.module('xeditable').directive('editableSelect', ['editableDirectiveFactory',\n  function(editableDirectiveFactory) {\n    return editableDirectiveFactory({\n      directiveName: 'editableSelect',\n      inputTpl: '<select></select>',\n      render: function() {\n        this.parent.render.call(this);\n\n        if (this.attrs.ePlaceholder) {\n          var placeholder = angular.element('<option value=\"\">' + this.attrs.ePlaceholder + '</option>');\n          this.inputEl.append(placeholder);\n        }\n      },\n      autosubmit: function() {\n        var self = this;\n        self.inputEl.bind('change', function() {\n          self.scope.$apply(function() {\n            self.scope.$form.$submit();\n          });\n        });\n      }\n    });\n}]);\n//textarea\nangular.module('xeditable').directive('editableTextarea', ['editableDirectiveFactory',\n  function(editableDirectiveFactory) {\n    return editableDirectiveFactory({\n      directiveName: 'editableTextarea',\n      inputTpl: '<textarea></textarea>',\n      addListeners: function() {\n        var self = this;\n        self.parent.addListeners.call(self);\n        // submit textarea by ctrl+enter even with buttons\n        if (self.single && self.buttons !== 'no') {\n          self.autosubmit();\n        }\n      },\n      autosubmit: function() {\n        var self = this;\n        self.inputEl.bind('keydown', function(e) {\n          if ((e.ctrlKey || e.metaKey) && (e.keyCode === 13)) {\n            self.scope.$apply(function() {\n              self.scope.$form.$submit();\n            });\n          }\n        });\n      }\n    });\n}]);\n\n/*\n AngularJS-native version of Select2 and Selectize\n https://github.com/angular-ui/ui-select\n */\nangular.module('xeditable').directive('editableUiSelect',['editableDirectiveFactory', 'editableUtils',\n    function(editableDirectiveFactory, editableUtils) {\n        var dir = editableDirectiveFactory({\n            directiveName: 'editableUiSelect',\n            inputTpl: '<ui-select></ui-select>',\n            render: function () {\n                this.parent.render.call(this);\n                this.inputEl.append(editableUtils.rename('ui-select-match', this.attrs.$matchElement));\n                this.inputEl.append(editableUtils.rename('ui-select-choices', this.attrs.$choicesElement));\n                this.inputEl.removeAttr('ng-model');\n                this.inputEl.attr('ng-model', '$parent.$parent.$data');\n            }\n        });\n\n        var linkOrg = dir.link;\n\n        dir.link = function (scope, el, attrs, ctrl) {\n            var matchEl = el.find('editable-ui-select-match');\n            var choicesEl = el.find('editable-ui-select-choices');\n\n            attrs.$matchElement = matchEl.clone();\n            attrs.$choicesElement = choicesEl.clone();\n\n            matchEl.remove();\n            choicesEl.remove();\n\n            return linkOrg(scope, el, attrs, ctrl);\n        };\n\n        return dir;\n    }]);\n/**\n * EditableController class. \n * Attached to element with `editable-xxx` directive.\n *\n * @namespace editable-element\n */\n/*\nTODO: this file should be refactored to work more clear without closures!\n*/\nangular.module('xeditable').factory('editableController', \n  ['$q', 'editableUtils',\n  function($q, editableUtils) {\n\n  //EditableController function\n  EditableController.$inject = ['$scope', '$attrs', '$element', '$parse', 'editableThemes', 'editableIcons', 'editableOptions', '$rootScope', '$compile', '$q'];\n  function EditableController($scope, $attrs, $element, $parse, editableThemes, editableIcons, editableOptions, $rootScope, $compile, $q) {\n    var valueGetter;\n\n    //if control is disabled - it does not participate in waiting process\n    var inWaiting;\n\n    var self = this;\n\n    self.scope = $scope;\n    self.elem = $element;\n    self.attrs = $attrs;\n    self.inputEl = null;\n    self.editorEl = null;\n    self.single = true;\n    self.error = '';\n    self.theme =  editableThemes[$attrs.editableTheme] || editableThemes[editableOptions.theme] || editableThemes['default'];\n    self.parent = {};\n\n    //will be undefined if icon_set is default and theme is default\n    self.icon_set = editableOptions.icon_set === 'default' ? editableIcons.default[editableOptions.theme] : editableIcons.external[editableOptions.icon_set];\n\n    //to be overwritten by directive\n    self.inputTpl = '';\n    self.directiveName = '';\n\n    // with majority of controls copy is not needed, but..\n    // copy MUST NOT be used for `select-multiple` with objects as items\n    // copy MUST be used for `checklist`\n    self.useCopy = false;\n\n    //runtime (defaults)\n    self.single = null;\n\n    /**\n     * Attributes defined with `e-*` prefix automatically transferred from original element to\n     * control.  \n     * For example, if you set `<span editable-text=\"user.name\" e-style=\"width: 100px\"`>\n     * then input will appear as `<input style=\"width: 100px\">`.  \n     * See [demo](#text-customize).\n     * \n     * @var {any|attribute} e-*\n     * @memberOf editable-element\n     */ \n\n    /**\n     * Whether to show ok/cancel buttons. Values: `right|no`.\n     * If set to `no` control automatically submitted when value changed.  \n     * If control is part of form buttons will never be shown. \n     * \n     * @var {string|attribute} buttons\n     * @memberOf editable-element\n     */    \n    self.buttons = 'right'; \n    /**\n     * Action when control losses focus. Values: `cancel|submit|ignore`.\n     * Has sense only for single editable element.\n     * Otherwise, if control is part of form - you should set `blur` of form, not of individual element.\n     * \n     * @var {string|attribute} blur\n     * @memberOf editable-element\n     */     \n    // no real `blur` property as it is transferred to editable form\n\n    //init\n    self.init = function(single) {\n      self.single = single;\n\n      self.name = $attrs.eName || $attrs[self.directiveName];\n      /*\n      if(!$attrs[directiveName] && !$attrs.eNgModel && ($attrs.eValue === undefined)) {\n        throw 'You should provide value for `'+directiveName+'` or `e-value` in editable element!';\n      }\n      */\n      if($attrs[self.directiveName]) {\n        valueGetter = $parse($attrs[self.directiveName]);\n      } else {\n        throw 'You should provide value for `'+self.directiveName+'` in editable element!';\n      }\n\n      // settings for single and non-single\n      if (!self.single) {\n        // hide buttons for non-single\n        self.buttons = 'no';\n      } else {\n        self.buttons = self.attrs.buttons || editableOptions.buttons;\n      }\n\n      //if name defined --> watch changes and update $data in form\n      if($attrs.eName) {\n        self.scope.$watch('$data', function(newVal){\n          self.scope.$form.$data[$attrs.eName] = newVal;\n        });\n      }\n\n      /**\n       * Called when control is shown.  \n       * See [demo](#select-remote).\n       * \n       * @var {method|attribute} onshow\n       * @memberOf editable-element\n       */\n      if($attrs.onshow) {\n        self.onshow = function() {\n          return self.catchError($parse($attrs.onshow)($scope));\n        };\n      }\n\n      /**\n       * Called when control is hidden after both save or cancel.  \n       * \n       * @var {method|attribute} onhide\n       * @memberOf editable-element\n       */\n      if($attrs.onhide) {\n        self.onhide = function() {\n          return $parse($attrs.onhide)($scope);\n        };\n      }\n\n      /**\n       * Called when control is cancelled.  \n       * \n       * @var {method|attribute} oncancel\n       * @memberOf editable-element\n       */\n      if($attrs.oncancel) {\n        self.oncancel = function() {\n          return $parse($attrs.oncancel)($scope);\n        };\n      }          \n\n      /**\n       * Called during submit before value is saved to model.  \n       * See [demo](#onbeforesave).\n       * \n       * @var {method|attribute} onbeforesave\n       * @memberOf editable-element\n       */\n      if ($attrs.onbeforesave) {\n        self.onbeforesave = function() {\n          return self.catchError($parse($attrs.onbeforesave)($scope));\n        };\n      }\n\n      /**\n       * Called during submit after value is saved to model.  \n       * See [demo](#onaftersave).\n       * \n       * @var {method|attribute} onaftersave\n       * @memberOf editable-element\n       */\n      if ($attrs.onaftersave) {\n        self.onaftersave = function() {\n          return self.catchError($parse($attrs.onaftersave)($scope));\n        };\n      }\n\n      // watch change of model to update editable element\n      // now only add/remove `editable-empty` class.\n      // Initially this method called with newVal = undefined, oldVal = undefined\n      // so no need initially call handleEmpty() explicitly\n      $scope.$parent.$watch($attrs[self.directiveName], function(newVal, oldVal) {\n        self.setLocalValue();\n        self.handleEmpty();\n      });\n    };\n\n    self.render = function() {\n      var theme = self.theme;\n\n      //build input\n      self.inputEl = angular.element(self.inputTpl);\n\n      //build controls\n      self.controlsEl = angular.element(theme.controlsTpl);\n      self.controlsEl.append(self.inputEl);\n\n      //build buttons\n      if(self.buttons !== 'no') {\n        self.buttonsEl = angular.element(theme.buttonsTpl);\n        self.submitEl = angular.element(theme.submitTpl);\n        self.resetEl = angular.element(theme.resetTpl);\n        self.cancelEl = angular.element(theme.cancelTpl);\n        self.submitEl.attr('title', editableOptions.submitButtonTitle);\n        self.submitEl.attr('aria-label', editableOptions.submitButtonAriaLabel);\n        self.cancelEl.attr('title', editableOptions.cancelButtonTitle);\n        self.cancelEl.attr('aria-label', editableOptions.cancelButtonAriaLabel);\n        self.resetEl.attr('title', editableOptions.clearButtonTitle);\n        self.resetEl.attr('aria-label', editableOptions.clearButtonAriaLabel);\n\n        if (self.icon_set) {\n          self.submitEl.find('span').addClass(self.icon_set.ok);\n          self.cancelEl.find('span').addClass(self.icon_set.cancel);\n          self.resetEl.find('span').addClass(self.icon_set.clear);\n        }\n\n        self.buttonsEl.append(self.submitEl).append(self.cancelEl);\n\n        if (editableOptions.displayClearButton) {\n          self.buttonsEl.append(self.resetEl);\n        }\n\n        self.controlsEl.append(self.buttonsEl);\n        \n        self.inputEl.addClass('editable-has-buttons');\n      }\n\n      //build error\n      self.errorEl = angular.element(theme.errorTpl);\n      self.controlsEl.append(self.errorEl);\n\n      //build editor\n      self.editorEl = angular.element(self.single ? theme.formTpl : theme.noformTpl);\n      self.editorEl.append(self.controlsEl);\n\n      // transfer `e-*|data-e-*|x-e-*` attributes\n      for (var k in $attrs.$attr) {\n        if(k.length <= 1) {\n          continue;\n        }\n        var transferAttr = false;\n        var nextLetter = k.substring(1, 2);\n\n        // if starts with `e` + uppercase letter\n        if (k.substring(0, 1) === 'e' && nextLetter === nextLetter.toUpperCase()) {\n          transferAttr = k.substring(1); // cut `e`\n        } else {\n          continue;\n        }\n        \n        // exclude `form` and `ng-submit`, \n        if (transferAttr === 'Form' || transferAttr === 'NgSubmit') {\n          continue;\n        }\n\n        var firstLetter = transferAttr.substring(0, 1);\n        var secondLetter = transferAttr.substring(1, 2);\n\n        // convert back to lowercase style\n        if (secondLetter === secondLetter.toUpperCase() &&\n            firstLetter === firstLetter.toUpperCase()) {\n          transferAttr = firstLetter.toLowerCase() + '-' + editableUtils.camelToDash(transferAttr.substring(1));\n        } else {\n          transferAttr = firstLetter.toLowerCase() + editableUtils.camelToDash(transferAttr.substring(1));\n        }\n\n        // workaround for attributes without value (e.g. `multiple = \"multiple\"`)\n        // except for 'e-value'\n        var attrValue = (transferAttr !== 'value' && $attrs[k] === '') ? transferAttr : $attrs[k];\n\n        // set attributes to input\n        self.inputEl.attr(transferAttr, attrValue);\n      }\n\n      self.inputEl.addClass('editable-input');\n      self.inputEl.attr('ng-model', '$parent.$data');\n\n      // add directiveName class to editor, e.g. `editable-text`\n      self.editorEl.addClass(editableUtils.camelToDash(self.directiveName));\n\n      if (self.single) {\n        self.editorEl.attr('editable-form', '$form');\n        // transfer `blur` to form\n        self.editorEl.attr('blur', self.attrs.blur || (self.buttons === 'no' ? 'cancel' : editableOptions.blurElem));\n      }\n\n      //apply `postrender` method of theme\n      if (angular.isFunction(theme.postrender)) {\n        theme.postrender.call(self);\n      }\n\n    };\n\n    // with majority of controls copy is not needed, but..\n    // copy MUST NOT be used for `select-multiple` with objects as items\n    // copy MUST be used for `checklist`\n    self.setLocalValue = function() {\n      self.scope.$data = self.useCopy ? \n        angular.copy(valueGetter($scope.$parent)) : \n        valueGetter($scope.$parent);\n    };\n\n    // reference of the scope to use for $compile\n    var newScope = null;\n    //show\n    self.show = function() {\n      // set value of scope.$data\n      self.setLocalValue();\n\n      /*\n      Originally render() was inside init() method, but some directives polluting editorEl,\n      so it is broken on second openning.\n      Cloning is not a solution as jqLite can not clone with event handler's.\n      */\n      self.render();\n\n      // insert into DOM\n      $element.after(self.editorEl);\n\n      // compile (needed to attach ng-* events from markup)\n      newScope = $scope.$new();\n      $compile(self.editorEl)(newScope);\n\n      // attach listeners (`escape`, autosubmit, etc)\n      self.addListeners();\n\n      // hide element\n      $element.addClass('editable-hide');\n\n      // onshow\n      return self.onshow();\n    };\n\n    //hide\n    self.hide = function() {\n\n      // destroy the scope to prevent memory leak\n      newScope.$destroy();\n\n      self.controlsEl.remove();\n      self.editorEl.remove();\n      $element.removeClass('editable-hide');\n\n      // onhide\n      return self.onhide();\n    };\n\n    // cancel\n    self.cancel = function() {\n      // oncancel\n      self.oncancel();\n      // don't call hide() here as it called in form's code\n    };\n\n    /*\n    Called after show to attach listeners\n    */\n    self.addListeners = function() {\n      // bind keyup for `escape`\n      self.inputEl.bind('keyup', function(e) {\n          if(!self.single) {\n            return;\n          }\n\n          // todo: move this to editable-form!\n          switch(e.keyCode) {\n            // hide on `escape` press\n            case 27:\n              self.scope.$apply(function() {\n                self.scope.$form.$cancel();\n              });\n            break;\n          }\n      });\n\n      // autosubmit when `no buttons`\n      if (self.single && self.buttons === 'no') {\n        self.autosubmit();\n      }\n\n      // click - mark element as clicked to exclude in document click handler\n      self.editorEl.bind('click', function(e) {\n        // ignore right/middle button click\n        if (e.which && e.which !== 1) {\n          return;\n        }\n\n        if (self.scope.$form.$visible) {\n          self.scope.$form._clicked = true;\n        }\n      });\n    };\n\n    // setWaiting\n    self.setWaiting = function(value) {\n      if (value) {\n        // participate in waiting only if not disabled\n        inWaiting = !self.inputEl.attr('disabled') &&\n                    !self.inputEl.attr('ng-disabled') &&\n                    !self.inputEl.attr('ng-enabled');\n        if (inWaiting) {\n          self.inputEl.attr('disabled', 'disabled');\n          if(self.buttonsEl) {\n            self.buttonsEl.find('button').attr('disabled', 'disabled');\n          }\n        }\n      } else {\n        if (inWaiting) {\n          self.inputEl.removeAttr('disabled');\n          if (self.buttonsEl) {\n            self.buttonsEl.find('button').removeAttr('disabled');\n          }\n        }\n      }\n    };\n\n    self.activate = function(start, end) {\n      setTimeout(function() {\n        var el = self.inputEl[0];\n\n        if (editableOptions.activate === 'focus' && el.focus) {\n          if(start){\n            end = end || start;\n            el.onfocus = function(){\n              var that = this;\n              setTimeout(function(){\n                that.setSelectionRange(start,end);\n              });\n            };\n          }\n          \n          if (self.directiveName == 'editableRadiolist' || self.directiveName == 'editableChecklist' ||\n              self.directiveName == 'editableBsdate' || self.directiveName == 'editableTagsInput') {\n            //Set focus to first pristine element in the list\n            el.querySelector('.ng-pristine').focus();\n          } else {\n            el.focus();\n          }\n        } else if (editableOptions.activate === 'select') {\n          if (el.select){\n            el.select();\n          } else if (el.focus) {\n            el.focus();\n          }\n        }\n      }, 0);\n    };\n\n    self.setError = function(msg) {\n      if(!angular.isObject(msg)) {\n        $scope.$error = msg;\n        self.error = msg;\n      }\n    };\n\n    /*\n    Checks that result is string or promise returned string and shows it as error message\n    Applied to onshow, onbeforesave, onaftersave\n    */\n    self.catchError = function(result, noPromise) {\n      if (angular.isObject(result) && noPromise !== true) {\n        $q.when(result).then(\n          //success and fail handlers are equal\n          angular.bind(this, function(r) {\n            this.catchError(r, true);\n          }),\n          angular.bind(this, function(r) {\n            this.catchError(r, true);\n          })\n        );\n      //check $http error\n      } else if (noPromise && angular.isObject(result) && result.status &&\n        (result.status !== 200) && result.data && angular.isString(result.data)) {\n        this.setError(result.data);\n        //set result to string: to let form know that there was error\n        result = result.data;\n      } else if (angular.isString(result)) {\n        this.setError(result);\n      }\n      return result;\n    };\n\n    self.save = function() {\n      valueGetter.assign($scope.$parent,\n          self.useCopy ? angular.copy(self.scope.$data) : self.scope.$data);\n\n      // no need to call handleEmpty here as we are watching change of model value\n      // self.handleEmpty();\n    };\n\n    /*\n    attach/detach `editable-empty` class to element\n    */\n    self.handleEmpty = function() {\n      var val = valueGetter($scope.$parent);\n      var isEmpty = val === null || val === undefined || val === \"\" || (angular.isArray(val) && val.length === 0); \n      $element.toggleClass('editable-empty', isEmpty);\n    };\n\n    /*\n    Called when `buttons = \"no\"` to submit automatically\n    */\n    self.autosubmit = angular.noop;\n\n    self.onshow = angular.noop;\n    self.onhide = angular.noop;\n    self.oncancel = angular.noop;\n    self.onbeforesave = angular.noop;\n    self.onaftersave = angular.noop;\n  }\n\n  return EditableController;\n}]);\n\n/*\neditableFactory is used to generate editable directives (see `/directives` folder)\nInside it does several things:\n- detect form for editable element. Form may be one of three types:\n  1. autogenerated form (for single editable elements)\n  2. wrapper form (element wrapped by <form> tag)\n  3. linked form (element has `e-form` attribute pointing to existing form)\n\n- attach editableController to element\n\nDepends on: editableController, editableFormFactory\n*/\nangular.module('xeditable').factory('editableDirectiveFactory',\n['$parse', '$compile', 'editableThemes', '$rootScope', '$document', 'editableController', 'editableFormController', 'editableOptions',\nfunction($parse, $compile, editableThemes, $rootScope, $document, editableController, editableFormController, editableOptions) {\n\n  //directive object\n  return function(overwrites) {\n    return {\n      restrict: 'A',\n      scope: true,\n      require: [overwrites.directiveName, '?^form'],\n      controller: editableController,\n      link: function(scope, elem, attrs, ctrl) {\n        // editable controller\n        var eCtrl = ctrl[0];\n\n        // form controller\n        var eFormCtrl;\n\n        // this variable indicates is element is bound to some existing form,\n        // or it's single element who's form will be generated automatically\n        // By default consider single element without any linked form.ß\n        var hasForm = false;\n\n        // element wrapped by form\n        if (ctrl[1]) {\n          eFormCtrl = ctrl[1];\n          hasForm = attrs.eSingle === undefined;\n        } else if (attrs.eForm) { // element not wrapped by <form>, but we have `e-form` attr\n          var getter = $parse(attrs.eForm)(scope);\n          if (getter) { // form exists in scope (above), e.g. editable column\n            eFormCtrl = getter;\n            hasForm = true;\n          } else if (elem && typeof elem.parents === \"function\" && elem.parents().last().find('form[name='+attrs.eForm+']').length) { // form exists below or not exist at all: check document.forms\n            // form is below and not processed yet\n            eFormCtrl = null;\n            hasForm = true;\n          } else {\n            // form exists below or not exist at all: check document.forms\n            for (var i=0; i<$document[0].forms.length;i++) {\n              if ($document[0].forms[i].name === attrs.eForm) {\n                // form is below and not processed yet\n                eFormCtrl = null;\n                hasForm = true;\n                break;\n              }\n            }\n          }\n        }\n\n        /*\n        if(hasForm && !attrs.eName) {\n          throw 'You should provide `e-name` for editable element inside form!';\n        }\n        */\n\n        //check for `editable-form` attr in form\n        /*\n        if(eFormCtrl && ) {\n          throw 'You should provide `e-name` for editable element inside form!';\n        }\n        */\n\n        // store original props to `parent` before merge\n        angular.forEach(overwrites, function(v, k) {\n          if(eCtrl[k] !== undefined) {\n            eCtrl.parent[k] = eCtrl[k];\n          }\n        });\n\n        // merge overwrites to base editable controller\n        angular.extend(eCtrl, overwrites);\n\n        // x-editable can be disabled using editableOption or edit-disabled attribute\n        var is_disabled = function() {\n          return angular.isDefined(attrs.editDisabled) ?\n            scope.$eval(attrs.editDisabled) :\n            editableOptions.isDisabled;\n        };\n\n        // init editable ctrl\n        eCtrl.init(!hasForm);\n\n        // publich editable controller as `$editable` to be referenced in html\n        scope.$editable = eCtrl;\n\n        // add `editable` class to element\n        elem.addClass('editable');\n\n        // hasForm\n        if(hasForm) {\n          if(eFormCtrl) {\n            scope.$form = eFormCtrl;\n            if(!scope.$form.$addEditable) {\n              throw 'Form with editable elements should have `editable-form` attribute.';\n            }\n            scope.$form.$addEditable(eCtrl);\n          } else {\n            // future form (below): add editable controller to buffer and add to form later\n            $rootScope.$$editableBuffer = $rootScope.$$editableBuffer || {};\n            $rootScope.$$editableBuffer[attrs.eForm] = $rootScope.$$editableBuffer[attrs.eForm] || [];\n            $rootScope.$$editableBuffer[attrs.eForm].push(eCtrl);\n            scope.$form = null; //will be re-assigned later\n          }\n        // !hasForm\n        } else {\n          // create editableform controller\n          scope.$form = editableFormController();\n          // add self to editable controller\n          scope.$form.$addEditable(eCtrl);\n\n          // if `e-form` provided, publish local $form in scope\n          if(attrs.eForm) {\n            ($parse(attrs.eForm).assign || angular.noop)(scope.$parent, scope.$form);\n          }\n\n          // bind click - if no external form defined\n          if(!attrs.eForm || attrs.eClickable) {\n            elem.addClass('editable-click');\n            elem.bind(editableOptions.activationEvent, function(e) {\n              e.preventDefault();\n              e.editable = eCtrl;\n              if(!is_disabled()) {\n                scope.$apply(function(){\n                  scope.$form.$show();\n                });\n              }\n            });\n          }\n        }\n\n      }\n    };\n  };\n}]);\n\n/*\nReturns editableForm controller\n*/\nangular.module('xeditable').factory('editableFormController', \n  ['$parse', '$document', '$rootScope', 'editablePromiseCollection', 'editableUtils',\n  function($parse, $document, $rootScope, editablePromiseCollection, editableUtils) {\n\n  // array of opened editable forms\n  var shown = [];\n\n  //Check if the child element correspond or is a descendant of the parent element\n  var isSelfOrDescendant = function (parent, child) {\n    if (child == parent) {\n      return true;\n    }\n\n    var node = child.parentNode;\n    while (node !== null) {\n      if (node == parent) {\n        return true;\n      }\n      node = node.parentNode;\n    }\n    return false;\n  };\n  \n  //Check if it is a real blur : if the click event appear on a shown editable elem, this is not a blur.\n  var isBlur = function(shown, event) {\n    var isBlur = true;\n\n    var editables = shown.$editables;\n    angular.forEach(editables, function(v){\n      var element = v.editorEl[0];\n      if (isSelfOrDescendant(element, event.target))\n        isBlur = false;\n      \n    });\n    return isBlur;\n  };\n  \n  // bind click to body: cancel|submit|ignore forms\n  $document.bind('click', function(e) {\n    // ignore right/middle button click\n    if (e.which && e.which !== 1) {\n      return;\n    }\n\n    var toCancel = [];\n    var toSubmit = [];\n    for (var i=0; i<shown.length; i++) {\n\n      // exclude clicked\n      if (shown[i]._clicked) {\n        shown[i]._clicked = false;\n        continue;\n      }\n\n      // exclude waiting\n      if (shown[i].$waiting) {\n        continue;\n      }\n\n      if (shown[i]._blur === 'cancel' && isBlur(shown[i], e)) {\n        toCancel.push(shown[i]);\n      }\n\n      if (shown[i]._blur === 'submit' && isBlur(shown[i], e)) {\n        toSubmit.push(shown[i]);\n      }\n    }\n\n    if (toCancel.length || toSubmit.length) {\n      $rootScope.$apply(function() {\n        angular.forEach(toCancel, function(v){ v.$cancel(); });\n        angular.forEach(toSubmit, function(v){ v.$submit(); });\n      });\n    }\n  });\n \n  $rootScope.$on('closeEdit', function() {\n    for(var i=0; i < shown.length; i++) {\n      shown[i].$hide();\n    }\n  }); \n\n  var base = {\n    $addEditable: function(editable) {\n      //console.log('add editable', editable.elem, editable.elem.bind);\n      this.$editables.push(editable);\n\n      //'on' is not supported in angular 1.0.8\n      editable.elem.bind('$destroy', angular.bind(this, this.$removeEditable, editable));\n\n      //bind editable's local $form to self (if not bound yet, below form) \n      if (!editable.scope.$form) {\n        editable.scope.$form = this;\n      }\n\n      //if form already shown - call show() of new editable\n      if (this.$visible) {\n        editable.catchError(editable.show());\n      }\n      editable.catchError(editable.setWaiting(this.$waiting));\n    },\n\n    $removeEditable: function(editable) {\n      //arrayRemove\n      for(var i=0; i < this.$editables.length; i++) {\n        if(this.$editables[i] === editable) {\n          this.$editables.splice(i, 1);\n          return;\n        }\n      }\n    },\n\n    /**\n     * Shows form with editable controls.\n     * \n     * @method $show()\n     * @memberOf editable-form\n     */\n    $show: function() {\n      if (this.$visible) {\n        return;\n      }\n\n      this.$visible = true;\n\n      var pc = editablePromiseCollection();\n\n      //own show\n      pc.when(this.$onshow());\n\n      //clear errors\n      this.$setError(null, '');\n\n      //children show\n      angular.forEach(this.$editables, function(editable) {\n        pc.when(editable.show());\n      });\n\n      //wait promises and activate\n      pc.then({\n        onWait: angular.bind(this, this.$setWaiting), \n        onTrue: angular.bind(this, this.$activate), \n        onFalse: angular.bind(this, this.$activate), \n        onString: angular.bind(this, this.$activate)\n      });\n\n      // add to internal list of shown forms\n      // setTimeout needed to prevent closing right after opening (e.g. when trigger by button)\n      setTimeout(angular.bind(this, function() {\n        // clear `clicked` to get ready for clicks on visible form\n        this._clicked = false;\n        if(editableUtils.indexOf(shown, this) === -1) {\n          shown.push(this);\n        }\n      }), 0);      \n    },\n\n    /**\n     * Sets focus on form field specified by `name`.<br/>\n     * When trying to set the focus on a form field of a new row in the editable table, the `$activate` call needs to be wrapped in a `$timeout` call so that the form is rendered before the `$activate` function is called.\n     * \n     * @method $activate(name)\n     * @param {string} name name of field\n     * @memberOf editable-form\n     */\n    $activate: function(name) {\n      var i;\n      if (this.$editables.length) {\n        //activate by name\n        if (angular.isString(name)) {\n          for(i=0; i<this.$editables.length; i++) {\n            if (this.$editables[i].name === name) {\n              this.$editables[i].activate();\n              return;\n            }\n          }\n        }\n\n        //try activate error field\n        for(i=0; i<this.$editables.length; i++) {\n          if (this.$editables[i].error) {\n            this.$editables[i].activate();\n            return;\n          }\n        }\n\n        //by default activate first field\n        this.$editables[0].activate(this.$editables[0].elem[0].selectionStart, this.$editables[0].elem[0].selectionEnd);\n      }\n    },\n\n    /**\n     * Hides form with editable controls without saving.\n     * \n     * @method $hide()\n     * @memberOf editable-form\n     */\n    $hide: function() {\n      if (!this.$visible) {\n        return;\n      }      \n      this.$visible = false;\n      // self hide\n      this.$onhide();\n      // children's hide\n      angular.forEach(this.$editables, function(editable) {\n        editable.hide();\n      });\n\n      // remove from internal list of shown forms\n      editableUtils.arrayRemove(shown, this);\n    },\n\n    /**\n     * Triggers `oncancel` event and calls `$hide()`.\n     * \n     * @method $cancel()\n     * @memberOf editable-form\n     */\n    $cancel: function() {\n      if (!this.$visible) {\n        return;\n      }      \n      // self cancel\n      this.$oncancel();\n      // children's cancel      \n      angular.forEach(this.$editables, function(editable) {\n        editable.cancel();\n      });\n      // self hide\n      this.$hide();\n    },    \n\n    $setWaiting: function(value) {\n      this.$waiting = !!value;\n      // we can't just set $waiting variable and use it via ng-disabled in children\n      // because in editable-row form is not accessible\n      angular.forEach(this.$editables, function(editable) {\n        editable.setWaiting(!!value);\n      });\n    },\n\n    /**\n     * Shows error message for particular field.\n     * \n     * @method $setError(name, msg)\n     * @param {string} name name of field\n     * @param {string} msg error message\n     * @memberOf editable-form\n     */\n    $setError: function(name, msg) {\n      angular.forEach(this.$editables, function(editable) {\n        if(!name || editable.name === name) {\n          editable.setError(msg);\n        }\n      });\n    },\n\n    $submit: function() {\n      if (this.$waiting) {\n        return;\n      } \n\n      //clear errors\n      this.$setError(null, '');\n\n      //children onbeforesave\n      var pc = editablePromiseCollection();\n      angular.forEach(this.$editables, function(editable) {\n        pc.when(editable.onbeforesave());\n      });\n\n      /*\n      onbeforesave result:\n      - true/undefined: save data and close form\n      - false: close form without saving\n      - string: keep form open and show error\n      */\n      pc.then({\n        onWait: angular.bind(this, this.$setWaiting), \n        onTrue: angular.bind(this, checkSelf, true), \n        onFalse: angular.bind(this, checkSelf, false), \n        onString: angular.bind(this, this.$activate)\n      });\n\n      //save\n      function checkSelf(childrenTrue){\n        var pc = editablePromiseCollection();\n        pc.when(this.$onbeforesave());\n        pc.then({\n          onWait: angular.bind(this, this.$setWaiting), \n          onTrue: childrenTrue ? angular.bind(this, this.$save) : angular.bind(this, this.$hide), \n          onFalse: angular.bind(this, this.$hide), \n          onString: angular.bind(this, this.$activate)\n        });\n      }\n    },\n\n    $save: function() {\n      // write model for each editable\n      angular.forEach(this.$editables, function(editable) {\n        editable.save();\n      });\n\n      //call onaftersave of self and children\n      var pc = editablePromiseCollection();\n      pc.when(this.$onaftersave());\n      angular.forEach(this.$editables, function(editable) {\n        pc.when(editable.onaftersave());\n      });\n\n      /*\n      onaftersave result:\n      - true/undefined/false: just close form\n      - string: keep form open and show error\n      */\n      pc.then({\n        onWait: angular.bind(this, this.$setWaiting), \n        onTrue: angular.bind(this, this.$hide), \n        onFalse: angular.bind(this, this.$hide), \n        onString: angular.bind(this, this.$activate)\n      });\n    },\n\n    $onshow: angular.noop,\n    $oncancel: angular.noop,\n    $onhide: angular.noop,\n    $onbeforesave: angular.noop,\n    $onaftersave: angular.noop\n  };\n\n  return function() {\n    return angular.extend({\n      $editables: [],\n      /**\n       * Form visibility flag.\n       * \n       * @var {bool} $visible\n       * @memberOf editable-form\n       */\n      $visible: false,\n      /**\n       * Form waiting flag. It becomes `true` when form is loading or saving data.\n       * \n       * @var {bool} $waiting\n       * @memberOf editable-form\n       */\n      $waiting: false,\n      $data: {},\n      _clicked: false,\n      _blur: null\n    }, base);\n  };\n}]);\n\n/**\n * EditableForm directive. Should be defined in <form> containing editable controls.  \n * It add some usefull methods to form variable exposed to scope by `name=\"myform\"` attribute.\n *\n * @namespace editable-form\n */\nangular.module('xeditable').directive('editableForm',\n  ['$rootScope', '$parse', 'editableFormController', 'editableOptions',\n  function($rootScope, $parse, editableFormController, editableOptions) {\n    return {\n      restrict: 'A',\n      require: ['form'],\n      //require: ['form', 'editableForm'],\n      //controller: EditableFormController,\n      compile: function() {\n        return {\n          pre: function(scope, elem, attrs, ctrl) {\n            var form = ctrl[0];\n            var eForm;\n\n            //if `editableForm` has value - publish smartly under this value\n            //this is required only for single editor form that is created and removed\n            if(attrs.editableForm) {\n              if(scope[attrs.editableForm] && scope[attrs.editableForm].$show) {\n                eForm = scope[attrs.editableForm];\n                angular.extend(form, eForm);\n              } else {\n                eForm = editableFormController();\n                scope[attrs.editableForm] = eForm;\n                angular.extend(eForm, form);\n              }\n            } else { //just merge to form and publish if form has name\n              eForm = editableFormController();\n              angular.extend(form, eForm);\n            }\n\n            //read editables from buffer (that appeared before FORM tag)\n            var buf = $rootScope.$$editableBuffer;\n            var name = form.$name;\n            if(name && buf && buf[name]) {\n              angular.forEach(buf[name], function(editable) {\n                eForm.$addEditable(editable);\n              });\n              delete buf[name];\n            }\n          },\n          post: function(scope, elem, attrs, ctrl) {\n            var eForm;\n\n            if(attrs.editableForm && scope[attrs.editableForm] && scope[attrs.editableForm].$show) {\n              eForm = scope[attrs.editableForm];\n            } else {\n              eForm = ctrl[0];\n            }\n\n            /**\n             * Called when form is shown.\n             * \n             * @var {method|attribute} onshow \n             * @memberOf editable-form\n             */\n            if(attrs.onshow) {\n              eForm.$onshow = angular.bind(eForm, $parse(attrs.onshow), scope);\n            }\n\n            /**\n             * Called when form hides after both save or cancel.\n             * \n             * @var {method|attribute} onhide \n             * @memberOf editable-form\n             */\n            if(attrs.onhide) {\n              eForm.$onhide = angular.bind(eForm, $parse(attrs.onhide), scope);\n            }\n\n            /**\n             * Called when form is cancelled.\n             * \n             * @var {method|attribute} oncancel\n             * @memberOf editable-form\n             */\n            if(attrs.oncancel) {\n              eForm.$oncancel = angular.bind(eForm, $parse(attrs.oncancel), scope);\n            }\n\n            /**\n             * Whether form initially rendered in shown state.\n             *\n             * @var {bool|attribute} shown\n             * @memberOf editable-form\n             */\n            if(attrs.shown && $parse(attrs.shown)(scope)) {\n              eForm.$show();\n            }\n\n            /**\n             * Action when form losses focus. Values: `cancel|submit|ignore`.\n             * Default is `ignore`.\n             * \n             * @var {string|attribute} blur\n             * @memberOf editable-form\n             */\n            eForm._blur = attrs.blur || editableOptions.blurForm;\n\n            // onbeforesave, onaftersave\n            if(!attrs.ngSubmit && !attrs.submit) {\n              /**\n               * Called after all children `onbeforesave` callbacks but before saving form values\n               * to model.  \n               * If at least one children callback returns `non-string` - it will not not be called.  \n               * See [editable-form demo](#editable-form) for details.\n               * \n               * @var {method|attribute} onbeforesave\n               * @memberOf editable-form\n               * \n               */\n              if(attrs.onbeforesave) {\n                eForm.$onbeforesave = function() {\n                  return $parse(attrs.onbeforesave)(scope, {$data: eForm.$data});\n                };\n              }\n\n              /**\n               * Called when form values are saved to model.  \n               * See [editable-form demo](#editable-form) for details.\n               * \n               * @var {method|attribute} onaftersave \n               * @memberOf editable-form\n               * \n               */\n              if(attrs.onaftersave) {\n                eForm.$onaftersave = function() {\n                  return $parse(attrs.onaftersave)(scope, {$data: eForm.$data});\n                };\n              }\n\n              elem.bind('submit', function(event) {\n                event.preventDefault();\n                scope.$apply(function() {\n                  eForm.$submit();\n                });\n              });\n            }\n\n\n            // click - mark form as clicked to exclude in document click handler\n            elem.bind('click', function(e) {\n              // ignore right/middle button click\n              if (e.which && e.which !== 1) {\n                return;\n              }\n\n              if (eForm.$visible) {\n                eForm._clicked = true;\n              }\n            });   \n\n          }\n        };\n      }\n    };\n}]);\n/**\n * editablePromiseCollection\n *  \n * Collect results of function calls. Shows waiting if there are promises. \n * Finally, applies callbacks if:\n * - onTrue(): all results are true and all promises resolved to true\n * - onFalse(): at least one result is false or promise resolved to false\n * - onString(): at least one result is string or promise rejected or promise resolved to string\n */\n\nangular.module('xeditable').factory('editablePromiseCollection', ['$q', function($q) { \n\n  function promiseCollection() {\n    return {\n      promises: [],\n      hasFalse: false,\n      hasString: false,\n      when: function(result, noPromise) {\n        if (result === false) {\n          this.hasFalse = true;\n        } else if (!noPromise && angular.isObject(result)) {\n          this.promises.push($q.when(result));\n        } else if (angular.isString(result)){\n          this.hasString = true;\n        } else { //result === true || result === undefined || result === null\n          return;\n        }\n      },\n      //callbacks: onTrue, onFalse, onString\n      then: function(callbacks) {\n        callbacks = callbacks || {};\n        var onTrue = callbacks.onTrue || angular.noop;\n        var onFalse = callbacks.onFalse || angular.noop;\n        var onString = callbacks.onString || angular.noop;\n        var onWait = callbacks.onWait || angular.noop;\n\n        var self = this;\n\n        if (this.promises.length) {\n          onWait(true);\n          $q.all(this.promises).then(\n            //all resolved       \n            function(results) {\n              onWait(false);\n              //check all results via same `when` method (without checking promises)\n              angular.forEach(results, function(result) {\n                self.when(result, true);  \n              });\n              applyCallback();\n            },\n            //some rejected\n            function(error) { \n              onWait(false);\n              onString();\n            }\n            );\n        } else {\n          applyCallback();\n        }\n\n        function applyCallback() {\n          if (!self.hasString && !self.hasFalse) {\n            onTrue();\n          } else if (!self.hasString && self.hasFalse) {\n            onFalse();\n          } else {\n            onString();\n          }\n        }\n\n      }\n    };\n  }\n\n  return promiseCollection;\n\n}]);\n\n/**\n * editableUtils\n */\n angular.module('xeditable').factory('editableUtils', [function() {\n  return {\n    indexOf: function (array, obj) {\n      if (array.indexOf) return array.indexOf(obj);\n\n      for ( var i = 0; i < array.length; i++) {\n        if (obj === array[i]) return i;\n      }\n      return -1;\n    },\n\n    arrayRemove: function (array, value) {\n      var index = this.indexOf(array, value);\n      if (index >= 0) {\n        array.splice(index, 1);\n      }\n      return value;\n    },\n\n    // copy from https://github.com/angular/angular.js/blob/master/src/Angular.js\n    camelToDash: function(str) {\n      var SNAKE_CASE_REGEXP = /[A-Z]/g;\n      return str.replace(SNAKE_CASE_REGEXP, function(letter, pos) {\n        return (pos ? '-' : '') + letter.toLowerCase();\n      });\n    },\n\n    dashToCamel: function(str) {\n      var SPECIAL_CHARS_REGEXP = /([\\:\\-\\_]+(.))/g;\n      var MOZ_HACK_REGEXP = /^moz([A-Z])/;\n      return str.\n      replace(SPECIAL_CHARS_REGEXP, function(_, separator, letter, offset) {\n        return offset ? letter.toUpperCase() : letter;\n      }).\n      replace(MOZ_HACK_REGEXP, 'Moz$1');\n    },\n\n    rename: function (tag, el) {\n      if (el[0] && el[0].attributes) {\n        var newEl = angular.element('<' + tag + '/>');\n        newEl.html(el.html());\n        var attrs = el[0].attributes;\n        for (var i = 0; i < attrs.length; ++i) {\n            newEl.attr(attrs.item(i).nodeName, attrs.item(i).value);\n        }\n        return newEl;\n      }\n    }\n  };\n}]);\n\n/**\n * editableNgOptionsParser\n *\n * see: https://github.com/angular/angular.js/blob/master/src/ng/directive/select.js#L131\n */\n angular.module('xeditable').factory('editableNgOptionsParser', [function() {\n  //0000111110000000000022220000000000000000000000333300000000000000444444444444444000000000555555555555555000000066666666666666600000000000000007777000000000000000000088888\n  var NG_OPTIONS_REGEXP = /^\\s*(.*?)(?:\\s+as\\s+(.*?))?(?:\\s+group\\s+by\\s+(.*))?\\s+for\\s+(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+(.*?)(?:\\s+track\\s+by\\s+(.*?))?$/;\n\n  function parser(optionsExp) {\n    var match;\n\n    if (! (match = optionsExp.match(NG_OPTIONS_REGEXP))) {\n      throw 'ng-options parse error';\n    }\n\n    var \n    displayFn = match[2] || match[1],\n    valueName = match[4] || match[6],\n    keyName = match[5],\n    groupByFn = match[3] || '',\n    valueFn = match[2] ? match[1] : valueName,\n    valuesFn = match[7],\n    track = match[8],\n    trackFn = track ? match[8] : null;\n\n    var ngRepeat;\n    if (keyName === undefined) { // array\n      ngRepeat = valueName + ' in ' + valuesFn;\n      if (track !== undefined) {\n        ngRepeat += ' track by '+trackFn;\n      }\n    } else { // object\n      ngRepeat = '('+keyName+', '+valueName+') in '+valuesFn;\n    }\n    \n    // group not supported yet\n    return {\n      ngRepeat: ngRepeat,\n      locals: {\n        valueName: valueName,\n        keyName: keyName,\n        valueFn: valueFn,\n        displayFn: displayFn\n      }\n    };\n  }\n\n  return parser;\n}]);\n\n/**\n * editableCombodate\n *\n * angular version of https://github.com/vitalets/combodate\n */\nangular.module('xeditable').factory('editableCombodate', [function() {\n  function Combodate(element, options) {\n    this.$element = angular.element(element);\n\n    if(this.$element[0].nodeName != 'INPUT') {\n      throw 'Combodate should be applied to INPUT element';\n    }\n\n    var currentYear = new Date().getFullYear();\n    this.defaults = {\n      //in this format value stored in original input\n      format: 'YYYY-MM-DD HH:mm',\n      //in this format items in dropdowns are displayed\n      template: 'D / MMM / YYYY   H : mm',\n      //initial value, can be `new Date()`\n      value: null,\n      minYear: 1970,\n      maxYear: currentYear,\n      yearDescending: true,\n      minuteStep: 5,\n      secondStep: 1,\n      firstItem: 'empty', //'name', 'empty', 'none'\n      errorClass: null,\n      customClass: '',\n      roundTime: true, // whether to round minutes and seconds if step > 1\n      smartDays: true // whether days in combo depend on selected month: 31, 30, 28\n    };\n\n    this.options = angular.extend({}, this.defaults, options);\n    this.init();\n  }\n\n  Combodate.prototype = {\n    constructor: Combodate,\n    init: function () {\n      this.map = {\n        //key   regexp    moment.method\n        day:    ['D',    'date'], \n        month:  ['M',    'month'], \n        year:   ['Y',    'year'], \n        hour:   ['[Hh]', 'hours'],\n        minute: ['m',    'minutes'], \n        second: ['s',    'seconds'],\n        ampm:   ['[Aa]', ''] \n      };\n      \n      this.$widget = angular.element('<span class=\"combodate\"></span>').html(this.getTemplate());\n      \n      this.initCombos();\n      \n      if (this.options.smartDays) {\n        var combo = this;\n        this.$widget.find('select').bind('change', function(e) {\n          // update days count if month or year changes\n          if (angular.element(e.target).hasClass('month') || angular.element(e.target).hasClass('year')) {\n            combo.fillCombo('day');\n          }\n        });        \n      }\n\n      this.$widget.find('select').css('width', 'auto');\n\n      // hide original input and insert widget                                       \n      this.$element.css('display', 'none').after(this.$widget);\n      \n      // set initial value\n      this.setValue(this.$element.val() || this.options.value);\n    },\n    \n    /*\n     Replace tokens in template with <select> elements \n     */         \n     getTemplate: function() {\n      var tpl = this.options.template;\n      var customClass = this.options.customClass;\n\n      //first pass\n      angular.forEach(this.map, function(v, k) {\n        v = v[0]; \n        var r = new RegExp(v+'+');\n        var token = v.length > 1 ? v.substring(1, 2) : v;\n        \n        tpl = tpl.replace(r, '{'+token+'}');\n      });\n\n      //replace spaces with &nbsp;\n      tpl = tpl.replace(/ /g, '&nbsp;');\n\n      //second pass\n      angular.forEach(this.map, function(v, k) {\n        v = v[0];\n        var token = v.length > 1 ? v.substring(1, 2) : v;\n\n        tpl = tpl.replace('{'+token+'}', '<select class=\"'+k+' '+customClass+'\"></select>');\n      });   \n\n      return tpl;\n    },\n    \n    /*\n     Initialize combos that presents in template \n     */        \n     initCombos: function() {\n      for (var k in this.map) {\n        var c = this.$widget[0].querySelectorAll('.'+k);\n        // set properties like this.$day, this.$month etc.\n        this['$'+k] = c.length ? angular.element(c) : null;\n        // fill with items\n        this.fillCombo(k);\n      }\n    },\n\n    /*\n     Fill combo with items \n     */        \n     fillCombo: function(k) {\n      var $combo = this['$'+k];\n      if (!$combo) {\n        return;\n      }\n\n      // define method name to fill items, e.g `fillDays`\n      var f = 'fill' + k.charAt(0).toUpperCase() + k.slice(1); \n      var items = this[f]();\n      var value = $combo.val();\n\n      $combo.html('');\n      for(var i=0; i<items.length; i++) {\n        $combo.append('<option value=\"'+items[i][0]+'\">'+items[i][1]+'</option>');\n      }\n\n      $combo.val(value);\n    },\n\n    /*\n     Initialize items of combos. Handles `firstItem` option \n     */\n     fillCommon: function(key) {\n      var values = [], relTime;\n\n      if(this.options.firstItem === 'name') {\n        //need both to support moment ver < 2 and  >= 2\n        relTime = moment.relativeTime || moment.langData()._relativeTime; \n        var header = typeof relTime[key] === 'function' ? relTime[key](1, true, key, false) : relTime[key];\n        //take last entry (see momentjs lang files structure) \n        header = header.split(' ').reverse()[0];                \n        values.push(['', header]);\n      } else if(this.options.firstItem === 'empty') {\n        values.push(['', '']);\n      }\n      return values;\n    },  \n\n\n    /*\n    fill day\n    */\n    fillDay: function() {\n      var items = this.fillCommon('d'), name, i,\n      twoDigit = this.options.template.indexOf('DD') !== -1,\n      daysCount = 31;\n\n      // detect days count (depends on month and year)\n      // originally https://github.com/vitalets/combodate/pull/7\n      if (this.options.smartDays && this.$month && this.$year) {\n        var month = parseInt(this.$month.val(), 10);\n        var year = parseInt(this.$year.val(), 10);\n\n        if (!isNaN(month) && !isNaN(year)) {\n          daysCount = moment([year, month]).daysInMonth();\n        }\n      }\n\n      for (i = 1; i <= daysCount; i++) {\n        name = twoDigit ? this.leadZero(i) : i;\n        items.push([i, name]);\n      }\n      return items;\n    },\n    \n    /*\n    fill month\n    */\n    fillMonth: function() {\n      var items = this.fillCommon('M'), name, i, \n      longNames = this.options.template.indexOf('MMMM') !== -1,\n      shortNames = this.options.template.indexOf('MMM') !== -1,\n      twoDigit = this.options.template.indexOf('MM') !== -1;\n\n      for(i=0; i<=11; i++) {\n        if(longNames) {\n          //see https://github.com/timrwood/momentjs.com/pull/36\n          name = moment().date(1).month(i).format('MMMM');\n        } else if(shortNames) {\n          name = moment().date(1).month(i).format('MMM');\n        } else if(twoDigit) {\n          name = this.leadZero(i+1);\n        } else {\n          name = i+1;\n        }\n        items.push([i, name]);\n      } \n      return items;\n    },\n    \n    /*\n    fill year\n    */\n    fillYear: function() {\n      var items = [], name, i, \n      longNames = this.options.template.indexOf('YYYY') !== -1;\n\n      for(i=this.options.maxYear; i>=this.options.minYear; i--) {\n        name = longNames ? i : (i+'').substring(2);\n        items[this.options.yearDescending ? 'push' : 'unshift']([i, name]);\n      }\n      \n      items = this.fillCommon('y').concat(items);\n      \n      return items;\n    },\n    \n    /*\n    fill hour\n    */\n    fillHour: function() {\n      var items = this.fillCommon('h'), name, i,\n      h12 = this.options.template.indexOf('h') !== -1,\n      h24 = this.options.template.indexOf('H') !== -1,\n      twoDigit = this.options.template.toLowerCase().indexOf('hh') !== -1,\n      min = h12 ? 1 : 0, \n      max = h12 ? 12 : 23;\n\n      for(i=min; i<=max; i++) {\n        name = twoDigit ? this.leadZero(i) : i;\n        items.push([i, name]);\n      } \n      return items;\n    },\n\n    /*\n    fill minute\n    */\n    fillMinute: function() {\n      var items = this.fillCommon('m'), name, i,\n      twoDigit = this.options.template.indexOf('mm') !== -1;\n\n      for(i=0; i<=59; i+= this.options.minuteStep) {\n        name = twoDigit ? this.leadZero(i) : i;\n        items.push([i, name]);\n      }\n      return items;\n    },\n    \n    /*\n    fill second\n    */\n    fillSecond: function() {\n      var items = this.fillCommon('s'), name, i,\n      twoDigit = this.options.template.indexOf('ss') !== -1;\n\n      for(i=0; i<=59; i+= this.options.secondStep) {\n        name = twoDigit ? this.leadZero(i) : i;\n        items.push([i, name]);\n      }    \n      return items;\n    },\n    \n    /*\n    fill ampm\n    */\n    fillAmpm: function() {\n      var ampmL = this.options.template.indexOf('a') !== -1,\n      ampmU = this.options.template.indexOf('A') !== -1,            \n      items = [\n      ['am', ampmL ? 'am' : 'AM'],\n      ['pm', ampmL ? 'pm' : 'PM']\n      ];\n      return items;\n    },\n\n    /*\n     Returns current date value from combos. \n     If format not specified - `options.format` used.\n     If format = `null` - Moment object returned.\n     */\n     getValue: function(format) {\n      var dt, values = {}, \n      that = this,\n      notSelected = false;\n\n      //getting selected values    \n      angular.forEach(this.map, function(v, k) {\n        if(k === 'ampm') {\n          return;\n        }\n        var def = k === 'day' ? 1 : 0;\n\n        values[k] = that['$'+k] ? parseInt(that['$'+k].val(), 10) : def; \n        \n        if(isNaN(values[k])) {\n         notSelected = true;\n         return false; \n       }\n     });\n      \n      //if at least one visible combo not selected - return empty string\n      if(notSelected) {\n       return '';\n     }\n\n      //convert hours 12h --> 24h \n      if(this.$ampm) {\n        //12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day)\n        if(values.hour === 12) {\n          values.hour = this.$ampm.val() === 'am' ? 0 : 12;                    \n        } else {\n          values.hour = this.$ampm.val() === 'am' ? values.hour : values.hour+12;\n        }\n      }\n      \n      dt = moment([values.year, values.month, values.day, values.hour, values.minute, values.second]);\n      \n      //highlight invalid date\n      this.highlight(dt);\n\n      format = format === undefined ? this.options.format : format;\n      if(format === null) {\n       return dt.isValid() ? dt : null; \n     } else {\n       return dt.isValid() ? dt.format(format) : ''; \n     }\n   },\n\n   setValue: function(value) {\n    if(!value) {\n      return;\n    }\n\n      // parse in strict mode (third param `true`)\n      var dt = typeof value === 'string' ? moment(value, this.options.format, true) : moment(value),\n      that = this,\n      values = {};\n      \n      //function to find nearest value in select options\n      function getNearest($select, value) {\n        var delta = {};\n        angular.forEach($select.children('option'), function(opt, i){\n          var optValue = angular.element(opt).attr('value');\n\n          if(optValue === '') return;\n          var distance = Math.abs(optValue - value); \n          if(typeof delta.distance === 'undefined' || distance < delta.distance) {\n            delta = {value: optValue, distance: distance};\n          } \n        }); \n        return delta.value;\n      }\n      \n      if(dt.isValid()) {\n        //read values from date object\n        angular.forEach(this.map, function(v, k) {\n          if(k === 'ampm') {\n            return; \n          }\n          values[k] = dt[v[1]]();\n        });\n\n        if(this.$ampm) {\n          //12:00 pm --> 12:00 (24-h format, midday), 12:00 am --> 00:00 (24-h format, midnight, start of day)\n          if(values.hour >= 12) {\n            values.ampm = 'pm';\n            if(values.hour > 12) {\n              values.hour -= 12;\n            }\n          } else {\n            values.ampm = 'am';\n            if(values.hour === 0) {\n              values.hour = 12;\n            }\n          }\n        }\n\n        angular.forEach(values, function(v, k) {\n          //call val() for each existing combo, e.g. this.$hour.val()\n          if(that['$'+k]) {\n\n            if(k === 'minute' && that.options.minuteStep > 1 && that.options.roundTime) {\n             v = getNearest(that['$'+k], v);\n           }\n           \n           if(k === 'second' && that.options.secondStep > 1 && that.options.roundTime) {\n             v = getNearest(that['$'+k], v);\n           }                       \n           \n           that['$'+k].val(v);\n         }\n       });\n\n        // update days count\n        if (this.options.smartDays) {\n          this.fillCombo('day');\n        }\n\n        this.$element.val(dt.format(this.options.format)).triggerHandler('change');\n      }\n    },\n    \n    /*\n     highlight combos if date is invalid\n     */\n     highlight: function(dt) {\n      if(!dt.isValid()) {\n        if(this.options.errorClass) {\n          this.$widget.addClass(this.options.errorClass);\n        } else {\n          //store original border color\n          if(!this.borderColor) {\n            this.borderColor = this.$widget.find('select').css('border-color'); \n          }\n          this.$widget.find('select').css('border-color', 'red');\n        }\n      } else {\n        if(this.options.errorClass) {\n          this.$widget.removeClass(this.options.errorClass);\n        } else {\n          this.$widget.find('select').css('border-color', this.borderColor);\n        }  \n      }\n    },\n    \n    leadZero: function(v) {\n      return v <= 9 ? '0' + v : v; \n    },\n    \n    destroy: function() {\n      this.$widget.remove();\n      this.$element.removeData('combodate').show();\n    }\n\n  };\n\n  return {\n    getInstance: function(element, options) {\n      return new Combodate(element, options);\n    }\n  };\n}]);\n\n/*\nEditable icons:\n- default\n- font-awesome\n\n*/\nangular.module('xeditable').factory('editableIcons', function() {\n\n  var icons = {\n    //Icon-set to use, defaults to bootstrap icons\n    default: {\n      'bs2': {\n        ok: 'icon-ok icon-white',\n        cancel: 'icon-remove',\n        clear: 'icon-trash'\n      },\n      'bs3': {\n        ok: 'glyphicon glyphicon-ok',\n        cancel: 'glyphicon glyphicon-remove',\n        clear: 'glyphicon glyphicon-trash'\n      }\n    },\n    external: {\n      'font-awesome': {\n        ok: 'fa fa-check',\n        cancel: 'fa fa-times',\n        clear: 'fa fa-trash'\n      }\n    }\n  };\n\n  return icons;\n});\n\n/* jshint -W086 */\n/*\nEditable themes:\n- default\n- bootstrap 2\n- bootstrap 3\n- semantic-ui\n\nNote: in postrender() `this` is instance of editableController\n*/\nangular.module('xeditable').factory('editableThemes', function() {\n  var themes = {\n    //default\n    'default': {\n      formTpl:      '<form class=\"editable-wrap\"></form>',\n      noformTpl:    '<span class=\"editable-wrap\"></span>',\n      controlsTpl:  '<span class=\"editable-controls\"></span>',\n      inputTpl:     '',\n      errorTpl:     '<div class=\"editable-error\" data-ng-if=\"$error\" data-ng-bind=\"$error\"></div>',\n      buttonsTpl:   '<span class=\"editable-buttons\"></span>',\n      submitTpl:    '<button type=\"submit\">save</button>',\n      cancelTpl:    '<button type=\"button\" ng-click=\"$form.$cancel()\">cancel</button>',\n      resetTpl:    '<button type=\"reset\">clear</button>'\n    },\n\n    //bs2\n    'bs2': {\n      formTpl:     '<form class=\"form-inline editable-wrap\" role=\"form\"></form>',\n      noformTpl:   '<span class=\"editable-wrap\"></span>',\n      controlsTpl: '<div class=\"editable-controls controls control-group\" ng-class=\"{\\'error\\': $error}\"></div>',\n      inputTpl:    '',\n      errorTpl:    '<div class=\"editable-error help-block\" data-ng-if=\"$error\" data-ng-bind=\"$error\"></div>',\n      buttonsTpl:  '<span class=\"editable-buttons\"></span>',\n      submitTpl:   '<button type=\"submit\" class=\"btn btn-primary\"><span></span></button>',\n      cancelTpl:   '<button type=\"button\" class=\"btn\" ng-click=\"$form.$cancel()\">'+\n                      '<span></span>'+\n                   '</button>',\n      resetTpl:    '<button type=\"reset\" class=\"btn btn-danger\">clear</button>'\n\n    },\n\n    //bs3\n    'bs3': {\n      formTpl:     '<form class=\"form-inline editable-wrap\" role=\"form\"></form>',\n      noformTpl:   '<span class=\"editable-wrap\"></span>',\n      controlsTpl: '<div class=\"editable-controls form-group\" ng-class=\"{\\'has-error\\': $error}\"></div>',\n      inputTpl:    '',\n      errorTpl:    '<div class=\"editable-error help-block\" data-ng-if=\"$error\" data-ng-bind=\"$error\"></div>',\n      buttonsTpl:  '<span class=\"editable-buttons\"></span>',\n      submitTpl:   '<button type=\"submit\" class=\"btn btn-primary\"><span></span></button>',\n      cancelTpl:   '<button type=\"button\" class=\"btn btn-default\" ng-click=\"$form.$cancel()\">'+\n                     '<span></span>'+\n                   '</button>',\n      resetTpl:    '<button type=\"reset\" class=\"btn btn-danger\">clear</button>',\n\n      //bs3 specific prop to change buttons class: btn-sm, btn-lg\n      buttonsClass: '',\n      //bs3 specific prop to change standard inputs class: input-sm, input-lg\n      inputClass: '',\n      postrender: function() {\n        //apply `form-control` class to std inputs\n        switch(this.directiveName) {\n          case 'editableText':\n          case 'editableSelect':\n          case 'editableTextarea':\n          case 'editableEmail':\n          case 'editableTel':\n          case 'editableNumber':\n          case 'editableUrl':\n          case 'editableSearch':\n          case 'editableDate':\n          case 'editableDatetime':\n          case 'editableBsdate':\n          case 'editableTime':\n          case 'editableMonth':\n          case 'editableWeek':\n          case 'editablePassword':\n          case 'editableDatetimeLocal':\n            this.inputEl.addClass('form-control');\n            if(this.theme.inputClass) {\n              // don`t apply `input-sm` and `input-lg` to select multiple\n              // should be fixed in bs itself!\n              if(this.inputEl.attr('multiple') &&\n                (this.theme.inputClass === 'input-sm' || this.theme.inputClass === 'input-lg')) {\n                  break;\n              }\n              this.inputEl.addClass(this.theme.inputClass);\n            }\n          break;\n          case 'editableCheckbox':\n              this.editorEl.addClass('checkbox');\n        }\n\n        //apply buttonsClass (bs3 specific!)\n        if(this.buttonsEl && this.theme.buttonsClass) {\n          this.buttonsEl.find('button').addClass(this.theme.buttonsClass);\n        }\n      }\n    },\n    \n    //semantic-ui\n    'semantic': {\n      formTpl:     '<form class=\"editable-wrap ui form\" ng-class=\"{\\'error\\': $error}\" role=\"form\"></form>',\n      noformTpl:   '<span class=\"editable-wrap\"></span>',\n      controlsTpl: '<div class=\"editable-controls ui fluid input\" ng-class=\"{\\'error\\': $error}\"></div>',\n      inputTpl:    '',\n      errorTpl:    '<div class=\"editable-error ui error message\" data-ng-if=\"$error\" data-ng-bind=\"$error\"></div>',\n      buttonsTpl:  '<span class=\"mini ui buttons\"></span>',\n      submitTpl:   '<button type=\"submit\" class=\"ui primary button\"><i class=\"ui check icon\"></i></button>',\n      cancelTpl:   '<button type=\"button\" class=\"ui button\" ng-click=\"$form.$cancel()\">'+\n                      '<i class=\"ui cancel icon\"></i>'+\n                   '</button>',\n      resetTpl:    '<button type=\"reset\" class=\"ui button\">clear</button>'\n    }\n  };\n\n  return themes;\n});\n","/**!\n * AngularJS file upload/drop directive with http post and progress\n * @author  Danial  <danial.farid@gmail.com>\n * @version 1.6.12\n */\n(function() {\n\nvar angularFileUpload = angular.module('angularFileUpload', []);\n\nangularFileUpload.service('$upload', ['$http', '$q', '$timeout', function($http, $q, $timeout) {\n\tfunction sendHttp(config) {\n\t\tconfig.method = config.method || 'POST';\n\t\tconfig.headers = config.headers || {};\n\t\tconfig.transformRequest = config.transformRequest || function(data, headersGetter) {\n\t\t\tif (window.ArrayBuffer && data instanceof window.ArrayBuffer) {\n\t\t\t\treturn data;\n\t\t\t}\n\t\t\treturn $http.defaults.transformRequest[0](data, headersGetter);\n\t\t};\n\t\tvar deferred = $q.defer();\n\n\t\tif (window.XMLHttpRequest.__isShim) {\n\t\t\tconfig.headers['__setXHR_'] = function() {\n\t\t\t\treturn function(xhr) {\n\t\t\t\t\tif (!xhr) return;\n\t\t\t\t\tconfig.__XHR = xhr;\n\t\t\t\t\tconfig.xhrFn && config.xhrFn(xhr);\n\t\t\t\t\txhr.upload.addEventListener('progress', function(e) {\n\t\t\t\t\t\tdeferred.notify(e);\n\t\t\t\t\t}, false);\n\t\t\t\t\t//fix for firefox not firing upload progress end, also IE8-9\n\t\t\t\t\txhr.upload.addEventListener('load', function(e) {\n\t\t\t\t\t\tif (e.lengthComputable) {\n\t\t\t\t\t\t\tdeferred.notify(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, false);\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\n\t\t$http(config).then(function(r){deferred.resolve(r)}, function(e){deferred.reject(e)}, function(n){deferred.notify(n)});\n\t\t\n\t\tvar promise = deferred.promise;\n\t\tpromise.success = function(fn) {\n\t\t\tpromise.then(function(response) {\n\t\t\t\tfn(response.data, response.status, response.headers, config);\n\t\t\t});\n\t\t\treturn promise;\n\t\t};\n\n\t\tpromise.error = function(fn) {\n\t\t\tpromise.then(null, function(response) {\n\t\t\t\tfn(response.data, response.status, response.headers, config);\n\t\t\t});\n\t\t\treturn promise;\n\t\t};\n\n\t\tpromise.progress = function(fn) {\n\t\t\tpromise.then(null, null, function(update) {\n\t\t\t\tfn(update);\n\t\t\t});\n\t\t\treturn promise;\n\t\t};\n\t\tpromise.abort = function() {\n\t\t\tif (config.__XHR) {\n\t\t\t\t$timeout(function() {\n\t\t\t\t\tconfig.__XHR.abort();\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn promise;\n\t\t};\n\t\tpromise.xhr = function(fn) {\n\t\t\tconfig.xhrFn = (function(origXhrFn) {\n\t\t\t\treturn function() {\n\t\t\t\t\torigXhrFn && origXhrFn.apply(promise, arguments);\n\t\t\t\t\tfn.apply(promise, arguments);\n\t\t\t\t}\n\t\t\t})(config.xhrFn);\n\t\t\treturn promise;\n\t\t};\n\t\t\n\t\treturn promise;\n\t}\n\n\tthis.upload = function(config) {\n\t\tconfig.headers = config.headers || {};\n\t\tconfig.headers['Content-Type'] = undefined;\n\t\tconfig.transformRequest = config.transformRequest || $http.defaults.transformRequest;\n\t\tvar formData = new FormData();\n\t\tvar origTransformRequest = config.transformRequest;\n\t\tvar origData = config.data;\n\t\tconfig.transformRequest = function(formData, headerGetter) {\n\t\t\tif (origData) {\n\t\t\t\tif (config.formDataAppender) {\n\t\t\t\t\tfor (var key in origData) {\n\t\t\t\t\t\tvar val = origData[key];\n\t\t\t\t\t\tconfig.formDataAppender(formData, key, val);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tfor (var key in origData) {\n\t\t\t\t\t\tvar val = origData[key];\n\t\t\t\t\t\tif (typeof origTransformRequest == 'function') {\n\t\t\t\t\t\t\tval = origTransformRequest(val, headerGetter);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (var i = 0; i < origTransformRequest.length; i++) {\n\t\t\t\t\t\t\t\tvar transformFn = origTransformRequest[i];\n\t\t\t\t\t\t\t\tif (typeof transformFn == 'function') {\n\t\t\t\t\t\t\t\t\tval = transformFn(val, headerGetter);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tformData.append(key, val);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (config.file != null) {\n\t\t\t\tvar fileFormName = config.fileFormDataName || 'file';\n\n\t\t\t\tif (Object.prototype.toString.call(config.file) === '[object Array]') {\n\t\t\t\t\tvar isFileFormNameString = Object.prototype.toString.call(fileFormName) === '[object String]';\n\t\t\t\t\tfor (var i = 0; i < config.file.length; i++) {\n\t\t\t\t\t\tformData.append(isFileFormNameString ? fileFormName : fileFormName[i], config.file[i], \n\t\t\t\t\t\t\t\t(config.fileName && config.fileName[i]) || config.file[i].name);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tformData.append(fileFormName, config.file, config.fileName || config.file.name);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn formData;\n\t\t};\n\n\t\tconfig.data = formData;\n\n\t\treturn sendHttp(config);\n\t};\n\n\tthis.http = function(config) {\n\t\treturn sendHttp(config);\n\t}\n}]);\n\nangularFileUpload.directive('ngFileSelect', [ '$parse', '$timeout', function($parse, $timeout) {\n\treturn function(scope, elem, attr) {\n\t\tvar fn = $parse(attr['ngFileSelect']);\n\t\tif (elem[0].tagName.toLowerCase() !== 'input' || (elem.attr('type') && elem.attr('type').toLowerCase()) !== 'file') {\n\t\t\tvar fileElem = angular.element('<input type=\"file\">')\n\t\t\tvar attrs = elem[0].attributes;\n\t\t\tfor (var i = 0; i < attrs.length; i++) {\n\t\t\t\tif (attrs[i].name.toLowerCase() !== 'type') {\n\t\t\t\t\tfileElem.attr(attrs[i].name, attrs[i].value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (attr[\"multiple\"]) fileElem.attr(\"multiple\", \"true\");\n\t\t\tfileElem.css(\"width\", \"1px\").css(\"height\", \"1px\").css(\"opacity\", 0).css(\"position\", \"absolute\").css('filter', 'alpha(opacity=0)')\n\t\t\t\t\t.css(\"padding\", 0).css(\"margin\", 0).css(\"overflow\", \"hidden\");\n\t\t\tfileElem.attr('__wrapper_for_parent_', true);\n\n//\t\t\tfileElem.css(\"top\", 0).css(\"bottom\", 0).css(\"left\", 0).css(\"right\", 0).css(\"width\", \"100%\").\n//\t\t\t\t\tcss(\"opacity\", 0).css(\"position\", \"absolute\").css('filter', 'alpha(opacity=0)').css(\"padding\", 0).css(\"margin\", 0);\n\t\t\telem.append(fileElem);\n\t\t\telem[0].__file_click_fn_delegate_  = function() {\n\t\t\t\tfileElem[0].click();\n\t\t\t}; \n\t\t\telem.bind('click', elem[0].__file_click_fn_delegate_);\n\t\t\telem.css(\"overflow\", \"hidden\");\n//\t\t\tif (fileElem.parent()[0] != elem[0]) {\n//\t\t\t\t//fix #298 button element\n//\t\t\t\telem.wrap('<span>');\n//\t\t\t\telem.css(\"z-index\", \"-1000\")\n//\t\t\t\telem.parent().append(fileElem);\n//\t\t\t\telem = elem.parent();\n//\t\t\t}\n//\t\t\tif (elem.css(\"position\") === '' || elem.css(\"position\") === 'static') {\n//\t\t\t\telem.css(\"position\", \"relative\");\n//\t\t\t}\n\t\t\telem = fileElem;\n\t\t}\n\t\telem.bind('change', function(evt) {\n\t\t\tvar files = [], fileList, i;\n\t\t\tfileList = evt.__files_ || evt.target.files;\n\t\t\tif (fileList != null) {\n\t\t\t\tfor (i = 0; i < fileList.length; i++) {\n\t\t\t\t\tfiles.push(fileList.item(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$timeout(function() {\n\t\t\t\tfn(scope, {\n\t\t\t\t\t$files : files,\n\t\t\t\t\t$event : evt\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t\t// removed this since it was confusing if the user click on browse and then cancel #181\n//\t\telem.bind('click', function(){\n//\t\t\tthis.value = null;\n//\t\t});\n\n\t\t// removed because of #253 bug\n\t\t// touch screens\n//\t\tif (('ontouchstart' in window) ||\n//\t\t\t\t(navigator.maxTouchPoints > 0) || (navigator.msMaxTouchPoints > 0)) {\n//\t\t\telem.bind('touchend', function(e) {\n//\t\t\t\te.preventDefault();\n//\t\t\t\te.target.click();\n//\t\t\t});\n//\t\t}\n\t};\n} ]);\n\nangularFileUpload.directive('ngFileDropAvailable', [ '$parse', '$timeout', function($parse, $timeout) {\n\treturn function(scope, elem, attr) {\n\t\tif ('draggable' in document.createElement('span')) {\n\t\t\tvar fn = $parse(attr['ngFileDropAvailable']);\n\t\t\t$timeout(function() {\n\t\t\t\tfn(scope);\n\t\t\t});\n\t\t}\n\t};\n} ]);\n\nangularFileUpload.directive('ngFileDrop', [ '$parse', '$timeout', '$location', function($parse, $timeout, $location) {\n\treturn function(scope, elem, attr) {\n\t\tif ('draggable' in document.createElement('span')) {\n\t\t\tvar leaveTimeout = null;\n\t\t\telem[0].addEventListener(\"dragover\", function(evt) {\n\t\t\t\tevt.preventDefault();\n\t\t\t\t$timeout.cancel(leaveTimeout);\n\t\t\t\tif (!elem[0].__drag_over_class_) {\n\t\t\t\t\tif (attr['ngFileDragOverClass'] && attr['ngFileDragOverClass'].search(/\\) *$/) > -1) {\n\t\t\t\t\t\tvar dragOverClass = $parse(attr['ngFileDragOverClass'])(scope, {\n\t\t\t\t\t\t\t$event : evt\n\t\t\t\t\t\t});\t\t\t\t\t\n\t\t\t\t\t\telem[0].__drag_over_class_ = dragOverClass; \n\t\t\t\t\t} else {\n\t\t\t\t\t\telem[0].__drag_over_class_ = attr['ngFileDragOverClass'] || \"dragover\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telem.addClass(elem[0].__drag_over_class_);\n\t\t\t}, false);\n\t\t\telem[0].addEventListener(\"dragenter\", function(evt) {\n\t\t\t\tevt.preventDefault();\n\t\t\t}, false);\n\t\t\telem[0].addEventListener(\"dragleave\", function(evt) {\n\t\t\t\tleaveTimeout = $timeout(function() {\n\t\t\t\t\telem.removeClass(elem[0].__drag_over_class_);\n\t\t\t\t\telem[0].__drag_over_class_ = null;\n\t\t\t\t}, attr['ngFileDragOverDelay'] || 1);\n\t\t\t}, false);\n\t\t\tvar fn = $parse(attr['ngFileDrop']);\n\t\t\telem[0].addEventListener(\"drop\", function(evt) {\n\t\t\t\tevt.preventDefault();\n\t\t\t\telem.removeClass(elem[0].__drag_over_class_);\n\t\t\t\telem[0].__drag_over_class_ = null;\n\t\t\t\textractFiles(evt, function(files) {\n\t\t\t\t\tfn(scope, {\n\t\t\t\t\t\t$files : files,\n\t\t\t\t\t\t$event : evt\n\t\t\t\t\t});\t\t\t\t\t\n\t\t\t\t});\n\t\t\t}, false);\n\t\t\t\t\t\t\n\t\t\tfunction isASCII(str) {\n\t\t\t\treturn /^[\\000-\\177]*$/.test(str);\n\t\t\t}\n\n\t\t\tfunction extractFiles(evt, callback) {\n\t\t\t\tvar files = [], items = evt.dataTransfer.items;\n\t\t\t\tif (items && items.length > 0 && items[0].webkitGetAsEntry && $location.protocol() != 'file' && \n\t\t\t\t\t\titems[0].webkitGetAsEntry().isDirectory) {\n\t\t\t\t\tfor (var i = 0; i < items.length; i++) {\n\t\t\t\t\t\tvar entry = items[i].webkitGetAsEntry();\n\t\t\t\t\t\tif (entry != null) {\n\t\t\t\t\t\t\t//fix for chrome bug https://code.google.com/p/chromium/issues/detail?id=149735\n\t\t\t\t\t\t\tif (isASCII(entry.name)) {\n\t\t\t\t\t\t\t\ttraverseFileTree(files, entry);\n\t\t\t\t\t\t\t} else if (!items[i].webkitGetAsEntry().isDirectory) {\n\t\t\t\t\t\t\t\tfiles.push(items[i].getAsFile());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tvar fileList = evt.dataTransfer.files;\n\t\t\t\t\tif (fileList != null) {\n\t\t\t\t\t\tfor (var i = 0; i < fileList.length; i++) {\n\t\t\t\t\t\t\tfiles.push(fileList.item(i));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t(function waitForProcess(delay) {\n\t\t\t\t\t$timeout(function() {\n\t\t\t\t\t\tif (!processing) {\n\t\t\t\t\t\t\tcallback(files);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twaitForProcess(10);\n\t\t\t\t\t\t}\n\t\t\t\t\t}, delay || 0)\n\t\t\t\t})();\n\t\t\t}\n\t\t\t\n\t\t\tvar processing = 0;\n\t\t\tfunction traverseFileTree(files, entry, path) {\n\t\t\t\tif (entry != null) {\n\t\t\t\t\tif (entry.isDirectory) {\n\t\t\t\t\t\tvar dirReader = entry.createReader();\n\t\t\t\t\t\tprocessing++;\n\t\t\t\t\t\tdirReader.readEntries(function(entries) {\n\t\t\t\t\t\t\tfor (var i = 0; i < entries.length; i++) {\n\t\t\t\t\t\t\t\ttraverseFileTree(files, entries[i], (path ? path : \"\") + entry.name + \"/\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tprocessing--;\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprocessing++;\n\t\t\t\t\t\tentry.file(function(file) {\n\t\t\t\t\t\t\tprocessing--;\n\t\t\t\t\t\t\tfile._relativePath = (path ? path : \"\") + file.name;\n\t\t\t\t\t\t\tfiles.push(file);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n} ]);\n\n})();\n","/*\n * angular-ui-bootstrap\n * http://angular-ui.github.io/bootstrap/\n\n * Version: 0.12.0 - 2014-11-16\n * License: MIT\n */\nangular.module(\"ui.bootstrap\",[\"ui.bootstrap.tpls\",\"ui.bootstrap.transition\",\"ui.bootstrap.collapse\",\"ui.bootstrap.accordion\",\"ui.bootstrap.alert\",\"ui.bootstrap.bindHtml\",\"ui.bootstrap.buttons\",\"ui.bootstrap.carousel\",\"ui.bootstrap.dateparser\",\"ui.bootstrap.position\",\"ui.bootstrap.datepicker\",\"ui.bootstrap.dropdown\",\"ui.bootstrap.modal\",\"ui.bootstrap.pagination\",\"ui.bootstrap.tooltip\",\"ui.bootstrap.popover\",\"ui.bootstrap.progressbar\",\"ui.bootstrap.rating\",\"ui.bootstrap.tabs\",\"ui.bootstrap.timepicker\",\"ui.bootstrap.typeahead\"]),angular.module(\"ui.bootstrap.tpls\",[\"template/accordion/accordion-group.html\",\"template/accordion/accordion.html\",\"template/alert/alert.html\",\"template/carousel/carousel.html\",\"template/carousel/slide.html\",\"template/datepicker/datepicker.html\",\"template/datepicker/day.html\",\"template/datepicker/month.html\",\"template/datepicker/popup.html\",\"template/datepicker/year.html\",\"template/modal/backdrop.html\",\"template/modal/window.html\",\"template/pagination/pager.html\",\"template/pagination/pagination.html\",\"template/tooltip/tooltip-html-unsafe-popup.html\",\"template/tooltip/tooltip-popup.html\",\"template/popover/popover.html\",\"template/progressbar/bar.html\",\"template/progressbar/progress.html\",\"template/progressbar/progressbar.html\",\"template/rating/rating.html\",\"template/tabs/tab.html\",\"template/tabs/tabset.html\",\"template/timepicker/timepicker.html\",\"template/typeahead/typeahead-match.html\",\"template/typeahead/typeahead-popup.html\"]),angular.module(\"ui.bootstrap.transition\",[]).factory(\"$transition\",[\"$q\",\"$timeout\",\"$rootScope\",function(a,b,c){function d(a){for(var b in a)if(void 0!==f.style[b])return a[b]}var e=function(d,f,g){g=g||{};var h=a.defer(),i=e[g.animation?\"animationEndEventName\":\"transitionEndEventName\"],j=function(){c.$apply(function(){d.unbind(i,j),h.resolve(d)})};return i&&d.bind(i,j),b(function(){angular.isString(f)?d.addClass(f):angular.isFunction(f)?f(d):angular.isObject(f)&&d.css(f),i||h.resolve(d)}),h.promise.cancel=function(){i&&d.unbind(i,j),h.reject(\"Transition cancelled\")},h.promise},f=document.createElement(\"trans\"),g={WebkitTransition:\"webkitTransitionEnd\",MozTransition:\"transitionend\",OTransition:\"oTransitionEnd\",transition:\"transitionend\"},h={WebkitTransition:\"webkitAnimationEnd\",MozTransition:\"animationend\",OTransition:\"oAnimationEnd\",transition:\"animationend\"};return e.transitionEndEventName=d(g),e.animationEndEventName=d(h),e}]),angular.module(\"ui.bootstrap.collapse\",[\"ui.bootstrap.transition\"]).directive(\"collapse\",[\"$transition\",function(a){return{link:function(b,c,d){function e(b){function d(){j===e&&(j=void 0)}var e=a(c,b);return j&&j.cancel(),j=e,e.then(d,d),e}function f(){k?(k=!1,g()):(c.removeClass(\"collapse\").addClass(\"collapsing\"),e({height:c[0].scrollHeight+\"px\"}).then(g))}function g(){c.removeClass(\"collapsing\"),c.addClass(\"collapse in\"),c.css({height:\"auto\"})}function h(){if(k)k=!1,i(),c.css({height:0});else{c.css({height:c[0].scrollHeight+\"px\"});{c[0].offsetWidth}c.removeClass(\"collapse in\").addClass(\"collapsing\"),e({height:0}).then(i)}}function i(){c.removeClass(\"collapsing\"),c.addClass(\"collapse\")}var j,k=!0;b.$watch(d.collapse,function(a){a?h():f()})}}}]),angular.module(\"ui.bootstrap.accordion\",[\"ui.bootstrap.collapse\"]).constant(\"accordionConfig\",{closeOthers:!0}).controller(\"AccordionController\",[\"$scope\",\"$attrs\",\"accordionConfig\",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on(\"$destroy\",function(){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive(\"accordion\",function(){return{restrict:\"EA\",controller:\"AccordionController\",transclude:!0,replace:!1,templateUrl:\"template/accordion/accordion.html\"}}).directive(\"accordionGroup\",function(){return{require:\"^accordion\",restrict:\"EA\",transclude:!0,replace:!0,templateUrl:\"template/accordion/accordion-group.html\",scope:{heading:\"@\",isOpen:\"=?\",isDisabled:\"=?\"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.$watch(\"isOpen\",function(b){b&&d.closeOthers(a)}),a.toggleOpen=function(){a.isDisabled||(a.isOpen=!a.isOpen)}}}}).directive(\"accordionHeading\",function(){return{restrict:\"EA\",transclude:!0,template:\"\",replace:!0,require:\"^accordionGroup\",link:function(a,b,c,d,e){d.setHeading(e(a,function(){}))}}}).directive(\"accordionTransclude\",function(){return{require:\"^accordionGroup\",link:function(a,b,c,d){a.$watch(function(){return d[c.accordionTransclude]},function(a){a&&(b.html(\"\"),b.append(a))})}}}),angular.module(\"ui.bootstrap.alert\",[]).controller(\"AlertController\",[\"$scope\",\"$attrs\",function(a,b){a.closeable=\"close\"in b,this.close=a.close}]).directive(\"alert\",function(){return{restrict:\"EA\",controller:\"AlertController\",templateUrl:\"template/alert/alert.html\",transclude:!0,replace:!0,scope:{type:\"@\",close:\"&\"}}}).directive(\"dismissOnTimeout\",[\"$timeout\",function(a){return{require:\"alert\",link:function(b,c,d,e){a(function(){e.close()},parseInt(d.dismissOnTimeout,10))}}}]),angular.module(\"ui.bootstrap.bindHtml\",[]).directive(\"bindHtmlUnsafe\",function(){return function(a,b,c){b.addClass(\"ng-binding\").data(\"$binding\",c.bindHtmlUnsafe),a.$watch(c.bindHtmlUnsafe,function(a){b.html(a||\"\")})}}),angular.module(\"ui.bootstrap.buttons\",[]).constant(\"buttonConfig\",{activeClass:\"active\",toggleEvent:\"click\"}).controller(\"ButtonsController\",[\"buttonConfig\",function(a){this.activeClass=a.activeClass||\"active\",this.toggleEvent=a.toggleEvent||\"click\"}]).directive(\"btnRadio\",function(){return{require:[\"btnRadio\",\"ngModel\"],controller:\"ButtonsController\",link:function(a,b,c,d){var e=d[0],f=d[1];f.$render=function(){b.toggleClass(e.activeClass,angular.equals(f.$modelValue,a.$eval(c.btnRadio)))},b.bind(e.toggleEvent,function(){var d=b.hasClass(e.activeClass);(!d||angular.isDefined(c.uncheckable))&&a.$apply(function(){f.$setViewValue(d?null:a.$eval(c.btnRadio)),f.$render()})})}}}).directive(\"btnCheckbox\",function(){return{require:[\"btnCheckbox\",\"ngModel\"],controller:\"ButtonsController\",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){var d=a.$eval(b);return angular.isDefined(d)?d:c}var h=d[0],i=d[1];i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.bind(h.toggleEvent,function(){a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module(\"ui.bootstrap.carousel\",[\"ui.bootstrap.transition\"]).controller(\"CarouselController\",[\"$scope\",\"$timeout\",\"$interval\",\"$transition\",function(a,b,c,d){function e(){f();var b=+a.interval;!isNaN(b)&&b>0&&(h=c(g,b))}function f(){h&&(c.cancel(h),h=null)}function g(){var b=+a.interval;i&&!isNaN(b)&&b>0?a.next():a.pause()}var h,i,j=this,k=j.slides=a.slides=[],l=-1;j.currentSlide=null;var m=!1;j.select=a.select=function(c,f){function g(){if(!m){if(j.currentSlide&&angular.isString(f)&&!a.noTransition&&c.$element){c.$element.addClass(f);{c.$element[0].offsetWidth}angular.forEach(k,function(a){angular.extend(a,{direction:\"\",entering:!1,leaving:!1,active:!1})}),angular.extend(c,{direction:f,active:!0,entering:!0}),angular.extend(j.currentSlide||{},{direction:f,leaving:!0}),a.$currentTransition=d(c.$element,{}),function(b,c){a.$currentTransition.then(function(){h(b,c)},function(){h(b,c)})}(c,j.currentSlide)}else h(c,j.currentSlide);j.currentSlide=c,l=i,e()}}function h(b,c){angular.extend(b,{direction:\"\",active:!0,leaving:!1,entering:!1}),angular.extend(c||{},{direction:\"\",active:!1,leaving:!1,entering:!1}),a.$currentTransition=null}var i=k.indexOf(c);void 0===f&&(f=i>l?\"next\":\"prev\"),c&&c!==j.currentSlide&&(a.$currentTransition?(a.$currentTransition.cancel(),b(g)):g())},a.$on(\"$destroy\",function(){m=!0}),j.indexOfSlide=function(a){return k.indexOf(a)},a.next=function(){var b=(l+1)%k.length;return a.$currentTransition?void 0:j.select(k[b],\"next\")},a.prev=function(){var b=0>l-1?k.length-1:l-1;return a.$currentTransition?void 0:j.select(k[b],\"prev\")},a.isActive=function(a){return j.currentSlide===a},a.$watch(\"interval\",e),a.$on(\"$destroy\",f),a.play=function(){i||(i=!0,e())},a.pause=function(){a.noPause||(i=!1,f())},j.addSlide=function(b,c){b.$element=c,k.push(b),1===k.length||b.active?(j.select(k[k.length-1]),1==k.length&&a.play()):b.active=!1},j.removeSlide=function(a){var b=k.indexOf(a);k.splice(b,1),k.length>0&&a.active?j.select(b>=k.length?k[b-1]:k[b]):l>b&&l--}}]).directive(\"carousel\",[function(){return{restrict:\"EA\",transclude:!0,replace:!0,controller:\"CarouselController\",require:\"carousel\",templateUrl:\"template/carousel/carousel.html\",scope:{interval:\"=\",noTransition:\"=\",noPause:\"=\"}}}]).directive(\"slide\",function(){return{require:\"^carousel\",restrict:\"EA\",transclude:!0,replace:!0,templateUrl:\"template/carousel/slide.html\",scope:{active:\"=?\"},link:function(a,b,c,d){d.addSlide(a,b),a.$on(\"$destroy\",function(){d.removeSlide(a)}),a.$watch(\"active\",function(b){b&&d.select(a)})}}}),angular.module(\"ui.bootstrap.dateparser\",[]).service(\"dateParser\",[\"$locale\",\"orderByFilter\",function(a,b){function c(a){var c=[],d=a.split(\"\");return angular.forEach(e,function(b,e){var f=a.indexOf(e);if(f>-1){a=a.split(\"\"),d[f]=\"(\"+b.regex+\")\",a[f]=\"$\";for(var g=f+1,h=f+e.length;h>g;g++)d[g]=\"\",a[g]=\"$\";a=a.join(\"\"),c.push({index:f,apply:b.apply})}}),{regex:new RegExp(\"^\"+d.join(\"\")+\"$\"),map:b(c,\"index\")}}function d(a,b,c){return 1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}this.parsers={};var e={yyyy:{regex:\"\\\\d{4}\",apply:function(a){this.year=+a}},yy:{regex:\"\\\\d{2}\",apply:function(a){this.year=+a+2e3}},y:{regex:\"\\\\d{1,4}\",apply:function(a){this.year=+a}},MMMM:{regex:a.DATETIME_FORMATS.MONTH.join(\"|\"),apply:function(b){this.month=a.DATETIME_FORMATS.MONTH.indexOf(b)}},MMM:{regex:a.DATETIME_FORMATS.SHORTMONTH.join(\"|\"),apply:function(b){this.month=a.DATETIME_FORMATS.SHORTMONTH.indexOf(b)}},MM:{regex:\"0[1-9]|1[0-2]\",apply:function(a){this.month=a-1}},M:{regex:\"[1-9]|1[0-2]\",apply:function(a){this.month=a-1}},dd:{regex:\"[0-2][0-9]{1}|3[0-1]{1}\",apply:function(a){this.date=+a}},d:{regex:\"[1-2]?[0-9]{1}|3[0-1]{1}\",apply:function(a){this.date=+a}},EEEE:{regex:a.DATETIME_FORMATS.DAY.join(\"|\")},EEE:{regex:a.DATETIME_FORMATS.SHORTDAY.join(\"|\")}};this.parse=function(b,e){if(!angular.isString(b)||!e)return b;e=a.DATETIME_FORMATS[e]||e,this.parsers[e]||(this.parsers[e]=c(e));var f=this.parsers[e],g=f.regex,h=f.map,i=b.match(g);if(i&&i.length){for(var j,k={year:1900,month:0,date:1,hours:0},l=1,m=i.length;m>l;l++){var n=h[l-1];n.apply&&n.apply.call(k,i[l])}return d(k.year,k.month,k.date)&&(j=new Date(k.year,k.month,k.date,k.hours)),j}}}]),angular.module(\"ui.bootstrap.position\",[]).factory(\"$position\",[\"$document\",\"$window\",function(a,b){function c(a,c){return a.currentStyle?a.currentStyle[c]:b.getComputedStyle?b.getComputedStyle(a)[c]:a.style[c]}function d(a){return\"static\"===(c(a,\"position\")||\"static\")}var e=function(b){for(var c=a[0],e=b.offsetParent||c;e&&e!==c&&d(e);)e=e.offsetParent;return e||c};return{position:function(b){var c=this.offset(b),d={top:0,left:0},f=e(b[0]);f!=a[0]&&(d=this.offset(angular.element(f)),d.top+=f.clientTop-f.scrollTop,d.left+=f.clientLeft-f.scrollLeft);var g=b[0].getBoundingClientRect();return{width:g.width||b.prop(\"offsetWidth\"),height:g.height||b.prop(\"offsetHeight\"),top:c.top-d.top,left:c.left-d.left}},offset:function(c){var d=c[0].getBoundingClientRect();return{width:d.width||c.prop(\"offsetWidth\"),height:d.height||c.prop(\"offsetHeight\"),top:d.top+(b.pageYOffset||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].documentElement.scrollLeft)}},positionElements:function(a,b,c,d){var e,f,g,h,i=c.split(\"-\"),j=i[0],k=i[1]||\"center\";e=d?this.offset(a):this.position(a),f=b.prop(\"offsetWidth\"),g=b.prop(\"offsetHeight\");var l={center:function(){return e.left+e.width/2-f/2},left:function(){return e.left},right:function(){return e.left+e.width}},m={center:function(){return e.top+e.height/2-g/2},top:function(){return e.top},bottom:function(){return e.top+e.height}};switch(j){case\"right\":h={top:m[k](),left:l[j]()};break;case\"left\":h={top:m[k](),left:e.left-f};break;case\"bottom\":h={top:m[j](),left:l[k]()};break;default:h={top:e.top-g,left:l[k]()}}return h}}}]),angular.module(\"ui.bootstrap.datepicker\",[\"ui.bootstrap.dateparser\",\"ui.bootstrap.position\"]).constant(\"datepickerConfig\",{formatDay:\"dd\",formatMonth:\"MMMM\",formatYear:\"yyyy\",formatDayHeader:\"EEE\",formatDayTitle:\"MMMM yyyy\",formatMonthTitle:\"yyyy\",datepickerMode:\"day\",minMode:\"day\",maxMode:\"year\",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller(\"DatepickerController\",[\"$scope\",\"$attrs\",\"$parse\",\"$interpolate\",\"$timeout\",\"$log\",\"dateFilter\",\"datepickerConfig\",function(a,b,c,d,e,f,g,h){var i=this,j={$setViewValue:angular.noop};this.modes=[\"day\",\"month\",\"year\"],angular.forEach([\"formatDay\",\"formatMonth\",\"formatYear\",\"formatDayHeader\",\"formatDayTitle\",\"formatMonthTitle\",\"minMode\",\"maxMode\",\"showWeeks\",\"startingDay\",\"yearRange\"],function(c,e){i[c]=angular.isDefined(b[c])?8>e?d(b[c])(a.$parent):a.$parent.$eval(b[c]):h[c]}),angular.forEach([\"minDate\",\"maxDate\"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(a){i[d]=a?new Date(a):null,i.refreshView()}):i[d]=h[d]?new Date(h[d]):null}),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId=\"datepicker-\"+a.$id+\"-\"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(b.initDate)?a.$parent.$eval(b.initDate):new Date,a.isActive=function(b){return 0===i.compare(b.date,i.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){j=a,j.$render=function(){i.render()}},this.render=function(){if(j.$modelValue){var a=new Date(j.$modelValue),b=!isNaN(a);b?this.activeDate=a:f.error('Datepicker directive: \"ng-model\" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.'),j.$setValidity(\"date\",b)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=j.$modelValue?new Date(j.$modelValue):null;j.$setValidity(\"date-disabled\",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=j.$modelValue?new Date(j.$modelValue):null;return{date:a,label:g(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date)}},this.isDisabled=function(c){return this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===i.minMode){var c=j.$modelValue?new Date(j.$modelValue):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),j.$setViewValue(c),j.$render()}else i.activeDate=b,a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=i.activeDate.getFullYear()+a*(i.step.years||0),c=i.activeDate.getMonth()+a*(i.step.months||0);i.activeDate.setFullYear(b,c,1),i.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===i.maxMode&&1===b||a.datepickerMode===i.minMode&&-1===b||(a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)+b])},a.keys={13:\"enter\",32:\"space\",33:\"pageup\",34:\"pagedown\",35:\"end\",36:\"home\",37:\"left\",38:\"up\",39:\"right\",40:\"down\"};var k=function(){e(function(){i.element[0].focus()},0,!1)};a.$on(\"datepicker.focus\",k),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),b.stopPropagation(),\"enter\"===c||\"space\"===c){if(i.isDisabled(i.activeDate))return;a.select(i.activeDate),k()}else!b.ctrlKey||\"up\"!==c&&\"down\"!==c?(i.handleKeyDown(c,b),i.refreshView()):(a.toggleMode(\"up\"===c?1:-1),k())}}]).directive(\"datepicker\",function(){return{restrict:\"EA\",replace:!0,templateUrl:\"template/datepicker/datepicker.html\",scope:{datepickerMode:\"=?\",dateDisabled:\"&\"},require:[\"datepicker\",\"?^ngModel\"],controller:\"DatepickerController\",link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f)}}}).directive(\"daypicker\",[\"dateFilter\",function(a){return{restrict:\"EA\",replace:!0,templateUrl:\"template/datepicker/day.html\",require:\"^datepicker\",link:function(b,c,d,e){function f(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?i[b]:29}function g(a,b){var c=new Array(b),d=new Date(a),e=0;for(d.setHours(12);b>e;)c[e++]=new Date(d),d.setDate(d.getDate()+1);return c}function h(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}b.showWeeks=e.showWeeks,e.step={months:1},e.element=c;var i=[31,28,31,30,31,30,31,31,30,31,30,31];e._refreshView=function(){var c=e.activeDate.getFullYear(),d=e.activeDate.getMonth(),f=new Date(c,d,1),i=e.startingDay-f.getDay(),j=i>0?7-i:-i,k=new Date(f);j>0&&k.setDate(-j+1);for(var l=g(k,42),m=0;42>m;m++)l[m]=angular.extend(e.createDateObject(l[m],e.formatDay),{secondary:l[m].getMonth()!==d,uid:b.uniqueId+\"-\"+m});b.labels=new Array(7);for(var n=0;7>n;n++)b.labels[n]={abbr:a(l[n].date,e.formatDayHeader),full:a(l[n].date,\"EEEE\")};if(b.title=a(e.activeDate,e.formatDayTitle),b.rows=e.split(l,7),b.showWeeks){b.weekNumbers=[];for(var o=h(b.rows[0][0].date),p=b.rows.length;b.weekNumbers.push(o++)<p;);}},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},e.handleKeyDown=function(a){var b=e.activeDate.getDate();if(\"left\"===a)b-=1;else if(\"up\"===a)b-=7;else if(\"right\"===a)b+=1;else if(\"down\"===a)b+=7;else if(\"pageup\"===a||\"pagedown\"===a){var c=e.activeDate.getMonth()+(\"pageup\"===a?-1:1);e.activeDate.setMonth(c,1),b=Math.min(f(e.activeDate.getFullYear(),e.activeDate.getMonth()),b)}else\"home\"===a?b=1:\"end\"===a&&(b=f(e.activeDate.getFullYear(),e.activeDate.getMonth()));e.activeDate.setDate(b)},e.refreshView()}}}]).directive(\"monthpicker\",[\"dateFilter\",function(a){return{restrict:\"EA\",replace:!0,templateUrl:\"template/datepicker/month.html\",require:\"^datepicker\",link:function(b,c,d,e){e.step={years:1},e.element=c,e._refreshView=function(){for(var c=new Array(12),d=e.activeDate.getFullYear(),f=0;12>f;f++)c[f]=angular.extend(e.createDateObject(new Date(d,f,1),e.formatMonth),{uid:b.uniqueId+\"-\"+f});b.title=a(e.activeDate,e.formatMonthTitle),b.rows=e.split(c,3)},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth())-new Date(b.getFullYear(),b.getMonth())},e.handleKeyDown=function(a){var b=e.activeDate.getMonth();if(\"left\"===a)b-=1;else if(\"up\"===a)b-=3;else if(\"right\"===a)b+=1;else if(\"down\"===a)b+=3;else if(\"pageup\"===a||\"pagedown\"===a){var c=e.activeDate.getFullYear()+(\"pageup\"===a?-1:1);e.activeDate.setFullYear(c)}else\"home\"===a?b=0:\"end\"===a&&(b=11);e.activeDate.setMonth(b)},e.refreshView()}}}]).directive(\"yearpicker\",[\"dateFilter\",function(){return{restrict:\"EA\",replace:!0,templateUrl:\"template/datepicker/year.html\",require:\"^datepicker\",link:function(a,b,c,d){function e(a){return parseInt((a-1)/f,10)*f+1}var f=d.yearRange;d.step={years:f},d.element=b,d._refreshView=function(){for(var b=new Array(f),c=0,g=e(d.activeDate.getFullYear());f>c;c++)b[c]=angular.extend(d.createDateObject(new Date(g+c,0,1),d.formatYear),{uid:a.uniqueId+\"-\"+c});a.title=[b[0].label,b[f-1].label].join(\" - \"),a.rows=d.split(b,5)},d.compare=function(a,b){return a.getFullYear()-b.getFullYear()},d.handleKeyDown=function(a){var b=d.activeDate.getFullYear();\"left\"===a?b-=1:\"up\"===a?b-=5:\"right\"===a?b+=1:\"down\"===a?b+=5:\"pageup\"===a||\"pagedown\"===a?b+=(\"pageup\"===a?-1:1)*d.step.years:\"home\"===a?b=e(d.activeDate.getFullYear()):\"end\"===a&&(b=e(d.activeDate.getFullYear())+f-1),d.activeDate.setFullYear(b)},d.refreshView()}}}]).constant(\"datepickerPopupConfig\",{datepickerPopup:\"yyyy-MM-dd\",currentText:\"Today\",clearText:\"Clear\",closeText:\"Done\",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive(\"datepickerPopup\",[\"$compile\",\"$parse\",\"$document\",\"$position\",\"dateFilter\",\"dateParser\",\"datepickerPopupConfig\",function(a,b,c,d,e,f,g){return{restrict:\"EA\",require:\"ngModel\",scope:{isOpen:\"=?\",currentText:\"@\",clearText:\"@\",closeText:\"@\",dateDisabled:\"&\"},link:function(h,i,j,k){function l(a){return a.replace(/([A-Z])/g,function(a){return\"-\"+a.toLowerCase()})}function m(a){if(a){if(angular.isDate(a)&&!isNaN(a))return k.$setValidity(\"date\",!0),a;if(angular.isString(a)){var b=f.parse(a,n)||new Date(a);return isNaN(b)?void k.$setValidity(\"date\",!1):(k.$setValidity(\"date\",!0),b)}return void k.$setValidity(\"date\",!1)}return k.$setValidity(\"date\",!0),null}var n,o=angular.isDefined(j.closeOnDateSelection)?h.$parent.$eval(j.closeOnDateSelection):g.closeOnDateSelection,p=angular.isDefined(j.datepickerAppendToBody)?h.$parent.$eval(j.datepickerAppendToBody):g.appendToBody;h.showButtonBar=angular.isDefined(j.showButtonBar)?h.$parent.$eval(j.showButtonBar):g.showButtonBar,h.getText=function(a){return h[a+\"Text\"]||g[a+\"Text\"]},j.$observe(\"datepickerPopup\",function(a){n=a||g.datepickerPopup,k.$render()});var q=angular.element(\"<div datepicker-popup-wrap><div datepicker></div></div>\");q.attr({\"ng-model\":\"date\",\"ng-change\":\"dateSelection()\"});var r=angular.element(q.children()[0]);j.datepickerOptions&&angular.forEach(h.$parent.$eval(j.datepickerOptions),function(a,b){r.attr(l(b),a)}),h.watchData={},angular.forEach([\"minDate\",\"maxDate\",\"datepickerMode\"],function(a){if(j[a]){var c=b(j[a]);if(h.$parent.$watch(c,function(b){h.watchData[a]=b}),r.attr(l(a),\"watchData.\"+a),\"datepickerMode\"===a){var d=c.assign;h.$watch(\"watchData.\"+a,function(a,b){a!==b&&d(h.$parent,a)})}}}),j.dateDisabled&&r.attr(\"date-disabled\",\"dateDisabled({ date: date, mode: mode })\"),k.$parsers.unshift(m),h.dateSelection=function(a){angular.isDefined(a)&&(h.date=a),k.$setViewValue(h.date),k.$render(),o&&(h.isOpen=!1,i[0].focus())},i.bind(\"input change keyup\",function(){h.$apply(function(){h.date=k.$modelValue})}),k.$render=function(){var a=k.$viewValue?e(k.$viewValue,n):\"\";i.val(a),h.date=m(k.$modelValue)};var s=function(a){h.isOpen&&a.target!==i[0]&&h.$apply(function(){h.isOpen=!1})},t=function(a){h.keydown(a)};i.bind(\"keydown\",t),h.keydown=function(a){27===a.which?(a.preventDefault(),a.stopPropagation(),h.close()):40!==a.which||h.isOpen||(h.isOpen=!0)},h.$watch(\"isOpen\",function(a){a?(h.$broadcast(\"datepicker.focus\"),h.position=p?d.offset(i):d.position(i),h.position.top=h.position.top+i.prop(\"offsetHeight\"),c.bind(\"click\",s)):c.unbind(\"click\",s)}),h.select=function(a){if(\"today\"===a){var b=new Date;angular.isDate(k.$modelValue)?(a=new Date(k.$modelValue),a.setFullYear(b.getFullYear(),b.getMonth(),b.getDate())):a=new Date(b.setHours(0,0,0,0))}h.dateSelection(a)},h.close=function(){h.isOpen=!1,i[0].focus()};var u=a(q)(h);q.remove(),p?c.find(\"body\").append(u):i.after(u),h.$on(\"$destroy\",function(){u.remove(),i.unbind(\"keydown\",t),c.unbind(\"click\",s)})}}}]).directive(\"datepickerPopupWrap\",function(){return{restrict:\"EA\",replace:!0,transclude:!0,templateUrl:\"template/datepicker/popup.html\",link:function(a,b){b.bind(\"click\",function(a){a.preventDefault(),a.stopPropagation()})}}}),angular.module(\"ui.bootstrap.dropdown\",[]).constant(\"dropdownConfig\",{openClass:\"open\"}).service(\"dropdownService\",[\"$document\",function(a){var b=null;this.open=function(e){b||(a.bind(\"click\",c),a.bind(\"keydown\",d)),b&&b!==e&&(b.isOpen=!1),b=e},this.close=function(e){b===e&&(b=null,a.unbind(\"click\",c),a.unbind(\"keydown\",d))};var c=function(a){if(b){var c=b.getToggleElement();a&&c&&c[0].contains(a.target)||b.$apply(function(){b.isOpen=!1})}},d=function(a){27===a.which&&(b.focusToggleElement(),c())}}]).controller(\"DropdownController\",[\"$scope\",\"$attrs\",\"$parse\",\"dropdownConfig\",\"dropdownService\",\"$animate\",function(a,b,c,d,e,f){var g,h=this,i=a.$new(),j=d.openClass,k=angular.noop,l=b.onToggle?c(b.onToggle):angular.noop;this.init=function(d){h.$element=d,b.isOpen&&(g=c(b.isOpen),k=g.assign,a.$watch(g,function(a){i.isOpen=!!a}))},this.toggle=function(a){return i.isOpen=arguments.length?!!a:!i.isOpen},this.isOpen=function(){return i.isOpen},i.getToggleElement=function(){return h.toggleElement},i.focusToggleElement=function(){h.toggleElement&&h.toggleElement[0].focus()},i.$watch(\"isOpen\",function(b,c){f[b?\"addClass\":\"removeClass\"](h.$element,j),b?(i.focusToggleElement(),e.open(i)):e.close(i),k(a,b),angular.isDefined(b)&&b!==c&&l(a,{open:!!b})}),a.$on(\"$locationChangeSuccess\",function(){i.isOpen=!1}),a.$on(\"$destroy\",function(){i.$destroy()})}]).directive(\"dropdown\",function(){return{controller:\"DropdownController\",link:function(a,b,c,d){d.init(b)}}}).directive(\"dropdownToggle\",function(){return{require:\"?^dropdown\",link:function(a,b,c,d){if(d){d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass(\"disabled\")||c.disabled||a.$apply(function(){d.toggle()})};b.bind(\"click\",e),b.attr({\"aria-haspopup\":!0,\"aria-expanded\":!1}),a.$watch(d.isOpen,function(a){b.attr(\"aria-expanded\",!!a)}),a.$on(\"$destroy\",function(){b.unbind(\"click\",e)})}}}}),angular.module(\"ui.bootstrap.modal\",[\"ui.bootstrap.transition\"]).factory(\"$$stackedMap\",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c<a.length;c++)if(b==a[c].key)return a[c]},keys:function(){for(var b=[],c=0;c<a.length;c++)b.push(a[c].key);return b},top:function(){return a[a.length-1]},remove:function(b){for(var c=-1,d=0;d<a.length;d++)if(b==a[d].key){c=d;break}return a.splice(c,1)[0]},removeTop:function(){return a.splice(a.length-1,1)[0]},length:function(){return a.length}}}}}).directive(\"modalBackdrop\",[\"$timeout\",function(a){return{restrict:\"EA\",replace:!0,templateUrl:\"template/modal/backdrop.html\",link:function(b,c,d){b.backdropClass=d.backdropClass||\"\",b.animate=!1,a(function(){b.animate=!0})}}}]).directive(\"modalWindow\",[\"$modalStack\",\"$timeout\",function(a,b){return{restrict:\"EA\",scope:{index:\"@\",animate:\"=\"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||\"template/modal/window.html\"},link:function(c,d,e){d.addClass(e.windowClass||\"\"),c.size=e.size,b(function(){c.animate=!0,d[0].querySelectorAll(\"[autofocus]\").length||d[0].focus()}),c.close=function(b){var c=a.getTop();c&&c.value.backdrop&&\"static\"!=c.value.backdrop&&b.target===b.currentTarget&&(b.preventDefault(),b.stopPropagation(),a.dismiss(c.key,\"backdrop click\"))}}}}]).directive(\"modalTransclude\",function(){return{link:function(a,b,c,d,e){e(a.$parent,function(a){b.empty(),b.append(a)})}}}).factory(\"$modalStack\",[\"$transition\",\"$timeout\",\"$document\",\"$compile\",\"$rootScope\",\"$$stackedMap\",function(a,b,c,d,e,f){function g(){for(var a=-1,b=n.keys(),c=0;c<b.length;c++)n.get(b[c]).value.backdrop&&(a=c);return a}function h(a){var b=c.find(\"body\").eq(0),d=n.get(a).value;n.remove(a),j(d.modalDomEl,d.modalScope,300,function(){d.modalScope.$destroy(),b.toggleClass(m,n.length()>0),i()})}function i(){if(k&&-1==g()){var a=l;j(k,l,150,function(){a.$destroy(),a=null}),k=void 0,l=void 0}}function j(c,d,e,f){function g(){g.done||(g.done=!0,c.remove(),f&&f())}d.animate=!1;var h=a.transitionEndEventName;if(h){var i=b(g,e);c.bind(h,function(){b.cancel(i),g(),d.$apply()})}else b(g)}var k,l,m=\"modal-open\",n=f.createNew(),o={};return e.$watch(g,function(a){l&&(l.index=a)}),c.bind(\"keydown\",function(a){var b;27===a.which&&(b=n.top(),b&&b.value.keyboard&&(a.preventDefault(),e.$apply(function(){o.dismiss(b.key,\"escape key press\")})))}),o.open=function(a,b){n.add(a,{deferred:b.deferred,modalScope:b.scope,backdrop:b.backdrop,keyboard:b.keyboard});var f=c.find(\"body\").eq(0),h=g();if(h>=0&&!k){l=e.$new(!0),l.index=h;var i=angular.element(\"<div modal-backdrop></div>\");i.attr(\"backdrop-class\",b.backdropClass),k=d(i)(l),f.append(k)}var j=angular.element(\"<div modal-window></div>\");j.attr({\"template-url\":b.windowTemplateUrl,\"window-class\":b.windowClass,size:b.size,index:n.length()-1,animate:\"animate\"}).html(b.content);var o=d(j)(b.scope);n.top().value.modalDomEl=o,f.append(o),f.addClass(m)},o.close=function(a,b){var c=n.get(a);c&&(c.value.deferred.resolve(b),h(a))},o.dismiss=function(a,b){var c=n.get(a);c&&(c.value.deferred.reject(b),h(a))},o.dismissAll=function(a){for(var b=this.getTop();b;)this.dismiss(b.key,a),b=this.getTop()},o.getTop=function(){return n.top()},o}]).provider(\"$modal\",function(){var a={options:{backdrop:!0,keyboard:!0},$get:[\"$injector\",\"$rootScope\",\"$q\",\"$http\",\"$templateCache\",\"$controller\",\"$modalStack\",function(b,c,d,e,f,g,h){function i(a){return a.template?d.when(a.template):e.get(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl,{cache:f}).then(function(a){return a.data})}function j(a){var c=[];return angular.forEach(a,function(a){(angular.isFunction(a)||angular.isArray(a))&&c.push(d.when(b.invoke(a)))}),c}var k={};return k.open=function(b){var e=d.defer(),f=d.defer(),k={result:e.promise,opened:f.promise,close:function(a){h.close(k,a)},dismiss:function(a){h.dismiss(k,a)}};if(b=angular.extend({},a.options,b),b.resolve=b.resolve||{},!b.template&&!b.templateUrl)throw new Error(\"One of template or templateUrl options is required.\");var l=d.all([i(b)].concat(j(b.resolve)));return l.then(function(a){var d=(b.scope||c).$new();d.$close=k.close,d.$dismiss=k.dismiss;var f,i={},j=1;b.controller&&(i.$scope=d,i.$modalInstance=k,angular.forEach(b.resolve,function(b,c){i[c]=a[j++]}),f=g(b.controller,i),b.controllerAs&&(d[b.controllerAs]=f)),h.open(k,{scope:d,deferred:e,content:a[0],backdrop:b.backdrop,keyboard:b.keyboard,backdropClass:b.backdropClass,windowClass:b.windowClass,windowTemplateUrl:b.windowTemplateUrl,size:b.size})},function(a){e.reject(a)}),l.then(function(){f.resolve(!0)},function(){f.reject(!1)}),k},k}]};return a}),angular.module(\"ui.bootstrap.pagination\",[]).controller(\"PaginationController\",[\"$scope\",\"$attrs\",\"$parse\",function(a,b,c){var d=this,e={$setViewValue:angular.noop},f=b.numPages?c(b.numPages).assign:angular.noop;this.init=function(f,g){e=f,this.config=g,e.$render=function(){d.render()},b.itemsPerPage?a.$parent.$watch(c(b.itemsPerPage),function(b){d.itemsPerPage=parseInt(b,10),a.totalPages=d.calculateTotalPages()}):this.itemsPerPage=g.itemsPerPage},this.calculateTotalPages=function(){var b=this.itemsPerPage<1?1:Math.ceil(a.totalItems/this.itemsPerPage);return Math.max(b||0,1)},this.render=function(){a.page=parseInt(e.$viewValue,10)||1},a.selectPage=function(b){a.page!==b&&b>0&&b<=a.totalPages&&(e.$setViewValue(b),e.$render())},a.getText=function(b){return a[b+\"Text\"]||d.config[b+\"Text\"]},a.noPrevious=function(){return 1===a.page},a.noNext=function(){return a.page===a.totalPages},a.$watch(\"totalItems\",function(){a.totalPages=d.calculateTotalPages()}),a.$watch(\"totalPages\",function(b){f(a.$parent,b),a.page>b?a.selectPage(b):e.$render()})}]).constant(\"paginationConfig\",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:\"First\",previousText:\"Previous\",nextText:\"Next\",lastText:\"Last\",rotate:!0}).directive(\"pagination\",[\"$parse\",\"paginationConfig\",function(a,b){return{restrict:\"EA\",scope:{totalItems:\"=\",firstText:\"@\",previousText:\"@\",nextText:\"@\",lastText:\"@\"},require:[\"pagination\",\"?ngModel\"],controller:\"PaginationController\",templateUrl:\"template/pagination/pagination.html\",replace:!0,link:function(c,d,e,f){function g(a,b,c){return{number:a,text:b,active:c}}function h(a,b){var c=[],d=1,e=b,f=angular.isDefined(k)&&b>k;f&&(l?(d=Math.max(a-Math.floor(k/2),1),e=d+k-1,e>b&&(e=b,d=e-k+1)):(d=(Math.ceil(a/k)-1)*k+1,e=Math.min(d+k-1,b)));for(var h=d;e>=h;h++){var i=g(h,h,h===a);c.push(i)}if(f&&!l){if(d>1){var j=g(d-1,\"...\",!1);c.unshift(j)}if(b>e){var m=g(e+1,\"...\",!1);c.push(m)}}return c}var i=f[0],j=f[1];if(j){var k=angular.isDefined(e.maxSize)?c.$parent.$eval(e.maxSize):b.maxSize,l=angular.isDefined(e.rotate)?c.$parent.$eval(e.rotate):b.rotate;c.boundaryLinks=angular.isDefined(e.boundaryLinks)?c.$parent.$eval(e.boundaryLinks):b.boundaryLinks,c.directionLinks=angular.isDefined(e.directionLinks)?c.$parent.$eval(e.directionLinks):b.directionLinks,i.init(j,b),e.maxSize&&c.$parent.$watch(a(e.maxSize),function(a){k=parseInt(a,10),i.render()\n});var m=i.render;i.render=function(){m(),c.page>0&&c.page<=c.totalPages&&(c.pages=h(c.page,c.totalPages))}}}}}]).constant(\"pagerConfig\",{itemsPerPage:10,previousText:\"« Previous\",nextText:\"Next »\",align:!0}).directive(\"pager\",[\"pagerConfig\",function(a){return{restrict:\"EA\",scope:{totalItems:\"=\",previousText:\"@\",nextText:\"@\"},require:[\"pager\",\"?ngModel\"],controller:\"PaginationController\",templateUrl:\"template/pagination/pager.html\",replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&(b.align=angular.isDefined(d.align)?b.$parent.$eval(d.align):a.align,f.init(g,a))}}}]),angular.module(\"ui.bootstrap.tooltip\",[\"ui.bootstrap.position\",\"ui.bootstrap.bindHtml\"]).provider(\"$tooltip\",function(){function a(a){var b=/[A-Z]/g,c=\"-\";return a.replace(b,function(a,b){return(b?c:\"\")+a.toLowerCase()})}var b={placement:\"top\",animation:!0,popupDelay:0},c={mouseenter:\"mouseleave\",click:\"click\",focus:\"blur\"},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=[\"$window\",\"$compile\",\"$timeout\",\"$document\",\"$position\",\"$interpolate\",function(e,f,g,h,i,j){return function(e,k,l){function m(a){var b=a||n.trigger||l,d=c[b]||b;return{show:b,hide:d}}var n=angular.extend({},b,d),o=a(e),p=j.startSymbol(),q=j.endSymbol(),r=\"<div \"+o+'-popup title=\"'+p+\"title\"+q+'\" content=\"'+p+\"content\"+q+'\" placement=\"'+p+\"placement\"+q+'\" animation=\"animation\" is-open=\"isOpen\"></div>';return{restrict:\"EA\",compile:function(){var a=f(r);return function(b,c,d){function f(){D.isOpen?l():j()}function j(){(!C||b.$eval(d[k+\"Enable\"]))&&(s(),D.popupDelay?z||(z=g(o,D.popupDelay,!1),z.then(function(a){a()})):o()())}function l(){b.$apply(function(){p()})}function o(){return z=null,y&&(g.cancel(y),y=null),D.content?(q(),w.css({top:0,left:0,display:\"block\"}),A?h.find(\"body\").append(w):c.after(w),E(),D.isOpen=!0,D.$digest(),E):angular.noop}function p(){D.isOpen=!1,g.cancel(z),z=null,D.animation?y||(y=g(r,500)):r()}function q(){w&&r(),x=D.$new(),w=a(x,angular.noop)}function r(){y=null,w&&(w.remove(),w=null),x&&(x.$destroy(),x=null)}function s(){t(),u()}function t(){var a=d[k+\"Placement\"];D.placement=angular.isDefined(a)?a:n.placement}function u(){var a=d[k+\"PopupDelay\"],b=parseInt(a,10);D.popupDelay=isNaN(b)?n.popupDelay:b}function v(){var a=d[k+\"Trigger\"];F(),B=m(a),B.show===B.hide?c.bind(B.show,f):(c.bind(B.show,j),c.bind(B.hide,l))}var w,x,y,z,A=angular.isDefined(n.appendToBody)?n.appendToBody:!1,B=m(void 0),C=angular.isDefined(d[k+\"Enable\"]),D=b.$new(!0),E=function(){var a=i.positionElements(c,w,D.placement,A);a.top+=\"px\",a.left+=\"px\",w.css(a)};D.isOpen=!1,d.$observe(e,function(a){D.content=a,!a&&D.isOpen&&p()}),d.$observe(k+\"Title\",function(a){D.title=a});var F=function(){c.unbind(B.show,j),c.unbind(B.hide,l)};v();var G=b.$eval(d[k+\"Animation\"]);D.animation=angular.isDefined(G)?!!G:n.animation;var H=b.$eval(d[k+\"AppendToBody\"]);A=angular.isDefined(H)?H:A,A&&b.$on(\"$locationChangeSuccess\",function(){D.isOpen&&p()}),b.$on(\"$destroy\",function(){g.cancel(y),g.cancel(z),F(),r(),D=null})}}}}}]}).directive(\"tooltipPopup\",function(){return{restrict:\"EA\",replace:!0,scope:{content:\"@\",placement:\"@\",animation:\"&\",isOpen:\"&\"},templateUrl:\"template/tooltip/tooltip-popup.html\"}}).directive(\"tooltip\",[\"$tooltip\",function(a){return a(\"tooltip\",\"tooltip\",\"mouseenter\")}]).directive(\"tooltipHtmlUnsafePopup\",function(){return{restrict:\"EA\",replace:!0,scope:{content:\"@\",placement:\"@\",animation:\"&\",isOpen:\"&\"},templateUrl:\"template/tooltip/tooltip-html-unsafe-popup.html\"}}).directive(\"tooltipHtmlUnsafe\",[\"$tooltip\",function(a){return a(\"tooltipHtmlUnsafe\",\"tooltip\",\"mouseenter\")}]),angular.module(\"ui.bootstrap.popover\",[\"ui.bootstrap.tooltip\"]).directive(\"popoverPopup\",function(){return{restrict:\"EA\",replace:!0,scope:{title:\"@\",content:\"@\",placement:\"@\",animation:\"&\",isOpen:\"&\"},templateUrl:\"template/popover/popover.html\"}}).directive(\"popover\",[\"$tooltip\",function(a){return a(\"popover\",\"popover\",\"click\")}]),angular.module(\"ui.bootstrap.progressbar\",[]).constant(\"progressConfig\",{animate:!0,max:100}).controller(\"ProgressController\",[\"$scope\",\"$attrs\",\"progressConfig\",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max,this.addBar=function(b,c){e||c.css({transition:\"none\"}),this.bars.push(b),b.$watch(\"value\",function(c){b.percent=+(100*c/a.max).toFixed(2)}),b.$on(\"$destroy\",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1)}}]).directive(\"progress\",function(){return{restrict:\"EA\",replace:!0,transclude:!0,controller:\"ProgressController\",require:\"progress\",scope:{},templateUrl:\"template/progressbar/progress.html\"}}).directive(\"bar\",function(){return{restrict:\"EA\",replace:!0,transclude:!0,require:\"^progress\",scope:{value:\"=\",type:\"@\"},templateUrl:\"template/progressbar/bar.html\",link:function(a,b,c,d){d.addBar(a,b)}}}).directive(\"progressbar\",function(){return{restrict:\"EA\",replace:!0,transclude:!0,controller:\"ProgressController\",scope:{value:\"=\",type:\"@\"},templateUrl:\"template/progressbar/progressbar.html\",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]))}}}),angular.module(\"ui.bootstrap.rating\",[]).constant(\"ratingConfig\",{max:5,stateOn:null,stateOff:null}).controller(\"RatingController\",[\"$scope\",\"$attrs\",\"ratingConfig\",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(f)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff},a[b]);return a},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive(\"rating\",function(){return{restrict:\"EA\",require:[\"rating\",\"ngModel\"],scope:{readonly:\"=?\",onHover:\"&\",onLeave:\"&\"},controller:\"RatingController\",templateUrl:\"template/rating/rating.html\",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f)}}}),angular.module(\"ui.bootstrap.tabs\",[]).controller(\"TabsetController\",[\"$scope\",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect())}),a.active=!0,a.onSelect()},b.addTab=function(a){c.push(a),1===c.length?a.active=!0:a.active&&b.select(a)},b.removeTab=function(a){var e=c.indexOf(a);if(a.active&&c.length>1&&!d){var f=e==c.length-1?e-1:e+1;b.select(c[f])}c.splice(e,1)};var d;a.$on(\"$destroy\",function(){d=!0})}]).directive(\"tabset\",function(){return{restrict:\"EA\",transclude:!0,replace:!0,scope:{type:\"@\"},controller:\"TabsetController\",templateUrl:\"template/tabs/tabset.html\",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive(\"tab\",[\"$parse\",function(a){return{require:\"^tabset\",restrict:\"EA\",replace:!0,templateUrl:\"template/tabs/tab.html\",transclude:!0,scope:{active:\"=?\",heading:\"@\",onSelect:\"&select\",onDeselect:\"&deselect\"},controller:function(){},compile:function(b,c,d){return function(b,c,e,f){b.$watch(\"active\",function(a){a&&f.select(b)}),b.disabled=!1,e.disabled&&b.$parent.$watch(a(e.disabled),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},f.addTab(b),b.$on(\"$destroy\",function(){f.removeTab(b)}),b.$transcludeFn=d}}}}]).directive(\"tabHeadingTransclude\",[function(){return{restrict:\"A\",require:\"^tab\",link:function(a,b){a.$watch(\"headingElement\",function(a){a&&(b.html(\"\"),b.append(a))})}}}]).directive(\"tabContentTransclude\",function(){function a(a){return a.tagName&&(a.hasAttribute(\"tab-heading\")||a.hasAttribute(\"data-tab-heading\")||\"tab-heading\"===a.tagName.toLowerCase()||\"data-tab-heading\"===a.tagName.toLowerCase())}return{restrict:\"A\",require:\"^tabset\",link:function(b,c,d){var e=b.$eval(d.tabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module(\"ui.bootstrap.timepicker\",[]).constant(\"timepickerConfig\",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller(\"TimepickerController\",[\"$scope\",\"$attrs\",\"$parse\",\"$log\",\"$locale\",\"timepickerConfig\",function(a,b,c,d,e,f){function g(){var b=parseInt(a.hours,10),c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===p[1]&&(b+=12)),b):void 0}function h(){var b=parseInt(a.minutes,10);return b>=0&&60>b?b:void 0}function i(a){return angular.isDefined(a)&&a.toString().length<2?\"0\"+a:a}function j(a){k(),o.$setViewValue(new Date(n)),l(a)}function k(){o.$setValidity(\"time\",!0),a.invalidHours=!1,a.invalidMinutes=!1}function l(b){var c=n.getHours(),d=n.getMinutes();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours=\"h\"===b?c:i(c),a.minutes=\"m\"===b?d:i(d),a.meridian=n.getHours()<12?p[0]:p[1]}function m(a){var b=new Date(n.getTime()+6e4*a);n.setHours(b.getHours(),b.getMinutes()),j()}var n=new Date,o={$setViewValue:angular.noop},p=angular.isDefined(b.meridians)?a.$parent.$eval(b.meridians):f.meridians||e.DATETIME_FORMATS.AMPMS;this.init=function(c,d){o=c,o.$render=this.render;var e=d.eq(0),g=d.eq(1),h=angular.isDefined(b.mousewheel)?a.$parent.$eval(b.mousewheel):f.mousewheel;h&&this.setupMousewheelEvents(e,g),a.readonlyInput=angular.isDefined(b.readonlyInput)?a.$parent.$eval(b.readonlyInput):f.readonlyInput,this.setupInputEvents(e,g)};var q=f.hourStep;b.hourStep&&a.$parent.$watch(c(b.hourStep),function(a){q=parseInt(a,10)});var r=f.minuteStep;b.minuteStep&&a.$parent.$watch(c(b.minuteStep),function(a){r=parseInt(a,10)}),a.showMeridian=f.showMeridian,b.showMeridian&&a.$parent.$watch(c(b.showMeridian),function(b){if(a.showMeridian=!!b,o.$error.time){var c=g(),d=h();angular.isDefined(c)&&angular.isDefined(d)&&(n.setHours(c),j())}else l()}),this.setupMousewheelEvents=function(b,c){var d=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind(\"mousewheel wheel\",function(b){a.$apply(d(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind(\"mousewheel wheel\",function(b){a.$apply(d(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()})},this.setupInputEvents=function(b,c){if(a.readonlyInput)return a.updateHours=angular.noop,void(a.updateMinutes=angular.noop);var d=function(b,c){o.$setViewValue(null),o.$setValidity(\"time\",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c)};a.updateHours=function(){var a=g();angular.isDefined(a)?(n.setHours(a),j(\"h\")):d(!0)},b.bind(\"blur\",function(){!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=i(a.hours)})}),a.updateMinutes=function(){var a=h();angular.isDefined(a)?(n.setMinutes(a),j(\"m\")):d(void 0,!0)},c.bind(\"blur\",function(){!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=i(a.minutes)})})},this.render=function(){var a=o.$modelValue?new Date(o.$modelValue):null;isNaN(a)?(o.$setValidity(\"time\",!1),d.error('Timepicker directive: \"ng-model\" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(a&&(n=a),k(),l())},a.incrementHours=function(){m(60*q)},a.decrementHours=function(){m(60*-q)},a.incrementMinutes=function(){m(r)},a.decrementMinutes=function(){m(-r)},a.toggleMeridian=function(){m(720*(n.getHours()<12?1:-1))}}]).directive(\"timepicker\",function(){return{restrict:\"EA\",require:[\"timepicker\",\"?^ngModel\"],controller:\"TimepickerController\",replace:!0,scope:{},templateUrl:\"template/timepicker/timepicker.html\",link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find(\"input\"))}}}),angular.module(\"ui.bootstrap.typeahead\",[\"ui.bootstrap.position\",\"ui.bootstrap.bindHtml\"]).factory(\"typeaheadParser\",[\"$parse\",function(a){var b=/^\\s*([\\s\\S]+?)(?:\\s+as\\s+([\\s\\S]+?))?\\s+for\\s+(?:([\\$\\w][\\$\\w\\d]*))\\s+in\\s+([\\s\\S]+?)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of \"_modelValue_ (as _label_)? for _item_ in _collection_\" but got \"'+c+'\".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).directive(\"typeahead\",[\"$compile\",\"$parse\",\"$q\",\"$timeout\",\"$document\",\"$position\",\"typeaheadParser\",function(a,b,c,d,e,f,g){var h=[9,13,27,38,40];return{require:\"ngModel\",link:function(i,j,k,l){var m,n=i.$eval(k.typeaheadMinLength)||1,o=i.$eval(k.typeaheadWaitMs)||0,p=i.$eval(k.typeaheadEditable)!==!1,q=b(k.typeaheadLoading).assign||angular.noop,r=b(k.typeaheadOnSelect),s=k.typeaheadInputFormatter?b(k.typeaheadInputFormatter):void 0,t=k.typeaheadAppendToBody?i.$eval(k.typeaheadAppendToBody):!1,u=i.$eval(k.typeaheadFocusFirst)!==!1,v=b(k.ngModel).assign,w=g.parse(k.typeahead),x=i.$new();i.$on(\"$destroy\",function(){x.$destroy()});var y=\"typeahead-\"+x.$id+\"-\"+Math.floor(1e4*Math.random());j.attr({\"aria-autocomplete\":\"list\",\"aria-expanded\":!1,\"aria-owns\":y});var z=angular.element(\"<div typeahead-popup></div>\");z.attr({id:y,matches:\"matches\",active:\"activeIdx\",select:\"select(activeIdx)\",query:\"query\",position:\"position\"}),angular.isDefined(k.typeaheadTemplateUrl)&&z.attr(\"template-url\",k.typeaheadTemplateUrl);var A=function(){x.matches=[],x.activeIdx=-1,j.attr(\"aria-expanded\",!1)},B=function(a){return y+\"-option-\"+a};x.$watch(\"activeIdx\",function(a){0>a?j.removeAttr(\"aria-activedescendant\"):j.attr(\"aria-activedescendant\",B(a))});var C=function(a){var b={$viewValue:a};q(i,!0),c.when(w.source(i,b)).then(function(c){var d=a===l.$viewValue;if(d&&m)if(c.length>0){x.activeIdx=u?0:-1,x.matches.length=0;for(var e=0;e<c.length;e++)b[w.itemName]=c[e],x.matches.push({id:B(e),label:w.viewMapper(x,b),model:c[e]});x.query=a,x.position=t?f.offset(j):f.position(j),x.position.top=x.position.top+j.prop(\"offsetHeight\"),j.attr(\"aria-expanded\",!0)}else A();d&&q(i,!1)},function(){A(),q(i,!1)})};A(),x.query=void 0;var D,E=function(a){D=d(function(){C(a)},o)},F=function(){D&&d.cancel(D)};l.$parsers.unshift(function(a){return m=!0,a&&a.length>=n?o>0?(F(),E(a)):C(a):(q(i,!1),F(),A()),p?a:a?void l.$setValidity(\"editable\",!1):(l.$setValidity(\"editable\",!0),a)}),l.$formatters.push(function(a){var b,c,d={};return s?(d.$model=a,s(i,d)):(d[w.itemName]=a,b=w.viewMapper(i,d),d[w.itemName]=void 0,c=w.viewMapper(i,d),b!==c?b:a)}),x.select=function(a){var b,c,e={};e[w.itemName]=c=x.matches[a].model,b=w.modelMapper(i,e),v(i,b),l.$setValidity(\"editable\",!0),r(i,{$item:c,$model:b,$label:w.viewMapper(i,e)}),A(),d(function(){j[0].focus()},0,!1)},j.bind(\"keydown\",function(a){0!==x.matches.length&&-1!==h.indexOf(a.which)&&(-1!=x.activeIdx||13!==a.which&&9!==a.which)&&(a.preventDefault(),40===a.which?(x.activeIdx=(x.activeIdx+1)%x.matches.length,x.$digest()):38===a.which?(x.activeIdx=(x.activeIdx>0?x.activeIdx:x.matches.length)-1,x.$digest()):13===a.which||9===a.which?x.$apply(function(){x.select(x.activeIdx)}):27===a.which&&(a.stopPropagation(),A(),x.$digest()))}),j.bind(\"blur\",function(){m=!1});var G=function(a){j[0]!==a.target&&(A(),x.$digest())};e.bind(\"click\",G),i.$on(\"$destroy\",function(){e.unbind(\"click\",G),t&&H.remove()});var H=a(z)(x);t?e.find(\"body\").append(H):j.after(H)}}}]).directive(\"typeaheadPopup\",function(){return{restrict:\"EA\",scope:{matches:\"=\",query:\"=\",active:\"=\",position:\"=\",select:\"&\"},replace:!0,templateUrl:\"template/typeahead/typeahead-popup.html\",link:function(a,b,c){a.templateUrl=c.templateUrl,a.isOpen=function(){return a.matches.length>0},a.isActive=function(b){return a.active==b},a.selectActive=function(b){a.active=b},a.selectMatch=function(b){a.select({activeIdx:b})}}}}).directive(\"typeaheadMatch\",[\"$http\",\"$templateCache\",\"$compile\",\"$parse\",function(a,b,c,d){return{restrict:\"EA\",scope:{index:\"=\",match:\"=\",query:\"=\"},link:function(e,f,g){var h=d(g.templateUrl)(e.$parent)||\"template/typeahead/typeahead-match.html\";a.get(h,{cache:b}).success(function(a){f.replaceWith(c(a.trim())(e))})}}}]).filter(\"typeaheadHighlight\",function(){function a(a){return a.replace(/([.?*+^$[\\]\\\\(){}|-])/g,\"\\\\$1\")}return function(b,c){return c?(\"\"+b).replace(new RegExp(a(c),\"gi\"),\"<strong>$&</strong>\"):b}}),angular.module(\"template/accordion/accordion-group.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/accordion/accordion-group.html\",'<div class=\"panel panel-default\">\\n  <div class=\"panel-heading\">\\n    <h4 class=\"panel-title\">\\n      <a href class=\"accordion-toggle\" ng-click=\"toggleOpen()\" accordion-transclude=\"heading\"><span ng-class=\"{\\'text-muted\\': isDisabled}\">{{heading}}</span></a>\\n    </h4>\\n  </div>\\n  <div class=\"panel-collapse\" collapse=\"!isOpen\">\\n\t  <div class=\"panel-body\" ng-transclude></div>\\n  </div>\\n</div>\\n')}]),angular.module(\"template/accordion/accordion.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/accordion/accordion.html\",'<div class=\"panel-group\" ng-transclude></div>')}]),angular.module(\"template/alert/alert.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/alert/alert.html\",'<div class=\"alert\" ng-class=\"[\\'alert-\\' + (type || \\'warning\\'), closeable ? \\'alert-dismissable\\' : null]\" role=\"alert\">\\n    <button ng-show=\"closeable\" type=\"button\" class=\"close\" ng-click=\"close()\">\\n        <span aria-hidden=\"true\">&times;</span>\\n        <span class=\"sr-only\">Close</span>\\n    </button>\\n    <div ng-transclude></div>\\n</div>\\n')}]),angular.module(\"template/carousel/carousel.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/carousel/carousel.html\",'<div ng-mouseenter=\"pause()\" ng-mouseleave=\"play()\" class=\"carousel\" ng-swipe-right=\"prev()\" ng-swipe-left=\"next()\">\\n    <ol class=\"carousel-indicators\" ng-show=\"slides.length > 1\">\\n        <li ng-repeat=\"slide in slides track by $index\" ng-class=\"{active: isActive(slide)}\" ng-click=\"select(slide)\"></li>\\n    </ol>\\n    <div class=\"carousel-inner\" ng-transclude></div>\\n    <a class=\"left carousel-control\" ng-click=\"prev()\" ng-show=\"slides.length > 1\"><span class=\"glyphicon glyphicon-chevron-left\"></span></a>\\n    <a class=\"right carousel-control\" ng-click=\"next()\" ng-show=\"slides.length > 1\"><span class=\"glyphicon glyphicon-chevron-right\"></span></a>\\n</div>\\n')}]),angular.module(\"template/carousel/slide.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/carousel/slide.html\",\"<div ng-class=\\\"{\\n    'active': leaving || (active && !entering),\\n    'prev': (next || active) && direction=='prev',\\n    'next': (next || active) && direction=='next',\\n    'right': direction=='prev',\\n    'left': direction=='next'\\n  }\\\" class=\\\"item text-center\\\" ng-transclude></div>\\n\")}]),angular.module(\"template/datepicker/datepicker.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/datepicker/datepicker.html\",'<div ng-switch=\"datepickerMode\" role=\"application\" ng-keydown=\"keydown($event)\">\\n  <daypicker ng-switch-when=\"day\" tabindex=\"0\"></daypicker>\\n  <monthpicker ng-switch-when=\"month\" tabindex=\"0\"></monthpicker>\\n  <yearpicker ng-switch-when=\"year\" tabindex=\"0\"></yearpicker>\\n</div>')}]),angular.module(\"template/datepicker/day.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/datepicker/day.html\",'<table role=\"grid\" aria-labelledby=\"{{uniqueId}}-title\" aria-activedescendant=\"{{activeDateId}}\">\\n  <thead>\\n    <tr>\\n      <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-left\"></i></button></th>\\n      <th colspan=\"{{5 + showWeeks}}\"><button id=\"{{uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm\" ng-click=\"toggleMode()\" tabindex=\"-1\" style=\"width:100%;\"><strong>{{title}}</strong></button></th>\\n      <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-right\"></i></button></th>\\n    </tr>\\n    <tr>\\n      <th ng-show=\"showWeeks\" class=\"text-center\"></th>\\n      <th ng-repeat=\"label in labels track by $index\" class=\"text-center\"><small aria-label=\"{{label.full}}\">{{label.abbr}}</small></th>\\n    </tr>\\n  </thead>\\n  <tbody>\\n    <tr ng-repeat=\"row in rows track by $index\">\\n      <td ng-show=\"showWeeks\" class=\"text-center h6\"><em>{{ weekNumbers[$index] }}</em></td>\\n      <td ng-repeat=\"dt in row track by dt.date\" class=\"text-center\" role=\"gridcell\" id=\"{{dt.uid}}\" aria-disabled=\"{{!!dt.disabled}}\">\\n        <button type=\"button\" style=\"width:100%;\" class=\"btn btn-default btn-sm\" ng-class=\"{\\'btn-info\\': dt.selected, active: isActive(dt)}\" ng-click=\"select(dt.date)\" ng-disabled=\"dt.disabled\" tabindex=\"-1\"><span ng-class=\"{\\'text-muted\\': dt.secondary, \\'text-info\\': dt.current}\">{{dt.label}}</span></button>\\n      </td>\\n    </tr>\\n  </tbody>\\n</table>\\n')}]),angular.module(\"template/datepicker/month.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/datepicker/month.html\",'<table role=\"grid\" aria-labelledby=\"{{uniqueId}}-title\" aria-activedescendant=\"{{activeDateId}}\">\\n  <thead>\\n    <tr>\\n      <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-left\"></i></button></th>\\n      <th><button id=\"{{uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm\" ng-click=\"toggleMode()\" tabindex=\"-1\" style=\"width:100%;\"><strong>{{title}}</strong></button></th>\\n      <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-right\"></i></button></th>\\n    </tr>\\n  </thead>\\n  <tbody>\\n    <tr ng-repeat=\"row in rows track by $index\">\\n      <td ng-repeat=\"dt in row track by dt.date\" class=\"text-center\" role=\"gridcell\" id=\"{{dt.uid}}\" aria-disabled=\"{{!!dt.disabled}}\">\\n        <button type=\"button\" style=\"width:100%;\" class=\"btn btn-default\" ng-class=\"{\\'btn-info\\': dt.selected, active: isActive(dt)}\" ng-click=\"select(dt.date)\" ng-disabled=\"dt.disabled\" tabindex=\"-1\"><span ng-class=\"{\\'text-info\\': dt.current}\">{{dt.label}}</span></button>\\n      </td>\\n    </tr>\\n  </tbody>\\n</table>\\n')}]),angular.module(\"template/datepicker/popup.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/datepicker/popup.html\",'<ul class=\"dropdown-menu\" ng-style=\"{display: (isOpen && \\'block\\') || \\'none\\', top: position.top+\\'px\\', left: position.left+\\'px\\'}\" ng-keydown=\"keydown($event)\">\\n\t<li ng-transclude></li>\\n\t<li ng-if=\"showButtonBar\" style=\"padding:10px 9px 2px\">\\n\t\t<span class=\"btn-group pull-left\">\\n\t\t\t<button type=\"button\" class=\"btn btn-sm btn-info\" ng-click=\"select(\\'today\\')\">{{ getText(\\'current\\') }}</button>\\n\t\t\t<button type=\"button\" class=\"btn btn-sm btn-danger\" ng-click=\"select(null)\">{{ getText(\\'clear\\') }}</button>\\n\t\t</span>\\n\t\t<button type=\"button\" class=\"btn btn-sm btn-success pull-right\" ng-click=\"close()\">{{ getText(\\'close\\') }}</button>\\n\t</li>\\n</ul>\\n')}]),angular.module(\"template/datepicker/year.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/datepicker/year.html\",'<table role=\"grid\" aria-labelledby=\"{{uniqueId}}-title\" aria-activedescendant=\"{{activeDateId}}\">\\n  <thead>\\n    <tr>\\n      <th><button type=\"button\" class=\"btn btn-default btn-sm pull-left\" ng-click=\"move(-1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-left\"></i></button></th>\\n      <th colspan=\"3\"><button id=\"{{uniqueId}}-title\" role=\"heading\" aria-live=\"assertive\" aria-atomic=\"true\" type=\"button\" class=\"btn btn-default btn-sm\" ng-click=\"toggleMode()\" tabindex=\"-1\" style=\"width:100%;\"><strong>{{title}}</strong></button></th>\\n      <th><button type=\"button\" class=\"btn btn-default btn-sm pull-right\" ng-click=\"move(1)\" tabindex=\"-1\"><i class=\"glyphicon glyphicon-chevron-right\"></i></button></th>\\n    </tr>\\n  </thead>\\n  <tbody>\\n    <tr ng-repeat=\"row in rows track by $index\">\\n      <td ng-repeat=\"dt in row track by dt.date\" class=\"text-center\" role=\"gridcell\" id=\"{{dt.uid}}\" aria-disabled=\"{{!!dt.disabled}}\">\\n        <button type=\"button\" style=\"width:100%;\" class=\"btn btn-default\" ng-class=\"{\\'btn-info\\': dt.selected, active: isActive(dt)}\" ng-click=\"select(dt.date)\" ng-disabled=\"dt.disabled\" tabindex=\"-1\"><span ng-class=\"{\\'text-info\\': dt.current}\">{{dt.label}}</span></button>\\n      </td>\\n    </tr>\\n  </tbody>\\n</table>\\n')}]),angular.module(\"template/modal/backdrop.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/modal/backdrop.html\",'<div class=\"modal-backdrop fade {{ backdropClass }}\"\\n     ng-class=\"{in: animate}\"\\n     ng-style=\"{\\'z-index\\': 1040 + (index && 1 || 0) + index*10}\"\\n></div>\\n')}]),angular.module(\"template/modal/window.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/modal/window.html\",'<div tabindex=\"-1\" role=\"dialog\" class=\"modal fade\" ng-class=\"{in: animate}\" ng-style=\"{\\'z-index\\': 1050 + index*10, display: \\'block\\'}\" ng-click=\"close($event)\">\\n    <div class=\"modal-dialog\" ng-class=\"{\\'modal-sm\\': size == \\'sm\\', \\'modal-lg\\': size == \\'lg\\'}\"><div class=\"modal-content\" modal-transclude></div></div>\\n</div>')}]),angular.module(\"template/pagination/pager.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/pagination/pager.html\",'<ul class=\"pager\">\\n  <li ng-class=\"{disabled: noPrevious(), previous: align}\"><a href ng-click=\"selectPage(page - 1)\">{{getText(\\'previous\\')}}</a></li>\\n  <li ng-class=\"{disabled: noNext(), next: align}\"><a href ng-click=\"selectPage(page + 1)\">{{getText(\\'next\\')}}</a></li>\\n</ul>')}]),angular.module(\"template/pagination/pagination.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/pagination/pagination.html\",'<ul class=\"pagination\">\\n  <li ng-if=\"boundaryLinks\" ng-class=\"{disabled: noPrevious()}\"><a href ng-click=\"selectPage(1)\">{{getText(\\'first\\')}}</a></li>\\n  <li ng-if=\"directionLinks\" ng-class=\"{disabled: noPrevious()}\"><a href ng-click=\"selectPage(page - 1)\">{{getText(\\'previous\\')}}</a></li>\\n  <li ng-repeat=\"page in pages track by $index\" ng-class=\"{active: page.active}\"><a href ng-click=\"selectPage(page.number)\">{{page.text}}</a></li>\\n  <li ng-if=\"directionLinks\" ng-class=\"{disabled: noNext()}\"><a href ng-click=\"selectPage(page + 1)\">{{getText(\\'next\\')}}</a></li>\\n  <li ng-if=\"boundaryLinks\" ng-class=\"{disabled: noNext()}\"><a href ng-click=\"selectPage(totalPages)\">{{getText(\\'last\\')}}</a></li>\\n</ul>')}]),angular.module(\"template/tooltip/tooltip-html-unsafe-popup.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/tooltip/tooltip-html-unsafe-popup.html\",'<div class=\"tooltip {{placement}}\" ng-class=\"{ in: isOpen(), fade: animation() }\">\\n  <div class=\"tooltip-arrow\"></div>\\n  <div class=\"tooltip-inner\" bind-html-unsafe=\"content\"></div>\\n</div>\\n')}]),angular.module(\"template/tooltip/tooltip-popup.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/tooltip/tooltip-popup.html\",'<div class=\"tooltip {{placement}}\" ng-class=\"{ in: isOpen(), fade: animation() }\">\\n  <div class=\"tooltip-arrow\"></div>\\n  <div class=\"tooltip-inner\" ng-bind=\"content\"></div>\\n</div>\\n')}]),angular.module(\"template/popover/popover.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/popover/popover.html\",'<div class=\"popover {{placement}}\" ng-class=\"{ in: isOpen(), fade: animation() }\">\\n  <div class=\"arrow\"></div>\\n\\n  <div class=\"popover-inner\">\\n      <h3 class=\"popover-title\" ng-bind=\"title\" ng-show=\"title\"></h3>\\n      <div class=\"popover-content\" ng-bind=\"content\"></div>\\n  </div>\\n</div>\\n')}]),angular.module(\"template/progressbar/bar.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/progressbar/bar.html\",'<div class=\"progress-bar\" ng-class=\"type && \\'progress-bar-\\' + type\" role=\"progressbar\" aria-valuenow=\"{{value}}\" aria-valuemin=\"0\" aria-valuemax=\"{{max}}\" ng-style=\"{width: percent + \\'%\\'}\" aria-valuetext=\"{{percent | number:0}}%\" ng-transclude></div>')}]),angular.module(\"template/progressbar/progress.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/progressbar/progress.html\",'<div class=\"progress\" ng-transclude></div>')}]),angular.module(\"template/progressbar/progressbar.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/progressbar/progressbar.html\",'<div class=\"progress\">\\n  <div class=\"progress-bar\" ng-class=\"type && \\'progress-bar-\\' + type\" role=\"progressbar\" aria-valuenow=\"{{value}}\" aria-valuemin=\"0\" aria-valuemax=\"{{max}}\" ng-style=\"{width: percent + \\'%\\'}\" aria-valuetext=\"{{percent | number:0}}%\" ng-transclude></div>\\n</div>')}]),angular.module(\"template/rating/rating.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/rating/rating.html\",'<span ng-mouseleave=\"reset()\" ng-keydown=\"onKeydown($event)\" tabindex=\"0\" role=\"slider\" aria-valuemin=\"0\" aria-valuemax=\"{{range.length}}\" aria-valuenow=\"{{value}}\">\\n    <i ng-repeat=\"r in range track by $index\" ng-mouseenter=\"enter($index + 1)\" ng-click=\"rate($index + 1)\" class=\"glyphicon\" ng-class=\"$index < value && (r.stateOn || \\'glyphicon-star\\') || (r.stateOff || \\'glyphicon-star-empty\\')\">\\n        <span class=\"sr-only\">({{ $index < value ? \\'*\\' : \\' \\' }})</span>\\n    </i>\\n</span>')}]),angular.module(\"template/tabs/tab.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/tabs/tab.html\",'<li ng-class=\"{active: active, disabled: disabled}\">\\n  <a href ng-click=\"select()\" tab-heading-transclude>{{heading}}</a>\\n</li>\\n')}]),angular.module(\"template/tabs/tabset.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/tabs/tabset.html\",'<div>\\n  <ul class=\"nav nav-{{type || \\'tabs\\'}}\" ng-class=\"{\\'nav-stacked\\': vertical, \\'nav-justified\\': justified}\" ng-transclude></ul>\\n  <div class=\"tab-content\">\\n    <div class=\"tab-pane\" \\n         ng-repeat=\"tab in tabs\" \\n         ng-class=\"{active: tab.active}\"\\n         tab-content-transclude=\"tab\">\\n    </div>\\n  </div>\\n</div>\\n')}]),angular.module(\"template/timepicker/timepicker.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/timepicker/timepicker.html\",'<table>\\n\t<tbody>\\n\t\t<tr class=\"text-center\">\\n\t\t\t<td><a ng-click=\"incrementHours()\" class=\"btn btn-link\"><span class=\"glyphicon glyphicon-chevron-up\"></span></a></td>\\n\t\t\t<td>&nbsp;</td>\\n\t\t\t<td><a ng-click=\"incrementMinutes()\" class=\"btn btn-link\"><span class=\"glyphicon glyphicon-chevron-up\"></span></a></td>\\n\t\t\t<td ng-show=\"showMeridian\"></td>\\n\t\t</tr>\\n\t\t<tr>\\n\t\t\t<td style=\"width:50px;\" class=\"form-group\" ng-class=\"{\\'has-error\\': invalidHours}\">\\n\t\t\t\t<input type=\"text\" ng-model=\"hours\" ng-change=\"updateHours()\" class=\"form-control text-center\" ng-mousewheel=\"incrementHours()\" ng-readonly=\"readonlyInput\" maxlength=\"2\">\\n\t\t\t</td>\\n\t\t\t<td>:</td>\\n\t\t\t<td style=\"width:50px;\" class=\"form-group\" ng-class=\"{\\'has-error\\': invalidMinutes}\">\\n\t\t\t\t<input type=\"text\" ng-model=\"minutes\" ng-change=\"updateMinutes()\" class=\"form-control text-center\" ng-readonly=\"readonlyInput\" maxlength=\"2\">\\n\t\t\t</td>\\n\t\t\t<td ng-show=\"showMeridian\"><button type=\"button\" class=\"btn btn-default text-center\" ng-click=\"toggleMeridian()\">{{meridian}}</button></td>\\n\t\t</tr>\\n\t\t<tr class=\"text-center\">\\n\t\t\t<td><a ng-click=\"decrementHours()\" class=\"btn btn-link\"><span class=\"glyphicon glyphicon-chevron-down\"></span></a></td>\\n\t\t\t<td>&nbsp;</td>\\n\t\t\t<td><a ng-click=\"decrementMinutes()\" class=\"btn btn-link\"><span class=\"glyphicon glyphicon-chevron-down\"></span></a></td>\\n\t\t\t<td ng-show=\"showMeridian\"></td>\\n\t\t</tr>\\n\t</tbody>\\n</table>\\n')}]),angular.module(\"template/typeahead/typeahead-match.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/typeahead/typeahead-match.html\",'<a tabindex=\"-1\" bind-html-unsafe=\"match.label | typeaheadHighlight:query\"></a>')\n}]),angular.module(\"template/typeahead/typeahead-popup.html\",[]).run([\"$templateCache\",function(a){a.put(\"template/typeahead/typeahead-popup.html\",'<ul class=\"dropdown-menu\" ng-show=\"isOpen()\" ng-style=\"{top: position.top+\\'px\\', left: position.left+\\'px\\'}\" style=\"display: block;\" role=\"listbox\" aria-hidden=\"{{!isOpen()}}\">\\n    <li ng-repeat=\"match in matches track by $index\" ng-class=\"{active: isActive($index) }\" ng-mouseenter=\"selectActive($index)\" ng-click=\"selectMatch($index)\" role=\"option\" id=\"{{match.id}}\">\\n        <div typeahead-match index=\"$index\" match=\"match\" query=\"query\" template-url=\"templateUrl\"></div>\\n    </li>\\n</ul>\\n')}]);","function translateDirective($filter,$interpolate){function link($scope,element,attr){var refresh=function(){var context=$scope.context;context||(context=$scope.$parent.context);var val=translate($scope.translationId,context,$scope.variables);element.html(val)};attr.translateInterpolation&&($scope.interpolation=attr.translateInterpolation),attr.$observe(\"translate\",function(translationId){angular.equals(translationId,\"\")||void 0===translationId?$scope.translationId=$interpolate(element.text().replace(/^\\s+|\\s+$/g,\"\"))($scope.$parent):$scope.translationId=translationId}),attr.$observe(\"translateContext\",function(context){$scope.context=context}),attr.$observe(\"translateValues\",function(variables){$scope.variables=variables}),$scope.$on(\"$translateLangageChanged\",function(){refresh()}),$scope.$on(\"$translateChange\",function(){refresh()}),$scope.$watch(\"translationId + interpolateParams\",function(nValue){nValue&&refresh()})}var translate=$filter(\"translate\");return{link:link,restrict:\"AE\",scope:!0}}function translateCloakDirective($filter,$interpolate){function link($scope,element,attr){attr.$observe(\"translateContext\",function(context){$scope.context=context}),$scope.$on(\"$translateLangageChanged\",function(){}),$scope.$on(\"$translateChange\",function(){}),$scope.$watch(\"translationId + interpolateParams\",function(nValue){})}return{link:link,restrict:\"AE\",scope:!0}}!function(window){\"use strict\";angular.module(\"tmh.dynamicLocale\",[]).config([\"$provide\",function($provide){function makeStateful($delegate){return $delegate.$stateful=!0,$delegate}$provide.decorator(\"dateFilter\",[\"$delegate\",makeStateful]),$provide.decorator(\"numberFilter\",[\"$delegate\",makeStateful]),$provide.decorator(\"currencyFilter\",[\"$delegate\",makeStateful])}]).constant(\"tmhDynamicLocale.STORAGE_KEY\",\"tmhDynamicLocale.locale\").provider(\"tmhDynamicLocale\",[\"tmhDynamicLocale.STORAGE_KEY\",function(STORAGE_KEY){function loadScript(url,callback,errorCallback,$timeout){var script=document.createElement(\"script\"),body=document.getElementsByTagName(\"body\")[0],removed=!1;script.type=\"text/javascript\",script.readyState?script.onreadystatechange=function(){\"complete\"!==script.readyState&&\"loaded\"!==script.readyState||(script.onreadystatechange=null,$timeout(function(){removed||(removed=!0,body.removeChild(script),callback())},30,!1))}:(script.onload=function(){removed||(removed=!0,body.removeChild(script),callback())},script.onerror=function(){removed||(removed=!0,body.removeChild(script),errorCallback())}),script.src=url,script.async=!1,body.appendChild(script)}function loadLocale(localeUrl,$locale,localeId,$rootScope,$q,localeCache,$timeout){function overrideValues(oldObject,newObject){activeLocale===localeId&&(angular.forEach(oldObject,function(value,key){newObject[key]?angular.isArray(newObject[key])&&(oldObject[key].length=newObject[key].length):delete oldObject[key]}),angular.forEach(newObject,function(value,key){angular.isArray(newObject[key])||angular.isObject(newObject[key])?(oldObject[key]||(oldObject[key]=angular.isArray(newObject[key])?[]:{}),overrideValues(oldObject[key],newObject[key])):oldObject[key]=newObject[key]}))}if(promiseCache[localeId])return promiseCache[localeId];var cachedLocale,deferred=$q.defer();return localeId===activeLocale?deferred.resolve($locale):(cachedLocale=localeCache.get(localeId))?(activeLocale=localeId,$rootScope.$evalAsync(function(){overrideValues($locale,cachedLocale),$rootScope.$broadcast(\"$localeChangeSuccess\",localeId,$locale),storage.put(storageKey,localeId),deferred.resolve($locale)})):(activeLocale=localeId,promiseCache[localeId]=deferred.promise,loadScript(localeUrl,function(){var localInjector=angular.injector([\"ngLocale\"]),externalLocale=localInjector.get(\"$locale\");overrideValues($locale,externalLocale),localeCache.put(localeId,externalLocale),delete promiseCache[localeId],$rootScope.$apply(function(){$rootScope.$broadcast(\"$localeChangeSuccess\",localeId,$locale),storage.put(storageKey,localeId),deferred.resolve($locale)})},function(){delete promiseCache[localeId],$rootScope.$apply(function(){activeLocale===localeId&&(activeLocale=$locale.id),$rootScope.$broadcast(\"$localeChangeError\",localeId),deferred.reject(localeId)})},$timeout)),deferred.promise}var defaultLocale,storage,activeLocale,localeLocationPattern=\"js/i18n/angular-locale_{{locale}}.js\",storageFactory=\"tmhDynamicLocaleStorageCache\",storageKey=STORAGE_KEY,promiseCache={};this.localeLocationPattern=function(value){return value?(localeLocationPattern=value,this):localeLocationPattern},this.useStorage=function(storageName){storageFactory=storageName},this.useCookieStorage=function(){this.useStorage(\"$cookieStore\")},this.defaultLocale=function(value){defaultLocale=value},this.storageKey=function(value){return value?(storageKey=value,this):storageKey},this.$get=[\"$rootScope\",\"$injector\",\"$interpolate\",\"$locale\",\"$q\",\"tmhDynamicLocaleCache\",\"$timeout\",function($rootScope,$injector,interpolate,locale,$q,tmhDynamicLocaleCache,$timeout){var localeLocation=interpolate(localeLocationPattern);return storage=$injector.get(storageFactory),$rootScope.$evalAsync(function(){var initialLocale;(initialLocale=storage.get(storageKey)||defaultLocale)&&loadLocale(localeLocation({locale:initialLocale}),locale,initialLocale,$rootScope,$q,tmhDynamicLocaleCache,$timeout)}),{set:function(value){return loadLocale(localeLocation({locale:value}),locale,value,$rootScope,$q,tmhDynamicLocaleCache,$timeout)},get:function(){return activeLocale}}}]}]).provider(\"tmhDynamicLocaleCache\",function(){this.$get=[\"$cacheFactory\",function($cacheFactory){return $cacheFactory(\"tmh.dynamicLocales\")}]}).provider(\"tmhDynamicLocaleStorageCache\",function(){this.$get=[\"$cacheFactory\",function($cacheFactory){return $cacheFactory(\"tmh.dynamicLocales.store\")}]}).run([\"tmhDynamicLocale\",angular.noop])}(window);var cr;!function(cr){var translation;!function(translation){translation.translateModule=angular.module(\"cr.translation\",[\"cr.common\",\"ngCookies\",\"tmh.dynamicLocale\",\"xeditable\",\"angularFileUpload\"])}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var cr;!function(cr){var translation;!function(translation){var limitWithDotsFilter=function(){function limitWithDotsFilter(){}return limitWithDotsFilter.create=function(){return function(value,max){if(!value)return\"\";if(max=parseInt(max,10),!max)return value;if(value.length<=max)return value;value=value.substr(0,max);var lastspace=value.lastIndexOf(\" \");return lastspace!=-1&&(value=value.substr(0,lastspace)),value+\"...\"}},limitWithDotsFilter}();translation.translateModule.filter(\"limitWithDots\",[limitWithDotsFilter.create])}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var cr;!function(cr){var translation;!function(translation){var translateCondFilter=function(){function translateCondFilter(){}return translateCondFilter.create=function($parse,$translateService){return function(labelName,contextName,variables){angular.isObject(variables)||(variables=$parse(variables)()),!contextName&&variables&&(contextName=variables.context),contextName||(contextName=\"Default\");var transService=$translateService.getTranslation(contextName,null);return transService.GetCondStringValue(labelName,variables)}},translateCondFilter}();translation.translateModule.filter(\"translate_cond\",[\"$parse\",\"$translateService\",translateCondFilter.create]),translation.translateModule.filter(\"tc\",[\"$parse\",\"$translateService\",translateCondFilter.create]),translation.translateModule.filter(\"sanitize\",[\"$sce\",function($sce){return function(htmlCode){return $sce.trustAsHtml(htmlCode)}}])}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var cr;!function(cr){var translation;!function(translation){var translateFilter=function(){function translateFilter(){}return translateFilter.create=function($parse,$translateService){return function(labelName,contextName,variables){angular.isObject(variables)||(variables=$parse(variables)()),!contextName&&variables&&(contextName=variables.context),contextName||(contextName=\"Default\");var transService=$translateService.getTranslation(contextName,null);return transService.GetStringValue(labelName,variables)}},translateFilter}();translation.translateModule.filter(\"translate\",[\"$parse\",\"$translateService\",translateFilter.create]),translation.translateModule.filter(\"t\",[\"$parse\",\"$translateService\",translateFilter.create])}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var cr;!function(cr){var translation;!function(translation){var currentLangage=function(){function currentLangage($log,cookies,$rootScope,crHttpHeaderService){var _this=this;this.cookies=cookies,this.$rootScope=$rootScope,this.crHttpHeaderService=crHttpHeaderService,this.Langage=function(langage){if(!langage){var toRet=_this.cookies.Langage;return toRet||(toRet=\"FR\"),toRet}return langage=langage.toUpperCase(),_this.cookies.Langage=langage,_this.crHttpHeaderService.headers.Langage=langage,_this.$rootScope.$broadcast(\"$translateLangageChanged\"),_this.$log.info(\"uselangage: \"+langage),langage},this.$log=$log.getInstance(\"currentLangage\"),crHttpHeaderService.headers.Langage=this.cookies.Langage}return currentLangage}();translation.translateModule.factory(\"currentLangage\",[\"$log\",\"$cookies\",\"$rootScope\",\"crHttpHeaderService\",function($log,cookies,$rootScope,crHttpHeaderService){return new currentLangage($log,cookies,$rootScope,crHttpHeaderService)}])}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var cr;!function(cr){var translation;!function(translation){var translationResolutionDetail=function(){function translationResolutionDetail(contextName,langage,label,value,translated){this.LabelName=label,this.RequestContextName=contextName,this.RequestLangage=langage,this.TranslationValue=value,this.Translated=translated}return translationResolutionDetail}(),TranslationLogger=function(){function TranslationLogger($rootScope,$log){var _this=this;this.$rootScope=$rootScope,this.$log=$log,this.enabled=!1,this.resolutionDetailLog=[],this.resolutionDetailKeys={},this.Clear=function(){_this.resolutionDetailLog=[],_this.resolutionDetailKeys={}},$rootScope.$on(\"$translateLangageChanged\",function(){_this.$log.debug(\"langage changed!\"),_this.Clear()}),$rootScope.$on(\"$translateChange\",function(){_this.Clear()}),$rootScope.$on(\"$stateChangeSuccess\",function(){_this.$log.debug(\"route changed!\"),_this.Clear()})}return TranslationLogger.prototype.Enabled=function(enabled){return angular.isDefined(enabled)&&enabled!=this.enabled&&(this.enabled=enabled,enabled?this.$rootScope.$broadcast(\"$translateChange\"):(this.resolutionDetailLog=[],this.resolutionDetailKeys={})),this.enabled},TranslationLogger.prototype.Log=function(contextName,langage,label,value){if(this.enabled&&angular.isDefined(contextName)){var key=contextName+\"_\"+langage+\"_\"+label;key in this.resolutionDetailKeys?this.resolutionDetailKeys[key]++:(this.resolutionDetailKeys[key]=1,this.resolutionDetailLog.push(new translationResolutionDetail(contextName,langage,label,value,label!=value&&\"\"!=value&&null!=value)))}return this.resolutionDetailLog},TranslationLogger}();translation.translateModule.factory(\"$translationLogger\",[\"$rootScope\",\"$log\",function($rootScope,$log){return new TranslationLogger($rootScope,$log)}])}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var __extends=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},cr;!function(cr){var translation;!function(translation){var translationCompiledContextReference=function(){function translationCompiledContextReference(contextName,langage,lastUpdateDateTime){this.Langage=langage,this.LastUpdateDateTime=lastUpdateDateTime,this.ContextName=contextName}return translationCompiledContextReference}(),translationCompiledContext=function(_super){function translationCompiledContext(contextName,langage,lastUpdateDateTime,labels){_super.call(this,contextName,langage,lastUpdateDateTime),this.Labels={},this.Labels=labels}return __extends(translationCompiledContext,_super),translationCompiledContext}(translationCompiledContextReference),Translation=function(_super){function Translation(logger,contextName,langage,fromDate,$interpolate){_super.call(this,contextName,langage,fromDate,null),this.$interpolate=$interpolate,this.Loading=!1,this.Loading=!0,this.Version=\"0\",this.Logger=logger}return __extends(Translation,_super),Translation.prototype.GetCondStringValue=function(label,variables){return label?\"#\"===label.substring(0,1)?(label=label.substring(1),this.GetStringValue(label,variables)):this.$interpolate(label)(variables):null},Translation.prototype.GetStringValue=function(label,variables){if(!label)return null;if(this.Labels){var val=null;return label in this.Labels&&(val=this.Labels[label]),this.Logger.Log(this.ContextName,this.Langage,label,val),val=this.$interpolate(null==val?label:val)(variables)}return\"...\"},Translation}(translationCompiledContext),translateService=function(){function translateService(translationLogger,$rootScope,$q,$http,cfg,$log,$interpolate,currentLangage){var _this=this;this.translationLogger=translationLogger,this.$rootScope=$rootScope,this.$q=$q,this.$http=$http,this.cfg=cfg,this.$log=$log,this.$interpolate=$interpolate,this.currentLangage=currentLangage,this.version=\"0\",this.cache={},this._logging=!1,this.getCompiledContext=function(references){var link=(_this.cfg.TranslationApiUrl?_this.cfg.WebApiUrl+_this.cfg.TranslationApiUrl:_this.cfg.WebApiUrl+\"translation/getcompiled\")+\"?minVersion=\"+_this.version,deferred=_this.$q.defer();return _this.$http.post(link,angular.toJson(references)).then(function(result){_this.version=result.data.Version,deferred.resolve(result.data)},function(error){deferred.reject(error)}),deferred.promise},this.update=function(operations){var link=_this.cfg.WebApiUrl+\"translation/update\",deferred=_this.$q.defer();return _this.$http.post(link,operations).then(function(result){_this.version=result.data.Version,_this.$rootScope.$broadcast(\"$translateChange\"),deferred.resolve(result.data)},function(error){deferred.reject(error)}),deferred.promise},this[\"export\"]=function(contexts){var link=this.cfg.WebApiUrl+\"translation/export/\"+contexts;this.$log.info(\"exporting translations: \"+link),window.location.href=link},this.getLabel=function(labelName,context,langage){var link=_this.cfg.WebApiUrl+\"translation/label/\"+context+\"/\"+labelName+\"?langage=\"+langage+\"&minVersion=\"+_this.version;_this.$log.info(\"Loading label: \"+link);var deferred=_this.$q.defer();return _this.$http.get(link).then(function(result){_this.version=result.data.Version,deferred.resolve(result.data)},function(error){deferred.reject(error)}),deferred.promise},this.getTranslation=function(context,langage){langage||(langage=_this.currentLangage.Langage());var key=context+\"_\"+langage,refresh=!1,toRet=null;return key in _this.cache?(toRet=_this.cache[key],!toRet.Loading&&toRet.Version<_this.version&&(refresh=!0)):(refresh=!0,toRet=new Translation(_this.translationLogger,context,langage,null,_this.$interpolate),_this.cache[key]=toRet),refresh&&_this.LoadTranslation(toRet),toRet},this.debounce=function(func,wait,immediate){var timeout;return function(){var _this=this,context=this,args=arguments;clearTimeout(timeout),timeout=setTimeout(function(){timeout=null,immediate||func.apply(_this,args)},wait),immediate&&!timeout&&func.apply(context,args)}},this.contextToLoad={}}return translateService.prototype.LoadTranslation=function(toLoad){var _this=this,key=toLoad.ContextName+\"_\"+toLoad.Langage;toLoad.Loading=!0,this.ensureTranslationDebounceFn||(this.ensureTranslationDebounceFn=this.debounce(function(){var referencesToLoad=[];for(var k in _this.contextToLoad){var trans=_this.contextToLoad[k];referencesToLoad.push(new translationCompiledContextReference(trans.ContextName,trans.Langage,trans.LastUpdateDateTime))}_this.contextToLoad={},_this.getCompiledContext(referencesToLoad).then(function(data){for(var updates=!1,i=0;i<data.CompiledContextList.length;){var compiledContext=data.CompiledContextList[i],curKey=compiledContext.ContextName+\"_\"+compiledContext.Langage,curTrans=_this.cache[curKey];curTrans.Version=data.Version,curTrans.LastUpdateDateTime=compiledContext.LastUpdateDateTime,curTrans.Loading=!1,compiledContext.Labels&&(updates=!0,curTrans.Labels=compiledContext.Labels),i++}updates&&_this.$rootScope.$broadcast(\"$translateChange\")},function(error){_this.$log.log(\"Error: \"+angular.toJson(error))})},200)),key in this.contextToLoad||(this.contextToLoad[key]=toLoad,this.ensureTranslationDebounceFn())},translateService}();translation.translateModule.factory(\"$translateService\",[\"$translationLogger\",\"$rootScope\",\"$q\",\"$http\",\"cfg\",\"$log\",\"$interpolate\",\"currentLangage\",function($translationLogger,$rootScope,$q,$http,cfg,$log,$interpolate,currentLangage){return new translateService($translationLogger,$rootScope,$q,$http,cfg,$log.getInstance(\"TranslateService\"),$interpolate,currentLangage)}])}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var cr;!function(cr){var translation;!function(translation){function translationContextLoaderFactory(){return[\"$injector\",\"$interval\",\"$log\",function($injector,$interval,$log){return new translationContextLoader($injector,$interval,$log.getInstance(\"ContextLoader\"))}]}translation.translationContextLoaderFactory=translationContextLoaderFactory;var translationContextLoader=function(){function translationContextLoader($injector,$interval,$log){this.$injector=$injector,this.$log=$log,this.requestedContexts=[],this.loadHistory={}}return translationContextLoader.prototype.loadMissingContexts=function(){},translationContextLoader.prototype.requireContext=function(context,language){this.requestedContexts.push({context:context,language:language})},translationContextLoader}()}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var cr;!function(cr){var translation;!function(translation){var translateAdminController=function(){function translateAdminController(promiseTracker,$scope,translationLogger,translateService,$modal,notificationService,upload,cfg){var _this=this;this.$scope=$scope,this.translationLogger=translationLogger,this.translateService=translateService,this.$modal=$modal,this.notificationService=notificationService,this.upload=upload,this.cfg=cfg,this[\"export\"]=function(context){if(void 0==context){for(var contexts=new Array,counter=0;counter<_this.$scope.Log.length;counter++){var item=_this.$scope.Log[counter];contexts.indexOf(item.RequestContextName)<=-1&&contexts.push(item.RequestContextName)}var contextString=contexts.join();_this.translateService[\"export\"](contextString)}else _this.translateService[\"export\"](context)},this.getTranslationClass=function(item){return item.Translated?\"translated\":\"warning\"},this.setLabel=function(data){_this.$scope.currentLabel=data,_this.$scope.labelName=data.LabelName,_this.$scope.activeLangage=data.RequestLangage,_this.$scope.tabs=[],_this.$scope.tabs.activeTab=0;for(var contextKey in data.Translations){var context=data.Translations[contextKey];context.ContextName==data.ResolutionContextName&&(_this.$scope.tabs.activeTab=_this.$scope.tabs.length),_this.$scope.tabs.push({title:context.ContextName,context:context})}},this.changeLabel=function(labelName){_this.translateService.getLabel(labelName,_this.$scope.currentItem.RequestContextName,_this.$scope.currentItem.RequestLangage).then(function(data){_this.setLabel(data),console.log(\"changelabel succeeded\"+angular.toJson(data))},function(error){})},this.tracker=promiseTracker(),$scope.enableTranslations=cfg.EnableTranslations,$scope.translationLogger=translationLogger,$scope.uploading=!1,$scope.uploadPercentage=0,$scope.tracker=this.tracker,$scope.Log=translationLogger.Log(),$scope.changeLabel=function(name){return _this.changeLabel(name)},$scope.$watch(function(){return translationLogger.Enabled()},function(value){$scope.Enabled=value}),$scope.$watchCollection(function(){return translationLogger.Log()},function(newCollection,oldCollection){$scope.Log=translationLogger.Log(),$scope.Cleaned=_.groupBy($scope.Log,\"RequestContextName\")}),$scope.SetEnabled=function(enabled){_this.translationLogger.Enabled(enabled)},$scope.GetLog=function(){var log=_this.translationLogger.Log();return log},$scope.save=function(){var toSave=[];for(var ctxKey in $scope.currentLabel.Translations){var ctx=$scope.currentLabel.Translations[ctxKey];toSave.push({ContextName:ctx.ContextName,ParentContext:ctx.ParentContextName,HubLangage:ctx.HubLangage,Translations:[{LabelName:$scope.currentLabel.LabelName,TranslationValues:ctx.TranslationValues}]})}console.log(\"Update: \"+angular.toJson(toSave)),_this.tracker.addPromise(_this.translateService.update(toSave).then(function(data){console.log(\"Reply: \"+angular.toJson(data)),_this._modal.close(data),notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"Updated!\")},function(error){notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,angular.toJson(error))}))},$scope[\"export\"]=function(context){return _this[\"export\"](context)},$scope.getTranslationClass=function(item){return _this.getTranslationClass(item)},$scope.onFileSelect=function($files){for(var i=0;i<$files.length;i++){var file=$files[i];$scope.upload=upload.upload({url:cfg.WebApiUrl+\"translation/import\",method:\"POST\",file:file}).progress(function(evt){$scope.uploading=!0,$scope.uploadPercentage=100*parseInt(evt.loaded)/parseInt(evt.total)}).success(function(data,status,headers,config){alert(data+\" Labels updated\"),console.log(\"Translation upload > \"+angular.toJson(data)),notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"Updated!\")},function(error){notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,angular.toJson(error))})}},$scope.open=function(item){$scope.currentItem=item,translateService.getLabel(item.LabelName,item.RequestContextName,item.RequestLangage).then(function(data){_this.setLabel(data),console.log(angular.toJson(data)),_this._modal=$modal.open({scope:$scope,size:\"lg\",templateUrl:\"modules/translation/templates/editlabel.html\",show:!0})})}}return translateAdminController}();translation.translateModule.controller(\"translateAdminController\",[\"promiseTracker\",\"$scope\",\"$translationLogger\",\"$translateService\",\"$modal\",\"notificationService\",\"$upload\",\"cfg\",translateAdminController])}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var cr;!function(cr){var translation;!function(translation){var TranslationInputController=function(){function TranslationInputController($scope,notificationService,translateService,$modal,currentLangage,promiseTracker){var _this=this;this.$scope=$scope,this.notificationService=notificationService,this.translateService=translateService,this.$modal=$modal,this.currentLangage=currentLangage,this.promiseTracker=promiseTracker,this.Mode=function(){return _this._mode},this.CurrentContext=function(){return _this._currentContext},this.SetCurrentContext=function(context){console.log(\"set current context name: \"+context.ContextName),_this._currentContext=context},this.SetCurrentContextIdx=function(idx){_this.SetCurrentContext(_this.$scope.currentLabel.Translations[idx])},this.SetCurrentContextName=function(contextName){var ctx=_.findWhere(_this.$scope.currentLabel.Translations,{ContextName:contextName});ctx?_this.SetCurrentContext(ctx):_this.SetCurrentContextIdx(0)},this.EditLabelName=function(){_this.notificationService.editText(\"#SETLABELNAME\",\"#SETLABELNAMETITLE\",_this.$scope.model).then(function(data){\"OK\"==data.action&&_this.SetLabelName(data.value)})},this.EditHtmlLabel=function(){_this._modal=_this.$modal.open({scope:_this.$scope,size:\"lg\",templateUrl:\"modules/translation/templates/editlabel.html\",show:!0})},this.SetLabel=function(data){console.log(\"SetLabel: \"+angular.toJson(data)),_this.$scope.currentLabel=data,_this.$scope.labelName=data.LabelName,_this.$scope.activeLangage=data.RequestLangage,_this.$scope.tabs=[],_this.$scope.tabs.activeTab=0,_this.SetCurrentContextName(data.RequestContextName);for(var contextKey in data.Translations){var context=data.Translations[contextKey];context.ContextName==data.ResolutionContextName&&(_this.$scope.tabs.activeTab=_this.$scope.tabs.length),_this.$scope.tabs.push({title:context.ContextName,context:context})}},this.SetLabelName=function(labelName){console.log(\"current langage: \"+_this.currentLangage.Langage()+\" / \"+_this.$scope.context),console.log(\"labelName: \"+labelName),_this.$scope.model=labelName,_this.$scope.currentLabel=null,_this.translateService.getLabel(labelName.replace(\"#\",\"\"),_this.$scope.context,_this.currentLangage.Langage()).then(function(data){_this.SetLabel(data)},function(error){})},this.SetCurrentMode=function(mode){switch(mode||(mode=\"Automatic\"),console.log(\"set mode to \"+mode),mode){case\"Text\":case\"Trans\":break;default:mode=\"Text\"}\"Text\"!=mode?_this.$scope.model&&\"\"!=_this.$scope.model?_this.$scope.model.indexOf(\" \")>=0?_this.notificationService.showMessage(\"#INVALIDLABELKEY\",\"#INVALIDLABELKEY_TITLE\",\"*OK\"):(\"#\"!=_this.$scope.model.substr(0,1)&&(_this.$scope.model=\"#\"+_this.$scope.model),_this.$scope.model=_this.$scope.model.toUpperCase(),_this._mode=mode,null==_this.$scope.currentLabel&&_this.SetLabelName(_this.$scope.model)):_this.notificationService.editText(\"#SETTANSLATIONKEYHELP\",\"#SETTANSLATIONKEYTITLE\",_this.$scope.model).then(function(data){console.log(\"editText: \"+angular.toJson(data)),_this.$scope.model=data.value,_this.$scope.model&&\"\"!=_this.$scope.model&&_this.SetCurrentMode(mode)}):(_this.$scope.currentLabel=null,_this._mode=mode)},this.Save=function(){var toSave=[];for(var ctxKey in _this.$scope.currentLabel.Translations){var ctx=_this.$scope.currentLabel.Translations[ctxKey];toSave.push({ContextName:ctx.ContextName,ParentContext:ctx.ParentContextName,HubLangage:ctx.HubLangage,Translations:[{LabelName:_this.$scope.currentLabel.LabelName,TranslationValues:ctx.TranslationValues}]})}console.log(\"Update: \"+angular.toJson(toSave)),_this.tracker.addPromise(_this.translateService.update(toSave).then(function(data){console.log(\"Reply: \"+angular.toJson(data)),_this._modal&&_this._modal.close(data),_this.SetLabelName(_this.$scope.model),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"Updated!\")},function(error){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,angular.toJson(error))}))},this.tracker=promiseTracker(),console.log(\"translation input controller called\"),$scope.save=function(){return _this.Save()}}return TranslationInputController.$inject=[\"$scope\",\"notificationService\",\"$translateService\",\"$modal\",\"currentLangage\",\"promiseTracker\"],TranslationInputController}();translation.translateModule.controller(\"TranslationInputController\",TranslationInputController)}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var cr;!function(cr){var translation;!function(translation){var crTranslationInput=function(){function crTranslationInput(){this.restrict=\"E\",this.scope={model:\"=\",context:\"@\",mode:\"@\"},this.templateUrl=\"modules/translation/templates/translationinput.html\",this.replace=!0,this.controller=\"TranslationInputController\",this.controllerAs=\"ctrl\"}return crTranslationInput.prototype.link=function(scope,elem,attr,ngModel){scope.ctrl.SetCurrentMode(scope.mode)},crTranslationInput}();translation.crTranslationInput=crTranslationInput,translation.translateModule.directive(\"crTranslationInput\",function(){return new crTranslationInput})}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var cr;!function(cr){var translation;!function(translation){}(translation=cr.translation||(cr.translation={}))}(cr||(cr={}));var cr;!function(cr){var translation;!function(translation){translation.translateModule.directive(\"translate\",[\"$filter\",\"$interpolate\",translateDirective]).directive(\"translateCloak\",[\"$filter\",\"$interpolate\",\"$translateService\",translateCloakDirective]).config([\"$sceProvider\",function($sceProvider){}]).run([\"currentLangage\",function(currentLangage){var lng=new RegExp(\"[\\\\?&]lng=([^&#]*)\").exec(window.location.href);null!=lng&&(console.log(\"Set langage from url parameter: \"+lng[1]),currentLangage.Langage(lng[1]))}])}(translation=cr.translation||(cr.translation={}))}(cr||(cr={})),function(module){try{module=angular.module(\"cr.translation\")}catch(err){module=angular.module(\"cr.translation\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/translation/templates/editlabel.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss()\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"modal-title\">Edit Label <a href=\"#\" editable-text=\"labelName\" onaftersave=\"changeLabel(labelName)\">{{ labelName || \\'\\' }}</a></h4></div><form action=\"\" method=\"POST\" id=\"validation-form\" novalidate=\"novalidate\"><div class=\"modal-body\"><tabset type=\"pills\"><tab ng-repeat=\"tab in tabs\" heading=\"{{tab.title}}\" active=\"tab.active\" disabled=\"tab.disabled\"><ng-include src=\"\\'modules/translation/templates/editlabeltab.html\\'\"></ng-include></tab></tabset><div ng-model=\"tabs.activeTab\" bs-tabs=\"tabs\"></div></div><div class=\"modal-footer\"><div class=\"row\"><div class=\"col-xs-6 col-sm-2\"><button class=\"btn btn-info btn-block\" type=\"button\" ng-click=\"export()\"><i class=\"fa fa-fw fa-file\"></i> Export</button></div><div class=\"col-xs-6 col-sm-2 col-sm-offset-6\"><button class=\"btn btn-primary btn-block\" type=\"button\" ng-click=\"save()\" ng-disabled=\"tracker.active()\">Save</button></div><div class=\"col-xs-12 col-sm-2\"><button class=\"btn btn-default btn-block\" type=\"button\" ng-click=\"$dismiss()\">Cancel</button></div></div></div></form>')}])}(),function(module){try{module=angular.module(\"cr.translation\")}catch(err){module=angular.module(\"cr.translation\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/translation/templates/editlabeltab.html\",'<fieldset><div class=\"row\"><div class=\"col-sm-12\"><h3 id=\"form-step-1\">Context detail</h3></div></div><div class=\"row\"><div class=\"col-sm-6\"><div class=\"form-group has-feedback\"><label class=\"control-label\" for=\"inputLastName\">Parent <span></span></label> <input type=\"text\" name=\"last_name\" class=\"form-control\" placeholder=\"\" minlength=\"2\" data-container=\"body\" data-toggle=\"popover\" data-title=\"Something\" ng-model=\"tab.context.ParentContextName\"> <span class=\"form-control-feedback popover-trigger\" data-target=\"#inputLastName\" data-placement=\"top-right\" title=\"Caca\" data-content=\"Super cool\" data-trigger=\"hover\" bs-popover=\"\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block hide\">ParentContext</span></div></div><div class=\"col-sm-6\"><div class=\"form-group has-feedback\"><label class=\"control-label\" for=\"inputLastName\">Hub <span></span></label> <input type=\"text\" name=\"last_name\" class=\"form-control\" id=\"parentContextName\" placeholder=\"\" minlength=\"2\" data-container=\"body\" data-toggle=\"popover\" data-title=\"Something\" ng-model=\"tab.context.HubLangage\"> <span class=\"form-control-feedback popover-trigger\" data-target=\"#inputLastName\" data-placement=\"top-right\" title=\"Caca\" data-content=\"Super cool\" data-trigger=\"hover\" bs-popover=\"\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block hide\">Hublangage</span></div></div></div></fieldset><fieldset><div class=\"row\"><div class=\"col-sm-12\"><h3 id=\"form-step-1\">Translations</h3><div class=\"btn-group\"><label class=\"btn\" ng-model=\"$parent.activeLangage\" btn-radio=\"lng\" ng-class=\"{\\'btn-primary\\': lng==tab.context.HubLangage,\\'btn-default\\':lng!=tab.context.HubLangage}\" ng-repeat=\"lng in currentLabel.LangageList\">{{lng}}</label></div></div></div><div class=\"row\"><div class=\"col-sm-12\"><div class=\"form-group has-feedback\"><label class=\"control-label\" for=\"inputLastName\">{{activeLangage}}<span></span></label> <textarea type=\"text\" name=\"last_name\" class=\"form-control largetextarea\" id=\"inputLastName\" placeholder=\"\" minlength=\"2\" rows=\"10\" data-container=\"body\" data-toggle=\"popover\" data-title=\"Something\" ng-model=\"tab.context.TranslationValues[activeLangage]\"></textarea> <span class=\"form-control-feedback popover-trigger\" data-target=\"#inputLastName\" data-placement=\"top-right\" title=\"Caca\" data-content=\"Super cool\" data-trigger=\"hover\" bs-popover=\"\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block hide\">Veuillez entrer votre nom</span></div>{{tab.context.ResolvedValues[activeLangage]}}<br>{{tab.context.ResolutionContextName}}</div></div></fieldset>');\n}])}(),function(module){try{module=angular.module(\"cr.translation\")}catch(err){module=angular.module(\"cr.translation\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/translation/templates/translateadmin.html\",'<div ng-controller=\"translateAdminController\"><div ng-if=\"enableTranslations\"><div class=\"row\"><div class=\"col-sm-offset-6 col-sm-6\"><ul class=\"list-inline pull-right\" data-group=\"\"><li><div class=\"placeholder\" ng-show=\"Enabled\" ng-file-drop=\"onFileSelect($files)\" ng-file-drag-over-class=\"dragged\">drop files here</div><div class=\"placeholder\" ng-file-drop-available=\"dropSupported=true\" ng-show=\"!dropSupported\">HTML5 Drop File is not supported!</div></li><li><button class=\"btn btn-warning\" ng-click=\"SetEnabled(!Enabled)\">{{Enabled?Log.length:\\'Translations\\'}}</button></li></ul><iframe id=\"hiddenIframe\" src=\"\" style=\"display:none; visibility:hidden;\"></iframe></div></div><div class=\"row\"><div class=\"col-sm-12\"><table class=\"table table-striped\" ng-show=\"Enabled\" ng-repeat=\"(context, groups) in Cleaned\"><thead><tr><th colspan=\"2\" class=\"t20\">{{context}}</th><th><button class=\"btn btn-primary pull-right\" ng-show=\"Enabled\" ng-click=\"export(context)\">Export</button></th></tr></thead><tbody><tr ng-repeat=\"item in groups\" ng-class=\"getTranslationClass(item)\"><th class=\"t20\">{{item.LabelName}}</th><td>{{item.TranslationValue | limitWithDots:100}}</td><td><button class=\"btn btn-edit pull-right\" type=\"button\" ng-click=\"open(item)\">Edit</button></td></tr></tbody></table></div></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.translation\")}catch(err){module=angular.module(\"cr.translation\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/translation/templates/translationinput.html\",'<div><div class=\"input-group\" ng-if=\"ctrl.Mode()==\\'Text\\'\"><span class=\"input-group-btn\"><button type=\"button\" tabindex=\"-1\" ng-click=\"ctrl.SetCurrentMode(\\'Trans\\')\" class=\"btn btn-primary dropdown-toggle\"><span class=\"fa fa-language\" aria-hidden=\"true\"></span></button></span> <input class=\"form-control\" ng-attr-placeholder=\"{{ options.placeholder | tc:formOtions.context }}\" type=\"text\" ng-model=\"$parent.model\"></div><div ng-if=\"ctrl.Mode()==\\'Trans\\'\"><div class=\"input-group\"><span class=\"input-group-btn\"><button type=\"button\" tabindex=\"-1\" ng-click=\"ctrl.SetCurrentMode(\\'Text\\')\" class=\"btn btn-primary dropdown-toggle\"><span class=\"fa fa-file-text-o\" aria-hidden=\"true\"></span></button></span> <a class=\"form-control\" type=\"text\" ng-click=\"ctrl.EditLabelName()\" ng-model=\"$parent.model\">{{ $parent.model }}</a> <span class=\"input-group-btn\" dropdown=\"\"><button type=\"button\" class=\"btn btn-primary dropdown-toggle\" dropdown-toggle=\"\" aria-haspopup=\"true\" aria-expanded=\"false\">{{ ctrl.CurrentContext().ContextName }} <span class=\"caret\"></span></button><ul class=\"dropdown-menu\" role=\"menu\"><li ng-repeat=\"ctx in $parent.currentLabel.Translations\"><a ng-click=\"ctrl.SetCurrentContextIdx($index)\">{{ctx.ContextName}}</a></li></ul></span></div><div class=\"mt10\"></div><div ng-repeat=\"lng in $parent.currentLabel.LangageList\"><div class=\"col-sm-1 text-center\">{{lng}}</div><div class=\"col-sm-11\"><div class=\"form-group has-feedback\"><textarea rows=\"3\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" class=\"form-control\" ng-attr-placeholder=\"{{ctrl.CurrentContext().ResolvedValues[lng]}}\" autocomplete=\"off\" ng-model=\"ctrl.CurrentContext().TranslationValues[lng]\">\\n\\n                    <span class=\"form-control-feedback popover-trigger\" popover=\"Blabla\" popover-append-to-body=\"true\" popover-trigger=\"mouseenter\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span>\\n\\n\\n                </textarea></div></div></div><button class=\"btn btn-default pull-right\" type=\"button\" ng-click=\"ctrl.EditHtmlLabel()\"><span class=\"fa fa-html5\" aria-hidden=\"true\"></span></button> <button class=\"btn btn-success pull-right\" type=\"button\" ng-disabled=\"ctrl.tracker.active()\" ng-click=\"ctrl.Save()\"><span class=\"glyphicon glyphicon-floppy-disk\" aria-hidden=\"true\"></span> {{\\'SAVE\\'|t}}</button><div class=\"clearfix\"></div></div></div>')}])}();\n//# sourceMappingURL=translation.js.map","(function(module) {\ntry { module = angular.module(\"cr.translation\"); }\ncatch(err) { module = angular.module(\"cr.translation\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/translation/templates/editlabel.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss()\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"modal-title\\\">Edit Label <a href=\\\"#\\\" editable-text=\\\"labelName\\\" onaftersave=\\\"changeLabel(labelName)\\\">{{ labelName || '' }}</a></h4></div><form action=\\\"\\\" method=\\\"POST\\\" id=\\\"validation-form\\\" novalidate=\\\"novalidate\\\"><div class=\\\"modal-body\\\"><tabset type=\\\"pills\\\"><tab ng-repeat=\\\"tab in tabs\\\" heading=\\\"{{tab.title}}\\\" active=\\\"tab.active\\\" disabled=\\\"tab.disabled\\\"><ng-include src=\\\"'modules/translation/templates/editlabeltab.html'\\\"></ng-include></tab></tabset><div ng-model=\\\"tabs.activeTab\\\" bs-tabs=\\\"tabs\\\"></div></div><div class=\\\"modal-footer\\\"><div class=\\\"row\\\"><div class=\\\"col-xs-6 col-sm-2\\\"><button class=\\\"btn btn-info btn-block\\\" type=\\\"button\\\" ng-click=\\\"export()\\\"><i class=\\\"fa fa-fw fa-file\\\"></i> Export</button></div><div class=\\\"col-xs-6 col-sm-2 col-sm-offset-6\\\"><button class=\\\"btn btn-primary btn-block\\\" type=\\\"button\\\" ng-click=\\\"save()\\\" ng-disabled=\\\"tracker.active()\\\">Save</button></div><div class=\\\"col-xs-12 col-sm-2\\\"><button class=\\\"btn btn-default btn-block\\\" type=\\\"button\\\" ng-click=\\\"$dismiss()\\\">Cancel</button></div></div></div></form>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.translation\"); }\ncatch(err) { module = angular.module(\"cr.translation\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/translation/templates/editlabeltab.html\",\n    \"<fieldset><div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><h3 id=\\\"form-step-1\\\">Context detail</h3></div></div><div class=\\\"row\\\"><div class=\\\"col-sm-6\\\"><div class=\\\"form-group has-feedback\\\"><label class=\\\"control-label\\\" for=\\\"inputLastName\\\">Parent <span></span></label> <input type=\\\"text\\\" name=\\\"last_name\\\" class=\\\"form-control\\\" placeholder=\\\"\\\" minlength=\\\"2\\\" data-container=\\\"body\\\" data-toggle=\\\"popover\\\" data-title=\\\"Something\\\" ng-model=\\\"tab.context.ParentContextName\\\"> <span class=\\\"form-control-feedback popover-trigger\\\" data-target=\\\"#inputLastName\\\" data-placement=\\\"top-right\\\" title=\\\"Caca\\\" data-content=\\\"Super cool\\\" data-trigger=\\\"hover\\\" bs-popover=\\\"\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block hide\\\">ParentContext</span></div></div><div class=\\\"col-sm-6\\\"><div class=\\\"form-group has-feedback\\\"><label class=\\\"control-label\\\" for=\\\"inputLastName\\\">Hub <span></span></label> <input type=\\\"text\\\" name=\\\"last_name\\\" class=\\\"form-control\\\" id=\\\"parentContextName\\\" placeholder=\\\"\\\" minlength=\\\"2\\\" data-container=\\\"body\\\" data-toggle=\\\"popover\\\" data-title=\\\"Something\\\" ng-model=\\\"tab.context.HubLangage\\\"> <span class=\\\"form-control-feedback popover-trigger\\\" data-target=\\\"#inputLastName\\\" data-placement=\\\"top-right\\\" title=\\\"Caca\\\" data-content=\\\"Super cool\\\" data-trigger=\\\"hover\\\" bs-popover=\\\"\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block hide\\\">Hublangage</span></div></div></div></fieldset><fieldset><div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><h3 id=\\\"form-step-1\\\">Translations</h3><div class=\\\"btn-group\\\"><label class=\\\"btn\\\" ng-model=\\\"$parent.activeLangage\\\" btn-radio=\\\"lng\\\" ng-class=\\\"{'btn-primary': lng==tab.context.HubLangage,'btn-default':lng!=tab.context.HubLangage}\\\" ng-repeat=\\\"lng in currentLabel.LangageList\\\">{{lng}}</label></div></div></div><div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><div class=\\\"form-group has-feedback\\\"><label class=\\\"control-label\\\" for=\\\"inputLastName\\\">{{activeLangage}}<span></span></label> <textarea type=\\\"text\\\" name=\\\"last_name\\\" class=\\\"form-control largetextarea\\\" id=\\\"inputLastName\\\" placeholder=\\\"\\\" minlength=\\\"2\\\" rows=\\\"10\\\" data-container=\\\"body\\\" data-toggle=\\\"popover\\\" data-title=\\\"Something\\\" ng-model=\\\"tab.context.TranslationValues[activeLangage]\\\"></textarea> <span class=\\\"form-control-feedback popover-trigger\\\" data-target=\\\"#inputLastName\\\" data-placement=\\\"top-right\\\" title=\\\"Caca\\\" data-content=\\\"Super cool\\\" data-trigger=\\\"hover\\\" bs-popover=\\\"\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block hide\\\">Veuillez entrer votre nom</span></div>{{tab.context.ResolvedValues[activeLangage]}}<br>{{tab.context.ResolutionContextName}}</div></div></fieldset>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.translation\"); }\ncatch(err) { module = angular.module(\"cr.translation\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/translation/templates/translateadmin.html\",\n    \"<div ng-controller=\\\"translateAdminController\\\"><div ng-if=\\\"enableTranslations\\\"><div class=\\\"row\\\"><div class=\\\"col-sm-offset-6 col-sm-6\\\"><ul class=\\\"list-inline pull-right\\\" data-group=\\\"\\\"><li><div class=\\\"placeholder\\\" ng-show=\\\"Enabled\\\" ng-file-drop=\\\"onFileSelect($files)\\\" ng-file-drag-over-class=\\\"dragged\\\">drop files here</div><div class=\\\"placeholder\\\" ng-file-drop-available=\\\"dropSupported=true\\\" ng-show=\\\"!dropSupported\\\">HTML5 Drop File is not supported!</div></li><li><button class=\\\"btn btn-warning\\\" ng-click=\\\"SetEnabled(!Enabled)\\\">{{Enabled?Log.length:'Translations'}}</button></li></ul><iframe id=\\\"hiddenIframe\\\" src=\\\"\\\" style=\\\"display:none; visibility:hidden;\\\"></iframe></div></div><div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><table class=\\\"table table-striped\\\" ng-show=\\\"Enabled\\\" ng-repeat=\\\"(context, groups) in Cleaned\\\"><thead><tr><th colspan=\\\"2\\\" class=\\\"t20\\\">{{context}}</th><th><button class=\\\"btn btn-primary pull-right\\\" ng-show=\\\"Enabled\\\" ng-click=\\\"export(context)\\\">Export</button></th></tr></thead><tbody><tr ng-repeat=\\\"item in groups\\\" ng-class=\\\"getTranslationClass(item)\\\"><th class=\\\"t20\\\">{{item.LabelName}}</th><td>{{item.TranslationValue | limitWithDots:100}}</td><td><button class=\\\"btn btn-edit pull-right\\\" type=\\\"button\\\" ng-click=\\\"open(item)\\\">Edit</button></td></tr></tbody></table></div></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.translation\"); }\ncatch(err) { module = angular.module(\"cr.translation\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/translation/templates/translationinput.html\",\n    \"<div><div class=\\\"input-group\\\" ng-if=\\\"ctrl.Mode()=='Text'\\\"><span class=\\\"input-group-btn\\\"><button type=\\\"button\\\" tabindex=\\\"-1\\\" ng-click=\\\"ctrl.SetCurrentMode('Trans')\\\" class=\\\"btn btn-primary dropdown-toggle\\\"><span class=\\\"fa fa-language\\\" aria-hidden=\\\"true\\\"></span></button></span> <input class=\\\"form-control\\\" ng-attr-placeholder=\\\"{{ options.placeholder | tc:formOtions.context }}\\\" type=\\\"text\\\" ng-model=\\\"$parent.model\\\"></div><div ng-if=\\\"ctrl.Mode()=='Trans'\\\"><div class=\\\"input-group\\\"><span class=\\\"input-group-btn\\\"><button type=\\\"button\\\" tabindex=\\\"-1\\\" ng-click=\\\"ctrl.SetCurrentMode('Text')\\\" class=\\\"btn btn-primary dropdown-toggle\\\"><span class=\\\"fa fa-file-text-o\\\" aria-hidden=\\\"true\\\"></span></button></span> <a class=\\\"form-control\\\" type=\\\"text\\\" ng-click=\\\"ctrl.EditLabelName()\\\" ng-model=\\\"$parent.model\\\">{{ $parent.model }}</a> <span class=\\\"input-group-btn\\\" dropdown=\\\"\\\"><button type=\\\"button\\\" class=\\\"btn btn-primary dropdown-toggle\\\" dropdown-toggle=\\\"\\\" aria-haspopup=\\\"true\\\" aria-expanded=\\\"false\\\">{{ ctrl.CurrentContext().ContextName }} <span class=\\\"caret\\\"></span></button><ul class=\\\"dropdown-menu\\\" role=\\\"menu\\\"><li ng-repeat=\\\"ctx in $parent.currentLabel.Translations\\\"><a ng-click=\\\"ctrl.SetCurrentContextIdx($index)\\\">{{ctx.ContextName}}</a></li></ul></span></div><div class=\\\"mt10\\\"></div><div ng-repeat=\\\"lng in $parent.currentLabel.LangageList\\\"><div class=\\\"col-sm-1 text-center\\\">{{lng}}</div><div class=\\\"col-sm-11\\\"><div class=\\\"form-group has-feedback\\\"><textarea rows=\\\"3\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" class=\\\"form-control\\\" ng-attr-placeholder=\\\"{{ctrl.CurrentContext().ResolvedValues[lng]}}\\\" autocomplete=\\\"off\\\" ng-model=\\\"ctrl.CurrentContext().TranslationValues[lng]\\\">\\n\" +\n    \"\\n\" +\n    \"                    <span class=\\\"form-control-feedback popover-trigger\\\" popover=\\\"Blabla\\\" popover-append-to-body=\\\"true\\\" popover-trigger=\\\"mouseenter\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span>\\n\" +\n    \"\\n\" +\n    \"\\n\" +\n    \"                </textarea></div></div></div><button class=\\\"btn btn-default pull-right\\\" type=\\\"button\\\" ng-click=\\\"ctrl.EditHtmlLabel()\\\"><span class=\\\"fa fa-html5\\\" aria-hidden=\\\"true\\\"></span></button> <button class=\\\"btn btn-success pull-right\\\" type=\\\"button\\\" ng-disabled=\\\"ctrl.tracker.active()\\\" ng-click=\\\"ctrl.Save()\\\"><span class=\\\"glyphicon glyphicon-floppy-disk\\\" aria-hidden=\\\"true\\\"></span> {{'SAVE'|t}}</button><div class=\\\"clearfix\\\"></div></div></div>\");\n}]);\n})();\n","/*!\n * ui-select\n * http://github.com/angular-ui/ui-select\n * Version: 0.8.3 - 2014-11-25T22:50:54.095Z\n * License: MIT\n */\n\n\n(function () {\n  \"use strict\";\n\n  var KEY = {\n    TAB: 9,\n    ENTER: 13,\n    ESC: 27,\n    SPACE: 32,\n    LEFT: 37,\n    UP: 38,\n    RIGHT: 39,\n    DOWN: 40,\n    SHIFT: 16,\n    CTRL: 17,\n    ALT: 18,\n    PAGE_UP: 33,\n    PAGE_DOWN: 34,\n    HOME: 36,\n    END: 35,\n    BACKSPACE: 8,\n    DELETE: 46,\n    COMMAND: 91,\n\n    MAP: { 91 : \"COMMAND\", 8 : \"BACKSPACE\" , 9 : \"TAB\" , 13 : \"ENTER\" , 16 : \"SHIFT\" , 17 : \"CTRL\" , 18 : \"ALT\" , 19 : \"PAUSEBREAK\" , 20 : \"CAPSLOCK\" , 27 : \"ESC\" , 32 : \"SPACE\" , 33 : \"PAGE_UP\", 34 : \"PAGE_DOWN\" , 35 : \"END\" , 36 : \"HOME\" , 37 : \"LEFT\" , 38 : \"UP\" , 39 : \"RIGHT\" , 40 : \"DOWN\" , 43 : \"+\" , 44 : \"PRINTSCREEN\" , 45 : \"INSERT\" , 46 : \"DELETE\", 48 : \"0\" , 49 : \"1\" , 50 : \"2\" , 51 : \"3\" , 52 : \"4\" , 53 : \"5\" , 54 : \"6\" , 55 : \"7\" , 56 : \"8\" , 57 : \"9\" , 59 : \";\", 61 : \"=\" , 65 : \"A\" , 66 : \"B\" , 67 : \"C\" , 68 : \"D\" , 69 : \"E\" , 70 : \"F\" , 71 : \"G\" , 72 : \"H\" , 73 : \"I\" , 74 : \"J\" , 75 : \"K\" , 76 : \"L\", 77 : \"M\" , 78 : \"N\" , 79 : \"O\" , 80 : \"P\" , 81 : \"Q\" , 82 : \"R\" , 83 : \"S\" , 84 : \"T\" , 85 : \"U\" , 86 : \"V\" , 87 : \"W\" , 88 : \"X\" , 89 : \"Y\" , 90 : \"Z\", 96 : \"0\" , 97 : \"1\" , 98 : \"2\" , 99 : \"3\" , 100 : \"4\" , 101 : \"5\" , 102 : \"6\" , 103 : \"7\" , 104 : \"8\" , 105 : \"9\", 106 : \"*\" , 107 : \"+\" , 109 : \"-\" , 110 : \".\" , 111 : \"/\", 112 : \"F1\" , 113 : \"F2\" , 114 : \"F3\" , 115 : \"F4\" , 116 : \"F5\" , 117 : \"F6\" , 118 : \"F7\" , 119 : \"F8\" , 120 : \"F9\" , 121 : \"F10\" , 122 : \"F11\" , 123 : \"F12\", 144 : \"NUMLOCK\" , 145 : \"SCROLLLOCK\" , 186 : \";\" , 187 : \"=\" , 188 : \"SPACE\" , 189 : \"-\" , 190 : \".\" , 191 : \"/\" , 192 : \"`\" , 219 : \"[\" , 220 : \"\\\\\" , 221 : \"]\" , 222 : \"'\"\n    },\n\n    isControl: function (e) {\n        var k = e.which;\n        switch (k) {\n        case KEY.COMMAND:\n        case KEY.SHIFT:\n        case KEY.CTRL:\n        case KEY.ALT:\n            return true;\n        }\n\n        if (e.metaKey) return true;\n\n        return false;\n    },\n    isFunctionKey: function (k) {\n        k = k.which ? k.which : k;\n        return k >= 112 && k <= 123;\n    },\n    isVerticalMovement: function (k){\n      return ~[KEY.UP, KEY.DOWN].indexOf(k);\n    },\n    isHorizontalMovement: function (k){\n      return ~[KEY.LEFT,KEY.RIGHT,KEY.BACKSPACE,KEY.DELETE].indexOf(k);\n    }\n  };\n\n  /**\n   * Add querySelectorAll() to jqLite.\n   *\n   * jqLite find() is limited to lookups by tag name.\n   * TODO This will change with future versions of AngularJS, to be removed when this happens\n   *\n   * See jqLite.find - why not use querySelectorAll? https://github.com/angular/angular.js/issues/3586\n   * See feat(jqLite): use querySelectorAll instead of getElementsByTagName in jqLite.find https://github.com/angular/angular.js/pull/3598\n   */\n  if (angular.element.prototype.querySelectorAll === undefined) {\n    angular.element.prototype.querySelectorAll = function(selector) {\n      return angular.element(this[0].querySelectorAll(selector));\n    };\n  }\n\n  angular.module('ui.select', [])\n\n  .constant('uiSelectConfig', {\n    theme: 'bootstrap',\n    searchEnabled: true,\n    placeholder: '', // Empty by default, like HTML tag <select>\n    refreshDelay: 1000, // In milliseconds\n    closeOnSelect: true\n  })\n\n  // See Rename minErr and make it accessible from outside https://github.com/angular/angular.js/issues/6913\n  .service('uiSelectMinErr', function() {\n    var minErr = angular.$$minErr('ui.select');\n    return function() {\n      var error = minErr.apply(this, arguments);\n      var message = error.message.replace(new RegExp('\\nhttp://errors.angularjs.org/.*'), '');\n      return new Error(message);\n    };\n  })\n\n  /**\n   * Parses \"repeat\" attribute.\n   *\n   * Taken from AngularJS ngRepeat source code\n   * See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L211\n   *\n   * Original discussion about parsing \"repeat\" attribute instead of fully relying on ng-repeat:\n   * https://github.com/angular-ui/ui-select/commit/5dd63ad#commitcomment-5504697\n   */\n  .service('RepeatParser', ['uiSelectMinErr','$parse', function(uiSelectMinErr, $parse) {\n    var self = this;\n\n    /**\n     * Example:\n     * expression = \"address in addresses | filter: {street: $select.search} track by $index\"\n     * itemName = \"address\",\n     * source = \"addresses | filter: {street: $select.search}\",\n     * trackByExp = \"$index\",\n     */\n    self.parse = function(expression) {\n\n      var match = expression.match(/^\\s*(?:([\\s\\S]+?)\\s+as\\s+)?([\\S]+?)\\s+in\\s+([\\s\\S]+?)(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/);\n\n      if (!match) {\n        throw uiSelectMinErr('iexp', \"Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.\",\n                expression);\n      }\n\n      return {\n        itemName: match[2], // (lhs) Left-hand side,\n        source: $parse(match[3]),\n        trackByExp: match[4],\n        modelMapper: $parse(match[1] || match[2])\n      };\n\n    };\n\n    self.getGroupNgRepeatExpression = function() {\n      return '$group in $select.groups';\n    };\n\n    self.getNgRepeatExpression = function(itemName, source, trackByExp, grouped) {\n      var expression = itemName + ' in ' + (grouped ? '$group.items' : source);\n      if (trackByExp) {\n        expression += ' track by ' + trackByExp;\n      }\n      return expression;\n    };\n  }])\n\n  /**\n   * Contains ui-select \"intelligence\".\n   *\n   * The goal is to limit dependency on the DOM whenever possible and\n   * put as much logic in the controller (instead of the link functions) as possible so it can be easily tested.\n   */\n  .controller('uiSelectCtrl',\n    ['$scope', '$element', '$timeout', '$filter', 'RepeatParser', 'uiSelectMinErr', 'uiSelectConfig',\n    function($scope, $element, $timeout, $filter, RepeatParser, uiSelectMinErr, uiSelectConfig) {\n\n    var ctrl = this;\n\n    var EMPTY_SEARCH = '';\n\n    ctrl.placeholder = undefined;\n    ctrl.search = EMPTY_SEARCH;\n    ctrl.activeIndex = 0;\n    ctrl.activeMatchIndex = -1;\n    ctrl.items = [];\n    ctrl.selected = undefined;\n    ctrl.open = false;\n    ctrl.focus = false;\n    ctrl.focusser = undefined; //Reference to input element used to handle focus events\n    ctrl.disabled = undefined; // Initialized inside uiSelect directive link function\n    ctrl.searchEnabled = undefined; // Initialized inside uiSelect directive link function\n    ctrl.resetSearchInput = undefined; // Initialized inside uiSelect directive link function\n    ctrl.refreshDelay = undefined; // Initialized inside uiSelectChoices directive link function\n    ctrl.multiple = false; // Initialized inside uiSelect directive link function\n    ctrl.disableChoiceExpression = undefined; // Initialized inside uiSelect directive link function\n    ctrl.tagging = {isActivated: false, fct: undefined};\n    ctrl.taggingTokens = {isActivated: false, tokens: undefined};\n    ctrl.lockChoiceExpression = undefined; // Initialized inside uiSelect directive link function\n    ctrl.closeOnSelect = true; // Initialized inside uiSelect directive link function\n    ctrl.clickTriggeredSelect = false;\n    ctrl.$filter = $filter;\n\n    ctrl.isEmpty = function() {\n      return angular.isUndefined(ctrl.selected) || ctrl.selected === null || ctrl.selected === '';\n    };\n\n    var _searchInput = $element.querySelectorAll('input.ui-select-search');\n    if (_searchInput.length !== 1) {\n      throw uiSelectMinErr('searchInput', \"Expected 1 input.ui-select-search but got '{0}'.\", _searchInput.length);\n    }\n\n    // Most of the time the user does not want to empty the search input when in typeahead mode\n    function _resetSearchInput() {\n      if (ctrl.resetSearchInput || (ctrl.resetSearchInput === undefined && uiSelectConfig.resetSearchInput)) {\n        ctrl.search = EMPTY_SEARCH;\n        //reset activeIndex\n        if (ctrl.selected && ctrl.items.length && !ctrl.multiple) {\n          ctrl.activeIndex = ctrl.items.indexOf(ctrl.selected);\n        }\n      }\n    }\n\n    // When the user clicks on ui-select, displays the dropdown list\n    ctrl.activate = function(initSearchValue, avoidReset) {\n      if (!ctrl.disabled  && !ctrl.open) {\n        if(!avoidReset) _resetSearchInput();\n        ctrl.focusser.prop('disabled', true); //Will reactivate it on .close()\n        ctrl.open = true;\n        ctrl.activeMatchIndex = -1;\n\n        ctrl.activeIndex = ctrl.activeIndex >= ctrl.items.length ? 0 : ctrl.activeIndex;\n\n        // ensure that the index is set to zero for tagging variants\n        // that where first option is auto-selected\n        if ( ctrl.activeIndex === -1 && ctrl.taggingLabel !== false ) {\n          ctrl.activeIndex = 0;\n        }\n\n        // Give it time to appear before focus\n        $timeout(function() {\n          ctrl.search = initSearchValue || ctrl.search;\n          _searchInput[0].focus();\n        });\n      }\n    };\n\n    ctrl.findGroupByName = function(name) {\n      return ctrl.groups && ctrl.groups.filter(function(group) {\n        return group.name === name;\n      })[0];\n    };\n\n    ctrl.parseRepeatAttr = function(repeatAttr, groupByExp) {\n      function updateGroups(items) {\n        ctrl.groups = [];\n        angular.forEach(items, function(item) {\n          var groupFn = $scope.$eval(groupByExp);\n          var groupName = angular.isFunction(groupFn) ? groupFn(item) : item[groupFn];\n          var group = ctrl.findGroupByName(groupName);\n          if(group) {\n            group.items.push(item);\n          }\n          else {\n            ctrl.groups.push({name: groupName, items: [item]});\n          }\n        });\n        ctrl.items = [];\n        ctrl.groups.forEach(function(group) {\n          ctrl.items = ctrl.items.concat(group.items);\n        });\n      }\n\n      function setPlainItems(items) {\n        ctrl.items = items;\n      }\n\n      var setItemsFn = groupByExp ? updateGroups : setPlainItems;\n\n      ctrl.parserResult = RepeatParser.parse(repeatAttr);\n\n      ctrl.isGrouped = !!groupByExp;\n      ctrl.itemProperty = ctrl.parserResult.itemName;\n\n      // See https://github.com/angular/angular.js/blob/v1.2.15/src/ng/directive/ngRepeat.js#L259\n      $scope.$watchCollection(ctrl.parserResult.source, function(items) {\n\n        if (items === undefined || items === null) {\n          // If the user specifies undefined or null => reset the collection\n          // Special case: items can be undefined if the user did not initialized the collection on the scope\n          // i.e $scope.addresses = [] is missing\n          ctrl.items = [];\n        } else {\n          if (!angular.isArray(items)) {\n            throw uiSelectMinErr('items', \"Expected an array but got '{0}'.\", items);\n          } else {\n            if (ctrl.multiple){\n              //Remove already selected items (ex: while searching)\n              var filteredItems = items.filter(function(i) {return ctrl.selected.indexOf(i) < 0;});\n              setItemsFn(filteredItems);\n            }else{\n              setItemsFn(items);\n            }\n            ctrl.ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters\n\n          }\n        }\n\n      });\n\n      if (ctrl.multiple){\n        //Remove already selected items\n        $scope.$watchCollection('$select.selected', function(selectedItems){\n          var data = ctrl.parserResult.source($scope);\n          if (!selectedItems.length) {\n            setItemsFn(data);\n          }else{\n            if ( data !== undefined ) {\n              var filteredItems = data.filter(function(i) {return selectedItems.indexOf(i) < 0;});\n              setItemsFn(filteredItems);\n            }\n          }\n          ctrl.sizeSearchInput();\n        });\n      }\n\n    };\n\n    var _refreshDelayPromise;\n\n    /**\n     * Typeahead mode: lets the user refresh the collection using his own function.\n     *\n     * See Expose $select.search for external / remote filtering https://github.com/angular-ui/ui-select/pull/31\n     */\n    ctrl.refresh = function(refreshAttr) {\n      if (refreshAttr !== undefined) {\n\n        // Debounce\n        // See https://github.com/angular-ui/bootstrap/blob/0.10.0/src/typeahead/typeahead.js#L155\n        // FYI AngularStrap typeahead does not have debouncing: https://github.com/mgcrea/angular-strap/blob/v2.0.0-rc.4/src/typeahead/typeahead.js#L177\n        if (_refreshDelayPromise) {\n          $timeout.cancel(_refreshDelayPromise);\n        }\n        _refreshDelayPromise = $timeout(function() {\n          $scope.$eval(refreshAttr);\n        }, ctrl.refreshDelay);\n      }\n    };\n\n    ctrl.setActiveItem = function(item) {\n      ctrl.activeIndex = ctrl.items.indexOf(item);\n    };\n\n    ctrl.isActive = function(itemScope) {\n      if ( !ctrl.open ) {\n        return false;\n      }\n      var itemIndex = ctrl.items.indexOf(itemScope[ctrl.itemProperty]);\n      var isActive =  itemIndex === ctrl.activeIndex;\n\n      if ( !isActive || ( itemIndex < 0 && ctrl.taggingLabel !== false ) ||( itemIndex < 0 && ctrl.taggingLabel === false) ) {\n        return false;\n      }\n\n      if (isActive && !angular.isUndefined(ctrl.onHighlightCallback)) {\n        itemScope.$eval(ctrl.onHighlightCallback);\n      }\n\n      return isActive;\n    };\n\n    ctrl.isDisabled = function(itemScope) {\n\n      if (!ctrl.open) return;\n\n      var itemIndex = ctrl.items.indexOf(itemScope[ctrl.itemProperty]);\n      var isDisabled = false;\n      var item;\n\n      if (itemIndex >= 0 && !angular.isUndefined(ctrl.disableChoiceExpression)) {\n        item = ctrl.items[itemIndex];\n        isDisabled = !!(itemScope.$eval(ctrl.disableChoiceExpression)); // force the boolean value\n        item._uiSelectChoiceDisabled = isDisabled; // store this for later reference\n      }\n\n      return isDisabled;\n    };\n\n\n    // When the user selects an item with ENTER or clicks the dropdown\n    ctrl.select = function(item, skipFocusser, $event) {\n      if (item === undefined || !item._uiSelectChoiceDisabled) {\n\n        if ( ! ctrl.items && ! ctrl.search ) return;\n\n        if (!item || !item._uiSelectChoiceDisabled) {\n          if(ctrl.tagging.isActivated) {\n            // if taggingLabel is disabled, we pull from ctrl.search val\n            if ( ctrl.taggingLabel === false ) {\n              if ( ctrl.activeIndex < 0 ) {\n                item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : ctrl.search;\n                if ( angular.equals( ctrl.items[0], item ) ) {\n                  return;\n                }\n              } else {\n                // keyboard nav happened first, user selected from dropdown\n                item = ctrl.items[ctrl.activeIndex];\n              }\n            } else {\n              // tagging always operates at index zero, taggingLabel === false pushes\n              // the ctrl.search value without having it injected\n              if ( ctrl.activeIndex === 0 ) {\n                // ctrl.tagging pushes items to ctrl.items, so we only have empty val\n                // for `item` if it is a detected duplicate\n                if ( item === undefined ) return;\n                // create new item on the fly\n                item = ctrl.tagging.fct !== undefined ? ctrl.tagging.fct(ctrl.search) : item.replace(ctrl.taggingLabel,'');\n              }\n            }\n            // search ctrl.selected for dupes potentially caused by tagging and return early if found\n            if ( ctrl.selected && ctrl.selected.filter( function (selection) { return angular.equals(selection, item); }).length > 0 ) {\n              ctrl.close(skipFocusser);\n              return;\n            }\n          }\n\n          var locals = {};\n          locals[ctrl.parserResult.itemName] = item;\n\n          ctrl.onSelectCallback($scope, {\n              $item: item,\n              $model: ctrl.parserResult.modelMapper($scope, locals)\n          });\n\n          if(ctrl.multiple) {\n            ctrl.selected.push(item);\n            ctrl.sizeSearchInput();\n          } else {\n            ctrl.selected = item;\n          }\n          if (!ctrl.multiple || ctrl.closeOnSelect) {\n            ctrl.close(skipFocusser);\n          }\n          if ($event && $event.type === 'click') {\n            ctrl.clickTriggeredSelect = true;\n          }\n        }\n      }\n    };\n\n    // Closes the dropdown\n    ctrl.close = function(skipFocusser) {\n      if (!ctrl.open) return;\n      _resetSearchInput();\n      ctrl.open = false;\n      if (!ctrl.multiple){\n        $timeout(function(){\n          ctrl.focusser.prop('disabled', false);\n          if (!skipFocusser) ctrl.focusser[0].focus();\n        },0,false);\n      }\n    };\n\n    // Toggle dropdown\n    ctrl.toggle = function(e) {\n      if (ctrl.open) ctrl.close(); else ctrl.activate();\n      e.preventDefault();\n      e.stopPropagation();\n    };\n\n    ctrl.isLocked = function(itemScope, itemIndex) {\n        var isLocked, item = ctrl.selected[itemIndex];\n\n        if (item && !angular.isUndefined(ctrl.lockChoiceExpression)) {\n            isLocked = !!(itemScope.$eval(ctrl.lockChoiceExpression)); // force the boolean value\n            item._uiSelectChoiceLocked = isLocked; // store this for later reference\n        }\n\n        return isLocked;\n    };\n\n    // Remove item from multiple select\n    ctrl.removeChoice = function(index){\n      var removedChoice = ctrl.selected[index];\n\n      // if the choice is locked, can't remove it\n      if(removedChoice._uiSelectChoiceLocked) return;\n\n      var locals = {};\n      locals[ctrl.parserResult.itemName] = removedChoice;\n\n      ctrl.selected.splice(index, 1);\n      ctrl.activeMatchIndex = -1;\n      ctrl.sizeSearchInput();\n\n      ctrl.onRemoveCallback($scope, {\n        $item: removedChoice,\n        $model: ctrl.parserResult.modelMapper($scope, locals)\n      });\n    };\n\n    ctrl.getPlaceholder = function(){\n      //Refactor single?\n      if(ctrl.multiple && ctrl.selected.length) return;\n      return ctrl.placeholder;\n    };\n\n    var containerSizeWatch;\n    ctrl.sizeSearchInput = function(){\n      var input = _searchInput[0],\n          container = _searchInput.parent().parent()[0];\n      _searchInput.css('width','10px');\n      var calculate = function(){\n        var newWidth = container.clientWidth - input.offsetLeft - 10;\n        if(newWidth < 50) newWidth = container.clientWidth;\n        _searchInput.css('width',newWidth+'px');\n      };\n      $timeout(function(){ //Give tags time to render correctly\n        if (container.clientWidth === 0 && !containerSizeWatch){\n          containerSizeWatch = $scope.$watch(function(){ return container.clientWidth;}, function(newValue){\n            if (newValue !== 0){\n              calculate();\n              containerSizeWatch();\n              containerSizeWatch = null;\n            }\n          });\n        }else if (!containerSizeWatch) {\n          calculate();\n        }\n      }, 0, false);\n    };\n\n    function _handleDropDownSelection(key) {\n      var processed = true;\n      switch (key) {\n        case KEY.DOWN:\n          if (!ctrl.open && ctrl.multiple) ctrl.activate(false, true); //In case its the search input in 'multiple' mode\n          else if (ctrl.activeIndex < ctrl.items.length - 1) { ctrl.activeIndex++; }\n          break;\n        case KEY.UP:\n          if (!ctrl.open && ctrl.multiple) ctrl.activate(false, true); //In case its the search input in 'multiple' mode\n          else if (ctrl.activeIndex > 0 || (ctrl.search.length === 0 && ctrl.tagging.isActivated)) { ctrl.activeIndex--; }\n          break;\n        case KEY.TAB:\n          if (!ctrl.multiple || ctrl.open) ctrl.select(ctrl.items[ctrl.activeIndex], true);\n          break;\n        case KEY.ENTER:\n          if(ctrl.open){\n            ctrl.select(ctrl.items[ctrl.activeIndex]);\n          } else {\n            ctrl.activate(false, true); //In case its the search input in 'multiple' mode\n          }\n          break;\n        case KEY.ESC:\n          ctrl.close();\n          break;\n        default:\n          processed = false;\n      }\n      return processed;\n    }\n\n    // Handles selected options in \"multiple\" mode\n    function _handleMatchSelection(key){\n      var caretPosition = _getCaretPosition(_searchInput[0]),\n          length = ctrl.selected.length,\n          // none  = -1,\n          first = 0,\n          last  = length-1,\n          curr  = ctrl.activeMatchIndex,\n          next  = ctrl.activeMatchIndex+1,\n          prev  = ctrl.activeMatchIndex-1,\n          newIndex = curr;\n\n      if(caretPosition > 0 || (ctrl.search.length && key == KEY.RIGHT)) return false;\n\n      ctrl.close();\n\n      function getNewActiveMatchIndex(){\n        switch(key){\n          case KEY.LEFT:\n            // Select previous/first item\n            if(~ctrl.activeMatchIndex) return prev;\n            // Select last item\n            else return last;\n            break;\n          case KEY.RIGHT:\n            // Open drop-down\n            if(!~ctrl.activeMatchIndex || curr === last){\n              ctrl.activate();\n              return false;\n            }\n            // Select next/last item\n            else return next;\n            break;\n          case KEY.BACKSPACE:\n            // Remove selected item and select previous/first\n            if(~ctrl.activeMatchIndex){\n              ctrl.removeChoice(curr);\n              return prev;\n            }\n            // Select last item\n            else return last;\n            break;\n          case KEY.DELETE:\n            // Remove selected item and select next item\n            if(~ctrl.activeMatchIndex){\n              ctrl.removeChoice(ctrl.activeMatchIndex);\n              return curr;\n            }\n            else return false;\n        }\n      }\n\n      newIndex = getNewActiveMatchIndex();\n\n      if(!ctrl.selected.length || newIndex === false) ctrl.activeMatchIndex = -1;\n      else ctrl.activeMatchIndex = Math.min(last,Math.max(first,newIndex));\n\n      return true;\n    }\n\n    // Bind to keyboard shortcuts\n    _searchInput.on('keydown', function(e) {\n\n      var key = e.which;\n\n      // if(~[KEY.ESC,KEY.TAB].indexOf(key)){\n      //   //TODO: SEGURO?\n      //   ctrl.close();\n      // }\n\n      $scope.$apply(function() {\n        var processed = false;\n\n        if(ctrl.multiple && KEY.isHorizontalMovement(key)){\n          processed = _handleMatchSelection(key);\n        }\n\n        if (!processed && (ctrl.items.length > 0 || ctrl.tagging.isActivated)) {\n          processed = _handleDropDownSelection(key);\n          if ( ctrl.taggingTokens.isActivated ) {\n            for (var i = 0; i < ctrl.taggingTokens.tokens.length; i++) {\n              if ( ctrl.taggingTokens.tokens[i] === KEY.MAP[e.keyCode] ) {\n                // make sure there is a new value to push via tagging\n                if ( ctrl.search.length > 0 ) {\n                  ctrl.select(null, true);\n                  _searchInput.triggerHandler('tagged');\n                }\n              }\n            }\n          }\n        }\n\n        if (processed  && key != KEY.TAB) {\n          //TODO Check si el tab selecciona aun correctamente\n          //Crear test\n          e.preventDefault();\n          e.stopPropagation();\n        }\n      });\n\n      if(KEY.isVerticalMovement(key) && ctrl.items.length > 0){\n        _ensureHighlightVisible();\n      }\n\n    });\n\n    _searchInput.on('keyup', function(e) {\n      if ( ! KEY.isVerticalMovement(e.which) ) {\n        $scope.$evalAsync( function () {\n          ctrl.activeIndex = ctrl.taggingLabel === false ? -1 : 0;\n        });\n      }\n      // Push a \"create new\" item into array if there is a search string\n      if ( ctrl.tagging.isActivated && ctrl.search.length > 0 ) {\n\n        // return early with these keys\n        if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC || KEY.isVerticalMovement(e.which) ) {\n          return;\n        }\n        // always reset the activeIndex to the first item when tagging\n        ctrl.activeIndex = ctrl.taggingLabel === false ? -1 : 0;\n        // taggingLabel === false bypasses all of this\n        if (ctrl.taggingLabel === false) return;\n\n        var items = angular.copy( ctrl.items );\n        var stashArr = angular.copy( ctrl.items );\n        var newItem;\n        var item;\n        var hasTag = false;\n        var dupeIndex = -1;\n        var tagItems;\n        var tagItem;\n\n        // case for object tagging via transform `ctrl.tagging.fct` function\n        if ( ctrl.tagging.fct !== undefined) {\n          tagItems = ctrl.$filter('filter')(items,{'isTag': true});\n          if ( tagItems.length > 0 ) {\n            tagItem = tagItems[0];\n          }\n          // remove the first element, if it has the `isTag` prop we generate a new one with each keyup, shaving the previous\n          if ( items.length > 0 && tagItem ) {\n            hasTag = true;\n            items = items.slice(1,items.length);\n            stashArr = stashArr.slice(1,stashArr.length);\n          }\n          newItem = ctrl.tagging.fct(ctrl.search);\n          newItem.isTag = true;\n          // verify the the tag doesn't match the value of an existing item\n          if ( stashArr.filter( function (origItem) { return angular.equals( origItem, ctrl.tagging.fct(ctrl.search) ); } ).length > 0 ) {\n            return;\n          }\n        // handle newItem string and stripping dupes in tagging string context\n        } else {\n          // find any tagging items already in the ctrl.items array and store them\n          tagItems = ctrl.$filter('filter')(items,function (item) {\n            return item.match(ctrl.taggingLabel);\n          });\n          if ( tagItems.length > 0 ) {\n            tagItem = tagItems[0];\n          }\n          item = items[0];\n          // remove existing tag item if found (should only ever be one tag item)\n          if ( item !== undefined && items.length > 0 && tagItem ) {\n            hasTag = true;\n            items = items.slice(1,items.length);\n            stashArr = stashArr.slice(1,stashArr.length);\n          }\n          newItem = ctrl.search+' '+ctrl.taggingLabel;\n          if ( _findApproxDupe(ctrl.selected, ctrl.search) > -1 ) {\n            return;\n          }\n          // verify the the tag doesn't match the value of an existing item from\n          // the searched data set\n          if ( stashArr.filter( function (origItem) { return origItem.toUpperCase() === ctrl.search.toUpperCase(); }).length > 0 ) {\n            // if there is a tag from prev iteration, strip it / queue the change\n            // and return early\n            if ( hasTag ) {\n              items = stashArr;\n              $scope.$evalAsync( function () {\n                ctrl.activeIndex = 0;\n                ctrl.items = items;\n              });\n            }\n            return;\n          }\n          if ( ctrl.selected.filter( function (selection) { return selection.toUpperCase() === ctrl.search.toUpperCase(); } ).length > 0 ) {\n            // if there is a tag from prev iteration, strip it\n            if ( hasTag ) {\n              ctrl.items = stashArr.slice(1,stashArr.length);\n            }\n            return;\n          }\n        }\n        if ( hasTag ) dupeIndex = _findApproxDupe(ctrl.selected, newItem);\n        // dupe found, shave the first item\n        if ( dupeIndex > -1 ) {\n          items = items.slice(dupeIndex+1,items.length-1);\n        } else {\n          items = [];\n          items.push(newItem);\n          items = items.concat(stashArr);\n        }\n        $scope.$evalAsync( function () {\n          ctrl.activeIndex = 0;\n          ctrl.items = items;\n        });\n      }\n    });\n\n    _searchInput.on('tagged', function() {\n      $timeout(function() {\n        _resetSearchInput();\n      });\n    });\n\n    _searchInput.on('blur', function() {\n      $timeout(function() {\n        ctrl.activeMatchIndex = -1;\n      });\n    });\n\n    function _findApproxDupe(haystack, needle) {\n      var tempArr = angular.copy(haystack);\n      var dupeIndex = -1;\n      for (var i = 0; i <tempArr.length; i++) {\n        // handle the simple string version of tagging\n        if ( ctrl.tagging.fct === undefined ) {\n          // search the array for the match\n          if ( tempArr[i]+' '+ctrl.taggingLabel === needle ) {\n            dupeIndex = i;\n          }\n        // handle the object tagging implementation\n        } else {\n          var mockObj = tempArr[i];\n          mockObj.isTag = true;\n          if ( angular.equals(mockObj, needle) ) {\n            dupeIndex = i;\n          }\n        }\n      }\n      return dupeIndex;\n    }\n\n    function _getCaretPosition(el) {\n      if(angular.isNumber(el.selectionStart)) return el.selectionStart;\n      // selectionStart is not supported in IE8 and we don't want hacky workarounds so we compromise\n      else return el.value.length;\n    }\n\n    // See https://github.com/ivaynberg/select2/blob/3.4.6/select2.js#L1431\n    function _ensureHighlightVisible() {\n      var container = $element.querySelectorAll('.ui-select-choices-content');\n      var choices = container.querySelectorAll('.ui-select-choices-row');\n      if (choices.length < 1) {\n        throw uiSelectMinErr('choices', \"Expected multiple .ui-select-choices-row but got '{0}'.\", choices.length);\n      }\n\n      var highlighted = choices[ctrl.activeIndex];\n      var posY = highlighted.offsetTop + highlighted.clientHeight - container[0].scrollTop;\n      var height = container[0].offsetHeight;\n\n      if (posY > height) {\n        container[0].scrollTop += posY - height;\n      } else if (posY < highlighted.clientHeight) {\n        if (ctrl.isGrouped && ctrl.activeIndex === 0)\n          container[0].scrollTop = 0; //To make group header visible when going all the way up\n        else\n          container[0].scrollTop -= highlighted.clientHeight - posY;\n      }\n    }\n\n    $scope.$on('$destroy', function() {\n      _searchInput.off('keyup keydown tagged blur');\n    });\n  }])\n\n  .directive('uiSelect',\n    ['$document', 'uiSelectConfig', 'uiSelectMinErr', '$compile', '$parse',\n    function($document, uiSelectConfig, uiSelectMinErr, $compile, $parse) {\n\n    return {\n      restrict: 'EA',\n      templateUrl: function(tElement, tAttrs) {\n        var theme = tAttrs.theme || uiSelectConfig.theme;\n        return theme + (angular.isDefined(tAttrs.multiple) ? '/select-multiple.tpl.html' : '/select.tpl.html');\n      },\n      replace: true,\n      transclude: true,\n      require: ['uiSelect', 'ngModel'],\n      scope: true,\n\n      controller: 'uiSelectCtrl',\n      controllerAs: '$select',\n\n      link: function(scope, element, attrs, ctrls, transcludeFn) {\n        var $select = ctrls[0];\n        var ngModel = ctrls[1];\n\n        var searchInput = element.querySelectorAll('input.ui-select-search');\n\n        $select.multiple = angular.isDefined(attrs.multiple) && (\n            attrs.multiple === '' ||\n            attrs.multiple.toLowerCase() === 'multiple' ||\n            attrs.multiple.toLowerCase() === 'true'\n        );\n\n        $select.closeOnSelect = (angular.isDefined(attrs.closeOnSelect) && attrs.closeOnSelect.toLowerCase() === 'false') ? false : uiSelectConfig.closeOnSelect;\n        $select.onSelectCallback = $parse(attrs.onSelect);\n        $select.onRemoveCallback = $parse(attrs.onRemove);\n\n        //From view --> model\n        ngModel.$parsers.unshift(function (inputValue) {\n          var locals = {},\n              result;\n          if ($select.multiple){\n            var resultMultiple = [];\n            for (var j = $select.selected.length - 1; j >= 0; j--) {\n              locals = {};\n              locals[$select.parserResult.itemName] = $select.selected[j];\n              result = $select.parserResult.modelMapper(scope, locals);\n              resultMultiple.unshift(result);\n            }\n            return resultMultiple;\n          }else{\n            locals = {};\n            locals[$select.parserResult.itemName] = inputValue;\n            result = $select.parserResult.modelMapper(scope, locals);\n            return result;\n          }\n        });\n\n        //From model --> view\n        ngModel.$formatters.unshift(function (inputValue) {\n          var data = $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search\n              locals = {},\n              result;\n          if (data){\n            if ($select.multiple){\n              var resultMultiple = [];\n              var checkFnMultiple = function(list, value){\n                if (!list || !list.length) return;\n                for (var p = list.length - 1; p >= 0; p--) {\n                  locals[$select.parserResult.itemName] = list[p];\n                  result = $select.parserResult.modelMapper(scope, locals);\n                  if (result == value){\n                    resultMultiple.unshift(list[p]);\n                    return true;\n                  }\n                }\n                return false;\n              };\n              if (!inputValue) return resultMultiple; //If ngModel was undefined\n              for (var k = inputValue.length - 1; k >= 0; k--) {\n                if (!checkFnMultiple($select.selected, inputValue[k])){\n                  checkFnMultiple(data, inputValue[k]);\n                }\n              }\n              return resultMultiple;\n            }else{\n              var checkFnSingle = function(d){\n                locals[$select.parserResult.itemName] = d;\n                result = $select.parserResult.modelMapper(scope, locals);\n                return result == inputValue;\n              };\n              //If possible pass same object stored in $select.selected\n              if ($select.selected && checkFnSingle($select.selected)) {\n                return $select.selected;\n              }\n              for (var i = data.length - 1; i >= 0; i--) {\n                if (checkFnSingle(data[i])) return data[i];\n              }\n            }\n          }\n          return inputValue;\n        });\n\n        //Set reference to ngModel from uiSelectCtrl\n        $select.ngModel = ngModel;\n\n        //Idea from: https://github.com/ivaynberg/select2/blob/79b5bf6db918d7560bdd959109b7bcfb47edaf43/select2.js#L1954\n        var focusser = angular.element(\"<input ng-disabled='$select.disabled' class='ui-select-focusser ui-select-offscreen' type='text' aria-haspopup='true' role='button' />\");\n\n        if(attrs.tabindex){\n          //tabindex might be an expression, wait until it contains the actual value before we set the focusser tabindex\n          attrs.$observe('tabindex', function(value) {\n            //If we are using multiple, add tabindex to the search input\n            if($select.multiple){\n              searchInput.attr(\"tabindex\", value);\n            } else {\n              focusser.attr(\"tabindex\", value);\n            }\n            //Remove the tabindex on the parent so that it is not focusable\n            element.removeAttr(\"tabindex\");\n          });\n        }\n\n        $compile(focusser)(scope);\n        $select.focusser = focusser;\n\n        if (!$select.multiple){\n\n          element.append(focusser);\n          focusser.bind(\"focus\", function(){\n            scope.$evalAsync(function(){\n              $select.focus = true;\n            });\n          });\n          focusser.bind(\"blur\", function(){\n            scope.$evalAsync(function(){\n              $select.focus = false;\n            });\n          });\n          focusser.bind(\"keydown\", function(e){\n\n            if (e.which === KEY.BACKSPACE) {\n              e.preventDefault();\n              e.stopPropagation();\n              $select.select(undefined);\n              scope.$apply();\n              return;\n            }\n\n            if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC) {\n              return;\n            }\n\n            if (e.which == KEY.DOWN  || e.which == KEY.UP || e.which == KEY.ENTER || e.which == KEY.SPACE){\n              e.preventDefault();\n              e.stopPropagation();\n              $select.activate();\n            }\n\n            scope.$digest();\n          });\n\n          focusser.bind(\"keyup input\", function(e){\n\n            if (e.which === KEY.TAB || KEY.isControl(e) || KEY.isFunctionKey(e) || e.which === KEY.ESC || e.which == KEY.ENTER || e.which === KEY.BACKSPACE) {\n              return;\n            }\n\n            $select.activate(focusser.val()); //User pressed some regular key, so we pass it to the search input\n            focusser.val('');\n            scope.$digest();\n\n          });\n\n        }\n\n\n        scope.$watch('searchEnabled', function() {\n            var searchEnabled = scope.$eval(attrs.searchEnabled);\n            $select.searchEnabled = searchEnabled !== undefined ? searchEnabled : uiSelectConfig.searchEnabled;\n        });\n\n        attrs.$observe('disabled', function() {\n          // No need to use $eval() (thanks to ng-disabled) since we already get a boolean instead of a string\n          $select.disabled = attrs.disabled !== undefined ? attrs.disabled : false;\n        });\n\n        attrs.$observe('resetSearchInput', function() {\n          // $eval() is needed otherwise we get a string instead of a boolean\n          var resetSearchInput = scope.$eval(attrs.resetSearchInput);\n          $select.resetSearchInput = resetSearchInput !== undefined ? resetSearchInput : true;\n        });\n\n        attrs.$observe('tagging', function() {\n          if(attrs.tagging !== undefined)\n          {\n            // $eval() is needed otherwise we get a string instead of a boolean\n            var taggingEval = scope.$eval(attrs.tagging);\n            $select.tagging = {isActivated: true, fct: taggingEval !== true ? taggingEval : undefined};\n          }\n          else\n          {\n            $select.tagging = {isActivated: false, fct: undefined};\n          }\n        });\n\n        attrs.$observe('taggingLabel', function() {\n          if(attrs.tagging !== undefined && attrs.taggingLabel !== undefined)\n          {\n            // check eval for FALSE, in this case, we disable the labels\n            // associated with tagging\n            if ( attrs.taggingLabel === 'false' ) {\n              $select.taggingLabel = false;\n            }\n            else\n            {\n              $select.taggingLabel = attrs.taggingLabel !== undefined ? attrs.taggingLabel : '(new)';\n            }\n          }\n        });\n\n        attrs.$observe('taggingTokens', function() {\n          if (attrs.tagging !== undefined) {\n            var tokens = attrs.taggingTokens !== undefined ? attrs.taggingTokens.split('|') : [',','ENTER'];\n            $select.taggingTokens = {isActivated: true, tokens: tokens };\n          }\n        });\n\n        if ($select.multiple){\n          scope.$watchCollection(function(){ return ngModel.$modelValue; }, function(newValue, oldValue) {\n            if (oldValue != newValue)\n              ngModel.$modelValue = null; //Force scope model value and ngModel value to be out of sync to re-run formatters\n          });\n          scope.$watchCollection('$select.selected', function() {\n            ngModel.$setViewValue(Date.now()); //Set timestamp as a unique string to force changes\n          });\n          focusser.prop('disabled', true); //Focusser isn't needed if multiple\n        }else{\n          scope.$watch('$select.selected', function(newValue) {\n            if (ngModel.$viewValue !== newValue) {\n              ngModel.$setViewValue(newValue);\n            }\n          });\n        }\n\n        ngModel.$render = function() {\n          if($select.multiple){\n            // Make sure that model value is array\n            if(!angular.isArray(ngModel.$viewValue)){\n              // Have tolerance for null or undefined values\n              if(angular.isUndefined(ngModel.$viewValue) || ngModel.$viewValue === null){\n                $select.selected = [];\n              } else {\n                throw uiSelectMinErr('multiarr', \"Expected model value to be array but got '{0}'\", ngModel.$viewValue);\n              }\n            }\n          }\n          $select.selected = ngModel.$viewValue;\n        };\n\n        function onDocumentClick(e) {\n          var contains = false;\n\n          if (window.jQuery) {\n            // Firefox 3.6 does not support element.contains()\n            // See Node.contains https://developer.mozilla.org/en-US/docs/Web/API/Node.contains\n            contains = window.jQuery.contains(element[0], e.target);\n          } else {\n            contains = element[0].contains(e.target);\n          }\n\n          if (!contains && !$select.clickTriggeredSelect) {\n            $select.close();\n            scope.$digest();\n          }\n          $select.clickTriggeredSelect = false;\n        }\n\n        // See Click everywhere but here event http://stackoverflow.com/questions/12931369\n        $document.on('click', onDocumentClick);\n\n        scope.$on('$destroy', function() {\n          $document.off('click', onDocumentClick);\n        });\n\n        // Move transcluded elements to their correct position in main template\n        transcludeFn(scope, function(clone) {\n          // See Transclude in AngularJS http://blog.omkarpatil.com/2012/11/transclude-in-angularjs.html\n\n          // One day jqLite will be replaced by jQuery and we will be able to write:\n          // var transcludedElement = clone.filter('.my-class')\n          // instead of creating a hackish DOM element:\n          var transcluded = angular.element('<div>').append(clone);\n\n          var transcludedMatch = transcluded.querySelectorAll('.ui-select-match');\n          transcludedMatch.removeAttr('ui-select-match'); //To avoid loop in case directive as attr\n          if (transcludedMatch.length !== 1) {\n            throw uiSelectMinErr('transcluded', \"Expected 1 .ui-select-match but got '{0}'.\", transcludedMatch.length);\n          }\n          element.querySelectorAll('.ui-select-match').replaceWith(transcludedMatch);\n\n          var transcludedChoices = transcluded.querySelectorAll('.ui-select-choices');\n          transcludedChoices.removeAttr('ui-select-choices'); //To avoid loop in case directive as attr\n          if (transcludedChoices.length !== 1) {\n            throw uiSelectMinErr('transcluded', \"Expected 1 .ui-select-choices but got '{0}'.\", transcludedChoices.length);\n          }\n          element.querySelectorAll('.ui-select-choices').replaceWith(transcludedChoices);\n        });\n      }\n    };\n  }])\n\n  .directive('uiSelectChoices',\n    ['uiSelectConfig', 'RepeatParser', 'uiSelectMinErr', '$compile',\n    function(uiSelectConfig, RepeatParser, uiSelectMinErr, $compile) {\n\n    return {\n      restrict: 'EA',\n      require: '^uiSelect',\n      replace: true,\n      transclude: true,\n      templateUrl: function(tElement) {\n        // Gets theme attribute from parent (ui-select)\n        var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;\n        return theme + '/choices.tpl.html';\n      },\n\n      compile: function(tElement, tAttrs) {\n\n        if (!tAttrs.repeat) throw uiSelectMinErr('repeat', \"Expected 'repeat' expression.\");\n\n        return function link(scope, element, attrs, $select, transcludeFn) {\n\n          // var repeat = RepeatParser.parse(attrs.repeat);\n          var groupByExp = attrs.groupBy;\n\n          $select.parseRepeatAttr(attrs.repeat, groupByExp); //Result ready at $select.parserResult\n\n          $select.disableChoiceExpression = attrs.uiDisableChoice;\n          $select.onHighlightCallback = attrs.onHighlight;\n\n          if(groupByExp) {\n            var groups = element.querySelectorAll('.ui-select-choices-group');\n            if (groups.length !== 1) throw uiSelectMinErr('rows', \"Expected 1 .ui-select-choices-group but got '{0}'.\", groups.length);\n            groups.attr('ng-repeat', RepeatParser.getGroupNgRepeatExpression());\n          }\n\n          var choices = element.querySelectorAll('.ui-select-choices-row');\n          if (choices.length !== 1) {\n            throw uiSelectMinErr('rows', \"Expected 1 .ui-select-choices-row but got '{0}'.\", choices.length);\n          }\n\n          choices.attr('ng-repeat', RepeatParser.getNgRepeatExpression($select.parserResult.itemName, '$select.items', $select.parserResult.trackByExp, groupByExp))\n              .attr('ng-if', '$select.open') //Prevent unnecessary watches when dropdown is closed\n              .attr('ng-mouseenter', '$select.setActiveItem('+$select.parserResult.itemName +')')\n              .attr('ng-click', '$select.select(' + $select.parserResult.itemName + ',false,$event)');\n\n          var rowsInner = element.querySelectorAll('.ui-select-choices-row-inner');\n          if (rowsInner.length !== 1) throw uiSelectMinErr('rows', \"Expected 1 .ui-select-choices-row-inner but got '{0}'.\", rowsInner.length);\n          rowsInner.attr('uis-transclude-append', ''); //Adding uisTranscludeAppend directive to row element after choices element has ngRepeat\n\n          $compile(element, transcludeFn)(scope); //Passing current transcludeFn to be able to append elements correctly from uisTranscludeAppend\n\n          scope.$watch('$select.search', function(newValue) {\n            if(newValue && !$select.open && $select.multiple) $select.activate(false, true);\n            $select.activeIndex = $select.tagging.isActivated ? -1 : 0;\n            $select.refresh(attrs.refresh);\n          });\n\n          attrs.$observe('refreshDelay', function() {\n            // $eval() is needed otherwise we get a string instead of a number\n            var refreshDelay = scope.$eval(attrs.refreshDelay);\n            $select.refreshDelay = refreshDelay !== undefined ? refreshDelay : uiSelectConfig.refreshDelay;\n          });\n        };\n      }\n    };\n  }])\n  // Recreates old behavior of ng-transclude. Used internally.\n  .directive('uisTranscludeAppend', function () {\n    return {\n      link: function (scope, element, attrs, ctrl, transclude) {\n          transclude(scope, function (clone) {\n            element.append(clone);\n          });\n        }\n      };\n  })\n  .directive('uiSelectMatch', ['uiSelectConfig', function(uiSelectConfig) {\n    return {\n      restrict: 'EA',\n      require: '^uiSelect',\n      replace: true,\n      transclude: true,\n      templateUrl: function(tElement) {\n        // Gets theme attribute from parent (ui-select)\n        var theme = tElement.parent().attr('theme') || uiSelectConfig.theme;\n        var multi = tElement.parent().attr('multiple');\n        return theme + (multi ? '/match-multiple.tpl.html' : '/match.tpl.html');\n      },\n      link: function(scope, element, attrs, $select) {\n        $select.lockChoiceExpression = attrs.uiLockChoice;\n        attrs.$observe('placeholder', function(placeholder) {\n          $select.placeholder = placeholder !== undefined ? placeholder : uiSelectConfig.placeholder;\n        });\n        \n        $select.allowClear = (angular.isDefined(attrs.allowClear)) ? (attrs.allowClear === '') ? true : (attrs.allowClear.toLowerCase() === 'true') : false;\n\n        if($select.multiple){\n          $select.sizeSearchInput();\n        }\n\n      }\n    };\n  }])\n\n  /**\n   * Highlights text that matches $select.search.\n   *\n   * Taken from AngularUI Bootstrap Typeahead\n   * See https://github.com/angular-ui/bootstrap/blob/0.10.0/src/typeahead/typeahead.js#L340\n   */\n  .filter('highlight', function() {\n    function escapeRegexp(queryToEscape) {\n      return queryToEscape.replace(/([.?*+^$[\\]\\\\(){}|-])/g, '\\\\$1');\n    }\n\n    return function(matchItem, query) {\n      return query && matchItem ? matchItem.replace(new RegExp(escapeRegexp(query), 'gi'), '<span class=\"ui-select-highlight\">$&</span>') : matchItem;\n    };\n  });\n}());\n\nangular.module(\"ui.select\").run([\"$templateCache\", function($templateCache) {$templateCache.put(\"bootstrap/choices.tpl.html\",\"<ul class=\\\"ui-select-choices ui-select-choices-content dropdown-menu\\\" role=\\\"menu\\\" aria-labelledby=\\\"dLabel\\\" ng-show=\\\"$select.items.length > 0\\\"><li class=\\\"ui-select-choices-group\\\"><div class=\\\"divider\\\" ng-show=\\\"$select.isGrouped && $index > 0\\\"></div><div ng-show=\\\"$select.isGrouped\\\" class=\\\"ui-select-choices-group-label dropdown-header\\\" ng-bind-html=\\\"$group.name\\\"></div><div class=\\\"ui-select-choices-row\\\" ng-class=\\\"{active: $select.isActive(this), disabled: $select.isDisabled(this)}\\\"><a href=\\\"javascript:void(0)\\\" class=\\\"ui-select-choices-row-inner\\\"></a></div></li></ul>\");\n$templateCache.put(\"bootstrap/match-multiple.tpl.html\",\"<span class=\\\"ui-select-match\\\"><span ng-repeat=\\\"$item in $select.selected\\\"><span style=\\\"margin-right: 3px;\\\" class=\\\"ui-select-match-item btn btn-default btn-xs\\\" tabindex=\\\"-1\\\" type=\\\"button\\\" ng-disabled=\\\"$select.disabled\\\" ng-click=\\\"$select.activeMatchIndex = $index;\\\" ng-class=\\\"{\\'btn-primary\\':$select.activeMatchIndex === $index}\\\"><span class=\\\"close ui-select-match-close\\\" ng-hide=\\\"$select.disabled\\\" ng-click=\\\"$select.removeChoice($index)\\\">&nbsp;&times;</span> <span uis-transclude-append=\\\"\\\"></span></span></span></span>\");\n$templateCache.put(\"bootstrap/match.tpl.html\",\"<button type=\\\"button\\\" class=\\\"btn btn-default form-control ui-select-match\\\" tabindex=\\\"-1\\\" ng-hide=\\\"$select.open\\\" ng-disabled=\\\"$select.disabled\\\" ng-class=\\\"{\\'btn-default-focus\\':$select.focus}\\\" ;=\\\"\\\" ng-click=\\\"$select.activate()\\\"><span ng-show=\\\"$select.isEmpty()\\\" class=\\\"text-muted\\\">{{$select.placeholder}}</span> <span ng-hide=\\\"$select.isEmpty()\\\" ng-transclude=\\\"\\\"></span> <span class=\\\"caret ui-select-toggle\\\" ng-click=\\\"$select.toggle($event)\\\"></span></button>\");\n$templateCache.put(\"bootstrap/select-multiple.tpl.html\",\"<div class=\\\"ui-select-multiple ui-select-bootstrap dropdown form-control\\\" ng-class=\\\"{open: $select.open}\\\"><div><div class=\\\"ui-select-match\\\"></div><input type=\\\"text\\\" autocomplete=\\\"off\\\" autocorrect=\\\"off\\\" autocapitalize=\\\"off\\\" spellcheck=\\\"false\\\" class=\\\"ui-select-search input-xs\\\" placeholder=\\\"{{$select.getPlaceholder()}}\\\" ng-disabled=\\\"$select.disabled\\\" ng-hide=\\\"$select.disabled\\\" ng-click=\\\"$select.activate()\\\" ng-model=\\\"$select.search\\\"></div><div class=\\\"ui-select-choices\\\"></div></div>\");\n$templateCache.put(\"bootstrap/select.tpl.html\",\"<div class=\\\"ui-select-bootstrap dropdown\\\" ng-class=\\\"{open: $select.open}\\\"><div class=\\\"ui-select-match\\\"></div><input type=\\\"text\\\" autocomplete=\\\"off\\\" tabindex=\\\"-1\\\" class=\\\"form-control ui-select-search\\\" placeholder=\\\"{{$select.placeholder}}\\\" ng-model=\\\"$select.search\\\" ng-show=\\\"$select.searchEnabled && $select.open\\\"><div class=\\\"ui-select-choices\\\"></div></div>\");\n$templateCache.put(\"select2/choices.tpl.html\",\"<ul class=\\\"ui-select-choices ui-select-choices-content select2-results\\\"><li class=\\\"ui-select-choices-group\\\" ng-class=\\\"{\\'select2-result-with-children\\': $select.isGrouped}\\\"><div ng-show=\\\"$select.isGrouped\\\" class=\\\"ui-select-choices-group-label select2-result-label\\\" ng-bind-html=\\\"$group.name\\\"></div><ul ng-class=\\\"{\\'select2-result-sub\\': $select.isGrouped, \\'select2-result-single\\': !$select.isGrouped}\\\"><li class=\\\"ui-select-choices-row\\\" ng-class=\\\"{\\'select2-highlighted\\': $select.isActive(this), \\'select2-disabled\\': $select.isDisabled(this)}\\\"><div class=\\\"select2-result-label ui-select-choices-row-inner\\\"></div></li></ul></li></ul>\");\n$templateCache.put(\"select2/match-multiple.tpl.html\",\"<span class=\\\"ui-select-match\\\"><li class=\\\"ui-select-match-item select2-search-choice\\\" ng-repeat=\\\"$item in $select.selected\\\" ng-class=\\\"{\\'select2-search-choice-focus\\':$select.activeMatchIndex === $index, \\'select2-locked\\':$select.isLocked(this, $index)}\\\"><span uis-transclude-append=\\\"\\\"></span> <a href=\\\"javascript:;\\\" class=\\\"ui-select-match-close select2-search-choice-close\\\" ng-click=\\\"$select.removeChoice($index)\\\" tabindex=\\\"-1\\\"></a></li></span>\");\n$templateCache.put(\"select2/match.tpl.html\",\"<a class=\\\"select2-choice ui-select-match\\\" ng-class=\\\"{\\'select2-default\\': $select.isEmpty()}\\\" ng-click=\\\"$select.activate()\\\"><span ng-show=\\\"$select.isEmpty()\\\" class=\\\"select2-chosen\\\">{{$select.placeholder}}</span> <span ng-hide=\\\"$select.isEmpty()\\\" class=\\\"select2-chosen\\\" ng-transclude=\\\"\\\"></span> <abbr ng-if=\\\"$select.allowClear && !$select.isEmpty()\\\" class=\\\"select2-search-choice-close\\\" ng-click=\\\"$select.select(undefined)\\\"></abbr> <span class=\\\"select2-arrow ui-select-toggle\\\" ng-click=\\\"$select.toggle($event)\\\"><b></b></span></a>\");\n$templateCache.put(\"select2/select-multiple.tpl.html\",\"<div class=\\\"ui-select-multiple select2 select2-container select2-container-multi\\\" ng-class=\\\"{\\'select2-container-active select2-dropdown-open\\': $select.open,\\n                \\'select2-container-disabled\\': $select.disabled}\\\"><ul class=\\\"select2-choices\\\"><span class=\\\"ui-select-match\\\"></span><li class=\\\"select2-search-field\\\"><input type=\\\"text\\\" autocomplete=\\\"off\\\" autocorrect=\\\"off\\\" autocapitalize=\\\"off\\\" spellcheck=\\\"false\\\" class=\\\"select2-input ui-select-search\\\" placeholder=\\\"{{$select.getPlaceholder()}}\\\" ng-disabled=\\\"$select.disabled\\\" ng-hide=\\\"$select.disabled\\\" ng-model=\\\"$select.search\\\" ng-click=\\\"$select.activate()\\\" style=\\\"width: 34px;\\\"></li></ul><div class=\\\"select2-drop select2-with-searchbox select2-drop-active\\\" ng-class=\\\"{\\'select2-display-none\\': !$select.open}\\\"><div class=\\\"ui-select-choices\\\"></div></div></div>\");\n$templateCache.put(\"select2/select.tpl.html\",\"<div class=\\\"select2 select2-container\\\" ng-class=\\\"{\\'select2-container-active select2-dropdown-open\\': $select.open,\\n                \\'select2-container-disabled\\': $select.disabled,\\n                \\'select2-container-active\\': $select.focus, \\n                \\'select2-allowclear\\': $select.allowClear && !$select.isEmpty()}\\\"><div class=\\\"ui-select-match\\\"></div><div class=\\\"select2-drop select2-with-searchbox select2-drop-active\\\" ng-class=\\\"{\\'select2-display-none\\': !$select.open}\\\"><div class=\\\"select2-search\\\" ng-show=\\\"$select.searchEnabled\\\"><input type=\\\"text\\\" autocomplete=\\\"off\\\" autocorrect=\\\"off\\\" autocapitalize=\\\"off\\\" spellcheck=\\\"false\\\" class=\\\"ui-select-search select2-input\\\" ng-model=\\\"$select.search\\\"></div><div class=\\\"ui-select-choices\\\"></div></div></div>\");\n$templateCache.put(\"selectize/choices.tpl.html\",\"<div ng-show=\\\"$select.open\\\" class=\\\"ui-select-choices selectize-dropdown single\\\"><div class=\\\"ui-select-choices-content selectize-dropdown-content\\\"><div class=\\\"ui-select-choices-group optgroup\\\"><div ng-show=\\\"$select.isGrouped\\\" class=\\\"ui-select-choices-group-label optgroup-header\\\" ng-bind-html=\\\"$group.name\\\"></div><div class=\\\"ui-select-choices-row\\\" ng-class=\\\"{active: $select.isActive(this), disabled: $select.isDisabled(this)}\\\"><div class=\\\"option ui-select-choices-row-inner\\\" data-selectable=\\\"\\\"></div></div></div></div></div>\");\n$templateCache.put(\"selectize/match.tpl.html\",\"<div ng-hide=\\\"($select.open || $select.isEmpty())\\\" class=\\\"ui-select-match\\\" ng-transclude=\\\"\\\"></div>\");\n$templateCache.put(\"selectize/select.tpl.html\",\"<div class=\\\"selectize-control single\\\"><div class=\\\"selectize-input\\\" ng-class=\\\"{\\'focus\\': $select.open, \\'disabled\\': $select.disabled, \\'selectize-focus\\' : $select.focus}\\\" ng-click=\\\"$select.activate()\\\"><div class=\\\"ui-select-match\\\"></div><input type=\\\"text\\\" autocomplete=\\\"off\\\" tabindex=\\\"-1\\\" class=\\\"ui-select-search ui-select-toggle\\\" ng-click=\\\"$select.toggle($event)\\\" placeholder=\\\"{{$select.placeholder}}\\\" ng-model=\\\"$select.search\\\" ng-hide=\\\"!$select.searchEnabled || ($select.selected && !$select.open)\\\" ng-disabled=\\\"$select.disabled\\\"></div><div class=\\\"ui-select-choices\\\"></div></div>\");}]);","/**\n * angular-ui-utils - Swiss-Army-Knife of AngularJS tools (with no external dependencies!)\n * @version v0.2.3 - 2015-06-30\n * @link http://angular-ui.github.com\n * @license MIT License, http://www.opensource.org/licenses/MIT\n */\nangular.module('ui.alias', []).config(['$compileProvider', 'uiAliasConfig', function($compileProvider, uiAliasConfig){\n  'use strict';\n\n  uiAliasConfig = uiAliasConfig || {};\n  angular.forEach(uiAliasConfig, function(config, alias){\n    if (angular.isString(config)) {\n      config = {\n        replace: true,\n        template: config\n      };\n    }\n    $compileProvider.directive(alias, function(){\n      return config;\n    });\n  });\n}]);\n\n/**\n * General-purpose Event binding. Bind any event not natively supported by Angular\n * Pass an object with keynames for events to ui-event\n * Allows $event object and $params object to be passed\n *\n * @example <input ui-event=\"{ focus : 'counter++', blur : 'someCallback()' }\">\n * @example <input ui-event=\"{ myCustomEvent : 'myEventHandler($event, $params)'}\">\n *\n * @param ui-event {string|object literal} The event to bind to as a string or a hash of events with their callbacks\n */\nangular.module('ui.event',[]).directive('uiEvent', ['$parse',\n  function ($parse) {\n    'use strict';\n\n    return function ($scope, elm, attrs) {\n      var events = $scope.$eval(attrs.uiEvent);\n      angular.forEach(events, function (uiEvent, eventName) {\n        var fn = $parse(uiEvent);\n        elm.bind(eventName, function (evt) {\n          var params = Array.prototype.slice.call(arguments);\n          //Take out first paramater (event object);\n          params = params.splice(1);\n          fn($scope, {$event: evt, $params: params});\n          if (!$scope.$$phase) {\n            $scope.$apply();\n          }\n        });\n      });\n    };\n  }]);\n\n/**\n * A replacement utility for internationalization very similar to sprintf.\n *\n * @param replace {mixed} The tokens to replace depends on type\n *  string: all instances of $0 will be replaced\n *  array: each instance of $0, $1, $2 etc. will be placed with each array item in corresponding order\n *  object: all attributes will be iterated through, with :key being replaced with its corresponding value\n * @return string\n *\n * @example: 'Hello :name, how are you :day'.format({ name:'John', day:'Today' })\n * @example: 'Records $0 to $1 out of $2 total'.format(['10', '20', '3000'])\n * @example: '$0 agrees to all mentions $0 makes in the event that $0 hits a tree while $0 is driving drunk'.format('Bob')\n */\nangular.module('ui.format',[]).filter('format', function(){\n  'use strict';\n\n  return function(value, replace) {\n    var target = value;\n    if (angular.isString(target) && replace !== undefined) {\n      if (!angular.isArray(replace) && !angular.isObject(replace)) {\n        replace = [replace];\n      }\n      if (angular.isArray(replace)) {\n        var rlen = replace.length;\n        var rfx = function (str, i) {\n          i = parseInt(i, 10);\n          return (i >= 0 && i < rlen) ? replace[i] : str;\n        };\n        target = target.replace(/\\$([0-9]+)/g, rfx);\n      }\n      else {\n        angular.forEach(replace, function(value, key){\n          target = target.split(':' + key).join(value);\n        });\n      }\n    }\n    return target;\n  };\n});\n\n/**\n * Wraps the\n * @param text {string} haystack to search through\n * @param search {string} needle to search for\n * @param [caseSensitive] {boolean} optional boolean to use case-sensitive searching\n */\nangular.module('ui.highlight',[]).filter('highlight', function () {\n  'use strict';\n\n  return function (text, search, caseSensitive) {\n    if (text && (search || angular.isNumber(search))) {\n      text = text.toString();\n      search = search.toString();\n      if (caseSensitive) {\n        return text.split(search).join('<span class=\"ui-match\">' + search + '</span>');\n      } else {\n        return text.replace(new RegExp(search, 'gi'), '<span class=\"ui-match\">$&</span>');\n      }\n    } else {\n      return text;\n    }\n  };\n});\n\n// modeled after: angular-1.0.7/src/ng/directive/ngInclude.js\nangular.module('ui.include',[])\n.directive('uiInclude', ['$http', '$templateCache', '$anchorScroll', '$compile',\n                 function($http,   $templateCache,   $anchorScroll,   $compile) {\n  'use strict';\n\n  return {\n    restrict: 'ECA',\n    terminal: true,\n    compile: function(element, attr) {\n      var srcExp = attr.uiInclude || attr.src,\n          fragExp = attr.fragment || '',\n          onloadExp = attr.onload || '',\n          autoScrollExp = attr.autoscroll;\n\n      return function(scope, element) {\n        var changeCounter = 0,\n            childScope;\n\n        var clearContent = function() {\n          if (childScope) {\n            childScope.$destroy();\n            childScope = null;\n          }\n\n          element.html('');\n        };\n\n        function ngIncludeWatchAction() {\n          var thisChangeId = ++changeCounter;\n          var src = scope.$eval(srcExp);\n          var fragment = scope.$eval(fragExp);\n\n          if (src) {\n            $http.get(src, {cache: $templateCache}).success(function(response) {\n              if (thisChangeId !== changeCounter) { return; }\n\n              if (childScope) { childScope.$destroy(); }\n              childScope = scope.$new();\n\n              var contents;\n              if (fragment) {\n                contents = angular.element('<div/>').html(response).find(fragment);\n              }\n              else {\n                contents = angular.element('<div/>').html(response).contents();\n              }\n              element.html(contents);\n              $compile(contents)(childScope);\n\n              if (angular.isDefined(autoScrollExp) && (!autoScrollExp || scope.$eval(autoScrollExp))) {\n                $anchorScroll();\n              }\n\n              childScope.$emit('$includeContentLoaded');\n              scope.$eval(onloadExp);\n            }).error(function() {\n              if (thisChangeId === changeCounter) { clearContent(); }\n            });\n          } else { clearContent(); }\n        }\n\n        scope.$watch(fragExp, ngIncludeWatchAction);\n        scope.$watch(srcExp, ngIncludeWatchAction);\n      };\n    }\n  };\n}]);\n\n/**\n * Provides an easy way to toggle a checkboxes indeterminate property\n *\n * @example <input type=\"checkbox\" ui-indeterminate=\"isUnkown\">\n */\nangular.module('ui.indeterminate',[]).directive('uiIndeterminate', [\n  function () {\n    'use strict';\n\n    return {\n      compile: function(tElm, tAttrs) {\n        if (!tAttrs.type || tAttrs.type.toLowerCase() !== 'checkbox') {\n          return angular.noop;\n        }\n\n        return function ($scope, elm, attrs) {\n          $scope.$watch(attrs.uiIndeterminate, function(newVal) {\n            elm[0].indeterminate = !!newVal;\n          });\n        };\n      }\n    };\n  }]);\n\n/**\n * Converts variable-esque naming conventions to something presentational, capitalized words separated by space.\n * @param {String} value The value to be parsed and prettified.\n * @param {String} [inflector] The inflector to use. Default: humanize.\n * @return {String}\n * @example {{ 'Here Is my_phoneNumber' | inflector:'humanize' }} => Here Is My Phone Number\n *          {{ 'Here Is my_phoneNumber' | inflector:'underscore' }} => here_is_my_phone_number\n *          {{ 'Here Is my_phoneNumber' | inflector:'variable' }} => hereIsMyPhoneNumber\n */\nangular.module('ui.inflector',[]).filter('inflector', function () {\n  'use strict';\n\n  function tokenize(text) {\n    text = text.replace(/([A-Z])|([\\-|\\_])/g, function(_, $1) { return ' ' + ($1 || ''); });\n    return text.replace(/\\s\\s+/g, ' ').trim().toLowerCase().split(' ');\n  }\n\n  function capitalizeTokens(tokens) {\n    var result = [];\n    angular.forEach(tokens, function(token) {\n      result.push(token.charAt(0).toUpperCase() + token.substr(1));\n    });\n    return result;\n  }\n\n  var inflectors = {\n    humanize: function (value) {\n      return capitalizeTokens(tokenize(value)).join(' ');\n    },\n    underscore: function (value) {\n      return tokenize(value).join('_');\n    },\n    variable: function (value) {\n      value = tokenize(value);\n      value = value[0] + capitalizeTokens(value.slice(1)).join('');\n      return value;\n    }\n  };\n\n  return function (text, inflector) {\n    if (inflector !== false && angular.isString(text)) {\n      inflector = inflector || 'humanize';\n      return inflectors[inflector](text);\n    } else {\n      return text;\n    }\n  };\n});\n\n/**\n * General-purpose jQuery wrapper. Simply pass the plugin name as the expression.\n *\n * It is possible to specify a default set of parameters for each jQuery plugin.\n * Under the jq key, namespace each plugin by that which will be passed to ui-jq.\n * Unfortunately, at this time you can only pre-define the first parameter.\n * @example { jq : { datepicker : { showOn:'click' } } }\n *\n * @param ui-jq {string} The $elm.[pluginName]() to call.\n * @param [ui-options] {mixed} Expression to be evaluated and passed as options to the function\n *     Multiple parameters can be separated by commas\n * @param [ui-refresh] {expression} Watch expression and refire plugin on changes\n *\n * @example <input ui-jq=\"datepicker\" ui-options=\"{showOn:'click'},secondParameter,thirdParameter\" ui-refresh=\"iChange\">\n */\nangular.module('ui.jq',[]).\n  value('uiJqConfig',{}).\n  directive('uiJq', ['uiJqConfig', '$timeout', function uiJqInjectingFunction(uiJqConfig, $timeout) {\n  'use strict';\n\n\n  return {\n    restrict: 'A',\n    compile: function uiJqCompilingFunction(tElm, tAttrs) {\n\n      if (!angular.isFunction(tElm[tAttrs.uiJq])) {\n        throw new Error('ui-jq: The \"' + tAttrs.uiJq + '\" function does not exist');\n      }\n      var options = uiJqConfig && uiJqConfig[tAttrs.uiJq];\n\n      return function uiJqLinkingFunction(scope, elm, attrs) {\n\n        // If change compatibility is enabled, the form input's \"change\" event will trigger an \"input\" event\n        if (attrs.ngModel && elm.is('select,input,textarea')) {\n          elm.bind('change', function() {\n            elm.trigger('input');\n          });\n        }\n\n        function createLinkOptions(){\n          var linkOptions = [];\n\n          // If ui-options are passed, merge (or override) them onto global defaults and pass to the jQuery method\n          if (attrs.uiOptions) {\n            linkOptions = scope.$eval('[' + attrs.uiOptions + ']');\n            if (angular.isObject(options) && angular.isObject(linkOptions[0])) {\n              linkOptions[0] = angular.extend({}, options, linkOptions[0]);\n            }\n          } else if (options) {\n            linkOptions = [options];\n          }\n          return linkOptions;\n        }\n\n        // Call jQuery method and pass relevant options\n        function callPlugin() {\n          $timeout(function() {\n            elm[attrs.uiJq].apply(elm, createLinkOptions());\n          }, 0, false);\n        }\n\n        // If ui-refresh is used, re-fire the the method upon every change\n        if (attrs.uiRefresh) {\n          scope.$watch(attrs.uiRefresh, function() {\n            callPlugin();\n          });\n        }\n        callPlugin();\n      };\n    }\n  };\n}]);\n\nangular.module('ui.keypress',[]).\nfactory('keypressHelper', ['$parse', function keypress($parse){\n  'use strict';\n\n  var keysByCode = {\n    8: 'backspace',\n    9: 'tab',\n    13: 'enter',\n    27: 'esc',\n    32: 'space',\n    33: 'pageup',\n    34: 'pagedown',\n    35: 'end',\n    36: 'home',\n    37: 'left',\n    38: 'up',\n    39: 'right',\n    40: 'down',\n    45: 'insert',\n    46: 'delete'\n  };\n\n  var capitaliseFirstLetter = function (string) {\n    return string.charAt(0).toUpperCase() + string.slice(1);\n  };\n\n  return function(mode, scope, elm, attrs) {\n    var params, combinations = [];\n    params = scope.$eval(attrs['ui'+capitaliseFirstLetter(mode)]);\n\n    // Prepare combinations for simple checking\n    angular.forEach(params, function (v, k) {\n      var combination, expression;\n      expression = $parse(v);\n\n      angular.forEach(k.split(' '), function(variation) {\n        combination = {\n          expression: expression,\n          keys: {}\n        };\n        angular.forEach(variation.split('-'), function (value) {\n          combination.keys[value] = true;\n        });\n        combinations.push(combination);\n      });\n    });\n\n    // Check only matching of pressed keys one of the conditions\n    elm.bind(mode, function (event) {\n      // No need to do that inside the cycle\n      var metaPressed = !!(event.metaKey && !event.ctrlKey);\n      var altPressed = !!event.altKey;\n      var ctrlPressed = !!event.ctrlKey;\n      var shiftPressed = !!event.shiftKey;\n      var keyCode = event.keyCode;\n\n      // normalize keycodes\n      if (mode === 'keypress' && !shiftPressed && keyCode >= 97 && keyCode <= 122) {\n        keyCode = keyCode - 32;\n      }\n\n      // Iterate over prepared combinations\n      angular.forEach(combinations, function (combination) {\n\n        var mainKeyPressed = combination.keys[keysByCode[keyCode]] || combination.keys[keyCode.toString()];\n\n        var metaRequired = !!combination.keys.meta;\n        var altRequired = !!combination.keys.alt;\n        var ctrlRequired = !!combination.keys.ctrl;\n        var shiftRequired = !!combination.keys.shift;\n\n        if (\n          mainKeyPressed &&\n          ( metaRequired === metaPressed ) &&\n          ( altRequired === altPressed ) &&\n          ( ctrlRequired === ctrlPressed ) &&\n          ( shiftRequired === shiftPressed )\n        ) {\n          // Run the function\n          scope.$apply(function () {\n            combination.expression(scope, { '$event': event });\n          });\n        }\n      });\n    });\n  };\n}]);\n\n/**\n * Bind one or more handlers to particular keys or their combination\n * @param hash {mixed} keyBindings Can be an object or string where keybinding expression of keys or keys combinations and AngularJS Exspressions are set. Object syntax: \"{ keys1: expression1 [, keys2: expression2 [ , ... ]]}\". String syntax: \"\"expression1 on keys1 [ and expression2 on keys2 [ and ... ]]\"\". Expression is an AngularJS Expression, and key(s) are dash-separated combinations of keys and modifiers (one or many, if any. Order does not matter). Supported modifiers are 'ctrl', 'shift', 'alt' and key can be used either via its keyCode (13 for Return) or name. Named keys are 'backspace', 'tab', 'enter', 'esc', 'space', 'pageup', 'pagedown', 'end', 'home', 'left', 'up', 'right', 'down', 'insert', 'delete'.\n * @example <input ui-keypress=\"{enter:'x = 1', 'ctrl-shift-space':'foo()', 'shift-13':'bar()'}\" /> <input ui-keypress=\"foo = 2 on ctrl-13 and bar('hello') on shift-esc\" />\n **/\nangular.module('ui.keypress').directive('uiKeydown', ['keypressHelper', function(keypressHelper){\n  'use strict';\n\n  return {\n    link: function (scope, elm, attrs) {\n      keypressHelper('keydown', scope, elm, attrs);\n    }\n  };\n}]);\n\nangular.module('ui.keypress').directive('uiKeypress', ['keypressHelper', function(keypressHelper){\n  'use strict';\n\n  return {\n    link: function (scope, elm, attrs) {\n      keypressHelper('keypress', scope, elm, attrs);\n    }\n  };\n}]);\n\nangular.module('ui.keypress').directive('uiKeyup', ['keypressHelper', function(keypressHelper){\n  'use strict';\n\n  return {\n    link: function (scope, elm, attrs) {\n      keypressHelper('keyup', scope, elm, attrs);\n    }\n  };\n}]);\n\n/*\n Attaches input mask onto input element\n */\nangular.module('ui.mask', [])\n  .value('uiMaskConfig', {\n    'maskDefinitions': {\n      '9': /\\d/,\n      'A': /[a-zA-Z]/,\n      '*': /[a-zA-Z0-9]/\n    },\n    'clearOnBlur': true\n  })\n  .directive('uiMask', ['uiMaskConfig', '$parse', function (maskConfig, $parse) {\n    'use strict';\n\n    return {\n      priority: 100,\n      require: 'ngModel',\n      restrict: 'A',\n      compile: function uiMaskCompilingFunction(){\n        var options = maskConfig;\n\n        return function uiMaskLinkingFunction(scope, iElement, iAttrs, controller){\n          var maskProcessed = false, eventsBound = false,\n            maskCaretMap, maskPatterns, maskPlaceholder, maskComponents,\n          // Minimum required length of the value to be considered valid\n            minRequiredLength,\n            value, valueMasked, isValid,\n          // Vars for initializing/uninitializing\n            originalPlaceholder = iAttrs.placeholder,\n            originalMaxlength = iAttrs.maxlength,\n          // Vars used exclusively in eventHandler()\n            oldValue, oldValueUnmasked, oldCaretPosition, oldSelectionLength;\n\n          function initialize(maskAttr){\n            if (!angular.isDefined(maskAttr)) {\n              return uninitialize();\n            }\n            processRawMask(maskAttr);\n            if (!maskProcessed) {\n              return uninitialize();\n            }\n            initializeElement();\n            bindEventListeners();\n            return true;\n          }\n\n          function initPlaceholder(placeholderAttr) {\n            if(! angular.isDefined(placeholderAttr)) {\n              return;\n            }\n\n            maskPlaceholder = placeholderAttr;\n\n            // If the mask is processed, then we need to update the value\n            if (maskProcessed) {\n              eventHandler();\n            }\n          }\n\n          function formatter(fromModelValue){\n            if (!maskProcessed) {\n              return fromModelValue;\n            }\n            value = unmaskValue(fromModelValue || '');\n            isValid = validateValue(value);\n            controller.$setValidity('mask', isValid);\n            return isValid && value.length ? maskValue(value) : undefined;\n          }\n\n          function parser(fromViewValue){\n            if (!maskProcessed) {\n              return fromViewValue;\n            }\n            value = unmaskValue(fromViewValue || '');\n            isValid = validateValue(value);\n            // We have to set viewValue manually as the reformatting of the input\n            // value performed by eventHandler() doesn't happen until after\n            // this parser is called, which causes what the user sees in the input\n            // to be out-of-sync with what the controller's $viewValue is set to.\n            controller.$viewValue = value.length ? maskValue(value) : '';\n            controller.$setValidity('mask', isValid);\n            if (value === '' && iAttrs.required) {\n                controller.$setValidity('required', !controller.$error.required);\n            }\n            return isValid ? value : undefined;\n          }\n\n          var linkOptions = {};\n\n          if (iAttrs.uiOptions) {\n            linkOptions = scope.$eval('[' + iAttrs.uiOptions + ']');\n            if (angular.isObject(linkOptions[0])) {\n              // we can't use angular.copy nor angular.extend, they lack the power to do a deep merge\n              linkOptions = (function(original, current){\n                for(var i in original) {\n                  if (Object.prototype.hasOwnProperty.call(original, i)) {\n                    if (current[i] === undefined) {\n                      current[i] = angular.copy(original[i]);\n                    } else {\n                      angular.extend(current[i], original[i]);\n                    }\n                  }\n                }\n                return current;\n              })(options, linkOptions[0]);\n            }\n          } else {\n            linkOptions = options;\n          }\n\n          iAttrs.$observe('uiMask', initialize);\n          iAttrs.$observe('placeholder', initPlaceholder);\n          var modelViewValue = false;\n          iAttrs.$observe('modelViewValue', function(val) {\n            if(val === 'true') {\n              modelViewValue = true;\n            }\n          });\n          scope.$watch(iAttrs.ngModel, function(val) {\n            if(modelViewValue && val) {\n              var model = $parse(iAttrs.ngModel);\n              model.assign(scope, controller.$viewValue);\n            }\n          });\n          controller.$formatters.push(formatter);\n          controller.$parsers.push(parser);\n\n          function uninitialize(){\n            maskProcessed = false;\n            unbindEventListeners();\n\n            if (angular.isDefined(originalPlaceholder)) {\n              iElement.attr('placeholder', originalPlaceholder);\n            } else {\n              iElement.removeAttr('placeholder');\n            }\n\n            if (angular.isDefined(originalMaxlength)) {\n              iElement.attr('maxlength', originalMaxlength);\n            } else {\n              iElement.removeAttr('maxlength');\n            }\n\n            iElement.val(controller.$modelValue);\n            controller.$viewValue = controller.$modelValue;\n            return false;\n          }\n\n          function initializeElement(){\n            value = oldValueUnmasked = unmaskValue(controller.$viewValue || '');\n            valueMasked = oldValue = maskValue(value);\n            isValid = validateValue(value);\n            var viewValue = isValid && value.length ? valueMasked : '';\n            if (iAttrs.maxlength) { // Double maxlength to allow pasting new val at end of mask\n              iElement.attr('maxlength', maskCaretMap[maskCaretMap.length - 1] * 2);\n            }\n            iElement.attr('placeholder', maskPlaceholder);\n            iElement.val(viewValue);\n            controller.$viewValue = viewValue;\n            // Not using $setViewValue so we don't clobber the model value and dirty the form\n            // without any kind of user interaction.\n          }\n\n          function bindEventListeners(){\n            if (eventsBound) {\n              return;\n            }\n            iElement.bind('blur', blurHandler);\n            iElement.bind('mousedown mouseup', mouseDownUpHandler);\n            iElement.bind('input keyup click focus', eventHandler);\n            eventsBound = true;\n          }\n\n          function unbindEventListeners(){\n            if (!eventsBound) {\n              return;\n            }\n            iElement.unbind('blur', blurHandler);\n            iElement.unbind('mousedown', mouseDownUpHandler);\n            iElement.unbind('mouseup', mouseDownUpHandler);\n            iElement.unbind('input', eventHandler);\n            iElement.unbind('keyup', eventHandler);\n            iElement.unbind('click', eventHandler);\n            iElement.unbind('focus', eventHandler);\n            eventsBound = false;\n          }\n\n          function validateValue(value){\n            // Zero-length value validity is ngRequired's determination\n            return value.length ? value.length >= minRequiredLength : true;\n          }\n\n          function unmaskValue(value){\n            var valueUnmasked = '',\n              maskPatternsCopy = maskPatterns.slice();\n            // Preprocess by stripping mask components from value\n            value = value.toString();\n            angular.forEach(maskComponents, function (component){\n              value = value.replace(component, '');\n            });\n            angular.forEach(value.split(''), function (chr){\n              if (maskPatternsCopy.length && maskPatternsCopy[0].test(chr)) {\n                valueUnmasked += chr;\n                maskPatternsCopy.shift();\n              }\n            });\n            return valueUnmasked;\n          }\n\n          function maskValue(unmaskedValue){\n            var valueMasked = '',\n                maskCaretMapCopy = maskCaretMap.slice();\n\n            angular.forEach(maskPlaceholder.split(''), function (chr, i){\n              if (unmaskedValue.length && i === maskCaretMapCopy[0]) {\n                valueMasked  += unmaskedValue.charAt(0) || '_';\n                unmaskedValue = unmaskedValue.substr(1);\n                maskCaretMapCopy.shift();\n              }\n              else {\n                valueMasked += chr;\n              }\n            });\n            return valueMasked;\n          }\n\n          function getPlaceholderChar(i) {\n            var placeholder = iAttrs.placeholder;\n\n            if (typeof placeholder !== 'undefined' && placeholder[i]) {\n              return placeholder[i];\n            } else {\n              return '_';\n            }\n          }\n\n          // Generate array of mask components that will be stripped from a masked value\n          // before processing to prevent mask components from being added to the unmasked value.\n          // E.g., a mask pattern of '+7 9999' won't have the 7 bleed into the unmasked value.\n          // If a maskable char is followed by a mask char and has a mask\n          // char behind it, we'll split it into it's own component so if\n          // a user is aggressively deleting in the input and a char ahead\n          // of the maskable char gets deleted, we'll still be able to strip\n          // it in the unmaskValue() preprocessing.\n          function getMaskComponents() {\n            return maskPlaceholder.replace(/[_]+/g, '_').replace(/([^_]+)([a-zA-Z0-9])([^_])/g, '$1$2_$3').split('_');\n          }\n\n          function processRawMask(mask){\n            var characterCount = 0;\n\n            maskCaretMap    = [];\n            maskPatterns    = [];\n            maskPlaceholder = '';\n\n            if (typeof mask === 'string') {\n              minRequiredLength = 0;\n\n              var isOptional = false,\n                  numberOfOptionalCharacters = 0,\n                  splitMask  = mask.split('');\n\n              angular.forEach(splitMask, function (chr, i){\n                if (linkOptions.maskDefinitions[chr]) {\n\n                  maskCaretMap.push(characterCount);\n\n                  maskPlaceholder += getPlaceholderChar(i - numberOfOptionalCharacters);\n                  maskPatterns.push(linkOptions.maskDefinitions[chr]);\n\n                  characterCount++;\n                  if (!isOptional) {\n                    minRequiredLength++;\n                  }\n                }\n                else if (chr === '?') {\n                  isOptional = true;\n                  numberOfOptionalCharacters++;\n                }\n                else {\n                  maskPlaceholder += chr;\n                  characterCount++;\n                }\n              });\n            }\n            // Caret position immediately following last position is valid.\n            maskCaretMap.push(maskCaretMap.slice().pop() + 1);\n\n            maskComponents = getMaskComponents();\n            maskProcessed  = maskCaretMap.length > 1 ? true : false;\n          }\n\n          function blurHandler(){\n            if (linkOptions.clearOnBlur) {\n              oldCaretPosition = 0;\n              oldSelectionLength = 0;\n              if (!isValid || value.length === 0) {\n                valueMasked = '';\n                iElement.val('');\n                scope.$apply(function () {\n                  controller.$setViewValue('');\n                });\n              }\n            }\n          }\n\n          function mouseDownUpHandler(e){\n            if (e.type === 'mousedown') {\n              iElement.bind('mouseout', mouseoutHandler);\n            } else {\n              iElement.unbind('mouseout', mouseoutHandler);\n            }\n          }\n\n          iElement.bind('mousedown mouseup', mouseDownUpHandler);\n\n          function mouseoutHandler(){\n            /*jshint validthis: true */\n            oldSelectionLength = getSelectionLength(this);\n            iElement.unbind('mouseout', mouseoutHandler);\n          }\n\n          function eventHandler(e){\n            /*jshint validthis: true */\n            e = e || {};\n            // Allows more efficient minification\n            var eventWhich = e.which,\n              eventType = e.type;\n\n            // Prevent shift and ctrl from mucking with old values\n            if (eventWhich === 16 || eventWhich === 91) { return;}\n\n            var val = iElement.val(),\n              valOld = oldValue,\n              valMasked,\n              valUnmasked = unmaskValue(val),\n              valUnmaskedOld = oldValueUnmasked,\n              valAltered = false,\n\n              caretPos = getCaretPosition(this) || 0,\n              caretPosOld = oldCaretPosition || 0,\n              caretPosDelta = caretPos - caretPosOld,\n              caretPosMin = maskCaretMap[0],\n              caretPosMax = maskCaretMap[valUnmasked.length] || maskCaretMap.slice().shift(),\n\n              selectionLenOld = oldSelectionLength || 0,\n              isSelected = getSelectionLength(this) > 0,\n              wasSelected = selectionLenOld > 0,\n\n            // Case: Typing a character to overwrite a selection\n              isAddition = (val.length > valOld.length) || (selectionLenOld && val.length > valOld.length - selectionLenOld),\n            // Case: Delete and backspace behave identically on a selection\n              isDeletion = (val.length < valOld.length) || (selectionLenOld && val.length === valOld.length - selectionLenOld),\n              isSelection = (eventWhich >= 37 && eventWhich <= 40) && e.shiftKey, // Arrow key codes\n\n              isKeyLeftArrow = eventWhich === 37,\n            // Necessary due to \"input\" event not providing a key code\n              isKeyBackspace = eventWhich === 8 || (eventType !== 'keyup' && isDeletion && (caretPosDelta === -1)),\n              isKeyDelete = eventWhich === 46 || (eventType !== 'keyup' && isDeletion && (caretPosDelta === 0 ) && !wasSelected),\n\n            // Handles cases where caret is moved and placed in front of invalid maskCaretMap position. Logic below\n            // ensures that, on click or leftward caret placement, caret is moved leftward until directly right of\n            // non-mask character. Also applied to click since users are (arguably) more likely to backspace\n            // a character when clicking within a filled input.\n              caretBumpBack = (isKeyLeftArrow || isKeyBackspace || eventType === 'click') && caretPos > caretPosMin;\n\n            oldSelectionLength = getSelectionLength(this);\n\n            // These events don't require any action\n            if (isSelection || (isSelected && (eventType === 'click' || eventType === 'keyup'))) {\n              return;\n            }\n\n            // Value Handling\n            // ==============\n\n            // User attempted to delete but raw value was unaffected--correct this grievous offense\n            if ((eventType === 'input') && isDeletion && !wasSelected && valUnmasked === valUnmaskedOld) {\n              while (isKeyBackspace && caretPos > caretPosMin && !isValidCaretPosition(caretPos)) {\n                caretPos--;\n              }\n              while (isKeyDelete && caretPos < caretPosMax && maskCaretMap.indexOf(caretPos) === -1) {\n                caretPos++;\n              }\n              var charIndex = maskCaretMap.indexOf(caretPos);\n              // Strip out non-mask character that user would have deleted if mask hadn't been in the way.\n              valUnmasked = valUnmasked.substring(0, charIndex) + valUnmasked.substring(charIndex + 1);\n              valAltered = true;\n            }\n\n            // Update values\n            valMasked = maskValue(valUnmasked);\n\n            oldValue = valMasked;\n            oldValueUnmasked = valUnmasked;\n            iElement.val(valMasked);\n            if (valAltered) {\n              // We've altered the raw value after it's been $digest'ed, we need to $apply the new value.\n              scope.$apply(function (){\n                controller.$setViewValue(valUnmasked);\n              });\n            }\n\n            // Caret Repositioning\n            // ===================\n\n            // Ensure that typing always places caret ahead of typed character in cases where the first char of\n            // the input is a mask char and the caret is placed at the 0 position.\n            if (isAddition && (caretPos <= caretPosMin)) {\n              caretPos = caretPosMin + 1;\n            }\n\n            if (caretBumpBack) {\n              caretPos--;\n            }\n\n            // Make sure caret is within min and max position limits\n            caretPos = caretPos > caretPosMax ? caretPosMax : caretPos < caretPosMin ? caretPosMin : caretPos;\n\n            // Scoot the caret back or forth until it's in a non-mask position and within min/max position limits\n            while (!isValidCaretPosition(caretPos) && caretPos > caretPosMin && caretPos < caretPosMax) {\n              caretPos += caretBumpBack ? -1 : 1;\n            }\n\n            if ((caretBumpBack && caretPos < caretPosMax) || (isAddition && !isValidCaretPosition(caretPosOld))) {\n              caretPos++;\n            }\n            oldCaretPosition = caretPos;\n            setCaretPosition(this, caretPos);\n          }\n\n          function isValidCaretPosition(pos){ return maskCaretMap.indexOf(pos) > -1; }\n\n          function getCaretPosition(input){\n            if (!input) return 0;\n            if (input.selectionStart !== undefined) {\n              return input.selectionStart;\n            } else if (document.selection) {\n              if (iElement.is(':focus')) {\n                // Curse you IE\n                input.focus();\n                var selection = document.selection.createRange();\n                selection.moveStart('character', input.value ? -input.value.length : 0);\n                return selection.text.length;\n              }\n            }\n            return 0;\n          }\n\n          function setCaretPosition(input, pos){\n            if (!input) return 0;\n            if (input.offsetWidth === 0 || input.offsetHeight === 0) {\n              return; // Input's hidden\n            }\n            if (input.setSelectionRange) {\n              if (iElement.is(':focus')) {\n                input.focus();\n                input.setSelectionRange(pos, pos);\n              }\n            }\n            else if (input.createTextRange) {\n                // Curse you IE\n                var range = input.createTextRange();\n                range.collapse(true);\n                range.moveEnd('character', pos);\n                range.moveStart('character', pos);\n                range.select();\n            }\n          }\n\n          function getSelectionLength(input){\n            if (!input) return 0;\n            if (input.selectionStart !== undefined) {\n              return (input.selectionEnd - input.selectionStart);\n            }\n            if (document.selection) {\n              return (document.selection.createRange().text.length);\n            }\n            return 0;\n          }\n\n          // https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Array/indexOf\n          if (!Array.prototype.indexOf) {\n            Array.prototype.indexOf = function (searchElement /*, fromIndex */){\n              if (this === null) {\n                throw new TypeError();\n              }\n              var t = Object(this);\n              var len = t.length >>> 0;\n              if (len === 0) {\n                return -1;\n              }\n              var n = 0;\n              if (arguments.length > 1) {\n                n = Number(arguments[1]);\n                if (n !== n) { // shortcut for verifying if it's NaN\n                  n = 0;\n                } else if (n !== 0 && n !== Infinity && n !== -Infinity) {\n                  n = (n > 0 || -1) * Math.floor(Math.abs(n));\n                }\n              }\n              if (n >= len) {\n                return -1;\n              }\n              var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);\n              for (; k < len; k++) {\n                if (k in t && t[k] === searchElement) {\n                  return k;\n                }\n              }\n              return -1;\n            };\n          }\n\n        };\n      }\n    };\n  }\n]);\n\n/**\n * Add a clear button to form inputs to reset their value\n */\nangular.module('ui.reset',[]).value('uiResetConfig',null).directive('uiReset', ['uiResetConfig', function (uiResetConfig) {\n  'use strict';\n\n  var resetValue = null;\n  if (uiResetConfig !== undefined){\n      resetValue = uiResetConfig;\n  }\n  return {\n    require: 'ngModel',\n    link: function (scope, elm, attrs, ctrl) {\n      var aElement;\n      aElement = angular.element('<a class=\"ui-reset\" />');\n      elm.wrap('<span class=\"ui-resetwrap\" />').after(aElement);\n      aElement.bind('click', function (e) {\n        e.preventDefault();\n        scope.$apply(function () {\n          if (attrs.uiReset){\n            ctrl.$setViewValue(scope.$eval(attrs.uiReset));\n          }else{\n            ctrl.$setViewValue(resetValue);\n          }\n          ctrl.$render();\n        });\n      });\n    }\n  };\n}]);\n\n/**\n * Set a $uiRoute boolean to see if the current route matches\n */\nangular.module('ui.route', []).directive('uiRoute', ['$location', '$parse', function ($location, $parse) {\n  'use strict';\n\n  return {\n    restrict: 'AC',\n    scope: true,\n    compile: function(tElement, tAttrs) {\n      var useProperty;\n      if (tAttrs.uiRoute) {\n        useProperty = 'uiRoute';\n      } else if (tAttrs.ngHref) {\n        useProperty = 'ngHref';\n      } else if (tAttrs.href) {\n        useProperty = 'href';\n      } else {\n        throw new Error('uiRoute missing a route or href property on ' + tElement[0]);\n      }\n      return function ($scope, elm, attrs) {\n        var modelSetter = $parse(attrs.ngModel || attrs.routeModel || '$uiRoute').assign;\n        var watcher = angular.noop;\n\n        // Used by href and ngHref\n        function staticWatcher(newVal) {\n          var hash = newVal.indexOf('#');\n          if (hash > -1){\n            newVal = newVal.substr(hash + 1);\n          }\n          watcher = function watchHref() {\n            modelSetter($scope, ($location.path().indexOf(newVal) > -1));\n          };\n          watcher();\n        }\n        // Used by uiRoute\n        function regexWatcher(newVal) {\n          var hash = newVal.indexOf('#');\n          if (hash > -1){\n            newVal = newVal.substr(hash + 1);\n          }\n          watcher = function watchRegex() {\n            var regexp = new RegExp('^' + newVal + '$', ['i']);\n            modelSetter($scope, regexp.test($location.path()));\n          };\n          watcher();\n        }\n\n        switch (useProperty) {\n          case 'uiRoute':\n            // if uiRoute={{}} this will be undefined, otherwise it will have a value and $observe() never gets triggered\n            if (attrs.uiRoute){\n              regexWatcher(attrs.uiRoute);\n            }else{\n              attrs.$observe('uiRoute', regexWatcher);\n            }\n            break;\n          case 'ngHref':\n            // Setup watcher() every time ngHref changes\n            if (attrs.ngHref){\n              staticWatcher(attrs.ngHref);\n            }else{\n              attrs.$observe('ngHref', staticWatcher);\n            }\n            break;\n          case 'href':\n            // Setup watcher()\n            staticWatcher(attrs.href);\n        }\n\n        $scope.$on('$routeChangeSuccess', function(){\n          watcher();\n        });\n\n        //Added for compatibility with ui-router\n        $scope.$on('$stateChangeSuccess', function(){\n          watcher();\n        });\n      };\n    }\n  };\n}]);\n\nangular.module('ui.scroll.jqlite', ['ui.scroll']).service('jqLiteExtras', [\n  '$log', '$window', function(console, window) {\n    'use strict';\n\n    return {\n      registerFor: function(element) {\n        var convertToPx, css, getMeasurements, getStyle, getWidthHeight, isWindow, scrollTo;\n        css = angular.element.prototype.css;\n        element.prototype.css = function(name, value) {\n          var elem, self;\n          self = this;\n          elem = self[0];\n          if (!(!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style)) {\n            return css.call(self, name, value);\n          }\n        };\n        isWindow = function(obj) {\n          return obj && obj.document && obj.location && obj.alert && obj.setInterval;\n        };\n        scrollTo = function(self, direction, value) {\n          var elem, method, preserve, prop, _ref;\n          elem = self[0];\n          _ref = {\n            top: ['scrollTop', 'pageYOffset', 'scrollLeft'],\n            left: ['scrollLeft', 'pageXOffset', 'scrollTop']\n          }[direction], method = _ref[0], prop = _ref[1], preserve = _ref[2];\n          if (isWindow(elem)) {\n            if (angular.isDefined(value)) {\n              return elem.scrollTo(self[preserve].call(self), value);\n            } else {\n              if (prop in elem) {\n                return elem[prop];\n              } else {\n                return elem.document.documentElement[method];\n              }\n            }\n          } else {\n            if (angular.isDefined(value)) {\n              return elem[method] = value;\n            } else {\n              return elem[method];\n            }\n          }\n        };\n        if (window.getComputedStyle) {\n          getStyle = function(elem) {\n            return window.getComputedStyle(elem, null);\n          };\n          convertToPx = function(elem, value) {\n            return parseFloat(value);\n          };\n        } else {\n          getStyle = function(elem) {\n            return elem.currentStyle;\n          };\n          convertToPx = function(elem, value) {\n            var core_pnum, left, result, rnumnonpx, rs, rsLeft, style;\n            core_pnum = /[+-]?(?:\\d*\\.|)\\d+(?:[eE][+-]?\\d+|)/.source;\n            rnumnonpx = new RegExp('^(' + core_pnum + ')(?!px)[a-z%]+$', 'i');\n            if (!rnumnonpx.test(value)) {\n              return parseFloat(value);\n            } else {\n              style = elem.style;\n              left = style.left;\n              rs = elem.runtimeStyle;\n              rsLeft = rs && rs.left;\n              if (rs) {\n                rs.left = style.left;\n              }\n              style.left = value;\n              result = style.pixelLeft;\n              style.left = left;\n              if (rsLeft) {\n                rs.left = rsLeft;\n              }\n              return result;\n            }\n          };\n        }\n        getMeasurements = function(elem, measure) {\n          var base, borderA, borderB, computedMarginA, computedMarginB, computedStyle, dirA, dirB, marginA, marginB, paddingA, paddingB, _ref;\n          if (isWindow(elem)) {\n            base = document.documentElement[{\n              height: 'clientHeight',\n              width: 'clientWidth'\n            }[measure]];\n            return {\n              base: base,\n              padding: 0,\n              border: 0,\n              margin: 0\n            };\n          }\n          _ref = {\n            width: [elem.offsetWidth, 'Left', 'Right'],\n            height: [elem.offsetHeight, 'Top', 'Bottom']\n          }[measure], base = _ref[0], dirA = _ref[1], dirB = _ref[2];\n          computedStyle = getStyle(elem);\n          paddingA = convertToPx(elem, computedStyle['padding' + dirA]) || 0;\n          paddingB = convertToPx(elem, computedStyle['padding' + dirB]) || 0;\n          borderA = convertToPx(elem, computedStyle['border' + dirA + 'Width']) || 0;\n          borderB = convertToPx(elem, computedStyle['border' + dirB + 'Width']) || 0;\n          computedMarginA = computedStyle['margin' + dirA];\n          computedMarginB = computedStyle['margin' + dirB];\n          marginA = convertToPx(elem, computedMarginA) || 0;\n          marginB = convertToPx(elem, computedMarginB) || 0;\n          return {\n            base: base,\n            padding: paddingA + paddingB,\n            border: borderA + borderB,\n            margin: marginA + marginB\n          };\n        };\n        getWidthHeight = function(elem, direction, measure) {\n          var computedStyle, measurements, result;\n          measurements = getMeasurements(elem, direction);\n          if (measurements.base > 0) {\n            return {\n              base: measurements.base - measurements.padding - measurements.border,\n              outer: measurements.base,\n              outerfull: measurements.base + measurements.margin\n            }[measure];\n          } else {\n            computedStyle = getStyle(elem);\n            result = computedStyle[direction];\n            if (result < 0 || result === null) {\n              result = elem.style[direction] || 0;\n            }\n            result = parseFloat(result) || 0;\n            return {\n              base: result - measurements.padding - measurements.border,\n              outer: result,\n              outerfull: result + measurements.padding + measurements.border + measurements.margin\n            }[measure];\n          }\n        };\n        return angular.forEach({\n          before: function(newElem) {\n            var children, elem, i, parent, self, _i, _ref;\n            self = this;\n            elem = self[0];\n            parent = self.parent();\n            children = parent.contents();\n            if (children[0] === elem) {\n              return parent.prepend(newElem);\n            } else {\n              for (i = _i = 1, _ref = children.length - 1; 1 <= _ref ? _i <= _ref : _i >= _ref; i = 1 <= _ref ? ++_i : --_i) {\n                if (children[i] === elem) {\n                  angular.element(children[i - 1]).after(newElem);\n                  return;\n                }\n              }\n              throw new Error('invalid DOM structure ' + elem.outerHTML);\n            }\n          },\n          height: function(value) {\n            var self;\n            self = this;\n            if (angular.isDefined(value)) {\n              if (angular.isNumber(value)) {\n                value = value + 'px';\n              }\n              return css.call(self, 'height', value);\n            } else {\n              return getWidthHeight(this[0], 'height', 'base');\n            }\n          },\n          outerHeight: function(option) {\n            return getWidthHeight(this[0], 'height', option ? 'outerfull' : 'outer');\n          },\n          /*\n          UIScroller no longer relies on jQuery method offset. The jQLite implementation of the method\n          is kept here just for the reference. Also the offset setter method was never implemented\n          */\n\n          offset: function(value) {\n            var box, doc, docElem, elem, self, win;\n            self = this;\n            if (arguments.length) {\n              if (value === void 0) {\n                return self;\n              } else {\n                throw new Error('offset setter method is not implemented');\n              }\n            }\n            box = {\n              top: 0,\n              left: 0\n            };\n            elem = self[0];\n            doc = elem && elem.ownerDocument;\n            if (!doc) {\n              return;\n            }\n            docElem = doc.documentElement;\n            if (elem.getBoundingClientRect != null) {\n              box = elem.getBoundingClientRect();\n            }\n            win = doc.defaultView || doc.parentWindow;\n            return {\n              top: box.top + (win.pageYOffset || docElem.scrollTop) - (docElem.clientTop || 0),\n              left: box.left + (win.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || 0)\n            };\n          },\n          scrollTop: function(value) {\n            return scrollTo(this, 'top', value);\n          },\n          scrollLeft: function(value) {\n            return scrollTo(this, 'left', value);\n          }\n        }, function(value, key) {\n          if (!element.prototype[key]) {\n            return element.prototype[key] = value;\n          }\n        });\n      }\n    };\n  }\n]).run([\n  '$log', '$window', 'jqLiteExtras', function(console, window, jqLiteExtras) {\n    'use strict';\n\n    if (!window.jQuery) {\n      return jqLiteExtras.registerFor(angular.element);\n    }\n  }\n]);\n\n/*\n//# sourceURL=src/scripts/ui-scroll-jqlite.js\n*/\n\n\n/*\n globals: angular, window\n\n List of used element methods available in JQuery but not in JQuery Lite\n\n element.before(elem)\n element.height()\n element.outerHeight(true)\n element.height(value) = only for Top/Bottom padding elements\n element.scrollTop()\n element.scrollTop(value)\n */\nangular.module('ui.scroll', []).directive('uiScrollViewport', [\n\t'$log', function() {\n\t\t'use strict';\n\n\t\treturn {\n\t\t\tcontroller: [\n\t\t\t\t'$scope', '$element', function(scope, element) {\n\t\t\t\t\tthis.viewport = element;\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t]\n\t\t};\n\t}\n]).directive('uiScroll', [\n\t'$log', '$injector', '$rootScope', '$timeout', function(console, $injector, $rootScope, $timeout) {\n\t\t'use strict';\n\n\t\treturn {\n\t\t\trequire: ['?^uiScrollViewport'],\n\t\t\ttransclude: 'element',\n\t\t\tpriority: 1000,\n\t\t\tterminal: true,\n\t\t\tcompile: function(elementTemplate, attr, linker) {\n\t\t\t\treturn function($scope, element, $attr, controllers) {\n\t\t\t\t\tvar adapter, adapterOnScope, adjustBuffer, adjustRowHeight, applyUpdate, bof, bottomVisiblePos, buffer, bufferPadding, bufferSize, builder, clipBottom, clipTop, datasource, datasourceName, doAdjustment, doDelete, doInsert, doUpdate, enqueueFetch, eof, eventListener, fetch, finalize, first, getValueChain, hideElementBeforeAppend, insert, isDatasourceValid, itemName, loading, log, match, next, pending, reload, removeFromBuffer, resizeAndScrollHandler, ridActual, scrollHeight, setValueChain, shouldLoadBottom, shouldLoadTop, showElementAfterRender, topVisible, topVisiblePos, viewport, viewportScope, wheelHandler;\n\t\t\t\t\tlog = console.debug || console.log;\n\t\t\t\t\tmatch = $attr.uiScroll.match(/^\\s*(\\w+)\\s+in\\s+([\\w\\.]+)\\s*$/);\n\t\t\t\t\tif (!match) {\n\t\t\t\t\t\tthrow new Error('Expected uiScroll in form of \\'_item_ in _datasource_\\' but got \\'' + $attr.uiScroll + '\\'');\n\t\t\t\t\t}\n\t\t\t\t\titemName = match[1];\n\t\t\t\t\tdatasourceName = match[2];\n\t\t\t\t\tgetValueChain = function(targetScope, target) {\n\t\t\t\t\t\tvar chain;\n\t\t\t\t\t\tif (!targetScope) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchain = target.match(/^([\\w]+)\\.(.+)$/);\n\t\t\t\t\t\tif (!chain || chain.length !== 3) {\n\t\t\t\t\t\t\treturn targetScope[target];\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn getValueChain(targetScope[chain[1]], chain[2]);\n\t\t\t\t\t};\n\t\t\t\t\tsetValueChain = function(targetScope, target, value, doNotSet) {\n\t\t\t\t\t\tvar chain;\n\t\t\t\t\t\tif (!targetScope || !target) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!(chain = target.match(/^([\\w]+)\\.(.+)$/))) {\n\t\t\t\t\t\t\tif (target.indexOf('.') !== -1) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!chain || chain.length !== 3) {\n\t\t\t\t\t\t\tif (!angular.isObject(targetScope[target]) && !doNotSet) {\n\t\t\t\t\t\t\t\treturn targetScope[target] = value;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn targetScope[target] = value;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!angular.isObject(targetScope[chain[1]]) && !doNotSet) {\n\t\t\t\t\t\t\ttargetScope[chain[1]] = {};\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn setValueChain(targetScope[chain[1]], chain[2], value, doNotSet);\n\t\t\t\t\t};\n\t\t\t\t\tdatasource = getValueChain($scope, datasourceName);\n\t\t\t\t\tisDatasourceValid = function() {\n\t\t\t\t\t\treturn angular.isObject(datasource) && typeof datasource.get === 'function';\n\t\t\t\t\t};\n\t\t\t\t\tif (!isDatasourceValid()) {\n\t\t\t\t\t\tdatasource = $injector.get(datasourceName);\n\t\t\t\t\t\tif (!isDatasourceValid()) {\n\t\t\t\t\t\t\tthrow new Error(datasourceName + ' is not a valid datasource');\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbufferSize = Math.max(3, +$attr.bufferSize || 10);\n\t\t\t\t\tbufferPadding = function() {\n\t\t\t\t\t\treturn viewport.outerHeight() * Math.max(0.1, +$attr.padding || 0.1);\n\t\t\t\t\t};\n\t\t\t\t\tscrollHeight = function(elem) {\n\t\t\t\t\t\tvar ref;\n\t\t\t\t\t\treturn (ref = elem[0].scrollHeight) != null ? ref : elem[0].document.documentElement.scrollHeight;\n\t\t\t\t\t};\n\t\t\t\t\tbuilder = null;\n\t\t\t\t\tlinker($scope.$new(), function(template) {\n\t\t\t\t\t\tvar bottomPadding, createPadding, padding, repeaterType, topPadding, viewport;\n\t\t\t\t\t\trepeaterType = template[0].localName;\n\t\t\t\t\t\tif (repeaterType === 'dl') {\n\t\t\t\t\t\t\tthrow new Error('ui-scroll directive does not support <' + template[0].localName + '> as a repeating tag: ' + template[0].outerHTML);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (repeaterType !== 'li' && repeaterType !== 'tr') {\n\t\t\t\t\t\t\trepeaterType = 'div';\n\t\t\t\t\t\t}\n\t\t\t\t\t\tviewport = controllers[0] && controllers[0].viewport ? controllers[0].viewport : angular.element(window);\n\t\t\t\t\t\tviewport.css({\n\t\t\t\t\t\t\t'overflow-y': 'auto',\n\t\t\t\t\t\t\t'display': 'block'\n\t\t\t\t\t\t});\n\t\t\t\t\t\tpadding = function(repeaterType) {\n\t\t\t\t\t\t\tvar div, result, table;\n\t\t\t\t\t\t\tswitch (repeaterType) {\n\t\t\t\t\t\t\t\tcase 'tr':\n\t\t\t\t\t\t\t\t\ttable = angular.element('<table><tr><td><div></div></td></tr></table>');\n\t\t\t\t\t\t\t\t\tdiv = table.find('div');\n\t\t\t\t\t\t\t\t\tresult = table.find('tr');\n\t\t\t\t\t\t\t\t\tresult.paddingHeight = function() {\n\t\t\t\t\t\t\t\t\t\treturn div.height.apply(div, arguments);\n\t\t\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\tresult = angular.element('<' + repeaterType + '></' + repeaterType + '>');\n\t\t\t\t\t\t\t\t\tresult.paddingHeight = result.height;\n\t\t\t\t\t\t\t\t\treturn result;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t\tcreatePadding = function(padding, element, direction) {\n\t\t\t\t\t\t\telement[{\n\t\t\t\t\t\t\t\ttop: 'before',\n\t\t\t\t\t\t\t\tbottom: 'after'\n\t\t\t\t\t\t\t}[direction]](padding);\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\tpaddingHeight: function() {\n\t\t\t\t\t\t\t\t\treturn padding.paddingHeight.apply(padding, arguments);\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tinsert: function(element) {\n\t\t\t\t\t\t\t\t\treturn padding[{\n\t\t\t\t\t\t\t\t\t\ttop: 'after',\n\t\t\t\t\t\t\t\t\t\tbottom: 'before'\n\t\t\t\t\t\t\t\t\t}[direction]](element);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t};\n\t\t\t\t\t\ttopPadding = createPadding(padding(repeaterType), element, 'top');\n\t\t\t\t\t\tbottomPadding = createPadding(padding(repeaterType), element, 'bottom');\n\t\t\t\t\t\t$scope.$on('$destroy', function() {\n\t\t\t\t\t\t\treturn template.remove();\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn builder = {\n\t\t\t\t\t\t\tviewport: viewport,\n\t\t\t\t\t\t\ttopPadding: topPadding.paddingHeight,\n\t\t\t\t\t\t\tbottomPadding: bottomPadding.paddingHeight,\n\t\t\t\t\t\t\tappend: bottomPadding.insert,\n\t\t\t\t\t\t\tprepend: topPadding.insert,\n\t\t\t\t\t\t\tbottomDataPos: function() {\n\t\t\t\t\t\t\t\treturn scrollHeight(viewport) - bottomPadding.paddingHeight();\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\ttopDataPos: function() {\n\t\t\t\t\t\t\t\treturn topPadding.paddingHeight();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t};\n\t\t\t\t\t});\n\t\t\t\t\tviewport = builder.viewport;\n\t\t\t\t\tviewportScope = viewport.scope() || $rootScope;\n\t\t\t\t\ttopVisible = function(item) {\n\t\t\t\t\t\tadapter.topVisible = item.scope[itemName];\n\t\t\t\t\t\tadapter.topVisibleElement = item.element;\n\t\t\t\t\t\tadapter.topVisibleScope = item.scope;\n\t\t\t\t\t\tif ($attr.topVisible) {\n\t\t\t\t\t\t\tsetValueChain(viewportScope, $attr.topVisible, adapter.topVisible);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($attr.topVisibleElement) {\n\t\t\t\t\t\t\tsetValueChain(viewportScope, $attr.topVisibleElement, adapter.topVisibleElement);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($attr.topVisibleScope) {\n\t\t\t\t\t\t\tsetValueChain(viewportScope, $attr.topVisibleScope, adapter.topVisibleScope);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (typeof datasource.topVisible === 'function') {\n\t\t\t\t\t\t\treturn datasource.topVisible(item);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tloading = function(value) {\n\t\t\t\t\t\tadapter.isLoading = value;\n\t\t\t\t\t\tif ($attr.isLoading) {\n\t\t\t\t\t\t\tsetValueChain($scope, $attr.isLoading, value);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (typeof datasource.loading === 'function') {\n\t\t\t\t\t\t\treturn datasource.loading(value);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tridActual = 0;\n\t\t\t\t\tfirst = 1;\n\t\t\t\t\tnext = 1;\n\t\t\t\t\tbuffer = [];\n\t\t\t\t\tpending = [];\n\t\t\t\t\teof = false;\n\t\t\t\t\tbof = false;\n\t\t\t\t\tremoveFromBuffer = function(start, stop) {\n\t\t\t\t\t\tvar i, j, ref, ref1;\n\t\t\t\t\t\tfor (i = j = ref = start, ref1 = stop; ref <= ref1 ? j < ref1 : j > ref1; i = ref <= ref1 ? ++j : --j) {\n\t\t\t\t\t\t\tbuffer[i].scope.$destroy();\n\t\t\t\t\t\t\tbuffer[i].element.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn buffer.splice(start, stop - start);\n\t\t\t\t\t};\n\t\t\t\t\treload = function() {\n\t\t\t\t\t\tridActual++;\n\t\t\t\t\t\tfirst = 1;\n\t\t\t\t\t\tnext = 1;\n\t\t\t\t\t\tremoveFromBuffer(0, buffer.length);\n\t\t\t\t\t\tbuilder.topPadding(0);\n\t\t\t\t\t\tbuilder.bottomPadding(0);\n\t\t\t\t\t\tpending = [];\n\t\t\t\t\t\teof = false;\n\t\t\t\t\t\tbof = false;\n\t\t\t\t\t\treturn adjustBuffer(ridActual);\n\t\t\t\t\t};\n\t\t\t\t\tbottomVisiblePos = function() {\n\t\t\t\t\t\treturn viewport.scrollTop() + viewport.outerHeight();\n\t\t\t\t\t};\n\t\t\t\t\ttopVisiblePos = function() {\n\t\t\t\t\t\treturn viewport.scrollTop();\n\t\t\t\t\t};\n\t\t\t\t\tshouldLoadBottom = function() {\n\t\t\t\t\t\treturn !eof && builder.bottomDataPos() < bottomVisiblePos() + bufferPadding();\n\t\t\t\t\t};\n\t\t\t\t\tclipBottom = function() {\n\t\t\t\t\t\tvar bottomHeight, i, item, itemHeight, itemTop, j, newRow, overage, ref, rowTop;\n\t\t\t\t\t\tbottomHeight = 0;\n\t\t\t\t\t\toverage = 0;\n\t\t\t\t\t\tfor (i = j = ref = buffer.length - 1; ref <= 0 ? j <= 0 : j >= 0; i = ref <= 0 ? ++j : --j) {\n\t\t\t\t\t\t\titem = buffer[i];\n\t\t\t\t\t\t\titemTop = item.element.offset().top;\n\t\t\t\t\t\t\tnewRow = rowTop !== itemTop;\n\t\t\t\t\t\t\trowTop = itemTop;\n\t\t\t\t\t\t\tif (newRow) {\n\t\t\t\t\t\t\t\titemHeight = item.element.outerHeight(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (builder.bottomDataPos() - bottomHeight - itemHeight > bottomVisiblePos() + bufferPadding()) {\n\t\t\t\t\t\t\t\tif (newRow) {\n\t\t\t\t\t\t\t\t\tbottomHeight += itemHeight;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\toverage++;\n\t\t\t\t\t\t\t\teof = false;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (newRow) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\toverage++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (overage > 0) {\n\t\t\t\t\t\t\tbuilder.bottomPadding(builder.bottomPadding() + bottomHeight);\n\t\t\t\t\t\t\tremoveFromBuffer(buffer.length - overage, buffer.length);\n\t\t\t\t\t\t\treturn next -= overage;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tshouldLoadTop = function() {\n\t\t\t\t\t\treturn !bof && (builder.topDataPos() > topVisiblePos() - bufferPadding());\n\t\t\t\t\t};\n\t\t\t\t\tclipTop = function() {\n\t\t\t\t\t\tvar item, itemHeight, itemTop, j, len, newRow, overage, rowTop, topHeight;\n\t\t\t\t\t\ttopHeight = 0;\n\t\t\t\t\t\toverage = 0;\n\t\t\t\t\t\tfor (j = 0, len = buffer.length; j < len; j++) {\n\t\t\t\t\t\t\titem = buffer[j];\n\t\t\t\t\t\t\titemTop = item.element.offset().top;\n\t\t\t\t\t\t\tnewRow = rowTop !== itemTop;\n\t\t\t\t\t\t\trowTop = itemTop;\n\t\t\t\t\t\t\tif (newRow) {\n\t\t\t\t\t\t\t\titemHeight = item.element.outerHeight(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (builder.topDataPos() + topHeight + itemHeight < topVisiblePos() - bufferPadding()) {\n\t\t\t\t\t\t\t\tif (newRow) {\n\t\t\t\t\t\t\t\t\ttopHeight += itemHeight;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\toverage++;\n\t\t\t\t\t\t\t\tbof = false;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (newRow) {\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\toverage++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (overage > 0) {\n\t\t\t\t\t\t\tbuilder.topPadding(builder.topPadding() + topHeight);\n\t\t\t\t\t\t\tremoveFromBuffer(0, overage);\n\t\t\t\t\t\t\treturn first += overage;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tenqueueFetch = function(rid, direction) {\n\t\t\t\t\t\tif (!adapter.isLoading) {\n\t\t\t\t\t\t\tloading(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (pending.push(direction) === 1) {\n\t\t\t\t\t\t\treturn fetch(rid);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\thideElementBeforeAppend = function(element) {\n\t\t\t\t\t\telement.displayTemp = element.css('display');\n\t\t\t\t\t\treturn element.css('display', 'none');\n\t\t\t\t\t};\n\t\t\t\t\tshowElementAfterRender = function(element) {\n\t\t\t\t\t\tif (element.hasOwnProperty('displayTemp')) {\n\t\t\t\t\t\t\treturn element.css('display', element.displayTemp);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tinsert = function(index, item) {\n\t\t\t\t\t\tvar itemScope, toBeAppended, wrapper;\n\t\t\t\t\t\titemScope = $scope.$new();\n\t\t\t\t\t\titemScope[itemName] = item;\n\t\t\t\t\t\ttoBeAppended = index > first;\n\t\t\t\t\t\titemScope.$index = index;\n\t\t\t\t\t\tif (toBeAppended) {\n\t\t\t\t\t\t\titemScope.$index--;\n\t\t\t\t\t\t}\n\t\t\t\t\t\twrapper = {\n\t\t\t\t\t\t\tscope: itemScope\n\t\t\t\t\t\t};\n\t\t\t\t\t\tlinker(itemScope, function(clone) {\n\t\t\t\t\t\t\twrapper.element = clone;\n\t\t\t\t\t\t\tif (toBeAppended) {\n\t\t\t\t\t\t\t\tif (index === next) {\n\t\t\t\t\t\t\t\t\thideElementBeforeAppend(clone);\n\t\t\t\t\t\t\t\t\tbuilder.append(clone);\n\t\t\t\t\t\t\t\t\treturn buffer.push(wrapper);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tbuffer[index - first].element.after(clone);\n\t\t\t\t\t\t\t\t\treturn buffer.splice(index - first + 1, 0, wrapper);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\thideElementBeforeAppend(clone);\n\t\t\t\t\t\t\t\tbuilder.prepend(clone);\n\t\t\t\t\t\t\t\treturn buffer.unshift(wrapper);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\tappended: toBeAppended,\n\t\t\t\t\t\t\twrapper: wrapper\n\t\t\t\t\t\t};\n\t\t\t\t\t};\n\t\t\t\t\tadjustRowHeight = function(appended, wrapper) {\n\t\t\t\t\t\tvar newHeight;\n\t\t\t\t\t\tif (appended) {\n\t\t\t\t\t\t\treturn builder.bottomPadding(Math.max(0, builder.bottomPadding() - wrapper.element.outerHeight(true)));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewHeight = builder.topPadding() - wrapper.element.outerHeight(true);\n\t\t\t\t\t\t\tif (newHeight >= 0) {\n\t\t\t\t\t\t\t\treturn builder.topPadding(newHeight);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn viewport.scrollTop(viewport.scrollTop() + wrapper.element.outerHeight(true));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tdoAdjustment = function(rid, finalize) {\n\t\t\t\t\t\tvar item, itemHeight, itemTop, j, len, newRow, results, rowTop, topHeight;\n\t\t\t\t\t\tif (shouldLoadBottom()) {\n\t\t\t\t\t\t\tenqueueFetch(rid, true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (shouldLoadTop()) {\n\t\t\t\t\t\t\t\tenqueueFetch(rid, false);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (finalize) {\n\t\t\t\t\t\t\tfinalize(rid);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (pending.length === 0) {\n\t\t\t\t\t\t\ttopHeight = 0;\n\t\t\t\t\t\t\tresults = [];\n\t\t\t\t\t\t\tfor (j = 0, len = buffer.length; j < len; j++) {\n\t\t\t\t\t\t\t\titem = buffer[j];\n\t\t\t\t\t\t\t\titemTop = item.element.offset().top;\n\t\t\t\t\t\t\t\tnewRow = rowTop !== itemTop;\n\t\t\t\t\t\t\t\trowTop = itemTop;\n\t\t\t\t\t\t\t\tif (newRow) {\n\t\t\t\t\t\t\t\t\titemHeight = item.element.outerHeight(true);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (newRow && (builder.topDataPos() + topHeight + itemHeight < topVisiblePos())) {\n\t\t\t\t\t\t\t\t\tresults.push(topHeight += itemHeight);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tif (newRow) {\n\t\t\t\t\t\t\t\t\t\ttopVisible(item);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn results;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tadjustBuffer = function(rid, newItems, finalize) {\n\t\t\t\t\t\tif (newItems && newItems.length) {\n\t\t\t\t\t\t\treturn $timeout(function() {\n\t\t\t\t\t\t\t\tvar elt, itemTop, j, k, len, len1, row, rowTop, rows;\n\t\t\t\t\t\t\t\trows = [];\n\t\t\t\t\t\t\t\tfor (j = 0, len = newItems.length; j < len; j++) {\n\t\t\t\t\t\t\t\t\trow = newItems[j];\n\t\t\t\t\t\t\t\t\telt = row.wrapper.element;\n\t\t\t\t\t\t\t\t\tshowElementAfterRender(elt);\n\t\t\t\t\t\t\t\t\titemTop = elt.offset().top;\n\t\t\t\t\t\t\t\t\tif (rowTop !== itemTop) {\n\t\t\t\t\t\t\t\t\t\trows.push(row);\n\t\t\t\t\t\t\t\t\t\trowTop = itemTop;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfor (k = 0, len1 = rows.length; k < len1; k++) {\n\t\t\t\t\t\t\t\t\trow = rows[k];\n\t\t\t\t\t\t\t\t\tadjustRowHeight(row.appended, row.wrapper);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn doAdjustment(rid, finalize);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\treturn doAdjustment(rid, finalize);\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tfinalize = function(rid, newItems) {\n\t\t\t\t\t\treturn adjustBuffer(rid, newItems, function() {\n\t\t\t\t\t\t\tpending.shift();\n\t\t\t\t\t\t\tif (pending.length === 0) {\n\t\t\t\t\t\t\t\treturn loading(false);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn fetch(rid);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\tfetch = function(rid) {\n\t\t\t\t\t\tvar direction;\n\t\t\t\t\t\tdirection = pending[0];\n\t\t\t\t\t\tif (direction) {\n\t\t\t\t\t\t\tif (buffer.length && !shouldLoadBottom()) {\n\t\t\t\t\t\t\t\treturn finalize(rid);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn datasource.get(next, bufferSize, function(result) {\n\t\t\t\t\t\t\t\t\tvar item, j, len, newItems;\n\t\t\t\t\t\t\t\t\tif ((rid && rid !== ridActual) || $scope.$$destroyed) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tnewItems = [];\n\t\t\t\t\t\t\t\t\tif (result.length < bufferSize) {\n\t\t\t\t\t\t\t\t\t\teof = true;\n\t\t\t\t\t\t\t\t\t\tbuilder.bottomPadding(0);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (result.length > 0) {\n\t\t\t\t\t\t\t\t\t\tclipTop();\n\t\t\t\t\t\t\t\t\t\tfor (j = 0, len = result.length; j < len; j++) {\n\t\t\t\t\t\t\t\t\t\t\titem = result[j];\n\t\t\t\t\t\t\t\t\t\t\tnewItems.push(insert(++next, item));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn finalize(rid, newItems);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (buffer.length && !shouldLoadTop()) {\n\t\t\t\t\t\t\t\treturn finalize(rid);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\treturn datasource.get(first - bufferSize, bufferSize, function(result) {\n\t\t\t\t\t\t\t\t\tvar i, j, newItems, ref;\n\t\t\t\t\t\t\t\t\tif ((rid && rid !== ridActual) || $scope.$$destroyed) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tnewItems = [];\n\t\t\t\t\t\t\t\t\tif (result.length < bufferSize) {\n\t\t\t\t\t\t\t\t\t\tbof = true;\n\t\t\t\t\t\t\t\t\t\tbuilder.topPadding(0);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif (result.length > 0) {\n\t\t\t\t\t\t\t\t\t\tif (buffer.length) {\n\t\t\t\t\t\t\t\t\t\t\tclipBottom();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tfor (i = j = ref = result.length - 1; ref <= 0 ? j <= 0 : j >= 0; i = ref <= 0 ? ++j : --j) {\n\t\t\t\t\t\t\t\t\t\t\tnewItems.unshift(insert(--first, result[i]));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn finalize(rid, newItems);\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tresizeAndScrollHandler = function() {\n\t\t\t\t\t\tif (!$rootScope.$$phase && !adapter.isLoading) {\n\t\t\t\t\t\t\tadjustBuffer();\n\t\t\t\t\t\t\treturn $scope.$apply();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\twheelHandler = function(event) {\n\t\t\t\t\t\tvar scrollTop, yMax;\n\t\t\t\t\t\tscrollTop = viewport[0].scrollTop;\n\t\t\t\t\t\tyMax = viewport[0].scrollHeight - viewport[0].clientHeight;\n\t\t\t\t\t\tif ((scrollTop === 0 && !bof) || (scrollTop === yMax && !eof)) {\n\t\t\t\t\t\t\treturn event.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tviewport.bind('resize', resizeAndScrollHandler);\n\t\t\t\t\tviewport.bind('scroll', resizeAndScrollHandler);\n\t\t\t\t\tviewport.bind('mousewheel', wheelHandler);\n\t\t\t\t\t$scope.$watch(datasource.revision, reload);\n\t\t\t\t\tif (datasource.scope) {\n\t\t\t\t\t\teventListener = datasource.scope.$new();\n\t\t\t\t\t} else {\n\t\t\t\t\t\teventListener = $scope.$new();\n\t\t\t\t\t}\n\t\t\t\t\t$scope.$on('$destroy', function() {\n\t\t\t\t\t\tvar item, j, len;\n\t\t\t\t\t\tfor (j = 0, len = buffer.length; j < len; j++) {\n\t\t\t\t\t\t\titem = buffer[j];\n\t\t\t\t\t\t\titem.scope.$destroy();\n\t\t\t\t\t\t\titem.element.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tviewport.unbind('resize', resizeAndScrollHandler);\n\t\t\t\t\t\tviewport.unbind('scroll', resizeAndScrollHandler);\n\t\t\t\t\t\treturn viewport.unbind('mousewheel', wheelHandler);\n\t\t\t\t\t});\n\t\t\t\t\tadapter = {};\n\t\t\t\t\tadapter.isLoading = false;\n\t\t\t\t\tapplyUpdate = function(wrapper, newItems) {\n\t\t\t\t\t\tvar i, inserted, item, j, k, l, len, len1, len2, ndx, newItem, oldItemNdx;\n\t\t\t\t\t\tinserted = [];\n\t\t\t\t\t\tif (angular.isArray(newItems)) {\n\t\t\t\t\t\t\tif (newItems.length) {\n\t\t\t\t\t\t\t\tif (newItems.length === 1 && newItems[0] === wrapper.scope[itemName]) {\n\t\t\t\t\t\t\t\t\treturn inserted;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tndx = wrapper.scope.$index;\n\t\t\t\t\t\t\t\t\tif (ndx > first) {\n\t\t\t\t\t\t\t\t\t\toldItemNdx = ndx - first;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\toldItemNdx = 1;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tfor (i = j = 0, len = newItems.length; j < len; i = ++j) {\n\t\t\t\t\t\t\t\t\t\tnewItem = newItems[i];\n\t\t\t\t\t\t\t\t\t\tinserted.push(insert(ndx + i, newItem));\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tremoveFromBuffer(oldItemNdx, oldItemNdx + 1);\n\t\t\t\t\t\t\t\t\tfor (i = k = 0, len1 = buffer.length; k < len1; i = ++k) {\n\t\t\t\t\t\t\t\t\t\titem = buffer[i];\n\t\t\t\t\t\t\t\t\t\titem.scope.$index = first + i;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tremoveFromBuffer(wrapper.scope.$index - first, wrapper.scope.$index - first + 1);\n\t\t\t\t\t\t\t\tnext--;\n\t\t\t\t\t\t\t\tfor (i = l = 0, len2 = buffer.length; l < len2; i = ++l) {\n\t\t\t\t\t\t\t\t\titem = buffer[i];\n\t\t\t\t\t\t\t\t\titem.scope.$index = first + i;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn inserted;\n\t\t\t\t\t};\n\t\t\t\t\tadapter.applyUpdates = function(arg1, arg2) {\n\t\t\t\t\t\tvar inserted, j, len, ref, ref1, wrapper;\n\t\t\t\t\t\tinserted = [];\n\t\t\t\t\t\tridActual++;\n\t\t\t\t\t\tif (angular.isFunction(arg1)) {\n\t\t\t\t\t\t\tref = buffer.slice(0);\n\t\t\t\t\t\t\tfor (j = 0, len = ref.length; j < len; j++) {\n\t\t\t\t\t\t\t\twrapper = ref[j];\n\t\t\t\t\t\t\t\tinserted = inserted.concat(inserted, applyUpdate(wrapper, arg1(wrapper.scope[itemName], wrapper.scope, wrapper.element)));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (arg1 % 1 === 0) {\n\t\t\t\t\t\t\t\tif ((0 <= (ref1 = arg1 - first) && ref1 < buffer.length)) {\n\t\t\t\t\t\t\t\t\tinserted = applyUpdate(buffer[arg1 - first], arg2);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthrow new Error('applyUpdates - ' + arg1 + ' is not a valid index or outside of range');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn adjustBuffer(ridActual, inserted);\n\t\t\t\t\t};\n\t\t\t\t\tif ($attr.adapter) {\n\t\t\t\t\t\tadapterOnScope = getValueChain($scope, $attr.adapter);\n\t\t\t\t\t\tif (!adapterOnScope) {\n\t\t\t\t\t\t\tsetValueChain($scope, $attr.adapter, {});\n\t\t\t\t\t\t\tadapterOnScope = getValueChain($scope, $attr.adapter);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tangular.extend(adapterOnScope, adapter);\n\t\t\t\t\t\tadapter = adapterOnScope;\n\t\t\t\t\t}\n\t\t\t\t\tdoUpdate = function(locator, newItem) {\n\t\t\t\t\t\tvar fn, j, len, ref, wrapper;\n\t\t\t\t\t\tif (angular.isFunction(locator)) {\n\t\t\t\t\t\t\tfn = function(wrapper) {\n\t\t\t\t\t\t\t\treturn locator(wrapper.scope);\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfor (j = 0, len = buffer.length; j < len; j++) {\n\t\t\t\t\t\t\t\twrapper = buffer[j];\n\t\t\t\t\t\t\t\tfn(wrapper);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ((0 <= (ref = locator - first - 1) && ref < buffer.length)) {\n\t\t\t\t\t\t\t\tbuffer[locator - first - 1].scope[itemName] = newItem;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t};\n\t\t\t\t\tdoDelete = function(locator) {\n\t\t\t\t\t\tvar fn, i, item, j, k, l, len, len1, len2, ref, temp, wrapper;\n\t\t\t\t\t\tif (angular.isFunction(locator)) {\n\t\t\t\t\t\t\ttemp = [];\n\t\t\t\t\t\t\tfor (j = 0, len = buffer.length; j < len; j++) {\n\t\t\t\t\t\t\t\titem = buffer[j];\n\t\t\t\t\t\t\t\ttemp.unshift(item);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfn = function(wrapper) {\n\t\t\t\t\t\t\t\tif (locator(wrapper.scope)) {\n\t\t\t\t\t\t\t\t\tremoveFromBuffer(temp.length - 1 - i, temp.length - i);\n\t\t\t\t\t\t\t\t\treturn next--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tfor (i = k = 0, len1 = temp.length; k < len1; i = ++k) {\n\t\t\t\t\t\t\t\twrapper = temp[i];\n\t\t\t\t\t\t\t\tfn(wrapper);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ((0 <= (ref = locator - first - 1) && ref < buffer.length)) {\n\t\t\t\t\t\t\t\tremoveFromBuffer(locator - first - 1, locator - first);\n\t\t\t\t\t\t\t\tnext--;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (i = l = 0, len2 = buffer.length; l < len2; i = ++l) {\n\t\t\t\t\t\t\titem = buffer[i];\n\t\t\t\t\t\t\titem.scope.$index = first + i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn adjustBuffer();\n\t\t\t\t\t};\n\t\t\t\t\tdoInsert = function(locator, item) {\n\t\t\t\t\t\tvar i, inserted, j, len, ref;\n\t\t\t\t\t\tinserted = [];\n\t\t\t\t\t\tif (angular.isFunction(locator)) {\n\t\t\t\t\t\t\tthrow new Error('not implemented - Insert with locator function');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ((0 <= (ref = locator - first - 1) && ref < buffer.length)) {\n\t\t\t\t\t\t\t\tinserted.push(insert(locator, item));\n\t\t\t\t\t\t\t\tnext++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (i = j = 0, len = buffer.length; j < len; i = ++j) {\n\t\t\t\t\t\t\titem = buffer[i];\n\t\t\t\t\t\t\titem.scope.$index = first + i;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn adjustBuffer(null, inserted);\n\t\t\t\t\t};\n\t\t\t\t\teventListener.$on('insert.item', function(event, locator, item) {\n\t\t\t\t\t\treturn doInsert(locator, item);\n\t\t\t\t\t});\n\t\t\t\t\teventListener.$on('update.items', function(event, locator, newItem) {\n\t\t\t\t\t\treturn doUpdate(locator, newItem);\n\t\t\t\t\t});\n\t\t\t\t\treturn eventListener.$on('delete.items', function(event, locator) {\n\t\t\t\t\t\treturn doDelete(locator);\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n]);\n\n\n/*\n //# sourceURL=src/scripts/ui-scroll.js\n */\n\n/**\n * Adds a 'ui-scrollfix' class to the element when the page scrolls past it's position.\n * @param [offset] {int} optional Y-offset to override the detected offset.\n *   Takes 300 (absolute) or -300 or +300 (relative to detected)\n */\nangular.module('ui.scrollfix',[]).directive('uiScrollfix', ['$window', function ($window) {\n  'use strict';\n\n  function getWindowScrollTop() {\n    if (angular.isDefined($window.pageYOffset)) {\n      return $window.pageYOffset;\n    } else {\n      var iebody = (document.compatMode && document.compatMode !== 'BackCompat') ? document.documentElement : document.body;\n      return iebody.scrollTop;\n    }\n  }\n  return {\n    require: '^?uiScrollfixTarget',\n    link: function (scope, elm, attrs, uiScrollfixTarget) {\n      var absolute = true,\n          shift = 0,\n          fixLimit,\n          $target = uiScrollfixTarget && uiScrollfixTarget.$element || angular.element($window);\n\n      if (!attrs.uiScrollfix) {\n          absolute = false;\n      } else if (typeof(attrs.uiScrollfix) === 'string') {\n        // charAt is generally faster than indexOf: http://jsperf.com/indexof-vs-charat\n        if (attrs.uiScrollfix.charAt(0) === '-') {\n          absolute = false;\n          shift = - parseFloat(attrs.uiScrollfix.substr(1));\n        } else if (attrs.uiScrollfix.charAt(0) === '+') {\n          absolute = false;\n          shift = parseFloat(attrs.uiScrollfix.substr(1));\n        }\n      }\n\n      fixLimit = absolute ? attrs.uiScrollfix : elm[0].offsetTop + shift;\n\n      function onScroll() {\n\n        var limit = absolute ? attrs.uiScrollfix : elm[0].offsetTop + shift;\n\n        // if pageYOffset is defined use it, otherwise use other crap for IE\n        var offset = uiScrollfixTarget ? $target[0].scrollTop : getWindowScrollTop();\n        if (!elm.hasClass('ui-scrollfix') && offset > limit) {\n          elm.addClass('ui-scrollfix');\n          fixLimit = limit;\n        } else if (elm.hasClass('ui-scrollfix') && offset < fixLimit) {\n          elm.removeClass('ui-scrollfix');\n        }\n      }\n\n      $target.on('scroll', onScroll);\n\n      // Unbind scroll event handler when directive is removed\n      scope.$on('$destroy', function() {\n        $target.off('scroll', onScroll);\n      });\n    }\n  };\n}]).directive('uiScrollfixTarget', [function () {\n  'use strict';\n  return {\n    controller: ['$element', function($element) {\n      this.$element = $element;\n    }]\n  };\n}]);\n\n/**\n * uiShow Directive\n *\n * Adds a 'ui-show' class to the element instead of display:block\n * Created to allow tighter control  of CSS without bulkier directives\n *\n * @param expression {boolean} evaluated expression to determine if the class should be added\n */\nangular.module('ui.showhide',[])\n.directive('uiShow', [function () {\n  'use strict';\n\n  return function (scope, elm, attrs) {\n    scope.$watch(attrs.uiShow, function (newVal) {\n      if (newVal) {\n        elm.addClass('ui-show');\n      } else {\n        elm.removeClass('ui-show');\n      }\n    });\n  };\n}])\n\n/**\n * uiHide Directive\n *\n * Adds a 'ui-hide' class to the element instead of display:block\n * Created to allow tighter control  of CSS without bulkier directives\n *\n * @param expression {boolean} evaluated expression to determine if the class should be added\n */\n.directive('uiHide', [function () {\n  'use strict';\n\n  return function (scope, elm, attrs) {\n    scope.$watch(attrs.uiHide, function (newVal) {\n      if (newVal) {\n        elm.addClass('ui-hide');\n      } else {\n        elm.removeClass('ui-hide');\n      }\n    });\n  };\n}])\n\n/**\n * uiToggle Directive\n *\n * Adds a class 'ui-show' if true, and a 'ui-hide' if false to the element instead of display:block/display:none\n * Created to allow tighter control  of CSS without bulkier directives. This also allows you to override the\n * default visibility of the element using either class.\n *\n * @param expression {boolean} evaluated expression to determine if the class should be added\n */\n.directive('uiToggle', [function () {\n  'use strict';\n\n  return function (scope, elm, attrs) {\n    scope.$watch(attrs.uiToggle, function (newVal) {\n      if (newVal) {\n        elm.removeClass('ui-hide').addClass('ui-show');\n      } else {\n        elm.removeClass('ui-show').addClass('ui-hide');\n      }\n    });\n  };\n}]);\n\n/**\n * Filters out all duplicate items from an array by checking the specified key\n * @param [key] {string} the name of the attribute of each object to compare for uniqueness\n if the key is empty, the entire object will be compared\n if the key === false then no filtering will be performed\n * @return {array}\n */\nangular.module('ui.unique',[]).filter('unique', ['$parse', function ($parse) {\n  'use strict';\n\n  return function (items, filterOn) {\n\n    if (filterOn === false) {\n      return items;\n    }\n\n    if ((filterOn || angular.isUndefined(filterOn)) && angular.isArray(items)) {\n      var newItems = [],\n        get = angular.isString(filterOn) ? $parse(filterOn) : function (item) { return item; };\n\n      var extractValueToCompare = function (item) {\n        return angular.isObject(item) ? get(item) : item;\n      };\n\n      angular.forEach(items, function (item) {\n        var isDuplicate = false;\n\n        for (var i = 0; i < newItems.length; i++) {\n          if (angular.equals(extractValueToCompare(newItems[i]), extractValueToCompare(item))) {\n            isDuplicate = true;\n            break;\n          }\n        }\n        if (!isDuplicate) {\n          newItems.push(item);\n        }\n\n      });\n      items = newItems;\n    }\n    return items;\n  };\n}]);\n\n/*\n * Author: Remy Alain Ticona Carbajal http://realtica.org\n * Description: The main objective of ng-uploader is to have a user control,\n * clean, simple, customizable, and above all very easy to implement.\n * Licence: MIT\n */\n\nangular.module('ui.uploader', []).service('uiUploader', uiUploader);\n\nuiUploader.$inject = ['$log'];\n\nfunction uiUploader($log) {\n    'use strict';\n\n    /*jshint validthis: true */\n    var self = this;\n    self.files = [];\n    self.options = {};\n    self.activeUploads = 0;\n    self.uploadedFiles = 0;\n    $log.info('uiUploader loaded');\n    \n    function addFiles(files) {\n        for (var i = 0; i < files.length; i++) {\n            self.files.push(files[i]);\n        }\n    }\n\n    function getFiles() {\n        return self.files;\n    }\n\n    function startUpload(options) {\n        self.options = options;\n        for (var i = 0; i < self.files.length; i++) {\n            if (self.activeUploads == self.options.concurrency) {\n                break;\n            }\n            if (self.files[i].active)\n                continue;\n            ajaxUpload(self.files[i], self.options.url, self.options.data);\n        }\n    }\n    \n    function removeFile(file){\n        self.files.splice(self.files.indexOf(file),1);\n    }\n    \n    function removeAll(){\n        self.files.splice(0,self.files.length);\n    }\n    \n    return {\n        addFiles: addFiles,\n        getFiles: getFiles,\n        files: self.files,\n        startUpload: startUpload,\n        removeFile: removeFile,\n        removeAll:removeAll\n    };\n    \n    function getHumanSize(bytes) {\n        var sizes = ['n/a', 'bytes', 'KiB', 'MiB', 'GiB', 'TB', 'PB', 'EiB', 'ZiB', 'YiB'];\n        var i = +Math.floor(Math.log(bytes) / Math.log(1024));\n        return (bytes / Math.pow(1024, i)).toFixed(i ? 1 : 0) + ' ' + sizes[isNaN(bytes) ? 0 : i + 1];\n    }\n\n    function ajaxUpload(file, url, data) {\n        var xhr, formData, prop, key = '' || 'file';\n        data = data || {};\n        \n        self.activeUploads += 1;\n        file.active = true;\n        xhr = new window.XMLHttpRequest();\n        formData = new window.FormData();\n        xhr.open('POST', url);\n\n        // Triggered when upload starts:\n        xhr.upload.onloadstart = function() {};\n\n        // Triggered many times during upload:\n        xhr.upload.onprogress = function(event) {\n            if (!event.lengthComputable) {\n                return;\n            }\n            // Update file size because it might be bigger than reported by\n            // the fileSize:\n            //$log.info(\"progres..\");\n            //console.info(event.loaded);\n            file.loaded = event.loaded;\n            file.humanSize = getHumanSize(event.loaded);\n            self.options.onProgress(file);\n        };\n\n        // Triggered when upload is completed:\n        xhr.onload = function() {\n            self.activeUploads -= 1;\n            self.uploadedFiles += 1;\n            startUpload(self.options);\n            self.options.onCompleted(file, xhr.responseText);\n            if(self.uploadedFiles === self.files.length) {\n                self.uploadedFiles = 0;\n                self.options.onCompletedAll(self.files);\n            }\n        };\n\n        // Triggered when upload fails:\n        xhr.onerror = function() {};\n\n        // Append additional data if provided:\n        if (data) {\n            for (prop in data) {\n                if (data.hasOwnProperty(prop)) {\n                    formData.append(prop, data[prop]);\n                }\n            }\n        }\n\n        // Append file data:\n        formData.append(key, file, file.name);\n\n        // Initiate upload:\n        xhr.send(formData);\n\n        return xhr;\n    }\n\n}\n\n/**\r\n * General-purpose validator for ngModel.\r\n * angular.js comes with several built-in validation mechanism for input fields (ngRequired, ngPattern etc.) but using\r\n * an arbitrary validation function requires creation of a custom formatters and / or parsers.\r\n * The ui-validate directive makes it easy to use any function(s) defined in scope as a validator function(s).\r\n * A validator function will trigger validation on both model and input changes.\r\n *\r\n * @example <input ui-validate=\" 'myValidatorFunction($value)' \">\r\n * @example <input ui-validate=\"{ foo : '$value > anotherModel', bar : 'validateFoo($value)' }\">\r\n * @example <input ui-validate=\"{ foo : '$value > anotherModel' }\" ui-validate-watch=\" 'anotherModel' \">\r\n * @example <input ui-validate=\"{ foo : '$value > anotherModel', bar : 'validateFoo($value)' }\" ui-validate-watch=\" { foo : 'anotherModel' } \">\r\n *\r\n * @param ui-validate {string|object literal} If strings is passed it should be a scope's function to be used as a validator.\r\n * If an object literal is passed a key denotes a validation error key while a value should be a validator function.\r\n * In both cases validator function should take a value to validate as its argument and should return true/false indicating a validation result.\r\n */\r\nangular.module('ui.validate',[]).directive('uiValidate', function () {\r\n  'use strict';\r\n\r\n  return {\r\n    restrict: 'A',\r\n    require: 'ngModel',\r\n    link: function (scope, elm, attrs, ctrl) {\r\n      var validateFn, validators = {},\r\n          validateExpr = scope.$eval(attrs.uiValidate);\r\n\r\n      if (!validateExpr){ return;}\r\n\r\n      if (angular.isString(validateExpr)) {\r\n        validateExpr = { validator: validateExpr };\r\n      }\r\n\r\n      angular.forEach(validateExpr, function (exprssn, key) {\r\n        validateFn = function (valueToValidate) {\r\n          var expression = scope.$eval(exprssn, { '$value' : valueToValidate });\r\n          if (angular.isObject(expression) && angular.isFunction(expression.then)) {\r\n            // expression is a promise\r\n            if (angular.isUndefined(ctrl.$pending)) {\r\n              ctrl.$pending = {};\r\n            }\r\n            // set pending state until promise is resolved\r\n            ctrl.$pending[key] = true;\r\n            expression.then(function(){\r\n              ctrl.$setValidity(key, true);\r\n            }, function(){\r\n              ctrl.$setValidity(key, false);\r\n            });\r\n            return valueToValidate;\r\n          } else if (expression) {\r\n            // expression is true\r\n            ctrl.$setValidity(key, true);\r\n            return valueToValidate;\r\n          } else {\r\n            // expression is false\r\n            ctrl.$setValidity(key, false);\r\n            return valueToValidate;\r\n          }\r\n        };\r\n        validators[key] = validateFn;\r\n        ctrl.$formatters.push(validateFn);\r\n        ctrl.$parsers.push(validateFn);\r\n      });\r\n\r\n      function apply_watch(watch)\r\n      {\r\n          //string - update all validators on expression change\r\n          if (angular.isString(watch))\r\n          {\r\n              scope.$watch(watch, function(){\r\n                  angular.forEach(validators, function(validatorFn){\r\n                      validatorFn(ctrl.$modelValue);\r\n                  });\r\n              });\r\n              return;\r\n          }\r\n\r\n          //array - update all validators on change of any expression\r\n          if (angular.isArray(watch))\r\n          {\r\n              angular.forEach(watch, function(expression){\r\n                  scope.$watch(expression, function()\r\n                  {\r\n                      angular.forEach(validators, function(validatorFn){\r\n                          validatorFn(ctrl.$modelValue);\r\n                      });\r\n                  });\r\n              });\r\n              return;\r\n          }\r\n\r\n          //object - update appropriate validator\r\n          if (angular.isObject(watch))\r\n          {\r\n              angular.forEach(watch, function(expression, validatorKey)\r\n              {\r\n                  //value is string - look after one expression\r\n                  if (angular.isString(expression))\r\n                  {\r\n                      scope.$watch(expression, function(){\r\n                          validators[validatorKey](ctrl.$modelValue);\r\n                      });\r\n                  }\r\n\r\n                  //value is array - look after all expressions in array\r\n                  if (angular.isArray(expression))\r\n                  {\r\n                      angular.forEach(expression, function(intExpression)\r\n                      {\r\n                          scope.$watch(intExpression, function(){\r\n                              validators[validatorKey](ctrl.$modelValue);\r\n                          });\r\n                      });\r\n                  }\r\n              });\r\n          }\r\n      }\r\n      // Support for ui-validate-watch\r\n      if (attrs.uiValidateWatch){\r\n          apply_watch( scope.$eval(attrs.uiValidateWatch) );\r\n      }\r\n    }\r\n  };\r\n});\r\n\nangular.module('ui.utils',  [\n  'ui.event',\n  'ui.format',\n  'ui.highlight',\n  'ui.include',\n  'ui.indeterminate',\n  'ui.inflector',\n  'ui.jq',\n  'ui.keypress',\n  'ui.mask',\n  'ui.reset',\n  'ui.route',\n  'ui.scrollfix',\n  'ui.scroll',\n  'ui.scroll.jqlite',\n  'ui.showhide',\n  'ui.unique',\n  'ui.validate'\n]);\n","/*!\n* jquery.inputmask.bundle\n* http://github.com/RobinHerbots/jquery.inputmask\n* Copyright (c) 2010 - 2015 Robin Herbots\n* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)\n* Version: 3.1.63\n*/\n!function($) {\n    function isInputEventSupported(eventName) {\n        var el = document.createElement(\"input\"), evName = \"on\" + eventName, isSupported = evName in el;\n        return isSupported || (el.setAttribute(evName, \"return;\"), isSupported = \"function\" == typeof el[evName]), \n        el = null, isSupported;\n    }\n    function isInputTypeSupported(inputType) {\n        var isSupported = \"text\" == inputType || \"tel\" == inputType || \"password\" == inputType;\n        if (!isSupported) {\n            var el = document.createElement(\"input\");\n            el.setAttribute(\"type\", inputType), isSupported = \"text\" === el.type, el = null;\n        }\n        return isSupported;\n    }\n    function resolveAlias(aliasStr, options, opts) {\n        var aliasDefinition = opts.aliases[aliasStr];\n        return aliasDefinition ? (aliasDefinition.alias && resolveAlias(aliasDefinition.alias, void 0, opts), \n        $.extend(!0, opts, aliasDefinition), $.extend(!0, opts, options), !0) : !1;\n    }\n    function generateMaskSet(opts, nocache) {\n        function analyseMask(mask) {\n            function maskToken(isGroup, isOptional, isQuantifier, isAlternator) {\n                this.matches = [], this.isGroup = isGroup || !1, this.isOptional = isOptional || !1, \n                this.isQuantifier = isQuantifier || !1, this.isAlternator = isAlternator || !1, \n                this.quantifier = {\n                    min: 1,\n                    max: 1\n                };\n            }\n            function insertTestDefinition(mtoken, element, position) {\n                var maskdef = opts.definitions[element], newBlockMarker = 0 == mtoken.matches.length;\n                if (position = void 0 != position ? position : mtoken.matches.length, maskdef && !escaped) {\n                    maskdef.placeholder = $.isFunction(maskdef.placeholder) ? maskdef.placeholder.call(this, opts) : maskdef.placeholder;\n                    for (var prevalidators = maskdef.prevalidator, prevalidatorsL = prevalidators ? prevalidators.length : 0, i = 1; i < maskdef.cardinality; i++) {\n                        var prevalidator = prevalidatorsL >= i ? prevalidators[i - 1] : [], validator = prevalidator.validator, cardinality = prevalidator.cardinality;\n                        mtoken.matches.splice(position++, 0, {\n                            fn: validator ? \"string\" == typeof validator ? new RegExp(validator) : new function() {\n                                this.test = validator;\n                            }() : new RegExp(\".\"),\n                            cardinality: cardinality ? cardinality : 1,\n                            optionality: mtoken.isOptional,\n                            newBlockMarker: newBlockMarker,\n                            casing: maskdef.casing,\n                            def: maskdef.definitionSymbol || element,\n                            placeholder: maskdef.placeholder,\n                            mask: element\n                        });\n                    }\n                    mtoken.matches.splice(position++, 0, {\n                        fn: maskdef.validator ? \"string\" == typeof maskdef.validator ? new RegExp(maskdef.validator) : new function() {\n                            this.test = maskdef.validator;\n                        }() : new RegExp(\".\"),\n                        cardinality: maskdef.cardinality,\n                        optionality: mtoken.isOptional,\n                        newBlockMarker: newBlockMarker,\n                        casing: maskdef.casing,\n                        def: maskdef.definitionSymbol || element,\n                        placeholder: maskdef.placeholder,\n                        mask: element\n                    });\n                } else mtoken.matches.splice(position++, 0, {\n                    fn: null,\n                    cardinality: 0,\n                    optionality: mtoken.isOptional,\n                    newBlockMarker: newBlockMarker,\n                    casing: null,\n                    def: element,\n                    placeholder: void 0,\n                    mask: element\n                }), escaped = !1;\n            }\n            for (var match, m, openingToken, currentOpeningToken, alternator, lastMatch, tokenizer = /(?:[?*+]|\\{[0-9\\+\\*]+(?:,[0-9\\+\\*]*)?\\})\\??|[^.?*+^${[]()|\\\\]+|./g, escaped = !1, currentToken = new maskToken(), openenings = [], maskTokens = []; match = tokenizer.exec(mask); ) switch (m = match[0], \n            m.charAt(0)) {\n              case opts.optionalmarker.end:\n              case opts.groupmarker.end:\n                if (openingToken = openenings.pop(), openenings.length > 0) {\n                    if (currentOpeningToken = openenings[openenings.length - 1], currentOpeningToken.matches.push(openingToken), \n                    currentOpeningToken.isAlternator) {\n                        alternator = openenings.pop();\n                        for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1;\n                        openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1], \n                        currentOpeningToken.matches.push(alternator)) : currentToken.matches.push(alternator);\n                    }\n                } else currentToken.matches.push(openingToken);\n                break;\n\n              case opts.optionalmarker.start:\n                openenings.push(new maskToken(!1, !0));\n                break;\n\n              case opts.groupmarker.start:\n                openenings.push(new maskToken(!0));\n                break;\n\n              case opts.quantifiermarker.start:\n                var quantifier = new maskToken(!1, !1, !0);\n                m = m.replace(/[{}]/g, \"\");\n                var mq = m.split(\",\"), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = 1 == mq.length ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]);\n                if ((\"*\" == mq1 || \"+\" == mq1) && (mq0 = \"*\" == mq1 ? 0 : 1), quantifier.quantifier = {\n                    min: mq0,\n                    max: mq1\n                }, openenings.length > 0) {\n                    var matches = openenings[openenings.length - 1].matches;\n                    if (match = matches.pop(), !match.isGroup) {\n                        var groupToken = new maskToken(!0);\n                        groupToken.matches.push(match), match = groupToken;\n                    }\n                    matches.push(match), matches.push(quantifier);\n                } else {\n                    if (match = currentToken.matches.pop(), !match.isGroup) {\n                        var groupToken = new maskToken(!0);\n                        groupToken.matches.push(match), match = groupToken;\n                    }\n                    currentToken.matches.push(match), currentToken.matches.push(quantifier);\n                }\n                break;\n\n              case opts.escapeChar:\n                escaped = !0;\n                break;\n\n              case opts.alternatormarker:\n                openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1], \n                lastMatch = currentOpeningToken.matches.pop()) : lastMatch = currentToken.matches.pop(), \n                lastMatch.isAlternator ? openenings.push(lastMatch) : (alternator = new maskToken(!1, !1, !1, !0), \n                alternator.matches.push(lastMatch), openenings.push(alternator));\n                break;\n\n              default:\n                if (openenings.length > 0) {\n                    if (currentOpeningToken = openenings[openenings.length - 1], currentOpeningToken.matches.length > 0 && !currentOpeningToken.isAlternator && (lastMatch = currentOpeningToken.matches[currentOpeningToken.matches.length - 1], \n                    lastMatch.isGroup && (lastMatch.isGroup = !1, insertTestDefinition(lastMatch, opts.groupmarker.start, 0), \n                    insertTestDefinition(lastMatch, opts.groupmarker.end))), insertTestDefinition(currentOpeningToken, m), \n                    currentOpeningToken.isAlternator) {\n                        alternator = openenings.pop();\n                        for (var mndx = 0; mndx < alternator.matches.length; mndx++) alternator.matches[mndx].isGroup = !1;\n                        openenings.length > 0 ? (currentOpeningToken = openenings[openenings.length - 1], \n                        currentOpeningToken.matches.push(alternator)) : currentToken.matches.push(alternator);\n                    }\n                } else currentToken.matches.length > 0 && (lastMatch = currentToken.matches[currentToken.matches.length - 1], \n                lastMatch.isGroup && (lastMatch.isGroup = !1, insertTestDefinition(lastMatch, opts.groupmarker.start, 0), \n                insertTestDefinition(lastMatch, opts.groupmarker.end))), insertTestDefinition(currentToken, m);\n            }\n            return currentToken.matches.length > 0 && (lastMatch = currentToken.matches[currentToken.matches.length - 1], \n            lastMatch.isGroup && (lastMatch.isGroup = !1, insertTestDefinition(lastMatch, opts.groupmarker.start, 0), \n            insertTestDefinition(lastMatch, opts.groupmarker.end)), maskTokens.push(currentToken)), \n            maskTokens;\n        }\n        function generateMask(mask, metadata) {\n            if (void 0 == mask || \"\" == mask) return void 0;\n            if (1 == mask.length && 0 == opts.greedy && 0 != opts.repeat && (opts.placeholder = \"\"), \n            opts.repeat > 0 || \"*\" == opts.repeat || \"+\" == opts.repeat) {\n                var repeatStart = \"*\" == opts.repeat ? 0 : \"+\" == opts.repeat ? 1 : opts.repeat;\n                mask = opts.groupmarker.start + mask + opts.groupmarker.end + opts.quantifiermarker.start + repeatStart + \",\" + opts.repeat + opts.quantifiermarker.end;\n            }\n            var masksetDefinition;\n            return void 0 == $.inputmask.masksCache[mask] || nocache === !0 ? (masksetDefinition = {\n                mask: mask,\n                maskToken: analyseMask(mask),\n                validPositions: {},\n                _buffer: void 0,\n                buffer: void 0,\n                tests: {},\n                metadata: metadata\n            }, nocache !== !0 && ($.inputmask.masksCache[mask] = masksetDefinition)) : masksetDefinition = $.extend(!0, {}, $.inputmask.masksCache[mask]), \n            masksetDefinition;\n        }\n        function preProcessMask(mask) {\n            if (mask = mask.toString(), opts.numericInput) {\n                mask = mask.split(\"\").reverse();\n                for (var ndx = 0; ndx < mask.length; ndx++) mask[ndx] == opts.optionalmarker.start ? mask[ndx] = opts.optionalmarker.end : mask[ndx] == opts.optionalmarker.end ? mask[ndx] = opts.optionalmarker.start : mask[ndx] == opts.groupmarker.start ? mask[ndx] = opts.groupmarker.end : mask[ndx] == opts.groupmarker.end && (mask[ndx] = opts.groupmarker.start);\n                mask = mask.join(\"\");\n            }\n            return mask;\n        }\n        var ms = void 0;\n        if ($.isFunction(opts.mask) && (opts.mask = opts.mask.call(this, opts)), $.isArray(opts.mask)) {\n            if (opts.mask.length > 1) {\n                opts.keepStatic = void 0 == opts.keepStatic ? !0 : opts.keepStatic;\n                var altMask = \"(\";\n                return $.each(opts.mask, function(ndx, msk) {\n                    altMask.length > 1 && (altMask += \")|(\"), altMask += preProcessMask(void 0 == msk.mask || $.isFunction(msk.mask) ? msk : msk.mask);\n                }), altMask += \")\", generateMask(altMask, opts.mask);\n            }\n            opts.mask = opts.mask.pop();\n        }\n        return opts.mask && (ms = void 0 == opts.mask.mask || $.isFunction(opts.mask.mask) ? generateMask(preProcessMask(opts.mask), opts.mask) : generateMask(preProcessMask(opts.mask.mask), opts.mask)), \n        ms;\n    }\n    function maskScope(actionObj, maskset, opts) {\n        function getMaskTemplate(baseOnInput, minimalPos, includeInput) {\n            minimalPos = minimalPos || 0;\n            var ndxIntlzr, test, testPos, maskTemplate = [], pos = 0;\n            do {\n                if (baseOnInput === !0 && getMaskSet().validPositions[pos]) {\n                    var validPos = getMaskSet().validPositions[pos];\n                    test = validPos.match, ndxIntlzr = validPos.locator.slice(), maskTemplate.push(includeInput === !0 ? validPos.input : getPlaceholder(pos, test));\n                } else testPos = getTestTemplate(pos, ndxIntlzr, pos - 1), test = testPos.match, \n                ndxIntlzr = testPos.locator.slice(), maskTemplate.push(getPlaceholder(pos, test));\n                pos++;\n            } while ((void 0 == maxLength || maxLength > pos - 1) && null != test.fn || null == test.fn && \"\" != test.def || minimalPos >= pos);\n            return maskTemplate.pop(), maskTemplate;\n        }\n        function getMaskSet() {\n            return maskset;\n        }\n        function resetMaskSet(soft) {\n            var maskset = getMaskSet();\n            maskset.buffer = void 0, maskset.tests = {}, soft !== !0 && (maskset._buffer = void 0, \n            maskset.validPositions = {}, maskset.p = 0);\n        }\n        function getLastValidPosition(closestTo, strict) {\n            var maskset = getMaskSet(), lastValidPosition = -1, valids = maskset.validPositions;\n            void 0 == closestTo && (closestTo = -1);\n            var before = lastValidPosition, after = lastValidPosition;\n            for (var posNdx in valids) {\n                var psNdx = parseInt(posNdx);\n                valids[psNdx] && (strict || null != valids[psNdx].match.fn) && (closestTo >= psNdx && (before = psNdx), \n                psNdx >= closestTo && (after = psNdx));\n            }\n            return lastValidPosition = -1 != before && closestTo - before > 1 || closestTo > after ? before : after;\n        }\n        function setValidPosition(pos, validTest, fromSetValid) {\n            if (opts.insertMode && void 0 != getMaskSet().validPositions[pos] && void 0 == fromSetValid) {\n                var i, positionsClone = $.extend(!0, {}, getMaskSet().validPositions), lvp = getLastValidPosition();\n                for (i = pos; lvp >= i; i++) delete getMaskSet().validPositions[i];\n                getMaskSet().validPositions[pos] = validTest;\n                var j, valid = !0, vps = getMaskSet().validPositions;\n                for (i = j = pos; lvp >= i; i++) {\n                    var t = positionsClone[i];\n                    if (void 0 != t) for (var posMatch = j, prevPosMatch = -1; posMatch < getMaskLength() && (null == t.match.fn && vps[i] && (vps[i].match.optionalQuantifier === !0 || vps[i].match.optionality === !0) || null != t.match.fn); ) {\n                        if (null == t.match.fn || !opts.keepStatic && vps[i] && (void 0 != vps[i + 1] && getTests(i + 1, vps[i].locator.slice(), i).length > 1 || void 0 != vps[i].alternation) ? posMatch++ : posMatch = seekNext(j), \n                        positionCanMatchDefinition(posMatch, t.match.def)) {\n                            valid = isValid(posMatch, t.input, !0, !0) !== !1, j = posMatch;\n                            break;\n                        }\n                        if (valid = null == t.match.fn, prevPosMatch == posMatch) break;\n                        prevPosMatch = posMatch;\n                    }\n                    if (!valid) break;\n                }\n                if (!valid) return getMaskSet().validPositions = $.extend(!0, {}, positionsClone), \n                !1;\n            } else getMaskSet().validPositions[pos] = validTest;\n            return !0;\n        }\n        function stripValidPositions(start, end, nocheck, strict) {\n            var i, startPos = start;\n            getMaskSet().p = start, void 0 != getMaskSet().validPositions[start] && getMaskSet().validPositions[start].input == opts.radixPoint && (end++, \n            startPos++);\n            for (i = startPos; end > i; i++) void 0 != getMaskSet().validPositions[i] && (nocheck === !0 || 0 != opts.canClearPosition(getMaskSet(), i, getLastValidPosition(), strict, opts)) && delete getMaskSet().validPositions[i];\n            for (resetMaskSet(!0), i = startPos + 1; i <= getLastValidPosition(); ) {\n                for (;void 0 != getMaskSet().validPositions[startPos]; ) startPos++;\n                var s = getMaskSet().validPositions[startPos];\n                startPos > i && (i = startPos + 1);\n                var t = getMaskSet().validPositions[i];\n                void 0 != t && void 0 == s ? (positionCanMatchDefinition(startPos, t.match.def) && isValid(startPos, t.input, !0) !== !1 && (delete getMaskSet().validPositions[i], \n                i++), startPos++) : i++;\n            }\n            var lvp = getLastValidPosition(), ml = getMaskLength();\n            for (lvp >= start && void 0 != getMaskSet().validPositions[lvp] && getMaskSet().validPositions[lvp].input == opts.radixPoint && delete getMaskSet().validPositions[lvp], \n            i = lvp + 1; ml >= i; i++) getMaskSet().validPositions[i] && delete getMaskSet().validPositions[i];\n            resetMaskSet(!0);\n        }\n        function getTestTemplate(pos, ndxIntlzr, tstPs) {\n            var testPos = getMaskSet().validPositions[pos];\n            if (void 0 == testPos) for (var testPositions = getTests(pos, ndxIntlzr, tstPs), lvp = getLastValidPosition(), lvTest = getMaskSet().validPositions[lvp] || getTests(0)[0], lvTestAltArr = void 0 != lvTest.alternation ? lvTest.locator[lvTest.alternation].toString().split(\",\") : [], ndx = 0; ndx < testPositions.length && (testPos = testPositions[ndx], \n            !(testPos.match && (opts.greedy && testPos.match.optionalQuantifier !== !0 || (testPos.match.optionality === !1 || testPos.match.newBlockMarker === !1) && testPos.match.optionalQuantifier !== !0) && (void 0 == lvTest.alternation || lvTest.alternation != testPos.alternation || void 0 != testPos.locator[lvTest.alternation] && checkAlternationMatch(testPos.locator[lvTest.alternation].toString().split(\",\"), lvTestAltArr)))); ndx++) ;\n            return testPos;\n        }\n        function getTest(pos) {\n            return getMaskSet().validPositions[pos] ? getMaskSet().validPositions[pos].match : getTests(pos)[0].match;\n        }\n        function positionCanMatchDefinition(pos, def) {\n            for (var valid = !1, tests = getTests(pos), tndx = 0; tndx < tests.length; tndx++) if (tests[tndx].match && tests[tndx].match.def == def) {\n                valid = !0;\n                break;\n            }\n            return valid;\n        }\n        function getTests(pos, ndxIntlzr, tstPs, cacheable) {\n            function ResolveTestFromToken(maskToken, ndxInitializer, loopNdx, quantifierRecurse) {\n                function handleMatch(match, loopNdx, quantifierRecurse) {\n                    if (testPos > 1e4) return alert(\"jquery.inputmask: There is probably an error in your mask definition or in the code. Create an issue on github with an example of the mask you are using. \" + getMaskSet().mask), \n                    !0;\n                    if (testPos == pos && void 0 == match.matches) return matches.push({\n                        match: match,\n                        locator: loopNdx.reverse()\n                    }), !0;\n                    if (void 0 != match.matches) {\n                        if (match.isGroup && quantifierRecurse !== !0) {\n                            if (match = handleMatch(maskToken.matches[tndx + 1], loopNdx)) return !0;\n                        } else if (match.isOptional) {\n                            var optionalToken = match;\n                            if (match = ResolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse)) {\n                                var latestMatch = matches[matches.length - 1].match, isFirstMatch = 0 == $.inArray(latestMatch, optionalToken.matches);\n                                if (!isFirstMatch) return !0;\n                                insertStop = !0, testPos = pos;\n                            }\n                        } else if (match.isAlternator) {\n                            var maltMatches, alternateToken = match, malternateMatches = [], currentMatches = matches.slice(), loopNdxCnt = loopNdx.length, altIndex = ndxInitializer.length > 0 ? ndxInitializer.shift() : -1;\n                            if (-1 == altIndex || \"string\" == typeof altIndex) {\n                                var currentPos = testPos, ndxInitializerClone = ndxInitializer.slice(), altIndexArr = [];\n                                \"string\" == typeof altIndex && (altIndexArr = altIndex.split(\",\"));\n                                for (var amndx = 0; amndx < alternateToken.matches.length; amndx++) {\n                                    if (matches = [], match = handleMatch(alternateToken.matches[amndx], [ amndx ].concat(loopNdx), quantifierRecurse) || match, \n                                    match !== !0 && void 0 != match && altIndexArr[altIndexArr.length - 1] < alternateToken.matches.length) {\n                                        var ntndx = maskToken.matches.indexOf(match) + 1;\n                                        maskToken.matches.length > ntndx && (match = handleMatch(maskToken.matches[ntndx], [ ntndx ].concat(loopNdx.slice(1, loopNdx.length)), quantifierRecurse), \n                                        match && (altIndexArr.push(ntndx.toString()), $.each(matches, function(ndx, lmnt) {\n                                            lmnt.alternation = loopNdx.length - 1;\n                                        })));\n                                    }\n                                    maltMatches = matches.slice(), testPos = currentPos, matches = [];\n                                    for (var i = 0; i < ndxInitializerClone.length; i++) ndxInitializer[i] = ndxInitializerClone[i];\n                                    for (var ndx1 = 0; ndx1 < maltMatches.length; ndx1++) {\n                                        var altMatch = maltMatches[ndx1];\n                                        altMatch.alternation = altMatch.alternation || loopNdxCnt;\n                                        for (var ndx2 = 0; ndx2 < malternateMatches.length; ndx2++) {\n                                            var altMatch2 = malternateMatches[ndx2];\n                                            if (altMatch.match.mask == altMatch2.match.mask && (\"string\" != typeof altIndex || -1 != $.inArray(altMatch.locator[altMatch.alternation].toString(), altIndexArr))) {\n                                                maltMatches.splice(ndx1, 1), ndx1--, altMatch2.locator[altMatch.alternation] = altMatch2.locator[altMatch.alternation] + \",\" + altMatch.locator[altMatch.alternation], \n                                                altMatch2.alternation = altMatch.alternation;\n                                                break;\n                                            }\n                                        }\n                                    }\n                                    malternateMatches = malternateMatches.concat(maltMatches);\n                                }\n                                \"string\" == typeof altIndex && (malternateMatches = $.map(malternateMatches, function(lmnt, ndx) {\n                                    if (isFinite(ndx)) {\n                                        var mamatch, alternation = lmnt.alternation, altLocArr = lmnt.locator[alternation].toString().split(\",\");\n                                        lmnt.locator[alternation] = void 0, lmnt.alternation = void 0;\n                                        for (var alndx = 0; alndx < altLocArr.length; alndx++) mamatch = -1 != $.inArray(altLocArr[alndx], altIndexArr), \n                                        mamatch && (void 0 != lmnt.locator[alternation] ? (lmnt.locator[alternation] += \",\", \n                                        lmnt.locator[alternation] += altLocArr[alndx]) : lmnt.locator[alternation] = parseInt(altLocArr[alndx]), \n                                        lmnt.alternation = alternation);\n                                        if (void 0 != lmnt.locator[alternation]) return lmnt;\n                                    }\n                                })), matches = currentMatches.concat(malternateMatches), testPos = pos, insertStop = matches.length > 0;\n                            } else match = alternateToken.matches[altIndex] ? handleMatch(alternateToken.matches[altIndex], [ altIndex ].concat(loopNdx), quantifierRecurse) : !1;\n                            if (match) return !0;\n                        } else if (match.isQuantifier && quantifierRecurse !== !0) for (var qt = match, qndx = ndxInitializer.length > 0 && quantifierRecurse !== !0 ? ndxInitializer.shift() : 0; qndx < (isNaN(qt.quantifier.max) ? qndx + 1 : qt.quantifier.max) && pos >= testPos; qndx++) {\n                            var tokenGroup = maskToken.matches[$.inArray(qt, maskToken.matches) - 1];\n                            if (match = handleMatch(tokenGroup, [ qndx ].concat(loopNdx), !0)) {\n                                var latestMatch = matches[matches.length - 1].match;\n                                latestMatch.optionalQuantifier = qndx > qt.quantifier.min - 1;\n                                var isFirstMatch = 0 == $.inArray(latestMatch, tokenGroup.matches);\n                                if (isFirstMatch) {\n                                    if (qndx > qt.quantifier.min - 1) {\n                                        insertStop = !0, testPos = pos;\n                                        break;\n                                    }\n                                    return !0;\n                                }\n                                return !0;\n                            }\n                        } else if (match = ResolveTestFromToken(match, ndxInitializer, loopNdx, quantifierRecurse)) return !0;\n                    } else testPos++;\n                }\n                for (var tndx = ndxInitializer.length > 0 ? ndxInitializer.shift() : 0; tndx < maskToken.matches.length; tndx++) if (maskToken.matches[tndx].isQuantifier !== !0) {\n                    var match = handleMatch(maskToken.matches[tndx], [ tndx ].concat(loopNdx), quantifierRecurse);\n                    if (match && testPos == pos) return match;\n                    if (testPos > pos) break;\n                }\n            }\n            var maskTokens = getMaskSet().maskToken, testPos = ndxIntlzr ? tstPs : 0, ndxInitializer = ndxIntlzr || [ 0 ], matches = [], insertStop = !1;\n            if (cacheable === !0 && getMaskSet().tests[pos]) return getMaskSet().tests[pos];\n            if (void 0 == ndxIntlzr) {\n                for (var test, previousPos = pos - 1; void 0 == (test = getMaskSet().validPositions[previousPos]) && previousPos > -1 && (!getMaskSet().tests[previousPos] || void 0 == (test = getMaskSet().tests[previousPos][0])); ) previousPos--;\n                void 0 != test && previousPos > -1 && (testPos = previousPos, ndxInitializer = test.locator.slice());\n            }\n            for (var mtndx = ndxInitializer.shift(); mtndx < maskTokens.length; mtndx++) {\n                var match = ResolveTestFromToken(maskTokens[mtndx], ndxInitializer, [ mtndx ]);\n                if (match && testPos == pos || testPos > pos) break;\n            }\n            return (0 == matches.length || insertStop) && matches.push({\n                match: {\n                    fn: null,\n                    cardinality: 0,\n                    optionality: !0,\n                    casing: null,\n                    def: \"\"\n                },\n                locator: []\n            }), getMaskSet().tests[pos] = $.extend(!0, [], matches), getMaskSet().tests[pos];\n        }\n        function getBufferTemplate() {\n            return void 0 == getMaskSet()._buffer && (getMaskSet()._buffer = getMaskTemplate(!1, 1)), \n            getMaskSet()._buffer;\n        }\n        function getBuffer() {\n            return void 0 == getMaskSet().buffer && (getMaskSet().buffer = getMaskTemplate(!0, getLastValidPosition(), !0)), \n            getMaskSet().buffer;\n        }\n        function refreshFromBuffer(start, end, buffer) {\n            if (buffer = buffer || getBuffer().slice(), start === !0) resetMaskSet(), start = 0, \n            end = buffer.length; else for (var i = start; end > i; i++) delete getMaskSet().validPositions[i], \n            delete getMaskSet().tests[i];\n            for (var i = start; end > i; i++) buffer[i] != opts.skipOptionalPartCharacter && isValid(i, buffer[i], !0, !0);\n        }\n        function casing(elem, test) {\n            switch (test.casing) {\n              case \"upper\":\n                elem = elem.toUpperCase();\n                break;\n\n              case \"lower\":\n                elem = elem.toLowerCase();\n            }\n            return elem;\n        }\n        function checkAlternationMatch(altArr1, altArr2) {\n            for (var altArrC = opts.greedy ? altArr2 : altArr2.slice(0, 1), isMatch = !1, alndx = 0; alndx < altArr1.length; alndx++) if (-1 != $.inArray(altArr1[alndx], altArrC)) {\n                isMatch = !0;\n                break;\n            }\n            return isMatch;\n        }\n        function isValid(pos, c, strict, fromSetValid) {\n            function _isValid(position, c, strict, fromSetValid) {\n                var rslt = !1;\n                return $.each(getTests(position), function(ndx, tst) {\n                    for (var test = tst.match, loopend = c ? 1 : 0, chrs = \"\", i = (getBuffer(), test.cardinality); i > loopend; i--) chrs += getBufferElement(position - (i - 1));\n                    if (c && (chrs += c), rslt = null != test.fn ? test.fn.test(chrs, getMaskSet(), position, strict, opts) : c != test.def && c != opts.skipOptionalPartCharacter || \"\" == test.def ? !1 : {\n                        c: test.def,\n                        pos: position\n                    }, rslt !== !1) {\n                        var elem = void 0 != rslt.c ? rslt.c : c;\n                        elem = elem == opts.skipOptionalPartCharacter && null === test.fn ? test.def : elem;\n                        var validatedPos = position, possibleModifiedBuffer = getBuffer();\n                        if (void 0 != rslt.remove && ($.isArray(rslt.remove) || (rslt.remove = [ rslt.remove ]), \n                        $.each(rslt.remove.sort(function(a, b) {\n                            return b - a;\n                        }), function(ndx, lmnt) {\n                            stripValidPositions(lmnt, lmnt + 1, !0);\n                        })), void 0 != rslt.insert && ($.isArray(rslt.insert) || (rslt.insert = [ rslt.insert ]), \n                        $.each(rslt.insert.sort(function(a, b) {\n                            return a - b;\n                        }), function(ndx, lmnt) {\n                            isValid(lmnt.pos, lmnt.c, !0);\n                        })), rslt.refreshFromBuffer) {\n                            var refresh = rslt.refreshFromBuffer;\n                            if (strict = !0, refreshFromBuffer(refresh === !0 ? refresh : refresh.start, refresh.end, possibleModifiedBuffer), \n                            void 0 == rslt.pos && void 0 == rslt.c) return rslt.pos = getLastValidPosition(), \n                            !1;\n                            if (validatedPos = void 0 != rslt.pos ? rslt.pos : position, validatedPos != position) return rslt = $.extend(rslt, isValid(validatedPos, elem, !0)), \n                            !1;\n                        } else if (rslt !== !0 && void 0 != rslt.pos && rslt.pos != position && (validatedPos = rslt.pos, \n                        refreshFromBuffer(position, validatedPos), validatedPos != position)) return rslt = $.extend(rslt, isValid(validatedPos, elem, !0)), \n                        !1;\n                        return 1 != rslt && void 0 == rslt.pos && void 0 == rslt.c ? !1 : (ndx > 0 && resetMaskSet(!0), \n                        setValidPosition(validatedPos, $.extend({}, tst, {\n                            input: casing(elem, test)\n                        }), fromSetValid) || (rslt = !1), !1);\n                    }\n                }), rslt;\n            }\n            function alternate(pos, c, strict, fromSetValid) {\n                for (var lastAlt, alternation, isValidRslt, altPos, validPsClone = $.extend(!0, {}, getMaskSet().validPositions), lAlt = getLastValidPosition(); lAlt >= 0 && (altPos = getMaskSet().validPositions[lAlt], \n                !altPos || void 0 == altPos.alternation || (lastAlt = lAlt, alternation = getMaskSet().validPositions[lastAlt].alternation, \n                getTestTemplate(lastAlt).locator[altPos.alternation] == altPos.locator[altPos.alternation])); lAlt--) ;\n                if (void 0 != alternation) for (var decisionPos in getMaskSet().validPositions) if (altPos = getMaskSet().validPositions[decisionPos], \n                parseInt(decisionPos) > parseInt(lastAlt) && void 0 != altPos.alternation) {\n                    var altNdxs = getMaskSet().validPositions[lastAlt].locator[alternation].toString().split(\",\"), decisionTaker = altPos.locator[alternation] || altNdxs[0];\n                    decisionTaker.length > 0 && (decisionTaker = decisionTaker.split(\",\")[0]);\n                    for (var mndx = 0; mndx < altNdxs.length; mndx++) if (decisionTaker < altNdxs[mndx]) {\n                        for (var possibilityPos, possibilities, dp = decisionPos - 1; dp >= 0; dp--) if (possibilityPos = getMaskSet().validPositions[dp], \n                        void 0 != possibilityPos) {\n                            possibilities = possibilityPos.locator[alternation], possibilityPos.locator[alternation] = parseInt(altNdxs[mndx]);\n                            break;\n                        }\n                        if (decisionTaker != possibilityPos.locator[alternation]) {\n                            for (var validInputs = [], i = decisionPos; i < getLastValidPosition() + 1; i++) {\n                                var validPos = getMaskSet().validPositions[i];\n                                validPos && null != validPos.match.fn && validInputs.push(validPos.input), delete getMaskSet().validPositions[i], \n                                delete getMaskSet().tests[i];\n                            }\n                            for (resetMaskSet(!0), opts.keepStatic = !opts.keepStatic, isValidRslt = !0; validInputs.length > 0; ) {\n                                var input = validInputs.shift();\n                                if (input != opts.skipOptionalPartCharacter && !(isValidRslt = isValid(getLastValidPosition() + 1, input, !1, !0))) break;\n                            }\n                            if (possibilityPos.alternation = alternation, possibilityPos.locator[alternation] = possibilities, \n                            isValidRslt) {\n                                var targetLvp = getLastValidPosition(pos) + 1;\n                                isValidRslt = isValid(pos > targetLvp ? targetLvp : pos, c, strict, fromSetValid);\n                            }\n                            if (opts.keepStatic = !opts.keepStatic, isValidRslt) return isValidRslt;\n                            resetMaskSet(), getMaskSet().validPositions = $.extend(!0, {}, validPsClone);\n                        }\n                    }\n                    break;\n                }\n                return !1;\n            }\n            function trackbackAlternations(originalPos, newPos) {\n                for (var vp = getMaskSet().validPositions[newPos], targetLocator = vp.locator, tll = targetLocator.length, ps = originalPos; newPos > ps; ps++) if (!isMask(ps)) {\n                    var tests = getTests(ps), bestMatch = tests[0], equality = -1;\n                    $.each(tests, function(ndx, tst) {\n                        for (var i = 0; tll > i; i++) tst.locator[i] && checkAlternationMatch(tst.locator[i].toString().split(\",\"), targetLocator[i].toString().split(\",\")) && i > equality && (equality = i, \n                        bestMatch = tst);\n                    }), setValidPosition(ps, $.extend({}, bestMatch, {\n                        input: bestMatch.match.def\n                    }), !0);\n                }\n            }\n            strict = strict === !0;\n            for (var buffer = getBuffer(), pndx = pos - 1; pndx > -1 && !getMaskSet().validPositions[pndx]; pndx--) ;\n            for (pndx++; pos > pndx; pndx++) void 0 == getMaskSet().validPositions[pndx] && ((!isMask(pndx) || buffer[pndx] != getPlaceholder(pndx)) && getTests(pndx).length > 1 || buffer[pndx] == opts.radixPoint || \"0\" == buffer[pndx] && $.inArray(opts.radixPoint, buffer) < pndx) && _isValid(pndx, buffer[pndx], !0);\n            var maskPos = pos, result = !1, positionsClone = $.extend(!0, {}, getMaskSet().validPositions);\n            if (maskPos < getMaskLength() && (result = _isValid(maskPos, c, strict, fromSetValid), \n            (!strict || fromSetValid) && result === !1)) {\n                var currentPosValid = getMaskSet().validPositions[maskPos];\n                if (!currentPosValid || null != currentPosValid.match.fn || currentPosValid.match.def != c && c != opts.skipOptionalPartCharacter) {\n                    if ((opts.insertMode || void 0 == getMaskSet().validPositions[seekNext(maskPos)]) && !isMask(maskPos)) for (var nPos = maskPos + 1, snPos = seekNext(maskPos); snPos >= nPos; nPos++) if (result = _isValid(nPos, c, strict, fromSetValid), \n                    result !== !1) {\n                        trackbackAlternations(maskPos, nPos), maskPos = nPos;\n                        break;\n                    }\n                } else result = {\n                    caret: seekNext(maskPos)\n                };\n            }\n            if (result === !1 && opts.keepStatic && isComplete(buffer) && (result = alternate(pos, c, strict, fromSetValid)), \n            result === !0 && (result = {\n                pos: maskPos\n            }), $.isFunction(opts.postValidation) && 0 != result && !strict) {\n                resetMaskSet(!0);\n                var postValidResult = opts.postValidation(getBuffer(), opts);\n                if (!postValidResult) return resetMaskSet(!0), getMaskSet().validPositions = $.extend(!0, {}, positionsClone), \n                !1;\n            }\n            return result;\n        }\n        function isMask(pos) {\n            var test = getTest(pos);\n            if (null != test.fn) return test.fn;\n            if (!opts.keepStatic && void 0 == getMaskSet().validPositions[pos]) {\n                for (var tests = getTests(pos), staticAlternations = !0, i = 0; i < tests.length; i++) if (\"\" != tests[i].match.def && (void 0 == tests[i].alternation || tests[i].locator[tests[i].alternation].length > 1)) {\n                    staticAlternations = !1;\n                    break;\n                }\n                return staticAlternations;\n            }\n            return !1;\n        }\n        function getMaskLength() {\n            var maskLength;\n            maxLength = $el.prop(\"maxLength\"), -1 == maxLength && (maxLength = void 0);\n            var pos, lvp = getLastValidPosition(), testPos = getMaskSet().validPositions[lvp], ndxIntlzr = void 0 != testPos ? testPos.locator.slice() : void 0;\n            for (pos = lvp + 1; void 0 == testPos || null != testPos.match.fn || null == testPos.match.fn && \"\" != testPos.match.def; pos++) testPos = getTestTemplate(pos, ndxIntlzr, pos - 1), \n            ndxIntlzr = testPos.locator.slice();\n            var lastTest = getTest(pos - 1);\n            return maskLength = \"\" != lastTest.def ? pos : pos - 1, void 0 == maxLength || maxLength > maskLength ? maskLength : maxLength;\n        }\n        function seekNext(pos) {\n            var maskL = getMaskLength();\n            if (pos >= maskL) return maskL;\n            for (var position = pos; ++position < maskL && !isMask(position) && (opts.nojumps !== !0 || opts.nojumpsThreshold > position); ) ;\n            return position;\n        }\n        function seekPrevious(pos) {\n            var position = pos;\n            if (0 >= position) return 0;\n            for (;--position > 0 && !isMask(position); ) ;\n            return position;\n        }\n        function getBufferElement(position) {\n            return void 0 == getMaskSet().validPositions[position] ? getPlaceholder(position) : getMaskSet().validPositions[position].input;\n        }\n        function writeBuffer(input, buffer, caretPos, event, triggerInputEvent) {\n            if (event && $.isFunction(opts.onBeforeWrite)) {\n                var result = opts.onBeforeWrite.call(input, event, buffer, caretPos, opts);\n                if (result) {\n                    if (result.refreshFromBuffer) {\n                        var refresh = result.refreshFromBuffer;\n                        refreshFromBuffer(refresh === !0 ? refresh : refresh.start, refresh.end, result.buffer), \n                        resetMaskSet(!0), buffer = getBuffer();\n                    }\n                    caretPos = result.caret || caretPos;\n                }\n            }\n            input._valueSet(buffer.join(\"\")), void 0 != caretPos && caret(input, caretPos), \n            triggerInputEvent === !0 && (skipInputEvent = !0, $(input).trigger(\"input\"));\n        }\n        function getPlaceholder(pos, test) {\n            if (test = test || getTest(pos), void 0 != test.placeholder) return test.placeholder;\n            if (null == test.fn) {\n                if (!opts.keepStatic && void 0 == getMaskSet().validPositions[pos]) {\n                    for (var tests = getTests(pos), staticAlternations = !0, i = 0; i < tests.length; i++) if (\"\" != tests[i].match.def && (null !== tests[i].match.fn || void 0 == tests[i].alternation || tests[i].locator[tests[i].alternation].length > 1)) {\n                        staticAlternations = !1;\n                        break;\n                    }\n                    if (staticAlternations) return opts.placeholder.charAt(pos % opts.placeholder.length);\n                }\n                return test.def;\n            }\n            return opts.placeholder.charAt(pos % opts.placeholder.length);\n        }\n        function checkVal(input, writeOut, strict, nptvl) {\n            function isTemplateMatch() {\n                var isMatch = !1, charCodeNdx = getBufferTemplate().slice(initialNdx, seekNext(initialNdx)).join(\"\").indexOf(charCodes);\n                if (-1 != charCodeNdx && !isMask(initialNdx)) {\n                    isMatch = !0;\n                    for (var bufferTemplateArr = getBufferTemplate().slice(initialNdx, initialNdx + charCodeNdx), i = 0; i < bufferTemplateArr.length; i++) if (\" \" != bufferTemplateArr[i]) {\n                        isMatch = !1;\n                        break;\n                    }\n                }\n                return isMatch;\n            }\n            var inputValue = void 0 != nptvl ? nptvl.slice() : input._valueGet().split(\"\"), charCodes = \"\", initialNdx = 0;\n            if (resetMaskSet(), getMaskSet().p = seekNext(-1), writeOut && input._valueSet(\"\"), \n            !strict) {\n                var staticInput = getBufferTemplate().slice(0, seekNext(-1)).join(\"\"), matches = inputValue.join(\"\").match(new RegExp(\"^\" + escapeRegex(staticInput), \"g\"));\n                matches && matches.length > 0 && (inputValue.splice(0, matches.length * staticInput.length), \n                initialNdx = seekNext(initialNdx));\n            }\n            $.each(inputValue, function(ndx, charCode) {\n                var keypress = $.Event(\"keypress\");\n                keypress.which = charCode.charCodeAt(0), charCodes += charCode;\n                var lvp = getLastValidPosition(void 0, !0), lvTest = getMaskSet().validPositions[lvp], nextTest = getTestTemplate(lvp + 1, lvTest ? lvTest.locator.slice() : void 0, lvp);\n                if (!isTemplateMatch() || strict) {\n                    var pos = strict ? ndx : null == nextTest.match.fn && nextTest.match.optionality && lvp + 1 < getMaskSet().p ? lvp + 1 : getMaskSet().p;\n                    keypressEvent.call(input, keypress, !0, !1, strict, pos), initialNdx = pos + 1, \n                    charCodes = \"\";\n                } else keypressEvent.call(input, keypress, !0, !1, !0, lvp + 1);\n            }), writeOut && writeBuffer(input, getBuffer(), $(input).is(\":focus\") ? seekNext(getLastValidPosition(0)) : void 0, $.Event(\"checkval\"));\n        }\n        function escapeRegex(str) {\n            return $.inputmask.escapeRegex(str);\n        }\n        function unmaskedvalue($input) {\n            if ($input.data(\"_inputmask\") && !$input.hasClass(\"hasDatepicker\")) {\n                var umValue = [], vps = getMaskSet().validPositions;\n                for (var pndx in vps) vps[pndx].match && null != vps[pndx].match.fn && umValue.push(vps[pndx].input);\n                var unmaskedValue = (isRTL ? umValue.reverse() : umValue).join(\"\"), bufferValue = (isRTL ? getBuffer().slice().reverse() : getBuffer()).join(\"\");\n                return $.isFunction(opts.onUnMask) && (unmaskedValue = opts.onUnMask.call($input, bufferValue, unmaskedValue, opts) || unmaskedValue), \n                unmaskedValue;\n            }\n            return $input[0]._valueGet();\n        }\n        function TranslatePosition(pos) {\n            if (isRTL && \"number\" == typeof pos && (!opts.greedy || \"\" != opts.placeholder)) {\n                var bffrLght = getBuffer().length;\n                pos = bffrLght - pos;\n            }\n            return pos;\n        }\n        function caret(input, begin, end) {\n            var range, npt = input.jquery && input.length > 0 ? input[0] : input;\n            if (\"number\" != typeof begin) return npt.setSelectionRange ? (begin = npt.selectionStart, \n            end = npt.selectionEnd) : window.getSelection ? (range = window.getSelection().getRangeAt(0), \n            (range.commonAncestorContainer.parentNode == npt || range.commonAncestorContainer == npt) && (begin = range.startOffset, \n            end = range.endOffset)) : document.selection && document.selection.createRange && (range = document.selection.createRange(), \n            begin = 0 - range.duplicate().moveStart(\"character\", -1e5), end = begin + range.text.length), \n            {\n                begin: TranslatePosition(begin),\n                end: TranslatePosition(end)\n            };\n            if (begin = TranslatePosition(begin), end = TranslatePosition(end), end = \"number\" == typeof end ? end : begin, \n            $(npt).is(\":visible\")) {\n                var scrollCalc = $(npt).css(\"font-size\").replace(\"px\", \"\") * end;\n                if (npt.scrollLeft = scrollCalc > npt.scrollWidth ? scrollCalc : 0, androidchrome || 0 != opts.insertMode || begin != end || end++, \n                npt.setSelectionRange) npt.selectionStart = begin, npt.selectionEnd = end; else if (window.getSelection) {\n                    if (range = document.createRange(), void 0 == npt.firstChild) {\n                        var textNode = document.createTextNode(\"\");\n                        npt.appendChild(textNode);\n                    }\n                    range.setStart(npt.firstChild, begin < npt._valueGet().length ? begin : npt._valueGet().length), \n                    range.setEnd(npt.firstChild, end < npt._valueGet().length ? end : npt._valueGet().length), \n                    range.collapse(!0);\n                    var sel = window.getSelection();\n                    sel.removeAllRanges(), sel.addRange(range);\n                } else npt.createTextRange && (range = npt.createTextRange(), range.collapse(!0), \n                range.moveEnd(\"character\", end), range.moveStart(\"character\", begin), range.select());\n            }\n        }\n        function determineLastRequiredPosition(returnDefinition) {\n            var pos, testPos, buffer = getBuffer(), bl = buffer.length, lvp = getLastValidPosition(), positions = {}, lvTest = getMaskSet().validPositions[lvp], ndxIntlzr = void 0 != lvTest ? lvTest.locator.slice() : void 0;\n            for (pos = lvp + 1; pos < buffer.length; pos++) testPos = getTestTemplate(pos, ndxIntlzr, pos - 1), \n            ndxIntlzr = testPos.locator.slice(), positions[pos] = $.extend(!0, {}, testPos);\n            var lvTestAlt = lvTest && void 0 != lvTest.alternation ? lvTest.locator[lvTest.alternation] : void 0;\n            for (pos = bl - 1; pos > lvp && (testPos = positions[pos], (testPos.match.optionality || testPos.match.optionalQuantifier || lvTestAlt && (lvTestAlt != positions[pos].locator[lvTest.alternation] && null != testPos.match.fn || null == testPos.match.fn && testPos.locator[lvTest.alternation] && checkAlternationMatch(testPos.locator[lvTest.alternation].toString().split(\",\"), lvTestAlt.split(\",\")) && \"\" != getTests(pos)[0].def)) && buffer[pos] == getPlaceholder(pos, testPos.match)); pos--) bl--;\n            return returnDefinition ? {\n                l: bl,\n                def: positions[bl] ? positions[bl].match : void 0\n            } : bl;\n        }\n        function clearOptionalTail(buffer) {\n            for (var rl = determineLastRequiredPosition(), lmib = buffer.length - 1; lmib > rl && !isMask(lmib); lmib--) ;\n            return buffer.splice(rl, lmib + 1 - rl), buffer;\n        }\n        function isComplete(buffer) {\n            if ($.isFunction(opts.isComplete)) return opts.isComplete.call($el, buffer, opts);\n            if (\"*\" == opts.repeat) return void 0;\n            {\n                var complete = !1, lrp = determineLastRequiredPosition(!0), aml = seekPrevious(lrp.l);\n                getLastValidPosition();\n            }\n            if (void 0 == lrp.def || lrp.def.newBlockMarker || lrp.def.optionality || lrp.def.optionalQuantifier) {\n                complete = !0;\n                for (var i = 0; aml >= i; i++) {\n                    var test = getTestTemplate(i).match;\n                    if (null != test.fn && void 0 == getMaskSet().validPositions[i] && test.optionality !== !0 && test.optionalQuantifier !== !0 || null == test.fn && buffer[i] != getPlaceholder(i, test)) {\n                        complete = !1;\n                        break;\n                    }\n                }\n            }\n            return complete;\n        }\n        function isSelection(begin, end) {\n            return isRTL ? begin - end > 1 || begin - end == 1 && opts.insertMode : end - begin > 1 || end - begin == 1 && opts.insertMode;\n        }\n        function installEventRuler(npt) {\n            var events = $._data(npt).events, inComposition = !1;\n            $.each(events, function(eventType, eventHandlers) {\n                $.each(eventHandlers, function(ndx, eventHandler) {\n                    if (\"inputmask\" == eventHandler.namespace && \"setvalue\" != eventHandler.type) {\n                        var handler = eventHandler.handler;\n                        eventHandler.handler = function(e) {\n                            if (!(this.disabled || this.readOnly && !(\"keydown\" == e.type && e.ctrlKey && 67 == e.keyCode || e.keyCode == $.inputmask.keyCode.TAB))) {\n                                switch (e.type) {\n                                  case \"input\":\n                                    if (skipInputEvent === !0 || inComposition === !0) return skipInputEvent = !1, e.preventDefault();\n                                    break;\n\n                                  case \"keydown\":\n                                    skipKeyPressEvent = !1, inComposition = !1;\n                                    break;\n\n                                  case \"keypress\":\n                                    if (skipKeyPressEvent === !0) return e.preventDefault();\n                                    skipKeyPressEvent = !0;\n                                    break;\n\n                                  case \"compositionstart\":\n                                    inComposition = !0;\n                                    break;\n\n                                  case \"compositionupdate\":\n                                    skipInputEvent = !0;\n                                    break;\n\n                                  case \"compositionend\":\n                                    inComposition = !1;\n                                }\n                                return handler.apply(this, arguments);\n                            }\n                            e.preventDefault();\n                        };\n                    }\n                });\n            });\n        }\n        function patchValueProperty(npt) {\n            function PatchValhook(type) {\n                if (void 0 == $.valHooks[type] || 1 != $.valHooks[type].inputmaskpatch) {\n                    var valhookGet = $.valHooks[type] && $.valHooks[type].get ? $.valHooks[type].get : function(elem) {\n                        return elem.value;\n                    }, valhookSet = $.valHooks[type] && $.valHooks[type].set ? $.valHooks[type].set : function(elem, value) {\n                        return elem.value = value, elem;\n                    };\n                    $.valHooks[type] = {\n                        get: function(elem) {\n                            var $elem = $(elem);\n                            if ($elem.data(\"_inputmask\")) {\n                                if ($elem.data(\"_inputmask\").opts.autoUnmask) return $elem.inputmask(\"unmaskedvalue\");\n                                var result = valhookGet(elem), inputData = $elem.data(\"_inputmask\"), maskset = inputData.maskset, bufferTemplate = maskset._buffer;\n                                return bufferTemplate = bufferTemplate ? bufferTemplate.join(\"\") : \"\", result != bufferTemplate ? result : \"\";\n                            }\n                            return valhookGet(elem);\n                        },\n                        set: function(elem, value) {\n                            var result, $elem = $(elem), inputData = $elem.data(\"_inputmask\");\n                            return result = valhookSet(elem, value), inputData && $elem.triggerHandler(\"setvalue.inputmask\"), \n                            result;\n                        },\n                        inputmaskpatch: !0\n                    };\n                }\n            }\n            function getter() {\n                var $self = $(this), inputData = $(this).data(\"_inputmask\");\n                return inputData ? inputData.opts.autoUnmask ? $self.inputmask(\"unmaskedvalue\") : valueGet.call(this) != getBufferTemplate().join(\"\") ? valueGet.call(this) : \"\" : valueGet.call(this);\n            }\n            function setter(value) {\n                var inputData = $(this).data(\"_inputmask\");\n                valueSet.call(this, value), inputData && $(this).triggerHandler(\"setvalue.inputmask\");\n            }\n            function InstallNativeValueSetFallback(npt) {\n                $(npt).bind(\"mouseenter.inputmask\", function(event) {\n                    var $input = $(this), input = this, value = input._valueGet();\n                    \"\" != value && value != getBuffer().join(\"\") && $input.triggerHandler(\"setvalue.inputmask\");\n                });\n                //!! the bound handlers are executed in the order they where bound\n                var events = $._data(npt).events, handlers = events.mouseover;\n                if (handlers) {\n                    for (var ourHandler = handlers[handlers.length - 1], i = handlers.length - 1; i > 0; i--) handlers[i] = handlers[i - 1];\n                    handlers[0] = ourHandler;\n                }\n            }\n            var valueGet, valueSet;\n            if (!npt._valueGet) {\n                var valueProperty;\n                Object.getOwnPropertyDescriptor && void 0 == npt.value ? (valueGet = function() {\n                    return this.textContent;\n                }, valueSet = function(value) {\n                    this.textContent = value;\n                }, Object.defineProperty(npt, \"value\", {\n                    get: getter,\n                    set: setter\n                })) : ((valueProperty = Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(npt, \"value\")) && valueProperty.configurable, \n                document.__lookupGetter__ && npt.__lookupGetter__(\"value\") ? (valueGet = npt.__lookupGetter__(\"value\"), \n                valueSet = npt.__lookupSetter__(\"value\"), npt.__defineGetter__(\"value\", getter), \n                npt.__defineSetter__(\"value\", setter)) : (valueGet = function() {\n                    return npt.value;\n                }, valueSet = function(value) {\n                    npt.value = value;\n                }, PatchValhook(npt.type), InstallNativeValueSetFallback(npt))), npt._valueGet = function(overruleRTL) {\n                    return isRTL && overruleRTL !== !0 ? valueGet.call(this).split(\"\").reverse().join(\"\") : valueGet.call(this);\n                }, npt._valueSet = function(value) {\n                    valueSet.call(this, isRTL ? value.split(\"\").reverse().join(\"\") : value);\n                };\n            }\n        }\n        function handleRemove(input, k, pos, strict) {\n            function generalize() {\n                if (opts.keepStatic) {\n                    resetMaskSet(!0);\n                    var lastAlt, validInputs = [], positionsClone = $.extend(!0, {}, getMaskSet().validPositions);\n                    for (lastAlt = getLastValidPosition(); lastAlt >= 0; lastAlt--) {\n                        var validPos = getMaskSet().validPositions[lastAlt];\n                        if (validPos) {\n                            if (void 0 != validPos.alternation && validPos.locator[validPos.alternation] == getTestTemplate(lastAlt).locator[validPos.alternation]) break;\n                            null != validPos.match.fn && validInputs.push(validPos.input), delete getMaskSet().validPositions[lastAlt];\n                        }\n                    }\n                    if (lastAlt > 0) for (;validInputs.length > 0; ) {\n                        getMaskSet().p = seekNext(getLastValidPosition());\n                        var keypress = $.Event(\"keypress\");\n                        keypress.which = validInputs.pop().charCodeAt(0), keypressEvent.call(input, keypress, !0, !1, !1, getMaskSet().p);\n                    } else getMaskSet().validPositions = $.extend(!0, {}, positionsClone);\n                }\n            }\n            if ((opts.numericInput || isRTL) && (k == $.inputmask.keyCode.BACKSPACE ? k = $.inputmask.keyCode.DELETE : k == $.inputmask.keyCode.DELETE && (k = $.inputmask.keyCode.BACKSPACE), \n            isRTL)) {\n                var pend = pos.end;\n                pos.end = pos.begin, pos.begin = pend;\n            }\n            if (k == $.inputmask.keyCode.BACKSPACE && (pos.end - pos.begin < 1 || 0 == opts.insertMode) ? pos.begin = seekPrevious(pos.begin) : k == $.inputmask.keyCode.DELETE && pos.begin == pos.end && (pos.end = isMask(pos.end) ? pos.end + 1 : seekNext(pos.end) + 1), \n            stripValidPositions(pos.begin, pos.end, !1, strict), strict !== !0) {\n                generalize();\n                var lvp = getLastValidPosition(pos.begin);\n                lvp < pos.begin ? (-1 == lvp && resetMaskSet(), getMaskSet().p = seekNext(lvp)) : getMaskSet().p = pos.begin;\n            }\n        }\n        function keydownEvent(e) {\n            var input = this, $input = $(input), k = e.keyCode, pos = caret(input);\n            k == $.inputmask.keyCode.BACKSPACE || k == $.inputmask.keyCode.DELETE || iphone && 127 == k || e.ctrlKey && 88 == k && !isInputEventSupported(\"cut\") ? (e.preventDefault(), \n            88 == k && (undoValue = getBuffer().join(\"\")), handleRemove(input, k, pos), writeBuffer(input, getBuffer(), getMaskSet().p, e, undoValue != getBuffer().join(\"\")), \n            input._valueGet() == getBufferTemplate().join(\"\") ? $input.trigger(\"cleared\") : isComplete(getBuffer()) === !0 && $input.trigger(\"complete\"), \n            opts.showTooltip && $input.prop(\"title\", getMaskSet().mask)) : k == $.inputmask.keyCode.END || k == $.inputmask.keyCode.PAGE_DOWN ? setTimeout(function() {\n                var caretPos = seekNext(getLastValidPosition());\n                opts.insertMode || caretPos != getMaskLength() || e.shiftKey || caretPos--, caret(input, e.shiftKey ? pos.begin : caretPos, caretPos);\n            }, 0) : k == $.inputmask.keyCode.HOME && !e.shiftKey || k == $.inputmask.keyCode.PAGE_UP ? caret(input, 0, e.shiftKey ? pos.begin : 0) : (opts.undoOnEscape && k == $.inputmask.keyCode.ESCAPE || 90 == k && e.ctrlKey) && e.altKey !== !0 ? (checkVal(input, !0, !1, undoValue.split(\"\")), \n            $input.click()) : k != $.inputmask.keyCode.INSERT || e.shiftKey || e.ctrlKey ? 0 != opts.insertMode || e.shiftKey || (k == $.inputmask.keyCode.RIGHT ? setTimeout(function() {\n                var caretPos = caret(input);\n                caret(input, caretPos.begin);\n            }, 0) : k == $.inputmask.keyCode.LEFT && setTimeout(function() {\n                var caretPos = caret(input);\n                caret(input, isRTL ? caretPos.begin + 1 : caretPos.begin - 1);\n            }, 0)) : (opts.insertMode = !opts.insertMode, caret(input, opts.insertMode || pos.begin != getMaskLength() ? pos.begin : pos.begin - 1)), \n            opts.onKeyDown.call(this, e, getBuffer(), caret(input).begin, opts), ignorable = -1 != $.inArray(k, opts.ignorables);\n        }\n        function keypressEvent(e, checkval, writeOut, strict, ndx) {\n            var input = this, $input = $(input), k = e.which || e.charCode || e.keyCode;\n            if (!(checkval === !0 || e.ctrlKey && e.altKey) && (e.ctrlKey || e.metaKey || ignorable)) return !0;\n            if (k) {\n                46 == k && 0 == e.shiftKey && \",\" == opts.radixPoint && (k = 44);\n                var forwardPosition, pos = checkval ? {\n                    begin: ndx,\n                    end: ndx\n                } : caret(input), c = String.fromCharCode(k), isSlctn = isSelection(pos.begin, pos.end);\n                isSlctn && (getMaskSet().undoPositions = $.extend(!0, {}, getMaskSet().validPositions), \n                handleRemove(input, $.inputmask.keyCode.DELETE, pos, !0), pos.begin = getMaskSet().p, \n                opts.insertMode || (opts.insertMode = !opts.insertMode, setValidPosition(pos.begin, strict), \n                opts.insertMode = !opts.insertMode), isSlctn = !opts.multi), getMaskSet().writeOutBuffer = !0;\n                var p = isRTL && !isSlctn ? pos.end : pos.begin, valResult = isValid(p, c, strict);\n                if (valResult !== !1) {\n                    if (valResult !== !0 && (p = void 0 != valResult.pos ? valResult.pos : p, c = void 0 != valResult.c ? valResult.c : c), \n                    resetMaskSet(!0), void 0 != valResult.caret) forwardPosition = valResult.caret; else {\n                        var vps = getMaskSet().validPositions;\n                        forwardPosition = !opts.keepStatic && (void 0 != vps[p + 1] && getTests(p + 1, vps[p].locator.slice(), p).length > 1 || void 0 != vps[p].alternation) ? p + 1 : seekNext(p);\n                    }\n                    getMaskSet().p = forwardPosition;\n                }\n                if (writeOut !== !1) {\n                    var self = this;\n                    if (setTimeout(function() {\n                        opts.onKeyValidation.call(self, valResult, opts);\n                    }, 0), getMaskSet().writeOutBuffer && valResult !== !1) {\n                        var buffer = getBuffer();\n                        writeBuffer(input, buffer, checkval ? void 0 : opts.numericInput ? seekPrevious(forwardPosition) : forwardPosition, e, checkval !== !0), \n                        checkval !== !0 && setTimeout(function() {\n                            isComplete(buffer) === !0 && $input.trigger(\"complete\");\n                        }, 0);\n                    } else isSlctn && (getMaskSet().buffer = void 0, getMaskSet().validPositions = getMaskSet().undoPositions);\n                } else isSlctn && (getMaskSet().buffer = void 0, getMaskSet().validPositions = getMaskSet().undoPositions);\n                if (opts.showTooltip && $input.prop(\"title\", getMaskSet().mask), checkval && $.isFunction(opts.onBeforeWrite)) {\n                    var result = opts.onBeforeWrite.call(this, e, getBuffer(), forwardPosition, opts);\n                    if (result && result.refreshFromBuffer) {\n                        var refresh = result.refreshFromBuffer;\n                        refreshFromBuffer(refresh === !0 ? refresh : refresh.start, refresh.end, result.buffer), \n                        resetMaskSet(!0), result.caret && (getMaskSet().p = result.caret);\n                    }\n                }\n                e.preventDefault();\n            }\n        }\n        function pasteEvent(e) {\n            var input = this, $input = $(input), inputValue = input._valueGet(!0), caretPos = caret(input);\n            if (\"propertychange\" == e.type && input._valueGet().length <= getMaskLength()) return !0;\n            if (\"paste\" == e.type) {\n                var valueBeforeCaret = inputValue.substr(0, caretPos.begin), valueAfterCaret = inputValue.substr(caretPos.end, inputValue.length);\n                valueBeforeCaret == getBufferTemplate().slice(0, caretPos.begin).join(\"\") && (valueBeforeCaret = \"\"), \n                valueAfterCaret == getBufferTemplate().slice(caretPos.end).join(\"\") && (valueAfterCaret = \"\"), \n                window.clipboardData && window.clipboardData.getData ? inputValue = valueBeforeCaret + window.clipboardData.getData(\"Text\") + valueAfterCaret : e.originalEvent && e.originalEvent.clipboardData && e.originalEvent.clipboardData.getData && (inputValue = valueBeforeCaret + e.originalEvent.clipboardData.getData(\"text/plain\") + valueAfterCaret);\n            }\n            var pasteValue = inputValue;\n            if ($.isFunction(opts.onBeforePaste)) {\n                if (pasteValue = opts.onBeforePaste.call(input, inputValue, opts), pasteValue === !1) return e.preventDefault(), \n                !1;\n                pasteValue || (pasteValue = inputValue);\n            }\n            return checkVal(input, !0, !1, isRTL ? pasteValue.split(\"\").reverse() : pasteValue.split(\"\")), \n            $input.click(), isComplete(getBuffer()) === !0 && $input.trigger(\"complete\"), !1;\n        }\n        function inputFallBackEvent(e) {\n            var input = this;\n            checkVal(input, !0, !1), isComplete(getBuffer()) === !0 && $(input).trigger(\"complete\"), \n            e.preventDefault();\n        }\n        function compositionStartEvent(e) {\n            var input = this;\n            undoValue = getBuffer().join(\"\"), (\"\" == compositionData || 0 != e.originalEvent.data.indexOf(compositionData)) && (compositionCaretPos = caret(input));\n        }\n        function compositionUpdateEvent(e) {\n            var input = this, caretPos = compositionCaretPos || caret(input);\n            0 == e.originalEvent.data.indexOf(compositionData) && (resetMaskSet(), caretPos = {\n                begin: 0,\n                end: 0\n            });\n            var newData = e.originalEvent.data;\n            caret(input, caretPos.begin, caretPos.end);\n            for (var i = 0; i < newData.length; i++) {\n                var keypress = $.Event(\"keypress\");\n                keypress.which = newData.charCodeAt(i), skipKeyPressEvent = !1, ignorable = !1, \n                keypressEvent.call(input, keypress);\n            }\n            setTimeout(function() {\n                var forwardPosition = getMaskSet().p;\n                writeBuffer(input, getBuffer(), opts.numericInput ? seekPrevious(forwardPosition) : forwardPosition);\n            }, 0), compositionData = e.originalEvent.data;\n        }\n        function compositionEndEvent(e) {}\n        function mask(el) {\n            if ($el = $(el), $el.data(\"_inputmask\", {\n                maskset: maskset,\n                opts: opts,\n                isRTL: !1\n            }), opts.showTooltip && $el.prop(\"title\", getMaskSet().mask), (\"rtl\" == el.dir || opts.rightAlign) && $el.css(\"text-align\", \"right\"), \n            \"rtl\" == el.dir || opts.numericInput) {\n                el.dir = \"ltr\", $el.removeAttr(\"dir\");\n                var inputData = $el.data(\"_inputmask\");\n                inputData.isRTL = !0, $el.data(\"_inputmask\", inputData), isRTL = !0;\n            }\n            $el.unbind(\".inputmask\"), ($el.is(\":input\") && isInputTypeSupported($el.attr(\"type\")) || el.isContentEditable) && ($el.closest(\"form\").bind(\"submit\", function(e) {\n                undoValue != getBuffer().join(\"\") && $el.change(), $el[0]._valueGet && $el[0]._valueGet() == getBufferTemplate().join(\"\") && $el[0]._valueSet(\"\"), \n                opts.removeMaskOnSubmit && $el.inputmask(\"remove\");\n            }).bind(\"reset\", function() {\n                setTimeout(function() {\n                    $el.triggerHandler(\"setvalue.inputmask\");\n                }, 0);\n            }), $el.bind(\"mouseenter.inputmask\", function() {\n                var $input = $(this), input = this;\n                !$input.is(\":focus\") && opts.showMaskOnHover && input._valueGet() != getBuffer().join(\"\") && writeBuffer(input, getBuffer());\n            }).bind(\"blur.inputmask\", function(e) {\n                var $input = $(this), input = this;\n                if ($input.data(\"_inputmask\")) {\n                    var nptValue = input._valueGet(), buffer = getBuffer().slice();\n                    firstClick = !0, undoValue != buffer.join(\"\") && setTimeout(function() {\n                        $input.change(), undoValue = buffer.join(\"\");\n                    }, 0), \"\" != nptValue && (opts.clearMaskOnLostFocus && (nptValue == getBufferTemplate().join(\"\") ? buffer = [] : clearOptionalTail(buffer)), \n                    isComplete(buffer) === !1 && ($input.trigger(\"incomplete\"), opts.clearIncomplete && (resetMaskSet(), \n                    buffer = opts.clearMaskOnLostFocus ? [] : getBufferTemplate().slice())), writeBuffer(input, buffer, void 0, e));\n                }\n            }).bind(\"focus.inputmask\", function(e) {\n                var input = ($(this), this), nptValue = input._valueGet();\n                opts.showMaskOnFocus && (!opts.showMaskOnHover || opts.showMaskOnHover && \"\" == nptValue) && input._valueGet() != getBuffer().join(\"\") && writeBuffer(input, getBuffer(), seekNext(getLastValidPosition())), \n                undoValue = getBuffer().join(\"\");\n            }).bind(\"mouseleave.inputmask\", function() {\n                var $input = $(this), input = this;\n                if (opts.clearMaskOnLostFocus) {\n                    var buffer = getBuffer().slice(), nptValue = input._valueGet();\n                    $input.is(\":focus\") || nptValue == $input.attr(\"placeholder\") || \"\" == nptValue || (nptValue == getBufferTemplate().join(\"\") ? buffer = [] : clearOptionalTail(buffer), \n                    writeBuffer(input, buffer));\n                }\n            }).bind(\"click.inputmask\", function() {\n                var $input = $(this), input = this;\n                if ($input.is(\":focus\")) {\n                    var selectedCaret = caret(input);\n                    if (selectedCaret.begin == selectedCaret.end) if (opts.radixFocus && \"\" != opts.radixPoint && -1 != $.inArray(opts.radixPoint, getBuffer()) && (firstClick || getBuffer().join(\"\") == getBufferTemplate().join(\"\"))) caret(input, $.inArray(opts.radixPoint, getBuffer())), \n                    firstClick = !1; else {\n                        var clickPosition = TranslatePosition(selectedCaret.begin), lastPosition = seekNext(getLastValidPosition(clickPosition));\n                        lastPosition > clickPosition ? caret(input, isMask(clickPosition) ? clickPosition : seekNext(clickPosition)) : caret(input, lastPosition);\n                    }\n                }\n            }).bind(\"dblclick.inputmask\", function() {\n                var input = this;\n                setTimeout(function() {\n                    caret(input, 0, seekNext(getLastValidPosition()));\n                }, 0);\n            }).bind(PasteEventType + \".inputmask dragdrop.inputmask drop.inputmask\", pasteEvent).bind(\"cut.inputmask\", function(e) {\n                skipInputEvent = !0;\n                var input = this, $input = $(input), pos = caret(input);\n                handleRemove(input, $.inputmask.keyCode.DELETE, pos), writeBuffer(input, getBuffer(), getMaskSet().p, e, undoValue != getBuffer().join(\"\")), \n                input._valueGet() == getBufferTemplate().join(\"\") && $input.trigger(\"cleared\"), \n                opts.showTooltip && $input.prop(\"title\", getMaskSet().mask);\n            }).bind(\"complete.inputmask\", opts.oncomplete).bind(\"incomplete.inputmask\", opts.onincomplete).bind(\"cleared.inputmask\", opts.oncleared), \n            $el.bind(\"keydown.inputmask\", keydownEvent).bind(\"keypress.inputmask\", keypressEvent), \n            androidfirefox || $el.bind(\"compositionstart.inputmask\", compositionStartEvent).bind(\"compositionupdate.inputmask\", compositionUpdateEvent).bind(\"compositionend.inputmask\", compositionEndEvent), \n            \"paste\" === PasteEventType && $el.bind(\"input.inputmask\", inputFallBackEvent)), \n            $el.bind(\"setvalue.inputmask\", function() {\n                var input = this, value = input._valueGet();\n                input._valueSet($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(input, value, opts) || value : value), \n                checkVal(input, !0, !1), undoValue = getBuffer().join(\"\"), (opts.clearMaskOnLostFocus || opts.clearIncomplete) && input._valueGet() == getBufferTemplate().join(\"\") && input._valueSet(\"\");\n            }), patchValueProperty(el);\n            var initialValue = $.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call(el, el._valueGet(), opts) || el._valueGet() : el._valueGet();\n            checkVal(el, !0, !1, initialValue.split(\"\"));\n            var buffer = getBuffer().slice();\n            undoValue = buffer.join(\"\");\n            var activeElement;\n            try {\n                activeElement = document.activeElement;\n            } catch (e) {}\n            isComplete(buffer) === !1 && opts.clearIncomplete && resetMaskSet(), opts.clearMaskOnLostFocus && (buffer.join(\"\") == getBufferTemplate().join(\"\") ? buffer = [] : clearOptionalTail(buffer)), \n            writeBuffer(el, buffer), activeElement === el && caret(el, seekNext(getLastValidPosition())), \n            installEventRuler(el);\n        }\n        var undoValue, compositionCaretPos, compositionData, $el, maxLength, isRTL = !1, skipKeyPressEvent = !1, skipInputEvent = !1, ignorable = !1, firstClick = !0;\n        if (void 0 != actionObj) switch (actionObj.action) {\n          case \"isComplete\":\n            return $el = $(actionObj.el), maskset = $el.data(\"_inputmask\").maskset, opts = $el.data(\"_inputmask\").opts, \n            isComplete(actionObj.buffer);\n\n          case \"unmaskedvalue\":\n            return $el = actionObj.$input, maskset = $el.data(\"_inputmask\").maskset, opts = $el.data(\"_inputmask\").opts, \n            isRTL = actionObj.$input.data(\"_inputmask\").isRTL, unmaskedvalue(actionObj.$input);\n\n          case \"mask\":\n            undoValue = getBuffer().join(\"\"), mask(actionObj.el);\n            break;\n\n          case \"format\":\n            $el = $({}), $el.data(\"_inputmask\", {\n                maskset: maskset,\n                opts: opts,\n                isRTL: opts.numericInput\n            }), opts.numericInput && (isRTL = !0);\n            var valueBuffer = ($.isFunction(opts.onBeforeMask) ? opts.onBeforeMask.call($el, actionObj.value, opts) || actionObj.value : actionObj.value).split(\"\");\n            return checkVal($el, !1, !1, isRTL ? valueBuffer.reverse() : valueBuffer), $.isFunction(opts.onBeforeWrite) && opts.onBeforeWrite.call(this, void 0, getBuffer(), 0, opts), \n            actionObj.metadata ? {\n                value: isRTL ? getBuffer().slice().reverse().join(\"\") : getBuffer().join(\"\"),\n                metadata: $el.inputmask(\"getmetadata\")\n            } : isRTL ? getBuffer().slice().reverse().join(\"\") : getBuffer().join(\"\");\n\n          case \"isValid\":\n            $el = $({}), $el.data(\"_inputmask\", {\n                maskset: maskset,\n                opts: opts,\n                isRTL: opts.numericInput\n            }), opts.numericInput && (isRTL = !0);\n            var valueBuffer = actionObj.value.split(\"\");\n            checkVal($el, !1, !0, isRTL ? valueBuffer.reverse() : valueBuffer);\n            for (var buffer = getBuffer(), rl = determineLastRequiredPosition(), lmib = buffer.length - 1; lmib > rl && !isMask(lmib); lmib--) ;\n            return buffer.splice(rl, lmib + 1 - rl), isComplete(buffer) && actionObj.value == buffer.join(\"\");\n\n          case \"getemptymask\":\n            return $el = $(actionObj.el), maskset = $el.data(\"_inputmask\").maskset, opts = $el.data(\"_inputmask\").opts, \n            getBufferTemplate();\n\n          case \"remove\":\n            var el = actionObj.el;\n            $el = $(el), maskset = $el.data(\"_inputmask\").maskset, opts = $el.data(\"_inputmask\").opts, \n            el._valueSet(unmaskedvalue($el)), $el.unbind(\".inputmask\"), $el.removeData(\"_inputmask\");\n            var valueProperty;\n            Object.getOwnPropertyDescriptor && (valueProperty = Object.getOwnPropertyDescriptor(el, \"value\")), \n            valueProperty && valueProperty.get ? el._valueGet && Object.defineProperty(el, \"value\", {\n                get: el._valueGet,\n                set: el._valueSet\n            }) : document.__lookupGetter__ && el.__lookupGetter__(\"value\") && el._valueGet && (el.__defineGetter__(\"value\", el._valueGet), \n            el.__defineSetter__(\"value\", el._valueSet));\n            try {\n                delete el._valueGet, delete el._valueSet;\n            } catch (e) {\n                el._valueGet = void 0, el._valueSet = void 0;\n            }\n            break;\n\n          case \"getmetadata\":\n            if ($el = $(actionObj.el), maskset = $el.data(\"_inputmask\").maskset, opts = $el.data(\"_inputmask\").opts, \n            $.isArray(maskset.metadata)) {\n                for (var alternation, lvp = getLastValidPosition(), firstAlt = lvp; firstAlt >= 0; firstAlt--) if (getMaskSet().validPositions[firstAlt] && void 0 != getMaskSet().validPositions[firstAlt].alternation) {\n                    alternation = getMaskSet().validPositions[firstAlt].alternation;\n                    break;\n                }\n                return void 0 != alternation ? maskset.metadata[getMaskSet().validPositions[lvp].locator[alternation]] : maskset.metadata[0];\n            }\n            return maskset.metadata;\n        }\n    }\n    if (void 0 === $.fn.inputmask) {\n        var ua = navigator.userAgent, iphone = null !== ua.match(new RegExp(\"iphone\", \"i\")), androidchrome = (null !== ua.match(new RegExp(\"android.*safari.*\", \"i\")), \n        null !== ua.match(new RegExp(\"android.*chrome.*\", \"i\"))), androidfirefox = null !== ua.match(new RegExp(\"android.*firefox.*\", \"i\")), PasteEventType = (/Kindle/i.test(ua) || /Silk/i.test(ua) || /KFTT/i.test(ua) || /KFOT/i.test(ua) || /KFJWA/i.test(ua) || /KFJWI/i.test(ua) || /KFSOWI/i.test(ua) || /KFTHWA/i.test(ua) || /KFTHWI/i.test(ua) || /KFAPWA/i.test(ua) || /KFAPWI/i.test(ua), \n        isInputEventSupported(\"paste\") ? \"paste\" : isInputEventSupported(\"input\") ? \"input\" : \"propertychange\");\n        $.inputmask = {\n            defaults: {\n                placeholder: \"_\",\n                optionalmarker: {\n                    start: \"[\",\n                    end: \"]\"\n                },\n                quantifiermarker: {\n                    start: \"{\",\n                    end: \"}\"\n                },\n                groupmarker: {\n                    start: \"(\",\n                    end: \")\"\n                },\n                alternatormarker: \"|\",\n                escapeChar: \"\\\\\",\n                mask: null,\n                oncomplete: $.noop,\n                onincomplete: $.noop,\n                oncleared: $.noop,\n                repeat: 0,\n                greedy: !0,\n                autoUnmask: !1,\n                removeMaskOnSubmit: !1,\n                clearMaskOnLostFocus: !0,\n                insertMode: !0,\n                clearIncomplete: !1,\n                aliases: {},\n                alias: null,\n                onKeyDown: $.noop,\n                onBeforeMask: void 0,\n                onBeforePaste: void 0,\n                onBeforeWrite: void 0,\n                onUnMask: void 0,\n                showMaskOnFocus: !0,\n                showMaskOnHover: !0,\n                onKeyValidation: $.noop,\n                skipOptionalPartCharacter: \" \",\n                showTooltip: !1,\n                numericInput: !1,\n                rightAlign: !1,\n                undoOnEscape: !0,\n                radixPoint: \"\",\n                radixFocus: !1,\n                nojumps: !1,\n                nojumpsThreshold: 0,\n                keepStatic: void 0,\n                definitions: {\n                    \"9\": {\n                        validator: \"[0-9]\",\n                        cardinality: 1,\n                        definitionSymbol: \"*\"\n                    },\n                    a: {\n                        validator: \"[A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n                        cardinality: 1,\n                        definitionSymbol: \"*\"\n                    },\n                    \"*\": {\n                        validator: \"[0-9A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n                        cardinality: 1\n                    }\n                },\n                ignorables: [ 8, 9, 13, 19, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 93, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123 ],\n                isComplete: void 0,\n                canClearPosition: $.noop,\n                postValidation: void 0\n            },\n            keyCode: {\n                ALT: 18,\n                BACKSPACE: 8,\n                CAPS_LOCK: 20,\n                COMMA: 188,\n                COMMAND: 91,\n                COMMAND_LEFT: 91,\n                COMMAND_RIGHT: 93,\n                CONTROL: 17,\n                DELETE: 46,\n                DOWN: 40,\n                END: 35,\n                ENTER: 13,\n                ESCAPE: 27,\n                HOME: 36,\n                INSERT: 45,\n                LEFT: 37,\n                MENU: 93,\n                NUMPAD_ADD: 107,\n                NUMPAD_DECIMAL: 110,\n                NUMPAD_DIVIDE: 111,\n                NUMPAD_ENTER: 108,\n                NUMPAD_MULTIPLY: 106,\n                NUMPAD_SUBTRACT: 109,\n                PAGE_DOWN: 34,\n                PAGE_UP: 33,\n                PERIOD: 190,\n                RIGHT: 39,\n                SHIFT: 16,\n                SPACE: 32,\n                TAB: 9,\n                UP: 38,\n                WINDOWS: 91\n            },\n            masksCache: {},\n            escapeRegex: function(str) {\n                var specials = [ \"/\", \".\", \"*\", \"+\", \"?\", \"|\", \"(\", \")\", \"[\", \"]\", \"{\", \"}\", \"\\\\\", \"$\", \"^\" ];\n                return str.replace(new RegExp(\"(\\\\\" + specials.join(\"|\\\\\") + \")\", \"gim\"), \"\\\\$1\");\n            },\n            format: function(value, options, metadata) {\n                var opts = $.extend(!0, {}, $.inputmask.defaults, options);\n                return resolveAlias(opts.alias, options, opts), maskScope({\n                    action: \"format\",\n                    value: value,\n                    metadata: metadata\n                }, generateMaskSet(opts, options && void 0 !== options.definitions), opts);\n            },\n            isValid: function(value, options) {\n                var opts = $.extend(!0, {}, $.inputmask.defaults, options);\n                return resolveAlias(opts.alias, options, opts), maskScope({\n                    action: \"isValid\",\n                    value: value\n                }, generateMaskSet(opts, options && void 0 !== options.definitions), opts);\n            }\n        }, $.fn.inputmask = function(fn, options) {\n            function importAttributeOptions(npt, opts, importedOptionsContainer) {\n                var $npt = $(npt);\n                $npt.data(\"inputmask-alias\") && resolveAlias($npt.data(\"inputmask-alias\"), $.extend(!0, {}, opts), opts);\n                for (var option in opts) {\n                    var optionData = $npt.data(\"inputmask-\" + option.toLowerCase());\n                    void 0 != optionData && (optionData = \"boolean\" == typeof optionData ? optionData : optionData.toString(), \n                    \"mask\" == option && 0 == optionData.indexOf(\"[\") ? (opts[option] = optionData.replace(/[\\s[\\]]/g, \"\").split(\"','\"), \n                    opts[option][0] = opts[option][0].replace(\"'\", \"\"), opts[option][opts[option].length - 1] = opts[option][opts[option].length - 1].replace(\"'\", \"\")) : opts[option] = optionData, \n                    importedOptionsContainer && (importedOptionsContainer[option] = opts[option]));\n                }\n                return opts;\n            }\n            var maskset, opts = $.extend(!0, {}, $.inputmask.defaults, options);\n            if (\"string\" == typeof fn) switch (fn) {\n              case \"mask\":\n                return resolveAlias(opts.alias, options, opts), this.each(function() {\n                    return importAttributeOptions(this, opts), maskset = generateMaskSet(opts, options && void 0 !== options.definitions), \n                    void 0 == maskset ? this : void maskScope({\n                        action: \"mask\",\n                        el: this\n                    }, maskset, opts);\n                });\n\n              case \"unmaskedvalue\":\n                var $input = $(this);\n                return $input.data(\"_inputmask\") ? maskScope({\n                    action: \"unmaskedvalue\",\n                    $input: $input\n                }) : $input.val();\n\n              case \"remove\":\n                return this.each(function() {\n                    var $input = $(this);\n                    $input.data(\"_inputmask\") && maskScope({\n                        action: \"remove\",\n                        el: this\n                    });\n                });\n\n              case \"getemptymask\":\n                return this.data(\"_inputmask\") ? maskScope({\n                    action: \"getemptymask\",\n                    el: this\n                }) : \"\";\n\n              case \"hasMaskedValue\":\n                return this.data(\"_inputmask\") ? !this.data(\"_inputmask\").opts.autoUnmask : !1;\n\n              case \"isComplete\":\n                return this.data(\"_inputmask\") ? maskScope({\n                    action: \"isComplete\",\n                    buffer: this[0]._valueGet().split(\"\"),\n                    el: this\n                }) : !0;\n\n              case \"getmetadata\":\n                return this.data(\"_inputmask\") ? maskScope({\n                    action: \"getmetadata\",\n                    el: this\n                }) : void 0;\n\n              default:\n                return resolveAlias(opts.alias, options, opts), resolveAlias(fn, options, opts) || (opts.mask = fn), \n                this.each(function() {\n                    return importAttributeOptions(this, opts), maskset = generateMaskSet(opts, options && void 0 !== options.definitions), \n                    void 0 == maskset ? this : void maskScope({\n                        action: \"mask\",\n                        el: this\n                    }, maskset, opts);\n                });\n            } else {\n                if (\"object\" == typeof fn) return opts = $.extend(!0, {}, $.inputmask.defaults, fn), \n                resolveAlias(opts.alias, fn, opts), this.each(function() {\n                    return importAttributeOptions(this, opts), maskset = generateMaskSet(opts, fn && void 0 !== fn.definitions), \n                    void 0 == maskset ? this : void maskScope({\n                        action: \"mask\",\n                        el: this\n                    }, maskset, opts);\n                });\n                if (void 0 == fn) return this.each(function() {\n                    var attrOptions = $(this).attr(\"data-inputmask\");\n                    if (attrOptions && \"\" != attrOptions) try {\n                        attrOptions = attrOptions.replace(new RegExp(\"'\", \"g\"), '\"');\n                        var dataoptions = $.parseJSON(\"{\" + attrOptions + \"}\");\n                        $.extend(!0, dataoptions, options), opts = $.extend(!0, {}, $.inputmask.defaults, dataoptions), \n                        opts = importAttributeOptions(this, opts), resolveAlias(opts.alias, dataoptions, opts), \n                        opts.alias = void 0, $(this).inputmask(\"mask\", opts);\n                    } catch (ex) {}\n                    if ($(this).attr(\"data-inputmask-mask\") || $(this).attr(\"data-inputmask-alias\")) {\n                        opts = $.extend(!0, {}, $.inputmask.defaults, {});\n                        var dataOptions = {};\n                        opts = importAttributeOptions(this, opts, dataOptions), resolveAlias(opts.alias, dataOptions, opts), \n                        opts.alias = void 0, $(this).inputmask(\"mask\", opts);\n                    }\n                });\n            }\n        };\n    }\n    return $.fn.inputmask;\n}(jQuery), function($) {\n    return $.extend($.inputmask.defaults.definitions, {\n        h: {\n            validator: \"[01][0-9]|2[0-3]\",\n            cardinality: 2,\n            prevalidator: [ {\n                validator: \"[0-2]\",\n                cardinality: 1\n            } ]\n        },\n        s: {\n            validator: \"[0-5][0-9]\",\n            cardinality: 2,\n            prevalidator: [ {\n                validator: \"[0-5]\",\n                cardinality: 1\n            } ]\n        },\n        d: {\n            validator: \"0[1-9]|[12][0-9]|3[01]\",\n            cardinality: 2,\n            prevalidator: [ {\n                validator: \"[0-3]\",\n                cardinality: 1\n            } ]\n        },\n        m: {\n            validator: \"0[1-9]|1[012]\",\n            cardinality: 2,\n            prevalidator: [ {\n                validator: \"[01]\",\n                cardinality: 1\n            } ]\n        },\n        y: {\n            validator: \"(19|20)\\\\d{2}\",\n            cardinality: 4,\n            prevalidator: [ {\n                validator: \"[12]\",\n                cardinality: 1\n            }, {\n                validator: \"(19|20)\",\n                cardinality: 2\n            }, {\n                validator: \"(19|20)\\\\d\",\n                cardinality: 3\n            } ]\n        }\n    }), $.extend($.inputmask.defaults.aliases, {\n        \"dd/mm/yyyy\": {\n            mask: \"1/2/y\",\n            placeholder: \"dd/mm/yyyy\",\n            regex: {\n                val1pre: new RegExp(\"[0-3]\"),\n                val1: new RegExp(\"0[1-9]|[12][0-9]|3[01]\"),\n                val2pre: function(separator) {\n                    var escapedSeparator = $.inputmask.escapeRegex.call(this, separator);\n                    return new RegExp(\"((0[1-9]|[12][0-9]|3[01])\" + escapedSeparator + \"[01])\");\n                },\n                val2: function(separator) {\n                    var escapedSeparator = $.inputmask.escapeRegex.call(this, separator);\n                    return new RegExp(\"((0[1-9]|[12][0-9])\" + escapedSeparator + \"(0[1-9]|1[012]))|(30\" + escapedSeparator + \"(0[13-9]|1[012]))|(31\" + escapedSeparator + \"(0[13578]|1[02]))\");\n                }\n            },\n            leapday: \"29/02/\",\n            separator: \"/\",\n            yearrange: {\n                minyear: 1900,\n                maxyear: 2099\n            },\n            isInYearRange: function(chrs, minyear, maxyear) {\n                if (isNaN(chrs)) return !1;\n                var enteredyear = parseInt(chrs.concat(minyear.toString().slice(chrs.length))), enteredyear2 = parseInt(chrs.concat(maxyear.toString().slice(chrs.length)));\n                return (isNaN(enteredyear) ? !1 : enteredyear >= minyear && maxyear >= enteredyear) || (isNaN(enteredyear2) ? !1 : enteredyear2 >= minyear && maxyear >= enteredyear2);\n            },\n            determinebaseyear: function(minyear, maxyear, hint) {\n                var currentyear = new Date().getFullYear();\n                if (minyear > currentyear) return minyear;\n                if (currentyear > maxyear) {\n                    for (var maxYearPrefix = maxyear.toString().slice(0, 2), maxYearPostfix = maxyear.toString().slice(2, 4); maxYearPrefix + hint > maxyear; ) maxYearPrefix--;\n                    var maxxYear = maxYearPrefix + maxYearPostfix;\n                    return minyear > maxxYear ? minyear : maxxYear;\n                }\n                return currentyear;\n            },\n            onKeyDown: function(e, buffer, caretPos, opts) {\n                var $input = $(this);\n                if (e.ctrlKey && e.keyCode == $.inputmask.keyCode.RIGHT) {\n                    var today = new Date();\n                    $input.val(today.getDate().toString() + (today.getMonth() + 1).toString() + today.getFullYear().toString()), \n                    $input.triggerHandler(\"setvalue.inputmask\");\n                }\n            },\n            getFrontValue: function(mask, buffer, opts) {\n                for (var start = 0, length = 0, i = 0; i < mask.length && \"2\" != mask.charAt(i); i++) {\n                    var definition = opts.definitions[mask.charAt(i)];\n                    definition ? (start += length, length = definition.cardinality) : length++;\n                }\n                return buffer.join(\"\").substr(start, length);\n            },\n            definitions: {\n                \"1\": {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        var isValid = opts.regex.val1.test(chrs);\n                        return strict || isValid || chrs.charAt(1) != opts.separator && -1 == \"-./\".indexOf(chrs.charAt(1)) || !(isValid = opts.regex.val1.test(\"0\" + chrs.charAt(0))) ? isValid : (maskset.buffer[pos - 1] = \"0\", \n                        {\n                            refreshFromBuffer: {\n                                start: pos - 1,\n                                end: pos\n                            },\n                            pos: pos,\n                            c: chrs.charAt(0)\n                        });\n                    },\n                    cardinality: 2,\n                    prevalidator: [ {\n                        validator: function(chrs, maskset, pos, strict, opts) {\n                            var pchrs = chrs;\n                            isNaN(maskset.buffer[pos + 1]) || (pchrs += maskset.buffer[pos + 1]);\n                            var isValid = 1 == pchrs.length ? opts.regex.val1pre.test(pchrs) : opts.regex.val1.test(pchrs);\n                            if (!strict && !isValid) {\n                                if (isValid = opts.regex.val1.test(chrs + \"0\")) return maskset.buffer[pos] = chrs, \n                                maskset.buffer[++pos] = \"0\", {\n                                    pos: pos,\n                                    c: \"0\"\n                                };\n                                if (isValid = opts.regex.val1.test(\"0\" + chrs)) return maskset.buffer[pos] = \"0\", \n                                pos++, {\n                                    pos: pos\n                                };\n                            }\n                            return isValid;\n                        },\n                        cardinality: 1\n                    } ]\n                },\n                \"2\": {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts);\n                        -1 != frontValue.indexOf(opts.placeholder[0]) && (frontValue = \"01\" + opts.separator);\n                        var isValid = opts.regex.val2(opts.separator).test(frontValue + chrs);\n                        if (!strict && !isValid && (chrs.charAt(1) == opts.separator || -1 != \"-./\".indexOf(chrs.charAt(1))) && (isValid = opts.regex.val2(opts.separator).test(frontValue + \"0\" + chrs.charAt(0)))) return maskset.buffer[pos - 1] = \"0\", \n                        {\n                            refreshFromBuffer: {\n                                start: pos - 1,\n                                end: pos\n                            },\n                            pos: pos,\n                            c: chrs.charAt(0)\n                        };\n                        if (opts.mask.indexOf(\"2\") == opts.mask.length - 1 && isValid) {\n                            var dayMonthValue = maskset.buffer.join(\"\").substr(4, 4) + chrs;\n                            if (dayMonthValue != opts.leapday) return !0;\n                            var year = parseInt(maskset.buffer.join(\"\").substr(0, 4), 10);\n                            return year % 4 === 0 ? year % 100 === 0 ? year % 400 === 0 ? !0 : !1 : !0 : !1;\n                        }\n                        return isValid;\n                    },\n                    cardinality: 2,\n                    prevalidator: [ {\n                        validator: function(chrs, maskset, pos, strict, opts) {\n                            isNaN(maskset.buffer[pos + 1]) || (chrs += maskset.buffer[pos + 1]);\n                            var frontValue = opts.getFrontValue(maskset.mask, maskset.buffer, opts);\n                            -1 != frontValue.indexOf(opts.placeholder[0]) && (frontValue = \"01\" + opts.separator);\n                            var isValid = 1 == chrs.length ? opts.regex.val2pre(opts.separator).test(frontValue + chrs) : opts.regex.val2(opts.separator).test(frontValue + chrs);\n                            return strict || isValid || !(isValid = opts.regex.val2(opts.separator).test(frontValue + \"0\" + chrs)) ? isValid : (maskset.buffer[pos] = \"0\", \n                            pos++, {\n                                pos: pos\n                            });\n                        },\n                        cardinality: 1\n                    } ]\n                },\n                y: {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        if (opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) {\n                            var dayMonthValue = maskset.buffer.join(\"\").substr(0, 6);\n                            if (dayMonthValue != opts.leapday) return !0;\n                            var year = parseInt(chrs, 10);\n                            return year % 4 === 0 ? year % 100 === 0 ? year % 400 === 0 ? !0 : !1 : !0 : !1;\n                        }\n                        return !1;\n                    },\n                    cardinality: 4,\n                    prevalidator: [ {\n                        validator: function(chrs, maskset, pos, strict, opts) {\n                            var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);\n                            if (!strict && !isValid) {\n                                var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + \"0\").toString().slice(0, 1);\n                                if (isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0), \n                                {\n                                    pos: pos\n                                };\n                                if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs + \"0\").toString().slice(0, 2), \n                                isValid = opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(0), \n                                maskset.buffer[pos++] = yearPrefix.charAt(1), {\n                                    pos: pos\n                                };\n                            }\n                            return isValid;\n                        },\n                        cardinality: 1\n                    }, {\n                        validator: function(chrs, maskset, pos, strict, opts) {\n                            var isValid = opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);\n                            if (!strict && !isValid) {\n                                var yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2);\n                                if (isValid = opts.isInYearRange(chrs[0] + yearPrefix[1] + chrs[1], opts.yearrange.minyear, opts.yearrange.maxyear)) return maskset.buffer[pos++] = yearPrefix.charAt(1), \n                                {\n                                    pos: pos\n                                };\n                                if (yearPrefix = opts.determinebaseyear(opts.yearrange.minyear, opts.yearrange.maxyear, chrs).toString().slice(0, 2), \n                                opts.isInYearRange(yearPrefix + chrs, opts.yearrange.minyear, opts.yearrange.maxyear)) {\n                                    var dayMonthValue = maskset.buffer.join(\"\").substr(0, 6);\n                                    if (dayMonthValue != opts.leapday) isValid = !0; else {\n                                        var year = parseInt(chrs, 10);\n                                        isValid = year % 4 === 0 ? year % 100 === 0 ? year % 400 === 0 ? !0 : !1 : !0 : !1;\n                                    }\n                                } else isValid = !1;\n                                if (isValid) return maskset.buffer[pos - 1] = yearPrefix.charAt(0), maskset.buffer[pos++] = yearPrefix.charAt(1), \n                                maskset.buffer[pos++] = chrs.charAt(0), {\n                                    refreshFromBuffer: {\n                                        start: pos - 3,\n                                        end: pos\n                                    },\n                                    pos: pos\n                                };\n                            }\n                            return isValid;\n                        },\n                        cardinality: 2\n                    }, {\n                        validator: function(chrs, maskset, pos, strict, opts) {\n                            return opts.isInYearRange(chrs, opts.yearrange.minyear, opts.yearrange.maxyear);\n                        },\n                        cardinality: 3\n                    } ]\n                }\n            },\n            insertMode: !1,\n            autoUnmask: !1\n        },\n        \"mm/dd/yyyy\": {\n            placeholder: \"mm/dd/yyyy\",\n            alias: \"dd/mm/yyyy\",\n            regex: {\n                val2pre: function(separator) {\n                    var escapedSeparator = $.inputmask.escapeRegex.call(this, separator);\n                    return new RegExp(\"((0[13-9]|1[012])\" + escapedSeparator + \"[0-3])|(02\" + escapedSeparator + \"[0-2])\");\n                },\n                val2: function(separator) {\n                    var escapedSeparator = $.inputmask.escapeRegex.call(this, separator);\n                    return new RegExp(\"((0[1-9]|1[012])\" + escapedSeparator + \"(0[1-9]|[12][0-9]))|((0[13-9]|1[012])\" + escapedSeparator + \"30)|((0[13578]|1[02])\" + escapedSeparator + \"31)\");\n                },\n                val1pre: new RegExp(\"[01]\"),\n                val1: new RegExp(\"0[1-9]|1[012]\")\n            },\n            leapday: \"02/29/\",\n            onKeyDown: function(e, buffer, caretPos, opts) {\n                var $input = $(this);\n                if (e.ctrlKey && e.keyCode == $.inputmask.keyCode.RIGHT) {\n                    var today = new Date();\n                    $input.val((today.getMonth() + 1).toString() + today.getDate().toString() + today.getFullYear().toString()), \n                    $input.triggerHandler(\"setvalue.inputmask\");\n                }\n            }\n        },\n        \"yyyy/mm/dd\": {\n            mask: \"y/1/2\",\n            placeholder: \"yyyy/mm/dd\",\n            alias: \"mm/dd/yyyy\",\n            leapday: \"/02/29\",\n            onKeyDown: function(e, buffer, caretPos, opts) {\n                var $input = $(this);\n                if (e.ctrlKey && e.keyCode == $.inputmask.keyCode.RIGHT) {\n                    var today = new Date();\n                    $input.val(today.getFullYear().toString() + (today.getMonth() + 1).toString() + today.getDate().toString()), \n                    $input.triggerHandler(\"setvalue.inputmask\");\n                }\n            }\n        },\n        \"dd.mm.yyyy\": {\n            mask: \"1.2.y\",\n            placeholder: \"dd.mm.yyyy\",\n            leapday: \"29.02.\",\n            separator: \".\",\n            alias: \"dd/mm/yyyy\"\n        },\n        \"dd-mm-yyyy\": {\n            mask: \"1-2-y\",\n            placeholder: \"dd-mm-yyyy\",\n            leapday: \"29-02-\",\n            separator: \"-\",\n            alias: \"dd/mm/yyyy\"\n        },\n        \"mm.dd.yyyy\": {\n            mask: \"1.2.y\",\n            placeholder: \"mm.dd.yyyy\",\n            leapday: \"02.29.\",\n            separator: \".\",\n            alias: \"mm/dd/yyyy\"\n        },\n        \"mm-dd-yyyy\": {\n            mask: \"1-2-y\",\n            placeholder: \"mm-dd-yyyy\",\n            leapday: \"02-29-\",\n            separator: \"-\",\n            alias: \"mm/dd/yyyy\"\n        },\n        \"yyyy.mm.dd\": {\n            mask: \"y.1.2\",\n            placeholder: \"yyyy.mm.dd\",\n            leapday: \".02.29\",\n            separator: \".\",\n            alias: \"yyyy/mm/dd\"\n        },\n        \"yyyy-mm-dd\": {\n            mask: \"y-1-2\",\n            placeholder: \"yyyy-mm-dd\",\n            leapday: \"-02-29\",\n            separator: \"-\",\n            alias: \"yyyy/mm/dd\"\n        },\n        datetime: {\n            mask: \"1/2/y h:s\",\n            placeholder: \"dd/mm/yyyy hh:mm\",\n            alias: \"dd/mm/yyyy\",\n            regex: {\n                hrspre: new RegExp(\"[012]\"),\n                hrs24: new RegExp(\"2[0-4]|1[3-9]\"),\n                hrs: new RegExp(\"[01][0-9]|2[0-4]\"),\n                ampm: new RegExp(\"^[a|p|A|P][m|M]\"),\n                mspre: new RegExp(\"[0-5]\"),\n                ms: new RegExp(\"[0-5][0-9]\")\n            },\n            timeseparator: \":\",\n            hourFormat: \"24\",\n            definitions: {\n                h: {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        if (\"24\" == opts.hourFormat && 24 == parseInt(chrs, 10)) return maskset.buffer[pos - 1] = \"0\", \n                        maskset.buffer[pos] = \"0\", {\n                            refreshFromBuffer: {\n                                start: pos - 1,\n                                end: pos\n                            },\n                            c: \"0\"\n                        };\n                        var isValid = opts.regex.hrs.test(chrs);\n                        if (!strict && !isValid && (chrs.charAt(1) == opts.timeseparator || -1 != \"-.:\".indexOf(chrs.charAt(1))) && (isValid = opts.regex.hrs.test(\"0\" + chrs.charAt(0)))) return maskset.buffer[pos - 1] = \"0\", \n                        maskset.buffer[pos] = chrs.charAt(0), pos++, {\n                            refreshFromBuffer: {\n                                start: pos - 2,\n                                end: pos\n                            },\n                            pos: pos,\n                            c: opts.timeseparator\n                        };\n                        if (isValid && \"24\" !== opts.hourFormat && opts.regex.hrs24.test(chrs)) {\n                            var tmp = parseInt(chrs, 10);\n                            return 24 == tmp ? (maskset.buffer[pos + 5] = \"a\", maskset.buffer[pos + 6] = \"m\") : (maskset.buffer[pos + 5] = \"p\", \n                            maskset.buffer[pos + 6] = \"m\"), tmp -= 12, 10 > tmp ? (maskset.buffer[pos] = tmp.toString(), \n                            maskset.buffer[pos - 1] = \"0\") : (maskset.buffer[pos] = tmp.toString().charAt(1), \n                            maskset.buffer[pos - 1] = tmp.toString().charAt(0)), {\n                                refreshFromBuffer: {\n                                    start: pos - 1,\n                                    end: pos + 6\n                                },\n                                c: maskset.buffer[pos]\n                            };\n                        }\n                        return isValid;\n                    },\n                    cardinality: 2,\n                    prevalidator: [ {\n                        validator: function(chrs, maskset, pos, strict, opts) {\n                            var isValid = opts.regex.hrspre.test(chrs);\n                            return strict || isValid || !(isValid = opts.regex.hrs.test(\"0\" + chrs)) ? isValid : (maskset.buffer[pos] = \"0\", \n                            pos++, {\n                                pos: pos\n                            });\n                        },\n                        cardinality: 1\n                    } ]\n                },\n                s: {\n                    validator: \"[0-5][0-9]\",\n                    cardinality: 2,\n                    prevalidator: [ {\n                        validator: function(chrs, maskset, pos, strict, opts) {\n                            var isValid = opts.regex.mspre.test(chrs);\n                            return strict || isValid || !(isValid = opts.regex.ms.test(\"0\" + chrs)) ? isValid : (maskset.buffer[pos] = \"0\", \n                            pos++, {\n                                pos: pos\n                            });\n                        },\n                        cardinality: 1\n                    } ]\n                },\n                t: {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        return opts.regex.ampm.test(chrs + \"m\");\n                    },\n                    casing: \"lower\",\n                    cardinality: 1\n                }\n            },\n            insertMode: !1,\n            autoUnmask: !1\n        },\n        datetime12: {\n            mask: \"1/2/y h:s t\\\\m\",\n            placeholder: \"dd/mm/yyyy hh:mm xm\",\n            alias: \"datetime\",\n            hourFormat: \"12\"\n        },\n        \"hh:mm t\": {\n            mask: \"h:s t\\\\m\",\n            placeholder: \"hh:mm xm\",\n            alias: \"datetime\",\n            hourFormat: \"12\"\n        },\n        \"h:s t\": {\n            mask: \"h:s t\\\\m\",\n            placeholder: \"hh:mm xm\",\n            alias: \"datetime\",\n            hourFormat: \"12\"\n        },\n        \"hh:mm:ss\": {\n            mask: \"h:s:s\",\n            placeholder: \"hh:mm:ss\",\n            alias: \"datetime\",\n            autoUnmask: !1\n        },\n        \"hh:mm\": {\n            mask: \"h:s\",\n            placeholder: \"hh:mm\",\n            alias: \"datetime\",\n            autoUnmask: !1\n        },\n        date: {\n            alias: \"dd/mm/yyyy\"\n        },\n        \"mm/yyyy\": {\n            mask: \"1/y\",\n            placeholder: \"mm/yyyy\",\n            leapday: \"donotuse\",\n            separator: \"/\",\n            alias: \"mm/dd/yyyy\"\n        }\n    }), $.fn.inputmask;\n}(jQuery), function($) {\n    return $.extend($.inputmask.defaults.definitions, {\n        A: {\n            validator: \"[A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n            cardinality: 1,\n            casing: \"upper\"\n        },\n        \"#\": {\n            validator: \"[0-9A-Za-z\\u0410-\\u044f\\u0401\\u0451\\xc0-\\xff\\xb5]\",\n            cardinality: 1,\n            casing: \"upper\"\n        }\n    }), $.extend($.inputmask.defaults.aliases, {\n        url: {\n            mask: \"ir\",\n            placeholder: \"\",\n            separator: \"\",\n            defaultPrefix: \"http://\",\n            regex: {\n                urlpre1: new RegExp(\"[fh]\"),\n                urlpre2: new RegExp(\"(ft|ht)\"),\n                urlpre3: new RegExp(\"(ftp|htt)\"),\n                urlpre4: new RegExp(\"(ftp:|http|ftps)\"),\n                urlpre5: new RegExp(\"(ftp:/|ftps:|http:|https)\"),\n                urlpre6: new RegExp(\"(ftp://|ftps:/|http:/|https:)\"),\n                urlpre7: new RegExp(\"(ftp://|ftps://|http://|https:/)\"),\n                urlpre8: new RegExp(\"(ftp://|ftps://|http://|https://)\")\n            },\n            definitions: {\n                i: {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        return !0;\n                    },\n                    cardinality: 8,\n                    prevalidator: function() {\n                        for (var result = [], prefixLimit = 8, i = 0; prefixLimit > i; i++) result[i] = function() {\n                            var j = i;\n                            return {\n                                validator: function(chrs, maskset, pos, strict, opts) {\n                                    if (opts.regex[\"urlpre\" + (j + 1)]) {\n                                        var k, tmp = chrs;\n                                        j + 1 - chrs.length > 0 && (tmp = maskset.buffer.join(\"\").substring(0, j + 1 - chrs.length) + \"\" + tmp);\n                                        var isValid = opts.regex[\"urlpre\" + (j + 1)].test(tmp);\n                                        if (!strict && !isValid) {\n                                            for (pos -= j, k = 0; k < opts.defaultPrefix.length; k++) maskset.buffer[pos] = opts.defaultPrefix[k], \n                                            pos++;\n                                            for (k = 0; k < tmp.length - 1; k++) maskset.buffer[pos] = tmp[k], pos++;\n                                            return {\n                                                pos: pos\n                                            };\n                                        }\n                                        return isValid;\n                                    }\n                                    return !1;\n                                },\n                                cardinality: j\n                            };\n                        }();\n                        return result;\n                    }()\n                },\n                r: {\n                    validator: \".\",\n                    cardinality: 50\n                }\n            },\n            insertMode: !1,\n            autoUnmask: !1\n        },\n        ip: {\n            mask: \"i[i[i]].i[i[i]].i[i[i]].i[i[i]]\",\n            definitions: {\n                i: {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        return pos - 1 > -1 && \".\" != maskset.buffer[pos - 1] ? (chrs = maskset.buffer[pos - 1] + chrs, \n                        chrs = pos - 2 > -1 && \".\" != maskset.buffer[pos - 2] ? maskset.buffer[pos - 2] + chrs : \"0\" + chrs) : chrs = \"00\" + chrs, \n                        new RegExp(\"25[0-5]|2[0-4][0-9]|[01][0-9][0-9]\").test(chrs);\n                    },\n                    cardinality: 1\n                }\n            }\n        },\n        email: {\n            mask: \"*{1,64}[.*{1,64}][.*{1,64}][.*{1,64}]@*{1,64}[.*{2,64}][.*{2,6}][.*{1,2}]\",\n            greedy: !1,\n            onBeforePaste: function(pastedValue, opts) {\n                return pastedValue = pastedValue.toLowerCase(), pastedValue.replace(\"mailto:\", \"\");\n            },\n            definitions: {\n                \"*\": {\n                    validator: \"[0-9A-Za-z!#$%&'*+/=?^_`{|}~-]\",\n                    cardinality: 1,\n                    casing: \"lower\"\n                }\n            }\n        }\n    }), $.fn.inputmask;\n}(jQuery), function($) {\n    return $.extend($.inputmask.defaults.aliases, {\n        numeric: {\n            mask: function(opts) {\n                function autoEscape(txt) {\n                    for (var escapedTxt = \"\", i = 0; i < txt.length; i++) escapedTxt += opts.definitions[txt[i]] ? \"\\\\\" + txt[i] : txt[i];\n                    return escapedTxt;\n                }\n                if (0 !== opts.repeat && isNaN(opts.integerDigits) && (opts.integerDigits = opts.repeat), \n                opts.repeat = 0, opts.groupSeparator == opts.radixPoint && (\".\" == opts.radixPoint ? opts.groupSeparator = \",\" : \",\" == opts.radixPoint ? opts.groupSeparator = \".\" : opts.groupSeparator = \"\"), \n                \" \" === opts.groupSeparator && (opts.skipOptionalPartCharacter = void 0), opts.autoGroup = opts.autoGroup && \"\" != opts.groupSeparator, \n                opts.autoGroup && (\"string\" == typeof opts.groupSize && isFinite(opts.groupSize) && (opts.groupSize = parseInt(opts.groupSize)), \n                isFinite(opts.integerDigits))) {\n                    var seps = Math.floor(opts.integerDigits / opts.groupSize), mod = opts.integerDigits % opts.groupSize;\n                    opts.integerDigits = parseInt(opts.integerDigits) + (0 == mod ? seps - 1 : seps);\n                }\n                opts.placeholder.length > 1 && (opts.placeholder = opts.placeholder.charAt(0)), \n                opts.radixFocus = opts.radixFocus && \"0\" == opts.placeholder, opts.definitions[\";\"] = opts.definitions[\"~\"];\n                var mask = autoEscape(opts.prefix);\n                return mask += \"[+]\", mask += \"~{1,\" + opts.integerDigits + \"}\", void 0 != opts.digits && (isNaN(opts.digits) || parseInt(opts.digits) > 0) && (mask += opts.digitsOptional ? \"[\" + (opts.decimalProtect ? \":\" : opts.radixPoint) + \";{\" + opts.digits + \"}]\" : (opts.decimalProtect ? \":\" : opts.radixPoint) + \";{\" + opts.digits + \"}\"), \n                \"\" != opts.negationSymbol.back && (mask += \"[-]\"), mask += autoEscape(opts.suffix), \n                opts.greedy = !1, mask;\n            },\n            placeholder: \"\",\n            greedy: !1,\n            digits: \"*\",\n            digitsOptional: !0,\n            groupSeparator: \"\",\n            radixPoint: \".\",\n            radixFocus: !0,\n            groupSize: 3,\n            autoGroup: !1,\n            allowPlus: !0,\n            allowMinus: !0,\n            negationSymbol: {\n                front: \"-\",\n                back: \"\"\n            },\n            integerDigits: \"+\",\n            prefix: \"\",\n            suffix: \"\",\n            rightAlign: !0,\n            decimalProtect: !0,\n            min: void 0,\n            max: void 0,\n            postFormat: function(buffer, pos, reformatOnly, opts) {\n                var suffixStripped = !1;\n                buffer.length >= opts.suffix.length && buffer.join(\"\").indexOf(opts.suffix) == buffer.length - opts.suffix.length && (buffer.length = buffer.length - opts.suffix.length, \n                suffixStripped = !0), pos = pos >= buffer.length ? buffer.length - 1 : pos < opts.prefix.length ? opts.prefix.length : pos;\n                var needsRefresh = !1, charAtPos = buffer[pos];\n                if (\"\" == opts.groupSeparator || -1 != $.inArray(opts.radixPoint, buffer) && pos >= $.inArray(opts.radixPoint, buffer) || new RegExp(\"[\" + $.inputmask.escapeRegex(opts.negationSymbol.front) + \"+]\").test(charAtPos)) {\n                    if (suffixStripped) for (var i = 0, l = opts.suffix.length; l > i; i++) buffer.push(opts.suffix.charAt(i));\n                    return {\n                        pos: pos\n                    };\n                }\n                var cbuf = buffer.slice();\n                charAtPos == opts.groupSeparator && (cbuf.splice(pos--, 1), charAtPos = cbuf[pos]), \n                reformatOnly ? cbuf[pos] = \"?\" : cbuf.splice(pos, 0, \"?\");\n                var bufVal = cbuf.join(\"\"), bufValOrigin = bufVal;\n                if (bufVal.length > 0 && opts.autoGroup || reformatOnly && -1 != bufVal.indexOf(opts.groupSeparator)) {\n                    var escapedGroupSeparator = $.inputmask.escapeRegex(opts.groupSeparator);\n                    needsRefresh = 0 == bufVal.indexOf(opts.groupSeparator), bufVal = bufVal.replace(new RegExp(escapedGroupSeparator, \"g\"), \"\");\n                    var radixSplit = bufVal.split(opts.radixPoint);\n                    if (bufVal = \"\" == opts.radixPoint ? bufVal : radixSplit[0], bufVal != opts.prefix + \"?0\" && bufVal.length >= opts.groupSize + opts.prefix.length) for (var reg = new RegExp(\"([-+]?[\\\\d?]+)([\\\\d?]{\" + opts.groupSize + \"})\"); reg.test(bufVal); ) bufVal = bufVal.replace(reg, \"$1\" + opts.groupSeparator + \"$2\"), \n                    bufVal = bufVal.replace(opts.groupSeparator + opts.groupSeparator, opts.groupSeparator);\n                    \"\" != opts.radixPoint && radixSplit.length > 1 && (bufVal += opts.radixPoint + radixSplit[1]);\n                }\n                needsRefresh = bufValOrigin != bufVal, buffer.length = bufVal.length;\n                for (var i = 0, l = bufVal.length; l > i; i++) buffer[i] = bufVal.charAt(i);\n                var newPos = $.inArray(\"?\", buffer);\n                if (reformatOnly ? buffer[newPos] = charAtPos : buffer.splice(newPos, 1), !needsRefresh && suffixStripped) for (var i = 0, l = opts.suffix.length; l > i; i++) buffer.push(opts.suffix.charAt(i));\n                return {\n                    pos: newPos,\n                    refreshFromBuffer: needsRefresh,\n                    buffer: buffer\n                };\n            },\n            onBeforeWrite: function(e, buffer, caretPos, opts) {\n                if (e && \"blur\" == e.type) {\n                    var maskedValue = buffer.join(\"\"), processValue = maskedValue.replace(opts.prefix, \"\");\n                    if (processValue = processValue.replace(opts.suffix, \"\"), processValue = processValue.replace(new RegExp($.inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"), \n                    \",\" === opts.radixPoint && (processValue = processValue.replace($.inputmask.escapeRegex(opts.radixPoint), \".\")), \n                    isFinite(processValue) && isFinite(opts.min) && parseFloat(processValue) < parseFloat(opts.min)) return $.extend(!0, {\n                        refreshFromBuffer: !0,\n                        buffer: (opts.prefix + opts.min).split(\"\")\n                    }, opts.postFormat((opts.prefix + opts.min).split(\"\"), 0, !0, opts));\n                    var tmpBufSplit = \"\" != opts.radixPoint ? buffer.join(\"\").split(opts.radixPoint) : [ buffer.join(\"\") ], matchRslt = tmpBufSplit[0].match(opts.regex.integerPart(opts)), matchRsltDigits = 2 == tmpBufSplit.length ? tmpBufSplit[1].match(opts.regex.integerNPart(opts)) : void 0;\n                    !matchRslt || matchRslt[0] != opts.negationSymbol.front + \"0\" && matchRslt[0] != opts.negationSymbol.front && \"+\" != matchRslt[0] || void 0 != matchRsltDigits && !matchRsltDigits[0].match(/^0+$/) || buffer.splice(matchRslt.index, 1);\n                    var radixPosition = $.inArray(opts.radixPoint, buffer);\n                    if (-1 != radixPosition && isFinite(opts.digits) && !opts.digitsOptional) {\n                        for (var i = 1; i <= opts.digits; i++) (void 0 == buffer[radixPosition + i] || buffer[radixPosition + i] == opts.placeholder.charAt(0)) && (buffer[radixPosition + i] = \"0\");\n                        return {\n                            refreshFromBuffer: !0,\n                            buffer: buffer\n                        };\n                    }\n                }\n                if (opts.autoGroup) {\n                    var rslt = opts.postFormat(buffer, caretPos - 1, !0, opts);\n                    return rslt.caret = caretPos <= opts.prefix.length ? rslt.pos : rslt.pos + 1, rslt;\n                }\n            },\n            regex: {\n                integerPart: function(opts) {\n                    return new RegExp(\"[\" + $.inputmask.escapeRegex(opts.negationSymbol.front) + \"+]?\\\\d+\");\n                },\n                integerNPart: function(opts) {\n                    return new RegExp(\"[\\\\d\" + $.inputmask.escapeRegex(opts.groupSeparator) + \"]+\");\n                }\n            },\n            signHandler: function(chrs, maskset, pos, strict, opts) {\n                if (!strict && opts.allowMinus && \"-\" === chrs || opts.allowPlus && \"+\" === chrs) {\n                    var matchRslt = maskset.buffer.join(\"\").match(opts.regex.integerPart(opts));\n                    if (matchRslt && matchRslt[0].length > 0) return maskset.buffer[matchRslt.index] == (\"-\" === chrs ? \"+\" : opts.negationSymbol.front) ? \"-\" == chrs ? \"\" != opts.negationSymbol.back ? {\n                        pos: matchRslt.index,\n                        c: opts.negationSymbol.front,\n                        remove: matchRslt.index,\n                        caret: pos,\n                        insert: {\n                            pos: maskset.buffer.length - opts.suffix.length - 1,\n                            c: opts.negationSymbol.back\n                        }\n                    } : {\n                        pos: matchRslt.index,\n                        c: opts.negationSymbol.front,\n                        remove: matchRslt.index,\n                        caret: pos\n                    } : \"\" != opts.negationSymbol.back ? {\n                        pos: matchRslt.index,\n                        c: \"+\",\n                        remove: [ matchRslt.index, maskset.buffer.length - opts.suffix.length - 1 ],\n                        caret: pos\n                    } : {\n                        pos: matchRslt.index,\n                        c: \"+\",\n                        remove: matchRslt.index,\n                        caret: pos\n                    } : maskset.buffer[matchRslt.index] == (\"-\" === chrs ? opts.negationSymbol.front : \"+\") ? \"-\" == chrs && \"\" != opts.negationSymbol.back ? {\n                        remove: [ matchRslt.index, maskset.buffer.length - opts.suffix.length - 1 ],\n                        caret: pos - 1\n                    } : {\n                        remove: matchRslt.index,\n                        caret: pos - 1\n                    } : \"-\" == chrs ? \"\" != opts.negationSymbol.back ? {\n                        pos: matchRslt.index,\n                        c: opts.negationSymbol.front,\n                        caret: pos + 1,\n                        insert: {\n                            pos: maskset.buffer.length - opts.suffix.length,\n                            c: opts.negationSymbol.back\n                        }\n                    } : {\n                        pos: matchRslt.index,\n                        c: opts.negationSymbol.front,\n                        caret: pos + 1\n                    } : {\n                        pos: matchRslt.index,\n                        c: chrs,\n                        caret: pos + 1\n                    };\n                }\n                return !1;\n            },\n            radixHandler: function(chrs, maskset, pos, strict, opts) {\n                if (!strict && chrs === opts.radixPoint && opts.digits > 0) {\n                    var radixPos = $.inArray(opts.radixPoint, maskset.buffer), integerValue = maskset.buffer.join(\"\").match(opts.regex.integerPart(opts));\n                    if (-1 != radixPos && maskset.validPositions[radixPos]) return maskset.validPositions[radixPos - 1] ? {\n                        caret: radixPos + 1\n                    } : {\n                        pos: integerValue.index,\n                        c: integerValue[0],\n                        caret: radixPos + 1\n                    };\n                    if (!integerValue || \"0\" == integerValue[0] && integerValue.index + 1 != pos) return maskset.buffer[integerValue ? integerValue.index : pos] = \"0\", \n                    {\n                        pos: (integerValue ? integerValue.index : pos) + 1\n                    };\n                }\n                return !1;\n            },\n            leadingZeroHandler: function(chrs, maskset, pos, strict, opts) {\n                var matchRslt = maskset.buffer.join(\"\").match(opts.regex.integerNPart(opts)), radixPosition = $.inArray(opts.radixPoint, maskset.buffer);\n                if (matchRslt && !strict && (-1 == radixPosition || radixPosition >= pos)) if (0 == matchRslt[0].indexOf(\"0\")) {\n                    pos < opts.prefix.length && (pos = matchRslt.index);\n                    var _radixPosition = $.inArray(opts.radixPoint, maskset._buffer), digitsMatch = maskset._buffer && maskset.buffer.slice(radixPosition).join(\"\") == maskset._buffer.slice(_radixPosition).join(\"\") || 0 == parseInt(maskset.buffer.slice(radixPosition + 1).join(\"\")), integerMatch = maskset._buffer && maskset.buffer.slice(matchRslt.index, radixPosition).join(\"\") == maskset._buffer.slice(opts.prefix.length, _radixPosition).join(\"\") || \"0\" == maskset.buffer.slice(matchRslt.index, radixPosition).join(\"\");\n                    if (-1 == radixPosition || digitsMatch && integerMatch) return maskset.buffer.splice(matchRslt.index, 1), \n                    pos = pos > matchRslt.index ? pos - 1 : matchRslt.index, {\n                        pos: pos,\n                        remove: matchRslt.index\n                    };\n                    if (matchRslt.index + 1 == pos || \"0\" == chrs) return maskset.buffer.splice(matchRslt.index, 1), \n                    pos = matchRslt.index, {\n                        pos: pos,\n                        remove: matchRslt.index\n                    };\n                } else if (\"0\" === chrs && pos <= matchRslt.index && matchRslt[0] != opts.groupSeparator) return !1;\n                return !0;\n            },\n            postValidation: function(buffer, opts) {\n                var isValid = !0, maskedValue = buffer.join(\"\"), processValue = maskedValue.replace(opts.prefix, \"\");\n                return processValue = processValue.replace(opts.suffix, \"\"), processValue = processValue.replace(new RegExp($.inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"), \n                \",\" === opts.radixPoint && (processValue = processValue.replace($.inputmask.escapeRegex(opts.radixPoint), \".\")), \n                processValue = processValue.replace(new RegExp(\"^\" + $.inputmask.escapeRegex(opts.negationSymbol.front)), \"-\"), \n                processValue = processValue.replace(new RegExp($.inputmask.escapeRegex(opts.negationSymbol.back) + \"$\"), \"\"), \n                isFinite(processValue) && isFinite(opts.max) && (isValid = parseFloat(processValue) <= parseFloat(opts.max)), \n                isValid;\n            },\n            definitions: {\n                \"~\": {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        var isValid = opts.signHandler(chrs, maskset, pos, strict, opts);\n                        if (!isValid && (isValid = opts.radixHandler(chrs, maskset, pos, strict, opts), \n                        !isValid && (isValid = strict ? new RegExp(\"[0-9\" + $.inputmask.escapeRegex(opts.groupSeparator) + \"]\").test(chrs) : new RegExp(\"[0-9]\").test(chrs), \n                        isValid === !0 && (isValid = opts.leadingZeroHandler(chrs, maskset, pos, strict, opts), \n                        isValid === !0)))) {\n                            var radixPosition = $.inArray(opts.radixPoint, maskset.buffer);\n                            isValid = opts.digitsOptional === !1 && pos > radixPosition && !strict ? {\n                                pos: pos,\n                                remove: pos\n                            } : {\n                                pos: pos\n                            };\n                        }\n                        return isValid;\n                    },\n                    cardinality: 1,\n                    prevalidator: null\n                },\n                \"+\": {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        var isValid = opts.signHandler(chrs, maskset, pos, strict, opts);\n                        return !isValid && (strict && opts.allowMinus && chrs === opts.negationSymbol.front || opts.allowMinus && \"-\" == chrs || opts.allowPlus && \"+\" == chrs) && (isValid = \"-\" == chrs ? \"\" != opts.negationSymbol.back ? {\n                            pos: pos,\n                            c: \"-\" === chrs ? opts.negationSymbol.front : \"+\",\n                            caret: pos + 1,\n                            insert: {\n                                pos: maskset.buffer.length,\n                                c: opts.negationSymbol.back\n                            }\n                        } : {\n                            pos: pos,\n                            c: \"-\" === chrs ? opts.negationSymbol.front : \"+\",\n                            caret: pos + 1\n                        } : !0), isValid;\n                    },\n                    cardinality: 1,\n                    prevalidator: null,\n                    placeholder: \"\"\n                },\n                \"-\": {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        var isValid = opts.signHandler(chrs, maskset, pos, strict, opts);\n                        return !isValid && strict && opts.allowMinus && chrs === opts.negationSymbol.back && (isValid = !0), \n                        isValid;\n                    },\n                    cardinality: 1,\n                    prevalidator: null,\n                    placeholder: \"\"\n                },\n                \":\": {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        var isValid = opts.signHandler(chrs, maskset, pos, strict, opts);\n                        if (!isValid) {\n                            var radix = \"[\" + $.inputmask.escapeRegex(opts.radixPoint) + \"]\";\n                            isValid = new RegExp(radix).test(chrs), isValid && maskset.validPositions[pos] && maskset.validPositions[pos].match.placeholder == opts.radixPoint && (isValid = {\n                                caret: pos + 1\n                            });\n                        }\n                        return isValid;\n                    },\n                    cardinality: 1,\n                    prevalidator: null,\n                    placeholder: function(opts) {\n                        return opts.radixPoint;\n                    }\n                }\n            },\n            insertMode: !0,\n            autoUnmask: !1,\n            unmaskAsNumber: !1,\n            onUnMask: function(maskedValue, unmaskedValue, opts) {\n                var processValue = maskedValue.replace(opts.prefix, \"\");\n                return processValue = processValue.replace(opts.suffix, \"\"), processValue = processValue.replace(new RegExp($.inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"), \n                opts.unmaskAsNumber ? (processValue = processValue.replace($.inputmask.escapeRegex.call(this, opts.radixPoint), \".\"), \n                Number(processValue)) : processValue;\n            },\n            isComplete: function(buffer, opts) {\n                var maskedValue = buffer.join(\"\"), bufClone = buffer.slice();\n                if (opts.postFormat(bufClone, 0, !0, opts), bufClone.join(\"\") != maskedValue) return !1;\n                var processValue = maskedValue.replace(opts.prefix, \"\");\n                return processValue = processValue.replace(opts.suffix, \"\"), processValue = processValue.replace(new RegExp($.inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"), \n                \",\" === opts.radixPoint && (processValue = processValue.replace($.inputmask.escapeRegex(opts.radixPoint), \".\")), \n                isFinite(processValue);\n            },\n            onBeforeMask: function(initialValue, opts) {\n                if (\"\" != opts.radixPoint && isFinite(initialValue)) initialValue = initialValue.toString().replace(\".\", opts.radixPoint); else {\n                    var kommaMatches = initialValue.match(/,/g), dotMatches = initialValue.match(/\\./g);\n                    dotMatches && kommaMatches ? dotMatches.length > kommaMatches.length ? (initialValue = initialValue.replace(/\\./g, \"\"), \n                    initialValue = initialValue.replace(\",\", opts.radixPoint)) : kommaMatches.length > dotMatches.length ? (initialValue = initialValue.replace(/,/g, \"\"), \n                    initialValue = initialValue.replace(\".\", opts.radixPoint)) : initialValue = initialValue.indexOf(\".\") < initialValue.indexOf(\",\") ? initialValue.replace(/\\./g, \"\") : initialValue = initialValue.replace(/,/g, \"\") : initialValue = initialValue.replace(new RegExp($.inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\");\n                }\n                return 0 == opts.digits && (-1 != initialValue.indexOf(\".\") ? initialValue = initialValue.substring(0, initialValue.indexOf(\".\")) : -1 != initialValue.indexOf(\",\") && (initialValue = initialValue.substring(0, initialValue.indexOf(\",\")))), \n                initialValue;\n            },\n            canClearPosition: function(maskset, position, lvp, strict, opts) {\n                var positionInput = maskset.validPositions[position].input, canClear = positionInput != opts.radixPoint && isFinite(positionInput) || position == lvp || positionInput == opts.groupSeparator || positionInput == opts.negationSymbol.front || positionInput == opts.negationSymbol.back;\n                if (canClear && isFinite(positionInput)) {\n                    var matchRslt;\n                    if (!strict && maskset.buffer) {\n                        matchRslt = maskset.buffer.join(\"\").substr(0, position).match(opts.regex.integerNPart(opts));\n                        var pos = position + 1, isNull = null == matchRslt || 0 == parseInt(matchRslt[0].replace(new RegExp($.inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"));\n                        if (isNull) for (;maskset.validPositions[pos] && (maskset.validPositions[pos].input == opts.groupSeparator || \"0\" == maskset.validPositions[pos].input); ) delete maskset.validPositions[pos], \n                        pos++;\n                    }\n                    var buffer = [];\n                    for (var vp in maskset.validPositions) buffer.push(maskset.validPositions[vp].input);\n                    matchRslt = buffer.join(\"\").match(opts.regex.integerNPart(opts));\n                    var radixPosition = $.inArray(opts.radixPoint, maskset.buffer);\n                    if (matchRslt && (-1 == radixPosition || radixPosition >= position)) if (0 == matchRslt[0].indexOf(\"0\")) canClear = matchRslt.index != position || -1 == radixPosition; else {\n                        var intPart = parseInt(matchRslt[0].replace(new RegExp($.inputmask.escapeRegex(opts.groupSeparator), \"g\"), \"\"));\n                        -1 != radixPosition && 10 > intPart && \"0\" == opts.placeholder.charAt(0) && (maskset.validPositions[position].input = \"0\", \n                        maskset.p = opts.prefix.length + 1, canClear = !1);\n                    }\n                }\n                return canClear;\n            }\n        },\n        currency: {\n            prefix: \"$ \",\n            groupSeparator: \",\",\n            alias: \"numeric\",\n            placeholder: \"0\",\n            autoGroup: !0,\n            digits: 2,\n            digitsOptional: !1,\n            clearMaskOnLostFocus: !1\n        },\n        decimal: {\n            alias: \"numeric\"\n        },\n        integer: {\n            alias: \"numeric\",\n            digits: \"0\",\n            radixPoint: \"\"\n        }\n    }), $.fn.inputmask;\n}(jQuery), function($) {\n    return $.extend($.inputmask.defaults.aliases, {\n        phone: {\n            url: \"phone-codes/phone-codes.js\",\n            countrycode: \"\",\n            mask: function(opts) {\n                opts.definitions[\"#\"] = opts.definitions[9];\n                var maskList = [];\n                return $.ajax({\n                    url: opts.url,\n                    async: !1,\n                    dataType: \"json\",\n                    success: function(response) {\n                        maskList = response;\n                    },\n                    error: function(xhr, ajaxOptions, thrownError) {\n                        alert(thrownError + \" - \" + opts.url);\n                    }\n                }), maskList = maskList.sort(function(a, b) {\n                    return (a.mask || a) < (b.mask || b) ? -1 : 1;\n                });\n            },\n            keepStatic: !1,\n            nojumps: !0,\n            nojumpsThreshold: 1,\n            onBeforeMask: function(value, opts) {\n                var processedValue = value.replace(/^0/g, \"\");\n                return (processedValue.indexOf(opts.countrycode) > 1 || -1 == processedValue.indexOf(opts.countrycode)) && (processedValue = \"+\" + opts.countrycode + processedValue), \n                processedValue;\n            }\n        },\n        phonebe: {\n            alias: \"phone\",\n            url: \"phone-codes/phone-be.js\",\n            countrycode: \"32\",\n            nojumpsThreshold: 4\n        }\n    }), $.fn.inputmask;\n}(jQuery), function($) {\n    return $.extend($.inputmask.defaults.aliases, {\n        Regex: {\n            mask: \"r\",\n            greedy: !1,\n            repeat: \"*\",\n            regex: null,\n            regexTokens: null,\n            tokenizer: /\\[\\^?]?(?:[^\\\\\\]]+|\\\\[\\S\\s]?)*]?|\\\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9][0-9]*|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|c[A-Za-z]|[\\S\\s]?)|\\((?:\\?[:=!]?)?|(?:[?*+]|\\{[0-9]+(?:,[0-9]*)?\\})\\??|[^.?*+^${[()|\\\\]+|./g,\n            quantifierFilter: /[0-9]+[^,]/,\n            isComplete: function(buffer, opts) {\n                return new RegExp(opts.regex).test(buffer.join(\"\"));\n            },\n            definitions: {\n                r: {\n                    validator: function(chrs, maskset, pos, strict, opts) {\n                        function regexToken(isGroup, isQuantifier) {\n                            this.matches = [], this.isGroup = isGroup || !1, this.isQuantifier = isQuantifier || !1, \n                            this.quantifier = {\n                                min: 1,\n                                max: 1\n                            }, this.repeaterPart = void 0;\n                        }\n                        function analyseRegex() {\n                            var match, m, currentToken = new regexToken(), opengroups = [];\n                            for (opts.regexTokens = []; match = opts.tokenizer.exec(opts.regex); ) switch (m = match[0], \n                            m.charAt(0)) {\n                              case \"(\":\n                                opengroups.push(new regexToken(!0));\n                                break;\n\n                              case \")\":\n                                var groupToken = opengroups.pop();\n                                opengroups.length > 0 ? opengroups[opengroups.length - 1].matches.push(groupToken) : currentToken.matches.push(groupToken);\n                                break;\n\n                              case \"{\":\n                              case \"+\":\n                              case \"*\":\n                                var quantifierToken = new regexToken(!1, !0);\n                                m = m.replace(/[{}]/g, \"\");\n                                var mq = m.split(\",\"), mq0 = isNaN(mq[0]) ? mq[0] : parseInt(mq[0]), mq1 = 1 == mq.length ? mq0 : isNaN(mq[1]) ? mq[1] : parseInt(mq[1]);\n                                if (quantifierToken.quantifier = {\n                                    min: mq0,\n                                    max: mq1\n                                }, opengroups.length > 0) {\n                                    var matches = opengroups[opengroups.length - 1].matches;\n                                    if (match = matches.pop(), !match.isGroup) {\n                                        var groupToken = new regexToken(!0);\n                                        groupToken.matches.push(match), match = groupToken;\n                                    }\n                                    matches.push(match), matches.push(quantifierToken);\n                                } else {\n                                    if (match = currentToken.matches.pop(), !match.isGroup) {\n                                        var groupToken = new regexToken(!0);\n                                        groupToken.matches.push(match), match = groupToken;\n                                    }\n                                    currentToken.matches.push(match), currentToken.matches.push(quantifierToken);\n                                }\n                                break;\n\n                              default:\n                                opengroups.length > 0 ? opengroups[opengroups.length - 1].matches.push(m) : currentToken.matches.push(m);\n                            }\n                            currentToken.matches.length > 0 && opts.regexTokens.push(currentToken);\n                        }\n                        function validateRegexToken(token, fromGroup) {\n                            var isvalid = !1;\n                            fromGroup && (regexPart += \"(\", openGroupCount++);\n                            for (var mndx = 0; mndx < token.matches.length; mndx++) {\n                                var matchToken = token.matches[mndx];\n                                if (1 == matchToken.isGroup) isvalid = validateRegexToken(matchToken, !0); else if (1 == matchToken.isQuantifier) {\n                                    var crrntndx = $.inArray(matchToken, token.matches), matchGroup = token.matches[crrntndx - 1], regexPartBak = regexPart;\n                                    if (isNaN(matchToken.quantifier.max)) {\n                                        for (;matchToken.repeaterPart && matchToken.repeaterPart != regexPart && matchToken.repeaterPart.length > regexPart.length && !(isvalid = validateRegexToken(matchGroup, !0)); ) ;\n                                        isvalid = isvalid || validateRegexToken(matchGroup, !0), isvalid && (matchToken.repeaterPart = regexPart), \n                                        regexPart = regexPartBak + matchToken.quantifier.max;\n                                    } else {\n                                        for (var i = 0, qm = matchToken.quantifier.max - 1; qm > i && !(isvalid = validateRegexToken(matchGroup, !0)); i++) ;\n                                        regexPart = regexPartBak + \"{\" + matchToken.quantifier.min + \",\" + matchToken.quantifier.max + \"}\";\n                                    }\n                                } else if (void 0 != matchToken.matches) for (var k = 0; k < matchToken.length && !(isvalid = validateRegexToken(matchToken[k], fromGroup)); k++) ; else {\n                                    var testExp;\n                                    if (\"[\" == matchToken.charAt(0)) {\n                                        testExp = regexPart, testExp += matchToken;\n                                        for (var j = 0; openGroupCount > j; j++) testExp += \")\";\n                                        var exp = new RegExp(\"^(\" + testExp + \")$\");\n                                        isvalid = exp.test(bufferStr);\n                                    } else for (var l = 0, tl = matchToken.length; tl > l; l++) if (\"\\\\\" != matchToken.charAt(l)) {\n                                        testExp = regexPart, testExp += matchToken.substr(0, l + 1), testExp = testExp.replace(/\\|$/, \"\");\n                                        for (var j = 0; openGroupCount > j; j++) testExp += \")\";\n                                        var exp = new RegExp(\"^(\" + testExp + \")$\");\n                                        if (isvalid = exp.test(bufferStr)) break;\n                                    }\n                                    regexPart += matchToken;\n                                }\n                                if (isvalid) break;\n                            }\n                            return fromGroup && (regexPart += \")\", openGroupCount--), isvalid;\n                        }\n                        null == opts.regexTokens && analyseRegex();\n                        var cbuffer = maskset.buffer.slice(), regexPart = \"\", isValid = !1, openGroupCount = 0;\n                        cbuffer.splice(pos, 0, chrs);\n                        for (var bufferStr = cbuffer.join(\"\"), i = 0; i < opts.regexTokens.length; i++) {\n                            var regexToken = opts.regexTokens[i];\n                            if (isValid = validateRegexToken(regexToken, regexToken.isGroup)) break;\n                        }\n                        return isValid;\n                    },\n                    cardinality: 1\n                }\n            }\n        }\n    }), $.fn.inputmask;\n}(jQuery);","var cr;!function(cr){var form;!function(form){form.formModule=angular.module(\"cr.form\",[\"ui.bootstrap\",\"ui.mask\",\"ui.select\",\"cr.translation\"])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.provider(\"crFormOptions\",function(){function setOption(name,value){\"string\"==typeof name?options[name]=value:angular.forEach(name,function(val,name){setOption(name,val)})}function getOptions(){return angular.copy(options)}var options={uniqueFormId:null,context:null,submitCopy:\"Submit\",cols:12,hideSubmit:!1};this.setOption=setOption,this.getOptions=getOptions,this.$get=function(){return this}})}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.provider(\"crFormTemplate\",function(){function setTemplateUrl(name,templateUrl){\"string\"==typeof name?templateMap[name]=templateUrl:angular.forEach(name,function(templateUrl,name){setTemplateUrl(name,templateUrl)})}function getTemplateUrl(type){return templateMap[type]}var _this=this,templateMap={};this.setTemplateUrl=setTemplateUrl,this.getTemplateUrl=getTemplateUrl,this.$get=function(){return _this}})}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){var formPopupService=function(){function formPopupService($q,$modal,$http){this.$q=$q,this.$modal=$modal,this.$http=$http}return formPopupService.prototype.editString=function(title,fieldName,currentVal,params){var response,strButtons,buttons,buttonTokens,i;for(strButtons=\"*OK|CANCEL\",buttons=[],buttonTokens=strButtons.split(\"|\"),i=0;i<buttonTokens.length;){var curToken=buttonTokens[i];\"*\"==curToken.substring(0,1)?buttons.push({name:curToken.substring(1),\"default\":!0}):buttons.push({name:curToken,\"default\":!1}),i++}return response=this.$q.defer(),this.$modal.open({controller:\"formPopupController\",resolve:{popupData:function(){return{title:title,object:{data:currentVal}||{},context:params&&params.context?params.context:\"Default\",validationCallback:params&&params.validationCallback?params.validationCallback:null,buttons:buttons}},formDefinition:function(){return{data:[{rows:[[{cols:12,key:\"data\",type:\"text\",label:fieldName}]]}]}}},size:\"lg\",templateUrl:\"modules/form/views/formpopup.html\",show:!0}).result.then(function(buttonName){console.log(\"editstring response: \"+angular.toJson(buttonName)),response.resolve(buttonName.object.data)},function(reason){response.reject(reason)}),response.promise},formPopupService.prototype.displayModal=function(title,formDefinitionUrl,object,params){var response,strButtons,buttons,buttonTokens,i;for(strButtons=\"*OK|CANCEL\",buttons=[],buttonTokens=strButtons.split(\"|\"),i=0;i<buttonTokens.length;){var curToken=buttonTokens[i];\"*\"==curToken.substring(0,1)?buttons.push({name:curToken.substring(1),\"default\":!0}):buttons.push({name:curToken,\"default\":!1}),i++}return response=this.$q.defer(),this.$modal.open({controller:\"formPopupController\",resolve:{popupData:function(){return{title:title,object:object||{},context:params&&params.context?params.context:\"Default\",validationCallback:params&&params.validationCallback?params.validationCallback:null,buttons:buttons}},formDefinition:function($http){return $http({method:\"GET\",url:formDefinitionUrl})}},size:\"lg\",templateUrl:\"modules/form/views/formpopup.html\",show:!0}).result.then(function(buttonName){response.resolve(buttonName)},function(reason){response.reject(reason)}),response.promise},formPopupService}();form.formModule.factory(\"formPopupService\",[\"$q\",\"$modal\",\"$http\",function($q,$modal,$http){return new formPopupService($q,$modal,$http)}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){var formPopupController=function(){function formPopupController($scope,$modalInstance,currentLanguage,popupData,formDefinition){var _this=this;this.$scope=$scope,this.$modalInstance=$modalInstance,this.currentLanguage=currentLanguage,this.$scope.popupData=popupData,this.$scope.context=popupData.context?popupData.context:$scope.context,this.$scope.validationCallback=popupData.validationCallback,this.$scope.formDefinition=formDefinition,this.$scope.formData=popupData.object||{},this.$scope.formOptions={currentLanguage:currentLanguage.Langage,context:this.$scope.context,hideSubmit:!0},this.$scope.submitForm=function(){return _this.submitForm()},this.$scope.handleButtons=function(obj){return _this.handleButtons(obj)}}return formPopupController.prototype.submitForm=function(){var _this=this;this.$scope.validationCallback?this.$scope.validationCallback(this.$scope.formData).then(function(response){_this.submitClose(response)},function(data){_this.$scope.error=data}):this.submitClose()},formPopupController.prototype.submitClose=function(validationResponse){var buttons,defaultButton;buttons=this.$scope.popupData.buttons;for(var button in buttons)buttons[button][\"default\"]&&(defaultButton=buttons[button]);var closeObj={action:defaultButton.name,object:this.$scope.formData};validationResponse&&(closeObj.validationResponse=validationResponse),this.$modalInstance.close(closeObj)},formPopupController.prototype.handleButtons=function(obj){\"OK\"===obj.action?this.submitForm():this.$modalInstance.dismiss(obj)},formPopupController}();form.formModule.controller(\"formPopupController\",[\"$scope\",\"$modalInstance\",\"currentLangage\",\"popupData\",\"formDefinition\",formPopupController])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crAutoCompleteField\",[function(){return{scope:!1,controller:[\"$scope\",\"$sce\",function($scope,$sce){var first=!0;$scope.$watch(\"value\",function(val,old){first&&val&&($scope.optionValue={},$scope.optionValue.Id=val,first=!1)}),$scope.$watch(\"optionValue\",function(val){var prop;if(val)if(val.Id&&($scope.value=val.Id||\"\"),val.Data){if($scope.formOptions&&$scope.formOptions.formCtrl)for(prop in val.Data){var formControl=$scope.formOptions.formCtrl[prop];formControl&&angular.isFunction(formControl.$setViewValue)&&angular.isFunction(formControl.$render)&&(formControl.$setViewValue(val.Data[prop]),formControl.$render())}}else $scope.value=val;else $scope.value=\"\"})}]}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crForm\",[\"crFormOptions\",\"$compile\",function(crFormOptions,$compile){return{restrict:\"E\",templateUrl:\"modules/form/templates/cr-form.html\",replace:!0,transclude:!0,scope:{definition:\"=\",options:\"=?\",result:\"=\",formOnParentScope:\"=name\"},compile:function(scope,iElement,iAttrs,controller,transcludeFn){return{post:function(scope,ele,attr,controller){scope.formOnParentScope=scope[attr.name],scope.options.formCtrl=scope.formOnParentScope}}},controller:[\"$scope\",\"$element\",\"$parse\",function($scope,$element,$parse){this.setSubmitHandler=function(h){$scope.options.submitHandler=h},angular.forEach($scope.definition,function(section){angular.forEach(section.rows,function(row){angular.forEach(row,function(field){if(angular.isDefined(field.watch)&&angular.isDefined(field.watch.expression)&&angular.isDefined(field.watch.listener)){var watchExpression=field.watch.expression;angular.isFunction(watchExpression)&&(watchExpression=function(){var args=Array.prototype.slice.call(arguments,0);return args.unshift(field),field.watch.expression.apply(this,args)}),$scope.$watch(watchExpression,function(){var args=Array.prototype.slice.call(arguments,0);return args.unshift(field),field.watch.listener.apply(this,args)})}})})}),$scope.visibleFields={},angular.forEach($scope.definition,function(section){angular.forEach(section.fields,function(field,index){$scope.visibleFields[field.key]=!0})}),$scope.$watch(\"result\",function(newValue){angular.forEach($scope.definition,function(section){angular.forEach(section.rows,function(row){angular.forEach(row,function(field){var expressionScope={result:$scope.result,visibleFields:$scope.visibleFields};field.hideExpression&&(field.hide=$parse(field.hideExpression)(expressionScope),$scope.visibleFields[field.key]=!field.hide),field.disabledExpression&&(field.disabled=$parse(field.disabledExpression)(expressionScope)),angular.isDefined(field.validation)&&field.validation.requiredExpression&&(field.validation.required=$parse(field.validation.requiredExpression)(expressionScope))})})})},!0),$scope.$on(\"formly-dynamic-name-update\",function(e){e.stopPropagation(),window.setTimeout(function(){angular.forEach($scope.definition,function(section){angular.forEach(section.rows,function(row){angular.forEach(row,function(field){var formField=$scope.formOnParentScope[field.key];formField&&(field.formField=formField)})})})})})}]}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crFormField\",[\"$http\",\"$compile\",\"$templateCache\",\"$log\",\"crFormTemplate\",\"cfg\",function($http,$compile,$templateCache,$log,crFormTemplate,cfg){var logger=$log.getInstance(\"crFormField\");return{restrict:\"AE\",replace:!0,priority:200,transclude:!0,scope:{optionsData:\"&options\",formOptionsData:\"&formOptions\",formId:\"=formId\",index:\"=index\",parentIndex:\"=parentIndex\",value:\"=formValue\",result:\"=formResult\"},compile:function(tElem,tAttrs){return{pre:function(scope,iElem,iAttrs){scope.fieldName},post:function($scope,$element,$attr){function setElementTemplate(templateData){$element.html(templateData),$compile($element.contents())($scope)}var template=$scope.options.template;if(template)setElementTemplate(template);else{var templateUrl=$scope.options.templateUrl||crFormTemplate.getTemplateUrl($scope.options.type);templateUrl?$http.get(templateUrl,{cache:$templateCache}).then(function(response){setElementTemplate(response.data)},function(error){logger.error(\"Problem loading template for \"+templateUrl),logger.error(error)}):logger.error(\"Template type '\"+$scope.options.type+\"' not supported.\")}}}},controller:[\"$scope\",\"$parse\",\"$http\",\"cfg\",function($scope,$parse,$http,cfg){var firstLoad=!0;$scope.options=$scope.optionsData(),$scope.formOptions=$scope.formOptionsData(),angular.isDefined($scope.value)||\"undefined\"==typeof $scope.options[\"default\"]||($scope.value=$scope.options[\"default\"]);var type=$scope.options.type;!type&&$scope.options.template?type=\"template\":!type&&$scope.options.templateUrl&&(type=\"templateUrl\");var resets=$scope.options.resets;if(resets){var optionKey=$scope.options.key;$scope.$watch(\"formOptions.formCtrl.\"+optionKey+\".$viewValue\",function(newVal){newVal&&(firstLoad||angular.forEach(resets,function(resetField){if($scope.formOptions&&$scope.formOptions.formCtrl&&$scope.formOptions.formCtrl[resetField]){var formControl=$scope.formOptions.formCtrl[resetField];formControl&&angular.isFunction(formControl.$setViewValue)&&angular.isFunction(formControl.$render)&&(formControl.$setViewValue(\"\"),formControl.$render())}}),firstLoad=!1)})}$scope.clickHandler=function(){null!=$scope.options.clickExpression&&$parse($scope.options.clickExpression)({result:$scope.result})},null!=$scope.options.staticExpression&&$scope.$watch($scope.options.staticExpression,function(value){$scope.staticBinding=value}),$scope.updateOptions=function(value){if(angular.isDefined($scope.options[\"datasource-url\"])){var lurl=$scope.options[\"datasource-url\"].toLowerCase();if(lurl.indexOf(\"search=\",lurl.length-\"search=\".length)>=0){var url=cfg.WebApiUrl+$scope.options[\"datasource-url\"]+value;$http.get(url).then(function(response){var key=\"Id\",text=\"Text\";$scope.options[\"datasource-key\"]&&(key=$scope.options[\"datasource-key\"]),$scope.options[\"datasource-value\"]&&(text=$scope.options[\"datasource-value\"]),\"Id\"===key&&\"text\"===text?$scope.options.options=response.data:$scope.options.options=_.map(response.data,function(value){return{Id:value[key],Text:value[text]}})})}}},$scope.id=$scope.formId+\"_\"+type+\"_\"+(\"undefined\"==typeof $scope.parentIndex?$scope.$parent.$id:$scope.parentIndex)+\"_\"+$scope.index}]}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crFormFieldValidator\",[\"$compile\",\"$interpolate\",\"$http\",\"cfg\",function($compile,$interpolate,$http,cfg){return{restrict:\"A\",terminal:!0,priority:1e3,controller:function($scope,$element,$attrs){},link:function(scope,element,attrs){if(element.removeAttr(\"cr-form-field-validator\"),attrs.crFormFieldValidator){var validation=scope.$eval(attrs.crFormFieldValidator);validation&&(angular.isDefined(validation.compareTo)&&element.attr(\"compare-to\",validation.compareTo),angular.isDefined(validation.required)&&element.attr(\"ng-required\",\"options.validation.required\"),angular.isDefined(validation.remote)&&element.attr(\"cr-remote-validation\",\"{{ options.validation.remote }}\"),angular.isDefined(validation.minLength)&&element.attr(\"ng-minlength\",\"{{options.validation.minLength}}\"),angular.isDefined(validation.maxLength)&&element.attr(\"ng-maxlength\",\"{{ options.validation.maxLength }}\"),angular.isDefined(validation.pattern)&&(angular.isString(validation.pattern)&&(validation.pattern=new RegExp(validation.pattern)),element.attr(\"ng-pattern\",\"options.validation.pattern\")))}$compile(element)(scope)}}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crFormName\",function(){return{restrict:\"A\",priority:599,controller:function($scope,$element,$attrs){$element.removeAttr(\"cr-form-name\"),$attrs.$set(\"name\",$scope.$eval($attrs.crFormName)),delete $attrs.crFormName,$scope.$emit(\"formly-dynamic-name-update\")}}})}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crFormSection\",[\"$compile\",function($compile){return{restrict:\"E\",templateUrl:\"modules/form/templates/cr-section.html\",replace:!0,scope:!0}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crOptions\",[\"$http\",\"$sce\",\"cfg\",\"$timeout\",function($http,$sce,cfg,$timeout){return{scope:!1,controller:[\"$scope\",\"$interpolate\",\"$element\",function($scope,$interpolate,$element){var timeoutPromise,debounceInMs=250,datasourceUrl=$scope.options[\"datasource-url\"];datasourceUrl&&$scope.$watch($interpolate(datasourceUrl),function(url){$timeout.cancel(timeoutPromise),url=url.replace(\"\\ufeff\",\"\"),timeoutPromise=$timeout(function(){$http.get(cfg.WebApiUrl+url).then(function(response){if(response&&response.data&&angular.isArray(response.data)){var result=[];angular.forEach(response.data,function(record){result.push({Text:record.Text,Id:record.Id,Data:record.Data})}),$scope.options.options=response.data}})},debounceInMs)})}]}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crPreviousNext\",function(){return{restrict:\"E\",templateUrl:\"modules/form/templates/cr-previous-next.html\",replace:!0,scope:{showPrevious:\"=\",showNext:\"=\",onPrevious:\"&onPrevious\",context:\"=\"},link:function(scope,element,attrs){angular.isUndefined(scope.showPrevious)&&(scope.showPrevious=!0),angular.isUndefined(scope.showNext)&&(scope.showNext=!0),scope.previous=scope.onPrevious,console.log(\"scope.context in crprev: \"+scope.context)}}})}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crRemoteValidation\",[\"$http\",\"$filter\",\"$interpolate\",\"cfg\",function($http,$filter,$interpolate,cfg){return{require:\"ngModel\",link:function(scope,elm,attrs,ngModel){var url=attrs.crRemoteValidation,errorFilter={};scope.$watch($interpolate(url),function(newUrl){$http.get(cfg.WebApiUrl+newUrl).then(function(response){if(response.data){var valid,holder=$filter(\"tc\")(response.data.ErrorMessage,scope.formOptions.context);response.data.Success===!0?valid=!0:(errorFilter[holder]=holder,valid=!1);for(var key in errorFilter)ngModel.$setValidity(key,valid)}})})}}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crSelectField\",[\"$http\",\"$log\",function($http,$log){var logger=$log.getInstance(\"crSelectField\");return{scope:!1,controller:[\"$scope\",\"$sce\",\"cfg\",function($scope,$sce){$scope.trustAsHtml=function(value){return $sce.trustAsHtml(value)},$scope.$watchCollection(\"options.options\",function(options){if(options||(options=[]),\"string\"==typeof $scope.optionValue||\"undefined\"==typeof $scope.optionValue){var val=$scope.value;angular.isDefined(val)||(val=$scope.options[\"default\"]);for(var i=0;i<options.length;i+=1)options[i].Id===val&&($scope.optionValue=options[i]);!$scope.optionValue&&options.length>0&&($scope.optionValue=options[0])}}),$scope.$watch(\"value\",function(val){if(logger.info(\"val watch...: \"+angular.toJson(val)+\"/\"+angular.toJson($scope.optionValue)),\"string\"==typeof val&&angular.isDefined($scope.options.options))for(var i=0;i<$scope.options.options.length;i++)$scope.options.options[i].Id.replace(\"\\ufeff\",\"\")==val&&($scope.optionValue=$scope.options.options[i])}),$scope.$watch(\"optionValue\",function(val){var prop;if(\"string\"==typeof val&&angular.isDefined($scope.options.options))for(var i=0;i<$scope.options.options.length;i++)$scope.options.options[i].Id.replace(\"\\ufeff\",\"\")==val&&($scope.optionValue=$scope.options.options[i]);if(val&&(val.Id&&($scope.value=val.Id||\"\"),val.Data&&$scope.formOptions&&$scope.formOptions.formCtrl))for(prop in val.Data){var formControl=$scope.formOptions.formCtrl[prop];formControl&&angular.isFunction(formControl.$setViewValue)&&angular.isFunction(formControl.$render)&&(formControl.$setViewValue(val.Data[prop]),formControl.$render())}})}]}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crStrengthIndicator\",[\"$compile\",function($compile){return{restrict:\"A\",templateUrl:\"modules/form/templates/cr-strength-indicator.html\",replace:!0,scope:{indicatorValue:\"=\"},controller:function($scope){function calculateScore(word){function init(){var totalScore=0;for(var key in rules){var score=ruleScores[key],result=validationRules[key](word,score);result&&(totalScore+=result)}return totalScore}function getVerdict(score){return score<scores[0]?verdicts[0]:score>=scores[0]&&score<scores[1]?verdicts[1]:score>=scores[1]&&score<scores[2]?verdicts[2]:score>=scores[2]&&score<scores[3]?verdicts[3]:score>=scores[3]?verdicts[4]:verdicts[0]}var scores=[17,20,32,40],verdicts=[{name:\"Weak\",progress:20},{name:\"Normal\",progress:40},{name:\"Medium\",progress:60},{name:\"Strong\",progress:80},{name:\"Very Strong\",progress:100}],ruleScores={wordLength:-100,wordLowercase:1,wordUppercase:3,wordOneNumber:3,wordThreeNumbers:5,wordOneSpecialChar:3,wordTwoSpecialChar:5,wordUpperLowerCombo:2,wordLetterNumberCombo:2,wordLetterNumberCharCombo:2},rules={wordLength:!0,wordLowercase:!0,wordUppercase:!0,wordOneNumber:!0,wordThreeNumbers:!0,wordOneSpecialChar:!0,wordTwoSpecialChar:!0,wordUpperLowerCombo:!0,wordLetterNumberCombo:!0,wordLetterNumberCharCombo:!0},validationRules={wordLength:function(word,score){var wordlen=word.length,lenScore=Math.pow(wordlen,1.4);return wordlen<4&&(lenScore+=score),lenScore},wordLowercase:function(word,score){return word.match(/[a-z]/)&&score},wordUppercase:function(word,score){return word.match(/[A-Z]/)&&score},wordOneNumber:function(word,score){return word.match(/\\d+/)&&score},wordThreeNumbers:function(word,score){return word.match(/(.*[0-9].*[0-9].*[0-9])/)&&score},wordOneSpecialChar:function(word,score){return word.match(/.[!,@,#,$,%,\\^,&,*,?,_,~]/)&&score},wordTwoSpecialChar:function(word,score){return word.match(/(.*[!,@,#,$,%,\\^,&,*,?,_,~].*[!,@,#,$,%,\\^,&,*,?,_,~])/)&&score},wordUpperLowerCombo:function(word,score){return word.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/)&&score},wordLetterNumberCombo:function(word,score){return word.match(/([a-zA-Z])/)&&word.match(/([0-9])/)&&score},wordLetterNumberCharCombo:function(word,score){return word.match(/([a-zA-Z0-9].*[!,@,#,$,%,\\^,&,*,?,_,~])|([!,@,#,$,%,\\^,&,*,?,_,~].*[a-zA-Z0-9])/)&&score}},score=init();score=Math.round(score);var verdict=getVerdict(score);return{score:score,verdict:verdict}}$scope.$watch(\"indicatorValue\",function(val){val||(val=\"\"),$scope.strength=calculateScore(val),$scope.strengthClass=\"strength-\"+$scope.strength.verdict.progress})},link:function(scope,element,attrs){}}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"rcSubmit\",[\"$parse\",\"$q\",\"$timeout\",function($parse,$q,$timeout){return{restrict:\"A\",require:[\"rcSubmit\",\"?form\",\"?crForm\"],controller:[\"$scope\",function($scope){var formElement=null,formController=null,attemptHandlers=[],submitCompleteHandlers=[];this.attempted=!1,this.submitInProgress=!1,this.setFormElement=function(element){formElement=element},this.submit=function(){formElement&&jQuery(formElement).submit()},this.onAttempt=function(handler){attemptHandlers.push(handler)},this.setAttempted=function(){this.attempted=!0,angular.forEach(attemptHandlers,function(handler){handler()})},this.setFormController=function(controller){formController=controller},this.needsAttention=function(fieldModelController){return!!formController&&(fieldModelController?fieldModelController.$invalid&&(fieldModelController.$dirty||this.attempted):formController&&formController.$invalid&&(formController.$dirty||this.attempted))},this.onSubmitComplete=function(handler){submitCompleteHandlers.push(handler)},this.setSubmitComplete=function(success,data){angular.forEach(submitCompleteHandlers,function(handler){handler({success:success,data:data})})}}],compile:function(cElement,cAttributes,transclude){return{pre:function(scope,formElement,attributes,controllers){var submitController=controllers[0],formController=controllers.length>1?controllers[1]:null,crFormController=controllers.length>2?controllers[2]:null;submitController.setFormElement(formElement),submitController.setFormController(formController),scope.rc=scope.rc||{},scope.rc[attributes.name]=submitController,null!=crFormController&&crFormController.setSubmitHandler(submitController)},post:function(scope,formElement,attributes,controllers){var submitController=controllers[0],formController=controllers.length>1?controllers[1]:null,fn=$parse(attributes.rcSubmit);formElement.bind(\"submit\",function(event){submitController.setAttempted();var firstInvalid=formElement.find(\".ng-invalid:visible\").first();if(null!=firstInvalid&&firstInvalid.length>0&&$(\"body,html\").animate({scrollTop:firstInvalid.offset().top-50},100).promise().then(function(){firstInvalid.focus()}),!formController.$valid)return!1;var doSubmit=function(){function success(result){submitController.submitInProgress=!1,$timeout(function(){submitController.setSubmitComplete(!0,result)})}function error(err){submitController.submitInProgress=!1,scope.$$phase||scope.$apply(),$timeout(function(){submitController.setSubmitComplete(!1,err)})}submitController.submitInProgress=!0,$q.when(fn(scope,{$event:event})).then(success,error)};scope.$$phase?(doSubmit(),scope.$$phase||scope.$apply()):scope.$apply(doSubmit)})}}}}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crTransField\",[\"$http\",\"$compile\",\"$templateCache\",\"$log\",\"crFormTemplate\",\"$interpolate\",function($http,$compile,$templateCache,$log,crFormTemplate,$interpolate){$log.getInstance(\"crTransField\");return{restrict:\"AE\",replace:!0,compile:function(tElem,tAttrs){return{pre:function(scope,iElem,iAttrs){scope.fieldName},post:function($scope,$element,$attr){var html='<cr-form-field options=\"field\" form-options=\"options\" form-result=\"result\" form-value=\"'+$attr.fieldName+'\" class=\"formly-field\" form-id=\"options.uniqueFormId\" parent-index=\"sectionIndex\" index=\"rowIndex\" ng-hide=\"field.hide\" ></cr-form-field>';$element.html(html),$compile($element.contents())($scope)}}}}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.directive(\"crUiSelect\",[\"$http\",\"$sce\",\"cfg\",function($http,$sce,cfg){return{scope:!1,controller:[\"$scope\",function($scope){$scope.trustAsHtml=function(value){return $sce.trustAsHtml(value)},$scope.$watch(\"optionValue\",function(val){var prop;if(console.log(val,\"<-- new option value\"),\"string\"==typeof val)for(var i=0;i<$scope.options.options.length;i++)$scope.options.options[i].Id==val&&($scope.optionValue=$scope.options.options[i]);if(val){if(val.Id&&($scope.value=val.Id||\"\"),val.Data&&$scope.formOptions&&$scope.formOptions.formCtrl)for(prop in val.Data){var formControl=$scope.formOptions.formCtrl[prop];formControl&&angular.isFunction(formControl.$setViewValue)&&angular.isFunction(formControl.$render)&&(formControl.$setViewValue(val.Data[prop]),formControl.$render())}}else $scope.value=\"\"})}]}}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){var INTEGER_REGEXP=/^\\-?\\d+$/;form.formModule.directive(\"integer\",function(){return{require:\"ngModel\",link:function(scope,elm,attrs,ctrl){ctrl.$parsers.unshift(function(viewValue){return INTEGER_REGEXP.test(viewValue)?(ctrl.$setValidity(\"integer\",!0),viewValue):void ctrl.$setValidity(\"integer\",!1)})}}})}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){form.formModule.config([\"crFormTemplateProvider\",function(crFormTemplateProvider){crFormTemplateProvider.setTemplateUrl(\"autocomplete\",\"modules/form/templates/cr-autocomplete.html\"),crFormTemplateProvider.setTemplateUrl(\"button\",\"modules/form/templates/cr-button.html\"),crFormTemplateProvider.setTemplateUrl(\"static\",\"modules/form/templates/cr-static.html\"),crFormTemplateProvider.setTemplateUrl(\"checkbox\",\"modules/form/templates/cr-checkbox.html\"),crFormTemplateProvider.setTemplateUrl(\"date\",\"modules/form/templates/cr-date.html\"),crFormTemplateProvider.setTemplateUrl(\"datepicker\",\"modules/form/templates/cr-datepicker.html\"),crFormTemplateProvider.setTemplateUrl(\"password\",\"modules/form/templates/cr-password.html\"),crFormTemplateProvider.setTemplateUrl(\"radio\",\"modules/form/templates/cr-radio.html\"),crFormTemplateProvider.setTemplateUrl(\"select\",\"modules/form/templates/cr-select.html\"),crFormTemplateProvider.setTemplateUrl(\"select2\",\"modules/form/templates/cr-select2.html\"),crFormTemplateProvider.setTemplateUrl(\"text\",\"modules/form/templates/cr-text.html\"),crFormTemplateProvider.setTemplateUrl(\"textarea\",\"modules/form/templates/cr-textarea.html\"),crFormTemplateProvider.setTemplateUrl(\"translation\",\"modules/form/templates/cr-translation.html\")}])}(form=cr.form||(cr.form={}))}(cr||(cr={}));var cr;!function(cr){var form;!function(form){}(form=cr.form||(cr.form={}))}(cr||(cr={})),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-autocomplete.html\",'<div class=\"form-group nomargin\" cr-auto-complete-field=\"\" cr-options=\"\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\" for=\"{{ id }}\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"options.disabled || formOptions.disabled\"><input type=\"text\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" ng-model=\"optionValue\" typeahead=\"opt as opt.Text for opt in options.options | filter:$viewValue\" class=\"form-control\" typeahead-input-formatter=\"$model.Id\" typeahead-custom-options=\"options.options\"> <span class=\"form-control-feedback popover-trigger\" popover=\"{{ options.info }}\" popover-append-to-body=\"true\" popover-trigger=\"mouseenter\" ng-if=\"options.info\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context }}</span></div><div ng-show=\"options.disabled || formOptions.disabled\"><p class=\"form-control-static\">{{ value }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-button.html\",'<div class=\"form-group\"><label class=\"control-label\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> &nbsp;</label> <a ng-disabled=\"options.disabled || formOptions.disabled\" class=\"btn btn-default btn-block\" ng-click=\"clickHandler()\">{{ options.label || \\'Text\\' | tc:formOptions.context }}</a></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-checkbox.html\",'<div class=\"form-group nomargin\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"options.disabled || formOptions.disabled\"><div ng-repeat=\"option in options.options track by $index\" ng-class=\"{true: \\'checkbox-inline\\', false: \\'checkbox\\'}[options.options.length > 1]\"><label for=\"{{ id + \\'_\\' + $index }}\"><input type=\"checkbox\" id=\"{{ id + \\'_\\' + $index }}\" ng-value=\"option.value\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" ng-model=\"$parent.value\"> {{ option.name | tc :formOptions.context }}</label></div><span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context }}</span></div><div ng-show=\"options.disabled || formOptions.disabled\"><p class=\"form-control-static\">{{ value }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-date.html\",'<div class=\"form-group has-feedback nomargin\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\" for=\"{{ id }}\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.validation.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"( options.disabled || formOptions.disabled ) && options.disabled !== false\"><input type=\"text\" id=\"{{ id }}\" class=\"form-control\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" input-mask=\"{\\'alias\\': \\'dd/mm/yyyy\\',\\'placeholder\\':\\'__/__/____\\'}\" valid-date=\"\" ng-attr-placeholder=\"{{ options.placeholder }}\" autocomplete=\"off\" ng-disabled=\"( options.disabled || formOptions.disabled ) && options.disabled !== false\" ng-model=\"value\" ng-model-options=\"{ debounce: 250 }\" ng-focus=\"\"> <span class=\"form-control-feedback popover-trigger\" popover=\"{{ options.info|tc:formOptions.context:options }}\" popover-append-to-body=\"true\" popover-trigger=\"mouseenter\" ng-if=\"options.info\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\"( options.disabled || formOptions.disabled ) && options.disabled !== false\"><p class=\"form-control-static\">{{ value || \\'-\\' }}</p></div></div>');\n}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-datepicker.html\",'<div class=\"form-group has-feedback nomargin\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\" for=\"{{ id }}\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.validation.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"options.disabled || formOptions.disabled\"><input type=\"text\" id=\"{{ id }}\" class=\"form-control\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" input-mask=\"{\\'alias\\': \\'dd/mm/yyyy\\',\\'placeholder\\':\\'__/__/____\\'}\" valid-date=\"\" ng-attr-placeholder=\"{{ options.placeholder }}\" autocomplete=\"off\" ng-disabled=\"options.disabled || formOptions.disabled\" ng-model=\"value\" ng-model-options=\"{ debounce: 250 }\" ng-focus=\"\"> <span class=\"form-control-feedback popover-trigger\" popover=\"{{ options.info|tc:formOptions.context:options }}\" popover-append-to-body=\"true\" popover-trigger=\"mouseenter\" ng-if=\"options.info\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\"options.disabled || formOptions.disabled\"><p class=\"form-control-static\">{{ value || \\'-\\' | localTime }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-form.html\",'<form role=\"form\" novalidate=\"novalidate\" autocomplete=\"off\"><cr-form-section ng-repeat=\"section in definition\" formonparentscope=\"formOnParentScope\" options=\"options\" sectionindex=\"$index\" form-result=\"result\" section=\"section\"></cr-form-section><button type=\"submit\" class=\"btn btn-primary\" ng-hide=\"options.hideSubmit\">{{ options.submitCopy || \"Submit\" }}</button><div ng-transclude=\"\"></div></form>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-password.html\",'<div class=\"form-group has-feedback nomargin\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\" for=\"{{ id }}\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.validation.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"options.disabled || formOptions.disabled\"><input type=\"password\" id=\"{{ id }}\" class=\"form-control\" autocomplete=\"off\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" ng-attr-placeholder=\"{{ options.placeholder }}\" ng-disabled=\"options.disabled\" ng-model=\"value\" ng-model-options=\"{ debounce: 250 }\" ng-focus=\"\"><div ng-if=\"options.strengthIndicator == true\" cr-strength-indicator=\"\" indicator-value=\"value\"></div><span class=\"form-control-feedback popover-trigger\" popover=\"{{ options.info | tc:formOptions.context:options }}\" popover-append-to-body=\"true\" popover-trigger=\"mouseenter\" ng-if=\"options.info\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\"options.disabled || formOptions.disabled\"><p class=\"form-control-static\">{{ \\'-\\' || value }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-previous-next.html\",'<div class=\"row\"><div class=\"col-xs-6\"><button ng-show=\"showPrevious\" class=\"btn btn-info\" ng-click=\"previous()\"><i class=\"fa fa-fw fa-chevron-left\"></i> {{\"PREVIOUS\" | translate:context}}</button></div><div class=\"col-xs-6\"><div class=\"pull-right\"><button class=\"btn btn-primary\" type=\"submit\">{{\"NEXT\" | translate:context}} <i class=\"fa fa-fw fa-chevron-right\"></i></button></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-radio.html\",'<div class=\"form-group nomargin\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"options.disabled || formOptions.disabled\"><div ng-repeat=\"option in options.options track by $index\" ng-class=\"{true: \\'radio-inline\\', false: \\'radio\\'}[options.options.length > 1]\"><label for=\"{{ id + \\'_\\' + $index }}\"><input type=\"radio\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" id=\"{{ id + \\'_\\' + $index }}\" ng-value=\"option.Id\" ng-model=\"$parent.value\"> {{ option.Text | tc:formOptions.context }}</label></div><span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context }}</span></div><div ng-show=\"options.disabled || formOptions.disabled\"><p class=\"form-control-static\">{{ value }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-section.html\",'<fieldset id=\"form-{{ section.key + \\'-\\' + $index }}\" cr-spy=\"\" cr-spy-name=\"{{ section.scrollSpy && section.scrollSpy === true ? section.label : \\'\\' | tc:options.context }}\"><div class=\"row\" ng-if=\"section.label != null\"><div class=\"col-sm-12\"><h3>{{ section.label | tc:options.context }}</h3><p>{{ section.labelHelp | tc:options.context }}</p></div></div><div class=\"row\" ng-repeat=\"row in section.rows\" ng-init=\"rowIndex = $index\"><div ng-repeat=\"field in row\" class=\"col-sm-{{ field.cols || options.cols }}\" data-ng-hide=\"field.hide\"><cr-trans-field options=\"field\" form-options=\"options\" form-result=\"result\" field-name=\"result.{{field.key}}\" xform-value=\"result[field.key||$index]\" class=\"formly-field\" form-id=\"options.uniqueFormId\" parent-index=\"sectionIndex\" index=\"rowIndex\" ng-hide=\"field.hide\"></cr-trans-field></div></div></fieldset>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-select-bug.html\",'<div class=\"form-group nomargin\" cr-select-field=\"\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\" for=\"{{ id }}\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"options.disabled || formOptions.disabled\"><select id=\"{{ id }}\" class=\"form-control nya-selectpicker\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" ng-disabled=\"options.disabled\" ng-model=\"value\" ng-options=\"option.name | tc:formOptions.context for option in options.options track by option.value\"></select><span class=\"form-control-feedback popover-trigger\" popover=\"{{ options.info | tc:formOptions.context }}\" popover-append-to-body=\"true\" popover-trigger=\"mouseenter\" ng-if=\"options.info\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context }}</span></div><div ng-show=\"options.disabled || formOptions.disabled\"><p class=\"form-control-static\">{{ value }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-select.html\",'<div class=\"form-group nomargin\" cr-select-field=\"\" cr-options=\"\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\" for=\"{{ id }}\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"options.disabled || formOptions.disabled\"><select id=\"{{ id }}\" class=\"form-control nya-selectpicker\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" ng-disabled=\"options.disabled\" ng-model=\"optionValue\" ng-options=\"option.Text | tc:formOptions.context for option in options.options track by option.Id\"></select><span class=\"form-control-feedback popover-trigger\" popover=\"{{ options.info | tc:formOptions.context }}\" popover-append-to-body=\"true\" popover-trigger=\"mouseenter\" ng-if=\"options.info\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context }}</span></div><div ng-show=\"options.disabled || formOptions.disabled\"><p class=\"form-control-static\">{{ value }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-select2.html\",'<div class=\"form-group nomargin\" cr-select-field=\"\" cr-options=\"\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\" for=\"{{ id }}\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.validation.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"options.disabled || formOptions.disabled\"><ui-select ng-model=\"$parent.optionValue\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" class=\"form-control\" ng-disabled=\"options.disabled\"><ui-select-match placeholder=\"...\">{{ $parent.optionValue.Text }}</ui-select-match><ui-select-choices repeat=\"opt in options.options | filter: { Text: $select.search }\" refresh=\"updateOptions( $select.search )\" refresh-delay=\"100\"><div ng-bind-html=\"trustAsHtml((opt.Text | highlight: $select.search))\"></div></ui-select-choices></ui-select><span class=\"form-control-feedback popover-trigger\" popover=\"{{ options.info }}\" popover-append-to-body=\"true\" popover-trigger=\"mouseenter\" ng-if=\"options.info\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\"options.disabled || formOptions.disabled\"><p class=\"form-control-static\">{{ value }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-static.html\",'<div class=\"form-group\"><label class=\"control-label\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }}</label><p class=\"form-control-static\" ng-bind=\"staticBinding\"></p></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-strength-indicator.html\",'<div><style>\\n        .strength {\\n            position: relative;\\n            top: -3px;\\n            z-index: 2;\\n            border-bottom: 3px solid;\\n            transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\\n        }\\n\\n        .strength-20 {\\n            width: 5%;\\n            border-color: red;\\n        }\\n\\n        .strength-40 {\\n            width: 25%;\\n            border-color: orangered;\\n        }\\n\\n        .strength-60 {\\n            border-color: orange;\\n            width: 50%;\\n        }\\n\\n        .strength-80 {\\n            border-color: greenyellow;\\n            width: 75%;\\n        }\\n\\n        .strength-100 {\\n            border-color: green;\\n            width: 100%;\\n        }\\n    </style><div ng-class=\"strengthClass\" class=\"strength\"></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-text.html\",'<div class=\"form-group nomargin\" ng-class=\"{\\'has-feedback\\': options.info, \\'has-error\\': (options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine) }\"><label class=\"control-label\" for=\"{{ id }}\" data-ng-if=\"options.label !== \\'\\'\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.validation.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"( options.disabled || formOptions.disabled ) && options.disabled !== false\"><input type=\"text\" id=\"{{ id }}\" name=\"field\" cr-form-name=\"options.key\" ng-focus=\"\" round-number-input=\"options.roundNumber\" cr-form-field-validator=\"options.validation\" class=\"form-control\" ng-attr-placeholder=\"{{ options.placeholder | tc:formOtions.context }}\" autocomplete=\"off\" ng-disabled=\"options.disabled\" ng-model=\"value\" ng-model-options=\"{ debounce: 500 }\"> <span class=\"form-control-feedback popover-trigger\" popover=\"{{ options.info | tc:formOptions.context:options }}\" popover-append-to-body=\"true\" popover-trigger=\"mouseenter\" ng-if=\"options.info\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\"( options.disabled || formOptions.disabled ) && options.disabled !== false\"><p class=\"form-control-static\" ng-if=\"!options.roundNumber\">{{ value }}</p><p class=\"form-control-static\" ng-if=\"options.roundNumber\">{{ value | number : options.roundNumber }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-textarea.html\",'<div class=\"form-group has-feedback nomargin\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\" for=\"{{ id }}\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"( options.disabled || formOptions.disabled ) && options.disabled !== false\"><textarea rows=\"{{options.rows}}\" id=\"{{ id }}\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" class=\"form-control\" ng-attr-placeholder=\"{{ options.placeholder |tc:formOptions.context }}\" autocomplete=\"off\" ng-disabled=\"options.disabled\" ng-model=\"value\" ng-model-options=\"{ debounce: 250 }\" ng-focus=\"\"></textarea> <span class=\"form-control-feedback popover-trigger\" popover=\"{{ options.info }}\" popover-append-to-body=\"true\" popover-trigger=\"mouseenter\" ng-if=\"options.info\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context }}</span> <span class=\"help-block error\" ng-show=\"(!options.formField.$error.minlength || !options.formField.$error.maxlength) && options.formField.$error.required && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)\">{{ \\'REQUIRED\\' | translate:formOptions.context }}</span> <span class=\"help-block error\" ng-show=\"options.formField.$error.minlength && !options.formField.$error.required && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)\">{{ \\'MINLENGTH\\' | translate:formOptions.context:options }}</span> <span class=\"help-block error\" ng-show=\"options.formField.$error.maxlength && !options.formField.$error.required && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)\">{{ \\'MAXLENGTH\\' | translate:formOptions.context:options }}</span></div><div ng-show=\"( options.disabled || formOptions.disabled ) && options.disabled !== false\"><p class=\"form-control-static\">{{ value }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/templates/cr-translation.html\",'<div class=\"form-group has-feedback nomargin\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\" for=\"{{ id }}\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.validation.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"options.disabled || formOptions.disabled\"><cr-translation-input id=\"{{ id }}\" mode=\"Automatic\" context=\"{{formOptions.context}}\" model=\"value\"></cr-translation-input><span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\"options.disabled || formOptions.disabled\"><p class=\"form-control-static\">{{ value }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.form\")}catch(err){module=angular.module(\"cr.form\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/form/views/formpopup.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss({action:\\'close\\'})\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"text-center\">{{popupData.title|tc:null:popupData }}</h4></div><div class=\"modal-body\"><div class=\"row error\" ng-if=\"error\"><div class=\"col-sm-12\"><p>{{error}}</p></div></div><div class=\"row\"><div class=\"col-sm-12\"><cr-form cr-focus=\"\" name=\"popupForm\" result=\"formData\" definition=\"formDefinition.data\" options=\"formOptions\" rc-submit=\"submitForm()\"></cr-form></div></div><div class=\"modal-footer\"><button ng-repeat=\"button in popupData.buttons\" class=\"btn\" ng-disabled=\"!popupForm.$valid && button.default\" ng-click=\"handleButtons({action:button.name})\" ng-class=\"button.default?\\'btn-primary\\':\\'\\'\">{{button.name|translate:null:popupData}}</button></div></div>')}])}();\n//# sourceMappingURL=form.js.map","(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-autocomplete.html\",\n    \"<div class=\\\"form-group nomargin\\\" cr-auto-complete-field=\\\"\\\" cr-options=\\\"\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\" for=\\\"{{ id }}\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"options.disabled || formOptions.disabled\\\"><input type=\\\"text\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" ng-model=\\\"optionValue\\\" typeahead=\\\"opt as opt.Text for opt in options.options | filter:$viewValue\\\" class=\\\"form-control\\\" typeahead-input-formatter=\\\"$model.Id\\\" typeahead-custom-options=\\\"options.options\\\"> <span class=\\\"form-control-feedback popover-trigger\\\" popover=\\\"{{ options.info }}\\\" popover-append-to-body=\\\"true\\\" popover-trigger=\\\"mouseenter\\\" ng-if=\\\"options.info\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context }}</span></div><div ng-show=\\\"options.disabled || formOptions.disabled\\\"><p class=\\\"form-control-static\\\">{{ value }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-button.html\",\n    \"<div class=\\\"form-group\\\"><label class=\\\"control-label\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> &nbsp;</label> <a ng-disabled=\\\"options.disabled || formOptions.disabled\\\" class=\\\"btn btn-default btn-block\\\" ng-click=\\\"clickHandler()\\\">{{ options.label || 'Text' | tc:formOptions.context }}</a></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-checkbox.html\",\n    \"<div class=\\\"form-group nomargin\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"options.disabled || formOptions.disabled\\\"><div ng-repeat=\\\"option in options.options track by $index\\\" ng-class=\\\"{true: 'checkbox-inline', false: 'checkbox'}[options.options.length > 1]\\\"><label for=\\\"{{ id + '_' + $index }}\\\"><input type=\\\"checkbox\\\" id=\\\"{{ id + '_' + $index }}\\\" ng-value=\\\"option.value\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" ng-model=\\\"$parent.value\\\"> {{ option.name | tc :formOptions.context }}</label></div><span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context }}</span></div><div ng-show=\\\"options.disabled || formOptions.disabled\\\"><p class=\\\"form-control-static\\\">{{ value }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-date.html\",\n    \"<div class=\\\"form-group has-feedback nomargin\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\" for=\\\"{{ id }}\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.validation.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"( options.disabled || formOptions.disabled ) && options.disabled !== false\\\"><input type=\\\"text\\\" id=\\\"{{ id }}\\\" class=\\\"form-control\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" input-mask=\\\"{'alias': 'dd/mm/yyyy','placeholder':'__/__/____'}\\\" valid-date=\\\"\\\" ng-attr-placeholder=\\\"{{ options.placeholder }}\\\" autocomplete=\\\"off\\\" ng-disabled=\\\"( options.disabled || formOptions.disabled ) && options.disabled !== false\\\" ng-model=\\\"value\\\" ng-model-options=\\\"{ debounce: 250 }\\\" ng-focus=\\\"\\\"> <span class=\\\"form-control-feedback popover-trigger\\\" popover=\\\"{{ options.info|tc:formOptions.context:options }}\\\" popover-append-to-body=\\\"true\\\" popover-trigger=\\\"mouseenter\\\" ng-if=\\\"options.info\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\\\"( options.disabled || formOptions.disabled ) && options.disabled !== false\\\"><p class=\\\"form-control-static\\\">{{ value || '-' }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-datepicker.html\",\n    \"<div class=\\\"form-group has-feedback nomargin\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\" for=\\\"{{ id }}\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.validation.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"options.disabled || formOptions.disabled\\\"><input type=\\\"text\\\" id=\\\"{{ id }}\\\" class=\\\"form-control\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" input-mask=\\\"{'alias': 'dd/mm/yyyy','placeholder':'__/__/____'}\\\" valid-date=\\\"\\\" ng-attr-placeholder=\\\"{{ options.placeholder }}\\\" autocomplete=\\\"off\\\" ng-disabled=\\\"options.disabled || formOptions.disabled\\\" ng-model=\\\"value\\\" ng-model-options=\\\"{ debounce: 250 }\\\" ng-focus=\\\"\\\"> <span class=\\\"form-control-feedback popover-trigger\\\" popover=\\\"{{ options.info|tc:formOptions.context:options }}\\\" popover-append-to-body=\\\"true\\\" popover-trigger=\\\"mouseenter\\\" ng-if=\\\"options.info\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\\\"options.disabled || formOptions.disabled\\\"><p class=\\\"form-control-static\\\">{{ value || '-' | localTime }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-form.html\",\n    \"<form role=\\\"form\\\" novalidate=\\\"novalidate\\\" autocomplete=\\\"off\\\"><cr-form-section ng-repeat=\\\"section in definition\\\" formonparentscope=\\\"formOnParentScope\\\" options=\\\"options\\\" sectionindex=\\\"$index\\\" form-result=\\\"result\\\" section=\\\"section\\\"></cr-form-section><button type=\\\"submit\\\" class=\\\"btn btn-primary\\\" ng-hide=\\\"options.hideSubmit\\\">{{ options.submitCopy || \\\"Submit\\\" }}</button><div ng-transclude=\\\"\\\"></div></form>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-password.html\",\n    \"<div class=\\\"form-group has-feedback nomargin\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\" for=\\\"{{ id }}\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.validation.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"options.disabled || formOptions.disabled\\\"><input type=\\\"password\\\" id=\\\"{{ id }}\\\" class=\\\"form-control\\\" autocomplete=\\\"off\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" ng-attr-placeholder=\\\"{{ options.placeholder }}\\\" ng-disabled=\\\"options.disabled\\\" ng-model=\\\"value\\\" ng-model-options=\\\"{ debounce: 250 }\\\" ng-focus=\\\"\\\"><div ng-if=\\\"options.strengthIndicator == true\\\" cr-strength-indicator=\\\"\\\" indicator-value=\\\"value\\\"></div><span class=\\\"form-control-feedback popover-trigger\\\" popover=\\\"{{ options.info | tc:formOptions.context:options }}\\\" popover-append-to-body=\\\"true\\\" popover-trigger=\\\"mouseenter\\\" ng-if=\\\"options.info\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\\\"options.disabled || formOptions.disabled\\\"><p class=\\\"form-control-static\\\">{{ '-' || value }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-previous-next.html\",\n    \"<div class=\\\"row\\\"><div class=\\\"col-xs-6\\\"><button ng-show=\\\"showPrevious\\\" class=\\\"btn btn-info\\\" ng-click=\\\"previous()\\\"><i class=\\\"fa fa-fw fa-chevron-left\\\"></i> {{\\\"PREVIOUS\\\" | translate:context}}</button></div><div class=\\\"col-xs-6\\\"><div class=\\\"pull-right\\\"><button class=\\\"btn btn-primary\\\" type=\\\"submit\\\">{{\\\"NEXT\\\" | translate:context}} <i class=\\\"fa fa-fw fa-chevron-right\\\"></i></button></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-radio.html\",\n    \"<div class=\\\"form-group nomargin\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"options.disabled || formOptions.disabled\\\"><div ng-repeat=\\\"option in options.options track by $index\\\" ng-class=\\\"{true: 'radio-inline', false: 'radio'}[options.options.length > 1]\\\"><label for=\\\"{{ id + '_' + $index }}\\\"><input type=\\\"radio\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" id=\\\"{{ id + '_' + $index }}\\\" ng-value=\\\"option.Id\\\" ng-model=\\\"$parent.value\\\"> {{ option.Text | tc:formOptions.context }}</label></div><span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context }}</span></div><div ng-show=\\\"options.disabled || formOptions.disabled\\\"><p class=\\\"form-control-static\\\">{{ value }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-section.html\",\n    \"<fieldset id=\\\"form-{{ section.key + '-' + $index }}\\\" cr-spy=\\\"\\\" cr-spy-name=\\\"{{ section.scrollSpy && section.scrollSpy === true ? section.label : '' | tc:options.context }}\\\"><div class=\\\"row\\\" ng-if=\\\"section.label != null\\\"><div class=\\\"col-sm-12\\\"><h3>{{ section.label | tc:options.context }}</h3><p>{{ section.labelHelp | tc:options.context }}</p></div></div><div class=\\\"row\\\" ng-repeat=\\\"row in section.rows\\\" ng-init=\\\"rowIndex = $index\\\"><div ng-repeat=\\\"field in row\\\" class=\\\"col-sm-{{ field.cols || options.cols }}\\\" data-ng-hide=\\\"field.hide\\\"><cr-trans-field options=\\\"field\\\" form-options=\\\"options\\\" form-result=\\\"result\\\" field-name=\\\"result.{{field.key}}\\\" xform-value=\\\"result[field.key||$index]\\\" class=\\\"formly-field\\\" form-id=\\\"options.uniqueFormId\\\" parent-index=\\\"sectionIndex\\\" index=\\\"rowIndex\\\" ng-hide=\\\"field.hide\\\"></cr-trans-field></div></div></fieldset>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-select-bug.html\",\n    \"<div class=\\\"form-group nomargin\\\" cr-select-field=\\\"\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\" for=\\\"{{ id }}\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"options.disabled || formOptions.disabled\\\"><select id=\\\"{{ id }}\\\" class=\\\"form-control nya-selectpicker\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" ng-disabled=\\\"options.disabled\\\" ng-model=\\\"value\\\" ng-options=\\\"option.name | tc:formOptions.context for option in options.options track by option.value\\\"></select><span class=\\\"form-control-feedback popover-trigger\\\" popover=\\\"{{ options.info | tc:formOptions.context }}\\\" popover-append-to-body=\\\"true\\\" popover-trigger=\\\"mouseenter\\\" ng-if=\\\"options.info\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context }}</span></div><div ng-show=\\\"options.disabled || formOptions.disabled\\\"><p class=\\\"form-control-static\\\">{{ value }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-select.html\",\n    \"<div class=\\\"form-group nomargin\\\" cr-select-field=\\\"\\\" cr-options=\\\"\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\" for=\\\"{{ id }}\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"options.disabled || formOptions.disabled\\\"><select id=\\\"{{ id }}\\\" class=\\\"form-control nya-selectpicker\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" ng-disabled=\\\"options.disabled\\\" ng-model=\\\"optionValue\\\" ng-options=\\\"option.Text | tc:formOptions.context for option in options.options track by option.Id\\\"></select><span class=\\\"form-control-feedback popover-trigger\\\" popover=\\\"{{ options.info | tc:formOptions.context }}\\\" popover-append-to-body=\\\"true\\\" popover-trigger=\\\"mouseenter\\\" ng-if=\\\"options.info\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context }}</span></div><div ng-show=\\\"options.disabled || formOptions.disabled\\\"><p class=\\\"form-control-static\\\">{{ value }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-select2.html\",\n    \"<div class=\\\"form-group nomargin\\\" cr-select-field=\\\"\\\" cr-options=\\\"\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\" for=\\\"{{ id }}\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.validation.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"options.disabled || formOptions.disabled\\\"><ui-select ng-model=\\\"$parent.optionValue\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" class=\\\"form-control\\\" ng-disabled=\\\"options.disabled\\\"><ui-select-match placeholder=\\\"...\\\">{{ $parent.optionValue.Text }}</ui-select-match><ui-select-choices repeat=\\\"opt in options.options | filter: { Text: $select.search }\\\" refresh=\\\"updateOptions( $select.search )\\\" refresh-delay=\\\"100\\\"><div ng-bind-html=\\\"trustAsHtml((opt.Text | highlight: $select.search))\\\"></div></ui-select-choices></ui-select><span class=\\\"form-control-feedback popover-trigger\\\" popover=\\\"{{ options.info }}\\\" popover-append-to-body=\\\"true\\\" popover-trigger=\\\"mouseenter\\\" ng-if=\\\"options.info\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\\\"options.disabled || formOptions.disabled\\\"><p class=\\\"form-control-static\\\">{{ value }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-static.html\",\n    \"<div class=\\\"form-group\\\"><label class=\\\"control-label\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }}</label><p class=\\\"form-control-static\\\" ng-bind=\\\"staticBinding\\\"></p></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-strength-indicator.html\",\n    \"<div><style>\\n\" +\n    \"        .strength {\\n\" +\n    \"            position: relative;\\n\" +\n    \"            top: -3px;\\n\" +\n    \"            z-index: 2;\\n\" +\n    \"            border-bottom: 3px solid;\\n\" +\n    \"            transition: all cubic-bezier(0.250, 0.460, 0.450, 0.940) 0.5s;\\n\" +\n    \"        }\\n\" +\n    \"\\n\" +\n    \"        .strength-20 {\\n\" +\n    \"            width: 5%;\\n\" +\n    \"            border-color: red;\\n\" +\n    \"        }\\n\" +\n    \"\\n\" +\n    \"        .strength-40 {\\n\" +\n    \"            width: 25%;\\n\" +\n    \"            border-color: orangered;\\n\" +\n    \"        }\\n\" +\n    \"\\n\" +\n    \"        .strength-60 {\\n\" +\n    \"            border-color: orange;\\n\" +\n    \"            width: 50%;\\n\" +\n    \"        }\\n\" +\n    \"\\n\" +\n    \"        .strength-80 {\\n\" +\n    \"            border-color: greenyellow;\\n\" +\n    \"            width: 75%;\\n\" +\n    \"        }\\n\" +\n    \"\\n\" +\n    \"        .strength-100 {\\n\" +\n    \"            border-color: green;\\n\" +\n    \"            width: 100%;\\n\" +\n    \"        }\\n\" +\n    \"    </style><div ng-class=\\\"strengthClass\\\" class=\\\"strength\\\"></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-text.html\",\n    \"<div class=\\\"form-group nomargin\\\" ng-class=\\\"{'has-feedback': options.info, 'has-error': (options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine) }\\\"><label class=\\\"control-label\\\" for=\\\"{{ id }}\\\" data-ng-if=\\\"options.label !== ''\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.validation.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"( options.disabled || formOptions.disabled ) && options.disabled !== false\\\"><input type=\\\"text\\\" id=\\\"{{ id }}\\\" name=\\\"field\\\" cr-form-name=\\\"options.key\\\" ng-focus=\\\"\\\" round-number-input=\\\"options.roundNumber\\\" cr-form-field-validator=\\\"options.validation\\\" class=\\\"form-control\\\" ng-attr-placeholder=\\\"{{ options.placeholder | tc:formOtions.context }}\\\" autocomplete=\\\"off\\\" ng-disabled=\\\"options.disabled\\\" ng-model=\\\"value\\\" ng-model-options=\\\"{ debounce: 500 }\\\"> <span class=\\\"form-control-feedback popover-trigger\\\" popover=\\\"{{ options.info | tc:formOptions.context:options }}\\\" popover-append-to-body=\\\"true\\\" popover-trigger=\\\"mouseenter\\\" ng-if=\\\"options.info\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\\\"( options.disabled || formOptions.disabled ) && options.disabled !== false\\\"><p class=\\\"form-control-static\\\" ng-if=\\\"!options.roundNumber\\\">{{ value }}</p><p class=\\\"form-control-static\\\" ng-if=\\\"options.roundNumber\\\">{{ value | number : options.roundNumber }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-textarea.html\",\n    \"<div class=\\\"form-group has-feedback nomargin\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\" for=\\\"{{ id }}\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"( options.disabled || formOptions.disabled ) && options.disabled !== false\\\"><textarea rows=\\\"{{options.rows}}\\\" id=\\\"{{ id }}\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" class=\\\"form-control\\\" ng-attr-placeholder=\\\"{{ options.placeholder |tc:formOptions.context }}\\\" autocomplete=\\\"off\\\" ng-disabled=\\\"options.disabled\\\" ng-model=\\\"value\\\" ng-model-options=\\\"{ debounce: 250 }\\\" ng-focus=\\\"\\\"></textarea> <span class=\\\"form-control-feedback popover-trigger\\\" popover=\\\"{{ options.info }}\\\" popover-append-to-body=\\\"true\\\" popover-trigger=\\\"mouseenter\\\" ng-if=\\\"options.info\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context }}</span> <span class=\\\"help-block error\\\" ng-show=\\\"(!options.formField.$error.minlength || !options.formField.$error.maxlength) && options.formField.$error.required && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)\\\">{{ 'REQUIRED' | translate:formOptions.context }}</span> <span class=\\\"help-block error\\\" ng-show=\\\"options.formField.$error.minlength && !options.formField.$error.required && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)\\\">{{ 'MINLENGTH' | translate:formOptions.context:options }}</span> <span class=\\\"help-block error\\\" ng-show=\\\"options.formField.$error.maxlength && !options.formField.$error.required && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)\\\">{{ 'MAXLENGTH' | translate:formOptions.context:options }}</span></div><div ng-show=\\\"( options.disabled || formOptions.disabled ) && options.disabled !== false\\\"><p class=\\\"form-control-static\\\">{{ value }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/templates/cr-translation.html\",\n    \"<div class=\\\"form-group has-feedback nomargin\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\" for=\\\"{{ id }}\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.validation.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"options.disabled || formOptions.disabled\\\"><cr-translation-input id=\\\"{{ id }}\\\" mode=\\\"Automatic\\\" context=\\\"{{formOptions.context}}\\\" model=\\\"value\\\"></cr-translation-input><span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\\\"options.disabled || formOptions.disabled\\\"><p class=\\\"form-control-static\\\">{{ value }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.form\"); }\ncatch(err) { module = angular.module(\"cr.form\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/form/views/formpopup.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss({action:'close'})\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"text-center\\\">{{popupData.title|tc:null:popupData }}</h4></div><div class=\\\"modal-body\\\"><div class=\\\"row error\\\" ng-if=\\\"error\\\"><div class=\\\"col-sm-12\\\"><p>{{error}}</p></div></div><div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><cr-form cr-focus=\\\"\\\" name=\\\"popupForm\\\" result=\\\"formData\\\" definition=\\\"formDefinition.data\\\" options=\\\"formOptions\\\" rc-submit=\\\"submitForm()\\\"></cr-form></div></div><div class=\\\"modal-footer\\\"><button ng-repeat=\\\"button in popupData.buttons\\\" class=\\\"btn\\\" ng-disabled=\\\"!popupForm.$valid && button.default\\\" ng-click=\\\"handleButtons({action:button.name})\\\" ng-class=\\\"button.default?'btn-primary':''\\\">{{button.name|translate:null:popupData}}</button></div></div>\");\n}]);\n})();\n","!function(con){\"use strict\";for(var prop,method,empty={},dummy=function(){},properties=\"memory\".split(\",\"),methods=\"assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn\".split(\",\");prop=properties.pop();)con[prop]=con[prop]||empty;for(;method=methods.pop();)con[method]=con[method]||dummy}(this.console=this.console||{}),+function($){\"use strict\";var Tooltip=function(element,options){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init(\"tooltip\",element,options)};Tooltip.DEFAULTS={animation:!0,placement:\"top\",selector:!1,template:'<div class=\"tooltip\"><div class=\"tooltip-arrow\"></div><div class=\"tooltip-inner\"></div></div>',trigger:\"hover focus\",title:\"\",delay:0,html:!1,container:!1},Tooltip.prototype.init=function(type,element,options){this.enabled=!0,this.type=type,this.$element=$(element),this.options=this.getOptions(options);for(var triggers=this.options.trigger.split(\" \"),i=triggers.length;i--;){var trigger=triggers[i];if(\"click\"==trigger)this.$element.on(\"click.\"+this.type,this.options.selector,$.proxy(this.toggle,this));else if(\"manual\"!=trigger){var eventIn=\"hover\"==trigger?\"mouseenter\":\"focusin\",eventOut=\"hover\"==trigger?\"mouseleave\":\"focusout\";this.$element.on(eventIn+\".\"+this.type,this.options.selector,$.proxy(this.enter,this)),this.$element.on(eventOut+\".\"+this.type,this.options.selector,$.proxy(this.leave,this))}}this.options.selector?this._options=$.extend({},this.options,{trigger:\"manual\",selector:\"\"}):this.fixTitle()},Tooltip.prototype.getDefaults=function(){return Tooltip.DEFAULTS},Tooltip.prototype.getOptions=function(options){return options=$.extend({},this.getDefaults(),this.$element.data(),options),options.delay&&\"number\"==typeof options.delay&&(options.delay={show:options.delay,hide:options.delay}),options},Tooltip.prototype.getDelegateOptions=function(){var options={},defaults=this.getDefaults();return this._options&&$.each(this._options,function(key,value){defaults[key]!=value&&(options[key]=value)}),options},Tooltip.prototype.enter=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget)[this.type](this.getDelegateOptions()).data(\"bs.\"+this.type);return clearTimeout(self.timeout),self.hoverState=\"in\",self.options.delay&&self.options.delay.show?void(self.timeout=setTimeout(function(){\"in\"==self.hoverState&&self.show()},self.options.delay.show)):self.show()},Tooltip.prototype.leave=function(obj){var self=obj instanceof this.constructor?obj:$(obj.currentTarget)[this.type](this.getDelegateOptions()).data(\"bs.\"+this.type);return clearTimeout(self.timeout),self.hoverState=\"out\",self.options.delay&&self.options.delay.hide?void(self.timeout=setTimeout(function(){\"out\"==self.hoverState&&self.hide()},self.options.delay.hide)):self.hide()},Tooltip.prototype.show=function(){var e=$.Event(\"show.bs.\"+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(e),e.isDefaultPrevented())return;var that=this,$tip=this.tip();this.setContent(),this.options.animation&&$tip.addClass(\"fade\");var placement=\"function\"==typeof this.options.placement?this.options.placement.call(this,$tip[0],this.$element[0]):this.options.placement,autoToken=/\\s?auto?\\s?/i,autoPlace=autoToken.test(placement);autoPlace&&(placement=placement.replace(autoToken,\"\")||\"top\"),$tip.detach().css({top:0,left:0,display:\"block\"}).addClass(placement),this.options.container?$tip.appendTo(this.options.container):$tip.insertAfter(this.$element);var pos=this.getPosition(),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight;if(autoPlace){var $parent=this.$element.parent(),orgPlacement=placement,docScroll=document.documentElement.scrollTop||document.body.scrollTop,parentWidth=\"body\"==this.options.container?window.innerWidth:$parent.outerWidth(),parentHeight=\"body\"==this.options.container?window.innerHeight:$parent.outerHeight(),parentLeft=\"body\"==this.options.container?0:$parent.offset().left;placement=\"bottom\"==placement&&pos.top+pos.height+actualHeight-docScroll>parentHeight?\"top\":\"top\"==placement&&pos.top-docScroll-actualHeight<0?\"bottom\":\"right\"==placement&&pos.right+actualWidth>parentWidth?\"left\":\"left\"==placement&&pos.left-actualWidth<parentLeft?\"right\":placement,$tip.removeClass(orgPlacement).addClass(placement)}var calculatedOffset=this.getCalculatedOffset(placement,pos,actualWidth,actualHeight);this.applyPlacement(calculatedOffset,placement),this.hoverState=null;var complete=function(){that.$element.trigger(\"shown.bs.\"+that.type)};$.support.transition&&this.$tip.hasClass(\"fade\")?$tip.one($.support.transition.end,complete).emulateTransitionEnd(150):complete()}},Tooltip.prototype.applyPlacement=function(offset,placement){var replace,$tip=this.tip(),width=$tip[0].offsetWidth,height=$tip[0].offsetHeight,marginTop=parseInt($tip.css(\"margin-top\"),10),marginLeft=parseInt($tip.css(\"margin-left\"),10);isNaN(marginTop)&&(marginTop=0),isNaN(marginLeft)&&(marginLeft=0),offset.top=offset.top+marginTop,offset.left=offset.left+marginLeft,$.offset.setOffset($tip[0],$.extend({using:function(props){$tip.css({top:Math.round(props.top),left:Math.round(props.left)})}},offset),0),$tip.addClass(\"in\");var actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight;if(\"top\"==placement&&actualHeight!=height&&(replace=!0,offset.top=offset.top+height-actualHeight),/bottom|top/.test(placement)){var delta=0;offset.left<0&&(delta=offset.left*-2,offset.left=0,$tip.offset(offset),actualWidth=$tip[0].offsetWidth,actualHeight=$tip[0].offsetHeight),this.replaceArrow(delta-width+actualWidth,actualWidth,\"left\")}else this.replaceArrow(actualHeight-height,actualHeight,\"top\");replace&&$tip.offset(offset)},Tooltip.prototype.replaceArrow=function(delta,dimension,position){this.arrow().css(position,delta?50*(1-delta/dimension)+\"%\":\"\")},Tooltip.prototype.setContent=function(){var $tip=this.tip(),title=this.getTitle();$tip.find(\".tooltip-inner\")[this.options.html?\"html\":\"text\"](title),$tip.removeClass(\"fade in top bottom left right\")},Tooltip.prototype.hide=function(){function complete(){\"in\"!=that.hoverState&&$tip.detach(),that.$element.trigger(\"hidden.bs.\"+that.type)}var that=this,$tip=this.tip(),e=$.Event(\"hide.bs.\"+this.type);if(this.$element.trigger(e),!e.isDefaultPrevented())return $tip.removeClass(\"in\"),$.support.transition&&this.$tip.hasClass(\"fade\")?$tip.one($.support.transition.end,complete).emulateTransitionEnd(150):complete(),this.hoverState=null,this},Tooltip.prototype.fixTitle=function(){var $e=this.$element;($e.attr(\"title\")||\"string\"!=typeof $e.attr(\"data-original-title\"))&&$e.attr(\"data-original-title\",$e.attr(\"title\")||\"\").attr(\"title\",\"\")},Tooltip.prototype.hasContent=function(){return this.getTitle()},Tooltip.prototype.getPosition=function(){var el=this.$element[0];return $.extend({},\"function\"==typeof el.getBoundingClientRect?el.getBoundingClientRect():{width:el.offsetWidth,height:el.offsetHeight},this.$element.offset())},Tooltip.prototype.getCalculatedOffset=function(placement,pos,actualWidth,actualHeight){return\"bottom\"==placement?{top:pos.top+pos.height,left:pos.left+pos.width/2-actualWidth/2}:\"top\"==placement?{top:pos.top-actualHeight,left:pos.left+pos.width/2-actualWidth/2}:\"left\"==placement?{top:pos.top+pos.height/2-actualHeight/2,left:pos.left-actualWidth}:{top:pos.top+pos.height/2-actualHeight/2,left:pos.left+pos.width}},Tooltip.prototype.getTitle=function(){var title,$e=this.$element,o=this.options;return title=$e.attr(\"data-original-title\")||(\"function\"==typeof o.title?o.title.call($e[0]):o.title)},Tooltip.prototype.tip=function(){return this.$tip=this.$tip||$(this.options.template)},Tooltip.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".tooltip-arrow\")},Tooltip.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},Tooltip.prototype.enable=function(){this.enabled=!0},Tooltip.prototype.disable=function(){this.enabled=!1},Tooltip.prototype.toggleEnabled=function(){this.enabled=!this.enabled},Tooltip.prototype.toggle=function(e){var self=e?$(e.currentTarget)[this.type](this.getDelegateOptions()).data(\"bs.\"+this.type):this;self.tip().hasClass(\"in\")?self.leave(self):self.enter(self)},Tooltip.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off(\".\"+this.type).removeData(\"bs.\"+this.type)};var old=$.fn.tooltip;$.fn.tooltip=function(option){return this.each(function(){var $this=$(this),data=$this.data(\"bs.tooltip\"),options=\"object\"==typeof option&&option;(data||\"destroy\"!=option)&&(data||$this.data(\"bs.tooltip\",data=new Tooltip(this,options)),\"string\"==typeof option&&data[option]())})},$.fn.tooltip.Constructor=Tooltip,$.fn.tooltip.noConflict=function(){return $.fn.tooltip=old,this}}(jQuery),+function($){\"use strict\";var Affix=function(element,options){this.options=$.extend({},Affix.DEFAULTS,options),this.$window=$(window).on(\"scroll.bs.affix.data-api\",$.proxy(this.checkPosition,this)).on(\"click.bs.affix.data-api\",$.proxy(this.checkPositionWithEventLoop,this)),this.$element=$(element),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};Affix.RESET=\"affix affix-top affix-bottom\",Affix.DEFAULTS={offset:0},Affix.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(Affix.RESET).addClass(\"affix\");var scrollTop=this.$window.scrollTop(),position=this.$element.offset();return this.pinnedOffset=position.top-scrollTop},Affix.prototype.checkPositionWithEventLoop=function(){setTimeout($.proxy(this.checkPosition,this),1)},Affix.prototype.checkPosition=function(){if(this.$element.is(\":visible\")){var scrollHeight=$(document).height(),scrollTop=this.$window.scrollTop(),position=this.$element.offset(),offset=this.options.offset,offsetTop=offset.top,offsetBottom=offset.bottom;\"top\"==this.affixed&&(position.top+=scrollTop),\"object\"!=typeof offset&&(offsetBottom=offsetTop=offset),\"function\"==typeof offsetTop&&(offsetTop=offset.top(this.$element)),\"function\"==typeof offsetBottom&&(offsetBottom=offset.bottom(this.$element));var affix=!(null!=this.unpin&&scrollTop+this.unpin<=position.top)&&(null!=offsetBottom&&position.top+this.$element.height()>=scrollHeight-offsetBottom?\"bottom\":null!=offsetTop&&scrollTop<=offsetTop&&\"top\");if(this.affixed!==affix){this.unpin&&this.$element.css(\"top\",\"\");var affixType=\"affix\"+(affix?\"-\"+affix:\"\"),e=$.Event(affixType+\".bs.affix\");this.$element.trigger(e),e.isDefaultPrevented()||(this.affixed=affix,this.unpin=\"bottom\"==affix?this.getPinnedOffset():null,this.$element.removeClass(Affix.RESET).addClass(affixType).trigger($.Event(affixType.replace(\"affix\",\"affixed\"))),\"bottom\"==affix&&this.$element.offset({top:scrollHeight-offsetBottom-this.$element.height()}))}}};var old=$.fn.affix;$.fn.affix=function(option){return this.each(function(){var $this=$(this),data=$this.data(\"bs.affix\"),options=\"object\"==typeof option&&option;data||$this.data(\"bs.affix\",data=new Affix(this,options)),\"string\"==typeof option&&data[option]()})},$.fn.affix.Constructor=Affix,$.fn.affix.noConflict=function(){return $.fn.affix=old,this},$(window).on(\"load\",function(){$('[data-spy=\"affix\"]').each(function(){var $spy=$(this),data=$spy.data();data.offset=data.offset||{},data.offsetBottom&&(data.offset.bottom=data.offsetBottom),data.offsetTop&&(data.offset.top=data.offsetTop),$spy.affix(data)})})}(jQuery),+function($){\"use strict\";var dismiss='[data-dismiss=\"alert\"]',Alert=function(el){$(el).on(\"click\",dismiss,this.close)};Alert.prototype.close=function(e){function removeElement(){$parent.trigger(\"closed.bs.alert\").remove()}var $this=$(this),selector=$this.attr(\"data-target\");selector||(selector=$this.attr(\"href\"),selector=selector&&selector.replace(/.*(?=#[^\\s]*$)/,\"\"));var $parent=$(selector);e&&e.preventDefault(),$parent.length||($parent=$this.hasClass(\"alert\")?$this:$this.parent()),$parent.trigger(e=$.Event(\"close.bs.alert\")),e.isDefaultPrevented()||($parent.removeClass(\"in\"),$.support.transition&&$parent.hasClass(\"fade\")?$parent.one($.support.transition.end,removeElement).emulateTransitionEnd(150):removeElement())};var old=$.fn.alert;$.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data(\"bs.alert\");data||$this.data(\"bs.alert\",data=new Alert(this)),\"string\"==typeof option&&data[option].call($this)})},$.fn.alert.Constructor=Alert,$.fn.alert.noConflict=function(){return $.fn.alert=old,this},$(document).on(\"click.bs.alert.data-api\",dismiss,Alert.prototype.close)}(jQuery),+function($){\"use strict\";var Button=function(element,options){this.$element=$(element),this.options=$.extend({},Button.DEFAULTS,options),this.isLoading=!1};Button.DEFAULTS={loadingText:\"loading...\"},Button.prototype.setState=function(state){var d=\"disabled\",$el=this.$element,val=$el.is(\"input\")?\"val\":\"html\",data=$el.data();state+=\"Text\",data.resetText||$el.data(\"resetText\",$el[val]()),$el[val](data[state]||this.options[state]),setTimeout($.proxy(function(){\"loadingText\"==state?(this.isLoading=!0,$el.addClass(d).attr(d,d)):this.isLoading&&(this.isLoading=!1,$el.removeClass(d).removeAttr(d))},this),0)},Button.prototype.toggle=function(){var changed=!0,$parent=this.$element.closest('[data-toggle=\"buttons\"]');if($parent.length){var $input=this.$element.find(\"input\");\"radio\"==$input.prop(\"type\")&&($input.prop(\"checked\")&&this.$element.hasClass(\"active\")?changed=!1:$parent.find(\".active\").removeClass(\"active\")),changed&&$input.prop(\"checked\",!this.$element.hasClass(\"active\")).trigger(\"change\")}changed&&this.$element.toggleClass(\"active\")};var old=$.fn.button;$.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data(\"bs.button\"),options=\"object\"==typeof option&&option;data||$this.data(\"bs.button\",data=new Button(this,options)),\"toggle\"==option?data.toggle():option&&data.setState(option)})},$.fn.button.Constructor=Button,$.fn.button.noConflict=function(){return $.fn.button=old,this},$(document).on(\"click.bs.button.data-api\",\"[data-toggle^=button]\",function(e){var $btn=$(e.target);$btn.hasClass(\"btn\")||($btn=$btn.closest(\".btn\")),$btn.button(\"toggle\"),e.preventDefault()})}(jQuery),+function($){\"use strict\";var Carousel=function(element,options){this.$element=$(element),this.$indicators=this.$element.find(\".carousel-indicators\"),this.options=options,this.paused=this.sliding=this.interval=this.$active=this.$items=null,\"hover\"==this.options.pause&&this.$element.on(\"mouseenter\",$.proxy(this.pause,this)).on(\"mouseleave\",$.proxy(this.cycle,this))};Carousel.DEFAULTS={interval:5e3,pause:\"hover\",wrap:!0},Carousel.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)),this},Carousel.prototype.getActiveIndex=function(){return this.$active=this.$element.find(\".item.active\"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},Carousel.prototype.to=function(pos){var that=this,activeIndex=this.getActiveIndex();if(!(pos>this.$items.length-1||pos<0))return this.sliding?this.$element.one(\"slid.bs.carousel\",function(){that.to(pos)}):activeIndex==pos?this.pause().cycle():this.slide(pos>activeIndex?\"next\":\"prev\",$(this.$items[pos]))},Carousel.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(\".next, .prev\").length&&$.support.transition&&(this.$element.trigger($.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},Carousel.prototype.next=function(){if(!this.sliding)return this.slide(\"next\")},Carousel.prototype.prev=function(){if(!this.sliding)return this.slide(\"prev\")},Carousel.prototype.slide=function(type,next){var $active=this.$element.find(\".item.active\"),$next=next||$active[type](),isCycling=this.interval,direction=\"next\"==type?\"left\":\"right\",fallback=\"next\"==type?\"first\":\"last\",that=this;if(!$next.length){if(!this.options.wrap)return;$next=this.$element.find(\".item\")[fallback]()}if($next.hasClass(\"active\"))return this.sliding=!1;var e=$.Event(\"slide.bs.carousel\",{relatedTarget:$next[0],direction:direction});return this.$element.trigger(e),e.isDefaultPrevented()?void 0:(this.sliding=!0,isCycling&&this.pause(),this.$indicators.length&&(this.$indicators.find(\".active\").removeClass(\"active\"),this.$element.one(\"slid.bs.carousel\",function(){var $nextIndicator=$(that.$indicators.children()[that.getActiveIndex()]);$nextIndicator&&$nextIndicator.addClass(\"active\")})),$.support.transition&&this.$element.hasClass(\"slide\")?($next.addClass(type),$next[0].offsetWidth,$active.addClass(direction),$next.addClass(direction),$active.one($.support.transition.end,function(){$next.removeClass([type,direction].join(\" \")).addClass(\"active\"),$active.removeClass([\"active\",direction].join(\" \")),that.sliding=!1,setTimeout(function(){that.$element.trigger(\"slid.bs.carousel\")},0)}).emulateTransitionEnd(1e3*$active.css(\"transition-duration\").slice(0,-1))):($active.removeClass(\"active\"),$next.addClass(\"active\"),this.sliding=!1,this.$element.trigger(\"slid.bs.carousel\")),isCycling&&this.cycle(),this)};var old=$.fn.carousel;$.fn.carousel=function(option){return this.each(function(){var $this=$(this),data=$this.data(\"bs.carousel\"),options=$.extend({},Carousel.DEFAULTS,$this.data(),\"object\"==typeof option&&option),action=\"string\"==typeof option?option:options.slide;data||$this.data(\"bs.carousel\",data=new Carousel(this,options)),\"number\"==typeof option?data.to(option):action?data[action]():options.interval&&data.pause().cycle()})},$.fn.carousel.Constructor=Carousel,$.fn.carousel.noConflict=function(){return $.fn.carousel=old,this},$(document).on(\"click.bs.carousel.data-api\",\"[data-slide], [data-slide-to]\",function(e){var href,$this=$(this),$target=$($this.attr(\"data-target\")||(href=$this.attr(\"href\"))&&href.replace(/.*(?=#[^\\s]+$)/,\"\")),options=$.extend({},$target.data(),$this.data()),slideIndex=$this.attr(\"data-slide-to\");slideIndex&&(options.interval=!1),$target.carousel(options),(slideIndex=$this.attr(\"data-slide-to\"))&&$target.data(\"bs.carousel\").to(slideIndex),e.preventDefault()}),$(window).on(\"load\",function(){$('[data-ride=\"carousel\"]').each(function(){var $carousel=$(this);$carousel.carousel($carousel.data())})})}(jQuery),+function($){\"use strict\";var Collapse=function(element,options){this.$element=$(element),this.options=$.extend({},Collapse.DEFAULTS,options),this.transitioning=null,this.options.parent&&(this.$parent=$(this.options.parent)),this.options.toggle&&this.toggle()};Collapse.DEFAULTS={toggle:!0},Collapse.prototype.dimension=function(){var hasWidth=this.$element.hasClass(\"width\");return hasWidth?\"width\":\"height\"},Collapse.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass(\"in\")){var startEvent=$.Event(\"show.bs.collapse\");if(this.$element.trigger(startEvent),!startEvent.isDefaultPrevented()){var actives=this.$parent&&this.$parent.find(\"> .panel > .in\");if(actives&&actives.length){var hasData=actives.data(\"bs.collapse\");if(hasData&&hasData.transitioning)return;actives.collapse(\"hide\"),hasData||actives.data(\"bs.collapse\",null)}var dimension=this.dimension();this.$element.removeClass(\"collapse\").addClass(\"collapsing\")[dimension](0),this.transitioning=1;var complete=function(){this.$element.removeClass(\"collapsing\").addClass(\"collapse in\")[dimension](\"auto\"),this.transitioning=0,this.$element.trigger(\"shown.bs.collapse\")};if(!$.support.transition)return complete.call(this);var scrollSize=$.camelCase([\"scroll\",dimension].join(\"-\"));this.$element.one($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350)[dimension](this.$element[0][scrollSize])}}},Collapse.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass(\"in\")){var startEvent=$.Event(\"hide.bs.collapse\");if(this.$element.trigger(startEvent),!startEvent.isDefaultPrevented()){var dimension=this.dimension();this.$element[dimension](this.$element[dimension]())[0].offsetHeight,this.$element.addClass(\"collapsing\").removeClass(\"collapse\").removeClass(\"in\"),this.transitioning=1;var complete=function(){this.transitioning=0,this.$element.trigger(\"hidden.bs.collapse\").removeClass(\"collapsing\").addClass(\"collapse\")};return $.support.transition?void this.$element[dimension](0).one($.support.transition.end,$.proxy(complete,this)).emulateTransitionEnd(350):complete.call(this)}}},Collapse.prototype.toggle=function(){this[this.$element.hasClass(\"in\")?\"hide\":\"show\"]()};var old=$.fn.collapse;$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data(\"bs.collapse\"),options=$.extend({},Collapse.DEFAULTS,$this.data(),\"object\"==typeof option&&option);!data&&options.toggle&&\"show\"==option&&(option=!option),data||$this.data(\"bs.collapse\",data=new Collapse(this,options)),\"string\"==typeof option&&data[option]()})},$.fn.collapse.Constructor=Collapse,$.fn.collapse.noConflict=function(){return $.fn.collapse=old,this},$(document).on(\"click.bs.collapse.data-api\",\"[data-toggle=collapse]\",function(e){var href,$this=$(this),target=$this.attr(\"data-target\")||e.preventDefault()||(href=$this.attr(\"href\"))&&href.replace(/.*(?=#[^\\s]+$)/,\"\"),$target=$(target),data=$target.data(\"bs.collapse\"),option=data?\"toggle\":$this.data(),parent=$this.attr(\"data-parent\"),$parent=parent&&$(parent);data&&data.transitioning||($parent&&$parent.find('[data-toggle=collapse][data-parent=\"'+parent+'\"]').not($this).addClass(\"collapsed\"),$this[$target.hasClass(\"in\")?\"addClass\":\"removeClass\"](\"collapsed\")),$target.collapse(option)})}(jQuery),+function($){\"use strict\";function clearMenus(e){$(backdrop).remove(),$(toggle).each(function(){var $parent=getParent($(this)),relatedTarget={relatedTarget:this};$parent.hasClass(\"open\")&&($parent.trigger(e=$.Event(\"hide.bs.dropdown\",relatedTarget)),e.isDefaultPrevented()||$parent.removeClass(\"open\").trigger(\"hidden.bs.dropdown\",relatedTarget))})}function getParent($this){var selector=$this.attr(\"data-target\");selector||(selector=$this.attr(\"href\"),selector=selector&&/#[A-Za-z]/.test(selector)&&selector.replace(/.*(?=#[^\\s]*$)/,\"\"));var $parent=selector&&$(selector);return $parent&&$parent.length?$parent:$this.parent()}var backdrop=\".dropdown-backdrop\",toggle=\"[data-toggle=dropdown]\",Dropdown=function(element){$(element).on(\"click.bs.dropdown\",this.toggle)};Dropdown.prototype.toggle=function(e){var $this=$(this);if(!$this.is(\".disabled, :disabled\")){var $parent=getParent($this),isActive=$parent.hasClass(\"open\");if(clearMenus(),!isActive){\"ontouchstart\"in document.documentElement&&!$parent.closest(\".navbar-nav\").length&&$('<div class=\"dropdown-backdrop\"/>').insertAfter($(this)).on(\"click\",clearMenus);var relatedTarget={relatedTarget:this};if($parent.trigger(e=$.Event(\"show.bs.dropdown\",relatedTarget)),e.isDefaultPrevented())return;$parent.toggleClass(\"open\").trigger(\"shown.bs.dropdown\",relatedTarget),$this.focus()}return!1}},Dropdown.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var $this=$(this);if(e.preventDefault(),e.stopPropagation(),!$this.is(\".disabled, :disabled\")){var $parent=getParent($this),isActive=$parent.hasClass(\"open\");if(!isActive||isActive&&27==e.keyCode)return 27==e.which&&$parent.find(toggle).focus(),$this.click();var desc=\" li:not(.divider):visible a\",$items=$parent.find(\"[role=menu]\"+desc+\", [role=listbox]\"+desc);if($items.length){var index=$items.index($items.filter(\":focus\"));38==e.keyCode&&index>0&&index--,40==e.keyCode&&index<$items.length-1&&index++,~index||(index=0),$items.eq(index).focus()}}}};var old=$.fn.dropdown;$.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data(\"bs.dropdown\");data||$this.data(\"bs.dropdown\",data=new Dropdown(this)),\"string\"==typeof option&&data[option].call($this)})},$.fn.dropdown.Constructor=Dropdown,$.fn.dropdown.noConflict=function(){return $.fn.dropdown=old,this},$(document).on(\"click.bs.dropdown.data-api\",clearMenus).on(\"click.bs.dropdown.data-api\",\".dropdown form\",function(e){e.stopPropagation()}).on(\"click.bs.dropdown.data-api\",toggle,Dropdown.prototype.toggle).on(\"keydown.bs.dropdown.data-api\",toggle+\", [role=menu], [role=listbox]\",Dropdown.prototype.keydown)}(jQuery),+function($){\"use strict\";var Modal=function(element,options){this.options=options,this.$element=$(element),this.$backdrop=this.isShown=null,this.options.remote&&this.$element.find(\".modal-content\").load(this.options.remote,$.proxy(function(){this.$element.trigger(\"loaded.bs.modal\")},this))};Modal.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},Modal.prototype.toggle=function(_relatedTarget){return this[this.isShown?\"hide\":\"show\"](_relatedTarget)},Modal.prototype.show=function(_relatedTarget){var that=this,e=$.Event(\"show.bs.modal\",{relatedTarget:_relatedTarget});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.$element.on(\"click.dismiss.bs.modal\",'[data-dismiss=\"modal\"]',$.proxy(this.hide,this)),this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass(\"fade\");that.$element.parent().length||that.$element.appendTo(document.body),that.$element.show().scrollTop(0),transition&&that.$element[0].offsetWidth,that.$element.addClass(\"in\").attr(\"aria-hidden\",!1),that.enforceFocus();var e=$.Event(\"shown.bs.modal\",{relatedTarget:_relatedTarget});transition?that.$element.find(\".modal-dialog\").one($.support.transition.end,function(){that.$element.focus().trigger(e)}).emulateTransitionEnd(300):that.$element.focus().trigger(e)}))},Modal.prototype.hide=function(e){e&&e.preventDefault(),e=$.Event(\"hide.bs.modal\"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),$(document).off(\"focusin.bs.modal\"),this.$element.removeClass(\"in\").attr(\"aria-hidden\",!0).off(\"click.dismiss.bs.modal\"),$.support.transition&&this.$element.hasClass(\"fade\")?this.$element.one($.support.transition.end,$.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},Modal.prototype.enforceFocus=function(){$(document).off(\"focusin.bs.modal\").on(\"focusin.bs.modal\",$.proxy(function(e){this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.focus()},this))},Modal.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on(\"keyup.dismiss.bs.modal\",$.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off(\"keyup.dismiss.bs.modal\")},Modal.prototype.hideModal=function(){var that=this;this.$element.hide(),this.backdrop(function(){that.removeBackdrop(),that.$element.trigger(\"hidden.bs.modal\")})},Modal.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},Modal.prototype.backdrop=function(callback){var animate=this.$element.hasClass(\"fade\")?\"fade\":\"\";if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate;if(this.$backdrop=$('<div class=\"modal-backdrop '+animate+'\" />').appendTo(document.body),this.$element.on(\"click.dismiss.bs.modal\",$.proxy(function(e){e.target===e.currentTarget&&(\"static\"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),doAnimate&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass(\"in\"),!callback)return;doAnimate?this.$backdrop.one($.support.transition.end,callback).emulateTransitionEnd(150):callback()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass(\"in\"),$.support.transition&&this.$element.hasClass(\"fade\")?this.$backdrop.one($.support.transition.end,callback).emulateTransitionEnd(150):callback()):callback&&callback()};var old=$.fn.modal;$.fn.modal=function(option,_relatedTarget){return this.each(function(){var $this=$(this),data=$this.data(\"bs.modal\"),options=$.extend({},Modal.DEFAULTS,$this.data(),\"object\"==typeof option&&option);data||$this.data(\"bs.modal\",data=new Modal(this,options)),\"string\"==typeof option?data[option](_relatedTarget):options.show&&data.show(_relatedTarget)})},$.fn.modal.Constructor=Modal,$.fn.modal.noConflict=function(){return $.fn.modal=old,this},$(document).on(\"click.bs.modal.data-api\",'[data-toggle=\"modal\"]',function(e){var $this=$(this),href=$this.attr(\"href\"),$target=$($this.attr(\"data-target\")||href&&href.replace(/.*(?=#[^\\s]+$)/,\"\")),option=$target.data(\"bs.modal\")?\"toggle\":$.extend({remote:!/#/.test(href)&&href},$target.data(),$this.data());$this.is(\"a\")&&e.preventDefault(),$target.modal(option,this).one(\"hide\",function(){$this.is(\":visible\")&&$this.focus()})}),$(document).on(\"show.bs.modal\",\".modal\",function(){$(document.body).addClass(\"modal-open\")}).on(\"hidden.bs.modal\",\".modal\",function(){$(document.body).removeClass(\"modal-open\")})}(jQuery),+function($){\"use strict\";var Popover=function(element,options){this.init(\"popover\",element,options)};if(!$.fn.tooltip)throw new Error(\"Popover requires tooltip.js\");Popover.DEFAULTS=$.extend({},$.fn.tooltip.Constructor.DEFAULTS,{placement:\"right\",trigger:\"click\",content:\"\",template:'<div class=\"popover\"><div class=\"arrow\"></div><h3 class=\"popover-title\"></h3><div class=\"popover-content\"></div></div>'}),Popover.prototype=$.extend({},$.fn.tooltip.Constructor.prototype),Popover.prototype.constructor=Popover,Popover.prototype.getDefaults=function(){return Popover.DEFAULTS},Popover.prototype.setContent=function(){var $tip=this.tip(),title=this.getTitle(),content=this.getContent();$tip.find(\".popover-title\")[this.options.html?\"html\":\"text\"](title),$tip.find(\".popover-content\")[this.options.html?\"string\"==typeof content?\"html\":\"append\":\"text\"](content),$tip.removeClass(\"fade top bottom left right in\"),$tip.find(\".popover-title\").html()||$tip.find(\".popover-title\").hide()},Popover.prototype.hasContent=function(){return this.getTitle()||this.getContent()},Popover.prototype.getContent=function(){var $e=this.$element,o=this.options;return $e.attr(\"data-content\")||(\"function\"==typeof o.content?o.content.call($e[0]):o.content)},Popover.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(\".arrow\")},Popover.prototype.tip=function(){return this.$tip||(this.$tip=$(this.options.template)),this.$tip};var old=$.fn.popover;$.fn.popover=function(option){return this.each(function(){var $this=$(this),data=$this.data(\"bs.popover\"),options=\"object\"==typeof option&&option;(data||\"destroy\"!=option)&&(data||$this.data(\"bs.popover\",data=new Popover(this,options)),\"string\"==typeof option&&data[option]())})},$.fn.popover.Constructor=Popover,$.fn.popover.noConflict=function(){return $.fn.popover=old,this}}(jQuery),+function($){\"use strict\";function ScrollSpy(element,options){var href,process=$.proxy(this.process,this);this.$element=$($(element).is(\"body\")?window:element),this.$body=$(\"body\"),this.$scrollElement=this.$element.on(\"scroll.bs.scroll-spy.data-api\",process),this.options=$.extend({},ScrollSpy.DEFAULTS,options),this.selector=(this.options.target||(href=$(element).attr(\"href\"))&&href.replace(/.*(?=#[^\\s]+$)/,\"\")||\"\")+\" .nav li > a\",this.offsets=$([]),this.targets=$([]),this.activeTarget=null,this.refresh(),this.process()}ScrollSpy.DEFAULTS={offset:10},ScrollSpy.prototype.refresh=function(){var offsetMethod=this.$element[0]==window?\"offset\":\"position\";this.offsets=$([]),this.targets=$([]);var self=this;this.$body.find(this.selector).map(function(){var $el=$(this),href=$el.data(\"target\")||$el.attr(\"href\"),$href=/^#./.test(href)&&$(href);return $href&&$href.length&&$href.is(\":visible\")&&[[$href[offsetMethod]().top+(!$.isWindow(self.$scrollElement.get(0))&&self.$scrollElement.scrollTop()),href]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){self.offsets.push(this[0]),self.targets.push(this[1])})},ScrollSpy.prototype.process=function(){var i,scrollTop=this.$scrollElement.scrollTop()+this.options.offset,scrollHeight=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,maxScroll=scrollHeight-this.$scrollElement.height(),offsets=this.offsets,targets=this.targets,activeTarget=this.activeTarget;if(scrollTop>=maxScroll)return activeTarget!=(i=targets.last()[0])&&this.activate(i);\nif(activeTarget&&scrollTop<=offsets[0])return activeTarget!=(i=targets[0])&&this.activate(i);for(i=offsets.length;i--;)activeTarget!=targets[i]&&scrollTop>=offsets[i]&&(!offsets[i+1]||scrollTop<=offsets[i+1])&&this.activate(targets[i])},ScrollSpy.prototype.activate=function(target){this.activeTarget=target,$(this.selector).parentsUntil(this.options.target,\".active\").removeClass(\"active\");var selector=this.selector+'[data-target=\"'+target+'\"],'+this.selector+'[href=\"'+target+'\"]',active=$(selector).parents(\"li\").addClass(\"active\");active.parent(\".dropdown-menu\").length&&(active=active.closest(\"li.dropdown\").addClass(\"active\")),active.trigger(\"activate.bs.scrollspy\")};var old=$.fn.scrollspy;$.fn.scrollspy=function(option){return this.each(function(){var $this=$(this),data=$this.data(\"bs.scrollspy\"),options=\"object\"==typeof option&&option;data||$this.data(\"bs.scrollspy\",data=new ScrollSpy(this,options)),\"string\"==typeof option&&data[option]()})},$.fn.scrollspy.Constructor=ScrollSpy,$.fn.scrollspy.noConflict=function(){return $.fn.scrollspy=old,this},$(window).on(\"load\",function(){$('[data-spy=\"scroll\"]').each(function(){var $spy=$(this);$spy.scrollspy($spy.data())})})}(jQuery),+function($){\"use strict\";var Tab=function(element){this.element=$(element)};Tab.prototype.show=function(){var $this=this.element,$ul=$this.closest(\"ul:not(.dropdown-menu)\"),selector=$this.data(\"target\");if(selector||(selector=$this.attr(\"href\"),selector=selector&&selector.replace(/.*(?=#[^\\s]*$)/,\"\")),!$this.parent(\"li\").hasClass(\"active\")){var previous=$ul.find(\".active:last a\")[0],e=$.Event(\"show.bs.tab\",{relatedTarget:previous});if($this.trigger(e),!e.isDefaultPrevented()){var $target=$(selector);this.activate($this.parent(\"li\"),$ul),this.activate($target,$target.parent(),function(){$this.trigger({type:\"shown.bs.tab\",relatedTarget:previous})})}}},Tab.prototype.activate=function(element,container,callback){function next(){$active.removeClass(\"active\").find(\"> .dropdown-menu > .active\").removeClass(\"active\"),element.addClass(\"active\"),transition?(element[0].offsetWidth,element.addClass(\"in\")):element.removeClass(\"fade\"),element.parent(\".dropdown-menu\")&&element.closest(\"li.dropdown\").addClass(\"active\"),callback&&callback()}var $active=container.find(\"> .active\"),transition=callback&&$.support.transition&&$active.hasClass(\"fade\");transition?$active.one($.support.transition.end,next).emulateTransitionEnd(150):next(),$active.removeClass(\"in\")};var old=$.fn.tab;$.fn.tab=function(option){return this.each(function(){var $this=$(this),data=$this.data(\"bs.tab\");data||$this.data(\"bs.tab\",data=new Tab(this)),\"string\"==typeof option&&data[option]()})},$.fn.tab.Constructor=Tab,$.fn.tab.noConflict=function(){return $.fn.tab=old,this},$(document).on(\"click.bs.tab.data-api\",'[data-toggle=\"tab\"], [data-toggle=\"pill\"]',function(e){e.preventDefault(),$(this).tab(\"show\")})}(jQuery),+function($){\"use strict\";function transitionEnd(){var el=document.createElement(\"bootstrap\"),transEndEventNames={WebkitTransition:\"webkitTransitionEnd\",MozTransition:\"transitionend\",OTransition:\"oTransitionEnd otransitionend\",transition:\"transitionend\"};for(var name in transEndEventNames)if(void 0!==el.style[name])return{end:transEndEventNames[name]};return!1}$.fn.emulateTransitionEnd=function(duration){var called=!1,$el=this;$(this).one($.support.transition.end,function(){called=!0});var callback=function(){called||$($el).trigger($.support.transition.end)};return setTimeout(callback,duration),this},$(function(){$.support.transition=transitionEnd()})}(jQuery),!function(e){function n(){l=!0,d.$wndw=e(window),d.$html=e(\"html\"),d.$body=e(\"body\"),e.each([i,a,o],function(e,n){n.add=function(e){e=e.split(\" \");for(var t in e)n[e[t]]=n.mm(e[t])}}),i.mm=function(e){return\"mm-\"+e},i.add(\"wrapper menu inline panel nopanel list nolist subtitle selected label spacer current highest hidden opened subopened subopen fullsubopen subclose\"),i.umm=function(e){return\"mm-\"==e.slice(0,3)&&(e=e.slice(3)),e},a.mm=function(e){return\"mm-\"+e},a.add(\"parent\"),o.mm=function(e){return e+\".mm\"},o.add(\"toggle open close setSelected transitionend webkitTransitionEnd mousedown mouseup touchstart touchmove touchend scroll resize click keydown keyup\"),e[t]._c=i,e[t]._d=a,e[t]._e=o,e[t].glbl=d}var t=\"mmenu\",s=\"4.6.4\";if(!e[t]){var i={},a={},o={},l=!1,d={$wndw:null,$html:null,$body:null};e[t]=function(e,n,t){return this.$menu=e,this.opts=n,this.conf=t,this.vars={},\"function\"==typeof this.___deprecated&&this.___deprecated(),this._initMenu(),this._initAnchors(),this._initEvents(),this._init(this.$menu.children(this.conf.panelNodetype)),\"function\"==typeof this.___debug&&this.___debug(),this},e[t].version=s,e[t].addons=[],e[t].uniqueId=0,e[t].defaults={classes:\"\",slidingSubmenus:!0,onClick:{setSelected:!0}},e[t].configuration={panelNodetype:\"ul, ol, div\",transitionDuration:400,openingInterval:25,classNames:{panel:\"Panel\",selected:\"Selected\",label:\"Label\",spacer:\"Spacer\"}},e[t].prototype={_init:function(n){n=n.not(\".\"+i.nopanel),n=this._initPanels(n);for(var s=0;s<e[t].addons.length;s++)\"function\"==typeof this[\"_init_\"+e[t].addons[s]]&&this[\"_init_\"+e[t].addons[s]](n);this._update()},_initMenu:function(){this.opts.offCanvas&&this.conf.clone&&(this.$menu=this.$menu.clone(!0),this.$menu.add(this.$menu.find(\"*\")).filter(\"[id]\").each(function(){e(this).attr(\"id\",i.mm(e(this).attr(\"id\")))})),this.$menu.contents().each(function(){3==e(this)[0].nodeType&&e(this).remove()}),this.$menu.parent().addClass(i.wrapper);var n=[i.menu];n.push(i.mm(this.opts.slidingSubmenus?\"horizontal\":\"vertical\")),this.opts.classes&&n.push(this.opts.classes),this.$menu.addClass(n.join(\" \"))},_initPanels:function(n){var t=this;this.__findAddBack(n,\"ul, ol\").not(\".\"+i.nolist).addClass(i.list);var s=this.__findAddBack(n,\".\"+i.list).find(\"> li\");this.__refactorClass(s,this.conf.classNames.selected,\"selected\"),this.__refactorClass(s,this.conf.classNames.label,\"label\"),this.__refactorClass(s,this.conf.classNames.spacer,\"spacer\"),s.off(o.setSelected).on(o.setSelected,function(n,t){n.stopPropagation(),s.removeClass(i.selected),\"boolean\"!=typeof t&&(t=!0),t&&e(this).addClass(i.selected)}),this.__refactorClass(this.__findAddBack(n,\".\"+this.conf.classNames.panel),this.conf.classNames.panel,\"panel\"),n.add(this.__findAddBack(n,\".\"+i.list).children().children().filter(this.conf.panelNodetype).not(\".\"+i.nopanel)).addClass(i.panel);var l=this.__findAddBack(n,\".\"+i.panel),d=e(\".\"+i.panel,this.$menu);if(l.each(function(){var n=e(this),s=n.attr(\"id\")||t.__getUniqueId();n.attr(\"id\",s)}),l.each(function(){var n=e(this),s=n.is(\"ul, ol\")?n:n.find(\"ul ,ol\").first(),o=n.parent(),l=o.children(\"a, span\"),d=o.closest(\".\"+i.panel);if(o.parent().is(\".\"+i.list)&&!n.data(a.parent)){n.data(a.parent,o);var r=e('<a class=\"'+i.subopen+'\" href=\"#'+n.attr(\"id\")+'\" />').insertBefore(l);l.is(\"a\")||r.addClass(i.fullsubopen),t.opts.slidingSubmenus&&s.prepend('<li class=\"'+i.subtitle+'\"><a class=\"'+i.subclose+'\" href=\"#'+d.attr(\"id\")+'\">'+l.text()+\"</a></li>\")}}),this.opts.slidingSubmenus){var r=this.__findAddBack(n,\".\"+i.list).find(\"> li.\"+i.selected);r.parents(\"li\").removeClass(i.selected).end().add(r.parents(\"li\")).each(function(){var n=e(this),t=n.find(\"> .\"+i.panel);t.length&&(n.parents(\".\"+i.panel).addClass(i.subopened),t.addClass(i.opened))}).closest(\".\"+i.panel).addClass(i.opened).parents(\".\"+i.panel).addClass(i.subopened)}else{var r=e(\"li.\"+i.selected,d);r.parents(\"li\").removeClass(i.selected).end().add(r.parents(\"li\")).addClass(i.opened)}var u=d.filter(\".\"+i.opened);return u.length||(u=l.first()),u.addClass(i.opened).last().addClass(i.current),this.opts.slidingSubmenus&&l.not(u.last()).addClass(i.hidden).end().appendTo(this.$menu),l},_initAnchors:function(){var n=this;d.$body.on(o.click,\".\"+i.menu+\" a\",function(t){var s=e(this),a=s.attr(\"href\")||\"\";if(\"#\"==a.slice(0,1)){var l=e(a);l.is(\".\"+i.panel)&&(t.preventDefault(),l.trigger(n.opts.slidingSubmenus?o.open:o.toggle))}else if(s.is(\".\"+i.list+\" > li > a\")&&!s.is('[rel=\"external\"]')&&!s.is('[target=\"_blank\"]')){n.__valueOrFn(n.opts.onClick.setSelected,s)&&s.parent().trigger(o.setSelected);var r=n.__valueOrFn(n.opts.onClick.preventDefault,s,\"#\"==a.slice(0,1));r&&t.preventDefault(),n.__valueOrFn(n.opts.onClick.blockUI,s,!r)&&d.$html.addClass(i.blocking),n.__valueOrFn(n.opts.onClick.close,s,r)&&n.$menu.trigger(o.close)}})},_initEvents:function(){var n=this;this.$menu.on(o.toggle+\" \"+o.open+\" \"+o.close,\".\"+i.panel,function(e){e.stopPropagation()}),this.opts.slidingSubmenus?this.$menu.on(o.open,\".\"+i.panel,function(){return n._openSubmenuHorizontal(e(this))}):this.$menu.on(o.toggle,\".\"+i.panel,function(){var n=e(this);n.trigger(n.parent().hasClass(i.opened)?o.close:o.open)}).on(o.open,\".\"+i.panel,function(){e(this).parent().addClass(i.opened)}).on(o.close,\".\"+i.panel,function(){e(this).parent().removeClass(i.opened)})},_openSubmenuHorizontal:function(n){if(n.hasClass(i.current))return!1;var t=e(\".\"+i.panel,this.$menu),s=t.filter(\".\"+i.current);return t.removeClass(i.highest).removeClass(i.current).not(n).not(s).addClass(i.hidden),n.hasClass(i.opened)?s.addClass(i.highest).removeClass(i.opened).removeClass(i.subopened):(n.addClass(i.highest),s.addClass(i.subopened)),n.removeClass(i.hidden).addClass(i.current),setTimeout(function(){n.removeClass(i.subopened).addClass(i.opened)},this.conf.openingInterval),\"open\"},_update:function(e){if(this.updates||(this.updates=[]),\"function\"==typeof e)this.updates.push(e);else for(var n=0,t=this.updates.length;t>n;n++)this.updates[n].call(this,e)},__valueOrFn:function(e,n,t){return\"function\"==typeof e?e.call(n[0]):\"undefined\"==typeof e&&\"undefined\"!=typeof t?t:e},__refactorClass:function(e,n,t){e.filter(\".\"+n).removeClass(n).addClass(i[t])},__findAddBack:function(e,n){return e.find(n).add(e.filter(n))},__transitionend:function(e,n,t){var s=!1,i=function(){s||n.call(e[0]),s=!0};e.one(o.transitionend,i),e.one(o.webkitTransitionEnd,i),setTimeout(i,1.1*t)},__getUniqueId:function(){return i.mm(e[t].uniqueId++)}},e.fn[t]=function(s,i){return l||n(),s=e.extend(!0,{},e[t].defaults,s),i=e.extend(!0,{},e[t].configuration,i),this.each(function(){var n=e(this);n.data(t)||n.data(t,new e[t](n,s,i))})},e[t].support={touch:\"ontouchstart\"in window.document}}}(jQuery),!function(e){function t(e){return e}function o(e){return\"string\"!=typeof e.pageSelector&&(e.pageSelector=\"> \"+e.pageNodetype),e}function n(){c=!0,a=e[s]._c,p=e[s]._d,r=e[s]._e,a.add(\"offcanvas modal background opening blocker page\"),p.add(\"style\"),r.add(\"opening opened closing closed setPage\"),l=e[s].glbl,l.$allMenus=(l.$allMenus||e()).add(this.$menu),l.$wndw.on(r.keydown,function(e){return l.$html.hasClass(a.opened)&&9==e.keyCode?(e.preventDefault(),!1):void 0});var t=0;l.$wndw.on(r.resize,function(e,o){if(o||l.$html.hasClass(a.opened)){var n=l.$wndw.height();(o||n!=t)&&(t=n,l.$page.css(\"minHeight\",n))}})}var s=\"mmenu\",i=\"offCanvas\";e[s].prototype[\"_init_\"+i]=function(){if(this.opts[i]&&!this.vars[i+\"_added\"]){this.vars[i+\"_added\"]=!0,c||n(),this.opts[i]=t(this.opts[i]),this.conf[i]=o(this.conf[i]);var e=this.opts[i],s=this.conf[i],p=[a.offcanvas];\"boolean\"!=typeof this.vars.opened&&(this.vars.opened=!1),\"left\"!=e.position&&p.push(a.mm(e.position)),\"back\"!=e.zposition&&p.push(a.mm(e.zposition)),this.$menu.addClass(p.join(\" \")).parent().removeClass(a.wrapper),this[i+\"_initPage\"](l.$page),this[i+\"_initBlocker\"](),this[i+\"_initAnchors\"](),this[i+\"_initEvents\"](),this.$menu[s.menuInjectMethod+\"To\"](s.menuWrapperSelector)}},e[s].addons.push(i),e[s].defaults[i]={position:\"left\",zposition:\"back\",modal:!1,moveBackground:!0},e[s].configuration[i]={pageNodetype:\"div\",pageSelector:null,menuWrapperSelector:\"body\",menuInjectMethod:\"prepend\"},e[s].prototype.open=function(){if(this.vars.opened)return!1;var e=this;return this._openSetup(),setTimeout(function(){e._openFinish()},this.conf.openingInterval),\"open\"},e[s].prototype._openSetup=function(){var e=this;l.$allMenus.not(this.$menu).trigger(r.close),l.$page.data(p.style,l.$page.attr(\"style\")||\"\"),l.$wndw.trigger(r.resize,[!0]);var t=[a.opened];this.opts[i].modal&&t.push(a.modal),this.opts[i].moveBackground&&t.push(a.background),\"left\"!=this.opts[i].position&&t.push(a.mm(this.opts[i].position)),\"back\"!=this.opts[i].zposition&&t.push(a.mm(this.opts[i].zposition)),this.opts.classes&&t.push(this.opts.classes),l.$html.addClass(t.join(\" \")),setTimeout(function(){e.vars.opened=!0},this.conf.openingInterval),this.$menu.addClass(a.current+\" \"+a.opened)},e[s].prototype._openFinish=function(){var e=this;this.__transitionend(l.$page,function(){e.$menu.trigger(r.opened)},this.conf.transitionDuration),l.$html.addClass(a.opening),this.$menu.trigger(r.opening)},e[s].prototype.close=function(){if(!this.vars.opened)return!1;var e=this;return this.__transitionend(l.$page,function(){e.$menu.removeClass(a.current).removeClass(a.opened),l.$html.removeClass(a.opened).removeClass(a.modal).removeClass(a.background).removeClass(a.mm(e.opts[i].position)).removeClass(a.mm(e.opts[i].zposition)),e.opts.classes&&l.$html.removeClass(e.opts.classes),l.$page.attr(\"style\",l.$page.data(p.style)),e.vars.opened=!1,e.$menu.trigger(r.closed)},this.conf.transitionDuration),l.$html.removeClass(a.opening),this.$menu.trigger(r.closing),\"close\"},e[s].prototype[i+\"_initBlocker\"]=function(){var t=this;l.$blck||(l.$blck=e('<div id=\"'+a.blocker+'\" />').appendTo(l.$body)),l.$blck.off(r.touchstart).on(r.touchstart,function(e){e.preventDefault(),e.stopPropagation(),l.$blck.trigger(r.mousedown)}).on(r.mousedown,function(e){e.preventDefault(),l.$html.hasClass(a.modal)||t.close()})},e[s].prototype[i+\"_initPage\"]=function(t){t||(t=e(this.conf[i].pageSelector,l.$body),t.length>1&&(t=t.wrapAll(\"<\"+this.conf[i].pageNodetype+\" />\").parent())),t.addClass(a.page),l.$page=t},e[s].prototype[i+\"_initAnchors\"]=function(){var t=this;l.$body.on(r.click,\"a\",function(o){var n=e(this),s=t.$menu.attr(\"id\");s&&s.length&&(t.conf.clone&&(s=a.umm(s)),n.is('[href=\"#'+s+'\"]')&&(o.preventDefault(),t.open()));var s=l.$page.attr(\"id\");s&&s.length&&n.is('[href=\"#'+s+'\"]')&&(o.preventDefault(),t.close())})},e[s].prototype[i+\"_initEvents\"]=function(){var e=this,t=r.open+\" \"+r.opening+\" \"+r.opened+\" \"+r.close+\" \"+r.closing+\" \"+r.closed+\" \"+r.setPage;this.$menu.on(t,function(e){e.stopPropagation()}),this.$menu.on(r.open,function(){e.open()}).on(r.close,function(){e.close()}).on(r.setPage,function(t,o){e[i+\"_initPage\"](o)})};var a,p,r,l,c=!1}(jQuery),!function(t){function n(t){return t}function a(t){return t}function i(){d=!0,o=t[r]._c,e=t[r]._d,u=t[r]._e,o.add(\"buttonbar\"),c=t[r].glbl}var r=\"mmenu\",s=\"buttonbars\";t[r].prototype[\"_init_\"+s]=function(r){d||i();var e=this.vars[s+\"_added\"];this.vars[s+\"_added\"]=!0,e||(this.opts[s]=n(this.opts[s]),this.conf[s]=a(this.conf[s])),this.opts[s],this.conf[s],this.__refactorClass(t(\"div\",r),this.conf.classNames[s].buttonbar,\"buttonbar\"),t(\"div.\"+o.buttonbar,r).each(function(){var n=t(this),a=n.children().not(\"input\"),i=n.children().filter(\"input\");n.addClass(o.buttonbar+\"-\"+a.length),i.each(function(){var n=t(this),i=a.filter('label[for=\"'+n.attr(\"id\")+'\"]');i.length&&n.insertBefore(i)})})},t[r].addons.push(s),t[r].defaults[s]={},t[r].configuration.classNames[s]={buttonbar:\"Buttonbar\"};var o,e,u,c,d=!1}(jQuery),!function(t){function e(e){return\"boolean\"==typeof e&&(e={add:e,update:e}),\"object\"!=typeof e&&(e={}),e=t.extend(!0,{},t[o].defaults[s],e)}function n(t){return t}function a(){i=!0,d=t[o]._c,r=t[o]._d,u=t[o]._e,d.add(\"counter search noresultsmsg\"),r.add(\"updatecounter\"),c=t[o].glbl}var o=\"mmenu\",s=\"counters\";t[o].prototype[\"_init_\"+s]=function(o){i||a();var u=this.vars[s+\"_added\"];this.vars[s+\"_added\"]=!0,u||(this.opts[s]=e(this.opts[s]),this.conf[s]=n(this.conf[s]));var c=this,h=this.opts[s];this.conf[s],this.__refactorClass(t(\"em\",o),this.conf.classNames[s].counter,\"counter\"),h.add&&o.each(function(){var e=t(this).data(r.parent);e&&(e.find(\"> em.\"+d.counter).length||e.prepend(t('<em class=\"'+d.counter+'\" />')))}),h.update&&o.each(function(){var e=t(this),n=e.data(r.parent);if(n){var a=n.find(\"> em.\"+d.counter);a.length&&(e.is(\".\"+d.list)||(e=e.find(\"> .\"+d.list)),e.length&&!e.data(r.updatecounter)&&(e.data(r.updatecounter,!0),c._update(function(){var t=e.children().not(\".\"+d.label).not(\".\"+d.subtitle).not(\".\"+d.hidden).not(\".\"+d.search).not(\".\"+d.noresultsmsg);a.html(t.length)})))}})},t[o].addons.push(s),t[o].defaults[s]={add:!1,update:!1},t[o].configuration.classNames[s]={counter:\"Counter\"};var d,r,u,c,i=!1}(jQuery),!function(e){function t(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}function n(t){return\"boolean\"==typeof t&&(t={open:t}),\"object\"!=typeof t&&(t={}),t=e.extend(!0,{},e[a].defaults[i],t)}function o(e){return e}function s(){c=!0,r=e[a]._c,p=e[a]._d,f=e[a]._e,r.add(\"dragging\"),d=e[a].glbl}var a=\"mmenu\",i=\"dragOpen\";e[a].prototype[\"_init_\"+i]=function(){if(\"function\"==typeof Hammer&&this.opts.offCanvas&&!this.vars[i+\"_added\"]){this.vars[i+\"_added\"]=!0,c||s(),this.opts[i]=n(this.opts[i]),this.conf[i]=o(this.conf[i]);var a=this,p=this.opts[i],h=this.conf[i];if(p.open){if(Hammer.VERSION<2)return;var m,u,g,l,v={},_=0,w=!1,b=!1,y=0,$=0;switch(this.opts.offCanvas.position){case\"left\":case\"right\":v.events=\"panleft panright\",v.typeLower=\"x\",v.typeUpper=\"X\",b=\"width\";break;case\"top\":case\"bottom\":v.events=\"panup pandown\",v.typeLower=\"y\",v.typeUpper=\"Y\",b=\"height\"}switch(this.opts.offCanvas.position){case\"left\":case\"top\":v.negative=!1;break;case\"right\":case\"bottom\":v.negative=!0}switch(this.opts.offCanvas.position){case\"left\":v.open_dir=\"right\",v.close_dir=\"left\";break;case\"right\":v.open_dir=\"left\",v.close_dir=\"right\";break;case\"top\":v.open_dir=\"down\",v.close_dir=\"up\";break;case\"bottom\":v.open_dir=\"up\",v.close_dir=\"down\"}var x=this.__valueOrFn(p.pageNode,this.$menu,d.$page);\"string\"==typeof x&&(x=e(x));var C=d.$page;switch(this.opts.offCanvas.zposition){case\"front\":C=this.$menu;break;case\"next\":C=C.add(this.$menu)}var k=new Hammer(x[0],p.vendors.hammer);k.on(\"panstart\",function(e){switch(l=e.center[v.typeLower],a.opts.offCanvas.position){case\"right\":case\"bottom\":l>=d.$wndw[b]()-p.maxStartPos&&(_=1);break;default:l<=p.maxStartPos&&(_=1)}w=v.open_dir}).on(v.events+\" panend\",function(e){_>0&&e.preventDefault()}).on(v.events,function(e){if(m=e[\"delta\"+v.typeUpper],v.negative&&(m=-m),m!=y&&(w=m>=y?v.open_dir:v.close_dir),y=m,y>p.threshold&&1==_){if(d.$html.hasClass(r.opened))return;_=2,a._openSetup(),a.$menu.trigger(f.opening),d.$html.addClass(r.dragging),$=t(d.$wndw[b]()*h[b].perc,h[b].min,h[b].max)}2==_&&(u=t(y,10,$)-(\"front\"==a.opts.offCanvas.zposition?$:0),v.negative&&(u=-u),g=\"translate\"+v.typeUpper+\"(\"+u+\"px )\",C.css({\"-webkit-transform\":\"-webkit-\"+g,transform:g}))}).on(\"panend\",function(){2==_&&(d.$html.removeClass(r.dragging),C.css(\"transform\",\"\"),a[w==v.open_dir?\"_openFinish\":\"close\"]()),_=0})}}},e[a].addons.push(i),e[a].defaults[i]={open:!1,maxStartPos:100,threshold:50,vendors:{hammer:{}}},e[a].configuration[i]={width:{perc:.8,min:140,max:440},height:{perc:.8,min:140,max:880}};var r,p,f,d,c=!1}(jQuery),!function(t){function s(t){return t}function o(t){return t}function n(){c=!0,e=t[i]._c,f=t[i]._d,r=t[i]._e,e.add(\"fixed-top fixed-bottom\"),d=t[i].glbl}var i=\"mmenu\",a=\"fixedElements\";t[i].prototype[\"_init_\"+a]=function(){if(this.opts.offCanvas){c||n();var i=this.vars[a+\"_added\"];if(this.vars[a+\"_added\"]=!0,i||(this.opts[a]=s(this.opts[a]),this.conf[a]=o(this.conf[a])),this.opts[a],this.conf[a],this.__refactorClass(t(\"div, span, a\",d.$page),this.conf.classNames[a].fixedTop,\"fixed-top\"),this.__refactorClass(t(\"div, span, a\",d.$page),this.conf.classNames[a].fixedBottom,\"fixed-bottom\"),!i){var f,p;this.$menu.on(r.opening,function(){var s=t(window).scrollTop(),o=d.$page.height()-s-d.$wndw.height();f=t(\".\"+e[\"fixed-top\"]),p=t(\".\"+e[\"fixed-bottom\"]),f.css({\"-webkit-transform\":\"translateY( \"+s+\"px )\",transform:\"translateY( \"+s+\"px )\"}),p.css({\"-webkit-transform\":\"translateY( -\"+o+\"px )\",transform:\"translateY( -\"+o+\"px )\"})}).on(r.closed,function(){f.add(p).css({\"-webkit-transform\":\"none\",transform:\"none\"})})}}},t[i].addons.push(a),t[i].defaults[a]={},t[i].configuration.classNames[a]={fixedTop:\"FixedTop\",fixedBottom:\"FixedBottom\"};var e,f,r,d,c=!1}(jQuery),!function(t){function o(o){return\"boolean\"==typeof o&&(o={add:o,update:o}),\"object\"!=typeof o&&(o={}),o=t.extend(!0,{},t[a].defaults[s],o)}function n(t){return t}function e(){h=!0,i=t[a]._c,d=t[a]._d,r=t[a]._e,i.add(\"footer hasfooter\"),f=t[a].glbl}var a=\"mmenu\",s=\"footer\";t[a].prototype[\"_init_\"+s]=function(a){h||e();var d=this.vars[s+\"_added\"];this.vars[s+\"_added\"]=!0,d||(this.opts[s]=o(this.opts[s]),this.conf[s]=n(this.conf[s]));var f=this,u=this.opts[s];if(this.conf[s],!d&&u.add){var c=u.content?u.content:u.title;t('<div class=\"'+i.footer+'\" />').appendTo(this.$menu).append(c)}var p=t(\"div.\"+i.footer,this.$menu);p.length&&(this.$menu.addClass(i.hasfooter),u.update&&a.each(function(){var o=t(this),n=t(\".\"+f.conf.classNames[s].panelFooter,o),e=n.html();e||(e=u.title);var a=function(){p[e?\"show\":\"hide\"](),p.html(e)};o.on(r.open,a),o.hasClass(i.current)&&a()}),\"function\"==typeof this._init_buttonbars&&this._init_buttonbars(p))},t[a].addons.push(s),t[a].defaults[s]={add:!1,content:!1,title:\"\",update:!1},t[a].configuration.classNames[s]={panelFooter:\"Footer\"};var i,d,r,f,h=!1}(jQuery),!function(e){function t(t){return\"boolean\"==typeof t&&(t={add:t,update:t}),\"object\"!=typeof t&&(t={}),!t.add||t.add instanceof Array||(t.add=[\"prev\",\"title\",\"next\"]),t=e.extend(!0,{},e[s].defaults[d],t)}function a(e){return e}function n(){f=!0,r=e[s]._c,i=e[s]._d,h=e[s]._e,r.add(\"header hasheader prev next close title\"),o=e[s].glbl}var s=\"mmenu\",d=\"header\";e[s].prototype[\"_init_\"+d]=function(s){f||n();var i=this.vars[d+\"_added\"];this.vars[d+\"_added\"]=!0,i||(this.opts[d]=t(this.opts[d]),this.conf[d]=a(this.conf[d]));var l=this,c=this.opts[d];if(this.conf[d],!i&&c.add){if(c.content)var p=c.content;else for(var p=\"\",u=0,v=c.add.length;v>u;u++)switch(c.add[u]){case\"prev\":case\"next\":case\"close\":p+='<a class=\"'+r[c.add[u]]+'\" href=\"#\"></a>';break;case\"title\":p+='<span class=\"'+r.title+'\"></span>';break;default:p+=c.add[u]}e('<div class=\"'+r.header+'\" />').prependTo(this.$menu).append(p)}var m=e(\"div.\"+r.header,this.$menu);if(m.length){if(this.$menu.addClass(r.hasheader),c.update){var b=m.find(\".\"+r.title),_=m.find(\".\"+r.prev),x=m.find(\".\"+r.next),N=m.find(\".\"+r.close),g=!1;o.$page&&(g=\"#\"+o.$page.attr(\"id\"),N.attr(\"href\",g)),s.each(function(){var t=e(this),a=t.find(\".\"+l.conf.classNames[d].panelHeader),n=t.find(\".\"+l.conf.classNames[d].panelPrev),s=t.find(\".\"+l.conf.classNames[d].panelNext),i=a.html(),o=n.attr(\"href\"),f=s.attr(\"href\"),p=n.html(),u=s.html();i||(i=t.find(\".\"+r.subclose).html()),i||(i=c.title),o||(o=t.find(\".\"+r.subclose).attr(\"href\"));var v=function(){b[i?\"show\":\"hide\"](),b.html(i),_[o?\"attr\":\"removeAttr\"](\"href\",o),_[o||p?\"show\":\"hide\"](),_.html(p),x[f?\"attr\":\"removeAttr\"](\"href\",f),x[f||u?\"show\":\"hide\"](),x.html(u)};t.on(h.open,v),t.hasClass(r.current)&&v()})}\"function\"==typeof this._init_buttonbars&&this._init_buttonbars(m)}},e[s].addons.push(d),e[s].defaults[d]={add:!1,content:!1,title:\"Menu\",update:!1},e[s].configuration.classNames[d]={panelHeader:\"Header\",panelNext:\"Next\",panelPrev:\"Prev\"};var r,i,h,o,f=!1}(jQuery),!function(e){function s(s){return\"boolean\"==typeof s&&(s={collapse:s}),\"object\"!=typeof s&&(s={}),s=e.extend(!0,{},e[n].defaults[o],s)}function l(e){return e}function a(){i=!0,t=e[n]._c,p=e[n]._d,c=e[n]._e,t.add(\"collapsed uncollapsed\"),d=e[n].glbl}var n=\"mmenu\",o=\"labels\";e[n].prototype[\"_init_\"+o]=function(n){i||a();var p=this.vars[o+\"_added\"];this.vars[o+\"_added\"]=!0,p||(this.opts[o]=s(this.opts[o]),this.conf[o]=l(this.conf[o]));var r=this.opts[o];this.conf[o],r.collapse&&(this.__refactorClass(e(\"li\",this.$menu),this.conf.classNames[o].collapsed,\"collapsed\"),e(\".\"+t.label,n).each(function(){var s=e(this),l=s.nextUntil(\".\"+t.label,\".\"+t.collapsed);l.length&&(s.children(\".\"+t.subopen).length||(s.wrapInner(\"<span />\"),s.prepend('<a href=\"#\" class=\"'+t.subopen+\" \"+t.fullsubopen+'\" />')))}),p||d.$body.on(c.click,\".\"+t.label+\" .\"+t.subopen,function(s){s.stopPropagation(),s.preventDefault();var l=e(this).parent(),a=l.nextUntil(\".\"+t.label,\".\"+t.collapsed);l.toggleClass(t.opened),a[l.hasClass(t.opened)?\"addClass\":\"removeClass\"](t.uncollapsed)}))},e[n].addons.push(o),e[n].defaults[o]={collapse:!1},e[n].configuration.classNames[o]={collapsed:\"Collapsed\"};var t,p,c,d,i=!1}(jQuery),!function(e){function s(e){switch(e){case 9:case 16:case 17:case 18:case 37:case 38:case 39:case 40:return!0}return!1}function n(s){return\"boolean\"==typeof s&&(s={add:s,search:s}),\"object\"!=typeof s&&(s={}),s=e.extend(!0,{},e[r].defaults[o],s),\"boolean\"!=typeof s.showLinksOnly&&(s.showLinksOnly=\"menu\"==s.addTo),s}function t(e){return e}function a(){c=!0,i=e[r]._c,l=e[r]._d,d=e[r]._e,i.add(\"search hassearch noresultsmsg noresults nosubresults\"),d.add(\"search reset change\"),h=e[r].glbl}var r=\"mmenu\",o=\"searchfield\";e[r].prototype[\"_init_\"+o]=function(r){c||a();var h=this.vars[o+\"_added\"];this.vars[o+\"_added\"]=!0,h||(this.opts[o]=n(this.opts[o]),this.conf[o]=t(this.conf[o]));var u=this,f=this.opts[o];if(this.conf[o],f.add){switch(f.addTo){case\"menu\":var p=this.$menu;break;case\"panels\":var p=r;break;default:var p=e(f.addTo,this.$menu).filter(\".\"+i.panel)}p.length&&p.each(function(){var s=e(this),n=s.is(\".\"+i.list)?\"li\":\"div\";if(!s.children(n+\".\"+i.search).length){if(s.is(\".\"+i.menu))var t=u.$menu,a=\"prependTo\";else var t=s.children().first(),a=t.is(\".\"+i.subtitle)?\"insertAfter\":\"insertBefore\";e(\"<\"+n+' class=\"'+i.search+'\" />').append('<input placeholder=\"'+f.placeholder+'\" type=\"text\" autocomplete=\"off\" />')[a](t)}f.noResults&&(s.is(\".\"+i.menu)&&(s=s.children(\".\"+i.panel).first()),n=s.is(\".\"+i.list)?\"li\":\"div\",s.children(n+\".\"+i.noresultsmsg).length||e(\"<\"+n+' class=\"'+i.noresultsmsg+'\" />').html(f.noResults).appendTo(s))})}if(this.$menu.children(\"div.\"+i.search).length&&this.$menu.addClass(i.hassearch),f.search){var v=e(\".\"+i.search,this.$menu);v.length&&v.each(function(){var n=e(this);if(\"menu\"==f.addTo)var t=e(\".\"+i.panel,u.$menu),a=u.$menu;else var t=n.closest(\".\"+i.panel),a=t;var r=n.children(\"input\"),o=u.__findAddBack(t,\".\"+i.list).children(\"li\"),h=o.filter(\".\"+i.label),c=o.not(\".\"+i.subtitle).not(\".\"+i.label).not(\".\"+i.search).not(\".\"+i.noresultsmsg),p=\"> a\";f.showLinksOnly||(p+=\", > span\"),r.off(d.keyup+\" \"+d.change).on(d.keyup,function(e){s(e.keyCode)||n.trigger(d.search)}).on(d.change,function(){n.trigger(d.search)}),n.off(d.reset+\" \"+d.search).on(d.reset+\" \"+d.search,function(e){e.stopPropagation()}).on(d.reset,function(){n.trigger(d.search,[\"\"])}).on(d.search,function(s,n){\"string\"==typeof n?r.val(n):n=r.val(),n=n.toLowerCase(),t.scrollTop(0),c.add(h).addClass(i.hidden),c.each(function(){var s=e(this);e(p,s).text().toLowerCase().indexOf(n)>-1&&s.add(s.prevAll(\".\"+i.label).first()).removeClass(i.hidden)}),e(t.get().reverse()).each(function(s){var n=e(this),t=n.data(l.parent);if(t){var a=n.add(n.find(\"> .\"+i.list)).find(\"> li\").not(\".\"+i.subtitle).not(\".\"+i.search).not(\".\"+i.noresultsmsg).not(\".\"+i.label).not(\".\"+i.hidden);a.length?t.removeClass(i.hidden).removeClass(i.nosubresults).prevAll(\".\"+i.label).first().removeClass(i.hidden):\"menu\"==f.addTo&&(n.hasClass(i.opened)&&setTimeout(function(){t.trigger(d.open)},1.5*(s+1)*u.conf.openingInterval),t.addClass(i.nosubresults))}}),a[c.not(\".\"+i.hidden).length?\"removeClass\":\"addClass\"](i.noresults),u._update()})})}},e[r].addons.push(o),e[r].defaults[o]={add:!1,addTo:\"menu\",search:!1,placeholder:\"Search\",noResults:\"No results found.\"};var i,l,d,h,c=!1}(jQuery),!function(t){function s(t){return t}function e(t){return t}function a(){r=!0,n=t[c]._c,o=t[c]._d,l=t[c]._e,n.add(\"toggle check\"),h=t[c].glbl}var c=\"mmenu\",i=\"toggles\";t[c].prototype[\"_init_\"+i]=function(c){r||a();var o=this.vars[i+\"_added\"];this.vars[i+\"_added\"]=!0,o||(this.opts[i]=s(this.opts[i]),this.conf[i]=e(this.conf[i]));var l=this;this.opts[i],this.conf[i],this.__refactorClass(t(\"input\",c),this.conf.classNames[i].toggle,\"toggle\"),this.__refactorClass(t(\"input\",c),this.conf.classNames[i].check,\"check\"),t(\"input.\"+n.toggle,c).add(\"input.\"+n.check,c).each(function(){var s=t(this),e=s.closest(\"li\"),a=s.hasClass(n.toggle)?\"toggle\":\"check\",c=s.attr(\"id\")||l.__getUniqueId();e.children('label[for=\"'+c+'\"]').length||(s.attr(\"id\",c),e.prepend(s),t('<label for=\"'+c+'\" class=\"'+n[a]+'\"></label>').insertBefore(e.children(\"a, span\").last()))})},t[c].addons.push(i),t[c].defaults[i]={},t[c].configuration.classNames[i]={toggle:\"Toggle\",check:\"Check\"};var n,o,l,h,r=!1}(jQuery),function($){\"undefined\"==typeof $.fn.each2&&$.extend($.fn,{each2:function(c){for(var j=$([0]),i=-1,l=this.length;++i<l&&(j.context=j[0]=this[i])&&c.call(j[0],i,j)!==!1;);return this}})}(jQuery),function($,undefined){\"use strict\";function reinsertElement(element){var placeholder=$(document.createTextNode(\"\"));element.before(placeholder),placeholder.before(element),placeholder.remove()}function stripDiacritics(str){function match(a){return DIACRITICS[a]||a}return str.replace(/[^\\u0000-\\u007E]/g,match)}function indexOf(value,array){for(var i=0,l=array.length;i<l;i+=1)if(equal(value,array[i]))return i;return-1}function measureScrollbar(){var $template=$(MEASURE_SCROLLBAR_TEMPLATE);$template.appendTo(\"body\");var dim={width:$template.width()-$template[0].clientWidth,height:$template.height()-$template[0].clientHeight};return $template.remove(),dim}function equal(a,b){return a===b||a!==undefined&&b!==undefined&&(null!==a&&null!==b&&(a.constructor===String?a+\"\"==b+\"\":b.constructor===String&&b+\"\"==a+\"\"))}function splitVal(string,separator){var val,i,l;if(null===string||string.length<1)return[];for(val=string.split(separator),i=0,l=val.length;i<l;i+=1)val[i]=$.trim(val[i]);return val}function getSideBorderPadding(element){return element.outerWidth(!1)-element.width()}function installKeyUpChangeEvent(element){var key=\"keyup-change-value\";element.on(\"keydown\",function(){$.data(element,key)===undefined&&$.data(element,key,element.val())}),element.on(\"keyup\",function(){var val=$.data(element,key);val!==undefined&&element.val()!==val&&($.removeData(element,key),element.trigger(\"keyup-change\"))})}function installFilteredMouseMove(element){element.on(\"mousemove\",function(e){var lastpos=lastMousePosition;lastpos!==undefined&&lastpos.x===e.pageX&&lastpos.y===e.pageY||$(e.target).trigger(\"mousemove-filtered\",e)})}function debounce(quietMillis,fn,ctx){ctx=ctx||undefined;var timeout;return function(){var args=arguments;window.clearTimeout(timeout),timeout=window.setTimeout(function(){fn.apply(ctx,args)},quietMillis)}}function installDebouncedScroll(threshold,element){var notify=debounce(threshold,function(e){element.trigger(\"scroll-debounced\",e)});element.on(\"scroll\",function(e){indexOf(e.target,element.get())>=0&&notify(e)})}function focus($el){$el[0]!==document.activeElement&&window.setTimeout(function(){var range,el=$el[0],pos=$el.val().length;$el.focus();var isVisible=el.offsetWidth>0||el.offsetHeight>0;isVisible&&el===document.activeElement&&(el.setSelectionRange?el.setSelectionRange(pos,pos):el.createTextRange&&(range=el.createTextRange(),range.collapse(!1),range.select()))},0)}function getCursorInfo(el){el=$(el)[0];var offset=0,length=0;if(\"selectionStart\"in el)offset=el.selectionStart,length=el.selectionEnd-offset;else if(\"selection\"in document){el.focus();var sel=document.selection.createRange();length=document.selection.createRange().text.length,sel.moveStart(\"character\",-el.value.length),offset=sel.text.length-length}return{offset:offset,length:length}}function killEvent(event){event.preventDefault(),event.stopPropagation()}function killEventImmediately(event){event.preventDefault(),event.stopImmediatePropagation()}function measureTextWidth(e){if(!sizer){var style=e[0].currentStyle||window.getComputedStyle(e[0],null);sizer=$(document.createElement(\"div\")).css({position:\"absolute\",left:\"-10000px\",top:\"-10000px\",display:\"none\",fontSize:style.fontSize,fontFamily:style.fontFamily,\nfontStyle:style.fontStyle,fontWeight:style.fontWeight,letterSpacing:style.letterSpacing,textTransform:style.textTransform,whiteSpace:\"nowrap\"}),sizer.attr(\"class\",\"select2-sizer\"),$(\"body\").append(sizer)}return sizer.text(e.val()),sizer.width()}function syncCssClasses(dest,src,adapter){var classes,adapted,replacements=[];classes=dest.attr(\"class\"),classes&&(classes=\"\"+classes,$(classes.split(\" \")).each2(function(){0===this.indexOf(\"select2-\")&&replacements.push(this)})),classes=src.attr(\"class\"),classes&&(classes=\"\"+classes,$(classes.split(\" \")).each2(function(){0!==this.indexOf(\"select2-\")&&(adapted=adapter(this),adapted&&replacements.push(adapted))})),dest.attr(\"class\",replacements.join(\" \"))}function markMatch(text,term,markup,escapeMarkup){var match=stripDiacritics(text.toUpperCase()).indexOf(stripDiacritics(term.toUpperCase())),tl=term.length;return match<0?void markup.push(escapeMarkup(text)):(markup.push(escapeMarkup(text.substring(0,match))),markup.push(\"<span class='select2-match'>\"),markup.push(escapeMarkup(text.substring(match,match+tl))),markup.push(\"</span>\"),void markup.push(escapeMarkup(text.substring(match+tl,text.length))))}function defaultEscapeMarkup(markup){var replace_map={\"\\\\\":\"&#92;\",\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#39;\",\"/\":\"&#47;\"};return String(markup).replace(/[&<>\"'\\/\\\\]/g,function(match){return replace_map[match]})}function ajax(options){var timeout,handler=null,quietMillis=options.quietMillis||100,ajaxUrl=options.url,self=this;return function(query){window.clearTimeout(timeout),timeout=window.setTimeout(function(){var data=options.data,url=ajaxUrl,transport=options.transport||$.fn.select2.ajaxDefaults.transport,deprecated={type:options.type||\"GET\",cache:options.cache||!1,jsonpCallback:options.jsonpCallback||undefined,dataType:options.dataType||\"json\"},params=$.extend({},$.fn.select2.ajaxDefaults.params,deprecated);data=data?data.call(self,query.term,query.page,query.context):null,url=\"function\"==typeof url?url.call(self,query.term,query.page,query.context):url,handler&&\"function\"==typeof handler.abort&&handler.abort(),options.params&&($.isFunction(options.params)?$.extend(params,options.params.call(self)):$.extend(params,options.params)),$.extend(params,{url:url,dataType:options.dataType,data:data,success:function(data){var results=options.results(data,query.page);query.callback(results)}}),handler=transport.call(self,params)},quietMillis)}}function local(options){var dataText,tmp,data=options,text=function(item){return\"\"+item.text};$.isArray(data)&&(tmp=data,data={results:tmp}),$.isFunction(data)===!1&&(tmp=data,data=function(){return tmp});var dataItem=data();return dataItem.text&&(text=dataItem.text,$.isFunction(text)||(dataText=dataItem.text,text=function(item){return item[dataText]})),function(query){var process,t=query.term,filtered={results:[]};return\"\"===t?void query.callback(data()):(process=function(datum,collection){var group,attr;if(datum=datum[0],datum.children){group={};for(attr in datum)datum.hasOwnProperty(attr)&&(group[attr]=datum[attr]);group.children=[],$(datum.children).each2(function(i,childDatum){process(childDatum,group.children)}),(group.children.length||query.matcher(t,text(group),datum))&&collection.push(group)}else query.matcher(t,text(datum),datum)&&collection.push(datum)},$(data().results).each2(function(i,datum){process(datum,filtered.results)}),void query.callback(filtered))}}function tags(data){var isFunc=$.isFunction(data);return function(query){var t=query.term,filtered={results:[]},result=isFunc?data(query):data;$.isArray(result)&&($(result).each(function(){var isObject=this.text!==undefined,text=isObject?this.text:this;(\"\"===t||query.matcher(t,text))&&filtered.results.push(isObject?this:{id:this,text:this})}),query.callback(filtered))}}function checkFormatter(formatter,formatterName){if($.isFunction(formatter))return!0;if(!formatter)return!1;if(\"string\"==typeof formatter)return!0;throw new Error(formatterName+\" must be a string, function, or falsy value\")}function evaluate(val){if($.isFunction(val)){var args=Array.prototype.slice.call(arguments,1);return val.apply(null,args)}return val}function countResults(results){var count=0;return $.each(results,function(i,item){item.children?count+=countResults(item.children):count++}),count}function defaultTokenizer(input,selection,selectCallback,opts){var token,index,i,l,separator,original=input,dupe=!1;if(!opts.createSearchChoice||!opts.tokenSeparators||opts.tokenSeparators.length<1)return undefined;for(;;){for(index=-1,i=0,l=opts.tokenSeparators.length;i<l&&(separator=opts.tokenSeparators[i],index=input.indexOf(separator),!(index>=0));i++);if(index<0)break;if(token=input.substring(0,index),input=input.substring(index+separator.length),token.length>0&&(token=opts.createSearchChoice.call(this,token,selection),token!==undefined&&null!==token&&opts.id(token)!==undefined&&null!==opts.id(token))){for(dupe=!1,i=0,l=selection.length;i<l;i++)if(equal(opts.id(token),opts.id(selection[i]))){dupe=!0;break}dupe||selectCallback(token)}}return original!==input?input:void 0}function cleanupJQueryElements(){var self=this;Array.prototype.forEach.call(arguments,function(element){self[element].remove(),self[element]=null})}function clazz(SuperClass,methods){var constructor=function(){};return constructor.prototype=new SuperClass,constructor.prototype.constructor=constructor,constructor.prototype.parent=SuperClass.prototype,constructor.prototype=$.extend(constructor.prototype,methods),constructor}if(window.Select2===undefined){var KEY,AbstractSelect2,SingleSelect2,MultiSelect2,nextUid,sizer,$document,scrollBarDimensions,lastMousePosition={x:0,y:0},KEY={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(k){switch(k=k.which?k.which:k){case KEY.LEFT:case KEY.RIGHT:case KEY.UP:case KEY.DOWN:return!0}return!1},isControl:function(e){var k=e.which;switch(k){case KEY.SHIFT:case KEY.CTRL:case KEY.ALT:return!0}return!!e.metaKey},isFunctionKey:function(k){return k=k.which?k.which:k,k>=112&&k<=123}},MEASURE_SCROLLBAR_TEMPLATE=\"<div class='select2-measure-scrollbar'></div>\",DIACRITICS={\"Ⓐ\":\"A\",\"A\":\"A\",\"À\":\"A\",\"Á\":\"A\",\"Â\":\"A\",\"Ầ\":\"A\",\"Ấ\":\"A\",\"Ẫ\":\"A\",\"Ẩ\":\"A\",\"Ã\":\"A\",\"Ā\":\"A\",\"Ă\":\"A\",\"Ằ\":\"A\",\"Ắ\":\"A\",\"Ẵ\":\"A\",\"Ẳ\":\"A\",\"Ȧ\":\"A\",\"Ǡ\":\"A\",\"Ä\":\"A\",\"Ǟ\":\"A\",\"Ả\":\"A\",\"Å\":\"A\",\"Ǻ\":\"A\",\"Ǎ\":\"A\",\"Ȁ\":\"A\",\"Ȃ\":\"A\",\"Ạ\":\"A\",\"Ậ\":\"A\",\"Ặ\":\"A\",\"Ḁ\":\"A\",\"Ą\":\"A\",\"Ⱥ\":\"A\",\"Ɐ\":\"A\",\"Ꜳ\":\"AA\",\"Æ\":\"AE\",\"Ǽ\":\"AE\",\"Ǣ\":\"AE\",\"Ꜵ\":\"AO\",\"Ꜷ\":\"AU\",\"Ꜹ\":\"AV\",\"Ꜻ\":\"AV\",\"Ꜽ\":\"AY\",\"Ⓑ\":\"B\",\"B\":\"B\",\"Ḃ\":\"B\",\"Ḅ\":\"B\",\"Ḇ\":\"B\",\"Ƀ\":\"B\",\"Ƃ\":\"B\",\"Ɓ\":\"B\",\"Ⓒ\":\"C\",\"C\":\"C\",\"Ć\":\"C\",\"Ĉ\":\"C\",\"Ċ\":\"C\",\"Č\":\"C\",\"Ç\":\"C\",\"Ḉ\":\"C\",\"Ƈ\":\"C\",\"Ȼ\":\"C\",\"Ꜿ\":\"C\",\"Ⓓ\":\"D\",\"D\":\"D\",\"Ḋ\":\"D\",\"Ď\":\"D\",\"Ḍ\":\"D\",\"Ḑ\":\"D\",\"Ḓ\":\"D\",\"Ḏ\":\"D\",\"Đ\":\"D\",\"Ƌ\":\"D\",\"Ɗ\":\"D\",\"Ɖ\":\"D\",\"Ꝺ\":\"D\",\"DZ\":\"DZ\",\"DŽ\":\"DZ\",\"Dz\":\"Dz\",\"Dž\":\"Dz\",\"Ⓔ\":\"E\",\"E\":\"E\",\"È\":\"E\",\"É\":\"E\",\"Ê\":\"E\",\"Ề\":\"E\",\"Ế\":\"E\",\"Ễ\":\"E\",\"Ể\":\"E\",\"Ẽ\":\"E\",\"Ē\":\"E\",\"Ḕ\":\"E\",\"Ḗ\":\"E\",\"Ĕ\":\"E\",\"Ė\":\"E\",\"Ë\":\"E\",\"Ẻ\":\"E\",\"Ě\":\"E\",\"Ȅ\":\"E\",\"Ȇ\":\"E\",\"Ẹ\":\"E\",\"Ệ\":\"E\",\"Ȩ\":\"E\",\"Ḝ\":\"E\",\"Ę\":\"E\",\"Ḙ\":\"E\",\"Ḛ\":\"E\",\"Ɛ\":\"E\",\"Ǝ\":\"E\",\"Ⓕ\":\"F\",\"F\":\"F\",\"Ḟ\":\"F\",\"Ƒ\":\"F\",\"Ꝼ\":\"F\",\"Ⓖ\":\"G\",\"G\":\"G\",\"Ǵ\":\"G\",\"Ĝ\":\"G\",\"Ḡ\":\"G\",\"Ğ\":\"G\",\"Ġ\":\"G\",\"Ǧ\":\"G\",\"Ģ\":\"G\",\"Ǥ\":\"G\",\"Ɠ\":\"G\",\"Ꞡ\":\"G\",\"Ᵹ\":\"G\",\"Ꝿ\":\"G\",\"Ⓗ\":\"H\",\"H\":\"H\",\"Ĥ\":\"H\",\"Ḣ\":\"H\",\"Ḧ\":\"H\",\"Ȟ\":\"H\",\"Ḥ\":\"H\",\"Ḩ\":\"H\",\"Ḫ\":\"H\",\"Ħ\":\"H\",\"Ⱨ\":\"H\",\"Ⱶ\":\"H\",\"Ɥ\":\"H\",\"Ⓘ\":\"I\",\"I\":\"I\",\"Ì\":\"I\",\"Í\":\"I\",\"Î\":\"I\",\"Ĩ\":\"I\",\"Ī\":\"I\",\"Ĭ\":\"I\",\"İ\":\"I\",\"Ï\":\"I\",\"Ḯ\":\"I\",\"Ỉ\":\"I\",\"Ǐ\":\"I\",\"Ȉ\":\"I\",\"Ȋ\":\"I\",\"Ị\":\"I\",\"Į\":\"I\",\"Ḭ\":\"I\",\"Ɨ\":\"I\",\"Ⓙ\":\"J\",\"J\":\"J\",\"Ĵ\":\"J\",\"Ɉ\":\"J\",\"Ⓚ\":\"K\",\"K\":\"K\",\"Ḱ\":\"K\",\"Ǩ\":\"K\",\"Ḳ\":\"K\",\"Ķ\":\"K\",\"Ḵ\":\"K\",\"Ƙ\":\"K\",\"Ⱪ\":\"K\",\"Ꝁ\":\"K\",\"Ꝃ\":\"K\",\"Ꝅ\":\"K\",\"Ꞣ\":\"K\",\"Ⓛ\":\"L\",\"L\":\"L\",\"Ŀ\":\"L\",\"Ĺ\":\"L\",\"Ľ\":\"L\",\"Ḷ\":\"L\",\"Ḹ\":\"L\",\"Ļ\":\"L\",\"Ḽ\":\"L\",\"Ḻ\":\"L\",\"Ł\":\"L\",\"Ƚ\":\"L\",\"Ɫ\":\"L\",\"Ⱡ\":\"L\",\"Ꝉ\":\"L\",\"Ꝇ\":\"L\",\"Ꞁ\":\"L\",\"LJ\":\"LJ\",\"Lj\":\"Lj\",\"Ⓜ\":\"M\",\"M\":\"M\",\"Ḿ\":\"M\",\"Ṁ\":\"M\",\"Ṃ\":\"M\",\"Ɱ\":\"M\",\"Ɯ\":\"M\",\"Ⓝ\":\"N\",\"N\":\"N\",\"Ǹ\":\"N\",\"Ń\":\"N\",\"Ñ\":\"N\",\"Ṅ\":\"N\",\"Ň\":\"N\",\"Ṇ\":\"N\",\"Ņ\":\"N\",\"Ṋ\":\"N\",\"Ṉ\":\"N\",\"Ƞ\":\"N\",\"Ɲ\":\"N\",\"Ꞑ\":\"N\",\"Ꞥ\":\"N\",\"NJ\":\"NJ\",\"Nj\":\"Nj\",\"Ⓞ\":\"O\",\"O\":\"O\",\"Ò\":\"O\",\"Ó\":\"O\",\"Ô\":\"O\",\"Ồ\":\"O\",\"Ố\":\"O\",\"Ỗ\":\"O\",\"Ổ\":\"O\",\"Õ\":\"O\",\"Ṍ\":\"O\",\"Ȭ\":\"O\",\"Ṏ\":\"O\",\"Ō\":\"O\",\"Ṑ\":\"O\",\"Ṓ\":\"O\",\"Ŏ\":\"O\",\"Ȯ\":\"O\",\"Ȱ\":\"O\",\"Ö\":\"O\",\"Ȫ\":\"O\",\"Ỏ\":\"O\",\"Ő\":\"O\",\"Ǒ\":\"O\",\"Ȍ\":\"O\",\"Ȏ\":\"O\",\"Ơ\":\"O\",\"Ờ\":\"O\",\"Ớ\":\"O\",\"Ỡ\":\"O\",\"Ở\":\"O\",\"Ợ\":\"O\",\"Ọ\":\"O\",\"Ộ\":\"O\",\"Ǫ\":\"O\",\"Ǭ\":\"O\",\"Ø\":\"O\",\"Ǿ\":\"O\",\"Ɔ\":\"O\",\"Ɵ\":\"O\",\"Ꝋ\":\"O\",\"Ꝍ\":\"O\",\"Ƣ\":\"OI\",\"Ꝏ\":\"OO\",\"Ȣ\":\"OU\",\"Ⓟ\":\"P\",\"P\":\"P\",\"Ṕ\":\"P\",\"Ṗ\":\"P\",\"Ƥ\":\"P\",\"Ᵽ\":\"P\",\"Ꝑ\":\"P\",\"Ꝓ\":\"P\",\"Ꝕ\":\"P\",\"Ⓠ\":\"Q\",\"Q\":\"Q\",\"Ꝗ\":\"Q\",\"Ꝙ\":\"Q\",\"Ɋ\":\"Q\",\"Ⓡ\":\"R\",\"R\":\"R\",\"Ŕ\":\"R\",\"Ṙ\":\"R\",\"Ř\":\"R\",\"Ȑ\":\"R\",\"Ȓ\":\"R\",\"Ṛ\":\"R\",\"Ṝ\":\"R\",\"Ŗ\":\"R\",\"Ṟ\":\"R\",\"Ɍ\":\"R\",\"Ɽ\":\"R\",\"Ꝛ\":\"R\",\"Ꞧ\":\"R\",\"Ꞃ\":\"R\",\"Ⓢ\":\"S\",\"S\":\"S\",\"ẞ\":\"S\",\"Ś\":\"S\",\"Ṥ\":\"S\",\"Ŝ\":\"S\",\"Ṡ\":\"S\",\"Š\":\"S\",\"Ṧ\":\"S\",\"Ṣ\":\"S\",\"Ṩ\":\"S\",\"Ș\":\"S\",\"Ş\":\"S\",\"Ȿ\":\"S\",\"Ꞩ\":\"S\",\"Ꞅ\":\"S\",\"Ⓣ\":\"T\",\"T\":\"T\",\"Ṫ\":\"T\",\"Ť\":\"T\",\"Ṭ\":\"T\",\"Ț\":\"T\",\"Ţ\":\"T\",\"Ṱ\":\"T\",\"Ṯ\":\"T\",\"Ŧ\":\"T\",\"Ƭ\":\"T\",\"Ʈ\":\"T\",\"Ⱦ\":\"T\",\"Ꞇ\":\"T\",\"Ꜩ\":\"TZ\",\"Ⓤ\":\"U\",\"U\":\"U\",\"Ù\":\"U\",\"Ú\":\"U\",\"Û\":\"U\",\"Ũ\":\"U\",\"Ṹ\":\"U\",\"Ū\":\"U\",\"Ṻ\":\"U\",\"Ŭ\":\"U\",\"Ü\":\"U\",\"Ǜ\":\"U\",\"Ǘ\":\"U\",\"Ǖ\":\"U\",\"Ǚ\":\"U\",\"Ủ\":\"U\",\"Ů\":\"U\",\"Ű\":\"U\",\"Ǔ\":\"U\",\"Ȕ\":\"U\",\"Ȗ\":\"U\",\"Ư\":\"U\",\"Ừ\":\"U\",\"Ứ\":\"U\",\"Ữ\":\"U\",\"Ử\":\"U\",\"Ự\":\"U\",\"Ụ\":\"U\",\"Ṳ\":\"U\",\"Ų\":\"U\",\"Ṷ\":\"U\",\"Ṵ\":\"U\",\"Ʉ\":\"U\",\"Ⓥ\":\"V\",\"V\":\"V\",\"Ṽ\":\"V\",\"Ṿ\":\"V\",\"Ʋ\":\"V\",\"Ꝟ\":\"V\",\"Ʌ\":\"V\",\"Ꝡ\":\"VY\",\"Ⓦ\":\"W\",\"W\":\"W\",\"Ẁ\":\"W\",\"Ẃ\":\"W\",\"Ŵ\":\"W\",\"Ẇ\":\"W\",\"Ẅ\":\"W\",\"Ẉ\":\"W\",\"Ⱳ\":\"W\",\"Ⓧ\":\"X\",\"X\":\"X\",\"Ẋ\":\"X\",\"Ẍ\":\"X\",\"Ⓨ\":\"Y\",\"Y\":\"Y\",\"Ỳ\":\"Y\",\"Ý\":\"Y\",\"Ŷ\":\"Y\",\"Ỹ\":\"Y\",\"Ȳ\":\"Y\",\"Ẏ\":\"Y\",\"Ÿ\":\"Y\",\"Ỷ\":\"Y\",\"Ỵ\":\"Y\",\"Ƴ\":\"Y\",\"Ɏ\":\"Y\",\"Ỿ\":\"Y\",\"Ⓩ\":\"Z\",\"Z\":\"Z\",\"Ź\":\"Z\",\"Ẑ\":\"Z\",\"Ż\":\"Z\",\"Ž\":\"Z\",\"Ẓ\":\"Z\",\"Ẕ\":\"Z\",\"Ƶ\":\"Z\",\"Ȥ\":\"Z\",\"Ɀ\":\"Z\",\"Ⱬ\":\"Z\",\"Ꝣ\":\"Z\",\"ⓐ\":\"a\",\"a\":\"a\",\"ẚ\":\"a\",\"à\":\"a\",\"á\":\"a\",\"â\":\"a\",\"ầ\":\"a\",\"ấ\":\"a\",\"ẫ\":\"a\",\"ẩ\":\"a\",\"ã\":\"a\",\"ā\":\"a\",\"ă\":\"a\",\"ằ\":\"a\",\"ắ\":\"a\",\"ẵ\":\"a\",\"ẳ\":\"a\",\"ȧ\":\"a\",\"ǡ\":\"a\",\"ä\":\"a\",\"ǟ\":\"a\",\"ả\":\"a\",\"å\":\"a\",\"ǻ\":\"a\",\"ǎ\":\"a\",\"ȁ\":\"a\",\"ȃ\":\"a\",\"ạ\":\"a\",\"ậ\":\"a\",\"ặ\":\"a\",\"ḁ\":\"a\",\"ą\":\"a\",\"ⱥ\":\"a\",\"ɐ\":\"a\",\"ꜳ\":\"aa\",\"æ\":\"ae\",\"ǽ\":\"ae\",\"ǣ\":\"ae\",\"ꜵ\":\"ao\",\"ꜷ\":\"au\",\"ꜹ\":\"av\",\"ꜻ\":\"av\",\"ꜽ\":\"ay\",\"ⓑ\":\"b\",\"b\":\"b\",\"ḃ\":\"b\",\"ḅ\":\"b\",\"ḇ\":\"b\",\"ƀ\":\"b\",\"ƃ\":\"b\",\"ɓ\":\"b\",\"ⓒ\":\"c\",\"c\":\"c\",\"ć\":\"c\",\"ĉ\":\"c\",\"ċ\":\"c\",\"č\":\"c\",\"ç\":\"c\",\"ḉ\":\"c\",\"ƈ\":\"c\",\"ȼ\":\"c\",\"ꜿ\":\"c\",\"ↄ\":\"c\",\"ⓓ\":\"d\",\"d\":\"d\",\"ḋ\":\"d\",\"ď\":\"d\",\"ḍ\":\"d\",\"ḑ\":\"d\",\"ḓ\":\"d\",\"ḏ\":\"d\",\"đ\":\"d\",\"ƌ\":\"d\",\"ɖ\":\"d\",\"ɗ\":\"d\",\"ꝺ\":\"d\",\"dz\":\"dz\",\"dž\":\"dz\",\"ⓔ\":\"e\",\"e\":\"e\",\"è\":\"e\",\"é\":\"e\",\"ê\":\"e\",\"ề\":\"e\",\"ế\":\"e\",\"ễ\":\"e\",\"ể\":\"e\",\"ẽ\":\"e\",\"ē\":\"e\",\"ḕ\":\"e\",\"ḗ\":\"e\",\"ĕ\":\"e\",\"ė\":\"e\",\"ë\":\"e\",\"ẻ\":\"e\",\"ě\":\"e\",\"ȅ\":\"e\",\"ȇ\":\"e\",\"ẹ\":\"e\",\"ệ\":\"e\",\"ȩ\":\"e\",\"ḝ\":\"e\",\"ę\":\"e\",\"ḙ\":\"e\",\"ḛ\":\"e\",\"ɇ\":\"e\",\"ɛ\":\"e\",\"ǝ\":\"e\",\"ⓕ\":\"f\",\"f\":\"f\",\"ḟ\":\"f\",\"ƒ\":\"f\",\"ꝼ\":\"f\",\"ⓖ\":\"g\",\"g\":\"g\",\"ǵ\":\"g\",\"ĝ\":\"g\",\"ḡ\":\"g\",\"ğ\":\"g\",\"ġ\":\"g\",\"ǧ\":\"g\",\"ģ\":\"g\",\"ǥ\":\"g\",\"ɠ\":\"g\",\"ꞡ\":\"g\",\"ᵹ\":\"g\",\"ꝿ\":\"g\",\"ⓗ\":\"h\",\"h\":\"h\",\"ĥ\":\"h\",\"ḣ\":\"h\",\"ḧ\":\"h\",\"ȟ\":\"h\",\"ḥ\":\"h\",\"ḩ\":\"h\",\"ḫ\":\"h\",\"ẖ\":\"h\",\"ħ\":\"h\",\"ⱨ\":\"h\",\"ⱶ\":\"h\",\"ɥ\":\"h\",\"ƕ\":\"hv\",\"ⓘ\":\"i\",\"i\":\"i\",\"ì\":\"i\",\"í\":\"i\",\"î\":\"i\",\"ĩ\":\"i\",\"ī\":\"i\",\"ĭ\":\"i\",\"ï\":\"i\",\"ḯ\":\"i\",\"ỉ\":\"i\",\"ǐ\":\"i\",\"ȉ\":\"i\",\"ȋ\":\"i\",\"ị\":\"i\",\"į\":\"i\",\"ḭ\":\"i\",\"ɨ\":\"i\",\"ı\":\"i\",\"ⓙ\":\"j\",\"j\":\"j\",\"ĵ\":\"j\",\"ǰ\":\"j\",\"ɉ\":\"j\",\"ⓚ\":\"k\",\"k\":\"k\",\"ḱ\":\"k\",\"ǩ\":\"k\",\"ḳ\":\"k\",\"ķ\":\"k\",\"ḵ\":\"k\",\"ƙ\":\"k\",\"ⱪ\":\"k\",\"ꝁ\":\"k\",\"ꝃ\":\"k\",\"ꝅ\":\"k\",\"ꞣ\":\"k\",\"ⓛ\":\"l\",\"l\":\"l\",\"ŀ\":\"l\",\"ĺ\":\"l\",\"ľ\":\"l\",\"ḷ\":\"l\",\"ḹ\":\"l\",\"ļ\":\"l\",\"ḽ\":\"l\",\"ḻ\":\"l\",\"ſ\":\"l\",\"ł\":\"l\",\"ƚ\":\"l\",\"ɫ\":\"l\",\"ⱡ\":\"l\",\"ꝉ\":\"l\",\"ꞁ\":\"l\",\"ꝇ\":\"l\",\"lj\":\"lj\",\"ⓜ\":\"m\",\"m\":\"m\",\"ḿ\":\"m\",\"ṁ\":\"m\",\"ṃ\":\"m\",\"ɱ\":\"m\",\"ɯ\":\"m\",\"ⓝ\":\"n\",\"n\":\"n\",\"ǹ\":\"n\",\"ń\":\"n\",\"ñ\":\"n\",\"ṅ\":\"n\",\"ň\":\"n\",\"ṇ\":\"n\",\"ņ\":\"n\",\"ṋ\":\"n\",\"ṉ\":\"n\",\"ƞ\":\"n\",\"ɲ\":\"n\",\"ʼn\":\"n\",\"ꞑ\":\"n\",\"ꞥ\":\"n\",\"nj\":\"nj\",\"ⓞ\":\"o\",\"o\":\"o\",\"ò\":\"o\",\"ó\":\"o\",\"ô\":\"o\",\"ồ\":\"o\",\"ố\":\"o\",\"ỗ\":\"o\",\"ổ\":\"o\",\"õ\":\"o\",\"ṍ\":\"o\",\"ȭ\":\"o\",\"ṏ\":\"o\",\"ō\":\"o\",\"ṑ\":\"o\",\"ṓ\":\"o\",\"ŏ\":\"o\",\"ȯ\":\"o\",\"ȱ\":\"o\",\"ö\":\"o\",\"ȫ\":\"o\",\"ỏ\":\"o\",\"ő\":\"o\",\"ǒ\":\"o\",\"ȍ\":\"o\",\"ȏ\":\"o\",\"ơ\":\"o\",\"ờ\":\"o\",\"ớ\":\"o\",\"ỡ\":\"o\",\"ở\":\"o\",\"ợ\":\"o\",\"ọ\":\"o\",\"ộ\":\"o\",\"ǫ\":\"o\",\"ǭ\":\"o\",\"ø\":\"o\",\"ǿ\":\"o\",\"ɔ\":\"o\",\"ꝋ\":\"o\",\"ꝍ\":\"o\",\"ɵ\":\"o\",\"ƣ\":\"oi\",\"ȣ\":\"ou\",\"ꝏ\":\"oo\",\"ⓟ\":\"p\",\"p\":\"p\",\"ṕ\":\"p\",\"ṗ\":\"p\",\"ƥ\":\"p\",\"ᵽ\":\"p\",\"ꝑ\":\"p\",\"ꝓ\":\"p\",\"ꝕ\":\"p\",\"ⓠ\":\"q\",\"q\":\"q\",\"ɋ\":\"q\",\"ꝗ\":\"q\",\"ꝙ\":\"q\",\"ⓡ\":\"r\",\"r\":\"r\",\"ŕ\":\"r\",\"ṙ\":\"r\",\"ř\":\"r\",\"ȑ\":\"r\",\"ȓ\":\"r\",\"ṛ\":\"r\",\"ṝ\":\"r\",\"ŗ\":\"r\",\"ṟ\":\"r\",\"ɍ\":\"r\",\"ɽ\":\"r\",\"ꝛ\":\"r\",\"ꞧ\":\"r\",\"ꞃ\":\"r\",\"ⓢ\":\"s\",\"s\":\"s\",\"ß\":\"s\",\"ś\":\"s\",\"ṥ\":\"s\",\"ŝ\":\"s\",\"ṡ\":\"s\",\"š\":\"s\",\"ṧ\":\"s\",\"ṣ\":\"s\",\"ṩ\":\"s\",\"ș\":\"s\",\"ş\":\"s\",\"ȿ\":\"s\",\"ꞩ\":\"s\",\"ꞅ\":\"s\",\"ẛ\":\"s\",\"ⓣ\":\"t\",\"t\":\"t\",\"ṫ\":\"t\",\"ẗ\":\"t\",\"ť\":\"t\",\"ṭ\":\"t\",\"ț\":\"t\",\"ţ\":\"t\",\"ṱ\":\"t\",\"ṯ\":\"t\",\"ŧ\":\"t\",\"ƭ\":\"t\",\"ʈ\":\"t\",\"ⱦ\":\"t\",\"ꞇ\":\"t\",\"ꜩ\":\"tz\",\"ⓤ\":\"u\",\"u\":\"u\",\"ù\":\"u\",\"ú\":\"u\",\"û\":\"u\",\"ũ\":\"u\",\"ṹ\":\"u\",\"ū\":\"u\",\"ṻ\":\"u\",\"ŭ\":\"u\",\"ü\":\"u\",\"ǜ\":\"u\",\"ǘ\":\"u\",\"ǖ\":\"u\",\"ǚ\":\"u\",\"ủ\":\"u\",\"ů\":\"u\",\"ű\":\"u\",\"ǔ\":\"u\",\"ȕ\":\"u\",\"ȗ\":\"u\",\"ư\":\"u\",\"ừ\":\"u\",\"ứ\":\"u\",\"ữ\":\"u\",\"ử\":\"u\",\"ự\":\"u\",\"ụ\":\"u\",\"ṳ\":\"u\",\"ų\":\"u\",\"ṷ\":\"u\",\"ṵ\":\"u\",\"ʉ\":\"u\",\"ⓥ\":\"v\",\"v\":\"v\",\"ṽ\":\"v\",\"ṿ\":\"v\",\"ʋ\":\"v\",\"ꝟ\":\"v\",\"ʌ\":\"v\",\"ꝡ\":\"vy\",\"ⓦ\":\"w\",\"w\":\"w\",\"ẁ\":\"w\",\"ẃ\":\"w\",\"ŵ\":\"w\",\"ẇ\":\"w\",\"ẅ\":\"w\",\"ẘ\":\"w\",\"ẉ\":\"w\",\"ⱳ\":\"w\",\"ⓧ\":\"x\",\"x\":\"x\",\"ẋ\":\"x\",\"ẍ\":\"x\",\"ⓨ\":\"y\",\"y\":\"y\",\"ỳ\":\"y\",\"ý\":\"y\",\"ŷ\":\"y\",\"ỹ\":\"y\",\"ȳ\":\"y\",\"ẏ\":\"y\",\"ÿ\":\"y\",\"ỷ\":\"y\",\"ẙ\":\"y\",\"ỵ\":\"y\",\"ƴ\":\"y\",\"ɏ\":\"y\",\"ỿ\":\"y\",\"ⓩ\":\"z\",\"z\":\"z\",\"ź\":\"z\",\"ẑ\":\"z\",\"ż\":\"z\",\"ž\":\"z\",\"ẓ\":\"z\",\"ẕ\":\"z\",\"ƶ\":\"z\",\"ȥ\":\"z\",\"ɀ\":\"z\",\"ⱬ\":\"z\",\"ꝣ\":\"z\"};$document=$(document),nextUid=function(){var counter=1;return function(){return counter++}}(),$document.on(\"mousemove\",function(e){lastMousePosition.x=e.pageX,lastMousePosition.y=e.pageY}),AbstractSelect2=clazz(Object,{bind:function(func){var self=this;return function(){func.apply(self,arguments)}},init:function(opts){var results,search,resultsSelector=\".select2-results\";this.opts=opts=this.prepareOpts(opts),this.id=opts.id,opts.element.data(\"select2\")!==undefined&&null!==opts.element.data(\"select2\")&&opts.element.data(\"select2\").destroy(),this.container=this.createContainer(),this.liveRegion=$(\"<span>\",{role:\"status\",\"aria-live\":\"polite\"}).addClass(\"select2-hidden-accessible\").appendTo(document.body),this.containerId=\"s2id_\"+(opts.element.attr(\"id\")||\"autogen\"+nextUid()),this.containerEventName=this.containerId.replace(/([.])/g,\"_\").replace(/([;&,\\-\\.\\+\\*\\~':\"\\!\\^#$%@\\[\\]\\(\\)=>\\|])/g,\"\\\\$1\"),this.container.attr(\"id\",this.containerId),this.container.attr(\"title\",opts.element.attr(\"title\")),this.body=$(\"body\"),syncCssClasses(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.attr(\"style\",opts.element.attr(\"style\")),this.container.css(evaluate(opts.containerCss)),this.container.addClass(evaluate(opts.containerCssClass)),this.elementTabIndex=this.opts.element.attr(\"tabindex\"),this.opts.element.data(\"select2\",this).attr(\"tabindex\",\"-1\").before(this.container).on(\"click.select2\",killEvent),this.container.data(\"select2\",this),this.dropdown=this.container.find(\".select2-drop\"),syncCssClasses(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(evaluate(opts.dropdownCssClass)),this.dropdown.data(\"select2\",this),this.dropdown.on(\"click\",killEvent),this.results=results=this.container.find(resultsSelector),this.search=search=this.container.find(\"input.select2-input\"),this.queryCount=0,this.resultsPage=0,this.context=null,this.initContainer(),this.container.on(\"click\",killEvent),installFilteredMouseMove(this.results),this.dropdown.on(\"mousemove-filtered\",resultsSelector,this.bind(this.highlightUnderEvent)),this.dropdown.on(\"touchstart touchmove touchend\",resultsSelector,this.bind(function(event){this._touchEvent=!0,this.highlightUnderEvent(event)})),this.dropdown.on(\"touchmove\",resultsSelector,this.bind(this.touchMoved)),this.dropdown.on(\"touchstart touchend\",resultsSelector,this.bind(this.clearTouchMoved)),this.dropdown.on(\"click\",this.bind(function(event){this._touchEvent&&(this._touchEvent=!1,this.selectHighlighted())})),installDebouncedScroll(80,this.results),this.dropdown.on(\"scroll-debounced\",resultsSelector,this.bind(this.loadMoreIfNeeded)),$(this.container).on(\"change\",\".select2-input\",function(e){e.stopPropagation()}),$(this.dropdown).on(\"change\",\".select2-input\",function(e){e.stopPropagation()}),$.fn.mousewheel&&results.mousewheel(function(e,delta,deltaX,deltaY){var top=results.scrollTop();deltaY>0&&top-deltaY<=0?(results.scrollTop(0),killEvent(e)):deltaY<0&&results.get(0).scrollHeight-results.scrollTop()+deltaY<=results.height()&&(results.scrollTop(results.get(0).scrollHeight-results.height()),killEvent(e))}),installKeyUpChangeEvent(search),search.on(\"keyup-change input paste\",this.bind(this.updateResults)),search.on(\"focus\",function(){search.addClass(\"select2-focused\")}),search.on(\"blur\",function(){search.removeClass(\"select2-focused\")}),this.dropdown.on(\"mouseup\",resultsSelector,this.bind(function(e){$(e.target).closest(\".select2-result-selectable\").length>0&&(this.highlightUnderEvent(e),this.selectHighlighted(e))})),this.dropdown.on(\"click mouseup mousedown touchstart touchend focusin\",function(e){e.stopPropagation()}),this.nextSearchTerm=undefined,$.isFunction(this.opts.initSelection)&&(this.initSelection(),this.monitorSource()),null!==opts.maximumInputLength&&this.search.attr(\"maxlength\",opts.maximumInputLength);var disabled=opts.element.prop(\"disabled\");disabled===undefined&&(disabled=!1),this.enable(!disabled);var readonly=opts.element.prop(\"readonly\");readonly===undefined&&(readonly=!1),this.readonly(readonly),scrollBarDimensions=scrollBarDimensions||measureScrollbar(),this.autofocus=opts.element.prop(\"autofocus\"),opts.element.prop(\"autofocus\",!1),this.autofocus&&this.focus(),this.search.attr(\"placeholder\",opts.searchInputPlaceholder)},destroy:function(){var element=this.opts.element,select2=element.data(\"select2\");this.close(),this.propertyObserver&&(this.propertyObserver.disconnect(),this.propertyObserver=null),select2!==undefined&&(select2.container.remove(),select2.liveRegion.remove(),select2.dropdown.remove(),element.removeClass(\"select2-offscreen\").removeData(\"select2\").off(\".select2\").prop(\"autofocus\",this.autofocus||!1),this.elementTabIndex?element.attr({tabindex:this.elementTabIndex}):element.removeAttr(\"tabindex\"),element.show()),cleanupJQueryElements.call(this,\"container\",\"liveRegion\",\"dropdown\",\"results\",\"search\")},optionToData:function(element){return element.is(\"option\")?{id:element.prop(\"value\"),text:element.text(),element:element.get(),css:element.attr(\"class\"),disabled:element.prop(\"disabled\"),locked:equal(element.attr(\"locked\"),\"locked\")||equal(element.data(\"locked\"),!0)}:element.is(\"optgroup\")?{text:element.attr(\"label\"),children:[],element:element.get(),css:element.attr(\"class\")}:void 0},prepareOpts:function(opts){var element,select,idKey,ajaxUrl,self=this;if(element=opts.element,\"select\"===element.get(0).tagName.toLowerCase()&&(this.select=select=opts.element),select&&$.each([\"id\",\"multiple\",\"ajax\",\"query\",\"createSearchChoice\",\"initSelection\",\"data\",\"tags\"],function(){if(this in opts)throw new Error(\"Option '\"+this+\"' is not allowed for Select2 when attached to a <select> element.\")}),opts=$.extend({},{populateResults:function(container,results,query){var populate,id=this.opts.id,liveRegion=this.liveRegion;(populate=function(results,container,depth){var i,l,result,selectable,disabled,compound,node,label,innerContainer,formatted;for(results=opts.sortResults(results,container,query),i=0,l=results.length;i<l;i+=1)result=results[i],disabled=result.disabled===!0,selectable=!disabled&&id(result)!==undefined,compound=result.children&&result.children.length>0,node=$(\"<li></li>\"),node.addClass(\"select2-results-dept-\"+depth),node.addClass(\"select2-result\"),node.addClass(selectable?\"select2-result-selectable\":\"select2-result-unselectable\"),disabled&&node.addClass(\"select2-disabled\"),compound&&node.addClass(\"select2-result-with-children\"),node.addClass(self.opts.formatResultCssClass(result)),node.attr(\"role\",\"presentation\"),label=$(document.createElement(\"div\")),label.addClass(\"select2-result-label\"),label.attr(\"id\",\"select2-result-label-\"+nextUid()),label.attr(\"role\",\"option\"),formatted=opts.formatResult(result,label,query,self.opts.escapeMarkup),formatted!==undefined&&(label.html(formatted),node.append(label)),compound&&(innerContainer=$(\"<ul></ul>\"),innerContainer.addClass(\"select2-result-sub\"),populate(result.children,innerContainer,depth+1),node.append(innerContainer)),node.data(\"select2-data\",result),container.append(node);liveRegion.text(opts.formatMatches(results.length))})(results,container,0)}},$.fn.select2.defaults,opts),\"function\"!=typeof opts.id&&(idKey=opts.id,opts.id=function(e){return e[idKey]}),$.isArray(opts.element.data(\"select2Tags\"))){if(\"tags\"in opts)throw\"tags specified as both an attribute 'data-select2-tags' and in options of Select2 \"+opts.element.attr(\"id\");opts.tags=opts.element.data(\"select2Tags\")}if(select?(opts.query=this.bind(function(query){var children,placeholderOption,process,data={results:[],more:!1},term=query.term;process=function(element,collection){var group;element.is(\"option\")?query.matcher(term,element.text(),element)&&collection.push(self.optionToData(element)):element.is(\"optgroup\")&&(group=self.optionToData(element),element.children().each2(function(i,elm){process(elm,group.children)}),group.children.length>0&&collection.push(group))},children=element.children(),this.getPlaceholder()!==undefined&&children.length>0&&(placeholderOption=this.getPlaceholderOption(),placeholderOption&&(children=children.not(placeholderOption))),children.each2(function(i,elm){process(elm,data.results)}),query.callback(data)}),opts.id=function(e){return e.id}):\"query\"in opts||(\"ajax\"in opts?(ajaxUrl=opts.element.data(\"ajax-url\"),ajaxUrl&&ajaxUrl.length>0&&(opts.ajax.url=ajaxUrl),opts.query=ajax.call(opts.element,opts.ajax)):\"data\"in opts?opts.query=local(opts.data):\"tags\"in opts&&(opts.query=tags(opts.tags),opts.createSearchChoice===undefined&&(opts.createSearchChoice=function(term){return{id:$.trim(term),text:$.trim(term)}}),opts.initSelection===undefined&&(opts.initSelection=function(element,callback){var data=[];$(splitVal(element.val(),opts.separator)).each(function(){var obj={id:this,text:this},tags=opts.tags;$.isFunction(tags)&&(tags=tags()),$(tags).each(function(){if(equal(this.id,obj.id))return obj=this,!1}),data.push(obj)}),callback(data)}))),\"function\"!=typeof opts.query)throw\"query function not defined for Select2 \"+opts.element.attr(\"id\");if(\"top\"===opts.createSearchChoicePosition)opts.createSearchChoicePosition=function(list,item){list.unshift(item)};else if(\"bottom\"===opts.createSearchChoicePosition)opts.createSearchChoicePosition=function(list,item){list.push(item)};else if(\"function\"!=typeof opts.createSearchChoicePosition)throw\"invalid createSearchChoicePosition option must be 'top', 'bottom' or a custom function\";return opts},monitorSource:function(){var sync,observer,el=this.opts.element;el.on(\"change.select2\",this.bind(function(e){this.opts.element.data(\"select2-change-triggered\")!==!0&&this.initSelection()})),sync=this.bind(function(){var disabled=el.prop(\"disabled\");disabled===undefined&&(disabled=!1),this.enable(!disabled);var readonly=el.prop(\"readonly\");readonly===undefined&&(readonly=!1),this.readonly(readonly),syncCssClasses(this.container,this.opts.element,this.opts.adaptContainerCssClass),this.container.addClass(evaluate(this.opts.containerCssClass)),syncCssClasses(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass),this.dropdown.addClass(evaluate(this.opts.dropdownCssClass))}),el.length&&el[0].attachEvent&&el.each(function(){this.attachEvent(\"onpropertychange\",sync)}),observer=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,observer!==undefined&&(this.propertyObserver&&(delete this.propertyObserver,this.propertyObserver=null),this.propertyObserver=new observer(function(mutations){mutations.forEach(sync)}),this.propertyObserver.observe(el.get(0),{attributes:!0,subtree:!1}))},triggerSelect:function(data){var evt=$.Event(\"select2-selecting\",{val:this.id(data),object:data});return this.opts.element.trigger(evt),!evt.isDefaultPrevented()},triggerChange:function(details){details=details||{},details=$.extend({},details,{type:\"change\",val:this.val()}),this.opts.element.data(\"select2-change-triggered\",!0),this.opts.element.trigger(details),this.opts.element.data(\"select2-change-triggered\",!1),this.opts.element.click(),this.opts.blurOnChange&&this.opts.element.blur()},isInterfaceEnabled:function(){return this.enabledInterface===!0},enableInterface:function(){var enabled=this._enabled&&!this._readonly,disabled=!enabled;return enabled!==this.enabledInterface&&(this.container.toggleClass(\"select2-container-disabled\",disabled),this.close(),this.enabledInterface=enabled,!0)},enable:function(enabled){enabled===undefined&&(enabled=!0),this._enabled!==enabled&&(this._enabled=enabled,this.opts.element.prop(\"disabled\",!enabled),this.enableInterface())},disable:function(){this.enable(!1)},readonly:function(enabled){enabled===undefined&&(enabled=!1),this._readonly!==enabled&&(this._readonly=enabled,this.opts.element.prop(\"readonly\",enabled),this.enableInterface())},opened:function(){return this.container.hasClass(\"select2-dropdown-open\")},positionDropdown:function(){var bodyOffset,above,changeDirection,css,resultsListNode,$dropdown=this.dropdown,offset=this.container.offset(),height=this.container.outerHeight(!1),width=this.container.outerWidth(!1),dropHeight=$dropdown.outerHeight(!1),$window=$(window),windowWidth=$window.width(),windowHeight=$window.height(),viewPortRight=$window.scrollLeft()+windowWidth,viewportBottom=$window.scrollTop()+windowHeight,dropTop=offset.top+height,dropLeft=offset.left,enoughRoomBelow=dropTop+dropHeight<=viewportBottom,enoughRoomAbove=offset.top-dropHeight>=$window.scrollTop(),dropWidth=$dropdown.outerWidth(!1),enoughRoomOnRight=dropLeft+dropWidth<=viewPortRight,aboveNow=$dropdown.hasClass(\"select2-drop-above\");aboveNow?(above=!0,!enoughRoomAbove&&enoughRoomBelow&&(changeDirection=!0,above=!1)):(above=!1,!enoughRoomBelow&&enoughRoomAbove&&(changeDirection=!0,above=!0)),changeDirection&&($dropdown.hide(),offset=this.container.offset(),height=this.container.outerHeight(!1),width=this.container.outerWidth(!1),dropHeight=$dropdown.outerHeight(!1),viewPortRight=$window.scrollLeft()+windowWidth,viewportBottom=$window.scrollTop()+windowHeight,dropTop=offset.top+height,dropLeft=offset.left,dropWidth=$dropdown.outerWidth(!1),enoughRoomOnRight=dropLeft+dropWidth<=viewPortRight,$dropdown.show(),this.focusSearch()),this.opts.dropdownAutoWidth?(resultsListNode=$(\".select2-results\",$dropdown)[0],$dropdown.addClass(\"select2-drop-auto-width\"),$dropdown.css(\"width\",\"\"),dropWidth=$dropdown.outerWidth(!1)+(resultsListNode.scrollHeight===resultsListNode.clientHeight?0:scrollBarDimensions.width),dropWidth>width?width=dropWidth:dropWidth=width,dropHeight=$dropdown.outerHeight(!1),enoughRoomOnRight=dropLeft+dropWidth<=viewPortRight):this.container.removeClass(\"select2-drop-auto-width\"),\"static\"!==this.body.css(\"position\")&&(bodyOffset=this.body.offset(),dropTop-=bodyOffset.top,dropLeft-=bodyOffset.left),enoughRoomOnRight||(dropLeft=offset.left+this.container.outerWidth(!1)-dropWidth),css={left:dropLeft,width:width},above?(css.top=offset.top-dropHeight,css.bottom=\"auto\",this.container.addClass(\"select2-drop-above\"),$dropdown.addClass(\"select2-drop-above\")):(css.top=dropTop,css.bottom=\"auto\",this.container.removeClass(\"select2-drop-above\"),$dropdown.removeClass(\"select2-drop-above\")),css=$.extend(css,evaluate(this.opts.dropdownCss)),$dropdown.css(css)},shouldOpen:function(){var event;return!this.opened()&&(this._enabled!==!1&&this._readonly!==!0&&(event=$.Event(\"select2-opening\"),this.opts.element.trigger(event),!event.isDefaultPrevented()))},clearDropdownAlignmentPreference:function(){this.container.removeClass(\"select2-drop-above\"),this.dropdown.removeClass(\"select2-drop-above\")},open:function(){return!!this.shouldOpen()&&(this.opening(),!0)},opening:function(){var mask,cid=this.containerEventName,scroll=\"scroll.\"+cid,resize=\"resize.\"+cid,orient=\"orientationchange.\"+cid;this.container.addClass(\"select2-dropdown-open\").addClass(\"select2-container-active\"),this.clearDropdownAlignmentPreference(),this.dropdown[0]!==this.body.children().last()[0]&&this.dropdown.detach().appendTo(this.body),mask=$(\"#select2-drop-mask\"),0==mask.length&&(mask=$(document.createElement(\"div\")),mask.attr(\"id\",\"select2-drop-mask\").attr(\"class\",\"select2-drop-mask\"),mask.hide(),mask.appendTo(this.body),mask.on(\"mousedown touchstart click\",function(e){reinsertElement(mask);var self,dropdown=$(\"#select2-drop\");dropdown.length>0&&(self=dropdown.data(\"select2\"),self.opts.selectOnBlur&&self.selectHighlighted({noFocus:!0}),self.close(),e.preventDefault(),e.stopPropagation())})),this.dropdown.prev()[0]!==mask[0]&&this.dropdown.before(mask),$(\"#select2-drop\").removeAttr(\"id\"),this.dropdown.attr(\"id\",\"select2-drop\"),mask.show(),this.positionDropdown(),this.dropdown.show(),this.positionDropdown(),this.dropdown.addClass(\"select2-drop-active\");var that=this;this.container.parents().add(window).each(function(){$(this).on(resize+\" \"+scroll+\" \"+orient,function(e){that.opened()&&that.positionDropdown()})})},close:function(){if(this.opened()){var cid=this.containerEventName,scroll=\"scroll.\"+cid,resize=\"resize.\"+cid,orient=\"orientationchange.\"+cid;this.container.parents().add(window).each(function(){$(this).off(scroll).off(resize).off(orient)}),this.clearDropdownAlignmentPreference(),$(\"#select2-drop-mask\").hide(),this.dropdown.removeAttr(\"id\"),this.dropdown.hide(),this.container.removeClass(\"select2-dropdown-open\").removeClass(\"select2-container-active\"),this.results.empty(),this.clearSearch(),this.search.removeClass(\"select2-active\"),this.opts.element.trigger($.Event(\"select2-close\"))}},externalSearch:function(term){this.open(),this.search.val(term),this.updateResults(!1)},clearSearch:function(){},getMaximumSelectionSize:function(){return evaluate(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var children,index,child,hb,rb,y,more,results=this.results;if(index=this.highlight(),!(index<0)){if(0==index)return void results.scrollTop(0);children=this.findHighlightableChoices().find(\".select2-result-label\"),child=$(children[index]),hb=child.offset().top+child.outerHeight(!0),index===children.length-1&&(more=results.find(\"li.select2-more-results\"),more.length>0&&(hb=more.offset().top+more.outerHeight(!0))),rb=results.offset().top+results.outerHeight(!0),hb>rb&&results.scrollTop(results.scrollTop()+(hb-rb)),y=child.offset().top-results.offset().top,y<0&&\"none\"!=child.css(\"display\")&&results.scrollTop(results.scrollTop()+y)}},findHighlightableChoices:function(){return this.results.find(\".select2-result-selectable:not(.select2-disabled):not(.select2-selected)\")},moveHighlight:function(delta){for(var choices=this.findHighlightableChoices(),index=this.highlight();index>-1&&index<choices.length;){index+=delta;var choice=$(choices[index]);if(choice.hasClass(\"select2-result-selectable\")&&!choice.hasClass(\"select2-disabled\")&&!choice.hasClass(\"select2-selected\")){this.highlight(index);break}}},highlight:function(index){var choice,data,choices=this.findHighlightableChoices();return 0===arguments.length?indexOf(choices.filter(\".select2-highlighted\")[0],choices.get()):(index>=choices.length&&(index=choices.length-1),index<0&&(index=0),this.removeHighlight(),choice=$(choices[index]),choice.addClass(\"select2-highlighted\"),this.search.attr(\"aria-activedescendant\",choice.find(\".select2-result-label\").attr(\"id\")),this.ensureHighlightVisible(),this.liveRegion.text(choice.text()),data=choice.data(\"select2-data\"),void(data&&this.opts.element.trigger({type:\"select2-highlight\",val:this.id(data),choice:data})))},removeHighlight:function(){this.results.find(\".select2-highlighted\").removeClass(\"select2-highlighted\")},touchMoved:function(){this._touchMoved=!0},clearTouchMoved:function(){this._touchMoved=!1},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(event){var el=$(event.target).closest(\".select2-result-selectable\");if(el.length>0&&!el.is(\".select2-highlighted\")){var choices=this.findHighlightableChoices();this.highlight(choices.index(el))}else 0==el.length&&this.removeHighlight()},loadMoreIfNeeded:function(){var below,results=this.results,more=results.find(\"li.select2-more-results\"),page=this.resultsPage+1,self=this,term=this.search.val(),context=this.context;0!==more.length&&(below=more.offset().top-results.offset().top-results.height(),below<=this.opts.loadMorePadding&&(more.addClass(\"select2-active\"),\nthis.opts.query({element:this.opts.element,term:term,page:page,context:context,matcher:this.opts.matcher,callback:this.bind(function(data){self.opened()&&(self.opts.populateResults.call(this,results,data.results,{term:term,page:page,context:context}),self.postprocessResults(data,!1,!1),data.more===!0?(more.detach().appendTo(results).text(evaluate(self.opts.formatLoadMore,page+1)),window.setTimeout(function(){self.loadMoreIfNeeded()},10)):more.remove(),self.positionDropdown(),self.resultsPage=page,self.context=data.context,this.opts.element.trigger({type:\"select2-loaded\",items:data}))})})))},tokenize:function(){},updateResults:function(initial){function postRender(){search.removeClass(\"select2-active\"),self.positionDropdown(),results.find(\".select2-no-results,.select2-selection-limit,.select2-searching\").length?self.liveRegion.text(results.text()):self.liveRegion.text(self.opts.formatMatches(results.find(\".select2-result-selectable\").length))}function render(html){results.html(html),postRender()}var data,input,queryNumber,search=this.search,results=this.results,opts=this.opts,self=this,term=search.val(),lastTerm=$.data(this.container,\"select2-last-term\");if((initial===!0||!lastTerm||!equal(term,lastTerm))&&($.data(this.container,\"select2-last-term\",term),initial===!0||this.showSearchInput!==!1&&this.opened())){queryNumber=++this.queryCount;var maxSelSize=this.getMaximumSelectionSize();if(maxSelSize>=1&&(data=this.data(),$.isArray(data)&&data.length>=maxSelSize&&checkFormatter(opts.formatSelectionTooBig,\"formatSelectionTooBig\")))return void render(\"<li class='select2-selection-limit'>\"+evaluate(opts.formatSelectionTooBig,maxSelSize)+\"</li>\");if(search.val().length<opts.minimumInputLength)return render(checkFormatter(opts.formatInputTooShort,\"formatInputTooShort\")?\"<li class='select2-no-results'>\"+evaluate(opts.formatInputTooShort,search.val(),opts.minimumInputLength)+\"</li>\":\"\"),void(initial&&this.showSearch&&this.showSearch(!0));if(opts.maximumInputLength&&search.val().length>opts.maximumInputLength)return void render(checkFormatter(opts.formatInputTooLong,\"formatInputTooLong\")?\"<li class='select2-no-results'>\"+evaluate(opts.formatInputTooLong,search.val(),opts.maximumInputLength)+\"</li>\":\"\");opts.formatSearching&&0===this.findHighlightableChoices().length&&render(\"<li class='select2-searching'>\"+evaluate(opts.formatSearching)+\"</li>\"),search.addClass(\"select2-active\"),this.removeHighlight(),input=this.tokenize(),input!=undefined&&null!=input&&search.val(input),this.resultsPage=1,opts.query({element:opts.element,term:search.val(),page:this.resultsPage,context:null,matcher:opts.matcher,callback:this.bind(function(data){var def;if(queryNumber==this.queryCount){if(!this.opened())return void this.search.removeClass(\"select2-active\");if(this.context=data.context===undefined?null:data.context,this.opts.createSearchChoice&&\"\"!==search.val()&&(def=this.opts.createSearchChoice.call(self,search.val(),data.results),def!==undefined&&null!==def&&self.id(def)!==undefined&&null!==self.id(def)&&0===$(data.results).filter(function(){return equal(self.id(this),self.id(def))}).length&&this.opts.createSearchChoicePosition(data.results,def)),0===data.results.length&&checkFormatter(opts.formatNoMatches,\"formatNoMatches\"))return void render(\"<li class='select2-no-results'>\"+evaluate(opts.formatNoMatches,search.val())+\"</li>\");results.empty(),self.opts.populateResults.call(this,results,data.results,{term:search.val(),page:this.resultsPage,context:null}),data.more===!0&&checkFormatter(opts.formatLoadMore,\"formatLoadMore\")&&(results.append(\"<li class='select2-more-results'>\"+self.opts.escapeMarkup(evaluate(opts.formatLoadMore,this.resultsPage))+\"</li>\"),window.setTimeout(function(){self.loadMoreIfNeeded()},10)),this.postprocessResults(data,initial),postRender(),this.opts.element.trigger({type:\"select2-loaded\",items:data})}})})}},cancel:function(){this.close()},blur:function(){this.opts.selectOnBlur&&this.selectHighlighted({noFocus:!0}),this.close(),this.container.removeClass(\"select2-container-active\"),this.search[0]===document.activeElement&&this.search.blur(),this.clearSearch(),this.selection.find(\".select2-search-choice-focus\").removeClass(\"select2-search-choice-focus\")},focusSearch:function(){focus(this.search)},selectHighlighted:function(options){if(this._touchMoved)return void this.clearTouchMoved();var index=this.highlight(),highlighted=this.results.find(\".select2-highlighted\"),data=highlighted.closest(\".select2-result\").data(\"select2-data\");data?(this.highlight(index),this.onSelect(data,options)):options&&options.noFocus&&this.close()},getPlaceholder:function(){var placeholderOption;return this.opts.element.attr(\"placeholder\")||this.opts.element.attr(\"data-placeholder\")||this.opts.element.data(\"placeholder\")||this.opts.placeholder||((placeholderOption=this.getPlaceholderOption())!==undefined?placeholderOption.text():undefined)},getPlaceholderOption:function(){if(this.select){var firstOption=this.select.children(\"option\").first();if(this.opts.placeholderOption!==undefined)return\"first\"===this.opts.placeholderOption&&firstOption||\"function\"==typeof this.opts.placeholderOption&&this.opts.placeholderOption(this.select);if(\"\"===$.trim(firstOption.text())&&\"\"===firstOption.val())return firstOption}},initContainerWidth:function(){function resolveContainerWidth(){var style,attrs,matches,i,l,attr;if(\"off\"===this.opts.width)return null;if(\"element\"===this.opts.width)return 0===this.opts.element.outerWidth(!1)?\"auto\":this.opts.element.outerWidth(!1)+\"px\";if(\"copy\"===this.opts.width||\"resolve\"===this.opts.width){if(style=this.opts.element.attr(\"style\"),style!==undefined)for(attrs=style.split(\";\"),i=0,l=attrs.length;i<l;i+=1)if(attr=attrs[i].replace(/\\s/g,\"\"),matches=attr.match(/^width:(([-+]?([0-9]*\\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i),null!==matches&&matches.length>=1)return matches[1];return\"resolve\"===this.opts.width?(style=this.opts.element.css(\"width\"),style.indexOf(\"%\")>0?style:0===this.opts.element.outerWidth(!1)?\"auto\":this.opts.element.outerWidth(!1)+\"px\"):null}return $.isFunction(this.opts.width)?this.opts.width():this.opts.width}var width=resolveContainerWidth.call(this);null!==width&&this.container.css(\"width\",width)}}),SingleSelect2=clazz(AbstractSelect2,{createContainer:function(){var container=$(document.createElement(\"div\")).attr({\"class\":\"select2-container\"}).html([\"<a href='javascript:void(0)' class='select2-choice' tabindex='-1'>\",\"   <span class='select2-chosen'>&#160;</span><abbr class='select2-search-choice-close'></abbr>\",\"   <span class='select2-arrow' role='presentation'><b role='presentation'></b></span>\",\"</a>\",\"<label for='' class='select2-offscreen'></label>\",\"<input class='select2-focusser select2-offscreen' type='text' aria-haspopup='true' role='button' />\",\"<div class='select2-drop select2-display-none'>\",\"   <div class='select2-search'>\",\"       <label for='' class='select2-offscreen'></label>\",\"       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input' role='combobox' aria-expanded='true'\",\"       aria-autocomplete='list' />\",\"   </div>\",\"   <ul class='select2-results' role='listbox'>\",\"   </ul>\",\"</div>\"].join(\"\"));return container},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.focusser.prop(\"disabled\",!this.isInterfaceEnabled())},opening:function(){var el,range,len;this.opts.minimumResultsForSearch>=0&&this.showSearch(!0),this.parent.opening.apply(this,arguments),this.showSearchInput!==!1&&this.search.val(this.focusser.val()),this.opts.shouldFocusInput(this)&&(this.search.focus(),el=this.search.get(0),el.createTextRange?(range=el.createTextRange(),range.collapse(!1),range.select()):el.setSelectionRange&&(len=this.search.val().length,el.setSelectionRange(len,len))),\"\"===this.search.val()&&this.nextSearchTerm!=undefined&&(this.search.val(this.nextSearchTerm),this.search.select()),this.focusser.prop(\"disabled\",!0).val(\"\"),this.updateResults(!0),this.opts.element.trigger($.Event(\"select2-open\"))},close:function(){this.opened()&&(this.parent.close.apply(this,arguments),this.focusser.prop(\"disabled\",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},focus:function(){this.opened()?this.close():(this.focusser.prop(\"disabled\",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus())},isFocused:function(){return this.container.hasClass(\"select2-container-active\")},cancel:function(){this.parent.cancel.apply(this,arguments),this.focusser.prop(\"disabled\",!1),this.opts.shouldFocusInput(this)&&this.focusser.focus()},destroy:function(){$(\"label[for='\"+this.focusser.attr(\"id\")+\"']\").attr(\"for\",this.opts.element.attr(\"id\")),this.parent.destroy.apply(this,arguments),cleanupJQueryElements.call(this,\"selection\",\"focusser\")},initContainer:function(){var selection,elementLabel,container=this.container,dropdown=this.dropdown,idSuffix=nextUid();this.opts.minimumResultsForSearch<0?this.showSearch(!1):this.showSearch(!0),this.selection=selection=container.find(\".select2-choice\"),this.focusser=container.find(\".select2-focusser\"),selection.find(\".select2-chosen\").attr(\"id\",\"select2-chosen-\"+idSuffix),this.focusser.attr(\"aria-labelledby\",\"select2-chosen-\"+idSuffix),this.results.attr(\"id\",\"select2-results-\"+idSuffix),this.search.attr(\"aria-owns\",\"select2-results-\"+idSuffix),this.focusser.attr(\"id\",\"s2id_autogen\"+idSuffix),elementLabel=$(\"label[for='\"+this.opts.element.attr(\"id\")+\"']\"),this.focusser.prev().text(elementLabel.text()).attr(\"for\",this.focusser.attr(\"id\"));var originalTitle=this.opts.element.attr(\"title\");this.opts.element.attr(\"title\",originalTitle||elementLabel.text()),this.focusser.attr(\"tabindex\",this.elementTabIndex),this.search.attr(\"id\",this.focusser.attr(\"id\")+\"_search\"),this.search.prev().text($(\"label[for='\"+this.focusser.attr(\"id\")+\"']\").text()).attr(\"for\",this.search.attr(\"id\")),this.search.on(\"keydown\",this.bind(function(e){if(this.isInterfaceEnabled()){if(e.which===KEY.PAGE_UP||e.which===KEY.PAGE_DOWN)return void killEvent(e);switch(e.which){case KEY.UP:case KEY.DOWN:return this.moveHighlight(e.which===KEY.UP?-1:1),void killEvent(e);case KEY.ENTER:return this.selectHighlighted(),void killEvent(e);case KEY.TAB:return void this.selectHighlighted({noFocus:!0});case KEY.ESC:return this.cancel(e),void killEvent(e)}}})),this.search.on(\"blur\",this.bind(function(e){document.activeElement===this.body.get(0)&&window.setTimeout(this.bind(function(){this.opened()&&this.search.focus()}),0)})),this.focusser.on(\"keydown\",this.bind(function(e){if(this.isInterfaceEnabled()&&e.which!==KEY.TAB&&!KEY.isControl(e)&&!KEY.isFunctionKey(e)&&e.which!==KEY.ESC){if(this.opts.openOnEnter===!1&&e.which===KEY.ENTER)return void killEvent(e);if(e.which==KEY.DOWN||e.which==KEY.UP||e.which==KEY.ENTER&&this.opts.openOnEnter){if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return;return this.open(),void killEvent(e)}return e.which==KEY.DELETE||e.which==KEY.BACKSPACE?(this.opts.allowClear&&this.clear(),void killEvent(e)):void 0}})),installKeyUpChangeEvent(this.focusser),this.focusser.on(\"keyup-change input\",this.bind(function(e){if(this.opts.minimumResultsForSearch>=0){if(e.stopPropagation(),this.opened())return;this.open()}})),selection.on(\"mousedown touchstart\",\"abbr\",this.bind(function(e){this.isInterfaceEnabled()&&(this.clear(),killEventImmediately(e),this.close(),this.selection.focus())})),selection.on(\"mousedown touchstart\",this.bind(function(e){reinsertElement(selection),this.container.hasClass(\"select2-container-active\")||this.opts.element.trigger($.Event(\"select2-focus\")),this.opened()?this.close():this.isInterfaceEnabled()&&this.open(),killEvent(e)})),dropdown.on(\"mousedown touchstart\",this.bind(function(){this.opts.shouldFocusInput(this)&&this.search.focus()})),selection.on(\"focus\",this.bind(function(e){killEvent(e)})),this.focusser.on(\"focus\",this.bind(function(){this.container.hasClass(\"select2-container-active\")||this.opts.element.trigger($.Event(\"select2-focus\")),this.container.addClass(\"select2-container-active\")})).on(\"blur\",this.bind(function(){this.opened()||(this.container.removeClass(\"select2-container-active\"),this.opts.element.trigger($.Event(\"select2-blur\")))})),this.search.on(\"focus\",this.bind(function(){this.container.hasClass(\"select2-container-active\")||this.opts.element.trigger($.Event(\"select2-focus\")),this.container.addClass(\"select2-container-active\")})),this.initContainerWidth(),this.opts.element.addClass(\"select2-offscreen\"),this.setPlaceholder()},clear:function(triggerChange){var data=this.selection.data(\"select2-data\");if(data){var evt=$.Event(\"select2-clearing\");if(this.opts.element.trigger(evt),evt.isDefaultPrevented())return;var placeholderOption=this.getPlaceholderOption();this.opts.element.val(placeholderOption?placeholderOption.val():\"\"),this.selection.find(\".select2-chosen\").empty(),this.selection.removeData(\"select2-data\"),this.setPlaceholder(),triggerChange!==!1&&(this.opts.element.trigger({type:\"select2-removed\",val:this.id(data),choice:data}),this.triggerChange({removed:data}))}},initSelection:function(){if(this.isPlaceholderOptionSelected())this.updateSelection(null),this.close(),this.setPlaceholder();else{var self=this;this.opts.initSelection.call(null,this.opts.element,function(selected){selected!==undefined&&null!==selected&&(self.updateSelection(selected),self.close(),self.setPlaceholder(),self.nextSearchTerm=self.opts.nextSearchTerm(selected,self.search.val()))})}},isPlaceholderOptionSelected:function(){var placeholderOption;return this.getPlaceholder()!==undefined&&((placeholderOption=this.getPlaceholderOption())!==undefined&&placeholderOption.prop(\"selected\")||\"\"===this.opts.element.val()||this.opts.element.val()===undefined||null===this.opts.element.val())},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments),self=this;return\"select\"===opts.element.get(0).tagName.toLowerCase()?opts.initSelection=function(element,callback){var selected=element.find(\"option\").filter(function(){return this.selected&&!this.disabled});callback(self.optionToData(selected))}:\"data\"in opts&&(opts.initSelection=opts.initSelection||function(element,callback){var id=element.val(),match=null;opts.query({matcher:function(term,text,el){var is_match=equal(id,opts.id(el));return is_match&&(match=el),is_match},callback:$.isFunction(callback)?function(){callback(match)}:$.noop})}),opts},getPlaceholder:function(){return this.select&&this.getPlaceholderOption()===undefined?undefined:this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var placeholder=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&placeholder!==undefined){if(this.select&&this.getPlaceholderOption()===undefined)return;this.selection.find(\".select2-chosen\").html(this.opts.escapeMarkup(placeholder)),this.selection.addClass(\"select2-default\"),this.container.removeClass(\"select2-allowclear\")}},postprocessResults:function(data,initial,noHighlightUpdate){var selected=0,self=this;if(this.findHighlightableChoices().each2(function(i,elm){if(equal(self.id(elm.data(\"select2-data\")),self.opts.element.val()))return selected=i,!1}),noHighlightUpdate!==!1&&(initial===!0&&selected>=0?this.highlight(selected):this.highlight(0)),initial===!0){var min=this.opts.minimumResultsForSearch;min>=0&&this.showSearch(countResults(data.results)>=min)}},showSearch:function(showSearchInput){this.showSearchInput!==showSearchInput&&(this.showSearchInput=showSearchInput,this.dropdown.find(\".select2-search\").toggleClass(\"select2-search-hidden\",!showSearchInput),this.dropdown.find(\".select2-search\").toggleClass(\"select2-offscreen\",!showSearchInput),$(this.dropdown,this.container).toggleClass(\"select2-with-searchbox\",showSearchInput))},onSelect:function(data,options){if(this.triggerSelect(data)){var old=this.opts.element.val(),oldData=this.data();this.opts.element.val(this.id(data)),this.updateSelection(data),this.opts.element.trigger({type:\"select2-selected\",val:this.id(data),choice:data}),this.nextSearchTerm=this.opts.nextSearchTerm(data,this.search.val()),this.close(),options&&options.noFocus||!this.opts.shouldFocusInput(this)||this.focusser.focus(),equal(old,this.id(data))||this.triggerChange({added:data,removed:oldData})}},updateSelection:function(data){var formatted,cssClass,container=this.selection.find(\".select2-chosen\");this.selection.data(\"select2-data\",data),container.empty(),null!==data&&(formatted=this.opts.formatSelection(data,container,this.opts.escapeMarkup)),formatted!==undefined&&container.append(formatted),cssClass=this.opts.formatSelectionCssClass(data,container),cssClass!==undefined&&container.addClass(cssClass),this.selection.removeClass(\"select2-default\"),this.opts.allowClear&&this.getPlaceholder()!==undefined&&this.container.addClass(\"select2-allowclear\")},val:function(){var val,triggerChange=!1,data=null,self=this,oldData=this.data();if(0===arguments.length)return this.opts.element.val();if(val=arguments[0],arguments.length>1&&(triggerChange=arguments[1]),this.select)this.select.val(val).find(\"option\").filter(function(){return this.selected}).each2(function(i,elm){return data=self.optionToData(elm),!1}),this.updateSelection(data),this.setPlaceholder(),triggerChange&&this.triggerChange({added:data,removed:oldData});else{if(!val&&0!==val)return void this.clear(triggerChange);if(this.opts.initSelection===undefined)throw new Error(\"cannot call val() if initSelection() is not defined\");this.opts.element.val(val),this.opts.initSelection(this.opts.element,function(data){self.opts.element.val(data?self.id(data):\"\"),self.updateSelection(data),self.setPlaceholder(),triggerChange&&self.triggerChange({added:data,removed:oldData})})}},clearSearch:function(){this.search.val(\"\"),this.focusser.val(\"\")},data:function(value){var data,triggerChange=!1;return 0===arguments.length?(data=this.selection.data(\"select2-data\"),data==undefined&&(data=null),data):(arguments.length>1&&(triggerChange=arguments[1]),void(value?(data=this.data(),this.opts.element.val(value?this.id(value):\"\"),this.updateSelection(value),triggerChange&&this.triggerChange({added:value,removed:data})):this.clear(triggerChange)))}}),MultiSelect2=clazz(AbstractSelect2,{createContainer:function(){var container=$(document.createElement(\"div\")).attr({\"class\":\"select2-container select2-container-multi\"}).html([\"<ul class='select2-choices'>\",\"  <li class='select2-search-field'>\",\"    <label for='' class='select2-offscreen'></label>\",\"    <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'>\",\"  </li>\",\"</ul>\",\"<div class='select2-drop select2-drop-multi select2-display-none'>\",\"   <ul class='select2-results'>\",\"   </ul>\",\"</div>\"].join(\"\"));return container},prepareOpts:function(){var opts=this.parent.prepareOpts.apply(this,arguments),self=this;return\"select\"===opts.element.get(0).tagName.toLowerCase()?opts.initSelection=function(element,callback){var data=[];element.find(\"option\").filter(function(){return this.selected&&!this.disabled}).each2(function(i,elm){data.push(self.optionToData(elm))}),callback(data)}:\"data\"in opts&&(opts.initSelection=opts.initSelection||function(element,callback){var ids=splitVal(element.val(),opts.separator),matches=[];opts.query({matcher:function(term,text,el){var is_match=$.grep(ids,function(id){return equal(id,opts.id(el))}).length;return is_match&&matches.push(el),is_match},callback:$.isFunction(callback)?function(){for(var ordered=[],i=0;i<ids.length;i++)for(var id=ids[i],j=0;j<matches.length;j++){var match=matches[j];if(equal(id,opts.id(match))){ordered.push(match),matches.splice(j,1);break}}callback(ordered)}:$.noop})}),opts},selectChoice:function(choice){var selected=this.container.find(\".select2-search-choice-focus\");selected.length&&choice&&choice[0]==selected[0]||(selected.length&&this.opts.element.trigger(\"choice-deselected\",selected),selected.removeClass(\"select2-search-choice-focus\"),choice&&choice.length&&(this.close(),choice.addClass(\"select2-search-choice-focus\"),this.opts.element.trigger(\"choice-selected\",choice)))},destroy:function(){$(\"label[for='\"+this.search.attr(\"id\")+\"']\").attr(\"for\",this.opts.element.attr(\"id\")),this.parent.destroy.apply(this,arguments),cleanupJQueryElements.call(this,\"searchContainer\",\"selection\")},initContainer:function(){var selection,selector=\".select2-choices\";this.searchContainer=this.container.find(\".select2-search-field\"),this.selection=selection=this.container.find(selector);var _this=this;this.selection.on(\"click\",\".select2-search-choice:not(.select2-locked)\",function(e){_this.search[0].focus(),_this.selectChoice($(this))}),this.search.attr(\"id\",\"s2id_autogen\"+nextUid()),this.search.prev().text($(\"label[for='\"+this.opts.element.attr(\"id\")+\"']\").text()).attr(\"for\",this.search.attr(\"id\")),this.search.on(\"input paste\",this.bind(function(){this.isInterfaceEnabled()&&(this.opened()||this.open())})),this.search.attr(\"tabindex\",this.elementTabIndex),this.keydowns=0,this.search.on(\"keydown\",this.bind(function(e){if(this.isInterfaceEnabled()){++this.keydowns;var selected=selection.find(\".select2-search-choice-focus\"),prev=selected.prev(\".select2-search-choice:not(.select2-locked)\"),next=selected.next(\".select2-search-choice:not(.select2-locked)\"),pos=getCursorInfo(this.search);if(selected.length&&(e.which==KEY.LEFT||e.which==KEY.RIGHT||e.which==KEY.BACKSPACE||e.which==KEY.DELETE||e.which==KEY.ENTER)){var selectedChoice=selected;return e.which==KEY.LEFT&&prev.length?selectedChoice=prev:e.which==KEY.RIGHT?selectedChoice=next.length?next:null:e.which===KEY.BACKSPACE?this.unselect(selected.first())&&(this.search.width(10),selectedChoice=prev.length?prev:next):e.which==KEY.DELETE?this.unselect(selected.first())&&(this.search.width(10),selectedChoice=next.length?next:null):e.which==KEY.ENTER&&(selectedChoice=null),this.selectChoice(selectedChoice),killEvent(e),void(selectedChoice&&selectedChoice.length||this.open())}if((e.which===KEY.BACKSPACE&&1==this.keydowns||e.which==KEY.LEFT)&&0==pos.offset&&!pos.length)return this.selectChoice(selection.find(\".select2-search-choice:not(.select2-locked)\").last()),void killEvent(e);if(this.selectChoice(null),this.opened())switch(e.which){case KEY.UP:case KEY.DOWN:return this.moveHighlight(e.which===KEY.UP?-1:1),void killEvent(e);case KEY.ENTER:return this.selectHighlighted(),void killEvent(e);case KEY.TAB:return this.selectHighlighted({noFocus:!0}),void this.close();case KEY.ESC:return this.cancel(e),void killEvent(e)}if(e.which!==KEY.TAB&&!KEY.isControl(e)&&!KEY.isFunctionKey(e)&&e.which!==KEY.BACKSPACE&&e.which!==KEY.ESC){if(e.which===KEY.ENTER){if(this.opts.openOnEnter===!1)return;if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey)return}this.open(),e.which!==KEY.PAGE_UP&&e.which!==KEY.PAGE_DOWN||killEvent(e),e.which===KEY.ENTER&&killEvent(e)}}})),this.search.on(\"keyup\",this.bind(function(e){this.keydowns=0,this.resizeSearch()})),this.search.on(\"blur\",this.bind(function(e){this.container.removeClass(\"select2-container-active\"),this.search.removeClass(\"select2-focused\"),this.selectChoice(null),this.opened()||this.clearSearch(),e.stopImmediatePropagation(),this.opts.element.trigger($.Event(\"select2-blur\"))})),this.container.on(\"click\",selector,this.bind(function(e){this.isInterfaceEnabled()&&($(e.target).closest(\".select2-search-choice\").length>0||(this.selectChoice(null),this.clearPlaceholder(),this.container.hasClass(\"select2-container-active\")||this.opts.element.trigger($.Event(\"select2-focus\")),this.open(),this.focusSearch(),e.preventDefault()))})),this.container.on(\"focus\",selector,this.bind(function(){this.isInterfaceEnabled()&&(this.container.hasClass(\"select2-container-active\")||this.opts.element.trigger($.Event(\"select2-focus\")),this.container.addClass(\"select2-container-active\"),this.dropdown.addClass(\"select2-drop-active\"),this.clearPlaceholder())})),this.initContainerWidth(),this.opts.element.addClass(\"select2-offscreen\"),this.clearSearch()},enableInterface:function(){this.parent.enableInterface.apply(this,arguments)&&this.search.prop(\"disabled\",!this.isInterfaceEnabled())},initSelection:function(){if(\"\"===this.opts.element.val()&&\"\"===this.opts.element.text()&&(this.updateSelection([]),this.close(),this.clearSearch()),this.select||\"\"!==this.opts.element.val()){var self=this;this.opts.initSelection.call(null,this.opts.element,function(data){data!==undefined&&null!==data&&(self.updateSelection(data),self.close(),self.clearSearch())})}},clearSearch:function(){var placeholder=this.getPlaceholder(),maxWidth=this.getMaxSearchWidth();placeholder!==undefined&&0===this.getVal().length&&this.search.hasClass(\"select2-focused\")===!1?(this.search.val(placeholder).addClass(\"select2-default\"),this.search.width(maxWidth>0?maxWidth:this.container.css(\"width\"))):this.search.val(\"\").width(10)},clearPlaceholder:function(){this.search.hasClass(\"select2-default\")&&this.search.val(\"\").removeClass(\"select2-default\")},opening:function(){this.clearPlaceholder(),this.resizeSearch(),this.parent.opening.apply(this,arguments),this.focusSearch(),\"\"===this.search.val()&&this.nextSearchTerm!=undefined&&(this.search.val(this.nextSearchTerm),this.search.select()),this.updateResults(!0),this.opts.shouldFocusInput(this)&&this.search.focus(),this.opts.element.trigger($.Event(\"select2-open\"))},close:function(){this.opened()&&this.parent.close.apply(this,arguments)},focus:function(){this.close(),this.search.focus()},isFocused:function(){return this.search.hasClass(\"select2-focused\")},updateSelection:function(data){var ids=[],filtered=[],self=this;$(data).each(function(){indexOf(self.id(this),ids)<0&&(ids.push(self.id(this)),filtered.push(this))}),data=filtered,this.selection.find(\".select2-search-choice\").remove(),$(data).each(function(){self.addSelectedChoice(this)}),self.postprocessResults()},tokenize:function(){var input=this.search.val();input=this.opts.tokenizer.call(this,input,this.data(),this.bind(this.onSelect),this.opts),null!=input&&input!=undefined&&(this.search.val(input),input.length>0&&this.open())},onSelect:function(data,options){this.triggerSelect(data)&&(this.addSelectedChoice(data),this.opts.element.trigger({type:\"selected\",val:this.id(data),choice:data}),this.nextSearchTerm=this.opts.nextSearchTerm(data,this.search.val()),this.clearSearch(),this.updateResults(),!this.select&&this.opts.closeOnSelect||this.postprocessResults(data,!1,this.opts.closeOnSelect===!0),this.opts.closeOnSelect?(this.close(),this.search.width(10)):this.countSelectableResults()>0?(this.search.width(10),this.resizeSearch(),this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()?this.updateResults(!0):this.nextSearchTerm!=undefined&&(this.search.val(this.nextSearchTerm),this.updateResults(),this.search.select()),this.positionDropdown()):(this.close(),this.search.width(10)),this.triggerChange({added:data}),options&&options.noFocus||this.focusSearch())},cancel:function(){this.close(),this.focusSearch()},addSelectedChoice:function(data){var formatted,cssClass,enableChoice=!data.locked,enabledItem=$(\"<li class='select2-search-choice'>    <div></div>    <a href='#' class='select2-search-choice-close' tabindex='-1'></a></li>\"),disabledItem=$(\"<li class='select2-search-choice select2-locked'><div></div></li>\"),choice=enableChoice?enabledItem:disabledItem,id=this.id(data),val=this.getVal();formatted=this.opts.formatSelection(data,choice.find(\"div\"),this.opts.escapeMarkup),formatted!=undefined&&choice.find(\"div\").replaceWith(\"<div>\"+formatted+\"</div>\"),cssClass=this.opts.formatSelectionCssClass(data,choice.find(\"div\")),cssClass!=undefined&&choice.addClass(cssClass),enableChoice&&choice.find(\".select2-search-choice-close\").on(\"mousedown\",killEvent).on(\"click dblclick\",this.bind(function(e){this.isInterfaceEnabled()&&(this.unselect($(e.target)),this.selection.find(\".select2-search-choice-focus\").removeClass(\"select2-search-choice-focus\"),killEvent(e),this.close(),this.focusSearch())})).on(\"focus\",this.bind(function(){this.isInterfaceEnabled()&&(this.container.addClass(\"select2-container-active\"),this.dropdown.addClass(\"select2-drop-active\"))})),choice.data(\"select2-data\",data),choice.insertBefore(this.searchContainer),val.push(id),this.setVal(val)},unselect:function(selected){var data,index,val=this.getVal();if(selected=selected.closest(\".select2-search-choice\"),0===selected.length)throw\"Invalid argument: \"+selected+\". Must be .select2-search-choice\";if(data=selected.data(\"select2-data\")){var evt=$.Event(\"select2-removing\");if(evt.val=this.id(data),evt.choice=data,this.opts.element.trigger(evt),evt.isDefaultPrevented())return!1;for(;(index=indexOf(this.id(data),val))>=0;)val.splice(index,1),this.setVal(val),this.select&&this.postprocessResults();return selected.remove(),this.opts.element.trigger({type:\"select2-removed\",val:this.id(data),choice:data}),this.triggerChange({removed:data}),!0}},postprocessResults:function(data,initial,noHighlightUpdate){var val=this.getVal(),choices=this.results.find(\".select2-result\"),compound=this.results.find(\".select2-result-with-children\"),self=this;choices.each2(function(i,choice){var id=self.id(choice.data(\"select2-data\"));indexOf(id,val)>=0&&(choice.addClass(\"select2-selected\"),choice.find(\".select2-result-selectable\").addClass(\"select2-selected\"))}),compound.each2(function(i,choice){choice.is(\".select2-result-selectable\")||0!==choice.find(\".select2-result-selectable:not(.select2-selected)\").length||choice.addClass(\"select2-selected\")}),this.highlight()==-1&&noHighlightUpdate!==!1&&self.highlight(0),!this.opts.createSearchChoice&&!choices.filter(\".select2-result:not(.select2-selected)\").length>0&&(!data||data&&!data.more&&0===this.results.find(\".select2-no-results\").length)&&checkFormatter(self.opts.formatNoMatches,\"formatNoMatches\")&&this.results.append(\"<li class='select2-no-results'>\"+evaluate(self.opts.formatNoMatches,self.search.val())+\"</li>\")},getMaxSearchWidth:function(){return this.selection.width()-getSideBorderPadding(this.search)},resizeSearch:function(){var minimumWidth,left,maxWidth,containerLeft,searchWidth,sideBorderPadding=getSideBorderPadding(this.search);minimumWidth=measureTextWidth(this.search)+10,left=this.search.offset().left,maxWidth=this.selection.width(),containerLeft=this.selection.offset().left,searchWidth=maxWidth-(left-containerLeft)-sideBorderPadding,searchWidth<minimumWidth&&(searchWidth=maxWidth-sideBorderPadding),searchWidth<40&&(searchWidth=maxWidth-sideBorderPadding),searchWidth<=0&&(searchWidth=minimumWidth),this.search.width(Math.floor(searchWidth))},getVal:function(){var val;return this.select?(val=this.select.val(),null===val?[]:val):(val=this.opts.element.val(),splitVal(val,this.opts.separator))},setVal:function(val){var unique;this.select?this.select.val(val):(unique=[],$(val).each(function(){indexOf(this,unique)<0&&unique.push(this)}),this.opts.element.val(0===unique.length?\"\":unique.join(this.opts.separator)))},buildChangeDetails:function(old,current){for(var current=current.slice(0),old=old.slice(0),i=0;i<current.length;i++)for(var j=0;j<old.length;j++)equal(this.opts.id(current[i]),this.opts.id(old[j]))&&(current.splice(i,1),i>0&&i--,old.splice(j,1),j--);return{added:current,removed:old}},val:function(val,triggerChange){var oldData,self=this;if(0===arguments.length)return this.getVal();if(oldData=this.data(),oldData.length||(oldData=[]),!val&&0!==val)return this.opts.element.val(\"\"),this.updateSelection([]),this.clearSearch(),void(triggerChange&&this.triggerChange({added:this.data(),removed:oldData}));if(this.setVal(val),this.select)this.opts.initSelection(this.select,this.bind(this.updateSelection)),triggerChange&&this.triggerChange(this.buildChangeDetails(oldData,this.data()));else{if(this.opts.initSelection===undefined)throw new Error(\"val() cannot be called if initSelection() is not defined\");this.opts.initSelection(this.opts.element,function(data){var ids=$.map(data,self.id);self.setVal(ids),self.updateSelection(data),self.clearSearch(),triggerChange&&self.triggerChange(self.buildChangeDetails(oldData,self.data()));\n})}this.clearSearch()},onSortStart:function(){if(this.select)throw new Error(\"Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.\");this.search.width(0),this.searchContainer.hide()},onSortEnd:function(){var val=[],self=this;this.searchContainer.show(),this.searchContainer.appendTo(this.searchContainer.parent()),this.resizeSearch(),this.selection.find(\".select2-search-choice\").each(function(){val.push(self.opts.id($(this).data(\"select2-data\")))}),this.setVal(val),this.triggerChange()},data:function(values,triggerChange){var ids,old,self=this;return 0===arguments.length?this.selection.children(\".select2-search-choice\").map(function(){return $(this).data(\"select2-data\")}).get():(old=this.data(),values||(values=[]),ids=$.map(values,function(e){return self.opts.id(e)}),this.setVal(ids),this.updateSelection(values),this.clearSearch(),triggerChange&&this.triggerChange(this.buildChangeDetails(old,this.data())),void 0)}}),$.fn.select2=function(){var opts,select2,method,value,multiple,args=Array.prototype.slice.call(arguments,0),allowedMethods=[\"val\",\"destroy\",\"opened\",\"open\",\"close\",\"focus\",\"isFocused\",\"container\",\"dropdown\",\"onSortStart\",\"onSortEnd\",\"enable\",\"disable\",\"readonly\",\"positionDropdown\",\"data\",\"search\"],valueMethods=[\"opened\",\"isFocused\",\"container\",\"dropdown\"],propertyMethods=[\"val\",\"data\"],methodsMap={search:\"externalSearch\"};return this.each(function(){if(0===args.length||\"object\"==typeof args[0])opts=0===args.length?{}:$.extend({},args[0]),opts.element=$(this),\"select\"===opts.element.get(0).tagName.toLowerCase()?multiple=opts.element.prop(\"multiple\"):(multiple=opts.multiple||!1,\"tags\"in opts&&(opts.multiple=multiple=!0)),select2=multiple?new window.Select2[\"class\"].multi:new window.Select2[\"class\"].single,select2.init(opts);else{if(\"string\"!=typeof args[0])throw\"Invalid arguments to select2 plugin: \"+args;if(indexOf(args[0],allowedMethods)<0)throw\"Unknown method: \"+args[0];if(value=undefined,select2=$(this).data(\"select2\"),select2===undefined)return;if(method=args[0],\"container\"===method?value=select2.container:\"dropdown\"===method?value=select2.dropdown:(methodsMap[method]&&(method=methodsMap[method]),value=select2[method].apply(select2,args.slice(1))),indexOf(args[0],valueMethods)>=0||indexOf(args[0],propertyMethods)>=0&&1==args.length)return!1}}),value===undefined?this:value},$.fn.select2.defaults={width:\"copy\",loadMorePadding:0,closeOnSelect:!0,openOnEnter:!0,containerCss:{},dropdownCss:{},containerCssClass:\"\",dropdownCssClass:\"\",formatResult:function(result,container,query,escapeMarkup){var markup=[];return markMatch(result.text,query.term,markup,escapeMarkup),markup.join(\"\")},formatSelection:function(data,container,escapeMarkup){return data?escapeMarkup(data.text):undefined},sortResults:function(results,container,query){return results},formatResultCssClass:function(data){return data.css},formatSelectionCssClass:function(data,container){return undefined},formatMatches:function(matches){return matches+\" results are available, use up and down arrow keys to navigate.\"},formatNoMatches:function(){return\"No matches found\"},formatInputTooShort:function(input,min){var n=min-input.length;return\"Please enter \"+n+\" or more character\"+(1==n?\"\":\"s\")},formatInputTooLong:function(input,max){var n=input.length-max;return\"Please delete \"+n+\" character\"+(1==n?\"\":\"s\")},formatSelectionTooBig:function(limit){return\"You can only select \"+limit+\" item\"+(1==limit?\"\":\"s\")},formatLoadMore:function(pageNumber){return\"Loading more results…\"},formatSearching:function(){return\"Searching…\"},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(e){return e==undefined?null:e.id},matcher:function(term,text){return stripDiacritics(\"\"+text).toUpperCase().indexOf(stripDiacritics(\"\"+term).toUpperCase())>=0},separator:\",\",tokenSeparators:[],tokenizer:defaultTokenizer,escapeMarkup:defaultEscapeMarkup,blurOnChange:!1,selectOnBlur:!1,adaptContainerCssClass:function(c){return c},adaptDropdownCssClass:function(c){return null},nextSearchTerm:function(selectedObject,currentSearchTerm){return undefined},searchInputPlaceholder:\"\",createSearchChoicePosition:\"top\",shouldFocusInput:function(instance){var supportsTouchEvents=\"ontouchstart\"in window||navigator.msMaxTouchPoints>0;return!supportsTouchEvents||!(instance.opts.minimumResultsForSearch<0)}},$.fn.select2.ajaxDefaults={transport:$.ajax,params:{type:\"GET\",cache:!1,dataType:\"json\"}},window.Select2={query:{ajax:ajax,local:local,tags:tags},util:{debounce:debounce,markMatch:markMatch,escapeMarkup:defaultEscapeMarkup,stripDiacritics:stripDiacritics},\"class\":{\"abstract\":AbstractSelect2,single:SingleSelect2,multi:MultiSelect2}}}}(jQuery),function(){\"use strict\";function nextUid(){return++uid}function isWindow(obj){return obj&&obj.window===obj}function isString(value){return\"string\"==typeof value}function isArrayLike(obj){if(null==obj||isWindow(obj))return!1;var length=obj.length;return!(1!==obj.nodeType||!length)||(isString(obj)||Array.isArray(obj)||0===length||\"number\"==typeof length&&length>0&&length-1 in obj)}function createMap(){return Object.create(null)}function hashKey(obj,nextUidFn){var key,objType=typeof obj;return\"function\"==objType||\"object\"==objType&&null!==obj?\"function\"==typeof(key=obj.$$hashKey)?key=obj.$$hashKey():void 0===key&&(key=obj.$$hashKey=(nextUidFn||nextUid)()):key=obj,objType+\":\"+key}function sortByGroup(array,group,property){var i,j,unknownGroup=[],resultArray=[];for(i=0;i<group.length;i++)for(j=0;j<array.length;j++)array[j][property]?array[j][property]===group[i]&&resultArray.push(array[j]):unknownGroup.push(array[j]);return resultArray=resultArray.concat(unknownGroup)}function getBlockNodes(nodes){var node=nodes[0],endNode=nodes[nodes.length-1],blockNodes=[node];do{if(node=node.nextSibling,!node)break;blockNodes.push(node)}while(node!==endNode);return angular.element(blockNodes)}function sibling(cur,dir){for(;(cur=cur[dir])&&1!==cur.nodeType;);return cur}var uid=0,getBlockStart=function(block){return block.clone[0]},getBlockEnd=function(block){return block.clone[block.clone.length-1]},updateScope=function(scope,index,valueIdentifier,value,keyIdentifier,key,arrayLength,group){scope[valueIdentifier]=value,keyIdentifier&&(scope[keyIdentifier]=key),scope.$index=index,scope.$first=0===index,scope.$last=index===arrayLength-1,scope.$middle=!(scope.$first||scope.$last),scope.$odd=!(scope.$even=0===(1&index)),group&&(scope.$group=group)},contains=function(array,element){var i,length=array.length;if(0===length)return!1;for(i=0;i<length;i++)if(deepEquals(element,array[i]))return!0;return!1},indexOf=function(array,element){var i,length=array.length;if(0===length)return-1;for(i=0;i<length;i++)if(deepEquals(element,array[i]))return i;return-1},filterTarget=function(target,parent,selector){var className,elem=target,type=typeof selector;if(target==parent)return null;do if(\"string\"===type){if(className=\" \"+elem.className+\" \",1===elem.nodeType&&className.replace(/[\\t\\r\\n\\f]/g,\" \").indexOf(selector)>=0)return elem}else if(elem==selector)return elem;while((elem=elem.parentNode)&&elem!=parent&&9!==elem.nodeType);return null},getClassList=function(element){var classList,className=element.className.replace(/[\\t\\r\\n\\f]/g,\" \").trim();classList=className.split(\" \");for(var i=0;i<classList.length;i++)/\\s+/.test(classList[i])&&(classList.splice(i,1),i--);return classList},hasClass=function(element,className){var classList=getClassList(element);return classList.indexOf(className)!==-1},queryChildren=function(element,classList){var child,valid,classes,children=element.children(),length=children.length;if(length>0)for(var i=0;i<length;i++){if(child=children.eq(i),valid=!0,classes=getClassList(child[0]),classes.length>0)for(var j=0;j<classList.length;j++)if(classes.indexOf(classList[j])===-1){valid=!1;break}if(valid)return child}return[]},hasKeyword=function(element,keyword){var childElements,index,length;if(element.text().toLowerCase().indexOf(keyword.toLowerCase())!==-1)return!0;for(childElements=element.children(),length=childElements.length,index=0;index<length;index++)if(childElements.eq(index).text().toLowerCase().indexOf(keyword.toLowerCase())!==-1)return!0;return!1},jqLite=angular.element,deepEquals=angular.equals,deepCopy=angular.copy,extend=angular.extend,nyaBsSelect=angular.module(\"nya.bootstrap.select\",[]);nyaBsSelect.provider(\"nyaBsConfig\",function(){var locale=null,defaultText={\"en-us\":{defaultNoneSelection:\"Nothing selected\",noSearchResult:\"NO SEARCH RESULT\",numberItemSelected:\"%d item selected\"}},interfaceText=deepCopy(defaultText);this.setLocalizedText=function(localeId,obj){if(!localeId)throw new Error(\"localeId must be a string formatted as languageId-countryId\");interfaceText[localeId]||(interfaceText[localeId]={}),interfaceText[localeId]=extend(interfaceText[localeId],obj)},this.useLocale=function(localeId){locale=localeId},this.$get=[\"$locale\",function($locale){var localizedText;return localizedText=locale?interfaceText[locale]:interfaceText[$locale.id],localizedText||(localizedText=defaultText[\"en-us\"]),localizedText}]}),nyaBsSelect.controller(\"nyaBsSelectCtrl\",function(){var self=this;self.keyIdentifier=null,self.valueIdentifier=null,self.isMultiple=!1,self.onCollectionChange=function(){},self.setId=function(id){self.id=id||\"id#\"+Math.floor(1e4*Math.random())}}),nyaBsSelect.directive(\"nyaBsSelect\",[\"$parse\",\"$document\",\"$timeout\",\"nyaBsConfig\",function($parse,$document,$timeout,nyaBsConfig){var DEFAULT_NONE_SELECTION=\"Nothing selected\",DROPDOWN_TOGGLE='<button class=\"btn btn-default dropdown-toggle\" type=\"button\"><span class=\"pull-left filter-option\"></span>&nbsp;<span class=\"caret\"></span></button>',DROPDOWN_CONTAINER='<div class=\"dropdown-menu open\"></div>',SEARCH_BOX='<div class=\"bs-searchbox\"><input type=\"text\" class=\"form-control\"></div>',DROPDOWN_MENU='<ul class=\"dropdown-menu inner\"></ul>',NO_SEARCH_RESULT='<li class=\"no-search-result\"><span>NO SEARCH RESULT</span></li>';return{restrict:\"ECA\",require:[\"ngModel\",\"nyaBsSelect\"],controller:\"nyaBsSelectCtrl\",compile:function(tElement,tAttrs){tElement.addClass(\"btn-group\");var searchBox,noSearchResult,classList,length,index,liElement,getDefaultNoneSelectionContent=function(){var content;return content=tAttrs.titleTpl?jqLite(tAttrs.titleTpl):tAttrs.title?document.createTextNode(tAttrs.title):localizedText.defaultNoneSelectionTpl?jqLite(localizedText.defaultNoneSelectionTpl):localizedText.defaultNoneSelection?document.createTextNode(localizedText.defaultNoneSelection):document.createTextNode(DEFAULT_NONE_SELECTION)},options=tElement.children(),dropdownToggle=jqLite(DROPDOWN_TOGGLE),dropdownContainer=jqLite(DROPDOWN_CONTAINER),dropdownMenu=jqLite(DROPDOWN_MENU),localizedText=nyaBsConfig;for(classList=getClassList(tElement[0]),classList.forEach(function(className){/btn-(?:primary|info|success|warning|danger|inverse)/.test(className)&&(tElement.removeClass(className),dropdownToggle.removeClass(\"btn-default\"),dropdownToggle.addClass(className)),\"form-control\"===className&&dropdownToggle.addClass(className)}),dropdownMenu.append(options),length=options.length,index=0;index<length;index++)liElement=options.eq(index),(liElement.hasClass(\"nya-bs-option\")||liElement.attr(\"nya-bs-option\"))&&liElement.find(\"a\").attr(\"tabindex\",\"0\");return\"true\"===tAttrs.liveSearch&&(searchBox=jqLite(SEARCH_BOX),localizedText.noSearchResultTpl?NO_SEARCH_RESULT=NO_SEARCH_RESULT.replace(\"NO SEARCH RESULT\",localizedText.noSearchResultTpl):localizedText.noSearchResult&&(NO_SEARCH_RESULT=NO_SEARCH_RESULT.replace(\"NO SEARCH RESULT\",localizedText.noSearchResult)),noSearchResult=jqLite(NO_SEARCH_RESULT),dropdownContainer.append(searchBox),dropdownMenu.append(noSearchResult)),dropdownToggle.children().eq(0).append(getDefaultNoneSelectionContent()),dropdownContainer.append(dropdownMenu),tElement.append(dropdownToggle),tElement.append(dropdownContainer),function($scope,$element,$attrs,ctrls){function findActive(){var i,liElement,list=dropdownMenu.children(),length=list.length;for(i=0;i<length;i++)if(liElement=list.eq(i),liElement.hasClass(\"active\")&&liElement.hasClass(\"nya-bs-option\"))return liElement;return null}function setFocus(elem){for(var child,childList=elem.childNodes,length=childList.length,i=0;i<length;i++)if(child=childList[i],1===child.nodeType&&\"a\"===child.tagName.toLowerCase()){child.focus();break}}function findFocus(fromFirst){var firstLiElement;return firstLiElement=fromFirst?dropdownMenu.children().eq(0):dropdownMenu.children().eq(dropdownMenu.children().length-1),!firstLiElement.hasClass(\"nya-bs-option\")||firstLiElement.hasClass(\"disabled\")||firstLiElement.hasClass(\"not-match\")?fromFirst?findNextFocus(firstLiElement[0],\"nextSibling\"):findNextFocus(firstLiElement[0],\"previousSibling\"):firstLiElement[0]}function findNextFocus(from,direction){if(!from||hasClass(from,\"nya-bs-option\")){for(var next=from;(next=sibling(next,direction))&&next.nodeType;)if(hasClass(next,\"nya-bs-option\")&&!hasClass(next,\"disabled\")&&!hasClass(next,\"not-match\"))return next;return null}}function selectOption(nyaBsOption){var value,viewValue,index,modelValue=ngCtrl.$modelValue;value=getOptionValue(nyaBsOption),\"undefined\"!=typeof value&&(isMultiple?(viewValue=Array.isArray(modelValue)?deepCopy(modelValue):[],index=indexOf(viewValue,value),index===-1?(viewValue.push(value),nyaBsOption.addClass(\"selected\")):(viewValue.splice(index,1),nyaBsOption.removeClass(\"selected\"))):(dropdownMenu.children().removeClass(\"selected\"),viewValue=value,nyaBsOption.addClass(\"selected\")),ngCtrl.$setViewValue(viewValue),$scope.$digest()),isMultiple||$element.removeClass(\"open\"),updateButtonContent()}function getOptionValue(nyaBsOption){var scopeOfOption;return valueExpFn?(scopeOfOption=nyaBsOption.scope(),valueExpFn(scopeOfOption)):nyaBsSelectCtrl.valueIdentifier||nyaBsSelectCtrl.keyIdentifier?(scopeOfOption=nyaBsOption.scope(),scopeOfOption[nyaBsSelectCtrl.valueIdentifier]||scopeOfOption[nyaBsSelectCtrl.keyIdentifier]):nyaBsOption.attr(\"value\")}function getOptionText(nyaBsOption){var item=nyaBsOption.find(\"a\");return 0===item.children().length||item.children().eq(0).hasClass(\"check-mark\")?item[0].firstChild.cloneNode(!1):item.children().eq(0)[0].cloneNode(!0)}function updateButtonContent(){var modelValue=ngCtrl.$modelValue,filterOption=dropdownToggle.children().eq(0);modelValue&&(isMultiple&&0===modelValue.length?(filterOption.empty(),filterOption.append(getDefaultNoneSelectionContent())):$timeout(function(){var value,nyaBsOption,index,optionTitle,match,count,bsOptionElements=dropdownMenu.children(),length=bsOptionElements.length,selection=[];if(isMultiple&&\"count\"===$attrs.selectedTextFormat?count=1:isMultiple&&$attrs.selectedTextFormat&&(match=$attrs.selectedTextFormat.match(/\\s*count\\s*>\\s*(\\d+)\\s*/))&&(count=parseInt(match[1],10)),\"undefined\"!=typeof count&&modelValue.length>count)return filterOption.empty(),void(localizedText.numberItemSelectedTpl?filterOption.append(jqLite(localizedText.numberItemSelectedTpl.replace(\"%d\",modelValue.length))):localizedText.numberItemSelected?filterOption.append(document.createTextNode(localizedText.numberItemSelected.replace(\"%d\",modelValue.length))):filterOption.append(document.createTextNode(modelValue.length+\" items selected\")));for(index=0;index<length;index++)nyaBsOption=bsOptionElements.eq(index),nyaBsOption.hasClass(\"nya-bs-option\")&&(value=getOptionValue(nyaBsOption),isMultiple?Array.isArray(modelValue)&&contains(modelValue,value)&&(optionTitle=nyaBsOption.attr(\"title\"),optionTitle?selection.push(document.createTextNode(optionTitle)):selection.push(getOptionText(nyaBsOption))):deepEquals(modelValue,value)&&(optionTitle=nyaBsOption.attr(\"title\"),optionTitle?selection.push(document.createTextNode(optionTitle)):selection.push(getOptionText(nyaBsOption))));if(0===selection.length)filterOption.empty(),filterOption.append(getDefaultNoneSelectionContent());else if(1===selection.length)filterOption.empty(),filterOption.append(selection[0]);else for(filterOption.empty(),index=0;index<selection.length;index++)filterOption.append(selection[index]),index<selection.length-1&&filterOption.append(document.createTextNode(\", \"))}))}function calcMenuSize(){var liElement,i,liElements=dropdownMenu.find(\"li\"),length=liElements.length;for(i=0;i<length;i++)if(liElement=liElements.eq(i),liElement.hasClass(\"nya-bs-option\")||liElement.attr(\"nya-bs-option\")){liHeight=liElement[0].clientHeight;break}if(/\\d+/.test($attrs.size)){var dropdownSize=parseInt($attrs.size,10);dropdownMenu.css(\"max-height\",dropdownSize*liHeight+\"px\"),dropdownMenu.css(\"overflow-y\",\"auto\")}}var liHeight,previousTabIndex,valueExpFn,ngCtrl=ctrls[0],nyaBsSelectCtrl=ctrls[1],isDisabled=!1,valueExpGetter=$parse(nyaBsSelectCtrl.valueExp),isMultiple=\"undefined\"!=typeof $attrs.multiple,dropdownToggle=queryChildren($element,[\"dropdown-toggle\"]),dropdownContainer=dropdownToggle.next(),dropdownMenu=queryChildren(dropdownContainer,[\"dropdown-menu\",\"inner\"]),searchBox=queryChildren(dropdownContainer,[\"bs-searchbox\"]),noSearchResult=queryChildren(dropdownMenu,[\"no-search-result\"]);nyaBsSelectCtrl.valueExp&&(valueExpFn=function(scope,locals){return valueExpGetter(scope,locals)}),nyaBsSelectCtrl.setId($element.attr(\"id\")),isMultiple&&(nyaBsSelectCtrl.isMultiple=!0,ngCtrl.$isEmpty=function(value){return!value||0===value.length}),\"undefined\"!=typeof $attrs.disabled&&$scope.$watch($attrs.disabled,function(disabled){disabled?(dropdownToggle.addClass(\"disabled\"),previousTabIndex=dropdownToggle.attr(\"tabindex\"),dropdownToggle.attr(\"tabindex\",\"-1\"),isDisabled=!0):(dropdownToggle.removeClass(\"disabled\"),previousTabIndex?dropdownToggle.attr(\"tabindex\",previousTabIndex):dropdownToggle.removeAttr(\"tabindex\"),isDisabled=!1)}),nyaBsSelectCtrl.onCollectionChange=function(values){var index,length,valuesForSelect=[],modelValue=ngCtrl.$modelValue;if(modelValue){if(values&&0!==values.length){if(valueExpFn)for(index=0;index<values.length;index++)valuesForSelect.push(valueExpFn($scope,values[index]));else for(index=0;index<values.length;index++)nyaBsSelectCtrl.valueIdentifier?valuesForSelect.push(values[index][nyaBsSelectCtrl.valueIdentifier]):nyaBsSelectCtrl.keyIdentifier&&valuesForSelect.push(values[index][nyaBsSelectCtrl.keyIdentifier]);if(isMultiple){for(length=modelValue.length,index=0;index<modelValue.length;index++)contains(valuesForSelect,modelValue[index])||(modelValue.splice(index,1),index--);length!==modelValue.length&&(modelValue=deepCopy(modelValue))}else contains(valuesForSelect,modelValue)||(modelValue=valuesForSelect[0])}else modelValue=isMultiple?[]:null;ngCtrl.$setViewValue(modelValue),updateButtonContent()}},dropdownMenu.on(\"click\",function(event){if(!isDisabled&&!jqLite(event.target).hasClass(\"dropdown-header\")){var nyaBsOption,nyaBsOptionNode=filterTarget(event.target,dropdownMenu[0],\"nya-bs-option\");if(null!==nyaBsOptionNode){if(nyaBsOption=jqLite(nyaBsOptionNode),nyaBsOption.hasClass(\"disabled\"))return;selectOption(nyaBsOption)}}}),$document.on(\"click\",function(event){null===filterTarget(event.target,$element.parent()[0],$element[0])&&$element.removeClass(\"open\")}),dropdownToggle.on(\"click\",function(){var nyaBsOptionNode;$element.toggleClass(\"open\"),$element.hasClass(\"open\")&&\"undefined\"==typeof liHeight&&calcMenuSize(),\"true\"===$attrs.liveSearch&&$element.hasClass(\"open\")?(searchBox.children().eq(0)[0].focus(),nyaBsOptionNode=findFocus(!0),nyaBsOptionNode&&(dropdownMenu.children().removeClass(\"active\"),jqLite(nyaBsOptionNode).addClass(\"active\"))):$element.hasClass(\"open\")&&(nyaBsOptionNode=findFocus(!0),nyaBsOptionNode&&setFocus(nyaBsOptionNode))}),\"true\"===$attrs.liveSearch&&searchBox.children().on(\"input\",function(){var index,option,nyaBsOptionNode,searchKeyword=searchBox.children().val(),found=0,options=dropdownMenu.children(),length=options.length;if(searchKeyword){for(index=0;index<length;index++)option=options.eq(index),option.hasClass(\"nya-bs-option\")&&(hasKeyword(option.find(\"a\"),searchKeyword)?(option.removeClass(\"not-match\"),found++):option.addClass(\"not-match\"));0===found?noSearchResult.addClass(\"show\"):noSearchResult.removeClass(\"show\")}else{for(index=0;index<length;index++)option=options.eq(index),option.hasClass(\"nya-bs-option\")&&option.removeClass(\"not-match\");noSearchResult.removeClass(\"show\")}nyaBsOptionNode=findFocus(!0),nyaBsOptionNode&&(options.removeClass(\"active\"),jqLite(nyaBsOptionNode).addClass(\"active\"))}),ngCtrl.$render=function(){var index,value,modelValue=ngCtrl.$modelValue,bsOptionElements=dropdownMenu.children(),length=bsOptionElements.length;if(\"undefined\"==typeof modelValue)for(index=0;index<length;index++)bsOptionElements.eq(index).hasClass(\"nya-bs-option\")&&bsOptionElements.eq(index).removeClass(\"selected\");else for(index=0;index<length;index++)bsOptionElements.eq(index).hasClass(\"nya-bs-option\")&&(value=getOptionValue(bsOptionElements.eq(index)),isMultiple?contains(modelValue,value)?bsOptionElements.eq(index).addClass(\"selected\"):bsOptionElements.eq(index).removeClass(\"selected\"):deepEquals(modelValue,value)?bsOptionElements.eq(index).addClass(\"selected\"):bsOptionElements.eq(index).removeClass(\"selected\"));updateButtonContent()},$element.on(\"keydown\",function(event){var keyCode=event.keyCode;if(27===keyCode||13===keyCode||38===keyCode||40===keyCode){if(event.preventDefault(),isDisabled)return void event.stopPropagation();var menuContainer,searchBoxContainer,liElement,nyaBsOptionNode,toggleButton=filterTarget(event.target,$element[0],dropdownToggle[0]);\"true\"===$attrs.liveSearch?searchBoxContainer=filterTarget(event.target,$element[0],searchBox[0]):menuContainer=filterTarget(event.target,$element[0],dropdownContainer[0]),toggleButton?13!==keyCode&&38!==keyCode&&40!==keyCode||$element.hasClass(\"open\")||(event.stopPropagation(),$element.addClass(\"open\"),\"undefined\"==typeof liHeight&&calcMenuSize(),\"true\"===$attrs.liveSearch?(searchBox.children().eq(0)[0].focus(),nyaBsOptionNode=findFocus(!0),nyaBsOptionNode&&(dropdownMenu.children().removeClass(\"active\"),jqLite(nyaBsOptionNode).addClass(\"active\"))):(nyaBsOptionNode=findFocus(!0),nyaBsOptionNode&&setFocus(nyaBsOptionNode))):menuContainer?27===keyCode?(dropdownToggle[0].focus(),$element.removeClass(\"open\"),event.stopPropagation()):38===keyCode?(event.stopPropagation(),nyaBsOptionNode=findNextFocus(event.target.parentNode,\"previousSibling\"),nyaBsOptionNode?setFocus(nyaBsOptionNode):(nyaBsOptionNode=findFocus(!1),nyaBsOptionNode&&setFocus(nyaBsOptionNode))):40===keyCode?(event.stopPropagation(),nyaBsOptionNode=findNextFocus(event.target.parentNode,\"nextSibling\"),nyaBsOptionNode?setFocus(nyaBsOptionNode):(nyaBsOptionNode=findFocus(!0),nyaBsOptionNode&&setFocus(nyaBsOptionNode))):13===keyCode&&(event.stopPropagation(),liElement=jqLite(event.target.parentNode),liElement.hasClass(\"nya-bs-option\")&&(selectOption(liElement),isMultiple||dropdownToggle[0].focus())):searchBoxContainer&&(27===keyCode?(dropdownToggle[0].focus(),$element.removeClass(\"open\"),event.stopPropagation()):38===keyCode?(event.stopPropagation(),liElement=findActive(),liElement&&(nyaBsOptionNode=findNextFocus(liElement[0],\"previousSibling\"),nyaBsOptionNode?(liElement.removeClass(\"active\"),jqLite(nyaBsOptionNode).addClass(\"active\")):(nyaBsOptionNode=findFocus(!1),nyaBsOptionNode&&(liElement.removeClass(\"active\"),jqLite(nyaBsOptionNode).addClass(\"active\"))))):40===keyCode?(event.stopPropagation(),liElement=findActive(),liElement&&(nyaBsOptionNode=findNextFocus(liElement[0],\"nextSibling\"),nyaBsOptionNode?(liElement.removeClass(\"active\"),jqLite(nyaBsOptionNode).addClass(\"active\")):(nyaBsOptionNode=findFocus(!0),nyaBsOptionNode&&(liElement.removeClass(\"active\"),jqLite(nyaBsOptionNode).addClass(\"active\"))))):13===keyCode&&(liElement=findActive(),liElement&&(selectOption(liElement),isMultiple||dropdownToggle[0].focus())))}})}}}}]),nyaBsSelect.directive(\"nyaBsOption\",[\"$parse\",function($parse){var BS_OPTION_REGEX=/^\\s*(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+([\\s\\S]+?)(?:\\s+group\\s+by\\s+([\\s\\S]+?))?(?:\\s+track\\s+by\\s+([\\s\\S]+?))?\\s*$/;return{restrict:\"A\",transclude:\"element\",priority:1e3,terminal:!0,require:[\"^nyaBsSelect\",\"^ngModel\"],compile:function(tElement,tAttrs){var expression=tAttrs.nyaBsOption,nyaBsOptionEndComment=document.createComment(\" end nyaBsOption: \"+expression+\" \"),match=expression.match(BS_OPTION_REGEX);if(!match)throw new Error(\"invalid expression\");var trackByIdArrayFn,trackByIdObjFn,trackByIdExpFn,trackByExpGetter,groupByFn,valueExp=tAttrs.value,valueExpGetter=valueExp?$parse(valueExp):null,valueIdentifier=match[3]||match[1],keyIdentifier=match[2],collectionExp=match[4],groupByExpGetter=match[5]?$parse(match[5]):null,trackByExp=match[6],hashFnLocals={$id:hashKey},locals={};return trackByExp?trackByExpGetter=$parse(trackByExp):(trackByIdArrayFn=function(key,value){return hashKey(value)},trackByIdObjFn=function(key){return key}),function($scope,$element,$attr,ctrls,$transclude){function nyaBsOptionAction(collection){var index,key,value,trackById,trackByIdFn,collectionKeys,collectionLength,nextBlockOrder,block,groupName,nextNode,group,lastGroup,valueObj,previousNode=$element[0],nextBlockMap=createMap(),values=[];if(groupByFn&&(group=[]),isArrayLike(collection))collectionKeys=collection,trackByIdFn=trackByIdExpFn||trackByIdArrayFn;else{trackByIdFn=trackByIdExpFn||trackByIdObjFn,collectionKeys=[];for(var itemKey in collection)collection.hasOwnProperty(itemKey)&&\"$\"!=itemKey.charAt(0)&&collectionKeys.push(itemKey);collectionKeys.sort()}for(collectionLength=collectionKeys.length,nextBlockOrder=new Array(collectionLength),index=0;index<collectionLength;index++)if(key=collection===collectionKeys?index:collectionKeys[index],value=collection[key],trackById=trackByIdFn(key,value,index),valueObj={},keyIdentifier&&(valueObj[keyIdentifier]=key),valueObj[valueIdentifier]=value,values.push(valueObj),groupByFn&&(groupName=groupByFn(key,value),group.indexOf(groupName)===-1&&groupName&&group.push(groupName)),lastBlockMap[trackById])block=lastBlockMap[trackById],delete lastBlockMap[trackById],groupByFn&&(block.group=groupName),block.key=key,block.value=value,nextBlockMap[trackById]=block,nextBlockOrder[index]=block;else{if(nextBlockMap[trackById])throw nextBlockOrder.forEach(function(block){block&&block.scope&&(lastBlockMap[block.id]=block)}),new Error(\"Duplicates in a select are not allowed. Use 'track by' expression to specify unique keys.\");nextBlockOrder[index]={id:trackById,scope:void 0,clone:void 0,key:key,value:value},nextBlockMap[trackById]=!0,groupName&&(nextBlockOrder[index].group=groupName)}group&&group.length>0&&(nextBlockOrder=sortByGroup(nextBlockOrder,group,\"group\"));for(var blockKey in lastBlockMap)block=lastBlockMap[blockKey],getBlockNodes(block.clone).remove(),block.scope.$destroy();for(index=0;index<collectionLength;index++)block=nextBlockOrder[index],block.scope?(nextNode=previousNode,getBlockStart(block)!=nextNode&&jqLite(previousNode).after(block.clone),previousNode=getBlockEnd(block),updateScope(block.scope,index,valueIdentifier,block.value,keyIdentifier,block.key,collectionLength,block.group)):$transclude(function(clone,scope){block.scope=scope;var endNode=nyaBsOptionEndComment.cloneNode(!1);clone[clone.length++]=endNode,jqLite(previousNode).after(clone),clone.addClass(\"nya-bs-option\"),value=valueExpFn?valueExpFn(block.key,block.value):block.value||block.key,nyaBsSelectCtrl.isMultiple?Array.isArray(ngCtrl.$modelValue)&&contains(ngCtrl.$modelValue,value)&&clone.addClass(\"selected\"):deepEquals(value,ngCtrl.$modelValue)&&clone.addClass(\"selected\"),previousNode=endNode,block.clone=clone,nextBlockMap[block.id]=block,updateScope(block.scope,index,valueIdentifier,block.value,keyIdentifier,block.key,collectionLength,block.group)}),group&&(lastGroup&&lastGroup===block.group?block.clone.removeClass(\"first-in-group\"):block.clone.addClass(\"first-in-group\"),lastGroup=block.group,block.clone.addClass(\"group-item\"));lastBlockMap=nextBlockMap,nyaBsSelectCtrl.onCollectionChange(values)}var valueExpFn,nyaBsSelectCtrl=ctrls[0],ngCtrl=ctrls[1],valueExpLocals={};trackByExpGetter&&(trackByIdExpFn=function(key,value,index){return keyIdentifier&&(hashFnLocals[keyIdentifier]=key),hashFnLocals[valueIdentifier]=value,hashFnLocals.$index=index,trackByExpGetter($scope,hashFnLocals)}),groupByExpGetter&&(groupByFn=function(key,value){return keyIdentifier&&(locals[keyIdentifier]=key),locals[valueIdentifier]=value,groupByExpGetter($scope,locals)}),keyIdentifier&&(nyaBsSelectCtrl.keyIdentifier=keyIdentifier),valueIdentifier&&(nyaBsSelectCtrl.valueIdentifier=valueIdentifier),valueExpGetter&&(nyaBsSelectCtrl.valueExp=valueExp,valueExpFn=function(key,value){return keyIdentifier&&(valueExpLocals[keyIdentifier]=key),valueExpLocals[valueIdentifier]=value,valueExpGetter($scope,valueExpLocals)});var lastBlockMap=createMap();\"true\"===$attr.deepWatch?$scope.$watch(collectionExp,nyaBsOptionAction,!0):$scope.$watchCollection(collectionExp,nyaBsOptionAction)}}}}])}();","var cr;!function(cr){var infrastructure;!function(infrastructure){var notification;!function(notification){angular.module(\"cr.infrastructure.notification\",[\"ui.bootstrap\",\"cr.translation\"])}(notification=infrastructure.notification||(infrastructure.notification={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var breadcrumb;!function(breadcrumb){breadcrumb.breadcrumbModule=angular.module(\"cr.infrastructure.breadcrumb\",[\"ui.router\"])}(breadcrumb=infrastructure.breadcrumb||(infrastructure.breadcrumb={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var popup;!function(popup){popup.popupModule=angular.module(\"cr.infrastructure.popup\",[])}(popup=infrastructure.popup||(infrastructure.popup={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var menu;!function(menu){angular.module(\"cr.infrastructure.menu\",[\"ui.router\"])}(menu=infrastructure.menu||(infrastructure.menu={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={})),angular.module(\"cr.infrastructure.scrollspy\",[\"cr.translation\"]),angular.module(\"cr.infrastructure\",[\"cr.common\",\"cr.translation\",\"cr.infrastructure.notification\",\"cr.infrastructure.breadcrumb\",\"cr.infrastructure.popup\",\"cr.infrastructure.menu\",\"cr.infrastructure.scrollspy\",\"ui.router\"]);var cr;!function(cr){var infrastructure;!function(infrastructure){var MenuService=function(){function MenuService(menuItems){var _this=this;this.menuItems=menuItems,this.getItems=function(){return _this.menuItems}}return MenuService}(),MenuServiceFactory=function(){function MenuServiceFactory(){var _this=this;this.menuItems=[],this.config=function(items){angular.forEach(items,function(item){item.$isRoot=!0}),_this.menuItems=items},this.$get=function(){return new MenuService(_this.menuItems)}}return MenuServiceFactory}();angular.module(\"cr.infrastructure.menu\").provider(\"menuService\",new MenuServiceFactory)}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var table;!function(table){var tablePopupService=function(){function tablePopupService($q,$modal,$http){this.$q=$q,this.$modal=$modal,this.$http=$http}return tablePopupService.prototype.SelectEntity=function(title,entities,columns,params){return this.$modal.open({controller:\"tablePopupCtrl\",controllerAs:\"ctrl\",resolve:{popupData:function(){return{title:title,Rows:entities,Columns:columns,Filter:function(){return entities},context:params&&params.context?params.context:\"Default\"}}},templateUrl:\"modules/infrastructure/table/templates/tablepopup.html\",show:!0}).result},tablePopupService.$inject=[\"$q\",\"$modal\",\"$http\"],tablePopupService}();angular.module(\"cr.infrastructure\").service(\"tablePopupService\",tablePopupService)}(table=cr.table||(cr.table={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var windowEventService=function(){function windowEventService($window){this.$window=$window}return windowEventService.prototype.addHandler=function(type,handler){this.$window.addEventListener?this.$window.addEventListener(type,handler,!1):this.$window.attachEvent?this.$window.attachEvent(\"on\"+type,handler):this.$window[\"on\"+type]=handler},windowEventService.prototype.getEvent=function(event){return event?event:window.event},windowEventService.prototype.getTarget=function(event){return event.target||event.srcElement},windowEventService.prototype.preventDefault=function(event){event.preventDefault?event.preventDefault():event.returnValue=!1},windowEventService.prototype.removeHandler=function(type,handler){this.$window.removeEventListener?this.$window.removeEventListener(type,handler,!1):this.$window.detachEvent?this.$window.detachEvent(\"on\"+type,handler):this.$window[\"on\"+type]=null},windowEventService.prototype.stopPropagation=function(event){event.stopPropagation?event.stopPropagation():event.cancelBubble=!0},windowEventService}();angular.module(\"cr.infrastructure\").factory(\"windowEventService\",[\"$window\",function($window){return new windowEventService($window)}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var notification;!function(notification){var notificationService=function(){function notificationService($translateService,$location,log,$timeout,$q,$modal){var _this=this;this.$translateService=$translateService,this.$location=$location,this.log=log,this.$timeout=$timeout,this.$q=$q,this.$modal=$modal,this.addNotification=function(type,message,params){var ctx=params&&params.context?params.context:\"Default\",transService=_this.$translateService.getTranslation(ctx,null),transMessage=transService.GetCondStringValue(message,params);switch(_this.log.log(message+\" - \"+transMessage+\" [\"+type+\"]\"),type){case notification.notificationType.Fatal:$.notify(transMessage,{type:\"error\",icon:\"bolt\"});break;case notification.notificationType.Info:$.notify(transMessage,{type:\"info\"});break;case notification.notificationType.Success:$.notify(transMessage,{type:\"success\"});break;case notification.notificationType.Warning:$.notify(transMessage,{type:\"warning\",icon:\"warning\"});break;default:$.notify(transMessage)}},this.notifications=function(){return[]},this.discardNotification=function(toDiscard){}}return notificationService.prototype.editText=function(message,title,val,params){var toRet=this.$q.defer();console.log(\"edit text: \"+val);for(var strButtons=\"*OK|CANCEL\",buttons=[],buttonTokens=strButtons.split(\"|\"),i=0;i<buttonTokens.length;){var curToken=buttonTokens[i];\"*\"==curToken.substring(0,1)?buttons.push({name:curToken.substring(1),\"default\":!0}):buttons.push({name:curToken,\"default\":!1}),i++}return this.$modal.open({controller:\"messageCtrl\",resolve:{messageData:function(){return{context:params&&params.context?params.context:\"Default\",title:title,value:val,message:message,buttons:buttons}}},templateUrl:\"modules/infrastructure/notification/templates/edittext.html\",show:!0}).result.then(function(buttonName){toRet.resolve(buttonName)},function(error){toRet.reject(error)}),toRet.promise},notificationService.prototype.showMessage=function(message,title,strButtons,params){var toRet=this.$q.defer();console.log(\"CTX : \"+(params&&params.context?params.context:\"Default\")),strButtons||(strButtons=\"*OK|CANCEL\");for(var buttons=[],buttonTokens=strButtons.split(\"|\"),i=0;i<buttonTokens.length;){var curToken=buttonTokens[i];\"*\"==curToken.substring(0,1)?buttons.push({name:curToken.substring(1),\"default\":!0}):buttons.push({name:curToken,\"default\":!1}),i++}return this.$modal.open({controller:\"messageCtrl\",resolve:{messageData:function(){return{context:params&&params.context?params.context:\"Default\",title:title,message:message,buttons:buttons}}},templateUrl:\"modules/infrastructure/notification/templates/message.html\",show:!0}).result.then(function(buttonName){toRet.resolve(buttonName)},function(error){toRet.resolve(\"CANCEL\")}),toRet.promise},notificationService.prototype.clear=function(){},notificationService}();angular.module(\"cr.infrastructure.notification\").factory(\"notificationService\",[\"$translateService\",\"$location\",\"$log\",\"$timeout\",\"$q\",\"$modal\",function($translateService,$location,$log,$timeout,$q,$modal){return new notificationService($translateService,$location,$log.getInstance(\"cr.infratructure.notification\"),$timeout,$q,$modal)}])}(notification=infrastructure.notification||(infrastructure.notification={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var popup;!function(popup){var popupService=function(){function popupService($q){var _this=this;this.$q=$q,this.open=function(url){var defer=_this.$q.defer(),options={path:url};if(!options||!options.path)throw new Error(\"options.path must not be empty\");options=angular.extend({windowName:\"ConnectWithOAuth\",windowOptions:\"location=0,status=0,width=640,height=400\",callback:function(){window.location.reload()}},options);var oauthWindow=window.open(options.path,options.windowName,options.windowOptions);return oauthWindow.focus(),defer.promise}}return popupService}();popup.popupModule.factory(\"popupService\",[\"$q\",function($q){return new popupService($q)}])}(popup=infrastructure.popup||(infrastructure.popup={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var notification;!function(notification){var messageCtrl=function(){function messageCtrl($scope,messageData){this.$scope=$scope,this.$scope.messageData=messageData,this.$scope.context=messageData.context?messageData.context:$scope.context}return messageCtrl}();angular.module(\"cr.infrastructure.notification\").controller(\"messageCtrl\",[\"$scope\",\"messageData\",messageCtrl])}(notification=infrastructure.notification||(infrastructure.notification={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var notification;!function(notification_1){var notificationCtrl=function(){function notificationCtrl($scope,$log,notificationService){var _this=this;this.$scope=$scope,this.notificationService=notificationService,this.$log=$log.getInstance(\"cr.infrastructure.notification\"),this.$scope.notifications=notificationService.notifications,this.$scope.close=function(notification){return _this.close(notification)},this.$scope.getNotificationClass=function(notification){return _this.getNotificationClass(notification)}}return notificationCtrl.prototype.close=function(notification){this.notificationService.discardNotification(notification)},notificationCtrl.prototype.getNotificationClass=function(notification){switch(notification.type){case notification_1.notificationType.Fatal:return\"danger\";case notification_1.notificationType.Info:return\"info\";case notification_1.notificationType.Success:return\"success\";case notification_1.notificationType.Warning:return\"warning\"}return\"danger\"},notificationCtrl}();angular.module(\"cr.infrastructure.notification\").controller(\"notificationCtrl\",[\"$scope\",\"$log\",\"notificationService\",function($scope,$log,notificationService){return new notificationCtrl($scope,$log,notificationService)}])}(notification=infrastructure.notification||(infrastructure.notification={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var table;!function(table){var tablePopupCtrl=function(){function tablePopupCtrl($scope,$modalInstance,popupData){var _this=this;this.$scope=$scope,this.$modalInstance=$modalInstance,this.popupData=popupData,this.Dismiss=function(){return _this.$modalInstance.dismiss()},this.SelectEntity=function(action,row){_this.$modalInstance.close(row)},$scope.context=popupData.context,$scope.options={enabled:!0}}return tablePopupCtrl.$inject=[\"$scope\",\"$modalInstance\",\"popupData\"],tablePopupCtrl}();angular.module(\"cr.infrastructure\").controller(\"tablePopupCtrl\",tablePopupCtrl)}(table=cr.table||(cr.table={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var breadcrumb;!function(breadcrumb){function isAOlderThanB(scopeA,scopeB){return angular.equals(scopeA.length,scopeB.length)?scopeA>scopeB:scopeA.length>scopeB.length}function parseStateRef(ref){var parsed=ref.replace(/\\n/g,\" \").match(/^([^(]+?)\\s*(\\((.*)\\))?$/);if(!parsed||4!==parsed.length)throw new Error(\"Invalid state ref '\"+ref+\"'\");return{state:parsed[1],paramExpr:parsed[3]||null}}function $Breadcrumb(){var $$options={prefixStateName:null,templateUrl:\"modules/infrastructure/breadcrumb/templates/breadcrumb.html\",includeAbstract:!0};this.setOptions=function(options){angular.extend($$options,options)},this.$get=[\"$state\",\"$stateParams\",\"$rootScope\",function($state,$stateParams,$rootScope){var $lastViewScope=$rootScope;$rootScope.$on(\"$viewContentLoaded\",function(event){isAOlderThanB(event.targetScope.$id,$lastViewScope.$id)&&($lastViewScope=event.targetScope)});var $$parentState=function(state){var parent=state.parent||(/^(.+)\\.[^.]+$/.exec(state.name)||[])[1],isObjectParent=\"object\"==typeof parent;return isObjectParent?parent.name:parent},$$addStateInChain=function(chain,stateRef){for(var conf,parentParams,ref=parseStateRef(stateRef),force=!1,skip=!1,i=0,l=chain.length;i<l;i+=1)if(chain[i].name===ref.state)return;conf=$state.get(ref.state),conf.ncyBreadcrumb&&(conf.ncyBreadcrumb.force&&(force=!0),conf.ncyBreadcrumb.skip&&(skip=!0)),conf[\"abstract\"]&&!$$options.includeAbstract&&!force||skip||(ref.paramExpr&&(parentParams=$lastViewScope.$eval(ref.paramExpr)),conf.ncyBreadcrumbLink=$state.href(ref.state,parentParams||$stateParams||{}),chain.unshift(conf))},$$breadcrumbParentState=function(stateRef){var ref=parseStateRef(stateRef),conf=$state.get(ref.state);if(conf.ncyBreadcrumb&&conf.ncyBreadcrumb.parent){var isFunction=\"function\"==typeof conf.ncyBreadcrumb.parent,parentStateRef=isFunction?conf.ncyBreadcrumb.parent($lastViewScope):conf.ncyBreadcrumb.parent;if(parentStateRef)return parentStateRef}return $$parentState(conf)};return{getTemplate:function(templates){if($$options.templateUrl)return null},getTemplateUrl:function(){return $$options.templateUrl},getStatesChain:function(exitOnFirst){for(var chain=[],stateRef=$state.$current.self.name;stateRef;stateRef=$$breadcrumbParentState(stateRef))if($$addStateInChain(chain,stateRef),exitOnFirst&&chain.length)return chain;return $$options.prefixStateName&&$$addStateInChain(chain,$$options.prefixStateName),chain},getLastStep:function(){var chain=this.getStatesChain(!0);return chain.length?chain[0]:void 0},$getLastViewScope:function(){return $lastViewScope}}}]}function BreadcrumbDirective($interpolate,$breadcrumb,$rootScope){var $$templates={bootstrap2:'<ul class=\"breadcrumb\"><li ng-repeat=\"step in steps\" ng-switch=\"$last || !!step.abstract\" ng-class=\"{active: $last}\"><a ng-switch-when=\"false\" href=\"{{step.ncyBreadcrumbLink}}\">{{step.ncyBreadcrumbLabel}}</a><span ng-switch-when=\"true\">{{step.ncyBreadcrumbLabel}}</span><span class=\"divider\" ng-hide=\"$last\">/</span></li></ul>',bootstrap3:'<ol class=\"breadcrumb\"><li ng-repeat=\"step in steps\" ng-class=\"{active: $last}\"><a ng-if=\"!$last\" href=\"{{step.ncyBreadcrumbLink}}\">{{step.ncyBreadcrumbLabel}}</a><span ng-if=\"$last\">{{step.ncyBreadcrumbLabel}}</span></li></ol>'};return{restrict:\"AE\",replace:!0,scope:{},template:$breadcrumb.getTemplate($$templates),templateUrl:$breadcrumb.getTemplateUrl(),link:{post:function(scope){var labelWatchers=[],renderBreadcrumb=function(){deregisterWatchers(labelWatchers);var viewScope=$breadcrumb.$getLastViewScope();scope.steps=$breadcrumb.getStatesChain(!1),angular.forEach(scope.steps,function(step){if(step.ncyBreadcrumb&&step.ncyBreadcrumb.label){var parseLabel=$interpolate(step.ncyBreadcrumb.label);step.ncyBreadcrumbLabel=parseLabel(viewScope),registerWatchers(labelWatchers,parseLabel,viewScope,step)}else step.ncyBreadcrumbLabel=step.name})};$rootScope.$on(\"$viewContentLoaded\",function(){renderBreadcrumb()}),renderBreadcrumb()}}}}function BreadcrumbLastDirective($interpolate,$breadcrumb,$rootScope){return{restrict:\"A\",scope:{},template:\"{{ncyBreadcrumbLabel}}\",compile:function(cElement,cAttrs){var template=cElement.attr(cAttrs.$attr.ncyBreadcrumbLast);return template&&cElement.html(template),{post:function(scope){var labelWatchers=[],renderLabel=function(){deregisterWatchers(labelWatchers);var viewScope=$breadcrumb.$getLastViewScope(),lastStep=$breadcrumb.getLastStep();if(lastStep)if(scope.ncyBreadcrumbLink=lastStep.ncyBreadcrumbLink,lastStep.ncyBreadcrumb&&lastStep.ncyBreadcrumb.label){var parseLabel=$interpolate(lastStep.ncyBreadcrumb.label);scope.ncyBreadcrumbLabel=parseLabel(viewScope),registerWatchers(labelWatchers,parseLabel,viewScope,scope)}else scope.ncyBreadcrumbLabel=lastStep.name};$rootScope.$on(\"$viewContentLoaded\",function(){renderLabel()}),renderLabel()}}}}}function BreadcrumbTextDirective($interpolate,$breadcrumb,$rootScope){return{restrict:\"A\",scope:{},template:\"{{ncyBreadcrumbChain}}\",compile:function(cElement,cAttrs){var template=cElement.attr(cAttrs.$attr.ncyBreadcrumbText);template&&cElement.html(template);var separator=cElement.attr(cAttrs.$attr.ncyBreadcrumbTextSeparator)||\" / \";return{post:function(scope){var labelWatchers=[],registerWatchersText=function(labelWatcherArray,interpolationFunction,viewScope){angular.forEach(getExpression(interpolationFunction),function(expression){var watcher=viewScope.$watch(expression,function(newValue,oldValue){newValue!==oldValue&&renderLabel()});labelWatcherArray.push(watcher)})},renderLabel=function(){deregisterWatchers(labelWatchers);var viewScope=$breadcrumb.$getLastViewScope(),steps=$breadcrumb.getStatesChain(),combinedLabels=[];angular.forEach(steps,function(step){if(step.ncyBreadcrumb&&step.ncyBreadcrumb.label){var parseLabel=$interpolate(step.ncyBreadcrumb.label);combinedLabels.push(parseLabel(viewScope)),registerWatchersText(labelWatchers,parseLabel,viewScope)}else combinedLabels.push(step.name)}),scope.ncyBreadcrumbChain=combinedLabels.join(separator)};$rootScope.$on(\"$viewContentLoaded\",function(){renderLabel()}),renderLabel()}}}}}var getExpression=function(interpolationFunction){if(interpolationFunction.expressions)return interpolationFunction.expressions;var expressions=[];return angular.forEach(interpolationFunction.parts,function(part){angular.isFunction(part)&&expressions.push(part.exp)}),expressions},registerWatchers=function(labelWatcherArray,interpolationFunction,viewScope,step){angular.forEach(getExpression(interpolationFunction),function(expression){var watcher=viewScope.$watch(expression,function(){step.ncyBreadcrumbLabel=interpolationFunction(viewScope)});labelWatcherArray.push(watcher)})},deregisterWatchers=function(labelWatcherArray){angular.forEach(labelWatcherArray,function(deregisterWatch){deregisterWatch()}),labelWatcherArray=[]};BreadcrumbDirective.$inject=[\"$interpolate\",\"$breadcrumb\",\"$rootScope\"],BreadcrumbLastDirective.$inject=[\"$interpolate\",\"$breadcrumb\",\"$rootScope\"],BreadcrumbTextDirective.$inject=[\"$interpolate\",\"$breadcrumb\",\"$rootScope\"],breadcrumb.breadcrumbModule.provider(\"$breadcrumb\",$Breadcrumb).directive(\"ncyBreadcrumb\",BreadcrumbDirective).directive(\"ncyBreadcrumbLast\",BreadcrumbLastDirective).directive(\"ncyBreadcrumbText\",BreadcrumbTextDirective)}(breadcrumb=infrastructure.breadcrumb||(infrastructure.breadcrumb={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var carousel;!function(carousel){function carouselDirectiveFactory(){return function(){return{restrict:\"E\",templateUrl:\"modules/infrastructure/carousel/templates/carousel.html\",replace:!0,scope:{duration:\"@\"},transclude:!0,controller:[\"$interval\",\"$scope\",function($interval,$scope){function next(){var position=0;angular.forEach(items,function(item){item.isActive&&(position=item.id),item.isActive=!1}),items[++position]||(position=0),items[position].isActive=!0}function animate(){$progress.css(\"width\",\"0%\"),$progress.animate({width:\"100%\"},+duration,function(){animate()})}var items=[],id=0,duration=$scope.duration||5e3,$progress=$(\".carousel-progress\");$interval(function(){next()},duration),animate(),this.addTab=function(item){0===items.length&&(item.isActive=!0),item.id=id,items.push(item),id+=1}}]}}}carousel.carouselDirectiveFactory=carouselDirectiveFactory}(carousel=infrastructure.carousel||(infrastructure.carousel={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var carousel;!function(carousel){function carouselItemDirectiveFactory(){return function(){return{restrict:\"E\",templateUrl:\"modules/infrastructure/carousel/templates/carousel-item.html\",replace:!0,require:\"^crCarousel\",scope:{name:\"@\",quote:\"@\"},transclude:!0,link:function(scope,element,attrs,crCarousel){crCarousel.addTab(scope)}}}}carousel.carouselItemDirectiveFactory=carouselItemDirectiveFactory}(carousel=infrastructure.carousel||(infrastructure.carousel={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var carousel;!function(carousel){function imageCarouselDirectiveFactory(){return function(){return{restrict:\"E\",templateUrl:\"modules/infrastructure/carousel/templates/image-carousel.html\",replace:!0,scope:{duration:\"@\"},transclude:!0,controller:[\"$interval\",\"$scope\",function($interval,$scope){function next(){var position=0;angular.forEach(items,function(item){item.isActive&&(position=item.id),item.isActive=!1}),items[++position]||(position=0),items[position].isActive=!0}function animate(){$progress.css(\"width\",\"0%\"),$progress.animate({width:\"100%\"},+duration,function(){animate()})}var items=[],id=0,duration=$scope.duration||5e3,$progress=$(\".carousel-progress\");$interval(function(){next()},duration),animate(),this.addTab=function(item){console.log(\"Adding tab\"),0===items.length&&(item.isActive=!0),item.id=id,items.push(item),id+=1}}]}}}carousel.imageCarouselDirectiveFactory=imageCarouselDirectiveFactory}(carousel=infrastructure.carousel||(infrastructure.carousel={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var carousel;!function(carousel){function imageCarouselItemDirectiveFactory(){return function(){return{restrict:\"E\",templateUrl:\"modules/infrastructure/carousel/templates/image-carousel-item.html\",replace:!0,require:\"^crImageCarousel\",scope:{image:\"@\"},transclude:!0,link:function(scope,element,attrs,crImageCarousel){console.log(\"Adding tab\"),crImageCarousel.addTab(scope)}}}}carousel.imageCarouselItemDirectiveFactory=imageCarouselItemDirectiveFactory}(carousel=infrastructure.carousel||(infrastructure.carousel={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){angular.module(\"cr.infrastructure.menu\").directive(\"crMainMenu\",[\"menuService\",\"$state\",\"$compile\",function(menuService,$state,$compile){return{restrict:\"E\",scope:{},controller:[\"$scope\",function($scope){}],link:function(scope,element){var mQuery=jQuery,items=menuService.getItems();if(items){var panels=\"\",html='<nav id=\"menu\" class=\"mm-menu mm-horizontal mm-slide mm-offcanvas\" role=\"navigation\">           <ul class=\"menu-list\" role=\"menu\">';angular.forEach(items,function(item){}),html+=\"</ul>\",html+=panels,html+=\"</nav>\",element.html(html),$compile(element.contents())(scope),scope.navigate=function(item){item&&$state.go(item),mQuery(\"#menu\").mmenu().trigger(\"close.mm\")},mQuery(\"#menu\").mmenu().on(\"opening.mm\",function(){$(\"#mm-blocker\").detach().prependTo(\"#main\")}),mQuery(document).on(\"click\",\"#menu-toggle\",function(e){e.preventDefault();var action=$(\"html\").hasClass(\"mm-opened\")?\"close.mm\":\"open.mm\";mQuery(\"#menu\").mmenu().trigger(action)}),$(\"[data-info]\").on(\"mouseenter click touch\",function(){var $this=$(this),$target=$($this.data(\"info\")),$menu=$(\"#menu\");$this.closest(\"li\").addClass(\"active\"),$target.addClass(\"open\"),$menu.addClass(\"info-open\"),$target.add($this.parent()).off(\"mouseenter mouseleave\").on({mouseenter:function(){var nmbr=$this.data(\"timeout\");clearTimeout(nmbr)},mouseleave:function(){$this.data(\"timeout\",setTimeout(function(){$this.closest(\"li\").removeClass(\"active\"),$target.removeClass(\"open\"),$menu.removeClass(\"info-open\")},200))}})}),$(\".panel-info .close\").on(\"click touch\",function(e){e.preventDefault(),$(this).closest(\".panel-info\").removeClass(\"open\")})}}}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var app=angular.module(\"cr.infrastructure\");app.directive(\"crMenusquare\",[function(){return{restrict:\"E\",replace:!0,transclude:!0,controller:[\"$scope\",function($scope){this.context=$scope.context}],templateUrl:\"modules/infrastructure/menusquare/templates/menusquare.html\"}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var app=angular.module(\"cr.infrastructure\");app.directive(\"crMenusquareItem\",[\"$state\",function(state){return{require:\"^crMenusquare\",restrict:\"E\",replace:!0,scope:{sqIcon:\"@\",sqTitle:\"@\",sqDescription:\"@\",sqAnimDirection:\"@\",sqActions:\"=\",sqClass:\"@\",sqRoute:\"@\",sqRouteParams:\"@\",sqHref:\"@\",sqHrefTarget:\"@\",sqAction:\"&\"},link:function(scope,element,attrs,crMenusquare){scope.context=crMenusquare.context,scope.actionClass=scope.sqAction?\"square-action\":\"\",scope.animClass=scope.sqAnimDirection?\"anim-slide\"+scope.sqAnimDirection:\"\",\"\"==scope.animClass&&scope.sqDescription&&(scope.animClass=\"anim-slidedown\"),scope.sqHrefTarget&&element.find(\"a\").attr(\"target\",scope.sqHrefTarget),scope.handleClick=function(action,$event){if(scope.sqRoute)if(scope.sqRouteParams){var params=angular.fromJson(scope.sqRouteParams);state.go(scope.sqRoute,params)}else state.go(scope.sqRoute);else null!=action?(scope.sqAction({action:action}),$event.stopPropagation()):scope.sqAction({action:{Name:\"click\"}})}},templateUrl:\"modules/infrastructure/menusquare/templates/menusquare-item.html\"}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var notification;!function(notification){function notificationDirectiveFactory(){return function(){return{restrict:\"E\",templateUrl:\"modules/infrastructure/notification/templates/notification.html\",replace:!0}}}notification.notificationDirectiveFactory=notificationDirectiveFactory}(notification=infrastructure.notification||(infrastructure.notification={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var app=angular.module(\"cr.infrastructure\");app.directive(\"crProgressBar\",[function(){return{require:\"^crProgress\",restrict:\"E\",replace:!0,scope:{prData:\"@\",prClass:\"@\",prLabel:\"@\"},templateUrl:\"modules/infrastructure/progress/templates/progressbar.html\",link:function(scope,element,attrs,crProgress){scope.context=crProgress.context}}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var app=angular.module(\"cr.infrastructure\");app.directive(\"crProgress\",[function(){return{restrict:\"E\",replace:!0,transclude:!0,scope:{prHeight:\"@\",prSize:\"@\"},controller:[\"$scope\",function($scope){this.context=$scope.context,this.height=$scope.prHeight?$scope.prHeight:20}],templateUrl:\"modules/infrastructure/progress/templates/progress.html\"}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var app=angular.module(\"cr.infrastructure\");app.directive(\"crProgressLabel\",[function(){return{require:\"^crProgress\",restrict:\"E\",replace:!0,scope:{prLabel:\"@\"},templateUrl:\"modules/infrastructure/progress/templates/progresslabel.html\",link:function(scope,element,attrs,crProgress){scope.height=crProgress.height,scope.context=crProgress.context}}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var app=angular.module(\"cr.infrastructure.scrollspy\");app.directive(\"crScrollSpy\",[\"$window\",\"$location\",\"$anchorScroll\",\"$rootScope\",function($window,$location,$anchorScroll,$rootScope){return{restrict:\"EA\",templateUrl:\"modules/infrastructure/scrollspy/templates/cr-scroll-spy.html\",transclude:!0,replace:!1,controller:function($scope){$scope.spies=[],$scope.spyClick=function(id){var $el=$(\"#\"+id);$el&&$el.offset()&&$(\"html, body\").animate({scrollTop:$el.offset().top+10-50},300)},$rootScope.$on(\"$stateChangeStart\",function(event){$scope.spies=[]}),this.addSpy=function(spyObj){var spy=_.findWhere($scope.spies,{id:spyObj.id});spy?spy.name=spyObj.name:$scope.spies.push(spyObj)}},link:function(scope,elem,attrs){function highLight($el){$(\"[data-spy-id]\").parent().removeClass(\"active\"),$el.parent().addClass(\"active\")}var spies=[];scope.$watch(\"spies\",function(newSpies){newSpies&&newSpies.length>0&&(spies=newSpies)},!0),$(window).scroll(function(){var $el,id,lastSpy;angular.forEach(spies,function(value){value.id&&($el=$(\"#\"+value.id),$el&&$el.offset()&&$el.offset().top-$window.scrollY<=0&&(id=$el.attr(\"id\"),highLight($(\"[data-spy-id=\"+id+\"]\"))))}),$(window).scrollTop()+$(window).height()>=$(document).height()&&spies.length>0&&(lastSpy=spies[spies.length-1],$el=$(\"#\"+lastSpy.id),$el&&(id=$el.attr(\"id\"),highLight($(\"[data-spy-id=\"+id+\"]\"))))})}}}]);var app=angular.module(\"cr.infrastructure.scrollspy\");app.directive(\"crSpy\",[\"$timeout\",\"$location\",\"$anchorScroll\",function($timeout,$location,$anchorScroll){return{restrict:\"A\",require:\"^?crScrollSpy\",scope:{name:\"@crSpyName\"},link:function(scope,elem,attrs,affix){$timeout(function(){var id=$(elem[0]).attr(\"id\");scope.$watch(\"name\",function(name){name&&affix&&affix.addSpy({name:name,id:id})},1)})}}}]);var cr;!function(cr){var infrastructure;!function(infrastructure){angular.module(\"cr.infrastructure\").directive(\"crColAction\",function(){return{restrict:\"A\",priority:100,templateUrl:\"modules/infrastructure/table/templates/craction.html\",link:function(scope,element,attrs){if(scope.performAction=function(action,$event){switch(action.type.toLowerCase()){case\"action\":scope.onRowAction(action,scope.row,$event);break;case\"url\":window.location=action.url}$event.stopPropagation()},scope.actions=[],scope.column){if(scope.value)if(\"string\"==typeof scope.value){var strActions=scope.value.split(\",\");angular.forEach(strActions,function(strAction){var tokens=strAction.split(\":\");switch(tokens[0].toLowerCase()){case\"action\":scope.actions.push({type:tokens[0],action:tokens[2],\"class\":tokens[1]});break;case\"url\":tokens[2]&&scope.row[tokens[2]]&&scope.actions.push({type:\"url\",url:scope.row[tokens[2]],\"class\":tokens[1]})}})}else angular.forEach(scope.value,function(value){value&&value.type&&value.action&&(value.url&&\"url\"===value.type&&scope.row[value.url]&&(value.url=scope.row[value.url]),scope.actions.push(value))})}else scope.actions.push({type:\"Action\",action:\"Select\",\"class\":\"fa fa-chevron-right\"})}}})}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){angular.module(\"cr.infrastructure\").directive(\"crColImage\",function(){return{restrict:\"A\",priority:100,link:function(scope,element,attrs){scope.value&&\"\"!=scope.value&&(0!=scope.value.indexOf(\"http://\")?element.html(\"<img style='height:20px' src='http://chronorace.blob.core.windows.net/webresources/img/\"+scope.value+\"' />\"):element.html(\"<img style='height:20px' src='\"+scope.value+\"' />\"))}}})}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){angular.module(\"cr.infrastructure\").directive(\"crColPos\",[\"$interpolate\",function($interpolate){return{restrict:\"A\",priority:100,link:function(scope,element,attrs){switch(scope.value){case\"-1\":element.html(\"DSQ\");break;case\"-2\":element.html(\"DNF\");break;case\"-3\":element.html(\"DNS\");break;case\"-4\":element.html(\"HD\");break;default:element.html(scope.value+\".\")}}}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){angular.module(\"cr.infrastructure\").directive(\"crColStyle\",[\"$compile\",function($compile){return{restrict:\"A\",priority:110,link:function(scope,element,attrs){var col=scope.column,toRet=\"\";if(col.Bold&&(toRet+=\"text-bold \"),col.Colspan>=0&&element.attr(\"colspan\",col.Colspan),col.Italic&&(toRet+=\"text-italic \"),1!=col.Alignment&&\"Right\"!=col.Alignment||(toRet+=\"text-right \"),col.UrlColumn&&\"\"!=scope.row[col.UrlColumn]){\nvar el=angular.element(\"<a \"+(col.Settings.Target?'target=\"'+col.Settings.Target+'\"':\"\")+' href=\"'+scope.row[col.UrlColumn]+'\"></a>').append(element.contents());element.html(el)}if(2==col.Alignment||\"Center\"==col.Alignment||\"Middle\"==col.Alignment){toRet+=\"text-center \";var el=angular.element(\"<center></center>\").append(element.contents());element.html(el)}element.addClass(toRet)}}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){angular.module(\"cr.infrastructure\").directive(\"crColText\",[\"$interpolate\",\"$filter\",function($interpolate,$filter){return{restrict:\"A\",priority:100,link:function(scope,element,attrs){var value=scope.value;scope.column.Filter&&scope.column.Filter.Name&&(value=$filter(scope.column.Filter.Name)(scope.value,scope.column.Filter.Arg)),element.html(value)}}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){angular.module(\"cr.infrastructure\").directive(\"crColTranslation\",function(){return console.log(\"crCol instance\"),{restrict:\"A\",template:\"{{value|tc:context}}\",link:function(scope,element,attrs){}}})}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var masterSlaveTableCtrl=function(){function masterSlaveTableCtrl($scope,$q,$element,$timeout){var _this=this;this.$scope=$scope,this.$q=$q,this.$timeout=$timeout,this.showSelect=function(){return _this.$scope.showSelect},this.filteredColumns=function(){return _this.$scope.filteredColumns},this.onRowAction=function(action,data){console.log(\"table ctrl: \"+action+\" - \"),_this.$scope.rowAction&&_this.$scope.rowAction({action:action,data:data})};var defaultSettings={currentPage:1,numPerPage:50,enabled:!0};$scope.onRowAction=function(action,data){return _this.onRowAction(action,data)},$scope.filteredRows=[],$scope.filteredColumns=[],$scope.filteredMasterColumns=[],$scope.groups=[],$scope.options=angular.extend(defaultSettings,$scope.defaultOptions),$scope.$watch(\"rows\",function(rows){}),$scope.getClass=function(col){var toRet=\"\";return 1==col.Alignment&&(toRet+=\"text-right \"),2==col.Alignment&&(toRet+=\"text-center \"),toRet},$scope.getGroupClass=function(group){var toRet=\"text-center\";return toRet},$scope.sort=function(columnName,asc){$scope.rows.sort(function(a,b){return a[columnName]>b[columnName]?asc?1:-1:a[columnName]<b[columnName]?asc?-1:1:0})}}return masterSlaveTableCtrl}();angular.module(\"cr.infrastructure\").directive(\"crReplace\",[\"$interpolate\",function($interpolate){return{restrict:\"EA\",templateUrl:function(iElement,iAttrs){if(!iAttrs.crReplace)throw new Error(\"cr-replace: template url must be provided\");return\"modules/infrastructure/table/templates/crentry.html\"},replace:!0}}]),angular.module(\"cr.infrastructure\").directive(\"crMasterSlaveTable\",[\"$timeout\",function($timeout){return{restrict:\"E\",replace:!0,templateUrl:\"modules/infrastructure/table/templates/crmasterslavetable.html\",scope:{options:\"=?\",rowAction:\"&\",table:\"=\"},controller:[\"$scope\",\"$q\",\"$element\",\"$timeout\",masterSlaveTableCtrl],link:function(scope,el,attr){function searchColumns(from,to){var idx=0,toRet=[];return scope.table.SlaveTableDefinition.Columns.forEach(function(col){var cst=col;cst.Visible&&(idx>=from&&idx<to&&toRet.push(col),idx+=cst.Colspan)}),toRet}function buildColumns(columns,width){var toRet={columns:[],groups:[],masterColumns:[]},visibleSlaves={};if(columns){scope.width||(scope.width=2e3);var curGroup={Colspan:0,GroupDisplayName:\"\"};columns.forEach(function(oCol){var col=oCol,weight=0;!isNaN(parseFloat(col.Weight))&&isFinite(col.Weight)&&(weight=parseInt(col.Weight)),col.Visible&&weight<=scope.width&&(toRet.columns.push(col),visibleSlaves[col.Name]=col,col.GroupDisplayName||(col.GroupDisplayName=\"\"),curGroup.GroupDisplayName==col.GroupDisplayName?curGroup.Colspan=curGroup.Colspan+col.Colspan:(toRet.groups.push(curGroup),curGroup={Colspan:col.Colspan,GroupDisplayName:col.GroupDisplayName}))}),(scope.groups.length>0||\"\"!=curGroup.GroupDisplayName)&&toRet.groups.push(curGroup)}return scope.masterColMappings&&(scope.filteredMasterColumns=[],scope.masterColMappings.forEach(function(masterCol){var masterColWeight=0;if(masterCol.Slaves.forEach(function(slave){visibleSlaves.hasOwnProperty(slave.Name)&&(masterColWeight+=slave.Colspan)}),masterColWeight>0){var weight=0;if(!isNaN(parseFloat(masterCol.Column.Weight))&&isFinite(masterCol.Column.Weight)&&(weight=parseInt(masterCol.Column.Weight)),weight>scope.width)if(scope.filteredMasterColumns.length>0){var prv=scope.filteredMasterColumns[scope.filteredMasterColumns.length-1];prv.Colspan=prv.Colspan+masterColWeight}else scope.filteredMasterColumns.push({Colspan:masterColWeight,Name:\"#NA#\",DisplayName:\"\",Type:\"empty\"});else{var copy=masterCol.Column;masterColWeight!=copy.Colspan&&(copy=angular.copy(copy),copy.Colspan=masterColWeight),scope.filteredMasterColumns.push(copy)}}})),toRet}scope.test=function(row){};var slaveTableDefinition;scope.SelectRow=function(row){},scope.entries=[];var debounceUpdate=_.debounce(function(){scope.$apply(function(){if(scope.width=el[0].offsetWidth,scope.table&&scope.table.SlaveTableDefinition){var cols=buildColumns(scope.table.SlaveTableDefinition.Columns,scope.width);scope.filteredColumns=cols.columns,scope.groups=cols.groups,scope.entries=angular.copy(scope.table.Entries)}})},250),interval=setInterval(function(){scope.table&&scope.table.Entries.length>0&&(!scope.width||el[0].offsetWidth!=scope.width)&&(scope.width=el[0].offsetWidth,debounceUpdate())},100);el.on(\"$destroy\",function(){clearInterval(interval)}),scope.masterColMappings=[],scope.$watch(\"table.SlaveTableDefinition\",function(def){if(slaveTableDefinition=def,scope.table&&scope.table.MasterTableDefinition){scope.masterColMappings=[];var idx=0;scope.table.MasterTableDefinition.Columns.forEach(function(masterCol){var cst=masterCol;cst.Visible&&(scope.masterColMappings.push({Column:cst,Slaves:searchColumns(idx,idx+cst.Colspan)}),idx+=cst.Colspan)}),scope.entries=scope.table.Entries}if(def&&def.Columns){var fcols=buildColumns(def.Columns,scope.width);scope.filteredColumns=fcols.columns,scope.groups=fcols.groups}})}}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){angular.module(\"cr.infrastructure\").directive(\"paging\",function(){function setScopeValues(scope,attrs){scope.List=[],scope.Hide=!1,scope.page=parseInt(scope.page)||1,scope.total=parseInt(scope.total)||0,scope.dots=scope.dots||\"...\",scope.ulClass=scope.ulClass||\"pagination\",scope.adjacent=parseInt(scope.adjacent)||1,scope.activeClass=scope.activeClass||\"active\",scope.scrollTop=scope.$eval(attrs.scrollTop),scope.showPrevNext=scope.$eval(attrs.showPrevNext)}function validateScopeValues(scope,pageCount){scope.page>pageCount&&(scope.page=pageCount),scope.page<=0&&(scope.page=1),scope.adjacent<=0&&(scope.adjacent=2),pageCount<=1&&(scope.Hide=!0)}function internalAction(scope,page){scope.page!=page&&(console.log(\"paging action: \"+page),scope.page=page,scope.pagingAction({page:page}),scope.scrollTop&&scrollTo(0,0))}function addPrev(scope,pageCount){if(scope.showPrevNext&&!(pageCount<1)){var disabled=scope.page-1<=0,prevPage=scope.page-1<=0?1:scope.page-1,prev={value:'<i class=\"fa fa-angle-left\"></i>',title:\"Previous Page\",liClass:disabled?\"disabled\":\"\",action:function(){disabled||(console.log(\"prev ok:\"+prevPage),internalAction(scope,prevPage))}};!scope.showPrevNext||pageCount<1||scope.List.push(prev)}}function addNext(scope,pageCount){if(scope.showPrevNext&&!(pageCount<1)){var disabled=scope.page+1>pageCount,nextPage=scope.page+1>=pageCount?pageCount:scope.page+1,next={value:'<i class=\"fa fa-angle-right\"></i>',title:\"Next Page\",liClass:disabled?\"disabled\":\"\",action:function(){disabled||internalAction(scope,nextPage)}};scope.List.push(next)}}function addRange(start,finish,scope){var i=0;for(i=start;i<=finish;i++){var item={value:\"\"+i,title:\"\"+i,liClass:scope.page==i?scope.activeClass:\"\",action:function(){internalAction(scope,this.value)}};scope.List.push(item)}}function addDots(scope){scope.List.push({value:scope.dots})}function addFirst(scope,next){addRange(1,2,scope),3!=next&&addDots(scope)}function addLast(pageCount,scope,prev){prev!=pageCount-2&&addDots(scope),addRange(pageCount-1,pageCount,scope)}function build(scope,attrs){if(scope.pageSize&&!(scope.pageSize<0)){setScopeValues(scope,attrs);var start,size=2*scope.adjacent,pageCount=Math.ceil(scope.total/scope.pageSize);if(validateScopeValues(scope,pageCount),addPrev(scope,pageCount),addNext(scope,pageCount),!scope.compact)if(pageCount<5+size)start=1,addRange(start,pageCount,scope);else{var finish;scope.page<=1+size?(start=1,finish=2+size+(scope.adjacent-1),addRange(start,finish,scope),addLast(pageCount,scope,finish)):pageCount-size>scope.page&&scope.page>size?(start=scope.page-scope.adjacent,finish=scope.page+scope.adjacent,addFirst(scope,start),addRange(start,finish,scope),addLast(pageCount,scope,finish)):(start=pageCount-(1+size+(scope.adjacent-1)),finish=pageCount,addFirst(scope,start),addRange(start,finish,scope))}}}return{restrict:\"EA\",scope:{page:\"=\",pageSize:\"=\",total:\"=\",dots:\"@\",hideIfEmpty:\"@\",ulClass:\"@\",activeClass:\"@\",adjacent:\"@\",compact:\"@\",scrollTop:\"@\",showPrevNext:\"@\",pagingAction:\"&\"},template:'<nav ng-hide=\"Hide\"><ul class=\"pagination\"> <li title=\"{{Item.title}}\" ng-class=\"Item.liClass\" ng-repeat=\"Item in List\"> <a ng-click=\"Item.action()\" ng-bind-html=\"Item.value | sanitize\"></span></ul></nav>',link:function(scope,element,attrs){scope.$watchCollection(\"[page,pageSize,total]\",function(){console.log(\"build pager: \"+scope.pageSize),build(scope,attrs)})}}})}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){angular.module(\"cr.infrastructure\").directive(\"crResultRow\",[\"$compile\",\"$interpolate\",function($compile,$interpolate){return{restrict:\"A\",scope:{data:\"=\",columns:\"=\",context:\"@\"},controller:[\"$scope\",\"$q\",function($scope,$q){}],compile:function(tElem,tAttrs){return{post:function(scope,iElem,iAttr,crTable){function render(element,scope){function isBeginOfAColumnGroup(columnNumber){return _.contains(groupColumnNumbers,columnNumber)}var column,html,i,groupColumnNumbers=[],index=0;if(_.each(scope.groups,function(group){index+=parseInt(group.Colspan),groupColumnNumbers.push(index)}),childScopes){for(i=0;i<childScopes.length;i++)childScopes[i].$destroy();childScopes=[]}for(element.children().remove(),scope.resultRow=_.reduce(scope.data,function(result,value){return _.each(value,function(v,k){var col=_.findWhere(scope.columns,{Name:k});if(col&&col.Sumable){result[k]||(result[k]=0);var t=parseFloat(v)?parseFloat(v):0;result[k]+=t,result[k]=Math.round(100*result[k])/100}else result[k]=\"\"}),result},{resultRow:!0}),i=0;i<scope.columns.length;i++)if(column=scope.columns[i],column.GroupedBy!==!0){var s=scope.$new();childScopes.push(s),s.value=scope.resultRow[column.Name]||\"\",s.row=scope.resultRow,s.column=column,s.$rowElement=iElem,column.Type||(column.Type=\"Text\"),column.hasOwnProperty(\"Visible\")||(column.Visible=!0);var td=angular.element(\"<td cr-col-style cr-col-\"+column.Type.toLowerCase()+' name=\"'+column.Name+'\"></td>');isBeginOfAColumnGroup(i)&&td.addClass(\"first-column-of-group\"),html=$compile(td)(s),element.append(html),element.addClass(\"cr-result-row\")}}var childScopes=[];scope.$watch(\"data\",function(oldVal,newVal){render(iElem,scope)})}}}}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){angular.module(\"cr.infrastructure\").directive(\"crRow\",[\"$compile\",\"$interpolate\",function($compile,$interpolate){return{restrict:\"A\",scope:{row:\"=\",columns:\"=\",groups:\"=\",watchRow:\"=?\",context:\"@\",rowAction:\"&\"},controller:[\"$scope\",\"$q\",function($scope,$q){}],compile:function(tElem,tAttrs){return{pre:function(scope,iElem,iAttrs){scope.onRowAction=function(action,data,$event){$event.stopPropagation(),scope.rowAction&&scope.rowAction({action:{action:action.action,data:data}})}},post:function(scope,iElem,iAttr,crTable){function isBeginOfAColumnGroup(columnNumber){return _.contains(groupColumnNumbers,columnNumber)}function render(element,scope){var column,html,i;if(childScopes){for(i=0;i<childScopes.length;i++)childScopes[i].$destroy();childScopes=[]}for(element.children().remove(),i=0;i<scope.columns.length;i++)if(column=scope.columns[i],column.GroupedBy!==!0){var s=scope.$new();childScopes.push(s),s.value=scope.row[column.Name],s.row=scope.row,s.column=column,s.$rowElement=iElem,column.Type&&\"Time\"!=column.Type||(column.Type=\"Text\"),column.hasOwnProperty(\"Visible\")||(column.Visible=!0);var td=angular.element(\"<td cr-col-style cr-col-\"+column.Type.toLowerCase()+' name=\"'+column.Name+'\"></td>');isBeginOfAColumnGroup(i)&&td.addClass(\"first-column-of-group\"),html=$compile(td)(s),element.append(html)}scope.row.sH_RowStyle&&element.addClass(scope.row.sH_RowStyle)}var childScopes=[],groupColumnNumbers=[],index=0;_.each(scope.groups,function(group){index+=parseInt(group.Colspan),groupColumnNumbers.push(index)}),scope.watchRow&&scope.$watch(\"row\",function(oldVal,newVal){console.log(\"row watch: \"+newVal),render(iElem,scope)}),render(iElem,scope)}}}}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var tableCtrl=function(){function tableCtrl($scope,$q,$element,$timeout){this.$scope=$scope,this.$q=$q,this.$timeout=$timeout;var defaultSettings={currentPage:1,numPerPage:50,enabled:!0,search:!0};$scope.filteredRows=[],$scope.filteredColumns=[],$scope.groups=[],$scope.options=angular.extend({},defaultSettings,$scope.options),$scope.doFilter=function(val){val||(val=\"\");var result=$scope.filter({value:val});$q.when(result).then(function(rows){angular.isDefined(rows)&&null!=rows?$scope.rows=rows:$scope.rows=[]})},$scope.setPage=function(newPage){if($scope.options.enabled===!0&&angular.isArray($scope.rows)){var old=$scope.options.currentPage;$scope.options.currentPage=newPage;var begin=($scope.options.currentPage-1)*$scope.options.numPerPage,end=begin+$scope.options.numPerPage,result=$scope.rows.slice(begin,end);result.length>0?$scope.filteredRows=result:$scope.options.currentPage=old}else $scope.filteredRows=$scope.rows;$scope.grouped&&$scope.groupBy($scope.grouped,!0)},$scope.$watch(\"rows\",function(rows){$scope.setPage(1)}),$scope.getClass=function(col,index){var toRet=\"\";return 1!=col.Alignment&&\"Right\"!=col.Alignment||(toRet+=\"text-right \"),2!=col.Alignment&&\"Center\"!=col.Alignment||(toRet+=\"text-center \"),$scope.isBeginOfAColumnGroup(index)&&(toRet+=\"first-column-of-group \"),toRet},$scope.getGroupClass=function(group){var toRet=\"text-center group-header\";return toRet},$scope.sort=function(columnName,asc){$scope.rows.sort(function(a,b){var va=_.isNaN(parseFloat(a[columnName]))?a[columnName]:parseFloat(a[columnName]),vb=_.isNaN(parseFloat(b[columnName]))?b[columnName]:parseFloat(b[columnName]);return b.resultRow===!0?-1:null===vb?-1:null===va?1:typeof va!=typeof vb?\"number\"!=typeof vb?1:-1:va<=vb?1:-1}),asc&&$scope.rows.reverse(),$scope.grouped&&columnName!==$scope.grouped&&_.sortBy($scope.rows,$scope.grouped),$scope.setPage(1)},$scope.grouped=!1,$scope.groupBy=function(columnName,redo){void 0===redo&&(redo=!1),_.each($scope.filteredColumns,function(column){column.GroupedBy=!1}),$scope.grouped!==columnName||redo?($scope.grouped=columnName,$scope.groupedColumn=_.findWhere($scope.filteredColumns,{Name:columnName}),$scope.groupedColumn&&($scope.groupedColumn.GroupedBy=!0),$scope.groupedRows=_.groupBy(_.reject($scope.filteredRows,function(v){return v.resultRow}),columnName),$scope.rebuild()):$scope.grouped=!1},$scope.getGroupColspan=function(groupIndex){var fromColumn=0,toColumn=0,colSpan=$scope.groups[groupIndex].Colspan,gr=_.first(_.pluck($scope.groups,\"Colspan\"),groupIndex+1),toColumn=_.reduce(gr,function(memo,num){return memo+num},0)-1,gr=_.first(gr,gr.length-1),fromColumn=_.reduce(gr,function(memo,num){return memo+num},0);if($scope.grouped){var groupedIdx=_.findIndex($scope.filteredColumns,function(col){return col.Name===$scope.grouped});groupedIdx<=toColumn&&groupedIdx>=fromColumn&&colSpan--}return colSpan},$scope.isBeginOfAColumnGroup=function(columnNumber){var groupColumnNumbers=[],index=0;if(_.each($scope.groups,function(group){index+=parseInt(group.Colspan),groupColumnNumbers.push(index)}),$scope.grouped){var groupedIdx=_.findIndex($scope.filteredColumns,function(col){return col.Name===$scope.grouped});groupedIdx<=columnNumber&&columnNumber++}return _.contains(groupColumnNumbers,columnNumber)}}return tableCtrl.prototype.showSelect=function(){return this.$scope.showSelect},tableCtrl.prototype.filteredColumns=function(){return this.$scope.filteredColumns},tableCtrl}();angular.module(\"cr.infrastructure\").directive(\"crTable\",[\"$timeout\",function($timeout){return{restrict:\"E\",replace:!0,templateUrl:\"modules/infrastructure/table/templates/crtable.html\",scope:{options:\"=\",showSelect:\"=\",rowAction:\"&\",columns:\"=\",rows:\"=\",filter:\"&\",context:\"@\"},controller:[\"$scope\",\"$q\",\"$element\",\"$timeout\",tableCtrl],controllerAs:\"tableCtrl\",link:function(scope,el,attr){function buildColumns(){var toRet={columns:[],groups:[]};if(columns&&angular.isArray(columns)){scope.width||(scope.width=2e3);var curGroup={Colspan:0,GroupDisplayName:\"\"};columns.forEach(function(oCol){var col=oCol,weight=0;!isNaN(parseFloat(col.Weight))&&isFinite(col.Weight)&&(weight=parseInt(col.Weight)),angular.isDefined(col.Visible)||(col.Visible=!0),col.Visible&&weight<=scope.width&&(toRet.columns.push(col),col.GroupDisplayName||(col.GroupDisplayName=\"\"),curGroup.GroupDisplayName==col.GroupDisplayName?curGroup.Colspan+=col.Colspan:(toRet.groups.push(curGroup),curGroup={Colspan:col.Colspan,GroupDisplayName:col.GroupDisplayName}))}),(scope.groups.length>0||\"\"!=curGroup.GroupDisplayName)&&scope.groups.push(curGroup)}return toRet}var columns;attr.filter&&(scope.filterProvided=!0);var updating=!1,debounceUpdate=_.debounce(function(){scope.$apply(function(){scope.width=el[0].offsetWidth;var cols=buildColumns();scope.filteredColumns=cols.columns,scope.showResult=_.contains(_.pluck(scope.filteredColumns,\"Sumable\"),!0),scope.groups=cols.groups,scope.filteredRows=angular.copy(scope.filteredRows)})},250),interval=setInterval(function(){angular.isDefined(scope.filteredRows)&&!updating&&scope.filteredRows.length>0&&(!scope.width||el[0].offsetWidth!=scope.width)&&(scope.width=el[0].offsetWidth,debounceUpdate())},100);el.on(\"$destroy\",function(){clearInterval(interval)}),scope.$watch(\"columns\",function(cols){columns=cols,_.each(columns,function(column){column.GroupedBy=!1}),scope.grouped=!1,scope.groupedColumn=null,scope.groupedRows=null;var fcols=buildColumns();console.log(\"build columns\"),scope.filteredColumns=fcols.columns,scope.groups=fcols.groups}),scope.rebuild=debounceUpdate,scope.filterProvided&&$timeout(function(){return scope.doFilter(\"\")},0)}}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var app=angular.module(\"cr.infrastructure\");app.directive(\"crFocus\",[\"$timeout\",\"$rootScope\",\"$state\",function($timeout,$rootScope,$state){return{link:function(scope,elem,attr){$timeout(function(){$(\"input[type=text], input[type=password]\").filter(function(){var $this=$(this);return\"\"===$this.val()&&$this.is(\":visible\")}).first().focus()},200)}}}])}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var app=angular.module(\"cr.infrastructure\");app.directive(\"crCarousel\",cr.infrastructure.carousel.carouselDirectiveFactory()),app.directive(\"crCarouselItem\",cr.infrastructure.carousel.carouselItemDirectiveFactory()),app.directive(\"crImageCarousel\",cr.infrastructure.carousel.imageCarouselDirectiveFactory()),app.directive(\"crImageCarouselItem\",cr.infrastructure.carousel.imageCarouselItemDirectiveFactory())}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var notification;!function(notification_1){!function(notificationType){notificationType[notificationType.Info=0]=\"Info\",notificationType[notificationType.Success=1]=\"Success\",notificationType[notificationType.Warning=2]=\"Warning\",notificationType[notificationType.Fatal=3]=\"Fatal\"}(notification_1.notificationType||(notification_1.notificationType={}));var notification=(notification_1.notificationType,function(){function notification(type,message,id,params){this.type=type,this.message=message,this.id=id,this.params=params}return notification}());notification_1.notification=notification}(notification=infrastructure.notification||(infrastructure.notification={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={}));var cr;!function(cr){var infrastructure;!function(infrastructure){var popup;!function(popup){}(popup=infrastructure.popup||(infrastructure.popup={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={})),angular.module(\"cr.infrastructure.menu\").config([\"menuServiceProvider\",function(menuServiceProvider){var items=[],item={},item2={},item4={};item.icon=\"fa-home\",item.name=\"HOME\",item.state=\"index\",item.panel={html:\"somedescription\",imageUrl:\"img/placeholder.jpg\"},items.push(item),item2.icon=\"fa-key\",item2.name=\"SUBITEMSTEST\",item2.subItems=[],item4.icon=\"fa-key\",item4.name=\"PERMISSION\",item4.state=\"permission.menu\",item4.subItems=[];var item3={};item3.icon=\"fa-key\",item3.name=\"some-sub-item\",item3.state=\"permission.menu\",item3.subItems=[],item3.subItems.push({icon:\"fa-key\",name:\"more-sub-items\",state:\"permission.menu\"}),item3.subItems.push({icon:\"fa-key\",name:\"more-sub-items\",state:\"permission.menu\"}),item2.subItems.push(item3),items.push(item2),items.push(item4),menuServiceProvider.config(items)}]);var cr;!function(cr){var infrastructure;!function(infrastructure){var notification;!function(notification){angular.module(\"cr.infrastructure.notification\").directive(\"crNotification\",cr.infrastructure.notification.notificationDirectiveFactory())}(notification=infrastructure.notification||(infrastructure.notification={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={})),angular.module(\"cr.infrastructure.scrollspy\",[\"cr.common\"]);var cr;!function(cr){var infrastructure;!function(infrastructure){var breadcrumb;!function(breadcrumb){}(breadcrumb=infrastructure.breadcrumb||(infrastructure.breadcrumb={}))}(infrastructure=cr.infrastructure||(cr.infrastructure={}))}(cr||(cr={})),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/breadcrumb/templates/breadcrumb.html\",'<ol ng-if=\"steps.length>1\" class=\"breadcrumb hidden-xs\"><li ng-repeat=\"step in steps\" ng-class=\"{active: $last}\"><a ng-if=\"!$last\" href=\"{{step.ncyBreadcrumbLink}}\"><span>{{step.ncyBreadcrumbLabel}}</span></a> <span ng-if=\"$last\">{{step.ncyBreadcrumbLabel}}</span></li></ol>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/carousel/templates/carousel-item.html\",'<div ng-show=\"isActive\" class=\"item\"><blockquote><p>{{ quote | tc:$parent.context }}</p><footer>\"{{ name }}\"</footer></blockquote></div>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/carousel/templates/carousel.html\",'<div id=\"carousel-quotes\" class=\"carousel carousel-fade\"><div class=\"carousel-progress\" style=\"width: 0%\"><div class=\"progress-bar\"></div></div><div class=\"carousel-inner\"><div ng-transclude=\"\"></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/carousel/templates/image-carousel-item.html\",'<div ng-show=\"isActive\" class=\"item\" style=\"background-image: url({{ image | tc:$parent.context }});\"></div>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/carousel/templates/image-carousel.html\",'<div id=\"image-carousel-head\" class=\"user-slider carousel carousel-fade\"><div class=\"carousel-inner\"><div ng-transclude=\"\"></div></div><div class=\"carousel-progress\" style=\"width: 0%\"><div class=\"progress-bar\"></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/menusquare/templates/menusquare-item.html\",'<li class=\"square square-action\" ng-class=\"[animClass, sqClass, actionClass]\"><a ng-href=\"{{sqHref}}\" ng-click=\"handleClick(null,$event)\"><h3 ng-if=\"!sqIcon && !sqDescription\">{{sqTitle|tc:context}}</h3><div ng-if=\"sqIcon || sqDescription\"><i ng-if=\"sqIcon\" class=\"fa fa-fw fa-{{sqIcon}}\"></i><h3>{{sqTitle|tc:context}}</h3></div><div ng-if=\"sqDescription\"><h3>{{sqDescription|tc:context}}</h3><div class=\"actions\" ng-if=\"sqActions\"><button ng-repeat=\"action in sqActions\" class=\"btn btn-action-secondary\" ng-click=\"handleClick(action,$event)\" title=\"IMPORTPROJECT\"><i ng-class=\"[action.Icon]\"></i></button></div></div></a></li>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/menusquare/templates/menusquare.html\",'<ul class=\"menu-square\" ng-transclude=\"\"></ul>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/notification/templates/edittext.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss()\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"text-center\">{{messageData.title|tc:null:messageData }}</h4></div><div class=\"modal-body\"><div class=\"clearfix\"><div class=\"col-sm-12\"><p>{{messageData.message|tc:null:messageData }}</p><br></div></div><div class=\"row\"><div class=\"col-sm-12\"><form cr-focus=\"\" ng-submit=\"$close({action: \\'OK\\',value:messageData.value})\"><input type=\"text\" class=\"form-control\" ng-model=\"messageData.value\"></form></div></div><div class=\"modal-footer\"><br><button ng-repeat=\"button in messageData.buttons\" class=\"btn\" ng-click=\"$close({action: button.name,value:messageData.value})\" ng-class=\"button.default?\\'btn-primary\\':\\'\\'\">{{button.name|translate:null:messageData}}</button></div></div>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/notification/templates/message.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss()\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"text-center\">{{messageData.title|tc:null:messageData }}</h4></div><div class=\"modal-body\"><div class=\"clearfix\"><div class=\"col-sm-12\"><p>{{messageData.message|tc:null:messageData }}</p><br></div></div><div class=\"modal-footer\"><br><button ng-repeat=\"button in messageData.buttons\" class=\"btn\" ng-click=\"$close(button.name)\" ng-class=\"button.default?\\'btn-primary\\':\\'\\'\">{{button.name|translate:null:messageData}}</button></div></div>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/notification/templates/notification.html\",'<div ng-controller=\"notificationCtrl\" id=\"notification\"><alert ng-repeat=\"notification in notifications()\" id=\"notification-{{$index}}\" type=\"{{getNotificationClass(notification)}}\" close=\"close(notification)\">{{notification.message | tc:null:notification.params }}</alert></div>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/progress/templates/progress.html\",'<div class=\"progress\" ng-transclude=\"\" style=\"height:{{prHeight}}px\" ng-class=\"prSize\"></div>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/progress/templates/progressbar.html\",'<div class=\"progress-bar {{prClass}} vertical-align\" role=\"progressbar\" aria-valuenow=\"{{prData}}\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:{{prData}}%;\"><span class=\"sr-only\">{{prData}}% Complete</span> <span ng-show=\"prLabel\" class=\"label\">{{prLabel}}</span></div>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/progress/templates/progresslabel.html\",\"<span class=\\\"progress-label label\\\" ng-style=\\\"{ 'line-height': height + 'px' }\\\">{{prLabel}}</span>\")}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/scrollspy/templates/cr-scroll-spy.html\",'<div style=\"height: 100%;\"><div class=\"toolbar-fixed toolbar-left hidden-xs scrollspy\" id=\"form-dot-navigation\"><ul class=\"nav nav-dot\"><li ng-repeat=\"spy in spies\"><a data-spy-id=\"{{spy.id}}\" ng-click=\"spyClick(spy.id); $event.preventDefault()\" href=\"#\"><span>{{ spy.name }}</span></a></li></ul></div><div style=\"height: 100%\" ng-transclude=\"\"></div></div>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/table/templates/craction.html\",'<button ng-repeat=\"action in actions\" class=\"btn btn-primary btn-xs\" xclass=\"ml5 mr5\" ng-click=\"performAction(action,$event)\"><span ng-class=\"action.class\"></span></button>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/table/templates/crentry.html\",'<tbody><tr class=\"table-header\" ng-id=\"entry.MasterEntry\" cr-row=\"\" row=\"entry.MasterEntry\" columns=\"filteredMasterColumns\" ng-click=\"onRowAction(\\'master\\',row)\"></tr><tr ng-repeat=\"row in entry.Entries\" cr-row=\"\" columns=\"filteredColumns\" ng-click=\"onRowAction(\\'select\\',row,\\'slave\\')\" row=\"row\"></tr></tbody>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/table/templates/crmasterslavetable.html\",'<div><table class=\"table table-striped table-condensed table-hover\"><thead><tr ng-if=\"groups.length>0\"><th ng-repeat=\"group in groups\" colspan=\"{{group.Colspan}}\" style=\"background-color: transparent\" ng-class=\"getGroupClass(group)\">{{group.GroupDisplayName|tc}}</th></tr><tr><th ng-repeat=\"column in filteredColumns\" ng-class=\"getClass(column)\"><a ng-click=\"column.asc = !!!column.asc; sort(column.Name, column.asc)\" href=\"\">{{ column.DisplayName | tc:context }}</a></th><th ng-if=\"showSelect\"></th></tr></thead><tbody class=\"table-header\" ng-repeat-start=\"entry in entries\"><tr class=\"table-header\" ng-id=\"entry.MasterEntry\" cr-row=\"\" row-action=\"onRowAction(action,data)\" row=\"entry.MasterEntry\" columns=\"filteredMasterColumns\" ng-click=\"onRowAction(\\'master\\',entry.MasterEntry)\"></tr></tbody><tbody ng-repeat-end=\"\"><tr ng-repeat=\"row in entry.Entries\" cr-row=\"\" columns=\"filteredColumns\" row-action=\"onRowAction(action,data)\" ng-click=\"onRowAction(\\'select\\',row)\" row=\"row\"></tr></tbody></table></div>');\n}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/table/templates/crtable.html\",'<div class=\"row\"><div class=\"col-xs-12\"><div class=\"grouped-column-header\" data-ng-show=\"grouped\" data-ng-click=\"groupBy( column.Name )\"><span><i class=\"fa fa-expand\"></i> {{ groupedColumn.DisplayName | tc:context }}</span></div><div class=\"form-group has-feedback nomargin\" ng-if=\"filterProvided && options.search\"><form class=\"ng-pristine ng-valid\"><div class=\"row\"><div class=\"col-md-4 col-sm-8\"></div><div class=\"col-md-8 col-sm-4\"><div class=\"input-group\"><input cr-focus=\"\" type=\"text\" class=\"form-control ng-pristine ng-valid\" ng-model=\"$parent.search\" ng-focus=\"\"> <span class=\"input-group-btn\"><button class=\"btn btn-default\" type=\"submit\" ng-click=\"doFilter($parent.search)\"><span class=\"glyphicon glyphicon-search\" aria-hidden=\"true\"></span></button></span></div></div></div></form></div><div data-ng-class=\"{\\'grouped-table\\': grouped}\"><table ng-if=\"rows && rows.length>0\" class=\"table table-striped table-condensed table-hover\"><thead><tr ng-if=\"groups.length>0\"><th ng-repeat=\"group in groups\" colspan=\"{{ getGroupColspan( $index ) }}\" style=\"background-color: transparent\" ng-class=\"getGroupClass(group)\">{{group.GroupDisplayName|tc}}</th></tr><tr><th ng-repeat=\"column in filteredColumns\" ng-class=\"getClass(column, $index)\"><a href=\"\" data-ng-if=\"column.Groupable\" ng-click=\"groupBy( column.Name )\"><i class=\"fa fa-compress\"></i></a> <a ng-click=\"column.asc = !!!column.asc; sort(column.Name, column.asc)\" href=\"\">{{ column.DisplayName | tc:context }}</a></th><th ng-if=\"showSelect\"></th></tr></thead><tbody ng-if=\"!grouped\"><tr cr-row=\"\" ng-repeat=\"row in filteredRows\" columns=\"filteredColumns\" groups=\"groups\" context=\"{{context}}\" row-action=\"rowAction(action,data)\" show-select=\"showSelect\" row=\"row\" ng-click=\"rowAction({action:\\'select\\',data:row})\" ng-class=\"{\\'cr-result-row\\': row.resultRow}\"></tr><tr cr-result-row=\"\" data=\"filteredRows\" columns=\"filteredColumns\" context=\"{{context}}\" data-ng-if=\"showResult\"></tr></tbody><tbody ng-if=\"grouped\" data-ng-repeat=\"(groupName, gfr) in groupedRows\"><tr class=\"cr-group-row\"><th colspan=\"{{ filteredColumns.length }}\">{{groupName}}</th></tr><tr cr-row=\"\" ng-repeat=\"row in gfr\" columns=\"filteredColumns\" groups=\"groups\" context=\"{{context}}\" row-action=\"rowAction(action,data)\" show-select=\"showSelect\" row=\"row\" ng-click=\"rowAction({action:\\'select\\',data:row})\"></tr><tr cr-result-row=\"\" data=\"gfr\" columns=\"filteredColumns\" context=\"{{context}}\" data-ng-if=\"showResult\"></tr><tr cr-result-row=\"\" data=\"filteredRows\" columns=\"filteredColumns\" class=\"master-result-row\" context=\"{{context}}\" data-ng-if=\"showResult && $last\"></tr></tbody></table></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.infrastructure\")}catch(err){module=angular.module(\"cr.infrastructure\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/infrastructure/table/templates/tablepopup.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss({action:\\'close\\'})\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"text-center\">{{ctrl.popupData.title|tc:null:popupData }}</h4></div><div class=\"modal-body\"><div class=\"row error\" ng-if=\"error\"><div class=\"col-sm-12\"><p>{{error}}</p></div></div><div class=\"row\"><div class=\"col-sm-12\"><cr-table row-action=\"ctrl.SelectEntity(action,data)\" filter=\"ctrl.popupData.Filter(value)\" options=\"options\" rows=\"ctrl.popupData.Rows\" columns=\"ctrl.popupData.Columns\"></cr-table></div></div><div class=\"modal-footer\"><button class=\"btn btn-default\" ng-click=\"ctrl.Dismiss()\" translate=\"\">CANCEL</button></div></div>')}])}();\n//# sourceMappingURL=infrastructure.js.map","(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/breadcrumb/templates/breadcrumb.html\",\n    \"<ol ng-if=\\\"steps.length>1\\\" class=\\\"breadcrumb hidden-xs\\\"><li ng-repeat=\\\"step in steps\\\" ng-class=\\\"{active: $last}\\\"><a ng-if=\\\"!$last\\\" href=\\\"{{step.ncyBreadcrumbLink}}\\\"><span>{{step.ncyBreadcrumbLabel}}</span></a> <span ng-if=\\\"$last\\\">{{step.ncyBreadcrumbLabel}}</span></li></ol>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/carousel/templates/carousel-item.html\",\n    \"<div ng-show=\\\"isActive\\\" class=\\\"item\\\"><blockquote><p>{{ quote | tc:$parent.context }}</p><footer>\\\"{{ name }}\\\"</footer></blockquote></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/carousel/templates/carousel.html\",\n    \"<div id=\\\"carousel-quotes\\\" class=\\\"carousel carousel-fade\\\"><div class=\\\"carousel-progress\\\" style=\\\"width: 0%\\\"><div class=\\\"progress-bar\\\"></div></div><div class=\\\"carousel-inner\\\"><div ng-transclude=\\\"\\\"></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/carousel/templates/image-carousel-item.html\",\n    \"<div ng-show=\\\"isActive\\\" class=\\\"item\\\" style=\\\"background-image: url({{ image | tc:$parent.context }});\\\"></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/carousel/templates/image-carousel.html\",\n    \"<div id=\\\"image-carousel-head\\\" class=\\\"user-slider carousel carousel-fade\\\"><div class=\\\"carousel-inner\\\"><div ng-transclude=\\\"\\\"></div></div><div class=\\\"carousel-progress\\\" style=\\\"width: 0%\\\"><div class=\\\"progress-bar\\\"></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/menusquare/templates/menusquare-item.html\",\n    \"<li class=\\\"square square-action\\\" ng-class=\\\"[animClass, sqClass, actionClass]\\\"><a ng-href=\\\"{{sqHref}}\\\" ng-click=\\\"handleClick(null,$event)\\\"><h3 ng-if=\\\"!sqIcon && !sqDescription\\\">{{sqTitle|tc:context}}</h3><div ng-if=\\\"sqIcon || sqDescription\\\"><i ng-if=\\\"sqIcon\\\" class=\\\"fa fa-fw fa-{{sqIcon}}\\\"></i><h3>{{sqTitle|tc:context}}</h3></div><div ng-if=\\\"sqDescription\\\"><h3>{{sqDescription|tc:context}}</h3><div class=\\\"actions\\\" ng-if=\\\"sqActions\\\"><button ng-repeat=\\\"action in sqActions\\\" class=\\\"btn btn-action-secondary\\\" ng-click=\\\"handleClick(action,$event)\\\" title=\\\"IMPORTPROJECT\\\"><i ng-class=\\\"[action.Icon]\\\"></i></button></div></div></a></li>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/menusquare/templates/menusquare.html\",\n    \"<ul class=\\\"menu-square\\\" ng-transclude=\\\"\\\"></ul>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/notification/templates/edittext.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss()\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"text-center\\\">{{messageData.title|tc:null:messageData }}</h4></div><div class=\\\"modal-body\\\"><div class=\\\"clearfix\\\"><div class=\\\"col-sm-12\\\"><p>{{messageData.message|tc:null:messageData }}</p><br></div></div><div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><form cr-focus=\\\"\\\" ng-submit=\\\"$close({action: 'OK',value:messageData.value})\\\"><input type=\\\"text\\\" class=\\\"form-control\\\" ng-model=\\\"messageData.value\\\"></form></div></div><div class=\\\"modal-footer\\\"><br><button ng-repeat=\\\"button in messageData.buttons\\\" class=\\\"btn\\\" ng-click=\\\"$close({action: button.name,value:messageData.value})\\\" ng-class=\\\"button.default?'btn-primary':''\\\">{{button.name|translate:null:messageData}}</button></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/notification/templates/message.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss()\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"text-center\\\">{{messageData.title|tc:null:messageData }}</h4></div><div class=\\\"modal-body\\\"><div class=\\\"clearfix\\\"><div class=\\\"col-sm-12\\\"><p>{{messageData.message|tc:null:messageData }}</p><br></div></div><div class=\\\"modal-footer\\\"><br><button ng-repeat=\\\"button in messageData.buttons\\\" class=\\\"btn\\\" ng-click=\\\"$close(button.name)\\\" ng-class=\\\"button.default?'btn-primary':''\\\">{{button.name|translate:null:messageData}}</button></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/notification/templates/notification.html\",\n    \"<div ng-controller=\\\"notificationCtrl\\\" id=\\\"notification\\\"><alert ng-repeat=\\\"notification in notifications()\\\" id=\\\"notification-{{$index}}\\\" type=\\\"{{getNotificationClass(notification)}}\\\" close=\\\"close(notification)\\\">{{notification.message | tc:null:notification.params }}</alert></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/progress/templates/progress.html\",\n    \"<div class=\\\"progress\\\" ng-transclude=\\\"\\\" style=\\\"height:{{prHeight}}px\\\" ng-class=\\\"prSize\\\"></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/progress/templates/progressbar.html\",\n    \"<div class=\\\"progress-bar {{prClass}} vertical-align\\\" role=\\\"progressbar\\\" aria-valuenow=\\\"{{prData}}\\\" aria-valuemin=\\\"0\\\" aria-valuemax=\\\"100\\\" style=\\\"width:{{prData}}%;\\\"><span class=\\\"sr-only\\\">{{prData}}% Complete</span> <span ng-show=\\\"prLabel\\\" class=\\\"label\\\">{{prLabel}}</span></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/progress/templates/progresslabel.html\",\n    \"<span class=\\\"progress-label label\\\" ng-style=\\\"{ 'line-height': height + 'px' }\\\">{{prLabel}}</span>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/scrollspy/templates/cr-scroll-spy.html\",\n    \"<div style=\\\"height: 100%;\\\"><div class=\\\"toolbar-fixed toolbar-left hidden-xs scrollspy\\\" id=\\\"form-dot-navigation\\\"><ul class=\\\"nav nav-dot\\\"><li ng-repeat=\\\"spy in spies\\\"><a data-spy-id=\\\"{{spy.id}}\\\" ng-click=\\\"spyClick(spy.id); $event.preventDefault()\\\" href=\\\"#\\\"><span>{{ spy.name }}</span></a></li></ul></div><div style=\\\"height: 100%\\\" ng-transclude=\\\"\\\"></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/table/templates/craction.html\",\n    \"<button ng-repeat=\\\"action in actions\\\" class=\\\"btn btn-primary btn-xs\\\" xclass=\\\"ml5 mr5\\\" ng-click=\\\"performAction(action,$event)\\\"><span ng-class=\\\"action.class\\\"></span></button>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/table/templates/crentry.html\",\n    \"<tbody><tr class=\\\"table-header\\\" ng-id=\\\"entry.MasterEntry\\\" cr-row=\\\"\\\" row=\\\"entry.MasterEntry\\\" columns=\\\"filteredMasterColumns\\\" ng-click=\\\"onRowAction('master',row)\\\"></tr><tr ng-repeat=\\\"row in entry.Entries\\\" cr-row=\\\"\\\" columns=\\\"filteredColumns\\\" ng-click=\\\"onRowAction('select',row,'slave')\\\" row=\\\"row\\\"></tr></tbody>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/table/templates/crmasterslavetable.html\",\n    \"<div><table class=\\\"table table-striped table-condensed table-hover\\\"><thead><tr ng-if=\\\"groups.length>0\\\"><th ng-repeat=\\\"group in groups\\\" colspan=\\\"{{group.Colspan}}\\\" style=\\\"background-color: transparent\\\" ng-class=\\\"getGroupClass(group)\\\">{{group.GroupDisplayName|tc}}</th></tr><tr><th ng-repeat=\\\"column in filteredColumns\\\" ng-class=\\\"getClass(column)\\\"><a ng-click=\\\"column.asc = !!!column.asc; sort(column.Name, column.asc)\\\" href=\\\"\\\">{{ column.DisplayName | tc:context }}</a></th><th ng-if=\\\"showSelect\\\"></th></tr></thead><tbody class=\\\"table-header\\\" ng-repeat-start=\\\"entry in entries\\\"><tr class=\\\"table-header\\\" ng-id=\\\"entry.MasterEntry\\\" cr-row=\\\"\\\" row-action=\\\"onRowAction(action,data)\\\" row=\\\"entry.MasterEntry\\\" columns=\\\"filteredMasterColumns\\\" ng-click=\\\"onRowAction('master',entry.MasterEntry)\\\"></tr></tbody><tbody ng-repeat-end=\\\"\\\"><tr ng-repeat=\\\"row in entry.Entries\\\" cr-row=\\\"\\\" columns=\\\"filteredColumns\\\" row-action=\\\"onRowAction(action,data)\\\" ng-click=\\\"onRowAction('select',row)\\\" row=\\\"row\\\"></tr></tbody></table></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/table/templates/crtable.html\",\n    \"<div class=\\\"row\\\"><div class=\\\"col-xs-12\\\"><div class=\\\"grouped-column-header\\\" data-ng-show=\\\"grouped\\\" data-ng-click=\\\"groupBy( column.Name )\\\"><span><i class=\\\"fa fa-expand\\\"></i> {{ groupedColumn.DisplayName | tc:context }}</span></div><div class=\\\"form-group has-feedback nomargin\\\" ng-if=\\\"filterProvided && options.search\\\"><form class=\\\"ng-pristine ng-valid\\\"><div class=\\\"row\\\"><div class=\\\"col-md-4 col-sm-8\\\"></div><div class=\\\"col-md-8 col-sm-4\\\"><div class=\\\"input-group\\\"><input cr-focus=\\\"\\\" type=\\\"text\\\" class=\\\"form-control ng-pristine ng-valid\\\" ng-model=\\\"$parent.search\\\" ng-focus=\\\"\\\"> <span class=\\\"input-group-btn\\\"><button class=\\\"btn btn-default\\\" type=\\\"submit\\\" ng-click=\\\"doFilter($parent.search)\\\"><span class=\\\"glyphicon glyphicon-search\\\" aria-hidden=\\\"true\\\"></span></button></span></div></div></div></form></div><div data-ng-class=\\\"{'grouped-table': grouped}\\\"><table ng-if=\\\"rows && rows.length>0\\\" class=\\\"table table-striped table-condensed table-hover\\\"><thead><tr ng-if=\\\"groups.length>0\\\"><th ng-repeat=\\\"group in groups\\\" colspan=\\\"{{ getGroupColspan( $index ) }}\\\" style=\\\"background-color: transparent\\\" ng-class=\\\"getGroupClass(group)\\\">{{group.GroupDisplayName|tc}}</th></tr><tr><th ng-repeat=\\\"column in filteredColumns\\\" ng-class=\\\"getClass(column, $index)\\\"><a href=\\\"\\\" data-ng-if=\\\"column.Groupable\\\" ng-click=\\\"groupBy( column.Name )\\\"><i class=\\\"fa fa-compress\\\"></i></a> <a ng-click=\\\"column.asc = !!!column.asc; sort(column.Name, column.asc)\\\" href=\\\"\\\">{{ column.DisplayName | tc:context }}</a></th><th ng-if=\\\"showSelect\\\"></th></tr></thead><tbody ng-if=\\\"!grouped\\\"><tr cr-row=\\\"\\\" ng-repeat=\\\"row in filteredRows\\\" columns=\\\"filteredColumns\\\" groups=\\\"groups\\\" context=\\\"{{context}}\\\" row-action=\\\"rowAction(action,data)\\\" show-select=\\\"showSelect\\\" row=\\\"row\\\" ng-click=\\\"rowAction({action:'select',data:row})\\\" ng-class=\\\"{'cr-result-row': row.resultRow}\\\"></tr><tr cr-result-row=\\\"\\\" data=\\\"filteredRows\\\" columns=\\\"filteredColumns\\\" context=\\\"{{context}}\\\" data-ng-if=\\\"showResult\\\"></tr></tbody><tbody ng-if=\\\"grouped\\\" data-ng-repeat=\\\"(groupName, gfr) in groupedRows\\\"><tr class=\\\"cr-group-row\\\"><th colspan=\\\"{{ filteredColumns.length }}\\\">{{groupName}}</th></tr><tr cr-row=\\\"\\\" ng-repeat=\\\"row in gfr\\\" columns=\\\"filteredColumns\\\" groups=\\\"groups\\\" context=\\\"{{context}}\\\" row-action=\\\"rowAction(action,data)\\\" show-select=\\\"showSelect\\\" row=\\\"row\\\" ng-click=\\\"rowAction({action:'select',data:row})\\\"></tr><tr cr-result-row=\\\"\\\" data=\\\"gfr\\\" columns=\\\"filteredColumns\\\" context=\\\"{{context}}\\\" data-ng-if=\\\"showResult\\\"></tr><tr cr-result-row=\\\"\\\" data=\\\"filteredRows\\\" columns=\\\"filteredColumns\\\" class=\\\"master-result-row\\\" context=\\\"{{context}}\\\" data-ng-if=\\\"showResult && $last\\\"></tr></tbody></table></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.infrastructure\"); }\ncatch(err) { module = angular.module(\"cr.infrastructure\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/infrastructure/table/templates/tablepopup.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss({action:'close'})\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"text-center\\\">{{ctrl.popupData.title|tc:null:popupData }}</h4></div><div class=\\\"modal-body\\\"><div class=\\\"row error\\\" ng-if=\\\"error\\\"><div class=\\\"col-sm-12\\\"><p>{{error}}</p></div></div><div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><cr-table row-action=\\\"ctrl.SelectEntity(action,data)\\\" filter=\\\"ctrl.popupData.Filter(value)\\\" options=\\\"options\\\" rows=\\\"ctrl.popupData.Rows\\\" columns=\\\"ctrl.popupData.Columns\\\"></cr-table></div></div><div class=\\\"modal-footer\\\"><button class=\\\"btn btn-default\\\" ng-click=\\\"ctrl.Dismiss()\\\" translate=\\\"\\\">CANCEL</button></div></div>\");\n}]);\n})();\n","/**\n * @license Angular UI Tree v2.5.0\n * (c) 2010-2015. https://github.com/angular-ui-tree/angular-ui-tree\n * License: MIT\n */\n(function () {\n  'use strict';\n\n  angular.module('ui.tree', [])\n    .constant('treeConfig', {\n      treeClass: 'angular-ui-tree',\n      emptyTreeClass: 'angular-ui-tree-empty',\n      hiddenClass: 'angular-ui-tree-hidden',\n      nodesClass: 'angular-ui-tree-nodes',\n      nodeClass: 'angular-ui-tree-node',\n      handleClass: 'angular-ui-tree-handle',\n      placeholderClass: 'angular-ui-tree-placeholder',\n      dragClass: 'angular-ui-tree-drag',\n      dragThreshold: 3,\n      levelThreshold: 30\n    });\n\n})();\n\n(function () {\n  'use strict';\n\n  angular.module('ui.tree')\n\n    .controller('TreeHandleController', ['$scope', '$element',\n      function ($scope, $element) {\n        this.scope = $scope;\n\n        $scope.$element = $element;\n        $scope.$nodeScope = null;\n        $scope.$type = 'uiTreeHandle';\n\n      }\n    ]);\n})();\n\n(function () {\n  'use strict';\n\n  angular.module('ui.tree')\n    .controller('TreeNodeController', ['$scope', '$element',\n      function ($scope, $element) {\n        this.scope = $scope;\n\n        $scope.$element = $element;\n        $scope.$modelValue = null; // Model value for node;\n        $scope.$parentNodeScope = null; // uiTreeNode Scope of parent node;\n        $scope.$childNodesScope = null; // uiTreeNodes Scope of child nodes.\n        $scope.$parentNodesScope = null; // uiTreeNodes Scope of parent nodes.\n        $scope.$treeScope = null; // uiTree scope\n        $scope.$handleScope = null; // it's handle scope\n        $scope.$type = 'uiTreeNode';\n        $scope.$$apply = false;\n        $scope.collapsed = false;\n\n        $scope.init = function (controllersArr) {\n          var treeNodesCtrl = controllersArr[0];\n          $scope.$treeScope = controllersArr[1] ? controllersArr[1].scope : null;\n\n          // find the scope of it's parent node\n          $scope.$parentNodeScope = treeNodesCtrl.scope.$nodeScope;\n          // modelValue for current node\n          $scope.$modelValue = treeNodesCtrl.scope.$modelValue[$scope.$index];\n          $scope.$parentNodesScope = treeNodesCtrl.scope;\n          treeNodesCtrl.scope.initSubNode($scope); // init sub nodes\n\n          $element.on('$destroy', function () {\n            treeNodesCtrl.scope.destroySubNode($scope); // destroy sub nodes\n          });\n        };\n\n        $scope.index = function () {\n          return $scope.$parentNodesScope.$modelValue.indexOf($scope.$modelValue);\n        };\n\n        $scope.dragEnabled = function () {\n          return !($scope.$treeScope && !$scope.$treeScope.dragEnabled);\n        };\n\n        $scope.isSibling = function (targetNode) {\n          return $scope.$parentNodesScope == targetNode.$parentNodesScope;\n        };\n\n        $scope.isChild = function (targetNode) {\n          var nodes = $scope.childNodes();\n          return nodes && nodes.indexOf(targetNode) > -1;\n        };\n\n        $scope.prev = function () {\n          var index = $scope.index();\n          if (index > 0) {\n            return $scope.siblings()[index - 1];\n          }\n          return null;\n        };\n\n        $scope.siblings = function () {\n          return $scope.$parentNodesScope.childNodes();\n        };\n\n        $scope.childNodesCount = function () {\n          return $scope.childNodes() ? $scope.childNodes().length : 0;\n        };\n\n        $scope.hasChild = function () {\n          return $scope.childNodesCount() > 0;\n        };\n\n        $scope.childNodes = function () {\n          return $scope.$childNodesScope && $scope.$childNodesScope.$modelValue ?\n            $scope.$childNodesScope.childNodes() :\n            null;\n        };\n\n        $scope.accept = function (sourceNode, destIndex) {\n          return $scope.$childNodesScope &&\n            $scope.$childNodesScope.$modelValue &&\n            $scope.$childNodesScope.accept(sourceNode, destIndex);\n        };\n\n        $scope.removeNode = function () {\n          var node = $scope.remove();\n          $scope.$callbacks.removed(node);\n          return node;\n        };\n\n        $scope.remove = function () {\n          return $scope.$parentNodesScope.removeNode($scope);\n        };\n\n        $scope.toggle = function () {\n          $scope.collapsed = !$scope.collapsed;\n        };\n\n        $scope.collapse = function () {\n          $scope.collapsed = true;\n        };\n\n        $scope.expand = function () {\n          $scope.collapsed = false;\n        };\n\n        $scope.depth = function () {\n          var parentNode = $scope.$parentNodeScope;\n          if (parentNode) {\n            return parentNode.depth() + 1;\n          }\n          return 1;\n        };\n\n        var subDepth = 0;\n        function countSubDepth(scope) {\n          var i, childNodes,\n              count = 0,\n              nodes = scope.childNodes();\n\n          for (i = 0; i < nodes.length; i++) {\n            childNodes = nodes[i].$childNodesScope;\n\n            if (childNodes && childNodes.childNodesCount() > 0) {\n              count = 1;\n              countSubDepth(childNodes);\n            }\n          }\n          subDepth += count;\n        }\n\n        $scope.maxSubDepth = function () {\n          subDepth = 0;\n          if ($scope.$childNodesScope) {\n            countSubDepth($scope.$childNodesScope);\n          }\n          return subDepth;\n        };\n\n      }\n    ]);\n})();\n\n(function () {\n  'use strict';\n\n  angular.module('ui.tree')\n\n    .controller('TreeNodesController', ['$scope', '$element',\n      function ($scope, $element) {\n        this.scope = $scope;\n\n        $scope.$element = $element;\n        $scope.$modelValue = null;\n        $scope.$nodeScope = null; // the scope of node which the nodes belongs to\n        $scope.$treeScope = null;\n        $scope.$type = 'uiTreeNodes';\n        $scope.$nodesMap = {};\n\n        $scope.nodropEnabled = false;\n        $scope.maxDepth = 0;\n        $scope.cloneEnabled = false;\n\n        $scope.initSubNode = function (subNode) {\n          if (!subNode.$modelValue) {\n            return null;\n          }\n          $scope.$nodesMap[subNode.$modelValue.$$hashKey] = subNode;\n        };\n\n        $scope.destroySubNode = function (subNode) {\n          if (!subNode.$modelValue) {\n            return null;\n          }\n          $scope.$nodesMap[subNode.$modelValue.$$hashKey] = null;\n        };\n\n        $scope.accept = function (sourceNode, destIndex) {\n          return $scope.$treeScope.$callbacks.accept(sourceNode, $scope, destIndex);\n        };\n\n        $scope.beforeDrag = function (sourceNode) {\n          return $scope.$treeScope.$callbacks.beforeDrag(sourceNode);\n        };\n\n        $scope.isParent = function (node) {\n          return node.$parentNodesScope == $scope;\n        };\n\n        $scope.hasChild = function () {\n          return $scope.$modelValue.length > 0;\n        };\n\n        $scope.safeApply = function (fn) {\n          var phase = this.$root.$$phase;\n          if (phase == '$apply' || phase == '$digest') {\n            if (fn && (typeof (fn) === 'function')) {\n              fn();\n            }\n          } else {\n            this.$apply(fn);\n          }\n        };\n\n        $scope.removeNode = function (node) {\n          var index = $scope.$modelValue.indexOf(node.$modelValue);\n          if (index > -1) {\n            $scope.safeApply(function () {\n              $scope.$modelValue.splice(index, 1)[0];\n            });\n            return node;\n          }\n          return null;\n        };\n\n        $scope.insertNode = function (index, nodeData) {\n          $scope.safeApply(function () {\n            $scope.$modelValue.splice(index, 0, nodeData);\n          });\n        };\n\n        $scope.childNodes = function () {\n          var i, nodes = [];\n          if ($scope.$modelValue) {\n            for (i = 0; i < $scope.$modelValue.length; i++) {\n              nodes.push($scope.$nodesMap[$scope.$modelValue[i].$$hashKey]);\n            }\n          }\n          return nodes;\n        };\n\n        $scope.depth = function () {\n          if ($scope.$nodeScope) {\n            return $scope.$nodeScope.depth();\n          }\n          return 0; // if it has no $nodeScope, it's root\n        };\n\n        // check if depth limit has reached\n        $scope.outOfDepth = function (sourceNode) {\n          var maxDepth = $scope.maxDepth || $scope.$treeScope.maxDepth;\n          if (maxDepth > 0) {\n            return $scope.depth() + sourceNode.maxSubDepth() + 1 > maxDepth;\n          }\n          return false;\n        };\n\n      }\n    ]);\n})();\n\n(function () {\n  'use strict';\n\n  angular.module('ui.tree')\n\n    .controller('TreeController', ['$scope', '$element',\n      function ($scope, $element) {\n        this.scope = $scope;\n\n        $scope.$element = $element;\n        $scope.$nodesScope = null; // root nodes\n        $scope.$type = 'uiTree';\n        $scope.$emptyElm = null;\n        $scope.$callbacks = null;\n\n        $scope.dragEnabled = true;\n        $scope.emptyPlaceholderEnabled = true;\n        $scope.maxDepth = 0;\n        $scope.dragDelay = 0;\n        $scope.cloneEnabled = false;\n        $scope.nodropEnabled = false;\n\n        // Check if it's a empty tree\n        $scope.isEmpty = function () {\n          return ($scope.$nodesScope && $scope.$nodesScope.$modelValue\n          && $scope.$nodesScope.$modelValue.length === 0);\n        };\n\n        // add placeholder to empty tree\n        $scope.place = function (placeElm) {\n          $scope.$nodesScope.$element.append(placeElm);\n          $scope.$emptyElm.remove();\n        };\n\n        this.resetEmptyElement = function () {\n          if ((!$scope.$nodesScope.$modelValue || $scope.$nodesScope.$modelValue.length === 0) &&\n            $scope.emptyPlaceholderEnabled) {\n            $element.append($scope.$emptyElm);\n          } else {\n            $scope.$emptyElm.remove();\n          }\n        };\n\n        $scope.resetEmptyElement = this.resetEmptyElement;\n\n        var collapseOrExpand = function (scope, collapsed) {\n          var i, subScope,\n              nodes = scope.childNodes();\n          for (i = 0; i < nodes.length; i++) {\n            collapsed ? nodes[i].collapse() : nodes[i].expand();\n            subScope = nodes[i].$childNodesScope;\n            if (subScope) {\n              collapseOrExpand(subScope, collapsed);\n            }\n          }\n        };\n\n        $scope.collapseAll = function () {\n          collapseOrExpand($scope.$nodesScope, true);\n        };\n\n        $scope.expandAll = function () {\n          collapseOrExpand($scope.$nodesScope, false);\n        };\n\n      }\n    ]);\n})();\n\n(function () {\n  'use strict';\n\n  angular.module('ui.tree')\n    .directive('uiTree', ['treeConfig', '$window',\n      function (treeConfig, $window) {\n        return {\n          restrict: 'A',\n          scope: true,\n          controller: 'TreeController',\n          link: function (scope, element, attrs, ctrl) {\n            var callbacks = {\n              accept: null,\n              beforeDrag: null\n            },\n              config = {};\n\n            angular.extend(config, treeConfig);\n            if (config.treeClass) {\n              element.addClass(config.treeClass);\n            }\n\n            scope.$emptyElm = angular.element($window.document.createElement('div'));\n            if (config.emptyTreeClass) {\n              scope.$emptyElm.addClass(config.emptyTreeClass);\n            }\n\n            scope.$watch('$nodesScope.$modelValue.length', function () {\n              if (!scope.$nodesScope.$modelValue) {\n                return;\n              }\n\n              ctrl.resetEmptyElement();\n            }, true);\n\n            scope.$watch(attrs.dragEnabled, function (val) {\n              if ((typeof val) == 'boolean') {\n                scope.dragEnabled = val;\n              }\n            });\n\n            scope.$watch(attrs.emptyPlaceholderEnabled, function (val) {\n              if ((typeof val) == 'boolean') {\n                scope.emptyPlaceholderEnabled = val;\n                ctrl.resetEmptyElement();\n              }\n            });\n\n            scope.$watch(attrs.nodropEnabled, function (val) {\n              if ((typeof val) == 'boolean') {\n                scope.nodropEnabled = val;\n              }\n            });\n\n            scope.$watch(attrs.cloneEnabled, function (val) {\n              if ((typeof val) == 'boolean') {\n                scope.cloneEnabled = val;\n              }\n            });\n\n            scope.$watch(attrs.maxDepth, function (val) {\n              if ((typeof val) == 'number') {\n                scope.maxDepth = val;\n              }\n            });\n\n            scope.$watch(attrs.dragDelay, function (val) {\n              if ((typeof val) == 'number') {\n                scope.dragDelay = val;\n              }\n            });\n\n            // check if the dest node can accept the dragging node\n            // by default, we check the 'data-nodrop-enabled' attribute in `ui-tree-nodes`\n            // and the 'max-depth' attribute in `ui-tree` or `ui-tree-nodes`.\n            // the method can be overrided\n            callbacks.accept = function (sourceNodeScope, destNodesScope, destIndex) {\n              if (destNodesScope.nodropEnabled || destNodesScope.outOfDepth(sourceNodeScope)) {\n                return false;\n              }\n              return true;\n            };\n\n            callbacks.beforeDrag = function (sourceNodeScope) {\n              return true;\n            };\n\n            callbacks.removed = function (node) {\n\n            };\n\n            callbacks.dropped = function (event) {\n\n            };\n\n            callbacks.dragStart = function (event) {\n\n            };\n\n            callbacks.dragMove = function (event) {\n\n            };\n\n            callbacks.dragStop = function (event) {\n\n            };\n\n            callbacks.beforeDrop = function (event) {\n\n            };\n\n            scope.$watch(attrs.uiTree, function (newVal, oldVal) {\n              angular.forEach(newVal, function (value, key) {\n                if (callbacks[key]) {\n                  if (typeof value === 'function') {\n                    callbacks[key] = value;\n                  }\n                }\n              });\n\n              scope.$callbacks = callbacks;\n            }, true);\n\n\n          }\n        };\n      }\n    ]);\n})();\n\n(function () {\n  'use strict';\n\n  angular.module('ui.tree')\n    .directive('uiTreeHandle', ['treeConfig',\n      function (treeConfig) {\n        return {\n          require: '^uiTreeNode',\n          restrict: 'A',\n          scope: true,\n          controller: 'TreeHandleController',\n          link: function (scope, element, attrs, treeNodeCtrl) {\n            var config = {};\n            angular.extend(config, treeConfig);\n            if (config.handleClass) {\n              element.addClass(config.handleClass);\n            }\n            // connect with the tree node.\n            if (scope != treeNodeCtrl.scope) {\n              scope.$nodeScope = treeNodeCtrl.scope;\n              treeNodeCtrl.scope.$handleScope = scope;\n            }\n          }\n        };\n      }\n    ]);\n})();\n\n(function () {\n  'use strict';\n\n  angular.module('ui.tree')\n\n    .directive('uiTreeNode', ['treeConfig', '$uiTreeHelper', '$window', '$document', '$timeout',\n      function (treeConfig, $uiTreeHelper, $window, $document, $timeout) {\n        return {\n          require: ['^uiTreeNodes', '^uiTree'],\n          restrict: 'A',\n          controller: 'TreeNodeController',\n          link: function (scope, element, attrs, controllersArr) {\n            // todo startPos is unused\n            var config = {},\n              hasTouch = 'ontouchstart' in window,\n              startPos, firstMoving, dragInfo, pos,\n              placeElm, hiddenPlaceElm, dragElm,\n              treeScope = null,\n              elements, // As a parameter for callbacks\n              dragDelaying = true,\n              dragStarted = false,\n              dragTimer = null,\n              body = document.body,\n              html = document.documentElement,\n              document_height,\n              document_width,\n              dragStart,\n              tagName,\n              dragMove,\n              dragEnd,\n              dragStartEvent,\n              dragMoveEvent,\n              dragEndEvent,\n              dragCancelEvent,\n              dragDelay,\n              bindDrag,\n              keydownHandler;\n            angular.extend(config, treeConfig);\n            if (config.nodeClass) {\n              element.addClass(config.nodeClass);\n            }\n            scope.init(controllersArr);\n\n            scope.collapsed = !!$uiTreeHelper.getNodeAttribute(scope, 'collapsed');\n\n            scope.$watch(attrs.collapsed, function (val) {\n              if ((typeof val) == 'boolean') {\n                scope.collapsed = val;\n              }\n            });\n\n            scope.$watch('collapsed', function (val) {\n              $uiTreeHelper.setNodeAttribute(scope, 'collapsed', val);\n              attrs.$set('collapsed', val);\n            });\n\n            dragStart = function (e) {\n              if (!hasTouch && (e.button == 2 || e.which == 3)) {\n                // disable right click\n                return;\n              }\n              if (e.uiTreeDragging || (e.originalEvent && e.originalEvent.uiTreeDragging)) { // event has already fired in other scope.\n                return;\n              }\n\n              // the element which is clicked.\n              var eventElm = angular.element(e.target),\n                eventScope = eventElm.scope(),\n                eventElmTagName, tagName,\n                eventObj, tdElm, hStyle;\n              if (!eventScope || !eventScope.$type) {\n                return;\n              }\n              if (eventScope.$type != 'uiTreeNode'\n                && eventScope.$type != 'uiTreeHandle') { // Check if it is a node or a handle\n                return;\n              }\n              if (eventScope.$type == 'uiTreeNode'\n                && eventScope.$handleScope) { // If the node has a handle, then it should be clicked by the handle\n                return;\n              }\n\n              eventElmTagName = eventElm.prop('tagName').toLowerCase();\n              if (eventElmTagName == 'input' ||\n                eventElmTagName == 'textarea' ||\n                eventElmTagName == 'button' ||\n                eventElmTagName == 'select') { // if it's a input or button, ignore it\n                return;\n              }\n\n              // check if it or it's parents has a 'data-nodrag' attribute\n              while (eventElm && eventElm[0] && eventElm[0] != element) {\n                if ($uiTreeHelper.nodrag(eventElm)) { // if the node mark as `nodrag`, DONOT drag it.\n                  return;\n                }\n                eventElm = eventElm.parent();\n              }\n\n              if (!scope.beforeDrag(scope)) {\n                return;\n              }\n\n              e.uiTreeDragging = true; // stop event bubbling\n              if (e.originalEvent) {\n                e.originalEvent.uiTreeDragging = true;\n              }\n              e.preventDefault();\n              eventObj = $uiTreeHelper.eventObj(e);\n\n              firstMoving = true;\n              dragInfo = $uiTreeHelper.dragInfo(scope);\n\n              // Fire dragStart callback\n              scope.$apply(function () {\n                scope.$treeScope.$callbacks.dragStart(dragInfo.eventArgs(elements, pos));\n              });\n\n              tagName = scope.$element.prop('tagName');\n\n              if (tagName.toLowerCase() === 'tr') {\n                placeElm = angular.element($window.document.createElement(tagName));\n                tdElm = angular.element($window.document.createElement('td'))\n                  .addClass(config.placeholderClass);\n                placeElm.append(tdElm);\n              } else {\n                placeElm = angular.element($window.document.createElement(tagName))\n                  .addClass(config.placeholderClass);\n              }\n              hiddenPlaceElm = angular.element($window.document.createElement(tagName));\n              if (config.hiddenClass) {\n                hiddenPlaceElm.addClass(config.hiddenClass);\n              }\n              pos = $uiTreeHelper.positionStarted(eventObj, scope.$element);\n              placeElm.css('height', $uiTreeHelper.height(scope.$element) + 'px');\n              dragElm = angular.element($window.document.createElement(scope.$parentNodesScope.$element.prop('tagName')))\n                .addClass(scope.$parentNodesScope.$element.attr('class')).addClass(config.dragClass);\n              dragElm.css('width', $uiTreeHelper.width(scope.$element) + 'px');\n              dragElm.css('z-index', 9999);\n\n              // Prevents cursor to change rapidly in Opera 12.16 and IE when dragging an element\n              hStyle = (scope.$element[0].querySelector('.angular-ui-tree-handle') || scope.$element[0]).currentStyle;\n              if (hStyle) {\n                document.body.setAttribute('ui-tree-cursor', $document.find('body').css('cursor') || '');\n                $document.find('body').css({'cursor': hStyle.cursor + '!important'});\n              }\n\n              scope.$element.after(placeElm);\n              scope.$element.after(hiddenPlaceElm);\n              dragElm.append(scope.$element);\n              $document.find('body').append(dragElm);\n              dragElm.css({\n                'left': eventObj.pageX - pos.offsetX + 'px',\n                'top': eventObj.pageY - pos.offsetY + 'px'\n              });\n              elements = {\n                placeholder: placeElm,\n                dragging: dragElm\n              };\n\n              angular.element($document).bind('touchend', dragEndEvent);\n              angular.element($document).bind('touchcancel', dragEndEvent);\n              angular.element($document).bind('touchmove', dragMoveEvent);\n              angular.element($document).bind('mouseup', dragEndEvent);\n              angular.element($document).bind('mousemove', dragMoveEvent);\n              angular.element($document).bind('mouseleave', dragCancelEvent);\n\n              document_height = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight);\n              document_width = Math.max(body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth);\n            };\n\n            dragMove = function (e) {\n              var eventObj = $uiTreeHelper.eventObj(e),\n                prev,\n                next,\n                leftElmPos,\n                topElmPos,\n                top_scroll,\n                bottom_scroll,\n                target,\n                decrease,\n                targetX,\n                targetY,\n                displayElm,\n                targetNode,\n                targetElm,\n                isEmpty,\n                targetOffset,\n                targetBefore;\n\n              if (dragElm) {\n                e.preventDefault();\n\n                if ($window.getSelection) {\n                  $window.getSelection().removeAllRanges();\n                } else if ($window.document.selection) {\n                  $window.document.selection.empty();\n                }\n\n                leftElmPos = eventObj.pageX - pos.offsetX;\n                topElmPos = eventObj.pageY - pos.offsetY;\n\n                //dragElm can't leave the screen on the left\n                if (leftElmPos < 0) {\n                  leftElmPos = 0;\n                }\n\n                //dragElm can't leave the screen on the top\n                if (topElmPos < 0) {\n                  topElmPos = 0;\n                }\n\n                //dragElm can't leave the screen on the bottom\n                if ((topElmPos + 10) > document_height) {\n                  topElmPos = document_height - 10;\n                }\n\n                //dragElm can't leave the screen on the right\n                if ((leftElmPos + 10) > document_width) {\n                  leftElmPos = document_width - 10;\n                }\n\n                dragElm.css({\n                  'left': leftElmPos + 'px',\n                  'top': topElmPos + 'px'\n                });\n\n                top_scroll = window.pageYOffset || $window.document.documentElement.scrollTop;\n                bottom_scroll = top_scroll + (window.innerHeight || $window.document.clientHeight || $window.document.clientHeight);\n\n                // to scroll down if cursor y-position is greater than the bottom position the vertical scroll\n                if (bottom_scroll < eventObj.pageY && bottom_scroll <= document_height) {\n                  window.scrollBy(0, 10);\n                }\n\n                // to scroll top if cursor y-position is less than the top position the vertical scroll\n                if (top_scroll > eventObj.pageY) {\n                  window.scrollBy(0, -10);\n                }\n\n                $uiTreeHelper.positionMoved(e, pos, firstMoving);\n                if (firstMoving) {\n                  firstMoving = false;\n                  return;\n                }\n\n                // move horizontal\n                if (pos.dirAx && pos.distAxX >= config.levelThreshold) {\n                  pos.distAxX = 0;\n\n                  // increase horizontal level if previous sibling exists and is not collapsed\n                  if (pos.distX > 0) {\n                    prev = dragInfo.prev();\n                    if (prev && !prev.collapsed\n                      && prev.accept(scope, prev.childNodesCount())) {\n                      prev.$childNodesScope.$element.append(placeElm);\n                      dragInfo.moveTo(prev.$childNodesScope, prev.childNodes(), prev.childNodesCount());\n                    }\n                  }\n\n                  // decrease horizontal level\n                  if (pos.distX < 0) {\n                    // we can't decrease a level if an item preceeds the current one\n                    next = dragInfo.next();\n                    if (!next) {\n                      target = dragInfo.parentNode(); // As a sibling of it's parent node\n                      if (target\n                        && target.$parentNodesScope.accept(scope, target.index() + 1)) {\n                        target.$element.after(placeElm);\n                        dragInfo.moveTo(target.$parentNodesScope, target.siblings(), target.index() + 1);\n                      }\n                    }\n                  }\n                }\n\n                // check if add it as a child node first\n                // todo decrease is unused\n                decrease = ($uiTreeHelper.offset(dragElm).left - $uiTreeHelper.offset(placeElm).left) >= config.threshold;\n                targetX = eventObj.pageX - $window.document.body.scrollLeft;\n                targetY = eventObj.pageY - (window.pageYOffset || $window.document.documentElement.scrollTop);\n\n                // Select the drag target. Because IE does not support CSS 'pointer-events: none', it will always\n                // pick the drag element itself as the target. To prevent this, we hide the drag element while\n                // selecting the target.\n                if (angular.isFunction(dragElm.hide)) {\n                  dragElm.hide();\n                } else {\n                  displayElm = dragElm[0].style.display;\n                  dragElm[0].style.display = 'none';\n                }\n\n                // when using elementFromPoint() inside an iframe, you have to call\n                // elementFromPoint() twice to make sure IE8 returns the correct value\n                $window.document.elementFromPoint(targetX, targetY);\n\n                targetElm = angular.element($window.document.elementFromPoint(targetX, targetY));\n                if (angular.isFunction(dragElm.show)) {\n                  dragElm.show();\n                } else {\n                  dragElm[0].style.display = displayElm;\n                }\n\n                // move vertical\n                if (!pos.dirAx) {\n                  // check it's new position\n                  targetNode = targetElm.scope();\n                  isEmpty = false;\n                  if (!targetNode) {\n                    return;\n                  }\n\n                  if (targetNode.$type == 'uiTree' && targetNode.dragEnabled) {\n                    isEmpty = targetNode.isEmpty(); // Check if it's empty tree\n                  }\n\n                  if (targetNode.$type == 'uiTreeHandle') {\n                    targetNode = targetNode.$nodeScope;\n                  }\n\n                  if (targetNode.$type != 'uiTreeNode'\n                    && !isEmpty) { // Check if it is a uiTreeNode or it's an empty tree\n                    return;\n                  }\n\n                  // if placeholder move from empty tree, reset it.\n                  if (treeScope && placeElm.parent()[0] != treeScope.$element[0]) {\n                    treeScope.resetEmptyElement();\n                    treeScope = null;\n                  }\n\n                  if (isEmpty) { // it's an empty tree\n                    treeScope = targetNode;\n                    if (targetNode.$nodesScope.accept(scope, 0)) {\n                      targetNode.place(placeElm);\n                      dragInfo.moveTo(targetNode.$nodesScope, targetNode.$nodesScope.childNodes(), 0);\n                    }\n                  } else if (targetNode.dragEnabled()) { // drag enabled\n                    targetElm = targetNode.$element; // Get the element of ui-tree-node\n                    targetOffset = $uiTreeHelper.offset(targetElm);\n                    targetBefore = targetNode.horizontal ? eventObj.pageX < (targetOffset.left + $uiTreeHelper.width(targetElm) / 2)\n                      : eventObj.pageY < (targetOffset.top + $uiTreeHelper.height(targetElm) / 2);\n\n                    if (targetNode.$parentNodesScope.accept(scope, targetNode.index())) {\n                      if (targetBefore) {\n                        targetElm[0].parentNode.insertBefore(placeElm[0], targetElm[0]);\n                        dragInfo.moveTo(targetNode.$parentNodesScope, targetNode.siblings(), targetNode.index());\n                      } else {\n                        targetElm.after(placeElm);\n                        dragInfo.moveTo(targetNode.$parentNodesScope, targetNode.siblings(), targetNode.index() + 1);\n                      }\n                    } else if (!targetBefore && targetNode.accept(scope, targetNode.childNodesCount())) { // we have to check if it can add the dragging node as a child\n                      targetNode.$childNodesScope.$element.append(placeElm);\n                      dragInfo.moveTo(targetNode.$childNodesScope, targetNode.childNodes(), targetNode.childNodesCount());\n                    }\n                  }\n\n                }\n\n                scope.$apply(function () {\n                  scope.$treeScope.$callbacks.dragMove(dragInfo.eventArgs(elements, pos));\n                });\n              }\n            };\n\n            dragEnd = function (e) {\n              e.preventDefault();\n\n              if (dragElm) {\n                scope.$treeScope.$apply(function () {\n                  scope.$treeScope.$callbacks.beforeDrop(dragInfo.eventArgs(elements, pos));\n                });\n                // roll back elements changed\n                hiddenPlaceElm.replaceWith(scope.$element);\n                placeElm.remove();\n\n                dragElm.remove();\n                dragElm = null;\n                if (scope.$$apply) {\n                  scope.$treeScope.$apply(function () {\n                    dragInfo.apply();\n                    scope.$treeScope.$callbacks.dropped(dragInfo.eventArgs(elements, pos));\n                  });\n                } else {\n                  bindDrag();\n                }\n                scope.$treeScope.$apply(function () {\n                  scope.$treeScope.$callbacks.dragStop(dragInfo.eventArgs(elements, pos));\n                });\n                scope.$$apply = false;\n                dragInfo = null;\n\n              }\n\n              // Restore cursor in Opera 12.16 and IE\n              var oldCur = document.body.getAttribute('ui-tree-cursor');\n              if (oldCur !== null) {\n                $document.find('body').css({'cursor': oldCur});\n                document.body.removeAttribute('ui-tree-cursor');\n              }\n\n              angular.element($document).unbind('touchend', dragEndEvent); // Mobile\n              angular.element($document).unbind('touchcancel', dragEndEvent); // Mobile\n              angular.element($document).unbind('touchmove', dragMoveEvent); // Mobile\n              angular.element($document).unbind('mouseup', dragEndEvent);\n              angular.element($document).unbind('mousemove', dragMoveEvent);\n              angular.element($window.document.body).unbind('mouseleave', dragCancelEvent);\n            };\n\n            dragStartEvent = function (e) {\n              if (scope.dragEnabled()) {\n                dragStart(e);\n              }\n            };\n\n            dragMoveEvent = function (e) {\n              dragMove(e);\n            };\n\n            dragEndEvent = function (e) {\n              scope.$$apply = true;\n              dragEnd(e);\n            };\n\n            dragCancelEvent = function (e) {\n              dragEnd(e);\n            };\n\n            dragDelay = (function () {\n              var to;\n\n              return {\n                exec: function (fn, ms) {\n                  if (!ms) {\n                    ms = 0;\n                  }\n                  this.cancel();\n                  to = $timeout(fn, ms);\n                },\n                cancel: function () {\n                  $timeout.cancel(to);\n                }\n              };\n            })();\n\n            bindDrag = function () {\n              element.bind('touchstart mousedown', function (e) {\n                dragDelay.exec(function () {\n                  dragStartEvent(e);\n                }, scope.dragDelay || 0);\n              });\n              element.bind('touchend touchcancel mouseup', function () {\n                dragDelay.cancel();\n              });\n            };\n            bindDrag();\n\n            keydownHandler = function (e) {\n              if (e.keyCode == 27) {\n                scope.$$apply = false;\n                dragEnd(e);\n              }\n            };\n\n            angular.element($window.document.body).bind('keydown', keydownHandler);\n\n            //unbind handler that retains scope\n            scope.$on('$destroy', function () {\n              angular.element($window.document.body).unbind('keydown', keydownHandler);\n            });\n          }\n        };\n      }\n    ]);\n\n})();\n\n(function () {\n  'use strict';\n\n  angular.module('ui.tree')\n    .directive('uiTreeNodes', ['treeConfig', '$window',\n      function (treeConfig) {\n        return {\n          require: ['ngModel', '?^uiTreeNode', '^uiTree'],\n          restrict: 'A',\n          scope: true,\n          controller: 'TreeNodesController',\n          link: function (scope, element, attrs, controllersArr) {\n\n            var config = {},\n                ngModel = controllersArr[0],\n                treeNodeCtrl = controllersArr[1],\n                treeCtrl = controllersArr[2];\n\n            angular.extend(config, treeConfig);\n            if (config.nodesClass) {\n              element.addClass(config.nodesClass);\n            }\n\n            if (treeNodeCtrl) {\n              treeNodeCtrl.scope.$childNodesScope = scope;\n              scope.$nodeScope = treeNodeCtrl.scope;\n            } else {\n              // find the root nodes if there is no parent node and have a parent ui-tree\n              treeCtrl.scope.$nodesScope = scope;\n            }\n            scope.$treeScope = treeCtrl.scope;\n\n            if (ngModel) {\n              ngModel.$render = function () {\n                if (!ngModel.$modelValue || !angular.isArray(ngModel.$modelValue)) {\n                  scope.$modelValue = [];\n                }\n                scope.$modelValue = ngModel.$modelValue;\n              };\n            }\n\n            scope.$watch(attrs.maxDepth, function (val) {\n              if ((typeof val) == 'number') {\n                scope.maxDepth = val;\n              }\n            });\n\n            scope.$watch(function () {\n              return attrs.nodropEnabled;\n            }, function (newVal) {\n              if ((typeof newVal) != 'undefined') {\n                scope.nodropEnabled = true;\n              }\n            }, true);\n\n            attrs.$observe('horizontal', function (val) {\n              scope.horizontal = ((typeof val) != 'undefined');\n            });\n\n          }\n        };\n      }\n    ]);\n})();\n\n(function () {\n  'use strict';\n\n  angular.module('ui.tree')\n\n  /**\n   * @ngdoc service\n   * @name ui.tree.service:$helper\n   * @requires ng.$document\n   * @requires ng.$window\n   *\n   * @description\n   * angular-ui-tree.\n   */\n    .factory('$uiTreeHelper', ['$document', '$window',\n      function ($document, $window) {\n        return {\n\n          /**\n           * A hashtable used to storage data of nodes\n           * @type {Object}\n           */\n          nodesData: {},\n\n          setNodeAttribute: function (scope, attrName, val) {\n            if (!scope.$modelValue) {\n              return null;\n            }\n            var data = this.nodesData[scope.$modelValue.$$hashKey];\n            if (!data) {\n              data = {};\n              this.nodesData[scope.$modelValue.$$hashKey] = data;\n            }\n            data[attrName] = val;\n          },\n\n          getNodeAttribute: function (scope, attrName) {\n            if (!scope.$modelValue) {\n              return null;\n            }\n            var data = this.nodesData[scope.$modelValue.$$hashKey];\n            if (data) {\n              return data[attrName];\n            }\n            return null;\n          },\n\n          /**\n           * @ngdoc method\n           * @methodOf ui.tree.service:$nodrag\n           * @param  {Object} targetElm angular element\n           * @return {Bool} check if the node can be dragged.\n           */\n          nodrag: function (targetElm) {\n            if (typeof targetElm.attr('data-nodrag') != 'undefined') {\n              if (targetElm.attr('data-nodrag') === 'false') {\n                return false;\n              }\n              return true;\n            }\n            return false;\n          },\n\n          /**\n           * get the event object for touches\n           * @param  {[type]} e [description]\n           * @return {[type]}   [description]\n           */\n          eventObj: function (e) {\n            var obj = e;\n            if (e.targetTouches !== undefined) {\n              obj = e.targetTouches.item(0);\n            } else if (e.originalEvent !== undefined && e.originalEvent.targetTouches !== undefined) {\n              obj = e.originalEvent.targetTouches.item(0);\n            }\n            return obj;\n          },\n\n          dragInfo: function (node) {\n            return {\n              source: node,\n              sourceInfo: {\n                nodeScope: node,\n                index: node.index(),\n                nodesScope: node.$parentNodesScope\n              },\n              index: node.index(),\n              siblings: node.siblings().slice(0),\n              parent: node.$parentNodesScope,\n\n              // Move the node to a new position\n              moveTo: function (parent, siblings, index) {\n                this.parent = parent;\n                this.siblings = siblings.slice(0);\n\n                // If source node is in the target nodes\n                var i = this.siblings.indexOf(this.source);\n                if (i > -1) {\n                  this.siblings.splice(i, 1);\n                  if (this.source.index() < index) {\n                    index--;\n                  }\n                }\n\n                this.siblings.splice(index, 0, this.source);\n                this.index = index;\n              },\n\n              parentNode: function () {\n                return this.parent.$nodeScope;\n              },\n\n              prev: function () {\n                if (this.index > 0) {\n                  return this.siblings[this.index - 1];\n                }\n\n                return null;\n              },\n\n              next: function () {\n                if (this.index < this.siblings.length - 1) {\n                  return this.siblings[this.index + 1];\n                }\n\n                return null;\n              },\n\n              isDirty: function () {\n                return this.source.$parentNodesScope != this.parent ||\n                  this.source.index() != this.index;\n              },\n\n              eventArgs: function (elements, pos) {\n                return {\n                  source: this.sourceInfo,\n                  dest: {\n                    index: this.index,\n                    nodesScope: this.parent\n                  },\n                  elements: elements,\n                  pos: pos\n                };\n              },\n\n              apply: function () {\n                //no drop so no changes\n                if (this.parent.$treeScope.nodropEnabled !== true) {\n                  var nodeData = this.source.$modelValue;\n\n                  //cloneEnabled so do not remove from source\n                  if (this.source.$treeScope.cloneEnabled !== true) {\n                    this.source.remove();\n                  }\n\n                  //if the tree is set to cloneEnabled and source === dest do not insert node or it will cause a duplicate in the repeater\n                  if ((this.source.$treeScope.cloneEnabled === true) && (this.source.$treeScope === this.parent.$treeScope)) {\n                    return false;\n                  }\n\n                  this.parent.insertNode(this.index, nodeData);\n                }\n              }\n            };\n          },\n\n          /**\n           * @ngdoc method\n           * @name hippo.theme#height\n           * @methodOf ui.tree.service:$helper\n           *\n           * @description\n           * Get the height of an element.\n           *\n           * @param {Object} element Angular element.\n           * @returns {String} Height\n           */\n          height: function (element) {\n            return element.prop('scrollHeight');\n          },\n\n          /**\n           * @ngdoc method\n           * @name hippo.theme#width\n           * @methodOf ui.tree.service:$helper\n           *\n           * @description\n           * Get the width of an element.\n           *\n           * @param {Object} element Angular element.\n           * @returns {String} Width\n           */\n          width: function (element) {\n            return element.prop('scrollWidth');\n          },\n\n          /**\n           * @ngdoc method\n           * @name hippo.theme#offset\n           * @methodOf ui.nestedSortable.service:$helper\n           *\n           * @description\n           * Get the offset values of an element.\n           *\n           * @param {Object} element Angular element.\n           * @returns {Object} Object with properties width, height, top and left\n           */\n          offset: function (element) {\n            var boundingClientRect = element[0].getBoundingClientRect();\n\n            return {\n              width: element.prop('offsetWidth'),\n              height: element.prop('offsetHeight'),\n              top: boundingClientRect.top + ($window.pageYOffset || $document[0].body.scrollTop || $document[0].documentElement.scrollTop),\n              left: boundingClientRect.left + ($window.pageXOffset || $document[0].body.scrollLeft || $document[0].documentElement.scrollLeft)\n            };\n          },\n\n          /**\n           * @ngdoc method\n           * @name hippo.theme#positionStarted\n           * @methodOf ui.tree.service:$helper\n           *\n           * @description\n           * Get the start position of the target element according to the provided event properties.\n           *\n           * @param {Object} e Event\n           * @param {Object} target Target element\n           * @returns {Object} Object with properties offsetX, offsetY, startX, startY, nowX and dirX.\n           */\n          positionStarted: function (e, target) {\n            var pos = {};\n            pos.offsetX = e.pageX - this.offset(target).left;\n            pos.offsetY = e.pageY - this.offset(target).top;\n            pos.startX = pos.lastX = e.pageX;\n            pos.startY = pos.lastY = e.pageY;\n            pos.nowX = pos.nowY = pos.distX = pos.distY = pos.dirAx = 0;\n            pos.dirX = pos.dirY = pos.lastDirX = pos.lastDirY = pos.distAxX = pos.distAxY = 0;\n            return pos;\n          },\n\n          positionMoved: function (e, pos, firstMoving) {\n            // mouse position last events\n            pos.lastX = pos.nowX;\n            pos.lastY = pos.nowY;\n\n            // mouse position this events\n            pos.nowX = e.pageX;\n            pos.nowY = e.pageY;\n\n            // distance mouse moved between events\n            pos.distX = pos.nowX - pos.lastX;\n            pos.distY = pos.nowY - pos.lastY;\n\n            // direction mouse was moving\n            pos.lastDirX = pos.dirX;\n            pos.lastDirY = pos.dirY;\n\n            // direction mouse is now moving (on both axis)\n            pos.dirX = pos.distX === 0 ? 0 : pos.distX > 0 ? 1 : -1;\n            pos.dirY = pos.distY === 0 ? 0 : pos.distY > 0 ? 1 : -1;\n\n            // axis mouse is now moving on\n            var newAx = Math.abs(pos.distX) > Math.abs(pos.distY) ? 1 : 0;\n\n            // do nothing on first move\n            if (firstMoving) {\n              pos.dirAx = newAx;\n              pos.moving = true;\n              return;\n            }\n\n            // calc distance moved on this axis (and direction)\n            if (pos.dirAx !== newAx) {\n              pos.distAxX = 0;\n              pos.distAxY = 0;\n            } else {\n              pos.distAxX += Math.abs(pos.distX);\n              if (pos.dirX !== 0 && pos.dirX !== pos.lastDirX) {\n                pos.distAxX = 0;\n              }\n\n              pos.distAxY += Math.abs(pos.distY);\n              if (pos.dirY !== 0 && pos.dirY !== pos.lastDirY) {\n                pos.distAxY = 0;\n              }\n            }\n\n            pos.dirAx = newAx;\n          }\n        };\n      }\n\n    ]);\n\n})();\n","var cr;!function(cr){var entity;!function(entity){entity.entityModule=angular.module(\"cr.entity\",[\"cr.account\",\"cr.infrastructure\",\"cr.common\",\"ui.tree\"])}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity_1){var EntityService=function(){function EntityService($http,$q,$log,cfg){this.$http=$http,this.$q=$q,this.cfg=cfg,this.$log=$log.getInstance(\"EntityService\"),this.url=cfg.WebApiUrl+\"data/entity/\"}return EntityService.prototype.getModuleDetail=function(moduleName){var url=this.url+\"module_detail/\"+moduleName;this.$log.info(\"GET: \"+url);var defer=this.$q.defer();return this.$http({url:url,method:\"GET\"}).success(function(data,status,headers,config){defer.resolve(data)}).error(function(data){defer.reject()}),defer.promise},EntityService.prototype.getEntity=function(moduleName,entityName,entityId){var url=this.url+\"get/\"+moduleName+\"/\"+entityName+\"/\"+entityId;this.$log.info(\"GET: \"+url);var defer=this.$q.defer();return this.$http({url:url,method:\"GET\"}).success(function(data,status,headers,config){defer.resolve(data)}).error(function(data){defer.reject()}),defer.promise},EntityService.prototype.search=function(fullPath,toSearch){var url=this.url+\"search/\"+encodeURI(fullPath)+\"?search=\"+toSearch;this.$log.info(\"GET: \"+url);var defer=this.$q.defer();return this.$http({url:url,method:\"GET\"}).success(function(data,status,headers,config){defer.resolve(data)}).error(function(data){defer.reject()}),defer.promise},EntityService.prototype.getModules=function(){var url=this.url+\"modules\";this.$log.info(\"GET: \"+url);var defer=this.$q.defer();return this.$http({url:url,method:\"GET\"}).success(function(data,status,headers,config){defer.resolve(data)}).error(function(data){defer.reject()}),defer.promise},EntityService.prototype.addUpdate=function(fullPath,entity){var _this=this,url=this.url+\"add-update/\"+encodeURI(fullPath);this.$log.info(\"POST: \"+url);var defer=this.$q.defer();return this.$http.post(url,entity).success(function(data,status,headers,config){_this.$log.log(\"addupdate: \"+angular.toJson(data)),defer.resolve(data)}).error(function(data,status,headers,config){defer.reject(data)}),defer.promise},EntityService.prototype.create=function(fullPath){var _this=this,url=this.url+\"create/\"+encodeURI(fullPath);this.$log.info(\"GET: \"+url);var defer=this.$q.defer();return this.$http({url:url,method:\"GET\"}).success(function(data,status,headers,config){_this.$log.log(\"create: \"+angular.toJson(data)),defer.resolve(data)}).error(function(data,status,headers,config){defer.reject(data)}),defer.promise},EntityService.prototype.getRootEntities=function(moduleName){var url=this.url+\"rootentities/\"+moduleName;this.$log.info(\"GET: \"+url);var defer=this.$q.defer();return this.$http({url:url,method:\"GET\"}).success(function(data,status,headers,config){defer.resolve(data)}).error(function(data){defer.reject()}),defer.promise},EntityService.prototype.getFormDefinition=function(moduleName,entityName){var url=\"modules/entity/resources/\"+moduleName+\".\"+entityName+\".json\";return this.$http({url:url,method:\"GET\"})},EntityService}();entity_1.entityModule.factory(\"entityService\",[\"$http\",\"$q\",\"$log\",\"cfg\",function($http,$q,$log,cfg){return new EntityService($http,$q,$log,cfg)}])}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity){(function(){function NodeBase(displayName,id,parentNode){this.nodeType=function(){return\"\"},this._displayName=displayName,this.id=id,this.parent=parentNode}return NodeBase.prototype.displayName=function(){return this._displayName},NodeBase.prototype.Action=function(actionName,args){var _this=this;this.parent.nodes=this.parent.nodes.filter(function(obj){return obj.id!=_this.id})},NodeBase})()}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity){var TreeManager=function(){function TreeManager($state,$q){this.$state=$state,this.$q=$q,this.nodeType=function(){return\"Root\"},this.contentRef=0,this.nodes=[]}return TreeManager.prototype.Action=function(actionName,args){},TreeManager.prototype.GetNodeReference=function(node,reference){return null==reference&&(reference=[]),node==this?reference:(reference.unshift(node.id),this.GetNodeReference(node.parent,reference))},TreeManager.prototype.SearchNode=function(reference){for(var toRet=this,i=0;i<reference.length;){if(toRet=_.find(this.nodes,function(n){return n.id==reference[i]}),null==toRet)return null;i++}return toRet},TreeManager.prototype.SetContent=function(plugin,sourceNode,settings){this.currentPlugin=plugin,this.contentRef++,angular.isDefined(sourceNode)&&(this.currentNode=sourceNode),angular.isDefined(settings)&&(this.currentPluginSettings=settings)},TreeManager.prototype.displayName=function(){return\"Root\"},TreeManager.prototype.NodeAction=function(treeScope,actionName){console.log(\"Action: \"+actionName);var treeNode=treeScope.$modelValue;treeNode.Action(actionName)},TreeManager.prototype.AdjustNodes=function(current,parent){var _this=this;current.TreeManager=this,current.parent=parent?parent:this,angular.forEach(current.nodes,function(node){return _this.AdjustNodes(node,current)})},TreeManager.prototype.AddNode=function(toAdd,parent){this.AdjustNodes(toAdd,parent),null==parent?this.nodes.push(toAdd):parent.nodes.push(toAdd)},TreeManager}();entity.TreeManager=TreeManager}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity){var entityHomeController=function(){function entityHomeController($scope,currentUser,userPermission,moduleList,$state){this.$scope=$scope,this.moduleList=moduleList,this.$state=$state,$scope.context=\"Entity\",$scope.userPermission=userPermission,$scope.moduleList=moduleList,$scope.SelectModule=function(moduleName){console.log(\"module: \"+moduleName),$state.go(\"entity.module\",{moduleName:moduleName})}}return entityHomeController}();entity.entityModule.controller(\"entityHomeController\",[\"$scope\",\"currentUser\",\"userPermission\",\"moduleList\",\"$state\",entityHomeController])}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity_1){var entityModuleHomeController=function(){function entityModuleHomeController($scope,currentUser,userPermission,entityModule,entityService,$stateParams,$state,treeManager){this.$scope=$scope,this.entityModule=entityModule,this.entityService=entityService,this.$stateParams=$stateParams,this.$state=$state,this.treeManager=treeManager,this.getNodesScope=function(path){return angular.element(document.getElementById(\"tree-root\")).scope()},$scope.context=\"Entity\",$scope.userPermission=userPermission;for(var entityId in entityModule.Definitions){console.log(\"entity: \"+entityId);var entity=entityModule.Definitions[entityId];entity.Root&&treeManager.AddNode(new entity_1.EntityListTreeNode(this.entityService,entity,entityModule))}$scope.tree=treeManager,$scope.back=function(){$state.go(\"entity.module\")}}return entityModuleHomeController.$inject=[\"$scope\",\"currentUser\",\"userPermission\",\"entityModule\",\"entityService\",\"$stateParams\",\"$state\",\"treeManager\"],entityModuleHomeController}();entity_1.entityModule.controller(\"entityModuleHomeController\",entityModuleHomeController)}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity){var entityTestController=function(){function entityTestController($scope,treeNode){this.$scope=$scope,this.treeNode=treeNode,console.log(\"new instance of test\"),$scope.test=function(){console.log(\"test: \"+treeNode.id)}}return entityTestController}();entity.entityModule.controller(\"entityTestController\",[\"$scope\",\"treeNode\",entityTestController])}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity){entity.entityModule.directive(\"myCurrentTime\",[\"$interval\",\"dateFilter\",function($interval,dateFilter){function link(scope,element,attrs){function updateTime(){element.text(dateFilter(new Date,\"h:mm:ss\"))}console.log(\"zen\");var format,timeoutId;scope.$watch(attrs.myCurrentTime,function(value){format=value,updateTime()}),element.on(\"$destroy\",function(){$interval.cancel(timeoutId),console.log(\"destroy\")}),timeoutId=$interval(function(){updateTime()},1e3)}return{link:link,restrict:\"AE\"}}])}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity){entity.entityModule.directive(\"debug\",function($compile){return{terminal:!0,priority:1e6,link:function(scope,element){var clone=element.clone();element.attr(\"style\",\"color:red\"),clone.removeAttr(\"debug\");var clonedElement=$compile(clone)(scope);element.after(clonedElement)}}})}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity_1){var EntityNode=function(){function EntityNode(entityService,definition,moduleDetail,entity){var _this=this;this.entityService=entityService,this.definition=definition,this.moduleDetail=moduleDetail,this.entity=entity,this.GetPath=function(){return null!=_this.parent&&angular.isFunction(_this.parent.GetPath)?_this.parent.GetPath()+\":\"+_this.entity.Id:_this.definition.Name+\":\"+_this.entity.Id},this.getPath=function(){},this.id=definition.Name,this.nodes=[],angular.isDefined(entity)||(this.entity={}),this.BuildNode()}return EntityNode.prototype.displayName=function(){if(!angular.isDefined(this.entity.Id)||\"0\"==this.entity.Id)return\"#NEW\";var toRet=this.entity[this.definition.TreeExpression];return toRet?toRet:\"\"+this.entity.Id},EntityNode.prototype.UpdateEntity=function(entity){this.entity=entity,this.BuildNode()},EntityNode.prototype.BuildNode=function(){if(angular.isDefined(this.entity.Id)&&\"0\"!=this.entity.Id&&0==this.nodes.length)for(var relName in this.definition.ChildRelations){var rel=this.definition.ChildRelations[relName];console.log(\"child: \"+relName+\" - \"+rel.ChildDefinitionName+\" \"+angular.toJson(this.entity[\"Chl\"+relName]));var toAdd=new entity_1.EntityListTreeNode(this.entityService,this.moduleDetail.Definitions[rel.ChildDefinitionName],this.moduleDetail,rel);if(this.nodes.push(toAdd),this.entity[\"Chl\"+relName]){var childEntities=this.entity[\"Chl\"+relName];for(var chlId in childEntities){var chl=childEntities[chlId],chlNode=new EntityNode(this.entityService,this.moduleDetail.Definitions[rel.ChildDefinitionName],this.moduleDetail,chl);toAdd.nodes.push(chlNode)}}}},EntityNode.prototype.Action=function(actionName,args){switch(actionName){case\"click\":this.TreeManager.SetContent(\"cr-entity\",this,this.id)}},EntityNode}();entity_1.EntityNode=EntityNode;var EntityCtrl=function(){function EntityCtrl($scope,entityService,notificationService){var _this=this;this.$scope=$scope,this.entityService=entityService,this.notificationService=notificationService,this.Submit=function(){console.log(\"new entity: \"+angular.toJson(_this.$scope.data)),_this.entityService.addUpdate(_this.treeNode.GetPath(),_this.$scope.data).then(function(newEntity){_this.treeNode.UpdateEntity(newEntity),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Info,\"SAVED\"),_this.$scope.data=newEntity})},this.$scope.formDefinition={},$scope.formOptions={context:\"ENTITY\",uniqueFormId:\"clientForm\",hideSubmit:!0},this.$scope.data={},$scope.Submit=function(){return _this.Submit()},$scope.$watch(\"tree.currentNode.id\",function(val){_this.treeNode=$scope.tree.currentNode,_this.$scope.data=angular.copy(_this.treeNode.entity),$scope.treeNode=_this.treeNode,entityService.getFormDefinition(_this.treeNode.moduleDetail.Name,_this.treeNode.definition.Name).then(function(definition){_this.$scope.formDefinition=definition.data,console.log(definition)})})}return EntityCtrl}();entity_1.entityModule.directive(\"crEntity\",function(){return{restrict:\"E\",scope:!0,templateUrl:\"modules/entity/views/entity.html\",require:\"^crTreeViewer\",link:function(scope,element,attrs,treeViewer){scope.treeViewer=treeViewer,scope.tree=treeViewer.getTree()},controller:[\"$scope\",\"entityService\",\"notificationService\",EntityCtrl]}})}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity_1){var EntityListTreeNode=function(){function EntityListTreeNode(entityService,definition,moduleDetail,relation){var _this=this;this.entityService=entityService,this.definition=definition,this.moduleDetail=moduleDetail,this.relation=relation,this.GetPath=function(){return null!=_this.parent&&angular.isFunction(_this.parent.GetPath)?(console.log(\"parent path: \"+_this.parent.GetPath()),_this.parent.GetPath()+\",\"+_this.relation.Name):(console.log(\"cool ici\"),_this.moduleDetail.Name+\",\"+_this.definition.Name)},this.nodeType=function(){return\"EntityList\"},this.id=definition.Name,this.nodes=[]}return EntityListTreeNode.prototype.displayName=function(){return angular.isDefined(this.relation)?this.relation.DisplayName:this.definition.DisplayName},EntityListTreeNode.prototype.Create=function(){var _this=this;this.Action(\"expand\"),console.log(\"create\");var child=_.find(this.nodes,function(n){return null==n.entity||\"0\"==n.entity.Id});child?child.Action(\"click\"):this.entityService.create(this.GetPath()).then(function(newEntity){child=new entity_1.EntityNode(_this.entityService,_this.definition,_this.moduleDetail,newEntity),_this.TreeManager.AddNode(child,_this),child.Action(\"click\")})},EntityListTreeNode.prototype.ShowEntity=function(entity){this.Action(\"expand\"),this.nodes=_.reject(this.nodes,function(n){return n.entity.Id==entity.Id});var toAdd=new entity_1.EntityNode(this.entityService,this.definition,this.moduleDetail,entity);this.TreeManager.AddNode(toAdd,this),toAdd.Action(\"click\")},EntityListTreeNode.prototype.Action=function(eventName,args){switch(eventName){case\"click\":this.TreeManager.SetContent(\"cr-entity-list\",this,this.id)}},EntityListTreeNode}();entity_1.EntityListTreeNode=EntityListTreeNode;var EntityListCtrl=function(){function EntityListCtrl($scope,entityService){var _this=this;this.$scope=$scope,this.entityService=entityService,this.Search=function(value){console.log(\"We search... \"+_this.treeNode.moduleDetail.Name+_this.treeNode.GetPath()+\" - \"+value),console.log(\"relation: \"+angular.toJson(_this.treeNode.relation)),angular.isDefined(_this.treeNode.parent.entity)&&console.log(\"parent: \"+angular.toJson(_this.treeNode.parent.entity.Id)),_this.entityService.search(_this.treeNode.GetPath(),value).then(function(result){result?_this.$scope.result=result:_this.$scope.result={Rows:[]}})},this.SelectEntity=function(action,data){_this.entityService.getEntity(_this.treeNode.moduleDetail.Name,_this.treeNode.definition.Name,data.Id).then(function(entity){_this.treeNode.ShowEntity(entity)})},$scope.Create=function(){return _this.treeNode.Create()},$scope.Search=this.Search,$scope.SelectEntity=this.SelectEntity,$scope.$watch(\"tree.currentNode.id\",function(val){console.log(\"Current tree node changed: \"+val),_this.treeNode=$scope.tree.currentNode,_this.$scope.search=\"\",$scope.path=_this.treeNode.GetPath(),$scope.result=\"\"})}return EntityListCtrl}();entity_1.entityModule.directive(\"crEntityList\",function(){return{restrict:\"E\",scope:!0,templateUrl:\"modules/entity/views/entitylist.html\",require:\"^crTreeViewer\",link:function(scope,element,attrs,treeViewer){scope.treeViewer=treeViewer,scope.tree=treeViewer.getTree(),scope.$on(\"$destroy\",function(){console.log(\"destroy list\")})},controller:[\"$scope\",\"entityService\",EntityListCtrl]}})}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity){entity.entityModule.directive(\"crPlugin\",[\"$compile\",function($compile){return{restrict:\"AE\",scope:{name:\"=\",id:\"=\"},transclude:!1,link:function(scope,element,attributes,xx,transclude){function updateContent(){if(null!=newScope&&(newScope.$destroy(),newScope=null),null!=newElement&&(newElement.remove(),newElement=null),null!=scope.name&&\"\"!=scope.name){newScope=scope.$new();var template=\"<\"+scope.name+\" />\";newElement=$compile(template)(newScope),element.html(newElement)}else element.html(\"EMPTY\")}var newScope=null,newElement=null;element.on(\"$destroy\",function(){console.log(\"destroy element\")}),scope.$watch(\"name+id\",function(value){console.log(\"plugin watch called: \"+scope.name+\"/\"+scope.id),updateContent()}),updateContent()}}}])}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity){entity.entityModule.directive(\"crTreeContent\",function(){return{restrict:\"E\",scope:!0,templateUrl:\"modules/entity/views/treecontent.html\",require:\"^crTreeViewer\",link:function(scope,element,attrs,treeViewer){scope.treeViewer=treeViewer,scope.tree=treeViewer.getTree(),console.log(\"constructeur fils: \"+scope.tree.nodes.length)},controller:function($scope,$q){}}})}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity){var TreeManagerCtrl=function(){function TreeManagerCtrl($scope){var _this=this;this.$scope=$scope,this.getSelectedNode=function(){return null==_this.setting?\"zen\":_this.setting},this.getTree=function(){return _this.$scope.tree},$scope.treeOptions={accept:function(sourceNodeScope,destNodeScope,destIndex){return console.log(\"source: \"+angular.toJson(sourceNodeScope)),console.log(\"dest: \"+angular.toJson(destNodeScope)),console.log(\"destIndex: \"+angular.toJson(destIndex)),0==destIndex}},$scope.getSelectedNode=function(){return _this.getSelectedNode()}}return TreeManagerCtrl}();entity.entityModule.directive(\"crTreeViewer\",function(){return{restrict:\"AEC\",transclude:!0,scope:{tree:\"=tree\"},link:function(scope,element,attrs,ctrl,transclude){transclude(scope,function(clone,scope){element.append(clone)})},templateUrl:\"modules/entity/views/treeviewer.html\",controller:[\"$scope\",TreeManagerCtrl]}})}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity){entity.entityModule.config([\"$stateProvider\",function($stateProvider){$stateProvider.state(\"entity\",{url:\"/entity\",ncyBreadcrumb:{label:\"{{'ENTITY'|t}}\"},\"abstract\":!0,templateUrl:\"modules/entity/views/entitytemplate.html\",resolve:{},data:{permissions:\"role.superadmin\"}}).state(\"entity.index\",{templateUrl:\"modules/entity/views/index.html\",ncyBreadcrumb:{skip:!0},controller:\"entityHomeController\",url:\"\",resolve:{moduleList:function(entityService){return entityService.getModules()}}}).state(\"entity.module\",{url:\"/{moduleName}\",ncyBreadcrumb:{label:\"{{ctrl.entityModule.Name|t}}\"},views:{\"\":{templateUrl:\"modules/entity/views/treetemplate.html\",controller:\"entityModuleHomeController\",controllerAs:\"ctrl\"},subtitle:{template:\"{{ctrl.entityModule.Name|t}}\"}},resolve:{entityModule:function(entityService,$stateParams){return entityService.getModuleDetail($stateParams.moduleName)},treeManager:function($state,$q){return new entity.TreeManager($state,$q)}}})}])}(entity=cr.entity||(cr.entity={}))}(cr||(cr={}));var cr;!function(cr){var entity;!function(entity_1){}(entity=cr.entity||(cr.entity={}))}(cr||(cr={})),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/views/entity.html\",'<h3 ng-if=\\'treeNode.entity.Id==\"0\"\\' translate=\"\">CREATE</h3><h3 ng-if=\\'treeNode.entity.Id!=\"0\"\\' translate=\"\">EDIT</h3><cr-form cr-focus=\"\" name=\"clientForm\" result=\"data\" definition=\"formDefinition\" options=\"formOptions\" rc-submit=\"Submit()\"><div class=\"row margin-top\"><div class=\"col-xs-12\"><div class=\"pull-right\"><button class=\"btn btn-success\" type=\"submit\"><span class=\"glyphicon glyphicon-floppy-disk\" aria-hidden=\"true\"></span> {{\\'SAVE\\'|t}}</button></div></div></div></cr-form><div class=\"clearfix\"></div>')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/views/entitylist.html\",'<div><cr-table row-action=\"SelectEntity(action,data)\" filter=\"Search(value)\" options=\"options\" rows=\"result.Rows\" columns=\"result.TableDefinition.Columns\"></cr-table><div class=\"pull-right\"><button ng-click=\"Create()\" class=\"btn btn-primary\" type=\"button\"><span class=\"glyphicon glyphicon-plus\" aria-hidden=\"true\"></span></button></div><div class=\"clearfix\"></div></div>')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_contact.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"validation\":{\"required\":true,\"minLength\":4}},{\"cols\":6,\"key\":\"DisplayName\",\"type\":\"text\",\"label\":\"#DisplayNAME\",\"validation\":{\"required\":true,\"minLength\":8}}],[{\"cols\":12,\"key\":\"Description\",\"type\":\"textarea\",\"label\":\"#DESCRIPTION\",\"placeholder\":\"#YOURDESCRIPTION\",\"validation\":{}}],[{\"cols\":6,\"key\":\"Vat\",\"type\":\"text\",\"label\":\"#vat\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_contact_address.json\",'[{\"rows\":[[{\"cols\":2,\"key\":\"Type\",\"type\":\"select\",\"label\":\"#Type\",\"options\":[{\"Id\":\"Invoicing\",\"Text\":\"#INVOICING\"},{\"Id\":\"Contact\",\"Text\":\"#CONTACT\"}]},{\"cols\":5,\"key\":\"Default\",\"type\":\"checkbox\",\"label\":\"#DEFAULT\",\"options\":[{\"name\":\"#DEFAULT\",\"value\":\"true\"}]},{\"cols\":5,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]}],[{\"cols\":8,\"key\":\"Street\",\"type\":\"text\",\"label\":\"#STREET\",\"validation\":{\"required\":true,\"minLength\":4}},{\"cols\":4,\"key\":\"Number\",\"type\":\"text\",\"label\":\"#NUMBER\",\"validation\":{\"required\":true}}],[{\"cols\":4,\"key\":\"PostCode\",\"type\":\"text\",\"label\":\"#POSTCODE\",\"validation\":{\"required\":true,\"minLength\":4}},{\"cols\":8,\"key\":\"City\",\"type\":\"text\",\"label\":\"#CITY\",\"validation\":{\"required\":true}}],[{\"cols\":6,\"key\":\"Country\",\"type\":\"select2\",\"label\":\"#COUNTRY\",\"disabled\":false,\"datasource-url\":\"form/dataset/get/country_en\",\"validation\":{\"required\":true}}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_contact_person.json\",'[{\"rows\":[[{\"cols\":2,\"key\":\"Title\",\"type\":\"select\",\"label\":\"#TITLE\",\"options\":[{\"Id\":\"#MR\",\"Text\":\"MR\"},{\"Id\":\"#MRS\",\"Text\":\"MRS\"},{\"Id\":\"#DR\",\"Text\":\"DR\"},{\"Id\":\"#MS\",\"Text\":\"MS\"}]},{\"cols\":5,\"key\":\"FirstName\",\"type\":\"text\",\"label\":\"#FIRSTNAME\",\"validation\":{\"required\":true}},{\"cols\":5,\"key\":\"LastName\",\"type\":\"text\",\"label\":\"#LASTNAME\",\"validation\":{\"required\":true}}],[{\"cols\":6,\"key\":\"Function\",\"type\":\"text\",\"label\":\"#FUNCTION\",\"validation\":{\"required\":true,\"minLength\":4}},{\"cols\":6,\"key\":\"RelatedAccount\",\"type\":\"text\",\"label\":\"#RELATEDACCOUNT\"}],[{\"cols\":6,\"key\":\"Telephone\",\"type\":\"text\",\"label\":\"#TELEPHONE\"},{\"cols\":6,\"key\":\"Email\",\"type\":\"text\",\"label\":\"#EMAIL\",\"validation\":{\"required\":true,\"pattern\":\"^([a-zA-Z0-9_\\\\\\\\.\\\\\\\\-])+\\\\\\\\@(([a-zA-Z0-9\\\\\\\\-])+\\\\\\\\.)+([a-zA-Z0-9]{2,8})+$\"}}],[{\"cols\":6,\"key\":\"Default\",\"type\":\"checkbox\",\"label\":\"#DEFAULT\",\"options\":[{\"name\":\"#DEFAULT\",\"value\":\"true\"}]},{\"cols\":6,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_detail.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"validation\":{\"required\":true,\"minLength\":1},\"info\":\"#NAMEINFO\",\"placeholder\":\"A nice name\"},{\"cols\":6,\"key\":\"DisplayName\",\"type\":\"translation\",\"label\":\"#DISPLAYNAME\",\"placeholder\":\"#DISPLAYNAME\",\"validation\":{\"required\":true,\"minLength\":2}}],[{\"cols\":6,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]},{\"cols\":6,\"key\":\"Description\",\"type\":\"textarea\",\"label\":\"#Description\"}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_detail_group.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"validation\":{\"required\":true,\"minLength\":1},\"info\":\"#NAMEINFO\",\"placeholder\":\"A nice name\"},{\"cols\":6,\"key\":\"DisplayName\",\"type\":\"translation\",\"label\":\"#DISPLAYNAME\",\"placeholder\":\"#DISPLAYNAME\",\"validation\":{\"required\":true,\"minLength\":2}}],[{\"cols\":6,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]},{\"cols\":6,\"key\":\"Description\",\"type\":\"textarea\",\"label\":\"#Description\"}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/views/entitytemplate.html\",'<section class=\"page-content page-content-xl page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-table\"></i></div><h1 class=\"page-title\">{{ \\'ENTITY\\' | translate:context }}{{title}}<small><div ui-view=\"subtitle\"></div></small></h1></div><div class=\"dashboard-content\"><div ui-view=\"\"></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_detail_group_member.json\",'[{\"rows\":[[{\"cols\":12,\"key\":\"AbcDetailId\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#DETAIL\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,abc_detail?queryName=select&search=\",\"validation\":{\"required\":true}}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_detail_group_member_config.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"TenantId\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#TENANT\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,abc_tenant?queryName=select&search=\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]}],[{\"cols\":6,\"key\":\"FinancialReference\",\"type\":\"text\",\"label\":\"#FINREF\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/views/index.html\",'<cr-menusquare><cr-menusquare-item sq-icon=\"home\" sq-title=\"HOME\" sq-description=\"HOME_DETAIL\" sq-anim-direction=\"right\" sq-route=\"index\"></cr-menusquare-item><cr-menusquare-item ng-repeat=\"module in moduleList\" sq-icon=\"pencil-square-o\" sq-title=\"{{module.DisplayName}}\" sq-action=\"SelectModule(module.Name)\"></cr-menusquare-item></cr-menusquare>')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_invoice.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"AbcContactId\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#ABCCONTACT\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,abc_contact?queryName=select&search=\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"AbcContactName\",\"type\":\"text\",\"label\":\"#ABCCONTACTNAME\"}],[{\"cols\":4,\"key\":\"Status\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#STATUS\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,abc_invoice_status?queryName=select&search=\",\"validation\":{\"required\":true}},{\"cols\":4,\"key\":\"Type\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#TYPE\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,abc_invoice_type?queryName=select&search=\",\"validation\":{\"required\":true}},{\"cols\":4,\"key\":\"Description\",\"type\":\"textarea\",\"label\":\"#Description\"}],[{\"cols\":6,\"key\":\"Origin\",\"type\":\"text\",\"label\":\"#ORIGIN\"},{\"cols\":6,\"key\":\"ApprovalStatus\",\"type\":\"text\",\"label\":\"#APPROVALSTATUS\"}],[{\"cols\":3,\"key\":\"Amount\",\"type\":\"text\",\"label\":\"#AMOUNT\"},{\"cols\":3,\"key\":\"PaidAmount\",\"type\":\"text\",\"label\":\"#PAIDAMOUNT\"},{\"cols\":3,\"key\":\"PaymentDate\",\"type\":\"date\",\"label\":\"#PAYMENTDATE\",\"disabled\":false,\"help\":\"#PAYMENTDATEHELP\",\"info\":\"#PAYMENTDATEINFO\",\"validation\":{\"required\":true}},{\"cols\":3,\"key\":\"InvoiceDate\",\"type\":\"date\",\"label\":\"#INVOICEDATE\",\"disabled\":false,\"help\":\"#INVOICEDATEHELP\",\"info\":\"#INVOICEDATEINFO\",\"validation\":{\"required\":true}}],[{\"cols\":4,\"key\":\"AccountingReference\",\"type\":\"textarea\",\"label\":\"#ACCOUNTINGREFERENCE\"},{\"cols\":4,\"key\":\"CustomerReference\",\"type\":\"textarea\",\"label\":\"#CUSTOMERREFERENCE\"},{\"cols\":4,\"key\":\"InvoiceReference\",\"type\":\"textarea\",\"label\":\"#INVOICEREFERENCE\"}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]');\n}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_invoice_assignment.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"InvoiceId\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#INVOICE\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,abc_invoice?queryName=select&search=\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"AbcProjectDetailId\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#ABCPROJECTDETAIL\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,abc_detail?queryName=select&search=\",\"validation\":{\"required\":true}}],[{\"cols\":6,\"key\":\"Amount\",\"type\":\"text\",\"label\":\"#AMOUNT\",\"validation\":{\"required\":true,\"minLength\":1},\"info\":\"#AMOUNT\"},{\"cols\":6,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_invoice_detail.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"InvoiceId\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#INVOICE\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,abc_invoice?queryName=select&search=\",\"validation\":{\"required\":true}},],[{\"cols\":4,\"key\":\"UnitPrice\",\"type\":\"text\",\"label\":\"#UNITPRICE\"},{\"cols\":4,\"key\":\"Quantity\",\"type\":\"text\",\"label\":\"#QUANTITY\"},{\"cols\":4,\"key\":\"Unit\",\"type\":\"text\",\"label\":\"#UNIT\"},],[{\"cols\":12,\"key\":\"Description\",\"type\":\"textarea\",\"label\":\"#DESCRIPTION\"}][{\"cols\":6,\"key\":\"Amount\",\"type\":\"text\",\"label\":\"#AMOUNT\",\"validation\":{\"required\":true,\"minLength\":1},\"info\":\"#AMOUNT\"},{\"cols\":6,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_project.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"TenantId\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#TENANT\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,abc_tenant?queryName=select&search=\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"info\":\"#NAMEINFO\"}],[{\"cols\":6,\"key\":\"DisplayName\",\"type\":\"translation\",\"label\":\"#DISPLAYNAME\",\"placeholder\":\"YOUR NAME\"}],[{\"cols\":6,\"key\":\"ProjectTypeId\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#PROJECTTYPE\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,abc_project_type?queryName=select&search=\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"ProjectStatusId\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#PROJECTSTATUS\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,abc_project_status?queryName=select&search=\",\"validation\":{\"required\":true}}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_project_status.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"validation\":{\"required\":true,\"minLength\":2},\"info\":\"#NAMEINFO\",\"placeholder\":\"A nice name\"},{\"cols\":6,\"key\":\"DisplayName\",\"type\":\"translation\",\"label\":\"#DISPLAYNAME\",\"placeholder\":\"#DISPLAYNAME\",\"validation\":{\"required\":true,\"minLength\":2}}],[{\"cols\":6,\"key\":\"Description\",\"type\":\"textarea\",\"label\":\"#DESCRIPTION\"},{\"cols\":6,\"key\":\"Settings\",\"type\":\"textarea\",\"label\":\"#SETTINGS\"}],[{\"cols\":12,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_project_type.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"validation\":{\"required\":true,\"minLength\":2},\"info\":\"#NAMEINFO\",\"placeholder\":\"A nice name\"},{\"cols\":6,\"key\":\"DisplayName\",\"type\":\"translation\",\"label\":\"#DISPLAYNAME\",\"placeholder\":\"#DISPLAYNAME\",\"validation\":{\"required\":true,\"minLength\":2}}],[{\"cols\":12,\"key\":\"Description\",\"type\":\"textarea\",\"label\":\"#DESCRIPTION\"},{\"cols\":12,\"key\":\"Settings\",\"type\":\"textarea\",\"label\":\"#SETTINGS\"}],[{\"cols\":12,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.abc_tenant.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"validation\":{\"required\":true,\"minLength\":2},\"info\":\"#NAMEINFO\",\"placeholder\":\"A nice name\"},{\"cols\":6,\"key\":\"DisplayName\",\"type\":\"translation\",\"label\":\"#DISPLAYNAME\",\"placeholder\":\"#DISPLAYNAME\",\"validation\":{\"required\":true,\"minLength\":2}}],[{\"cols\":6,\"key\":\"Description\",\"type\":\"textarea\",\"label\":\"#DESCRITION\"},{\"cols\":6,\"key\":\"PermissionContextId\",\"type\":\"text\",\"label\":\"#PERMISSIONCONTEXTID\"}],[{\"cols\":12,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.clients.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"validation\":{\"required\":true,\"minLength\":4},\"info\":\"#NAMEINFO\",\"placeholder\":\"YOUR NAME\"},{\"cols\":6,\"key\":\"Description\",\"type\":\"text\",\"label\":\"#DESCRIPTION\",\"placeholder\":\"#YOURDESCRIPTION\",\"validation\":{}}],[{\"cols\":6,\"key\":\"Email\",\"type\":\"text\",\"label\":\"#EMAIL\",\"validation\":{\"required\":true,\"pattern\":\"^([a-zA-Z0-9_\\\\\\\\.\\\\\\\\-])+\\\\\\\\@(([a-zA-Z0-9\\\\\\\\-])+\\\\\\\\.)+([a-zA-Z0-9]{2,8})+$\"}}],[{\"cols\":6,\"key\":\"Vat\",\"type\":\"text\",\"label\":\"#vat\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"Telephone\",\"type\":\"text\",\"label\":\"#TELEPHONE\",\"validation\":{}}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.projects.json\",'[{\"key\":\"data\",\"label\":\"#PROJECTDATASECTION\",\"scrollSpy\":false,\"rows\":[[{\"cols\":5,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"validation\":{\"remote\":\"project/project/available/{{result.Id||\\'0\\'}}?name={{result.Name}}\"},\"info\":\"#PROJECTNAME\",\"placeholder\":\"A nice name\"},{\"cols\":7,\"key\":\"DisplayName\",\"type\":\"translation\",\"label\":\"#DISPLAYNAME\",\"placeholder\":\"eg: Antwerp 10 Miles\",\"validation\":{\"required\":true,\"minLength\":2}}],[{\"cols\":3,\"key\":\"StartDate\",\"type\":\"date\",\"label\":\"#STARTDATE\",\"disabled\":false,\"help\":\"#STARTDATEHELP\",\"info\":\"#STARTDATEINFO\",\"validation\":{\"required\":true}},{\"cols\":3,\"key\":\"EndDate\",\"type\":\"date\",\"label\":\"#ENDDATE\",\"disabled\":false,\"help\":\"#ENDDATEHELP\",\"info\":\"#ENDDATEINFO\"},{\"cols\":4,\"key\":\"Country\",\"type\":\"select2\",\"label\":\"#COUNTRY\",\"disabled\":false,\"datasource-url\":\"form/dataset/get/country_en\",\"validation\":{\"required\":true}}],[{\"cols\":12,\"key\":\"City\",\"type\":\"text\",\"label\":\"#CITY\"}],[{\"cols\":12,\"key\":\"Description\",\"type\":\"textarea\",\"label\":\"#DESCRIPTION\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.tags.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"validation\":{\"required\":true,\"minLength\":2,\"remote\":\"project/tag/available/{{result.Id}}?tag={{result.Name}}\"},\"info\":\"#NAMEINFO\",\"placeholder\":\"A nice name\"},{\"cols\":6,\"key\":\"Displayname\",\"type\":\"translation\",\"label\":\"#DISPLAYNAME\",\"placeholder\":\"#DISPLAYNAME\",\"validation\":{\"required\":true,\"minLength\":2}}],[{\"cols\":6,\"key\":\"Suggestion\",\"type\":\"checkbox\",\"label\":\"#SUGGESTION\",\"options\":[{\"name\":\"#SUGGESTION\",\"value\":\"true\"}]},{\"cols\":12,\"key\":\"PermissionContextId\",\"type\":\"text\",\"label\":\"#PERMISSIONCONTEXTID\"}],[{\"cols\":6,\"key\":\"Settings\",\"type\":\"textarea\",\"label\":\"#Settings\"},{\"cols\":6,\"key\":\"Description\",\"type\":\"textarea\",\"label\":\"#DESCRIPTION\"}],[{\"cols\":12,\"key\":\"Active\",\"type\":\"checkbox\",\"label\":\"#ACTIVE\",\"options\":[{\"name\":\"#ACTIVE\",\"value\":\"true\"}]}]]},{\"label\":\"#METADATA\",\"labelHelp\":\"#METADATAHELP\",\"rows\":[[{\"cols\":6,\"staticExpression\":\"result.CreatedDatetime\",\"type\":\"static\",\"label\":\"#CREATEDDATETIME\",\"icon\":\"fa-plus\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.CreatedBy\",\"label\":\"#CREATEDBY\",\"icon\":\"fa-user-plus\"}],[{\"cols\":6,\"staticExpression\":\"result.UpdateDateTime\",\"type\":\"static\",\"label\":\"#UPDATEDATETIME\",\"icon\":\"fa-clock-o\"},{\"cols\":6,\"type\":\"static\",\"staticExpression\":\"result.UpdateBy\",\"label\":\"#UPDATEBY\",\"icon\":\"fa-user\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/resources/ABC.tags_relation.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"ParentTagId\",\"default\":\"\",\"type\":\"select\",\"label\":\"#PARENTTAGID\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,tags?queryName=select&search=\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"ChildTagId\",\"default\":\"\",\"type\":\"select2\",\"label\":\"#CHILDTAGID\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"data/entity/search-rows/ABC,tags?queryName=select&search=\",\"validation\":{\"required\":true}}]]}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/views/module.html\",'<div cr-focus=\"\"><div class=\"form-group has-feedback nomargin\"><div class=\"row\"><div class=\"col-md-offset-6 col-md-6\"><form ng-submit=\"Search(search)\"><div class=\"input-group\"><input type=\"text\" class=\"form-control\" ng-model=\"search\"> <span class=\"input-group-btn\"><button class=\"btn btn-success\" type=\"submit\"><span class=\"glyphicon glyphicon-search\" aria-hidden=\"true\"></span></button></span></div></form></div></div></div><div class=\"row\"><div class=\"col-sm-12\"><div class=\"col-sm-12\" ng-show=\"result!=null && result.Rows.length!=0\"><table class=\"table table-striped\"><thead><tr><th ng-repeat=\"col in result.Columns\">{{col.DisplayName|tc}}</th><th>&nbsp;</th></tr></thead><tbody><tr ng-repeat=\"item in result.Rows\"><td ng-repeat=\"col in result.Columns\">{{item[col.Name]}}</td><td><button class=\"btn btn-edit pull-right\" type=\"button\" ng-click=\"SelectEntity(item)\"><span class=\"glyphicon glyphicon-chevron-right\" aria-hidden=\"true\"></span></button></td></tr></tbody></table></div></div></div><div class=\"pull-right\"><button class=\"btn btn-default\" ng-click=\"back()\" type=\"button\"><span class=\"glyphicon glyphicon-chevron-left\" aria-hidden=\"true\"></span></button> <button ui-sref=\"^.create\" class=\"btn btn-primary\" type=\"button\"><span class=\"glyphicon glyphicon-plus\" aria-hidden=\"true\"></span></button></div><div class=\"clearfix\"></div></div>')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/views/test.html\",'the test? <button ng-click=\"test()\">zen</button> <button ui-sref=\"entity.module\" class=\"btn btn-primary\">back</button> [<span my-current-time=\"\\'hh:mm:ss\\'\">erg</span>] [<cr-plugin plugin=\"\\'my-current-time\\'\"></cr-plugin>]<div class=\"well-large\" debug=\"\">{{2 + 2}}</div>')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/views/treecontent.html\",'hello world! <button class=\"btn btn-info\" ng-click=\"tree.SetContent(null)\">change view</button> [treeSetting={{tree.currentPluginSettings}}] [nodes={{tree.nodes.length}}]')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/views/treetemplate.html\",'<div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><cr-tree-viewer tree=\"tree\"></cr-tree-viewer></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.entity\")}catch(err){module=angular.module(\"cr.entity\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/entity/views/treeviewer.html\",'<div class=\"row\"><div class=\"col-lg-4 col-md-5\"><script type=\"text/ng-template\" id=\"nodes_renderer.html\"><div ui-tree-handle class=\"tree-node tree-node-content\"> <a class=\"btn btn-success btn-xs\" ng-if=\"node.nodes && node.nodes.length > 0\" data-nodrag ng-click=\"toggle(this)\"><span class=\"glyphicon\" ng-class=\"{\\'glyphicon-chevron-right\\': collapsed, \\'glyphicon-chevron-down\\': !collapsed}\"></span></a> <span data-nodrag ng-click=\"tree.NodeAction(this,\\'click\\')\">{{node.displayName() | tc:context }}</span> <a class=\"pull-right btn btn-danger btn-xs\" data-nodrag ng-click=\"tree.NodeAction(this,\\'remove\\')\"><span class=\"glyphicon glyphicon-remove\"></span></a> <a class=\"pull-right btn btn-primary btn-xs\" data-nodrag ng-click=\"tree.NodeAction(this,\\'more\\')\" style=\"margin-right: 8px;\"><span class=\"glyphicon glyphicon-plus\"></span></a> </div> <ol ui-tree-nodes=\"\" ng-model=\"node.nodes\" ng-class=\"{hidden: collapsed}\"> <li ng-repeat=\"node in node.nodes\" ui-tree-node ng-include=\"\\'nodes_renderer.html\\'\"> </li> </ol></script><div class=\"clearfix\"></div><div ui-tree=\"treeOptions\" id=\"tree-root\"><ol ui-tree-nodes=\"\" ng-model=\"tree.nodes\"><li ng-repeat=\"node in tree.nodes\" ui-tree-node=\"\" ng-include=\"\\'nodes_renderer.html\\'\"></li></ol></div></div><div class=\"col-lg-8 col-md-7\"><cr-plugin id=\"tree.contentRef\" name=\"tree.currentPlugin\"></cr-plugin></div></div>')}])}();\n//# sourceMappingURL=entity.js.map","(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/views/entity.html\",\n    \"<h3 ng-if='treeNode.entity.Id==\\\"0\\\"' translate=\\\"\\\">CREATE</h3><h3 ng-if='treeNode.entity.Id!=\\\"0\\\"' translate=\\\"\\\">EDIT</h3><cr-form cr-focus=\\\"\\\" name=\\\"clientForm\\\" result=\\\"data\\\" definition=\\\"formDefinition\\\" options=\\\"formOptions\\\" rc-submit=\\\"Submit()\\\"><div class=\\\"row margin-top\\\"><div class=\\\"col-xs-12\\\"><div class=\\\"pull-right\\\"><button class=\\\"btn btn-success\\\" type=\\\"submit\\\"><span class=\\\"glyphicon glyphicon-floppy-disk\\\" aria-hidden=\\\"true\\\"></span> {{'SAVE'|t}}</button></div></div></div></cr-form><div class=\\\"clearfix\\\"></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/views/entitylist.html\",\n    \"<div><cr-table row-action=\\\"SelectEntity(action,data)\\\" filter=\\\"Search(value)\\\" options=\\\"options\\\" rows=\\\"result.Rows\\\" columns=\\\"result.TableDefinition.Columns\\\"></cr-table><div class=\\\"pull-right\\\"><button ng-click=\\\"Create()\\\" class=\\\"btn btn-primary\\\" type=\\\"button\\\"><span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"clearfix\\\"></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_contact.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":4}},{\\\"cols\\\":6,\\\"key\\\":\\\"DisplayName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#DisplayNAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":8}}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#DESCRIPTION\\\",\\\"placeholder\\\":\\\"#YOURDESCRIPTION\\\",\\\"validation\\\":{}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Vat\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#vat\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_contact_address.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":2,\\\"key\\\":\\\"Type\\\",\\\"type\\\":\\\"select\\\",\\\"label\\\":\\\"#Type\\\",\\\"options\\\":[{\\\"Id\\\":\\\"Invoicing\\\",\\\"Text\\\":\\\"#INVOICING\\\"},{\\\"Id\\\":\\\"Contact\\\",\\\"Text\\\":\\\"#CONTACT\\\"}]},{\\\"cols\\\":5,\\\"key\\\":\\\"Default\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#DEFAULT\\\",\\\"options\\\":[{\\\"name\\\":\\\"#DEFAULT\\\",\\\"value\\\":\\\"true\\\"}]},{\\\"cols\\\":5,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]}],[{\\\"cols\\\":8,\\\"key\\\":\\\"Street\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#STREET\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":4}},{\\\"cols\\\":4,\\\"key\\\":\\\"Number\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NUMBER\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":4,\\\"key\\\":\\\"PostCode\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#POSTCODE\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":4}},{\\\"cols\\\":8,\\\"key\\\":\\\"City\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#CITY\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Country\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#COUNTRY\\\",\\\"disabled\\\":false,\\\"datasource-url\\\":\\\"form/dataset/get/country_en\\\",\\\"validation\\\":{\\\"required\\\":true}}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_contact_person.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":2,\\\"key\\\":\\\"Title\\\",\\\"type\\\":\\\"select\\\",\\\"label\\\":\\\"#TITLE\\\",\\\"options\\\":[{\\\"Id\\\":\\\"#MR\\\",\\\"Text\\\":\\\"MR\\\"},{\\\"Id\\\":\\\"#MRS\\\",\\\"Text\\\":\\\"MRS\\\"},{\\\"Id\\\":\\\"#DR\\\",\\\"Text\\\":\\\"DR\\\"},{\\\"Id\\\":\\\"#MS\\\",\\\"Text\\\":\\\"MS\\\"}]},{\\\"cols\\\":5,\\\"key\\\":\\\"FirstName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#FIRSTNAME\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":5,\\\"key\\\":\\\"LastName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#LASTNAME\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Function\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#FUNCTION\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":4}},{\\\"cols\\\":6,\\\"key\\\":\\\"RelatedAccount\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#RELATEDACCOUNT\\\"}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Telephone\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#TELEPHONE\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"Email\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#EMAIL\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"pattern\\\":\\\"^([a-zA-Z0-9_\\\\\\\\.\\\\\\\\-])+\\\\\\\\@(([a-zA-Z0-9\\\\\\\\-])+\\\\\\\\.)+([a-zA-Z0-9]{2,8})+$\\\"}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Default\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#DEFAULT\\\",\\\"options\\\":[{\\\"name\\\":\\\"#DEFAULT\\\",\\\"value\\\":\\\"true\\\"}]},{\\\"cols\\\":6,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_detail.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":1},\\\"info\\\":\\\"#NAMEINFO\\\",\\\"placeholder\\\":\\\"A nice name\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"DisplayName\\\",\\\"type\\\":\\\"translation\\\",\\\"label\\\":\\\"#DISPLAYNAME\\\",\\\"placeholder\\\":\\\"#DISPLAYNAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]},{\\\"cols\\\":6,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#Description\\\"}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_detail_group.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":1},\\\"info\\\":\\\"#NAMEINFO\\\",\\\"placeholder\\\":\\\"A nice name\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"DisplayName\\\",\\\"type\\\":\\\"translation\\\",\\\"label\\\":\\\"#DISPLAYNAME\\\",\\\"placeholder\\\":\\\"#DISPLAYNAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]},{\\\"cols\\\":6,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#Description\\\"}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/views/entitytemplate.html\",\n    \"<section class=\\\"page-content page-content-xl page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-table\\\"></i></div><h1 class=\\\"page-title\\\">{{ 'ENTITY' | translate:context }}{{title}}<small><div ui-view=\\\"subtitle\\\"></div></small></h1></div><div class=\\\"dashboard-content\\\"><div ui-view=\\\"\\\"></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_detail_group_member.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":12,\\\"key\\\":\\\"AbcDetailId\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#DETAIL\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,abc_detail?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_detail_group_member_config.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"TenantId\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#TENANT\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,abc_tenant?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]}],[{\\\"cols\\\":6,\\\"key\\\":\\\"FinancialReference\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#FINREF\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/views/index.html\",\n    \"<cr-menusquare><cr-menusquare-item sq-icon=\\\"home\\\" sq-title=\\\"HOME\\\" sq-description=\\\"HOME_DETAIL\\\" sq-anim-direction=\\\"right\\\" sq-route=\\\"index\\\"></cr-menusquare-item><cr-menusquare-item ng-repeat=\\\"module in moduleList\\\" sq-icon=\\\"pencil-square-o\\\" sq-title=\\\"{{module.DisplayName}}\\\" sq-action=\\\"SelectModule(module.Name)\\\"></cr-menusquare-item></cr-menusquare>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_invoice.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"AbcContactId\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#ABCCONTACT\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,abc_contact?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"AbcContactName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#ABCCONTACTNAME\\\"}],[{\\\"cols\\\":4,\\\"key\\\":\\\"Status\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#STATUS\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,abc_invoice_status?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":4,\\\"key\\\":\\\"Type\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#TYPE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,abc_invoice_type?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":4,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#Description\\\"}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Origin\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#ORIGIN\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"ApprovalStatus\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#APPROVALSTATUS\\\"}],[{\\\"cols\\\":3,\\\"key\\\":\\\"Amount\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#AMOUNT\\\"},{\\\"cols\\\":3,\\\"key\\\":\\\"PaidAmount\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#PAIDAMOUNT\\\"},{\\\"cols\\\":3,\\\"key\\\":\\\"PaymentDate\\\",\\\"type\\\":\\\"date\\\",\\\"label\\\":\\\"#PAYMENTDATE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"#PAYMENTDATEHELP\\\",\\\"info\\\":\\\"#PAYMENTDATEINFO\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":3,\\\"key\\\":\\\"InvoiceDate\\\",\\\"type\\\":\\\"date\\\",\\\"label\\\":\\\"#INVOICEDATE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"#INVOICEDATEHELP\\\",\\\"info\\\":\\\"#INVOICEDATEINFO\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":4,\\\"key\\\":\\\"AccountingReference\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#ACCOUNTINGREFERENCE\\\"},{\\\"cols\\\":4,\\\"key\\\":\\\"CustomerReference\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#CUSTOMERREFERENCE\\\"},{\\\"cols\\\":4,\\\"key\\\":\\\"InvoiceReference\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#INVOICEREFERENCE\\\"}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_invoice_assignment.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"InvoiceId\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#INVOICE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,abc_invoice?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"AbcProjectDetailId\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#ABCPROJECTDETAIL\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,abc_detail?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Amount\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#AMOUNT\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":1},\\\"info\\\":\\\"#AMOUNT\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_invoice_detail.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"InvoiceId\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#INVOICE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,abc_invoice?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}},],[{\\\"cols\\\":4,\\\"key\\\":\\\"UnitPrice\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#UNITPRICE\\\"},{\\\"cols\\\":4,\\\"key\\\":\\\"Quantity\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#QUANTITY\\\"},{\\\"cols\\\":4,\\\"key\\\":\\\"Unit\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#UNIT\\\"},],[{\\\"cols\\\":12,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#DESCRIPTION\\\"}][{\\\"cols\\\":6,\\\"key\\\":\\\"Amount\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#AMOUNT\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":1},\\\"info\\\":\\\"#AMOUNT\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_project.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"TenantId\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#TENANT\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,abc_tenant?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"info\\\":\\\"#NAMEINFO\\\"}],[{\\\"cols\\\":6,\\\"key\\\":\\\"DisplayName\\\",\\\"type\\\":\\\"translation\\\",\\\"label\\\":\\\"#DISPLAYNAME\\\",\\\"placeholder\\\":\\\"YOUR NAME\\\"}],[{\\\"cols\\\":6,\\\"key\\\":\\\"ProjectTypeId\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#PROJECTTYPE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,abc_project_type?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"ProjectStatusId\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#PROJECTSTATUS\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,abc_project_status?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_project_status.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2},\\\"info\\\":\\\"#NAMEINFO\\\",\\\"placeholder\\\":\\\"A nice name\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"DisplayName\\\",\\\"type\\\":\\\"translation\\\",\\\"label\\\":\\\"#DISPLAYNAME\\\",\\\"placeholder\\\":\\\"#DISPLAYNAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#DESCRIPTION\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"Settings\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#SETTINGS\\\"}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_project_type.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2},\\\"info\\\":\\\"#NAMEINFO\\\",\\\"placeholder\\\":\\\"A nice name\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"DisplayName\\\",\\\"type\\\":\\\"translation\\\",\\\"label\\\":\\\"#DISPLAYNAME\\\",\\\"placeholder\\\":\\\"#DISPLAYNAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#DESCRIPTION\\\"},{\\\"cols\\\":12,\\\"key\\\":\\\"Settings\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#SETTINGS\\\"}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.abc_tenant.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2},\\\"info\\\":\\\"#NAMEINFO\\\",\\\"placeholder\\\":\\\"A nice name\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"DisplayName\\\",\\\"type\\\":\\\"translation\\\",\\\"label\\\":\\\"#DISPLAYNAME\\\",\\\"placeholder\\\":\\\"#DISPLAYNAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#DESCRITION\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"PermissionContextId\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#PERMISSIONCONTEXTID\\\"}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.clients.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":4},\\\"info\\\":\\\"#NAMEINFO\\\",\\\"placeholder\\\":\\\"YOUR NAME\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#DESCRIPTION\\\",\\\"placeholder\\\":\\\"#YOURDESCRIPTION\\\",\\\"validation\\\":{}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Email\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#EMAIL\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"pattern\\\":\\\"^([a-zA-Z0-9_\\\\\\\\.\\\\\\\\-])+\\\\\\\\@(([a-zA-Z0-9\\\\\\\\-])+\\\\\\\\.)+([a-zA-Z0-9]{2,8})+$\\\"}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Vat\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#vat\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"Telephone\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#TELEPHONE\\\",\\\"validation\\\":{}}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.projects.json\",\n    \"[{\\\"key\\\":\\\"data\\\",\\\"label\\\":\\\"#PROJECTDATASECTION\\\",\\\"scrollSpy\\\":false,\\\"rows\\\":[[{\\\"cols\\\":5,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"validation\\\":{\\\"remote\\\":\\\"project/project/available/{{result.Id||'0'}}?name={{result.Name}}\\\"},\\\"info\\\":\\\"#PROJECTNAME\\\",\\\"placeholder\\\":\\\"A nice name\\\"},{\\\"cols\\\":7,\\\"key\\\":\\\"DisplayName\\\",\\\"type\\\":\\\"translation\\\",\\\"label\\\":\\\"#DISPLAYNAME\\\",\\\"placeholder\\\":\\\"eg: Antwerp 10 Miles\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}}],[{\\\"cols\\\":3,\\\"key\\\":\\\"StartDate\\\",\\\"type\\\":\\\"date\\\",\\\"label\\\":\\\"#STARTDATE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"#STARTDATEHELP\\\",\\\"info\\\":\\\"#STARTDATEINFO\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":3,\\\"key\\\":\\\"EndDate\\\",\\\"type\\\":\\\"date\\\",\\\"label\\\":\\\"#ENDDATE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"#ENDDATEHELP\\\",\\\"info\\\":\\\"#ENDDATEINFO\\\"},{\\\"cols\\\":4,\\\"key\\\":\\\"Country\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#COUNTRY\\\",\\\"disabled\\\":false,\\\"datasource-url\\\":\\\"form/dataset/get/country_en\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":12,\\\"key\\\":\\\"City\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#CITY\\\"}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#DESCRIPTION\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.tags.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2,\\\"remote\\\":\\\"project/tag/available/{{result.Id}}?tag={{result.Name}}\\\"},\\\"info\\\":\\\"#NAMEINFO\\\",\\\"placeholder\\\":\\\"A nice name\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"Displayname\\\",\\\"type\\\":\\\"translation\\\",\\\"label\\\":\\\"#DISPLAYNAME\\\",\\\"placeholder\\\":\\\"#DISPLAYNAME\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Suggestion\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#SUGGESTION\\\",\\\"options\\\":[{\\\"name\\\":\\\"#SUGGESTION\\\",\\\"value\\\":\\\"true\\\"}]},{\\\"cols\\\":12,\\\"key\\\":\\\"PermissionContextId\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#PERMISSIONCONTEXTID\\\"}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Settings\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#Settings\\\"},{\\\"cols\\\":6,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"#DESCRIPTION\\\"}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Active\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"#ACTIVE\\\",\\\"options\\\":[{\\\"name\\\":\\\"#ACTIVE\\\",\\\"value\\\":\\\"true\\\"}]}]]},{\\\"label\\\":\\\"#METADATA\\\",\\\"labelHelp\\\":\\\"#METADATAHELP\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.CreatedDatetime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#CREATEDDATETIME\\\",\\\"icon\\\":\\\"fa-plus\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.CreatedBy\\\",\\\"label\\\":\\\"#CREATEDBY\\\",\\\"icon\\\":\\\"fa-user-plus\\\"}],[{\\\"cols\\\":6,\\\"staticExpression\\\":\\\"result.UpdateDateTime\\\",\\\"type\\\":\\\"static\\\",\\\"label\\\":\\\"#UPDATEDATETIME\\\",\\\"icon\\\":\\\"fa-clock-o\\\"},{\\\"cols\\\":6,\\\"type\\\":\\\"static\\\",\\\"staticExpression\\\":\\\"result.UpdateBy\\\",\\\"label\\\":\\\"#UPDATEBY\\\",\\\"icon\\\":\\\"fa-user\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/resources/ABC.tags_relation.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"ParentTagId\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select\\\",\\\"label\\\":\\\"#PARENTTAGID\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,tags?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"ChildTagId\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#CHILDTAGID\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"data/entity/search-rows/ABC,tags?queryName=select&search=\\\",\\\"validation\\\":{\\\"required\\\":true}}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/views/module.html\",\n    \"<div cr-focus=\\\"\\\"><div class=\\\"form-group has-feedback nomargin\\\"><div class=\\\"row\\\"><div class=\\\"col-md-offset-6 col-md-6\\\"><form ng-submit=\\\"Search(search)\\\"><div class=\\\"input-group\\\"><input type=\\\"text\\\" class=\\\"form-control\\\" ng-model=\\\"search\\\"> <span class=\\\"input-group-btn\\\"><button class=\\\"btn btn-success\\\" type=\\\"submit\\\"><span class=\\\"glyphicon glyphicon-search\\\" aria-hidden=\\\"true\\\"></span></button></span></div></form></div></div></div><div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><div class=\\\"col-sm-12\\\" ng-show=\\\"result!=null && result.Rows.length!=0\\\"><table class=\\\"table table-striped\\\"><thead><tr><th ng-repeat=\\\"col in result.Columns\\\">{{col.DisplayName|tc}}</th><th>&nbsp;</th></tr></thead><tbody><tr ng-repeat=\\\"item in result.Rows\\\"><td ng-repeat=\\\"col in result.Columns\\\">{{item[col.Name]}}</td><td><button class=\\\"btn btn-edit pull-right\\\" type=\\\"button\\\" ng-click=\\\"SelectEntity(item)\\\"><span class=\\\"glyphicon glyphicon-chevron-right\\\" aria-hidden=\\\"true\\\"></span></button></td></tr></tbody></table></div></div></div><div class=\\\"pull-right\\\"><button class=\\\"btn btn-default\\\" ng-click=\\\"back()\\\" type=\\\"button\\\"><span class=\\\"glyphicon glyphicon-chevron-left\\\" aria-hidden=\\\"true\\\"></span></button> <button ui-sref=\\\"^.create\\\" class=\\\"btn btn-primary\\\" type=\\\"button\\\"><span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"clearfix\\\"></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/views/test.html\",\n    \"the test? <button ng-click=\\\"test()\\\">zen</button> <button ui-sref=\\\"entity.module\\\" class=\\\"btn btn-primary\\\">back</button> [<span my-current-time=\\\"'hh:mm:ss'\\\">erg</span>] [<cr-plugin plugin=\\\"'my-current-time'\\\"></cr-plugin>]<div class=\\\"well-large\\\" debug=\\\"\\\">{{2 + 2}}</div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/views/treecontent.html\",\n    \"hello world! <button class=\\\"btn btn-info\\\" ng-click=\\\"tree.SetContent(null)\\\">change view</button> [treeSetting={{tree.currentPluginSettings}}] [nodes={{tree.nodes.length}}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/views/treetemplate.html\",\n    \"<div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><cr-tree-viewer tree=\\\"tree\\\"></cr-tree-viewer></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.entity\"); }\ncatch(err) { module = angular.module(\"cr.entity\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/entity/views/treeviewer.html\",\n    \"<div class=\\\"row\\\"><div class=\\\"col-lg-4 col-md-5\\\"><script type=\\\"text/ng-template\\\" id=\\\"nodes_renderer.html\\\"><div ui-tree-handle class=\\\"tree-node tree-node-content\\\"> <a class=\\\"btn btn-success btn-xs\\\" ng-if=\\\"node.nodes && node.nodes.length > 0\\\" data-nodrag ng-click=\\\"toggle(this)\\\"><span class=\\\"glyphicon\\\" ng-class=\\\"{'glyphicon-chevron-right': collapsed, 'glyphicon-chevron-down': !collapsed}\\\"></span></a> <span data-nodrag ng-click=\\\"tree.NodeAction(this,'click')\\\">{{node.displayName() | tc:context }}</span> <a class=\\\"pull-right btn btn-danger btn-xs\\\" data-nodrag ng-click=\\\"tree.NodeAction(this,'remove')\\\"><span class=\\\"glyphicon glyphicon-remove\\\"></span></a> <a class=\\\"pull-right btn btn-primary btn-xs\\\" data-nodrag ng-click=\\\"tree.NodeAction(this,'more')\\\" style=\\\"margin-right: 8px;\\\"><span class=\\\"glyphicon glyphicon-plus\\\"></span></a> </div> <ol ui-tree-nodes=\\\"\\\" ng-model=\\\"node.nodes\\\" ng-class=\\\"{hidden: collapsed}\\\"> <li ng-repeat=\\\"node in node.nodes\\\" ui-tree-node ng-include=\\\"'nodes_renderer.html'\\\"> </li> </ol></script><div class=\\\"clearfix\\\"></div><div ui-tree=\\\"treeOptions\\\" id=\\\"tree-root\\\"><ol ui-tree-nodes=\\\"\\\" ng-model=\\\"tree.nodes\\\"><li ng-repeat=\\\"node in tree.nodes\\\" ui-tree-node=\\\"\\\" ng-include=\\\"'nodes_renderer.html'\\\"></li></ol></div></div><div class=\\\"col-lg-8 col-md-7\\\"><cr-plugin id=\\\"tree.contentRef\\\" name=\\\"tree.currentPlugin\\\"></cr-plugin></div></div>\");\n}]);\n})();\n","var cr;!function(cr){var events;!function(events){events.eventModule=angular.module(\"cr.event\",[\"cr.common\",\"cr.entity\",\"ui.router\"])}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var eventService=function(){function eventService($http,$q,$modal,cfg){this.$http=$http,this.$q=$q,this.$modal=$modal,this.cfg=cfg,this.endpoint=\"https://prod.chronorace.be/api/\",angular.isDefined(cfg.EventApiUrl)&&(this.endpoint=cfg.EventApiUrl)}return eventService.prototype.selectEvent=function(curEvent){var modal=this.$modal.open({templateUrl:\"modules/event/views/eventselectiondialog.html\",resolve:{selectedEvent:function(){return angular.copy(curEvent)}},controller:events.eventSelectionCtrl,controllerAs:\"eventSelectionCtrl\",show:!0});return modal.result},eventService.prototype.searchText=function(search){var url=this.endpoint+\"Event/search\";return this.$http.post(url,{Tokens:[{TokenType:\"text\",TokenValue:search}]})},eventService.$inject=[\"$http\",\"$q\",\"$modal\",\"cfg\"],eventService}();events.eventModule.service(\"eventService\",eventService)}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var ResultService=function(){function ResultService($http,cfg){this.$http=$http,this.endpoint=\"http://localhost:9011/api/\",angular.isDefined(cfg.EventApiUrl)&&(this.endpoint=cfg.EventApiUrl),console.log(\"result service endpoint: \"+this.endpoint)}return ResultService.prototype.videoReferences=function(videoToken){return console.log(\"videoReferences: \"+videoToken),this.$http.jsonp(this.endpoint+\"Video/VideoReferences?videoAccessToken=\"+encodeURIComponent(videoToken)+\"&callback=JSON_CALLBACK\").then(function(result){return result.data})},ResultService.prototype.videoLink=function(eventId,videoRef){return console.log(\"get link for \"+angular.toJson(videoRef)),this.$http.jsonp(this.endpoint+\"Video/VideoUrl/\"+eventId+\"/\"+videoRef.Location+\"/\"+(videoRef.Time-1e3*videoRef.Before)+\"/\"+(videoRef.Time+1e3*videoRef.Before)+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},ResultService.prototype.getReportList=function(eventId){return this.$http.jsonp(this.endpoint+\"results/report/list/\"+eventId+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},ResultService.prototype.eventSearch=function(eventId,search,from,maxEntries){return this.$http.jsonp(this.endpoint+\"results/report/event-search/\"+eventId+\"/\"+from+\"/\"+maxEntries+\"?callback=JSON_CALLBACK&srch=\"+encodeURIComponent(search)).then(function(result){return result.data})},ResultService.prototype.searchReport=function(eventId,reportId,search,from,maxEntries){return this.$http.jsonp(this.endpoint+\"results/report/search/\"+eventId+\"/\"+reportId+\"/\"+from+\"/\"+maxEntries+\"?callback=JSON_CALLBACK&srch=\"+encodeURIComponent(search)).then(function(result){return result.data})},ResultService.prototype.overview=function(eventId,groupId,mask,search,from,maxEntries){return this.$http.jsonp(this.endpoint+\"results/live/ligne/overview/\"+eventId+\"?andmask=\"+mask+\"&group=\"+groupId+\"&from=\"+from+\"&max\"+maxEntries+\"&callback=JSON_CALLBACK&srch=\"+encodeURIComponent(search)).then(function(result){return result.data})},ResultService.$inject=[\"$http\",\"cfg\"],ResultService}();events.eventModule.service(\"ResultService\",ResultService)}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var TrackingService=function(){function TrackingService($http,cfg){this.$http=$http,this.endpoint=\"http://localhost:16151/api/\",angular.isDefined(cfg.EventApiUrl)&&(this.endpoint=cfg.EventApiUrl),console.log(\"endpoint: \"+this.endpoint)}return TrackingService.prototype.getTrack=function(eventId,trackName){return this.$http.jsonp(this.endpoint+\"gps/track/\"+eventId+\"/\"+trackName+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.getPosition=function(trackersOrEvent){return this.$http.jsonp(this.endpoint+\"gps/get/\"+trackersOrEvent+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.getLog=function(eventId,tk){return this.$http.jsonp(this.endpoint+\"gps/log/\"+eventId+\"/\"+tk+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.gpsConfiguration=function(eventId){return console.log(this.endpoint+\"gps/config/\"+eventId+\"?callback=JSON_CALLBACK\"),this.$http.jsonp(this.endpoint+\"gps/config/\"+eventId+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.getLineChartInfo=function(eventId,groupId,partition,location){return console.log(\"getLineChart: \"+location),this.$http.jsonp(this.endpoint+\"results/live/ligne/split_stat/\"+groupId+\"/\"+location+\"/\"+eventId+\"?partition=\"+partition+\"&callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.getEventConfiguration=function(eventId){return this.$http.jsonp(this.endpoint+\"Event/cfg/\"+eventId+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.getOverview=function(eventId,groupId){return void 0===groupId&&(groupId=-1),this.$http.jsonp(this.endpoint+\"results/live/ligne/overview/\"+eventId+\"?groupId=\"+groupId+\"&callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.getEventView=function(eventId){return this.$http.jsonp(this.endpoint+\"Event/view/\"+eventId+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.getResult=function(groupId,resultName,eventId,filter,from,max){return void 0===filter&&(filter=0),void 0===from&&(from=0),void 0===max&&(max=25),this.$http.jsonp(this.endpoint+\"results/live/ligne/get/\"+groupId+\"/\"+resultName+\"/\"+eventId+\"?from=\"+from+\"&max=\"+max+\"&callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.overview=function(eventId,groupId,mask,search,from,max){return void 0===mask&&(mask=0),void 0===search&&(search=null),void 0===from&&(from=0),void 0===max&&(max=25),console.log(\"ovrview - from: \"+from+\"/\"+max),this.$http.jsonp(this.endpoint+\"results/live/ligne/overview/\"+eventId+\"?group=\"+groupId+\"&andmask=\"+mask+\"&from=\"+from+\"&max=\"+max+\"&callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.searchRegistration=function(eventId,search){return this.$http.jsonp(this.endpoint+\"Registration/search/\"+eventId+\"?search=\"+encodeURI(search)+\"&callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.getBarChartInfo=function(eventId,groupId){return this.$http.jsonp(this.endpoint+\"results/live/ligne/group_stat/\"+groupId+\"/\"+eventId+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.getTimingConfiguration=function(eventId){return console.log(\"GetTimingCofiguration\"),this.$http.jsonp(this.endpoint+\"results/live/ligne/cfg/\"+eventId+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},TrackingService.prototype.getBibDetails=function(eventId,bibId){var _this=this;return this.$http.jsonp(this.endpoint+\"results/live/ligne/detail/\"+bibId+\"/\"+eventId+\"?callback=JSON_CALLBACK\").then(function(result){return _this.bibDetails=result.data,_this.bibNumber=bibId,result.data})},TrackingService.$inject=[\"$http\",\"cfg\"],TrackingService}();events.eventModule.service(\"TrackingService\",TrackingService)}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var xcoService=function(){function xcoService($http,cfg){this.$http=$http,this.endpoint=\"https://prod.chronorace.be/api/\",angular.isDefined(cfg.EventApiUrl)&&(this.endpoint=cfg.EventApiUrl),console.log(\"xco service endpoint: \"+this.endpoint)}return xcoService.prototype.raceList=function(db){return this.$http.jsonp(this.endpoint+\"results/xco/\"+db+\"/race-list?callback=JSON_CALLBACK\").then(function(result){return console.log(\"return: \"+result.data),result.data})},xcoService.prototype.overview=function(db,raceName){return this.$http.jsonp(this.endpoint+\"results/xco/\"+db+\"/overview/\"+raceName+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},xcoService.prototype.registration=function(db,raceName){return this.$http.jsonp(this.endpoint+\"results/xco/\"+db+\"/registration/\"+raceName+\"?callback=JSON_CALLBACK\").then(function(result){return result.data})},xcoService.$inject=[\"$http\",\"cfg\"],xcoService}();events.eventModule.service(\"xcoService\",xcoService)}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var EventController=function(){function EventController(eventView,trackingService,$scope,$stateParams,$modal,$state){var _this=this;this.eventView=eventView,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,$scope.eventView=eventView,$scope.context=\"chronorace\",$scope.searchResult={rows:[]},$scope.Search=function(value){return _this.Search(value)},$scope.RowAction=function(action,data){console.log(\"Row Action: \"+action+\" \"+angular.toJson(data))},$scope.Select=function(data){console.log(\"we select: \"+angular.toJson(data))}}return EventController.prototype.Search=function(toSearch){var _this=this;console.log(\"ok, search registration for: \"+toSearch),this.trackingService.searchRegistration(this.$stateParams.eventId,toSearch).then(function(data){_this.$scope.searchResult=data,console.log(\"search result: \"+data)})},EventController.$inject=[\"eventView\",\"TrackingService\",\"$scope\",\"$stateParams\",\"$modal\",\"$state\"],EventController}();events.eventModule.controller(\"EventController\",EventController)}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var EventFormController=function(){function EventFormController($scope){var _this=this;this.$scope=$scope,$scope.SetEvent=function(event){console.log(\"we select event: \"+angular.toJson(event)),_this.$scope.$parent.value=event}}return EventFormController.$inject=[\"$scope\"],EventFormController}();events.EventFormController=EventFormController,events.eventModule.controller(\"eventFormController\",EventFormController)}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events_1){var eventSelectionCtrl=function(){function eventSelectionCtrl($scope,$modalInstance,eventService){var _this=this;this.$scope=$scope,this.$modalInstance=$modalInstance,this.eventService=eventService,this.selection=[],this.Select=function(event){_this.$modalInstance.close(event)},this.Search=function(toSearch){console.log(\"search: \"+toSearch),_this.eventService.searchText(toSearch).then(function(events){_this.selection=events.data},function(error){console.log(\"error: \"+angular.toJson(error))})}}return eventSelectionCtrl.$inject=[\"$scope\",\"$modalInstance\",\"eventService\"],eventSelectionCtrl}();events_1.eventSelectionCtrl=eventSelectionCtrl}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var ResultGroupController=function(){function ResultGroupController(eventView,timingConfiguration,trackingService,$scope,$stateParams,$modal,Overview,$state){switch(this.eventView=eventView,this.timingConfiguration=timingConfiguration,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,this.Overview=Overview,this.$state=$state,$scope.groupId=this.$stateParams.groupId,$scope.Mask=0,$scope.Overview=Overview,$scope.groupData=_.find(timingConfiguration.ResultGroups,function(g){return g.GroupId==$scope.groupId}),$scope.StateName=$state.current.name,$scope.resultName=this.$stateParams.splitName,console.log(\"splitName in ctrl:\"+this.$stateParams.splitName),$state.current.name){case\"event.results.group\":Overview[$scope.groupId]&&Overview[$scope.groupId].SplitCfg?$state.go(\".split.detail\",{splitName:Overview[$scope.groupId].SplitCfg}):(console.log(\"Current location?? \"+Overview[$scope.groupId].SplitCfg),$state.go(\".home\"))}$scope.IsFlagSelected=function(flag){return($scope.Mask&flag)==flag},$scope.FormatPosition=function(pos,status){switch(status){case 1:return\"DSQ\";case 2:return\"DNF\";case 3:return\"DNS\";default:return pos+\".\"}},$scope.pageSize=25,$scope.curPage=0,$scope.Toggle=function(flag){$scope.Mask=$scope.Mask^flag},$scope.SetResultPage=function(page){console.log(\"set page \"+page),trackingService.getResult($scope.groupId,$scope.resultName,$scope.eventView.EventId,0,(page-1)*$scope.pageSize,$scope.pageSize).then(function(data){$scope.results=data})},$scope.eventView=eventView,$scope.SelectRow=function(row){console.log(\"select row\")},$scope.timingConfiguration=timingConfiguration,$scope.results={ResultView:[],Stats:{}},$scope.$watch(function(){return $scope.Mask+\"_\"+$scope.resultName},_.debounce(function(id){$scope.$apply(function(){trackingService.getResult($scope.groupId,$scope.resultName,$scope.eventView.EventId,0,$scope.curPage*$scope.pageSize,$scope.pageSize).then(function(data){$scope.results=data})})},500))}return ResultGroupController.prototype.SelectResult=function(result){switch(console.log(\"Select Result\"+angular.toJson(result)),result.ReportType.toLowerCase()){case\"link\":break;case\"time\":this.$state.go(\"event.reports.group.report\",{reportId:result.Id});break;case\"xml\":window.location.href=\"https://prod.chronorace.be/Classements/classement.aspx?eventId=\"+this.$stateParams.eventId+\"&mode=large&idClassement=\"+result.Id;break;case\"file\":window.location.href=\"https://crdev.blob.core.windows.net/files/\"+result.Settings.FileName;break;default:return\"fa fa-chevron-right\"}},ResultGroupController.prototype.GetIcon=function(result){switch(result.ReportType){case\"Link\":return\"fa fa-external-link\";case\"File\":switch(result.Settings.FileType.toLowerCase()){case\"pdf\":return\"fa fa-file-pdf-o\";case\"xls\":return\"fa fa-file-excel-o\";default:return\"fa fa-file-o\"}break;default:return\"fa fa-chevron-right\"}},ResultGroupController.$inject=[\"eventView\",\"timingConfiguration\",\"TrackingService\",\"$scope\",\"$stateParams\",\"$modal\",\"Overview\",\"$state\"],ResultGroupController}();events.eventModule.controller(\"resultGroupController\",ResultGroupController)}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var LiveLigneController=function(){function LiveLigneController(eventView,timingConfiguration,trackingService,$scope,$stateParams){this.eventView=eventView,this.timingConfiguration=timingConfiguration,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams}return LiveLigneController.$inject=[\"eventView\",\"timingConfiguration\",\"TrackingService\",\"$scope\",\"$stateParams\"],LiveLigneController}();events.LiveLigneController=LiveLigneController;var LiveLigneGroupController=function(){function LiveLigneGroupController(eventView,timingConfiguration,trackingService,$scope,$stateParams,group){this.eventView=eventView,this.timingConfiguration=timingConfiguration,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams,this.group=group}return LiveLigneGroupController.$inject=[\"eventView\",\"timingConfiguration\",\"TrackingService\",\"$scope\",\"$stateParams\",\"group\"],LiveLigneGroupController}();events.LiveLigneGroupController=LiveLigneGroupController}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var MyResultController=function(){function MyResultController(eventView,timingConfiguration,trackingService,$scope,$stateParams,resultDetail){this.eventView=eventView,this.timingConfiguration=timingConfiguration,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams,this.resultDetail=resultDetail,$scope.resultDetail=resultDetail;var results=[];angular.forEach(resultDetail.ResultDetails,function(result){var compiledResults=[],config=_.find(timingConfiguration.ResultGroups,function(resultGroup){return resultGroup.GroupId==result.GroupId});$scope.SelectMedia=function(media){console.log(\"Select media: \"+angular.toJson(media)),window.location=media.Url},angular.forEach(config.SplitConfigurations,function(spltConfig){compiledResults.push({SplitConfig:spltConfig,Result:result.Results[spltConfig.Name]})}),results.push({Config:config,Data:result,CompiledResults:compiledResults})}),$scope.results=results,$scope.FormatPosition=function(pos,status){switch(status){case 1:return\"DSQ\";case 2:return\"DNF\";case 3:return\"DNS\";default:return pos+\".\"}}}return MyResultController.$inject=[\"eventView\",\"timingConfiguration\",\"TrackingService\",\"$scope\",\"$stateParams\",\"resultDetail\"],MyResultController}();events.eventModule.controller(\"myResultController\",MyResultController)}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var QuickResultsController=function(){function QuickResultsController(eventView,trackingService,$scope,$stateParams,$modal,$state,reportList){this.eventView=eventView,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,this.reportList=reportList,this.showHeader=!0,$scope.context=\"chronorace\",angular.isDefined($stateParams.header)&&\"0\"==$stateParams.header&&(this.showHeader=!1),reportList.length>0&&(1==reportList.length&&\"Tracking\"==reportList[0].DisplayName&&(this.showHeader=!1),\"quickresults\"==$state.current.name&&$state.go(\"quickresults.group\",{groupId:reportList[0].Id}))}return QuickResultsController.$inject=[\"eventView\",\"TrackingService\",\"$scope\",\"$stateParams\",\"$modal\",\"$state\",\"reportList\"],QuickResultsController}();events.eventModule.controller(\"QuickResultsController\",QuickResultsController);var QuickGroupController=function(){function QuickGroupController($interval,eventView,trackingService,$scope,$stateParams,$modal,$state,reportList,reportGroup,resultService){if(this.$interval=$interval,this.eventView=eventView,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,this.$state=$state,this.reportList=reportList,this.reportGroup=reportGroup,this.resultService=resultService,this.showHeader=!0,this.rowsPerPage=15,this.curRepport=null,this.options={enabled:!1,search:!1},this.results=[],this.selectedReport=null,console.log(\"state: \"+$state.current.name),\"quickresults.group\"==$state.current.name&&reportGroup.Reports.length>0){var firstReport=reportGroup.Reports[0];this.SelectResult(firstReport)}}return QuickGroupController.prototype.SelectResult=function(result){switch(console.log(\"Select Result\"+angular.toJson(result)),result.ReportType.toLowerCase()){case\"link\":case\"url\":console.log(angular.toJson(result)),console.log(\"go to iframe\"),this.$state.go(\"quickresults.group.url\",{reportId:result.Id});break;case\"time\":case\"xml\":this.$state.go(\"quickresults.group.report\",{reportId:result.Id});break;case\"live\":this.$state.go(\"quickresults.group.ligne\",{reportId:result.Id});break;case\"file\":window.location.href=\"https://crdev.blob.core.windows.net/files/\"+result.Settings.FileName;break;default:console.log(\"result type not handled [\"+result.ReportType+\"]\")}},QuickGroupController.prototype.GetIcon=function(result){switch(result.ReportType){case\"Link\":return\"fa fa-external-link\";case\"File\":switch(result.Settings.FileType.toLowerCase()){case\"pdf\":return\"fa fa-file-pdf-o\";case\"xls\":return\"fa fa-file-excel-o\";default:return\"fa fa-file-o\"}break;default:return\"fa fa-chevron-right\"}},QuickGroupController.$inject=[\"$interval\",\"eventView\",\"TrackingService\",\"$scope\",\"$stateParams\",\"$modal\",\"$state\",\"reportList\",\"reportGroup\",\"ResultService\"],QuickGroupController}();events.eventModule.controller(\"QuickGroupController\",QuickGroupController);var VideoController=function(){function VideoController(eventView,trackingService,$scope,$stateParams,$modal,$state,videoReferences){this.eventView=eventView,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,this.videoReferences=videoReferences,this.showHeader=!0,console.log(\"video: \"+angular.toJson(videoReferences)+\" / \"+$state.current.name),\"quickresults.group.report.video\"==$state.current.name&&videoReferences.length>0&&$state.go(\"quickresults.group.report.video.content\",{idx:0})}return VideoController.$inject=[\"eventView\",\"TrackingService\",\"$scope\",\"$stateParams\",\"$modal\",\"$state\",\"videoReferences\"],VideoController}();events.eventModule.controller(\"VideoController\",VideoController);var VideoContentController=function(){function VideoContentController(eventView,trackingService,$scope,$stateParams,$modal,$state,videoReferences,videoLink){this.eventView=eventView,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,this.videoReferences=videoReferences,this.videoLink=videoLink,this.showHeader=!0,console.log(\"video content: \"+angular.toJson(videoReferences)+\" / \"+angular.toJson(videoLink)),$scope.player=jwplayer(\"video\").setup({playlist:[{title:\"Finisher movie\",file:videoLink,type:\"mp4\"}],autostart:!0,width:\"100%\",aspectratio:\"16:9\"})}return VideoContentController.$inject=[\"eventView\",\"TrackingService\",\"$scope\",\"$stateParams\",\"$modal\",\"$state\",\"videoReferences\",\"videoLink\"],VideoContentController}();events.eventModule.controller(\"VideoContentController\",VideoContentController);var QuickReportController=function(){function QuickReportController($interval,eventView,trackingService,$scope,$stateParams,$modal,$state,reportList,reportGroup,report,resultService){var _this=this;if(this.$interval=$interval,this.eventView=eventView,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,this.$state=$state,this.reportList=reportList,this.reportGroup=reportGroup,this.report=report,this.resultService=resultService,this.showHeader=!0,this.rowsPerPage=15,this.curRepport=null,this.options={enabled:!1,search:!1},this.results=[],this.RowAction=function(action,data){switch(console.log(\"action: \"+angular.toJson(action)+\"/\"+angular.toJson(data)),action){case\"video\":case\"act\":_this.$state.go(\".video\",{token:data.sH_RTV});break;case\"select\":data.sH_Detail&&\"\"!=data.sH_Detail?window.location=data.sH_Detail:data.sH_RTV&&\"\"!=data.sH_RTV&&_this.$state.go(\".video\",{token:data.sH_RTV})}},this.SelectRow=function(data){console.log(\"data: \"+angular.toJson(data))},this.SetPage=function(page){_this.resultService.searchReport(_this.$stateParams.eventId,_this.curRepport.Id,_this.$scope.search,(page-1)*_this.rowsPerPage,_this.rowsPerPage).then(function(data){_this.results=data})},this.SearchResult=function(toSearch){console.log(\"search: \"+toSearch),_this.$scope.curPage=1,_this.resultService.searchReport(_this.$stateParams.eventId,_this.curRepport.Id,toSearch,0,_this.rowsPerPage).then(function(data){_this.results=data})},this.$scope.grp.selectedReport=report,this.curRepport=report,this.$scope.search=\"\",console.log(\"quick group controller: \"+$stateParams.scroll),angular.isDefined($stateParams.header)&&\"0\"==$stateParams.header&&(this.showHeader=!1),angular.isDefined($stateParams.rows)&&(this.rowsPerPage=parseInt($stateParams.rows)),angular.isDefined($stateParams.scroll)){var delay=parseInt($stateParams.scroll);delay<5e3&&(delay=5e3),console.log(\"scroll? \"+angular.toJson(this.results.Count)+\"/\"+this.rowsPerPage);var timer=$interval(function(){_this.$scope.curPage++,(_this.$scope.curPage-1)*_this.rowsPerPage>=_this.results.Count&&(_this.$scope.curPage=1),_this.SetPage(_this.$scope.curPage)},delay);$scope.$on(\"$destroy\",function(){$interval.cancel(timer)})}this.SearchResult(\"\")}return QuickReportController.$inject=[\"$interval\",\"eventView\",\"TrackingService\",\"$scope\",\"$stateParams\",\"$modal\",\"$state\",\"reportList\",\"reportGroup\",\"report\",\"ResultService\"],QuickReportController}();events.QuickReportController=QuickReportController;var QuickLiveLigneController=function(){function QuickLiveLigneController($interval,eventView,trackingService,$scope,$stateParams,$modal,$state,reportList,reportGroup,report,resultService,timingConfiguration){var _this=this;this.$interval=$interval,this.eventView=eventView,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,this.$state=$state,this.reportList=reportList,this.reportGroup=reportGroup,this.report=report,this.resultService=resultService,this.timingConfiguration=timingConfiguration,this.curRepport=null,this.options={enabled:!1,search:!1},this.results=[],this.timingGroupConfiguration=[],this.rowsPerPage=50,this.flag=0,this.showHeader=!0,this.ToggleFlag=function(flag){return 0==_this.flag.Flag?void(_this.flag=0):(_this.HasFlag(flag)?_this.flag=(_this.flag|flag.Flag)^flag.Flag:_this.flag=_this.flag|flag.Flag,void _this.SetPage(1))},this.HasFlag=function(flag){return 0==flag.Flag?0==_this.flag:(_this.flag&flag.Flag)==flag.Flag},this.RowAction=function(action,data){switch(console.log(\"action: \"+angular.toJson(action)+\"/\"+angular.toJson(data)),action){case\"video\":case\"act\":_this.$state.go(\".video\",{token:data.sH_RTV});break;case\"select\":data.sH_Detail&&\"\"!=data.sH_Detail?window.location=data.sH_Detail:data.sH_RTV&&\"\"!=data.sH_RTV&&_this.$state.go(\".video\",{token:data.sH_RTV})}},this.SelectRow=function(data){console.log(\"data: \"+angular.toJson(data))},this.SetPage=function(page){_this.$scope.curPage=page,_this.resultService.overview(_this.$stateParams.eventId,_this.report.Settings.Groupe,_this.flag,_this.$scope.search,(page-1)*_this.rowsPerPage,_this.rowsPerPage).then(function(data){_this.results=data})},this.SearchResult=function(toSearch){console.log(\"search: \"+toSearch),_this.$scope.curPage=1,_this.resultService.overview(_this.$stateParams.eventId,_this.report.Settings.Groupe,_this.flag,toSearch,0,_this.rowsPerPage).then(function(data){_this.results=data})},console.log(\"report: \"+angular.toJson(report)),this.curRepport=report,this.timingGroupConfiguration=_.find(timingConfiguration.ResultGroups,function(g){return g.GroupId==report.Settings.Groupe}),this.$scope.grp.selectedReport=report,this.$scope.search=\"\",this.SearchResult(\"\")}return QuickLiveLigneController.$inject=[\"$interval\",\"eventView\",\"TrackingService\",\"$scope\",\"$stateParams\",\"$modal\",\"$state\",\"reportList\",\"reportGroup\",\"report\",\"ResultService\",\"timingConfiguration\"],QuickLiveLigneController}();events.QuickLiveLigneController=QuickLiveLigneController}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var ResultController=function(){function ResultController(eventView,resultService,reportList,$scope,$stateParams,$modal,$state){var _this=this;switch(this.eventView=eventView,this.resultService=resultService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,this.$state=$state,$scope.eventView=eventView,$scope.reportList=reportList,$scope.GetIcon=function(r){return _this.GetIcon(r)},$scope.SelectResult=function(r){return _this.SelectResult(r)},$scope.options={enabled:!1},$scope.SetPage=function(page){resultService.searchReport(_this.$stateParams.eventId,$scope.curReport.Id,$scope.search,25*(page-1),25).then(function(data){$scope.results=data})},$scope.globalSearch=function(srch){console.log(\"Global Search: \"+srch),resultService.eventSearch(_this.$stateParams.eventId,srch,0,100).then(function(data){_this.$scope.globalResult=data})},$scope.closeGlobalResult=function(){_this.$scope.globalResult=null,_this.$scope.srch=\"\"},$scope.globalSearchAction=function(action,data){switch(action){case\"master\":case\"select\":console.log(\"globalSearchAction: \"+angular.toJson(action)+\",\"+angular.toJson(data)),console.log(\"wtf: \"+angular.toJson({groupId:data.sH_Group,reportId:data.sH_Report})),$state.go(\"event.reports.group.report\",{groupId:data.sH_Group,reportId:data.sH_Report})}},$scope.getOverviewClass=function(row){return\"F\"==row.Gender?\"table-row-girl\":\"\"},$scope.SearchResult=function(toSearch){console.log(\"search: \"+toSearch),$scope.curPage=1,resultService.searchReport(_this.$stateParams.eventId,$scope.curReport.Id,toSearch,0,25).then(function(data){$scope.results=data})},$scope.groupId=this.$stateParams.groupId,$scope.groupId&&($scope.curGroup=_.find(reportList,function(g){return g.Id==$scope.groupId})),$scope.search=\"\",$scope.reportId=this.$stateParams.reportId,$scope.reportId&&($scope.curReport=_.find($scope.curGroup.Reports,function(r){return r.Id==$scope.reportId})),$state.current.name){case\"event.reports.home\":1==reportList.length&&$state.go(\"^.group.home\",{groupId:reportList[0].Id});break;case\"event.reports.group.home\":1==$scope.curGroup.Reports.length&&(console.log(\"only 1 report... redirect\"),this.SelectResult($scope.curGroup.Reports[0]));break;case\"event.reports.group.report\":$scope.curReport&&(console.log(\"ici, zen: \"+this.$stateParams.reportId+\"/\"+this.$stateParams.eventId),resultService.searchReport(this.$stateParams.eventId,$scope.curReport.Id,$scope.search,0,25).then(function(data){$scope.results=data}));break;default:console.log($state.current.name)}}return ResultController.prototype.SelectResult=function(result){switch(result.ReportType.toLowerCase()){case\"link\":break;case\"time\":case\"xml\":this.$state.go(\"event.reports.group.report\",{reportId:result.Id});break;case\"file\":window.location.href=\"https://crdev.blob.core.windows.net/files/\"+result.Settings.FileName;break;default:return\"fa fa-chevron-right\"}},ResultController.prototype.GetIcon=function(result){switch(result.ReportType){case\"Link\":return\"fa fa-external-link\";case\"File\":switch(result.Settings.FileType.toLowerCase()){case\"pdf\":return\"fa fa-file-pdf-o\";case\"xls\":return\"fa fa-file-excel-o\";default:return\"fa fa-file-o\"}break;default:return\"fa fa-chevron-right\"}},ResultController.$inject=[\"eventView\",\"ResultService\",\"reportList\",\"$scope\",\"$stateParams\",\"$modal\",\"$state\"],ResultController}();events.eventModule.controller(\"resultController\",ResultController)}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var TrackingController=function(){function TrackingController(eventView,trackingService,$scope,$stateParams,$modal,gpsConfiguration,$interval){var _this=this;this.eventView=eventView,this.trackingService=trackingService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,this.gpsConfiguration=gpsConfiguration,this.$interval=$interval,this.SetMapType=function(type){_this.map.setMapTypeId(type)},this.markers={},this.enabledTrackers={},this.lastPosition={},this.poly=null,this.GetIcon=function(tracker){var icon=tracker.Marker;return angular.isDefined(icon)||(icon=\"s16\"),\"https://chronorace.blob.core.windows.net/webresources/img/icons/\"+icon+\".png\"},setTimeout(function(){return _this.InitMap()},100)}return TrackingController.prototype.PlaceMarkerIcon=function(key,name,lat,lng,icon,label){var _this=this,location=new google.maps.LatLng(parseFloat(lat),parseFloat(lng)),marker=this.markers[key];if(void 0==marker){angular.isDefined(icon)||(icon=\"s16\");var image={url:\"https://chronorace.blob.core.windows.net/webresources/img/icons/\"+icon+\".png\",size:new google.maps.Size(62,39),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(31,39)};marker=new MarkerWithLabel({position:location,map:this.map,icon:image,labelContent:label,labelAnchor:new google.maps.Point(30,37),labelClass:\"labelscustom\",labelStyle:{opacity:1}});var infoWindow=new google.maps.InfoWindow;google.maps.event.addListener(marker,\"click\",function(){var lst=_this.lastPosition[key],html=\"<strong>\"+name+\"</strong><br />\"+(null!=lst?lst.DisplayTime:\"\");infoWindow.setContent(html),infoWindow.open(_this.map,marker)}),this.markers[key]=marker}else marker.setPosition(location);this.enabledTrackers[key]&&null==marker.map?marker.setMap(this.map):this.enabledTrackers[key]||null==marker.map||marker.setMap(null)},TrackingController.prototype.PlaceMarker=function(key,name,lat,lng,info,label){var _this=this,location=new google.maps.LatLng(parseFloat(lat),parseFloat(lng)),marker=this.markers[key];if(void 0==marker){marker=new MarkerWithLabel({position:location,map:this.map,labelContent:label,labelAnchor:new google.maps.Point(20,(-10)),labelClass:\"labels\",labelStyle:{opacity:1}});var infoWindow=new google.maps.InfoWindow;\ngoogle.maps.event.addListener(marker,\"click\",function(){var lst=_this.lastPosition[key],html=\"<strong>\"+name+\"</strong><br />\"+(null!=lst?lst.DisplayTime:\"\");infoWindow.setContent(html),infoWindow.open(_this.map,marker)}),this.markers[key]=marker}else marker.setPosition(location);this.enabledTrackers[key]&&null==marker.map?marker.setMap(this.map):this.enabledTrackers[key]||null==marker.map||marker.setMap(null)},TrackingController.prototype.CenterOnMarker=function(marker){var _this=this;console.log(\"center on \"+angular.toJson(marker));var lst=this.lastPosition[marker];if(null!=lst){null!=this.poly&&(this.poly.setMap(null),this.poly=null);var center=new google.maps.LatLng(lst.Lat,lst.Lon);this.map.setCenter(center),this.trackingService.getLog(this.$stateParams.eventId,marker).then(function(log){console.log(\"log: \"+angular.toJson(log));var points=[];angular.forEach(log,function(point){var toAdd=new google.maps.LatLng(point.Lat,point.Lon);points.push(toAdd)}),_this.poly=new google.maps.Polyline({path:points,strokeColor:\"#00AA00\",strokeOpacity:.6,map:_this.map,strokeWeight:4}),_this.poly.setMap(_this.map)})}},TrackingController.prototype.InitAutocomplete=function(){var _this=this,input=document.getElementById(\"places\"),searchBox=new google.maps.places.SearchBox(input);console.log(\"map: \"+this.map),this.map.addListener(\"bounds_changed\",function(){searchBox.setBounds(_this.map.getBounds())});var markers=[];searchBox.addListener(\"places_changed\",function(){var places=searchBox.getPlaces();if(0!=places.length){markers.forEach(function(marker){marker.setMap(null)}),markers=[];var bounds=new google.maps.LatLngBounds;places.forEach(function(place){if(!place.geometry)return void console.log(\"Returned place contains no geometry\");var icon={url:place.icon,size:new google.maps.Size(71,71),origin:new google.maps.Point(0,0),anchor:new google.maps.Point(17,34),scaledSize:new google.maps.Size(25,25)};markers.push(new google.maps.Marker({map:_this.map,icon:icon,title:place.name,position:place.geometry.location})),place.geometry.viewport?bounds.union(place.geometry.viewport):bounds.extend(place.geometry.location)}),_this.map.fitBounds(bounds)}}),angular.forEach(this.gpsConfiguration.Trackers,function(v,k){_this.enabledTrackers[k]=!0})},TrackingController.prototype.AddTrack=function(color,trackData){var points=[];console.log(\"Add track: \");var bounds=new google.maps.LatLngBounds;angular.forEach(trackData,function(point){var toAdd=new google.maps.LatLng(point.Lat,point.Lon);points.push(toAdd),bounds.extend(toAdd)});var poly=new google.maps.Polyline({path:points,strokeColor:color,strokeOpacity:.7,strokeWeight:4});poly.setMap(this.map),this.map.fitBounds(bounds)},TrackingController.prototype.InitMap=function(){var _this=this,mC=document.getElementById(\"map\");console.log(\"map element: \"+mC),this.geocoder=new google.maps.Geocoder,this.infowindow=new google.maps.InfoWindow;var center={lat:parseFloat(this.gpsConfiguration.TrackingOriginLatitude),lng:parseFloat(this.gpsConfiguration.TrackingOriginLongitude)};this.map=new google.maps.Map(document.getElementById(\"map\"),{zoom:4,mapTypeControl:!1,center:center,mapTypeId:\"hybrid\"}),this.InitAutocomplete(),angular.forEach(this.gpsConfiguration.Tracks,function(track){angular.forEach(track.Files,function(file){console.log(\"load track: \"+file),file.endsWith(\".kml\")||_this.trackingService.getTrack(_this.$stateParams.eventId,file).then(function(data){return _this.AddTrack(track.Color,data)})})}),this.InitInterval(),console.log(\"init map\")},TrackingController.prototype.DrawTrackers=function(){var _this=this;angular.forEach(this.lastPosition,function(tk,k){var tkCfg=_this.gpsConfiguration.Trackers[tk.DeviceId];_this.PlaceMarkerIcon(tk.DeviceId,tk.DeviceId+\" - \"+tkCfg.DisplayName,tk.Lat,tk.Lon,tkCfg.Marker,tkCfg.Bib)})},TrackingController.prototype.RefreshTrackers=function(){var _this=this;this.trackingService.getPosition(this.$stateParams.eventId).then(function(tks){_this.lastPosition=tks,_this.DrawTrackers()})},TrackingController.prototype.InitInterval=function(){var _this=this,timer=this.$interval(function(){_this.RefreshTrackers()},5e3);this.$scope.$on(\"$destroy\",function(){_this.$interval.cancel(timer)}),this.RefreshTrackers()},TrackingController.$inject=[\"eventView\",\"TrackingService\",\"$scope\",\"$stateParams\",\"$modal\",\"gpsConfiguration\",\"$interval\"],TrackingController}();events.eventModule.controller(\"TrackingController\",TrackingController)}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var xcoController=function(){function xcoController(xcoService,$scope,$stateParams,$modal,$state,raceList){this.xcoService=xcoService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,this.raceList=raceList,$scope.context=\"chronorace\",console.log(\"xcoController ok: \"+angular.toJson(raceList)),raceList&&raceList.length>0&&$state.go(\"xco.race\",{raceName:raceList[0]})}return xcoController.$inject=[\"xcoService\",\"$scope\",\"$stateParams\",\"$modal\",\"$state\",\"raceList\"],xcoController}();events.eventModule.controller(\"xcoController\",xcoController);var xcoRaceController=function(){function xcoRaceController(xcoService,$scope,$stateParams,$modal,$state,registration,overview,$interval){var _this=this;this.xcoService=xcoService,this.$scope=$scope,this.$stateParams=$stateParams,this.$modal=$modal,this.registration=registration,this.overview=overview,this.$interval=$interval,this.FormatTime=function(input){if(!input)return\"\";var ms=input%1e3;input=(input-ms)/1e3;var secs=input%60+\"\";input=(input-+secs)/60;var mins=input%60+\"\",hrs=(input-+mins)/60+\"\";return+hrs>0?(+mins<10&&(mins=\"0\"+mins),+secs<10&&(secs=\"0\"+secs),hrs+\":\"+mins+\":\"+secs):+mins>0?(+secs<10&&(secs=\"0\"+secs),mins+\":\"+secs):secs},this.GetLapTimes=function(ov){if(!angular.isDefined(ov.LapTimes))return\"\";var i=ov.LapTimes.length-10;i<0&&(i=0);for(var toRet=\"\",first=!0;i<ov.LapTimes.length;)first||(toRet+=\", \"),toRet+=_this.FormatTime(ov.LapTimes[i]),first=!1,i++;return toRet},this.GetRacePosition=function(ov){return angular.isDefined(ov.CurrentSituation)?0==+ov.CurrentSituation.Lap?\"STRT\":+ov.CurrentSituation.LapLocation>0?\"Lap \"+ov.CurrentSituation.Lap+\" / ctrl \"+ov.CurrentSituation.LapLocation:\"Lap \"+ov.CurrentSituation.Lap:\"\"};var i=0,timer=$interval(function(){xcoService.overview($stateParams.db,$stateParams.raceName).then(function(data){console.log(\"overview\"),_this.overview=data}),i++,i>20&&(xcoService.overview($stateParams.db,$stateParams.raceName).then(function(data){console.log(\"registration\"),_this.registration=registration}),i=0)},3e3);$scope.$on(\"$destroy\",function(){$interval.cancel(timer)})}return xcoRaceController.$inject=[\"xcoService\",\"$scope\",\"$stateParams\",\"$modal\",\"$state\",\"registration\",\"overview\",\"$interval\"],xcoRaceController}();events.eventModule.controller(\"xcoRaceController\",xcoRaceController),events.eventModule.filter(\"mstotimehmmss\",function(){return function(input){if(!input)return\"\";var ms=input%1e3;input=(input-ms)/1e3;var secs=input%60+\"\";input=(input-+secs)/60;var mins=input%60+\"\",hrs=(input-+mins)/60+\"\";return+hrs>0?(+mins<10&&(mins=\"0\"+mins),+secs<10&&(secs=\"0\"+secs),hrs+\":\"+mins+\":\"+secs):+mins>0?(+secs<10&&(secs=\"0\"+secs),mins+\":\"+secs):secs}}),events.eventModule.filter(\"mstotimehmmssf\",function(){return function(input){if(!input)return\"\";var ms=input%1e3;input=(input-ms)/1e3;var secs=input%60+\"\";input=(input-+secs)/60;var mins=input%60+\"\",hrs=(input-+mins)/60+\"\";return+hrs>0?(+mins<10&&(mins=\"0\"+mins),+secs<10&&(secs=\"0\"+secs),hrs+\":\"+mins+\":\"+secs+\".\"+~~(ms/100)):+mins>0?(+secs<10&&(secs=\"0\"+secs),mins+\":\"+secs+\".\"+~~(ms/100)):secs+\".\"+~~(ms/100)}}),events.eventModule.filter(\"mstotimehmmssfff\",function(){return function(input){if(!input)return\"\";var ms=input%1e3,strMs=(ms+1e3).toString().substr(1);input=(input-ms)/1e3;var secs=input%60+\"\";input=(input-+secs)/60;var mins=input%60+\"\",hrs=(input-+mins)/60+\"\";return+hrs>0?(+mins<10&&(mins=\"0\"+mins),+secs<10&&(secs=\"0\"+secs),hrs+\":\"+mins+\":\"+secs+\".\"+strMs):+mins>0?(+secs<10&&(secs=\"0\"+secs),mins+\":\"+secs+\".\"+strMs):secs+\".\"+strMs}})}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){var selectEventCtrl=function(){function selectEventCtrl($scope,$q,$element,$timeout,$state,eventService,$modal,$log,notificationService){var _this=this;this.$scope=$scope,this.$q=$q,this.$element=$element,this.$timeout=$timeout,this.$state=$state,this.eventService=eventService,this.$modal=$modal,this.$log=$log,this.notificationService=notificationService,this.$type=\"\",this.ExpandedNodes={},this.ClearEvent=function(){_this.notificationService.showMessage(\"#CONFIRMCLEAR\",\"#CONFIRM\",\"YES|*NO\",_this.$scope).then(function(button){\"YES\"==button&&_this.SetEvent(null)})},this.SetEvent=function(event){angular.isDefined(_this.$scope.selectEvent)?(console.log(\"call custom function\"),_this.$scope.selectEvent({event:event})):(console.log(\"set scope directly\"),_this.$scope.eventView=event),console.log(\"event selection: \"+angular.toJson(event))},$scope.context=\"event\",$scope.selectedContact=$scope.selectedContact||null,this.$scope.search=\"\"}return selectEventCtrl.prototype.SelectEvent=function($event){var _this=this;console.log(\"select event clicked\"),this.eventService.selectEvent().then(function(data){console.log(\"select event: \"+angular.toJson(_this.$scope.selectEvent)),_this.SetEvent(data)},function(error){console.log(\"error: \"+angular.toJson(error))})},selectEventCtrl.prototype.RemoveSelectedContact=function(){this.$scope.selectedEvent=null},selectEventCtrl.$inject=[\"$scope\",\"$q\",\"$element\",\"$timeout\",\"$state\",\"eventService\",\"$modal\",\"$log\",\"notificationService\"],selectEventCtrl}(),selectEventDirective=function(){function selectEventDirective(){this.restrict=\"E\",this.replace=!0,this.scope={eventView:\"=\",selectEvent:\"&\"},this.templateUrl=\"modules/event/views/eventview.html\",this.controller=selectEventCtrl,this.controllerAs=\"selectEventCtrl\",console.log(\"select event directive instanciated\")}return selectEventDirective}();events.eventModule.directive(\"crSelectEvent\",function(){return new selectEventDirective})}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){events.eventModule.config([\"$stateProvider\",function($stateProvider){$stateProvider.state(\"xco\",{ncyBreadcrumb:{label:\"{{'XCO'|translate}}\"},url:\"/xco/:db\",resolve:{raceList:[\"xcoService\",\"$stateParams\",function(xcoService,$stateParams){return xcoService.raceList($stateParams.db)}]},templateUrl:\"modules/event/views/xco.html\",controller:\"xcoController\",controllerAs:\"ctrl\"}).state(\"xco.race\",{url:\"/:raceName\",ncyBreadcrumb:{skip:!0},resolve:{registration:[\"xcoService\",\"$stateParams\",function(xcoService,$stateParams){return xcoService.registration($stateParams.db,$stateParams.raceName)}],overview:[\"xcoService\",\"$stateParams\",function(xcoService,$stateParams){return xcoService.overview($stateParams.db,$stateParams.raceName)}]},templateUrl:\"modules/event/views/xcorace.html\",controller:\"xcoRaceController\",controllerAs:\"race\"}).state(\"quickresults\",{ncyBreadcrumb:{label:\"{{'RESULTS'|translate}}\"},url:\"/quickresults/:eventId?rows&header&scroll\",resolve:{eventView:[\"$stateParams\",\"TrackingService\",function($stateParams,trackingService){return trackingService.getEventView($stateParams.eventId)}],reportList:[\"$stateParams\",\"ResultService\",function($stateParams,resultService){return resultService.getReportList($stateParams.eventId)}]},templateUrl:\"modules/event/views/quickresults.html\",controller:\"QuickResultsController\",controllerAs:\"ctrl\"}).state(\"quickresults.group\",{url:\"/group/:groupId?rows&header&speed\",ncyBreadcrumb:{skip:!0},resolve:{reportGroup:[\"reportList\",\"$stateParams\",function(reportList,$stateParams){return _.find(reportList,function(g){return g.Id==$stateParams.groupId})}]},templateUrl:\"modules/event/views/quickgroup.html\",controller:\"QuickGroupController\",controllerAs:\"grp\"}).state(\"quickresults.group.report\",{url:\"/report/:reportId\",ncyBreadcrumb:{skip:!0},resolve:{report:[\"reportGroup\",\"$stateParams\",function(reportGroup,$stateParams){return _.find(reportGroup.Reports,function(g){return g.Id==$stateParams.reportId})}]},templateUrl:\"modules/event/views/quickreport.html\",controller:events.QuickReportController,controllerAs:\"rep\"}).state(\"quickresults.group.url\",{url:\"/iframe/:reportId\",ncyBreadcrumb:{skip:!0},resolve:{report:[\"reportGroup\",\"$stateParams\",function(reportGroup,$stateParams){return _.find(reportGroup.Reports,function(g){return g.Id==$stateParams.reportId})}]},templateUrl:\"modules/event/views/quickiframe.html\",controller:events.QuickReportController,controllerAs:\"rep\"}).state(\"quickresults.group.ligne\",{url:\"/liveligne/:reportId\",ncyBreadcrumb:{skip:!0},resolve:{report:[\"reportGroup\",\"$stateParams\",function(reportGroup,$stateParams){return _.find(reportGroup.Reports,function(g){return g.Id==$stateParams.reportId})}],timingConfiguration:[\"$stateParams\",\"TrackingService\",function($stateParams,trackingService){return trackingService.getTimingConfiguration($stateParams.eventId)}]},templateUrl:\"modules/event/views/quickliveligne.html\",controller:events.QuickLiveLigneController,controllerAs:\"live\"}).state(\"quickresults.group.report.video\",{url:\"/video/:token\",ncyBreadcrumb:{skip:!0},resolve:{videoReferences:[\"$stateParams\",\"ResultService\",function($stateParams,resultService){return resultService.videoReferences($stateParams.token)}]},views:{\"@quickresults\":{templateUrl:\"modules/event/views/video.html\",controller:\"VideoController\",controllerAs:\"video\"}}}).state(\"quickresults.group.report.video.content\",{url:\"/:idx\",ncyBreadcrumb:{skip:!0},resolve:{videoLink:[\"$stateParams\",\"ResultService\",\"videoReferences\",function($stateParams,resultService,videoReferences){return resultService.videoLink($stateParams.eventId,videoReferences[$stateParams.idx])}]},templateUrl:\"modules/event/views/videocontent.html\",controller:\"VideoContentController\",controllerAs:\"videoContent\"}).state(\"event\",{ncyBreadcrumb:{label:\"{{'EVENT'|translate}}\"},url:\"/event/:eventId\",\"abstract\":!0,resolve:{eventView:[\"$stateParams\",\"TrackingService\",function($stateParams,trackingService){return trackingService.getEventView($stateParams.eventId)}]},views:{\"\":{templateUrl:\"modules/event/views/event-template.html\",controller:\"EventController\"}},controllerAs:\"eventController\"}).state(\"event.home\",{url:\"\",views:{\"\":{templateUrl:\"modules/event/views/event-home.html\",controller:\"EventController\"}},ncyBreadcrumb:{skip:!0}}).state(\"event.custom\",{url:\"/custom\",template:\"<ui-view/>\"}).state(\"event.custom.tenkm\",{url:\"/tenkm\",templateUrl:\"modules/event/views/tenkm-home.html\"}).state(\"event.participants\",{url:\"/participants\",views:{title:{template:\"<span translate>PARTICIPANTS</span>\"},\"\":{templateUrl:\"modules/event/views/event-participant.html\",controller:\"EventController\"}},ncyBreadcrumb:{label:\"{{'PARTICIPANTS'|t}}\"}}).state(\"event.reports\",{url:\"/reports\",\"abstract\":!0,resolve:{reportList:[\"$stateParams\",\"ResultService\",function($stateParams,resultService){return resultService.getReportList($stateParams.eventId)}],breadcrumb:function(){return\"#REPORTS\"}},views:{title:{template:\"<span translate>RESULTS</span>\"},\"\":{templateUrl:\"modules/event/views/result-template.html\",controller:\"resultController\",controllerAs:\"ctrl\"}},ncyBreadcrumb:{label:\"{{'RESULTS'|translate}}\"}}).state(\"event.reports.home\",{url:\"\",views:{\"\":{templateUrl:\"modules/event/views/result-home.html\"}},ncyBreadcrumb:{skip:!0}}).state(\"event.reports.group\",{url:\"/group/:groupId\",\"abstract\":!0,templateUrl:\"modules/event/views/result-group.html\",ncyBreadcrumb:{label:\"{{curGroup.DisplayName|tc}}\"},views:{\"\":{template:\"<ui-view/>\"}},data:{proxy:\"event.reports.group.home\"}}).state(\"event.reports.group.home\",{url:\"\",ncyBreadcrumb:{skip:!0},views:{\"\":{templateUrl:\"modules/event/views/result-group-home.html\",controller:\"resultController\"}}}).state(\"event.reports.group.report\",{url:\"/report/:reportId\",ncyBreadcrumb:{label:\"{{curReport.DisplayName|tc}}\"},views:{\"\":{templateUrl:\"modules/event/views/result-group-report.html\",controller:\"resultController\"}}}).state(\"event.ligneresults\",{url:\"/ligneresults\",\"abstract\":!0,resolve:{timingConfiguration:[\"$stateParams\",\"TrackingService\",function($stateParams,trackingService){return trackingService.getTimingConfiguration($stateParams.eventId)}]},views:{title:{template:\"<span translate>RESULTS</span>\"},\"\":{templateUrl:\"modules/event/views/live-ligne-template.html\",controller:events.LiveLigneController,controllerAs:\"liveController\"}}}).state(\"event.ligneresults.home\",{url:\"\",views:{\"\":{templateUrl:\"modules/event/views/live-ligne-home.html\"}}}).state(\"event.ligneresults.group\",{url:\"/group/:groupId\",templateUrl:\"modules/event/views/live-ligne-group.html\",controller:events.LiveLigneGroupController,controllerAs:\"liveGroupController\",resolve:{group:[\"$stateParams\",\"timingConfiguration\",function($stateParams,timingConfiguration){return console.log(\"group: \"+$stateParams.groupId),_.where(timingConfiguration.ResultGroups,{GroupId:Number($stateParams.groupId)})[0]}]}}).state(\"event.ligneresults.group.overview\",{url:\"/overview\",templateUrl:\"modules/event/views/live-ligne-overview.html\"}).state(\"event.ligneresults.my\",{url:\"/my/:bib\",resolve:{resultDetail:[\"$stateParams\",\"TrackingService\",function($stateParams,trackingService){return trackingService.getBibDetails($stateParams.eventId,$stateParams.bib)}]},templateUrl:\"modules/event/views/my-result.html\",controller:\"myResultController\"}).state(\"tracking\",{url:\"/live/tracking/:eventId\",resolve:{eventView:[\"$stateParams\",\"TrackingService\",function($stateParams,trackingService){return trackingService.getEventView($stateParams.eventId)}],gpsConfiguration:[\"$stateParams\",\"TrackingService\",function($stateParams,trackingService){return trackingService.gpsConfiguration($stateParams.eventId)}]},templateUrl:\"modules/event/views/tracking-index.html\",controller:\"TrackingController\",controllerAs:\"track\"})}])}(events=cr.events||(cr.events={}))}(cr||(cr={}));var cr;!function(cr){var events;!function(events){events.eventModule.config([\"crFormTemplateProvider\",function(crFormTemplateProvider){crFormTemplateProvider.setTemplateUrl(\"event\",\"modules/event/views/formevent.html\")}])}(events=cr.events||(cr.events={}))}(cr||(cr={})),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/back-result-group.html\",'<h2><a class=\"results-back\" ui-sref=\"^.home\"><span class=\"fa fa-chevron-left\"></span></a> {{groupData.DisplayName}}</h2><div class=\"row\" style=\"padding-bottom: 10px\"><div class=\"col-md-3\"><label class=\"control-label\" for=\"lblLocation\">{{\\'LOCATION\\'|t}} <span ng-if=\"options.required\">*</span></label><select id=\"lblLocation\" ng-model=\"resultName\" ng-options=\"split.DisplayName for split in groupData.SplitConfigurations\" class=\"form-control nya-selectpicker\"><option value=\"\" translate=\"\">OVERVIEW</option></select></div><div class=\"col-md-6\"><label class=\"control-label\" for=\"Filters\">Filters</label><div class=\"btn-group\" id=\"Filters\" data-toggle=\"buttons\"><button class=\"btn\" ng-repeat=\"md in groupData.MetaData | filter:{Type:4}\" ng-class=\"{\\'btn-primary\\':IsFlagSelected(md.Flag) }\" ng-click=\"Toggle(md.Flag)\">{{md.DisplayName|tc}}</button></div></div></div><pre>\\n    {{Overview|json}}\\n</pre><ui-view></ui-view><div ng-if=\"results.ResultView.length>0\"><div class=\"row\"><div class=\"col-md-9\"><paging page=\"currentPage\" page-size=\"pageSize\" paging-action=\"SetResultPage(page)\" total=\"results.TotalRows\" show-prev-next=\"true\"></paging></div><div class=\"col-md-3 text-right\"><b>{{results.Stats[\"Ok\"]||0}}</b> {{\\'FINISHERS\\'|t}} / <b>{{results.TotalRows}}</b> {{\\'STARTERS\\'|t}}</div></div><div class=\"row\"><div class=\"col-md-12\"><table class=\"table table-striped\"><thead><tr><th class=\"text-right\">{{\\'POS\\'|t}}</th><th>{{\\'BIB\\'|t}}</th><th></th><th>{{\\'NAME\\'|t}}</th><th class=\"text-center\">{{\\'NATIONALITY\\'|t}}</th><th>{{\\'TEAM\\'|t}}</th><th class=\"text-right\">{{\\'TIME\\'|t}}</th></tr></thead><tbody><tr ng-repeat=\"res in results.ResultView\"><td class=\"text-right\">{{FormatPosition( res.FilterRank,res.Result.Status)}}</td><td><i>n°{{res.RegistrationView.DisplayBib}}</i></td><td class=\"text-center\">{{res.RegistrationView.Gender.replace(\"M\",\"\")}}</td><td><b>{{res.RegistrationView.LastName}} {{res.RegistrationView.FirstName}}</b></td><td class=\"text-center\"><center><img ng-src=\"http://chronorace.blob.core.windows.net/webresources/img/flags/{{res.RegistrationView.Nationality.toLowerCase()}}.png\" ng-if=\"res.RegistrationView.Nationality!=\\'\\'\"></center></td><td>{{res.RegistrationView.GroupName}}</td><td class=\"text-right\"><b>{{res.Result.DisplayTime}}</b></td></tr></tbody></table></div></div></div><button class=\"btn btn-primary\" ui-sref=\"^.home\" translate=\"\">BACK</button><br>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/event-home.html\",'<cr-menusquare><cr-menusquare-item sq-icon=\"home\" sq-title=\"HOME\" sq-route=\"index\"></cr-menusquare-item><cr-menusquare-item sq-icon=\"pencil-square-o\" sq-title=\"PARTICIPANTS\" sq-route=\"^.participants\"></cr-menusquare-item><cr-menusquare-item sq-icon=\"list-ol\" sq-title=\"RESULTS\" sq-route=\"^.reports.home\"></cr-menusquare-item></cr-menusquare>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/event-participant.html\",'<div role=\"tabpanel\"><ul class=\"nav nav-tabs\" role=\"tablist\"><li role=\"presentation\"><a ui-sref=\"^.home\" aria-controls=\"tabs-vertical\" role=\"tab\" data-toggle=\"tab\"><i class=\"fa fa-group\"></i> <span translate=\"\">EVENTHOME</span></a></li><li role=\"presentation\" class=\"active\"><a ui-stref=\"^.participants\" aria-controls=\"information\" role=\"tab\" data-toggle=\"tab\"><i class=\"fa fa-info-circle\"></i> <span translate=\"\">PARTICIPANTS</span></a></li><li role=\"presentation\"><a ui-sref=\"event.reports.home\" aria-controls=\"account\" role=\"tab\" data-toggle=\"tab\"><i class=\"fa fa-lock\"></i> <span translate=\"\">RESULTS</span></a></li></ul><div class=\"tab-content\"><div class=\"tab-pane-content\"><cr-table show-select=\"true\" on-row-select=\"Select(data)\" on-row-action=\"RowAction(action,data)\" filter=\"Search(value)\" options=\"options\" rows=\"searchResult.Rows\" columns=\"searchResult.TableDefinition.Columns\"></cr-table></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/event-template.html\",'<div ng-if=\"eventView.Parameters.ResultHeaderImage\" class=\"text-center\"><center><img ng-src=\"{{eventView.Parameters.ResultHeaderImage}}\" class=\"img-responsive\"></center><br></div><section class=\"page-content\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-list-ol\"></i></div><h1 class=\"page-title\"><div ui-view=\"title\"><span>{{\\'EVENT\\' | translate}}</span></div><small><div ui-view=\"subtitle\">{{ eventView.Location }}, {{ eventView.Date }}, {{ eventView.Country }} - {{ eventView.Title }}</div></small></h1></div><div class=\"dashboard-content\"><div ui-view=\"\"></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/eventselectiondialog.html\",'<div class=\"modal-header select-contact\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss()\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"text-center\" translate=\"\">EVENTSELECTION</h4></div><div class=\"modal-body\"><form><div class=\"row\"><div class=\"col-sm-12\"><div class=\"input-group\"><input cr-focus=\"\" type=\"text\" class=\"form-control ng-pristine ng-valid\" ng-model=\"search\" ng-focus=\"\"> <span class=\"input-group-btn\"><button class=\"btn btn-default\" type=\"submit\" ng-click=\"eventSelectionCtrl.Search(search)\"><span class=\"glyphicon glyphicon-search\" aria-hidden=\"true\"></span></button></span></div></div></div></form><div class=\"row\" ng-show=\"eventSelectionCtrl.selection.length>0\"><div class=\"col-md-12\"><br><table class=\"table table-hover table-striped table-condensed\"><thead><tr><th translate=\"\">DATE</th><th translate=\"\">LOCATION</th><th translate=\"\">TITLE</th></tr></thead><tbody><tr ng-repeat=\"event in eventSelectionCtrl.selection\" ng-click=\"eventSelectionCtrl.Select(event)\"><td class=\"text-right\">{{event.Date}}</td><td>{{event.Location}} ({{event.Country}})</td><td><b>{{event.Title}}</b></td></tr></tbody></table></div></div></div><div class=\"modal-footer\"><div class=\"text-center\"><button class=\"btn btn-default\" type=\"button\" ng-click=\"$dismiss()\" translate=\"\">CANCEL</button></div></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/eventview.html\",'<div><div ng-if=\"eventView!=null\"><div>{{eventView.Date}}<br>{{eventView.Location}} ({{eventView.Country}})<br><a ng-click=\"selectEventCtrl.SelectEvent()\"><b>{{eventView.Title}}</b></a></div><div class=\"text-right mt10\"><button type=\"button\" ng-click=\"selectEventCtrl.ClearEvent()\" class=\"btn btn-danger\"><i class=\"fa fa-close\"></i></button> <button type=\"button\" ng-click=\"selectEventCtrl.SelectEvent()\" class=\"btn btn-default\"><i class=\"fa fa-mouse-pointer\"></i></button></div></div><div ng-if=\"!eventView\"><button class=\"btn btn-default\" type=\"button\" ng-click=\"selectEventCtrl.SelectEvent()\" translate=\"\">NOEVENT</button></div></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/formevent.html\",'<div ng-controller=\"eventFormController\" class=\"form-group nomargin\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"(options.disabled || formOptions.disabled) && !value\"><cr-select-event event-view=\"value\" select-event=\"SetEvent(event)\"></cr-select-event><span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\"(options.disabled || formOptions.disabled) && !value\"><p class=\"form-control-static\">{{ value.DisplayName }}</p></div></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/graph-modal.html\",'<div class=\"modal-body\"><div ng-show=\"isLineChart\"><div class=\"form-group\"><input type=\"text\" ng-model=\"partition\" class=\"form-control\"></div><div class=\"form-group\"><button ng-click=\"redrawChart(partition)\" class=\"btn btn-default pull-right\">Search</button></div></div><div ng-if=\"isLineChart\"><canvas id=\"line\" class=\"chart chart-line\" data=\"data\" labels=\"labels\" legend=\"true\" series=\"series\" click=\"onClick\"></canvas></div><div ng-if=\"!isLineChart\"><canvas id=\"bar\" class=\"chart chart-bar\" data=\"data\" labels=\"labels\"></canvas></div><p ng-show=\"isLineChart\">Total: {{ total }}</p></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/live-ligne-group.html\",'<div role=\"tabpanel\" class=\"tab-pane pane-information active\" id=\"information\"><div class=\"tab-pane-content\"><ui-view></ui-view></div></div><pre>\\n    {{liveGroupController.group | json}}\\n</pre>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/live-ligne-home.html\",\"home\")}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/live-ligne-overview.html\",'<form><div class=\"input-group\"><input type=\"text\" class=\"form-control\"> <span class=\"input-group-btn\"><button type=\"submit\" class=\"btn btn-default\"><span aria-hidden=\"true\" class=\"glyphicon glyphicon-search\"></span></button></span></div></form><table class=\"table table-condensed\"></table>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/live-ligne-template.html\",'<div role=\"tabpanel\" ng-if=\"liveController.timingConfiguration!=null && liveController.timingConfiguration.ResultGroups.length>0\"><h3>{{uciEventCtrl.liveCtx.DisplayName}}</h3><ul class=\"nav nav-tabs\" ng-if=\"liveController.timingConfiguration.ResultGroups.length>1\"><li role=\"presentation\" ui-sref-active=\"active\" ng-repeat=\"group in liveController.timingConfiguration.ResultGroups\"><a ui-sref=\".group({groupId:group.GroupId})\"><small class=\"visible-xs\">{{group.Name}}</small> <span class=\"hidden-xs\">{{group.DisplayName}}-{{group.GroupId}}</span></a></li></ul><div class=\"tab-content\"><ui-view></ui-view></div></div><pre>\\n    {{liveController.timingConfiguration |json}}\\n</pre>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/my-result.html\",'<div class=\"panel panel-primary panel-collapse\" ng-repeat=\"result in results\"><div class=\"panel-heading\" role=\"tab\"><a ng-click=\"collapse=!collapse\" href=\"\">{{result.Config.DisplayName}} <span class=\"caret\"></span></a><div class=\"actions\"><button class=\"btn btn-action\" ui-sref=\"^.group({groupId:result.Config.GroupId})\"><i class=\"fa fa-plus\"></i> {{\\'MORE\\'|t}}</button></div></div><div class=\"panel-body\" collapse=\"collapse\"><div class=\"row\"><div class=\"col-md-4\"><div class=\"well\"><h3>n°{{result.Data.RegistrationView.Bib}}<div class=\"pull-right\"><img ng-src=\"http://chronorace.blob.core.windows.net/webresources/img/flags/{{result.Data.RegistrationView.Nationality.toLowerCase()}}.png\" ng-if=\"result.Data.RegistrationView.Nationality!=\\'\\'\"></div></h3><h2>{{result.Data.RegistrationView.FirstName}} {{result.Data.RegistrationView.LastName}}</h2>{{result.Data.RegistrationView.GroupName}}</div><button class=\"btn btn-default\" ng-repeat=\"media in result.Data.Media\" ng-click=\"SelectMedia(media)\">{{media.DisplayName|tc}}</button></div><div class=\"col-md-8\"><table class=\"table table-striped\"><thead><tr><th translate=\"\">POS</th><th translate=\"\">LOCATION</th><th translate=\"\">DISTANCE</th><th class=\"text-right\" translate=\"\">TOD</th><th class=\"text-right\" translate=\"\">TIME</th></tr></thead><tbody><tr ng-repeat=\"compResult in result.CompiledResults\"><td>{{compResult.Result.Pos}}/{{compResult.Result.Finishers}}</td><td>{{compResult.SplitConfig.DisplayName|tc}}</td><td>{{compResult.SplitConfig.Distance}}m</td><td class=\"text-right\">{{compResult.Result.FinishTime|mstotime}}</td><td class=\"text-right\"><b>{{compResult.Result.DisplayTime}}</b></td></tr></tbody></table></div></div></div></div>');\n}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/quickgroup.html\",'<ul class=\"nav nav-sub-tabs\" ng-if=\"grp.reportGroup.Reports.length>1\"><li role=\"presentation\" xui-sref-active=\"active\" ng-repeat=\"report in grp.reportGroup.Reports\" ng-class=\"{\\'active\\':grp.selectedReport!=null && grp.selectedReport.Id==report.Id}\"><a ng-click=\"grp.SelectResult(report)\">{{report.DisplayName|tc}}</a></li></ul><div class=\"tab-pane-content\"><ui-view></ui-view></div><div class=\"text-center\" ng-if=\"grp.reportGroup.Reports==null || grp.reportGroup.Reports.length==0\"><h1 t=\"\">NOTAVAILABLEYET</h1></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/quickiframe.html\",'<div ng-show=\"rep.curRepport!=null\"><iframe ng-src=\"{{rep.curRepport.Settings.URL}}\" ng-title=\"{{rep.curRepport..DisplayName}}\" style=\"width:100%;height:90vh;border:0\" frameborder=\"0\"></iframe></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/quickliveligne.html\",'<div ng-show=\"live.curRepport!=null\"><div class=\"row\" ng-show=\"live.showHeader\"><div class=\"col-xs-4\"><paging page=\"curPage\" page-size=\"live.rowsPerPage\" compact=\"\\'true\\'\" paging-action=\"live.SetPage(page)\" total=\"live.results.Count\" show-prev-next=\"true\"></paging></div><div class=\"col-xs-8\"><form class=\"pull-right\" ng-submit=\"live.SearchResult(search)\"><div class=\"input-group\"><input cr-focus=\"\" type=\"text\" placeholder=\"{{\\'NAMEORNR\\'|t}}\" ng-model=\"search\" class=\"form-control\"> <span class=\"input-group-btn\"><button type=\"submit\" class=\"btn btn-default\"><span aria-hidden=\"true\" class=\"glyphicon glyphicon-search\"></span></button></span></div></form></div></div><div class=\"row hidden-xs\"><br><div class=\"btn-group\" data-toggle=\"buttons\"><button ng-repeat=\"flag in live.timingGroupConfiguration.MetaData\" ng-class=\"{\\'btn-primary\\':live.HasFlag(flag),\\'btn-default\\':!live.HasFlag(flag)}\" ng-click=\"live.ToggleFlag(flag)\" class=\"btn\">{{flag.DisplayName|tc}}</button></div></div><div class=\"row\"><div class=\"col-md-12 mt10\"><cr-table columns=\"live.results.TableDefinition.Columns\" row-select=\"live.SelectRow(data)\" row-action=\"live.RowAction(action,data)\" options=\"live.options\" rows=\"live.results.Matches\"></cr-table></div></div><div class=\"row mt10\" ng-show=\"live.showHeader\"><div class=\"col-xs-9\"><paging page=\"curPage\" page-size=\"live.rowsPerPage\" paging-action=\"live.SetPage(page)\" total=\"live.results.Count\" show-prev-next=\"true\"></paging></div><div class=\"col-xs-3 text-right\"><b>{{live.results.Count}}</b> {{\\'ENTRIES\\'|t}}</div></div></div><div class=\"text-center\" ng-if=\"!live.curRepport\"><h1 t=\"\">NOTAVAILABLEYET</h1></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/quickreport.html\",'<div ng-show=\"rep.curRepport!=null\"><div class=\"row\" ng-show=\"rep.showHeader\"><div class=\"col-xs-4\"><paging page=\"curPage\" page-size=\"rep.rowsPerPage\" compact=\"\\'true\\'\" paging-action=\"rep.SetPage(page)\" total=\"rep.results.Count\" show-prev-next=\"true\"></paging></div><div class=\"col-xs-8\"><form class=\"pull-right\" ng-submit=\"rep.SearchResult(search)\"><div class=\"input-group\"><input cr-focus=\"\" type=\"text\" placeholder=\"{{\\'NAMEORNR\\'|t}}\" ng-model=\"search\" class=\"form-control\"> <span class=\"input-group-btn\"><button type=\"submit\" class=\"btn btn-default\"><span aria-hidden=\"true\" class=\"glyphicon glyphicon-search\"></span></button></span></div></form></div></div><div class=\"row\"><div class=\"col-md-12 mt10\"><cr-table columns=\"rep.results.TableDefinition.Columns\" row-select=\"rep.SelectRow(data)\" row-action=\"rep.RowAction(action,data)\" options=\"rep.options\" rows=\"rep.results.Matches\"></cr-table></div></div><div class=\"row mt10\" ng-show=\"rep.showHeader\"><div class=\"col-xs-9\"><paging page=\"curPage\" page-size=\"rep.rowsPerPage\" paging-action=\"rep.SetPage(page)\" total=\"rep.results.Count\" show-prev-next=\"true\"></paging></div><div class=\"col-xs-3 text-right\"><b>{{rep.results.Count}}</b> {{\\'ENTRIES\\'|t}}</div></div></div><div class=\"text-center\" ng-if=\"!rep.curRepport\"><h1 t=\"\">NOTAVAILABLEYET</h1></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/quickresults.html\",'<div ng-if=\"ctrl.eventView.Parameters.ResultHeaderImage\" class=\"text-center\"><center><img ng-src=\"{{ctrl.eventView.Parameters.ResultHeaderImage}}\" class=\"img-responsive\"></center><br></div><ul class=\"nav nav-tabs\" ng-if=\"ctrl.showHeader\"><li role=\"presentation\" ui-sref-active=\"active\" ng-repeat=\"grp in ctrl.reportList\"><a ui-sref=\".group({groupId:grp.Id})\"><small class=\"visible-xs\">{{grp.DisplayName|tc}}</small> <span class=\"hidden-xs\">{{grp.DisplayName|tc}}</span></a></li></ul><div class=\"tab-content\"><div role=\"tabpanel\" class=\"tab-pane pane-information active\" id=\"information\"><ui-view></ui-view></div></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/result-group-home.html\",'<div class=\"row\"><div class=\"col-sm-6 col-xs-12\"><div class=\"panel panel-default panel-collapse\"><div class=\"panel-heading clearfix\"><a>{{\\'REPORTS\\'|t}} <span class=\"caret\"></span></a><div class=\"actions\"><button class=\"btn btn-action\"><i class=\"fa fa-times\"></i></button> <button class=\"btn btn-action\"><i class=\"fa fa-download\"></i></button> <button class=\"btn btn-action\"><i class=\"fa fa-print\"></i></button></div></div><div class=\"panel-body\"><div class=\"row\"><div class=\"col-xs-12\"><form class=\"pull-right\" ng-submit=\"SearchResult(search)\"><div class=\"input-group\"><input cr-focus=\"\" type=\"text\" ng-model=\"search\" class=\"form-control\"> <span class=\"input-group-btn\"><button type=\"submit\" class=\"btn btn-default\"><span aria-hidden=\"true\" class=\"glyphicon glyphicon-search\"></span></button></span></div></form></div></div><div class=\"row\" style=\"margin-top: 10px\"><div class=\"col-xs-12\"><div class=\"list-group no-margin\"><a ng-repeat=\"report in curGroup.Reports\" class=\"list-group-item text-ellipsis clearfix\" ng-click=\"SelectResult(report)\"><small>{{report.DisplayName|tc}}</small><div class=\"pull-right\"><i ng-class=\"GetIcon(report)\"></i></div></a></div></div></div></div></div></div><div class=\"col-sm-6 col-xs-12\" ng-if=\"curGroup.Overview\"><div class=\"panel panel-default panel-collapse\"><div class=\"panel-heading clearfix\"><a>{{\\'QUICK-ACCESS\\'|t}} <span class=\"badge badge-warning no-float\" style=\"margin-left: 20px\">Race over</span> <span class=\"caret\"></span></a><div class=\"actions\"><button class=\"btn btn-action\"><i class=\"fa fa-expand\"></i></button></div></div><div class=\"panel-body\"><div class=\"row\"><div class=\"col-xs-12\"><div class=\"row\" style=\"margin-bottom: 20px\"><div class=\"col-xs-12\"><span><b>40.000</b>/<b>41.100</b> runners</span> <span class=\"pull-right\"><a href=\"#\" class=\"no-padding\">After cycling, lap 2</a></span></div></div><table class=\"table table-striped table-hover table-condensed\"><tbody ng-repeat=\"part in curGroup.Overview\"><tr><th colspan=\"3\"><a>{{part.DisplayName|tc}}</a></th></tr><tr ng-repeat=\"row in part.Overview\" ng-class=\"getOverviewClass(row)\"><td class=\"text-right\" ng-if=\"!row.PartitionKey || row.PartitionKey==\\'\\'\">{{row.Pos}}.</td><td class=\"text-right\" ng-if=\"row.PartitionKey && row.PartitionKey!=\\'\\'\"><a href=\"#\"><span class=\"badge badge-primary\">{{row.PartitionDisplayName}}</span></a></td><td><a><strong>{{row.LastName}} {{row.FirstName}}</strong></a></td><td class=\"text-right\">{{row.Result}}</td></tr></tbody></table></div></div></div></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/result-group-overview.html\",'<div class=\"panel panel-default\"><div class=\"panel-heading panel-heading-secondary\"><div class=\"clearfix\"><h4 class=\"pull-left\"><b>New Balence Ladies Run - 5K</b></h4><a class=\"btn btn-primary btn-action pull-right\" href=\"results-details.html\">More</a></div></div><div class=\"panel-heading\"><div class=\"row\"><div class=\"col-lg-4 col-md-6 col-sm-4 text-left\"><small>40.000/41.100 runners</small></div><div class=\"col-sm-4 hidden-md text-center\"><span class=\"badge badge-warning no-margin no-float\">Race over</span></div><div class=\"col-lg-4 col-md-6 col-sm-4 text-right\"><small><a href=\"#\" class=\"no-padding\">At finish</a></small></div></div></div><div class=\"row\"><div class=\"col-md-6\"></div><div class=\"col-md-6\"><table class=\"table table-striped table-hover\"><thead><tr><th colspan=\"4\"><a href=\"#\">Top</a></th></tr></thead><tbody><tr class=\"active\"><td class=\"text-right\">1.</td><td><a href=\"results-details.html\"><strong>H. Maes</strong></a></td><td class=\"text-right\">1:20:34</td><td class=\"text-right\"><a href=\"#\"><i class=\"fa fa-star fa-star-active\"></i></a></td></tr><tr><td class=\"text-right\">2.</td><td><a href=\"#\"><strong>C. Lemasson</strong></a></td><td class=\"text-right\">+15:20</td><td class=\"text-right\"><a class=\"\" href=\"#\"><i class=\"fa fa-star\"></i></a></td></tr><tr><td class=\"text-right\">3.</td><td><a href=\"#\"><strong>S. Belen</strong></a></td><td class=\"text-right\">+20:00</td><td class=\"text-right\"><a href=\"#\"><i class=\"fa fa-star\"></i></a></td></tr></tbody><thead><tr><th colspan=\"4\"><a href=\"#\">By category</a></th></tr></thead><tbody><tr><td class=\"text-right\"><a href=\"#\"><span class=\"badge badge-primary\">ve3</span></a></td><td><a href=\"#\"><strong>H. Maes</strong></a></td><td class=\"text-right\">1:20:34</td><td class=\"text-right\"><a href=\"#\"><i class=\"fa fa-star\"></i></a></td></tr><tr><td class=\"text-right\"><a href=\"#\"><span class=\"badge badge-primary\">ve3</span></a></td><td><a href=\"#\"><strong>C. Lemasson</strong></a></td><td class=\"text-right\">+15:20</td><td class=\"text-right\"><a href=\"#\"><i class=\"fa fa-star\"></i></a></td></tr><tr><td class=\"text-right\"><a href=\"#\"><span class=\"badge badge-primary\">ve3</span></a></td><td><a href=\"#\"><strong>S. Belen</strong></a></td><td class=\"text-right\">+20:00</td><td class=\"text-right\"><a href=\"#\"><i class=\"fa fa-star\"></i></a></td></tr></tbody></table><div class=\"list-group no-margin\"><a class=\"list-group-item text-ellipsis clearfix\" href=\"#\"><small>by group</small><div class=\"pull-right\"><i class=\"fa fa-file-pdf-o\"></i></div></a> <a class=\"list-group-item text-ellipsis clearfix\" href=\"#\"><small>by group</small><div class=\"pull-right\"><i class=\"fa fa-file-pdf-o\"></i></div></a></div></div></div><div class=\"panel-body no-padding\"></div></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/result-group-report.html\",'<div class=\"row\"><div class=\"col-sm-12\"><div class=\"panel panel-default panel-collapse\"><div class=\"panel-heading clearfix\"><a>{{curReport.DisplayName|tc}} <span class=\"caret\"></span></a><div class=\"actions\"><button class=\"btn btn-action\"><i class=\"fa fa-download\"></i></button> <button class=\"btn btn-action\"><i class=\"fa fa-print\"></i></button></div></div><div class=\"panel-body\"><div class=\"row\"><div class=\"col-xs-4\"><paging page=\"curPage\" page-size=\"25\" compact=\"\\'true\\'\" paging-action=\"SetPage(page)\" total=\"results.Count\" show-prev-next=\"true\"></paging></div><div class=\"col-xs-8\"><form class=\"pull-right\" ng-submit=\"SearchResult(search)\"><div class=\"input-group\"><input cr-focus=\"\" type=\"text\" ng-model=\"search\" class=\"form-control\"> <span class=\"input-group-btn\"><button type=\"submit\" class=\"btn btn-default\"><span aria-hidden=\"true\" class=\"glyphicon glyphicon-search\"></span></button></span></div></form></div></div><div class=\"row\"><div class=\"col-md-12 mt10\"><cr-table columns=\"results.TableDefinition.Columns\" row-select=\"grp.SelectRow(data)\" row-action=\"grp.RowAction(action)\" options=\"options\" rows=\"results.Matches\"></cr-table></div></div><div class=\"row mt10\"><div class=\"col-xs-9\"><paging page=\"curPage\" page-size=\"25\" paging-action=\"SetPage(page)\" total=\"results.Count\" show-prev-next=\"true\"></paging></div><div class=\"col-xs-3 text-right\"><b>{{results.Count}}</b> {{\\'ENTRIES\\'|t}}</div></div></div></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/result-group-split-detail.html\",'<div class=\"row\" style=\"padding-bottom: 10px\"><div class=\"col-md-3\"><label class=\"control-label\" for=\"lblLocation\">{{\\'LOCATION\\'|t}} <span ng-if=\"options.required\">*</span></label><select id=\"lblLocation\" ng-model=\"resultName\" ng-options=\"split.Name as split.DisplayName for split in groupData.SplitConfigurations\" class=\"form-control nya-selectpicker\"></select></div><div class=\"col-md-6\"><a href=\"#\" editable-text=\"user.name\">{{ user.name || \\'empty\\' }}</a> <label class=\"control-label\" for=\"Filters\">Filters</label><div class=\"btn-group\" id=\"Filters\" data-toggle=\"buttons\"><button class=\"btn\" ng-repeat=\"md in groupData.MetaData | filter:{Type:4}\" ng-class=\"{\\'btn-primary\\':IsFlagSelected(md.Flag) }\" ng-click=\"Toggle(md.Flag)\">{{md.DisplayName|tc}}</button></div></div></div><div class=\"row\"><div class=\"col-sm-12\"><div class=\"panel panel-default\"><div class=\"panel-heading clearfix\"><h4 class=\"pull-left\">Results</h4><button class=\"btn btn-link pull-right\"><i class=\"fa fa-expand\"></i></button> <button class=\"btn btn-link pull-right\"><i class=\"fa fa-download\"></i></button> <button class=\"btn btn-link pull-right\"><i class=\"fa fa-print\"></i></button></div><div class=\"panel-body bg-white\"><div class=\"row\"><div class=\"col-md-8\"><paging page=\"currentPage\" page-size=\"pageSize\" paging-action=\"SetResultPage(page)\" total=\"results.TotalRows\" show-prev-next=\"true\"></paging></div><div class=\"col-md-4\"><form><div class=\"input-group\"><input type=\"text\" class=\"form-control\"> <span class=\"input-group-btn\"><button type=\"submit\" class=\"btn btn-default\"><span aria-hidden=\"true\" class=\"glyphicon glyphicon-search\"></span></button></span></div></form></div></div><div class=\"row\"><div class=\"col-md-12\"><table class=\"table table-striped table-hover table-condensed table-responsive\"><thead><tr><th class=\"text-right\">{{\\'POS\\'|t}}</th><th>{{\\'BIB\\'|t}}</th><th class=\"hidden-xs\"></th><th>{{\\'NAME\\'|t}}</th><th class=\"text-center hidden-xs\">{{\\'NATIONALITY\\'|t}}</th><th class=\"hidden-xs hidden-sm\">{{\\'TEAM\\'|t}}</th><th class=\"text-right\">{{\\'TIME\\'|t}}</th><th colspan=\"2\"></th></tr></thead><tbody><tr ng-repeat=\"res in results.ResultView\"><td class=\"text-right\">{{FormatPosition( res.FilterRank,res.Result.Status)}}</td><td><i>n°{{res.RegistrationView.DisplayBib}}</i></td><td class=\"text-center hidden-xs\">{{res.RegistrationView.Gender.replace(\"M\",\"\")}}</td><td><b>{{res.RegistrationView.LastName}} {{res.RegistrationView.FirstName}}</b></td><td class=\"text-center hidden-xs\"><center><img ng-src=\"http://chronorace.blob.core.windows.net/webresources/img/flags/{{res.RegistrationView.Nationality.toLowerCase()}}.png\" ng-if=\"res.RegistrationView.Nationality!=\\'\\'\"></center></td><td class=\"hidden-xs hidden-sm\">{{res.RegistrationView.GroupName}}</td><td class=\"text-right\"><b>{{res.Result.DisplayTime}}</b></td><td class=\"text-right hidden-xs\"><i class=\"fa fa-star\"></i></td><td><button class=\"btn btn-edit pull-right\" type=\"button\" ng-click=\"SelectRow({data: row})\"><span class=\"glyphicon glyphicon-chevron-right\" aria-hidden=\"true\"></span></button></td></tr></tbody></table></div></div><div class=\"row\"><div class=\"col-md-12\"><br><b>{{results.Stats[\"Ok\"]||0}}</b> {{\\'FINISHERS\\'|t}} / <b>{{results.TotalRows}}</b> {{\\'STARTERS\\'|t}}</div></div></div></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/result-group-split.html\",'<a class=\"results-back\" ui-sref=\"^.home\"><span class=\"fa fa-chevron-left\"></span> {{\\'BACK\\'|translate}}</a><h2>&nbsp;&nbsp;{{groupData.DisplayName}}</h2><ui-view></ui-view>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/result-group.html\",\"<ui-view></ui-view>\")}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/result-home.html\",'<div class=\"panel panel-default\"><div class=\"panel panel-default mt10\" ng-if=\"globalResult.Entries.length>0\"><div class=\"panel-heading panel-colapsible clearfix\"><a>{{\\'SEARCHRESULT\\'|t}}</a><div class=\"actions\"><button ng-click=\"closeGlobalResult()\" class=\"btn btn-action\"><i class=\"fa fa-times\"></i></button></div></div><div class=\"panel-body\"><cr-master-slave-table table=\"globalResult\" row-action=\"globalSearchAction(action,data)\"></cr-master-slave-table></div></div></div><cr-menusquare><cr-menusquare-item ng-repeat=\"reportGroup in reportList\" sq-title=\"{{reportGroup.DisplayName}}\" sq-route=\"^.group.home\" sq-route-params=\\'{\"groupId\":{{reportGroup.Id}}}\\'></cr-menusquare-item></cr-menusquare><div class=\"clearfix\"></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/result-template.html\",'<div ui-view=\"\"></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/tracking-index.html\",'<div class=\"container-fluid\" style=\"width:100%;position:fixed;top:00px;padding:0;bottom:0px\"><div id=\"map\" style=\"min-height:150px;height:100%;\"></div><div style=\"background-color: rgba(200,200,200,0.4);position: absolute;left:20px;top:20px;bottom: 80px;width: 300px;overflow-y: auto\"><form class=\"pull-right form-results-main\" ng-submit=\"globalSearch(srch)\"><div class=\"input-group\"><input type=\"text\" id=\"places\" cr-focus=\"\" class=\"form-control\" ng-model=\"srch\"> <span class=\"input-group-btn\"><button type=\"submit\" class=\"btn btn-default\"><span aria-hidden=\"true\" class=\"glyphicon glyphicon-search\"></span></button></span></div></form></div><div style=\"background-color: rgba(200,200,200,0.4);position: absolute;left:20px;top:60px;bottom: 80px;width: 300px;overflow-y: auto\"><table class=\"table table-condensed table-striped table-hover\"><tr ng-repeat=\"(k,v) in track.gpsConfiguration.Trackers\"><td><input ng-model=\"track.enabledTrackers[k]\" data-ng-change=\"track.DrawTrackers()\" type=\"checkbox\"> {{v.DisplayName!=v.Bib?v.Bib+\\' - \\'+v.DisplayName:v.DisplayName}}</td><td class=\"text-right\" align=\"right\"><a ng-click=\"track.CenterOnMarker(k)\"><img width=\"50%\" ng-src=\"{{track.GetIcon(v)}}\"></a></td></tr></table></div><div class=\"btn-group btn-group-justified\" style=\"position: absolute;bottom: 40px;width: 300px;left:20px\"><div class=\"btn-group\"><button type=\"button\" ng-click=\"track.SetMapType(\\'satellite\\')\" class=\"btn btn-primary\">Satellite</button></div><div class=\"btn-group\"><button type=\"button\" ng-click=\"track.SetMapType(\\'terrain\\')\" class=\"btn btn-primary\">Terrain</button></div><div class=\"btn-group\"><button type=\"button\" ng-click=\"track.SetMapType(\\'hybrid\\')\" class=\"btn btn-primary\">Hybrid</button></div><div class=\"btn-group\"><button type=\"button\" ng-click=\"track.SetMapType(\\'roadmap\\')\" class=\"btn btn-primary\">Road</button></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/video.html\",'<center><button ng-repeat=\"ref in video.videoReferences\" ui-sref-active=\"btn-primary\" ui-sref=\"quickresults.group.report.video.content({idx:$index})\" class=\"btn\">{{ref.Title|tc}}</button><br><br><div style=\"max-width:720px;width: 100%\"><ui-view></ui-view></div><button class=\"btn btn-default\" ui-sref=\"^.\" t=\"\">BACK</button></center>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/videocontent.html\",'<div id=\"video\"></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/xco.html\",'<div role=\"tabpanel\" ng-if=\"ctrl.raceList!=null && ctrl.raceList.length>0\"><ul class=\"nav nav-tabs\"><li role=\"presentation\" ui-sref-active=\"active\" ng-repeat=\"race in ctrl.raceList\"><a ui-sref=\".race({raceName:race})\"><small class=\"visible-xs\">{{race}}</small> <span class=\"hidden-xs\">{{race}}</span></a></li></ul><div class=\"tab-content\"><div role=\"tabpanel\" class=\"tab-pane pane-information active\" id=\"information\"><div class=\"tab-pane-content\"><ui-view></ui-view></div></div></div></div><div ng-if=\"!ctrl.raceList || ctrl.raceList.length==0\"><h1>LIVE TIMING AVAILABLE SOON</h1></div>')}])}(),function(module){try{module=angular.module(\"cr.event\")}catch(err){module=angular.module(\"cr.event\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/event/views/xcorace.html\",'<div class=\"row\" ng-if=\"race.overview!=null && race.overview.OverviewData!=null && race.overview.OverviewData.length>0\"><div class=\"col-sm-6\"><h3>Race Overview</h3><table class=\"table table-hover table-condensed table-striped\"><tbody><tr ng-repeat=\"ov in race.overview.OverviewData\"><td class=\"text-right\">{{ov.StrPos}}</td><td class=\"text-center\"><center><img ng-src=\"{{\\'http://chronorace.blob.core.windows.net/webresources/img/flags/\\'+race.registration[ov.Dossard].Pays.toLowerCase()}}.png\"></center></td><td><div><b>{{race.registration[ov.Dossard].LastName}} {{race.registration[ov.Dossard].FirstName}}</b> <span class=\"pull-right\">{{race.GetRacePosition(ov)}}</span></div><div><small>n°{{ov.Dossard%1000}}</small> <span class=\"pull-right\">{{race.GetLapTimes(ov)}}</span></div></td><td class=\"text-right\"><b>{{ov.CurrentSituation.TotalTime|mstotimehmmss}}</b><br><span ng-show=\"ov.CurrentSituation.GapWithFirst>0\">+{{ov.CurrentSituation.GapWithFirst|mstotimehmmss}}</span></td></tr></tbody></table></div><div class=\"col-sm-3\"><h3>Fastest Lap</h3><table class=\"table table-hover table-condensed table-striped\"><tbody><tr ng-repeat=\"fastest in race.overview.FastestLaps\"><td align=\"right\"><b><span ng-show=\"lap.Lap>0\">{{$index+1}}.</span></b></td><td><div><b>{{race.registration[fastest.Dossard].LastName}} {{race.registration[fastest.Dossard].FirstName}}</b></div><div><small>n°{{fastest.Dossard%1000}} <span ng-show=\"fastest.AvgSpeed>0\">- {{fastest.AvgSpeed|number:2}}km/h</span> (Lap {{fastest.Lap}})</small></div></td><td class=\"text-right\"><div><b>{{fastest.LapTime|mstotimehmmssf}}</b></div><div ng-show=\"fastest.LapTime-race.overview.FastestLaps[0].LapTime>0\">+{{(fastest.LapTime-race.overview.FastestLaps[0].LapTime)|mstotimehmmssf}}</div></td></tr></tbody></table></div><div class=\"col-sm-3\"><h3>Lap Times</h3><table class=\"table table-hover table-condensed table-striped\"><tbody><tr ng-repeat=\"lap in race.overview.LapTimes\"><td align=\"center\"><b><span ng-show=\"lap.Lap>0\">{{lap.Lap}}</span> <span ng-show=\"lap.Lap==0\">-</span></b></td><td><div><b>{{race.registration[lap.Dossard].LastName}} {{race.registration[lap.Dossard].FirstName}}</b></div><div><small>n°{{lap.Dossard%1000}} <span ng-show=\"lap.AvgSpeed>0\">- {{lap.AvgSpeed|number:2}}km/h</span></small></div></td><td class=\"text-right\"><div><b>{{lap.Time|mstotimehmmss}}</b></div><div>{{lap.CumTime|mstotimehmmss}}</div></td></tr></tbody></table></div></div><div class=\"row\" ng-if=\"!race.overview || !race.overview.OverviewData || race.overview.OverviewData.length==0\"><div class=\"col-sm-12\"><h1>LIVE TIMING AVAILABLE SOON</h1></div></div>')}])}();\n//# sourceMappingURL=event.js.map","(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/back-result-group.html\",\n    \"<h2><a class=\\\"results-back\\\" ui-sref=\\\"^.home\\\"><span class=\\\"fa fa-chevron-left\\\"></span></a> {{groupData.DisplayName}}</h2><div class=\\\"row\\\" style=\\\"padding-bottom: 10px\\\"><div class=\\\"col-md-3\\\"><label class=\\\"control-label\\\" for=\\\"lblLocation\\\">{{'LOCATION'|t}} <span ng-if=\\\"options.required\\\">*</span></label><select id=\\\"lblLocation\\\" ng-model=\\\"resultName\\\" ng-options=\\\"split.DisplayName for split in groupData.SplitConfigurations\\\" class=\\\"form-control nya-selectpicker\\\"><option value=\\\"\\\" translate=\\\"\\\">OVERVIEW</option></select></div><div class=\\\"col-md-6\\\"><label class=\\\"control-label\\\" for=\\\"Filters\\\">Filters</label><div class=\\\"btn-group\\\" id=\\\"Filters\\\" data-toggle=\\\"buttons\\\"><button class=\\\"btn\\\" ng-repeat=\\\"md in groupData.MetaData | filter:{Type:4}\\\" ng-class=\\\"{'btn-primary':IsFlagSelected(md.Flag) }\\\" ng-click=\\\"Toggle(md.Flag)\\\">{{md.DisplayName|tc}}</button></div></div></div><pre>\\n\" +\n    \"    {{Overview|json}}\\n\" +\n    \"</pre><ui-view></ui-view><div ng-if=\\\"results.ResultView.length>0\\\"><div class=\\\"row\\\"><div class=\\\"col-md-9\\\"><paging page=\\\"currentPage\\\" page-size=\\\"pageSize\\\" paging-action=\\\"SetResultPage(page)\\\" total=\\\"results.TotalRows\\\" show-prev-next=\\\"true\\\"></paging></div><div class=\\\"col-md-3 text-right\\\"><b>{{results.Stats[\\\"Ok\\\"]||0}}</b> {{'FINISHERS'|t}} / <b>{{results.TotalRows}}</b> {{'STARTERS'|t}}</div></div><div class=\\\"row\\\"><div class=\\\"col-md-12\\\"><table class=\\\"table table-striped\\\"><thead><tr><th class=\\\"text-right\\\">{{'POS'|t}}</th><th>{{'BIB'|t}}</th><th></th><th>{{'NAME'|t}}</th><th class=\\\"text-center\\\">{{'NATIONALITY'|t}}</th><th>{{'TEAM'|t}}</th><th class=\\\"text-right\\\">{{'TIME'|t}}</th></tr></thead><tbody><tr ng-repeat=\\\"res in results.ResultView\\\"><td class=\\\"text-right\\\">{{FormatPosition( res.FilterRank,res.Result.Status)}}</td><td><i>n°{{res.RegistrationView.DisplayBib}}</i></td><td class=\\\"text-center\\\">{{res.RegistrationView.Gender.replace(\\\"M\\\",\\\"\\\")}}</td><td><b>{{res.RegistrationView.LastName}} {{res.RegistrationView.FirstName}}</b></td><td class=\\\"text-center\\\"><center><img ng-src=\\\"http://chronorace.blob.core.windows.net/webresources/img/flags/{{res.RegistrationView.Nationality.toLowerCase()}}.png\\\" ng-if=\\\"res.RegistrationView.Nationality!=''\\\"></center></td><td>{{res.RegistrationView.GroupName}}</td><td class=\\\"text-right\\\"><b>{{res.Result.DisplayTime}}</b></td></tr></tbody></table></div></div></div><button class=\\\"btn btn-primary\\\" ui-sref=\\\"^.home\\\" translate=\\\"\\\">BACK</button><br>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/event-home.html\",\n    \"<cr-menusquare><cr-menusquare-item sq-icon=\\\"home\\\" sq-title=\\\"HOME\\\" sq-route=\\\"index\\\"></cr-menusquare-item><cr-menusquare-item sq-icon=\\\"pencil-square-o\\\" sq-title=\\\"PARTICIPANTS\\\" sq-route=\\\"^.participants\\\"></cr-menusquare-item><cr-menusquare-item sq-icon=\\\"list-ol\\\" sq-title=\\\"RESULTS\\\" sq-route=\\\"^.reports.home\\\"></cr-menusquare-item></cr-menusquare>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/event-participant.html\",\n    \"<div role=\\\"tabpanel\\\"><ul class=\\\"nav nav-tabs\\\" role=\\\"tablist\\\"><li role=\\\"presentation\\\"><a ui-sref=\\\"^.home\\\" aria-controls=\\\"tabs-vertical\\\" role=\\\"tab\\\" data-toggle=\\\"tab\\\"><i class=\\\"fa fa-group\\\"></i> <span translate=\\\"\\\">EVENTHOME</span></a></li><li role=\\\"presentation\\\" class=\\\"active\\\"><a ui-stref=\\\"^.participants\\\" aria-controls=\\\"information\\\" role=\\\"tab\\\" data-toggle=\\\"tab\\\"><i class=\\\"fa fa-info-circle\\\"></i> <span translate=\\\"\\\">PARTICIPANTS</span></a></li><li role=\\\"presentation\\\"><a ui-sref=\\\"event.reports.home\\\" aria-controls=\\\"account\\\" role=\\\"tab\\\" data-toggle=\\\"tab\\\"><i class=\\\"fa fa-lock\\\"></i> <span translate=\\\"\\\">RESULTS</span></a></li></ul><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><cr-table show-select=\\\"true\\\" on-row-select=\\\"Select(data)\\\" on-row-action=\\\"RowAction(action,data)\\\" filter=\\\"Search(value)\\\" options=\\\"options\\\" rows=\\\"searchResult.Rows\\\" columns=\\\"searchResult.TableDefinition.Columns\\\"></cr-table></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/event-template.html\",\n    \"<div ng-if=\\\"eventView.Parameters.ResultHeaderImage\\\" class=\\\"text-center\\\"><center><img ng-src=\\\"{{eventView.Parameters.ResultHeaderImage}}\\\" class=\\\"img-responsive\\\"></center><br></div><section class=\\\"page-content\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-list-ol\\\"></i></div><h1 class=\\\"page-title\\\"><div ui-view=\\\"title\\\"><span>{{'EVENT' | translate}}</span></div><small><div ui-view=\\\"subtitle\\\">{{ eventView.Location }}, {{ eventView.Date }}, {{ eventView.Country }} - {{ eventView.Title }}</div></small></h1></div><div class=\\\"dashboard-content\\\"><div ui-view=\\\"\\\"></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/eventselectiondialog.html\",\n    \"<div class=\\\"modal-header select-contact\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss()\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"text-center\\\" translate=\\\"\\\">EVENTSELECTION</h4></div><div class=\\\"modal-body\\\"><form><div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><div class=\\\"input-group\\\"><input cr-focus=\\\"\\\" type=\\\"text\\\" class=\\\"form-control ng-pristine ng-valid\\\" ng-model=\\\"search\\\" ng-focus=\\\"\\\"> <span class=\\\"input-group-btn\\\"><button class=\\\"btn btn-default\\\" type=\\\"submit\\\" ng-click=\\\"eventSelectionCtrl.Search(search)\\\"><span class=\\\"glyphicon glyphicon-search\\\" aria-hidden=\\\"true\\\"></span></button></span></div></div></div></form><div class=\\\"row\\\" ng-show=\\\"eventSelectionCtrl.selection.length>0\\\"><div class=\\\"col-md-12\\\"><br><table class=\\\"table table-hover table-striped table-condensed\\\"><thead><tr><th translate=\\\"\\\">DATE</th><th translate=\\\"\\\">LOCATION</th><th translate=\\\"\\\">TITLE</th></tr></thead><tbody><tr ng-repeat=\\\"event in eventSelectionCtrl.selection\\\" ng-click=\\\"eventSelectionCtrl.Select(event)\\\"><td class=\\\"text-right\\\">{{event.Date}}</td><td>{{event.Location}} ({{event.Country}})</td><td><b>{{event.Title}}</b></td></tr></tbody></table></div></div></div><div class=\\\"modal-footer\\\"><div class=\\\"text-center\\\"><button class=\\\"btn btn-default\\\" type=\\\"button\\\" ng-click=\\\"$dismiss()\\\" translate=\\\"\\\">CANCEL</button></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/eventview.html\",\n    \"<div><div ng-if=\\\"eventView!=null\\\"><div>{{eventView.Date}}<br>{{eventView.Location}} ({{eventView.Country}})<br><a ng-click=\\\"selectEventCtrl.SelectEvent()\\\"><b>{{eventView.Title}}</b></a></div><div class=\\\"text-right mt10\\\"><button type=\\\"button\\\" ng-click=\\\"selectEventCtrl.ClearEvent()\\\" class=\\\"btn btn-danger\\\"><i class=\\\"fa fa-close\\\"></i></button> <button type=\\\"button\\\" ng-click=\\\"selectEventCtrl.SelectEvent()\\\" class=\\\"btn btn-default\\\"><i class=\\\"fa fa-mouse-pointer\\\"></i></button></div></div><div ng-if=\\\"!eventView\\\"><button class=\\\"btn btn-default\\\" type=\\\"button\\\" ng-click=\\\"selectEventCtrl.SelectEvent()\\\" translate=\\\"\\\">NOEVENT</button></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/formevent.html\",\n    \"<div ng-controller=\\\"eventFormController\\\" class=\\\"form-group nomargin\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"(options.disabled || formOptions.disabled) && !value\\\"><cr-select-event event-view=\\\"value\\\" select-event=\\\"SetEvent(event)\\\"></cr-select-event><span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\\\"(options.disabled || formOptions.disabled) && !value\\\"><p class=\\\"form-control-static\\\">{{ value.DisplayName }}</p></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/graph-modal.html\",\n    \"<div class=\\\"modal-body\\\"><div ng-show=\\\"isLineChart\\\"><div class=\\\"form-group\\\"><input type=\\\"text\\\" ng-model=\\\"partition\\\" class=\\\"form-control\\\"></div><div class=\\\"form-group\\\"><button ng-click=\\\"redrawChart(partition)\\\" class=\\\"btn btn-default pull-right\\\">Search</button></div></div><div ng-if=\\\"isLineChart\\\"><canvas id=\\\"line\\\" class=\\\"chart chart-line\\\" data=\\\"data\\\" labels=\\\"labels\\\" legend=\\\"true\\\" series=\\\"series\\\" click=\\\"onClick\\\"></canvas></div><div ng-if=\\\"!isLineChart\\\"><canvas id=\\\"bar\\\" class=\\\"chart chart-bar\\\" data=\\\"data\\\" labels=\\\"labels\\\"></canvas></div><p ng-show=\\\"isLineChart\\\">Total: {{ total }}</p></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/live-ligne-group.html\",\n    \"<div role=\\\"tabpanel\\\" class=\\\"tab-pane pane-information active\\\" id=\\\"information\\\"><div class=\\\"tab-pane-content\\\"><ui-view></ui-view></div></div><pre>\\n\" +\n    \"    {{liveGroupController.group | json}}\\n\" +\n    \"</pre>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/live-ligne-home.html\",\n    \"home\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/live-ligne-overview.html\",\n    \"<form><div class=\\\"input-group\\\"><input type=\\\"text\\\" class=\\\"form-control\\\"> <span class=\\\"input-group-btn\\\"><button type=\\\"submit\\\" class=\\\"btn btn-default\\\"><span aria-hidden=\\\"true\\\" class=\\\"glyphicon glyphicon-search\\\"></span></button></span></div></form><table class=\\\"table table-condensed\\\"></table>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/live-ligne-template.html\",\n    \"<div role=\\\"tabpanel\\\" ng-if=\\\"liveController.timingConfiguration!=null && liveController.timingConfiguration.ResultGroups.length>0\\\"><h3>{{uciEventCtrl.liveCtx.DisplayName}}</h3><ul class=\\\"nav nav-tabs\\\" ng-if=\\\"liveController.timingConfiguration.ResultGroups.length>1\\\"><li role=\\\"presentation\\\" ui-sref-active=\\\"active\\\" ng-repeat=\\\"group in liveController.timingConfiguration.ResultGroups\\\"><a ui-sref=\\\".group({groupId:group.GroupId})\\\"><small class=\\\"visible-xs\\\">{{group.Name}}</small> <span class=\\\"hidden-xs\\\">{{group.DisplayName}}-{{group.GroupId}}</span></a></li></ul><div class=\\\"tab-content\\\"><ui-view></ui-view></div></div><pre>\\n\" +\n    \"    {{liveController.timingConfiguration |json}}\\n\" +\n    \"</pre>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/my-result.html\",\n    \"<div class=\\\"panel panel-primary panel-collapse\\\" ng-repeat=\\\"result in results\\\"><div class=\\\"panel-heading\\\" role=\\\"tab\\\"><a ng-click=\\\"collapse=!collapse\\\" href=\\\"\\\">{{result.Config.DisplayName}} <span class=\\\"caret\\\"></span></a><div class=\\\"actions\\\"><button class=\\\"btn btn-action\\\" ui-sref=\\\"^.group({groupId:result.Config.GroupId})\\\"><i class=\\\"fa fa-plus\\\"></i> {{'MORE'|t}}</button></div></div><div class=\\\"panel-body\\\" collapse=\\\"collapse\\\"><div class=\\\"row\\\"><div class=\\\"col-md-4\\\"><div class=\\\"well\\\"><h3>n°{{result.Data.RegistrationView.Bib}}<div class=\\\"pull-right\\\"><img ng-src=\\\"http://chronorace.blob.core.windows.net/webresources/img/flags/{{result.Data.RegistrationView.Nationality.toLowerCase()}}.png\\\" ng-if=\\\"result.Data.RegistrationView.Nationality!=''\\\"></div></h3><h2>{{result.Data.RegistrationView.FirstName}} {{result.Data.RegistrationView.LastName}}</h2>{{result.Data.RegistrationView.GroupName}}</div><button class=\\\"btn btn-default\\\" ng-repeat=\\\"media in result.Data.Media\\\" ng-click=\\\"SelectMedia(media)\\\">{{media.DisplayName|tc}}</button></div><div class=\\\"col-md-8\\\"><table class=\\\"table table-striped\\\"><thead><tr><th translate=\\\"\\\">POS</th><th translate=\\\"\\\">LOCATION</th><th translate=\\\"\\\">DISTANCE</th><th class=\\\"text-right\\\" translate=\\\"\\\">TOD</th><th class=\\\"text-right\\\" translate=\\\"\\\">TIME</th></tr></thead><tbody><tr ng-repeat=\\\"compResult in result.CompiledResults\\\"><td>{{compResult.Result.Pos}}/{{compResult.Result.Finishers}}</td><td>{{compResult.SplitConfig.DisplayName|tc}}</td><td>{{compResult.SplitConfig.Distance}}m</td><td class=\\\"text-right\\\">{{compResult.Result.FinishTime|mstotime}}</td><td class=\\\"text-right\\\"><b>{{compResult.Result.DisplayTime}}</b></td></tr></tbody></table></div></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/quickgroup.html\",\n    \"<ul class=\\\"nav nav-sub-tabs\\\" ng-if=\\\"grp.reportGroup.Reports.length>1\\\"><li role=\\\"presentation\\\" xui-sref-active=\\\"active\\\" ng-repeat=\\\"report in grp.reportGroup.Reports\\\" ng-class=\\\"{'active':grp.selectedReport!=null && grp.selectedReport.Id==report.Id}\\\"><a ng-click=\\\"grp.SelectResult(report)\\\">{{report.DisplayName|tc}}</a></li></ul><div class=\\\"tab-pane-content\\\"><ui-view></ui-view></div><div class=\\\"text-center\\\" ng-if=\\\"grp.reportGroup.Reports==null || grp.reportGroup.Reports.length==0\\\"><h1 t=\\\"\\\">NOTAVAILABLEYET</h1></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/quickiframe.html\",\n    \"<div ng-show=\\\"rep.curRepport!=null\\\"><iframe ng-src=\\\"{{rep.curRepport.Settings.URL}}\\\" ng-title=\\\"{{rep.curRepport..DisplayName}}\\\" style=\\\"width:100%;height:90vh;border:0\\\" frameborder=\\\"0\\\"></iframe></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/quickliveligne.html\",\n    \"<div ng-show=\\\"live.curRepport!=null\\\"><div class=\\\"row\\\" ng-show=\\\"live.showHeader\\\"><div class=\\\"col-xs-4\\\"><paging page=\\\"curPage\\\" page-size=\\\"live.rowsPerPage\\\" compact=\\\"'true'\\\" paging-action=\\\"live.SetPage(page)\\\" total=\\\"live.results.Count\\\" show-prev-next=\\\"true\\\"></paging></div><div class=\\\"col-xs-8\\\"><form class=\\\"pull-right\\\" ng-submit=\\\"live.SearchResult(search)\\\"><div class=\\\"input-group\\\"><input cr-focus=\\\"\\\" type=\\\"text\\\" placeholder=\\\"{{'NAMEORNR'|t}}\\\" ng-model=\\\"search\\\" class=\\\"form-control\\\"> <span class=\\\"input-group-btn\\\"><button type=\\\"submit\\\" class=\\\"btn btn-default\\\"><span aria-hidden=\\\"true\\\" class=\\\"glyphicon glyphicon-search\\\"></span></button></span></div></form></div></div><div class=\\\"row hidden-xs\\\"><br><div class=\\\"btn-group\\\" data-toggle=\\\"buttons\\\"><button ng-repeat=\\\"flag in live.timingGroupConfiguration.MetaData\\\" ng-class=\\\"{'btn-primary':live.HasFlag(flag),'btn-default':!live.HasFlag(flag)}\\\" ng-click=\\\"live.ToggleFlag(flag)\\\" class=\\\"btn\\\">{{flag.DisplayName|tc}}</button></div></div><div class=\\\"row\\\"><div class=\\\"col-md-12 mt10\\\"><cr-table columns=\\\"live.results.TableDefinition.Columns\\\" row-select=\\\"live.SelectRow(data)\\\" row-action=\\\"live.RowAction(action,data)\\\" options=\\\"live.options\\\" rows=\\\"live.results.Matches\\\"></cr-table></div></div><div class=\\\"row mt10\\\" ng-show=\\\"live.showHeader\\\"><div class=\\\"col-xs-9\\\"><paging page=\\\"curPage\\\" page-size=\\\"live.rowsPerPage\\\" paging-action=\\\"live.SetPage(page)\\\" total=\\\"live.results.Count\\\" show-prev-next=\\\"true\\\"></paging></div><div class=\\\"col-xs-3 text-right\\\"><b>{{live.results.Count}}</b> {{'ENTRIES'|t}}</div></div></div><div class=\\\"text-center\\\" ng-if=\\\"!live.curRepport\\\"><h1 t=\\\"\\\">NOTAVAILABLEYET</h1></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/quickreport.html\",\n    \"<div ng-show=\\\"rep.curRepport!=null\\\"><div class=\\\"row\\\" ng-show=\\\"rep.showHeader\\\"><div class=\\\"col-xs-4\\\"><paging page=\\\"curPage\\\" page-size=\\\"rep.rowsPerPage\\\" compact=\\\"'true'\\\" paging-action=\\\"rep.SetPage(page)\\\" total=\\\"rep.results.Count\\\" show-prev-next=\\\"true\\\"></paging></div><div class=\\\"col-xs-8\\\"><form class=\\\"pull-right\\\" ng-submit=\\\"rep.SearchResult(search)\\\"><div class=\\\"input-group\\\"><input cr-focus=\\\"\\\" type=\\\"text\\\" placeholder=\\\"{{'NAMEORNR'|t}}\\\" ng-model=\\\"search\\\" class=\\\"form-control\\\"> <span class=\\\"input-group-btn\\\"><button type=\\\"submit\\\" class=\\\"btn btn-default\\\"><span aria-hidden=\\\"true\\\" class=\\\"glyphicon glyphicon-search\\\"></span></button></span></div></form></div></div><div class=\\\"row\\\"><div class=\\\"col-md-12 mt10\\\"><cr-table columns=\\\"rep.results.TableDefinition.Columns\\\" row-select=\\\"rep.SelectRow(data)\\\" row-action=\\\"rep.RowAction(action,data)\\\" options=\\\"rep.options\\\" rows=\\\"rep.results.Matches\\\"></cr-table></div></div><div class=\\\"row mt10\\\" ng-show=\\\"rep.showHeader\\\"><div class=\\\"col-xs-9\\\"><paging page=\\\"curPage\\\" page-size=\\\"rep.rowsPerPage\\\" paging-action=\\\"rep.SetPage(page)\\\" total=\\\"rep.results.Count\\\" show-prev-next=\\\"true\\\"></paging></div><div class=\\\"col-xs-3 text-right\\\"><b>{{rep.results.Count}}</b> {{'ENTRIES'|t}}</div></div></div><div class=\\\"text-center\\\" ng-if=\\\"!rep.curRepport\\\"><h1 t=\\\"\\\">NOTAVAILABLEYET</h1></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/quickresults.html\",\n    \"<div ng-if=\\\"ctrl.eventView.Parameters.ResultHeaderImage\\\" class=\\\"text-center\\\"><center><img ng-src=\\\"{{ctrl.eventView.Parameters.ResultHeaderImage}}\\\" class=\\\"img-responsive\\\"></center><br></div><ul class=\\\"nav nav-tabs\\\" ng-if=\\\"ctrl.showHeader\\\"><li role=\\\"presentation\\\" ui-sref-active=\\\"active\\\" ng-repeat=\\\"grp in ctrl.reportList\\\"><a ui-sref=\\\".group({groupId:grp.Id})\\\"><small class=\\\"visible-xs\\\">{{grp.DisplayName|tc}}</small> <span class=\\\"hidden-xs\\\">{{grp.DisplayName|tc}}</span></a></li></ul><div class=\\\"tab-content\\\"><div role=\\\"tabpanel\\\" class=\\\"tab-pane pane-information active\\\" id=\\\"information\\\"><ui-view></ui-view></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/result-group-home.html\",\n    \"<div class=\\\"row\\\"><div class=\\\"col-sm-6 col-xs-12\\\"><div class=\\\"panel panel-default panel-collapse\\\"><div class=\\\"panel-heading clearfix\\\"><a>{{'REPORTS'|t}} <span class=\\\"caret\\\"></span></a><div class=\\\"actions\\\"><button class=\\\"btn btn-action\\\"><i class=\\\"fa fa-times\\\"></i></button> <button class=\\\"btn btn-action\\\"><i class=\\\"fa fa-download\\\"></i></button> <button class=\\\"btn btn-action\\\"><i class=\\\"fa fa-print\\\"></i></button></div></div><div class=\\\"panel-body\\\"><div class=\\\"row\\\"><div class=\\\"col-xs-12\\\"><form class=\\\"pull-right\\\" ng-submit=\\\"SearchResult(search)\\\"><div class=\\\"input-group\\\"><input cr-focus=\\\"\\\" type=\\\"text\\\" ng-model=\\\"search\\\" class=\\\"form-control\\\"> <span class=\\\"input-group-btn\\\"><button type=\\\"submit\\\" class=\\\"btn btn-default\\\"><span aria-hidden=\\\"true\\\" class=\\\"glyphicon glyphicon-search\\\"></span></button></span></div></form></div></div><div class=\\\"row\\\" style=\\\"margin-top: 10px\\\"><div class=\\\"col-xs-12\\\"><div class=\\\"list-group no-margin\\\"><a ng-repeat=\\\"report in curGroup.Reports\\\" class=\\\"list-group-item text-ellipsis clearfix\\\" ng-click=\\\"SelectResult(report)\\\"><small>{{report.DisplayName|tc}}</small><div class=\\\"pull-right\\\"><i ng-class=\\\"GetIcon(report)\\\"></i></div></a></div></div></div></div></div></div><div class=\\\"col-sm-6 col-xs-12\\\" ng-if=\\\"curGroup.Overview\\\"><div class=\\\"panel panel-default panel-collapse\\\"><div class=\\\"panel-heading clearfix\\\"><a>{{'QUICK-ACCESS'|t}} <span class=\\\"badge badge-warning no-float\\\" style=\\\"margin-left: 20px\\\">Race over</span> <span class=\\\"caret\\\"></span></a><div class=\\\"actions\\\"><button class=\\\"btn btn-action\\\"><i class=\\\"fa fa-expand\\\"></i></button></div></div><div class=\\\"panel-body\\\"><div class=\\\"row\\\"><div class=\\\"col-xs-12\\\"><div class=\\\"row\\\" style=\\\"margin-bottom: 20px\\\"><div class=\\\"col-xs-12\\\"><span><b>40.000</b>/<b>41.100</b> runners</span> <span class=\\\"pull-right\\\"><a href=\\\"#\\\" class=\\\"no-padding\\\">After cycling, lap 2</a></span></div></div><table class=\\\"table table-striped table-hover table-condensed\\\"><tbody ng-repeat=\\\"part in curGroup.Overview\\\"><tr><th colspan=\\\"3\\\"><a>{{part.DisplayName|tc}}</a></th></tr><tr ng-repeat=\\\"row in part.Overview\\\" ng-class=\\\"getOverviewClass(row)\\\"><td class=\\\"text-right\\\" ng-if=\\\"!row.PartitionKey || row.PartitionKey==''\\\">{{row.Pos}}.</td><td class=\\\"text-right\\\" ng-if=\\\"row.PartitionKey && row.PartitionKey!=''\\\"><a href=\\\"#\\\"><span class=\\\"badge badge-primary\\\">{{row.PartitionDisplayName}}</span></a></td><td><a><strong>{{row.LastName}} {{row.FirstName}}</strong></a></td><td class=\\\"text-right\\\">{{row.Result}}</td></tr></tbody></table></div></div></div></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/result-group-overview.html\",\n    \"<div class=\\\"panel panel-default\\\"><div class=\\\"panel-heading panel-heading-secondary\\\"><div class=\\\"clearfix\\\"><h4 class=\\\"pull-left\\\"><b>New Balence Ladies Run - 5K</b></h4><a class=\\\"btn btn-primary btn-action pull-right\\\" href=\\\"results-details.html\\\">More</a></div></div><div class=\\\"panel-heading\\\"><div class=\\\"row\\\"><div class=\\\"col-lg-4 col-md-6 col-sm-4 text-left\\\"><small>40.000/41.100 runners</small></div><div class=\\\"col-sm-4 hidden-md text-center\\\"><span class=\\\"badge badge-warning no-margin no-float\\\">Race over</span></div><div class=\\\"col-lg-4 col-md-6 col-sm-4 text-right\\\"><small><a href=\\\"#\\\" class=\\\"no-padding\\\">At finish</a></small></div></div></div><div class=\\\"row\\\"><div class=\\\"col-md-6\\\"></div><div class=\\\"col-md-6\\\"><table class=\\\"table table-striped table-hover\\\"><thead><tr><th colspan=\\\"4\\\"><a href=\\\"#\\\">Top</a></th></tr></thead><tbody><tr class=\\\"active\\\"><td class=\\\"text-right\\\">1.</td><td><a href=\\\"results-details.html\\\"><strong>H. Maes</strong></a></td><td class=\\\"text-right\\\">1:20:34</td><td class=\\\"text-right\\\"><a href=\\\"#\\\"><i class=\\\"fa fa-star fa-star-active\\\"></i></a></td></tr><tr><td class=\\\"text-right\\\">2.</td><td><a href=\\\"#\\\"><strong>C. Lemasson</strong></a></td><td class=\\\"text-right\\\">+15:20</td><td class=\\\"text-right\\\"><a class=\\\"\\\" href=\\\"#\\\"><i class=\\\"fa fa-star\\\"></i></a></td></tr><tr><td class=\\\"text-right\\\">3.</td><td><a href=\\\"#\\\"><strong>S. Belen</strong></a></td><td class=\\\"text-right\\\">+20:00</td><td class=\\\"text-right\\\"><a href=\\\"#\\\"><i class=\\\"fa fa-star\\\"></i></a></td></tr></tbody><thead><tr><th colspan=\\\"4\\\"><a href=\\\"#\\\">By category</a></th></tr></thead><tbody><tr><td class=\\\"text-right\\\"><a href=\\\"#\\\"><span class=\\\"badge badge-primary\\\">ve3</span></a></td><td><a href=\\\"#\\\"><strong>H. Maes</strong></a></td><td class=\\\"text-right\\\">1:20:34</td><td class=\\\"text-right\\\"><a href=\\\"#\\\"><i class=\\\"fa fa-star\\\"></i></a></td></tr><tr><td class=\\\"text-right\\\"><a href=\\\"#\\\"><span class=\\\"badge badge-primary\\\">ve3</span></a></td><td><a href=\\\"#\\\"><strong>C. Lemasson</strong></a></td><td class=\\\"text-right\\\">+15:20</td><td class=\\\"text-right\\\"><a href=\\\"#\\\"><i class=\\\"fa fa-star\\\"></i></a></td></tr><tr><td class=\\\"text-right\\\"><a href=\\\"#\\\"><span class=\\\"badge badge-primary\\\">ve3</span></a></td><td><a href=\\\"#\\\"><strong>S. Belen</strong></a></td><td class=\\\"text-right\\\">+20:00</td><td class=\\\"text-right\\\"><a href=\\\"#\\\"><i class=\\\"fa fa-star\\\"></i></a></td></tr></tbody></table><div class=\\\"list-group no-margin\\\"><a class=\\\"list-group-item text-ellipsis clearfix\\\" href=\\\"#\\\"><small>by group</small><div class=\\\"pull-right\\\"><i class=\\\"fa fa-file-pdf-o\\\"></i></div></a> <a class=\\\"list-group-item text-ellipsis clearfix\\\" href=\\\"#\\\"><small>by group</small><div class=\\\"pull-right\\\"><i class=\\\"fa fa-file-pdf-o\\\"></i></div></a></div></div></div><div class=\\\"panel-body no-padding\\\"></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/result-group-report.html\",\n    \"<div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><div class=\\\"panel panel-default panel-collapse\\\"><div class=\\\"panel-heading clearfix\\\"><a>{{curReport.DisplayName|tc}} <span class=\\\"caret\\\"></span></a><div class=\\\"actions\\\"><button class=\\\"btn btn-action\\\"><i class=\\\"fa fa-download\\\"></i></button> <button class=\\\"btn btn-action\\\"><i class=\\\"fa fa-print\\\"></i></button></div></div><div class=\\\"panel-body\\\"><div class=\\\"row\\\"><div class=\\\"col-xs-4\\\"><paging page=\\\"curPage\\\" page-size=\\\"25\\\" compact=\\\"'true'\\\" paging-action=\\\"SetPage(page)\\\" total=\\\"results.Count\\\" show-prev-next=\\\"true\\\"></paging></div><div class=\\\"col-xs-8\\\"><form class=\\\"pull-right\\\" ng-submit=\\\"SearchResult(search)\\\"><div class=\\\"input-group\\\"><input cr-focus=\\\"\\\" type=\\\"text\\\" ng-model=\\\"search\\\" class=\\\"form-control\\\"> <span class=\\\"input-group-btn\\\"><button type=\\\"submit\\\" class=\\\"btn btn-default\\\"><span aria-hidden=\\\"true\\\" class=\\\"glyphicon glyphicon-search\\\"></span></button></span></div></form></div></div><div class=\\\"row\\\"><div class=\\\"col-md-12 mt10\\\"><cr-table columns=\\\"results.TableDefinition.Columns\\\" row-select=\\\"grp.SelectRow(data)\\\" row-action=\\\"grp.RowAction(action)\\\" options=\\\"options\\\" rows=\\\"results.Matches\\\"></cr-table></div></div><div class=\\\"row mt10\\\"><div class=\\\"col-xs-9\\\"><paging page=\\\"curPage\\\" page-size=\\\"25\\\" paging-action=\\\"SetPage(page)\\\" total=\\\"results.Count\\\" show-prev-next=\\\"true\\\"></paging></div><div class=\\\"col-xs-3 text-right\\\"><b>{{results.Count}}</b> {{'ENTRIES'|t}}</div></div></div></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/result-group-split-detail.html\",\n    \"<div class=\\\"row\\\" style=\\\"padding-bottom: 10px\\\"><div class=\\\"col-md-3\\\"><label class=\\\"control-label\\\" for=\\\"lblLocation\\\">{{'LOCATION'|t}} <span ng-if=\\\"options.required\\\">*</span></label><select id=\\\"lblLocation\\\" ng-model=\\\"resultName\\\" ng-options=\\\"split.Name as split.DisplayName for split in groupData.SplitConfigurations\\\" class=\\\"form-control nya-selectpicker\\\"></select></div><div class=\\\"col-md-6\\\"><a href=\\\"#\\\" editable-text=\\\"user.name\\\">{{ user.name || 'empty' }}</a> <label class=\\\"control-label\\\" for=\\\"Filters\\\">Filters</label><div class=\\\"btn-group\\\" id=\\\"Filters\\\" data-toggle=\\\"buttons\\\"><button class=\\\"btn\\\" ng-repeat=\\\"md in groupData.MetaData | filter:{Type:4}\\\" ng-class=\\\"{'btn-primary':IsFlagSelected(md.Flag) }\\\" ng-click=\\\"Toggle(md.Flag)\\\">{{md.DisplayName|tc}}</button></div></div></div><div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><div class=\\\"panel panel-default\\\"><div class=\\\"panel-heading clearfix\\\"><h4 class=\\\"pull-left\\\">Results</h4><button class=\\\"btn btn-link pull-right\\\"><i class=\\\"fa fa-expand\\\"></i></button> <button class=\\\"btn btn-link pull-right\\\"><i class=\\\"fa fa-download\\\"></i></button> <button class=\\\"btn btn-link pull-right\\\"><i class=\\\"fa fa-print\\\"></i></button></div><div class=\\\"panel-body bg-white\\\"><div class=\\\"row\\\"><div class=\\\"col-md-8\\\"><paging page=\\\"currentPage\\\" page-size=\\\"pageSize\\\" paging-action=\\\"SetResultPage(page)\\\" total=\\\"results.TotalRows\\\" show-prev-next=\\\"true\\\"></paging></div><div class=\\\"col-md-4\\\"><form><div class=\\\"input-group\\\"><input type=\\\"text\\\" class=\\\"form-control\\\"> <span class=\\\"input-group-btn\\\"><button type=\\\"submit\\\" class=\\\"btn btn-default\\\"><span aria-hidden=\\\"true\\\" class=\\\"glyphicon glyphicon-search\\\"></span></button></span></div></form></div></div><div class=\\\"row\\\"><div class=\\\"col-md-12\\\"><table class=\\\"table table-striped table-hover table-condensed table-responsive\\\"><thead><tr><th class=\\\"text-right\\\">{{'POS'|t}}</th><th>{{'BIB'|t}}</th><th class=\\\"hidden-xs\\\"></th><th>{{'NAME'|t}}</th><th class=\\\"text-center hidden-xs\\\">{{'NATIONALITY'|t}}</th><th class=\\\"hidden-xs hidden-sm\\\">{{'TEAM'|t}}</th><th class=\\\"text-right\\\">{{'TIME'|t}}</th><th colspan=\\\"2\\\"></th></tr></thead><tbody><tr ng-repeat=\\\"res in results.ResultView\\\"><td class=\\\"text-right\\\">{{FormatPosition( res.FilterRank,res.Result.Status)}}</td><td><i>n°{{res.RegistrationView.DisplayBib}}</i></td><td class=\\\"text-center hidden-xs\\\">{{res.RegistrationView.Gender.replace(\\\"M\\\",\\\"\\\")}}</td><td><b>{{res.RegistrationView.LastName}} {{res.RegistrationView.FirstName}}</b></td><td class=\\\"text-center hidden-xs\\\"><center><img ng-src=\\\"http://chronorace.blob.core.windows.net/webresources/img/flags/{{res.RegistrationView.Nationality.toLowerCase()}}.png\\\" ng-if=\\\"res.RegistrationView.Nationality!=''\\\"></center></td><td class=\\\"hidden-xs hidden-sm\\\">{{res.RegistrationView.GroupName}}</td><td class=\\\"text-right\\\"><b>{{res.Result.DisplayTime}}</b></td><td class=\\\"text-right hidden-xs\\\"><i class=\\\"fa fa-star\\\"></i></td><td><button class=\\\"btn btn-edit pull-right\\\" type=\\\"button\\\" ng-click=\\\"SelectRow({data: row})\\\"><span class=\\\"glyphicon glyphicon-chevron-right\\\" aria-hidden=\\\"true\\\"></span></button></td></tr></tbody></table></div></div><div class=\\\"row\\\"><div class=\\\"col-md-12\\\"><br><b>{{results.Stats[\\\"Ok\\\"]||0}}</b> {{'FINISHERS'|t}} / <b>{{results.TotalRows}}</b> {{'STARTERS'|t}}</div></div></div></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/result-group-split.html\",\n    \"<a class=\\\"results-back\\\" ui-sref=\\\"^.home\\\"><span class=\\\"fa fa-chevron-left\\\"></span> {{'BACK'|translate}}</a><h2>&nbsp;&nbsp;{{groupData.DisplayName}}</h2><ui-view></ui-view>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/result-group.html\",\n    \"<ui-view></ui-view>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/result-home.html\",\n    \"<div class=\\\"panel panel-default\\\"><div class=\\\"panel panel-default mt10\\\" ng-if=\\\"globalResult.Entries.length>0\\\"><div class=\\\"panel-heading panel-colapsible clearfix\\\"><a>{{'SEARCHRESULT'|t}}</a><div class=\\\"actions\\\"><button ng-click=\\\"closeGlobalResult()\\\" class=\\\"btn btn-action\\\"><i class=\\\"fa fa-times\\\"></i></button></div></div><div class=\\\"panel-body\\\"><cr-master-slave-table table=\\\"globalResult\\\" row-action=\\\"globalSearchAction(action,data)\\\"></cr-master-slave-table></div></div></div><cr-menusquare><cr-menusquare-item ng-repeat=\\\"reportGroup in reportList\\\" sq-title=\\\"{{reportGroup.DisplayName}}\\\" sq-route=\\\"^.group.home\\\" sq-route-params='{\\\"groupId\\\":{{reportGroup.Id}}}'></cr-menusquare-item></cr-menusquare><div class=\\\"clearfix\\\"></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/result-template.html\",\n    \"<div ui-view=\\\"\\\"></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/tracking-index.html\",\n    \"<div class=\\\"container-fluid\\\" style=\\\"width:100%;position:fixed;top:00px;padding:0;bottom:0px\\\"><div id=\\\"map\\\" style=\\\"min-height:150px;height:100%;\\\"></div><div style=\\\"background-color: rgba(200,200,200,0.4);position: absolute;left:20px;top:20px;bottom: 80px;width: 300px;overflow-y: auto\\\"><form class=\\\"pull-right form-results-main\\\" ng-submit=\\\"globalSearch(srch)\\\"><div class=\\\"input-group\\\"><input type=\\\"text\\\" id=\\\"places\\\" cr-focus=\\\"\\\" class=\\\"form-control\\\" ng-model=\\\"srch\\\"> <span class=\\\"input-group-btn\\\"><button type=\\\"submit\\\" class=\\\"btn btn-default\\\"><span aria-hidden=\\\"true\\\" class=\\\"glyphicon glyphicon-search\\\"></span></button></span></div></form></div><div style=\\\"background-color: rgba(200,200,200,0.4);position: absolute;left:20px;top:60px;bottom: 80px;width: 300px;overflow-y: auto\\\"><table class=\\\"table table-condensed table-striped table-hover\\\"><tr ng-repeat=\\\"(k,v) in track.gpsConfiguration.Trackers\\\"><td><input ng-model=\\\"track.enabledTrackers[k]\\\" data-ng-change=\\\"track.DrawTrackers()\\\" type=\\\"checkbox\\\"> {{v.DisplayName!=v.Bib?v.Bib+' - '+v.DisplayName:v.DisplayName}}</td><td class=\\\"text-right\\\" align=\\\"right\\\"><a ng-click=\\\"track.CenterOnMarker(k)\\\"><img width=\\\"50%\\\" ng-src=\\\"{{track.GetIcon(v)}}\\\"></a></td></tr></table></div><div class=\\\"btn-group btn-group-justified\\\" style=\\\"position: absolute;bottom: 40px;width: 300px;left:20px\\\"><div class=\\\"btn-group\\\"><button type=\\\"button\\\" ng-click=\\\"track.SetMapType('satellite')\\\" class=\\\"btn btn-primary\\\">Satellite</button></div><div class=\\\"btn-group\\\"><button type=\\\"button\\\" ng-click=\\\"track.SetMapType('terrain')\\\" class=\\\"btn btn-primary\\\">Terrain</button></div><div class=\\\"btn-group\\\"><button type=\\\"button\\\" ng-click=\\\"track.SetMapType('hybrid')\\\" class=\\\"btn btn-primary\\\">Hybrid</button></div><div class=\\\"btn-group\\\"><button type=\\\"button\\\" ng-click=\\\"track.SetMapType('roadmap')\\\" class=\\\"btn btn-primary\\\">Road</button></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/video.html\",\n    \"<center><button ng-repeat=\\\"ref in video.videoReferences\\\" ui-sref-active=\\\"btn-primary\\\" ui-sref=\\\"quickresults.group.report.video.content({idx:$index})\\\" class=\\\"btn\\\">{{ref.Title|tc}}</button><br><br><div style=\\\"max-width:720px;width: 100%\\\"><ui-view></ui-view></div><button class=\\\"btn btn-default\\\" ui-sref=\\\"^.\\\" t=\\\"\\\">BACK</button></center>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/videocontent.html\",\n    \"<div id=\\\"video\\\"></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/xco.html\",\n    \"<div role=\\\"tabpanel\\\" ng-if=\\\"ctrl.raceList!=null && ctrl.raceList.length>0\\\"><ul class=\\\"nav nav-tabs\\\"><li role=\\\"presentation\\\" ui-sref-active=\\\"active\\\" ng-repeat=\\\"race in ctrl.raceList\\\"><a ui-sref=\\\".race({raceName:race})\\\"><small class=\\\"visible-xs\\\">{{race}}</small> <span class=\\\"hidden-xs\\\">{{race}}</span></a></li></ul><div class=\\\"tab-content\\\"><div role=\\\"tabpanel\\\" class=\\\"tab-pane pane-information active\\\" id=\\\"information\\\"><div class=\\\"tab-pane-content\\\"><ui-view></ui-view></div></div></div></div><div ng-if=\\\"!ctrl.raceList || ctrl.raceList.length==0\\\"><h1>LIVE TIMING AVAILABLE SOON</h1></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.event\"); }\ncatch(err) { module = angular.module(\"cr.event\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/event/views/xcorace.html\",\n    \"<div class=\\\"row\\\" ng-if=\\\"race.overview!=null && race.overview.OverviewData!=null && race.overview.OverviewData.length>0\\\"><div class=\\\"col-sm-6\\\"><h3>Race Overview</h3><table class=\\\"table table-hover table-condensed table-striped\\\"><tbody><tr ng-repeat=\\\"ov in race.overview.OverviewData\\\"><td class=\\\"text-right\\\">{{ov.StrPos}}</td><td class=\\\"text-center\\\"><center><img ng-src=\\\"{{'http://chronorace.blob.core.windows.net/webresources/img/flags/'+race.registration[ov.Dossard].Pays.toLowerCase()}}.png\\\"></center></td><td><div><b>{{race.registration[ov.Dossard].LastName}} {{race.registration[ov.Dossard].FirstName}}</b> <span class=\\\"pull-right\\\">{{race.GetRacePosition(ov)}}</span></div><div><small>n°{{ov.Dossard%1000}}</small> <span class=\\\"pull-right\\\">{{race.GetLapTimes(ov)}}</span></div></td><td class=\\\"text-right\\\"><b>{{ov.CurrentSituation.TotalTime|mstotimehmmss}}</b><br><span ng-show=\\\"ov.CurrentSituation.GapWithFirst>0\\\">+{{ov.CurrentSituation.GapWithFirst|mstotimehmmss}}</span></td></tr></tbody></table></div><div class=\\\"col-sm-3\\\"><h3>Fastest Lap</h3><table class=\\\"table table-hover table-condensed table-striped\\\"><tbody><tr ng-repeat=\\\"fastest in race.overview.FastestLaps\\\"><td align=\\\"right\\\"><b><span ng-show=\\\"lap.Lap>0\\\">{{$index+1}}.</span></b></td><td><div><b>{{race.registration[fastest.Dossard].LastName}} {{race.registration[fastest.Dossard].FirstName}}</b></div><div><small>n°{{fastest.Dossard%1000}} <span ng-show=\\\"fastest.AvgSpeed>0\\\">- {{fastest.AvgSpeed|number:2}}km/h</span> (Lap {{fastest.Lap}})</small></div></td><td class=\\\"text-right\\\"><div><b>{{fastest.LapTime|mstotimehmmssf}}</b></div><div ng-show=\\\"fastest.LapTime-race.overview.FastestLaps[0].LapTime>0\\\">+{{(fastest.LapTime-race.overview.FastestLaps[0].LapTime)|mstotimehmmssf}}</div></td></tr></tbody></table></div><div class=\\\"col-sm-3\\\"><h3>Lap Times</h3><table class=\\\"table table-hover table-condensed table-striped\\\"><tbody><tr ng-repeat=\\\"lap in race.overview.LapTimes\\\"><td align=\\\"center\\\"><b><span ng-show=\\\"lap.Lap>0\\\">{{lap.Lap}}</span> <span ng-show=\\\"lap.Lap==0\\\">-</span></b></td><td><div><b>{{race.registration[lap.Dossard].LastName}} {{race.registration[lap.Dossard].FirstName}}</b></div><div><small>n°{{lap.Dossard%1000}} <span ng-show=\\\"lap.AvgSpeed>0\\\">- {{lap.AvgSpeed|number:2}}km/h</span></small></div></td><td class=\\\"text-right\\\"><div><b>{{lap.Time|mstotimehmmss}}</b></div><div>{{lap.CumTime|mstotimehmmss}}</div></td></tr></tbody></table></div></div><div class=\\\"row\\\" ng-if=\\\"!race.overview || !race.overview.OverviewData || race.overview.OverviewData.length==0\\\"><div class=\\\"col-sm-12\\\"><h1>LIVE TIMING AVAILABLE SOON</h1></div></div>\");\n}]);\n})();\n","(function (root, factory) {\n  'use strict';\n\n  if (typeof define === 'function' && define.amd) {\n    define(['angular'], factory);\n  } else if (root.hasOwnProperty('angular')) {\n    // Browser globals (root is window), we don't register it.\n    factory(root.angular);\n  } else if (typeof exports === 'object') {\n    module.exports = factory(require('angular'));\n  }\n}(this , function (angular) {\n    'use strict';\n\n    // In cases where Angular does not get passed or angular is a truthy value\n    // but misses .module we can fall back to using window.\n    angular = (angular && angular.module ) ? angular : window.angular;\n\n\n    function isStorageSupported($window, storageType) {\n\n      // Some installations of IE, for an unknown reason, throw \"SCRIPT5: Error: Access is denied\"\n      // when accessing window.localStorage. This happens before you try to do anything with it. Catch\n      // that error and allow execution to continue.\n\n      // fix 'SecurityError: DOM Exception 18' exception in Desktop Safari, Mobile Safari\n      // when \"Block cookies\": \"Always block\" is turned on\n      var supported;\n      try {\n        supported = $window[storageType];\n      }\n      catch(err) {\n        supported = false;\n      }\n\n      // When Safari (OS X or iOS) is in private browsing mode, it appears as though localStorage and sessionStorage\n      // is available, but trying to call .setItem throws an exception below:\n      // \"QUOTA_EXCEEDED_ERR: DOM Exception 22: An attempt was made to add something to storage that exceeded the quota.\"\n      if(supported) {\n        var key = '__' + Math.round(Math.random() * 1e7);\n        try {\n          $window[storageType].setItem(key, key);\n          $window[storageType].removeItem(key, key);\n        }\n        catch(err) {\n          supported = false;\n        }\n      }\n\n      return supported;\n    }\n\n    /**\n     * @ngdoc overview\n     * @name ngStorage\n     */\n\n    return angular.module('ngStorage', [])\n\n    /**\n     * @ngdoc object\n     * @name ngStorage.$localStorage\n     * @requires $rootScope\n     * @requires $window\n     */\n\n    .provider('$localStorage', _storageProvider('localStorage'))\n\n    /**\n     * @ngdoc object\n     * @name ngStorage.$sessionStorage\n     * @requires $rootScope\n     * @requires $window\n     */\n\n    .provider('$sessionStorage', _storageProvider('sessionStorage'));\n\n    function _storageProvider(storageType) {\n        var providerWebStorage = isStorageSupported(window, storageType);\n\n        return function () {\n          var storageKeyPrefix = 'ngStorage-';\n\n          this.setKeyPrefix = function (prefix) {\n            if (typeof prefix !== 'string') {\n              throw new TypeError('[ngStorage] - ' + storageType + 'Provider.setKeyPrefix() expects a String.');\n            }\n            storageKeyPrefix = prefix;\n          };\n\n          var serializer = angular.toJson;\n          var deserializer = angular.fromJson;\n\n          this.setSerializer = function (s) {\n            if (typeof s !== 'function') {\n              throw new TypeError('[ngStorage] - ' + storageType + 'Provider.setSerializer expects a function.');\n            }\n\n            serializer = s;\n          };\n\n          this.setDeserializer = function (d) {\n            if (typeof d !== 'function') {\n              throw new TypeError('[ngStorage] - ' + storageType + 'Provider.setDeserializer expects a function.');\n            }\n\n            deserializer = d;\n          };\n\n          this.supported = function() {\n            return !!providerWebStorage;\n          };\n\n          // Note: This is not very elegant at all.\n          this.get = function (key) {\n            return providerWebStorage && deserializer(providerWebStorage.getItem(storageKeyPrefix + key));\n          };\n\n          // Note: This is not very elegant at all.\n          this.set = function (key, value) {\n            return providerWebStorage && providerWebStorage.setItem(storageKeyPrefix + key, serializer(value));\n          };\n\n          this.remove = function (key) {\n            providerWebStorage && providerWebStorage.removeItem(storageKeyPrefix + key);\n          }\n\n          this.$get = [\n              '$rootScope',\n              '$window',\n              '$log',\n              '$timeout',\n              '$document',\n\n              function(\n                  $rootScope,\n                  $window,\n                  $log,\n                  $timeout,\n                  $document\n              ){\n\n                // The magic number 10 is used which only works for some keyPrefixes...\n                // See https://github.com/gsklee/ngStorage/issues/137\n                var prefixLength = storageKeyPrefix.length;\n\n                // #9: Assign a placeholder object if Web Storage is unavailable to prevent breaking the entire AngularJS app\n                // Note: recheck mainly for testing (so we can use $window[storageType] rather than window[storageType])\n                var isSupported = isStorageSupported($window, storageType),\n                    webStorage = isSupported || ($log.warn('This browser does not support Web Storage!'), {setItem: angular.noop, getItem: angular.noop, removeItem: angular.noop}),\n                    $storage = {\n                        $default: function(items) {\n                            for (var k in items) {\n                                angular.isDefined($storage[k]) || ($storage[k] = angular.copy(items[k]) );\n                            }\n\n                            $storage.$sync();\n                            return $storage;\n                        },\n                        $reset: function(items) {\n                            for (var k in $storage) {\n                                '$' === k[0] || (delete $storage[k] && webStorage.removeItem(storageKeyPrefix + k));\n                            }\n\n                            return $storage.$default(items);\n                        },\n                        $sync: function () {\n                            for (var i = 0, l = webStorage.length, k; i < l; i++) {\n                                // #8, #10: `webStorage.key(i)` may be an empty string (or throw an exception in IE9 if `webStorage` is empty)\n                                (k = webStorage.key(i)) && storageKeyPrefix === k.slice(0, prefixLength) && ($storage[k.slice(prefixLength)] = deserializer(webStorage.getItem(k)));\n                            }\n                        },\n                        $apply: function() {\n                            var temp$storage;\n\n                            _debounce = null;\n\n                            if (!angular.equals($storage, _last$storage)) {\n                                temp$storage = angular.copy(_last$storage);\n                                angular.forEach($storage, function(v, k) {\n                                    if (angular.isDefined(v) && '$' !== k[0]) {\n                                        webStorage.setItem(storageKeyPrefix + k, serializer(v));\n                                        delete temp$storage[k];\n                                    }\n                                });\n\n                                for (var k in temp$storage) {\n                                    webStorage.removeItem(storageKeyPrefix + k);\n                                }\n\n                                _last$storage = angular.copy($storage);\n                            }\n                        },\n                        $supported: function() {\n                            return !!isSupported;\n                        }\n                    },\n                    _last$storage,\n                    _debounce;\n\n                $storage.$sync();\n\n                _last$storage = angular.copy($storage);\n\n                $rootScope.$watch(function() {\n                    _debounce || (_debounce = $timeout($storage.$apply, 100, false));\n                });\n\n                // #6: Use `$window.addEventListener` instead of `angular.element` to avoid the jQuery-specific `event.originalEvent`\n                $window.addEventListener && $window.addEventListener('storage', function(event) {\n                    if (!event.key) {\n                      return;\n                    }\n\n                    // Reference doc.\n                    var doc = $document[0];\n\n                    if ( (!doc.hasFocus || !doc.hasFocus()) && storageKeyPrefix === event.key.slice(0, prefixLength) ) {\n                        event.newValue ? $storage[event.key.slice(prefixLength)] = deserializer(event.newValue) : delete $storage[event.key.slice(prefixLength)];\n\n                        _last$storage = angular.copy($storage);\n\n                        $rootScope.$apply();\n                    }\n                });\n\n                $window.addEventListener && $window.addEventListener('beforeunload', function() {\n                    $storage.$apply();\n                });\n\n                return $storage;\n              }\n          ];\n      };\n    }\n\n}));\n","var cr;!function(cr){var account;!function(account){console.log(\"ACCOUNT CREATE\"),account.accountModule=angular.module(\"cr.account\",[\"cr.common\",\"cr.infrastructure\",\"cr.translation\",\"cr.form\",\"ui.router\",\"ui.bootstrap\",\"ngStorage\"]),account.accountModule.constant(\"oauth1LoginUrl\",\"/oauth1/identity?sso=\")}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var userFieldList=[\"FirstName\",\"LastName\",\"Gender\",\"BirthDate\",\"Email\",\"Locale\",\"Phone\",\"PhonePrefix\",\"Address1\",\"Number\",\"PostCode\",\"City\",\"Country\",\"Locale\",\"Nationality\"],accountService=function(){function accountService(currentApplication,currentUser,$modal,$rootScope,$http,$log,cfg,$q,$state,authenticationService){var _this=this;this.currentApplication=currentApplication,this.currentUser=currentUser,this.$modal=$modal,this.$rootScope=$rootScope,this.$http=$http,this.cfg=cfg,this.$q=$q,this.$state=$state,this.authenticationService=authenticationService,this.SelectUser=function(users,options){var toRet=_this.$q.defer(),scope=_this.$rootScope.$new(),loginMode=!0;return options&&options.hasOwnProperty(\"LoginMode\")&&(loginMode=options.LoginMode),options&&angular.extend(scope,options),console.log(\"Title: \"+scope.Title+\"  /   \"+loginMode),scope.DupplicateUsers=users,console.log(\"MODAL IN SELECT USER: \"+angular.isDefined(_this.$modal.open)),_this.$modal.open({resolve:{DuplicateUsers:function(){return users}},controller:\"selectDuplicateCtrl\",scope:scope,size:\"lg\",templateUrl:loginMode?\"modules/account/templates/selectduplicateuser.html\":\"modules/account/templates/selectuser.html\",show:!0}).result.then(function(result){switch(result.Action){case\"Login\":_this.currentUser.userView(result.UserView),toRet.resolve(result);break;case\"Activate\":_this.authenticationService.getActivationToken(result.UserView.UserId).then(function(data){console.log(\"GetActivationToken... Redirect\"),_this.$state.go(\"account/message.message\",{message:\"CONF_ACTIVATIONMAILSEND\",title:\"ACTIVATIONMAIL\"},{reload:!0}),toRet.resolve(result)},function(errorData){return toRet.reject(errorData)});break;default:toRet.resolve(result)}},function(error){return toRet.reject(error)}),toRet.promise},this.AsUser=function(data){var exclude=[];for(var key in data)key.indexOf(\"x_\")||exclude.push(key);exclude.push(\"UserDetails\");var base=_.omit(data,exclude),myUser=_.pick.apply(void 0,_.union([base],userFieldList));return myUser.UserDetails=_.omit.apply(void 0,_.union([base],userFieldList,[\"UserName\",\"Password\"])),myUser},this.ChangePassword=function(userId,token,currentPassword,newPassword){var url=_this.cfg.WebApiUrl+\"account/user/changepassword\",request={UserId:userId,ResetPasswordToken:token,CurrentPassword:currentPassword,NewPassword:newPassword};return _this.post(url,request)},console.log(\"MODAL IN ACCOUNT SERVICE: \"+angular.toJson($modal)),this.$log=$log.getInstance(\"accountService\")}return accountService.prototype.GetUser=function(userId,activationToken){var url=this.cfg.WebApiUrl+\"account/user/get\";userId&&(url=url+\"/\"+userId),activationToken&&(url=url+\"/\"+activationToken);var toRet=this.$q.defer();return this.$log.info(\"GetUser using: \"+url),this.$http.get(url).success(function(data,status,headers,config){toRet.resolve(data)}).error(function(data,status,headers,config){return toRet.reject(data)}),toRet.promise},accountService.prototype.CreateUser=function(request){this.$log.log(\"Create: \"+angular.toJson(request));var url=this.cfg.WebApiUrl+\"account/user/create\",toRet=this.$q.defer();return this.$log.info(\"CreateUser using: \"+url),this.$http.post(url,request).success(function(data,status,headers,config){toRet.resolve(data)}).error(function(data,status,headers,config){toRet.reject(data)}),toRet.promise},accountService.prototype.UpdateUser=function(request,userId){this.$log.log(\"Create: \"+angular.toJson(request));var url=this.cfg.WebApiUrl+\"account/user/update\"+(angular.isDefined(userId)?\"/\"+userId:\"\"),toRet=this.$q.defer();return this.$log.info(\"Update using: \"+url),this.$http.post(url,request).success(function(data,status,headers,config){toRet.resolve(data)}).error(function(data,status,headers,config){toRet.reject(data)}),toRet.promise},accountService.prototype.post=function(url,authData){var _this=this;this.$log.info(\"Post: \"+url+\" / \"+angular.toJson(authData));var defer=this.$q.defer();return this.$http.post(url,authData).success(function(data,status,headers,config){_this.$log.info(\"Authenticate response: \"+angular.toJson(data)),null!=data&&data.Success?(_this.currentUser.setUser(data),defer.resolve(data)):defer.reject(data)}).error(function(data,status,headers,config){return defer.reject(data)}),defer.promise},accountService.prototype.EnhancedSearch=function(firstName,lastName,email,searchString){var url=this.cfg.WebApiUrl+\"account/user/enhanced-search\",toRet=this.$q.defer();return this.$log.info(\"GetUser using: \"+url),this.$http.post(url,{FirstName:firstName?firstName+\"%\":null,LastName:lastName?lastName+\"%\":null,Email:email?email+\"%\":null,SearchString:searchString}).success(function(data,status,headers,config){toRet.resolve(data)}).error(function(data,status,headers,config){return toRet.reject(data)}),toRet.promise},accountService}();angular.module(\"cr.account\").factory(\"accountService\",[\"currentApplication\",\"currentUser\",\"$modal\",\"$rootScope\",\"$http\",\"$log\",\"cfg\",\"$q\",\"$state\",\"authenticationService\",function(currentApplication,currentUser,$modal,$rootScope,$http,$log,cfg,$q,$state,authenticationService){return new accountService(currentApplication,currentUser,$modal,$rootScope,$http,$log,cfg,$q,$state,authenticationService)}])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var applicationService=function(){function applicationService($http,$log,$q,cfg){this.$http=$http,this.$q=$q,this.cfg=cfg,this.$log=$log.getInstance(\"applicationService\")}return applicationService.prototype.GetApplicationDetails=function(clientId){var result=this.$q.defer();return this.$log.debug(\"Loading application details: \"+clientId),this.$http.get(this.cfg.WebApiUrl+\"account/application/details/\"+clientId).success(function(data,status,headers,config){data.ApiKey=clientId,result.resolve(data)}).error(function(data,status,headers,config){return result.reject(data)}),result.promise},applicationService}();angular.module(\"cr.account\").factory(\"applicationService\",[\"$http\",\"$log\",\"$q\",\"cfg\",function($http,$log,$q,cfg){return new applicationService($http,$log,$q,cfg)}])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var authenticationService=function(){function authenticationService(l2sWrapper,currentApplication,currentLangage,$rootScope,$http,$log,currentUser,$q,popupService,windowEventService,cfg,oauth1LoginUrl){this.l2sWrapper=l2sWrapper,this.currentApplication=currentApplication,this.currentLangage=currentLangage,this.$http=$http,this.currentUser=currentUser,this.$q=$q,this.popupService=popupService,this.windowEventService=windowEventService,this.cfg=cfg,this.oauth1LoginUrl=oauth1LoginUrl,this.$log=$log.getInstance(\"authenticationService\")}return authenticationService.prototype.oAuthGrant=function(clientId,redirectUri,state,response_type,oauth_url,username,token){var url=oauth_url+\"?client_id=\"+clientId+\"&redirect_uri=\"+encodeURIComponent(redirectUri)+\"&state=\"+encodeURIComponent(state)+\"&response_type=\"+response_type;this.$log.debug(\"Requesting an OAuth grant for client: \"+clientId),this.$log.debug(\"Grant url: \"+url),$('<form novalidate=\"novalidate\" action=\"'+url+'\" method=\"post\"><input type=\"hidden\" value=\"'+username+'\" name=\"userId\" /><input type=\"hidden\" value=\"'+token+'\" name=\"token\" /></form>').appendTo(\"body\").submit()},authenticationService.prototype.oAuth1Authenticate=function(provider){var _this=this;this.$log.info(\"Starting OAuth1 flow for provider: \"+provider);var deferred=this.$q.defer(),onAuthCallback=function(evt){evt.origin==_this.cfg.ClassicWebDomain&&(_this.$log.info(\"OAuth1 response received from: \"+evt.origin),_this.$log.info(\"OAuth1 data: \"+angular.toJson(evt.data)),_this.windowEventService.removeHandler(\"message\",onAuthCallback),_this.post(_this.cfg.WebApiUrl+\"account/authenticate/oauth1\",{IdentityName:provider,OAuthToken:evt.data.accessToken,Secret:evt.data.secret,LinkOrCreate:!0}).then(function(auth){return deferred.resolve(auth)},function(error){return deferred.reject(error)}))};this.windowEventService.addHandler(\"message\",onAuthCallback);var oauthUrl=this.cfg.ClassicWebDomain+this.oauth1LoginUrl+provider;return this.popupService.open(oauthUrl),this.$log.info(\"OAuth1 popup opened: \"+oauthUrl),deferred.promise},authenticationService.prototype.oAuth2Authenticate=function(provider,options){var toRet=this.$q.defer(),url=this.cfg.WebApiUrl,self=this;return this.l2sWrapper.init(),this.l2sWrapper.l2s.login(provider,{scope:\"basic,email,birthday\",callback:function(oauth){if(null!=oauth){var dataToSend={IdentityName:provider,IdentityValue:oauth.access_token?oauth.access_token:oauth.code,LinkOrCreate:!0,Details:{RedirectUri:oauth.redirect_uri}};console.log(dataToSend),self.post(url+\"account/authenticate/identity\",{IdentityName:provider,IdentityValue:oauth.access_token?oauth.access_token:oauth.code,LinkOrCreate:!0,Details:{RedirectUri:oauth.redirect_uri}}).then(function(data){console.log(data,\"<-- success\"),toRet.resolve(data)},function(error){console.log(error,\"<-- error\"),toRet.reject(error)})}}}),toRet.promise},authenticationService.prototype.post=function(url,authData,headers){var _this=this;this.$log.info(\"Post: \"+url+\" / \"+angular.toJson(authData));var defer=this.$q.defer();return this.$http({url:url,method:\"POST\",data:authData,headers:headers}).success(function(data,status,headers,config){_this.$log.info(\"Authenticate response: \"+angular.toJson(data)),null!=data&&data.Success?defer.resolve(data):defer.reject(data)}).error(function(data,status,headers,config){defer.reject(data)}),defer.promise},authenticationService.prototype.confirmUser=function(confirmationCode,userId){var url=(this.$q.defer(),this.cfg.WebApiUrl+\"account/user/confirm/\"+confirmationCode+\"/\"+userId);return this.post(url)},authenticationService.prototype.resetPassword=function(userNameOrKey){var url=this.cfg.WebApiUrl+\"account/authenticate/reset/\"+userNameOrKey+\"/\"+this.currentLangage.Langage();return this.post(url,\"\")},authenticationService.prototype.resendConfirmationToken=function(userId){var url=this.cfg.WebApiUrl+\"account/authenticate/resendconfirmation/\"+userId;return this.post(url,\"\")},authenticationService.prototype.getActivationToken=function(userId){var url=this.cfg.WebApiUrl+\"account/authenticate/activationtoken/\"+userId;return this.post(url,\"\")},authenticationService.prototype.authenticateByUserName=function(username,password,headers){return this.post(this.cfg.WebApiUrl+\"account/authenticate/basic\",{user:username,password:password},headers)},authenticationService}();angular.module(\"cr.account\").factory(\"authenticationService\",[\"l2sWrapper\",\"currentApplication\",\"currentLangage\",\"$rootScope\",\"$http\",\"$log\",\"currentUser\",\"$q\",\"popupService\",\"windowEventService\",\"cfg\",\"oauth1LoginUrl\",function(l2sWrapper,currentApplication,currentLangage,$rootScope,$http,$log,currentUser,$q,popupService,windowEventService,cfg,oauth1LoginUrl){return new authenticationService(l2sWrapper,currentApplication,currentLangage,$rootScope,$http,$log,currentUser,$q,popupService,windowEventService,cfg,oauth1LoginUrl)}])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var currentApplicationService=function(){function currentApplicationService($rootScope,$log){this.$rootScope=$rootScope,this.$log=$log.getInstance(\"currentUser\")}return currentApplicationService.prototype.currentApplication=function(application){return angular.isDefined(application)&&(this.application=application,this.$rootScope.$broadcast(\"currentApplicationUpdate\")),this.application},currentApplicationService}();account.accountModule.factory(\"currentApplication\",[\"$rootScope\",\"$log\",function($rootScope,$log){return new currentApplicationService($rootScope,$log)}])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var currentUser=function(){function currentUser($log,$localStorage,tmhDynamicLocale,$rootScope,crHttpHeaderService){var _this=this;this.$localStorage=$localStorage,this.tmhDynamicLocale=tmhDynamicLocale,this.$rootScope=$rootScope,this.crHttpHeaderService=crHttpHeaderService,this.localeSet=!1,this.setLocale=function(locale){_this.$log.info(\"Set locale to \"+locale),_this.tmhDynamicLocale.set(locale),_this.localeSet=!0},this.getUser=function(){return!_this.user&&_this.isAuthenticated()&&(console.log(\"getuser: \"+_this.user+\"/\"+_this.isAuthenticated()),_this.user=_this.$localStorage.User,_this.user&&(_this.crHttpHeaderService.headers.AuthToken=_this.$localStorage.AccessToken,_this.user.Locale&&_this.setLocale(_this.user.Locale.toLowerCase().replace(\"_\",\"-\")),_this.$rootScope.$emit(\"login\"))),_this.user},this.logout=function(){_this.token=null,_this.user=null,_this.$localStorage.AccessToken=null,_this.$localStorage.User=null,delete _this.crHttpHeaderService.headers.AuthToken,_this.$rootScope.$emit(\"logout\"),console.log(\"logout: ok!\")},this.userView=function(userView){return\"undefined\"!=typeof userView&&(_this.$log.info(\"Set userView to \"+angular.toJson(userView)),null==_this.user||null!=userView&&userView.UserId==_this.user.Id||_this.clear(),_this.$localStorage.UserView=userView,window.localStorage.setItem(\"ngStorage-UserView\",angular.toJson(userView))),_this.$localStorage.UserView},this.$log=$log.getInstance(\"currentUser\"),this.token=null,this.user=null}return currentUser.prototype.getToken=function(){return this.token?this.token:this.$localStorage.AccessToken},currentUser.prototype.isAuthenticated=function(){return null!=this.getToken()},currentUser.prototype.setUser=function(authResponse,rememberMe){console.log(\"SetUser: \"+angular.toJson(authResponse)),authResponse.User&&(this.token=authResponse.AccessToken,this.user=authResponse.User,this.$log.info(\"Current user set to: \"+authResponse.User.FirstName+\" \"+authResponse.User.LastName+\" (\"+this.token+\"/\"+this.isAuthenticated()+\")\"),this.userView({UserId:this.user.Id,FirstName:this.user.FirstName,LastName:this.user.LastName}),angular.isDefined(rememberMe)&&rememberMe&&(this.$localStorage.AccessToken=authResponse.AccessToken,this.$localStorage.User=authResponse.User,window.localStorage.setItem(\"ngStorage-AccessToken\",angular.toJson(authResponse.AccessToken)),window.localStorage.setItem(\"ngStorage-User\",angular.toJson(authResponse.User)),this.crHttpHeaderService.headers.AuthToken=authResponse.AccessToken),authResponse.User.Locale&&this.setLocale(authResponse.User.Locale.toLocaleLowerCase().replace(\"_\",\"-\")),this.$rootScope.$emit(\"login\"))},currentUser.prototype.clear=function(){this.$log.info(\"Clearing current user.\"),this.logout(),this.userView(null)},currentUser}();angular.module(\"cr.account\").factory(\"currentUser\",[\"$log\",\"$localStorage\",\"tmhDynamicLocale\",\"$rootScope\",\"crHttpHeaderService\",function($log,$localStorage,tmhDynamicLocale,$rootScope,crHttpHeaderService){return new currentUser($log,$localStorage,tmhDynamicLocale,$rootScope,crHttpHeaderService)}]),angular.module(\"cr.account\").run([\"currentUser\",function(currentUser){currentUser.getUser()}])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var PermissionManagementService=function(){function PermissionManagementService($http,$q,$log,cfg,templateCache,$modal){var _this=this;this.$http=$http,this.$q=$q,this.cfg=cfg,this.templateCache=templateCache,this.$modal=$modal,this.AddRole=function(actorId,contextId,roleName,url){return url=_this.cfg.WebApiUrl+url+\"/addrole/\"+actorId+\"/\"+contextId+\"?roleName=\"+encodeURI(roleName),_this.post(url,{})},this.RemoveRole=function(actorId,contextId,roleName,url){return url=_this.cfg.WebApiUrl+url+\"/removerole/\"+actorId+\"/\"+contextId+\"?roleName=\"+encodeURI(roleName),_this.post(url,{})},this.GetContextRoles=function(contextId,rolePrefix){return _this.get(_this.cfg.WebApiUrl+\"permission/management/contextroles/\"+contextId+\"?roleReference=\"+encodeURI(rolePrefix))},this.$log=$log.getInstance(\"permissionManagementService\")}return PermissionManagementService.prototype.SelectContext=function(){var promise=this.$q.defer(),modal=this.$modal.open({templateUrl:\"modules/account/templates/searchcontext.html\",controller:[\"$scope\",function($scope){$scope.Select=function(contextId){console.log(\"in dialog: \"+contextId),$scope.$close({Action:\"select\",ContextId:contextId})}}],show:!0});return modal.result.then(function(resp){switch(console.log(\"[\"+angular.toJson(resp)+\"]\"),resp.Action){case\"select\":promise.resolve(resp.ContextId);break;default:promise.reject()}},function(err){return promise.reject()}),promise.promise},PermissionManagementService.prototype.SelectActor=function(){var promise=this.$q.defer(),modal=this.$modal.open({templateUrl:\"modules/account/templates/searchactor.html\",resolve:{actorSearchFormDefinition:function($http){return $http({method:\"GET\",url:\"modules/account/resources/searchactor.json\"})}},controller:[\"$scope\",function($scope){$scope.Select=function(actorId){$scope.$close({Action:\"select\",ActorId:actorId})}}],show:!0});return modal.result.then(function(resp){switch(resp.Action){case\"select\":promise.resolve(resp.ActorId);break;default:promise.reject()}},function(err){return promise.reject()}),promise.promise},PermissionManagementService.prototype.GetFormDefinition=function(formName){var promise=this.$q.defer(),url=\"modules/account/resources/\"+formName+\".json\",toRet=this.templateCache.get(\"modules/account/resources/\"+formName+\".json\");if(angular.isDefined(toRet))promise.resolve(toRet);else{var templateCache=this.templateCache;this.$http.get(url).success(function(data,status,headers,config){templateCache.put(url,data),promise.resolve(data)}).error(function(data,status,headers,config){console.log(\"MERDE: \"+angular.toJson(data)),promise.reject()})}return promise.promise},PermissionManagementService.prototype.post=function(url,authData,headers){this.$log.info(\"Post: \"+url+\" / \"+angular.toJson(authData));var defer=this.$q.defer();return this.$http({url:url,method:\"POST\",data:authData,headers:headers}).success(function(data,status,headers,config){null!=data&&data.Success?defer.resolve(data):defer.reject(data)}).error(function(data,status,headers,config){defer.reject(data)}),defer.promise},PermissionManagementService.prototype.ContextOperation=function(operation){var url=this.cfg.WebApiUrl+\"permission/management/contextoperation\";return this.post(url,operation)},PermissionManagementService.prototype.GetActor=function(id){return this.get(this.cfg.WebApiUrl+\"permission/management/actorbyid/\"+id)},PermissionManagementService.prototype.get=function(url,authData,headers){var result=this.$q.defer();return this.$http.get(url).success(function(data,status,headers,config){result.resolve(data)}).error(function(data,status,headers,config){result.reject(data)}),result.promise},PermissionManagementService.prototype.GetUserPermissions=function(){return this.get(this.cfg.WebApiUrl+\"permission/user/get\")},PermissionManagementService.prototype.PermissionValueOperation=function(operation){return this.post(this.cfg.WebApiUrl+\"permission/management/permissionvalueoperation\",operation)},PermissionManagementService.prototype.ActorOperation=function(operation){return this.post(this.cfg.WebApiUrl+\"permission/management/actoroperation\",operation)},PermissionManagementService.prototype.PermissionTypeOperation=function(operation){return this.post(this.cfg.WebApiUrl+\"permission/management/permissionoperation\",operation)},PermissionManagementService.prototype.RelationOperation=function(operation){return this.post(this.cfg.WebApiUrl+\"permission/management/relationoperation\",operation)},PermissionManagementService.prototype.PermissionList=function(){return this.get(this.cfg.WebApiUrl+\"permission/management/permissionlist\")},PermissionManagementService.prototype.PermissionByGroup=function(applicationId){return this.get(this.cfg.WebApiUrl+\"permission/management/permissionbygroup\"+(applicationId?\"/\"+applicationId:\"\"))},PermissionManagementService.prototype.GetContext=function(id,objectType,objectReference,name,createIfNotFound){return void 0===id&&(id=\"0\"),void 0===objectType&&(objectType=\"\"),void 0===objectReference&&(objectReference=null),void 0===name&&(name=null),void 0===createIfNotFound&&(createIfNotFound=!1),angular.isDefined(id)&&id||(id=\"0\"),this.get(this.cfg.WebApiUrl+\"permission/management/context/\"+id+\"?createIfNotFound=\"+createIfNotFound+(null!=name&&\"\"!=name?\"&name=\"+encodeURI(name):\"\")+(null!=objectReference&&\"\"!=objectReference?\"&reference=\"+encodeURI(objectReference):\"\")+(null!=objectType&&\"\"!=objectType?\"&type=\"+encodeURI(objectType):\"\"))},PermissionManagementService.prototype.SearchActor=function(search,type,includeUser){console.log(\"search actor!\");var result=this.$q.defer(),url=this.cfg.WebApiUrl+\"permission/management/searchactor\";return this.$log.info(\"Searching Actor: \"+name+\"/\"+type),this.$http.post(url,{Search:search,Type:type,IncludeUser:!angular.isDefined(includeUser)||includeUser}).success(function(data,status,headers,config){result.resolve(data)}).error(function(data,status,headers,config){result.reject(data)}),result.promise},PermissionManagementService.prototype.SearchContext=function(search,type){var result=this.$q.defer(),url=this.cfg.WebApiUrl+\"permission/management/searchcontext\";return this.$log.debug(\"Searching Permission Context: \"+name+\"/\"+type),this.$http.post(url,{Search:search,Type:type}).success(function(data,status,headers,config){result.resolve(data)}).error(function(data,status,headers,config){result.reject(data)}),result.promise},PermissionManagementService}();account.accountModule.factory(\"permissionManagementService\",[\"$http\",\"$q\",\"$log\",\"cfg\",\"$templateCache\",\"$modal\",function($http,$q,$log,cfg,$templateCache,$modal){return new PermissionManagementService($http,$q,$log,cfg,$templateCache,$modal)}])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var SearchValueService=function(){function SearchValueService($rootScope){this.searches={},this.counter=0,this.routeName=\"\";var self=this;$rootScope.$on(\"$stateChangeStart\",function(event,toState,toParams,fromState,fromParams){self.routeName=toState.name;for(var key in self.searches)self.searches.hasOwnProperty(key)&&(angular.isArray(self.searches[key].routes)||(key.routes=[]),console.log(self.searches[key].routes,\"ermm??<<-----\"),self.searches[key].routes.push(toState.name))})}return SearchValueService.prototype.reset=function(){this.searches={}},SearchValueService.prototype.getSearchValue=function(key){var data=this.searches[key];return data?data.value:\"\"},SearchValueService.prototype.setSearchValue=function(key,val){return arguments.length<1?null:(1===arguments.length&&(val=key,key=this.counter,this.counter++),this.searches[key]={value:val,initRoute:this.routeName,routes:[]},this.searches[key])},SearchValueService.$inject=[\"$rootScope\"],SearchValueService}();angular.module(\"cr.account\").service(\"searchValueService\",SearchValueService)}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var UserPermissionService=function(){function UserPermissionService($q,currentUser,permissionManagementService,$rootScope){var _this=this;this.$q=$q,this.currentUser=currentUser,this.permissionManagementService=permissionManagementService,this.$rootScope=$rootScope,this.userPermissions=null,this.fetchPermission=function(defered,force){if(!force&&_this.userPermissions)defered.resolve(_this.userPermissions);else{if(_this.resolutionPromise)return _this.resolutionPromise;_this.currentUser.isAuthenticated()?(_this.resolutionPromise=defered.promise,_this.permissionManagementService.GetUserPermissions().then(function(data){_this.userPermissions={};for(var prop in data.PermissionValues){var d=data.PermissionValues[prop];_this.userPermissions[d.Key]=d.Value}_this.resolutionPromise=null,defered.resolve(_this.userPermissions)},function(error){_this.resolutionPromise=null,defered.reject(error)})):defered.reject()}},$rootScope.$on(\"login\",function(ev,args){_this.userPermissions=null,console.log(\"LOGIN: \")}),$rootScope.$on(\"logout\",function(ev,args){console.log(\"LOGOUT: \"),_this.userPermissions=null})}return UserPermissionService.prototype.isAllowed=function(name,contextId){if(this.userPermissions&&this.permissionList){var propId=this.permissionList[name.toLocaleLowerCase()];if(!propId)return!1;var key=(contextId?contextId:\"1\")+\"_\"+propId;return!!this.userPermissions[key]||(key=\"1_\"+propId,!!this.userPermissions[key])}return!this.resolutionPromise&&(this.cachePermissions(),!1)},UserPermissionService.prototype.getPermission=function(permissionNames,contextId){var _this=this,defered=this.$q.defer();return this.cachePermissions().then(function(data){defered.resolve({loggedOn:_this.currentUser.isAuthenticated(),hasPermission:_this.isAllowed(permissionNames,contextId)})},function(error){defered.resolve({loggedOn:_this.currentUser.isAuthenticated(),hasPermission:!1})}),defered.promise},UserPermissionService.prototype.cachePermissions=function(force){var _this=this,defered=this.$q.defer();return null==this.permissionList?(this.permissionList={},this.permissionManagementService.PermissionList().then(function(data){angular.forEach(data,function(perm){_this.permissionList[perm.FullName.toLowerCase()]=perm.Id}),_this.fetchPermission(defered,!1)},function(error){defered.reject(error),_this.permissionList=null})):this.fetchPermission(defered,force),defered.promise},UserPermissionService}();angular.module(\"cr.account\").service(\"userPermission\",[\"$q\",\"currentUser\",\"permissionManagementService\",\"$rootScope\",function($q,currentUser,permissionManagementService,$rootScope){return new UserPermissionService($q,currentUser,permissionManagementService,$rootScope)}])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var accountDetailCtrl=function(){function accountDetailCtrl($scope,$state,accountService,authenticationService,$stateParams,$log){this.$scope=$scope,this.$state=$state,this.accountService=accountService,this.authenticationService=authenticationService,this.$stateParams=$stateParams,this.$log=$log.getInstance(\"accountDetail\")}return accountDetailCtrl.$inject=[\"$scope\",\"$state\",\"accountService\",\"authenticationService\",\"$stateParams\",\"$log\"],accountDetailCtrl}();account.accountDetailCtrl=accountDetailCtrl}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var changePasswordCtrl=function(){function changePasswordCtrl(promiseTracker,changePasswordData,changePasswordForm,accountService,authenticationService,$modalInstance,$stateParams,$scope,$log,$translateService){var _this=this;this.accountService=accountService,this.authenticationService=authenticationService,this.$modalInstance=$modalInstance,this.$stateParams=$stateParams,this.$scope=$scope,this.$translateService=$translateService,this.ChangePassword=function(form){if(_this.tracker.active())return void console.log(\"Tracker active\");console.log(\"form: \"+angular.toJson(form)),_this.$scope.errorMessage=null,console.log(\"Change password of userId: \"+form.userId+\" / \"+form.token+\" / \"+form.NewPassword),_this.$scope.errorMessage=null;var promise=_this.accountService.ChangePassword(form.userId,form.token,form.CurrentPassword,form.NewPassword);_this.tracker.addPromise(promise),promise.then(function(data){_this.$modalInstance.close(\"#CHANGEPASSWORDSUCCESS\")},function(error){error&&error.hasOwnProperty(\"ErrorCode\")?_this.$scope.errorMessage=cr.account.AccountErrorCode[error.ErrorCode].toUpperCase():_this.$modalInstance.dismiss(error)})},this.$log=$log.getInstance(\"changePasswordCtrl\"),this.tracker=promiseTracker(),$scope.tracker=this.tracker,console.log(\"formdata: \"+angular.toJson(changePasswordForm)),this.$log.info(\"changePasswordData:\"+angular.toJson(changePasswordData)),$scope.formOptions={context:\"Account\",uniqueFormId:\"changePassword\",hideSubmit:!0},$scope.changePasswordData=changePasswordData,$scope.changePasswordFields=changePasswordForm.data,$scope.context=\"Account\",$scope.ChangePassword=function(formData){return _this.ChangePassword(formData)}}return changePasswordCtrl}();account.accountModule.controller(\"changePasswordCtrl\",[\"promiseTracker\",\"changePasswordData\",\"changePasswordForm\",\"accountService\",\"authenticationService\",\"$modalInstance\",\"$stateParams\",\"$scope\",\"$log\",\"$translateService\",\"currentUser\",changePasswordCtrl])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var confirmUserCtrl=function(){function confirmUserCtrl(promiseTracker,confirmUserForm,accountService,authenticationService,$modalInstance,$stateParams,$scope,$log,$translateService){var _this=this;this.accountService=accountService,this.authenticationService=authenticationService,this.$modalInstance=$modalInstance,this.$stateParams=$stateParams,this.$scope=$scope,this.$translateService=$translateService,this.ConfirmUser=function(form){if(_this.tracker.active())return void console.log(\"Tracker active\");console.log(\"token: \"+angular.toJson(_this.$scope.confirmUserData)),_this.$scope.errorMessage=null;var promise=_this.authenticationService.confirmUser(_this.$scope.confirmUserData.token,_this.$scope.activation.UserView.UserId);_this.tracker.addPromise(promise),promise.then(function(data){console.log(\"data=\"+angular.toJson(data)),_this.$modalInstance.close({action:\"activate\",data:data})},function(error){console.log(\"error=\"+angular.toJson(error)),error&&error.hasOwnProperty(\"ErrorCode\")?_this.$scope.errorMessage=cr.account.AccountErrorCode[error.ErrorCode].toUpperCase():_this.$modalInstance.dismiss(error)})},this.$log=$log.getInstance(\"confirmUser\"),this.tracker=promiseTracker(),$scope.tracker=this.tracker,console.log(\"formdata: \"+angular.toJson(confirmUserForm)),$scope.formOptions={context:\"Account\",uniqueFormId:\"confirmUser\",hideSubmit:!0},$scope.confirmUserData={token:null},$scope.close=function(action){_this.$log.info(\"Close with action: \"+action),_this.$modalInstance.close({action:action})},$scope.confirmUserFields=confirmUserForm.data,$scope.context=\"Account\",$scope.ConfirmUser=function(data){return _this.ConfirmUser(data)}}return confirmUserCtrl.prototype.processAccountError=function(errorData){if(errorData&&errorData.hasOwnProperty(\"ErrorCode\")){cr.account.AccountErrorCode[errorData.ErrorCode];switch(errorData.ErrorCode){default:console.log(\"$translateService: \"+this.$translateService),this.$scope.errorMessage=cr.account.AccountErrorCode[errorData.ErrorCode].toUpperCase()}}},confirmUserCtrl}();account.accountModule.controller(\"confirmUserCtrl\",[\"promiseTracker\",\"confirmUserForm\",\"accountService\",\"authenticationService\",\"$modalInstance\",\"$stateParams\",\"$scope\",\"$log\",\"$translateService\",\"currentUser\",confirmUserCtrl])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var formCurrentUserController=function(){function formCurrentUserController($scope,currentUser){var _this=this;this.$scope=$scope,this.currentUser=currentUser,console.log(\"text controller: zen\"),console.log(angular.toJson($scope.options)),$scope.userView=function(){return _this.currentUser.userView()},$scope.changeUser=function(){_this.currentUser.userView(null)}}return formCurrentUserController}();account.accountModule.controller(\"formCurrentUserController\",[\"$scope\",\"currentUser\",formCurrentUserController])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var loginCtrl=function(){function loginCtrl($rootScope,currentApplication,$localStorage,promiseTracker,accountService,applicationService,$modal,$stateParams,$scope,$log,$state,authenticationService,formDefinition,$translateService,currentUser,popupService,notificationService,formPopupService){\nvar _this=this;this.$rootScope=$rootScope,this.currentApplication=currentApplication,this.$localStorage=$localStorage,this.accountService=accountService,this.applicationService=applicationService,this.$modal=$modal,this.$stateParams=$stateParams,this.$scope=$scope,this.$state=$state,this.authenticationService=authenticationService,this.formDefinition=formDefinition,this.$translateService=$translateService,this.currentUser=currentUser,this.popupService=popupService,this.notificationService=notificationService,this.formPopupService=formPopupService,this.ProcessCreateUserResponse=function(createUserRequest,data){if(data.Success)return _this.currentUser.userView(data.UserView),data.User&&_this.currentUser.setUser(data,_this.$scope.remindMe),void(data.ActivationNeeded?_this.$state.go(\"account/message.message\",{message:\"CONF_CREATEUSER\",title:\"CREATEUSER\"},{reload:!0}):_this.$state.go(\"account/message.message\",{message:\"CONF_WELCOMEUSER\",title:\"WELCOMEUSER\"},{reload:!0}));switch(data.ErrorCode){case account.AccountErrorCode.UserAlreadyExists:_this.ProcessUserAlreadyExists(data);break;case account.AccountErrorCode.PasswordCreationRequired:console.log(\"We invite the user to create a password!\");var obj={},params={context:_this.$scope.context,xvalidationCallback:function(formData){}};_this.formPopupService.displayModal(\"#PASSWORDREQUIRED\",\"modules/account/resources/changePassword.json\",obj,params).then(function(data){console.log(\"password provided: \"+angular.toJson(data)),console.log(\"createuserrequest: \"+angular.toJson(createUserRequest)),createUserRequest.Password=data.object.NewPassword,_this.accountService.CreateUser(createUserRequest).then(function(data){return _this.ProcessCreateUserResponse(createUserRequest,data)})},function(error){console.log(\"Async failure: \"+angular.toJson(error)),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,angular.toJson(error))});break;default:var errorMessage=\"#\"+cr.account.AccountErrorCode[data.ErrorCode].toUpperCase();console.log(\"errorcode:\"+cr.account.AccountErrorCode[data.ErrorCode]),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,errorMessage)}},this.ProcessUserAlreadyExists=function(data){console.log(\"modal: \"+angular.toJson(data.DuplicateUsers)),_this.accountService.SelectUser(data.DuplicateUsers,{ForceAllowed:data.ForceAllowed,Title:data.ForceAllowed?\"MAYBEWEKNOWYOU\":\"WEKNOWYOU\"}).then(function(selectUser){switch(console.log(\"select user in signupctrl: \"+angular.toJson(selectUser)),selectUser.Action){case\"Select\":case\"Login\":_this.$state.go(\"account/signin.login\",{UserViewString:angular.toJson(selectUser.UserView)},{reload:!0});break;case\"Force\":var cuq={ForceNew:!0,User:data.ContactInformation,Identities:[data.Identity],Password:_this.$scope.loginData.password};console.log(\"CUQ: \"+angular.toJson(cuq)),_this.accountService.CreateUser(cuq).then(function(data){return _this.ProcessCreateUserResponse(cuq,data)})}})},this.tracker=promiseTracker(),this.$log=$log.getInstance(\"loginCtrl\"),this.$scope.remindMe=!0,this.$scope.oAuthFlow=!1,this.$scope.tracker=this.tracker,this.$scope.context=\"Account\",this.$scope.lostPwd=function(){return _this.LostPwd()},this.$scope.changeUser=function(){_this.$scope.userView(null)},this.$scope.activation={token:\"\"},this.$scope.login=function(){return _this.loginUser()},this.$scope.logout=function(){return _this.currentUser.logout()},this.$scope.oAuth2Login=function(provider,options){return _this.oAuth2Login(provider,options)},this.$scope.oAuth1Login=function(provider){return _this.oAuth1Login(provider)},this.$scope.userView=this.currentUser.userView,this.$scope.applicationDetails=function(){return _this.currentApplication.currentApplication()},this.$scope.AccessToken=function(){return _this.$localStorage.AccessToken},this.$scope.currentUser=this.currentUser.getUser(),this.$scope.redirectUri=\"\",this.$scope.test=function(msg,msgTitle){_this.$state.go(\"account/message.message\",{message:msg,title:msgTitle})},$scope.loginFormDefinition=formDefinition.data,$scope.loginData={username:null,password:null,userView:this.currentUser.userView(),changeUser:function(){_this.$scope.changeUser()}},$scope.loginFormOptions={context:\"Account\",uniqueFormId:\"loginFormTest\",hideSubmit:!0},this.$scope.$watch(function(){return _this.currentUser.userView()},function(newValue){$scope.loginData.userView=newValue});var params=this.$state.params;switch($state.current.name){case\"account/signin\":console.log(\"signin\"),this.oAuthGrant();break;case\"account/signin.login\":var userView=angular.fromJson($state.params.UserViewString);console.log(\"Login: \"+angular.toJson(userView)),this.currentUser.userView(userView);break;case\"account/signin.redirect\":var redirect=$state.params.StringifiedRedirectRoute,parsed={};redirect&&(parsed=angular.fromJson(redirect)),this.$scope.redirectUri=parsed.redirect?parsed.redirect:\"\",this.$scope.redirectParams=parsed.params?parsed.params:null;break;case\"account/message\":console.log(\"display a message: \"+$state.params.message);break;case\"account/signin.password\":console.log(\"Change password for user \"+$state.params.id+\"/\"+$state.params.token);var scope=this.$scope.$new();this.$modal.open({scope:scope,templateUrl:\"modules/account/templates/changepassword.html\",resolve:{changePasswordForm:function($http){return $http({method:\"GET\",url:\"modules/account/resources/changePassword.json\"})},changePasswordData:function(){return{userId:$state.params.id,token:$state.params.token}}},controller:\"changePasswordCtrl\",show:!0}).result.then(function(message){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,message,_this.$scope)});break;case\"signin-oauth-grant\":this.$scope.oAuthFlow=!0;var force=!1;params.display&&\"force\"==params.display&&(this.currentUser.logout(),force=!0),this.$scope.ClientId=params.client_id,force||this.oAuthGrant();break;case\"account/signin.confirm\":this.authenticationService.confirmUser($state.params.token,$state.params.id).then(function(data){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Info,\"#ACTIVATIONSUCCESS\",_this.$scope)},function(error){console.log(\"merde: \"+angular.toJson(error)),_this.processAuthError(error)}),console.log(\"Confirmation of user and token \"+$state.params.id+\"/\"+$state.params.token)}}return loginCtrl.prototype.oAuthGrant=function(){var app=this.currentApplication.currentApplication();app&&app.oAuth&&this.currentUser.isAuthenticated()?this.authenticationService.oAuthGrant(app.oAuth.clientId,app.oAuth.redirectUri,app.oAuth.state,app.oAuth.responseType,app.oAuth.url,this.currentUser.getUser().Id,this.currentUser.getToken()):this.currentUser.isAuthenticated()&&this.$state.go(this.$scope.redirectUri?this.$scope.redirectUri:\"index\",this.$scope.redirectParams?this.$scope.redirectParams:{})},loginCtrl.prototype.LostPwd=function(){var _this=this;if(this.$scope.errorMessage=null,this.currentUser.userView()){if(this.tracker.active())return;var promise=this.authenticationService.resetPassword(this.currentUser.userView().UserId);return this.tracker.addPromise(promise),promise.then(function(data){console.log(\"data=\"+angular.toJson(data)),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"#RESETPASSWORDSUCCESS\",_this.$scope)},function(error){console.log(\"error=\"+angular.toJson(error)),_this.processAuthError(error)}),void console.log(\"reset pwd:\"+this.currentUser.userView().UserId)}console.log(\"lost pwd\"),this.$modal.open({resolve:{lostUserNameForm:function($http){return $http({method:\"GET\",url:\"modules/account/resources/lostUserName.json\"})},userNameForm:function($http){return $http({method:\"GET\",url:\"modules/account/resources/lostPassword.json\"})}},controller:\"lostPasswordCtrl\",size:\"lg\",templateUrl:\"modules/account/templates/lostpassword.html\",show:!0}).result.then(function(message){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,message,_this.$scope)})},loginCtrl.prototype.oAuth2Login=function(provider,options){this.$scope.errorMessage=null,console.log(\"oauth2 clicked: \"+provider),this.processAccountResponse(this.authenticationService.oAuth2Authenticate(provider,options))},loginCtrl.prototype.processAuthError=function(errorData){var _this=this;if(this.$scope.errorMessage=null,errorData&&errorData.hasOwnProperty(\"ErrorCode\")){cr.account.AccountErrorCode[errorData.ErrorCode];switch(null!=errorData.UserViews&&1==errorData.UserViews.length&&this.currentUser.userView(errorData.UserViews[0]),errorData.ErrorCode){case account.AccountErrorCode.PasswordCreationRequired:console.log(\"user should create a password\");break;case account.AccountErrorCode.AccountCreated:errorData.User&&this.currentUser.setUser(errorData,this.$scope.remindMe),this.$scope.remindMe||(this.$localStorage.AccessToken=null),this.$state.go(\"account/message.message\",{message:\"CONF_WELCOMEUSER\",title:\"WELCOMEUSER\"},{reload:!0});break;case account.AccountErrorCode.UserAlreadyExists:this.ProcessUserAlreadyExists(errorData);break;case account.AccountErrorCode.MultipleUsers:case account.AccountErrorCode.VirtualUser:this.accountService.SelectUser(errorData.UserViews,!0).then(function(selectUser){switch(selectUser.Action){case\"Login\":_this.loginUser()}},function(error){_this.processAuthError(error)});break;case account.AccountErrorCode.AccountNotEnabled:this.$scope.forceAllowed=null!=errorData.User;var modal=this.$modal.open({scope:this.$scope,resolve:{confirmUserForm:function($http){return $http({method:\"GET\",url:\"modules/account/resources/confirmUser.json\"})}},controller:\"confirmUserCtrl\",templateUrl:\"modules/account/templates/confirmuser.html\",show:!0});this.tracker.addPromise(modal.result),this.$scope.activation={token:\"\",UserView:errorData.UserViews[0]},console.log(\"userview: \"+angular.toJson(errorData.UserViews)),modal.result.then(function(data){switch(data.action){case\"later\":_this.$scope.remindMe=!1,_this.processAuthSuccess(errorData);break;case\"resend\":console.log(\"Resend confirmation mail...\"+_this.currentUser.userView().UserId);var promise=(_this.currentUser.userView(),_this.authenticationService.resendConfirmationToken(_this.currentUser.userView().UserId));_this.tracker.addPromise(promise),promise.then(function(data){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Info,\"#ACTIVATIONTOKENRESEND\",_this.$scope)},function(error){console.log(angular.toJson(error)),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,\"#UNEXPECTEDERROR\",_this.$scope)});break;default:console.log(\"modal result: \"+angular.toJson(data)),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Info,\"#ACTIVATIONSUCCESS\",_this.$scope)}},function(error){angular.isObject(error)&&(console.log(\"modal result: \"+angular.toJson(error)),_this.$scope.errorMessage=cr.account.AccountErrorCode[error.ErrorCode].toUpperCase())});break;case account.AccountErrorCode.NotEnoughInfoFromIdentityProvider:var contactInformation=errorData.ContactInformation;this.$state.go(\"account/signup.fillin\",{BCI:angular.toJson(contactInformation),Identity:angular.toJson(errorData.Identity)},{reload:!0});default:console.log(\"errorcode:\"+errorData.ErrorCode),this.$scope.errorMessage=cr.account.AccountErrorCode[errorData.ErrorCode].toUpperCase()}}},loginCtrl.prototype.processAuthSuccess=function(data){this.$scope.errorMessage=null,console.log(\"remindme: \"+this.$scope.remindMe),data.User&&this.currentUser.setUser(data,this.$scope.remindMe),this.$scope.remindMe||(this.$localStorage.AccessToken=null),this.$log.info(\"Login success. User Id: \"+data.User.Id),this.oAuthGrant()},loginCtrl.prototype.processAccountResponse=function(promise){var _this=this;return this.tracker.addPromise(promise),promise.then(function(data){return _this.processAuthSuccess(data)},function(errorData){return _this.processAuthError(errorData)}),promise},loginCtrl.prototype.oAuth1Login=function(provider){this.$scope.errorMessage=null,this.processAccountResponse(this.authenticationService.oAuth1Authenticate(provider))},loginCtrl.prototype.loginUser=function(){this.$scope.errorMessage=null,this.processAccountResponse(this.authenticationService.authenticateByUserName(null!=this.$scope.userView()?this.$scope.userView().UserId:this.$scope.loginData.username,this.$scope.loginData.password)),this.$log.info(\"Login user: \"+this.$scope.username)},loginCtrl}();account.accountModule.controller(\"loginCtrl\",[\"$rootScope\",\"currentApplication\",\"$localStorage\",\"promiseTracker\",\"accountService\",\"applicationService\",\"$modal\",\"$stateParams\",\"$scope\",\"$log\",\"$state\",\"authenticationService\",\"formDefinition\",\"$translateService\",\"currentUser\",\"popupService\",\"notificationService\",\"formPopupService\",loginCtrl])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var lostPasswordCtrl=function(){function lostPasswordCtrl(promiseTracker,lostUserNameForm,userNameForm,accountService,authenticationService,$modalInstance,$stateParams,$scope,$log,$translateService,currentUser){var _this=this;this.accountService=accountService,this.authenticationService=authenticationService,this.$modalInstance=$modalInstance,this.$stateParams=$stateParams,this.$scope=$scope,this.$translateService=$translateService,this.currentUser=currentUser,this.ResetPassword=function(form){if(_this.tracker.active())return void console.log(\"Tracker active\");_this.$scope.errorMessage=null,console.log(\"ResetPassword\"),console.log(\"formData: \"+angular.toJson(form));var promise=_this.authenticationService.resetPassword(null==form?_this.currentUser.userView().UserId:form.username);_this.tracker.addPromise(promise),promise.then(function(data){console.log(\"data=\"+angular.toJson(data)),_this.$modalInstance.close(\"#RESETPASSWORDSUCCESS\")},function(error){console.log(\"error=\"+angular.toJson(error)),_this.processAccountError(error)})},this.LostUserName=function(form){console.log(\"LostUserName\"),console.log(\"formData: \"+angular.toJson(_this.$scope.formData))},this.$log=$log.getInstance(\"lostPasswordCtrl\"),this.tracker=promiseTracker(),$scope.tracker=this.tracker,console.log(\"formdata: \"+angular.toJson(lostUserNameForm)),$scope.formOptions={context:\"Account\",uniqueFormId:\"lostPassword\",hideSubmit:!0},$scope.userNameData={username:null},$scope.userNameFields=userNameForm.data,$scope.context=\"Account\",$scope.userView=currentUser.userView,$scope.ResetPassword=function(form){return _this.ResetPassword(form)},$scope.LostUserName=function(form){return _this.LostUserName(form)},$scope.ChangeUser=function(){_this.currentUser.userView(null)}}return lostPasswordCtrl.prototype.processAccountError=function(errorData){var _this=this;if(errorData&&errorData.hasOwnProperty(\"ErrorCode\")){cr.account.AccountErrorCode[errorData.ErrorCode];switch(errorData.ErrorCode){default:console.log(\"$translateService: \"+this.$translateService),this.$scope.errorMessage=cr.account.AccountErrorCode[errorData.ErrorCode].toUpperCase();break;case account.AccountErrorCode.MultipleUsers:this.accountService.SelectUser(errorData.UserViews,{LoginMode:!1,Title:\"SELECT\"}).then(function(userView){switch(userView.Action){case\"Select\":_this.currentUser.userView(userView.UserView),_this.ResetPassword(null)}})}}},lostPasswordCtrl}();angular.module(\"cr.account\").controller(\"lostPasswordCtrl\",[\"promiseTracker\",\"lostUserNameForm\",\"userNameForm\",\"accountService\",\"authenticationService\",\"$modalInstance\",\"$stateParams\",\"$scope\",\"$log\",\"$translateService\",\"currentUser\",lostPasswordCtrl])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var messageCtrl=function(){function messageCtrl($stateParams,$scope,$state,$translateService){switch(this.$stateParams=$stateParams,this.$scope=$scope,this.$state=$state,this.$translateService=$translateService,$state.current.name){case\"account/message.message\":console.log(\"state params:\"+angular.toJson($stateParams)),console.log(\"display a message: \"+$state.params.message),this.$scope.message=$state.params.message,this.$scope.title=$state.params.title,this.$scope.title||(this.$scope.title=$state.params.message+\"_TITLE\")}}return messageCtrl}();angular.module(\"cr.account\").controller(\"accountMessageCtrl\",[\"$stateParams\",\"$scope\",\"$state\",\"$translateService\",messageCtrl])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var CreateUserRequest=function(){function CreateUserRequest(){}return CreateUserRequest}();account.CreateUserRequest=CreateUserRequest;var SelectUserResult=function(){function SelectUserResult(){}return SelectUserResult}();account.SelectUserResult=SelectUserResult}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var ApplicationDetailResponse=function(){function ApplicationDetailResponse(){}return ApplicationDetailResponse}();account.ApplicationDetailResponse=ApplicationDetailResponse}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){!function(AccountErrorCode){AccountErrorCode[AccountErrorCode.NA=0]=\"NA\",AccountErrorCode[AccountErrorCode.UnknownUser=11]=\"UnknownUser\",AccountErrorCode[AccountErrorCode.WrongPassword=12]=\"WrongPassword\",AccountErrorCode[AccountErrorCode.AlreadyActive=13]=\"AlreadyActive\",AccountErrorCode[AccountErrorCode.WrongActivationCode=14]=\"WrongActivationCode\",AccountErrorCode[AccountErrorCode.AccountNotEnabled=15]=\"AccountNotEnabled\",AccountErrorCode[AccountErrorCode.OAuthAccessTokenError=16]=\"OAuthAccessTokenError\",AccountErrorCode[AccountErrorCode.UnknownIdentity=17]=\"UnknownIdentity\",AccountErrorCode[AccountErrorCode.UserNameAlreadyExists=18]=\"UserNameAlreadyExists\",AccountErrorCode[AccountErrorCode.IdentityAlreadyExists=19]=\"IdentityAlreadyExists\",AccountErrorCode[AccountErrorCode.UserAlreadyExists=20]=\"UserAlreadyExists\",AccountErrorCode[AccountErrorCode.UserAlreadyActive=21]=\"UserAlreadyActive\",AccountErrorCode[AccountErrorCode.NotEnoughInfoFromIdentityProvider=22]=\"NotEnoughInfoFromIdentityProvider\",AccountErrorCode[AccountErrorCode.IncompleteUserProfile=23]=\"IncompleteUserProfile\",AccountErrorCode[AccountErrorCode.MultipleUsers=24]=\"MultipleUsers\",AccountErrorCode[AccountErrorCode.WillBeLinkedTo=25]=\"WillBeLinkedTo\",AccountErrorCode[AccountErrorCode.UserCannotBeActivated=26]=\"UserCannotBeActivated\",AccountErrorCode[AccountErrorCode.Unauthorized=27]=\"Unauthorized\",AccountErrorCode[AccountErrorCode.VirtualUser=28]=\"VirtualUser\",AccountErrorCode[AccountErrorCode.AccountCreated=29]=\"AccountCreated\",AccountErrorCode[AccountErrorCode.PasswordCreationRequired=30]=\"PasswordCreationRequired\"}(account.AccountErrorCode||(account.AccountErrorCode={}));var User=(account.AccountErrorCode,function(){function User(){}return User}());account.User=User}(account=cr.account||(cr.account={}))}(cr||(cr={}));var __extends=this&&this.__extends||function(d,b){function __(){this.constructor=d}for(var p in b)b.hasOwnProperty(p)&&(d[p]=b[p]);d.prototype=null===b?Object.create(b):(__.prototype=b.prototype,new __)},cr;!function(cr){var account;!function(account){!function(PermissionErrorCode){PermissionErrorCode[PermissionErrorCode.NA=0]=\"NA\",PermissionErrorCode[PermissionErrorCode.AlreadyExists=1]=\"AlreadyExists\",PermissionErrorCode[PermissionErrorCode.NotFound=2]=\"NotFound\",PermissionErrorCode[PermissionErrorCode.InvalidData=3]=\"InvalidData\",PermissionErrorCode[PermissionErrorCode.CyclicRelation=4]=\"CyclicRelation\",PermissionErrorCode[PermissionErrorCode.NotAllowed=400]=\"NotAllowed\"}(account.PermissionErrorCode||(account.PermissionErrorCode={}));account.PermissionErrorCode;!function(PermissionResolutionMode){PermissionResolutionMode[PermissionResolutionMode.First=1]=\"First\",PermissionResolutionMode[PermissionResolutionMode.Smallest=2]=\"Smallest\",PermissionResolutionMode[PermissionResolutionMode.Biggest=3]=\"Biggest\"}(account.PermissionResolutionMode||(account.PermissionResolutionMode={}));account.PermissionResolutionMode;!function(PermissionDataType){PermissionDataType[PermissionDataType.String=1]=\"String\",PermissionDataType[PermissionDataType.Numeric=2]=\"Numeric\",PermissionDataType[PermissionDataType.Double=3]=\"Double\",PermissionDataType[PermissionDataType.Date=4]=\"Date\",PermissionDataType[PermissionDataType.Boolean=5]=\"Boolean\"}(account.PermissionDataType||(account.PermissionDataType={}));var PermissionObject=(account.PermissionDataType,function(){function PermissionObject(){}return PermissionObject}());account.PermissionObject=PermissionObject;var PermissionContextValueView=function(){function PermissionContextValueView(){}return PermissionContextValueView}();account.PermissionContextValueView=PermissionContextValueView;var PermissionContextActorView=function(){function PermissionContextActorView(){}return PermissionContextActorView}();account.PermissionContextActorView=PermissionContextActorView;var PermissionContext=function(_super){function PermissionContext(){_super.apply(this,arguments)}return __extends(PermissionContext,_super),PermissionContext}(PermissionObject);account.PermissionContext=PermissionContext;var PermissionResponse=function(){function PermissionResponse(){}return PermissionResponse}();account.PermissionResponse=PermissionResponse;var PermissionContextResponse=function(_super){function PermissionContextResponse(){_super.apply(this,arguments)}return __extends(PermissionContextResponse,_super),PermissionContextResponse}(PermissionResponse);account.PermissionContextResponse=PermissionContextResponse;var PermissionActorResponse=function(_super){function PermissionActorResponse(){_super.apply(this,arguments)}return __extends(PermissionActorResponse,_super),PermissionActorResponse}(PermissionResponse);account.PermissionActorResponse=PermissionActorResponse;var CrudOperation=function(){function CrudOperation(){}return CrudOperation}();account.CrudOperation=CrudOperation;var PermissionObjectOperation=function(_super){function PermissionObjectOperation(){_super.apply(this,arguments)}return __extends(PermissionObjectOperation,_super),PermissionObjectOperation}(CrudOperation);account.PermissionObjectOperation=PermissionObjectOperation;var PermissionTypeOperation=function(_super){function PermissionTypeOperation(){_super.apply(this,arguments)}return __extends(PermissionTypeOperation,_super),PermissionTypeOperation}(CrudOperation);account.PermissionTypeOperation=PermissionTypeOperation;var PermissionContextOperation=function(_super){function PermissionContextOperation(){_super.apply(this,arguments)}return __extends(PermissionContextOperation,_super),PermissionContextOperation}(PermissionObjectOperation);account.PermissionContextOperation=PermissionContextOperation;var PermissionActorOperation=function(_super){function PermissionActorOperation(){_super.apply(this,arguments)}return __extends(PermissionActorOperation,_super),PermissionActorOperation}(PermissionObjectOperation);account.PermissionActorOperation=PermissionActorOperation;var PermissionValueOperationItem=function(){function PermissionValueOperationItem(){}return PermissionValueOperationItem}();account.PermissionValueOperationItem=PermissionValueOperationItem;var PermissionValueOperation=function(){function PermissionValueOperation(){}return PermissionValueOperation}();account.PermissionValueOperation=PermissionValueOperation;var PermissionType=function(){function PermissionType(){}return PermissionType}();account.PermissionType=PermissionType;var ContextListOperation=function(_super){function ContextListOperation(){_super.apply(this,arguments)}return __extends(ContextListOperation,_super),ContextListOperation}(CrudOperation);account.ContextListOperation=ContextListOperation;var MembershipOperation=function(_super){function MembershipOperation(){_super.apply(this,arguments)}return __extends(MembershipOperation,_super),MembershipOperation}(CrudOperation);account.MembershipOperation=MembershipOperation;var RelationOperation=function(){function RelationOperation(){}return RelationOperation}();account.RelationOperation=RelationOperation;var PermissionRelation=function(){function PermissionRelation(){}return PermissionRelation}();account.PermissionRelation=PermissionRelation;var PermissionValue=function(){function PermissionValue(){}return PermissionValue}();account.PermissionValue=PermissionValue;var PermissionActor=function(_super){function PermissionActor(){_super.apply(this,arguments)}return __extends(PermissionActor,_super),PermissionActor}(PermissionObject);account.PermissionActor=PermissionActor,function(CrudOperationType){CrudOperationType[CrudOperationType.Add=1]=\"Add\",CrudOperationType[CrudOperationType.Update=2]=\"Update\",CrudOperationType[CrudOperationType.AddOrUpdate=3]=\"AddOrUpdate\",CrudOperationType[CrudOperationType.Delete=4]=\"Delete\"}(account.CrudOperationType||(account.CrudOperationType={}));account.CrudOperationType}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var PermissionActorController=function(){function PermissionActorController($modal,$scope,permissionManagementService,$stateParams,$log,$state,formDefinition,promiseTracker,notificationService,currentActor){var _this=this;switch(this.$modal=$modal,this.$scope=$scope,this.permissionManagementService=permissionManagementService,this.$state=$state,this.notificationService=notificationService,this.currentActor=currentActor,this.sendMessage=function(){},this.SubmitForm=function(){console.log(\"submit...\"+angular.toJson(_this.$scope.contextOperation));account.CrudOperationType.AddOrUpdate;_this.$scope.actorOperation.OperationType=_this.$scope.edit?account.CrudOperationType.Update:account.CrudOperationType.Add,_this.ProcessPermissionResponse(_this.permissionManagementService.ActorOperation(_this.$scope.actorOperation))},this.DeleteMembershipContext=function(actorId,contextId){_this.notificationService.showMessage(\"#CONFIRMDELETE\",\"#CONFIRM\",\"YES|*NO\",_this.$scope).then(function(button){if(\"YES\"==button){var relOp=_this.BuildRelationOperation(actorId,account.CrudOperationType.AddOrUpdate,contextId,account.CrudOperationType.Delete);_this.permissionManagementService.RelationOperation(relOp).then(function(actorResponse){actorResponse.Actor&&(_this.$scope.currentActor=actorResponse.Actor),console.log(\"repsones:\"+angular.toJson(actorResponse)),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"#DELETESUCCESS\",_this.$scope)},function(error){return _this.ProcessError(error)})}})},this.AddMembershipContext=function(actorId){_this.permissionManagementService.SelectContext().then(function(contextId){var relOp=_this.BuildRelationOperation(actorId,account.CrudOperationType.AddOrUpdate,contextId,account.CrudOperationType.Add);_this.permissionManagementService.RelationOperation(relOp).then(function(actorResponse){actorResponse.Actor&&(_this.$scope.currentActor=actorResponse.Actor),console.log(\"repsones:\"+angular.toJson(actorResponse))},function(error){return _this.ProcessError(error)})})},this.ProcessError=function(errorData){angular.isObject(errorData)&&_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,\"#\"+account.PermissionErrorCode[errorData.ErrorCode].toUpperCase(),_this.$scope)},this.$log=$log.getInstance(\"PermissionActorController\"),$scope.GoBack=function(){return $state.go($scope.edit?\"^.overview\":\"permission.actor.list\")},this.tracker=promiseTracker(),$scope.callback=$stateParams.callback,$scope.context=\"Permission\",$scope.search=\"\",$scope.currentActor=currentActor,$scope.actorId=currentActor?currentActor.Id:\"0\",$scope.Save=function(){return _this.Save()},$scope.DeleteActor=function(){return _this.DeleteActor()},$scope.AddMembership=function(){return _this.AddMembership()},$scope.DeleteMembership=function(actorId){return _this.DeleteMembership(actorId)},$scope.AddMembershipContext=function(actorId){return _this.AddMembershipContext(actorId)},$scope.DeleteMembershipContext=function(actorId,contextId){return _this.DeleteMembershipContext(actorId,contextId)},$scope.SetActor=function(actorId){return _this.$state.go(\"^.overview\",{actorId:actorId},{reload:!0})},$scope.PermissionTemplate=function(){$state.go(\"^.template\",{actorId:_this.currentActor.Id,contextId:0},{reload:!0})},$scope.values={},$scope.Submit=function(){return _this.SubmitForm()},$scope.formDefinition=formDefinition.data,$scope.formOptions={context:\"Permission\",uniqueFormId:\"actorForm\",hideSubmit:!0},$scope.edit=!1,\"permission.actor.item.overview\"==$state.current.name,currentActor&&($scope.actorOperation={Id:currentActor.Id,Reference:currentActor.Reference,Type:currentActor.Type,Name:currentActor.Name,Description:currentActor.Description}),this.$log.info(\"Current state: \"+$state.current.name),$state.current.name){case\"permission.actor.item.edit\":case\"permission.actor.item.overview\":$scope.edit=!0}}return PermissionActorController.prototype.Refresh=function(){var _this=this;this.permissionManagementService.GetActor(this.currentActor.Id).then(function(actor){_this.currentActor=actor})},PermissionActorController.prototype.AddMembership=function(){var _this=this;this.permissionManagementService.SelectActor().then(function(actorId){console.log(\"my membership: \"+actorId);var relOp=new account.RelationOperation;relOp.Actor=_this.currentActor.Id,relOp.MembershipOperations=[];var mo=new account.MembershipOperation;mo.Id=actorId,mo.OperationType=cr.account.CrudOperationType.Add,relOp.MembershipOperations.push(mo),_this.permissionManagementService.RelationOperation(relOp).then(function(actorResponse){actorResponse.Actor&&(_this.$scope.currentActor=actorResponse.Actor),console.log(\"repsones:\"+angular.toJson(actorResponse))},function(error){return _this.ProcessError(error)})})},PermissionActorController.prototype.BuildRelationOperation=function(actorId,actorOperationType,contextId,contextOperationType){var relOp=new account.RelationOperation;relOp.Actor=this.currentActor.Id,relOp.MembershipOperations=[];var mo=new account.MembershipOperation;if(mo.Id=actorId,mo.OperationType=actorOperationType,relOp.MembershipOperations.push(mo),contextId){mo.ContextListOperations=[];var clo=new account.ContextListOperation;clo.Id=contextId,clo.OperationType=contextOperationType,mo.ContextListOperations.push(clo)}return relOp},PermissionActorController.prototype.DeleteMembership=function(actorId){var _this=this;this.notificationService.showMessage(\"#CONFIRMDELETE\",\"#CONFIRM\",\"YES|*NO\",this.$scope).then(function(button){if(\"YES\"==button){var relOp=new account.RelationOperation;relOp.Actor=_this.currentActor.Id,relOp.MembershipOperations=[];var mo=new account.MembershipOperation;mo.Id=actorId,mo.OperationType=cr.account.CrudOperationType.Delete,relOp.MembershipOperations.push(mo),_this.permissionManagementService.RelationOperation(relOp).then(function(actorResponse){actorResponse.Actor&&(_this.$scope.currentActor=actorResponse.Actor),console.log(\"repsones:\"+angular.toJson(actorResponse))},function(error){return _this.ProcessError(error)})}})},PermissionActorController.prototype.DeleteActor=function(){var _this=this;this.notificationService.showMessage(\"#CONFIRMDELETE\",\"#CONFIRM\",\"YES|*NO\",this.$scope).then(function(button){\"YES\"==button&&_this.permissionManagementService.ActorOperation({Id:_this.currentActor.Id,OperationType:account.CrudOperationType.Delete}).then(function(success){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"#DELETESUCCESS\",_this.$scope),_this.$state.go(\"^.^.list\",null,{reload:!0})},function(errorData){return _this.ProcessError(errorData)})})},PermissionActorController.prototype.Save=function(){},PermissionActorController.prototype.ProcessPermissionResponse=function(promise){var _this=this;return this.tracker.addPromise(promise),promise.then(function(data){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"#SAVED\",_this.$scope);\nvar cst=data;cst.Actor?_this.$state.go(\"permission.actor.item.overview\",{actorId:cst.Actor.Id},{reload:!0}):_this.$scope.actorId&&_this.$state.go(\"permission.actor.item.overview\",{actorId:_this.$scope.actorId},{reload:!0})},function(errorData){_this.ProcessError(errorData)}),promise},PermissionActorController}();account.accountModule.controller(\"permissionActorController\",[\"$modal\",\"$scope\",\"permissionManagementService\",\"$stateParams\",\"$log\",\"$state\",\"formDefinition\",\"promiseTracker\",\"notificationService\",\"currentActor\",PermissionActorController])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var PermissionActorSearchCtrl=function(){function PermissionActorSearchCtrl($scope,permissionManagementService,$log,$state,promiseTracker,$http,accountService,searchValueService){var _this=this;this.$scope=$scope,this.permissionManagementService=permissionManagementService,this.$state=$state,this.accountService=accountService,this.searchValueService=searchValueService,this.key=\"ActorContextSearch\",this.$log=$log.getInstance(\"PermissionController\"),$scope.SetActorFilter=function(filter){_this.isDisabled(filter)||($scope.searchFilter=filter)},$scope.SelectUserView=function(userView){return _this.SelectUserView(userView)},$scope.SelectRole=function(role){return _this.SelectRole(role)},$scope.isDisabled=function(context){return _this.isDisabled(context)},$scope.context=\"Permission\",$scope.search=this.searchValueService.getSearchValue(this.key),$scope.searchFilter=\"USER\",$scope.userSearchResult=[],$scope.actorList=[],this.permissionManagementService.GetFormDefinition(\"searchactor\").then(function(data){$scope.actorSearchFormDefinition=data}),$scope.actorSearchFormDefinition={},$scope.formOptions={context:\"Permission\",uniqueFormId:\"contextForm\",hideSubmit:!0},$scope.userSearchData={},$scope.SetEnhancedSearch=function(val){_this.$scope.enhancedSearch=val},$scope.Search=function(){return _this.Search()},$scope.defaultSelected&&$scope.SetActorFilter($scope.defaultSelected.toUpperCase()),$scope.search&&this.Search()}return PermissionActorSearchCtrl.prototype.SelectUserView=function(userView){var _this=this,actorOperation=new account.PermissionActorOperation;actorOperation.Id=userView.UserId,actorOperation.Type=\"user\",actorOperation.Reference=userView.UserId,actorOperation.Name=userView.LastName+\" \"+userView.FirstName,actorOperation.OperationType=account.CrudOperationType.AddOrUpdate;var promise=this.permissionManagementService.ActorOperation(actorOperation);promise.then(function(resp){_this.$scope.select({actorId:resp.Actor.Id})})},PermissionActorSearchCtrl.prototype.isDisabled=function(context){var disabled=this.$scope.disable;return!!disabled&&disabled.toUpperCase().split(\",\").indexOf(context)>=0},PermissionActorSearchCtrl.prototype.SelectRole=function(role){this.$scope.select({actorId:role.Id})},PermissionActorSearchCtrl.prototype.Search=function(){var promise,_this=this;\"USER\"==this.$scope.searchFilter?(this.$scope.enhancedSearch?(this.searchValueService.reset(),promise=this.accountService.EnhancedSearch(this.$scope.userSearchData.FirstName,this.$scope.userSearchData.LastName,this.$scope.userSearchData.Email)):(this.searchValueService.setSearchValue(this.key,this.$scope.search),promise=this.accountService.EnhancedSearch(null,null,null,this.$scope.search)),promise.then(function(data){_this.$scope.userSearchResult=data.SearchResult},function(error){console.log(angular.toJson(error))})):(this.searchValueService.setSearchValue(this.key,this.$scope.search),console.log(\"Searching for an actor...\"),promise=this.permissionManagementService.SearchActor(this.$scope.search),promise.then(function(data){_this.$scope.actorList=data}))},PermissionActorSearchCtrl}();account.PermissionActorSearchCtrl=PermissionActorSearchCtrl,account.accountModule.controller(\"permissionActorSearchCtrl\",[\"$scope\",\"permissionManagementService\",\"$log\",\"promiseTracker\",\"accountService\",\"$http\",\"searchValueService\",PermissionActorSearchCtrl])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var PermissionContextController=function(){function PermissionContextController($modal,$scope,permissionManagementService,$stateParams,$log,$state,currentContext,formDefinition,promiseTracker,notificationService,permissionGroups,currentActor){var _this=this;switch(this.$modal=$modal,this.$scope=$scope,this.permissionManagementService=permissionManagementService,this.$state=$state,this.currentContext=currentContext,this.notificationService=notificationService,this.permissionGroups=permissionGroups,this.currentActor=currentActor,this.sendMessage=function(){},this.SelectContext=function(){var par=window.opener||window.parent;par.postMessage({callback:_this.$scope.callback,Action:\"Select\",ContextId:_this.currentContext.Id},\"*\")},this.SubmitForm=function(){console.log(\"submit...\"+angular.toJson(_this.$scope.contextOperation));account.CrudOperationType.AddOrUpdate;_this.$scope.contextOperation.OperationType=_this.$scope.edit?account.CrudOperationType.Update:account.CrudOperationType.Add,_this.ProcessPermissionResponse(_this.permissionManagementService.ContextOperation(_this.$scope.contextOperation))},this.ProcessError=function(errorData){angular.isObject(errorData)&&_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,\"#\"+account.PermissionErrorCode[errorData.ErrorCode].toUpperCase(),_this.$scope)},this.$log=$log.getInstance(\"PermissionContextController\"),$scope.GoBack=function(){return $state.go($scope.edit?\"^.overview\":\"permission.context.list\")},this.tracker=promiseTracker(),$scope.callback=$stateParams.callback,$scope.context=\"Permission\",$scope.search=\"\",$scope.currentContext=currentContext,$scope.original={},$scope.values={},$scope.values=angular.copy($scope.original),$scope.currentActor=currentActor,$scope.contextId=currentContext?currentContext.Id:\"0\",$scope.SelectContext=function(){return _this.SelectContext()},$scope.Save=function(){return _this.Save()},$scope.DeleteContext=function(){return _this.DeleteContext()},$scope.Submit=function(){return _this.SubmitForm()},$scope.permissionGroups=permissionGroups,$scope.formDefinition=formDefinition.data,$scope.formOptions={context:\"Permission\",uniqueFormId:\"contextForm\",hideSubmit:!0},$scope.delta={},$scope.edit=!1,\"permission.context.item.overview\"==$state.current.name&&(currentContext.Id||this.$state.go(\"^.^.list\",null,{reload:!0})),currentContext&&($scope.contextOperation={Id:currentContext.Id,Reference:currentContext.Reference,Type:currentContext.Type,Name:currentContext.Name,Description:currentContext.Description}),console.log(\"??\"+angular.toJson($scope.contextOperation)),this.$log.info(\"Current state: \"+$state.current.name),$state.current.name){case\"permission.context.item.edit\":$scope.edit=!0;break;case\"permission.actor.item.template\":}}return PermissionContextController.prototype.DeleteContext=function(){var _this=this;this.notificationService.showMessage(\"#CONFIRMDELETE\",\"#CONFIRM\",\"YES|*NO\",this.$scope).then(function(button){\"YES\"==button&&_this.permissionManagementService.ContextOperation({Id:_this.currentContext.Id,OperationType:account.CrudOperationType.Delete}).then(function(success){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"#DELETESUCCESS\",_this.$scope),_this.$state.go(\"^.^.list\",null,{reload:!0})},function(errorData){return _this.ProcessError(errorData)})})},PermissionContextController.prototype.Save=function(){var changeCount=0,delta={};for(var actor in this.$scope.original){var srcActor=this.$scope.original[actor],trgActor=this.$scope.values[actor];for(var permId in trgActor){var srcPerm=srcActor[permId],trgPerm=trgActor[permId];(srcPerm||trgPerm)&&srcPerm!=trgPerm&&(delta.hasOwnProperty(actor)||(delta[actor]=[]),trgPerm?delta[actor].push({OperationType:\"AddOrUpdate\",PermissionId:permId,Value:trgPerm,ContextId:this.$scope.contextId}):delta[actor].push({OperationType:\"Delete\",PermissionId:permId,ContextId:this.$scope.contextId}),changeCount++)}}if(0==changeCount)return void this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Warning,\"#NOCHANGE\",this.$scope);var operation={ActorOperations:delta};this.ProcessPermissionResponse(this.permissionManagementService.PermissionValueOperation(operation))},PermissionContextController.prototype.ProcessPermissionResponse=function(promise){var _this=this;return this.tracker.addPromise(promise),promise.then(function(data){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"#SAVED\",_this.$scope);var cst=data;console.log(\"caca:\"+_this.$state.current.name),cst.Context?_this.$state.go(\"^.overview\",{contextId:cst.Context.Id,actorId:_this.$scope.currentActor.Id},{reload:!0}):_this.$scope.contextId&&_this.$state.go(\"^.overview\",{contextId:_this.$scope.contextId,actorId:_this.$scope.currentActor.Id},{reload:!0})},function(errorData){_this.ProcessError(errorData)}),promise},PermissionContextController}();angular.module(\"cr.account\").controller(\"permissionContextController\",[\"$modal\",\"$scope\",\"permissionManagementService\",\"$stateParams\",\"$log\",\"$state\",\"currentContext\",\"formDefinition\",\"promiseTracker\",\"notificationService\",\"permissionGroups\",\"currentActor\",PermissionContextController])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var PermissionContextSearchCtrl=function(){function PermissionContextSearchCtrl($scope,permissionManagementService,$log,$state,promiseTracker,searchValueService){var _this=this;this.$scope=$scope,this.permissionManagementService=permissionManagementService,this.$state=$state,this.searchValueService=searchValueService,this.key=\"PermissionContextSearch\",$scope.search=this.searchValueService.getSearchValue(this.key),$scope.context=\"Permission\",$scope.Search=function(toSearch){return _this.Search(toSearch)},$scope.SelectContext=function(ctxView){return _this.$scope.select({contextId:ctxView.Id})},this.Search($scope.search)}return PermissionContextSearchCtrl.prototype.Search=function(toSearch){var _this=this;this.searchValueService.setSearchValue(this.key,toSearch),this.permissionManagementService.SearchContext(toSearch).then(function(data){_this.$scope.contextList=data})},PermissionContextSearchCtrl}();account.PermissionContextSearchCtrl=PermissionContextSearchCtrl,account.accountModule.controller(\"permissionContextSearchCtrl\",[\"$scope\",\"permissionManagementService\",\"$log\",\"promiseTracker\",\"searchValueService\",PermissionContextSearchCtrl])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var PermissionController=function(){function PermissionController($http,$modal,$scope,permissionManagementService,$stateParams,$log,$state,notification,searchValueService,permissionGroups){var _this=this;this.$http=$http,this.$modal=$modal,this.$scope=$scope,this.permissionManagementService=permissionManagementService,this.$state=$state,this.notification=notification,this.permissionGroups=permissionGroups,this.sendMessage=function(){var par=window.opener||window.parent;par.postMessage(\"srch: \"+_this.$scope.search,\"*\")},this.NotificationTest=function(message){_this.notification.addNotification(cr.infrastructure.notification.notificationType.Info,message,{context:\"TEST\"})},this.MessageTest=function(message){console.log(\"msg test\");var prom=_this.notification.showMessage(message,\"Hello\",\"YES|NO|*CANCEL\",_this.$scope);prom.then(function(data){console.log(\"showMessage result: \"+angular.toJson(data))})},this.SetActivePermGroupTab=function(permGroup){_this.$scope.activePermGroupTab=permGroup},this.$log=$log.getInstance(\"PermissionController\"),$scope.callback=$stateParams.callback,$scope.context=\"Permission\",$scope.Manage=function(actorId){$state.go(\"^.manage\",{actorId:actorId})},$scope.SelectActor=function(actorId){console.log(\"custom directive communication: \"+angular.toJson(actorId)),$state.go(\"^.item.overview\",{actorId:actorId})},$scope.SelectContext=function(contextId){console.log(\"custom directive communication: \"+angular.toJson(contextId)),_this.$state.go(\"permission.context.item.overview\",{contextId:contextId})},$scope.SelectPermissionType=function(permType){_this.$state.go(\"^.edit\",{permTypeId:permType.Id},{reload:!0})},$scope.NotificationTest=function(message){console.log(\"http get\"),$http.get(\"http://afuckingurl.com/shit\").then(function(data){},function(error,status){console.log(angular.toJson(error)+\"/\"+angular.toJson(status))}),_this.NotificationTest(message)},$scope.getPermDataTypeName=function(dataType){return cr.account.PermissionDataType[dataType]},$scope.MessageTest=function(message){return _this.MessageTest(message)},$scope.ContextOverview=function(contextView){return _this.ContextOverview(contextView)},$scope.contextList={},$scope.permissionGroups=permissionGroups,$scope.SetActivePermGroupTab=this.SetActivePermGroupTab,searchValueService.reset()}return PermissionController.prototype.ContextOverview=function(contextView){this.$state.href(\"permission.context.item.overview\",{contextId:contextView.Id});this.$state.go(\"permission.context.item.overview\",{contextId:contextView.Id})},PermissionController}();angular.module(\"cr.account\").controller(\"permissionController\",[\"$http\",\"$modal\",\"$scope\",\"permissionManagementService\",\"$stateParams\",\"$log\",\"$state\",\"notificationService\",\"searchValueService\",\"permissionGroups\",PermissionController])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var PermissionTypeController=function(){function PermissionTypeController($modal,$scope,permissionManagementService,$stateParams,$log,$state,formDefinition,promiseTracker,notificationService,currentType){var _this=this;switch(this.$modal=$modal,this.$scope=$scope,this.permissionManagementService=permissionManagementService,this.$state=$state,this.notificationService=notificationService,this.currentType=currentType,this.SubmitForm=function(){console.log(\"submit...\"+angular.toJson(_this.$scope.permTypeOperation)),_this.ProcessPermissionResponse(_this.permissionManagementService.PermissionTypeOperation(_this.$scope.permTypeOperation))},this.ProcessError=function(errorData){angular.isObject(errorData)&&_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,\"#\"+account.PermissionErrorCode[errorData.ErrorCode].toUpperCase(),_this.$scope)},this.$log=$log.getInstance(\"PermissionTypeController\"),console.log(\"currentType: \"+angular.toJson(currentType)),this.tracker=promiseTracker(),$scope.currentType=currentType,$scope.callback=$stateParams.callback,$scope.permTypeId=currentType?currentType.Id:\"0\",$scope.values={},$scope.DeletePermType=function(){_this.notificationService.showMessage(\"#CONFIRMDELETE\",\"#CONFIRM\",\"YES|*NO\",_this.$scope).then(function(button){if(\"YES\"==button){var delOperation={Id:currentType.Id,OperationType:cr.account.CrudOperationType.Delete};_this.permissionManagementService.PermissionTypeOperation(delOperation).then(function(response){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"#DELETESUCCESS\",_this.$scope),_this.$state.go(\"permission.type.list\",{reload:!0})},function(error){return _this.ProcessError(error)})}})},$scope.Submit=function(){return _this.SubmitForm()},$scope.formDefinition=formDefinition.data,$scope.formOptions={context:$scope.context,uniqueFormId:\"permTypeForm\",hideSubmit:!0},$scope.edit=!1,\"permission.actor.item.overview\"==$state.current.name,$scope.permTypeOperation={Id:currentType.Id,GroupName:currentType.GroupName,FullName:currentType.Name,OperationType:cr.account.CrudOperationType.AddOrUpdate,DataType:cr.account.PermissionDataType.Boolean,ResolutionMode:cr.account.PermissionResolutionMode.Biggest},this.$log.info(\"Current state: \"+$state.current.name),$state.current.name){case\"permission.type.edit\":$scope.edit=!0}}return PermissionTypeController.prototype.ProcessPermissionResponse=function(promise){var _this=this;return this.tracker.addPromise(promise),promise.then(function(data){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"#SAVED\",_this.$scope),_this.$state.go(\"permission.type.list\",{reload:!0})},function(errorData){_this.ProcessError(errorData)}),promise},PermissionTypeController}();account.accountModule.controller(\"permissionTypeController\",[\"$modal\",\"$scope\",\"permissionManagementService\",\"$stateParams\",\"$log\",\"$state\",\"formDefinition\",\"promiseTracker\",\"notificationService\",\"currentType\",PermissionTypeController])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var selectDuplicateCtrl=function(){function selectDuplicateCtrl(duplicateUsers,$modalInstance,$stateParams,$scope,$log,$translateService,currentUser){var _this=this;this.$modalInstance=$modalInstance,this.$stateParams=$stateParams,this.$scope=$scope,this.$translateService=$translateService,this.currentUser=currentUser,this.Action=function(action,userView){_this.$modalInstance.close({Action:action,UserView:userView})},this.$log=$log.getInstance(\"selectDuplicateCtrl\"),this.$scope.context=\"Account\",this.$scope.DuplicateUsers=duplicateUsers,this.$scope.Action=function(action,userView){return _this.Action(action,userView)}}return selectDuplicateCtrl}();angular.module(\"cr.account\").controller(\"selectDuplicateCtrl\",[\"DuplicateUsers\",\"$modalInstance\",\"$stateParams\",\"$scope\",\"$log\",\"$translateService\",\"currentUser\",selectDuplicateCtrl])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var signUpCtrl=function(){function signUpCtrl($modal,$log,$rootScope,$scope,$state,accountService,formDefinition,formData,notificationService,currentUser,currentLanguage){var _this=this;switch(this.$modal=$modal,this.$rootScope=$rootScope,this.$scope=$scope,this.$state=$state,this.accountService=accountService,this.notificationService=notificationService,this.currentUser=currentUser,this.currentLanguage=currentLanguage,this.Activate=function(userView){console.log(\"ActivateUser: \"+angular.toJson(userView))},this.ProcessUserAlreadyExists=function(createUserRequest,data){console.log(\"modal: \"+angular.toJson(data.DuplicateUsers)),_this.accountService.SelectUser(data.DuplicateUsers,{ForceAllowed:data.ForceAllowed,Title:data.ForceAllowed?\"MAYBEWEKNOWYOU\":\"WEKNOWYOU\"}).then(function(selectUser){switch(console.log(\"select user in signupctrl: \"+angular.toJson(selectUser)),selectUser.Action){case\"Select\":case\"Login\":_this.$state.go(\"account/signin.login\",{UserViewString:angular.toJson(selectUser.UserView)},{reload:!0});break;case\"Force\":createUserRequest.ForceNew=!0,_this.accountService.CreateUser(createUserRequest).then(function(data){return _this.ProcessCreateUserResponse(createUserRequest,data)})}})},this.ProcessCreateUserResponse=function(createUserRequest,data){if(data.Success)return _this.currentUser.userView(data.UserView),data.User&&_this.currentUser.setUser(data,_this.$scope.remindMe),void(data.ActivationNeeded?_this.$state.go(\"account/message.message\",{message:\"CONF_CREATEUSER\",title:\"CREATEUSER\"},{reload:!0}):_this.$state.go(\"account/message.message\",{message:\"CONF_WELCOMEUSER\",title:\"WELCOMEUSER\"},{reload:!0}));switch(data.ErrorCode){case account.AccountErrorCode.UserAlreadyExists:_this.ProcessUserAlreadyExists(createUserRequest,data);break;default:var errorMessage=\"#\"+cr.account.AccountErrorCode[data.ErrorCode].toUpperCase();console.log(\"errorcode:\"+cr.account.AccountErrorCode[data.ErrorCode]),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,errorMessage)}},this.$log=$log.getInstance(\"signUpCtrl\"),this.$scope.context=\"Account\",$scope.formDefinition=formDefinition.data,$scope.formData={},console.log(\"state: \"+angular.toJson($state)),$state.current.name){case\"account/signup.fillin\":$scope.formData=angular.fromJson($state.params.BCI),console.log(\"signup.identity: \"+angular.toJson($state.params.Identity)),console.log(\"signup.fillin: \"+angular.toJson(formData));break;case\"account/activate\":console.log(\"ds signup.activate: \"+$state.params.id+\"/\"+$state.params.token),console.log(\"super test: \"+angular.toJson($state.params.test)),this.accountService.GetUser($state.params.id,$state.params.token).then(function(data){console.log(\"GetUser: \"+angular.toJson(data)),$scope.formData=data},function(error){console.log(\"Error: \"+angular.toJson(error))})}$scope.submit=function(){return _this.CreateUser()},$scope.activate=function(userView){return _this.Activate(userView)},$scope.showNext=!0,$scope.showPrevious=null!=$rootScope.previousState,$scope.formOptions={currentLanguage:currentLanguage.Langage,context:\"Account\",uniqueFormId:\"signup\",hideSubmit:!0},$scope.$watch(function(){return currentLanguage.Langage()},function(lng){$scope.formOptions.currentLanguage=lng}),$scope.goBack=function(){$state.go($rootScope.previousState.name,$rootScope.previousState.params)},$scope.onSubmit=function(){console.log(\"form submitted:\",$scope.formData)}}return signUpCtrl.prototype.ParseDate=function(input){var parts=input.split(\"/\");return console.log(\"ParseDate:\"+parts[0]+\"  /  \"+parts[1]+\"  /   \"+parts[2]),new Date(Date.UTC(parseInt(parts[2]),parseInt(\"\"+parts[1])-1,parseInt(parts[0])))},signUpCtrl.prototype.CreateUser=function(){var _this=this,createUserRequest=new account.CreateUserRequest;switch(createUserRequest.User=this.accountService.AsUser(this.$scope.formData),createUserRequest.ShouldCheckEMail=!0,createUserRequest.UserName=this.$scope.formData.UserName,createUserRequest.Password=this.$scope.formData.Password,createUserRequest.User.BirthDate=this.ParseDate(this.$scope.formData.BirthDate),this.$state.current.name){case\"account/activate\":createUserRequest.LinkToExistingUserProfile=this.$state.params.id,createUserRequest.ActivationToken=this.$state.params.token,createUserRequest.ForceNew=!0;break;case\"account/signup.fillin\":createUserRequest.Identities=new Array;var idt=angular.fromJson(this.$state.params.Identity);idt&&createUserRequest.Identities.push({Name:idt.Name,Value:idt.Value})}this.$log.debug(\"cuq: \"+angular.toJson(createUserRequest)),this.accountService.CreateUser(createUserRequest).then(function(data){return _this.ProcessCreateUserResponse(createUserRequest,data)})},signUpCtrl}();account.accountModule.controller(\"signUpCtrl\",[\"$modal\",\"$log\",\"$rootScope\",\"$scope\",\"$state\",\"accountService\",\"formDefinition\",\"formData\",\"notificationService\",\"currentUser\",\"currentLangage\",signUpCtrl])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var crContextButtonController=function(){function crContextButtonController(permissionManagementService,$scope){var _this=this;this.permissionManagementService=permissionManagementService,this.$scope=$scope,this.ManageContext=function(){console.log(\"manage permissions clicked\"),console.log(_this.$scope.objectType+\" / \"+_this.$scope.objectName)}}return crContextButtonController.$inject=[\"permissionManagementService\",\"$scope\"],crContextButtonController}(),crContextButton=function(){function crContextButton(permissionManagementService){this.permissionManagementService=permissionManagementService,this.restrict=\"E\",this.scope={contextId:\"@\",objectType:\"@\",objectName:\"@\"},this.templateUrl=\"modules/account/templates/contextbutton.html\",this.replace=!0,this.controller=\"crContextButtonController\",this.controllerAs=\"ctrl\"}return crContextButton.prototype.link=function(scope,elem,attr,ngModel){},crContextButton.$inject=[\"permissionManagementService\"],crContextButton}();account.crContextButton=crContextButton,account.accountModule.directive(\"crContextButton\",function(permissionManagementService){return new crContextButton(permissionManagementService)}).controller(\"crContextButtonController\",crContextButtonController)}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var crContextEditController=function(){function crContextEditController(permissionManagementService,$scope,notificationService){var _this=this;this.permissionManagementService=permissionManagementService,this.$scope=$scope,this.notificationService=notificationService,this.permissionContextExist=!1,this.SelectActor=function(actorId){angular.isDefined(actorId)?_this.permissionManagementService.GetActor(actorId).then(function(actor){return _this.SetCurrentActor(actor)}):_this.permissionManagementService.SelectActor().then(function(actorId){_this.permissionManagementService.GetActor(actorId).then(function(actor){return _this.SetCurrentActor(actor)})})},this.Reset=function(){_this.$scope.values=angular.copy(_this.$scope.original)},this.GetDelta=function(contextId){var changeCount=0,delta={};for(var actor in _this.$scope.original){var srcActor=_this.$scope.original[actor],trgActor=_this.$scope.values[actor];for(var permId in trgActor){var srcPerm=srcActor[permId],trgPerm=trgActor[permId];(srcPerm||trgPerm)&&srcPerm!=trgPerm&&(delta.hasOwnProperty(actor)||(delta[actor]=[]),trgPerm?delta[actor].push({OperationType:\"AddOrUpdate\",PermissionId:permId,Value:trgPerm,ContextId:_this.$scope.contextId}):delta[actor].push({OperationType:\"Delete\",PermissionId:permId,ContextId:_this.$scope.contextId}),changeCount++)}}return 0==changeCount?null:delta},this.SaveInternal=function(){var delta=_this.GetDelta(_this.currentContext.Id);if(!delta)return void _this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Warning,\"#NOCHANGE\",_this.$scope);console.log(\"delta: \"+angular.toJson(delta));var operation={ActorOperations:delta};_this.ProcessPermissionResponse(_this.permissionManagementService.PermissionValueOperation(operation))},this.Save=function(){_this.permissionContextExist?_this.SaveInternal():_this.permissionManagementService.GetContext(_this.$scope.contextId,_this.$scope.objectType,_this.$scope.objectReference,null,!0).then(function(data){console.log(\"GetContext (create) returns \"+angular.toJson(data)),_this.currentContext=data,_this.SaveInternal()})},this.ProcessError=function(errorData){angular.isObject(errorData)&&_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,\"#\"+account.PermissionErrorCode[errorData.ErrorCode].toUpperCase(),_this.$scope)},this.ProcessPermissionResponse=function(promise){return promise.then(function(data){_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"#SAVED\",_this.$scope);_this.$scope.original=angular.copy(_this.$scope.values),angular.isDefined(_this.$scope.contextSaved)&&(console.log(\"call save on \"+angular.toJson(_this.currentContext)),_this.$scope.contextSaved({context:_this.currentContext}))},function(errorData){_this.ProcessError(errorData)}),promise},this.UpdateContext=function(){!_this.$scope.contextId||\"0\"==_this.$scope.contextId||_this.currentContext&&_this.currentContext.Id==_this.$scope.contextId?\"0\"!=_this.$scope.contextId||_this.currentContext&&_this.currentContext.Type==_this.$scope.objectType||(console.log(\"call the service with name\"),_this.$scope.original={},_this.$scope.values={},_this.currentContext=null,_this.permissionManagementService.GetContext(_this.$scope.contextId,_this.$scope.objectType,_this.$scope.objectReference).then(function(data){console.log(\"we called the service with id \"+_this.$scope.contextId+\" and we get \"+angular.toJson(data)+\" back\"),_this.SetCurrentContext(data)})):(console.log(\"scope: \"+_this.$scope.contextId),console.log(\"call the service with Id???\"),_this.currentContext=null,_this.$scope.original={},_this.$scope.values={},_this.permissionManagementService.GetContext(_this.$scope.contextId,_this.$scope.objectType,_this.$scope.objectReference).then(function(data){_this.SetCurrentContext(data)}))},this.SetActivePermGroupTab=function(permGroup){_this.$scope.activePermGroupTab=permGroup},console.log(\"pms: \"+permissionManagementService),$scope.original={},$scope.values={},angular.isDefined($scope.permissionGroups)||this.permissionManagementService.PermissionByGroup().then(function(permGroup){$scope.permissionGroups=permGroup}),$scope.SetActivePermGroupTab=this.SetActivePermGroupTab,$scope.$watch(\"objectType+objectReference+contextId\",function(newValue,oldValue){console.log(\"watch on crContextEdit\"),_this.UpdateContext()})}return crContextEditController.prototype.UpdateValues=function(actor,contextId,obj){if(obj||(obj={}),!obj.hasOwnProperty(actor.Id)){obj[actor.Id]={};for(var prop in actor.Permissions){var perm=actor.Permissions[prop];contextId&&perm.ContextId!=contextId||(obj[actor.Id][perm.PermissionId]=perm.Value?\"true\":\"false\")}}return obj},crContextEditController.prototype.SetCurrentActor=function(actorData){this.currentActor=actorData,actorData&&actorData.Id&&\"0\"!=actorData.Id&&(this.$scope.original=this.UpdateValues(this.currentActor,this.currentContext?this.currentContext.Id:\"0\",this.$scope.original),this.$scope.values=this.UpdateValues(this.currentActor,this.currentContext?this.currentContext.Id:\"0\",this.$scope.values),console.log(\"original: \"+angular.toJson(this.$scope.original)),this.currentContext&&angular.isObject(this.currentContext)||(this.currentContext={Id:0}),null==this.currentContext.ActorValues&&(this.currentContext.ActorValues={}),this.currentContext.ActorValues.hasOwnProperty(actorData.Id)||(this.currentContext.ActorValues[actorData.Id]={Values:{},ActorView:{Id:actorData.Id,Name:actorData.Name,Type:actorData.Type,Reference:actorData.Reference,Description:actorData.Description}}))},crContextEditController.prototype.SetCurrentContext=function(data){console.log(\"SET CURRENT CONTEXT: \"+angular.toJson(data)),null==data||\"null\"==data?(this.permissionContextExist=!1,this.currentContext={ReferenceCount:0,ActorValues:{},Id:angular.isDefined(this.$scope.contextId)?this.$scope.contextId:\"0\",Name:this.$scope.objectName,Type:this.$scope.objectType,Reference:this.$scope.objectReference}):(this.permissionContextExist=!0,this.currentContext=data,this.$scope.contextId=data.Id,this.$scope.actorId&&this.SelectActor(this.$scope.actorId))},crContextEditController.$inject=[\"permissionManagementService\",\"$scope\",\"notificationService\"],crContextEditController}(),crContextEdit=function(){function crContextEdit(permissionManagementService){this.permissionManagementService=permissionManagementService,this.restrict=\"E\",this.scope={contextId:\"=\",objectType:\"@\",objectReference:\"@\",permissionGroups:\"@\",contextSaved:\"&\",actorId:\"@\",backLink:\"=\"},this.templateUrl=\"modules/account/templates/contextedit.html\",this.replace=!0,this.controller=\"crContextEditController\",this.controllerAs=\"ctrl\"}return crContextEdit.prototype.link=function(scope,elem,attr,ngModel){},crContextEdit.$inject=[\"permissionManagementService\"],crContextEdit}();account.crContextEdit=crContextEdit,account.accountModule.directive(\"crContextEdit\",function(permissionManagementService){return new crContextEdit(permissionManagementService)}).controller(\"crContextEditController\",crContextEditController)}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){var crContextRoleController=function(){function crContextRoleController(permissionManagementService,$scope,notificationService){var _this=this;this.permissionManagementService=permissionManagementService,this.$scope=$scope,this.notificationService=notificationService,this.SelectActor=function(actorId){},this.RemoveActor=function(actorId,roleId,roleName){_this.permissionManagementService.RemoveRole(actorId,_this.$scope.contextId,roleName,_this.$scope.apiUrl).then(function(data){console.log(angular.toJson(data)),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"#ROLEREMOVED\"),_this.contextRoleData.RolePermissions[roleId].Actors=data.ActorRoles},function(error){console.log(\"ERROR: \"+angular.toJson(error)),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,error.ErrorMessage);\n})},this.AddActor=function(roleId,roleName){console.log(\"AddActor: \"+roleName+\" = \"+_this.$scope.apiUrl),_this.permissionManagementService.SelectActor().then(function(actorId){_this.permissionManagementService.AddRole(actorId,_this.$scope.contextId,roleName,_this.$scope.apiUrl).then(function(data){console.log(angular.toJson(data)),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Success,\"#ROLEADDED\"),_this.contextRoleData.RolePermissions[roleId].Actors=data.ActorRoles},function(error){console.log(\"ERROR: \"+angular.toJson(error)),_this.notificationService.addNotification(cr.infrastructure.notification.notificationType.Fatal,error.ErrorMessage)})})},this.UpdateContext=function(){console.log(\"getcontextroles\"),_this.$scope.loading=!0,_this.permissionManagementService.GetContextRoles(_this.$scope.contextId,\"abc\").then(function(data){_this.contextRoleData=data,_this.$scope.loading=!1})},$scope.loading=!0,$scope.$watch(\"contextId\",function(newValue,oldValue){console.log(\"watch on ctx\"),_this.UpdateContext()})}return crContextRoleController.$inject=[\"permissionManagementService\",\"$scope\",\"notificationService\"],crContextRoleController}(),crContextRole=function(){function crContextRole(permissionManagementService){this.permissionManagementService=permissionManagementService,this.restrict=\"E\",this.scope={contextId:\"@\",roleReferencePrefix:\"@\",apiUrl:\"@\"},this.templateUrl=\"modules/account/templates/contextrole.html\",this.replace=!0,this.controller=\"crContextRoleController\",this.controllerAs=\"ctrl\"}return crContextRole.prototype.link=function(scope,elem,attr,ngModel){},crContextRole.$inject=[\"permissionManagementService\"],crContextRole}();account.crContextRole=crContextRole,account.accountModule.directive(\"crContextRole\",function(permissionManagementService){return new crContextRole(permissionManagementService)}).controller(\"crContextRoleController\",crContextRoleController)}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){account.accountModule.directive(\"crActorList\",function(permissionManagementService,$parse){return new crSearchActor(permissionManagementService,$parse)});var crSearchActor=function(){function crSearchActor(permissionManagementService,$parse){this.permissionManagementService=permissionManagementService,this.$parse=$parse,this.restrict=\"E\",this.scope={select:\"&\",disable:\"@\",defaultSelected:\"@\"},this.templateUrl=\"modules/account/views/searchactor.html\",this.replace=!0,this.controller=account.PermissionActorSearchCtrl}return crSearchActor.prototype.link=function(scope,elem,attr,ngModel){},crSearchActor}();account.crSearchActor=crSearchActor}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){account.accountModule.directive(\"crContextList\",function(permissionManagementService){return new crSearchContext(permissionManagementService)});var crSearchContext=function(){function crSearchContext(permissionManagementService){this.permissionManagementService=permissionManagementService,this.restrict=\"E\",this.scope={select:\"&\"},this.templateUrl=\"modules/account/views/searchcontext.html\",this.replace=!0,this.controller=account.PermissionContextSearchCtrl}return crSearchContext.prototype.link=function(scope,elem,attr,ngModel){},crSearchContext}();account.crSearchContext=crSearchContext}(account=cr.account||(cr.account={}))}(cr||(cr={}));var accountModule=angular.module(\"cr.account\");accountModule.directive(\"loginWidget\",function(){return{restrict:\"E\",templateUrl:\"modules/account/templates/loginwidget.html\",replace:!0}});var cr;!function(cr){var account;!function(account){account.accountModule.config([\"crFormTemplateProvider\",function(crFormTemplateProvider){crFormTemplateProvider.setTemplateUrl(\"currentUser\",\"modules/account/templates/cr-current-user.html\")}])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){account.accountModule.config([\"cfg\",function(cfg){}]),account.accountModule.factory(\"l2sWrapper\",[\"cfg\",function(cfg){var obj={l2s:l2s,init:function(){obj.l2s.configure({facebook:{apiKey:cfg.FbAppId,authUrl:\"https://www.facebook.com/dialog/oauth/\"},windows:{apiKey:cfg.WindowsLiveAppId,authUrl:\"https://login.live.com/oauth20_authorize.srf\"},google:{apiKey:cfg.GoogleAppId,authUrl:\"https://accounts.google.com/o/oauth2/auth\"},ActiveDirectory:{authUrl:\"https://login.windows.net/common/oauth2/authorize\"}})}};return obj}])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var cr;!function(cr){var account;!function(account){account.accountModule.config([\"$stateProvider\",function($stateProvider){$stateProvider.state(\"ac\",{\"abstract\":!0,url:\"/ac\",ncyBreadcrumb:{skip:!0},views:{main:{controller:\"loginCtrl\",templateUrl:\"modules/account/views/account.html\"}}}).state(\"ac.signin\",{url:\"/signin\",ncyBreadcrumb:{skip:!0},controller:\"loginCtrl\",templateUrl:\"modules/account/views/signin.html\",data:{title:\"#TEST\"}}).state(\"account/confirmCreateUser\",{url:\"/account/confirmCreateUser\",ncyBreadcrumb:{skip:!0},views:{main:{controller:\"loginCtrl\",templateUrl:\"modules/account/views/confirmCreateUser.html\"}}}).state(\"account/confirmActivationToken\",{url:\"/account/confirmActivationToken\",ncyBreadcrumb:{skip:!0},views:{main:{controller:\"loginCtrl\",templateUrl:\"modules/account/views/confirmActivationToken.html\"}}}).state(\"account/signup\",{url:\"/account/signup\",ncyBreadcrumb:{skip:!0},resolve:{formDefinition:function($http){return $http({method:\"GET\",url:\"modules/account/resources/signup.json\"})},formData:function(){return{}}},controller:\"signUpCtrl\",templateUrl:\"modules/account/views/signup.html\"}).state(\"account/signup.fillin\",{ncyBreadcrumb:{skip:!0},params:{BCI:{},Identity:{}}}).state(\"account/activate\",{ncyBreadcrumb:{skip:!0},url:\"/account/activate/{id}/{token}\",resolve:{formDefinition:function($http){return $http({method:\"GET\",url:\"modules/account/resources/signup.json\"})},formData:[\"$stateParams\",function($stateParams){return console.log(\"signup.activate: \"+$stateParams.id+\" / \"+$stateParams.token),{}}]},controller:\"signUpCtrl\",templateUrl:\"modules/account/views/signup.activate.html\"}).state(\"account/signin\",{url:\"/account/signin\",ncyBreadcrumb:{skip:!0},views:{main:{resolve:{formDefinition:function($http){return $http({method:\"GET\",url:\"modules/account/resources/signin.json\"})}},controller:\"loginCtrl\",templateUrl:\"modules/account/views/signin.html\"}}}).state(\"account/signin.login\",{ncyBreadcrumb:{skip:!0},params:{UserViewString:\"\"}}).state(\"account/signin.redirect\",{ncyBreadcrumb:{skip:!0},params:{StringifiedRedirectRoute:\"\"}}).state(\"account/signin.confirm\",{ncyBreadcrumb:{skip:!0},url:\"/confirm/{id}/{token}\"}).state(\"account/signin.password\",{ncyBreadcrumb:{skip:!0},url:\"/password/{id}/{token}\",resolve:{changePasswordFormDefinition:function($http){return $http({method:\"GET\",url:\"modules/account/resources/changePassword.json\"})}}}).state(\"account/message\",{ncyBreadcrumb:{skip:!0},url:\"/account/message\",views:{main:{controller:\"accountMessageCtrl\",templateUrl:\"modules/account/views/message.html\"}}}).state(\"account/message.message\",{ncyBreadcrumb:{skip:!0},params:{message:\"MESSAGE\",title:\"TITLE\"}}).state(\"signin-oauth-grant\",{ncyBreadcrumb:{skip:!0},url:\"/account/grant?state&response_type&redirect_uri&client_id&oauth_url&display\",views:{main:{resolve:{ApplicationService:\"applicationService\",CurrentApplication:\"currentApplication\",formDefinition:function($http){return $http({method:\"GET\",url:\"modules/account/resources/signin.json\"})},applicationDetails:function($q,$rootScope,$stateParams,CurrentApplication,ApplicationService){var deferred=$q.defer();return ApplicationService.GetApplicationDetails($stateParams.client_id).then(function(details){details.oAuth={url:$stateParams.oauth_url,responseType:$stateParams.response_type,state:$stateParams.state,redirectUri:$stateParams.redirect_uri,clientId:$stateParams.client_id},CurrentApplication.currentApplication(details),deferred.resolve(details)}),deferred.promise}},controller:\"loginCtrl\",templateUrl:\"modules/account/views/signin.html\"}}})}]),account.accountModule.config([\"$stateProvider\",function($stateProvider){$stateProvider.state(\"permission\",{\"abstract\":!0,url:\"/admin/permission?callback\",controller:\"permissionController\",controllerAs:\"vm\",templateUrl:\"modules/account/views/permission.html\",resolve:{userPermissionService:function(permissionManagementService){return permissionManagementService.GetUserPermissions()},currentContext:function(){return{Id:\"0\"}},currentActor:function(){return{Id:\"0\"}},permissionGroups:function(){return[]}},data:{permissions:\"role.superadmin\"},ncyBreadcrumb:{label:\"{{'PERMISSION'|t}}\"}}).state(\"permission.menu\",{url:\"\",templateUrl:\"modules/account/views/permissionmenu.html\",ncyBreadcrumb:{skip:!0}}).state(\"permission.context\",{\"abstract\":!0,url:\"/context\",template:\"<div ui-view></div>\",ncyBreadcrumb:{label:\"{{'CONTEXT'|t}}\"}}).state(\"permission.context.list\",{url:\"\",templateUrl:\"modules/account/views/contextlist.html\",ncyBreadcrumb:{skip:!0}}).state(\"permission.type\",{\"abstract\":!0,url:\"/type\",template:\"<div ui-view></div>\",resolve:{currentType:function(){return{Id:\"0\"}}},data:{},ncyBreadcrumb:{label:\"{{'TYPE'|t}}\"}}).state(\"permission.type.list\",{url:\"\",controller:\"permissionController\",templateUrl:\"modules/account/views/permtypelist.html\",resolve:{permissionGroups:function(permissionManagementService){return permissionManagementService.PermissionByGroup()}},ncyBreadcrumb:{skip:!0}}).state(\"permission.type.edit\",{url:\"/{permTypeId:[0-9]*}\",controller:\"permissionTypeController\",templateUrl:\"modules/account/views/permtypeedit.html\",resolve:{formDefinition:function($http){return $http({method:\"GET\",url:\"modules/account/resources/permtype.json\"})},currentType:function(permissionManagementService,$stateParams,$q){var deferred=$q.defer();return permissionManagementService.PermissionList().then(function(permList){var toRet=_.find(permList,function(perm){return perm.Id==$stateParams.permTypeId});console.log(\"underscore permtype search: \"+angular.toJson(toRet)),deferred.resolve(toRet)}),deferred.promise}},ncyBreadcrumb:{label:\"{{'EDIT'|t}}\"}}).state(\"permission.type.create\",{url:\"/create\",controller:\"permissionTypeController\",templateUrl:\"modules/account/views/permtypeedit.html\",resolve:{formDefinition:function($http){return $http({method:\"GET\",url:\"modules/account/resources/permtype.json\"})},currentType:function(){return{Id:\"0\"}}},ncyBreadcrumb:{label:\"{{'CREATE'|t}}\"}}).state(\"permission.actor\",{\"abstract\":!0,url:\"/actor\",template:\"<div ui-view></div>\",resolve:{formDefinition:function($http){return $http({method:\"GET\",url:\"modules/account/resources/actor.json\"})}},data:{},ncyBreadcrumb:{label:\"{{'ACTOR'|t}}\"}}).state(\"permission.actor.list\",{url:\"\",templateUrl:\"modules/account/views/actorlist.html\",ncyBreadcrumb:{skip:!0}}).state(\"permission.actor.item\",{url:\"/{actorId:[0-9]*}\",controller:\"permissionActorController\",template:\"<div ui-view></div>\",resolve:{currentActor:function(permissionManagementService,$stateParams){return permissionManagementService.GetActor($stateParams.actorId)},permissionGroups:function(permissionManagementService){return permissionManagementService.PermissionByGroup()}},ncyBreadcrumb:{skip:!0}}).state(\"permission.actor.item.detail\",{url:\"/detail\",templateUrl:\"modules/account/views/accountdetail.html\",controller:\"accountDetailCtrl\"}).state(\"permission.actor.item.overview\",{url:\"/overview\",templateUrl:\"modules/account/views/actoroverview.html\",ncyBreadcrumb:{label:\"{{currentActor.Name}}\"}}).state(\"permission.actor.item.template\",{url:\"/template\",controller:\"permissionContextController\",templateUrl:\"modules/account/views/manage.html\",ncyBreadcrumb:{label:\"{{'TEMPLATE'|t}}\",parent:\"permission.actor.item.overview\"}}).state(\"permission.actor.create\",{url:\"/create\",controller:\"permissionActorController\",templateUrl:\"modules/account/views/actoredit.html\",ncyBreadcrumb:{label:\"{{'CREATE'|t}}\"}}).state(\"permission.actor.item.edit\",{url:\"/edit\",templateUrl:\"modules/account/views/actoredit.html\",ncyBreadcrumb:{label:\"{{'EDIT'|t}}\",parent:\"permission.actor.item.overview\"}}).state(\"permission.context.item\",{url:\"/{contextId:[0-9]*}\",template:\"<div ui-view></div>\",controller:\"permissionContextController\",resolve:{currentContext:function(permissionManagementService,$stateParams){return console.log(\"get context: \"+$stateParams.contextId),permissionManagementService.GetContext($stateParams.contextId)},formDefinition:function($http){return $http({method:\"GET\",url:\"modules/account/resources/context.json\"})},permissionGroups:function(permissionManagementService){return permissionManagementService.PermissionByGroup()}},ncyBreadcrumb:{skip:!0}}).state(\"permission.context.item.edit\",{url:\"/edit\",templateUrl:\"modules/account/views/contextedit.html\",controller:\"permissionContextController\",ncyBreadcrumb:{label:\"{{'EDIT'|t}}\",parent:\"permission.context.item.overview\"}}).state(\"permission.context.create\",{url:\"/create\",templateUrl:\"modules/account/views/contextedit.html\",controller:\"permissionContextController\",resolve:{formDefinition:function($http){return $http({method:\"GET\",url:\"modules/account/resources/context.json\"})}},ncyBreadcrumb:{label:\"{{'CREATE'|t}}\"}}).state(\"permission.context.item.overview\",{url:\"/overview\",templateUrl:\"modules/account/views/overview.html\",ncyBreadcrumb:{label:\"{{currentContext.Name}}\"}}).state(\"permission.context.item.manage\",{url:\"/{actorId:[0-9]*}\",templateUrl:\"modules/account/views/manage.html\",controller:\"permissionContextController\",resolve:{currentActor:function(permissionManagementService,$stateParams){return permissionManagementService.GetActor($stateParams.actorId)}},ncyBreadcrumb:{label:\"{{'MANAGE'|t}}\",parent:\"permission.context.item.overview\"}}).state(\"permission.context.item.create\",{url:\"/create\",controller:\"permissionContextController\",templateUrl:\"modules/account/views/manage.html\",ncyBreadcrumb:{label:\"{{'CREATE'|t}}\",parent:\"permission.context.item.overview\"}})}])}(account=cr.account||(cr.account={}))}(cr||(cr={}));var app=angular.module(\"cr.account\");app.run([\"$rootScope\",\"$state\",\"userPermission\",\"notificationService\",\"$urlRouter\",function($rootScope,$state,userPermission,notificationService,$urlRouter){console.log(\"RUN CR.ACCOUNT\"),$rootScope.$on(\"$stateChangeSuccess\",function(event,toState,toParams,fromState,fromParams){console.log(\"account state change\"),toState.data&&toState.data.permissions&&(console.log(\"PERMISSIONS DEFINED ON STATE\"),event.preventDefault(),userPermission.getPermission(toState.data.permissions).then(function(permission){return permission.loggedOn?permission.hasPermission?void $urlRouter.sync():(notificationService.addNotification(\"info\",\"Not authorized\",{context:\"DEFAULT\"}),fromState.name?void $state.go(fromState.name):void $state.go(\"account/signin\")):void $state.go(\"account/signin.redirect\",{StringifiedRedirectRoute:JSON.stringify({redirect:toState.name,params:toParams})})}))})}]),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/changepassword.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss()\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"text-center\" translate=\"\">CHANGEPASSWORD</h4></div><div class=\"modal-body\"><div class=\"clearfix\"><div class=\"col-sm-12\"><p class=\"text-muted\" translate=\"\">CHANGEPASSWORDHELP</p><br></div></div><div class=\"clearfix\"><div class=\"col-sm-12\"><div class=\"alert alert-danger\" ng-show=\"errorMessage\"><p>{{ errorMessage | translate:context }}</p></div><cr-form name=\"changePasswordForm\" result=\"changePasswordData\" definition=\"changePasswordFields\" options=\"formOptions\" rc-submit=\"ChangePassword(changePasswordData)\"><div class=\"modal-footer\"><div class=\"text-center\"><br><button class=\"btn btn-primary\" type=\"submit\" ng-disabled=\"tracker.active()\" translate=\"\">CONFIRM</button> <button class=\"btn btn-default\" type=\"button\" ng-click=\"$dismiss()\" translate=\"\">CANCEL</button></div></div></cr-form></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/confirmuser.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss()\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"text-center\" translate=\"\">ACCOUNTNOTCONFIRMED</h4></div><div class=\"modal-body\"><div class=\"clearfix\"><div class=\"col-sm-12\"><p class=\"text-muted\" translate=\"\">ACCOUNTNOTCONFIRMEDHELP</p><p class=\"text-muted\" ng-show=\"forceAllowed\" translate=\"\">CANACTIVATELATERHELP</p><br></div></div><div class=\"clearfix\"><div class=\"col-sm-12\"><div class=\"alert alert-danger\" ng-show=\"errorMessage\"><p>{{ errorMessage | translate:context }}</p></div><cr-form name=\"confirmUserForm\" result=\"confirmUserData\" definition=\"confirmUserFields\" options=\"formOptions\" rc-submit=\"ConfirmUser(confirmUserData)\"><div class=\"modal-footer\"><br><div class=\"row\"><div class=\"col-xs-6\"><button class=\"btn btn-primary\" type=\"submit\" ng-disabled=\"tracker.active()\" translate=\"\">CONFIRM</button> <button class=\"btn btn-default\" type=\"button\" ng-click=\"$dismiss()\" translate=\"\">CANCEL</button></div><div class=\"col-xs-6\"><button type=\"button\" class=\"btn btn-warning\" ng-click=\"close(\\'resend\\')\" translate=\"\">RESENDCONFIRMATION</button> <button class=\"btn btn-default\" ng-show=\"forceAllowed\" translate=\"\" ng-click=\"close(\\'later\\')\">LATER</button></div></div></div></cr-form></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/contextbutton.html\",\"<button class=\\\"btn btn-default\\\" ng-click=\\\"ctrl.ManageContext()\\\">{{'MANAGECONTEXT'|t:'PERMISSION'}}</button>\")}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/actor.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"Type\",\"type\":\"select\",\"label\":\"#TYPE\",\"disabled\":false,\"help\":\"\",\"validation\":{\"required\":true},\"options\":[{\"Id\":\"role\",\"Text\":\"#ROLE\"},{\"Id\":\"application\",\"Text\":\"#APPLICATION\"},{\"Id\":\"company\",\"Text\":\"#COMPANY\"},{\"Id\":\"user\",\"Text\":\"#USER\"},{\"Id\":\"system\",\"Text\":\"#SYSTEM\"}]},{\"cols\":6,\"key\":\"Reference\",\"type\":\"text\",\"label\":\"#REFERENCE\",\"validation\":{\"required\":true}}],[{\"cols\":12,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"validation\":{\"required\":true}}],[{\"cols\":12,\"key\":\"Description\",\"type\":\"text\",\"label\":\"#DESCRIPTION\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/backup_signup.json\",'[{\"key\":\"contact\",\"label\":\"#CONTACT\",\"rows\":[[{\"cols\":6,\"key\":\"LastName\",\"type\":\"text\",\"label\":\"#LASTNAME\",\"info\":\"#FIRSTNAMEINFO\",\"placeholder\":\"GENTEN\",\"required\":true,\"help\":\"#YOURLASTNAMEHELP\",\"validation\":{\"required\":true,\"minLength\":2}},{\"cols\":6,\"key\":\"FirstName\",\"type\":\"text\",\"label\":\"#FIRSTNAME\",\"placeholder\":\"ANGELIQUE\",\"help\":\"#YOURFIRSTNAMEHELP\",\"validation\":{\"required\":true,\"minLength\":2}}],[{\"cols\":3,\"key\":\"Gender\",\"type\":\"radio\",\"label\":\"#GENDER\",\"disabled\":false,\"help\":\"\",\"validation\":{\"required\":true},\"options\":[{\"name\":\"#M\",\"value\":\"M\"},{\"name\":\"#F\",\"value\":\"F\"}]},{\"cols\":3,\"key\":\"BirthDate\",\"type\":\"date\",\"label\":\"#BIRTHDATE\",\"disabled\":false,\"help\":\"#BIRTHDATEHELP\",\"info\":\"#BIRTHDATEINFO\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"Nationality\",\"default\":\"BEL\",\"type\":\"select\",\"label\":\"#NATIONALITY\",\"disabled\":false,\"help\":\"\",\"options\":[{\"name\":\"#BEL\",\"value\":\"BEL\"},{\"name\":\"#FRA\",\"value\":\"FRA\"}],\"validation\":{\"required\":true}}],[{\"cols\":6,\"key\":\"Email\",\"type\":\"text\",\"label\":\"#EMAIL\",\"help\":\"#EMAILHELP\",\"validation\":{\"required\":true,\"pattern\":\"^([a-zA-Z0-9_\\\\\\\\.\\\\\\\\-])+\\\\\\\\@(([a-zA-Z0-9\\\\\\\\-])+\\\\\\\\.)+([a-zA-Z0-9]{2,8})+$\"}},{\"cols\":6,\"key\":\"EmailBis\",\"type\":\"text\",\"label\":\"#EMAILBIS\",\"help\":\"#EMAILHELP\",\"hideExpression\":\"!result.Email\",\"validation\":{\"required\":true,\"compareTo\":\"result.Email\"}}]]},{\"key\":\"account\",\"label\":\"#ACCOUNT\",\"rows\":[[{\"cols\":6,\"key\":\"UserName\",\"type\":\"text\",\"label\":\"#USERNAME\",\"disabled\":false,\"validation\":{\"required\":true,\"minLength\":3}}],[{\"cols\":6,\"key\":\"Password\",\"type\":\"password\",\"label\":\"#PASSWORD\",\"hideExpression\":\"!result.UserName\",\"validation\":{\"required\":false,\"requiredExpression\":\"result.UserName!=null\",\"minLength\":4,\"maxLength\":14}},{\"cols\":6,\"key\":\"ConfirmPassword\",\"type\":\"password\",\"label\":\"#CONFIRMPASSWORD\",\"hideExpression\":\"!result.UserName\",\"validation\":{\"required\":false,\"requiredExpression\":\"result.UserName!=null\",\"compareTo\":\"result.Password\"}}]]},{\"key\":\"company\",\"label\":\"#COMPANY\",\"rows\":[[{\"cols\":6,\"key\":\"Company\",\"type\":\"text\",\"label\":\"#COMPANY\",\"required\":false,\"disabled\":false,\"validation\":{\"required\":false}},{\"cols\":6,\"key\":\"Departement\",\"type\":\"text\",\"label\":\"#DEPARTEMENT\",\"hideExpression\":\"result.Company != \\'RealDolmen\\'\",\"validation\":{\"required\":false,\"requiredExpression\":\"result.Company == \\'RealDolmen\\'\"}}],[{\"cols\":6,\"key\":\"Mvp\",\"type\":\"text\",\"label\":\"#MVP\",\"hideExpression\":\"result.Departement != \\'IT\\' || !visibleFields.Departement\",\"disabled\":false,\"validation\":{\"required\":false,\"requiredExpression\":\"result.Departement == \\'IT\\' && visibleFields.Departement\"}}]]},{\"key\":\"supported\",\"label\":\"Supported fields\",\"rows\":[[{\"cols\":6,\"key\":\"Text with info (popover)\",\"type\":\"text\",\"label\":\"Text with info (popover)\",\"help\":\"Type some text\",\"info\":\"Some information about the field\",\"disabled\":false},{\"cols\":6,\"key\":\"Textarea\",\"type\":\"textarea\",\"label\":\"Textarea\",\"help\":\"Type some text\",\"disabled\":false}],[{\"cols\":6,\"key\":\"Select\",\"type\":\"select\",\"label\":\"Select\",\"help\":\"Select something\",\"disabled\":false,\"options\":[{\"name\":\"option 1\",\"value\":\"1\"},{\"name\":\"option 2\",\"value\":\"2\"},{\"name\":\"option 3\",\"value\":\"3\"},{\"name\":\"option 4\",\"value\":\"4\"},{\"name\":\"option 5\",\"value\":\"5\"}]},{\"cols\":6,\"key\":\"Select2\",\"type\":\"select2\",\"label\":\"Select2\",\"help\":\"Find something to select\",\"disabled\":false,\"options\":[{\"name\":\"option 1\",\"value\":\"1\"},{\"name\":\"option 2\",\"value\":\"2\"},{\"name\":\"option 3\",\"value\":\"3\"},{\"name\":\"option 4\",\"value\":\"4\"},{\"name\":\"option 5\",\"value\":\"5\"}]}],[{\"cols\":6,\"key\":\"Radiobox\",\"type\":\"radio\",\"label\":\"Radiobox\",\"disabled\":false,\"help\":\"Select one option\",\"options\":[{\"name\":\"Option 1\",\"value\":\"1\"},{\"name\":\"Option 2\",\"value\":\"2\"},{\"name\":\"Option 3\",\"value\":\"3\"}]},{\"cols\":6,\"key\":\"Checkbox\",\"type\":\"checkbox\",\"label\":\"Checkbox\",\"disabled\":false,\"help\":\"Select some options\",\"options\":[{\"name\":\"Option 1\",\"value\":\"1\"},{\"name\":\"Option 2\",\"value\":\"2\"},{\"name\":\"Option 3\",\"value\":\"3\"}]}]]}]')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/changePassword.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"NewPassword\",\"type\":\"password\",\"label\":\"#NEWPASSWORD\",\"validation\":{\"required\":true,\"minLength\":4,\"maxLength\":14}},{\"cols\":6,\"key\":\"ConfirmPassword\",\"type\":\"password\",\"label\":\"#CONFIRMNEWPASSWORD\",\"validation\":{\"required\":true,\"compareTo\":\"result.NewPassword\"}}]]}]')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/confirmUser.json\",'[{\"rows\":[[{\"icon\":\"fa-user\",\"cols\":12,\"key\":\"token\",\"type\":\"text\",\"label\":\"#TOKEN\",\"validation\":{\"required\":true,\"minlength\":2},\"help\":\"#TOKEN_HELP\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/context.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"Type\",\"type\":\"select\",\"label\":\"#TYPE\",\"disabled\":false,\"help\":\"\",\"validation\":{\"required\":true},\"options\":[{\"Id\":\"event\",\"Text\":\"#Event\"},{\"Id\":\"manufacturer\",\"Text\":\"#Manufacturer\"},{\"Id\":\"permission\",\"Text\":\"#Permission\"},{\"Id\":\"company\",\"Text\":\"#COMPANY\"},{\"Id\":\"application\",\"Text\":\"#APPLICATION\"},{\"Id\":\"group\",\"Text\":\"#Group\"},{\"Id\":\"system\",\"Text\":\"#System\"}]},{\"cols\":6,\"key\":\"Reference\",\"type\":\"text\",\"label\":\"#REFERENCE\",\"validation\":{\"required\":true}}],[{\"cols\":12,\"key\":\"Name\",\"type\":\"text\",\"label\":\"#NAME\",\"validation\":{\"required\":true}}],[{\"cols\":12,\"key\":\"Description\",\"type\":\"text\",\"label\":\"#DESCRIPTION\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/lostPassword.json\",'[{\"rows\":[[{\"icon\":\"fa-user\",\"cols\":12,\"key\":\"username\",\"type\":\"text\",\"label\":\"#PSEUDO\",\"validation\":{\"required\":true,\"minlength\":2},\"help\":\"#PSEUDO_HELP\",\"info\":\"#PSEUDO_INFO\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/lostUserName.json\",'[{\"key\":\"LastName\",\"default\":\"\",\"type\":\"text\",\"label\":\"#LASTNAME\",\"placeholder\":\"GENTEN\",\"required\":true,\"disabled\":false,\"help\":\"HelpHelp\",\"minlength\":2},{\"key\":\"FirstName\",\"default\":\"\",\"type\":\"text\",\"label\":\"#FIRSTNAME\",\"placeholder\":\"ANGELIQUE\",\"required\":true,\"disabled\":false,\"help\":\"HelpHelp\",\"minlength\":2},{\"key\":\"BirthDate\",\"default\":\"\",\"type\":\"date\",\"label\":\"#BIRTHDATE\",\"required\":true,\"disabled\":false,\"help\":\"HelpHelp\"},{\"key\":\"Email\",\"type\":\"text\",\"label\":\"#EMAIL\",\"required\":true}]')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/permtype.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"GroupName\",\"type\":\"text\",\"label\":\"#GROUPNAME\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"FullName\",\"type\":\"text\",\"label\":\"#PERMNAME\",\"validation\":{\"required\":true}}]]}]')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/searchactor.json\",'[{\"rows\":[[{\"cols\":6,\"key\":\"LastName\",\"type\":\"text\",\"label\":\"#LASTNAME\",\"info\":\"#FIRSTNAMEINFO\",\"placeholder\":\"\",\"required\":true,\"focus\":true,\"help\":\"#YOURLASTNAMEHELP\",\"validation\":{\"minLength\":2}},{\"cols\":6,\"key\":\"FirstName\",\"type\":\"text\",\"label\":\"#FIRSTNAME\",\"placeholder\":\"\",\"help\":\"#YOURFIRSTNAMEHELP\",\"validation\":{\"minLength\":2}}],[{\"cols\":12,\"key\":\"Email\",\"type\":\"text\",\"label\":\"#EMAIL\",\"help\":\"#EMAILHELP\",\"validation\":{\"pattern\":\"^([a-zA-Z0-9_\\\\\\\\.\\\\\\\\-])+\\\\\\\\@(([a-zA-Z0-9\\\\\\\\-])+\\\\\\\\.)+([a-zA-Z0-9]{2,8})+$\"}}]]}]')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/signin.json\",'[{\"rows\":[[{\"icon\":\"fa-user\",\"key\":\"username\",\"cols\":12,\"currentuser\":\"#CURRENT_USER\",\"label\":\"#USERNAME\",\"type\":\"currentUser\",\"validation\":{\"required\":true,\"minlength\":3,\"requiredExpression\":\"!result.userView\"},\"help\":\"#PSEUDO_HELP\",\"info\":\"#PSEUDO_INFO\"}],[{\"icon\":\"fa-lock\",\"cols\":12,\"key\":\"password\",\"type\":\"password\",\"label\":\"#PASSWORD\",\"validation\":{\"xrequired\":true,\"minLength\":4,\"maxLength\":14},\"help\":\"#PASSWORD_HELP\",\"info\":\"#PASSWORD_INFO\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/signin_copy.json\",'[{\"rows\":[[{\"icon\":\"fa-user\",\"key\":\"username\",\"cols\":12,\"label\":\"#CURRENT_USER\",\"type\":\"currentUser\",\"validation\":{\"required\":true,\"minlength\":3},\"help\":\"#PSEUDO_HELP\",\"info\":\"#PSEUDO_INFO\"}],[{\"icon\":\"fa-user\",\"cols\":9,\"label\":\"#CURRENT_USER\",\"staticExpression\":\"result.userView.LastName + \\' \\' + result.userView.FirstName\",\"type\":\"static\",\"hideExpression\":\"!result.userView\"},{\"cols\":3,\"type\":\"button\",\"label\":\"#CHANGE\",\"clickExpression\":\"result.changeUser()\",\"hideExpression\":\"!result.userView\"}],[{\"icon\":\"fa-user\",\"cols\":12,\"key\":\"username\",\"type\":\"text\",\"label\":\"#PSEUDO\",\"validation\":{\"required\":true,\"minlength\":3,\"requiredExpression\":\"!result.userView\"},\"help\":\"#PSEUDO_HELP\",\"info\":\"#PSEUDO_INFO\",\"hideExpression\":\"result.userView\"}],[{\"icon\":\"fa-lock\",\"cols\":12,\"key\":\"password\",\"type\":\"password\",\"label\":\"#PASSWORD\",\"validation\":{\"required\":true},\"help\":\"#PASSWORD_HELP\",\"info\":\"#PASSWORD_INFO\"}]]}]')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/resources/signup.json\",'[{\"key\":\"contact\",\"label\":\"#CONTACT\",\"scrollSpy\":true,\"rows\":[[{\"cols\":6,\"key\":\"LastName\",\"type\":\"text\",\"label\":\"#LASTNAME\",\"info\":\"#FIRSTNAMEINFO\",\"placeholder\":\"\",\"required\":true,\"help\":\"#YOURLASTNAMEHELP\",\"validation\":{\"required\":true,\"minLength\":2}},{\"cols\":6,\"key\":\"FirstName\",\"type\":\"text\",\"label\":\"#FIRSTNAME\",\"placeholder\":\"\",\"help\":\"#YOURFIRSTNAMEHELP\",\"validation\":{\"required\":true,\"minLength\":2}}],[{\"cols\":3,\"key\":\"Gender\",\"type\":\"radio\",\"label\":\"#GENDER\",\"disabled\":false,\"help\":\"\",\"validation\":{\"required\":true},\"options\":[{\"Id\":\"M\",\"Text\":\"#M\"},{\"Id\":\"F\",\"Text\":\"#F\"}]},{\"cols\":3,\"key\":\"BirthDate\",\"type\":\"date\",\"label\":\"#BIRTHDATE\",\"disabled\":false,\"help\":\"#BIRTHDATEHELP\",\"info\":\"#BIRTHDATEINFO\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"Nationality\",\"default\":\"BEL\",\"type\":\"select\",\"label\":\"#NATIONALITY\",\"disabled\":false,\"help\":\"\",\"resets\":[\"PostCode\",\"City\"],\"datasource-url\":\"form/dataset/get/nat_{{ formOptions.currentLanguage }}?FirstName={{ result.FirstName }}\",\"validation\":{\"required\":true}}],[{\"cols\":6,\"key\":\"Country\",\"type\":\"select2\",\"label\":\"#COUNTRY\",\"disabled\":false,\"datasource-url\":\"form/dataset/get/country_{{ formOptions.currentLanguage }}?FirstName={{ result.FirstName }}\",\"validation\":{\"required\":true}}],[{\"cols\":6,\"key\":\"PostCode\",\"type\":\"autocomplete\",\"label\":\"#POSTCODE\",\"disabled\":false,\"help\":\"\",\"datasource-url\":\"form/dataset/get/cp/0/10?Country={{ result.Country }}&PostCode={{result.PostCode}}\",\"validation\":{\"required\":true}},{\"cols\":6,\"key\":\"City\",\"type\":\"text\",\"label\":\"#CITY\",\"placeholder\":\"\",\"help\":\"#CITYHELP\",\"validation\":{\"required\":true,\"minLength\":2}}],[{\"cols\":6,\"key\":\"Email\",\"type\":\"text\",\"label\":\"#EMAIL\",\"help\":\"#EMAILHELP\",\"validation\":{\"required\":true,\"pattern\":\"^([a-zA-Z0-9_\\\\\\\\.\\\\\\\\-])+\\\\\\\\@(([a-zA-Z0-9\\\\\\\\-])+\\\\\\\\.)+([a-zA-Z0-9]{2,8})+$\"}},{\"cols\":6,\"key\":\"x_EmailBis\",\"type\":\"text\",\"label\":\"#EMAILBIS\",\"help\":\"#EMAILHELP\",\"hideExpression\":\"!result.Email\",\"validation\":{\"required\":true,\"compareTo\":\"result.Email\"}}]]},{\"key\":\"account\",\"label\":\"#ACCOUNT\",\"scrollSpy\":true,\"rows\":[[{\"cols\":6,\"key\":\"UserName\",\"type\":\"text\",\"label\":\"#USERNAME\",\"disabled\":false,\"validation\":{\"required\":true,\"minLength\":3,\"remote\":\"account/user/available/userName?value={{result.UserName}}\"}}],[{\"cols\":6,\"key\":\"Password\",\"type\":\"password\",\"label\":\"#PASSWORD\",\"strengthIndicator\":true,\"hideExpression\":\"!result.UserName\",\"validation\":{\"required\":true,\"requiredExpression\":\"result.UserName!=null\",\"minLength\":4,\"maxLength\":14}},{\"cols\":6,\"key\":\"x_ConfirmPassword\",\"type\":\"password\",\"label\":\"#CONFIRMPASSWORD\",\"strengthIndicator\":true,\"hideExpression\":\"!result.UserName\",\"validation\":{\"required\":true,\"requiredExpression\":\"result.UserName!=null\",\"compareTo\":\"result.Password\"}}]]}]');\n}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/contextedit.html\",'<div><div ng-if=\"!ctrl.currentContext\" translate=\"\">LOADING</div><div ng-if=\"ctrl.currentContext\"><div class=\"panel panel-info\"><div class=\"panel-body\"><div class=\"row\"><div class=\"col-xs-9\"><button ng-repeat=\"(actorId, actorValue) in ctrl.currentContext.ActorValues\" class=\"btn\" ng-click=\"ctrl.SelectActor(actorId)\" ng-class=\"actorId==ctrl.currentActor.Id?\\'btn-primary\\':\\'\\'\">{{ actorValue.ActorView.Name }}</button>&nbsp;</div><div class=\"col-xs-3\"><div class=\"pull-right\"><button ng-click=\"ctrl.SelectActor()\" class=\"btn btn-default\"><span class=\"glyphicon glyphicon-search\" aria-hidden=\"true\"></span></button></div></div></div></div></div><div class=\"panel panel-info\" ng-if=\"ctrl.currentActor.Id\"><div class=\"panel-heading\"><b>{{ctrl.currentActor.Name}}</b></div><div class=\"panel-body\">{{ctrl.currentActor.Type}}/{{ctrl.currentActor.Reference}}<br><i>{{ctrl.currentActor.Description}}</i><br><br><div class=\"row\"><div class=\"col-md-9\"><p><button class=\"btn btn-default\" ng-click=\"ctrl.SelectActor(actorId)\" ng-repeat=\"(actorId, parent) in ctrl.currentActor.Parents\">{{parent.Name}}</button></p></div><div class=\"col-md-3\"></div></div></div></div><div class=\"panel panel-info\" ng-if=\"ctrl.currentActor.Id\"><div class=\"panel-heading\" translate=\"PERMISSIONVALUES\"></div><div class=\"panel-body\"><div class=\"tabs-vertical row\"><div class=\"col-sm-3\"><ul class=\"nav nav-tabs-vertical\" role=\"tablist\"><li role=\"presentation\" ng-repeat=\"(permGroup, permTypes) in permissionGroups\" ng-class=\"{\\'active\\':($index==0 && !activePermGroupTab) || permGroup==activePermGroupTab}\"><a ng-click=\"SetActivePermGroupTab(permGroup)\" role=\"tab\" data-toggle=\"tab\">{{permGroup}}</a></li></ul></div><div class=\"col-sm-9\"><div class=\"tab-content\"><div role=\"tabpanel\" class=\"tab-pane\" ng-repeat=\"(permGroup, permTypes) in permissionGroups\" ng-class=\"{\\'active\\':($index==0 && !activePermGroupTab) || permGroup==activePermGroupTab}\"><table class=\"table table-stripped\" style=\"width:300px\"><tr ng-repeat=\"permType in permTypes\"><td><ng-toggle tri-toggle=\"\" ng-true-val=\"\\'true\\'\" ng-false-val=\"\\'false\\'\" ng-no-val=\"\\'\\'\" ng-model=\"values[ctrl.currentActor.Id][permType.Id]\"></ng-toggle></td><td>{{permType.Name}}</td></tr></table></div></div></div></div></div></div><div class=\"row\"><div class=\"col-xs-6\"><button ng-if=\"backLink\" ui-sref=\"^.overview\" class=\"btn btn-default\"><span class=\"glyphicon glyphicon-chevron-left\" aria-hidden=\"true\"></span></button></div><div class=\"col-xs-6\"><div class=\"pull-right\" ng-show=\"ctrl.currentActor.Id\"><button class=\"btn btn-success\" ng-click=\"ctrl.Save()\"><span class=\"glyphicon glyphicon-floppy-disk\" aria-hidden=\"true\"></span> {{\\'SAVE\\'|t}}</button> <button class=\"btn btn-default\" ng-click=\"ctrl.Reset()\" translate=\"\">RESET</button></div></div></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/contextrole.html\",'<div><div ng-if=\"ctrl.loading\" translate=\"\">LOADING</div><div ng-if=\"!ctrl.loading\"><div class=\"panel panel-info ng-scope\" ng-repeat=\"(k,roles) in ctrl.contextRoleData.RolePermissions\"><div class=\"panel-heading\">{{roles.Role.Name|tc:context}}</div><div class=\"panel-body\"><table class=\"table table-striped table-hover\"><tr ng-repeat=\"actor in roles.Actors\"><td>{{actor.Name }}</td><td align=\"right\"><button ng-click=\"ctrl.RemoveActor(actor.Id, roles.Role.Id,roles.Role.Reference)\" class=\"btn btn-danger\"><span class=\"glyphicon glyphicon-minus\" aria-hidden=\"true\"></span></button></td></tr><tr><td colspan=\"2\" align=\"right\"><button ng-click=\"ctrl.AddActor(roles.Role.Id,roles.Role.Reference)\" class=\"btn btn-default\"><span class=\"glyphicon glyphicon-plus\" aria-hidden=\"true\"></span></button></td></tr></table></div></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/cr-current-user.html\",'<div ng-controller=\"formCurrentUserController\"><div class=\"form-group has-feedback nomargin\" ng-show=\"userView()\"><div class=\"form-group\"><label class=\"control-label\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.currentuser | tc:formOptions.context }}</label><div class=\"input-group\"><p class=\"form-control-static\">{{userView().LastName}} {{userView().FirstName}}</p><span class=\"input-group-btn\"><button class=\"btn btn-default\" type=\"button\" ng-click=\"changeUser()\">{{\\'CHANGE\\' | translate:formOptions.context:options}}</button></span></div></div></div><div class=\"form-group has-feedback nomargin\" ng-show=\"!userView()\" ng-class=\"{true: \\'has-error\\'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\"><label class=\"control-label\" for=\"{{ id }}\"><i class=\"fa fa-fw {{ options.icon }}\" ng-if=\"options.icon\"></i> {{ options.label || \\'Text\\' | tc:formOptions.context }} <span ng-if=\"options.validation.required\">*</span></label><div class=\"feedback-container\" ng-hide=\"options.disabled || formOptions.disabled\"><input type=\"text\" id=\"{{ id }}\" name=\"field\" cr-form-name=\"options.key\" cr-form-field-validator=\"options.validation\" class=\"form-control\" ng-attr-placeholder=\"{{ options.placeholder }}\" autocomplete=\"off\" ng-disabled=\"options.disabled || formOptions.disabled\" ng-model=\"$parent.value\" ng-model-options=\"{ debounce: 250 }\" cr-focus=\"\" ng-focus=\"\"> <span class=\"form-control-feedback popover-trigger\" popover=\"{{ options.info | tc:formOptions.context:options }}\" popover-append-to-body=\"true\" popover-trigger=\"mouseenter\" ng-if=\"options.info\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block\" ng-show=\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\"help-block error\" ng-repeat=\"(key, value) in options.formField.$error | firstTrueValue\" ng-show=\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\"options.disabled || formOptions.disabled\"><p class=\"form-control-static\">{{ value }}</p></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/loginwidget.html\",'<div class=\"panel panel-well\" ng-controller=\"loginCtrl\" ng-if=\"!isAuthenticated() && showLogin\"><div class=\"panel-heading toggle-collapse\" ng-class=\"{true: \\'collapsed\\'}[loginCollapsed]\" ng-click=\"loginCollapsed = !loginCollapsed\"><h3 class=\"panel-title\"><i class=\"fa fa-fw fa-unlock\"></i>{{ \\'LOGIN\\' | translate }}</h3></div><div class=\"collapse in\" collapse=\"loginCollapsed\" id=\"login-content\"><span class=\"label label-danger\" translate=\"{{errorMessage}}\"></span><form ng-submit=\"login()\" novalidate=\"novalidate\"><fieldset><div class=\"form-group has-feedback feedback-container\"><label class=\"control-label\" for=\"inputLogin\">{{ \\'PSEUDO\\' | translate }} <span>*</span></label> <input type=\"text\" name=\"inputLogin\" class=\"form-control\" id=\"inputLogin\" placeholder=\"\" required=\"required\" tabindex=\"30\" popover=\"Veuillez entrer votre pseudonyme\" popover-title=\"Something\" popover-placement=\"top\" popover-append-to-body=\"\" popover-trigger=\"manual\" ng-model=\"username\"> <span class=\"form-control-feedback popover-trigger\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span> <span class=\"help-block hide\" translate=\"\">PSEUDO_HELP</span></div><div class=\"form-group has-feedback\"><label class=\"control-label\" for=\"inputPassword\">{{ \\'PASSWORD\\' | translate }} <span>*</span></label> <input type=\"text\" name=\"password\" class=\"form-control\" id=\"inputPassword\" placeholder=\"\" required=\"required\" tabindex=\"31\" popover=\"Veuillez entrer votre mot de passe\" popover-title=\"Something\" popover-placement=\"top\" popover-append-to-body=\"\" popover-trigger=\"manual\" ng-model=\"password\"> <span class=\"form-control-feedback popover-trigger\"><i class=\"fa fa-fw fa-lg fa-info-circle\"></i></span></div><div class=\"form-group\"><div class=\"checkbox\"><label for=\"inputRemindme\"><input type=\"checkbox\" name=\"remindme\" id=\"inputRemindme\" tabindex=\"32\"> {{ \\'REMEMBERME\\' | translate }}</label></div><button class=\"btn btn-success btn-block\" type=\"submit\" tabindex=\"33\" translate=\"\">LOGIN</button><p class=\"text-center\"><a href=\"\" translate=\"\">LOSTPASSWORD</a></p></div></fieldset></form><hr><div class=\"panel-body\"><a class=\"btn btn-facebook btn-block\" href=\"\" ng-click=\"oAuth2Login(\\'facebook\\')\" translate=\"LOGINWITHFB\"></a> <a class=\"btn btn-twitter btn-block\" href=\"\" ng-click=\"oAuth1Login(\\'Twitter\\')\" translate=\"LOGINWITHTWITTER\"></a> <a class=\"btn btn-warning btn-block\" ui-sref=\"account/signup\" translate=\"SIGNUP\"></a></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/lostpassword.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss()\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"text-center\" translate=\"\">LOSTPASSWORD</h4></div><div class=\"modal-body\"><div class=\"clearfix\"><div class=\"col-sm-12\"><p class=\"text-muted\" translate=\"\">LOSTPASSWORD_HELP</p><br></div></div><div class=\"clearfix\"><div class=\"col-sm-12\"><div class=\"alert alert-danger\" ng-show=\"errorMessage\"><p>{{ errorMessage | translate:context }}</p></div><cr-form name=\"lostPasswordForm\" result=\"userNameData\" definition=\"userNameFields\" options=\"formOptions\" rc-submit=\"ResetPassword(userNameData)\"><div class=\"modal-footer\"><div class=\"text-center\"><br><button class=\"btn btn-primary\" type=\"submit\" translate=\"\" ng-disabled=\"tracker.active()\">RECOVERPWD</button> <button class=\"btn btn-default\" type=\"button\" ng-click=\"$dismiss()\" translate=\"\">CANCEL</button></div></div></cr-form></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/searchactor.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss()\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"text-center\" translate=\"\">SEARCHACTOR</h4></div><div class=\"modal-body\"><div class=\"clearfix\"><div class=\"col-sm-12\"><p class=\"text-muted\" translate=\"\">SEARCHACTORHELP</p><br></div></div><div class=\"clearfix\"><div class=\"col-sm-12\"><div class=\"alert alert-danger\" ng-show=\"errorMessage\"><p>{{ errorMessage | translate:context }}</p></div></div></div><cr-actor-list default-selected=\"role\" select=\"Select(actorId)\"></cr-actor-list><div class=\"text-center\"><br><button class=\"btn btn-default\" ng-click=\"$dismiss()\" translate=\"\">CANCEL</button></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/searchcontext.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss()\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"text-center\" translate=\"\">SEARCHCONTEXT</h4></div><div class=\"modal-body\"><div class=\"clearfix\"><div class=\"col-sm-12\"><p class=\"text-muted\" translate=\"\">SEARCHCONTEXTHELP</p><br></div></div><cr-context-list select=\"Select(contextId)\"></cr-context-list><div class=\"text-center\"><br><button class=\"btn btn-default\" ng-click=\"$dismiss()\" translate=\"\">CANCEL</button></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/selectduplicateuser.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss()\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"modal-title\">{{Title||\\'SELECTDUPLICATE\\' | translate:\\'Account\\' }}</h4></div><div class=\"modal-body\"><table class=\"table\"><tr ng-repeat=\"duplicateUser in DuplicateUsers\"><td>{{ duplicateUser.ChronoCode }}</td><td>{{ duplicateUser.LastName }} {{ duplicateUser.FirstName }}</td><td>{{ duplicateUser.YOB }}</td><td>{{ duplicateUser.City }}</td><td align=\"right\"><button class=\"btn\" ng-if=\"!duplicateUser.Virtual\" translate=\"\" ng-click=\"Action(\\'Login\\',duplicateUser)\">LOGIN</button> <button class=\"btn\" ng-if=\"duplicateUser.Virtual\" translate=\"\" ng-click=\"Action(\\'Activate\\',duplicateUser)\">ACTIVATE</button></td></tr></table></div><div class=\"modal-footer\"><button type=\"button\" ng-if=\"ForceAllowed\" class=\"btn btn-warning\" ng-click=\"Action(\\'Force\\',null)\" translate=\"\">FORCECREATENEWUSER</button> <button type=\"button\" class=\"btn btn-primary\" ng-click=\"$dismiss()\" translate=\"\">CANCEL</button></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/templates/selectuser.html\",'<div class=\"modal-header\"><button type=\"button\" class=\"close\" ng-click=\"$dismiss()\" data-dismiss=\"modal\"><span aria-hidden=\"true\">&times;</span><span class=\"sr-only\">Close</span></button><h4 class=\"modal-title\" translate=\"\">SELECTUSER</h4></div><div class=\"modal-body\"><table class=\"table\"><tr ng-repeat=\"duplicateUser in DuplicateUsers\"><td>{{ duplicateUser.ChronoCode }}</td><td>{{ duplicateUser.LastName }} {{ duplicateUser.FirstName }}</td><td>{{ duplicateUser.YOB }}</td><td>{{ duplicateUser.City }}</td><td align=\"right\"><button class=\"btn\" translate=\"\" ng-click=\"Action(\\'Select\\',duplicateUser)\">SELECT</button></td></tr></table></div><div class=\"modal-footer\"><button type=\"button\" class=\"btn btn-primary\" ng-click=\"$dismiss()\" translate=\"\">CANCEL</button></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/account.html\",'<div class=\"row\"><div class=\"col-sm-12\"><h1 translate=\"\">ACCOUNT</h1><span class=\"label label-danger\">{{errorMessage | translate:\\'Account\\'}}</span><ui-view></ui-view></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/accountdetail.html\",\"<h1>Account details</h1>>\")}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/actoredit.html\",'<section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-key\"></i></div><h1 class=\"page-title\"><div ui-view=\"title\"><span>{{\\'PERMISSION\\'|t}}</span></div><small><div ui-view=\"subtitle\">{{\\'ACTOR\\'|t}}</div></small></h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><cr-form cr-focus=\"\" name=\"actorForm\" result=\"actorOperation\" definition=\"formDefinition\" options=\"formOptions\" rc-submit=\"Submit()\"><br><div class=\"row\"><div class=\"col-xs-6\"><button ng-click=\"GoBack()\" class=\"btn btn-default\"><span class=\"glyphicon glyphicon-chevron-left\" aria-hidden=\"true\"></span></button></div><div class=\"col-xs-6\"><div class=\"pull-right\"><button class=\"btn btn-success\" type=\"submit\"><span class=\"glyphicon glyphicon-floppy-disk\" aria-hidden=\"true\"></span> {{\\'SAVE\\'|t}}</button></div></div></div></cr-form></div></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/actorlist.html\",'<section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-key\"></i></div><h1 class=\"page-title\"><div ui-view=\"title\"><span>{{\\'PERMISSION\\'|t}}</span></div><small><div ui-view=\"subtitle\">{{\\'ACTOR\\'|t}}</div></small></h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><cr-actor-list select=\"SelectActor(actorId)\"></cr-actor-list><div class=\"pull-right\"><button ui-sref=\"permission.actor.create\" class=\"btn btn-primary\" type=\"button\"><span class=\"glyphicon glyphicon-plus\" aria-hidden=\"true\"></span></button></div><div class=\"clearfix\"></div></div></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/actoroverview.html\",'<section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-key\"></i></div><h1 class=\"page-title\"><div ui-view=\"title\"><span>{{\\'PERMISSION\\'|t}}</span></div><small><div ui-view=\"subtitle\">{{\\'ACTOR\\'|t}}</div></small></h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><div class=\"panel panel-info\" ng-if=\"currentActor.Id\"><div class=\"panel-heading\"><b>{{currentActor.Name}}</b></div><div class=\"panel-body\">{{currentActor.Type}}/{{currentActor.Reference}}<br><i>{{currentActor.Description}}</i></div><div class=\"panel-footer text-right\"><span ng-if=\"callback!=null\"><button ng-click=\"SelectActor()\" class=\"btn btn-success\" translate=\"SELECT\"></button></span> <button class=\"btn btn-primary\" ui-sref=\"permission.actor.item.detail\"><span class=\"fa fa-plus\" aria-hidden=\"true\"></span></button> <button class=\"btn btn-primary\" ui-sref=\"^.edit\"><span class=\"glyphicon glyphicon-pencil\" aria-hidden=\"true\"></span></button> <button class=\"btn btn-danger\" ng-click=\"DeleteActor()\"><span class=\"glyphicon glyphicon-minus\" aria-hidden=\"true\"></span></button></div></div><div class=\"panel panel-info\" ng-if=\"currentActor.Id\"><div class=\"panel-heading\"><b translate=\"\">ROLES</b></div><ul class=\"list-group\"><li class=\"list-group-item\" ng-repeat=\"(actorId, parent) in currentActor.Parents\"><div class=\"pull-left\"><b>{{parent.Name}}</b><br>{{parent.Type}}/{{parent.Reference}}</div><div class=\"pull-right\"><button class=\"btn btn-primary\" ng-click=\"AddMembershipContext(actorId)\"><span class=\"glyphicon glyphicon-plus\" aria-hidden=\"true\"></span></button> <button class=\"btn btn-danger\" ng-click=\"DeleteMembership(actorId)\"><span class=\"glyphicon glyphicon-minus\" aria-hidden=\"true\"></span></button> <button class=\"btn btn-default\" ng-click=\"SetActor(actorId)\"><span class=\"glyphicon glyphicon-chevron-right\" aria-hidden=\"true\"></span></button></div><div class=\"clearfix\"></div><br><div ng-repeat=\"(contextId,contextView) in parent.ContextView\" class=\"btn-group\" dropdown=\"\" is-open=\"blabla.isopen\"><button type=\"button\" class=\"btn btn-default\">{{contextView.Name}}</button> <button type=\"button\" class=\"btn btn-default dropdown-toggle\" dropdown-toggle=\"\"><span class=\"caret\"></span></button><ul class=\"dropdown-menu\" role=\"menu\"><li><a ng-click=\"DeleteMembershipContext(actorId,contextId)\" translate=\"\">DELETE</a></li></ul></div></li></ul><div class=\"panel-footer text-right\"><button class=\"btn btn-primary\" ng-click=\"AddMembership()\"><span class=\"glyphicon glyphicon-plus\" aria-hidden=\"true\"></span></button></div></div><div class=\"panel panel-info\" ng-if=\"currentActor.Id\"><div class=\"panel-heading\"><b translate=\"\">TEMPLATE</b></div><div class=\"panel-body\"><li ng-repeat=\"(permId,permView) in currentActor.TemplateView\">{{ permView.PermissionName }} - {{permView.Value}}</li></div><div class=\"panel-footer text-right\"><button class=\"btn btn-primary\" ng-click=\"PermissionTemplate()\"><span class=\"glyphicon glyphicon-pencil\" aria-hidden=\"true\"></span></button></div></div><div class=\"row\"><div class=\"col-xs-6\"><button ui-sref=\"^.^.list\" class=\"btn btn-default\"><span class=\"glyphicon glyphicon-chevron-left\" aria-hidden=\"true\"></span></button></div><div class=\"col-xs-6\"></div></div></div></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/confirmactivationtoken.html\",'<div class=\"row\"><div class=\"col-sm-12\"><div class=\"panel panel-widget\"><div class=\"panel-heading\"><h3 class=\"panel-title\" translate=\"CONF_ACTIVATIONMAILSEND\"></h3></div><div class=\"panel-body\"><button class=\"btn btn-primary\" translate=\"FINISH\" ui-sref=\"account/signin\"></button></div></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/contextedit.html\",'<section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-key\"></i></div><h1 class=\"page-title\"><div ui-view=\"title\"><span>{{\\'PERMISSION\\'|t}}</span></div><small><div ui-view=\"subtitle\">{{\\'CONTEXT\\'|t}}</div></small></h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><cr-form cr-focus=\"\" name=\"contextForm\" result=\"contextOperation\" definition=\"formDefinition\" options=\"formOptions\" rc-submit=\"Submit()\"><br><div class=\"row\"><div class=\"col-xs-6\"><button ng-click=\"GoBack()\" class=\"btn btn-default\"><span class=\"glyphicon glyphicon-chevron-left\" aria-hidden=\"true\"></span></button></div><div class=\"col-xs-6\"><div class=\"pull-right\"><button class=\"btn btn-success\" type=\"submit\"><span class=\"glyphicon glyphicon-floppy-disk\" aria-hidden=\"true\"></span> {{\\'SAVE\\'|t}}</button></div></div></div></cr-form></div></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/contextlist.html\",'<section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-key\"></i></div><h1 class=\"page-title\"><div ui-view=\"title\"><span>{{\\'PERMISSION\\'|t}}</span></div><small><div ui-view=\"subtitle\">{{\\'CONTEXT\\'|t}}</div></small></h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><cr-context-list select=\"SelectContext(contextId)\"></cr-context-list><div class=\"pull-right\"><button ui-sref=\"^.create\" class=\"btn btn-primary\" type=\"button\"><span class=\"glyphicon glyphicon-plus\" aria-hidden=\"true\"></span></button></div><div class=\"clearfix\"></div></div></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/manage.html\",'<section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-key\"></i></div><h1 class=\"page-title\"><div ui-view=\"title\"><span>{{\\'PERMISSION\\'|t}}</span></div><small ng-if=\"currentContext.Id==\\'0\\'\"><div ui-view=\"subtitle\">{{\\'ACTOR\\'|t}}</div></small> <small ng-if=\"currentContext.Id!=\\'0\\'\"><div ui-view=\"subtitle\">{{\\'CONTEXT\\'|t}}</div></small></h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><blockquote translate=\"PERMISSIONMANAGEHELP\"></blockquote><cr-context-edit context-id=\"contextId\" actor-id=\"{{currentActor.Id}}\" back-link=\"true\"></cr-context-edit></div></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/message.html\",'<section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-user\"></i></div><h1 class=\"page-title\">{{title|translate:\\'Account\\'}} <small translate=\"SIGNUP_STEP3\"></small></h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><span ng-bind-html=\"message | translate:\\'Account\\' | sanitize\"></span><br><br><div align=\"center\"><button class=\"btn btn-primary\" translate=\"FINISH\" ui-sref=\"account/signin\"></button></div></div></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/overview.html\",'<section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-key\"></i></div><h1 class=\"page-title\"><div ui-view=\"title\"><span>{{\\'PERMISSION\\'|t}}</span></div><small><div ui-view=\"subtitle\">{{\\'CONTEXT\\'|t}}</div></small></h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><div class=\"form-group has-feedback nomargin\"><table class=\"table\"><tr ng-repeat-start=\"(actorId, actorValue) in currentContext.ActorValues\"><td>{{actorValue.ActorView.Type}} / <b>{{actorValue.ActorView.Name}}</b></td><td><button class=\"btn btn-edit pull-right\" ng-click=\"Manage(actorId)\" translate=\"MANAGE\"></button></td></tr><tr ng-repeat-end=\"\"><td colspan=\"2\"><li ng-repeat=\"(permissionId, permissionValue) in actorValue.Values\">{{permissionValue.PermissionName}} - {{permissionValue.Value}}</li></td></tr></table></div><div class=\"row\"><div class=\"col-xs-6\"><button ui-sref=\"^.^.list\" class=\"btn btn-default\"><span class=\"glyphicon glyphicon-chevron-left\" aria-hidden=\"true\"></span></button></div><div class=\"col-xs-6\"><div class=\"pull-right\"><span ng-if=\"callback!=null\"><button ng-click=\"SelectContext()\" class=\"btn btn-success\" translate=\"SELECT\"></button></span> <button class=\"btn btn-primary\" ui-sref=\"^.create\"><span class=\"glyphicon glyphicon-plus\" aria-hidden=\"true\"></span></button> <button class=\"btn btn-primary\" ui-sref=\"^.edit\"><span class=\"glyphicon glyphicon-pencil\" aria-hidden=\"true\"></span></button> <button class=\"btn btn-danger\" ng-click=\"DeleteContext()\"><span class=\"glyphicon glyphicon-minus\" aria-hidden=\"true\"></span></button></div></div></div></div></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/permission.html\",'<div ui-view=\"\"></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/permissionmenu.html\",'<section class=\"page-content page-content-lg page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-key\"></i></div><h1 class=\"page-title\">{{ \\'PERMISSION\\' | translate:Context }}</h1></div><div class=\"dashboard-content\"><cr-menusquare><cr-menusquare-item sq-icon=\"home\" sq-title=\"HOME\" sq-description=\"HOME_DETAIL\" sq-anim-direction=\"down\" sq-route=\"index\"></cr-menusquare-item><cr-menusquare-item sq-icon=\"pencil-square-o\" sq-title=\"CONTEXTLIST\" sq-description=\"CONTEXTLIST_DETAIL\" sq-anim-direction=\"down\" sq-route=\"permission.context.list\"></cr-menusquare-item><cr-menusquare-item sq-icon=\"users\" sq-title=\"ACTORLIST\" sq-route=\"permission.actor.list\"></cr-menusquare-item><cr-menusquare-item sq-icon=\"list\" sq-title=\"PERMTYPE\" sq-route=\"permission.type.list\"></cr-menusquare-item><cr-menusquare-item sq-icon=\"bell-o\" sq-title=\"NOTIFICATIONTEST\" sq-action=\"NotificationTest(\\'#PROUT\\')\"></cr-menusquare-item><cr-menusquare-item sq-icon=\"file-text-o\" sq-title=\"MESSAGETEST\" sq-action=\"MessageTest(\\'#PROUT\\')\"></cr-menusquare-item></cr-menusquare></div></section>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/permtypeedit.html\",'<section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-key\"></i></div><h1 class=\"page-title\"><div ui-view=\"title\"><span>{{\\'PERMISSION\\'|t}}</span></div><small><div ui-view=\"subtitle\">{{\\'PERMTYPE\\'|t}}</div></small></h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><cr-form cr-focus=\"\" name=\"permTypeForm\" result=\"permTypeOperation\" definition=\"formDefinition\" options=\"formOptions\" rc-submit=\"Submit()\"><br><div class=\"row\"><div class=\"col-xs-6\"><button ui-sref=\"permission.type.list\" class=\"btn btn-default\"><span class=\"glyphicon glyphicon-chevron-left\" aria-hidden=\"true\"></span></button></div><div class=\"col-xs-6\"><div class=\"pull-right\"><button class=\"btn btn-success\" type=\"submit\"><span class=\"glyphicon glyphicon-floppy-disk\" aria-hidden=\"true\"></span> {{\\'SAVE\\'|t}}</button> <button class=\"btn btn-danger\" ng-show=\"edit\" ng-click=\"DeletePermType()\"><span class=\"glyphicon glyphicon-minus\" aria-hidden=\"true\"></span></button></div></div></div></cr-form></div></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/permtypelist.html\",'<section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-key\"></i></div><h1 class=\"page-title\"><div ui-view=\"title\"><span>{{\\'PERMISSION\\'|t}}</span></div><small><div ui-view=\"subtitle\">{{\\'PERMTYPE\\'|t}}</div></small></h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><div class=\"tabs-vertical row\"><div class=\"col-sm-3\"><ul class=\"nav nav-tabs-vertical\" role=\"tablist\"><li role=\"presentation\" ng-repeat=\"(permGroup, permTypes) in permissionGroups\" ng-class=\"{\\'active\\':($index==0 && !activePermGroupTab) || permGroup==activePermGroupTab}\"><a ng-click=\"SetActivePermGroupTab(permGroup)\" role=\"tab\" data-toggle=\"tab\">{{permGroup}}</a></li></ul></div><div class=\"col-sm-9\"><div class=\"tab-content\"><div role=\"tabpanel\" class=\"tab-pane\" ng-repeat=\"(permGroup, permTypes) in permissionGroups\" ng-class=\"{\\'active\\':($index==0 && !activePermGroupTab) || permGroup==activePermGroupTab}\"><table class=\"table table-stripped\" style=\"width:300px\"><tr ng-repeat=\"permType in permTypes\"><td>{{permType.Name}}</td><td>{{getPermDataTypeName(permType.DataType)}}</td><td><button class=\"btn btn-edit pull-right\" type=\"button\" ng-click=\"SelectPermissionType(permType)\"><span class=\"glyphicon glyphicon-chevron-right\" aria-hidden=\"true\"></span></button></td></tr></table></div></div></div></div><div class=\"pull-right\"><button ui-sref=\"permission.type.create\" class=\"btn btn-primary\" type=\"button\"><span class=\"glyphicon glyphicon-plus\" aria-hidden=\"true\"></span></button></div><div class=\"clearfix\"></div></div></div></div></section>')}])}(),function(module){try{module=angular.module(\"cr.account\");\n}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/searchactor.html\",'<div cr-focus=\"\"><div class=\"form-group has-feedback nomargin\"><div class=\"row\" ng-show=\"!enhancedSearch\"><div class=\"col-md-12\"><form><div class=\"input-group\"><span class=\"input-group-btn\" dropdown=\"\"><button type=\"button\" class=\"btn btn-primary dropdown-toggle\" dropdown-toggle=\"\">{{searchFilter|translate:context}} <span class=\"caret\"></span></button><ul class=\"dropdown-menu\" role=\"menu\"><li ng-class=\"{\\'disabled\\': isDisabled(\\'USER\\') ? \\'disabled\\' : \\'\\'}\"><a ng-click=\"SetActorFilter(\\'USER\\')\" href=\"\" translate=\"USER\"></a></li><li ng-class=\"{\\'disabled\\': isDisabled(\\'ROLE\\') ? \\'disabled\\' : \\'\\'}\"><a ng-click=\"SetActorFilter(\\'ROLE\\')\" href=\"\" translate=\"ROLE\"></a></li></ul></span> <input type=\"text\" class=\"form-control\" ng-model=\"search\"> <span class=\"input-group-btn\"><button class=\"btn btn-success\" type=\"submit\" ng-click=\"Search(search)\"><span class=\"glyphicon glyphicon-search\" aria-hidden=\"true\"></span></button> <button class=\"btn btn-default\" ng-if=\"searchFilter==\\'USER\\'\" type=\"submit\" ng-click=\"SetEnhancedSearch(true)\"><span class=\"glyphicon glyphicon-plus\" aria-hidden=\"true\"></span></button></span></div></form></div></div><cr-form ng-if=\"enhancedSearch\" name=\"actorSearch\" result=\"userSearchData\" definition=\"actorSearchFormDefinition\" options=\"formOptions\" rc-submit=\"Search()\"><br><div class=\"row\"><div class=\"col-xs-6\"></div><div class=\"col-xs-6\"><div class=\"pull-right\"><button class=\"btn btn-success\" type=\"submit\" ng-click=\"Search()\"><span class=\"glyphicon glyphicon-search\" aria-hidden=\"true\"></span></button> <button class=\"btn btn-default\" ng-click=\"SetEnhancedSearch(false)\"><span class=\"glyphicon glyphicon-minus\" aria-hidden=\"true\"></span></button></div></div></div></cr-form></div><div class=\"row\" ng-if=\"searchFilter==\\'USER\\'\"><div class=\"col-sm-12\" ng-show=\"$parent.userSearchResult.length>0\"><table class=\"table table-striped\"><thead><tr><th translate=\"NAME\"></th><th translate=\"YOB\"></th><th>&nbsp;</th></tr></thead><tbody><tr ng-repeat=\"userView in $parent.userSearchResult\"><td>{{userView.LastName}} {{userView.FirstName}}</td><td>{{userView.YOB}}</td><td><button class=\"btn btn-edit pull-right\" type=\"button\" ng-click=\"SelectUserView(userView)\"><span class=\"glyphicon glyphicon-chevron-right\" aria-hidden=\"true\"></span></button></td></tr></tbody></table></div><div class=\"col-sm-12\" ng-show=\"$parent.userSearchResult.length==0\">NA</div></div><div class=\"row\" ng-if=\"searchFilter==\\'ROLE\\'\"><div class=\"col-sm-12\" ng-if=\"$parent.actorList.length==0\">NA</div><div class=\"col-sm-12\" ng-if=\"$parent.actorList.length>0\"><table class=\"table table-striped\"><thead><tr><th translate=\"TYPE\"></th><th translate=\"REFERENCE\"></th><th translate=\"NAME\"></th><th translate=\"DESCRIPTION\"></th><th>&nbsp;</th></tr></thead><tbody><tr ng-repeat=\"item in actorList\"><th class=\"t20\">{{item.Type}}</th><td>{{item.Reference}}</td><td>{{item.Name}}</td><td>{{item.Description}}</td><td><button class=\"btn btn-edit pull-right\" type=\"button\" ng-click=\"SelectRole(item)\"><span class=\"glyphicon glyphicon-chevron-right\" aria-hidden=\"true\"></span></button> <button class=\"btn btn-edit pull-right\" type=\"button\" ng-click=\"SelectRole(item)\"><span class=\"glyphicon glyphicon-chevron-right\" aria-hidden=\"true\"></span></button></td></tr></tbody></table></div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/searchcontext.html\",'<div cr-focus=\"\"><div class=\"form-group has-feedback nomargin\"><form><div class=\"row\"><div class=\"col-md-6\"></div><div class=\"col-md-6\"><div class=\"input-group\"><input type=\"text\" class=\"form-control\" ng-model=\"search\" ng-focus=\"\"> <span class=\"input-group-btn\"><button class=\"btn btn-success\" type=\"submit\" ng-click=\"Search(search)\"><span class=\"glyphicon glyphicon-search\" aria-hidden=\"true\"></span></button></span></div></div></div></form></div><div class=\"row\"><div class=\"col-sm-12\" ng-if=\"contextList.length>0\"><table class=\"table table-striped\"><thead><tr><th translate=\"TYPE\"></th><th translate=\"REFERENCE\"></th><th translate=\"NAME\"></th><th translate=\"DESCRIPTION\"></th><th>&nbsp;</th></tr></thead><tbody><tr ng-repeat=\"item in contextList\"><th class=\"t20\">{{item.Type}}</th><td>{{item.Reference}}</td><td>{{item.Name}}</td><td>{{item.Description}}</td><td><button class=\"btn btn-edit pull-right\" type=\"button\" ng-click=\"SelectContext(item)\"><span class=\"glyphicon glyphicon-chevron-right\" aria-hidden=\"true\"></span></button></td></tr></tbody></table></div><div class=\"col-sm-12\" ng-if=\"contextList.length==0\">NA</div></div></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/signin.html\",'<div class=\"row\" ng-if=\"isAuthenticated() && oAuthFlow\"><div class=\"col-xs-12\"><div class=\"well\"><h1 translate=\"\">REDIRECTING</h1></div></div></div><div cr-focus=\"\"><section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-lock\"></i></div><h1 class=\"page-title\" ng-if=\"applicationDetails()\">{{ \\'LOGIN\\' | translate:context }}<small>{{ applicationDetails().Name | tc:applicationDetails().TranslationContext }}</small></h1><h1 class=\"page-title\" ng-if=\"!applicationDetails()\">{{ \\'LOGIN\\' | translate:context }}</h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><p class=\"mt10 mb30\">{{ \\'AUTHHELP\\' | translate:context }}</p><div class=\"alert alert-danger\" ng-show=\"errorMessage\"><p>{{ errorMessage | translate:context }}</p></div><div class=\"row\"><div class=\"col-sm-3 col-sm-push-9\"><ul class=\"social-connect\"><li><a class=\"btn btn-block btn-facebook\" href=\"\" ng-click=\"oAuth2Login(\\'facebook\\')\" ng-disabled=\"tracker.active()\"><i class=\"fa fa-fw fa-facebook\"></i> <span class=\"hidden-xs\" translate=\"\">FACEBOOK</span></a></li><li><a class=\"btn btn-block btn-twitter\" href=\"\" ng-click=\"oAuth1Login(\\'Twitter\\')\" ng-disabled=\"tracker.active()\"><i class=\"fa fa-fw fa-twitter\"></i> <span class=\"hidden-xs\" translate=\"\">TWITTER</span></a></li><li><a class=\"btn btn-block btn-windows\" href=\"\" ng-click=\"oAuth2Login(\\'windows\\')\" ng-disabled=\"tracker.active()\"><i class=\"fa fa-fw fa-windows\"></i> <span class=\"hidden-xs\" translate=\"\">WL</span></a></li><li><a class=\"btn btn-block btn-google-plus\" href=\"\" ng-click=\"oAuth2Login(\\'google\\')\" ng-disabled=\"tracker.active()\"><i class=\"fa fa-fw fa-google-plus\"></i> <span class=\"hidden-xs\" translate=\"\">GOOGLE</span></a></li></ul></div><div class=\"col-sm-9 col-sm-pull-3\"><cr-form name=\"loginFormTest\" result=\"loginData\" definition=\"loginFormDefinition\" options=\"loginFormOptions\" rc-submit=\"login()\"><div class=\"row margin-top\"><div class=\"col-xs-12\"><div class=\"pull-right\"><button class=\"btn btn-info\" type=\"submit\" tabindex=\"33\" translate=\"\" ng-disabled=\"tracker.active()\">LOGIN</button> <a class=\"btn btn-primary\" ui-sref=\"account/signup\"><i class=\"fa fa-plus\"></i> <span translate=\"SIGNUP\"></span></a></div></div></div><div class=\"row margin-top\"><div class=\"col-xs-12\"><div class=\"pull-left\"><div class=\"checkbox\" style=\"margin: 0;\"><label for=\"inputSinginRemindme\"><input type=\"checkbox\" name=\"remindme\" ng-model=\"remindMe\" id=\"inputSinginRemindme\" tabindex=\"32\"> {{ \\'REMEMBERME\\' | translate:context }}</label></div></div><div class=\"pull-right\"><button class=\"btn-link\" ng-disabled=\"tracker.active()\" ng-click=\"lostPwd()\" translate=\"\">LOSTPASSWORD</button></div></div></div></cr-form></div></div></div></div></div></section></div>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/signup.activate.html\",'<h1 translate=\"\">ACTIVATEFORM</h1><cr-form name=\"signupForm\" result=\"formData\" definition=\"formDefinition\" options=\"formOptions\" ng-submit=\"submit()\"></cr-form>')}])}(),function(module){try{module=angular.module(\"cr.account\")}catch(err){module=angular.module(\"cr.account\",[])}module.run([\"$templateCache\",function($templateCache){$templateCache.put(\"modules/account/views/signup.html\",'<section class=\"page-content page-content-md page-oauth\"><div class=\"page-header\"><div class=\"page-icon\"><i class=\"fa fa-user\"></i></div><h1 class=\"page-title\">{{ \\'SIGNUP\\' | translate:context }}<small translate=\"SIGNUP_STEP1\"></small></h1></div><div role=\"tabpanel\"><div class=\"tab-content\"><div class=\"tab-pane-content\"><cr-form name=\"signupForm\" result=\"formData\" definition=\"formDefinition\" options=\"formOptions\" rc-submit=\"submit()\"><cr-previous-next show-next=\"showNext\" show-previous=\"showPrevious\" context=\"context\" on-previous=\"goBack()\"></cr-previous-next></cr-form></div></div></div></section>')}])}();\n//# sourceMappingURL=account.js.map","(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/changepassword.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss()\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"text-center\\\" translate=\\\"\\\">CHANGEPASSWORD</h4></div><div class=\\\"modal-body\\\"><div class=\\\"clearfix\\\"><div class=\\\"col-sm-12\\\"><p class=\\\"text-muted\\\" translate=\\\"\\\">CHANGEPASSWORDHELP</p><br></div></div><div class=\\\"clearfix\\\"><div class=\\\"col-sm-12\\\"><div class=\\\"alert alert-danger\\\" ng-show=\\\"errorMessage\\\"><p>{{ errorMessage | translate:context }}</p></div><cr-form name=\\\"changePasswordForm\\\" result=\\\"changePasswordData\\\" definition=\\\"changePasswordFields\\\" options=\\\"formOptions\\\" rc-submit=\\\"ChangePassword(changePasswordData)\\\"><div class=\\\"modal-footer\\\"><div class=\\\"text-center\\\"><br><button class=\\\"btn btn-primary\\\" type=\\\"submit\\\" ng-disabled=\\\"tracker.active()\\\" translate=\\\"\\\">CONFIRM</button> <button class=\\\"btn btn-default\\\" type=\\\"button\\\" ng-click=\\\"$dismiss()\\\" translate=\\\"\\\">CANCEL</button></div></div></cr-form></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/confirmuser.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss()\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"text-center\\\" translate=\\\"\\\">ACCOUNTNOTCONFIRMED</h4></div><div class=\\\"modal-body\\\"><div class=\\\"clearfix\\\"><div class=\\\"col-sm-12\\\"><p class=\\\"text-muted\\\" translate=\\\"\\\">ACCOUNTNOTCONFIRMEDHELP</p><p class=\\\"text-muted\\\" ng-show=\\\"forceAllowed\\\" translate=\\\"\\\">CANACTIVATELATERHELP</p><br></div></div><div class=\\\"clearfix\\\"><div class=\\\"col-sm-12\\\"><div class=\\\"alert alert-danger\\\" ng-show=\\\"errorMessage\\\"><p>{{ errorMessage | translate:context }}</p></div><cr-form name=\\\"confirmUserForm\\\" result=\\\"confirmUserData\\\" definition=\\\"confirmUserFields\\\" options=\\\"formOptions\\\" rc-submit=\\\"ConfirmUser(confirmUserData)\\\"><div class=\\\"modal-footer\\\"><br><div class=\\\"row\\\"><div class=\\\"col-xs-6\\\"><button class=\\\"btn btn-primary\\\" type=\\\"submit\\\" ng-disabled=\\\"tracker.active()\\\" translate=\\\"\\\">CONFIRM</button> <button class=\\\"btn btn-default\\\" type=\\\"button\\\" ng-click=\\\"$dismiss()\\\" translate=\\\"\\\">CANCEL</button></div><div class=\\\"col-xs-6\\\"><button type=\\\"button\\\" class=\\\"btn btn-warning\\\" ng-click=\\\"close('resend')\\\" translate=\\\"\\\">RESENDCONFIRMATION</button> <button class=\\\"btn btn-default\\\" ng-show=\\\"forceAllowed\\\" translate=\\\"\\\" ng-click=\\\"close('later')\\\">LATER</button></div></div></div></cr-form></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/contextbutton.html\",\n    \"<button class=\\\"btn btn-default\\\" ng-click=\\\"ctrl.ManageContext()\\\">{{'MANAGECONTEXT'|t:'PERMISSION'}}</button>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/actor.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Type\\\",\\\"type\\\":\\\"select\\\",\\\"label\\\":\\\"#TYPE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"validation\\\":{\\\"required\\\":true},\\\"options\\\":[{\\\"Id\\\":\\\"role\\\",\\\"Text\\\":\\\"#ROLE\\\"},{\\\"Id\\\":\\\"application\\\",\\\"Text\\\":\\\"#APPLICATION\\\"},{\\\"Id\\\":\\\"company\\\",\\\"Text\\\":\\\"#COMPANY\\\"},{\\\"Id\\\":\\\"user\\\",\\\"Text\\\":\\\"#USER\\\"},{\\\"Id\\\":\\\"system\\\",\\\"Text\\\":\\\"#SYSTEM\\\"}]},{\\\"cols\\\":6,\\\"key\\\":\\\"Reference\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#REFERENCE\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#DESCRIPTION\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/backup_signup.json\",\n    \"[{\\\"key\\\":\\\"contact\\\",\\\"label\\\":\\\"#CONTACT\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"LastName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#LASTNAME\\\",\\\"info\\\":\\\"#FIRSTNAMEINFO\\\",\\\"placeholder\\\":\\\"GENTEN\\\",\\\"required\\\":true,\\\"help\\\":\\\"#YOURLASTNAMEHELP\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}},{\\\"cols\\\":6,\\\"key\\\":\\\"FirstName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#FIRSTNAME\\\",\\\"placeholder\\\":\\\"ANGELIQUE\\\",\\\"help\\\":\\\"#YOURFIRSTNAMEHELP\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}}],[{\\\"cols\\\":3,\\\"key\\\":\\\"Gender\\\",\\\"type\\\":\\\"radio\\\",\\\"label\\\":\\\"#GENDER\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"validation\\\":{\\\"required\\\":true},\\\"options\\\":[{\\\"name\\\":\\\"#M\\\",\\\"value\\\":\\\"M\\\"},{\\\"name\\\":\\\"#F\\\",\\\"value\\\":\\\"F\\\"}]},{\\\"cols\\\":3,\\\"key\\\":\\\"BirthDate\\\",\\\"type\\\":\\\"date\\\",\\\"label\\\":\\\"#BIRTHDATE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"#BIRTHDATEHELP\\\",\\\"info\\\":\\\"#BIRTHDATEINFO\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"Nationality\\\",\\\"default\\\":\\\"BEL\\\",\\\"type\\\":\\\"select\\\",\\\"label\\\":\\\"#NATIONALITY\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"options\\\":[{\\\"name\\\":\\\"#BEL\\\",\\\"value\\\":\\\"BEL\\\"},{\\\"name\\\":\\\"#FRA\\\",\\\"value\\\":\\\"FRA\\\"}],\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Email\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#EMAIL\\\",\\\"help\\\":\\\"#EMAILHELP\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"pattern\\\":\\\"^([a-zA-Z0-9_\\\\\\\\.\\\\\\\\-])+\\\\\\\\@(([a-zA-Z0-9\\\\\\\\-])+\\\\\\\\.)+([a-zA-Z0-9]{2,8})+$\\\"}},{\\\"cols\\\":6,\\\"key\\\":\\\"EmailBis\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#EMAILBIS\\\",\\\"help\\\":\\\"#EMAILHELP\\\",\\\"hideExpression\\\":\\\"!result.Email\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"compareTo\\\":\\\"result.Email\\\"}}]]},{\\\"key\\\":\\\"account\\\",\\\"label\\\":\\\"#ACCOUNT\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"UserName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#USERNAME\\\",\\\"disabled\\\":false,\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":3}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Password\\\",\\\"type\\\":\\\"password\\\",\\\"label\\\":\\\"#PASSWORD\\\",\\\"hideExpression\\\":\\\"!result.UserName\\\",\\\"validation\\\":{\\\"required\\\":false,\\\"requiredExpression\\\":\\\"result.UserName!=null\\\",\\\"minLength\\\":4,\\\"maxLength\\\":14}},{\\\"cols\\\":6,\\\"key\\\":\\\"ConfirmPassword\\\",\\\"type\\\":\\\"password\\\",\\\"label\\\":\\\"#CONFIRMPASSWORD\\\",\\\"hideExpression\\\":\\\"!result.UserName\\\",\\\"validation\\\":{\\\"required\\\":false,\\\"requiredExpression\\\":\\\"result.UserName!=null\\\",\\\"compareTo\\\":\\\"result.Password\\\"}}]]},{\\\"key\\\":\\\"company\\\",\\\"label\\\":\\\"#COMPANY\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Company\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#COMPANY\\\",\\\"required\\\":false,\\\"disabled\\\":false,\\\"validation\\\":{\\\"required\\\":false}},{\\\"cols\\\":6,\\\"key\\\":\\\"Departement\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#DEPARTEMENT\\\",\\\"hideExpression\\\":\\\"result.Company != 'RealDolmen'\\\",\\\"validation\\\":{\\\"required\\\":false,\\\"requiredExpression\\\":\\\"result.Company == 'RealDolmen'\\\"}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Mvp\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#MVP\\\",\\\"hideExpression\\\":\\\"result.Departement != 'IT' || !visibleFields.Departement\\\",\\\"disabled\\\":false,\\\"validation\\\":{\\\"required\\\":false,\\\"requiredExpression\\\":\\\"result.Departement == 'IT' && visibleFields.Departement\\\"}}]]},{\\\"key\\\":\\\"supported\\\",\\\"label\\\":\\\"Supported fields\\\",\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Text with info (popover)\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"Text with info (popover)\\\",\\\"help\\\":\\\"Type some text\\\",\\\"info\\\":\\\"Some information about the field\\\",\\\"disabled\\\":false},{\\\"cols\\\":6,\\\"key\\\":\\\"Textarea\\\",\\\"type\\\":\\\"textarea\\\",\\\"label\\\":\\\"Textarea\\\",\\\"help\\\":\\\"Type some text\\\",\\\"disabled\\\":false}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Select\\\",\\\"type\\\":\\\"select\\\",\\\"label\\\":\\\"Select\\\",\\\"help\\\":\\\"Select something\\\",\\\"disabled\\\":false,\\\"options\\\":[{\\\"name\\\":\\\"option 1\\\",\\\"value\\\":\\\"1\\\"},{\\\"name\\\":\\\"option 2\\\",\\\"value\\\":\\\"2\\\"},{\\\"name\\\":\\\"option 3\\\",\\\"value\\\":\\\"3\\\"},{\\\"name\\\":\\\"option 4\\\",\\\"value\\\":\\\"4\\\"},{\\\"name\\\":\\\"option 5\\\",\\\"value\\\":\\\"5\\\"}]},{\\\"cols\\\":6,\\\"key\\\":\\\"Select2\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"Select2\\\",\\\"help\\\":\\\"Find something to select\\\",\\\"disabled\\\":false,\\\"options\\\":[{\\\"name\\\":\\\"option 1\\\",\\\"value\\\":\\\"1\\\"},{\\\"name\\\":\\\"option 2\\\",\\\"value\\\":\\\"2\\\"},{\\\"name\\\":\\\"option 3\\\",\\\"value\\\":\\\"3\\\"},{\\\"name\\\":\\\"option 4\\\",\\\"value\\\":\\\"4\\\"},{\\\"name\\\":\\\"option 5\\\",\\\"value\\\":\\\"5\\\"}]}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Radiobox\\\",\\\"type\\\":\\\"radio\\\",\\\"label\\\":\\\"Radiobox\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"Select one option\\\",\\\"options\\\":[{\\\"name\\\":\\\"Option 1\\\",\\\"value\\\":\\\"1\\\"},{\\\"name\\\":\\\"Option 2\\\",\\\"value\\\":\\\"2\\\"},{\\\"name\\\":\\\"Option 3\\\",\\\"value\\\":\\\"3\\\"}]},{\\\"cols\\\":6,\\\"key\\\":\\\"Checkbox\\\",\\\"type\\\":\\\"checkbox\\\",\\\"label\\\":\\\"Checkbox\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"Select some options\\\",\\\"options\\\":[{\\\"name\\\":\\\"Option 1\\\",\\\"value\\\":\\\"1\\\"},{\\\"name\\\":\\\"Option 2\\\",\\\"value\\\":\\\"2\\\"},{\\\"name\\\":\\\"Option 3\\\",\\\"value\\\":\\\"3\\\"}]}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/changePassword.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"NewPassword\\\",\\\"type\\\":\\\"password\\\",\\\"label\\\":\\\"#NEWPASSWORD\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":4,\\\"maxLength\\\":14}},{\\\"cols\\\":6,\\\"key\\\":\\\"ConfirmPassword\\\",\\\"type\\\":\\\"password\\\",\\\"label\\\":\\\"#CONFIRMNEWPASSWORD\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"compareTo\\\":\\\"result.NewPassword\\\"}}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/confirmUser.json\",\n    \"[{\\\"rows\\\":[[{\\\"icon\\\":\\\"fa-user\\\",\\\"cols\\\":12,\\\"key\\\":\\\"token\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#TOKEN\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minlength\\\":2},\\\"help\\\":\\\"#TOKEN_HELP\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/context.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"Type\\\",\\\"type\\\":\\\"select\\\",\\\"label\\\":\\\"#TYPE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"validation\\\":{\\\"required\\\":true},\\\"options\\\":[{\\\"Id\\\":\\\"event\\\",\\\"Text\\\":\\\"#Event\\\"},{\\\"Id\\\":\\\"manufacturer\\\",\\\"Text\\\":\\\"#Manufacturer\\\"},{\\\"Id\\\":\\\"permission\\\",\\\"Text\\\":\\\"#Permission\\\"},{\\\"Id\\\":\\\"company\\\",\\\"Text\\\":\\\"#COMPANY\\\"},{\\\"Id\\\":\\\"application\\\",\\\"Text\\\":\\\"#APPLICATION\\\"},{\\\"Id\\\":\\\"group\\\",\\\"Text\\\":\\\"#Group\\\"},{\\\"Id\\\":\\\"system\\\",\\\"Text\\\":\\\"#System\\\"}]},{\\\"cols\\\":6,\\\"key\\\":\\\"Reference\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#REFERENCE\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Name\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#NAME\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Description\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#DESCRIPTION\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/lostPassword.json\",\n    \"[{\\\"rows\\\":[[{\\\"icon\\\":\\\"fa-user\\\",\\\"cols\\\":12,\\\"key\\\":\\\"username\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#PSEUDO\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minlength\\\":2},\\\"help\\\":\\\"#PSEUDO_HELP\\\",\\\"info\\\":\\\"#PSEUDO_INFO\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/lostUserName.json\",\n    \"[{\\\"key\\\":\\\"LastName\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#LASTNAME\\\",\\\"placeholder\\\":\\\"GENTEN\\\",\\\"required\\\":true,\\\"disabled\\\":false,\\\"help\\\":\\\"HelpHelp\\\",\\\"minlength\\\":2},{\\\"key\\\":\\\"FirstName\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#FIRSTNAME\\\",\\\"placeholder\\\":\\\"ANGELIQUE\\\",\\\"required\\\":true,\\\"disabled\\\":false,\\\"help\\\":\\\"HelpHelp\\\",\\\"minlength\\\":2},{\\\"key\\\":\\\"BirthDate\\\",\\\"default\\\":\\\"\\\",\\\"type\\\":\\\"date\\\",\\\"label\\\":\\\"#BIRTHDATE\\\",\\\"required\\\":true,\\\"disabled\\\":false,\\\"help\\\":\\\"HelpHelp\\\"},{\\\"key\\\":\\\"Email\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#EMAIL\\\",\\\"required\\\":true}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/permtype.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"GroupName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#GROUPNAME\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"FullName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#PERMNAME\\\",\\\"validation\\\":{\\\"required\\\":true}}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/searchactor.json\",\n    \"[{\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"LastName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#LASTNAME\\\",\\\"info\\\":\\\"#FIRSTNAMEINFO\\\",\\\"placeholder\\\":\\\"\\\",\\\"required\\\":true,\\\"focus\\\":true,\\\"help\\\":\\\"#YOURLASTNAMEHELP\\\",\\\"validation\\\":{\\\"minLength\\\":2}},{\\\"cols\\\":6,\\\"key\\\":\\\"FirstName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#FIRSTNAME\\\",\\\"placeholder\\\":\\\"\\\",\\\"help\\\":\\\"#YOURFIRSTNAMEHELP\\\",\\\"validation\\\":{\\\"minLength\\\":2}}],[{\\\"cols\\\":12,\\\"key\\\":\\\"Email\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#EMAIL\\\",\\\"help\\\":\\\"#EMAILHELP\\\",\\\"validation\\\":{\\\"pattern\\\":\\\"^([a-zA-Z0-9_\\\\\\\\.\\\\\\\\-])+\\\\\\\\@(([a-zA-Z0-9\\\\\\\\-])+\\\\\\\\.)+([a-zA-Z0-9]{2,8})+$\\\"}}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/signin.json\",\n    \"[{\\\"rows\\\":[[{\\\"icon\\\":\\\"fa-user\\\",\\\"key\\\":\\\"username\\\",\\\"cols\\\":12,\\\"currentuser\\\":\\\"#CURRENT_USER\\\",\\\"label\\\":\\\"#USERNAME\\\",\\\"type\\\":\\\"currentUser\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minlength\\\":3,\\\"requiredExpression\\\":\\\"!result.userView\\\"},\\\"help\\\":\\\"#PSEUDO_HELP\\\",\\\"info\\\":\\\"#PSEUDO_INFO\\\"}],[{\\\"icon\\\":\\\"fa-lock\\\",\\\"cols\\\":12,\\\"key\\\":\\\"password\\\",\\\"type\\\":\\\"password\\\",\\\"label\\\":\\\"#PASSWORD\\\",\\\"validation\\\":{\\\"xrequired\\\":true,\\\"minLength\\\":4,\\\"maxLength\\\":14},\\\"help\\\":\\\"#PASSWORD_HELP\\\",\\\"info\\\":\\\"#PASSWORD_INFO\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/signin_copy.json\",\n    \"[{\\\"rows\\\":[[{\\\"icon\\\":\\\"fa-user\\\",\\\"key\\\":\\\"username\\\",\\\"cols\\\":12,\\\"label\\\":\\\"#CURRENT_USER\\\",\\\"type\\\":\\\"currentUser\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minlength\\\":3},\\\"help\\\":\\\"#PSEUDO_HELP\\\",\\\"info\\\":\\\"#PSEUDO_INFO\\\"}],[{\\\"icon\\\":\\\"fa-user\\\",\\\"cols\\\":9,\\\"label\\\":\\\"#CURRENT_USER\\\",\\\"staticExpression\\\":\\\"result.userView.LastName + ' ' + result.userView.FirstName\\\",\\\"type\\\":\\\"static\\\",\\\"hideExpression\\\":\\\"!result.userView\\\"},{\\\"cols\\\":3,\\\"type\\\":\\\"button\\\",\\\"label\\\":\\\"#CHANGE\\\",\\\"clickExpression\\\":\\\"result.changeUser()\\\",\\\"hideExpression\\\":\\\"!result.userView\\\"}],[{\\\"icon\\\":\\\"fa-user\\\",\\\"cols\\\":12,\\\"key\\\":\\\"username\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#PSEUDO\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minlength\\\":3,\\\"requiredExpression\\\":\\\"!result.userView\\\"},\\\"help\\\":\\\"#PSEUDO_HELP\\\",\\\"info\\\":\\\"#PSEUDO_INFO\\\",\\\"hideExpression\\\":\\\"result.userView\\\"}],[{\\\"icon\\\":\\\"fa-lock\\\",\\\"cols\\\":12,\\\"key\\\":\\\"password\\\",\\\"type\\\":\\\"password\\\",\\\"label\\\":\\\"#PASSWORD\\\",\\\"validation\\\":{\\\"required\\\":true},\\\"help\\\":\\\"#PASSWORD_HELP\\\",\\\"info\\\":\\\"#PASSWORD_INFO\\\"}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/resources/signup.json\",\n    \"[{\\\"key\\\":\\\"contact\\\",\\\"label\\\":\\\"#CONTACT\\\",\\\"scrollSpy\\\":true,\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"LastName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#LASTNAME\\\",\\\"info\\\":\\\"#FIRSTNAMEINFO\\\",\\\"placeholder\\\":\\\"\\\",\\\"required\\\":true,\\\"help\\\":\\\"#YOURLASTNAMEHELP\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}},{\\\"cols\\\":6,\\\"key\\\":\\\"FirstName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#FIRSTNAME\\\",\\\"placeholder\\\":\\\"\\\",\\\"help\\\":\\\"#YOURFIRSTNAMEHELP\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}}],[{\\\"cols\\\":3,\\\"key\\\":\\\"Gender\\\",\\\"type\\\":\\\"radio\\\",\\\"label\\\":\\\"#GENDER\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"validation\\\":{\\\"required\\\":true},\\\"options\\\":[{\\\"Id\\\":\\\"M\\\",\\\"Text\\\":\\\"#M\\\"},{\\\"Id\\\":\\\"F\\\",\\\"Text\\\":\\\"#F\\\"}]},{\\\"cols\\\":3,\\\"key\\\":\\\"BirthDate\\\",\\\"type\\\":\\\"date\\\",\\\"label\\\":\\\"#BIRTHDATE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"#BIRTHDATEHELP\\\",\\\"info\\\":\\\"#BIRTHDATEINFO\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"Nationality\\\",\\\"default\\\":\\\"BEL\\\",\\\"type\\\":\\\"select\\\",\\\"label\\\":\\\"#NATIONALITY\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"resets\\\":[\\\"PostCode\\\",\\\"City\\\"],\\\"datasource-url\\\":\\\"form/dataset/get/nat_{{ formOptions.currentLanguage }}?FirstName={{ result.FirstName }}\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Country\\\",\\\"type\\\":\\\"select2\\\",\\\"label\\\":\\\"#COUNTRY\\\",\\\"disabled\\\":false,\\\"datasource-url\\\":\\\"form/dataset/get/country_{{ formOptions.currentLanguage }}?FirstName={{ result.FirstName }}\\\",\\\"validation\\\":{\\\"required\\\":true}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"PostCode\\\",\\\"type\\\":\\\"autocomplete\\\",\\\"label\\\":\\\"#POSTCODE\\\",\\\"disabled\\\":false,\\\"help\\\":\\\"\\\",\\\"datasource-url\\\":\\\"form/dataset/get/cp/0/10?Country={{ result.Country }}&PostCode={{result.PostCode}}\\\",\\\"validation\\\":{\\\"required\\\":true}},{\\\"cols\\\":6,\\\"key\\\":\\\"City\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#CITY\\\",\\\"placeholder\\\":\\\"\\\",\\\"help\\\":\\\"#CITYHELP\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":2}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Email\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#EMAIL\\\",\\\"help\\\":\\\"#EMAILHELP\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"pattern\\\":\\\"^([a-zA-Z0-9_\\\\\\\\.\\\\\\\\-])+\\\\\\\\@(([a-zA-Z0-9\\\\\\\\-])+\\\\\\\\.)+([a-zA-Z0-9]{2,8})+$\\\"}},{\\\"cols\\\":6,\\\"key\\\":\\\"x_EmailBis\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#EMAILBIS\\\",\\\"help\\\":\\\"#EMAILHELP\\\",\\\"hideExpression\\\":\\\"!result.Email\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"compareTo\\\":\\\"result.Email\\\"}}]]},{\\\"key\\\":\\\"account\\\",\\\"label\\\":\\\"#ACCOUNT\\\",\\\"scrollSpy\\\":true,\\\"rows\\\":[[{\\\"cols\\\":6,\\\"key\\\":\\\"UserName\\\",\\\"type\\\":\\\"text\\\",\\\"label\\\":\\\"#USERNAME\\\",\\\"disabled\\\":false,\\\"validation\\\":{\\\"required\\\":true,\\\"minLength\\\":3,\\\"remote\\\":\\\"account/user/available/userName?value={{result.UserName}}\\\"}}],[{\\\"cols\\\":6,\\\"key\\\":\\\"Password\\\",\\\"type\\\":\\\"password\\\",\\\"label\\\":\\\"#PASSWORD\\\",\\\"strengthIndicator\\\":true,\\\"hideExpression\\\":\\\"!result.UserName\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"requiredExpression\\\":\\\"result.UserName!=null\\\",\\\"minLength\\\":4,\\\"maxLength\\\":14}},{\\\"cols\\\":6,\\\"key\\\":\\\"x_ConfirmPassword\\\",\\\"type\\\":\\\"password\\\",\\\"label\\\":\\\"#CONFIRMPASSWORD\\\",\\\"strengthIndicator\\\":true,\\\"hideExpression\\\":\\\"!result.UserName\\\",\\\"validation\\\":{\\\"required\\\":true,\\\"requiredExpression\\\":\\\"result.UserName!=null\\\",\\\"compareTo\\\":\\\"result.Password\\\"}}]]}]\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/contextedit.html\",\n    \"<div><div ng-if=\\\"!ctrl.currentContext\\\" translate=\\\"\\\">LOADING</div><div ng-if=\\\"ctrl.currentContext\\\"><div class=\\\"panel panel-info\\\"><div class=\\\"panel-body\\\"><div class=\\\"row\\\"><div class=\\\"col-xs-9\\\"><button ng-repeat=\\\"(actorId, actorValue) in ctrl.currentContext.ActorValues\\\" class=\\\"btn\\\" ng-click=\\\"ctrl.SelectActor(actorId)\\\" ng-class=\\\"actorId==ctrl.currentActor.Id?'btn-primary':''\\\">{{ actorValue.ActorView.Name }}</button>&nbsp;</div><div class=\\\"col-xs-3\\\"><div class=\\\"pull-right\\\"><button ng-click=\\\"ctrl.SelectActor()\\\" class=\\\"btn btn-default\\\"><span class=\\\"glyphicon glyphicon-search\\\" aria-hidden=\\\"true\\\"></span></button></div></div></div></div></div><div class=\\\"panel panel-info\\\" ng-if=\\\"ctrl.currentActor.Id\\\"><div class=\\\"panel-heading\\\"><b>{{ctrl.currentActor.Name}}</b></div><div class=\\\"panel-body\\\">{{ctrl.currentActor.Type}}/{{ctrl.currentActor.Reference}}<br><i>{{ctrl.currentActor.Description}}</i><br><br><div class=\\\"row\\\"><div class=\\\"col-md-9\\\"><p><button class=\\\"btn btn-default\\\" ng-click=\\\"ctrl.SelectActor(actorId)\\\" ng-repeat=\\\"(actorId, parent) in ctrl.currentActor.Parents\\\">{{parent.Name}}</button></p></div><div class=\\\"col-md-3\\\"></div></div></div></div><div class=\\\"panel panel-info\\\" ng-if=\\\"ctrl.currentActor.Id\\\"><div class=\\\"panel-heading\\\" translate=\\\"PERMISSIONVALUES\\\"></div><div class=\\\"panel-body\\\"><div class=\\\"tabs-vertical row\\\"><div class=\\\"col-sm-3\\\"><ul class=\\\"nav nav-tabs-vertical\\\" role=\\\"tablist\\\"><li role=\\\"presentation\\\" ng-repeat=\\\"(permGroup, permTypes) in permissionGroups\\\" ng-class=\\\"{'active':($index==0 && !activePermGroupTab) || permGroup==activePermGroupTab}\\\"><a ng-click=\\\"SetActivePermGroupTab(permGroup)\\\" role=\\\"tab\\\" data-toggle=\\\"tab\\\">{{permGroup}}</a></li></ul></div><div class=\\\"col-sm-9\\\"><div class=\\\"tab-content\\\"><div role=\\\"tabpanel\\\" class=\\\"tab-pane\\\" ng-repeat=\\\"(permGroup, permTypes) in permissionGroups\\\" ng-class=\\\"{'active':($index==0 && !activePermGroupTab) || permGroup==activePermGroupTab}\\\"><table class=\\\"table table-stripped\\\" style=\\\"width:300px\\\"><tr ng-repeat=\\\"permType in permTypes\\\"><td><ng-toggle tri-toggle=\\\"\\\" ng-true-val=\\\"'true'\\\" ng-false-val=\\\"'false'\\\" ng-no-val=\\\"''\\\" ng-model=\\\"values[ctrl.currentActor.Id][permType.Id]\\\"></ng-toggle></td><td>{{permType.Name}}</td></tr></table></div></div></div></div></div></div><div class=\\\"row\\\"><div class=\\\"col-xs-6\\\"><button ng-if=\\\"backLink\\\" ui-sref=\\\"^.overview\\\" class=\\\"btn btn-default\\\"><span class=\\\"glyphicon glyphicon-chevron-left\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"col-xs-6\\\"><div class=\\\"pull-right\\\" ng-show=\\\"ctrl.currentActor.Id\\\"><button class=\\\"btn btn-success\\\" ng-click=\\\"ctrl.Save()\\\"><span class=\\\"glyphicon glyphicon-floppy-disk\\\" aria-hidden=\\\"true\\\"></span> {{'SAVE'|t}}</button> <button class=\\\"btn btn-default\\\" ng-click=\\\"ctrl.Reset()\\\" translate=\\\"\\\">RESET</button></div></div></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/contextrole.html\",\n    \"<div><div ng-if=\\\"ctrl.loading\\\" translate=\\\"\\\">LOADING</div><div ng-if=\\\"!ctrl.loading\\\"><div class=\\\"panel panel-info ng-scope\\\" ng-repeat=\\\"(k,roles) in ctrl.contextRoleData.RolePermissions\\\"><div class=\\\"panel-heading\\\">{{roles.Role.Name|tc:context}}</div><div class=\\\"panel-body\\\"><table class=\\\"table table-striped table-hover\\\"><tr ng-repeat=\\\"actor in roles.Actors\\\"><td>{{actor.Name }}</td><td align=\\\"right\\\"><button ng-click=\\\"ctrl.RemoveActor(actor.Id, roles.Role.Id,roles.Role.Reference)\\\" class=\\\"btn btn-danger\\\"><span class=\\\"glyphicon glyphicon-minus\\\" aria-hidden=\\\"true\\\"></span></button></td></tr><tr><td colspan=\\\"2\\\" align=\\\"right\\\"><button ng-click=\\\"ctrl.AddActor(roles.Role.Id,roles.Role.Reference)\\\" class=\\\"btn btn-default\\\"><span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span></button></td></tr></table></div></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/cr-current-user.html\",\n    \"<div ng-controller=\\\"formCurrentUserController\\\"><div class=\\\"form-group has-feedback nomargin\\\" ng-show=\\\"userView()\\\"><div class=\\\"form-group\\\"><label class=\\\"control-label\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.currentuser | tc:formOptions.context }}</label><div class=\\\"input-group\\\"><p class=\\\"form-control-static\\\">{{userView().LastName}} {{userView().FirstName}}</p><span class=\\\"input-group-btn\\\"><button class=\\\"btn btn-default\\\" type=\\\"button\\\" ng-click=\\\"changeUser()\\\">{{'CHANGE' | translate:formOptions.context:options}}</button></span></div></div></div><div class=\\\"form-group has-feedback nomargin\\\" ng-show=\\\"!userView()\\\" ng-class=\\\"{true: 'has-error'}[(options.formField.$invalid) && ((formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine)]\\\"><label class=\\\"control-label\\\" for=\\\"{{ id }}\\\"><i class=\\\"fa fa-fw {{ options.icon }}\\\" ng-if=\\\"options.icon\\\"></i> {{ options.label || 'Text' | tc:formOptions.context }} <span ng-if=\\\"options.validation.required\\\">*</span></label><div class=\\\"feedback-container\\\" ng-hide=\\\"options.disabled || formOptions.disabled\\\"><input type=\\\"text\\\" id=\\\"{{ id }}\\\" name=\\\"field\\\" cr-form-name=\\\"options.key\\\" cr-form-field-validator=\\\"options.validation\\\" class=\\\"form-control\\\" ng-attr-placeholder=\\\"{{ options.placeholder }}\\\" autocomplete=\\\"off\\\" ng-disabled=\\\"options.disabled || formOptions.disabled\\\" ng-model=\\\"$parent.value\\\" ng-model-options=\\\"{ debounce: 250 }\\\" cr-focus=\\\"\\\" ng-focus=\\\"\\\"> <span class=\\\"form-control-feedback popover-trigger\\\" popover=\\\"{{ options.info | tc:formOptions.context:options }}\\\" popover-append-to-body=\\\"true\\\" popover-trigger=\\\"mouseenter\\\" ng-if=\\\"options.info\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block\\\" ng-show=\\\"options.formField.$focused && options.formField.$pristine && (!formOptions.submitHandler.attempted || (formOptions.submitHandler.attempted && !options.formField.$error))\\\">{{ options.help | tc:formOptions.context:options }}</span> <span class=\\\"help-block error\\\" ng-repeat=\\\"(key, value) in options.formField.$error | firstTrueValue\\\" ng-show=\\\"(formOptions.submitHandler.attempted && formOptions.submitHandler.needsAttention()) || !options.formField.$pristine\\\">{{ key | uppercase | translate:formOptions.context:options }}</span></div><div ng-show=\\\"options.disabled || formOptions.disabled\\\"><p class=\\\"form-control-static\\\">{{ value }}</p></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/loginwidget.html\",\n    \"<div class=\\\"panel panel-well\\\" ng-controller=\\\"loginCtrl\\\" ng-if=\\\"!isAuthenticated() && showLogin\\\"><div class=\\\"panel-heading toggle-collapse\\\" ng-class=\\\"{true: 'collapsed'}[loginCollapsed]\\\" ng-click=\\\"loginCollapsed = !loginCollapsed\\\"><h3 class=\\\"panel-title\\\"><i class=\\\"fa fa-fw fa-unlock\\\"></i>{{ 'LOGIN' | translate }}</h3></div><div class=\\\"collapse in\\\" collapse=\\\"loginCollapsed\\\" id=\\\"login-content\\\"><span class=\\\"label label-danger\\\" translate=\\\"{{errorMessage}}\\\"></span><form ng-submit=\\\"login()\\\" novalidate=\\\"novalidate\\\"><fieldset><div class=\\\"form-group has-feedback feedback-container\\\"><label class=\\\"control-label\\\" for=\\\"inputLogin\\\">{{ 'PSEUDO' | translate }} <span>*</span></label> <input type=\\\"text\\\" name=\\\"inputLogin\\\" class=\\\"form-control\\\" id=\\\"inputLogin\\\" placeholder=\\\"\\\" required=\\\"required\\\" tabindex=\\\"30\\\" popover=\\\"Veuillez entrer votre pseudonyme\\\" popover-title=\\\"Something\\\" popover-placement=\\\"top\\\" popover-append-to-body=\\\"\\\" popover-trigger=\\\"manual\\\" ng-model=\\\"username\\\"> <span class=\\\"form-control-feedback popover-trigger\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span> <span class=\\\"help-block hide\\\" translate=\\\"\\\">PSEUDO_HELP</span></div><div class=\\\"form-group has-feedback\\\"><label class=\\\"control-label\\\" for=\\\"inputPassword\\\">{{ 'PASSWORD' | translate }} <span>*</span></label> <input type=\\\"text\\\" name=\\\"password\\\" class=\\\"form-control\\\" id=\\\"inputPassword\\\" placeholder=\\\"\\\" required=\\\"required\\\" tabindex=\\\"31\\\" popover=\\\"Veuillez entrer votre mot de passe\\\" popover-title=\\\"Something\\\" popover-placement=\\\"top\\\" popover-append-to-body=\\\"\\\" popover-trigger=\\\"manual\\\" ng-model=\\\"password\\\"> <span class=\\\"form-control-feedback popover-trigger\\\"><i class=\\\"fa fa-fw fa-lg fa-info-circle\\\"></i></span></div><div class=\\\"form-group\\\"><div class=\\\"checkbox\\\"><label for=\\\"inputRemindme\\\"><input type=\\\"checkbox\\\" name=\\\"remindme\\\" id=\\\"inputRemindme\\\" tabindex=\\\"32\\\"> {{ 'REMEMBERME' | translate }}</label></div><button class=\\\"btn btn-success btn-block\\\" type=\\\"submit\\\" tabindex=\\\"33\\\" translate=\\\"\\\">LOGIN</button><p class=\\\"text-center\\\"><a href=\\\"\\\" translate=\\\"\\\">LOSTPASSWORD</a></p></div></fieldset></form><hr><div class=\\\"panel-body\\\"><a class=\\\"btn btn-facebook btn-block\\\" href=\\\"\\\" ng-click=\\\"oAuth2Login('facebook')\\\" translate=\\\"LOGINWITHFB\\\"></a> <a class=\\\"btn btn-twitter btn-block\\\" href=\\\"\\\" ng-click=\\\"oAuth1Login('Twitter')\\\" translate=\\\"LOGINWITHTWITTER\\\"></a> <a class=\\\"btn btn-warning btn-block\\\" ui-sref=\\\"account/signup\\\" translate=\\\"SIGNUP\\\"></a></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/lostpassword.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss()\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"text-center\\\" translate=\\\"\\\">LOSTPASSWORD</h4></div><div class=\\\"modal-body\\\"><div class=\\\"clearfix\\\"><div class=\\\"col-sm-12\\\"><p class=\\\"text-muted\\\" translate=\\\"\\\">LOSTPASSWORD_HELP</p><br></div></div><div class=\\\"clearfix\\\"><div class=\\\"col-sm-12\\\"><div class=\\\"alert alert-danger\\\" ng-show=\\\"errorMessage\\\"><p>{{ errorMessage | translate:context }}</p></div><cr-form name=\\\"lostPasswordForm\\\" result=\\\"userNameData\\\" definition=\\\"userNameFields\\\" options=\\\"formOptions\\\" rc-submit=\\\"ResetPassword(userNameData)\\\"><div class=\\\"modal-footer\\\"><div class=\\\"text-center\\\"><br><button class=\\\"btn btn-primary\\\" type=\\\"submit\\\" translate=\\\"\\\" ng-disabled=\\\"tracker.active()\\\">RECOVERPWD</button> <button class=\\\"btn btn-default\\\" type=\\\"button\\\" ng-click=\\\"$dismiss()\\\" translate=\\\"\\\">CANCEL</button></div></div></cr-form></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/searchactor.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss()\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"text-center\\\" translate=\\\"\\\">SEARCHACTOR</h4></div><div class=\\\"modal-body\\\"><div class=\\\"clearfix\\\"><div class=\\\"col-sm-12\\\"><p class=\\\"text-muted\\\" translate=\\\"\\\">SEARCHACTORHELP</p><br></div></div><div class=\\\"clearfix\\\"><div class=\\\"col-sm-12\\\"><div class=\\\"alert alert-danger\\\" ng-show=\\\"errorMessage\\\"><p>{{ errorMessage | translate:context }}</p></div></div></div><cr-actor-list default-selected=\\\"role\\\" select=\\\"Select(actorId)\\\"></cr-actor-list><div class=\\\"text-center\\\"><br><button class=\\\"btn btn-default\\\" ng-click=\\\"$dismiss()\\\" translate=\\\"\\\">CANCEL</button></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/searchcontext.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss()\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"text-center\\\" translate=\\\"\\\">SEARCHCONTEXT</h4></div><div class=\\\"modal-body\\\"><div class=\\\"clearfix\\\"><div class=\\\"col-sm-12\\\"><p class=\\\"text-muted\\\" translate=\\\"\\\">SEARCHCONTEXTHELP</p><br></div></div><cr-context-list select=\\\"Select(contextId)\\\"></cr-context-list><div class=\\\"text-center\\\"><br><button class=\\\"btn btn-default\\\" ng-click=\\\"$dismiss()\\\" translate=\\\"\\\">CANCEL</button></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/selectduplicateuser.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss()\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"modal-title\\\">{{Title||'SELECTDUPLICATE' | translate:'Account' }}</h4></div><div class=\\\"modal-body\\\"><table class=\\\"table\\\"><tr ng-repeat=\\\"duplicateUser in DuplicateUsers\\\"><td>{{ duplicateUser.ChronoCode }}</td><td>{{ duplicateUser.LastName }} {{ duplicateUser.FirstName }}</td><td>{{ duplicateUser.YOB }}</td><td>{{ duplicateUser.City }}</td><td align=\\\"right\\\"><button class=\\\"btn\\\" ng-if=\\\"!duplicateUser.Virtual\\\" translate=\\\"\\\" ng-click=\\\"Action('Login',duplicateUser)\\\">LOGIN</button> <button class=\\\"btn\\\" ng-if=\\\"duplicateUser.Virtual\\\" translate=\\\"\\\" ng-click=\\\"Action('Activate',duplicateUser)\\\">ACTIVATE</button></td></tr></table></div><div class=\\\"modal-footer\\\"><button type=\\\"button\\\" ng-if=\\\"ForceAllowed\\\" class=\\\"btn btn-warning\\\" ng-click=\\\"Action('Force',null)\\\" translate=\\\"\\\">FORCECREATENEWUSER</button> <button type=\\\"button\\\" class=\\\"btn btn-primary\\\" ng-click=\\\"$dismiss()\\\" translate=\\\"\\\">CANCEL</button></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/templates/selectuser.html\",\n    \"<div class=\\\"modal-header\\\"><button type=\\\"button\\\" class=\\\"close\\\" ng-click=\\\"$dismiss()\\\" data-dismiss=\\\"modal\\\"><span aria-hidden=\\\"true\\\">&times;</span><span class=\\\"sr-only\\\">Close</span></button><h4 class=\\\"modal-title\\\" translate=\\\"\\\">SELECTUSER</h4></div><div class=\\\"modal-body\\\"><table class=\\\"table\\\"><tr ng-repeat=\\\"duplicateUser in DuplicateUsers\\\"><td>{{ duplicateUser.ChronoCode }}</td><td>{{ duplicateUser.LastName }} {{ duplicateUser.FirstName }}</td><td>{{ duplicateUser.YOB }}</td><td>{{ duplicateUser.City }}</td><td align=\\\"right\\\"><button class=\\\"btn\\\" translate=\\\"\\\" ng-click=\\\"Action('Select',duplicateUser)\\\">SELECT</button></td></tr></table></div><div class=\\\"modal-footer\\\"><button type=\\\"button\\\" class=\\\"btn btn-primary\\\" ng-click=\\\"$dismiss()\\\" translate=\\\"\\\">CANCEL</button></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/account.html\",\n    \"<div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><h1 translate=\\\"\\\">ACCOUNT</h1><span class=\\\"label label-danger\\\">{{errorMessage | translate:'Account'}}</span><ui-view></ui-view></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/accountdetail.html\",\n    \"<h1>Account details</h1>>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/actoredit.html\",\n    \"<section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-key\\\"></i></div><h1 class=\\\"page-title\\\"><div ui-view=\\\"title\\\"><span>{{'PERMISSION'|t}}</span></div><small><div ui-view=\\\"subtitle\\\">{{'ACTOR'|t}}</div></small></h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><cr-form cr-focus=\\\"\\\" name=\\\"actorForm\\\" result=\\\"actorOperation\\\" definition=\\\"formDefinition\\\" options=\\\"formOptions\\\" rc-submit=\\\"Submit()\\\"><br><div class=\\\"row\\\"><div class=\\\"col-xs-6\\\"><button ng-click=\\\"GoBack()\\\" class=\\\"btn btn-default\\\"><span class=\\\"glyphicon glyphicon-chevron-left\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"col-xs-6\\\"><div class=\\\"pull-right\\\"><button class=\\\"btn btn-success\\\" type=\\\"submit\\\"><span class=\\\"glyphicon glyphicon-floppy-disk\\\" aria-hidden=\\\"true\\\"></span> {{'SAVE'|t}}</button></div></div></div></cr-form></div></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/actorlist.html\",\n    \"<section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-key\\\"></i></div><h1 class=\\\"page-title\\\"><div ui-view=\\\"title\\\"><span>{{'PERMISSION'|t}}</span></div><small><div ui-view=\\\"subtitle\\\">{{'ACTOR'|t}}</div></small></h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><cr-actor-list select=\\\"SelectActor(actorId)\\\"></cr-actor-list><div class=\\\"pull-right\\\"><button ui-sref=\\\"permission.actor.create\\\" class=\\\"btn btn-primary\\\" type=\\\"button\\\"><span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"clearfix\\\"></div></div></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/actoroverview.html\",\n    \"<section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-key\\\"></i></div><h1 class=\\\"page-title\\\"><div ui-view=\\\"title\\\"><span>{{'PERMISSION'|t}}</span></div><small><div ui-view=\\\"subtitle\\\">{{'ACTOR'|t}}</div></small></h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><div class=\\\"panel panel-info\\\" ng-if=\\\"currentActor.Id\\\"><div class=\\\"panel-heading\\\"><b>{{currentActor.Name}}</b></div><div class=\\\"panel-body\\\">{{currentActor.Type}}/{{currentActor.Reference}}<br><i>{{currentActor.Description}}</i></div><div class=\\\"panel-footer text-right\\\"><span ng-if=\\\"callback!=null\\\"><button ng-click=\\\"SelectActor()\\\" class=\\\"btn btn-success\\\" translate=\\\"SELECT\\\"></button></span> <button class=\\\"btn btn-primary\\\" ui-sref=\\\"permission.actor.item.detail\\\"><span class=\\\"fa fa-plus\\\" aria-hidden=\\\"true\\\"></span></button> <button class=\\\"btn btn-primary\\\" ui-sref=\\\"^.edit\\\"><span class=\\\"glyphicon glyphicon-pencil\\\" aria-hidden=\\\"true\\\"></span></button> <button class=\\\"btn btn-danger\\\" ng-click=\\\"DeleteActor()\\\"><span class=\\\"glyphicon glyphicon-minus\\\" aria-hidden=\\\"true\\\"></span></button></div></div><div class=\\\"panel panel-info\\\" ng-if=\\\"currentActor.Id\\\"><div class=\\\"panel-heading\\\"><b translate=\\\"\\\">ROLES</b></div><ul class=\\\"list-group\\\"><li class=\\\"list-group-item\\\" ng-repeat=\\\"(actorId, parent) in currentActor.Parents\\\"><div class=\\\"pull-left\\\"><b>{{parent.Name}}</b><br>{{parent.Type}}/{{parent.Reference}}</div><div class=\\\"pull-right\\\"><button class=\\\"btn btn-primary\\\" ng-click=\\\"AddMembershipContext(actorId)\\\"><span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span></button> <button class=\\\"btn btn-danger\\\" ng-click=\\\"DeleteMembership(actorId)\\\"><span class=\\\"glyphicon glyphicon-minus\\\" aria-hidden=\\\"true\\\"></span></button> <button class=\\\"btn btn-default\\\" ng-click=\\\"SetActor(actorId)\\\"><span class=\\\"glyphicon glyphicon-chevron-right\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"clearfix\\\"></div><br><div ng-repeat=\\\"(contextId,contextView) in parent.ContextView\\\" class=\\\"btn-group\\\" dropdown=\\\"\\\" is-open=\\\"blabla.isopen\\\"><button type=\\\"button\\\" class=\\\"btn btn-default\\\">{{contextView.Name}}</button> <button type=\\\"button\\\" class=\\\"btn btn-default dropdown-toggle\\\" dropdown-toggle=\\\"\\\"><span class=\\\"caret\\\"></span></button><ul class=\\\"dropdown-menu\\\" role=\\\"menu\\\"><li><a ng-click=\\\"DeleteMembershipContext(actorId,contextId)\\\" translate=\\\"\\\">DELETE</a></li></ul></div></li></ul><div class=\\\"panel-footer text-right\\\"><button class=\\\"btn btn-primary\\\" ng-click=\\\"AddMembership()\\\"><span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span></button></div></div><div class=\\\"panel panel-info\\\" ng-if=\\\"currentActor.Id\\\"><div class=\\\"panel-heading\\\"><b translate=\\\"\\\">TEMPLATE</b></div><div class=\\\"panel-body\\\"><li ng-repeat=\\\"(permId,permView) in currentActor.TemplateView\\\">{{ permView.PermissionName }} - {{permView.Value}}</li></div><div class=\\\"panel-footer text-right\\\"><button class=\\\"btn btn-primary\\\" ng-click=\\\"PermissionTemplate()\\\"><span class=\\\"glyphicon glyphicon-pencil\\\" aria-hidden=\\\"true\\\"></span></button></div></div><div class=\\\"row\\\"><div class=\\\"col-xs-6\\\"><button ui-sref=\\\"^.^.list\\\" class=\\\"btn btn-default\\\"><span class=\\\"glyphicon glyphicon-chevron-left\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"col-xs-6\\\"></div></div></div></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/confirmactivationtoken.html\",\n    \"<div class=\\\"row\\\"><div class=\\\"col-sm-12\\\"><div class=\\\"panel panel-widget\\\"><div class=\\\"panel-heading\\\"><h3 class=\\\"panel-title\\\" translate=\\\"CONF_ACTIVATIONMAILSEND\\\"></h3></div><div class=\\\"panel-body\\\"><button class=\\\"btn btn-primary\\\" translate=\\\"FINISH\\\" ui-sref=\\\"account/signin\\\"></button></div></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/contextedit.html\",\n    \"<section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-key\\\"></i></div><h1 class=\\\"page-title\\\"><div ui-view=\\\"title\\\"><span>{{'PERMISSION'|t}}</span></div><small><div ui-view=\\\"subtitle\\\">{{'CONTEXT'|t}}</div></small></h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><cr-form cr-focus=\\\"\\\" name=\\\"contextForm\\\" result=\\\"contextOperation\\\" definition=\\\"formDefinition\\\" options=\\\"formOptions\\\" rc-submit=\\\"Submit()\\\"><br><div class=\\\"row\\\"><div class=\\\"col-xs-6\\\"><button ng-click=\\\"GoBack()\\\" class=\\\"btn btn-default\\\"><span class=\\\"glyphicon glyphicon-chevron-left\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"col-xs-6\\\"><div class=\\\"pull-right\\\"><button class=\\\"btn btn-success\\\" type=\\\"submit\\\"><span class=\\\"glyphicon glyphicon-floppy-disk\\\" aria-hidden=\\\"true\\\"></span> {{'SAVE'|t}}</button></div></div></div></cr-form></div></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/contextlist.html\",\n    \"<section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-key\\\"></i></div><h1 class=\\\"page-title\\\"><div ui-view=\\\"title\\\"><span>{{'PERMISSION'|t}}</span></div><small><div ui-view=\\\"subtitle\\\">{{'CONTEXT'|t}}</div></small></h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><cr-context-list select=\\\"SelectContext(contextId)\\\"></cr-context-list><div class=\\\"pull-right\\\"><button ui-sref=\\\"^.create\\\" class=\\\"btn btn-primary\\\" type=\\\"button\\\"><span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"clearfix\\\"></div></div></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/manage.html\",\n    \"<section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-key\\\"></i></div><h1 class=\\\"page-title\\\"><div ui-view=\\\"title\\\"><span>{{'PERMISSION'|t}}</span></div><small ng-if=\\\"currentContext.Id=='0'\\\"><div ui-view=\\\"subtitle\\\">{{'ACTOR'|t}}</div></small> <small ng-if=\\\"currentContext.Id!='0'\\\"><div ui-view=\\\"subtitle\\\">{{'CONTEXT'|t}}</div></small></h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><blockquote translate=\\\"PERMISSIONMANAGEHELP\\\"></blockquote><cr-context-edit context-id=\\\"contextId\\\" actor-id=\\\"{{currentActor.Id}}\\\" back-link=\\\"true\\\"></cr-context-edit></div></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/message.html\",\n    \"<section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-user\\\"></i></div><h1 class=\\\"page-title\\\">{{title|translate:'Account'}} <small translate=\\\"SIGNUP_STEP3\\\"></small></h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><span ng-bind-html=\\\"message | translate:'Account' | sanitize\\\"></span><br><br><div align=\\\"center\\\"><button class=\\\"btn btn-primary\\\" translate=\\\"FINISH\\\" ui-sref=\\\"account/signin\\\"></button></div></div></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/overview.html\",\n    \"<section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-key\\\"></i></div><h1 class=\\\"page-title\\\"><div ui-view=\\\"title\\\"><span>{{'PERMISSION'|t}}</span></div><small><div ui-view=\\\"subtitle\\\">{{'CONTEXT'|t}}</div></small></h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><div class=\\\"form-group has-feedback nomargin\\\"><table class=\\\"table\\\"><tr ng-repeat-start=\\\"(actorId, actorValue) in currentContext.ActorValues\\\"><td>{{actorValue.ActorView.Type}} / <b>{{actorValue.ActorView.Name}}</b></td><td><button class=\\\"btn btn-edit pull-right\\\" ng-click=\\\"Manage(actorId)\\\" translate=\\\"MANAGE\\\"></button></td></tr><tr ng-repeat-end=\\\"\\\"><td colspan=\\\"2\\\"><li ng-repeat=\\\"(permissionId, permissionValue) in actorValue.Values\\\">{{permissionValue.PermissionName}} - {{permissionValue.Value}}</li></td></tr></table></div><div class=\\\"row\\\"><div class=\\\"col-xs-6\\\"><button ui-sref=\\\"^.^.list\\\" class=\\\"btn btn-default\\\"><span class=\\\"glyphicon glyphicon-chevron-left\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"col-xs-6\\\"><div class=\\\"pull-right\\\"><span ng-if=\\\"callback!=null\\\"><button ng-click=\\\"SelectContext()\\\" class=\\\"btn btn-success\\\" translate=\\\"SELECT\\\"></button></span> <button class=\\\"btn btn-primary\\\" ui-sref=\\\"^.create\\\"><span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span></button> <button class=\\\"btn btn-primary\\\" ui-sref=\\\"^.edit\\\"><span class=\\\"glyphicon glyphicon-pencil\\\" aria-hidden=\\\"true\\\"></span></button> <button class=\\\"btn btn-danger\\\" ng-click=\\\"DeleteContext()\\\"><span class=\\\"glyphicon glyphicon-minus\\\" aria-hidden=\\\"true\\\"></span></button></div></div></div></div></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/permission.html\",\n    \"<div ui-view=\\\"\\\"></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/permissionmenu.html\",\n    \"<section class=\\\"page-content page-content-lg page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-key\\\"></i></div><h1 class=\\\"page-title\\\">{{ 'PERMISSION' | translate:Context }}</h1></div><div class=\\\"dashboard-content\\\"><cr-menusquare><cr-menusquare-item sq-icon=\\\"home\\\" sq-title=\\\"HOME\\\" sq-description=\\\"HOME_DETAIL\\\" sq-anim-direction=\\\"down\\\" sq-route=\\\"index\\\"></cr-menusquare-item><cr-menusquare-item sq-icon=\\\"pencil-square-o\\\" sq-title=\\\"CONTEXTLIST\\\" sq-description=\\\"CONTEXTLIST_DETAIL\\\" sq-anim-direction=\\\"down\\\" sq-route=\\\"permission.context.list\\\"></cr-menusquare-item><cr-menusquare-item sq-icon=\\\"users\\\" sq-title=\\\"ACTORLIST\\\" sq-route=\\\"permission.actor.list\\\"></cr-menusquare-item><cr-menusquare-item sq-icon=\\\"list\\\" sq-title=\\\"PERMTYPE\\\" sq-route=\\\"permission.type.list\\\"></cr-menusquare-item><cr-menusquare-item sq-icon=\\\"bell-o\\\" sq-title=\\\"NOTIFICATIONTEST\\\" sq-action=\\\"NotificationTest('#PROUT')\\\"></cr-menusquare-item><cr-menusquare-item sq-icon=\\\"file-text-o\\\" sq-title=\\\"MESSAGETEST\\\" sq-action=\\\"MessageTest('#PROUT')\\\"></cr-menusquare-item></cr-menusquare></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/permtypeedit.html\",\n    \"<section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-key\\\"></i></div><h1 class=\\\"page-title\\\"><div ui-view=\\\"title\\\"><span>{{'PERMISSION'|t}}</span></div><small><div ui-view=\\\"subtitle\\\">{{'PERMTYPE'|t}}</div></small></h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><cr-form cr-focus=\\\"\\\" name=\\\"permTypeForm\\\" result=\\\"permTypeOperation\\\" definition=\\\"formDefinition\\\" options=\\\"formOptions\\\" rc-submit=\\\"Submit()\\\"><br><div class=\\\"row\\\"><div class=\\\"col-xs-6\\\"><button ui-sref=\\\"permission.type.list\\\" class=\\\"btn btn-default\\\"><span class=\\\"glyphicon glyphicon-chevron-left\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"col-xs-6\\\"><div class=\\\"pull-right\\\"><button class=\\\"btn btn-success\\\" type=\\\"submit\\\"><span class=\\\"glyphicon glyphicon-floppy-disk\\\" aria-hidden=\\\"true\\\"></span> {{'SAVE'|t}}</button> <button class=\\\"btn btn-danger\\\" ng-show=\\\"edit\\\" ng-click=\\\"DeletePermType()\\\"><span class=\\\"glyphicon glyphicon-minus\\\" aria-hidden=\\\"true\\\"></span></button></div></div></div></cr-form></div></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/permtypelist.html\",\n    \"<section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-key\\\"></i></div><h1 class=\\\"page-title\\\"><div ui-view=\\\"title\\\"><span>{{'PERMISSION'|t}}</span></div><small><div ui-view=\\\"subtitle\\\">{{'PERMTYPE'|t}}</div></small></h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><div class=\\\"tabs-vertical row\\\"><div class=\\\"col-sm-3\\\"><ul class=\\\"nav nav-tabs-vertical\\\" role=\\\"tablist\\\"><li role=\\\"presentation\\\" ng-repeat=\\\"(permGroup, permTypes) in permissionGroups\\\" ng-class=\\\"{'active':($index==0 && !activePermGroupTab) || permGroup==activePermGroupTab}\\\"><a ng-click=\\\"SetActivePermGroupTab(permGroup)\\\" role=\\\"tab\\\" data-toggle=\\\"tab\\\">{{permGroup}}</a></li></ul></div><div class=\\\"col-sm-9\\\"><div class=\\\"tab-content\\\"><div role=\\\"tabpanel\\\" class=\\\"tab-pane\\\" ng-repeat=\\\"(permGroup, permTypes) in permissionGroups\\\" ng-class=\\\"{'active':($index==0 && !activePermGroupTab) || permGroup==activePermGroupTab}\\\"><table class=\\\"table table-stripped\\\" style=\\\"width:300px\\\"><tr ng-repeat=\\\"permType in permTypes\\\"><td>{{permType.Name}}</td><td>{{getPermDataTypeName(permType.DataType)}}</td><td><button class=\\\"btn btn-edit pull-right\\\" type=\\\"button\\\" ng-click=\\\"SelectPermissionType(permType)\\\"><span class=\\\"glyphicon glyphicon-chevron-right\\\" aria-hidden=\\\"true\\\"></span></button></td></tr></table></div></div></div></div><div class=\\\"pull-right\\\"><button ui-sref=\\\"permission.type.create\\\" class=\\\"btn btn-primary\\\" type=\\\"button\\\"><span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span></button></div><div class=\\\"clearfix\\\"></div></div></div></div></section>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/searchactor.html\",\n    \"<div cr-focus=\\\"\\\"><div class=\\\"form-group has-feedback nomargin\\\"><div class=\\\"row\\\" ng-show=\\\"!enhancedSearch\\\"><div class=\\\"col-md-12\\\"><form><div class=\\\"input-group\\\"><span class=\\\"input-group-btn\\\" dropdown=\\\"\\\"><button type=\\\"button\\\" class=\\\"btn btn-primary dropdown-toggle\\\" dropdown-toggle=\\\"\\\">{{searchFilter|translate:context}} <span class=\\\"caret\\\"></span></button><ul class=\\\"dropdown-menu\\\" role=\\\"menu\\\"><li ng-class=\\\"{'disabled': isDisabled('USER') ? 'disabled' : ''}\\\"><a ng-click=\\\"SetActorFilter('USER')\\\" href=\\\"\\\" translate=\\\"USER\\\"></a></li><li ng-class=\\\"{'disabled': isDisabled('ROLE') ? 'disabled' : ''}\\\"><a ng-click=\\\"SetActorFilter('ROLE')\\\" href=\\\"\\\" translate=\\\"ROLE\\\"></a></li></ul></span> <input type=\\\"text\\\" class=\\\"form-control\\\" ng-model=\\\"search\\\"> <span class=\\\"input-group-btn\\\"><button class=\\\"btn btn-success\\\" type=\\\"submit\\\" ng-click=\\\"Search(search)\\\"><span class=\\\"glyphicon glyphicon-search\\\" aria-hidden=\\\"true\\\"></span></button> <button class=\\\"btn btn-default\\\" ng-if=\\\"searchFilter=='USER'\\\" type=\\\"submit\\\" ng-click=\\\"SetEnhancedSearch(true)\\\"><span class=\\\"glyphicon glyphicon-plus\\\" aria-hidden=\\\"true\\\"></span></button></span></div></form></div></div><cr-form ng-if=\\\"enhancedSearch\\\" name=\\\"actorSearch\\\" result=\\\"userSearchData\\\" definition=\\\"actorSearchFormDefinition\\\" options=\\\"formOptions\\\" rc-submit=\\\"Search()\\\"><br><div class=\\\"row\\\"><div class=\\\"col-xs-6\\\"></div><div class=\\\"col-xs-6\\\"><div class=\\\"pull-right\\\"><button class=\\\"btn btn-success\\\" type=\\\"submit\\\" ng-click=\\\"Search()\\\"><span class=\\\"glyphicon glyphicon-search\\\" aria-hidden=\\\"true\\\"></span></button> <button class=\\\"btn btn-default\\\" ng-click=\\\"SetEnhancedSearch(false)\\\"><span class=\\\"glyphicon glyphicon-minus\\\" aria-hidden=\\\"true\\\"></span></button></div></div></div></cr-form></div><div class=\\\"row\\\" ng-if=\\\"searchFilter=='USER'\\\"><div class=\\\"col-sm-12\\\" ng-show=\\\"$parent.userSearchResult.length>0\\\"><table class=\\\"table table-striped\\\"><thead><tr><th translate=\\\"NAME\\\"></th><th translate=\\\"YOB\\\"></th><th>&nbsp;</th></tr></thead><tbody><tr ng-repeat=\\\"userView in $parent.userSearchResult\\\"><td>{{userView.LastName}} {{userView.FirstName}}</td><td>{{userView.YOB}}</td><td><button class=\\\"btn btn-edit pull-right\\\" type=\\\"button\\\" ng-click=\\\"SelectUserView(userView)\\\"><span class=\\\"glyphicon glyphicon-chevron-right\\\" aria-hidden=\\\"true\\\"></span></button></td></tr></tbody></table></div><div class=\\\"col-sm-12\\\" ng-show=\\\"$parent.userSearchResult.length==0\\\">NA</div></div><div class=\\\"row\\\" ng-if=\\\"searchFilter=='ROLE'\\\"><div class=\\\"col-sm-12\\\" ng-if=\\\"$parent.actorList.length==0\\\">NA</div><div class=\\\"col-sm-12\\\" ng-if=\\\"$parent.actorList.length>0\\\"><table class=\\\"table table-striped\\\"><thead><tr><th translate=\\\"TYPE\\\"></th><th translate=\\\"REFERENCE\\\"></th><th translate=\\\"NAME\\\"></th><th translate=\\\"DESCRIPTION\\\"></th><th>&nbsp;</th></tr></thead><tbody><tr ng-repeat=\\\"item in actorList\\\"><th class=\\\"t20\\\">{{item.Type}}</th><td>{{item.Reference}}</td><td>{{item.Name}}</td><td>{{item.Description}}</td><td><button class=\\\"btn btn-edit pull-right\\\" type=\\\"button\\\" ng-click=\\\"SelectRole(item)\\\"><span class=\\\"glyphicon glyphicon-chevron-right\\\" aria-hidden=\\\"true\\\"></span></button> <button class=\\\"btn btn-edit pull-right\\\" type=\\\"button\\\" ng-click=\\\"SelectRole(item)\\\"><span class=\\\"glyphicon glyphicon-chevron-right\\\" aria-hidden=\\\"true\\\"></span></button></td></tr></tbody></table></div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/searchcontext.html\",\n    \"<div cr-focus=\\\"\\\"><div class=\\\"form-group has-feedback nomargin\\\"><form><div class=\\\"row\\\"><div class=\\\"col-md-6\\\"></div><div class=\\\"col-md-6\\\"><div class=\\\"input-group\\\"><input type=\\\"text\\\" class=\\\"form-control\\\" ng-model=\\\"search\\\" ng-focus=\\\"\\\"> <span class=\\\"input-group-btn\\\"><button class=\\\"btn btn-success\\\" type=\\\"submit\\\" ng-click=\\\"Search(search)\\\"><span class=\\\"glyphicon glyphicon-search\\\" aria-hidden=\\\"true\\\"></span></button></span></div></div></div></form></div><div class=\\\"row\\\"><div class=\\\"col-sm-12\\\" ng-if=\\\"contextList.length>0\\\"><table class=\\\"table table-striped\\\"><thead><tr><th translate=\\\"TYPE\\\"></th><th translate=\\\"REFERENCE\\\"></th><th translate=\\\"NAME\\\"></th><th translate=\\\"DESCRIPTION\\\"></th><th>&nbsp;</th></tr></thead><tbody><tr ng-repeat=\\\"item in contextList\\\"><th class=\\\"t20\\\">{{item.Type}}</th><td>{{item.Reference}}</td><td>{{item.Name}}</td><td>{{item.Description}}</td><td><button class=\\\"btn btn-edit pull-right\\\" type=\\\"button\\\" ng-click=\\\"SelectContext(item)\\\"><span class=\\\"glyphicon glyphicon-chevron-right\\\" aria-hidden=\\\"true\\\"></span></button></td></tr></tbody></table></div><div class=\\\"col-sm-12\\\" ng-if=\\\"contextList.length==0\\\">NA</div></div></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/signin.html\",\n    \"<div class=\\\"row\\\" ng-if=\\\"isAuthenticated() && oAuthFlow\\\"><div class=\\\"col-xs-12\\\"><div class=\\\"well\\\"><h1 translate=\\\"\\\">REDIRECTING</h1></div></div></div><div cr-focus=\\\"\\\"><section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-lock\\\"></i></div><h1 class=\\\"page-title\\\" ng-if=\\\"applicationDetails()\\\">{{ 'LOGIN' | translate:context }}<small>{{ applicationDetails().Name | tc:applicationDetails().TranslationContext }}</small></h1><h1 class=\\\"page-title\\\" ng-if=\\\"!applicationDetails()\\\">{{ 'LOGIN' | translate:context }}</h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><p class=\\\"mt10 mb30\\\">{{ 'AUTHHELP' | translate:context }}</p><div class=\\\"alert alert-danger\\\" ng-show=\\\"errorMessage\\\"><p>{{ errorMessage | translate:context }}</p></div><div class=\\\"row\\\"><div class=\\\"col-sm-3 col-sm-push-9\\\"><ul class=\\\"social-connect\\\"><li><a class=\\\"btn btn-block btn-facebook\\\" href=\\\"\\\" ng-click=\\\"oAuth2Login('facebook')\\\" ng-disabled=\\\"tracker.active()\\\"><i class=\\\"fa fa-fw fa-facebook\\\"></i> <span class=\\\"hidden-xs\\\" translate=\\\"\\\">FACEBOOK</span></a></li><li><a class=\\\"btn btn-block btn-twitter\\\" href=\\\"\\\" ng-click=\\\"oAuth1Login('Twitter')\\\" ng-disabled=\\\"tracker.active()\\\"><i class=\\\"fa fa-fw fa-twitter\\\"></i> <span class=\\\"hidden-xs\\\" translate=\\\"\\\">TWITTER</span></a></li><li><a class=\\\"btn btn-block btn-windows\\\" href=\\\"\\\" ng-click=\\\"oAuth2Login('windows')\\\" ng-disabled=\\\"tracker.active()\\\"><i class=\\\"fa fa-fw fa-windows\\\"></i> <span class=\\\"hidden-xs\\\" translate=\\\"\\\">WL</span></a></li><li><a class=\\\"btn btn-block btn-google-plus\\\" href=\\\"\\\" ng-click=\\\"oAuth2Login('google')\\\" ng-disabled=\\\"tracker.active()\\\"><i class=\\\"fa fa-fw fa-google-plus\\\"></i> <span class=\\\"hidden-xs\\\" translate=\\\"\\\">GOOGLE</span></a></li></ul></div><div class=\\\"col-sm-9 col-sm-pull-3\\\"><cr-form name=\\\"loginFormTest\\\" result=\\\"loginData\\\" definition=\\\"loginFormDefinition\\\" options=\\\"loginFormOptions\\\" rc-submit=\\\"login()\\\"><div class=\\\"row margin-top\\\"><div class=\\\"col-xs-12\\\"><div class=\\\"pull-right\\\"><button class=\\\"btn btn-info\\\" type=\\\"submit\\\" tabindex=\\\"33\\\" translate=\\\"\\\" ng-disabled=\\\"tracker.active()\\\">LOGIN</button> <a class=\\\"btn btn-primary\\\" ui-sref=\\\"account/signup\\\"><i class=\\\"fa fa-plus\\\"></i> <span translate=\\\"SIGNUP\\\"></span></a></div></div></div><div class=\\\"row margin-top\\\"><div class=\\\"col-xs-12\\\"><div class=\\\"pull-left\\\"><div class=\\\"checkbox\\\" style=\\\"margin: 0;\\\"><label for=\\\"inputSinginRemindme\\\"><input type=\\\"checkbox\\\" name=\\\"remindme\\\" ng-model=\\\"remindMe\\\" id=\\\"inputSinginRemindme\\\" tabindex=\\\"32\\\"> {{ 'REMEMBERME' | translate:context }}</label></div></div><div class=\\\"pull-right\\\"><button class=\\\"btn-link\\\" ng-disabled=\\\"tracker.active()\\\" ng-click=\\\"lostPwd()\\\" translate=\\\"\\\">LOSTPASSWORD</button></div></div></div></cr-form></div></div></div></div></div></section></div>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/signup.activate.html\",\n    \"<h1 translate=\\\"\\\">ACTIVATEFORM</h1><cr-form name=\\\"signupForm\\\" result=\\\"formData\\\" definition=\\\"formDefinition\\\" options=\\\"formOptions\\\" ng-submit=\\\"submit()\\\"></cr-form>\");\n}]);\n})();\n\n(function(module) {\ntry { module = angular.module(\"cr.account\"); }\ncatch(err) { module = angular.module(\"cr.account\", []); }\nmodule.run([\"$templateCache\", function($templateCache) {\n  $templateCache.put(\"modules/account/views/signup.html\",\n    \"<section class=\\\"page-content page-content-md page-oauth\\\"><div class=\\\"page-header\\\"><div class=\\\"page-icon\\\"><i class=\\\"fa fa-user\\\"></i></div><h1 class=\\\"page-title\\\">{{ 'SIGNUP' | translate:context }}<small translate=\\\"SIGNUP_STEP1\\\"></small></h1></div><div role=\\\"tabpanel\\\"><div class=\\\"tab-content\\\"><div class=\\\"tab-pane-content\\\"><cr-form name=\\\"signupForm\\\" result=\\\"formData\\\" definition=\\\"formDefinition\\\" options=\\\"formOptions\\\" rc-submit=\\\"submit()\\\"><cr-previous-next show-next=\\\"showNext\\\" show-previous=\\\"showPrevious\\\" context=\\\"context\\\" on-previous=\\\"goBack()\\\"></cr-previous-next></cr-form></div></div></div></section>\");\n}]);\n})();\n"],"sourceRoot":"/source/"}