diff --git a/app/views/form.server.view.pug b/app/views/form.server.view.pug index e9332158..9cf0a3ae 100644 --- a/app/views/form.server.view.pug +++ b/app/views/form.server.view.pug @@ -57,7 +57,7 @@ html(lang='en', xmlns='http://www.w3.org/1999/xhtml') //Embedding socketUrl if socketUrl script(type='text/javascript'). - socketUrl = !{socketUrl} + socketUrl = "!{socketUrl}" script(src='/static/lib/jquery/dist/jquery.min.js', type='text/javascript') link(rel='stylesheet', href='/static/lib/font-awesome/css/font-awesome.min.css') diff --git a/gruntfile.js b/gruntfile.js index bbfb0510..5fc30add 100755 --- a/gruntfile.js +++ b/gruntfile.js @@ -151,8 +151,8 @@ module.exports = function(grunt) { }, production: { files: { - 'public/dist/application.js': ['public/application.js', 'public/config.js', 'public/form_modules/**/*.js'], - 'public/dist/form-application.js': ['public/form-application.js', 'public/form-config.js', 'public/form_modules/**/*.js'] + 'public/dist/application.js': '<%= applicationJavaScriptFiles %>', + 'public/dist/form-application.js': '<%= formApplicationJavaScriptFiles %>' } } }, @@ -329,7 +329,7 @@ module.exports = function(grunt) { grunt.registerTask('coverage:server', ['env:test', 'mocha_istanbul:coverageServer']); // Default task(s). - grunt.registerTask('default', ['lint', 'html2js:main', 'html2js:forms', 'env', 'concurrent:default']); + grunt.registerTask('default', ['lint', 'loadConfig', 'ngAnnotate', 'uglify', 'html2js:main', 'html2js:forms', 'env', 'concurrent:default']); grunt.registerTask('dev', ['lint', 'html2js:main', 'html2js:forms', 'env:dev', 'concurrent:default']); // Debug task. diff --git a/public/dist/.placeholder b/public/dist/.placeholder deleted file mode 100644 index e69de29b..00000000 diff --git a/public/dist/application.js b/public/dist/application.js deleted file mode 100644 index 92f6ce4e..00000000 --- a/public/dist/application.js +++ /dev/null @@ -1,1349 +0,0 @@ -'use strict'; - -//Start by defining the main module and adding the module dependencies -angular.module(ApplicationConfiguration.applicationModuleName, ApplicationConfiguration.applicationModuleVendorDependencies); - -// Setting HTML5 Location Mode -angular.module(ApplicationConfiguration.applicationModuleName).config(["$locationProvider", function($locationProvider) { - $locationProvider.hashPrefix('!'); - } -]); - -//Permission Constants -angular.module(ApplicationConfiguration.applicationModuleName).constant('APP_PERMISSIONS', { - viewAdminSettings: 'viewAdminSettings', - editAdminSettings: 'editAdminSettings', - editForm: 'editForm', - viewPrivateForm: 'viewPrivateForm' -}); - -//User Role constants -angular.module(ApplicationConfiguration.applicationModuleName).constant('USER_ROLES', { - admin: 'admin', - normal: 'user', - superuser: 'superuser' -}); - -//form url -angular.module(ApplicationConfiguration.applicationModuleName).constant('FORM_URL', '/forms/:formId'); - -//Then define the init function for starting up the application -angular.element(document).ready(function() { - //Fixing facebook bug with redirect - if (window.location.hash === '#_=_') window.location.hash = '#!'; - - //Then init the app - angular.bootstrap(document, [ApplicationConfiguration.applicationModuleName]); -}); - -'use strict'; - -// Init the application configuration module for AngularJS application -var ApplicationConfiguration = (function() { - // Init module configuration options - var applicationModuleName = 'TellForm'; - var applicationModuleVendorDependencies = ['duScroll', 'ui.select', 'ngSanitize', 'vButton', 'ngResource', 'TellForm.templates', 'ui.router', 'ui.bootstrap', 'ui.utils', 'pascalprecht.translate', 'view-form']; - - // Add a new vertical module - var registerModule = function(moduleName, dependencies) { - // Create angular module - angular.module(moduleName, dependencies || []); - - // Add the module to the AngularJS configuration file - angular.module(applicationModuleName).requires.push(moduleName); - }; - - return { - applicationModuleName: applicationModuleName, - applicationModuleVendorDependencies: applicationModuleVendorDependencies, - registerModule: registerModule - }; -})(); - -'use strict'; - -// Configuring the Forms drop-down menus -angular.module('view-form') -.filter('formValidity', function(){ - return function(formObj){ - if(formObj && formObj.form_fields && formObj.visible_form_fields){ - - //get keys - var formKeys = Object.keys(formObj); - - //we only care about things that don't start with $ - var fieldKeys = formKeys.filter(function(key){ - return key[0] !== '$'; - }); - - var fields = formObj.form_fields; - - var valid_count = fields.filter(function(field){ - if(typeof field === 'object' && field.fieldType !== 'rating' && field.fieldType !== 'statement'){ - return !!(field.fieldValue); - } else if (field.fieldType === 'rating'){ - return true; - } - - }).length; - return valid_count - (formObj.form_fields.length - formObj.visible_form_fields.length); - } - return 0; - }; -}); - -angular.module('view-form').value('supportedFields', [ - 'textfield', - 'textarea', - 'date', - 'dropdown', - 'hidden', - 'password', - 'radio', - 'legal', - 'statement', - 'rating', - 'yes_no', - 'number', - 'natural' -]); - -angular.module('view-form').constant('VIEW_FORM_URL', '/forms/:formId/render'); - - -'use strict'; - -angular.module('view-form').config(["$translateProvider", function ($translateProvider) { - - $translateProvider.translations('en', { - FORM_SUCCESS: 'Form entry successfully submitted!', - REVIEW: 'Review', - BACK_TO_FORM: 'Go back to Form', - EDIT_FORM: 'Edit this TellForm', - CREATE_FORM: 'Create this TellForm', - ADVANCEMENT: '{{done}} out of {{total}} answered', - CONTINUE_FORM: 'Continue to Form', - REQUIRED: 'required', - COMPLETING_NEEDED: '{{answers_not_completed}} answer(s) need completing', - OPTIONAL: 'optional', - ERROR_EMAIL_INVALID: 'Please enter a valid email address', - ERROR_NOT_A_NUMBER: 'Please enter valid numbers only', - ERROR_URL_INVALID: 'Please a valid url', - OK: 'OK', - ENTER: 'press ENTER', - YES: 'Yes', - NO: 'No', - NEWLINE: 'press SHIFT+ENTER to create a newline', - CONTINUE: 'Continue', - LEGAL_ACCEPT: 'I accept', - LEGAL_NO_ACCEPT: 'I don’t accept', - DELETE: 'Delete', - CANCEL: 'Cancel', - SUBMIT: 'Submit', - UPLOAD_FILE: 'Upload your File', - Y: 'Y', - N: 'N', - OPTION_PLACEHOLDER: 'Type or select an option', - ADD_NEW_LINE_INSTR: 'Press SHIFT+ENTER to add a newline', - ERROR: 'Error', - - FORM_404_HEADER: '404 - Form Does Not Exist', - FORM_404_BODY: 'The form you are trying to access does not exist. Sorry about that!', - - FORM_UNAUTHORIZED_HEADER: 'Not Authorized to Access Form', - FORM_UNAUTHORIZED_BODY1: 'The form you are trying to access is currently private and not accesible publically.', - FORM_UNAUTHORIZED_BODY2: 'If you are the owner of the form, you can set it to "Public" in the "Configuration" panel in the form admin.', - }); - - $translateProvider.preferredLanguage('en') - .fallbackLanguage('en') - .useSanitizeValueStrategy('escape'); - -}]); - -'use strict'; - -angular.module('view-form').config(["$translateProvider", function ($translateProvider) { - - $translateProvider.translations('fr', { - FORM_SUCCESS: 'Votre formulaire a été enregistré!', - REVIEW: 'Incomplet', - BACK_TO_FORM: 'Retourner au formulaire', - EDIT_FORM: 'Éditer le Tellform', - CREATE_FORM: 'Créer un TellForm', - ADVANCEMENT: '{{done}} complétés sur {{total}}', - CONTINUE_FORM: 'Aller au formulaire', - REQUIRED: 'obligatoire', - COMPLETING_NEEDED: '{{answers_not_completed}} réponse(s) doive(nt) être complétée(s)', - OPTIONAL: 'facultatif', - ERROR_EMAIL_INVALID: 'Merci de rentrer une adresse mail valide', - ERROR_NOT_A_NUMBER: 'Merce de ne rentrer que des nombres', - ERROR_URL_INVALID: 'Merci de rentrer une url valide', - OK: 'OK', - ENTER: 'presser ENTRÉE', - YES: 'Oui', - NO: 'Non', - NEWLINE: 'presser SHIFT+ENTER pour créer une nouvelle ligne', - CONTINUE: 'Continuer', - LEGAL_ACCEPT: 'J’accepte', - LEGAL_NO_ACCEPT: 'Je n’accepte pas', - DELETE: 'Supprimer', - CANCEL: 'Réinitialiser', - SUBMIT: 'Enregistrer', - UPLOAD_FILE: 'Envoyer un fichier', - Y: 'O', - N: 'N', - OPTION_PLACEHOLDER: 'Tapez ou sélectionnez une option', - ADD_NEW_LINE_INSTR: 'Appuyez sur MAJ + ENTRÉE pour ajouter une nouvelle ligne', - ERROR: 'Erreur', - - FORM_404_HEADER: '404 - Le formulaire n\'existe pas', - FORM_404_BODY: 'Le formulaire auquel vous essayez d\'accéder n\'existe pas. Désolé pour ça!', - - FORM_UNAUTHORIZED_HEADER: 'Non autorisé à accéder au formulaire', -   FORM_UNAUTHORIZED_BODY1: 'Le formulaire auquel vous essayez d\'accéder est actuellement privé et inaccessible publiquement.', -   FORM_UNAUTHORIZED_BODY2: 'Si vous êtes le propriétaire du formulaire, vous pouvez le définir sur "Public" dans le panneau "Configuration" du formulaire admin.', - }); - -}]); - -'use strict'; - -angular.module('view-form').config(["$translateProvider", function ($translateProvider) { - - $translateProvider.translations('de', { - FORM_SUCCESS: 'Ihre Angaben wurden gespeichert.', - REVIEW: 'Unvollständig', - BACK_TO_FORM: 'Zurück zum Formular', - EDIT_FORM: 'Bearbeiten Sie diese TellForm', - CREATE_FORM: 'Dieses TellForm erstellen', - ADVANCEMENT: '{{done}} von {{total}} beantwortet', - CONTINUE_FORM: 'Zum Formular', - REQUIRED: 'verpflichtend', - COMPLETING_NEEDED: 'Es fehlen/fehtl noch {{answers_not_completed}} Antwort(en)', - OPTIONAL: 'fakultativ', - ERROR_EMAIL_INVALID: 'Bitte gültige Mailadresse eingeben', - ERROR_NOT_A_NUMBER: 'Bitte nur Zahlen eingeben', - ERROR_URL_INVALID: 'Bitte eine gültige URL eingeben', - OK: 'Okay', - ENTER: 'Eingabetaste drücken', - YES: 'Ja', - NO: 'Nein', - NEWLINE: 'Für eine neue Zeile SHIFT+ENTER drücken', - CONTINUE: 'Weiter', - LEGAL_ACCEPT: 'I accept', - LEGAL_NO_ACCEPT: 'I don’t accept', - DELETE: 'Entfernen', - CANCEL: 'Canceln', - SUBMIT: 'Speichern', - UPLOAD_FILE: 'Datei versenden', - Y: 'J', - N: 'N', - OPTION_PLACEHOLDER: 'Geben oder wählen Sie eine Option aus', - ADD_NEW_LINE_INSTR: 'Drücken Sie UMSCHALT + EINGABETASTE, um eine neue Zeile hinzuzufügen', - ERROR: 'Fehler', - - FORM_404_HEADER: '404 - Formular existiert nicht', - FORM_404_BODY: 'Das Formular, auf das Sie zugreifen möchten, existiert nicht. Das tut mir leid!', - - FORM_UNAUTHORIZED_HEADER: 'Nicht zum Zugriffsformular berechtigt\' ', -   FORM_UNAUTHORIZED_BODY1: 'Das Formular, auf das Sie zugreifen möchten, ist derzeit privat und nicht öffentlich zugänglich.', -   FORM_UNAUTHORIZED_BODY2: 'Wenn Sie der Eigentümer des Formulars sind, können Sie es im Fenster "Konfiguration" im Formular admin auf "Öffentlich" setzen.', - }); - -}]); - -'use strict'; - -angular.module('view-form').config(["$translateProvider", function ($translateProvider) { - - $translateProvider.translations('it', { - FORM_SUCCESS: 'Il formulario è stato inviato con successo!', - REVIEW: 'Incompleto', - BACK_TO_FORM: 'Ritorna al formulario', - EDIT_FORM: 'Modifica questo TellForm', - CREATE_FORM: 'Crea questo TellForm', - ADVANCEMENT: '{{done}} su {{total}} completate', - CONTINUE_FORM: 'Vai al formulario', - REQUIRED: 'obbligatorio', - COMPLETING_NEEDED: '{{answers_not_completed}} risposta/e deve/ono essere completata/e', - OPTIONAL: 'opzionale', - ERROR_EMAIL_INVALID: 'Si prega di inserire un indirizzo email valido', - ERROR_NOT_A_NUMBER: 'Si prega di inserire solo numeri', - ERROR_URL_INVALID: 'Grazie per inserire un URL valido', - OK: 'OK', - ENTER: 'premere INVIO', - YES: 'Sì', - NO: 'No', - NEWLINE: 'premere SHIFT+INVIO per creare una nuova linea', - CONTINUE: 'Continua', - LEGAL_ACCEPT: 'I accept', - LEGAL_NO_ACCEPT: 'I don’t accept', - DELETE: 'Cancella', - CANCEL: 'Reset', - SUBMIT: 'Registra', - UPLOAD_FILE: 'Invia un file', - Y: 'S', - N: 'N', - OPTION_PLACEHOLDER: 'Digitare o selezionare un\'opzione', - ADD_NEW_LINE_INSTR: 'Premere SHIFT + INVIO per aggiungere una nuova riga', - ERROR: 'Errore', - - FORM_404_HEADER: '404 - Il modulo non esiste', - FORM_404_BODY: 'La forma che stai cercando di accedere non esiste. Ci dispiace!', - - FORM_UNAUTHORIZED_HEADER: 'Non autorizzato per accedere al modulo', -   FORM_UNAUTHORIZED_BODY1: 'Il modulo che si sta tentando di accedere è attualmente privato e non accessibile in pubblico.', -   FORM_UNAUTHORIZED_BODY2: 'Se sei il proprietario del modulo, puoi impostarlo su "Pubblico" nel pannello "Configurazione" nell\'amministratore di moduli.', - }); - -}]); - -'use strict'; - -angular.module('view-form').config(["$translateProvider", function ($translateProvider) { - - $translateProvider.translations('es', { - FORM_SUCCESS: '¡El formulario ha sido enviado con éxito!', - REVIEW: 'Revisar', - BACK_TO_FORM: 'Regresar al formulario', - EDIT_FORM: 'Editar este TellForm', - CREATE_FORM: 'Crear este TellForm', - ADVANCEMENT: '{{done}} de {{total}} contestadas', - CONTINUE_FORM: 'Continuar al formulario', - REQUIRED: 'Información requerida', - COMPLETING_NEEDED: '{{answers_not_completed}} respuesta(s) necesita(n) ser completada(s)', - OPTIONAL: 'Opcional', - ERROR_EMAIL_INVALID: 'Favor de proporcionar un correo electrónico válido', - ERROR_NOT_A_NUMBER: 'Por favor, introduzca sólo números válidos', - ERROR_URL_INVALID: 'Favor de proporcionar un url válido', - OK: 'OK', - ENTER: 'pulse INTRO', - YES: 'Si', - NO: 'No', - NEWLINE: 'presione SHIFT+INTRO para crear una nueva línea', - CONTINUE: 'Continuar', - LEGAL_ACCEPT: 'Yo acepto', - LEGAL_NO_ACCEPT: 'Yo no acepto', - DELETE: 'Eliminar', - CANCEL: 'Cancelar', - SUBMIT: 'Registrar', - UPLOAD_FILE: 'Cargar el archivo', - Y: 'S', - N: 'N', - OPTION_PLACEHOLDER: 'Escriba o seleccione una opción', - ADD_NEW_LINE_INSTR: 'Presione MAYÚS + ENTRAR para agregar una nueva línea', - ERROR: 'Error', - - FORM_404_HEADER: '404 - La forma no existe', - FORM_404_BODY: 'El formulario al que intenta acceder no existe. ¡Lo siento por eso!', - - FORM_UNAUTHORIZED_HEADER: 'Non autorizzato per accedere al modulo', -   FORM_UNAUTHORIZED_BODY1: 'Il modulo che si sta tentando di accedere è attualmente privato e non accessibile in pubblico.', -   FORM_UNAUTHORIZED_BODY2: 'Se sei il proprietario del modulo, puoi impostarlo su "Pubblico" nel pannello "Configurazione" nell\'amministratore di moduli.', - }); - -}]); - -'use strict'; - -// SubmitForm controller -angular.module('view-form').controller('SubmitFormController', ["$scope", "$rootScope", "$state", "$translate", "myForm", function($scope, $rootScope, $state, $translate, myForm) { - $scope.myform = myForm; - - $(".loader").fadeOut("slow"); - document.body.style.background = myForm.design.colors.backgroundColor; - $translate.use(myForm.language); - } -]); - -'use strict'; - -angular.module('view-form').directive('fieldIconDirective', function() { - - return { - template: '', - restrict: 'E', - scope: { - typeName: '@' - }, - controller: ["$scope", function($scope){ - var iconTypeMap = { - 'textfield': 'fa fa-pencil-square-o', - 'dropdown': 'fa fa-th-list', - 'date': 'fa fa-calendar', - 'checkbox': 'fa fa-check-square-o', - 'radio': 'fa fa-dot-circle-o', - 'email': 'fa fa-envelope-o', - 'textarea': 'fa fa-pencil-square', - 'legal': 'fa fa-legal', - 'file': 'fa fa-cloud-upload', - 'rating': 'fa fa-star-half-o', - 'link': 'fa fa-link', - 'scale': 'fa fa-sliders', - 'stripe': 'fa fa-credit-card', - 'statement': 'fa fa-quote-left', - 'yes_no': 'fa fa-toggle-on', - 'number': 'fa fa-slack' - }; - $scope.typeIcon = iconTypeMap[$scope.typeName]; - }] - }; -}); - -'use strict'; - -// coffeescript's for in loop -var __indexOf = [].indexOf || function(item) { - for (var i = 0, l = this.length; i < l; i++) { - if (i in this && this[i] === item) return i; - } - return -1; - }; - -angular.module('view-form').directive('fieldDirective', ["$http", "$compile", "$rootScope", "$templateCache", "supportedFields", function($http, $compile, $rootScope, $templateCache, supportedFields) { - - var getTemplateHtml = function(fieldType) { - var type = fieldType; - - var supported_fields = [ - 'textfield', - 'textarea', - 'date', - 'dropdown', - 'hidden', - 'password', - 'radio', - 'legal', - 'statement', - 'rating', - 'yes_no', - 'number', - 'natural' - ]; - - var templateUrl = 'form_modules/forms/base/views/directiveViews/field/'; - - if (__indexOf.call(supportedFields, type) >= 0) { - templateUrl = templateUrl+type+'.html'; - } - return $templateCache.get(templateUrl); - }; - - return { - template: '
{{field.title}}
', - restrict: 'E', - scope: { - field: '=', - required: '&', - design: '=', - index: '=', - forms: '=' - }, - link: function(scope, element) { - - $rootScope.chooseDefaultOption = scope.chooseDefaultOption = function(type) { - if(type === 'yes_no'){ - scope.field.fieldValue = 'true'; - }else if(type === 'rating'){ - scope.field.fieldValue = 0; - }else if(scope.field.fieldType === 'radio'){ - scope.field.fieldValue = scope.field.fieldOptions[0].option_value; - }else if(type === 'legal'){ - scope.field.fieldValue = 'true'; - $rootScope.nextField(); - } - }; - scope.nextField = $rootScope.nextField; - scope.setActiveField = $rootScope.setActiveField; - - //Set format only if field is a date - if(scope.field.fieldType === 'date'){ - scope.dateOptions = { - changeYear: true, - changeMonth: true, - altFormat: 'mm/dd/yyyy', - yearRange: '1900:-0', - defaultDate: 0 - }; - } - - var fieldType = scope.field.fieldType; - - if(scope.field.fieldType === 'number' || scope.field.fieldType === 'textfield' || scope.field.fieldType === 'email' || scope.field.fieldType === 'link'){ - switch(scope.field.fieldType){ - case 'textfield': - scope.input_type = 'text'; - break; - case 'email': - scope.input_type = 'email'; - scope.placeholder = 'joesmith@example.com'; - break; - case 'number': - scope.input_type = 'text'; - scope.validateRegex = /^-?\d+$/; - break; - default: - scope.input_type = 'url'; - scope.placeholder = 'http://example.com'; - break; - } - fieldType = 'textfield'; - } - - var template = getTemplateHtml(fieldType); - element.html(template).show(); - var output = $compile(element.contents())(scope); - } - }; - }]); - -'use strict'; - -//TODO: DAVID: Need to refactor this -angular.module('view-form').directive('onEnterKey', ["$rootScope", function($rootScope){ - return { - restrict: 'A', - link: function($scope, $element, $attrs) { - $element.bind('keydown keypress', function(event) { - - var keyCode = event.which || event.keyCode; - - var onEnterKeyDisabled = false; - if($attrs.onEnterKeyDisabled !== null) onEnterKeyDisabled = $attrs.onEnterKeyDisabled; - - if(keyCode === 13 && !event.shiftKey && !onEnterKeyDisabled) { - event.preventDefault(); - $rootScope.$apply(function() { - $rootScope.$eval($attrs.onEnterKey); - }); - } - }); - } - }; -}]).directive('onTabKey', ["$rootScope", function($rootScope){ - return { - restrict: 'A', - link: function($scope, $element, $attrs) { - $element.bind('keyup keypress', function(event) { - - var keyCode = event.which || event.keyCode; - - if(keyCode === 9 && !event.shiftKey) { - - event.preventDefault(); - $rootScope.$apply(function() { - $rootScope.$eval($attrs.onTabKey); - }); - } - }); - } - }; -}]).directive('onEnterOrTabKey', ["$rootScope", function($rootScope){ - return { - restrict: 'A', - link: function($scope, $element, $attrs) { - $element.bind('keydown keypress', function(event) { - - var keyCode = event.which || event.keyCode; - - if((keyCode === 13 || keyCode === 9) && !event.shiftKey) { - event.preventDefault(); - $rootScope.$apply(function() { - $rootScope.$eval($attrs.onEnterOrTabKey); - }); - } - }); - } - }; -}]).directive('onTabAndShiftKey', ["$rootScope", function($rootScope){ - return { - restrict: 'A', - link: function($scope, $element, $attrs) { - $element.bind('keydown keypress', function(event) { - - var keyCode = event.which || event.keyCode; - - if(keyCode === 9 && event.shiftKey) { - - console.log('onTabAndShiftKey'); - event.preventDefault(); - $rootScope.$apply(function() { - $rootScope.$eval($attrs.onTabAndShiftKey); - }); - } - }); - } - }; -}]); - -'use strict'; - -angular.module('view-form').directive('onFinishRender', ["$rootScope", "$timeout", function ($rootScope, $timeout) { - return { - restrict: 'A', - link: function (scope, element, attrs) { - - //Don't do anything if we don't have a ng-repeat on the current element - if(!element.attr('ng-repeat') && !element.attr('data-ng-repeat')){ - return; - } - - var broadcastMessage = attrs.onFinishRender || 'ngRepeat'; - - if(scope.$first && !scope.$last) { - scope.$evalAsync(function () { - $rootScope.$broadcast(broadcastMessage+' Started'); - }); - }else if(scope.$last) { - scope.$evalAsync(function () { - $rootScope.$broadcast(broadcastMessage+' Finished'); - }); - } - } - }; -}]); - -'use strict'; - -//FIXME: Should find an appropriate place for this -//Setting up jsep -jsep.addBinaryOp('contains', 10); -jsep.addBinaryOp('!contains', 10); -jsep.addBinaryOp('begins', 10); -jsep.addBinaryOp('!begins', 10); -jsep.addBinaryOp('ends', 10); -jsep.addBinaryOp('!ends', 10); - -angular.module('view-form').directive('submitFormDirective', ["$http", "TimeCounter", "$filter", "$rootScope", "SendVisitorData", "$translate", "$timeout", function ($http, TimeCounter, $filter, $rootScope, SendVisitorData, $translate, $timeout) { - return { - templateUrl: 'form_modules/forms/base/views/directiveViews/form/submit-form.client.view.html', - restrict: 'E', - scope: { - myform:'=', - ispreview: '=' - }, - controller: ["$document", "$window", "$scope", function($document, $window, $scope){ - var NOSCROLL = false; - var FORM_ACTION_ID = 'submit_field'; - $scope.forms = {}; - - //Don't start timer if we are looking at a design preview - if($scope.ispreview){ - TimeCounter.restartClock(); - } - - var form_fields_count = $scope.myform.visible_form_fields.filter(function(field){ - return field.fieldType !== 'statement'; - }).length; - - var nb_valid = $filter('formValidity')($scope.myform); - $scope.translateAdvancementData = { - done: nb_valid, - total: form_fields_count, - answers_not_completed: form_fields_count - nb_valid - }; - - $scope.reloadForm = function(){ - //Reset Form - $scope.myform.submitted = false; - $scope.myform.form_fields = _.chain($scope.myform.visible_form_fields).map(function(field){ - field.fieldValue = ''; - return field; - }).value(); - - $scope.loading = false; - $scope.error = ''; - - $scope.selected = { - _id: '', - index: 0 - }; - $scope.setActiveField($scope.myform.visible_form_fields[0]._id, 0, false); - - //Reset Timer - TimeCounter.restartClock(); - }; - - /* - ** Field Controls - */ - var evaluateLogicJump = function(field){ - var logicJump = field.logicJump; - - if(logicJump.enabled){ - if (logicJump.expressionString && logicJump.valueB && field.fieldValue) { - var parse_tree = jsep(logicJump.expressionString); - var left, right; - - if(parse_tree.left.name === 'field'){ - left = field.fieldValue; - right = logicJump.valueB; - } else { - left = logicJump.valueB; - right = field.fieldValue; - } - - if(field.fieldType === 'number' || field.fieldType === 'scale' || field.fieldType === 'rating'){ - switch(parse_tree.operator) { - case '==': - return (parseInt(left) === parseInt(right)); - case '!==': - return (parseInt(left) !== parseInt(right)); - case '>': - return (parseInt(left) > parseInt(right)); - case '>=': - return (parseInt(left) > parseInt(right)); - case '<': - return (parseInt(left) < parseInt(right)); - case '<=': - return (parseInt(left) <= parseInt(right)); - default: - return false; - } - } else { - switch(parse_tree.operator) { - case '==': - return (left === right); - case '!==': - return (left !== right); - case 'contains': - return (left.indexOf(right) > -1); - case '!contains': - /* jshint -W018 */ - return !(left.indexOf(right) > -1); - case 'begins': - return left.startsWith(right); - case '!begins': - return !left.startsWith(right); - case 'ends': - return left.endsWith(right); - case '!ends': - return left.endsWith(right); - default: - return false; - } - } - } - } - }; - - var getActiveField = function(){ - if($scope.selected === null){ - console.error('current active field is null'); - throw new Error('current active field is null'); - } - - if($scope.selected._id === FORM_ACTION_ID) { - return $scope.myform.form_fields.length - 1; - } - return $scope.selected.index; - }; - - $scope.isActiveField = function(field){ - if($scope.selected._id === field._id) { - return true - } - return false; - }; - - $scope.setActiveField = $rootScope.setActiveField = function(field_id, field_index, animateScroll) { - if($scope.selected === null || (!field_id && field_index === null) ) { - return; - } - - if(!field_id){ - field_id = $scope.myform.visible_form_fields[field_index]._id; - } else if(field_index === null){ - field_index = $scope.myform.visible_form_fields.length - - for(var i=0; i < $scope.myform.visible_form_fields.length; i++){ - var currField = $scope.myform.visible_form_fields[i]; - if(currField['_id'] == field_id){ - field_index = i; - break; - } - } - } - - if($scope.selected._id === field_id){ - return; - } - - $scope.selected._id = field_id; - $scope.selected.index = field_index; - - - var nb_valid = $filter('formValidity')($scope.myform); - $scope.translateAdvancementData = { - done: nb_valid, - total: form_fields_count, - answers_not_completed: form_fields_count - nb_valid - }; - - if(animateScroll){ - NOSCROLL=true; - setTimeout(function() { - $document.scrollToElement(angular.element('.activeField'), -10, 200).then(function() { - NOSCROLL = false; - setTimeout(function() { - if (document.querySelectorAll('.activeField .focusOn').length) { - //Handle default case - document.querySelectorAll('.activeField .focusOn')[0].focus(); - } else if(document.querySelectorAll('.activeField input').length) { - //Handle case for rating input - document.querySelectorAll('.activeField input')[0].focus(); - } else { - //Handle case for dropdown input - document.querySelectorAll('.activeField .selectize-input')[0].focus(); - } - }); - }); - }); - } - }; - - $scope.$watch('selected.index', function(oldValue, newValue){ - if(oldValue !== newValue && newValue < $scope.myform.form_fields.length){ - //Only send analytics data if form has not been submitted - if(!$scope.myform.submitted){ - console.log('SendVisitorData.send()'); - SendVisitorData.send($scope.myform, newValue, TimeCounter.getTimeElapsed()); - } - } - }); - - //Fire event when window is scrolled - $window.onscroll = function(){ - if(!NOSCROLL){ - - var scrollTop = $(window).scrollTop(); - var elemBox = document.getElementsByClassName('activeField')[0].getBoundingClientRect(); - var fieldTop = elemBox.top; - var fieldBottom = elemBox.bottom; - - var field_id, field_index; - var elemHeight = $('.activeField').height(); - - var submitSectionHeight = $('.form-actions').height(); - var maxScrollTop = $(document).height() - $(window).height(); - var fieldWrapperHeight = $('form_fields').height(); - - var selector = 'form > .field-directive:nth-of-type(' + String($scope.myform.visible_form_fields.length - 1)+ ')' - var fieldDirectiveHeight = $(selector).height() - var scrollPosition = maxScrollTop - submitSectionHeight - fieldDirectiveHeight*1.2; - - var fractionToJump = 0.9; - - //Focus on field above submit form button - if($scope.selected.index === $scope.myform.visible_form_fields.length){ - if(scrollTop < scrollPosition){ - field_index = $scope.selected.index-1; - $scope.setActiveField(null, field_index, false); - } - } - - //Focus on submit form button - else if($scope.selected.index === $scope.myform.visible_form_fields.length-1 && scrollTop > scrollPosition){ - field_index = $scope.selected.index+1; - $scope.setActiveField(FORM_ACTION_ID, field_index, false); - } - - //If we scrolled bellow the current field, move to next field - else if(fieldBottom < elemHeight * fractionToJump && $scope.selected.index < $scope.myform.visible_form_fields.length-1 ){ - field_index = $scope.selected.index+1; - $scope.setActiveField(null, field_index, false); - } - //If we scrolled above the current field, move to prev field - else if ( $scope.selected.index !== 0 && fieldTop > elemHeight * fractionToJump) { - field_index = $scope.selected.index-1; - $scope.setActiveField(null, field_index, false); - } - } - - $scope.$apply(); - }; - - $rootScope.nextField = $scope.nextField = function(){ - if($scope.selected && $scope.selected.index > -1){ - - if($scope.selected._id !== FORM_ACTION_ID){ - var currField = $scope.myform.visible_form_fields[$scope.selected.index]; - - //Jump to logicJump's destination if it is true - if(currField.logicJump && currField.logicJump.jumpTo && evaluateLogicJump(currField)){ - $scope.setActiveField(currField.logicJump.jumpTo, null, true); - } else if($scope.selected.index < $scope.myform.visible_form_fields.length-1){ - $scope.setActiveField(null, $scope.selected.index+1, true); - } else { - $scope.setActiveField(FORM_ACTION_ID, null, true); - } - } else { - //If we are at the submit actions page, go to the first field - $rootScope.setActiveField(null, 0, true); - } - } else { - //If selected is not defined go to the first field - $rootScope.setActiveField(null, 0, true); - } - - }; - - $rootScope.prevField = $scope.prevField = function(){ - console.log('prevField'); - console.log($scope.selected); - var selected_index = $scope.selected.index - 1; - if($scope.selected.index > 0){ - $scope.setActiveField(null, selected_index, true); - } - }; - - $rootScope.goToInvalid = $scope.goToInvalid = function() { - var field_id = $('.row.field-directive .ng-invalid.focusOn, .row.field-directive .ng-untouched.focusOn:not(.ng-valid)').first().parents('.row.field-directive').first().attr('data-id'); - $scope.setActiveField(field_id, null, true); - }; - - /* - ** Form Display Functions - */ - $scope.exitStartPage = function(){ - $scope.myform.startPage.showStart = false; - if($scope.myform.visible_form_fields.length > 0){ - $scope.selected._id = $scope.myform.visible_form_fields[0]._id; - } - }; - - var getDeviceData = function(){ - var md = new MobileDetect(window.navigator.userAgent); - var deviceType = 'other'; - - if (md.tablet()){ - deviceType = 'tablet'; - } else if (md.mobile()) { - deviceType = 'mobile'; - } else if (!md.is('bot')) { - deviceType = 'desktop'; - } - - return { - type: deviceType, - name: window.navigator.platform - }; - }; - - var getIpAndGeo = function(){ - //Get Ip Address and GeoLocation Data - $.ajaxSetup( { 'async': false } ); - var geoData = $.getJSON('https://freegeoip.net/json/').responseJSON; - $.ajaxSetup( { 'async': true } ); - - if(!geoData || !geoData.ip){ - geoData = { - ip: 'Adblocker' - }; - } - - return { - ipAddr: geoData.ip, - geoLocation: { - City: geoData.city, - Country: geoData.country_name - } - }; - }; - - $rootScope.submitForm = $scope.submitForm = function() { - if($scope.forms.myForm.$invalid){ - $scope.goToInvalid(); - return; - } - - var _timeElapsed = TimeCounter.stopClock(); - $scope.loading = true; - - var form = _.cloneDeep($scope.myform); - - var deviceData = getDeviceData(); - form.device = deviceData; - - var geoData = getIpAndGeo(); - form.ipAddr = geoData.ipAddr; - form.geoLocation = geoData.geoLocation; - - form.timeElapsed = _timeElapsed; - form.percentageComplete = $filter('formValidity')($scope.myform) / $scope.myform.visible_form_fields.length * 100; - delete form.endPage - delete form.isLive - delete form.provider - delete form.startPage - delete form.visible_form_fields; - delete form.analytics; - delete form.design; - delete form.submissions; - delete form.submitted; - for(var i=0; i < $scope.myform.form_fields.length; i++){ - if($scope.myform.form_fields[i].fieldType === 'dropdown' && !$scope.myform.form_fields[i].deletePreserved){ - $scope.myform.form_fields[i].fieldValue = $scope.myform.form_fields[i].fieldValue.option_value; - } - - //Get rid of unnessecary attributes for each form field - delete form.form_fields[i].submissionId; - delete form.form_fields[i].disabled; - delete form.form_fields[i].ratingOptions; - delete form.form_fields[i].fieldOptions; - delete form.form_fields[i].logicJump; - delete form.form_fields[i].description; - delete form.form_fields[i].validFieldTypes; - delete form.form_fields[i].fieldType; - - } - - setTimeout(function () { - $scope.submitPromise = $http.post('/forms/' + $scope.myform._id, form) - .success(function (data, status) { - $scope.myform.submitted = true; - $scope.loading = false; - SendVisitorData.send(form, getActiveField(), _timeElapsed); - }) - .error(function (error) { - $scope.loading = false; - console.error(error); - $scope.error = error.message; - }); - }, 500); - }; - - //Reload our form - $scope.reloadForm(); - }] - }; - } -]); - -'use strict'; - -//Forms service used for communicating with the forms REST endpoints -angular.module('view-form').service('CurrentForm', - function(){ - //Private variables - var _form = {}; - - //Public Methods - this.getForm = function() { - return _form; - }; - this.setForm = function(form) { - _form = form; - }; - } -); - -'use strict'; - -//Forms service used for communicating with the forms REST endpoints -angular.module('view-form').factory('Forms', ["$resource", "VIEW_FORM_URL", function($resource, VIEW_FORM_URL) { - return $resource(VIEW_FORM_URL, { - formId: '@_id' - }, { - 'get' : { - method: 'GET', - transformResponse: function(data, header) { - var form = angular.fromJson(data); - - form.visible_form_fields = _.filter(form.form_fields, function(field){ - return (field.deletePreserved === false); - }); - return form; - } - }, - 'update': { - method: 'PUT' - }, - 'save': { - method: 'POST' - } - }); - } -]); - -(function () { - 'use strict'; - - // Create the Socket.io wrapper service - function Socket($timeout, $window) { - - var service = { - socket: null - }; - - // Connect to TellForm Socket.io server - function connect() { - var url = ''; - if($window.socketUrl && $window.socketPort){ - url = window.location.protocol + '//' + $window.socketUrl + ':' + $window.socketPort; - } else if ($window.socketUrl){ - url = window.location.protocol + '//' + $window.socketUrl; - } else if ($window.socketPort){ - url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort; - } else { - url = window.location.protocol + '//' + window.location.hostname; - } - service.socket = io(url, {'transports': ['websocket', 'polling']}); - } - - // Wrap the Socket.io 'emit' method - function emit(eventName, data) { - if (service.socket) { - service.socket.emit(eventName, data); - } - } - - // Wrap the Socket.io 'on' method - function on(eventName, callback) { - if (service.socket) { - service.socket.on(eventName, function (data) { - $timeout(function () { - callback(data); - }); - }); - } - } - - // Wrap the Socket.io 'removeListener' method - function removeListener(eventName) { - if (service.socket) { - service.socket.removeListener(eventName); - } - } - - connect(); - - service = { - connect: connect, - emit: emit, - on: on, - removeListener: removeListener, - socket: null - }; - - return service; - } - - angular - .module('view-form') - .factory('Socket', Socket); - - Socket.$inject = ["$timeout", "$window"]; - -}()); - -'use strict'; - -angular.module('view-form').service('TimeCounter', function(){ - var _startTime, _endTime = null; - - this.timeSpent = 0; - - this.restartClock = function(){ - _startTime = Date.now(); - _endTime = null; - }; - - this.getTimeElapsed = function(){ - if(_startTime) { - return Math.abs(Date.now().valueOf() - _startTime.valueOf()) / 1000; - } - }; - - this.stopClock = function(){ - if(_startTime && _endTime === null){ - _endTime = Date.now(); - this.timeSpent = Math.abs(_endTime.valueOf() - _startTime.valueOf())/1000; - this._startTime = this._endTime = null; - - return this.timeSpent; - } - return new Error('Clock has not been started'); - }; - - this.clockStarted = function(){ - return !!this._startTime; - }; - - }); - -'use strict'; - -// Setting up route -angular.module('view-form').config(["$stateProvider", function($stateProvider) { - // Forms state routing - $stateProvider. - state('submitForm', { - url: '/forms/:formId', - templateUrl: '/static/form_modules/forms/base/views/submit-form.client.view.html', - resolve: { - Forms: 'Forms', - myForm: ["Forms", "$q", "$state", "$stateParams", function (Forms, $q, $state, $stateParams) { - var deferred = $q.defer(); - - Forms.get({formId: $stateParams.formId}).$promise.then(function(data) { - deferred.resolve(data); - }, function(reason) { - $state.go('unauthorizedFormAccess'); - deferred.reject({redirectTo: 'unauthorizedFormAccess'}); - }); - return deferred.promise; - }] - }, - controller: 'SubmitFormController', - controllerAs: 'ctrl' - }). - state('unauthorizedFormAccess', { - url: '/forms/unauthorized', - templateUrl: '/static/form_modules/forms/base/views/form-unauthorized.client.view.html' - }) - .state('formNotFound', { - url: '*path', - templateUrl: '/static/form_modules/forms/base/views/form-not-found.client.view.html' - }); - } -]); - -(function () { - 'use strict'; - - // Create the SendVisitorData service - angular - .module('view-form') - .factory('SendVisitorData', SendVisitorData); - - SendVisitorData.$inject = ["Socket", "$state"]; - - function SendVisitorData(Socket, $state) { - - // Create a controller method for sending visitor data - function send(form, lastActiveIndex, timeElapsed) { - - var lang = window.navigator.userLanguage || window.navigator.language; - lang = lang.slice(0,2); - - var userAgentString = navigator.userAgent; - var md = new MobileDetect(userAgentString); - var deviceType = 'other'; - - if (md.tablet()){ - deviceType = 'tablet'; - } else if (md.mobile()) { - deviceType = 'mobile'; - } else if (!md.is('bot')) { - deviceType = 'desktop'; - } - - // Create a new message object - var visitorData = { - referrer: document.referrer, - isSubmitted: form.submitted, - formId: form._id, - lastActiveField: form.form_fields[lastActiveIndex]._id, - timeElapsed: timeElapsed, - language: lang, - deviceType: deviceType, - ipAddr: null, - geoLocation: null - }; - - Socket.emit('form-visitor-data', visitorData); - } - - function init(){ - // Make sure the Socket is connected - if (!Socket.socket) { - Socket.connect(); - } - - Socket.on('disconnect', function(){ - Socket.connect(); - }); - } - - var service = { - send: send - }; - - init(); - return service; - - } -}()); - - -'use strict'; - -angular.module('view-form').directive('keyToOption', function(){ - return { - restrict: 'A', - scope: { - field: '=' - }, - link: function($scope, $element, $attrs, $select) { - $element.bind('keydown keypress', function(event) { - - var keyCode = event.which || event.keyCode; - var index = parseInt(String.fromCharCode(keyCode))-1; - - if (index < $scope.field.fieldOptions.length) { - event.preventDefault(); - $scope.$apply(function () { - $scope.field.fieldValue = $scope.field.fieldOptions[index].option_value; - }); - } - - }); - } - }; -}); - -'use strict'; - -angular.module('view-form').directive('keyToTruthy', ["$rootScope", function($rootScope){ - return { - restrict: 'A', - scope: { - field: '=', - nextField: '&' - }, - link: function($scope, $element, $attrs) { - $element.bind('keydown keypress', function(event) { - var keyCode = event.which || event.keyCode; - var truthyKeyCode = $attrs.keyCharTruthy.charCodeAt(0) - 32; - var falseyKeyCode = $attrs.keyCharFalsey.charCodeAt(0) - 32; - - if(keyCode === truthyKeyCode ) { - event.preventDefault(); - $scope.$apply(function() { - $scope.field.fieldValue = 'true'; - if($attrs.onValidKey){ - $scope.$root.$eval($attrs.onValidKey); - } - }); - }else if(keyCode === falseyKeyCode){ - event.preventDefault(); - $scope.$apply(function() { - $scope.field.fieldValue = 'false'; - if($attrs.onValidKey){ - $scope.$root.$eval($attrs.onValidKey); - } - }); - } - }); - } - }; -}]); - - -'use strict'; - -// Use Application configuration module to register a new module -ApplicationConfiguration.registerModule('view-form', [ - 'ngFileUpload', 'ui.date', 'angular-input-stars' -]); diff --git a/public/dist/application.min.css b/public/dist/application.min.css deleted file mode 100644 index 154a78c9..00000000 --- a/public/dist/application.min.css +++ /dev/null @@ -1,4 +0,0 @@ -.navbar,.navbar-nav,.navbar-nav>li{min-height:60px}.image-background,.opacity-background{position:fixed;height:100%;width:100%;top:0;left:0}.config-form,.form-item.create-new input{max-width:100%}.btn-rounded,.field-title-row,section.auth .btn{text-transform:uppercase}.form-item .title-row>.list-group-item-heading{color:#34628a}.form-item.paused .title-row>.list-group-item-heading,.form-item:hover .title-row>.list-group-item-heading{color:#fff}.form-item:hover .title-row{text-decoration:none}body{overflow-x:hidden;font-family:'Source Sans Pro',sans-serif;font-size:16px}.vcenter{display:inline-block;vertical-align:middle;float:none}.btn-rounded{border-radius:100px;font-size:14px;padding:10px 28px;margin:1em 2px 0;text-decoration:none!important}.current-fields .panel-heading a:hover,.current-fields .tool-panel.panel .panel-heading a:hover,.footer-basic-centered .footer-links a,.undecorated-link:hover{text-decoration:none}.btn-secondary{background:#DDD;color:#4c4c4c;border:2px solid #4c4c4c}.btn-secondary:hover{background:#cacaca;border-color:#cacaca}.navbar{padding:10px 0}.navbar-inverse{background-color:#3FA2F7;border:0;color:#fff!important}.navbar .navbar-brand{min-height:60px;padding:10px}.navbar-nav>li>a{padding-top:20px;color:#fff}.navbar-nav>li.active,.navbar-nav>li:hover{background-color:#4b7096}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{background-color:transparent;color:inherit;border:none}.navbar-inverse .navbar-nav>li>a{color:#fff}.navbar li.dropdown a.dropdown-toggle:hover>*{color:#f9f9f9}.navbar-inverse .navbar-toggle{border:none}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none!important}.dropdown-menu>li>a{color:#515151}section.hero-section{width:100%}section.hero-section .jumbotron{background-color:transparent;color:#fff}.image-background{z-index:-98;background-image:url(http://yourplaceandmine.ie/wp-content/uploads/2014/09/Daingean-meeting-048_13-1080x675.jpg);background-repeat:no-repeat;background-position:0 50%;background-size:cover}.opacity-background{background-color:#000;background-color:rgba(0,0,0,.5);z-index:-97}section.hero-section .jumbotron .signup-btn{background-color:#FA787E;border:none;font-size:2em;padding:.3em .9em;color:#fff}.footer-basic-centered{background-color:#292c2f;box-shadow:0 1px 1px 0 rgba(0,0,0,.12);box-sizing:border-box;width:100%;text-align:center;font:400 18px sans-serif;padding:45px;margin-top:80px}.footer-basic-centered .footer-company-motto{color:#8d9093;font-size:24px;margin:0}.footer-basic-centered .footer-company-name{color:#8f9296;font-size:14px;margin:0}.footer-basic-centered .footer-links{list-style:none;font-weight:700;color:#fff;padding:35px 0 23px;margin:0}.footer-basic-centered .footer-links a{display:inline-block;color:inherit}@media (max-width:600px){.footer-basic-centered{padding:35px}.footer-basic-centered .footer-company-motto{font-size:18px}.footer-basic-centered .footer-company-name{font-size:12px}.footer-basic-centered .footer-links{font-size:14px;padding:25px 0 20px}.footer-basic-centered .footer-links a{line-height:1.8}}/*! - * "Fork me on GitHub" CSS ribbon v0.1.1 | MIT License - * https://github.com/simonwhitaker/github-fork-ribbon-css -*/.github-fork-ribbon{position:absolute;padding:2px 0;background-color:#a00;background-image:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,0)),to(rgba(0,0,0,.15)));background-image:-webkit-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:-moz-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:-ms-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:-o-linear-gradient(top,rgba(0,0,0,0),rgba(0,0,0,.15));background-image:linear-gradient(to bottom,rgba(0,0,0,0),rgba(0,0,0,.15));-webkit-box-shadow:0 2px 3px 0 rgba(0,0,0,.5);-moz-box-shadow:0 2px 3px 0 rgba(0,0,0,.5);box-shadow:0 2px 3px 0 rgba(0,0,0,.5);font:700 13px "Helvetica Neue",Helvetica,Arial,sans-serif;z-index:9999;pointer-events:auto}.github-fork-ribbon a,.github-fork-ribbon a:hover{color:#fff;text-decoration:none;text-shadow:0 -1px rgba(0,0,0,.5);text-align:center;width:200px;line-height:20px;display:inline-block;padding:2px 0;border-width:1px 0;border-style:dotted;border-color:#fff;border-color:rgba(255,255,255,.7)}.github-fork-ribbon-wrapper{width:150px;height:150px;position:absolute;overflow:hidden;top:0;z-index:9998;pointer-events:none}.github-fork-ribbon-wrapper.fixed{position:fixed}.github-fork-ribbon-wrapper.left{left:0}.github-fork-ribbon-wrapper.right{right:0}.github-fork-ribbon-wrapper.left-bottom{position:fixed;top:inherit;bottom:0;left:0}.github-fork-ribbon-wrapper.right-bottom{position:fixed;top:inherit;bottom:0;right:0}.github-fork-ribbon-wrapper.right .github-fork-ribbon{top:42px;right:-43px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.github-fork-ribbon-wrapper.left .github-fork-ribbon{top:42px;left:-43px;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.github-fork-ribbon-wrapper.left-bottom .github-fork-ribbon{top:80px;left:-43px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg)}.github-fork-ribbon-wrapper.right-bottom .github-fork-ribbon{top:80px;right:-43px;-webkit-transform:rotate(-45deg);-moz-transform:rotate(-45deg);-ms-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg)}.custom-select{position:relative;display:block;padding:0}.custom-select select{width:100%;margin:0;background:0 0;border:1px solid transparent;border-radius:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;appearance:none;-webkit-appearance:none;-moz-appearance:none;font-size:1em;font-family:helvetica,sans-serif;font-weight:700;color:#444;padding:.6em 1.9em .5em .8em;line-height:1.3}.custom-select option,.modal-header{font-weight:400}.custom-select::after{content:"";position:absolute;width:9px;height:8px;top:50%;right:1em;margin-top:-4px;background-image:url(http://filamentgroup.com/files/select-arrow.png);background-repeat:no-repeat;background-size:100%;z-index:2;pointer-events:none}.custom-select:hover{border:1px solid #888}.custom-select select:focus{outline:0;box-shadow:0 0 1px 3px rgba(180,222,250,1);background-color:transparent;color:#222;border:1px solid #aaa}.custom-select::after,x:-o-prefocus{display:none}@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){.custom-select select::-ms-expand{display:none}.custom-select select:focus::-ms-value{background:0 0;color:#222}}.custom-select select:-moz-focusring{color:transparent;text-shadow:0 0 0 #000}.pull-top{display:inline-block;vertical-align:top;float:none}.nav.nav-pills.nav-stacked,div.tab-content{position:relative;min-height:1px;float:left}.box{padding:0 5px!important}.current-fields .field-row{padding:5px 0}.current-fields .panel{background-color:#f1f1f1;margin-top:0!important}.current-fields .panel:hover{background-color:#fff;cursor:pointer}.current-fields .panel.tool-panel{background-color:#fff}.current-fields .panel-heading{background-color:#f1f1f1;position:relative}.current-fields .panel-heading:hover{background-color:#fff;cursor:pointer}.current-fields .tool-panel.panel:hover{border-color:#9d9d9d;background-color:#eee;cursor:pointer}.current-fields .tool-panel.panel:hover .panel-heading{background-color:inherit;color:#000;cursor:pointer}.current-fields .tool-panel.panel .panel-heading{background-color:#fff;color:#9d9d9d}.current-fields .tool-panel.panel .panel-heading a{color:inherit}.nav.nav-pills.nav-stacked{width:16.66666667%;padding-right:15px}div.tab-content{width:83.33333333%;padding-top:0!important}.panel-default.startPage{border-style:dashed;border-color:#a9a9a9;border-width:3px}.busy-updating-wrapper{text-align:center;font-size:20px;position:fixed;bottom:0;right:55px;z-index:1}.busy-submitting-wrapper{position:fixed;top:50%;left:0;right:0;bottom:0}.dropzone h4.panel-title{height:17px;overflow:hidden}.container.admin-form{margin-top:70px}.edit-modal-window .modal-dialog{width:90%}.edit-modal-window .modal-body{padding:0}.edit-modal-window .edit-panel{background-color:#F1F1F1;padding:0 35px}.edit-modal-window .preview-field-panel{display:flex;flex-direction:column;justify-content:center}.edit-modal-window .preview-field-panel form{padding-right:20px}.edit-modal-window .preview-field{resize:vertical}.admin-form .ui-sortable-placeholder{visibility:visible!important;border:none;padding:1px;background:rgba(0,0,0,.5)!important}.config-form>.row{padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}div.config-form .row.field{padding-top:1.5em}div.config-form>.row>.container:nth-of-type(odd){border-right:1px #ddd solid}div.config-form.design>.row>.container:nth-of-type(odd){border-right:none}div.config-form .row>.field-input{padding-left:.1em}div.config-form .row>.field-input label{padding-left:1.3em;display:block}.admin-form>.page-header{padding-bottom:0;margin-bottom:40px}.admin-form>.page-header h1{margin-bottom:0;margin-top:0}.admin-form>.page-header>.col-xs-3{padding-top:1.4em}.admin-form .form-controls .row{padding:5px}.admin-form .page-header{border:none;margin-top:none;margin-bottom:none}.admin-form .tab-content{padding-top:3em}.submissions-table .table-outer.row{margin:1.5em 0 2em!important}.submissions-table .table-outer .col-xs-12{padding-left:0!important;border:1px solid #ddd;overflow-x:scroll;border-radius:3px}.submissions-table .table>thead>tr>th{min-width:8em}.submissions-table .table>tbody>tr.selected{background-color:#efefef}.admin-form .add-field{background-color:#ddd;padding:0 2%;border-radius:3px}.admin-form .add-field .col-xs-6{padding:.25em .4em}.admin-form .add-field .col-xs-6 .panel-heading{border-width:1px;border-style:solid;border-color:#bbb;border-radius:4px}.admin-form .oscar-field-select{margin:10px 0}.view-form-btn.span{padding-right:.6em}.status-light.status-light-off{color:#BE0000}.status-light.status-light-on{color:#3C0}.analytics .header-title{font-size:1em;color:#bab8b8}.analytics .header-numbers{font-size:4em;padding-bottom:.1em;margin-bottom:.5em;border-bottom:#fafafa solid 1px}.analytics .detailed-title{font-size:1.8em;margin-bottom:1.1em}.analytics .detailed-row{padding-bottom:.8em}.analytics .detailed-row .row{font-size:1.2em}.analytics .detailed-row .row.header{font-size:.8em;color:#bab8b8;text-transform:uppercase}.field-title-row{padding-top:2em;padding-bottom:1em;border-top:#fafafa solid 1px;font-size:1.2em;color:#bab8b8}.field-detailed-row{font-size:1.2em;padding-bottom:.3em}.table-tools{border-top:#fafafa solid 1px;padding-top:2.5em}.overlay{position:fixed;top:0;left:0;height:100%;width:100%;background-color:#000;background-color:rgba(0,0,0,.5);z-index:10}.overlay.submitform{background-color:#fff;background-color:rgba(256,256,256,.8)}.public-form.preview{border:none;box-shadow:0 0 10px 0 grey;overflow-y:scroll;overflow-x:hidden;height:400px;width:90%;position:absolute}.public-form input,.public-form textarea{background-color:#000;background-color:rgba(0,0,0,0);border-width:0}form .btn{border-color:grey}.public-form input.ng-untouched,.public-form input:focus,.public-form textarea.ng-untouched,.public-form textarea:focus{border-width:0 0 2px;border-color:rgba(246,255,181,.4);outline:0}.public-form input.ng-dirty,.public-form textarea.ng-dirty{border-width:0}.public-form input.empty,.public-form textarea.empty{border-width:0 0 2px;border-color:rgba(246,255,181,.4)}section.content p.breakwords{word-break:break-all}.public-form .btn[type=submit]{font-size:1.5em;padding:.35em 1.2em}section.content>section>section.container{margin-top:70px}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5;font-size:18px}.public-form .input-block{display:block;width:100%}.modal-footer input[type=text]{min-height:34px;padding:7px 8px;font-size:13px;color:#333;vertical-align:middle;background-color:#fff;background-repeat:no-repeat;background-position:right 8px center;border:1px solid #ccc;border-radius:3px;box-shadow:inset 0 1px 2px rgba(0,0,0,.075)}.modal-body>.modal-body-alert{color:#796620;background-color:#f8eec7;border-color:#f2e09a;margin:-16px -15px 15px;padding:10px 15px;border-style:solid;border-width:1px 0}div.form-fields{position:relative;padding-top:10%}.public-form .letter{position:relative;display:-moz-inline-stack;display:inline-block;vertical-align:top;zoom:1;width:16px;padding:0;height:17px;font-size:12px;line-height:19px;border:1px solid #000;border:1px solid rgba(0,0,0,.2);margin-right:7px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;text-align:center;font-weight:700}div.form-submitted>.field.row{padding-bottom:2%;margin-top:10%}div.form-submitted>.field.row>div{font-size:1.7em}form .accordion-edit{width:inherit}.ui-datepicker.ui-widget{z-index:99!important}form .row.field .field-number{margin-right:.5em}form .row.field{padding:1em 0 0;width:inherit}form .row.field>.field-title{margin-top:.5em;font-size:1.2em;padding-bottom:.5em;width:inherit}form .row.field>.field-input{font-size:1.4em;color:#777}form.submission-form .row.field.statement>.field-title{font-size:1.7em}form.submission-form .row.field.statement>.field-input{font-size:1em;color:#ddd}form.submission-form .select.radio>.field-input input,form.submission-form .select>.field-input input{width:20%}form.submission-form .field.row.radio .btn.activeBtn{background-color:#000!important;background-color:rgba(0,0,0,.7)!important;color:#fff}form.submission-form .field.row.radio .btn{margin-right:1.2em}form.submission-form .select>.field-input .btn{text-align:left;margin-bottom:.7em}form.submission-form .select>.field-input .btn>span{font-size:1.1em}form .field-input>textarea{padding:.45em .9em;width:100%;line-height:160%}form .field-input>input.hasDatepicker{padding:.45em .9em;width:50%;line-height:160%}form .field-input>input.text-field-input{padding:.45em .9em;width:100%;line-height:160%}form .required-error{color:#ddd;font-size:.8em}form .row.field.dropdown>.field-input input{min-height:34px;border-width:0 0 2px;border-radius:5px}form .row.field.dropdown>.field-input input:focus{border:none}form .dropdown>.field-input .ui-select-choices-row-inner{border-radius:3px;margin:5px;padding:10px;background-color:#000;background-color:rgba(0,0,0,.05)}form .dropdown>.field-input .ui-select-choices-row-inner.active,form .dropdown>.field-input .ui-select-choices-row-inner.active:focus{background-color:#000;background-color:rgba(0,0,0,.1)}.current-fields .panel-body .row.description textarea,.current-fields .panel-body .row.question input[type=text]{width:100%}.current-fields .panel-body .row.options input[type=text]{width:80%}.ui-select-choices.ui-select-dropdown{top:2.5em!important}.ui-select-toggle{box-shadow:none!important;border:none!important}section.public-form field-directive .btn.btn-lg.btn-default{background:0 0}section.public-form field-directive .btn[disabled]{display:none}.form-item{border-radius:5px;text-align:center;width:180px;position:relative;height:215px;margin-bottom:45px}.form-item.paused{background-color:red;color:#fff}.form-item.paused:hover{background-color:#8b0000;color:#fff}.form-item.create-new input[type=text]{width:inherit;color:#000;border:none}.form-item.create-new{background-color:#3FA2F7;color:#fff}.form-item.new-form{background-color:#ff8383;z-index:11}.form-item.new-form:hover{background-color:#3079b5}.form-item.new-form input[type=text]{margin-top:.2em;width:inherit;color:#000;border:none;padding:.3em .6em}.form-item.new-form .custom-select{margin-top:.2em}.form-item.new-form .custom-select select{background-color:#fff}.form-item.new-form .details-row{margin-top:1em}.form-item.new-form .details-row.submit{margin-top:1.7em}.form-item.new-form .details-row.submit .btn{font-size:.95em}.form-item.new-form .title-row{margin-top:1em;top:0}.field-directive{opacity:.2;padding:2.5% 10%}.field-directive.activeField,.form-field-wrapper .form-actions.activeField{opacity:1}h3.forms-list-title{color:#3FA2F7;font-weight:600;margin-bottom:3em}.form-item{color:#71AADD;background-color:#E4F1FD}.form-item:hover{background-color:#3FA2F7;color:#23527C}.form-item.create-new:hover{color:#fff;background-color:#515151}.form-item>.row.footer{position:absolute;bottom:0;left:30%}.form-item .title-row{position:relative;top:15px;padding-top:3em;padding-bottom:1em}.form-item .title-row h4{font-size:1.3em}.form-item.create-new .title-row{padding:0}.form-item.create-new .title-row h4{font-size:7em}.form-item.create-new.new-button .details-row{padding-top:20%}.form-item .details-row small{font-size:.6em}.form-item.create-new .details-row small{font-size:.95em}section.auth{padding:70px 0;position:absolute;min-height:100%;top:0;left:0;width:100%;color:#fff;background-color:#50B5C1;background:-moz-linear-gradient(137deg,#50B5C1 0,#6450A0 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#50B5C1),color-stop(100%,#6450A0));background:-webkit-linear-gradient(137deg,#50B5C1 0,#6450A0 100%);background:-o-linear-gradient(137deg,#50B5C1 0,#6450A0 100%);background:-ms-linear-gradient(137deg,#50B5C1 0,#6450A0 100%)}section.auth>h3{font-size:2em;font-weight:500}.valign-wrapper{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.valign-wrapper .valign{display:block;width:100%}section.auth a{color:#fff;text-decoration:underline}section.auth.signup-view>h3{font-size:3em;padding-bottom:.5em}section.auth form .field-input select{padding:.45em .9em;width:100%;background:0 0;font-size:16px;border:1px solid #ccc;min-height:34px}section.auth input{color:#4c4c4c}section.auth .btn{border-radius:100px;font-size:14px;padding:12px 28px;margin-top:1em}.btn-rounded.btn-signup{background-color:#FFD747;color:#896D0B;border:2px solid #FFD747}.btn-rounded.btn-signup:hover{color:#FFD747;background-color:#896D0B;border:2px solid #896D0B}.btn-rounded.btn-default{background-color:transparent;color:#fff;border:2px solid #fff}.btn-rounded.btn-default:focus,.btn-rounded.btn-default:hover{color:#6450A0;background-color:#fff;border-color:#fff}@media (min-width:992px){.nav-users{position:fixed}}.remove-account-container{display:inline-block;position:relative}.btn-remove-account{top:10px;right:10px;position:absolute}section.auth input.form-control{min-height:30px!important;border:none}input.form-control{height:auto;border-radius:4px;box-shadow:none;font-size:18px;padding:20px 10px} \ No newline at end of file diff --git a/public/dist/application.min.js b/public/dist/application.min.js deleted file mode 100644 index 26eeac55..00000000 --- a/public/dist/application.min.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";angular.module(ApplicationConfiguration.applicationModuleName,ApplicationConfiguration.applicationModuleVendorDependencies),angular.module(ApplicationConfiguration.applicationModuleName).config(["$locationProvider",function(a){a.hashPrefix("!")}]),angular.module(ApplicationConfiguration.applicationModuleName).constant("APP_PERMISSIONS",{viewAdminSettings:"viewAdminSettings",editAdminSettings:"editAdminSettings",editForm:"editForm",viewPrivateForm:"viewPrivateForm"}),angular.module(ApplicationConfiguration.applicationModuleName).constant("USER_ROLES",{admin:"admin",normal:"user",superuser:"superuser"}),angular.module(ApplicationConfiguration.applicationModuleName).constant("FORM_URL","/forms/:formId"),angular.element(document).ready(function(){"#_=_"===window.location.hash&&(window.location.hash="#!"),angular.bootstrap(document,[ApplicationConfiguration.applicationModuleName])});var ApplicationConfiguration=function(){var a="TellForm",b=["duScroll","ui.select","ngSanitize","vButton","ngResource","TellForm.templates","ui.router","ui.bootstrap","ui.utils","pascalprecht.translate","view-form"],c=function(b,c){angular.module(b,c||[]),angular.module(a).requires.push(b)};return{applicationModuleName:a,applicationModuleVendorDependencies:b,registerModule:c}}();angular.module("view-form").filter("formValidity",function(){return function(a){if(a&&a.form_fields&&a.visible_form_fields){var b=Object.keys(a),c=(b.filter(function(a){return"$"!==a[0]}),a.form_fields),d=c.filter(function(a){return"object"==typeof a&&"rating"!==a.fieldType&&"statement"!==a.fieldType?!!a.fieldValue:"rating"===a.fieldType||void 0}).length;return d-(a.form_fields.length-a.visible_form_fields.length)}return 0}}),angular.module("view-form").value("supportedFields",["textfield","textarea","date","dropdown","hidden","password","radio","legal","statement","rating","yes_no","number","natural"]),angular.module("view-form").constant("VIEW_FORM_URL","/forms/:formId/render"),angular.module("view-form").config(["$translateProvider",function(a){a.translations("en",{FORM_SUCCESS:"Form entry successfully submitted!",REVIEW:"Review",BACK_TO_FORM:"Go back to Form",EDIT_FORM:"Edit this TellForm",CREATE_FORM:"Create this TellForm",ADVANCEMENT:"{{done}} out of {{total}} answered",CONTINUE_FORM:"Continue to Form",REQUIRED:"required",COMPLETING_NEEDED:"{{answers_not_completed}} answer(s) need completing",OPTIONAL:"optional",ERROR_EMAIL_INVALID:"Please enter a valid email address",ERROR_NOT_A_NUMBER:"Please enter valid numbers only",ERROR_URL_INVALID:"Please a valid url",OK:"OK",ENTER:"press ENTER",YES:"Yes",NO:"No",NEWLINE:"press SHIFT+ENTER to create a newline",CONTINUE:"Continue",LEGAL_ACCEPT:"I accept",LEGAL_NO_ACCEPT:"I don’t accept",DELETE:"Delete",CANCEL:"Cancel",SUBMIT:"Submit",UPLOAD_FILE:"Upload your File",Y:"Y",N:"N",OPTION_PLACEHOLDER:"Type or select an option",ADD_NEW_LINE_INSTR:"Press SHIFT+ENTER to add a newline",ERROR:"Error",FORM_404_HEADER:"404 - Form Does Not Exist",FORM_404_BODY:"The form you are trying to access does not exist. Sorry about that!",FORM_UNAUTHORIZED_HEADER:"Not Authorized to Access Form",FORM_UNAUTHORIZED_BODY1:"The form you are trying to access is currently private and not accesible publically.",FORM_UNAUTHORIZED_BODY2:'If you are the owner of the form, you can set it to "Public" in the "Configuration" panel in the form admin.'}),a.preferredLanguage("en").fallbackLanguage("en").useSanitizeValueStrategy("escape")}]),angular.module("view-form").config(["$translateProvider",function(a){a.translations("fr",{FORM_SUCCESS:"Votre formulaire a été enregistré!",REVIEW:"Incomplet",BACK_TO_FORM:"Retourner au formulaire",EDIT_FORM:"Éditer le Tellform",CREATE_FORM:"Créer un TellForm",ADVANCEMENT:"{{done}} complétés sur {{total}}",CONTINUE_FORM:"Aller au formulaire",REQUIRED:"obligatoire",COMPLETING_NEEDED:"{{answers_not_completed}} réponse(s) doive(nt) être complétée(s)",OPTIONAL:"facultatif",ERROR_EMAIL_INVALID:"Merci de rentrer une adresse mail valide",ERROR_NOT_A_NUMBER:"Merce de ne rentrer que des nombres",ERROR_URL_INVALID:"Merci de rentrer une url valide",OK:"OK",ENTER:"presser ENTRÉE",YES:"Oui",NO:"Non",NEWLINE:"presser SHIFT+ENTER pour créer une nouvelle ligne",CONTINUE:"Continuer",LEGAL_ACCEPT:"J’accepte",LEGAL_NO_ACCEPT:"Je n’accepte pas",DELETE:"Supprimer",CANCEL:"Réinitialiser",SUBMIT:"Enregistrer",UPLOAD_FILE:"Envoyer un fichier",Y:"O",N:"N",OPTION_PLACEHOLDER:"Tapez ou sélectionnez une option",ADD_NEW_LINE_INSTR:"Appuyez sur MAJ + ENTRÉE pour ajouter une nouvelle ligne",ERROR:"Erreur",FORM_404_HEADER:"404 - Le formulaire n'existe pas",FORM_404_BODY:"Le formulaire auquel vous essayez d'accéder n'existe pas. Désolé pour ça!",FORM_UNAUTHORIZED_HEADER:"Non autorisé à accéder au formulaire",FORM_UNAUTHORIZED_BODY1:"Le formulaire auquel vous essayez d'accéder est actuellement privé et inaccessible publiquement.",FORM_UNAUTHORIZED_BODY2:'Si vous êtes le propriétaire du formulaire, vous pouvez le définir sur "Public" dans le panneau "Configuration" du formulaire admin.'})}]),angular.module("view-form").config(["$translateProvider",function(a){a.translations("de",{FORM_SUCCESS:"Ihre Angaben wurden gespeichert.",REVIEW:"Unvollständig",BACK_TO_FORM:"Zurück zum Formular",EDIT_FORM:"Bearbeiten Sie diese TellForm",CREATE_FORM:"Dieses TellForm erstellen",ADVANCEMENT:"{{done}} von {{total}} beantwortet",CONTINUE_FORM:"Zum Formular",REQUIRED:"verpflichtend",COMPLETING_NEEDED:"Es fehlen/fehtl noch {{answers_not_completed}} Antwort(en)",OPTIONAL:"fakultativ",ERROR_EMAIL_INVALID:"Bitte gültige Mailadresse eingeben",ERROR_NOT_A_NUMBER:"Bitte nur Zahlen eingeben",ERROR_URL_INVALID:"Bitte eine gültige URL eingeben",OK:"Okay",ENTER:"Eingabetaste drücken",YES:"Ja",NO:"Nein",NEWLINE:"Für eine neue Zeile SHIFT+ENTER drücken",CONTINUE:"Weiter",LEGAL_ACCEPT:"I accept",LEGAL_NO_ACCEPT:"I don’t accept",DELETE:"Entfernen",CANCEL:"Canceln",SUBMIT:"Speichern",UPLOAD_FILE:"Datei versenden",Y:"J",N:"N",OPTION_PLACEHOLDER:"Geben oder wählen Sie eine Option aus",ADD_NEW_LINE_INSTR:"Drücken Sie UMSCHALT + EINGABETASTE, um eine neue Zeile hinzuzufügen",ERROR:"Fehler",FORM_404_HEADER:"404 - Formular existiert nicht",FORM_404_BODY:"Das Formular, auf das Sie zugreifen möchten, existiert nicht. Das tut mir leid!",FORM_UNAUTHORIZED_HEADER:"Nicht zum Zugriffsformular berechtigt' ",FORM_UNAUTHORIZED_BODY1:"Das Formular, auf das Sie zugreifen möchten, ist derzeit privat und nicht öffentlich zugänglich.",FORM_UNAUTHORIZED_BODY2:'Wenn Sie der Eigentümer des Formulars sind, können Sie es im Fenster "Konfiguration" im Formular admin auf "Öffentlich" setzen.'})}]),angular.module("view-form").config(["$translateProvider",function(a){a.translations("it",{FORM_SUCCESS:"Il formulario è stato inviato con successo!",REVIEW:"Incompleto",BACK_TO_FORM:"Ritorna al formulario",EDIT_FORM:"Modifica questo TellForm",CREATE_FORM:"Crea questo TellForm",ADVANCEMENT:"{{done}} su {{total}} completate",CONTINUE_FORM:"Vai al formulario",REQUIRED:"obbligatorio",COMPLETING_NEEDED:"{{answers_not_completed}} risposta/e deve/ono essere completata/e",OPTIONAL:"opzionale",ERROR_EMAIL_INVALID:"Si prega di inserire un indirizzo email valido",ERROR_NOT_A_NUMBER:"Si prega di inserire solo numeri",ERROR_URL_INVALID:"Grazie per inserire un URL valido",OK:"OK",ENTER:"premere INVIO",YES:"Sì",NO:"No",NEWLINE:"premere SHIFT+INVIO per creare una nuova linea",CONTINUE:"Continua",LEGAL_ACCEPT:"I accept",LEGAL_NO_ACCEPT:"I don’t accept",DELETE:"Cancella",CANCEL:"Reset",SUBMIT:"Registra",UPLOAD_FILE:"Invia un file",Y:"S",N:"N",OPTION_PLACEHOLDER:"Digitare o selezionare un'opzione",ADD_NEW_LINE_INSTR:"Premere SHIFT + INVIO per aggiungere una nuova riga",ERROR:"Errore",FORM_404_HEADER:"404 - Il modulo non esiste",FORM_404_BODY:"La forma che stai cercando di accedere non esiste. Ci dispiace!",FORM_UNAUTHORIZED_HEADER:"Non autorizzato per accedere al modulo",FORM_UNAUTHORIZED_BODY1:"Il modulo che si sta tentando di accedere è attualmente privato e non accessibile in pubblico.",FORM_UNAUTHORIZED_BODY2:'Se sei il proprietario del modulo, puoi impostarlo su "Pubblico" nel pannello "Configurazione" nell\'amministratore di moduli.'})}]),angular.module("view-form").config(["$translateProvider",function(a){a.translations("es",{FORM_SUCCESS:"¡El formulario ha sido enviado con éxito!",REVIEW:"Revisar",BACK_TO_FORM:"Regresar al formulario",EDIT_FORM:"Editar este TellForm",CREATE_FORM:"Crear este TellForm",ADVANCEMENT:"{{done}} de {{total}} contestadas",CONTINUE_FORM:"Continuar al formulario",REQUIRED:"Información requerida",COMPLETING_NEEDED:"{{answers_not_completed}} respuesta(s) necesita(n) ser completada(s)",OPTIONAL:"Opcional",ERROR_EMAIL_INVALID:"Favor de proporcionar un correo electrónico válido",ERROR_NOT_A_NUMBER:"Por favor, introduzca sólo números válidos",ERROR_URL_INVALID:"Favor de proporcionar un url válido",OK:"OK",ENTER:"pulse INTRO",YES:"Si",NO:"No",NEWLINE:"presione SHIFT+INTRO para crear una nueva línea",CONTINUE:"Continuar",LEGAL_ACCEPT:"Yo acepto",LEGAL_NO_ACCEPT:"Yo no acepto",DELETE:"Eliminar",CANCEL:"Cancelar",SUBMIT:"Registrar",UPLOAD_FILE:"Cargar el archivo",Y:"S",N:"N",OPTION_PLACEHOLDER:"Escriba o seleccione una opción",ADD_NEW_LINE_INSTR:"Presione MAYÚS + ENTRAR para agregar una nueva línea",ERROR:"Error",FORM_404_HEADER:"404 - La forma no existe",FORM_404_BODY:"El formulario al que intenta acceder no existe. ¡Lo siento por eso!",FORM_UNAUTHORIZED_HEADER:"Non autorizzato per accedere al modulo",FORM_UNAUTHORIZED_BODY1:"Il modulo che si sta tentando di accedere è attualmente privato e non accessibile in pubblico.",FORM_UNAUTHORIZED_BODY2:'Se sei il proprietario del modulo, puoi impostarlo su "Pubblico" nel pannello "Configurazione" nell\'amministratore di moduli.'})}]),angular.module("view-form").controller("SubmitFormController",["$scope","$rootScope","$state","$translate","myForm",function(a,b,c,d,e){a.myform=e,$(".loader").fadeOut("slow"),document.body.style.background=e.design.colors.backgroundColor,d.use(e.language)}]),angular.module("view-form").directive("fieldIconDirective",function(){return{template:'',restrict:"E",scope:{typeName:"@"},controller:["$scope",function(a){var b={textfield:"fa fa-pencil-square-o",dropdown:"fa fa-th-list",date:"fa fa-calendar",checkbox:"fa fa-check-square-o",radio:"fa fa-dot-circle-o",email:"fa fa-envelope-o",textarea:"fa fa-pencil-square",legal:"fa fa-legal",file:"fa fa-cloud-upload",rating:"fa fa-star-half-o",link:"fa fa-link",scale:"fa fa-sliders",stripe:"fa fa-credit-card",statement:"fa fa-quote-left",yes_no:"fa fa-toggle-on",number:"fa fa-slack"};a.typeIcon=b[a.typeName]}]}});var __indexOf=[].indexOf||function(a){for(var b=0,c=this.length;b=0&&(c=c+b+".html"),d.get(c)};return{template:"
{{field.title}}
",restrict:"E",scope:{field:"=",required:"&",design:"=",index:"=",forms:"="},link:function(a,d){c.chooseDefaultOption=a.chooseDefaultOption=function(b){"yes_no"===b?a.field.fieldValue="true":"rating"===b?a.field.fieldValue=0:"radio"===a.field.fieldType?a.field.fieldValue=a.field.fieldOptions[0].option_value:"legal"===b&&(a.field.fieldValue="true",c.nextField())},a.nextField=c.nextField,a.setActiveField=c.setActiveField,"date"===a.field.fieldType&&(a.dateOptions={changeYear:!0,changeMonth:!0,altFormat:"mm/dd/yyyy",yearRange:"1900:-0",defaultDate:0});var e=a.field.fieldType;if("number"===a.field.fieldType||"textfield"===a.field.fieldType||"email"===a.field.fieldType||"link"===a.field.fieldType){switch(a.field.fieldType){case"textfield":a.input_type="text";break;case"email":a.input_type="email",a.placeholder="joesmith@example.com";break;case"number":a.input_type="text",a.validateRegex=/^-?\d+$/;break;default:a.input_type="url",a.placeholder="http://example.com"}e="textfield"}var g=f(e);d.html(g).show();b(d.contents())(a)}}}]),angular.module("view-form").directive("onEnterKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keydown keypress",function(b){var c=b.which||b.keyCode,e=!1;null!==d.onEnterKeyDisabled&&(e=d.onEnterKeyDisabled),13!==c||b.shiftKey||e||(b.preventDefault(),a.$apply(function(){a.$eval(d.onEnterKey)}))})}}}]).directive("onTabKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keyup keypress",function(b){var c=b.which||b.keyCode;9!==c||b.shiftKey||(b.preventDefault(),a.$apply(function(){a.$eval(d.onTabKey)}))})}}}]).directive("onEnterOrTabKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keydown keypress",function(b){var c=b.which||b.keyCode;13!==c&&9!==c||b.shiftKey||(b.preventDefault(),a.$apply(function(){a.$eval(d.onEnterOrTabKey)}))})}}}]).directive("onTabAndShiftKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keydown keypress",function(b){var c=b.which||b.keyCode;9===c&&b.shiftKey&&(console.log("onTabAndShiftKey"),b.preventDefault(),a.$apply(function(){a.$eval(d.onTabAndShiftKey)}))})}}}]),angular.module("view-form").directive("onFinishRender",["$rootScope","$timeout",function(a,b){return{restrict:"A",link:function(b,c,d){if(c.attr("ng-repeat")||c.attr("data-ng-repeat")){var e=d.onFinishRender||"ngRepeat";b.$first&&!b.$last?b.$evalAsync(function(){a.$broadcast(e+" Started")}):b.$last&&b.$evalAsync(function(){a.$broadcast(e+" Finished")})}}}}]),jsep.addBinaryOp("contains",10),jsep.addBinaryOp("!contains",10),jsep.addBinaryOp("begins",10),jsep.addBinaryOp("!begins",10),jsep.addBinaryOp("ends",10),jsep.addBinaryOp("!ends",10),angular.module("view-form").directive("submitFormDirective",["$http","TimeCounter","$filter","$rootScope","SendVisitorData","$translate","$timeout",function(a,b,c,d,e,f,g){return{templateUrl:"form_modules/forms/base/views/directiveViews/form/submit-form.client.view.html",restrict:"E",scope:{myform:"=",ispreview:"="},controller:["$document","$window","$scope",function(f,g,h){var i=!1,j="submit_field";h.forms={},h.ispreview&&b.restartClock();var k=h.myform.visible_form_fields.filter(function(a){return"statement"!==a.fieldType}).length,l=c("formValidity")(h.myform);h.translateAdvancementData={done:l,total:k,answers_not_completed:k-l},h.reloadForm=function(){h.myform.submitted=!1,h.myform.form_fields=_.chain(h.myform.visible_form_fields).map(function(a){return a.fieldValue="",a}).value(),h.loading=!1,h.error="",h.selected={_id:"",index:0},h.setActiveField(h.myform.visible_form_fields[0]._id,0,!1),b.restartClock()};var m=function(a){var b=a.logicJump;if(b.enabled&&b.expressionString&&b.valueB&&a.fieldValue){var c,d,e=jsep(b.expressionString);if("field"===e.left.name?(c=a.fieldValue,d=b.valueB):(c=b.valueB,d=a.fieldValue),"number"===a.fieldType||"scale"===a.fieldType||"rating"===a.fieldType)switch(e.operator){case"==":return parseInt(c)===parseInt(d);case"!==":return parseInt(c)!==parseInt(d);case">":return parseInt(c)>parseInt(d);case">=":return parseInt(c)>parseInt(d);case"<":return parseInt(c)-1;case"!contains":return!(c.indexOf(d)>-1);case"begins":return c.startsWith(d);case"!begins":return!c.startsWith(d);case"ends":return c.endsWith(d);case"!ends":return c.endsWith(d);default:return!1}}},n=function(){if(null===h.selected)throw console.error("current active field is null"),new Error("current active field is null");return h.selected._id===j?h.myform.form_fields.length-1:h.selected.index};h.isActiveField=function(a){return h.selected._id===a._id},h.setActiveField=d.setActiveField=function(a,b,d){if(null!==h.selected&&(a||null!==b)){if(a){if(null===b){b=h.myform.visible_form_fields.length;for(var e=0;e .field-directive:nth-of-type("+String(h.myform.visible_form_fields.length-1)+")"),m=$(l).height(),n=k-g-1.2*m,o=.9;h.selected.index===h.myform.visible_form_fields.length?bn?(a=h.selected.index+1,h.setActiveField(j,a,!1)):ef*o&&(a=h.selected.index-1,h.setActiveField(null,a,!1))}h.$apply()},d.nextField=h.nextField=function(){if(h.selected&&h.selected.index>-1)if(h.selected._id!==j){var a=h.myform.visible_form_fields[h.selected.index];a.logicJump&&a.logicJump.jumpTo&&m(a)?h.setActiveField(a.logicJump.jumpTo,null,!0):h.selected.index0&&h.setActiveField(null,a,!0)},d.goToInvalid=h.goToInvalid=function(){var a=$(".row.field-directive .ng-invalid.focusOn, .row.field-directive .ng-untouched.focusOn:not(.ng-valid)").first().parents(".row.field-directive").first().attr("data-id");h.setActiveField(a,null,!0)},h.exitStartPage=function(){h.myform.startPage.showStart=!1,h.myform.visible_form_fields.length>0&&(h.selected._id=h.myform.visible_form_fields[0]._id)};var o=function(){var a=new MobileDetect(window.navigator.userAgent),b="other";return a.tablet()?b="tablet":a.mobile()?b="mobile":a.is("bot")||(b="desktop"),{type:b,name:window.navigator.platform}},p=function(){$.ajaxSetup({async:!1});var a=$.getJSON("https://freegeoip.net/json/").responseJSON;return $.ajaxSetup({async:!0}),a&&a.ip||(a={ip:"Adblocker"}),{ipAddr:a.ip,geoLocation:{City:a.city,Country:a.country_name}}};d.submitForm=h.submitForm=function(){if(h.forms.myForm.$invalid)return void h.goToInvalid();var d=b.stopClock();h.loading=!0;var f=_.cloneDeep(h.myform),g=o();f.device=g;var i=p();f.ipAddr=i.ipAddr,f.geoLocation=i.geoLocation,f.timeElapsed=d,f.percentageComplete=c("formValidity")(h.myform)/h.myform.visible_form_fields.length*100,delete f.endPage,delete f.isLive,delete f.provider,delete f.startPage,delete f.visible_form_fields,delete f.analytics,delete f.design,delete f.submissions,delete f.submitted;for(var j=0;j$(\".loader\").fadeOut(\"slow\");

{{ 'FORM_404_HEADER' | translate }}

{{ 'FORM_404_BODY' | translate }}
"); - $templateCache.put("form_modules/forms/base/views/form-unauthorized.client.view.html", - "

{{ 'FORM_UNAUTHORIZED_HEADER' | translate }}

{{ 'FORM_UNAUTHORIZED_BODY1' | translate }}
{{ 'FORM_UNAUTHORIZED_BODY2' | translate }}
"); - $templateCache.put("form_modules/forms/base/views/submit-form.client.view.html", - "
"); - $templateCache.put("form_modules/forms/base/views/directiveViews/entryPage/startPage.html", - "

{{pageData.introTitle}}

{{pageData.introParagraph}}

"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/date.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}

"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/dropdown.html", - "
0\">

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/hidden.html", - ""); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/legal.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}


{{field.description}}


"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/radio.html", - "
0\">

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/rating.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}

"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/statement.html", - "

{{field.title}}

{{field.description}}

{{field.description}}


"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/textarea.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{ 'NEWLINE' | translate }}

{{field.description}}

{{ 'ADD_NEW_LINE_INSTR' | translate }}
{{ 'ENTER' | translate }}
"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/textfield.html", - "

{{index+1}} {{field.title}} ({{ 'OPTIONAL' | translate }})

{{field.description}}

{{ 'ENTER' | translate }}
"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/yes_no.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); - $templateCache.put("form_modules/forms/base/views/directiveViews/form/submit-form.client.view.html", - "
{{ 'COMPLETING_NEEDED' | translate:translateAdvancementData }}
{{ 'ENTER' | translate }}

{{ 'ADVANCEMENT' | translate:translateAdvancementData }}

"); -}]); - -'use strict'; - -// Use Application configuration module to register a new module -ApplicationConfiguration.registerModule('view-form', [ - 'ngFileUpload', 'ui.date', 'angular-input-stars' -]); - -'use strict'; - -// Setting up route -angular.module('view-form').config(['$stateProvider', - function($stateProvider) { - // Forms state routing - $stateProvider. - state('submitForm', { - url: '/forms/:formId', - templateUrl: '/static/form_modules/forms/base/views/submit-form.client.view.html', - resolve: { - Forms: 'Forms', - myForm: ["Forms", "$q", "$state", "$stateParams", function (Forms, $q, $state, $stateParams) { - var deferred = $q.defer(); - - Forms.get({formId: $stateParams.formId}).$promise.then(function(data) { - deferred.resolve(data); - }, function(reason) { - $state.go('unauthorizedFormAccess'); - deferred.reject({redirectTo: 'unauthorizedFormAccess'}); - }); - return deferred.promise; - }] - }, - controller: 'SubmitFormController', - controllerAs: 'ctrl' - }). - state('unauthorizedFormAccess', { - url: '/forms/unauthorized', - templateUrl: '/static/form_modules/forms/base/views/form-unauthorized.client.view.html' - }) - .state('formNotFound', { - url: '*path', - templateUrl: '/static/form_modules/forms/base/views/form-not-found.client.view.html' - }); - } -]); - -(function () { - 'use strict'; - - // Create the SendVisitorData service - angular - .module('view-form') - .factory('SendVisitorData', SendVisitorData); - - SendVisitorData.$inject = ['Socket', '$state']; - - function SendVisitorData(Socket, $state) { - - // Create a controller method for sending visitor data - function send(form, lastActiveIndex, timeElapsed) { - - var lang = window.navigator.userLanguage || window.navigator.language; - lang = lang.slice(0,2); - - var userAgentString = navigator.userAgent; - var md = new MobileDetect(userAgentString); - var deviceType = 'other'; - - if (md.tablet()){ - deviceType = 'tablet'; - } else if (md.mobile()) { - deviceType = 'mobile'; - } else if (!md.is('bot')) { - deviceType = 'desktop'; - } - - // Create a new message object - var visitorData = { - referrer: document.referrer, - isSubmitted: form.submitted, - formId: form._id, - lastActiveField: form.form_fields[lastActiveIndex]._id, - timeElapsed: timeElapsed, - language: lang, - deviceType: deviceType, - ipAddr: null, - geoLocation: null - }; - - Socket.emit('form-visitor-data', visitorData); - } - - function init(){ - // Make sure the Socket is connected - if (!Socket.socket) { - Socket.connect(); - } - - Socket.on('disconnect', function(){ - Socket.connect(); - }); - } - - var service = { - send: send - }; - - init(); - return service; - - } -}()); - - -'use strict'; - -angular.module('view-form').directive('keyToOption', function(){ - return { - restrict: 'A', - scope: { - field: '=' - }, - link: function($scope, $element, $attrs, $select) { - $element.bind('keydown keypress', function(event) { - - var keyCode = event.which || event.keyCode; - var index = parseInt(String.fromCharCode(keyCode))-1; - - if (index < $scope.field.fieldOptions.length) { - event.preventDefault(); - $scope.$apply(function () { - $scope.field.fieldValue = $scope.field.fieldOptions[index].option_value; - }); - } - - }); - } - }; -}); - -'use strict'; - -angular.module('view-form').directive('keyToTruthy', ['$rootScope', function($rootScope){ - return { - restrict: 'A', - scope: { - field: '=', - nextField: '&' - }, - link: function($scope, $element, $attrs) { - $element.bind('keydown keypress', function(event) { - var keyCode = event.which || event.keyCode; - var truthyKeyCode = $attrs.keyCharTruthy.charCodeAt(0) - 32; - var falseyKeyCode = $attrs.keyCharFalsey.charCodeAt(0) - 32; - - if(keyCode === truthyKeyCode ) { - event.preventDefault(); - $scope.$apply(function() { - $scope.field.fieldValue = 'true'; - if($attrs.onValidKey){ - $scope.$root.$eval($attrs.onValidKey); - } - }); - }else if(keyCode === falseyKeyCode){ - event.preventDefault(); - $scope.$apply(function() { - $scope.field.fieldValue = 'false'; - if($attrs.onValidKey){ - $scope.$root.$eval($attrs.onValidKey); - } - }); - } - }); - } - }; -}]); - - -'use strict'; - -// Configuring the Forms drop-down menus -angular.module('view-form') -.filter('formValidity', function(){ - return function(formObj){ - if(formObj && formObj.form_fields && formObj.visible_form_fields){ - - //get keys - var formKeys = Object.keys(formObj); - - //we only care about things that don't start with $ - var fieldKeys = formKeys.filter(function(key){ - return key[0] !== '$'; - }); - - var fields = formObj.form_fields; - - var valid_count = fields.filter(function(field){ - if(typeof field === 'object' && field.fieldType !== 'rating' && field.fieldType !== 'statement'){ - return !!(field.fieldValue); - } else if (field.fieldType === 'rating'){ - return true; - } - - }).length; - return valid_count - (formObj.form_fields.length - formObj.visible_form_fields.length); - } - return 0; - }; -}); - -angular.module('view-form').value('supportedFields', [ - 'textfield', - 'textarea', - 'date', - 'dropdown', - 'hidden', - 'password', - 'radio', - 'legal', - 'statement', - 'rating', - 'yes_no', - 'number', - 'natural' -]); - -angular.module('view-form').constant('VIEW_FORM_URL', '/forms/:formId/render'); - - -'use strict'; - -// SubmitForm controller -angular.module('view-form').controller('SubmitFormController', [ - '$scope', '$rootScope', '$state', '$translate', 'myForm', - function($scope, $rootScope, $state, $translate, myForm) { - $scope.myform = myForm; - - $(".loader").fadeOut("slow"); - document.body.style.background = myForm.design.colors.backgroundColor; - $translate.use(myForm.language); - } -]); - -'use strict'; - -angular.module('view-form').directive('fieldIconDirective', function() { - - return { - template: '', - restrict: 'E', - scope: { - typeName: '@' - }, - controller: ["$scope", function($scope){ - var iconTypeMap = { - 'textfield': 'fa fa-pencil-square-o', - 'dropdown': 'fa fa-th-list', - 'date': 'fa fa-calendar', - 'checkbox': 'fa fa-check-square-o', - 'radio': 'fa fa-dot-circle-o', - 'email': 'fa fa-envelope-o', - 'textarea': 'fa fa-pencil-square', - 'legal': 'fa fa-legal', - 'file': 'fa fa-cloud-upload', - 'rating': 'fa fa-star-half-o', - 'link': 'fa fa-link', - 'scale': 'fa fa-sliders', - 'stripe': 'fa fa-credit-card', - 'statement': 'fa fa-quote-left', - 'yes_no': 'fa fa-toggle-on', - 'number': 'fa fa-slack' - }; - $scope.typeIcon = iconTypeMap[$scope.typeName]; - }] - }; -}); - -'use strict'; - -// coffeescript's for in loop -var __indexOf = [].indexOf || function(item) { - for (var i = 0, l = this.length; i < l; i++) { - if (i in this && this[i] === item) return i; - } - return -1; - }; - -angular.module('view-form').directive('fieldDirective', ['$http', '$compile', '$rootScope', '$templateCache', 'supportedFields', - function($http, $compile, $rootScope, $templateCache, supportedFields) { - - var getTemplateHtml = function(fieldType) { - var type = fieldType; - - var supported_fields = [ - 'textfield', - 'textarea', - 'date', - 'dropdown', - 'hidden', - 'password', - 'radio', - 'legal', - 'statement', - 'rating', - 'yes_no', - 'number', - 'natural' - ]; - - var templateUrl = 'form_modules/forms/base/views/directiveViews/field/'; - - if (__indexOf.call(supportedFields, type) >= 0) { - templateUrl = templateUrl+type+'.html'; - } - return $templateCache.get(templateUrl); - }; - - return { - template: '
{{field.title}}
', - restrict: 'E', - scope: { - field: '=', - required: '&', - design: '=', - index: '=', - forms: '=' - }, - link: function(scope, element) { - - $rootScope.chooseDefaultOption = scope.chooseDefaultOption = function(type) { - if(type === 'yes_no'){ - scope.field.fieldValue = 'true'; - }else if(type === 'rating'){ - scope.field.fieldValue = 0; - }else if(scope.field.fieldType === 'radio'){ - scope.field.fieldValue = scope.field.fieldOptions[0].option_value; - }else if(type === 'legal'){ - scope.field.fieldValue = 'true'; - $rootScope.nextField(); - } - }; - scope.nextField = $rootScope.nextField; - scope.setActiveField = $rootScope.setActiveField; - - //Set format only if field is a date - if(scope.field.fieldType === 'date'){ - scope.dateOptions = { - changeYear: true, - changeMonth: true, - altFormat: 'mm/dd/yyyy', - yearRange: '1900:-0', - defaultDate: 0 - }; - } - - var fieldType = scope.field.fieldType; - - if(scope.field.fieldType === 'number' || scope.field.fieldType === 'textfield' || scope.field.fieldType === 'email' || scope.field.fieldType === 'link'){ - switch(scope.field.fieldType){ - case 'textfield': - scope.input_type = 'text'; - break; - case 'email': - scope.input_type = 'email'; - scope.placeholder = 'joesmith@example.com'; - break; - case 'number': - scope.input_type = 'text'; - scope.validateRegex = /^-?\d+$/; - break; - default: - scope.input_type = 'url'; - scope.placeholder = 'http://example.com'; - break; - } - fieldType = 'textfield'; - } - - var template = getTemplateHtml(fieldType); - element.html(template).show(); - var output = $compile(element.contents())(scope); - } - }; - }]); - -'use strict'; - -//TODO: DAVID: Need to refactor this -angular.module('view-form').directive('onEnterKey', ['$rootScope', function($rootScope){ - return { - restrict: 'A', - link: function($scope, $element, $attrs) { - $element.bind('keydown keypress', function(event) { - - var keyCode = event.which || event.keyCode; - - var onEnterKeyDisabled = false; - if($attrs.onEnterKeyDisabled !== null) onEnterKeyDisabled = $attrs.onEnterKeyDisabled; - - if(keyCode === 13 && !event.shiftKey && !onEnterKeyDisabled) { - event.preventDefault(); - $rootScope.$apply(function() { - $rootScope.$eval($attrs.onEnterKey); - }); - } - }); - } - }; -}]).directive('onTabKey', ['$rootScope', function($rootScope){ - return { - restrict: 'A', - link: function($scope, $element, $attrs) { - $element.bind('keyup keypress', function(event) { - - var keyCode = event.which || event.keyCode; - - if(keyCode === 9 && !event.shiftKey) { - - event.preventDefault(); - $rootScope.$apply(function() { - $rootScope.$eval($attrs.onTabKey); - }); - } - }); - } - }; -}]).directive('onEnterOrTabKey', ['$rootScope', function($rootScope){ - return { - restrict: 'A', - link: function($scope, $element, $attrs) { - $element.bind('keydown keypress', function(event) { - - var keyCode = event.which || event.keyCode; - - if((keyCode === 13 || keyCode === 9) && !event.shiftKey) { - event.preventDefault(); - $rootScope.$apply(function() { - $rootScope.$eval($attrs.onEnterOrTabKey); - }); - } - }); - } - }; -}]).directive('onTabAndShiftKey', ['$rootScope', function($rootScope){ - return { - restrict: 'A', - link: function($scope, $element, $attrs) { - $element.bind('keydown keypress', function(event) { - - var keyCode = event.which || event.keyCode; - - if(keyCode === 9 && event.shiftKey) { - - console.log('onTabAndShiftKey'); - event.preventDefault(); - $rootScope.$apply(function() { - $rootScope.$eval($attrs.onTabAndShiftKey); - }); - } - }); - } - }; -}]); - -'use strict'; - -angular.module('view-form').directive('onFinishRender', ["$rootScope", "$timeout", function ($rootScope, $timeout) { - return { - restrict: 'A', - link: function (scope, element, attrs) { - - //Don't do anything if we don't have a ng-repeat on the current element - if(!element.attr('ng-repeat') && !element.attr('data-ng-repeat')){ - return; - } - - var broadcastMessage = attrs.onFinishRender || 'ngRepeat'; - - if(scope.$first && !scope.$last) { - scope.$evalAsync(function () { - $rootScope.$broadcast(broadcastMessage+' Started'); - }); - }else if(scope.$last) { - scope.$evalAsync(function () { - $rootScope.$broadcast(broadcastMessage+' Finished'); - }); - } - } - }; -}]); - -'use strict'; - -//FIXME: Should find an appropriate place for this -//Setting up jsep -jsep.addBinaryOp('contains', 10); -jsep.addBinaryOp('!contains', 10); -jsep.addBinaryOp('begins', 10); -jsep.addBinaryOp('!begins', 10); -jsep.addBinaryOp('ends', 10); -jsep.addBinaryOp('!ends', 10); - -angular.module('view-form').directive('submitFormDirective', ['$http', 'TimeCounter', '$filter', '$rootScope', 'SendVisitorData', '$translate', '$timeout', - function ($http, TimeCounter, $filter, $rootScope, SendVisitorData, $translate, $timeout) { - return { - templateUrl: 'form_modules/forms/base/views/directiveViews/form/submit-form.client.view.html', - restrict: 'E', - scope: { - myform:'=', - ispreview: '=' - }, - controller: ["$document", "$window", "$scope", function($document, $window, $scope){ - var NOSCROLL = false; - var FORM_ACTION_ID = 'submit_field'; - $scope.forms = {}; - - //Don't start timer if we are looking at a design preview - if($scope.ispreview){ - TimeCounter.restartClock(); - } - - var form_fields_count = $scope.myform.visible_form_fields.filter(function(field){ - return field.fieldType !== 'statement'; - }).length; - - var nb_valid = $filter('formValidity')($scope.myform); - $scope.translateAdvancementData = { - done: nb_valid, - total: form_fields_count, - answers_not_completed: form_fields_count - nb_valid - }; - - $scope.reloadForm = function(){ - //Reset Form - $scope.myform.submitted = false; - $scope.myform.form_fields = _.chain($scope.myform.visible_form_fields).map(function(field){ - field.fieldValue = ''; - return field; - }).value(); - - $scope.loading = false; - $scope.error = ''; - - $scope.selected = { - _id: '', - index: 0 - }; - $scope.setActiveField($scope.myform.visible_form_fields[0]._id, 0, false); - - //Reset Timer - TimeCounter.restartClock(); - }; - - /* - ** Field Controls - */ - var evaluateLogicJump = function(field){ - var logicJump = field.logicJump; - - if(logicJump.enabled){ - if (logicJump.expressionString && logicJump.valueB && field.fieldValue) { - var parse_tree = jsep(logicJump.expressionString); - var left, right; - - if(parse_tree.left.name === 'field'){ - left = field.fieldValue; - right = logicJump.valueB; - } else { - left = logicJump.valueB; - right = field.fieldValue; - } - - if(field.fieldType === 'number' || field.fieldType === 'scale' || field.fieldType === 'rating'){ - switch(parse_tree.operator) { - case '==': - return (parseInt(left) === parseInt(right)); - case '!==': - return (parseInt(left) !== parseInt(right)); - case '>': - return (parseInt(left) > parseInt(right)); - case '>=': - return (parseInt(left) > parseInt(right)); - case '<': - return (parseInt(left) < parseInt(right)); - case '<=': - return (parseInt(left) <= parseInt(right)); - default: - return false; - } - } else { - switch(parse_tree.operator) { - case '==': - return (left === right); - case '!==': - return (left !== right); - case 'contains': - return (left.indexOf(right) > -1); - case '!contains': - /* jshint -W018 */ - return !(left.indexOf(right) > -1); - case 'begins': - return left.startsWith(right); - case '!begins': - return !left.startsWith(right); - case 'ends': - return left.endsWith(right); - case '!ends': - return left.endsWith(right); - default: - return false; - } - } - } - } - }; - - var getActiveField = function(){ - if($scope.selected === null){ - console.error('current active field is null'); - throw new Error('current active field is null'); - } - - if($scope.selected._id === FORM_ACTION_ID) { - return $scope.myform.form_fields.length - 1; - } - return $scope.selected.index; - }; - - $scope.isActiveField = function(field){ - if($scope.selected._id === field._id) { - return true - } - return false; - }; - - $scope.setActiveField = $rootScope.setActiveField = function(field_id, field_index, animateScroll) { - if($scope.selected === null || (!field_id && field_index === null) ) { - return; - } - - if(!field_id){ - field_id = $scope.myform.visible_form_fields[field_index]._id; - } else if(field_index === null){ - field_index = $scope.myform.visible_form_fields.length - - for(var i=0; i < $scope.myform.visible_form_fields.length; i++){ - var currField = $scope.myform.visible_form_fields[i]; - if(currField['_id'] == field_id){ - field_index = i; - break; - } - } - } - - if($scope.selected._id === field_id){ - return; - } - - $scope.selected._id = field_id; - $scope.selected.index = field_index; - - - var nb_valid = $filter('formValidity')($scope.myform); - $scope.translateAdvancementData = { - done: nb_valid, - total: form_fields_count, - answers_not_completed: form_fields_count - nb_valid - }; - - if(animateScroll){ - NOSCROLL=true; - setTimeout(function() { - $document.scrollToElement(angular.element('.activeField'), -10, 200).then(function() { - NOSCROLL = false; - setTimeout(function() { - if (document.querySelectorAll('.activeField .focusOn').length) { - //Handle default case - document.querySelectorAll('.activeField .focusOn')[0].focus(); - } else if(document.querySelectorAll('.activeField input').length) { - //Handle case for rating input - document.querySelectorAll('.activeField input')[0].focus(); - } else { - //Handle case for dropdown input - document.querySelectorAll('.activeField .selectize-input')[0].focus(); - } - }); - }); - }); - } - }; - - $scope.$watch('selected.index', function(oldValue, newValue){ - if(oldValue !== newValue && newValue < $scope.myform.form_fields.length){ - //Only send analytics data if form has not been submitted - if(!$scope.myform.submitted){ - console.log('SendVisitorData.send()'); - SendVisitorData.send($scope.myform, newValue, TimeCounter.getTimeElapsed()); - } - } - }); - - //Fire event when window is scrolled - $window.onscroll = function(){ - if(!NOSCROLL){ - - var scrollTop = $(window).scrollTop(); - var elemBox = document.getElementsByClassName('activeField')[0].getBoundingClientRect(); - var fieldTop = elemBox.top; - var fieldBottom = elemBox.bottom; - - var field_id, field_index; - var elemHeight = $('.activeField').height(); - - var submitSectionHeight = $('.form-actions').height(); - var maxScrollTop = $(document).height() - $(window).height(); - var fieldWrapperHeight = $('form_fields').height(); - - var selector = 'form > .field-directive:nth-of-type(' + String($scope.myform.visible_form_fields.length - 1)+ ')' - var fieldDirectiveHeight = $(selector).height() - var scrollPosition = maxScrollTop - submitSectionHeight - fieldDirectiveHeight*1.2; - - var fractionToJump = 0.9; - - //Focus on field above submit form button - if($scope.selected.index === $scope.myform.visible_form_fields.length){ - if(scrollTop < scrollPosition){ - field_index = $scope.selected.index-1; - $scope.setActiveField(null, field_index, false); - } - } - - //Focus on submit form button - else if($scope.selected.index === $scope.myform.visible_form_fields.length-1 && scrollTop > scrollPosition){ - field_index = $scope.selected.index+1; - $scope.setActiveField(FORM_ACTION_ID, field_index, false); - } - - //If we scrolled bellow the current field, move to next field - else if(fieldBottom < elemHeight * fractionToJump && $scope.selected.index < $scope.myform.visible_form_fields.length-1 ){ - field_index = $scope.selected.index+1; - $scope.setActiveField(null, field_index, false); - } - //If we scrolled above the current field, move to prev field - else if ( $scope.selected.index !== 0 && fieldTop > elemHeight * fractionToJump) { - field_index = $scope.selected.index-1; - $scope.setActiveField(null, field_index, false); - } - } - - $scope.$apply(); - }; - - $rootScope.nextField = $scope.nextField = function(){ - if($scope.selected && $scope.selected.index > -1){ - - if($scope.selected._id !== FORM_ACTION_ID){ - var currField = $scope.myform.visible_form_fields[$scope.selected.index]; - - //Jump to logicJump's destination if it is true - if(currField.logicJump && currField.logicJump.jumpTo && evaluateLogicJump(currField)){ - $scope.setActiveField(currField.logicJump.jumpTo, null, true); - } else if($scope.selected.index < $scope.myform.visible_form_fields.length-1){ - $scope.setActiveField(null, $scope.selected.index+1, true); - } else { - $scope.setActiveField(FORM_ACTION_ID, null, true); - } - } else { - //If we are at the submit actions page, go to the first field - $rootScope.setActiveField(null, 0, true); - } - } else { - //If selected is not defined go to the first field - $rootScope.setActiveField(null, 0, true); - } - - }; - - $rootScope.prevField = $scope.prevField = function(){ - console.log('prevField'); - console.log($scope.selected); - var selected_index = $scope.selected.index - 1; - if($scope.selected.index > 0){ - $scope.setActiveField(null, selected_index, true); - } - }; - - $rootScope.goToInvalid = $scope.goToInvalid = function() { - var field_id = $('.row.field-directive .ng-invalid.focusOn, .row.field-directive .ng-untouched.focusOn:not(.ng-valid)').first().parents('.row.field-directive').first().attr('data-id'); - $scope.setActiveField(field_id, null, true); - }; - - /* - ** Form Display Functions - */ - $scope.exitStartPage = function(){ - $scope.myform.startPage.showStart = false; - if($scope.myform.visible_form_fields.length > 0){ - $scope.selected._id = $scope.myform.visible_form_fields[0]._id; - } - }; - - var getDeviceData = function(){ - var md = new MobileDetect(window.navigator.userAgent); - var deviceType = 'other'; - - if (md.tablet()){ - deviceType = 'tablet'; - } else if (md.mobile()) { - deviceType = 'mobile'; - } else if (!md.is('bot')) { - deviceType = 'desktop'; - } - - return { - type: deviceType, - name: window.navigator.platform - }; - }; - - var getIpAndGeo = function(){ - //Get Ip Address and GeoLocation Data - $.ajaxSetup( { 'async': false } ); - var geoData = $.getJSON('https://freegeoip.net/json/').responseJSON; - $.ajaxSetup( { 'async': true } ); - - if(!geoData || !geoData.ip){ - geoData = { - ip: 'Adblocker' - }; - } - - return { - ipAddr: geoData.ip, - geoLocation: { - City: geoData.city, - Country: geoData.country_name - } - }; - }; - - $rootScope.submitForm = $scope.submitForm = function() { - if($scope.forms.myForm.$invalid){ - $scope.goToInvalid(); - return; - } - - var _timeElapsed = TimeCounter.stopClock(); - $scope.loading = true; - - var form = _.cloneDeep($scope.myform); - - var deviceData = getDeviceData(); - form.device = deviceData; - - var geoData = getIpAndGeo(); - form.ipAddr = geoData.ipAddr; - form.geoLocation = geoData.geoLocation; - - form.timeElapsed = _timeElapsed; - form.percentageComplete = $filter('formValidity')($scope.myform) / $scope.myform.visible_form_fields.length * 100; - delete form.endPage - delete form.isLive - delete form.provider - delete form.startPage - delete form.visible_form_fields; - delete form.analytics; - delete form.design; - delete form.submissions; - delete form.submitted; - for(var i=0; i < $scope.myform.form_fields.length; i++){ - if($scope.myform.form_fields[i].fieldType === 'dropdown' && !$scope.myform.form_fields[i].deletePreserved){ - $scope.myform.form_fields[i].fieldValue = $scope.myform.form_fields[i].fieldValue.option_value; - } - - //Get rid of unnessecary attributes for each form field - delete form.form_fields[i].submissionId; - delete form.form_fields[i].disabled; - delete form.form_fields[i].ratingOptions; - delete form.form_fields[i].fieldOptions; - delete form.form_fields[i].logicJump; - delete form.form_fields[i].description; - delete form.form_fields[i].validFieldTypes; - delete form.form_fields[i].fieldType; - - } - - setTimeout(function () { - $scope.submitPromise = $http.post('/forms/' + $scope.myform._id, form) - .success(function (data, status) { - $scope.myform.submitted = true; - $scope.loading = false; - SendVisitorData.send(form, getActiveField(), _timeElapsed); - }) - .error(function (error) { - $scope.loading = false; - console.error(error); - $scope.error = error.message; - }); - }, 500); - }; - - //Reload our form - $scope.reloadForm(); - }] - }; - } -]); - -'use strict'; - -//Forms service used for communicating with the forms REST endpoints -angular.module('view-form').service('CurrentForm', - function(){ - //Private variables - var _form = {}; - - //Public Methods - this.getForm = function() { - return _form; - }; - this.setForm = function(form) { - _form = form; - }; - } -); - -'use strict'; - -//Forms service used for communicating with the forms REST endpoints -angular.module('view-form').factory('Forms', ['$resource', 'VIEW_FORM_URL', - function($resource, VIEW_FORM_URL) { - return $resource(VIEW_FORM_URL, { - formId: '@_id' - }, { - 'get' : { - method: 'GET', - transformResponse: function(data, header) { - var form = angular.fromJson(data); - - form.visible_form_fields = _.filter(form.form_fields, function(field){ - return (field.deletePreserved === false); - }); - return form; - } - }, - 'update': { - method: 'PUT' - }, - 'save': { - method: 'POST' - } - }); - } -]); - -(function () { - 'use strict'; - - // Create the Socket.io wrapper service - function Socket($timeout, $window) { - - var service = { - socket: null - }; - - // Connect to TellForm Socket.io server - function connect() { - var url = ''; - if($window.socketUrl && $window.socketPort){ - url = window.location.protocol + '//' + $window.socketUrl + ':' + $window.socketPort; - } else if ($window.socketUrl){ - url = window.location.protocol + '//' + $window.socketUrl; - } else if ($window.socketPort){ - url = window.location.protocol + '//' + window.location.hostname + ':' + $window.socketPort; - } else { - url = window.location.protocol + '//' + window.location.hostname; - } - service.socket = io(url, {'transports': ['websocket', 'polling']}); - } - - // Wrap the Socket.io 'emit' method - function emit(eventName, data) { - if (service.socket) { - service.socket.emit(eventName, data); - } - } - - // Wrap the Socket.io 'on' method - function on(eventName, callback) { - if (service.socket) { - service.socket.on(eventName, function (data) { - $timeout(function () { - callback(data); - }); - }); - } - } - - // Wrap the Socket.io 'removeListener' method - function removeListener(eventName) { - if (service.socket) { - service.socket.removeListener(eventName); - } - } - - connect(); - - service = { - connect: connect, - emit: emit, - on: on, - removeListener: removeListener, - socket: null - }; - - return service; - } - - angular - .module('view-form') - .factory('Socket', Socket); - - Socket.$inject = ['$timeout', '$window']; - -}()); - -'use strict'; - -angular.module('view-form').service('TimeCounter', [ - function(){ - var _startTime, _endTime = null; - - this.timeSpent = 0; - - this.restartClock = function(){ - _startTime = Date.now(); - _endTime = null; - }; - - this.getTimeElapsed = function(){ - if(_startTime) { - return Math.abs(Date.now().valueOf() - _startTime.valueOf()) / 1000; - } - }; - - this.stopClock = function(){ - if(_startTime && _endTime === null){ - _endTime = Date.now(); - this.timeSpent = Math.abs(_endTime.valueOf() - _startTime.valueOf())/1000; - this._startTime = this._endTime = null; - - return this.timeSpent; - } - return new Error('Clock has not been started'); - }; - - this.clockStarted = function(){ - return !!this._startTime; - }; - - } -]); - -'use strict'; - -angular.module('view-form').config(['$translateProvider', function ($translateProvider) { - - $translateProvider.translations('en', { - FORM_SUCCESS: 'Form entry successfully submitted!', - REVIEW: 'Review', - BACK_TO_FORM: 'Go back to Form', - EDIT_FORM: 'Edit this TellForm', - CREATE_FORM: 'Create this TellForm', - ADVANCEMENT: '{{done}} out of {{total}} answered', - CONTINUE_FORM: 'Continue to Form', - REQUIRED: 'required', - COMPLETING_NEEDED: '{{answers_not_completed}} answer(s) need completing', - OPTIONAL: 'optional', - ERROR_EMAIL_INVALID: 'Please enter a valid email address', - ERROR_NOT_A_NUMBER: 'Please enter valid numbers only', - ERROR_URL_INVALID: 'Please a valid url', - OK: 'OK', - ENTER: 'press ENTER', - YES: 'Yes', - NO: 'No', - NEWLINE: 'press SHIFT+ENTER to create a newline', - CONTINUE: 'Continue', - LEGAL_ACCEPT: 'I accept', - LEGAL_NO_ACCEPT: 'I don’t accept', - DELETE: 'Delete', - CANCEL: 'Cancel', - SUBMIT: 'Submit', - UPLOAD_FILE: 'Upload your File', - Y: 'Y', - N: 'N', - OPTION_PLACEHOLDER: 'Type or select an option', - ADD_NEW_LINE_INSTR: 'Press SHIFT+ENTER to add a newline', - ERROR: 'Error', - - FORM_404_HEADER: '404 - Form Does Not Exist', - FORM_404_BODY: 'The form you are trying to access does not exist. Sorry about that!', - - FORM_UNAUTHORIZED_HEADER: 'Not Authorized to Access Form', - FORM_UNAUTHORIZED_BODY1: 'The form you are trying to access is currently private and not accesible publically.', - FORM_UNAUTHORIZED_BODY2: 'If you are the owner of the form, you can set it to "Public" in the "Configuration" panel in the form admin.', - }); - - $translateProvider.preferredLanguage('en') - .fallbackLanguage('en') - .useSanitizeValueStrategy('escape'); - -}]); - -'use strict'; - -angular.module('view-form').config(['$translateProvider', function ($translateProvider) { - - $translateProvider.translations('fr', { - FORM_SUCCESS: 'Votre formulaire a été enregistré!', - REVIEW: 'Incomplet', - BACK_TO_FORM: 'Retourner au formulaire', - EDIT_FORM: 'Éditer le Tellform', - CREATE_FORM: 'Créer un TellForm', - ADVANCEMENT: '{{done}} complétés sur {{total}}', - CONTINUE_FORM: 'Aller au formulaire', - REQUIRED: 'obligatoire', - COMPLETING_NEEDED: '{{answers_not_completed}} réponse(s) doive(nt) être complétée(s)', - OPTIONAL: 'facultatif', - ERROR_EMAIL_INVALID: 'Merci de rentrer une adresse mail valide', - ERROR_NOT_A_NUMBER: 'Merce de ne rentrer que des nombres', - ERROR_URL_INVALID: 'Merci de rentrer une url valide', - OK: 'OK', - ENTER: 'presser ENTRÉE', - YES: 'Oui', - NO: 'Non', - NEWLINE: 'presser SHIFT+ENTER pour créer une nouvelle ligne', - CONTINUE: 'Continuer', - LEGAL_ACCEPT: 'J’accepte', - LEGAL_NO_ACCEPT: 'Je n’accepte pas', - DELETE: 'Supprimer', - CANCEL: 'Réinitialiser', - SUBMIT: 'Enregistrer', - UPLOAD_FILE: 'Envoyer un fichier', - Y: 'O', - N: 'N', - OPTION_PLACEHOLDER: 'Tapez ou sélectionnez une option', - ADD_NEW_LINE_INSTR: 'Appuyez sur MAJ + ENTRÉE pour ajouter une nouvelle ligne', - ERROR: 'Erreur', - - FORM_404_HEADER: '404 - Le formulaire n\'existe pas', - FORM_404_BODY: 'Le formulaire auquel vous essayez d\'accéder n\'existe pas. Désolé pour ça!', - - FORM_UNAUTHORIZED_HEADER: 'Non autorisé à accéder au formulaire', -   FORM_UNAUTHORIZED_BODY1: 'Le formulaire auquel vous essayez d\'accéder est actuellement privé et inaccessible publiquement.', -   FORM_UNAUTHORIZED_BODY2: 'Si vous êtes le propriétaire du formulaire, vous pouvez le définir sur "Public" dans le panneau "Configuration" du formulaire admin.', - }); - -}]); - -'use strict'; - -angular.module('view-form').config(['$translateProvider', function ($translateProvider) { - - $translateProvider.translations('de', { - FORM_SUCCESS: 'Ihre Angaben wurden gespeichert.', - REVIEW: 'Unvollständig', - BACK_TO_FORM: 'Zurück zum Formular', - EDIT_FORM: 'Bearbeiten Sie diese TellForm', - CREATE_FORM: 'Dieses TellForm erstellen', - ADVANCEMENT: '{{done}} von {{total}} beantwortet', - CONTINUE_FORM: 'Zum Formular', - REQUIRED: 'verpflichtend', - COMPLETING_NEEDED: 'Es fehlen/fehtl noch {{answers_not_completed}} Antwort(en)', - OPTIONAL: 'fakultativ', - ERROR_EMAIL_INVALID: 'Bitte gültige Mailadresse eingeben', - ERROR_NOT_A_NUMBER: 'Bitte nur Zahlen eingeben', - ERROR_URL_INVALID: 'Bitte eine gültige URL eingeben', - OK: 'Okay', - ENTER: 'Eingabetaste drücken', - YES: 'Ja', - NO: 'Nein', - NEWLINE: 'Für eine neue Zeile SHIFT+ENTER drücken', - CONTINUE: 'Weiter', - LEGAL_ACCEPT: 'I accept', - LEGAL_NO_ACCEPT: 'I don’t accept', - DELETE: 'Entfernen', - CANCEL: 'Canceln', - SUBMIT: 'Speichern', - UPLOAD_FILE: 'Datei versenden', - Y: 'J', - N: 'N', - OPTION_PLACEHOLDER: 'Geben oder wählen Sie eine Option aus', - ADD_NEW_LINE_INSTR: 'Drücken Sie UMSCHALT + EINGABETASTE, um eine neue Zeile hinzuzufügen', - ERROR: 'Fehler', - - FORM_404_HEADER: '404 - Formular existiert nicht', - FORM_404_BODY: 'Das Formular, auf das Sie zugreifen möchten, existiert nicht. Das tut mir leid!', - - FORM_UNAUTHORIZED_HEADER: 'Nicht zum Zugriffsformular berechtigt\' ', -   FORM_UNAUTHORIZED_BODY1: 'Das Formular, auf das Sie zugreifen möchten, ist derzeit privat und nicht öffentlich zugänglich.', -   FORM_UNAUTHORIZED_BODY2: 'Wenn Sie der Eigentümer des Formulars sind, können Sie es im Fenster "Konfiguration" im Formular admin auf "Öffentlich" setzen.', - }); - -}]); - -'use strict'; - -angular.module('view-form').config(['$translateProvider', function ($translateProvider) { - - $translateProvider.translations('it', { - FORM_SUCCESS: 'Il formulario è stato inviato con successo!', - REVIEW: 'Incompleto', - BACK_TO_FORM: 'Ritorna al formulario', - EDIT_FORM: 'Modifica questo TellForm', - CREATE_FORM: 'Crea questo TellForm', - ADVANCEMENT: '{{done}} su {{total}} completate', - CONTINUE_FORM: 'Vai al formulario', - REQUIRED: 'obbligatorio', - COMPLETING_NEEDED: '{{answers_not_completed}} risposta/e deve/ono essere completata/e', - OPTIONAL: 'opzionale', - ERROR_EMAIL_INVALID: 'Si prega di inserire un indirizzo email valido', - ERROR_NOT_A_NUMBER: 'Si prega di inserire solo numeri', - ERROR_URL_INVALID: 'Grazie per inserire un URL valido', - OK: 'OK', - ENTER: 'premere INVIO', - YES: 'Sì', - NO: 'No', - NEWLINE: 'premere SHIFT+INVIO per creare una nuova linea', - CONTINUE: 'Continua', - LEGAL_ACCEPT: 'I accept', - LEGAL_NO_ACCEPT: 'I don’t accept', - DELETE: 'Cancella', - CANCEL: 'Reset', - SUBMIT: 'Registra', - UPLOAD_FILE: 'Invia un file', - Y: 'S', - N: 'N', - OPTION_PLACEHOLDER: 'Digitare o selezionare un\'opzione', - ADD_NEW_LINE_INSTR: 'Premere SHIFT + INVIO per aggiungere una nuova riga', - ERROR: 'Errore', - - FORM_404_HEADER: '404 - Il modulo non esiste', - FORM_404_BODY: 'La forma che stai cercando di accedere non esiste. Ci dispiace!', - - FORM_UNAUTHORIZED_HEADER: 'Non autorizzato per accedere al modulo', -   FORM_UNAUTHORIZED_BODY1: 'Il modulo che si sta tentando di accedere è attualmente privato e non accessibile in pubblico.', -   FORM_UNAUTHORIZED_BODY2: 'Se sei il proprietario del modulo, puoi impostarlo su "Pubblico" nel pannello "Configurazione" nell\'amministratore di moduli.', - }); - -}]); - -'use strict'; - -angular.module('view-form').config(['$translateProvider', function ($translateProvider) { - - $translateProvider.translations('es', { - FORM_SUCCESS: '¡El formulario ha sido enviado con éxito!', - REVIEW: 'Revisar', - BACK_TO_FORM: 'Regresar al formulario', - EDIT_FORM: 'Editar este TellForm', - CREATE_FORM: 'Crear este TellForm', - ADVANCEMENT: '{{done}} de {{total}} contestadas', - CONTINUE_FORM: 'Continuar al formulario', - REQUIRED: 'Información requerida', - COMPLETING_NEEDED: '{{answers_not_completed}} respuesta(s) necesita(n) ser completada(s)', - OPTIONAL: 'Opcional', - ERROR_EMAIL_INVALID: 'Favor de proporcionar un correo electrónico válido', - ERROR_NOT_A_NUMBER: 'Por favor, introduzca sólo números válidos', - ERROR_URL_INVALID: 'Favor de proporcionar un url válido', - OK: 'OK', - ENTER: 'pulse INTRO', - YES: 'Si', - NO: 'No', - NEWLINE: 'presione SHIFT+INTRO para crear una nueva línea', - CONTINUE: 'Continuar', - LEGAL_ACCEPT: 'Yo acepto', - LEGAL_NO_ACCEPT: 'Yo no acepto', - DELETE: 'Eliminar', - CANCEL: 'Cancelar', - SUBMIT: 'Registrar', - UPLOAD_FILE: 'Cargar el archivo', - Y: 'S', - N: 'N', - OPTION_PLACEHOLDER: 'Escriba o seleccione una opción', - ADD_NEW_LINE_INSTR: 'Presione MAYÚS + ENTRAR para agregar una nueva línea', - ERROR: 'Error', - - FORM_404_HEADER: '404 - La forma no existe', - FORM_404_BODY: 'El formulario al que intenta acceder no existe. ¡Lo siento por eso!', - - FORM_UNAUTHORIZED_HEADER: 'Non autorizzato per accedere al modulo', -   FORM_UNAUTHORIZED_BODY1: 'Il modulo che si sta tentando di accedere è attualmente privato e non accessibile in pubblico.', -   FORM_UNAUTHORIZED_BODY2: 'Se sei il proprietario del modulo, puoi impostarlo su "Pubblico" nel pannello "Configurazione" nell\'amministratore di moduli.', - }); - -}]); diff --git a/public/dist/form-application.min.js b/public/dist/form-application.min.js deleted file mode 100644 index d1ace13d..00000000 --- a/public/dist/form-application.min.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";var ApplicationConfiguration=function(){var a="TellForm-Form",b=["duScroll","ui.select","ngSanitize","vButton","ngResource","TellForm-Form.form_templates","ui.router","ui.bootstrap","pascalprecht.translate"],c=function(b,c){angular.module(b,c||[]),angular.module(a).requires.push(b)};return{applicationModuleName:a,applicationModuleVendorDependencies:b,registerModule:c}}();angular.module(ApplicationConfiguration.applicationModuleName,ApplicationConfiguration.applicationModuleVendorDependencies),angular.module(ApplicationConfiguration.applicationModuleName).config(["$locationProvider",function(a){a.hashPrefix("!")}]),angular.module(ApplicationConfiguration.applicationModuleName).constant("APP_PERMISSIONS",{viewAdminSettings:"viewAdminSettings",editAdminSettings:"editAdminSettings",editForm:"editForm",viewPrivateForm:"viewPrivateForm"}),angular.module(ApplicationConfiguration.applicationModuleName).constant("USER_ROLES",{admin:"admin",normal:"user",superuser:"superuser"}),angular.module(ApplicationConfiguration.applicationModuleName).constant("FORM_URL","/forms/:formId"),angular.element(document).ready(function(){"#_=_"===window.location.hash&&(window.location.hash="#!"),angular.bootstrap(document,[ApplicationConfiguration.applicationModuleName])}),angular.module("TellForm-Form.form_templates",[]).run(["$templateCache",function(a){a.put("form_modules/forms/base/views/form-not-found.client.view.html",'

{{ \'FORM_404_HEADER\' | translate }}

{{ \'FORM_404_BODY\' | translate }}
'),a.put("form_modules/forms/base/views/form-unauthorized.client.view.html",'

{{ \'FORM_UNAUTHORIZED_HEADER\' | translate }}

{{ \'FORM_UNAUTHORIZED_BODY1\' | translate }}
{{ \'FORM_UNAUTHORIZED_BODY2\' | translate }}
'),a.put("form_modules/forms/base/views/submit-form.client.view.html","
"),a.put("form_modules/forms/base/views/directiveViews/entryPage/startPage.html",'

{{pageData.introTitle}}

{{pageData.introParagraph}}

'),a.put("form_modules/forms/base/views/directiveViews/field/date.html",'

{{index+1}} {{field.title}} {{ \'OPTIONAL\' | translate }}

{{field.description}}

'),a.put("form_modules/forms/base/views/directiveViews/field/dropdown.html",'
'),a.put("form_modules/forms/base/views/directiveViews/field/hidden.html",""),a.put("form_modules/forms/base/views/directiveViews/field/legal.html",'
'),a.put("form_modules/forms/base/views/directiveViews/field/radio.html",'

{{index+1}} {{field.title}} {{ \'OPTIONAL\' | translate }}

{{field.description}}


'),a.put("form_modules/forms/base/views/directiveViews/field/rating.html",'

{{index+1}} {{field.title}} {{ \'OPTIONAL\' | translate }}

{{field.description}}

'),a.put("form_modules/forms/base/views/directiveViews/field/statement.html",'

{{field.title}}

{{field.description}}

{{field.description}}


'),a.put("form_modules/forms/base/views/directiveViews/field/textarea.html",'

{{index+1}} {{field.title}} {{ \'OPTIONAL\' | translate }}

{{ \'NEWLINE\' | translate }}

{{field.description}}

{{ \'ADD_NEW_LINE_INSTR\' | translate }}
{{ \'ENTER\' | translate }}
'),a.put("form_modules/forms/base/views/directiveViews/field/textfield.html",'

{{index+1}} {{field.title}} ({{ \'OPTIONAL\' | translate }})

{{field.description}}

{{ \'ENTER\' | translate }}
'),a.put("form_modules/forms/base/views/directiveViews/field/yes_no.html",'

{{index+1}} {{field.title}} {{ \'OPTIONAL\' | translate }}

{{field.description}}


'),a.put("form_modules/forms/base/views/directiveViews/form/submit-form.client.view.html",'
{{ \'COMPLETING_NEEDED\' | translate:translateAdvancementData }}
')}]),ApplicationConfiguration.registerModule("view-form",["ngFileUpload","ui.date","angular-input-stars"]),angular.module("view-form").config(["$stateProvider",function(a){a.state("submitForm",{url:"/forms/:formId",templateUrl:"/static/form_modules/forms/base/views/submit-form.client.view.html",resolve:{Forms:"Forms",myForm:["Forms","$q","$state","$stateParams",function(a,b,c,d){var e=b.defer();return a.get({formId:d.formId}).$promise.then(function(a){e.resolve(a)},function(a){c.go("unauthorizedFormAccess"),e.reject({redirectTo:"unauthorizedFormAccess"})}),e.promise}]},controller:"SubmitFormController",controllerAs:"ctrl"}).state("unauthorizedFormAccess",{url:"/forms/unauthorized",templateUrl:"/static/form_modules/forms/base/views/form-unauthorized.client.view.html"}).state("formNotFound",{url:"*path",templateUrl:"/static/form_modules/forms/base/views/form-not-found.client.view.html"})}]),function(){function a(a,b){function c(b,c,d){var e=window.navigator.userLanguage||window.navigator.language;e=e.slice(0,2);var f=navigator.userAgent,g=new MobileDetect(f),h="other";g.tablet()?h="tablet":g.mobile()?h="mobile":g.is("bot")||(h="desktop");var i={referrer:document.referrer,isSubmitted:b.submitted,formId:b._id,lastActiveField:b.form_fields[c]._id,timeElapsed:d,language:e,deviceType:h,ipAddr:null,geoLocation:null};a.emit("form-visitor-data",i)}function d(){a.socket||a.connect(),a.on("disconnect",function(){a.connect()})}var e={send:c};return d(),e}angular.module("view-form").factory("SendVisitorData",a),a.$inject=["Socket","$state"]}(),angular.module("view-form").directive("keyToOption",function(){return{restrict:"A",scope:{field:"="},link:function(a,b,c,d){b.bind("keydown keypress",function(b){var c=b.which||b.keyCode,d=parseInt(String.fromCharCode(c))-1;d',restrict:"E",scope:{typeName:"@"},controller:["$scope",function(a){var b={textfield:"fa fa-pencil-square-o",dropdown:"fa fa-th-list",date:"fa fa-calendar",checkbox:"fa fa-check-square-o",radio:"fa fa-dot-circle-o",email:"fa fa-envelope-o",textarea:"fa fa-pencil-square",legal:"fa fa-legal",file:"fa fa-cloud-upload",rating:"fa fa-star-half-o",link:"fa fa-link",scale:"fa fa-sliders",stripe:"fa fa-credit-card",statement:"fa fa-quote-left",yes_no:"fa fa-toggle-on",number:"fa fa-slack"};a.typeIcon=b[a.typeName]}]}});var __indexOf=[].indexOf||function(a){for(var b=0,c=this.length;b=0&&(c=c+b+".html"),d.get(c)};return{template:"
{{field.title}}
",restrict:"E",scope:{field:"=",required:"&",design:"=",index:"=",forms:"="},link:function(a,d){c.chooseDefaultOption=a.chooseDefaultOption=function(b){"yes_no"===b?a.field.fieldValue="true":"rating"===b?a.field.fieldValue=0:"radio"===a.field.fieldType?a.field.fieldValue=a.field.fieldOptions[0].option_value:"legal"===b&&(a.field.fieldValue="true",c.nextField())},a.nextField=c.nextField,a.setActiveField=c.setActiveField,"date"===a.field.fieldType&&(a.dateOptions={changeYear:!0,changeMonth:!0,altFormat:"mm/dd/yyyy",yearRange:"1900:-0",defaultDate:0});var e=a.field.fieldType;if("number"===a.field.fieldType||"textfield"===a.field.fieldType||"email"===a.field.fieldType||"link"===a.field.fieldType){switch(a.field.fieldType){case"textfield":a.input_type="text";break;case"email":a.input_type="email",a.placeholder="joesmith@example.com";break;case"number":a.input_type="text",a.validateRegex=/^-?\d+$/;break;default:a.input_type="url",a.placeholder="http://example.com"}e="textfield"}var g=f(e);d.html(g).show();b(d.contents())(a)}}}]),angular.module("view-form").directive("onEnterKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keydown keypress",function(b){var c=b.which||b.keyCode,e=!1;null!==d.onEnterKeyDisabled&&(e=d.onEnterKeyDisabled),13!==c||b.shiftKey||e||(b.preventDefault(),a.$apply(function(){a.$eval(d.onEnterKey)}))})}}}]).directive("onTabKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keyup keypress",function(b){var c=b.which||b.keyCode;9!==c||b.shiftKey||(b.preventDefault(),a.$apply(function(){a.$eval(d.onTabKey)}))})}}}]).directive("onEnterOrTabKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keydown keypress",function(b){var c=b.which||b.keyCode;13!==c&&9!==c||b.shiftKey||(b.preventDefault(),a.$apply(function(){a.$eval(d.onEnterOrTabKey)}))})}}}]).directive("onTabAndShiftKey",["$rootScope",function(a){return{restrict:"A",link:function(b,c,d){c.bind("keydown keypress",function(b){var c=b.which||b.keyCode;9===c&&b.shiftKey&&(console.log("onTabAndShiftKey"),b.preventDefault(),a.$apply(function(){a.$eval(d.onTabAndShiftKey)}))})}}}]),angular.module("view-form").directive("onFinishRender",["$rootScope","$timeout",function(a,b){return{restrict:"A",link:function(b,c,d){if(c.attr("ng-repeat")||c.attr("data-ng-repeat")){var e=d.onFinishRender||"ngRepeat";b.$first&&!b.$last?b.$evalAsync(function(){a.$broadcast(e+" Started")}):b.$last&&b.$evalAsync(function(){a.$broadcast(e+" Finished")})}}}}]),jsep.addBinaryOp("contains",10),jsep.addBinaryOp("!contains",10),jsep.addBinaryOp("begins",10),jsep.addBinaryOp("!begins",10),jsep.addBinaryOp("ends",10),jsep.addBinaryOp("!ends",10),angular.module("view-form").directive("submitFormDirective",["$http","TimeCounter","$filter","$rootScope","SendVisitorData","$translate","$timeout",function(a,b,c,d,e,f,g){return{templateUrl:"form_modules/forms/base/views/directiveViews/form/submit-form.client.view.html",restrict:"E",scope:{myform:"=",ispreview:"="},controller:["$document","$window","$scope",function(f,g,h){var i=!1,j="submit_field";h.forms={},h.ispreview&&b.restartClock();var k=h.myform.visible_form_fields.filter(function(a){return"statement"!==a.fieldType}).length,l=c("formValidity")(h.myform);h.translateAdvancementData={done:l,total:k,answers_not_completed:k-l},h.reloadForm=function(){h.myform.submitted=!1,h.myform.form_fields=_.chain(h.myform.visible_form_fields).map(function(a){return a.fieldValue="",a}).value(),h.loading=!1,h.error="",h.selected={_id:"",index:0},h.setActiveField(h.myform.visible_form_fields[0]._id,0,!1),b.restartClock()};var m=function(a){var b=a.logicJump;if(b.enabled&&b.expressionString&&b.valueB&&a.fieldValue){var c,d,e=jsep(b.expressionString);if("field"===e.left.name?(c=a.fieldValue, -d=b.valueB):(c=b.valueB,d=a.fieldValue),"number"===a.fieldType||"scale"===a.fieldType||"rating"===a.fieldType)switch(e.operator){case"==":return parseInt(c)===parseInt(d);case"!==":return parseInt(c)!==parseInt(d);case">":return parseInt(c)>parseInt(d);case">=":return parseInt(c)>parseInt(d);case"<":return parseInt(c)-1;case"!contains":return!(c.indexOf(d)>-1);case"begins":return c.startsWith(d);case"!begins":return!c.startsWith(d);case"ends":return c.endsWith(d);case"!ends":return c.endsWith(d);default:return!1}}},n=function(){if(null===h.selected)throw console.error("current active field is null"),new Error("current active field is null");return h.selected._id===j?h.myform.form_fields.length-1:h.selected.index};h.isActiveField=function(a){return h.selected._id===a._id},h.setActiveField=d.setActiveField=function(a,b,d){if(null!==h.selected&&(a||null!==b)){if(a){if(null===b){b=h.myform.visible_form_fields.length;for(var e=0;e .field-directive:nth-of-type("+String(h.myform.visible_form_fields.length-1)+")"),m=$(l).height(),n=k-g-1.2*m,o=.9;h.selected.index===h.myform.visible_form_fields.length?bn?(a=h.selected.index+1,h.setActiveField(j,a,!1)):ef*o&&(a=h.selected.index-1,h.setActiveField(null,a,!1))}h.$apply()},d.nextField=h.nextField=function(){if(h.selected&&h.selected.index>-1)if(h.selected._id!==j){var a=h.myform.visible_form_fields[h.selected.index];a.logicJump&&a.logicJump.jumpTo&&m(a)?h.setActiveField(a.logicJump.jumpTo,null,!0):h.selected.index0&&h.setActiveField(null,a,!0)},d.goToInvalid=h.goToInvalid=function(){var a=$(".row.field-directive .ng-invalid.focusOn, .row.field-directive .ng-untouched.focusOn:not(.ng-valid)").first().parents(".row.field-directive").first().attr("data-id");h.setActiveField(a,null,!0)},h.exitStartPage=function(){h.myform.startPage.showStart=!1,h.myform.visible_form_fields.length>0&&(h.selected._id=h.myform.visible_form_fields[0]._id)};var o=function(){var a=new MobileDetect(window.navigator.userAgent),b="other";return a.tablet()?b="tablet":a.mobile()?b="mobile":a.is("bot")||(b="desktop"),{type:b,name:window.navigator.platform}},p=function(){$.ajaxSetup({async:!1});var a=$.getJSON("https://freegeoip.net/json/").responseJSON;return $.ajaxSetup({async:!0}),a&&a.ip||(a={ip:"Adblocker"}),{ipAddr:a.ip,geoLocation:{City:a.city,Country:a.country_name}}};d.submitForm=h.submitForm=function(){if(h.forms.myForm.$invalid)return void h.goToInvalid();var d=b.stopClock();h.loading=!0;var f=_.cloneDeep(h.myform),g=o();f.device=g;var i=p();f.ipAddr=i.ipAddr,f.geoLocation=i.geoLocation,f.timeElapsed=d,f.percentageComplete=c("formValidity")(h.myform)/h.myform.visible_form_fields.length*100,delete f.endPage,delete f.isLive,delete f.provider,delete f.startPage,delete f.visible_form_fields,delete f.analytics,delete f.design,delete f.submissions,delete f.submitted;for(var j=0;j$(\".loader\").fadeOut(\"slow\");

{{ 'FORM_404_HEADER' | translate }}

{{ 'FORM_404_BODY' | translate }}
"); - $templateCache.put("form_modules/forms/base/views/form-unauthorized.client.view.html", - "

{{ 'FORM_UNAUTHORIZED_HEADER' | translate }}

{{ 'FORM_UNAUTHORIZED_BODY1' | translate }}
{{ 'FORM_UNAUTHORIZED_BODY2' | translate }}
"); - $templateCache.put("form_modules/forms/base/views/submit-form.client.view.html", - "
"); - $templateCache.put("form_modules/forms/base/views/directiveViews/entryPage/startPage.html", - "

{{pageData.introTitle}}

{{pageData.introParagraph}}

"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/date.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}

"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/dropdown.html", - "
0\">

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/hidden.html", - ""); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/legal.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}


{{field.description}}


"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/radio.html", - "
0\">

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/rating.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}

"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/statement.html", - "

{{field.title}}

{{field.description}}

{{field.description}}


"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/textarea.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{ 'NEWLINE' | translate }}

{{field.description}}

{{ 'ADD_NEW_LINE_INSTR' | translate }}
{{ 'ENTER' | translate }}
"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/textfield.html", - "

{{index+1}} {{field.title}} ({{ 'OPTIONAL' | translate }})

{{field.description}}

{{ 'ENTER' | translate }}
"); - $templateCache.put("form_modules/forms/base/views/directiveViews/field/yes_no.html", - "

{{index+1}} {{field.title}} {{ 'OPTIONAL' | translate }}

{{field.description}}


"); - $templateCache.put("form_modules/forms/base/views/directiveViews/form/submit-form.client.view.html", - "
{{ 'COMPLETING_NEEDED' | translate:translateAdvancementData }}
{{ 'ENTER' | translate }}

{{ 'ADVANCEMENT' | translate:translateAdvancementData }}

"); -}]); diff --git a/public/dist/page-loader.gif b/public/dist/page-loader.gif deleted file mode 100644 index ae90a507..00000000 Binary files a/public/dist/page-loader.gif and /dev/null differ diff --git a/public/dist/vendor.min.js b/public/dist/vendor.min.js deleted file mode 100644 index 51d7c03a..00000000 --- a/public/dist/vendor.min.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict";!function(a,b,c){function d(a){return function(){var b,c=arguments[0];for(b="["+(a?a+":":"")+c+"] http://errors.angularjs.org/1.4.14/"+(a?a+"/":"")+c,c=1;c").append(a).html();try{return a[0].nodeType===od?Uc(c):c.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/,function(a,b){return"<"+Uc(b)})}catch(d){return Uc(c)}}function U(a){try{return decodeURIComponent(a)}catch(b){}}function V(a){var b={};return f((a||"").split("&"),function(a){var c,d,e;a&&(d=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(d=a.substring(0,c),e=a.substring(c+1)),d=U(d),t(d)&&(e=!t(e)||U(e),Vc.call(b,d)?ed(b[d])?b[d].push(e):b[d]=[b[d],e]:b[d]=e))}),b}function W(a){var b=[];return f(a,function(a,c){ed(a)?f(a,function(a){b.push(Y(c,!0)+(!0===a?"":"="+Y(a,!0)))}):b.push(Y(c,!0)+(!0===a?"":"="+Y(a,!0)))}),b.length?b.join("&"):""}function X(a){return Y(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Y(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function Z(a,b){var c,d,e=ld.length;for(d=0;d/,">"))}return d=d||[],d.unshift(["$provide",function(a){a.value("$rootElement",c)}]),e.debugInfoEnabled&&d.push(["$compileProvider",function(a){a.debugInfoEnabled(!0)}]),d.unshift("ng"),a=Oa(d,e.strictDi),a.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d),c(b)(a)})}]),a},h=/^NG_ENABLE_DEBUG_INFO!/,i=/^NG_DEFER_BOOTSTRAP!/;return a&&h.test(a.name)&&(e.debugInfoEnabled=!0,a.name=a.name.replace(h,"")),a&&!i.test(a.name)?g():(a.name=a.name.replace(i,""),bd.resumeBootstrap=function(a){return f(a,function(a){d.push(a)}),g()},void(z(bd.resumeDeferredBootstrap)&&bd.resumeDeferredBootstrap()))}function aa(){a.name="NG_ENABLE_DEBUG_INFO!"+a.name,a.location.reload()}function ba(a){if(a=bd.element(a).injector(),!a)throw ad("test");return a.get("$$testability")}function ca(a,b){return b=b||"_",a.replace(md,function(a,c){return(c?b:"")+a.toLowerCase()})}function da(){var b;if(!nd){var d=jd();(Rc=s(d)?a.jQuery:d?a[d]:c)&&Rc.fn.on?(Qc=Rc,k(Rc.fn,{scope:Cd.scope,isolateScope:Cd.isolateScope,controller:Cd.controller,injector:Cd.injector,inheritedData:Cd.inheritedData}),b=Rc.cleanData,Rc.cleanData=function(a){var c;if(dd)dd=!1;else for(var d,e=0;null!=(d=a[e]);e++)(c=Rc._data(d,"events"))&&c.$destroy&&Rc(d).triggerHandler("$destroy");b(a)}):Qc=qa,bd.element=Qc,nd=!0}}function ea(a,b,c){if(!a)throw ad("areq",b||"?",c||"required");return a}function fa(a,b,c){return c&&ed(a)&&(a=a[a.length-1]),ea(z(a),b,"not a function, got "+(a&&"object"==typeof a?a.constructor.name||"Object":typeof a)),a}function ga(a,b){if("hasOwnProperty"===a)throw ad("badname",b)}function ha(a,b,c){if(!b)return a;b=b.split(".");for(var d,e=a,f=b.length,g=0;g")+d[2],d=d[0];d--;)c=c.lastChild;g=M(g,c.childNodes),c=e.firstChild,c.textContent=""}else g.push(b.createTextNode(a));return e.textContent="",e.innerHTML="",f(g,function(a){e.appendChild(a)}),e}function pa(a,b){var c=a.parentNode;c&&c.replaceChild(b,a),b.appendChild(a)}function qa(a){if(a instanceof qa)return a;var c;if(w(a)&&(a=gd(a),c=!0),!(this instanceof qa)){if(c&&"<"!=a.charAt(0))throw vd("nosel");return new qa(a)}if(c){c=b;var d;a=(d=wd.exec(a))?[c.createElement(d[1])]:(d=oa(a,c))?d.childNodes:[]}Aa(this,a)}function ra(a){return a.cloneNode(!0)}function sa(a,b){if(b||ua(a),a.querySelectorAll)for(var c=a.querySelectorAll("*"),d=0,e=c.length;dj&&this.remove(n.key),b}},get:function(a){if(j").append(a).html())):c?Cd.clone.call(a):a,g)for(var h in g)d.data("$"+h+"Controller",g[h].instance);return J.$$addScopeInfo(d,b),c&&c(d,b),k&&k(b,d,d,e),d}}function K(a,b,d,e,f,g){function h(a,d,e,f){var g,h,i,j,k,l,o;if(m)for(o=Array(d.length),j=0;jq.priority)break;if((t=q.scope)&&(q.templateUrl||(u(t)?(Y("new/isolated scope",D||A,q,K),D=q):Y("new/isolated scope",D,q,K)),A=A||q),s=q.name,!q.templateUrl&&q.controller&&(t=q.controller,B=B||ja(),Y("'"+s+"' controller",B[s],q,K),B[s]=q),(t=q.transclude)&&(G=!0,q.$$tlb||(Y("transclusion",F,q,K),F=q),"element"==t?(I=!0,y=q.priority,t=K,K=e.$$element=Qc(b.createComment(" "+s+": "+e[s]+" ")),d=K[0],ba(h,Xc.call(t,0),d),L=J(t,f,y,i&&i.name,{nonTlbTranscludeDirective:F})):(t=Qc(ra(d)).contents(),K.empty(),L=J(t,f,c,c,{needsNewScope:q.$$isolateScope||q.$$newScope}))),q.template)if(H=!0,Y("template",E,q,K),E=q,t=z(q.template)?q.template(K,e):q.template,t=la(t),q.replace){if(i=q,t=xd.test(t)?$a($(q.templateNamespace,gd(t))):[],d=t[0],1!=t.length||1!==d.nodeType)throw Td("tplrt",s,"");ba(h,K,d),t={$attr:{}};var X=N(d,[],t),Z=a.splice(M+1,a.length-(M+1));(D||A)&&R(X,D,A),a=a.concat(X).concat(Z),V(e,t),Q=a.length}else K.html(t);if(q.templateUrl)H=!0,Y("template",E,q,K),E=q,q.replace&&(i=q),p=W(a.splice(M,a.length-M),K,e,h,G&&L,j,k,{controllerDirectives:B,newScopeDirective:A!==q&&A,newIsolateScopeDirective:D,templateDirective:E,nonTlbTranscludeDirective:F}),Q=a.length;else if(q.compile)try{v=q.compile(K,e,L),z(v)?m(null,v,S,U):v&&m(v.pre,v.post,S,U)}catch(_){g(_,T(K))}q.terminal&&(p.terminal=!0,y=Math.max(y,q.priority))}return p.scope=A&&!0===A.scope,p.transcludeOnThisElement=G,p.templateOnThisElement=H,p.transclude=L,l.hasElementTranscludeDirective=I,p}function R(a,b,c){for(var d=0,e=a.length;dl.priority)&&-1!=l.restrict.indexOf(d)){if(j&&(l=n(l,{$$start:j,$$end:k})),!l.$$bindings){var p=l,q=l,r=l.name,t={isolateScope:null,bindToController:null};if(u(q.scope)&&(!0===q.bindToController?(t.bindToController=e(q.scope,r,!0),t.isolateScope={}):t.isolateScope=e(q.scope,r,!1)),u(q.bindToController)&&(t.bindToController=e(q.bindToController,r,!0)),u(t.bindToController)){var v=q.controller,x=q.controllerAs;if(!v)throw Td("noctrl",r);var y;a:{var q=v,z=x;if(z&&w(z))y=z;else{if(w(q)){var A=Wd.exec(q);if(A){y=A[3];break a}}y=void 0}}if(!y)throw Td("noident",r)}var B=p.$$bindings=t;u(B.isolateScope)&&(l.$$isolateBindings=B.isolateScope)}b.push(l),h=l}}catch(C){g(C)}}return h}function U(b){if(i.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d"+c+"",d.childNodes[0].childNodes;default:return c}}function _(a,b){if("srcdoc"==b)return B.HTML;var c=H(a);return"xlinkHref"==b||"form"==c&&"action"==b||"img"!=c&&("src"==b||"ngSrc"==b)?B.RESOURCE_URL:void 0}function aa(a,b,c,e,f){var g=_(a,e);f=m[e]||f;var h=d(c,!0,g,f);if(h){if("multiple"===e&&"select"===H(a))throw Td("selmulti",T(a));b.push({priority:100,compile:function(){return{pre:function(a,b,i){if(b=i.$$observers||(i.$$observers=ja()),v.test(e))throw Td("nodomevents");var j=i[e];j!==c&&(h=j&&d(j,!0,g,f),c=j),h&&(i[e]=h(a),(b[e]||(b[e]=[])).$$inter=!0,(i.$$observers&&i.$$observers[e].$$scope||a).$watch(h,function(a,b){"class"===e&&a!=b?i.$updateClass(a,b):i.$set(e,a)}))}}}})}}function ba(a,c,d){var e,f,g=c[0],h=c.length,i=g.parentNode;if(a)for(e=0,f=a.length;e=b)return a;for(;b--;)8===a[b].nodeType&&Yc.call(a,b,1);return a}function _a(){var a={},b=!1;this.register=function(b,c){ga(b,"controller"),u(b)?k(a,b):a[b]=c},this.allowGlobals=function(){b=!0},this.$get=["$injector","$window",function(e,f){function g(a,b,c,e){if(!a||!u(a.$scope))throw d("$controller")("noscp",e,b);a.$scope[b]=c}return function(d,h,i,j){var l,m,n;if(i=!0===i,j&&w(j)&&(n=j),w(d)){if(j=d.match(Wd),!j)throw Vd("ctrlfmt",d);m=j[1],n=n||j[3],d=a.hasOwnProperty(m)?a[m]:ha(h.$scope,m,!0)||(b?ha(f,m,!0):c),fa(d,m,!0)}return i?(i=(ed(d)?d[d.length-1]:d).prototype,l=Object.create(i||null),n&&g(h,n,l,m||d.name),k(function(){var a=e.invoke(d,l,h,m);return a!==l&&(u(a)||z(a))&&(l=a,n&&g(h,n,l,m||d.name)),l},{instance:l,identifier:n})):(l=e.instantiate(d,h,m),n&&g(h,n,l,m||d.name),l)}}]}function ab(){this.$get=["$window",function(a){return Qc(a.document)}]}function bb(){this.$get=["$log",function(a){return function(b,c){a.error.apply(a,arguments)}}]}function cb(a){return u(a)?y(a)?a.toISOString():P(a):a}function db(){this.$get=function(){return function(a){if(!a)return"";var b=[];return g(a,function(a,c){null===a||s(a)||(ed(a)?f(a,function(a,d){b.push(Y(c)+"="+Y(cb(a)))}):b.push(Y(c)+"="+Y(cb(a))))}),b.join("&")}}}function eb(){this.$get=function(){return function(a){function b(a,d,e){null===a||s(a)||(ed(a)?f(a,function(a,c){b(a,d+"["+(u(a)?c:"")+"]")}):u(a)&&!y(a)?g(a,function(a,c){b(a,d+(e?"":"[")+c+(e?"":"]"))}):c.push(Y(d)+"="+Y(cb(a))))}if(!a)return"";var c=[];return b(a,"",!0),c.join("&")}}}function fb(a,b){if(w(a)){var c=a.replace(ae,"").trim();if(c){var d=b("Content-Type");(d=d&&0===d.indexOf(Yd))||(d=(d=c.match($d))&&_d[d[0]].test(c)),d&&(a=Q(c))}}return a}function gb(a){var b,c=ja();return w(a)?f(a.split("\n"),function(a){b=a.indexOf(":");var d=Uc(gd(a.substr(0,b)));a=gd(a.substr(b+1)),d&&(c[d]=c[d]?c[d]+", "+a:a)}):u(a)&&f(a,function(a,b){var d=Uc(b),e=gd(a);d&&(c[d]=c[d]?c[d]+", "+e:e)}),c}function hb(a){var b;return function(c){return b||(b=gb(a)),c?(c=b[Uc(c)],void 0===c&&(c=null),c):b}}function ib(a,b,c,d){return z(d)?d(a,b,c):(f(d,function(d){a=d(a,b,c)}),a)}function jb(){var a=this.defaults={transformResponse:[fb],transformRequest:[function(a){return u(a)&&"[object File]"!==$c.call(a)&&"[object Blob]"!==$c.call(a)&&"[object FormData]"!==$c.call(a)?P(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:K(Zd),put:K(Zd),patch:K(Zd)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},b=!1;this.useApplyAsync=function(a){return t(a)?(b=!!a,this):b};var e=!0;this.useLegacyPromiseExtensions=function(a){return t(a)?(e=!!a,this):e};var g=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(h,i,j,l,m,n){function o(b){function g(a){var b=k({},a);return b.data=ib(a.data,a.headers,a.status,i.transformResponse),a=a.status,200<=a&&300>a?b:m.reject(b)}function h(a,b){var c,d={};return f(a,function(a,e){z(a)?(c=a(b),null!=c&&(d[e]=c)):d[e]=a}),d}if(!bd.isObject(b))throw d("$http")("badreq",b);if(!w(b.url))throw d("$http")("badreq",b.url);var i=k({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer},b);i.headers=function(b){var c,d,e,f=a.headers,g=k({},b.headers),f=k({},f.common,f[Uc(b.method)]);a:for(c in f){d=Uc(c);for(e in g)if(Uc(e)===d)continue a;g[c]=f[c]}return h(g,K(b))}(b),i.method=Wc(i.method),i.paramSerializer=w(i.paramSerializer)?n.get(i.paramSerializer):i.paramSerializer;var j=[function(b){var d=b.headers,e=ib(b.data,hb(d),c,b.transformRequest);return s(e)&&f(d,function(a,b){"content-type"===Uc(b)&&delete d[b]}),s(b.withCredentials)&&!s(a.withCredentials)&&(b.withCredentials=a.withCredentials),p(b,e).then(g,g)},c],l=m.when(i);for(f(v,function(a){(a.request||a.requestError)&&j.unshift(a.request,a.requestError),(a.response||a.responseError)&&j.push(a.response,a.responseError)});j.length;){b=j.shift();var o=j.shift(),l=l.then(b,o)}return e?(l.success=function(a){return fa(a,"fn"),l.then(function(b){a(b.data,b.status,b.headers,i)}),l},l.error=function(a){return fa(a,"fn"),l.then(null,function(b){a(b.data,b.status,b.headers,i)}),l}):(l.success=ce("success"),l.error=ce("error")),l}function p(d,e){function f(a,c,d,e){function f(){g(c,a,d,e)}n&&(200<=a&&300>a?n.put(y,[a,c,gb(d),e]):n.remove(y)),b?l.$applyAsync(f):(f(),l.$$phase||l.$apply())}function g(a,b,c,e){b=-1<=b?b:0,(200<=b&&300>b?v.resolve:v.reject)({data:a,status:b,headers:hb(c),config:d,statusText:e})}function j(a){g(a.data,a.status,K(a.headers()),a.statusText)}function k(){var a=o.pendingRequests.indexOf(d);-1!==a&&o.pendingRequests.splice(a,1)}var n,p,v=m.defer(),w=v.promise,x=d.headers,y=q(d.url,d.paramSerializer(d.params));return o.pendingRequests.push(d),w.then(k,k),!d.cache&&!a.cache||!1===d.cache||"GET"!==d.method&&"JSONP"!==d.method||(n=u(d.cache)?d.cache:u(a.cache)?a.cache:r),n&&(p=n.get(y),t(p)?p&&z(p.then)?p.then(j,j):ed(p)?g(p[1],p[0],K(p[2]),p[3]):g(p,200,{},"OK"):n.put(y,w)),s(p)&&((p=gc(d.url)?i()[d.xsrfCookieName||a.xsrfCookieName]:c)&&(x[d.xsrfHeaderName||a.xsrfHeaderName]=p),h(d.method,y,e,f,x,d.timeout,d.withCredentials,d.responseType)),w}function q(a,b){return 0=h&&(p.resolve(n),m(q.$$intervalId),delete f[q.$$intervalId]),o||a.$apply()},g),f[q.$$intervalId]=p,q}var f={};return e.cancel=function(a){return!!(a&&a.$$intervalId in f)&&(f[a.$$intervalId].reject("canceled"),b.clearInterval(a.$$intervalId),delete f[a.$$intervalId],!0)},e}]}function pb(a){a=a.split("/");for(var b=a.length;b--;)a[b]=X(a[b]);return a.join("/")}function qb(a,b){var c=fc(a);b.$$protocol=c.protocol,b.$$host=c.hostname,b.$$port=m(c.port)||fe[c.protocol]||null}function rb(a,b){var c="/"!==a.charAt(0);c&&(a="/"+a);var d=fc(a);b.$$path=decodeURIComponent(c&&"/"===d.pathname.charAt(0)?d.pathname.substring(1):d.pathname),b.$$search=V(d.search),b.$$hash=decodeURIComponent(d.hash),b.$$path&&"/"!=b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function sb(a,b){if(0===b.indexOf(a))return b.substr(a.length)}function tb(a){var b=a.indexOf("#");return-1==b?a:a.substr(0,b)}function ub(a){return a.replace(/(#.+)|#$/,"$1")}function vb(a,b,c){this.$$html5=!0,c=c||"",qb(a,this),this.$$parse=function(a){var c=sb(b,a);if(!w(c))throw ge("ipthprfx",a,b);rb(c,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var a=W(this.$$search),c=this.$$hash?"#"+X(this.$$hash):"";this.$$url=pb(this.$$path)+(a?"?"+a:"")+c,this.$$absUrl=b+this.$$url.substr(1)},this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return t(f=sb(a,d))?(g=f,g=t(f=sb(c,f))?b+(sb("/",f)||f):a+g):t(f=sb(b,d))?g=b+f:b==d+"/"&&(g=b),g&&this.$$parse(g),!!g}}function wb(a,b,c){qb(a,this),this.$$parse=function(d){var e,f=sb(a,d)||sb(b,d);s(f)||"#"!==f.charAt(0)?this.$$html5?e=f:(e="",s(f)&&(a=d,this.replace())):(e=sb(c,f),s(e)&&(e=f)),rb(e,this),d=this.$$path;var f=a,g=/^\/[A-Z]:(\/.*)/;0===e.indexOf(f)&&(e=e.replace(f,"")),g.exec(e)||(d=(e=g.exec(d))?e[1]:d),this.$$path=d,this.$$compose()},this.$$compose=function(){var b=W(this.$$search),d=this.$$hash?"#"+X(this.$$hash):"";this.$$url=pb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+(this.$$url?c+this.$$url:"")},this.$$parseLinkUrl=function(b,c){return tb(a)==tb(b)&&(this.$$parse(b),!0)}}function xb(a,b,c){this.$$html5=!0,wb.apply(this,arguments),this.$$parseLinkUrl=function(d,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;return a==tb(d)?f=d:(g=sb(b,d))?f=a+c+g:b===d+"/"&&(f=b),f&&this.$$parse(f),!!f},this.$$compose=function(){var b=W(this.$$search),d=this.$$hash?"#"+X(this.$$hash):"";this.$$url=pb(this.$$path)+(b?"?"+b:"")+d,this.$$absUrl=a+c+this.$$url}}function yb(a){return function(){return this[a]}}function zb(a,b){return function(c){return s(c)?this[a]:(this[a]=b(c),this.$$compose(),this)}}function Ab(){var a="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return t(b)?(a=b,this):a},this.html5Mode=function(a){return D(a)?(b.enabled=a,this):u(a)?(D(a.enabled)&&(b.enabled=a.enabled),D(a.requireBase)&&(b.requireBase=a.requireBase),D(a.rewriteLinks)&&(b.rewriteLinks=a.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(c,d,e,f,g){function h(a,b,c){var e=j.url(),f=j.$$state;try{d.url(a,b,c),j.$$state=d.state()}catch(g){throw j.url(e),j.$$state=f,g}}function i(a,b){c.$broadcast("$locationChangeSuccess",j.absUrl(),a,j.$$state,b)}var j,k;k=d.baseHref();var l,m=d.url();if(b.enabled){if(!k&&b.requireBase)throw ge("nobase");l=m.substring(0,m.indexOf("/",m.indexOf("//")+2))+(k||"/"),k=e.history?vb:xb}else l=tb(m),k=wb;var n=l.substr(0,tb(l).lastIndexOf("/")+1);j=new k(l,n,"#"+a),j.$$parseLinkUrl(m,m),j.$$state=d.state();var o=/^\s*(javascript|mailto):/i;f.on("click",function(a){if(b.rewriteLinks&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!=a.which&&2!=a.button){for(var e=Qc(a.target);"a"!==H(e[0]);)if(e[0]===f[0]||!(e=e.parent())[0])return;var h=e.prop("href"),i=e.attr("href")||e.attr("xlink:href");u(h)&&"[object SVGAnimatedString]"===h.toString()&&(h=fc(h.animVal).href),o.test(h)||!h||e.attr("target")||a.isDefaultPrevented()||!j.$$parseLinkUrl(h,i)||(a.preventDefault(),j.absUrl()!=d.url()&&(c.$apply(),g.angular["ff-684208-preventDefault"]=!0))}}),ub(j.absUrl())!=ub(m)&&d.url(j.absUrl(),!0);var p=!0;return d.onUrlChange(function(a,b){s(sb(n,a))?g.location.href=a:(c.$evalAsync(function(){var d,e=j.absUrl(),f=j.$$state;a=ub(a),j.$$parse(a),j.$$state=b,d=c.$broadcast("$locationChangeStart",a,e,b,f).defaultPrevented,j.absUrl()===a&&(d?(j.$$parse(e),j.$$state=f,h(e,!1,f)):(p=!1,i(e,f)))}),c.$$phase||c.$digest())}),c.$watch(function(){var a=ub(d.url()),b=ub(j.absUrl()),f=d.state(),g=j.$$replace,k=a!==b||j.$$html5&&e.history&&f!==j.$$state;(p||k)&&(p=!1,c.$evalAsync(function(){var b=j.absUrl(),d=c.$broadcast("$locationChangeStart",b,a,j.$$state,f).defaultPrevented;j.absUrl()===b&&(d?(j.$$parse(a),j.$$state=f):(k&&h(b,g,f===j.$$state?null:j.$$state),i(a,f)))})),j.$$replace=!1}),j}]}function Bb(){var a=!0,b=this;this.debugEnabled=function(b){return t(b)?(a=b,this):a},this.$get=["$window",function(c){function d(a){return a instanceof Error&&(a.stack?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&&(a=a.message+"\n"+a.sourceURL+":"+a.line)),a}function e(a){var b=c.console||{},e=b[a]||b.log||o;a=!1;try{a=!!e.apply}catch(g){}return a?function(){var a=[];return f(arguments,function(b){a.push(d(b))}),e.apply(b,a)}:function(a,b){e(a,null==b?"":b)}}return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Cb(a,b){if("__defineGetter__"===a||"__defineSetter__"===a||"__lookupGetter__"===a||"__lookupSetter__"===a||"__proto__"===a)throw ie("isecfld",b);return a}function Db(a,b){if(a+="",!w(a))throw ie("iseccst",b);return a}function Eb(a,b){if(a){if(a.constructor===a)throw ie("isecfn",b);if(a.window===a)throw ie("isecwindow",b);if(a.children&&(a.nodeName||a.prop&&a.attr&&a.find))throw ie("isecdom",b);if(a===Object)throw ie("isecobj",b)}return a}function Fb(a,b){if(a){if(a.constructor===a)throw ie("isecfn",b);if(a===je||a===ke||a===le)throw ie("isecff",b)}}function Gb(a,b){if(a&&(a===(0).constructor||a===(!1).constructor||a==="".constructor||a==={}.constructor||a===[].constructor||a===Function.constructor))throw ie("isecaf",b)}function Hb(a,b){return"undefined"!=typeof a?a:b}function Ib(a,b){return"undefined"==typeof a?b:"undefined"==typeof b?a:a+b}function Jb(a,b){var c,d;switch(a.type){case pe.Program:c=!0,f(a.body,function(a){Jb(a.expression,b),c=c&&a.expression.constant}),a.constant=c;break;case pe.Literal:a.constant=!0,a.toWatch=[];break;case pe.UnaryExpression:Jb(a.argument,b),a.constant=a.argument.constant,a.toWatch=a.argument.toWatch;break;case pe.BinaryExpression:Jb(a.left,b),Jb(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case pe.LogicalExpression:Jb(a.left,b),Jb(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=a.constant?[]:[a];break;case pe.ConditionalExpression:Jb(a.test,b),Jb(a.alternate,b),Jb(a.consequent,b),a.constant=a.test.constant&&a.alternate.constant&&a.consequent.constant,a.toWatch=a.constant?[]:[a];break;case pe.Identifier:a.constant=!1,a.toWatch=[a];break;case pe.MemberExpression:Jb(a.object,b),a.computed&&Jb(a.property,b),a.constant=a.object.constant&&(!a.computed||a.property.constant),a.toWatch=[a];break;case pe.CallExpression:c=!!a.filter&&!b(a.callee.name).$stateful,d=[],f(a.arguments,function(a){Jb(a,b),c=c&&a.constant,a.constant||d.push.apply(d,a.toWatch)}),a.constant=c,a.toWatch=a.filter&&!b(a.callee.name).$stateful?d:[a];break;case pe.AssignmentExpression:Jb(a.left,b),Jb(a.right,b),a.constant=a.left.constant&&a.right.constant,a.toWatch=[a];break;case pe.ArrayExpression:c=!0,d=[],f(a.elements,function(a){Jb(a,b),c=c&&a.constant,a.constant||d.push.apply(d,a.toWatch)}),a.constant=c,a.toWatch=d;break;case pe.ObjectExpression:c=!0,d=[],f(a.properties,function(a){Jb(a.value,b),c=c&&a.value.constant,a.value.constant||d.push.apply(d,a.value.toWatch)}),a.constant=c,a.toWatch=d;break;case pe.ThisExpression:a.constant=!1,a.toWatch=[]}}function Kb(a){if(1==a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:c}}function Lb(a){return a.type===pe.Identifier||a.type===pe.MemberExpression}function Mb(a){if(1===a.body.length&&Lb(a.body[0].expression))return{type:pe.AssignmentExpression,left:a.body[0].expression,right:{type:pe.NGValueParameter},operator:"="}}function Nb(a){return 0===a.body.length||1===a.body.length&&(a.body[0].expression.type===pe.Literal||a.body[0].expression.type===pe.ArrayExpression||a.body[0].expression.type===pe.ObjectExpression)}function Ob(a,b){this.astBuilder=a,this.$filter=b}function Pb(a,b){this.astBuilder=a,this.$filter=b}function Qb(a){return"constructor"==a}function Rb(a){return z(a.valueOf)?a.valueOf():re.call(a)}function Sb(){var a=ja(),b=ja();this.$get=["$filter",function(d){function e(c,e,f){var h,n,s;switch(f=f||r,typeof c){case"string":s=c=c.trim();var t=f?b:a;if(h=t[s],!h){":"===c.charAt(0)&&":"===c.charAt(1)&&(n=!0,c=c.substring(2)),h=f?q:p;var u=new oe(h);h=new qe(u,d,h).parse(c),h.constant?h.$$watchDelegate=l:n?h.$$watchDelegate=h.literal?k:j:h.inputs&&(h.$$watchDelegate=i),f&&(h=g(h)),t[s]=h}return m(h,e);case"function":return m(c,e);default:return m(o,e)}}function g(a){function b(b,c,d,e){var f=r;r=!0;try{return a(b,c,d,e)}finally{r=f}}if(!a)return a;b.$$watchDelegate=a.$$watchDelegate,b.assign=g(a.assign),b.constant=a.constant,b.literal=a.literal;for(var c=0;a.inputs&&c=this.promise.$$state.status&&d&&d.length&&a(function(){for(var a,e,f=0,g=d.length;fa)for(b in k++,f)Vc.call(d,b)||(p--,delete f[b])}else f!==d&&(f=d,k++);return k}}c.$stateful=!0;var d,f,g,h=this,i=1s&&(q=4-s,u[q]||(u[q]=[]),u[q].push({msg:z(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:d,oldVal:e}))}catch(B){i(B)}if(!(l=o.$$watchersCount&&o.$$childHead||o!==this&&o.$$nextSibling))for(;o!==this&&!(l=o.$$nextSibling);)o=o.$parent}while(o=l);if((n||y.length)&&!s--)throw x.$$phase=null,c("infdig",b,u)}while(n||y.length);for(x.$$phase=null;A.length;)try{A.shift()()}catch(C){i(C)}},$destroy:function(){if(!this.$$destroyed){var a=this.$parent;this.$broadcast("$destroy"),this.$$destroyed=!0,this===x&&k.$$applicationDestroyed(),q(this,-this.$$watchersCount);for(var b in this.$$listenerCount)r(this,this.$$listenerCount[b],b);a&&a.$$childHead==this&&(a.$$childHead=this.$$nextSibling),a&&a.$$childTail==this&&(a.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=o,this.$on=this.$watch=this.$watchGroup=function(){return o},this.$$listeners={},this.$$nextSibling=null,m(this)}},$eval:function(a,b){return j(a)(this,b)},$evalAsync:function(a,b){x.$$phase||y.length||k.defer(function(){y.length&&x.$digest()}),y.push({scope:this,expression:j(a),locals:b})},$$postDigest:function(a){A.push(a)},$apply:function(a){try{p("$apply");try{return this.$eval(a)}finally{x.$$phase=null}}catch(b){i(b)}finally{try{x.$digest()}catch(c){throw i(c),c}}},$applyAsync:function(a){function b(){c.$eval(a)}var c=this;a&&B.push(b),a=j(a),w()},$on:function(a,b){var c=this.$$listeners[a];c||(this.$$listeners[a]=c=[]),c.push(b);var d=this;do d.$$listenerCount[a]||(d.$$listenerCount[a]=0),d.$$listenerCount[a]++;while(d=d.$parent);var e=this;return function(){var d=c.indexOf(b);-1!==d&&(c[d]=null,r(e,1,a))}},$emit:function(a,b){var c,d,e,f=[],g=this,h=!1,j={name:a,targetScope:g,stopPropagation:function(){h=!0},preventDefault:function(){j.defaultPrevented=!0},defaultPrevented:!1},k=M([j],arguments,1);do{for(c=g.$$listeners[a]||f,j.currentScope=g,d=0,e=c.length;dPc)throw se("iequirks");var d=K(te);d.isEnabled=function(){return a},d.trustAs=c.trustAs,d.getTrusted=c.getTrusted,d.valueOf=c.valueOf,a||(d.trustAs=d.getTrusted=function(a,b){return b},d.valueOf=p),d.parseAs=function(a,c){var e=b(c);return e.literal&&e.constant?e:b(c,function(b){return d.getTrusted(a,b)})};var e=d.parseAs,g=d.getTrusted,h=d.trustAs;return f(te,function(a,b){var c=Uc(b);d[ma("parse_as_"+c)]=function(b){return e(a,b)},d[ma("get_trusted_"+c)]=function(b){return g(a,b)},d[ma("trust_as_"+c)]=function(b){return h(a,b)}}),d}]}function bc(){this.$get=["$window","$document",function(a,b){var c,d={},e=m((/android (\d+)/.exec(Uc((a.navigator||{}).userAgent))||[])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},h=/^(Moz|webkit|ms)(?=[A-Z])/,i=g.body&&g.body.style,j=!1,k=!1;if(i){for(var l in i)if(j=h.exec(l)){c=j[0],c=c.substr(0,1).toUpperCase()+c.substr(1);break}c||(c="WebkitOpacity"in i&&"webkit"),j=!!("transition"in i||c+"Transition"in i),k=!!("animation"in i||c+"Animation"in i),!e||j&&k||(j=w(i.webkitTransition),k=w(i.webkitAnimation))}return{history:!(!a.history||!a.history.pushState||4>e||f),hasEvent:function(a){if("input"===a&&11>=Pc)return!1;if(s(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:id(),vendorPrefix:c,transitions:j,animations:k,android:e}}]}function cc(){this.$get=["$templateCache","$http","$q","$sce",function(a,b,c,d){function e(f,g){e.totalPendingRequests++,w(f)&&!s(a.get(f))||(f=d.getTrustedResourceUrl(f));var h=b.defaults&&b.defaults.transformResponse;return ed(h)?h=h.filter(function(a){return a!==fb}):h===fb&&(h=null),b.get(f,{cache:a,transformResponse:h})["finally"](function(){e.totalPendingRequests--}).then(function(b){return a.put(f,b.data),b.data},function(a){if(!g)throw Td("tpload",f,a.status,a.statusText);return c.reject(a)})}return e.totalPendingRequests=0,e}]}function dc(){this.$get=["$rootScope","$browser","$location",function(a,b,c){return{findBindings:function(a,b,c){a=a.getElementsByClassName("ng-binding");var d=[];return f(a,function(a){var e=bd.element(a).data("$binding");e&&f(e,function(e){c?new RegExp("(^|\\s)"+hd(b)+"(\\s|\\||$)").test(e)&&d.push(a):-1!=e.indexOf(b)&&d.push(a)})}),d},findModels:function(a,b,c){for(var d=["ng-","data-ng-","ng\\:"],e=0;ec&&(c=d),c+=+a.slice(d+1),a=a.substring(0,d)):0>c&&(c=a.length),d=0;a.charAt(d)==ye;d++);if(d==(f=a.length))b=[0],c=1;else{for(f--;a.charAt(f)==ye;)f--;for(c-=d,b=[],e=0;d<=f;d++,e++)b[e]=+a.charAt(d)}return c>we&&(b=b.splice(0,we-1),g=c-1,c=1),{d:b,e:g,i:c}}function sc(a,b,c,d){var e=a.d,f=e.length-a.i;if(b=s(b)?Math.min(Math.max(c,f),d):+b,c=b+a.i,d=e[c],0h;)i.unshift(0),h++;for(0=b.lgSize&&h.unshift(i.splice(-b.lgSize,i.length).join(""));i.length>b.gSize;)h.unshift(i.splice(-b.gSize,i.length).join(""));i.length&&h.unshift(i.join("")),i=h.join(c),f.length&&(i+=d+f.join("")),e&&(i+="e+"+e)}return 0>a&&!g?b.negPre+i+b.negSuf:b.posPre+i+b.posSuf}function uc(a,b,c){var d="";for(0>a&&(d="-",a=-a),a=""+a;a.length-c)&&(e+=c),0===e&&-12==c&&(e=12),uc(e,b,d)}}function wc(a,b){return function(c,d){var e=c["get"+a](),f=Wc(b?"SHORT"+a:a);return d[f][e]}}function xc(a){var b=new Date(a,0,1).getDay();return new Date(a,0,(4>=b?5:12)-b)}function yc(a){return function(b){var c=xc(b.getFullYear());return b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+c,b=1+Math.round(b/6048e5),uc(b,a)}}function zc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Ac(a){function b(a){var b;if(b=a.match(c)){a=new Date(0);var d=0,e=0,f=b[8]?a.setUTCFullYear:a.setFullYear,g=b[8]?a.setUTCHours:a.setHours;b[9]&&(d=m(b[9]+b[10]),e=m(b[9]+b[11])),f.call(a,m(b[1]),m(b[2])-1,m(b[3])),d=m(b[4]||0)-d,e=m(b[5]||0)-e,f=m(b[6]||0),b=Math.round(1e3*parseFloat("0."+(b[7]||0))),g.call(a,d,e,f,b)}return a}var c=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,e){var g,h,i="",j=[];if(d=d||"mediumDate",d=a.DATETIME_FORMATS[d]||d,w(c)&&(c=Be.test(c)?m(c):b(c)),x(c)&&(c=new Date(c)),!y(c)||!isFinite(c.getTime()))return c;for(;d;)(h=Ae.exec(d))?(j=M(j,h,1),d=j.pop()):(j.push(d),d=null);var k=c.getTimezoneOffset();return e&&(k=R(e,k),c=S(c,e,!0)),f(j,function(b){g=ze[b],i+=g?g(c,a.DATETIME_FORMATS,k):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),i}}function Bc(){return function(a,b){return s(b)&&(b=2),P(a,b)}}function Cc(){return function(a,b,c){return b=1/0===Math.abs(Number(b))?Number(b):m(b),isNaN(b)?a:(x(a)&&(a=a.toString()),ed(a)||w(a)?(c=!c||isNaN(c)?0:m(c),c=0>c?Math.max(0,a.length+c):c,0<=b?a.slice(c,c+b):0===c?a.slice(b,a.length):a.slice(Math.max(0,c+b),c)):a)}}function Dc(a){function b(b,c){return c=c?-1:1,b.map(function(b){var d=1,e=p;if(z(b))e=b;else if(w(b)&&("+"!=b.charAt(0)&&"-"!=b.charAt(0)||(d="-"==b.charAt(0)?-1:1,b=b.substring(1)),""!==b&&(e=a(b),e.constant)))var f=e(),e=function(a){return a[f]};return{get:e,descending:d*c}})}function c(a){switch(typeof a){case"number":case"boolean":case"string":return!0;default:return!1}}return function(a,d,f){if(!e(a))return a;ed(d)||(d=[d]),0===d.length&&(d=["+"]);var g=b(d,f);return g.push({get:function(){return{}},descending:f?-1:1}),a=Array.prototype.map.call(a,function(a,b){return{value:a,predicateValues:g.map(function(d){var e=d.get(a);return d=typeof e,null===e?(d="string",e="null"):"string"===d?e=e.toLowerCase():"object"===d&&("function"==typeof e.valueOf&&(e=e.valueOf(),c(e))||r(e)&&(e=e.toString(),c(e))||(e=b)),{value:e,type:d}})}}),a.sort(function(a,b){for(var c=0,d=0,e=g.length;db||37<=b&&40>=b||k(a,this,this.value)}),e.hasEvent("paste")&&b.on("paste cut",k)}b.on("change",j),Te[g]&&d.$$hasNativeValidators&&g===c.type&&b.on("keydown wheel mousedown",function(a){if(!i){var b=this.validity,c=b.badInput,d=b.typeMismatch;i=f.defer(function(){i=null,b.badInput===c&&b.typeMismatch===d||j(a)})}}),d.$render=function(){var a=d.$isEmpty(d.$viewValue)?"":d.$viewValue;b.val()!==a&&b.val(a)}}function Ic(a,b){return function(c,d){var e,g;if(y(c))return c;if(w(c)){if('"'==c.charAt(0)&&'"'==c.charAt(c.length-1)&&(c=c.substring(1,c.length-1)),Ke.test(c))return new Date(c);if(a.lastIndex=0,e=a.exec(c))return e.shift(),g=d?{yyyy:d.getFullYear(),MM:d.getMonth()+1,dd:d.getDate(),HH:d.getHours(),mm:d.getMinutes(),ss:d.getSeconds(),sss:d.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},f(e,function(a,c){c=q},h.$observe("min",function(a){q=n(a),i.$validate()})}if(t(h.max)||h.ngMax){var r;i.$validators.max=function(a){return!m(a)||s(r)||d(a)<=r},h.$observe("max",function(a){r=n(a),i.$validate()})}}}function Kc(a,b,d,e){(e.$$hasNativeValidators=u(b[0].validity))&&e.$parsers.push(function(a){var d=b.prop("validity")||{};return d.badInput&&!d.typeMismatch?c:a})}function Lc(a,b,c,d,e){if(t(d)){if(a=a(d),!a.constant)throw sf("constexpr",c,d);return a(b)}return e}function Mc(a,b){return a="ngClass"+a,["$animate",function(c){function d(a,b){var c=[],d=0;a:for(;d(?:<\/\1>|)$/,xd=/<|&#?\w+;/,yd=/<([\w:-]+)/,zd=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Ad={option:[1,'"],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};Ad.optgroup=Ad.option,Ad.tbody=Ad.tfoot=Ad.colgroup=Ad.caption=Ad.thead,Ad.th=Ad.td;var Bd=Node.prototype.contains||function(a){return!!(16&this.compareDocumentPosition(a))},Cd=qa.prototype={ready:function(c){function d(){e||(e=!0,c())}var e=!1;"complete"===b.readyState?setTimeout(d):(this.on("DOMContentLoaded",d),qa(a).on("load",d))},toString:function(){var a=[];return f(this,function(b){a.push(""+b)}),"["+a.join(", ")+"]"},eq:function(a){return Qc(0<=a?this[a]:this[this.length+a])},length:0,push:Zc,sort:[].sort,splice:[].splice},Dd={};f("multiple selected checked disabled readOnly required open".split(" "),function(a){Dd[Uc(a)]=a});var Ed={};f("input select option textarea button form details".split(" "),function(a){Ed[a]=!0});var Fd={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};f({data:wa,removeData:ua,hasData:function(a){for(var b in qd[a.ng339])return!0;return!1}},function(a,b){qa[b]=a}),f({data:wa,inheritedData:Ca,scope:function(a){return Qc.data(a,"$scope")||Ca(a.parentNode||a,["$isolateScope","$scope"])},isolateScope:function(a){return Qc.data(a,"$isolateScope")||Qc.data(a,"$isolateScopeNoTemplate")},controller:Ba,injector:function(a){return Ca(a,"$injector")},removeAttr:function(a,b){a.removeAttribute(b)},hasClass:xa,css:function(a,b,c){return b=ma(b),t(c)?void(a.style[b]=c):a.style[b]},attr:function(a,b,d){var e=a.nodeType;if(e!==od&&2!==e&&8!==e)if(e=Uc(b),Dd[e]){if(!t(d))return a[b]||(a.attributes.getNamedItem(b)||o).specified?e:c;d?(a[b]=!0,a.setAttribute(b,e)):(a[b]=!1,a.removeAttribute(e))}else if(t(d))a.setAttribute(b,d);else if(a.getAttribute)return a=a.getAttribute(b,2),null===a?c:a},prop:function(a,b,c){return t(c)?void(a[b]=c):a[b]},text:function(){function a(a,b){if(s(b)){var c=a.nodeType;return 1===c||c===od?a.textContent:""}a.textContent=b}return a.$dv="",a}(),val:function(a,b){if(s(b)){if(a.multiple&&"select"===H(a)){var c=[];return f(a.options,function(a){a.selected&&c.push(a.value||a.text)}),0===c.length?null:c}return a.value}a.value=b},html:function(a,b){return s(b)?a.innerHTML:(sa(a,!0),void(a.innerHTML=b))},empty:Da},function(a,b){qa.prototype[b]=function(b,c){var d,e,f=this.length;if(a!==Da&&s(2==a.length&&a!==xa&&a!==Ba?b:c)){if(u(b)){for(d=0;d <= >= && || ! = |".split(" "),function(a){me[a]=!0});var ne={n:"\n",f:"\f",r:"\r",t:"\t",v:"\x0B","'":"'",'"':'"'},oe=function(a){this.options=a};oe.prototype={constructor:oe,lex:function(a){for(this.text=a,this.index=0,this.tokens=[];this.index=a&&"string"==typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\x0B"===a||" "===a},isIdent:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,c){throw c=c||this.index,b=t(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,c)+"]":" "+c,ie("lexerr",a,b,this.text)},readNumber:function(){for(var a="",b=this.index;this.index","<=",">=");)b={type:pe.BinaryExpression,operator:a.text,left:b,right:this.additive()};return b},additive:function(){for(var a,b=this.multiplicative();a=this.expect("+","-");)b={type:pe.BinaryExpression,operator:a.text,left:b,right:this.multiplicative()};return b},multiplicative:function(){for(var a,b=this.unary();a=this.expect("*","/","%");)b={type:pe.BinaryExpression,operator:a.text,left:b,right:this.unary()};return b},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:pe.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.constants.hasOwnProperty(this.peek().text)?a=J(this.constants[this.consume().text]):this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression",this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:pe.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:pe.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:pe.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:pe.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression());return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text)do a.push(this.expression());while(this.expect(","));return a},identifier:function(){var a=this.consume();return a.identifier||this.throwError("is not a valid identifier",a),{type:pe.Identifier,name:a.text}},constant:function(){return{type:pe.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:pe.ArrayExpression,elements:a}},object:function(){var a,b=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;a={type:pe.Property,kind:"init"},this.peek().constant?a.key=this.constant():this.peek().identifier?a.key=this.identifier():this.throwError("invalid key",this.peek()),this.consume(":"),a.value=this.expression(),b.push(a)}while(this.expect(","));return this.consume("}"),{type:pe.ObjectExpression,properties:b}},throwError:function(a,b){throw ie("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index))},consume:function(a){if(0===this.tokens.length)throw ie("ueoe",this.text);var b=this.expect(a);return b||this.throwError("is unexpected, expecting ["+a+"]",this.peek()),b},peekToken:function(){if(0===this.tokens.length)throw ie("ueoe",this.text);return this.tokens[0]},peek:function(a,b,c,d){return this.peekAhead(0,a,b,c,d)},peekAhead:function(a,b,c,d,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===c||f===d||f===e||!(b||c||d||e))return a}return!1},expect:function(a,b,c,d){return!!(a=this.peek(a,b,c,d))&&(this.tokens.shift(),a)},constants:{"true":{type:pe.Literal,value:!0},"false":{type:pe.Literal,value:!1},"null":{type:pe.Literal,value:null},undefined:{type:pe.Literal,value:c},"this":{type:pe.ThisExpression}}},Ob.prototype={compile:function(a,b){var d=this,e=this.astBuilder.ast(a);this.state={nextId:0,filters:{},expensiveChecks:b,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},Jb(e,d.$filter);var g,h="";return this.stage="assign",(g=Mb(e))&&(this.state.computing="assign",h=this.nextId(),this.recurse(g,h),this.return_(h),h="fn.assign="+this.generateFunction("assign","s,v,l")),g=Kb(e.body),d.stage="inputs",f(g,function(a,b){var c="fn"+b;d.state[c]={vars:[],body:[],own:{}},d.state.computing=c;var e=d.nextId();d.recurse(a,e),d.return_(e),d.state.inputs.push(c),a.watchId=b}),this.state.computing="fn",this.stage="main",this.recurse(e),h='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+h+this.watchFns()+"return fn;",h=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",h)(this.$filter,Cb,Eb,Fb,Db,Gb,Hb,Ib,a),this.state=this.stage=c,h.literal=Nb(e),h.constant=e.constant,h},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,c=this;return f(b,function(b){a.push("var "+b+"="+c.generateFunction(b,"s"))}),b.length&&a.push("fn.inputs=["+b.join(",")+"];"),a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;return f(this.state.filters,function(c,d){a.push(c+"=$filter("+b.escape(d)+")")}),a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")},recurse:function(a,b,d,e,g,h){var i,j,k,l,m=this;if(e=e||o,!h&&t(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,e,g,!0));else switch(a.type){case pe.Program:f(a.body,function(b,d){m.recurse(b.expression,c,c,function(a){j=a}),d!==a.body.length-1?m.current().body.push(j,";"):m.return_(j)});break;case pe.Literal:l=this.escape(a.value),this.assign(b,l),e(l);break;case pe.UnaryExpression:this.recurse(a.argument,c,c,function(a){j=a}),l=a.operator+"("+this.ifDefined(j,0)+")",this.assign(b,l),e(l);break;case pe.BinaryExpression:this.recurse(a.left,c,c,function(a){i=a}),this.recurse(a.right,c,c,function(a){j=a}),l="+"===a.operator?this.plus(i,j):"-"===a.operator?this.ifDefined(i,0)+a.operator+this.ifDefined(j,0):"("+i+")"+a.operator+"("+j+")",this.assign(b,l),e(l);break;case pe.LogicalExpression:b=b||this.nextId(),m.recurse(a.left,b),m.if_("&&"===a.operator?b:m.not(b),m.lazyRecurse(a.right,b)),e(b);break;case pe.ConditionalExpression:b=b||this.nextId(),m.recurse(a.test,b),m.if_(b,m.lazyRecurse(a.alternate,b),m.lazyRecurse(a.consequent,b)),e(b);break;case pe.Identifier:b=b||this.nextId(),d&&(d.context="inputs"===m.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name),Cb(a.name),m.if_("inputs"===m.stage||m.not(m.getHasOwnProperty("l",a.name)),function(){m.if_("inputs"===m.stage||"s",function(){g&&1!==g&&m.if_(m.not(m.nonComputedMember("s",a.name)),m.lazyAssign(m.nonComputedMember("s",a.name),"{}")),m.assign(b,m.nonComputedMember("s",a.name))})},b&&m.lazyAssign(b,m.nonComputedMember("l",a.name))),(m.state.expensiveChecks||Qb(a.name))&&m.addEnsureSafeObject(b),e(b);break;case pe.MemberExpression:i=d&&(d.context=this.nextId())||this.nextId(),b=b||this.nextId(),m.recurse(a.object,i,c,function(){m.if_(m.notNull(i),function(){g&&1!==g&&m.addEnsureSafeAssignContext(i),a.computed?(j=m.nextId(),m.recurse(a.property,j),m.getStringValue(j),m.addEnsureSafeMemberName(j),g&&1!==g&&m.if_(m.not(m.computedMember(i,j)),m.lazyAssign(m.computedMember(i,j),"{}")),l=m.ensureSafeObject(m.computedMember(i,j)),m.assign(b,l),d&&(d.computed=!0,d.name=j)):(Cb(a.property.name),g&&1!==g&&m.if_(m.not(m.nonComputedMember(i,a.property.name)),m.lazyAssign(m.nonComputedMember(i,a.property.name),"{}")),l=m.nonComputedMember(i,a.property.name),(m.state.expensiveChecks||Qb(a.property.name))&&(l=m.ensureSafeObject(l)),m.assign(b,l),d&&(d.computed=!1,d.name=a.property.name))},function(){m.assign(b,"undefined")}),e(b)},!!g);break;case pe.CallExpression:b=b||this.nextId(),a.filter?(j=m.filter(a.callee.name),k=[],f(a.arguments,function(a){var b=m.nextId();m.recurse(a,b),k.push(b)}),l=j+"("+k.join(",")+")",m.assign(b,l),e(b)):(j=m.nextId(),i={},k=[],m.recurse(a.callee,j,i,function(){m.if_(m.notNull(j),function(){m.addEnsureSafeFunction(j),f(a.arguments,function(a){m.recurse(a,m.nextId(),c,function(a){k.push(m.ensureSafeObject(a))})}),i.name?(m.state.expensiveChecks||m.addEnsureSafeObject(i.context),l=m.member(i.context,i.name,i.computed)+"("+k.join(",")+")"):l=j+"("+k.join(",")+")",l=m.ensureSafeObject(l),m.assign(b,l)},function(){m.assign(b,"undefined")}),e(b)}));break;case pe.AssignmentExpression:if(j=this.nextId(),i={},!Lb(a.left))throw ie("lval");this.recurse(a.left,c,i,function(){m.if_(m.notNull(i.context),function(){m.recurse(a.right,j),m.addEnsureSafeObject(m.member(i.context,i.name,i.computed)),m.addEnsureSafeAssignContext(i.context),l=m.member(i.context,i.name,i.computed)+a.operator+j,m.assign(b,l),e(b||l)})},1);break;case pe.ArrayExpression:k=[],f(a.elements,function(a){m.recurse(a,m.nextId(),c,function(a){k.push(a)})}),l="["+k.join(",")+"]",this.assign(b,l),e(l);break;case pe.ObjectExpression:k=[],f(a.properties,function(a){m.recurse(a.value,m.nextId(),c,function(b){k.push(m.escape(a.key.type===pe.Identifier?a.key.name:""+a.key.value)+":"+b)})}),l="{"+k.join(",")+"}",this.assign(b,l),e(l);break;case pe.ThisExpression:this.assign(b,"s"),e("s");break;case pe.NGValueParameter:this.assign(b,"v"),e("v")}},getHasOwnProperty:function(a,b){var c=a+"."+b,d=this.current().own;return d.hasOwnProperty(c)||(d[c]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")")),d[c]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){return this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0)),this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a,b,c){if(!0===a)b();else{var d=this.current().body;d.push("if(",a,"){"),b(),d.push("}"),c&&(d.push("else{"),c(),d.push("}"))}},not:function(a){return"!("+a+")"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){return a+"."+b},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,c){return c?this.computedMember(a,b):this.nonComputedMember(a,b)},addEnsureSafeObject:function(a){this.current().body.push(this.ensureSafeObject(a),";")},addEnsureSafeMemberName:function(a){this.current().body.push(this.ensureSafeMemberName(a),";")},addEnsureSafeFunction:function(a){this.current().body.push(this.ensureSafeFunction(a),";")},addEnsureSafeAssignContext:function(a){this.current().body.push(this.ensureSafeAssignContext(a),";")},ensureSafeObject:function(a){return"ensureSafeObject("+a+",text)"},ensureSafeMemberName:function(a){return"ensureSafeMemberName("+a+",text)"},ensureSafeFunction:function(a){return"ensureSafeFunction("+a+",text)"},getStringValue:function(a){this.assign(a,"getStringValue("+a+",text)")},ensureSafeAssignContext:function(a){return"ensureSafeAssignContext("+a+",text)"},lazyRecurse:function(a,b,c,d,e,f){var g=this;return function(){g.recurse(a,b,c,d,e,f)}},lazyAssign:function(a,b){var c=this;return function(){c.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(w(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(x(a))return a.toString();if(!0===a)return"true";if(!1===a)return"false";if(null===a)return"null";if("undefined"==typeof a)return"undefined";throw ie("esc")},nextId:function(a,b){var c="v"+this.state.nextId++;return a||this.current().vars.push(c+(b?"="+b:"")),c},current:function(){return this.state[this.state.computing]}},Pb.prototype={compile:function(a,b){var c=this,d=this.astBuilder.ast(a);this.expression=a,this.expensiveChecks=b,Jb(d,c.$filter);var e,g;(e=Mb(d))&&(g=this.recurse(e)),e=Kb(d.body);var h;e&&(h=[],f(e,function(a,b){var d=c.recurse(a);a.input=d,h.push(d),a.watchId=b}));var i=[];return f(d.body,function(a){i.push(c.recurse(a.expression))}),e=0===d.body.length?function(){}:1===d.body.length?i[0]:function(a,b){var c;return f(i,function(d){c=d(a,b)}),c},g&&(e.assign=function(a,b,c){return g(a,c,b)}),h&&(e.inputs=h),e.literal=Nb(d),e.constant=d.constant,e},recurse:function(a,b,d){var e,g,h,i=this;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case pe.Literal:return this.value(a.value,b);case pe.UnaryExpression:return g=this.recurse(a.argument),this["unary"+a.operator](g,b);case pe.BinaryExpression:return e=this.recurse(a.left),g=this.recurse(a.right),this["binary"+a.operator](e,g,b);case pe.LogicalExpression:return e=this.recurse(a.left),g=this.recurse(a.right),this["binary"+a.operator](e,g,b);case pe.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case pe.Identifier:return Cb(a.name,i.expression),i.identifier(a.name,i.expensiveChecks||Qb(a.name),b,d,i.expression);case pe.MemberExpression:return e=this.recurse(a.object,!1,!!d),a.computed||(Cb(a.property.name,i.expression),g=a.property.name),a.computed&&(g=this.recurse(a.property)),a.computed?this.computedMember(e,g,b,d,i.expression):this.nonComputedMember(e,g,i.expensiveChecks,b,d,i.expression);case pe.CallExpression:return h=[],f(a.arguments,function(a){h.push(i.recurse(a))}),a.filter&&(g=this.$filter(a.callee.name)),a.filter||(g=this.recurse(a.callee,!0)),a.filter?function(a,d,e,f){for(var i=[],j=0;j":function(a,b,c){return function(d,e,f,g){return d=a(d,e,f,g)>b(d,e,f,g),c?{value:d}:d}},"binary<=":function(a,b,c){return function(d,e,f,g){return d=a(d,e,f,g)<=b(d,e,f,g),c?{value:d}:d}},"binary>=":function(a,b,c){return function(d,e,f,g){return d=a(d,e,f,g)>=b(d,e,f,g),c?{value:d}:d}},"binary&&":function(a,b,c){return function(d,e,f,g){return d=a(d,e,f,g)&&b(d,e,f,g),c?{value:d}:d}},"binary||":function(a,b,c){return function(d,e,f,g){return d=a(d,e,f,g)||b(d,e,f,g),c?{value:d}:d}},"ternary?:":function(a,b,c,d){return function(e,f,g,h){return e=a(e,f,g,h)?b(e,f,g,h):c(e,f,g,h),d?{value:e}:e}},value:function(a,b){return function(){return b?{context:c,name:c,value:a}:a}},identifier:function(a,b,d,e,f){return function(g,h,i,j){return g=h&&a in h?h:g,e&&1!==e&&g&&!g[a]&&(g[a]={}),h=g?g[a]:c,b&&Eb(h,f),d?{context:g,name:a,value:h}:h}},computedMember:function(a,b,c,d,e){return function(f,g,h,i){var j,k,l=a(f,g,h,i);return null!=l&&(j=b(f,g,h,i),j=Db(j),Cb(j,e),d&&1!==d&&(Gb(l),l&&!l[j]&&(l[j]={})),k=l[j],Eb(k,e)),c?{context:l,name:j,value:k}:k}},nonComputedMember:function(a,b,d,e,f,g){return function(h,i,j,k){return h=a(h,i,j,k),f&&1!==f&&(Gb(h),h&&!h[b]&&(h[b]={})),i=null!=h?h[b]:c,(d||Qb(b))&&Eb(i,g),e?{context:h,name:b,value:i}:i}},inputs:function(a,b){return function(c,d,e,f){return f?f[b]:a(c,d,e)}}};var qe=function(a,b,c){this.lexer=a,this.$filter=b,this.options=c,this.ast=new pe(this.lexer),this.astCompiler=c.csp?new Pb(this.ast,b):new Ob(this.ast,b)};qe.prototype={constructor:qe,parse:function(a){return this.astCompiler.compile(a,this.options.expensiveChecks)}};var re=Object.prototype.valueOf,se=d("$sce"),te={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Td=d("$compile"),ue=b.createElement("a"),ve=fc(a.location.href);ic.$inject=["$document"],kc.$inject=["$provide"];var we=22,xe=".",ye="0";pc.$inject=["$locale"],qc.$inject=["$locale"];var ze={yyyy:vc("FullYear",4),yy:vc("FullYear",2,0,!0),y:vc("FullYear",1),MMMM:wc("Month"),MMM:wc("Month",!0),MM:vc("Month",2,1),M:vc("Month",1,1),dd:vc("Date",2),d:vc("Date",1),HH:vc("Hours",2),H:vc("Hours",1),hh:vc("Hours",2,-12),h:vc("Hours",1,-12),mm:vc("Minutes",2),m:vc("Minutes",1),ss:vc("Seconds",2),s:vc("Seconds",1),sss:vc("Milliseconds",3),EEEE:wc("Day"),EEE:wc("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,c){return a=-1*c,a=(0<=a?"+":"")+(uc(Math[0=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},Ae=/((?:[^yMdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Be=/^\-?\d+$/;Ac.$inject=["$locale"];var Ce=q(Uc),De=q(Wc);Dc.$inject=["$parse"];var Ee=q({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var c="[object SVGAnimatedString]"===$c.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(c)||a.preventDefault()})}}}}),Fe={};f(Dd,function(a,b){function c(a,c,e){a.$watch(e[d],function(a){e.$set(b,!!a)})}if("multiple"!=a){var d=Ya("ng-"+b),e=c;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[d]&&c(a,b,e)}),Fe[d]=function(){return{restrict:"A",priority:100,link:e}}}}),f(Fd,function(a,b){Fe[b]=function(){return{priority:100,link:function(a,c,d){return"ngPattern"===b&&"/"==d.ngPattern.charAt(0)&&(c=d.ngPattern.match(Tc))?void d.$set("ngPattern",new RegExp(c[1],c[2])):void a.$watch(d[b],function(a){d.$set(b,a)})}}}}),f(["src","srcset","href"],function(a){var b=Ya("ng-"+a);Fe[b]=function(){return{priority:99,link:function(c,d,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===$c.call(d.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){b?(e.$set(g,b),Pc&&f&&d.prop(f,e[g])):"href"===a&&e.$set(g,null)})}}}});var Ge={$addControl:o,$$renameControl:function(a,b){a.$name=b},$removeControl:o,$setValidity:o,$setDirty:o,$setPristine:o,$setSubmitted:o};Fc.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var He=function(a){return["$timeout","$parse",function(b,d){function e(a){return""===a?d('this[""]').assign:d(a).assign||o}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Fc,compile:function(d,f){d.addClass(pf).addClass(nf);var g=f.name?"name":!(!a||!f.ngForm)&&"ngForm";return{pre:function(a,d,f,h){var i=h[0];if(!("action"in f)){var j=function(b){a.$apply(function(){i.$commitViewValue(),i.$setSubmitted()}),b.preventDefault()};d[0].addEventListener("submit",j,!1),d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",j,!1)},0,!1)})}(h[1]||i.$$parentForm).$addControl(i);var l=g?e(i.$name):o;g&&(l(a,i),f.$observe(g,function(b){i.$name!==b&&(l(a,c),i.$$parentForm.$$renameControl(i,b),(l=e(i.$name))(a,i))})),d.on("$destroy",function(){i.$$parentForm.$removeControl(i),l(a,c),k(i,Ge)})}}}}}]},Ie=He(),Je=He(!0),Ke=/\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/,Le=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:\/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Me=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Ne=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,Oe=/^(\d{4})-(\d{2})-(\d{2})$/,Pe=/^(\d{4})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Qe=/^(\d{4})-W(\d\d)$/,Re=/^(\d{4})-(\d\d)$/,Se=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Te=ja();f(["date","datetime-local","month","time","week"],function(a){Te[a]=!0});var Ue={text:function(a,b,c,d,e,f){Hc(a,b,c,d,e,f),Gc(d)},date:Jc("date",Oe,Ic(Oe,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":Jc("datetimelocal",Pe,Ic(Pe,"yyyy MM dd HH mm ss sss".split(" ")),"yyyy-MM-ddTHH:mm:ss.sss"),time:Jc("time",Se,Ic(Se,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:Jc("week",Qe,function(a,b){if(y(a))return a;if(w(a)){Qe.lastIndex=0;var c=Qe.exec(a);if(c){var d=+c[1],e=+c[2],f=c=0,g=0,h=0,i=xc(d),e=7*(e-1);return b&&(c=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),h=b.getMilliseconds()),new Date(d,0,i.getDate()+e,c,f,g,h)}}return NaN},"yyyy-Www"),month:Jc("month",Re,Ic(Re,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,e,f,g){if(Kc(a,b,d,e),Hc(a,b,d,e,f,g),e.$$parserName="number",e.$parsers.push(function(a){return e.$isEmpty(a)?null:Ne.test(a)?parseFloat(a):c}),e.$formatters.push(function(a){if(!e.$isEmpty(a)){if(!x(a))throw sf("numfmt",a);a=a.toString()}return a}),t(d.min)||d.ngMin){var h;e.$validators.min=function(a){return e.$isEmpty(a)||s(h)||a>=h},d.$observe("min",function(a){t(a)&&!x(a)&&(a=parseFloat(a,10)),h=x(a)&&!isNaN(a)?a:c,e.$validate()})}if(t(d.max)||d.ngMax){var i;e.$validators.max=function(a){return e.$isEmpty(a)||s(i)||a<=i},d.$observe("max",function(a){t(a)&&!x(a)&&(a=parseFloat(a,10)),i=x(a)&&!isNaN(a)?a:c,e.$validate()})}},url:function(a,b,c,d,e,f){Hc(a,b,c,d,e,f),Gc(d),d.$$parserName="url",d.$validators.url=function(a,b){var c=a||b;return d.$isEmpty(c)||Le.test(c)}},email:function(a,b,c,d,e,f){Hc(a,b,c,d,e,f),Gc(d),d.$$parserName="email",d.$validators.email=function(a,b){var c=a||b;return d.$isEmpty(c)||Me.test(c)}},radio:function(a,b,c,d){s(c.name)&&b.attr("name",++cd),b.on("click",function(a){b[0].checked&&d.$setViewValue(c.value,a&&a.type)}),d.$render=function(){b[0].checked=c.value==d.$viewValue},c.$observe("value",d.$render)},checkbox:function(a,b,c,d,e,f,g,h){var i=Lc(h,a,"ngTrueValue",c.ngTrueValue,!0),j=Lc(h,a,"ngFalseValue",c.ngFalseValue,!1);b.on("click",function(a){d.$setViewValue(b[0].checked,a&&a.type)}),d.$render=function(){b[0].checked=d.$viewValue},d.$isEmpty=function(a){return!1===a},d.$formatters.push(function(a){return L(a,i)}),d.$parsers.push(function(a){return a?i:j})},hidden:o,button:o,submit:o,reset:o,file:o},Ve=["$browser","$sniffer","$filter","$parse",function(a,b,c,d){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,h){h[0]&&(Ue[Uc(g.type)]||Ue.text)(e,f,g,h[0],b,a,c,d)}}}}],We=/^(true|false|\d+)$/,Xe=function(){return{restrict:"A",priority:100,compile:function(a,b){return We.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},Ye=["$compile",function(a){return{restrict:"AC",compile:function(b){return a.$$addBindingClass(b),function(b,c,d){a.$$addBindingInfo(c,d.ngBind),c=c[0],b.$watch(d.ngBind,function(a){c.textContent=s(a)?"":a})}}}}],Ze=["$interpolate","$compile",function(a,b){ -return{compile:function(c){return b.$$addBindingClass(c),function(c,d,e){c=a(d.attr(e.$attr.ngBindTemplate)),b.$$addBindingInfo(d,c.expressions),d=d[0],e.$observe("ngBindTemplate",function(a){d.textContent=s(a)?"":a})}}}}],$e=["$sce","$parse","$compile",function(a,b,c){return{restrict:"A",compile:function(d,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});return c.$$addBindingClass(d),function(b,d,e){c.$$addBindingInfo(d,e.ngBindHtml),b.$watch(g,function(){var c=f(b);d.html(a.getTrustedHtml(c)||"")})}}}}],_e=q({restrict:"A",require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),af=Mc("",!0),bf=Mc("Odd",0),cf=Mc("Even",1),df=Ec({compile:function(a,b){b.$set("ngCloak",c),a.removeClass("ng-cloak")}}),ef=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ff={},gf={blur:!0,focus:!0};f("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=Ya("ng-"+a);ff[b]=["$parse","$rootScope",function(c,d){return{restrict:"A",compile:function(e,f){var g=c(f[b],null,!0);return function(b,c){c.on(a,function(c){var e=function(){g(b,{$event:c})};gf[a]&&d.$$phase?b.$evalAsync(e):b.$apply(e)})}}}}]});var hf=["$animate",function(a){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,i,j;c.$watch(e.ngIf,function(c){c?i||g(function(c,f){i=f,c[c.length++]=b.createComment(" end ngIf: "+e.ngIf+" "),h={clone:c},a.enter(c,d.parent(),d)}):(j&&(j.remove(),j=null),i&&(i.$destroy(),i=null),h&&(j=ia(h.clone),a.leave(j).then(function(){j=null}),h=null))})}}}],jf=["$templateRequest","$anchorScroll","$animate",function(a,b,c){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:bd.noop,compile:function(d,e){var f=e.ngInclude||e.src,g=e.onload||"",h=e.autoscroll;return function(d,e,i,j,k){var l,m,n,o=0,p=function(){m&&(m.remove(),m=null),l&&(l.$destroy(),l=null),n&&(c.leave(n).then(function(){m=null}),m=n,n=null)};d.$watch(f,function(f){var i=function(){!t(h)||h&&!d.$eval(h)||b()},m=++o;f?(a(f,!0).then(function(a){if(!d.$$destroyed&&m===o){var b=d.$new();j.template=a,a=k(b,function(a){p(),c.enter(a,null,e).then(i)}),l=b,n=a,l.$emit("$includeContentLoaded",f),d.$eval(g)}},function(){d.$$destroyed||m!==o||(p(),d.$emit("$includeContentError",f))}),d.$emit("$includeContentRequested",f)):(p(),j.template=null)})}}}}],kf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(c,d,e,f){/SVG/.test(d[0].toString())?(d.empty(),a(oa(f.template,b).childNodes)(c,function(a){d.append(a)},{futureParentElement:d})):(d.html(f.template),a(d.contents())(c))}}}],lf=Ec({priority:450,compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),mf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,e){var g=b.attr(d.$attr.ngList)||", ",h="false"!==d.ngTrim,i=h?gd(g):g;e.$parsers.push(function(a){if(!s(a)){var b=[];return a&&f(a.split(i),function(a){a&&b.push(h?gd(a):a)}),b}}),e.$formatters.push(function(a){return ed(a)?a.join(g):c}),e.$isEmpty=function(a){return!a||!a.length}}}},nf="ng-valid",of="ng-invalid",pf="ng-pristine",qf="ng-dirty",rf="ng-pending",sf=d("ngModel"),tf=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,b,d,e,g,h,i,j,k,l){this.$modelValue=this.$viewValue=Number.NaN,this.$$rawModelValue=c,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=c,this.$name=l(d.name||"",!1)(a),this.$$parentForm=Ge;var m,n=g(d.ngModel),p=n.assign,q=n,r=p,u=null,v=this;this.$$setOptions=function(a){if((v.$options=a)&&a.getterSetter){var b=g(d.ngModel+"()"),c=g(d.ngModel+"($$$p)");q=function(a){var c=n(a);return z(c)&&(c=b(a)),c},r=function(a,b){z(n(a))?c(a,{$$$p:v.$modelValue}):p(a,v.$modelValue)}}else if(!n.assign)throw sf("nonassign",d.ngModel,T(e))},this.$render=o,this.$isEmpty=function(a){return s(a)||""===a||null===a||a!==a};var w=0;Nc({ctrl:this,$element:e,set:function(a,b){a[b]=!0},unset:function(a,b){delete a[b]},$animate:h}),this.$setPristine=function(){v.$dirty=!1,v.$pristine=!0,h.removeClass(e,qf),h.addClass(e,pf)},this.$setDirty=function(){v.$dirty=!0,v.$pristine=!1,h.removeClass(e,pf),h.addClass(e,qf),v.$$parentForm.$setDirty()},this.$setUntouched=function(){v.$touched=!1,v.$untouched=!0,h.setClass(e,"ng-untouched","ng-touched")},this.$setTouched=function(){v.$touched=!0,v.$untouched=!1,h.setClass(e,"ng-touched","ng-untouched")},this.$rollbackViewValue=function(){i.cancel(u),v.$viewValue=v.$$lastCommittedViewValue,v.$render()},this.$validate=function(){if(!x(v.$modelValue)||!isNaN(v.$modelValue)){var a=v.$$rawModelValue,b=v.$valid,d=v.$modelValue,e=v.$options&&v.$options.allowInvalid;v.$$runValidators(a,v.$$lastCommittedViewValue,function(f){e||b===f||(v.$modelValue=f?a:c,v.$modelValue!==d&&v.$$writeModelToScope())})}},this.$$runValidators=function(a,b,d){function e(){var c=!0;return f(v.$validators,function(d,e){var f=d(a,b);c=c&&f,h(e,f)}),!!c||(f(v.$asyncValidators,function(a,b){h(b,null)}),!1)}function g(){var d=[],e=!0;f(v.$asyncValidators,function(f,g){var i=f(a,b);if(!i||!z(i.then))throw sf("nopromise",i);h(g,c),d.push(i.then(function(){h(g,!0)},function(a){e=!1,h(g,!1)}))}),d.length?k.all(d).then(function(){i(e)},o):i(!0)}function h(a,b){j===w&&v.$setValidity(a,b)}function i(a){j===w&&d(a)}w++;var j=w;(function(){var a=v.$$parserName||"parse";return s(m)?(h(a,null),!0):(m||(f(v.$validators,function(a,b){h(b,null)}),f(v.$asyncValidators,function(a,b){h(b,null)})),h(a,m),m)})()&&e()?g():i(!1)},this.$commitViewValue=function(){var a=v.$viewValue;i.cancel(u),(v.$$lastCommittedViewValue!==a||""===a&&v.$$hasNativeValidators)&&(v.$$lastCommittedViewValue=a,v.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){var b=v.$$lastCommittedViewValue;if(m=!s(b)||c)for(var d=0;de||d.$isEmpty(b)||b.length<=e}}}}},Tf=function(){return{restrict:"A",require:"?ngModel",link:function(a,b,c,d){if(d){var e=0;c.$observe("minlength",function(a){e=m(a)||0,d.$validate()}),d.$validators.minlength=function(a,b){return d.$isEmpty(b)||b.length>=e}}}}};a.angular.bootstrap?a.console&&console.log("WARNING: Tried to load angular more than once."):(da(),la(bd),bd.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1==b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "),WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a,d){var e=0|a,f=d;return c===f&&(f=Math.min(b(a),3)),Math.pow(10,f),1==e&&0==f?"one":"other"}})}]),Qc(b).ready(function(){$(b,_)}))}(window,document),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('');var duScrollDefaultEasing=function(a){return a<.5?Math.pow(2*a,2)/2:1-Math.pow(2*(1-a),2)/2},duScroll=angular.module("duScroll",["duScroll.scrollspy","duScroll.smoothScroll","duScroll.scrollContainer","duScroll.spyContext","duScroll.scrollHelpers"]).value("duScrollDuration",350).value("duScrollSpyWait",100).value("duScrollSpyRefreshInterval",0).value("duScrollGreedy",!1).value("duScrollOffset",0).value("duScrollEasing",duScrollDefaultEasing).value("duScrollCancelOnEvents","scroll mousedown mousewheel touchmove keydown").value("duScrollBottomSpy",!1).value("duScrollActiveClass","active");"undefined"!=typeof module&&module&&module.exports&&(module.exports=duScroll),angular.module("duScroll.scrollHelpers",["duScroll.requestAnimation"]).run(["$window","$q","cancelAnimation","requestAnimation","duScrollEasing","duScrollDuration","duScrollOffset","duScrollCancelOnEvents",function(a,b,c,d,e,f,g,h){var i={},j=function(a){return"undefined"!=typeof HTMLDocument&&a instanceof HTMLDocument||a.nodeType&&a.nodeType===a.DOCUMENT_NODE},k=function(a){return"undefined"!=typeof HTMLElement&&a instanceof HTMLElement||a.nodeType&&a.nodeType===a.ELEMENT_NODE},l=function(a){return k(a)||j(a)?a:a[0]};i.duScrollTo=function(b,c,d,e){var f;if(angular.isElement(b)?f=this.duScrollToElement:angular.isDefined(d)&&(f=this.duScrollToAnimated),f)return f.apply(this,arguments);var g=l(this);return j(g)?a.scrollTo(b,c):(g.scrollLeft=b,void(g.scrollTop=c))};var m,n;i.duScrollToAnimated=function(a,f,g,i){g&&!i&&(i=e);var j=this.duScrollLeft(),k=this.duScrollTop(),l=Math.round(a-j),o=Math.round(f-k),p=null,q=0,r=this,s=function(a){(!a||q&&a.which>0)&&(h&&r.unbind(h,s),c(m),n.reject(),m=null)};if(m&&s(),n=b.defer(),0===g||!l&&!o)return 0===g&&r.duScrollTo(a,f),n.resolve(),n.promise;var t=function(a){null===p&&(p=a),q=a-p;var b=q>=g?1:i(q/g);r.scrollTo(j+Math.ceil(l*b),k+Math.ceil(o*b)),b<1?m=d(t):(h&&r.unbind(h,s),m=null,n.resolve())};return r.duScrollTo(j,k),h&&r.bind(h,s),m=d(t),n.promise},i.duScrollToElement=function(a,b,c,d){var e=l(this);angular.isNumber(b)&&!isNaN(b)||(b=g);var f=this.duScrollTop()+l(a).getBoundingClientRect().top-b;return k(e)&&(f-=e.getBoundingClientRect().top),this.duScrollTo(0,f,c,d)},i.duScrollLeft=function(b,c,d){if(angular.isNumber(b))return this.duScrollTo(b,this.duScrollTop(),c,d);var e=l(this);return j(e)?a.scrollX||document.documentElement.scrollLeft||document.body.scrollLeft:e.scrollLeft},i.duScrollTop=function(b,c,d){if(angular.isNumber(b))return this.duScrollTo(this.duScrollLeft(),b,c,d);var e=l(this);return j(e)?a.scrollY||document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop},i.duScrollToElementAnimated=function(a,b,c,d){return this.duScrollToElement(a,b,c||f,d)},i.duScrollTopAnimated=function(a,b,c){return this.duScrollTop(a,b||f,c)},i.duScrollLeftAnimated=function(a,b,c){return this.duScrollLeft(a,b||f,c)},angular.forEach(i,function(a,b){angular.element.prototype[b]=a;var c=b.replace(/^duScroll/,"scroll");angular.isUndefined(angular.element.prototype[c])&&(angular.element.prototype[c]=a)})}]),angular.module("duScroll.polyfill",[]).factory("polyfill",["$window",function(a){var b=["webkit","moz","o","ms"];return function(c,d){if(a[c])return a[c];for(var e,f=c.substr(0,1).toUpperCase()+c.substr(1),g=0;g=h.scrollHeight;else{var m=e[0].body.scrollHeight||e[0].documentElement.scrollHeight;b=Math.round(d.pageYOffset+d.innerHeight)>=m}var n,o,p,q,r,s,t=j&&b?"bottom":"top";for(q=c.spies,o=c.currentlyActive,p=void 0,n=0;n=112&&123>=a},isVerticalMovement:function(b){return~[a.UP,a.DOWN].indexOf(b)},isHorizontalMovement:function(b){return~[a.LEFT,a.RIGHT,a.BACKSPACE,a.DELETE].indexOf(b)},toSeparator:function(b){var c={ENTER:"\n",TAB:"\t",SPACE:" "}[b];return c?c:a[b]?void 0:b}};void 0===angular.element.prototype.querySelectorAll&&(angular.element.prototype.querySelectorAll=function(a){return angular.element(this[0].querySelectorAll(a))}),void 0===angular.element.prototype.closest&&(angular.element.prototype.closest=function(a){for(var b=this[0],c=b.matches||b.webkitMatchesSelector||b.mozMatchesSelector||b.msMatchesSelector;b;){if(c.bind(b)(a))return b;b=b.parentElement}return!1});var b=0,c=angular.module("ui.select",[]).constant("uiSelectConfig",{theme:"bootstrap",searchEnabled:!0,sortable:!1,placeholder:"",refreshDelay:1e3,closeOnSelect:!0,skipFocusser:!1,dropdownPosition:"auto",removeSelected:!0,generateId:function(){return b++},appendToBody:!1}).service("uiSelectMinErr",function(){var a=angular.$$minErr("ui.select");return function(){var b=a.apply(this,arguments),c=b.message.replace(new RegExp("\nhttp://errors.angularjs.org/.*"),"");return new Error(c)}}).directive("uisTranscludeAppend",function(){return{link:function(a,b,c,d,e){e(a,function(a){b.append(a)})}}}).filter("highlight",function(){function a(a){return(""+a).replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(b,c){return c&&b?(""+b).replace(new RegExp(a(c),"gi"),'$&'):b}}).factory("uisOffset",["$document","$window",function(a,b){return 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)}}}]);c.directive("uiSelectChoices",["uiSelectConfig","uisRepeatParser","uiSelectMinErr","$compile","$window",function(a,b,c,d,e){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(b){b.addClass("ui-select-choices");var c=b.parent().attr("theme")||a.theme;return c+"/choices.tpl.html"},compile:function(d,f){if(!f.repeat)throw c("repeat","Expected 'repeat' expression.");var g=f.groupBy,h=f.groupFilter;if(g){var i=d.querySelectorAll(".ui-select-choices-group");if(1!==i.length)throw c("rows","Expected 1 .ui-select-choices-group but got '{0}'.",i.length);i.attr("ng-repeat",b.getGroupNgRepeatExpression())}var j=b.parse(f.repeat),k=d.querySelectorAll(".ui-select-choices-row");if(1!==k.length)throw c("rows","Expected 1 .ui-select-choices-row but got '{0}'.",k.length);k.attr("ng-repeat",j.repeatExpression(g)).attr("ng-if","$select.open");var l=d.querySelectorAll(".ui-select-choices-row-inner");if(1!==l.length)throw c("rows","Expected 1 .ui-select-choices-row-inner but got '{0}'.",l.length);l.attr("uis-transclude-append","");var m=e.document.addEventListener?k:l;return m.attr("ng-click","$select.select("+j.itemName+",$select.skipFocusser,$event)"),function(b,c,d,e){e.parseRepeatAttr(d.repeat,g,h),e.disableChoiceExpression=d.uiDisableChoice,e.onHighlightCallback=d.onHighlight,e.dropdownPosition=d.position?d.position.toLowerCase():a.dropdownPosition,b.$on("$destroy",function(){k.remove()}),b.$watch("$select.search",function(a){a&&!e.open&&e.multiple&&e.activate(!1,!0),e.activeIndex=e.tagging.isActivated?-1:0,!d.minimumInputLength||e.search.length>=d.minimumInputLength?e.refresh(d.refresh):e.items=[]}),d.$observe("refreshDelay",function(){var c=b.$eval(d.refreshDelay);e.refreshDelay=void 0!==c?c:a.refreshDelay})}}}}]),c.controller("uiSelectCtrl",["$scope","$element","$timeout","$filter","$$uisDebounce","uisRepeatParser","uiSelectMinErr","uiSelectConfig","$parse","$injector","$window",function(b,c,d,e,f,g,h,i,j,k,l){function m(a,b,c){if(a.findIndex)return a.findIndex(b,c);for(var d,e=Object(a),f=e.length>>>0,g=0;f>g;g++)if(d=e[g],b.call(c,d,g,e))return g;return-1}function n(){(s.resetSearchInput||void 0===s.resetSearchInput&&i.resetSearchInput)&&(s.search=t,s.selected&&s.items.length&&!s.multiple&&(s.activeIndex=m(s.items,function(a){return angular.equals(this,a)},s.selected)))}function o(){(s.setSearchToAnswer||void 0===s.setSearchToAnswer&&i.setSearchToAnswer)&&(console.log("searchBy: "+s.searchBy),s.searchBy&&(console.log("_setSearchToAnswer"),s.resetSearchInput=!1,s.search=s.selected[s.searchBy]))}function p(a,b){var c,d,e=[];for(c=0;c0||0===s.search.length&&s.tagging.isActivated&&s.activeIndex>-1)&&s.activeIndex--;break;case a.TAB:s.multiple&&!s.open||s.select(s.items[s.activeIndex],!0);break;case a.ENTER:s.open&&(s.tagging.isActivated||s.activeIndex>=0)?s.select(s.items[s.activeIndex],s.skipFocusser):s.activate(!1,!0);break;case a.ESC:s.close();break;default:c=!1}return c}function r(){var a=c.querySelectorAll(".ui-select-choices-content"),b=a.querySelectorAll(".ui-select-choices-row");if(b.length<1)throw h("choices","Expected multiple .ui-select-choices-row but got '{0}'.",b.length);if(!(s.activeIndex<0)){var d=b[s.activeIndex],e=d.offsetTop+d.clientHeight-a[0].scrollTop,f=a[0].offsetHeight;e>f?a[0].scrollTop+=e-f:e=s.items.length?0:s.activeIndex,-1===s.activeIndex&&s.taggingLabel!==!1&&(s.activeIndex=0);var f=c.querySelectorAll(".ui-select-choices-content"),g=c.querySelectorAll(".ui-select-search");if(s.$animate&&s.$animate.on&&s.$animate.enabled(f[0])){var h=function(b,c){"start"===c&&0===s.items.length?(s.$animate.off("removeClass",g[0],h),d(function(){s.focusSearchInput(a)})):"close"===c&&(s.$animate.off("enter",f[0],h),d(function(){s.focusSearchInput(a)}))};s.items.length>0?s.$animate.on("enter",f[0],h):s.$animate.on("removeClass",g[0],h)}else d(function(){s.focusSearchInput(a),!s.tagging.isActivated&&s.items.length>1&&r()})}},s.focusSearchInput=function(a){s.search=a||s.search,s.searchInput[0].focus()},s.findGroupByName=function(a){return s.groups&&s.groups.filter(function(b){return b.name===a})[0]},s.parseRepeatAttr=function(a,c,d){function e(a){var e=b.$eval(c);if(s.groups=[],angular.forEach(a,function(a){var b=angular.isFunction(e)?e(a):a[e],c=s.findGroupByName(b);c?c.items.push(a):s.groups.push({name:b,items:[a]})}),d){var f=b.$eval(d);angular.isFunction(f)?s.groups=f(s.groups):angular.isArray(f)&&(s.groups=p(s.groups,f))}s.items=[],s.groups.forEach(function(a){s.items=s.items.concat(a.items)})}function f(a){s.items=a}s.setItemsFn=c?e:f,s.parserResult=g.parse(a),s.isGrouped=!!c,s.itemProperty=s.parserResult.itemName;var i=s.parserResult.source,k=function(){var a=i(b);b.$uisSource=Object.keys(a).map(function(b){var c={};return c[s.parserResult.keyName]=b,c.value=a[b],c})};s.parserResult.keyName&&(k(),s.parserResult.source=j("$uisSource"+s.parserResult.filters),b.$watch(i,function(a,b){a!==b&&k()},!0)),s.refreshItems=function(a){a=a||s.parserResult.source(b);var c=s.selected;if(s.isEmpty()||angular.isArray(c)&&!c.length||!s.removeSelected)s.setItemsFn(a);else if(void 0!==a){var d=a.filter(function(a){return angular.isArray(c)?c.every(function(b){return!angular.equals(a,b)}):!angular.equals(a,c)});s.setItemsFn(d)}"auto"!==s.dropdownPosition&&"up"!==s.dropdownPosition||b.calculateDropdownPos(),b.$broadcast("uis:refresh")},b.$watchCollection(s.parserResult.source,function(a){if(void 0===a||null===a)s.items=[];else{if(!angular.isArray(a))throw h("items","Expected an array but got '{0}'.",a);s.refreshItems(a),angular.isDefined(s.ngModel.$modelValue)&&(s.ngModel.$modelValue=null)}})};var u;s.refresh=function(a){void 0!==a&&(u&&d.cancel(u),u=d(function(){b.$eval(a)},s.refreshDelay))},s.isActive=function(a){if(!s.open)return!1;var b=s.items.indexOf(a[s.itemProperty]),c=b==s.activeIndex;return!(!c||0>b)&&(c&&!angular.isUndefined(s.onHighlightCallback)&&a.$eval(s.onHighlightCallback),c)};var v=function(a){return s.selected&&angular.isArray(s.selected)&&s.selected.filter(function(b){return angular.equals(b,a)}).length>0};s.isDisabled=function(a){if(s.open){var b,c=s.items.indexOf(a[s.itemProperty]),d=!1;return c>=0&&(!angular.isUndefined(s.disableChoiceExpression)||s.multiple)&&(b=s.items[c],d=!!a.$eval(s.disableChoiceExpression)||v(b),b._uiSelectChoiceDisabled=d),d}},s.select=function(a,c,e){if(void 0===a||!a._uiSelectChoiceDisabled){if(!s.items&&!s.search&&!s.tagging.isActivated)return;if(!a||!a._uiSelectChoiceDisabled){if(s.tagging.isActivated){if(s.taggingLabel===!1)if(s.activeIndex<0){if(a=void 0!==s.tagging.fct?s.tagging.fct(s.search):s.search,!a||angular.equals(s.items[0],a))return}else a=s.items[s.activeIndex];else if(0===s.activeIndex){if(void 0===a)return;if(void 0!==s.tagging.fct&&"string"==typeof a){if(a=s.tagging.fct(a),!a)return}else"string"==typeof a&&(a=a.replace(s.taggingLabel,"").trim())}if(v(a))return void s.close(c)}b.$broadcast("uis:select",a);var f={};f[s.parserResult.itemName]=a,d(function(){s.onSelectCallback(b,{$item:a,$model:s.parserResult.modelMapper(b,f)})}),s.closeOnSelect&&s.close(c),e&&"click"===e.type&&(s.clickTriggeredSelect=!0)}}},s.close=function(a){s.open&&(s.ngModel&&s.ngModel.$setTouched&&s.ngModel.$setTouched(),n(),o(),s.open=!1,b.$broadcast("uis:close",a))},s.setFocus=function(){s.focus||s.focusInput[0].focus()},s.clear=function(a){s.select(void 0),a.stopPropagation(),d(function(){s.focusser[0].focus()},0,!1)},s.toggle=function(a){s.open?(s.close(),a.preventDefault(),a.stopPropagation()):s.activate()},s.isLocked=function(a,b){var c,d=s.selected[b];return d&&!angular.isUndefined(s.lockChoiceExpression)&&(c=!!a.$eval(s.lockChoiceExpression),d._uiSelectChoiceLocked=c),c};var w=null,x=!1;s.sizeSearchInput=function(){var a=s.searchInput[0],c=s.searchInput.parent().parent()[0],e=function(){return c.clientWidth*!!a.offsetParent},f=function(b){if(0===b)return!1;var c=b-a.offsetLeft-10;return 50>c&&(c=b),s.searchInput.css("width",c+"px"),!0};s.searchInput.css("width","10px"),d(function(){null!==w||f(e())||(w=b.$watch(function(){x||(x=!0,b.$$postDigest(function(){x=!1,f(e())&&(w(),w=null)}))},angular.noop))})},s.searchInput.on("keydown",function(c){var e=c.which;~[a.ENTER,a.ESC].indexOf(e)&&(c.preventDefault(),c.stopPropagation()),b.$apply(function(){var b=!1;if((s.items.length>0||s.tagging.isActivated)&&(q(e),s.taggingTokens.isActivated)){for(var f=0;f0&&(b=!0);b&&d(function(){s.searchInput.triggerHandler("tagged");var b=s.search.replace(a.MAP[c.keyCode],"").trim();s.tagging.fct&&(b=s.tagging.fct(b)),b&&s.select(b,!0)})}}),a.isVerticalMovement(e)&&s.items.length>0&&r(),e!==a.ENTER&&e!==a.ESC||(c.preventDefault(),c.stopPropagation())}),s.searchInput.on("paste",function(b){var c;if(c=window.clipboardData&&window.clipboardData.getData?window.clipboardData.getData("Text"):(b.originalEvent||b).clipboardData.getData("text/plain"),c=s.search+c,c&&c.length>0)if(s.taggingTokens.isActivated){for(var d=[],e=0;e-1){d=c.split(f);break}}if(0===d.length&&(d=[c]),d.length>0){var g=s.search;angular.forEach(d,function(a){var b=s.tagging.fct?s.tagging.fct(a):a;b&&s.select(b,!0)}),s.search=g||t,b.preventDefault(),b.stopPropagation()}}else s.paste&&(s.paste(c),s.search=t,b.preventDefault(),b.stopPropagation())}),s.searchInput.on("tagged",function(){d(function(){n()})});var y=f(function(){s.sizeSearchInput()},50);angular.element(l).bind("resize",y),b.$on("$destroy",function(){s.searchInput.off("keyup keydown tagged blur paste"),angular.element(l).off("resize",y)})}]),c.directive("uiSelect",["$document","uiSelectConfig","uiSelectMinErr","uisOffset","$compile","$parse","$timeout",function(a,b,c,d,e,f,g){return{restrict:"EA",templateUrl:function(a,c){var d=c.theme||b.theme;return d+(angular.isDefined(c.multiple)?"/select-multiple.tpl.html":"/select.tpl.html")},replace:!0,transclude:!0,require:["uiSelect","^ngModel"],scope:!0,controller:"uiSelectCtrl",controllerAs:"$select",compile:function(e,h){var i=/{(.*)}\s*{(.*)}/.exec(h.ngClass);if(i){var j="{"+i[1]+", "+i[2]+"}";h.ngClass=j,e.attr("ng-class",j)}return angular.isDefined(h.multiple)?e.append("").removeAttr("multiple"):e.append(""),h.inputId&&(e.querySelectorAll("input.ui-select-search")[0].id=h.inputId),function(e,h,i,j,k){function l(a){if(o.open){var b=!1;if(b=window.jQuery?window.jQuery.contains(h[0],a.target):h[0].contains(a.target),!b&&!o.clickTriggeredSelect){var c;if(o.skipFocusser)c=!0;else{var d=["input","button","textarea","select"],f=angular.element(a.target).controller("uiSelect");c=f&&f!==o,c||(c=~d.indexOf(a.target.tagName.toLowerCase()))}o.close(c),e.$digest()}o.clickTriggeredSelect=!1}}function m(){var b=d(h);r=angular.element('
'),r[0].style.width=b.width+"px",r[0].style.height=b.height+"px",h.after(r),s=h[0].style.width,a.find("body").append(h),h[0].style.position="absolute",h[0].style.left=b.left+"px",h[0].style.top=b.top+"px",h[0].style.width=b.width+"px"}function n(){null!==r&&(r.replaceWith(h),r=null,h[0].style.position="",h[0].style.left="",h[0].style.top="",h[0].style.width=s,o.setFocus())}var o=j[0],p=j[1];o.generatedId=b.generateId(),o.baseTitle=i.title||"Select box",o.focusserTitle=o.baseTitle+" focus",o.focusserId="focusser-"+o.generatedId,o.closeOnSelect=function(){return angular.isDefined(i.closeOnSelect)?f(i.closeOnSelect)():b.closeOnSelect}(),e.$watch("skipFocusser",function(){var a=e.$eval(i.skipFocusser);o.skipFocusser=void 0!==a?a:b.skipFocusser}),o.onSelectCallback=f(i.onSelect),o.onRemoveCallback=f(i.onRemove),o.ngModel=p,o.choiceGrouped=function(a){return o.isGrouped&&a&&a.name},i.tabindex&&i.$observe("tabindex",function(a){o.focusInput.attr("tabindex",a),h.removeAttr("tabindex")}),e.$watch("searchEnabled",function(){var a=e.$eval(i.searchEnabled);o.searchEnabled=void 0!==a?a:b.searchEnabled}),e.$watch("sortable",function(){var a=e.$eval(i.sortable);o.sortable=void 0!==a?a:b.sortable}),i.$observe("limit",function(){o.limit=angular.isDefined(i.limit)?parseInt(i.limit,10):void 0}),e.$watch("removeSelected",function(){var a=e.$eval(i.removeSelected);o.removeSelected=void 0!==a?a:b.removeSelected}),i.$observe("disabled",function(){o.disabled=void 0!==i.disabled&&i.disabled}),i.$observe("resetSearchInput",function(){var a=e.$eval(i.resetSearchInput);o.resetSearchInput=void 0===a||a}),i.$observe("setSearchToAnswer",function(){var a=e.$eval(i.setSearchToAnswer);o.setSearchToAnswer=void 0===a||a}),i.$observe("searchBy",function(){o.searchBy=i.searchBy}),i.$observe("paste",function(){o.paste=e.$eval(i.paste)}),i.$observe("tagging",function(){if(void 0!==i.tagging){var a=e.$eval(i.tagging);o.tagging={isActivated:!0,fct:a!==!0?a:void 0}}else o.tagging={isActivated:!1,fct:void 0}}),i.$observe("taggingLabel",function(){void 0!==i.tagging&&("false"===i.taggingLabel?o.taggingLabel=!1:o.taggingLabel=void 0!==i.taggingLabel?i.taggingLabel:"(new)")}),i.$observe("taggingTokens",function(){if(void 0!==i.tagging){var a=void 0!==i.taggingTokens?i.taggingTokens.split("|"):[",","ENTER"];o.taggingTokens={isActivated:!0,tokens:a}}}),angular.isDefined(i.autofocus)&&g(function(){o.setFocus()}),angular.isDefined(i.focusOn)&&e.$on(i.focusOn,function(){g(function(){o.setFocus()})}),a.on("click",l),e.$on("$destroy",function(){a.off("click",l)}),k(e,function(a){var b=angular.element("
").append(a),d=b.querySelectorAll(".ui-select-match");if(d.removeAttr("ui-select-match"),d.removeAttr("data-ui-select-match"),1!==d.length)throw c("transcluded","Expected 1 .ui-select-match but got '{0}'.",d.length);h.querySelectorAll(".ui-select-match").replaceWith(d);var e=b.querySelectorAll(".ui-select-choices");if(e.removeAttr("ui-select-choices"),e.removeAttr("data-ui-select-choices"),1!==e.length)throw c("transcluded","Expected 1 .ui-select-choices but got '{0}'.",e.length);h.querySelectorAll(".ui-select-choices").replaceWith(e);var f=b.querySelectorAll(".ui-select-no-choice");f.removeAttr("ui-select-no-choice"),f.removeAttr("data-ui-select-no-choice"),1==f.length&&h.querySelectorAll(".ui-select-no-choice").replaceWith(f)});var q=e.$eval(i.appendToBody);(void 0!==q?q:b.appendToBody)&&(e.$watch("$select.open",function(a){a?m():n()}),e.$on("$destroy",function(){n()}));var r=null,s="",t=null,u="direction-up";e.$watch("$select.open",function(){"auto"!==o.dropdownPosition&&"up"!==o.dropdownPosition||e.calculateDropdownPos()});var v=function(a,b){a=a||d(h),b=b||d(t),t[0].style.position="absolute",t[0].style.top=-1*b.height+"px",h.addClass(u)},w=function(a,b){h.removeClass(u),a=a||d(h),b=b||d(t),t[0].style.position="",t[0].style.top=""},x=function(){g(function(){if("up"===o.dropdownPosition)v();else{h.removeClass(u);var b=d(h),c=d(t),e=a[0].documentElement.scrollTop||a[0].body.scrollTop;b.top+b.height+c.height>e+a[0].documentElement.clientHeight?v(b,c):w(b,c)}t[0].style.opacity=1})};e.calculateDropdownPos=function(){if(o.open){if(t=angular.element(h).querySelectorAll(".ui-select-dropdown"),0===t.length)return;if(t[0].style.opacity=0,!d(t).height&&o.$animate&&o.$animate.on&&o.$animate.enabled(t)){var a=!0;o.$animate.on("enter",t,function(b,c){"close"===c&&a&&(x(),a=!1)})}else x()}else{if(null===t||0===t.length)return;t[0].style.opacity=0,t[0].style.position="",t[0].style.top="",h.removeClass(u)}}}}}}]),c.directive("uiSelectMatch",["uiSelectConfig",function(a){function b(a,b){return a[0].hasAttribute(b)?a.attr(b):a[0].hasAttribute("data-"+b)?a.attr("data-"+b):a[0].hasAttribute("x-"+b)?a.attr("x-"+b):void 0}return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(c){c.addClass("ui-select-match");var d=c.parent(),e=b(d,"theme")||a.theme,f=angular.isDefined(b(d,"multiple"));return e+(f?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(b,c,d,e){function f(a){e.allowClear=!!angular.isDefined(a)&&(""===a||"true"===a.toLowerCase())}e.lockChoiceExpression=d.uiLockChoice,d.$observe("placeholder",function(b){e.placeholder=void 0!==b?b:a.placeholder}),d.$observe("allowClear",f),f(d.allowClear),e.multiple&&e.sizeSearchInput()}}}]),c.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(b,c){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function(a,b){var c,d=this,e=a.$select;angular.isUndefined(e.selected)&&(e.selected=[]),a.$evalAsync(function(){c=a.ngModel}),d.activeMatchIndex=-1,d.updateModel=function(){c.$setViewValue(Date.now()),d.refreshComponent()},d.refreshComponent=function(){e.refreshItems(),e.sizeSearchInput()},d.removeChoice=function(c){var f=e.selected[c];if(!f._uiSelectChoiceLocked){var g={};g[e.parserResult.itemName]=f,e.selected.splice(c,1),d.activeMatchIndex=-1,e.sizeSearchInput(),b(function(){e.onRemoveCallback(a,{$item:f,$model:e.parserResult.modelMapper(a,g)})}),d.updateModel()}},d.getPlaceholder=function(){return e.selected&&e.selected.length?void 0:e.placeholder}}],controllerAs:"$selectMultiple",link:function(d,e,f,g){function h(a){return angular.isNumber(a.selectionStart)?a.selectionStart:a.value.length}function i(b){function c(){switch(b){case a.LEFT:return~n.activeMatchIndex?k:g;case a.RIGHT:return~n.activeMatchIndex&&i!==g?j:(l.activate(),!1);case a.BACKSPACE:return~n.activeMatchIndex?(n.removeChoice(i),k):g;case a.DELETE:return!!~n.activeMatchIndex&&(n.removeChoice(n.activeMatchIndex),i)}}var d=h(l.searchInput[0]),e=l.selected.length,f=0,g=e-1,i=n.activeMatchIndex,j=n.activeMatchIndex+1,k=n.activeMatchIndex-1,m=i;return!(d>0||l.search.length&&b==a.RIGHT)&&(l.close(),m=c(),l.selected.length&&m!==!1?n.activeMatchIndex=Math.min(g,Math.max(f,m)):n.activeMatchIndex=-1,!0)}function j(a){if(void 0===a||void 0===l.search)return!1;var b=a.filter(function(a){return void 0!==l.search.toUpperCase()&&void 0!==a&&a.toUpperCase()===l.search.toUpperCase()}).length>0;return b}function k(a,b){var c=-1;if(angular.isArray(a))for(var d=angular.copy(a),e=0;e=0;e--)b={},b[l.parserResult.itemName]=l.selected[e],a=l.parserResult.modelMapper(d,b),c.unshift(a);return c}),m.$formatters.unshift(function(a){var b,c=l.parserResult&&l.parserResult.source(d,{$select:{search:""}}),e={};if(!c)return a;var f=[],g=function(a,c){if(a&&a.length){for(var g=a.length-1;g>=0;g--){if(e[l.parserResult.itemName]=a[g],b=l.parserResult.modelMapper(d,e),l.parserResult.trackByExp){var h=/(\w*)\./.exec(l.parserResult.trackByExp),i=/\.([^\s]+)/.exec(l.parserResult.trackByExp);if(h&&h.length>0&&h[1]==l.parserResult.itemName&&i&&i.length>0&&b[i[1]]==c[i[1]])return f.unshift(a[g]),!0}if(angular.equals(b,c))return f.unshift(a[g]),!0}return!1}};if(!a)return f;for(var h=a.length-1;h>=0;h--)g(l.selected,a[h])||g(c,a[h])||f.unshift(a[h]);return f}),d.$watchCollection(function(){return m.$modelValue},function(a,b){b!=a&&(angular.isDefined(m.$modelValue)&&(m.$modelValue=null),n.refreshComponent())}),m.$render=function(){if(!angular.isArray(m.$viewValue)){if(!angular.isUndefined(m.$viewValue)&&null!==m.$viewValue)throw b("multiarr","Expected model value to be array but got '{0}'",m.$viewValue);l.selected=[]}l.selected=m.$viewValue,n.refreshComponent(),d.$evalAsync()},d.$on("uis:select",function(a,b){l.selected.length>=l.limit||(l.selected.push(b),n.updateModel())}),d.$on("uis:activate",function(){n.activeMatchIndex=-1}),d.$watch("$select.disabled",function(a,b){b&&!a&&l.sizeSearchInput()}),l.searchInput.on("keydown",function(b){var c=b.which;d.$apply(function(){var d=!1;a.isHorizontalMovement(c)&&(d=i(c)),d&&c!=a.TAB&&(b.preventDefault(),b.stopPropagation())})}),l.searchInput.on("keyup",function(b){if(a.isVerticalMovement(b.which)||d.$evalAsync(function(){l.activeIndex=l.taggingLabel===!1?-1:0}),l.tagging.isActivated&&l.search.length>0){if(b.which===a.TAB||a.isControl(b)||a.isFunctionKey(b)||b.which===a.ESC||a.isVerticalMovement(b.which))return;if(l.activeIndex=l.taggingLabel===!1?-1:0,l.taggingLabel===!1)return;var c,e,f,g,h=angular.copy(l.items),i=angular.copy(l.items),m=!1,n=-1;if(void 0!==l.tagging.fct){if(f=l.$filter("filter")(h,{isTag:!0}),f.length>0&&(g=f[0]),h.length>0&&g&&(m=!0,h=h.slice(1,h.length),i=i.slice(1,i.length)),c=l.tagging.fct(l.search),i.some(function(a){return angular.equals(a,c)})||l.selected.some(function(a){return angular.equals(a,c)}))return void d.$evalAsync(function(){l.activeIndex=0,l.items=h});c&&(c.isTag=!0)}else{if(f=l.$filter("filter")(h,function(a){return a.match(l.taggingLabel)}),f.length>0&&(g=f[0]),e=h[0],void 0!==e&&h.length>0&&g&&(m=!0,h=h.slice(1,h.length),i=i.slice(1,i.length)),c=l.search+" "+l.taggingLabel,k(l.selected,l.search)>-1)return;if(j(i.concat(l.selected)))return void(m&&(h=i,d.$evalAsync(function(){l.activeIndex=0,l.items=h})));if(j(i))return void(m&&(l.items=i.slice(1,i.length)))}m&&(n=k(l.selected,c)),n>-1?h=h.slice(n+1,h.length-1):(h=[],c&&h.push(c),h=h.concat(i)),d.$evalAsync(function(){if(l.activeIndex=0,l.items=h,l.isGrouped){var a=c?h.slice(1):h;l.setItemsFn(a),c&&(l.items.unshift(c),l.groups.unshift({name:"",items:[c],tagging:!0}))}})}}),l.searchInput.on("blur",function(){c(function(){n.activeMatchIndex=-1})})}}}]),c.directive("uiSelectNoChoice",["uiSelectConfig",function(a){return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(b){b.addClass("ui-select-no-choice");var c=b.parent().attr("theme")||a.theme;return c+"/no-choice.tpl.html"}}}]),c.directive("uiSelectSingle",["$timeout","$compile",function(b,c){return{restrict:"EA",require:["^uiSelect","^ngModel"],link:function(d,e,f,g){var h=g[0],i=g[1];i.$parsers.unshift(function(a){var b,c={};return c[h.parserResult.itemName]=a,b=h.parserResult.modelMapper(d,c)}),i.$formatters.unshift(function(a){var b,c=h.parserResult&&h.parserResult.source(d,{$select:{search:""}}),e={};if(c){var f=function(c){return e[h.parserResult.itemName]=c,b=h.parserResult.modelMapper(d,e),b===a};if(h.selected&&f(h.selected))return h.selected;for(var g=c.length-1;g>=0;g--)if(f(c[g]))return c[g]}return a}),d.$watch("$select.selected",function(a){i.$viewValue!==a&&i.$setViewValue(a)}),i.$render=function(){h.selected=i.$viewValue},d.$on("uis:select",function(a,b){h.selected=b}),d.$on("uis:close",function(a,c){b(function(){h.focusser.prop("disabled",!1),c||h.focusser[0].focus()},0,!1)}),d.$on("uis:activate",function(){j.prop("disabled",!0)});var j=angular.element("");c(j)(d),h.focusser=j,h.focusInput=j,e.parent().append(j),j.bind("focus",function(){d.$evalAsync(function(){h.focus=!0})}),j.bind("blur",function(){d.$evalAsync(function(){h.focus=!1})}),j.bind("keydown",function(b){return b.which===a.BACKSPACE?(b.preventDefault(),b.stopPropagation(),h.select(void 0),void d.$apply()):void(b.which===a.TAB||a.isControl(b)||a.isFunctionKey(b)||b.which===a.ESC||(b.which!=a.DOWN&&b.which!=a.UP&&b.which!=a.ENTER&&b.which!=a.SPACE||(b.preventDefault(),b.stopPropagation(),h.activate()),d.$digest()))}),j.bind("keyup input",function(b){b.which===a.TAB||a.isControl(b)||a.isFunctionKey(b)||b.which===a.ESC||b.which==a.ENTER||b.which===a.BACKSPACE||(h.activate(j.val()),j.val(""),d.$digest())})}}}]),c.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function(a,b,c){return{require:["^^uiSelect","^ngModel"],link:function(b,d,e,f){if(null===b[e.uiSelectSort])throw c("sort","Expected a list to sort");var g=f[0],h=f[1],i=angular.extend({axis:"horizontal"},b.$eval(e.uiSelectSortOptions)),j=i.axis,k="dragging",l="dropping",m="dropping-before",n="dropping-after";b.$watch(function(){return g.sortable},function(a){a?d.attr("draggable",!0):d.removeAttr("draggable")}),d.on("dragstart",function(a){d.addClass(k),(a.dataTransfer||a.originalEvent.dataTransfer).setData("text",b.$index.toString())}),d.on("dragend",function(){q(k)});var o,p=function(a,b){this.splice(b,0,this.splice(a,1)[0])},q=function(a){angular.forEach(g.$element.querySelectorAll("."+a),function(b){angular.element(b).removeClass(a)})},r=function(a){a.preventDefault();var b="vertical"===j?a.offsetY||a.layerY||(a.originalEvent?a.originalEvent.offsetY:0):a.offsetX||a.layerX||(a.originalEvent?a.originalEvent.offsetX:0);b
  • '),a.put("bootstrap/match-multiple.tpl.html",' × '), -a.put("bootstrap/match.tpl.html",'
    {{$select.placeholder}}
    '),a.put("bootstrap/no-choice.tpl.html",''),a.put("bootstrap/select-multiple.tpl.html",''),a.put("bootstrap/select.tpl.html",''),a.put("select2/choices.tpl.html",'
    '),a.put("select2/match-multiple.tpl.html",'
  • '),a.put("select2/match.tpl.html",'{{$select.placeholder}} '),a.put("select2/select-multiple.tpl.html",'
    '),a.put("select2/select.tpl.html",'
    '),a.put("selectize/choices.tpl.html",'
    '),a.put("selectize/match.tpl.html",'
    '),a.put("selectize/select.tpl.html",'
    ')}]),!function(a){function b(b,c){return{restrict:"A",scope:{isBusy:"=vBusy",busyLabel:"@vBusyLabel",busyText:"@vBusyText"},compile:function(b,d){var e=a.element(b.find("span"));return e[0]||(b.html(""+b.html()+""),e=a.element(b.find("span"))),function(a,b){var f=e.html(),g=a.busyLabel||c.busyLabel,h=a.busyText;a.$watch("isBusy",function(a){a?(b.addClass(c.states.busy),e.html(g)):(b.removeClass(c.states.busy),e.html(h||f))}),d.$observe("vBusyLabel",function(a){g=a}),d.$observe("vBusyText",function(a){h=a})}}}}function c(b,c){return{restrict:"A",link:function(d,e){function f(c,d){var f,g,h=e[0].getBoundingClientRect(),i=e[0].querySelector("v-ripple");a.element(i).remove(),i=b[0].createElement("v-ripple"),i.style.height=i.style.width=Math.max(h.width,h.height)+"px",e.append(i),g=c-h.left-i.offsetWidth/2-l[0].scrollLeft,f=d-h.top-i.offsetHeight/2-l[0].scrollTop,i.style.left=g+"px",i.style.top=f+"px"}function g(a){f(a.pageX,a.pageY),e.addClass(c.states.pressed),l.bind(k,h)}function h(){e.removeClass(c.states.pressed),l.unbind(k,h)}var i=!("undefined"==typeof b[0].documentElement.ontouchstart),j=i?"touchstart":"mousedown",k=i?"touchend":"mouseup",l=a.element(b[0].body);e.bind(j,g)}}}a.module("vButton.config",[]).constant("buttonConfig",{busyLabel:"Loading",states:{busy:"is-busy",pressed:"is-pressed"}}),a.module("vButton.directives",[]),a.module("vButton",["vButton.config","vButton.directives"]),a.module("vButton.directives").directive("vBusy",b),b.$inject=["$document","buttonConfig"],a.module("vButton.directives").directive("vPressable",c),c.$inject=["$document","buttonConfig"]}(angular),function(a,b,c){function d(a,c){c=c||{},b.forEach(c,function(a,b){delete c[b]});for(var d in a)!a.hasOwnProperty(d)||"$"===d.charAt(0)&&"$"===d.charAt(1)||(c[d]=a[d]);return c}var e=b.$$minErr("$resource"),f=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;b.module("ngResource",["ng"]).provider("$resource",function(){var a=/^https?:\/\/[^\/]*/,g=this;this.defaults={stripTrailingSlashes:!0,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}}},this.$get=["$http","$log","$q",function(h,i,j){function k(a,b){this.template=a,this.defaults=o({},g.defaults,b),this.urlParams={}}function l(a,r,s,t){function u(a,d){var g={};return d=o({},r,d),n(d,function(d,h){q(d)&&(d=d());var i;if(d&&d.charAt&&"@"==d.charAt(0)){i=a;var j=d.substr(1);if(null==j||""===j||"hasOwnProperty"===j||!f.test("."+j))throw e("badmember",j);for(var j=j.split("."),k=0,l=j.length;k>>0,d=Number(arguments[2])||0;for(d=0>d?Math.ceil(d):Math.floor(d),0>d&&(d+=c);c>d;d++)if(d in a&&a[d]===b)return d;return-1}function i(a,b,c,d){var e,i=f(c,d),j={},k=[];for(var l in i)if(i[l]&&i[l].params&&(e=g(i[l].params),e.length))for(var m in e)h(k,e[m])>=0||(k.push(e[m]),j[e[m]]=a[e[m]]);return R({},j,b)}function j(a,b,c){if(!c){c=[];for(var d in a)c.push(d)}for(var e=0;e "));if(s[c]=d,N(a))q.push(c,[function(){return b.get(a)}],j);else{var e=b.annotate(a);Q(e,function(a){a!==c&&i.hasOwnProperty(a)&&n(i[a],a)}),q.push(c,a,e)}r.pop(),s[c]=f}}function o(a){return O(a)&&a.then&&a.$$promises}if(!O(i))throw new Error("'invocables' must be an object");var p=g(i||{}),q=[],r=[],s={};return Q(i,n),i=r=s=null,function(d,f,g){function h(){--u||(v||e(t,f.$$values),r.$$values=t,r.$$promises=r.$$promises||!0,delete r.$$inheritedValues,n.resolve(t))}function i(a){r.$$failure=a,n.reject(a)}function j(c,e,f){function j(a){l.reject(a),i(a)}function k(){if(!L(r.$$failure))try{l.resolve(b.invoke(e,g,t)),l.promise.then(function(a){t[c]=a,h()},j)}catch(a){j(a)}}var l=a.defer(),m=0;Q(f,function(a){s.hasOwnProperty(a)&&!d.hasOwnProperty(a)&&(m++,s[a].then(function(b){t[a]=b,--m||k()},j))}),m||k(),s[c]=l.promise}if(o(d)&&g===c&&(g=f,f=d,d=null),d){if(!O(d))throw new Error("'locals' must be an object")}else d=k;if(f){if(!o(f))throw new Error("'parent' must be a promise returned by $resolve.resolve()")}else f=l;var n=a.defer(),r=n.promise,s=r.$$promises={},t=R({},d),u=1+q.length/3,v=!1;if(L(f.$$failure))return i(f.$$failure),r;f.$$inheritedValues&&e(t,m(f.$$inheritedValues,p)),R(s,f.$$promises),f.$$values?(v=e(t,m(f.$$values,p)),r.$$inheritedValues=m(f.$$values,p),h()):(f.$$inheritedValues&&(r.$$inheritedValues=m(f.$$inheritedValues,p)),f.then(h,i));for(var w=0,x=q.length;x>w;w+=3)d.hasOwnProperty(q[w])?h():j(q[w],q[w+1],q[w+2]);return r}},this.resolve=function(a,b,c,d){return this.study(a)(b,c,d)}}function q(a,b,c){this.fromConfig=function(a,b,c){return L(a.template)?this.fromString(a.template,b):L(a.templateUrl)?this.fromUrl(a.templateUrl,b):L(a.templateProvider)?this.fromProvider(a.templateProvider,b,c):null},this.fromString=function(a,b){return M(a)?a(b):a},this.fromUrl=function(c,d){return M(c)&&(c=c(d)),null==c?null:a.get(c,{cache:b,headers:{Accept:"text/html"}}).then(function(a){return a.data})},this.fromProvider=function(a,b,d){return c.invoke(a,null,d||{params:b})}}function r(a,b,e){function f(b,c,d,e){if(q.push(b),o[b])return o[b];if(!/^\w+([-.]+\w+)*(?:\[\])?$/.test(b))throw new Error("Invalid parameter name '"+b+"' in pattern '"+a+"'");if(p[b])throw new Error("Duplicate parameter name '"+b+"' in pattern '"+a+"'");return p[b]=new U.Param(b,c,d,e),p[b]}function g(a,b,c,d){var e=["",""],f=a.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!b)return f;switch(c){case!1:e=["(",")"+(d?"?":"")];break;case!0:f=f.replace(/\/$/,""),e=["(?:/(",")|/)?"];break;default:e=["("+c+"|",")?"]}return f+e[0]+b+e[1]}function h(e,f){var g,h,i,j,k;return g=e[2]||e[3],k=b.params[g],i=a.substring(m,e.index),h=f?e[4]:e[4]||("*"==e[1]?".*":null),h&&(j=U.type(h)||d(U.type("string"),{pattern:new RegExp(h,b.caseInsensitive?"i":c)})),{id:g,regexp:h,segment:i,type:j,cfg:k}}b=R({params:{}},O(b)?b:{});var i,j=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,k=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l="^",m=0,n=this.segments=[],o=e?e.params:{},p=this.params=e?e.params.$$new():new U.ParamSet,q=[];this.source=a;for(var r,s,t;(i=j.exec(a))&&(r=h(i,!1),!(r.segment.indexOf("?")>=0));)s=f(r.id,r.type,r.cfg,"path"),l+=g(r.segment,s.type.pattern.source,s.squash,s.isOptional),n.push(r.segment),m=j.lastIndex;t=a.substring(m);var u=t.indexOf("?");if(u>=0){var v=this.sourceSearch=t.substring(u);if(t=t.substring(0,u),this.sourcePath=a.substring(0,m+u),v.length>0)for(m=0;i=k.exec(v);)r=h(i,!0),s=f(r.id,r.type,r.cfg,"search"),m=j.lastIndex}else this.sourcePath=a,this.sourceSearch="";l+=g(t)+(b.strict===!1?"/?":"")+"$",n.push(t),this.regexp=new RegExp(l,b.caseInsensitive?"i":c),this.prefix=n[0],this.$$paramNames=q}function s(a){R(this,a)}function t(){function a(a){return null!=a?a.toString().replace(/~/g,"~~").replace(/\//g,"~2F"):a}function e(a){return null!=a?a.toString().replace(/~2F/g,"/").replace(/~~/g,"~"):a}function f(){return{strict:p,caseInsensitive:m}}function i(a){return M(a)||P(a)&&M(a[a.length-1])}function j(){for(;w.length;){var a=w.shift();if(a.pattern)throw new Error("You cannot override a type's .pattern at runtime.");b.extend(u[a.name],l.invoke(a.def))}}function k(a){R(this,a||{})}U=this;var l,m=!1,p=!0,q=!1,u={},v=!0,w=[],x={string:{encode:a,decode:e,is:function(a){return null==a||!L(a)||"string"==typeof a},pattern:/[^\/]*/},"int":{encode:a,decode:function(a){return parseInt(a,10)},is:function(a){return L(a)&&this.decode(a.toString())===a},pattern:/\d+/},bool:{encode:function(a){return a?1:0},decode:function(a){return 0!==parseInt(a,10)},is:function(a){return a===!0||a===!1},pattern:/0|1/},date:{encode:function(a){return this.is(a)?[a.getFullYear(),("0"+(a.getMonth()+1)).slice(-2),("0"+a.getDate()).slice(-2)].join("-"):c},decode:function(a){if(this.is(a))return a;var b=this.capture.exec(a);return b?new Date(b[1],b[2]-1,b[3]):c},is:function(a){return a instanceof Date&&!isNaN(a.valueOf())},equals:function(a,b){return this.is(a)&&this.is(b)&&a.toISOString()===b.toISOString()},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/},json:{encode:b.toJson,decode:b.fromJson,is:b.isObject,equals:b.equals,pattern:/[^\/]*/},any:{encode:b.identity,decode:b.identity,equals:b.equals,pattern:/.*/}};t.$$getDefaultValue=function(a){if(!i(a.value))return a.value;if(!l)throw new Error("Injectable functions cannot be called at configuration time");return l.invoke(a.value)},this.caseInsensitive=function(a){return L(a)&&(m=a),m},this.strictMode=function(a){return L(a)&&(p=a),p},this.defaultSquashPolicy=function(a){if(!L(a))return q;if(a!==!0&&a!==!1&&!N(a))throw new Error("Invalid squash policy: "+a+". Valid policies: false, true, arbitrary-string");return q=a,a},this.compile=function(a,b){return new r(a,R(f(),b))},this.isMatcher=function(a){if(!O(a))return!1;var b=!0;return Q(r.prototype,function(c,d){M(c)&&(b=b&&L(a[d])&&M(a[d]))}),b},this.type=function(a,b,c){if(!L(b))return u[a];if(u.hasOwnProperty(a))throw new Error("A type named '"+a+"' has already been defined.");return u[a]=new s(R({name:a},b)),c&&(w.push({name:a,def:c}),v||j()),this},Q(x,function(a,b){u[b]=new s(R({name:b},a))}),u=d(u,{}),this.$get=["$injector",function(a){return l=a,v=!1,j(),Q(x,function(a,b){u[b]||(u[b]=new s(a))}),this}],this.Param=function(a,d,e,f){function j(a){var b=O(a)?g(a):[],c=-1===h(b,"value")&&-1===h(b,"type")&&-1===h(b,"squash")&&-1===h(b,"array");return c&&(a={value:a}),a.$$fn=i(a.value)?a.value:function(){return a.value},a}function k(c,d,e){if(c.type&&d)throw new Error("Param '"+a+"' has two type configurations.");return d?d:c.type?b.isString(c.type)?u[c.type]:c.type instanceof s?c.type:new s(c.type):"config"===e?u.any:u.string}function m(){var b={array:"search"===f&&"auto"},c=a.match(/\[\]$/)?{array:!0}:{};return R(b,c,e).array}function p(a,b){var c=a.squash;if(!b||c===!1)return!1;if(!L(c)||null==c)return q;if(c===!0||N(c))return c;throw new Error("Invalid squash policy: '"+c+"'. Valid policies: false, true, or arbitrary string")}function r(a,b,d,e){var f,g,i=[{from:"",to:d||b?c:""},{from:null,to:d||b?c:""}];return f=P(a.replace)?a.replace:[],N(e)&&f.push({from:e,to:c}),g=o(f,function(a){return a.from}),n(i,function(a){return-1===h(g,a.from)}).concat(f)}function t(){if(!l)throw new Error("Injectable functions cannot be called at configuration time");var a=l.invoke(e.$$fn);if(null!==a&&a!==c&&!x.type.is(a))throw new Error("Default value ("+a+") for parameter '"+x.id+"' is not an instance of Type ("+x.type.name+")");return a}function v(a){function b(a){return function(b){return b.from===a}}function c(a){var c=o(n(x.replace,b(a)),function(a){return a.to});return c.length?c[0]:a}return a=c(a),L(a)?x.type.$normalize(a):t()}function w(){return"{Param:"+a+" "+d+" squash: '"+A+"' optional: "+z+"}"}var x=this;e=j(e),d=k(e,d,f);var y=m();d=y?d.$asArray(y,"search"===f):d,"string"!==d.name||y||"path"!==f||e.value!==c||(e.value="");var z=e.value!==c,A=p(e,z),B=r(e,y,z,A);R(this,{id:a,type:d,location:f,array:y,squash:A,replace:B,isOptional:z,value:v,dynamic:c,config:e,toString:w})},k.prototype={$$new:function(){return d(this,R(new k,{$$parent:this}))},$$keys:function(){for(var a=[],b=[],c=this,d=g(k.prototype);c;)b.push(c),c=c.$$parent;return b.reverse(),Q(b,function(b){Q(g(b),function(b){-1===h(a,b)&&-1===h(d,b)&&a.push(b)})}),a},$$values:function(a){var b={},c=this;return Q(c.$$keys(),function(d){b[d]=c[d].value(a&&a[d])}),b},$$equals:function(a,b){var c=!0,d=this;return Q(d.$$keys(),function(e){var f=a&&a[e],g=b&&b[e];d[e].type.equals(f,g)||(c=!1)}),c},$$validates:function(a){var d,e,f,g,h,i=this.$$keys();for(d=0;de;e++)if(b(j[e]))return;k&&b(k)}}function o(){return i=i||e.$on("$locationChangeSuccess",n)}var p,q=g.baseHref(),r=d.url();return l||o(),{sync:function(){n()},listen:function(){return o()},update:function(a){return a?void(r=d.url()):void(d.url()!==r&&(d.url(r),d.replace()))},push:function(a,b,e){var f=a.format(b||{});null!==f&&b&&b["#"]&&(f+="#"+b["#"]),d.url(f),p=e&&e.$$avoidResync?d.url():c,e&&e.replace&&d.replace()},href:function(c,e,f){if(!c.validates(e))return null;var g=a.html5Mode();b.isObject(g)&&(g=g.enabled),g=g&&h.history;var i=c.format(e);if(f=f||{},g||null===i||(i="#"+a.hashPrefix()+i),null!==i&&e&&e["#"]&&(i+="#"+e["#"]),i=m(i,g,f.absolute),!f.absolute||!i)return i;var j=!g&&i?"/":"",k=d.port();return k=80===k||443===k?"":":"+k,[d.protocol(),"://",d.host(),k,j,i].join("")}}}var i,j=[],k=null,l=!1;this.rule=function(a){if(!M(a))throw new Error("'rule' must be a function");return j.push(a),this},this.otherwise=function(a){if(N(a)){var b=a;a=function(){return b}}else if(!M(a))throw new Error("'rule' must be a function");return k=a,this},this.when=function(a,b){var c,h=N(b);if(N(a)&&(a=d.compile(a)),!h&&!M(b)&&!P(b))throw new Error("invalid 'handler' in when()");var i={matcher:function(a,b){return h&&(c=d.compile(b),b=["$match",function(a){return c.format(a)}]),R(function(c,d){return g(c,b,a.exec(d.path(),d.search()))},{prefix:N(a.prefix)?a.prefix:""})},regex:function(a,b){if(a.global||a.sticky)throw new Error("when() RegExp must not be global or sticky");return h&&(c=b,b=["$match",function(a){return f(c,a)}]),R(function(c,d){return g(c,b,a.exec(d.path()))},{prefix:e(a)})}},j={matcher:d.isMatcher(a),regex:a instanceof RegExp};for(var k in j)if(j[k])return this.rule(i[k](a,b));throw new Error("invalid 'what' in when()")},this.deferIntercept=function(a){a===c&&(a=!0),l=a},this.$get=h,h.$inject=["$location","$rootScope","$injector","$browser","$sniffer"]}function v(a,e){function f(a){return 0===a.indexOf(".")||0===a.indexOf("^")}function m(a,b){if(!a)return c;var d=N(a),e=d?a:a.name,g=f(e);if(g){if(!b)throw new Error("No reference point given for path '"+e+"'");b=m(b);for(var h=e.split("."),i=0,j=h.length,k=b;j>i;i++)if(""!==h[i]||0!==i){if("^"!==h[i])break;if(!k.parent)throw new Error("Path '"+e+"' not valid for state '"+b.name+"'");k=k.parent}else k=b;h=h.slice(i).join("."),e=k.name+(k.name&&h?".":"")+h}var l=z[e];return!l||!d&&(d||l!==a&&l.self!==a)?c:l}function n(a,b){A[a]||(A[a]=[]),A[a].push(b)}function p(a){for(var b=A[a]||[];b.length;)q(b.shift())}function q(b){b=d(b,{self:b,resolve:b.resolve||{},toString:function(){return this.name}});var c=b.name;if(!N(c)||c.indexOf("@")>=0)throw new Error("State must have a valid name");if(z.hasOwnProperty(c))throw new Error("State '"+c+"' is already defined");var e=-1!==c.indexOf(".")?c.substring(0,c.lastIndexOf(".")):N(b.parent)?b.parent:O(b.parent)&&N(b.parent.name)?b.parent.name:"";if(e&&!z[e])return n(e,b.self);for(var f in C)M(C[f])&&(b[f]=C[f](b,C.$delegates[f]));return z[c]=b,!b[B]&&b.url&&a.when(b.url,["$match","$stateParams",function(a,c){y.$current.navigable==b&&j(a,c)||y.transitionTo(b,a,{inherit:!0,location:!1})}]),p(c),b}function r(a){return a.indexOf("*")>-1}function s(a){for(var b=a.split("."),c=y.$current.name.split("."),d=0,e=b.length;e>d;d++)"*"===b[d]&&(c[d]="*");return"**"===b[0]&&(c=c.slice(h(c,b[1])),c.unshift("**")),"**"===b[b.length-1]&&(c.splice(h(c,b[b.length-2])+1,Number.MAX_VALUE),c.push("**")),b.length==c.length&&c.join("")===b.join("")}function t(a,b){return N(a)&&!L(b)?C[a]:M(b)&&N(a)?(C[a]&&!C.$delegates[a]&&(C.$delegates[a]=C[a]),C[a]=b,this):this}function u(a,b){return O(a)?b=a:b.name=a,q(b),this}function v(a,e,f,h,l,n,p,q,t){function u(b,c,d,f){var g=a.$broadcast("$stateNotFound",b,c,d);if(g.defaultPrevented)return p.update(),D;if(!g.retry)return null;if(f.$retry)return p.update(),E;var h=y.transition=e.when(g.retry);return h.then(function(){return h!==y.transition?A:(b.options.$retry=!0,y.transitionTo(b.to,b.toParams,b.options))},function(){return D}),p.update(),h}function v(a,c,d,g,i,j){function m(){var c=[];return Q(a.views,function(d,e){var g=d.resolve&&d.resolve!==a.resolve?d.resolve:{};g.$template=[function(){return f.load(e,{view:d,locals:i.globals,params:n,notify:j.notify})||""}],c.push(l.resolve(g,i.globals,i.resolve,a).then(function(c){if(M(d.controllerProvider)||P(d.controllerProvider)){var f=b.extend({},g,i.globals);c.$$controller=h.invoke(d.controllerProvider,null,f)}else c.$$controller=d.controller;c.$$state=a,c.$$controllerAs=d.controllerAs,i[e]=c}))}),e.all(c).then(function(){return i.globals})}var n=d?c:k(a.params.$$keys(),c),o={$stateParams:n};i.resolve=l.resolve(a.resolve,o,i.resolve,a);var p=[i.resolve.then(function(a){i.globals=a})];return g&&p.push(g),e.all(p).then(m).then(function(a){return i})}var A=e.reject(new Error("transition superseded")),C=e.reject(new Error("transition prevented")),D=e.reject(new Error("transition aborted")),E=e.reject(new Error("transition failed"));return x.locals={resolve:null,globals:{$stateParams:{}}},y={params:{},current:x.self,$current:x,transition:null},y.reload=function(a){return y.transitionTo(y.current,n,{reload:a||!0,inherit:!1,notify:!0})},y.go=function(a,b,c){return y.transitionTo(a,b,R({inherit:!0,relative:y.$current},c))},y.transitionTo=function(b,c,f){c=c||{},f=R({location:!0,inherit:!1,relative:null,notify:!0,reload:!1,$retry:!1},f||{});var g,j=y.$current,l=y.params,o=j.path,q=m(b,f.relative),r=c["#"];if(!L(q)){var s={to:b,toParams:c,options:f},t=u(s,j.self,l,f);if(t)return t;if(b=s.to,c=s.toParams,f=s.options,q=m(b,f.relative),!L(q)){if(!f.relative)throw new Error("No such state '"+b+"'");throw new Error("Could not resolve '"+b+"' from state '"+f.relative+"'")}}if(q[B])throw new Error("Cannot transition to abstract state '"+b+"'");if(f.inherit&&(c=i(n,c||{},y.$current,q)),!q.params.$$validates(c))return E;c=q.params.$$values(c),b=q;var z=b.path,D=0,F=z[D],G=x.locals,H=[];if(f.reload){if(N(f.reload)||O(f.reload)){if(O(f.reload)&&!f.reload.name)throw new Error("Invalid reload state object");var I=f.reload===!0?o[0]:m(f.reload);if(f.reload&&!I)throw new Error("No such reload state '"+(N(f.reload)?f.reload:f.reload.name)+"'");for(;F&&F===o[D]&&F!==I;)G=H[D]=F.locals,D++,F=z[D]}}else for(;F&&F===o[D]&&F.ownParams.$$equals(c,l);)G=H[D]=F.locals,D++,F=z[D];if(w(b,c,j,l,G,f))return r&&(c["#"]=r),y.params=c,S(y.params,n),S(k(b.params.$$keys(),n),b.locals.globals.$stateParams),f.location&&b.navigable&&b.navigable.url&&(p.push(b.navigable.url,c,{$$avoidResync:!0,replace:"replace"===f.location}),p.update(!0)),y.transition=null,e.when(y.current);if(c=k(b.params.$$keys(),c||{}),r&&(c["#"]=r),f.notify&&a.$broadcast("$stateChangeStart",b.self,c,j.self,l,f).defaultPrevented)return a.$broadcast("$stateChangeCancel",b.self,c,j.self,l), -null==y.transition&&p.update(),C;for(var J=e.when(G),K=D;K=D;d--)g=o[d],g.self.onExit&&h.invoke(g.self.onExit,g.self,g.locals.globals),g.locals=null;for(d=D;d=4?!!j.enabled(a):1===V&&W>=2?!!j.enabled():!!i}var e={enter:function(a,b,c){b.after(a),c()},leave:function(a,b){a.remove(),b()}};if(a.noanimation)return e;if(j)return{enter:function(a,c,f){d(a)?b.version.minor>2?j.enter(a,null,c).then(f):j.enter(a,null,c,f):e.enter(a,c,f)},leave:function(a,c){d(a)?b.version.minor>2?j.leave(a).then(c):j.leave(a,c):e.leave(a,c)}};if(i){var f=i&&i(c,a);return{enter:function(a,b,c){f.enter(a,null,b),c()},leave:function(a,b){f.leave(a),b()}}}return e}var h=f(),i=h("$animator"),j=h("$animate"),k={restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(c,f,h){return function(c,f,i){function j(){function a(){b&&b.remove(),c&&c.$destroy()}var b=l,c=n;c&&(c._willBeDestroyed=!0),m?(r.leave(m,function(){a(),l=null}),l=m):(a(),l=null),m=null,n=null}function k(g){var k,l=A(c,i,f,e),s=l&&a.$current&&a.$current.locals[l];if((g||s!==o)&&!c._willBeDestroyed){k=c.$new(),o=a.$current.locals[l],k.$emit("$viewContentLoading",l);var t=h(k,function(a){r.enter(a,f,function(){n&&n.$emit("$viewContentAnimationEnded"),(b.isDefined(q)&&!q||c.$eval(q))&&d(a)}),j()});m=t,n=k,n.$emit("$viewContentLoaded",l),n.$eval(p)}}var l,m,n,o,p=i.onload||"",q=i.autoscroll,r=g(i,c);c.$on("$stateChangeSuccess",function(){k(!1)}),k(!0)}}};return k}function z(a,b,c,d){return{restrict:"ECA",priority:-400,compile:function(e){var f=e.html();return function(e,g,h){var i=c.$current,j=A(e,h,g,d),k=i&&i.locals[j];if(k){g.data("$uiView",{name:j,state:k.$$state}),g.html(k.$template?k.$template:f);var l=a(g.contents());if(k.$$controller){k.$scope=e,k.$element=g;var m=b(k.$$controller,k);k.$$controllerAs&&(e[k.$$controllerAs]=m),g.data("$ngControllerController",m),g.children().data("$ngControllerController",m)}l(e)}}}}}function A(a,b,c,d){var e=d(b.uiView||b.name||"")(a),f=c.inheritedData("$uiView");return e.indexOf("@")>=0?e:e+"@"+(f?f.state.name:"")}function B(a,b){var c,d=a.match(/^\s*({[^}]*})\s*$/);if(d&&(a=b+"("+d[1]+")"),c=a.replace(/\n/g," ").match(/^([^(]+?)\s*(\((.*)\))?$/),!c||4!==c.length)throw new Error("Invalid state ref '"+a+"'");return{state:c[1],paramExpr:c[3]||null}}function C(a){var b=a.parent().inheritedData("$uiView");return b&&b.state&&b.state.name?b.state:void 0}function D(a){var b="[object SVGAnimatedString]"===Object.prototype.toString.call(a.prop("href")),c="FORM"===a[0].nodeName;return{attr:c?"action":b?"xlink:href":"href",isAnchor:"A"===a.prop("tagName").toUpperCase(),clickable:!c}}function E(a,b,c,d,e){return function(f){var g=f.which||f.button,h=e();if(!(g>1||f.ctrlKey||f.metaKey||f.shiftKey||a.attr("target"))){var i=c(function(){b.go(h.state,h.params,h.options)});f.preventDefault();var j=d.isAnchor&&!h.href?1:0;f.preventDefault=function(){j--<=0&&c.cancel(i)}}}}function F(a,b){return{relative:C(a)||b.$current,inherit:!0}}function G(a,c){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(d,e,f,g){var h=B(f.uiSref,a.current.name),i={state:h.state,href:null,params:null},j=D(e),k=g[1]||g[0];i.options=R(F(e,a),f.uiSrefOpts?d.$eval(f.uiSrefOpts):{});var l=function(c){c&&(i.params=b.copy(c)),i.href=a.href(h.state,i.params,i.options),k&&k.$$addStateInfo(h.state,i.params),null!==i.href&&f.$set(j.attr,i.href)};h.paramExpr&&(d.$watch(h.paramExpr,function(a){a!==i.params&&l(a)},!0),i.params=b.copy(d.$eval(h.paramExpr))),l(),j.clickable&&e.bind("click",E(e,a,c,j,function(){return i}))}}}function H(a,b){return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(c,d,e,f){function g(b){l.state=b[0],l.params=b[1],l.options=b[2],l.href=a.href(l.state,l.params,l.options),i&&i.$$addStateInfo(l.state,l.params),l.href&&e.$set(h.attr,l.href)}var h=D(d),i=f[1]||f[0],j=[e.uiState,e.uiStateParams||null,e.uiStateOpts||null],k="["+j.map(function(a){return a||"null"}).join(", ")+"]",l={state:null,params:null,options:null,href:null};c.$watch(k,g,!0),g(c.$eval(k)),h.clickable&&d.bind("click",E(d,a,b,h,function(){return l}))}}}function I(a,b,c){return{restrict:"A",controller:["$scope","$element","$attrs","$timeout",function(b,d,e,f){function g(b,c,e){var f=a.get(b,C(d)),g=h(b,c);p.push({state:f||{name:b},params:c,hash:g}),q[g]=e}function h(a,c){if(!N(a))throw new Error("state should be a string");return O(c)?a+T(c):(c=b.$eval(c),O(c)?a+T(c):a)}function i(){for(var a=0;a0||(g(a,b,o),i())},b.$on("$stateChangeSuccess",i),i()}]}}function J(a){var b=function(b,c){return a.is(b,c)};return b.$stateful=!0,b}function K(a){var b=function(b,c,d){return a.includes(b,c,d)};return b.$stateful=!0,b}var L=b.isDefined,M=b.isFunction,N=b.isString,O=b.isObject,P=b.isArray,Q=b.forEach,R=b.extend,S=b.copy,T=b.toJson;b.module("ui.router.util",["ng"]),b.module("ui.router.router",["ui.router.util"]),b.module("ui.router.state",["ui.router.router","ui.router.util"]),b.module("ui.router",["ui.router.state"]),b.module("ui.router.compat",["ui.router"]),p.$inject=["$q","$injector"],b.module("ui.router.util").service("$resolve",p),q.$inject=["$http","$templateCache","$injector"],b.module("ui.router.util").service("$templateFactory",q);var U;r.prototype.concat=function(a,b){var c={caseInsensitive:U.caseInsensitive(),strict:U.strictMode(),squash:U.defaultSquashPolicy()};return new r(this.sourcePath+a+this.sourceSearch,R(c,b),this)},r.prototype.toString=function(){return this.source},r.prototype.exec=function(a,b){function c(a){function b(a){return a.split("").reverse().join("")}function c(a){return a.replace(/\\-/g,"-")}var d=b(a).split(/-(?!\\)/),e=o(d,b);return o(e,c).reverse()}var d=this.regexp.exec(a);if(!d)return null;b=b||{};var e,f,g,h=this.parameters(),i=h.length,j=this.segments.length-1,k={};if(j!==d.length-1)throw new Error("Unbalanced capture group in route '"+this.source+"'");var l,m;for(e=0;j>e;e++){for(g=h[e],l=this.params[g],m=d[e+1],f=0;fe;e++){for(g=h[e],k[g]=this.params[g].value(b[g]),l=this.params[g],m=b[g],f=0;ff;f++){var k=h>f,l=d[f],m=e[l],n=m.value(a[l]),p=m.isOptional&&m.type.equals(m.value(),n),q=!!p&&m.squash,r=m.type.encode(n);if(k){var s=c[f+1],t=f+1===h;if(q===!1)null!=r&&(j+=P(r)?o(r,b).join("-"):encodeURIComponent(r)),j+=s;else if(q===!0){var u=j.match(/\/$/)?/\/?(.*)/:/(.*)/;j+=s.match(u)[1]}else N(q)&&(j+=q+s);t&&m.squash===!0&&"/"===j.slice(-1)&&(j=j.slice(0,-1))}else{if(null==r||p&&q!==!1)continue;if(P(r)||(r=[r]),0===r.length)continue;r=o(r,encodeURIComponent).join("&"+l+"="),j+=(g?"&":"?")+(l+"="+r),g=!0}}return j},s.prototype.is=function(a,b){return!0},s.prototype.encode=function(a,b){return a},s.prototype.decode=function(a,b){return a},s.prototype.equals=function(a,b){return a==b},s.prototype.$subPattern=function(){var a=this.pattern.toString();return a.substr(1,a.length-2)},s.prototype.pattern=/.*/,s.prototype.toString=function(){return"{Type:"+this.name+"}"},s.prototype.$normalize=function(a){return this.is(a)?a:this.decode(a)},s.prototype.$asArray=function(a,b){function d(a,b){function d(a,b){return function(){return a[b].apply(a,arguments)}}function e(a){return P(a)?a:L(a)?[a]:[]}function f(a){switch(a.length){case 0:return c;case 1:return"auto"===b?a[0]:a;default:return a}}function g(a){return!a}function h(a,b){return function(c){if(P(c)&&0===c.length)return c;c=e(c);var d=o(c,a);return b===!0?0===n(d,g).length:f(d)}}function i(a){return function(b,c){var d=e(b),f=e(c);if(d.length!==f.length)return!1;for(var g=0;g1&&(b.$element.data(q,b.direction),m.currentSlide&&m.currentSlide.$element&&m.currentSlide.$element.data(q,b.direction),a.$currentTransition=!0,o?d.on("addClass",b.$element,function(b,c){"close"===c&&(a.$currentTransition=null,d.off("addClass",b))}):b.$element.one("$animate:close",function(){a.$currentTransition=null})),m.currentSlide=b,r=c,g())}function f(a){if(angular.isUndefined(n[a].index))return n[a];var b;n.length;for(b=0;b0&&(k=c(i,b))}function h(){k&&(c.cancel(k),k=null)}function i(){var b=+a.interval;l&&!isNaN(b)&&b>0&&n.length?a.next():a.pause()}function j(b){b.length||(a.$currentTransition=null)}var k,l,m=this,n=m.slides=a.slides=[],o=angular.version.minor>=4,p="uib-noTransition",q="uib-slideDirection",r=-1;m.currentSlide=null;var s=!1;m.select=a.select=function(b,c){var d=a.indexOfSlide(b);void 0===c&&(c=d>m.getCurrentIndex()?"next":"prev"),b&&b!==m.currentSlide&&!a.$currentTransition&&e(b,d,c)},a.$on("$destroy",function(){s=!0}),m.getCurrentIndex=function(){return m.currentSlide&&angular.isDefined(m.currentSlide.index)?+m.currentSlide.index:r},a.indexOfSlide=function(a){return angular.isDefined(a.index)?+a.index:n.indexOf(a)},a.next=function(){var b=(m.getCurrentIndex()+1)%n.length;return 0===b&&a.noWrap()?void a.pause():m.select(f(b),"next")},a.prev=function(){var b=m.getCurrentIndex()-1<0?n.length-1:m.getCurrentIndex()-1;return a.noWrap()&&b===n.length-1?void a.pause():m.select(f(b),"prev")},a.isActive=function(a){return m.currentSlide===a},a.$watch("interval",g),a.$watchCollection("slides",j),a.$on("$destroy",h),a.play=function(){l||(l=!0,g())},a.pause=function(){a.noPause||(l=!1,h())},m.addSlide=function(b,c){b.$element=c,n.push(b),1===n.length||b.active?(m.select(n[n.length-1]),1===n.length&&a.play()):b.active=!1},m.removeSlide=function(a){angular.isDefined(a.index)&&n.sort(function(a,b){return+a.index>+b.index});var b=n.indexOf(a);n.splice(b,1),n.length>0&&a.active?b>=n.length?m.select(n[b-1]):m.select(n[b]):r>b&&r--,0===n.length&&(m.currentSlide=null)},a.$watch("noTransition",function(a){b.data(p,a)})}]).directive("uibCarousel",[function(){return{transclude:!0,replace:!0,controller:"UibCarouselController",controllerAs:"carousel",require:"carousel",templateUrl:function(a,b){return b.templateUrl||"template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}]).directive("uibSlide",function(){return{require:"^uibCarousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},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)})}}}).animation(".item",["$injector","$animate",function(a,b){function c(a,b,c){a.removeClass(b),c&&c()}var d="uib-noTransition",e="uib-slideDirection",f=null;return a.has("$animateCss")&&(f=a.get("$animateCss")),{beforeAddClass:function(a,g,h){if("active"==g&&a.parent()&&a.parent().parent()&&!a.parent().parent().data(d)){var i=!1,j=a.data(e),k="next"==j?"left":"right",l=c.bind(this,a,k+" "+j,h);return a.addClass(j),f?f(a,{addClass:k}).start().done(l):b.addClass(a,k).then(function(){i||l(),h()}),function(){i=!0}}h()},beforeRemoveClass:function(a,g,h){if("active"===g&&a.parent()&&a.parent().parent()&&!a.parent().parent().data(d)){var i=!1,j=a.data(e),k="next"==j?"left":"right",l=c.bind(this,a,k,h);return f?f(a,{addClass:k}).start().done(l):b.addClass(a,k).then(function(){i||l(),h()}),function(){i=!0}}h()}}}]),angular.module("ui.bootstrap.carousel").value("$carouselSuppressWarning",!1).controller("CarouselController",["$scope","$element","$controller","$log","$carouselSuppressWarning",function(a,b,c,d,e){e||d.warn("CarouselController is now deprecated. Use UibCarouselController instead."),angular.extend(this,c("UibCarouselController",{$scope:a,$element:b}))}]).directive("carousel",["$log","$carouselSuppressWarning",function(a,b){return{transclude:!0,replace:!0,controller:"CarouselController",controllerAs:"carousel",require:"carousel",templateUrl:function(a,b){return b.templateUrl||"template/carousel/carousel.html"},scope:{interval:"=",noTransition:"=",noPause:"=",noWrap:"&"},link:function(){b||a.warn("carousel is now deprecated. Use uib-carousel instead.")}}}]).directive("slide",["$log","$carouselSuppressWarning",function(a,b){return{require:"^carousel",transclude:!0,replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/carousel/slide.html"},scope:{active:"=?",actual:"=?",index:"=?"},link:function(c,d,e,f){b||a.warn("slide is now deprecated. Use uib-slide instead."),f.addSlide(c,d),c.$on("$destroy",function(){f.removeSlide(c)}),c.$watch("active",function(a){a&&f.select(c)})}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","orderByFilter",function(a,b,c){function d(a){var b=[],d=a.split("");return angular.forEach(g,function(c,e){var f=a.indexOf(e);if(f>-1){a=a.split(""),d[f]="("+c.regex+")",a[f]="$";for(var g=f+1,h=f+e.length;g28?29===c&&(a%4===0&&a%100!==0||a%400===0):3!==b&&5!==b&&8!==b&&10!==b||c<31)}var f,g,h=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;this.init=function(){f=b.id,this.parsers={},g={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:b.DATETIME_FORMATS.MONTH.join("|"), -apply:function(a){this.month=b.DATETIME_FORMATS.MONTH.indexOf(a)}},MMM:{regex:b.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(a){this.month=b.DATETIME_FORMATS.SHORTMONTH.indexOf(a)}},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:b.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:b.DATETIME_FORMATS.SHORTDAY.join("|")},HH:{regex:"(?:0|1)[0-9]|2[0-3]",apply:function(a){this.hours=+a}},hh:{regex:"0[0-9]|1[0-2]",apply:function(a){this.hours=+a}},H:{regex:"1?[0-9]|2[0-3]",apply:function(a){this.hours=+a}},h:{regex:"[0-9]|1[0-2]",apply:function(a){this.hours=+a}},mm:{regex:"[0-5][0-9]",apply:function(a){this.minutes=+a}},m:{regex:"[0-9]|[1-5][0-9]",apply:function(a){this.minutes=+a}},sss:{regex:"[0-9][0-9][0-9]",apply:function(a){this.milliseconds=+a}},ss:{regex:"[0-5][0-9]",apply:function(a){this.seconds=+a}},s:{regex:"[0-9]|[1-5][0-9]",apply:function(a){this.seconds=+a}},a:{regex:b.DATETIME_FORMATS.AMPMS.join("|"),apply:function(a){12===this.hours&&(this.hours=0),"PM"===a&&(this.hours+=12)}}}},this.init(),this.parse=function(c,g,i){if(!angular.isString(c)||!g)return c;g=b.DATETIME_FORMATS[g]||g,g=g.replace(h,"\\$&"),b.id!==f&&this.init(),this.parsers[g]||(this.parsers[g]=d(g));var j=this.parsers[g],k=j.regex,l=j.map,m=c.match(k);if(m&&m.length){var n,o;angular.isDate(i)&&!isNaN(i.getTime())?n={year:i.getFullYear(),month:i.getMonth(),date:i.getDate(),hours:i.getHours(),minutes:i.getMinutes(),seconds:i.getSeconds(),milliseconds:i.getMilliseconds()}:(i&&a.warn("dateparser:","baseDate is not a valid date"),n={year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var p=1,q=m.length;pi.modes.indexOf(i[d]))&&(a.datepickerMode=i[d])}):(i[d]=g[d]||null,a[d]=i[d])}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=a.$parent.$eval(b.initDate)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(j.$isEmpty(j.$modelValue)||j.$invalid)&&(i.activeDate=a,i.refreshView())})):this.activeDate=new Date,a.isActive=function(b){return 0===i.compare(b.date,i.activeDate)&&(a.activeDateId=b.uid,!0)},this.init=function(a){j=a,j.$render=function(){i.render()}},this.render=function(){if(j.$viewValue){var a=new Date(j.$viewValue),b=!isNaN(a);b?this.activeDate=a:h||e.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.')}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=j.$viewValue?new Date(j.$viewValue):null;j.$setValidity("dateDisabled",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=j.$viewValue?new Date(j.$viewValue):null;return{date:a,label:f(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date),customClass:this.customClass(a)}},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.customClass=function(b){return a.customClass({date:b,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.$viewValue?new Date(j.$viewValue):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&&b===-1||(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(){i.element[0].focus()};a.$on("uib:datepicker.focus",k),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),i.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(i.isDisabled(i.activeDate))return;a.select(i.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(i.handleKeyDown(c,b),i.refreshView()):a.toggleMode("up"===c?1:-1)}}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(a,b,c){function d(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?f[b]:29}function e(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}var f=[31,28,31,30,31,30,31,31,30,31,30,31];this.step={months:1},this.element=b,this.init=function(b){angular.extend(b,this),a.showWeeks=b.showWeeks,b.refreshView()},this.getDates=function(a,b){for(var c,d=new Array(b),e=new Date(a),f=0;f0?7-g:-g,i=new Date(f);h>0&&i.setDate(-h+1);for(var j=this.getDates(i,42),k=0;k<42;k++)j[k]=angular.extend(this.createDateObject(j[k],this.formatDay),{secondary:j[k].getMonth()!==d,uid:a.uniqueId+"-"+k});a.labels=new Array(7);for(var l=0;l<7;l++)a.labels[l]={abbr:c(j[l].date,this.formatDayHeader),full:c(j[l].date,"EEEE")};if(a.title=c(this.activeDate,this.formatDayTitle),a.rows=this.split(j,7),a.showWeeks){a.weekNumbers=[];for(var m=(11-this.startingDay)%7,n=a.rows.length,o=0;o
    "),x.attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":v}),y=angular.element(x.children()[0]),y.attr("template-url",w),C&&"month"===c.type&&(y.attr("datepicker-mode",'"month"'),y.attr("min-mode","month")),c.datepickerOptions){var l=a.$parent.$eval(c.datepickerOptions);l&&l.initDate&&(a.initDate=l.initDate,y.attr("init-date","initDate"),delete l.initDate),angular.forEach(l,function(a,b){y.attr(m(b),a)})}angular.forEach(["minMode","maxMode","minDate","maxDate","datepickerMode","initDate","shortcutPropagation"],function(b){if(c[b]){var d=e(c[b]);if(a.$parent.$watch(d,function(c){a.watchData[b]=c,"minDate"!==b&&"maxDate"!==b||(B[b]=new Date(c))}),y.attr(m(b),"watchData."+b),"datepickerMode"===b){var f=d.assign;a.$watch("watchData."+b,function(b,c){angular.isFunction(f)&&b!==c&&f(a.$parent,b)})}}}),c.dateDisabled&&y.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),c.showWeeks&&y.attr("show-weeks",c.showWeeks),c.customClass&&y.attr("custom-class","customClass({ date: date, mode: mode })"),C?z.$formatters.push(function(b){return a.date=b,b}):(z.$$parserName="date",z.$validators.date=o,z.$parsers.unshift(n),z.$formatters.push(function(b){return a.date=b,z.$isEmpty(b)?b:i(b,r)})),z.$viewChangeListeners.push(function(){a.date=j.parse(z.$viewValue,r,a.date)}),b.bind("keydown",q),A=d(x)(a),x.remove(),t?f.find("body").append(A):b.after(A),a.$on("$destroy",function(){a.isOpen===!0&&(g.$$phase||a.$apply(function(){a.isOpen=!1})),A.remove(),b.unbind("keydown",q),f.unbind("click",p)})},a.getText=function(b){return a[b+"Text"]||k[b+"Text"]},a.isDisabled=function(b){return"today"===b&&(b=new Date),a.watchData.minDate&&a.compare(b,B.minDate)<0||a.watchData.maxDate&&a.compare(b,B.maxDate)>0},a.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth(),a.getDate())-new Date(b.getFullYear(),b.getMonth(),b.getDate())},a.dateSelection=function(c){angular.isDefined(c)&&(a.date=c);var d=a.date?i(a.date,r):null;b.val(d),z.$setViewValue(d),s&&(a.isOpen=!1,b[0].focus())},a.keydown=function(c){27===c.which&&(a.isOpen=!1,b[0].focus())},a.select=function(b){if("today"===b){var c=new Date;angular.isDate(a.date)?(b=new Date(a.date),b.setFullYear(c.getFullYear(),c.getMonth(),c.getDate())):b=new Date(c.setHours(0,0,0,0))}a.dateSelection(b)},a.close=function(){a.isOpen=!1,b[0].focus()},a.$watch("isOpen",function(c){c?(a.position=t?h.offset(b):h.position(b),a.position.top=a.position.top+b.prop("offsetHeight"),l(function(){u&&a.$broadcast("uib:datepicker.focus"),f.bind("click",p)},0,!1)):f.unbind("click",p)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(a,b,c,d){var e=d[0],f=d[1];f.init(e)}}}).directive("uibDatepickerPopupWrap",function(){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/popup.html"}}}),angular.module("ui.bootstrap.datepicker").value("$datepickerSuppressWarning",!1).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$log","dateFilter","uibDatepickerConfig","$datepickerSuppressError","$datepickerSuppressWarning",function(a,b,c,d,e,f,g,h,i){i||e.warn("DatepickerController is now deprecated. Use UibDatepickerController instead.");var j=this,k={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","showWeeks","startingDay","yearRange","shortcutPropagation"],function(c,e){j[c]=angular.isDefined(b[c])?e<6?d(b[c])(a.$parent):a.$parent.$eval(b[c]):g[c]}),angular.forEach(["minDate","maxDate"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(a){j[d]=a?new Date(a):null,j.refreshView()}):j[d]=g[d]?new Date(g[d]):null}),angular.forEach(["minMode","maxMode"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(c){j[d]=angular.isDefined(c)?c:b[d],a[d]=j[d],("minMode"==d&&j.modes.indexOf(a.datepickerMode)j.modes.indexOf(j[d]))&&(a.datepickerMode=j[d])}):(j[d]=g[d]||null,a[d]=j[d])}),a.datepickerMode=a.datepickerMode||g.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),angular.isDefined(b.initDate)?(this.activeDate=a.$parent.$eval(b.initDate)||new Date,a.$parent.$watch(b.initDate,function(a){a&&(k.$isEmpty(k.$modelValue)||k.$invalid)&&(j.activeDate=a,j.refreshView())})):this.activeDate=new Date,a.isActive=function(b){return 0===j.compare(b.date,j.activeDate)&&(a.activeDateId=b.uid,!0)},this.init=function(a){k=a,k.$render=function(){j.render()}},this.render=function(){if(k.$viewValue){var a=new Date(k.$viewValue),b=!isNaN(a);b?this.activeDate=a:h||e.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.')}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=k.$viewValue?new Date(k.$viewValue):null;k.$setValidity("dateDisabled",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=k.$viewValue?new Date(k.$viewValue):null;return{date:a,label:f(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date),customClass:this.customClass(a)}},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.customClass=function(b){return a.customClass({date:b,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},this.fixTimeZone=function(a){var b=a.getHours();a.setHours(23===b?b+2:0)},a.select=function(b){if(a.datepickerMode===j.minMode){var c=k.$viewValue?new Date(k.$viewValue):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),k.$setViewValue(c),k.$render()}else j.activeDate=b,a.datepickerMode=j.modes[j.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=j.activeDate.getFullYear()+a*(j.step.years||0),c=j.activeDate.getMonth()+a*(j.step.months||0);j.activeDate.setFullYear(b,c,1),j.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===j.maxMode&&1===b||a.datepickerMode===j.minMode&&b===-1||(a.datepickerMode=j.modes[j.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 l=function(){j.element[0].focus()};a.$on("uib:datepicker.focus",l),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),j.shortcutPropagation||b.stopPropagation(),"enter"===c||"space"===c){if(j.isDisabled(j.activeDate))return;a.select(j.activeDate)}else!b.ctrlKey||"up"!==c&&"down"!==c?(j.handleKeyDown(c,b),j.refreshView()):a.toggleMode("up"===c?1:-1)}}]).directive("datepicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/datepicker.html"},scope:{datepickerMode:"=?",dateDisabled:"&",customClass:"&",shortcutPropagation:"&?"},require:["datepicker","^ngModel"],controller:"DatepickerController",controllerAs:"datepicker",link:function(c,d,e,f){b||a.warn("datepicker is now deprecated. Use uib-datepicker instead.");var g=f[0],h=f[1];g.init(h)}}}]).directive("daypicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:"template/datepicker/day.html",require:["^datepicker","daypicker"],controller:"UibDaypickerController",link:function(c,d,e,f){b||a.warn("daypicker is now deprecated. Use uib-daypicker instead.");var g=f[0],h=f[1];h.init(g)}}}]).directive("monthpicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:"template/datepicker/month.html",require:["^datepicker","monthpicker"],controller:"UibMonthpickerController",link:function(c,d,e,f){b||a.warn("monthpicker is now deprecated. Use uib-monthpicker instead.");var g=f[0],h=f[1];h.init(g)}}}]).directive("yearpicker",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,templateUrl:"template/datepicker/year.html",require:["^datepicker","yearpicker"],controller:"UibYearpickerController",link:function(c,d,e,f){b||a.warn("yearpicker is now deprecated. Use uib-yearpicker instead.");var g=f[0];angular.extend(g,f[1]),g.yearpickerInit(),g.refreshView()}}}]).directive("datepickerPopup",["$log","$datepickerSuppressWarning",function(a,b){return{require:["ngModel","datepickerPopup"],controller:"UibDatepickerPopupController",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&",customClass:"&"},link:function(c,d,e,f){b||a.warn("datepicker-popup is now deprecated. Use uib-datepicker-popup instead.");var g=f[0],h=f[1];h.init(g)}}}]).directive("datepickerPopupWrap",["$log","$datepickerSuppressWarning",function(a,b){return{replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/datepicker/popup.html"},link:function(){b||a.warn("datepicker-popup-wrap is now deprecated. Use uib-datepicker-popup-wrap instead.")}}}]),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.position"]).constant("uibDropdownConfig",{openClass:"open"}).service("uibDropdownService",["$document","$rootScope",function(a,b){var c=null;this.open=function(b){c||(a.bind("click",d),a.bind("keydown",e)),c&&c!==b&&(c.isOpen=!1),c=b},this.close=function(b){c===b&&(c=null,a.unbind("click",d),a.unbind("keydown",e))};var d=function(a){if(c&&(!a||"disabled"!==c.getAutoClose())){var d=c.getToggleElement();if(!(a&&d&&d[0].contains(a.target))){var e=c.getDropdownElement();a&&"outsideClick"===c.getAutoClose()&&e&&e[0].contains(a.target)||(c.isOpen=!1,b.$$phase||c.$apply())}}},e=function(a){27===a.which?(c.focusToggleElement(),d()):c.isKeynavEnabled()&&/(38|40)/.test(a.which)&&c.isOpen&&(a.preventDefault(),a.stopPropagation(),c.focusDropdownEntry(a.which))}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(a,b,c,d,e,f,g,h,i,j,k){var l,m,n=this,o=a.$new(),p=e.openClass,q=angular.noop,r=c.onToggle?d(c.onToggle):angular.noop,s=!1,t=!1;b.addClass("dropdown"),this.init=function(){c.isOpen&&(m=d(c.isOpen),q=m.assign,a.$watch(m,function(a){o.isOpen=!!a})),s=angular.isDefined(c.dropdownAppendToBody),t=angular.isDefined(c.uibKeyboardNav),s&&n.dropdownMenu&&(i.find("body").append(n.dropdownMenu),b.on("$destroy",function(){n.dropdownMenu.remove()}))},this.toggle=function(a){return o.isOpen=arguments.length?!!a:!o.isOpen},this.isOpen=function(){return o.isOpen},o.getToggleElement=function(){return n.toggleElement},o.getAutoClose=function(){return c.autoClose||"always"},o.getElement=function(){return b},o.isKeynavEnabled=function(){return t},o.focusDropdownEntry=function(a){var c=n.dropdownMenu?angular.element(n.dropdownMenu).find("a"):angular.element(b).find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(n.selectedOption)?n.selectedOption=n.selectedOption===c.length-1?n.selectedOption:n.selectedOption+1:n.selectedOption=0;break;case 38:angular.isNumber(n.selectedOption)?n.selectedOption=0===n.selectedOption?0:n.selectedOption-1:n.selectedOption=c.length-1}c[n.selectedOption].focus()},o.getDropdownElement=function(){return n.dropdownMenu},o.focusToggleElement=function(){n.toggleElement&&n.toggleElement[0].focus()},o.$watch("isOpen",function(c,d){if(s&&n.dropdownMenu){var e=h.positionElements(b,n.dropdownMenu,"bottom-left",!0),i={top:e.top+"px",display:c?"block":"none"},m=n.dropdownMenu.hasClass("dropdown-menu-right");m?(i.left="auto",i.right=window.innerWidth-(e.left+b.prop("offsetWidth"))+"px"):(i.left=e.left+"px",i.right="auto"),n.dropdownMenu.css(i)}if(g[c?"addClass":"removeClass"](b,p).then(function(){angular.isDefined(c)&&c!==d&&r(a,{open:!!c})}),c)n.dropdownMenuTemplateUrl&&k(n.dropdownMenuTemplateUrl).then(function(a){l=o.$new(),j(a.trim())(l,function(a){var b=a;n.dropdownMenu.replaceWith(b),n.dropdownMenu=b})}),o.focusToggleElement(),f.open(o);else{if(n.dropdownMenuTemplateUrl){l&&l.$destroy();var t=angular.element('');n.dropdownMenu.replaceWith(t),n.dropdownMenu=t}f.close(o),n.selectedOption=null}angular.isFunction(q)&&q(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==o.getAutoClose()&&(o.isOpen=!1)});var u=a.$on("$destroy",function(){o.$destroy()});o.$on("$destroy",u)}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(a,b,c,d){d.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"AC",require:"?^uibDropdown",link:function(a,b,c,d){if(d&&!angular.isDefined(c.dropdownNested)){b.addClass("dropdown-menu");var e=c.templateUrl;e&&(d.dropdownMenuTemplateUrl=e),d.dropdownMenu||(d.dropdownMenu=b)}}}}).directive("uibKeyboardNav",function(){return{restrict:"A",require:"?^uibDropdown",link:function(a,b,c,d){b.bind("keydown",function(a){if([38,40].indexOf(a.which)!==-1){a.preventDefault(),a.stopPropagation();var b=d.dropdownMenu.find("a");switch(a.which){case 40:angular.isNumber(d.selectedOption)?d.selectedOption=d.selectedOption===b.length-1?d.selectedOption:d.selectedOption+1:d.selectedOption=0;break;case 38:angular.isNumber(d.selectedOption)?d.selectedOption=0===d.selectedOption?0:d.selectedOption-1:d.selectedOption=b.length-1}b[d.selectedOption].focus()}})}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(a,b,c,d){if(d){b.addClass("dropdown-toggle"),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.dropdown").value("$dropdownSuppressWarning",!1).service("dropdownService",["$log","$dropdownSuppressWarning","uibDropdownService",function(a,b,c){b||a.warn("dropdownService is now deprecated. Use uibDropdownService instead."),angular.extend(this,c)}]).controller("DropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest","$log","$dropdownSuppressWarning",function(a,b,c,d,e,f,g,h,i,j,k,l,m){m||l.warn("DropdownController is now deprecated. Use UibDropdownController instead.");var n,o,p=this,q=a.$new(),r=e.openClass,s=angular.noop,t=c.onToggle?d(c.onToggle):angular.noop,u=!1,v=!1;b.addClass("dropdown"),this.init=function(){c.isOpen&&(o=d(c.isOpen),s=o.assign,a.$watch(o,function(a){q.isOpen=!!a})),u=angular.isDefined(c.dropdownAppendToBody),v=angular.isDefined(c.uibKeyboardNav),u&&p.dropdownMenu&&(i.find("body").append(p.dropdownMenu),b.on("$destroy",function(){p.dropdownMenu.remove()}))},this.toggle=function(a){return q.isOpen=arguments.length?!!a:!q.isOpen},this.isOpen=function(){return q.isOpen},q.getToggleElement=function(){return p.toggleElement},q.getAutoClose=function(){return c.autoClose||"always"},q.getElement=function(){return b},q.isKeynavEnabled=function(){return v},q.focusDropdownEntry=function(a){var c=p.dropdownMenu?angular.element(p.dropdownMenu).find("a"):angular.element(b).find("ul").eq(0).find("a");switch(a){case 40:angular.isNumber(p.selectedOption)?p.selectedOption=p.selectedOption===c.length-1?p.selectedOption:p.selectedOption+1:p.selectedOption=0;break;case 38:angular.isNumber(p.selectedOption)?p.selectedOption=0===p.selectedOption?0:p.selectedOption-1:p.selectedOption=c.length-1; -}c[p.selectedOption].focus()},q.getDropdownElement=function(){return p.dropdownMenu},q.focusToggleElement=function(){p.toggleElement&&p.toggleElement[0].focus()},q.$watch("isOpen",function(c,d){if(u&&p.dropdownMenu){var e=h.positionElements(b,p.dropdownMenu,"bottom-left",!0),i={top:e.top+"px",display:c?"block":"none"},l=p.dropdownMenu.hasClass("dropdown-menu-right");l?(i.left="auto",i.right=window.innerWidth-(e.left+b.prop("offsetWidth"))+"px"):(i.left=e.left+"px",i.right="auto"),p.dropdownMenu.css(i)}if(g[c?"addClass":"removeClass"](b,r).then(function(){angular.isDefined(c)&&c!==d&&t(a,{open:!!c})}),c)p.dropdownMenuTemplateUrl&&k(p.dropdownMenuTemplateUrl).then(function(a){n=q.$new(),j(a.trim())(n,function(a){var b=a;p.dropdownMenu.replaceWith(b),p.dropdownMenu=b})}),q.focusToggleElement(),f.open(q);else{if(p.dropdownMenuTemplateUrl){n&&n.$destroy();var m=angular.element('');p.dropdownMenu.replaceWith(m),p.dropdownMenu=m}f.close(q),p.selectedOption=null}angular.isFunction(s)&&s(a,c)}),a.$on("$locationChangeSuccess",function(){"disabled"!==q.getAutoClose()&&(q.isOpen=!1)});var w=a.$on("$destroy",function(){q.$destroy()});q.$on("$destroy",w)}]).directive("dropdown",["$log","$dropdownSuppressWarning",function(a,b){return{controller:"DropdownController",link:function(c,d,e,f){b||a.warn("dropdown is now deprecated. Use uib-dropdown instead."),f.init()}}}]).directive("dropdownMenu",["$log","$dropdownSuppressWarning",function(a,b){return{restrict:"AC",require:"?^dropdown",link:function(c,d,e,f){if(f&&!angular.isDefined(e.dropdownNested)){b||a.warn("dropdown-menu is now deprecated. Use uib-dropdown-menu instead."),d.addClass("dropdown-menu");var g=e.templateUrl;g&&(f.dropdownMenuTemplateUrl=g),f.dropdownMenu||(f.dropdownMenu=d)}}}}]).directive("keyboardNav",["$log","$dropdownSuppressWarning",function(a,b){return{restrict:"A",require:"?^dropdown",link:function(c,d,e,f){b||a.warn("keyboard-nav is now deprecated. Use uib-keyboard-nav instead."),d.bind("keydown",function(a){if([38,40].indexOf(a.which)!==-1){a.preventDefault(),a.stopPropagation();var b=f.dropdownMenu.find("a");switch(a.which){case 40:angular.isNumber(f.selectedOption)?f.selectedOption=f.selectedOption===b.length-1?f.selectedOption:f.selectedOption+1:f.selectedOption=0;break;case 38:angular.isNumber(f.selectedOption)?f.selectedOption=0===f.selectedOption?0:f.selectedOption-1:f.selectedOption=b.length-1}b[f.selectedOption].focus()}})}}}]).directive("dropdownToggle",["$log","$dropdownSuppressWarning",function(a,b){return{require:"?^dropdown",link:function(c,d,e,f){if(b||a.warn("dropdown-toggle is now deprecated. Use uib-dropdown-toggle instead."),f){d.addClass("dropdown-toggle"),f.toggleElement=d;var g=function(a){a.preventDefault(),d.hasClass("disabled")||e.disabled||c.$apply(function(){f.toggle()})};d.bind("click",g),d.attr({"aria-haspopup":!0,"aria-expanded":!1}),c.$watch(f.isOpen,function(a){d.attr("aria-expanded",!!a)}),c.$on("$destroy",function(){d.unbind("click",g)})}}}}]),angular.module("ui.bootstrap.stackedMap",[]).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;c0&&(b=u.top().value,b.modalDomEl.toggleClass(b.windowTopClass||"",a))}function m(){if(q&&j()==-1){var a=r;n(q,r,function(){a=null}),q=void 0,r=void 0}}function n(b,c,d){function e(){e.done||(e.done=!0,p?p(b,{event:"leave"}).start().then(function(){b.remove()}):a.leave(b),c.$destroy(),d&&d())}var g,h=null,i=function(){return g||(g=f.defer(),h=g.promise),function(){g.resolve()}};return c.$broadcast(w.NOW_CLOSING_EVENT,i),f.when(h).then(e)}function o(a,b,c){return!a.value.modalScope.$broadcast("modal.closing",b,c).defaultPrevented}var p=null;g.has("$animateCss")&&(p=g.get("$animateCss"));var q,r,s,t="modal-open",u=i.createNew(),v=h.createNew(),w={NOW_CLOSING_EVENT:"modal.stack.now-closing"},x=0,y="a[href], area[href], input:not([disabled]), button:not([disabled]),select:not([disabled]), textarea:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable=true]";return e.$watch(j,function(a){r&&(r.index=a)}),c.bind("keydown",function(a){if(a.isDefaultPrevented())return a;var b=u.top();if(b&&b.value.keyboard)switch(a.which){case 27:a.preventDefault(),e.$apply(function(){w.dismiss(b.key,"escape key press")});break;case 9:w.loadFocusElementList(b);var c=!1;a.shiftKey?w.isFocusInFirstItem(a)&&(c=w.focusLastFocusableElement()):w.isFocusInLastItem(a)&&(c=w.focusFirstFocusableElement()),c&&(a.preventDefault(),a.stopPropagation())}}),w.open=function(a,b){var f=c[0].activeElement,g=b.openedClass||t;l(!1),u.add(a,{deferred:b.deferred,renderDeferred:b.renderDeferred,modalScope:b.scope,backdrop:b.backdrop,keyboard:b.keyboard,openedClass:b.openedClass,windowTopClass:b.windowTopClass}),v.put(g,a);var h=c.find("body").eq(0),i=j();if(i>=0&&!q){r=e.$new(!0),r.index=i;var k=angular.element('
    ');k.attr("backdrop-class",b.backdropClass),b.animation&&k.attr("modal-animation","true"),q=d(k)(r),h.append(q)}var m=angular.element('
    ');m.attr({"template-url":b.windowTemplateUrl,"window-class":b.windowClass,"window-top-class":b.windowTopClass,size:b.size,index:u.length()-1,animate:"animate"}).html(b.content),b.animation&&m.attr("modal-animation","true");var n=d(m)(b.scope);u.top().value.modalDomEl=n,u.top().value.modalOpener=f,h.append(n),h.addClass(g),w.clearFocusListCache()},w.close=function(a,b){var c=u.get(a);return c&&o(c,b,!0)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.resolve(b),k(a,c.value.modalOpener),!0):!c},w.dismiss=function(a,b){var c=u.get(a);return c&&o(c,b,!1)?(c.value.modalScope.$$uibDestructionScheduled=!0,c.value.deferred.reject(b),k(a,c.value.modalOpener),!0):!c},w.dismissAll=function(a){for(var b=this.getTop();b&&this.dismiss(b.key,a);)b=this.getTop()},w.getTop=function(){return u.top()},w.modalRendered=function(a){var b=u.get(a);b&&b.value.renderDeferred.resolve()},w.focusFirstFocusableElement=function(){return s.length>0&&(s[0].focus(),!0)},w.focusLastFocusableElement=function(){return s.length>0&&(s[s.length-1].focus(),!0)},w.isFocusInFirstItem=function(a){return s.length>0&&(a.target||a.srcElement)==s[0]},w.isFocusInLastItem=function(a){return s.length>0&&(a.target||a.srcElement)==s[s.length-1]},w.clearFocusListCache=function(){s=[],x=0},w.loadFocusElementList=function(a){if((void 0===s||!s.length)&&a){var b=a.value.modalDomEl;b&&b.length&&(s=b[0].querySelectorAll(y))}},w}]).provider("$uibModal",function(){var a={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$templateRequest","$controller","$uibModalStack","$modalSuppressWarning","$log",function(b,c,d,e,f,g,h,i){function j(a){return a.template?d.when(a.template):e(angular.isFunction(a.templateUrl)?a.templateUrl():a.templateUrl)}function k(a){var c=[];return angular.forEach(a,function(a){angular.isFunction(a)||angular.isArray(a)?c.push(d.when(b.invoke(a))):angular.isString(a)?c.push(d.when(b.get(a))):c.push(d.when(a))}),c}var l={},m=null;return l.getPromiseChain=function(){return m},l.open=function(b){function e(){return r}var l=d.defer(),n=d.defer(),o=d.defer(),p={result:l.promise,opened:n.promise,rendered:o.promise,close:function(a){return g.close(p,a)},dismiss:function(a){return g.dismiss(p,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 q,r=d.all([j(b)].concat(k(b.resolve)));return q=m=d.all([m]).then(e,e).then(function(a){var d=(b.scope||c).$new();d.$close=p.close,d.$dismiss=p.dismiss,d.$on("$destroy",function(){d.$$uibDestructionScheduled||d.$dismiss("$uibUnscheduledDestruction")});var e,j={},k=1;b.controller&&(j.$scope=d,j.$uibModalInstance=p,Object.defineProperty(j,"$modalInstance",{get:function(){return h||i.warn("$modalInstance is now deprecated. Use $uibModalInstance instead."),p}}),angular.forEach(b.resolve,function(b,c){j[c]=a[k++]}),e=f(b.controller,j),b.controllerAs&&(b.bindToController&&angular.extend(e,d),d[b.controllerAs]=e)),g.open(p,{scope:d,deferred:l,renderDeferred:o,content:a[0],animation:b.animation,backdrop:b.backdrop,keyboard:b.keyboard,backdropClass:b.backdropClass,windowTopClass:b.windowTopClass,windowClass:b.windowClass,windowTemplateUrl:b.windowTemplateUrl,size:b.size,openedClass:b.openedClass}),n.resolve(!0)},function(a){n.reject(a),l.reject(a)})["finally"](function(){m===q&&(m=null)}),p},l}]};return a}),angular.module("ui.bootstrap.modal").value("$modalSuppressWarning",!1).directive("modalBackdrop",["$animate","$injector","$modalStack","$log","$modalSuppressWarning",function(a,b,c,d,e){function f(b,f,h){e||d.warn("modal-backdrop is now deprecated. Use uib-modal-backdrop instead."),f.addClass("modal-backdrop"),h.modalInClass&&(g?g(f,{addClass:h.modalInClass}).start():a.addClass(f,h.modalInClass),b.$on(c.NOW_CLOSING_EVENT,function(b,c){var d=c();g?g(f,{removeClass:h.modalInClass}).start().then(d):a.removeClass(f,h.modalInClass).then(d)}))}var g=null;return b.has("$animateCss")&&(g=b.get("$animateCss")),{replace:!0,templateUrl:"template/modal/backdrop.html",compile:function(a,b){return a.addClass(b.backdropClass),f}}}]).directive("modalWindow",["$modalStack","$q","$animate","$injector","$log","$modalSuppressWarning",function(a,b,c,d,e,f){var g=null;return d.has("$animateCss")&&(g=d.get("$animateCss")),{scope:{index:"@"},replace:!0,transclude:!0,templateUrl:function(a,b){return b.templateUrl||"template/modal/window.html"},link:function(d,h,i){f||e.warn("modal-window is now deprecated. Use uib-modal-window instead."),h.addClass(i.windowClass||""),h.addClass(i.windowTopClass||""),d.size=i.size,d.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"))},h.on("click",d.close),d.$isRendered=!0;var j=b.defer();i.$observe("modalRender",function(a){"true"==a&&j.resolve()}),j.promise.then(function(){var e=null;i.modalInClass&&(e=g?g(h,{addClass:i.modalInClass}).start():c.addClass(h,i.modalInClass),d.$on(a.NOW_CLOSING_EVENT,function(a,b){var d=b();g?g(h,{removeClass:i.modalInClass}).start().then(d):c.removeClass(h,i.modalInClass).then(d)})),b.when(e).then(function(){var a=h[0].querySelector("[autofocus]");a?a.focus():h[0].focus()});var f=a.getTop();f&&a.modalRendered(f.key)})}}}]).directive("modalAnimationClass",["$log","$modalSuppressWarning",function(a,b){return{compile:function(c,d){b||a.warn("modal-animation-class is now deprecated. Use uib-modal-animation-class instead."),d.modalAnimation&&c.addClass(d.modalAnimationClass)}}}]).directive("modalTransclude",["$log","$modalSuppressWarning",function(a,b){return{link:function(c,d,e,f,g){b||a.warn("modal-transclude is now deprecated. Use uib-modal-transclude instead."),g(c.$parent,function(a){d.empty(),d.append(a)})}}}]).service("$modalStack",["$animate","$timeout","$document","$compile","$rootScope","$q","$injector","$$multiMap","$$stackedMap","$uibModalStack","$log","$modalSuppressWarning",function(a,b,c,d,e,f,g,h,i,j,k,l){l||k.warn("$modalStack is now deprecated. Use $uibModalStack instead."),angular.extend(this,j)}]).provider("$modal",["$uibModalProvider",function(a){angular.extend(this,a),this.$get=["$injector","$log","$modalSuppressWarning",function(b,c,d){return d||c.warn("$modal is now deprecated. Use $uibModal instead."),b.invoke(a.$get)}]}]),angular.module("ui.bootstrap.pagination",[]).controller("UibPaginationController",["$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(g,h){e=g,this.config=h,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=h.itemsPerPage,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()})},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,c){c&&c.preventDefault();var d=!a.ngDisabled||!c;d&&a.page!==b&&b>0&&b<=a.totalPages&&(c&&c.target&&c.target.blur(),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}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("uibPagination",["$parse","uibPaginationConfig",function(a,b){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.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)&&kb&&(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;h<=e;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(e0&&c.page<=c.totalPages&&(c.pages=h(c.page,c.totalPages))}}}}}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(a){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.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.pagination").value("$paginationSuppressWarning",!1).controller("PaginationController",["$scope","$attrs","$parse","$log","$paginationSuppressWarning",function(a,b,c,d,e){e||d.warn("PaginationController is now deprecated. Use UibPaginationController instead.");var f=this,g={$setViewValue:angular.noop},h=b.numPages?c(b.numPages).assign:angular.noop;this.init=function(d,e){g=d,this.config=e,g.$render=function(){f.render()},b.itemsPerPage?a.$parent.$watch(c(b.itemsPerPage),function(b){f.itemsPerPage=parseInt(b,10),a.totalPages=f.calculateTotalPages()}):this.itemsPerPage=e.itemsPerPage,a.$watch("totalItems",function(){a.totalPages=f.calculateTotalPages()}),a.$watch("totalPages",function(b){h(a.$parent,b),a.page>b?a.selectPage(b):g.$render()})},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(g.$viewValue,10)||1},a.selectPage=function(b,c){c&&c.preventDefault();var d=!a.ngDisabled||!c;d&&a.page!==b&&b>0&&b<=a.totalPages&&(c&&c.target&&c.target.blur(),g.$setViewValue(b),g.$render())},a.getText=function(b){return a[b+"Text"]||f.config[b+"Text"]},a.noPrevious=function(){return 1===a.page},a.noNext=function(){return a.page===a.totalPages}}]).directive("pagination",["$parse","uibPaginationConfig","$log","$paginationSuppressWarning",function(a,b,c,d){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["pagination","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"template/pagination/pagination.html"},replace:!0,link:function(e,f,g,h){function i(a,b,c){return{number:a,text:b,active:c}}function j(a,b){var c=[],d=1,e=b,f=angular.isDefined(m)&&mb&&(e=b,d=e-m+1)):(d=(Math.ceil(a/m)-1)*m+1,e=Math.min(d+m-1,b)));for(var g=d;g<=e;g++){var h=i(g,g,g===a);c.push(h)}if(f&&!n){if(d>1){var j=i(d-1,"...",!1);c.unshift(j)}if(e0&&e.page<=e.totalPages&&(e.pages=j(e.page,e.totalPages))}}}}}]).directive("pager",["uibPagerConfig","$log","$paginationSuppressWarning",function(a,b,c){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["pager","?ngModel"],controller:"PaginationController",controllerAs:"pagination",templateUrl:function(a,b){return b.templateUrl||"template/pagination/pager.html"},replace:!0,link:function(d,e,f,g){c||b.warn("pager is now deprecated. Use uib-pager instead.");var h=g[0],i=g[1];i&&(d.align=angular.isDefined(f.align)?d.$parent.$eval(f.align):a.align,h.init(i,a))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",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,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",focus:"blur",none:""},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,f,g,h,i,j,k,l,m){var n=m.createNew();return h.on("keypress",function(a){if(27===a.which){var b=n.top();b&&(b.value.close(),n.removeTop(),b=null)}}),function(e,k,m,o){function p(a){var b=(a||o.trigger||m).split(" "),d=b.map(function(a){return c[a]||a});return{show:b,hide:d}}o=angular.extend({},b,d,o);var q=a(e),r=j.startSymbol(),s=j.endSymbol(),t="
    ';return{compile:function(a,b){var c=f(t);return function(a,b,d,f){function j(){L.isOpen?q():m()}function m(){K&&!a.$eval(d[k+"Enable"])||(u(),x(),L.popupDelay?F||(F=g(r,L.popupDelay,!1)):r())}function q(){s(),L.popupCloseDelay?G||(G=g(t,L.popupCloseDelay,!1)):t()}function r(){return s(),u(),L.content?(v(),void L.$evalAsync(function(){L.isOpen=!0,y(!0),Q()})):angular.noop}function s(){F&&(g.cancel(F),F=null),H&&(g.cancel(H),H=null)}function t(){s(),u(),L&&L.$evalAsync(function(){L.isOpen=!1,y(!1),L.animation?E||(E=g(w,150,!1)):w()})}function u(){G&&(g.cancel(G),G=null),E&&(g.cancel(E),E=null)}function v(){C||(D=L.$new(),C=c(D,function(a){I?h.find("body").append(a):b.after(a)}),z())}function w(){A(),E=null,C&&(C.remove(),C=null),D&&(D.$destroy(),D=null)}function x(){L.title=d[k+"Title"],O?L.content=O(a):L.content=d[e],L.popupClass=d[k+"Class"],L.placement=angular.isDefined(d[k+"Placement"])?d[k+"Placement"]:o.placement;var b=parseInt(d[k+"PopupDelay"],10),c=parseInt(d[k+"PopupCloseDelay"],10);L.popupDelay=isNaN(b)?o.popupDelay:b,L.popupCloseDelay=isNaN(c)?o.popupCloseDelay:c}function y(b){N&&angular.isFunction(N.assign)&&N.assign(a,b)}function z(){P.length=0,O?(P.push(a.$watch(O,function(a){L.content=a,!a&&L.isOpen&&t()})),P.push(D.$watch(function(){M||(M=!0,D.$$postDigest(function(){M=!1,L&&L.isOpen&&Q()}))}))):P.push(d.$observe(e,function(a){L.content=a,!a&&L.isOpen?t():Q()})),P.push(d.$observe(k+"Title",function(a){L.title=a,L.isOpen&&Q()})),P.push(d.$observe(k+"Placement",function(a){L.placement=a?a:o.placement,L.isOpen&&Q()}))}function A(){P.length&&(angular.forEach(P,function(a){a()}),P.length=0)}function B(){var a=d[k+"Trigger"];R(),J=p(a),"none"!==J.show&&J.show.forEach(function(a,c){a===J.hide[c]?b[0].addEventListener(a,j):a&&(b[0].addEventListener(a,m),J.hide[c].split(" ").forEach(function(a){b[0].addEventListener(a,q)})),b.on("keypress",function(a){27===a.which&&q()})})}var C,D,E,F,G,H,I=!!angular.isDefined(o.appendToBody)&&o.appendToBody,J=p(void 0),K=angular.isDefined(d[k+"Enable"]),L=a.$new(!0),M=!1,N=!!angular.isDefined(d[k+"IsOpen"])&&l(d[k+"IsOpen"]),O=!!o.useContentExp&&l(d[e]),P=[],Q=function(){C&&C.html()&&(H||(H=g(function(){C.css({top:0,left:0});var a=i.positionElements(b,C,L.placement,I);a.top+="px",a.left+="px",a.visibility="visible",C.css(a),H=null},0,!1)))};L.origScope=a,L.isOpen=!1,n.add(L,{close:t}),L.contentExp=function(){return L.content},d.$observe("disabled",function(a){a&&s(),a&&L.isOpen&&t()}),N&&a.$watch(N,function(a){L&&!a===L.isOpen&&j()});var R=function(){J.show.forEach(function(a){b.unbind(a,m)}),J.hide.forEach(function(a){a.split(" ").forEach(function(a){b[0].removeEventListener(a,q)})})};B();var S=a.$eval(d[k+"Animation"]);L.animation=angular.isDefined(S)?!!S:o.animation;var T=a.$eval(d[k+"AppendToBody"]);I=angular.isDefined(T)?T:I,I&&a.$on("$locationChangeSuccess",function(){L.isOpen&&t()}),a.$on("$destroy",function(){s(),u(),R(),w(),n.remove(L),L=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(a,b,c,d){return{link:function(e,f,g){var h,i,j,k=e.$eval(g.tooltipTemplateTranscludeScope),l=0,m=function(){i&&(i.remove(),i=null),h&&(h.$destroy(),h=null),j&&(a.leave(j).then(function(){i=null}),i=j,j=null)};e.$watch(b.parseAsResourceUrl(g.uibTooltipTemplateTransclude),function(b){var g=++l;b?(d(b,!0).then(function(d){if(g===l){var e=k.$new(),i=d,n=c(i)(e,function(b){m(),a.enter(b,f)});h=e,j=n,h.$emit("$includeContentLoaded",b)}},function(){g===l&&(m(),e.$emit("$includeContentError",b))}),e.$emit("$includeContentRequested",b)):m()}),e.$on("$destroy",m)}}}]).directive("uibTooltipClasses",function(){return{restrict:"A",link:function(a,b,c){a.placement&&b.addClass(a.placement),a.popupClass&&b.addClass(a.popupClass),a.animation()&&b.addClass(c.tooltipAnimationClass)}}}).directive("uibTooltipPopup",function(){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html",link:function(a,b){b.addClass("tooltip")}}}).directive("uibTooltip",["$uibTooltip",function(a){return a("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html",link:function(a,b){b.addClass("tooltip")}}}).directive("uibTooltipTemplate",["$uibTooltip",function(a){return a("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html",link:function(a,b){b.addClass("tooltip")}}}).directive("uibTooltipHtml",["$uibTooltip",function(a){return a("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.tooltip").value("$tooltipSuppressWarning",!1).provider("$tooltip",["$uibTooltipProvider",function(a){angular.extend(this,a),this.$get=["$log","$tooltipSuppressWarning","$injector",function(b,c,d){return c||b.warn("$tooltip is now deprecated. Use $uibTooltip instead."),d.invoke(a.$get)}]}]).directive("tooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest","$log","$tooltipSuppressWarning",function(a,b,c,d,e,f){return{link:function(g,h,i){f||e.warn("tooltip-template-transclude is now deprecated. Use uib-tooltip-template-transclude instead.");var j,k,l,m=g.$eval(i.tooltipTemplateTranscludeScope),n=0,o=function(){k&&(k.remove(),k=null),j&&(j.$destroy(),j=null),l&&(a.leave(l).then(function(){k=null}),k=l,l=null)};g.$watch(b.parseAsResourceUrl(i.tooltipTemplateTransclude),function(b){var e=++n;b?(d(b,!0).then(function(d){if(e===n){var f=m.$new(),g=d,i=c(g)(f,function(b){o(),a.enter(b,h)});j=f,l=i,j.$emit("$includeContentLoaded",b)}},function(){e===n&&(o(),g.$emit("$includeContentError",b))}),g.$emit("$includeContentRequested",b)):o()}),g.$on("$destroy",o)}}}]).directive("tooltipClasses",["$log","$tooltipSuppressWarning",function(a,b){return{restrict:"A",link:function(c,d,e){b||a.warn("tooltip-classes is now deprecated. Use uib-tooltip-classes instead."),c.placement&&d.addClass(c.placement),c.popupClass&&d.addClass(c.popupClass),c.animation()&&d.addClass(e.tooltipAnimationClass)}}}]).directive("tooltipPopup",["$log","$tooltipSuppressWarning",function(a,b){return{replace:!0,scope:{content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html",link:function(c,d){b||a.warn("tooltip-popup is now deprecated. Use uib-tooltip-popup instead."),d.addClass("tooltip")}}}]).directive("tooltip",["$tooltip",function(a){return a("tooltip","tooltip","mouseenter")}]).directive("tooltipTemplatePopup",["$log","$tooltipSuppressWarning",function(a,b){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/tooltip/tooltip-template-popup.html",link:function(c,d){b||a.warn("tooltip-template-popup is now deprecated. Use uib-tooltip-template-popup instead."),d.addClass("tooltip")}}}]).directive("tooltipTemplate",["$tooltip",function(a){return a("tooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("tooltipHtmlPopup",["$log","$tooltipSuppressWarning",function(a,b){return{replace:!0,scope:{contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-popup.html",link:function(c,d){b||a.warn("tooltip-html-popup is now deprecated. Use uib-tooltip-html-popup instead."),d.addClass("tooltip")}}}]).directive("tooltipHtml",["$tooltip",function(a){return a("tooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html",link:function(a,b){b.addClass("popover")}}}).directive("uibPopoverTemplate",["$uibTooltip",function(a){return a("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover-html.html",link:function(a,b){b.addClass("popover")}}}).directive("uibPopoverHtml",["$uibTooltip",function(a){return a("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html",link:function(a,b){b.addClass("popover")}}}).directive("uibPopover",["$uibTooltip",function(a){return a("uibPopover","popover","click")}]),angular.module("ui.bootstrap.popover").value("$popoverSuppressWarning",!1).directive("popoverTemplatePopup",["$log","$popoverSuppressWarning",function(a,b){return{replace:!0,scope:{title:"@",contentExp:"&",placement:"@",popupClass:"@",animation:"&",isOpen:"&",originScope:"&"},templateUrl:"template/popover/popover-template.html",link:function(c,d){b||a.warn("popover-template-popup is now deprecated. Use uib-popover-template-popup instead."),d.addClass("popover"); -}}}]).directive("popoverTemplate",["$tooltip",function(a){return a("popoverTemplate","popover","click",{useContentExp:!0})}]).directive("popoverHtmlPopup",["$log","$popoverSuppressWarning",function(a,b){return{replace:!0,scope:{contentExp:"&",title:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover-html.html",link:function(c,d){b||a.warn("popover-html-popup is now deprecated. Use uib-popover-html-popup instead."),d.addClass("popover")}}}]).directive("popoverHtml",["$tooltip",function(a){return a("popoverHtml","popover","click",{useContentExp:!0})}]).directive("popoverPopup",["$log","$popoverSuppressWarning",function(a,b){return{replace:!0,scope:{title:"@",content:"@",placement:"@",popupClass:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html",link:function(c,d){b||a.warn("popover-popup is now deprecated. Use uib-popover-popup instead."),d.addClass("popover")}}}]).directive("popover",["$tooltip",function(a){return a("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",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(a.max)?a.max:c.max,this.addBar=function(b,c,f){e||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=f&&angular.isDefined(f.title)?f.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){var a=d.bars.reduce(function(a,b){return b.percent=+(100*b.value/b.max).toFixed(2),a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1),this.bars.forEach(function(a){a.recalculatePercentage()})},a.$watch("max",function(b){d.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{max:"=?"},templateUrl:"template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b,c)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]),{title:c.title})}}}),angular.module("ui.bootstrap.progressbar").value("$progressSuppressWarning",!1).controller("ProgressController",["$scope","$attrs","uibProgressConfig","$log","$progressSuppressWarning",function(a,b,c,d,e){e||d.warn("ProgressController is now deprecated. Use UibProgressController instead.");var f=this,g=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(a.max)?a.max:c.max,this.addBar=function(b,c,d){g||c.css({transition:"none"}),this.bars.push(b),b.max=a.max,b.title=d&&angular.isDefined(d.title)?d.title:"progressbar",b.$watch("value",function(a){b.recalculatePercentage()}),b.recalculatePercentage=function(){b.percent=+(100*b.value/b.max).toFixed(2);var a=f.bars.reduce(function(a,b){return a+b.percent},0);a>100&&(b.percent-=a-100)},b.$on("$destroy",function(){c=null,f.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1)},a.$watch("max",function(b){f.bars.forEach(function(b){b.max=a.max,b.recalculatePercentage()})})}]).directive("progress",["$log","$progressSuppressWarning",function(a,b){return{replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{max:"=?",title:"@?"},templateUrl:"template/progressbar/progress.html",link:function(){b||a.warn("progress is now deprecated. Use uib-progress instead.")}}}]).directive("bar",["$log","$progressSuppressWarning",function(a,b){return{replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(c,d,e,f){b||a.warn("bar is now deprecated. Use uib-bar instead."),f.addBar(c,d)}}}]).directive("progressbar",["$log","$progressSuppressWarning",function(a,b){return{replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",max:"=?",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(c,d,e,f){b||a.warn("progressbar is now deprecated. Use uib-progressbar instead."),f.addBar(c,angular.element(d.children()[0]),{title:e.title})}}}]),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,d.$formatters.push(function(a){return angular.isNumber(a)&&a<<0!==a&&(a=Math.round(a)),a}),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.titles)?a.$parent.$eval(b.titles):c.titles;this.titles=angular.isArray(f)&&f.length>0?f:c.titles;var g=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(g)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;b=this.titles.length?a+1:this.titles[a]},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(d.$viewValue===b?0: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("uibRating",function(){return{require:["uibRating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];e.init(f)}}}),angular.module("ui.bootstrap.rating").value("$ratingSuppressWarning",!1).controller("RatingController",["$scope","$attrs","$controller","$log","$ratingSuppressWarning",function(a,b,c,d,e){e||d.warn("RatingController is now deprecated. Use UibRatingController instead."),angular.extend(this,c("UibRatingController",{$scope:a,$attrs:b}))}]).directive("rating",["$log","$ratingSuppressWarning",function(a,b){return{require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(c,d,e,f){b||a.warn("rating is now deprecated. Use uib-rating instead.");var g=f[0],h=f[1];g.init(h)}}}]),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$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.selectCalled=!1)}),a.active=!0,a.selectCalled||(a.onSelect(),a.selectCalled=!0)},b.addTab=function(a){c.push(a),1===c.length&&a.active!==!1?a.active=!0:a.active?b.select(a):a.active=!1},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("uibTabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"UibTabsetController",templateUrl:"template/tabs/tabset.html",link:function(a,b,c){a.vertical=!!angular.isDefined(c.vertical)&&a.$parent.$eval(c.vertical),a.justified=!!angular.isDefined(c.justified)&&a.$parent.$eval(c.justified)}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},link:function(b,c,d,e,f){b.$watch("active",function(a){a&&e.select(b)}),b.disabled=!1,d.disable&&b.$parent.$watch(a(d.disable),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},e.addTab(b),b.$on("$destroy",function(){e.removeTab(b)}),b.$transcludeFn=f}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:["?^uibTab","?^tab"],link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}).directive("uibTabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("tab-heading")||a.hasAttribute("data-tab-heading")||a.hasAttribute("x-tab-heading")||a.hasAttribute("uib-tab-heading")||a.hasAttribute("data-uib-tab-heading")||a.hasAttribute("x-uib-tab-heading")||"tab-heading"===a.tagName.toLowerCase()||"data-tab-heading"===a.tagName.toLowerCase()||"x-tab-heading"===a.tagName.toLowerCase()||"uib-tab-heading"===a.tagName.toLowerCase()||"data-uib-tab-heading"===a.tagName.toLowerCase()||"x-uib-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:["?^uibTabset","?^tabset"],link:function(b,c,d){var e=b.$eval(d.uibTabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.tabs").value("$tabsSuppressWarning",!1).controller("TabsetController",["$scope","$controller","$log","$tabsSuppressWarning",function(a,b,c,d){d||c.warn("TabsetController is now deprecated. Use UibTabsetController instead."),angular.extend(this,b("UibTabsetController",{$scope:a}))}]).directive("tabset",["$log","$tabsSuppressWarning",function(a,b){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(c,d,e){b||a.warn("tabset is now deprecated. Use uib-tabset instead."),c.vertical=!!angular.isDefined(e.vertical)&&c.$parent.$eval(e.vertical),c.justified=!!angular.isDefined(e.justified)&&c.$parent.$eval(e.justified)}}}]).directive("tab",["$parse","$log","$tabsSuppressWarning",function(a,b,c){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},link:function(d,e,f,g,h){c||b.warn("tab is now deprecated. Use uib-tab instead."),d.$watch("active",function(a){a&&g.select(d)}),d.disabled=!1,f.disable&&d.$parent.$watch(a(f.disable),function(a){d.disabled=!!a}),d.select=function(){d.disabled||(d.active=!0)},g.addTab(d),d.$on("$destroy",function(){g.removeTab(d)}),d.$transcludeFn=h}}}]).directive("tabHeadingTransclude",["$log","$tabsSuppressWarning",function(a,b){return{restrict:"A",require:"^tab",link:function(c,d){b||a.warn("tab-heading-transclude is now deprecated. Use uib-tab-heading-transclude instead."),c.$watch("headingElement",function(a){a&&(d.html(""),d.append(a))})}}}]).directive("tabContentTransclude",["$log","$tabsSuppressWarning",function(a,b){function c(a){return a.tagName&&(a.hasAttribute("tab-heading")||a.hasAttribute("data-tab-heading")||a.hasAttribute("x-tab-heading")||"tab-heading"===a.tagName.toLowerCase()||"data-tab-heading"===a.tagName.toLowerCase()||"x-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(d,e,f){b||a.warn("tab-content-transclude is now deprecated. Use uib-tab-content-transclude instead.");var g=d.$eval(f.tabContentTransclude);g.$transcludeFn(g.$parent,function(a){angular.forEach(a,function(a){c(a)?g.headingElement=a:e.append(a)})})}}}]),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,b,c,d,e,f,g){function h(){var b=parseInt(a.hours,10),c=a.showMeridian?b>0&&b<13:b>=0&&b<24;if(c)return a.showMeridian&&(12===b&&(b=0),a.meridian===r[1]&&(b+=12)),b}function i(){var b=parseInt(a.minutes,10);return b>=0&&b<60?b:void 0}function j(a){return angular.isDefined(a)&&a.toString().length<2?"0"+a:a.toString()}function k(a){l(),q.$setViewValue(new Date(p)),m(a)}function l(){q.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1}function m(b){var c=p.getHours(),d=p.getMinutes();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:j(c),"m"!==b&&(a.minutes=j(d)),a.meridian=p.getHours()<12?r[0]:r[1]}function n(a,b){var c=new Date(a.getTime()+6e4*b),d=new Date(a);return d.setHours(c.getHours(),c.getMinutes()),d}function o(a){p=n(p,a),k()}var p=new Date,q={$setViewValue:angular.noop},r=angular.isDefined(c.meridians)?a.$parent.$eval(c.meridians):g.meridians||f.DATETIME_FORMATS.AMPMS;a.tabindex=angular.isDefined(c.tabindex)?c.tabindex:0,b.removeAttr("tabindex"),this.init=function(b,d){q=b,q.$render=this.render,q.$formatters.unshift(function(a){return a?new Date(a):null});var e=d.eq(0),f=d.eq(1),h=angular.isDefined(c.mousewheel)?a.$parent.$eval(c.mousewheel):g.mousewheel;h&&this.setupMousewheelEvents(e,f);var i=angular.isDefined(c.arrowkeys)?a.$parent.$eval(c.arrowkeys):g.arrowkeys;i&&this.setupArrowkeyEvents(e,f),a.readonlyInput=angular.isDefined(c.readonlyInput)?a.$parent.$eval(c.readonlyInput):g.readonlyInput,this.setupInputEvents(e,f)};var s=g.hourStep;c.hourStep&&a.$parent.$watch(d(c.hourStep),function(a){s=parseInt(a,10)});var t=g.minuteStep;c.minuteStep&&a.$parent.$watch(d(c.minuteStep),function(a){t=parseInt(a,10)});var u;a.$parent.$watch(d(c.min),function(a){var b=new Date(a);u=isNaN(b)?void 0:b});var v;a.$parent.$watch(d(c.max),function(a){var b=new Date(a);v=isNaN(b)?void 0:b}),a.noIncrementHours=function(){var a=n(p,60*s);return a>v||ap&&a>v},a.noIncrementMinutes=function(){var a=n(p,t);return a>v||ap&&a>v},a.noToggleMeridian=function(){return p.getHours()<13?n(p,720)>v:n(p,-720)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.setupArrowkeyEvents=function(b,c){b.bind("keydown",function(b){38===b.which?(b.preventDefault(),a.incrementHours(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementHours(),a.$apply())}),c.bind("keydown",function(b){38===b.which?(b.preventDefault(),a.incrementMinutes(),a.$apply()):40===b.which&&(b.preventDefault(),a.decrementMinutes(),a.$apply())})},this.setupInputEvents=function(b,c){if(a.readonlyInput)return a.updateHours=angular.noop,void(a.updateMinutes=angular.noop);var d=function(b,c){q.$setViewValue(null),q.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c)};a.updateHours=function(){var a=h(),b=i();angular.isDefined(a)&&angular.isDefined(b)?(p.setHours(a),pv?d(!0):k("h")):d(!0)},b.bind("blur",function(b){!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=j(a.hours)})}),a.updateMinutes=function(){var a=i(),b=h();angular.isDefined(a)&&angular.isDefined(b)?(p.setMinutes(a),pv?d(void 0,!0):k("m")):d(void 0,!0)},c.bind("blur",function(b){!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=j(a.minutes)})})},this.render=function(){var b=q.$viewValue;isNaN(b)?(q.$setValidity("time",!1),e.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.')):(b&&(p=b),pv?(q.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):l(),m())},a.showSpinners=angular.isDefined(c.showSpinners)?a.$parent.$eval(c.showSpinners):g.showSpinners,a.incrementHours=function(){a.noIncrementHours()||o(60*s)},a.decrementHours=function(){a.noDecrementHours()||o(60*-s)},a.incrementMinutes=function(){a.noIncrementMinutes()||o(t)},a.decrementMinutes=function(){a.noDecrementMinutes()||o(-t)},a.toggleMeridian=function(){a.noToggleMeridian()||o(720*(p.getHours()<12?1:-1))}}]).directive("uibTimepicker",function(){return{restrict:"EA",require:["uibTimepicker","?^ngModel"],controller:"UibTimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(a,b){return b.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.timepicker").value("$timepickerSuppressWarning",!1).controller("TimepickerController",["$scope","$element","$attrs","$controller","$log","$timepickerSuppressWarning",function(a,b,c,d,e,f){f||e.warn("TimepickerController is now deprecated. Use UibTimepickerController instead."),angular.extend(this,d("UibTimepickerController",{$scope:a,$element:b,$attrs:c}))}]).directive("timepicker",["$log","$timepickerSuppressWarning",function(a,b){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",controllerAs:"timepicker",replace:!0,scope:{},templateUrl:function(a,b){return b.templateUrl||"template/timepicker/timepicker.html"},link:function(c,d,e,f){b||a.warn("timepicker is now deprecated. Use uib-timepicker instead.");var g=f[0],h=f[1];h&&g.init(h,d.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position"]).factory("uibTypeaheadParser",["$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])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$uibPosition","uibTypeaheadParser",function(a,b,c,d,e,f,g,h,i,j,k,l){function m(){K.moveInProgress||(K.moveInProgress=!0,K.$digest()),S&&g.cancel(S),S=g(function(){K.matches.length&&n(),K.moveInProgress=!1},r)}function n(){K.position=C?k.offset(b):k.position(b),K.position.top+=b.prop("offsetHeight")}var o,p,q=[9,13,27,38,40],r=200,s=a.$eval(c.typeaheadMinLength);s||0===s||(s=1);var t,u,v=a.$eval(c.typeaheadWaitMs)||0,w=a.$eval(c.typeaheadEditable)!==!1,x=e(c.typeaheadLoading).assign||angular.noop,y=e(c.typeaheadOnSelect),z=!!angular.isDefined(c.typeaheadSelectOnBlur)&&a.$eval(c.typeaheadSelectOnBlur),A=e(c.typeaheadNoResults).assign||angular.noop,B=c.typeaheadInputFormatter?e(c.typeaheadInputFormatter):void 0,C=!!c.typeaheadAppendToBody&&a.$eval(c.typeaheadAppendToBody),D=c.typeaheadAppendToElementId||!1,E=a.$eval(c.typeaheadFocusFirst)!==!1,F=!!c.typeaheadSelectOnExact&&a.$eval(c.typeaheadSelectOnExact),G=e(c.ngModel),H=e(c.ngModel+"($$$p)"),I=function(b,c){return angular.isFunction(G(a))&&p&&p.$options&&p.$options.getterSetter?H(b,{$$$p:c}):G.assign(b,c)},J=l.parse(c.uibTypeahead),K=a.$new(),L=a.$on("$destroy",function(){K.$destroy()});K.$on("$destroy",L);var M="typeahead-"+K.$id+"-"+Math.floor(1e4*Math.random());b.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":M});var N=angular.element("
    ");N.attr({id:M,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"}),angular.isDefined(c.typeaheadTemplateUrl)&&N.attr("template-url",c.typeaheadTemplateUrl),angular.isDefined(c.typeaheadPopupTemplateUrl)&&N.attr("popup-template-url",c.typeaheadPopupTemplateUrl);var O=function(){K.matches=[],K.activeIdx=-1,b.attr("aria-expanded",!1)},P=function(a){return M+"-option-"+a};K.$watch("activeIdx",function(a){a<0?b.removeAttr("aria-activedescendant"):b.attr("aria-activedescendant",P(a))});var Q=function(a,b){return!!(K.matches.length>b&&a)&&a.toUpperCase()===K.matches[b].label.toUpperCase()},R=function(c){var d={$viewValue:c};x(a,!0),A(a,!1),f.when(J.source(a,d)).then(function(e){var f=c===o.$viewValue;if(f&&t)if(e&&e.length>0){K.activeIdx=E?0:-1,A(a,!1),K.matches.length=0;for(var g=0;g0?K.activeIdx:K.matches.length)-1,K.$digest()):13===a.which||9===a.which?K.$apply(function(){K.select(K.activeIdx)}):27===a.which&&(a.stopPropagation(),O(),K.$digest())}}),b.bind("blur",function(){z&&K.matches.length&&K.activeIdx!==-1&&!u&&(u=!0,K.$apply(function(){K.select(K.activeIdx)})),t=!1,u=!1});var W=function(a){b[0]!==a.target&&3!==a.which&&0!==K.matches.length&&(O(),j.$$phase||K.$digest())};h.bind("click",W),a.$on("$destroy",function(){h.unbind("click",W),(C||D)&&X.remove(),C&&(angular.element(i).unbind("resize",m),h.find("body").unbind("scroll",m)),N.remove()});var X=d(N)(K);C?h.find("body").append(X):D!==!1?angular.element(h[0].getElementById(D)).append(X):b.after(X),this.init=function(b,c){o=b,p=c,o.$parsers.unshift(function(b){return t=!0,0===s||b&&b.length>=s?v>0?(V(),U(b)):R(b):(x(a,!1),V(),O()),w?b:b?void o.$setValidity("editable",!1):(o.$setValidity("editable",!0),null)}),o.$formatters.push(function(b){var c,d,e={};return w||o.$setValidity("editable",!0),B?(e.$model=b,B(a,e)):(e[J.itemName]=b,c=J.viewMapper(a,e),e[J.itemName]=void 0,d=J.viewMapper(a,e),c!==d?c:b)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","^?ngModelOptions","uibTypeahead"],link:function(a,b,c,d){d[2].init(d[0],d[1])}}}).directive("uibTypeaheadPopup",function(){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"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("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(a,b,c){return{scope:{index:"=",match:"=",query:"="},link:function(d,e,f){var g=c(f.templateUrl)(d.$parent)||"template/typeahead/typeahead-match.html";a(g).then(function(a){b(a.trim())(d,function(a){e.replaceWith(a)})})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(a,b,c){function d(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function e(a){return/<.*>/g.test(a)}var f;return f=b.has("$sanitize"),function(b,g){return!f&&e(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=g?(""+b).replace(new RegExp(d(g),"gi"),"$&"):b,f||(b=a.trustAsHtml(b)),b}}]),angular.module("ui.bootstrap.typeahead").value("$typeaheadSuppressWarning",!1).service("typeaheadParser",["$parse","uibTypeaheadParser","$log","$typeaheadSuppressWarning",function(a,b,c,d){return d||c.warn("typeaheadParser is now deprecated. Use uibTypeaheadParser instead."),b}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$window","$rootScope","$uibPosition","typeaheadParser","$log","$typeaheadSuppressWarning",function(a,b,c,d,e,f,g,h,i,j,k){var l=[9,13,27,38,40],m=200;return{require:["ngModel","^?ngModelOptions"],link:function(n,o,p,q){function r(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),V&&d.cancel(V),V=d(function(){N.matches.length&&s(),N.moveInProgress=!1},m)}function s(){N.position=F?h.offset(o):h.position(o),N.position.top+=o.prop("offsetHeight")}k||j.warn("typeahead is now deprecated. Use uib-typeahead instead.");var t=q[0],u=q[1],v=n.$eval(p.typeaheadMinLength);v||0===v||(v=1);var w,x,y=n.$eval(p.typeaheadWaitMs)||0,z=n.$eval(p.typeaheadEditable)!==!1,A=b(p.typeaheadLoading).assign||angular.noop,B=b(p.typeaheadOnSelect),C=!!angular.isDefined(p.typeaheadSelectOnBlur)&&n.$eval(p.typeaheadSelectOnBlur),D=b(p.typeaheadNoResults).assign||angular.noop,E=p.typeaheadInputFormatter?b(p.typeaheadInputFormatter):void 0,F=!!p.typeaheadAppendToBody&&n.$eval(p.typeaheadAppendToBody),G=p.typeaheadAppendToElementId||!1,H=n.$eval(p.typeaheadFocusFirst)!==!1,I=!!p.typeaheadSelectOnExact&&n.$eval(p.typeaheadSelectOnExact),J=b(p.ngModel),K=b(p.ngModel+"($$$p)"),L=function(a,b){return angular.isFunction(J(n))&&u&&u.$options&&u.$options.getterSetter?K(a,{$$$p:b}):J.assign(a,b)},M=i.parse(p.typeahead),N=n.$new(),O=n.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",O);var P="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());o.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":P});var Q=angular.element("
    ");Q.attr({id:P,matches:"matches",active:"activeIdx",select:"select(activeIdx)","move-in-progress":"moveInProgress",query:"query",position:"position"}),angular.isDefined(p.typeaheadTemplateUrl)&&Q.attr("template-url",p.typeaheadTemplateUrl),angular.isDefined(p.typeaheadPopupTemplateUrl)&&Q.attr("popup-template-url",p.typeaheadPopupTemplateUrl);var R=function(){N.matches=[],N.activeIdx=-1,o.attr("aria-expanded",!1)},S=function(a){return P+"-option-"+a};N.$watch("activeIdx",function(a){a<0?o.removeAttr("aria-activedescendant"):o.attr("aria-activedescendant",S(a))});var T=function(a,b){return!!(N.matches.length>b&&a)&&a.toUpperCase()===N.matches[b].label.toUpperCase()},U=function(a){var b={$viewValue:a};A(n,!0),D(n,!1),c.when(M.source(n,b)).then(function(c){var d=a===t.$viewValue;if(d&&w)if(c&&c.length>0){N.activeIdx=H?0:-1,D(n,!1),N.matches.length=0;for(var e=0;e=v?y>0?(Y(),X(a)):U(a):(A(n,!1),Y(),R()),z?a:a?void t.$setValidity("editable",!1):(t.$setValidity("editable",!0),null)}),t.$formatters.push(function(a){var b,c,d={};return z||t.$setValidity("editable",!0),E?(d.$model=a,E(n,d)):(d[M.itemName]=a,b=M.viewMapper(n,d),d[M.itemName]=void 0,c=M.viewMapper(n,d),b!==c?b:a)}),N.select=function(a){var b,c,e={};x=!0,e[M.itemName]=c=N.matches[a].model,b=M.modelMapper(n,e),L(n,b),t.$setValidity("editable",!0),t.$setValidity("parse",!0),B(n,{$item:c,$model:b,$label:M.viewMapper(n,e)}),R(),N.$eval(p.typeaheadFocusOnSelect)!==!1&&d(function(){o[0].focus()},0,!1)},o.bind("keydown",function(a){if(0!==N.matches.length&&l.indexOf(a.which)!==-1){if(N.activeIdx===-1&&(9===a.which||13===a.which))return R(),void N.$digest();a.preventDefault(),40===a.which?(N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest()):38===a.which?(N.activeIdx=(N.activeIdx>0?N.activeIdx:N.matches.length)-1,N.$digest()):13===a.which||9===a.which?N.$apply(function(){N.select(N.activeIdx)}):27===a.which&&(a.stopPropagation(),R(),N.$digest())}}),o.bind("blur",function(){C&&N.matches.length&&N.activeIdx!==-1&&!x&&(x=!0,N.$apply(function(){N.select(N.activeIdx)})),w=!1,x=!1});var Z=function(a){o[0]!==a.target&&3!==a.which&&0!==N.matches.length&&(R(),g.$$phase||N.$digest())};e.bind("click",Z),n.$on("$destroy",function(){e.unbind("click",Z),(F||G)&&$.remove(),F&&(angular.element(f).unbind("resize",r),e.find("body").unbind("scroll",r)),Q.remove()});var $=a(Q)(N);F?e.find("body").append($):G!==!1?angular.element(e[0].getElementById(G)).append($):o.after($)}}}]).directive("typeaheadPopup",["$typeaheadSuppressWarning","$log",function(a,b){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&"},replace:!0,templateUrl:function(a,b){return b.popupTemplateUrl||"template/typeahead/typeahead-popup.html"},link:function(c,d,e){a||b.warn("typeahead-popup is now deprecated. Use uib-typeahead-popup instead."),c.templateUrl=e.templateUrl,c.isOpen=function(){return c.matches.length>0},c.isActive=function(a){return c.active==a},c.selectActive=function(a){c.active=a},c.selectMatch=function(a){c.select({activeIdx:a})}}}}]).directive("typeaheadMatch",["$templateRequest","$compile","$parse","$typeaheadSuppressWarning","$log",function(a,b,c,d,e){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(f,g,h){d||e.warn("typeahead-match is now deprecated. Use uib-typeahead-match instead.");var i=c(h.templateUrl)(f.$parent)||"template/typeahead/typeahead-match.html";a(i).then(function(a){b(a.trim())(f,function(a){g.replaceWith(a)})})}}}]).filter("typeaheadHighlight",["$sce","$injector","$log","$typeaheadSuppressWarning",function(a,b,c,d){function e(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}function f(a){return/<.*>/g.test(a)}var g;return g=b.has("$sanitize"),function(b,h){return d||c.warn("typeaheadHighlight is now deprecated. Use uibTypeaheadHighlight instead."),!g&&f(b)&&c.warn("Unsafe use of typeahead please use ngSanitize"),b=h?(""+b).replace(new RegExp(e(h),"gi"),"$&"):b,g||(b=a.trustAsHtml(b)),b}}]),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion-group.html",'
    \n
    \n

    \n {{heading}}\n

    \n
    \n
    \n\t
    \n
    \n
    \n')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion.html",'
    ')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("template/alert/alert.html",'\n'); -}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("template/carousel/carousel.html",'')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("template/carousel/slide.html",'
    \n')}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/datepicker.html",'
    \n \n \n \n
    ')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    {{::label.abbr}}
    {{ weekNumbers[$index] }}\n \n
    \n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/popup.html",'\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("template/modal/backdrop.html",'
    \n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(a){a.put("template/modal/window.html",'\n')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pager.html",'\n')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pagination.html",'\n')}]),angular.module("template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-html-popup.html",'\n
    \n
    \n\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-popup.html",'\n
    \n
    \n\n')}]),angular.module("template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-template-popup.html",'\n
    \n
    \n\n')}]),angular.module("template/popover/popover-html.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover-html.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("template/popover/popover-template.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover-template.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover.html",'
    \n
    \n\n
    \n

    \n
    \n
    \n
    \n')}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/bar.html",'
    \n')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progress.html",'
    ')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progressbar.html",'
    \n
    \n
    \n')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("template/rating/rating.html",'\n ({{ $index < value ? \'*\' : \' \' }})\n \n\n')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tab.html",'
  • \n {{heading}}\n
  • \n')}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tabset.html",'
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
     
    \n \n :\n \n
     
    \n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-match.html",'\n')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-popup.html",'\n')}]),!angular.$$csp()&&angular.element(document).find("head").prepend(''),!function(a,b){"function"==typeof define&&define.amd?define([],function(){return b()}):"object"==typeof exports?module.exports=b():b()}(this,function(){function a(a){var b=a.storageKey(),c=a.storage(),d=function(){var d=a.preferredLanguage();angular.isString(d)?a.use(d):c.put(b,a.use())};d.displayName="fallbackFromIncorrectStorageValue",c?c.get(b)?a.use(c.get(b))["catch"](d):d():angular.isString(a.preferredLanguage())&&a.use(a.preferredLanguage())}function b(){var a,b,c=null,d=!1,e=!1;b={sanitize:function(a,b){return"text"===b&&(a=g(a)),a},escape:function(a,b){return"text"===b&&(a=f(a)),a},sanitizeParameters:function(a,b){return"params"===b&&(a=h(a,g)),a},escapeParameters:function(a,b){return"params"===b&&(a=h(a,f)),a}},b.escaped=b.escapeParameters,this.addStrategy=function(a,c){return b[a]=c,this},this.removeStrategy=function(a){return delete b[a],this},this.useStrategy=function(a){return d=!0,c=a,this},this.$get=["$injector","$log",function(f,g){var h={},i=function(a,c,d){return angular.forEach(d,function(d){if(angular.isFunction(d))a=d(a,c);else if(angular.isFunction(b[d]))a=b[d](a,c);else{if(!angular.isString(b[d]))throw new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+d+"'");if(!h[b[d]])try{h[b[d]]=f.get(b[d])}catch(e){throw h[b[d]]=function(){},new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+d+"'")}a=h[b[d]](a,c)}}),a},j=function(){d||e||(g.warn("pascalprecht.translate.$translateSanitization: No sanitization strategy has been configured. This can have serious security implications. See http://angular-translate.github.io/docs/#/guide/19_security for details."),e=!0)};return f.has("$sanitize")&&(a=f.get("$sanitize")),{useStrategy:function(a){return function(b){a.useStrategy(b)}}(this),sanitize:function(a,b,d){if(c||j(),arguments.length<3&&(d=c),!d)return a;var e=angular.isArray(d)?d:[d];return i(a,b,e)}}}];var f=function(a){var b=angular.element("
    ");return b.text(a),b.html()},g=function(b){if(!a)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot find $sanitize service. Either include the ngSanitize module (https://docs.angularjs.org/api/ngSanitize) or use a sanitization strategy which does not depend on $sanitize, such as 'escape'.");return a(b)},h=function(a,b,c){if(angular.isObject(a)){var d=angular.isArray(a)?[]:{};if(c){if(c.indexOf(a)>-1)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot interpolate parameter due recursive object")}else c=[];return c.push(a),angular.forEach(a,function(a,e){angular.isFunction(a)||(d[e]=h(a,b,c))}),c.splice(-1,1),d}return angular.isNumber(a)?a:b(a)}}function c(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u={},v=[],w=a,x=[],y="translate-cloak",z=!1,A=!1,B=".",C=!1,D=!1,E=0,F=!0,G="default",H={"default":function(a){return(a||"").split("-").join("_")},java:function(a){var b=(a||"").split("-").join("_"),c=b.split("_");return c.length>1?c[0].toLowerCase()+"_"+c[1].toUpperCase():b},bcp47:function(a){var b=(a||"").split("_").join("-"),c=b.split("-");return c.length>1?c[0].toLowerCase()+"-"+c[1].toUpperCase():b},"iso639-1":function(a){var b=(a||"").split("_").join("-"),c=b.split("-");return c[0].toLowerCase()}},I="2.11.1",J=function(){if(angular.isFunction(d.getLocale))return d.getLocale();var a,c,e=b.$get().navigator,f=["language","browserLanguage","systemLanguage","userLanguage"];if(angular.isArray(e.languages))for(a=0;a-1)return a;if(f){var g;for(var h in f)if(f.hasOwnProperty(h)){var i=!1,j=Object.prototype.hasOwnProperty.call(f,h)&&angular.lowercase(h)===angular.lowercase(a);if("*"===h.slice(-1)&&(i=h.slice(0,-1)===a.slice(0,h.length-1)),(j||i)&&(g=f[h],L(b,angular.lowercase(g))>-1))return g}}var k=a.split("_");return k.length>1&&L(b,angular.lowercase(k[0]))>-1?k[0]:void 0}},O=function(a,b){if(!a&&!b)return u;if(a&&!b){if(angular.isString(a))return u[a]}else angular.isObject(u[a])||(u[a]={}),angular.extend(u[a],P(b));return this};this.translations=O,this.cloakClassName=function(a){return a?(y=a,this):y},this.nestedObjectDelimeter=function(a){return a?(B=a,this):B};var P=function(a,b,c,d){var e,f,g,h;b||(b=[]),c||(c={});for(e in a)Object.prototype.hasOwnProperty.call(a,e)&&(h=a[e],angular.isObject(h)?P(h,b.concat(e),c,e):(f=b.length?""+b.join(B)+B+e:e,b.length&&e===d&&(g=""+b.join(B),c[g]="@:"+f),c[f]=h));return c};P.displayName="flatObject",this.addInterpolation=function(a){return x.push(a),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(a){return n=a,this},this.useSanitizeValueStrategy=function(a){return c.useStrategy(a),this},this.preferredLanguage=function(a){return a?(Q(a),this):e};var Q=function(a){return a&&(e=a),e};this.translationNotFoundIndicator=function(a){return this.translationNotFoundIndicatorLeft(a),this.translationNotFoundIndicatorRight(a),this},this.translationNotFoundIndicatorLeft=function(a){return a?(q=a,this):q},this.translationNotFoundIndicatorRight=function(a){return a?(r=a,this):r},this.fallbackLanguage=function(a){return R(a),this};var R=function(a){return a?(angular.isString(a)?(h=!0,g=[a]):angular.isArray(a)&&(h=!1,g=a),angular.isString(e)&&L(g,e)<0&&g.push(e),this):h?g[0]:g};this.use=function(a){if(a){if(!u[a]&&!o)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+a+"'");return i=a,this}return i},this.resolveClientLocale=function(){return K()};var S=function(a){return a?(w=a,this):l?l+w:w};this.storageKey=S,this.useUrlLoader=function(a,b){return this.useLoader("$translateUrlLoader",angular.extend({url:a},b))},this.useStaticFilesLoader=function(a){return this.useLoader("$translateStaticFilesLoader",a)},this.useLoader=function(a,b){return o=a,p=b||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(a){return k=a,this},this.storagePrefix=function(a){return a?(l=a,this):a},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(a){return m=a,this},this.usePostCompiling=function(a){return z=!!a,this},this.forceAsyncReload=function(a){return A=!!a,this},this.uniformLanguageTag=function(a){return a?angular.isString(a)&&(a={standard:a}):a={},G=a.standard,this},this.determinePreferredLanguage=function(a){var b=a&&angular.isFunction(a)?a():K();return e=v.length?N(b)||b:b,this},this.registerAvailableLanguageKeys=function(a,b){return a?(v=a,b&&(f=b),this):v},this.useLoaderCache=function(a){return a===!1?s=void 0:a===!0?s=!0:"undefined"==typeof a?s="$translationCache":a&&(s=a),this},this.directivePriority=function(a){return void 0===a?E:(E=a,this)},this.statefulFilter=function(a){return void 0===a?F:(F=a,this)},this.postProcess=function(a){return t=a?a:void 0,this},this.keepContent=function(a){return D=!!a,this},this.$get=["$log","$injector","$rootScope","$q",function(a,b,c,d){var f,l,G,H=b.get(n||"$translateDefaultInterpolation"),J=!1,T={},U={},V=function(a,b,c,h,j){!i&&e&&(i=e);var m=j&&j!==i?N(j)||j:i;if(j&&ka(j),angular.isArray(a)){var n=function(a){for(var e={},f=[],g=function(a){var f=d.defer(),g=function(b){e[a]=b,f.resolve([a,b])};return V(a,b,c,h,j).then(g,g),f.promise},i=0,k=a.length;i0?G:l,a,b,c,d)},fa=function(a,b,c){return da(G>0?G:l,a,b,c)},ga=function(a,b,c,e,f){var h=d.defer(),i=f?u[f]:u,j=c?T[c]:H;if(i&&Object.prototype.hasOwnProperty.call(i,a)){var k=i[a];if("@:"===k.substr(0,2))V(k.substr(2),b,c,e,f).then(h.resolve,h.reject);else{var l=j.interpolate(k,b);l=ja(a,k,l,b,f),h.resolve(l)}}else{var n;m&&!J&&(n=ba(a,b,e)),f&&g&&g.length?ea(a,b,j,e).then(function(a){h.resolve(a)},function(a){h.reject(W(a))}):m&&!J&&n?e?h.resolve(e):h.resolve(n):e?h.resolve(e):h.reject(W(a))}return h.promise},ha=function(a,b,c,d){var e,f=d?u[d]:u,h=H;if(T&&Object.prototype.hasOwnProperty.call(T,c)&&(h=T[c]),f&&Object.prototype.hasOwnProperty.call(f,a)){var i=f[a];"@:"===i.substr(0,2)?e=ha(i.substr(2),b,c,d):(e=h.interpolate(i,b),e=ja(a,i,e,b,d))}else{var j;m&&!J&&(j=ba(a,b)),d&&g&&g.length?(l=0,e=fa(a,b,h)):e=m&&!J&&j?j:W(a)}return e},ia=function(a){j===a&&(j=void 0),U[a]=void 0},ja=function(a,c,d,e,f){var g=t;return g&&("string"==typeof g&&(g=b.get(g)),g)?g(a,c,d,e,f):d},ka=function(a){u[a]||!o||U[a]||(U[a]=Y(a).then(function(a){return O(a.key,a.table),a}))};V.preferredLanguage=function(a){return a&&Q(a),e},V.cloakClassName=function(){return y},V.nestedObjectDelimeter=function(){return B},V.fallbackLanguage=function(a){if(void 0!==a&&null!==a){if(R(a),o&&g&&g.length)for(var b=0,c=g.length;b-1&&(G=b)}else G=0},V.proposedLanguage=function(){return j},V.storage=function(){return f},V.negotiateLocale=N,V.use=function(a){if(!a)return i;var b=d.defer();c.$emit("$translateChangeStart",{language:a});var e=N(a);return v.length>0&&!e?d.reject(a):(e&&(a=e),j=a,!A&&u[a]||!o||U[a]?U[a]?U[a].then(function(a){return j===a.key&&X(a.key),b.resolve(a.key),a},function(a){return!i&&g&&g.length>0?V.use(g[0]).then(b.resolve,b.reject):b.reject(a)}):(b.resolve(a),X(a)):(U[a]=Y(a).then(function(c){return O(c.key,c.table),b.resolve(c.key),j===a&&X(c.key),c},function(a){return c.$emit("$translateChangeError",{language:a}),b.reject(a),c.$emit("$translateChangeEnd",{language:a}),d.reject(a)}),U[a]["finally"](function(){ia(a)})),b.promise)},V.resolveClientLocale=function(){return K()},V.storageKey=function(){return S()},V.isPostCompilingEnabled=function(){return z},V.isForceAsyncReloadEnabled=function(){return A},V.isKeepContent=function(){return D},V.refresh=function(a){function b(){f.resolve(),c.$emit("$translateRefreshEnd",{language:a})}function e(){f.reject(),c.$emit("$translateRefreshEnd",{language:a})}if(!o)throw new Error("Couldn't refresh translation table, no loader registered!");var f=d.defer();if(c.$emit("$translateRefreshStart",{ -language:a}),a)if(u[a]){var h=function(c){return O(c.key,c.table),a===i&&X(i),b(),c};h.displayName="refreshPostProcessor",Y(a).then(h,e)}else e();else{var j=[],k={};if(g&&g.length)for(var l=0,m=g.length;l0?v:null};var ma=c.$on("$translateReady",function(){la.resolve(),ma(),ma=null}),na=c.$on("$translateChangeEnd",function(){la.resolve(),na(),na=null});if(o){if(angular.equals(u,{})&&V.use()&&V.use(V.use()),g&&g.length)for(var oa=function(a){return O(a.key,a.table),c.$emit("$translateChangeEnd",{language:a.key}),a},pa=0,qa=g.length;pa-1&&(this.__origError=f,a.apply(this,[b,"_fix_for_ie_crossdomain__",e]))}}}),a("getResponseHeader",function(a){return function(b){return this.__fileApiXHR&&this.__fileApiXHR.getResponseHeader?this.__fileApiXHR.getResponseHeader(b):null==a?null:a.apply(this,[b])}}),a("getAllResponseHeaders",function(a){return function(){return this.__fileApiXHR&&this.__fileApiXHR.getAllResponseHeaders?this.__fileApiXHR.getAllResponseHeaders():null==a?null:a.apply(this)}}),a("abort",function(a){return function(){return this.__fileApiXHR&&this.__fileApiXHR.abort?this.__fileApiXHR.abort():null==a?null:a.apply(this)}}),a("setRequestHeader",function(a){return function(b,d){if("__setXHR_"===b){c(this);var e=d(this);e instanceof Function&&e(this)}else this.__requestHeaders=this.__requestHeaders||{},this.__requestHeaders[b]=d,a.apply(this,arguments)}}),a("send",function(a){return function(){var c=this;if(arguments[0]&&arguments[0].__isFileAPIShim){var d=arguments[0],e={url:c.__url,jsonp:!1,cache:!0,complete:function(a,d){a&&angular.isString(a)&&-1!==a.indexOf("#2174")&&(a=null),c.__completed=!0,!a&&c.__listeners.load&&c.__listeners.load({type:"load",loaded:c.__loaded,total:c.__total,target:c,lengthComputable:!0}),!a&&c.__listeners.loadend&&c.__listeners.loadend({type:"loadend",loaded:c.__loaded,total:c.__total,target:c,lengthComputable:!0}),"abort"===a&&c.__listeners.abort&&c.__listeners.abort({type:"abort",loaded:c.__loaded,total:c.__total,target:c,lengthComputable:!0}),void 0!==d.status&&b(c,"status",function(){return 0===d.status&&a&&"abort"!==a?500:d.status}),void 0!==d.statusText&&b(c,"statusText",function(){return d.statusText}),b(c,"readyState",function(){return 4}),void 0!==d.response&&b(c,"response",function(){return d.response});var e=d.responseText||(a&&0===d.status&&"abort"!==a?a:void 0);b(c,"responseText",function(){return e}),b(c,"response",function(){return e}),a&&b(c,"err",function(){return a}),c.__fileApiXHR=d,c.onreadystatechange&&c.onreadystatechange(),c.onload&&c.onload()},progress:function(a){if(a.target=c,c.__listeners.progress&&c.__listeners.progress(a),c.__total=a.total,c.__loaded=a.loaded,a.total===a.loaded){var b=this;setTimeout(function(){c.__completed||(c.getAllResponseHeaders=function(){},b.complete(null,{status:204,statusText:"No Content"}))},FileAPI.noContentTimeout||1e4)}},headers:c.__requestHeaders};e.data={},e.files={};for(var f=0;f-1){e=h.substring(0,g+1);break}null==FileAPI.staticPath&&(FileAPI.staticPath=e),i.setAttribute("src",d||e+"FileAPI.min.js"),document.getElementsByTagName("head")[0].appendChild(i)}FileAPI.ngfFixIE=function(d,e,f){if(!b())throw'Adode Flash Player need to be installed. To check ahead use "FileAPI.hasFlash"';var g=function(){var b=e.parent();d.attr("disabled")?b&&b.removeClass("js-fileapi-wrapper"):(e.attr("__ngf_flash_")||(e.unbind("change"),e.unbind("click"),e.bind("change",function(a){h.apply(this,[a]),f.apply(this,[a])}),e.attr("__ngf_flash_","true")),b.addClass("js-fileapi-wrapper"),a(d)||(b.css("position","absolute").css("top",c(d[0]).top+"px").css("left",c(d[0]).left+"px").css("width",d[0].offsetWidth+"px").css("height",d[0].offsetHeight+"px").css("filter","alpha(opacity=0)").css("display",d.css("display")).css("overflow","hidden").css("z-index","900000").css("visibility","visible"),e.css("width",d[0].offsetWidth+"px").css("height",d[0].offsetHeight+"px").css("position","absolute").css("top","0px").css("left","0px")))};d.bind("mouseenter",g);var h=function(a){for(var b=FileAPI.getFiles(a),c=0;c0},this.rename=function(a,b){return a.ngfName=b,a},this.jsonBlob=function(a){null==a||angular.isString(a)||(a=JSON.stringify(a));var b=new window.Blob([a],{type:"application/json"});return b._ngfBlob=!0,b},this.json=function(a){return angular.toJson(a)},this.isFile=function(a){return null!=a&&(a instanceof window.Blob||a.flashId&&a.name&&a.size)},this.upload=function(a,b){function c(b,c){if(b._ngfBlob)return b;if(a._file=a._file||b,null!=a._start&&g){a._end&&a._end>=b.size&&(a._finished=!0,a._end=b.size);var d=b.slice(a._start,a._end||b.size);return d.name=b.name,d.ngfName=b.ngfName,a._chunkSize&&(c.append("_chunkSize",a._chunkSize),c.append("_currentChunkSize",a._end-a._start),c.append("_chunkNumber",Math.floor(a._start/a._chunkSize)),c.append("_totalSize",a._file.size)),d}return b}function h(b,d,e){if(void 0!==d)if(angular.isDate(d)&&(d=d.toISOString()),angular.isString(d))b.append(e,d);else if(f.isFile(d)){var g=c(d,b),i=e.split(",");i[1]&&(g.ngfName=i[1].replace(/^\s+|\s+$/g,""),e=i[0]),a._fileKey=a._fileKey||e,b.append(e,g,g.ngfName||g.name)}else if(angular.isObject(d)){if(d.$$ngfCircularDetection)throw"ngFileUpload: Circular reference in config.data. Make sure specified data for Upload.upload() has no circular reference: "+e;d.$$ngfCircularDetection=!0;try{for(var j in d)if(d.hasOwnProperty(j)&&"$$ngfCircularDetection"!==j){var k=null==a.objectKey?"[i]":a.objectKey;d.length&&parseInt(j)>-1&&(k=null==a.arrayKey?k:a.arrayKey),h(b,d[j],e+k.replace(/[ik]/g,j))}}finally{delete d.$$ngfCircularDetection}}else b.append(e,d)}function i(){a._chunkSize=f.translateScalars(a.resumeChunkSize),a._chunkSize=a._chunkSize?parseInt(a._chunkSize.toString()):null,a.headers=a.headers||{},a.headers["Content-Type"]=void 0,a.transformRequest=a.transformRequest?angular.isArray(a.transformRequest)?a.transformRequest:[a.transformRequest]:[],a.transformRequest.push(function(b){var c,d=new window.FormData;b=b||a.fields||{},a.file&&(b.file=a.file);for(c in b)if(b.hasOwnProperty(c)){var e=b[c];a.formDataAppender?a.formDataAppender(d,c,e):h(d,e,c)}return d})}return b||(a=e(a)),a._isDigested||(a._isDigested=!0,i()),d(a)},this.http=function(b){return b=e(b),b.transformRequest=b.transformRequest||function(b){return window.ArrayBuffer&&b instanceof window.ArrayBuffer||b instanceof window.Blob?b:a.defaults.transformRequest[0].apply(this,arguments)},b._chunkSize=f.translateScalars(b.resumeChunkSize),b._chunkSize=b._chunkSize?parseInt(b._chunkSize.toString()):null,d(b)},this.translateScalars=function(a){if(angular.isString(a)){if(a.search(/kb/i)===a.length-2)return parseFloat(1024*a.substring(0,a.length-2));if(a.search(/mb/i)===a.length-2)return parseFloat(1048576*a.substring(0,a.length-2));if(a.search(/gb/i)===a.length-2)return parseFloat(1073741824*a.substring(0,a.length-2));if(a.search(/b/i)===a.length-1)return parseFloat(a.substring(0,a.length-1));if(a.search(/s/i)===a.length-1)return parseFloat(a.substring(0,a.length-1));if(a.search(/m/i)===a.length-1)return parseFloat(60*a.substring(0,a.length-1));if(a.search(/h/i)===a.length-1)return parseFloat(3600*a.substring(0,a.length-1))}return a},this.urlToBlob=function(c){var d=b.defer();return a({url:c,method:"get",responseType:"arraybuffer"}).then(function(a){var b=new Uint8Array(a.data),e=a.headers("content-type")||"image/WebP",f=new window.Blob([b],{type:e}),g=c.match(/.*\/(.+?)(\?.*)?$/);g.length>1&&(f.name=g[1]),d.resolve(f)},function(a){d.reject(a)}),d.promise},this.setDefaults=function(a){this.defaults=a||{}},this.defaults={},this.version=ngFileUpload.version}]),ngFileUpload.service("Upload",["$parse","$timeout","$compile","$q","UploadExif",function(a,b,c,d,e){function f(a,b,c){var e=[i.emptyPromise()];return angular.forEach(a,function(d,f){0===d.type.indexOf("image/jpeg")&&i.attrGetter("ngfFixOrientation",b,c,{$file:d})&&e.push(i.happyPromise(i.applyExifRotation(d),d).then(function(b){a.splice(f,1,b)}))}),d.all(e)}function g(a,b,c,e){var f=i.attrGetter("ngfResize",b,c);if(!f||!i.isResizeSupported()||!a.length)return i.emptyPromise();if(f instanceof Function){var g=d.defer();return f(a).then(function(d){h(d,a,b,c,e).then(function(a){g.resolve(a)},function(a){g.reject(a)})},function(a){g.reject(a)})}return h(f,a,b,c,e)}function h(a,b,c,e,f){function g(d,g){if(0===d.type.indexOf("image")){if(a.pattern&&!i.validatePattern(d,a.pattern))return;a.resizeIf=function(a,b){return i.attrGetter("ngfResizeIf",c,e,{$width:a,$height:b,$file:d})};var j=i.resize(d,a);h.push(j),j.then(function(a){b.splice(g,1,a)},function(a){d.$error="resize",(d.$errorMessages=d.$errorMessages||{}).resize=!0,d.$errorParam=(a?(a.message?a.message:a)+": ":"")+(d&&d.name),f.$ngfValidations.push({name:"resize",valid:!1}),i.applyModelValidation(f,b)})}}for(var h=[i.emptyPromise()],j=0;j-1},i.emptyPromise=function(){var a=d.defer(),c=arguments;return b(function(){a.resolve.apply(a,c)}),a.promise},i.rejectPromise=function(){var a=d.defer(),c=arguments;return b(function(){a.reject.apply(a,c)}),a.promise},i.happyPromise=function(a,c){var e=d.defer();return a.then(function(a){e.resolve(a)},function(a){b(function(){throw a}),e.resolve(c)}),e.promise},i.updateModel=function(c,d,e,h,j,k,l){function m(f,g,j,l,m){d.$$ngfPrevValidFiles=f,d.$$ngfPrevInvalidFiles=g;var n=f&&f.length?f[0]:null,o=g&&g.length?g[0]:null;c&&(i.applyModelValidation(c,f),c.$setViewValue(m?n:f)),h&&a(h)(e,{$files:f,$file:n,$newFiles:j,$duplicateFiles:l,$invalidFiles:g,$invalidFile:o,$event:k});var p=i.attrGetter("ngfModelInvalid",d);p&&b(function(){a(p).assign(e,m?o:g)}),b(function(){})}function n(){function a(a,b){return a.name===b.name&&(a.$ngfOrigSize||a.size)===(b.$ngfOrigSize||b.size)&&a.type===b.type}function b(b){var c;for(c=0;c-1&&(v.splice(d,1),u.push(c)),a()}}})}var q,r,s,t=[],u=[],v=[];r=d.$$ngfPrevValidFiles||[],s=d.$$ngfPrevInvalidFiles||[],c&&c.$modelValue&&(r=o(c.$modelValue));var w=i.attrGetter("ngfKeep",d,e);q=(j||[]).slice(0),("distinct"===w||i.attrGetter("ngfKeepDistinct",d,e)===!0)&&n(d,e);var x=!w&&!i.attrGetter("ngfMultiple",d,e)&&!i.attrGetter("multiple",d);if(!w||q.length){i.attrGetter("ngfBeforeModelChange",d,e,{$files:j,$file:j&&j.length?j[0]:null,$newFiles:q,$duplicateFiles:t,$event:k});var y=i.attrGetter("ngfValidateAfterResize",d,e),z=i.attrGetter("ngfModelOptions",d,e);i.validate(q,w?r.length:0,c,d,e).then(function(a){l?m(q,[],j,t,x):(z&&z.allowInvalid||y?v=q:(v=a.validFiles,u=a.invalidFiles),i.attrGetter("ngfFixOrientation",d,e)&&i.isExifSupported()?f(v,d,e).then(function(){p()}):p())})}},i}]),ngFileUpload.directive("ngfSelect",["$parse","$timeout","$compile","Upload",function(a,b,c,d){function e(a){var b=a.match(/Android[^\d]*(\d+)\.(\d+)/);if(b&&b.length>2){var c=d.defaults.androidFixMinorVersion||4;return parseInt(b[1])<4||parseInt(b[1])===c&&parseInt(b[2])'),c=angular.element("");return c.css("visibility","hidden").css("position","absolute").css("overflow","hidden").css("width","0px").css("height","0px").css("border","none").css("margin","0px").css("padding","0px").attr("tabindex","-1"),n(a,c),g.push({el:b,ref:c}),document.body.appendChild(c.append(a)[0]),a}function p(c){if(b.attr("disabled"))return!1;if(!t("ngfSelectDisabled",a)){var d=q(c);if(null!=d)return d;r(c);try{k()||document.body.contains(x[0])||(g.push({el:b,ref:x.parent()}),document.body.appendChild(x.parent()[0]),x.bind("change",m))}catch(f){}return e(navigator.userAgent)?setTimeout(function(){x[0].click()},0):x[0].click(),!1}}function q(a){var b=a.changedTouches||a.originalEvent&&a.originalEvent.changedTouches;if(b){if("touchstart"===a.type)return w=b[0].clientX,v=b[0].clientY,!0;if("touchend"===a.type){var c=b[0].clientX,d=b[0].clientY;if(Math.abs(c-w)>20||Math.abs(d-v)>20)return a.stopPropagation(),a.preventDefault(),!1}return!0}}function r(b){j.shouldUpdateOn("click",c,a)&&x.val()&&(x.val(null),j.updateModel(d,c,a,l(),null,b,!0))}function s(a){if(x&&!x.attr("__ngf_ie10_Fix_")){if(!x[0].parentNode)return void(x=null);a.preventDefault(),a.stopPropagation(),x.unbind("click");var b=x.clone();return x.replaceWith(b),x=b,x.attr("__ngf_ie10_Fix_","true"),x.bind("change",m),x.bind("click",s),x[0].click(),!1}x.removeAttr("__ngf_ie10_Fix_")}var t=function(a,b){return j.attrGetter(a,c,b)};j.registerModelChangeValidator(d,c,a);var u=[];t("ngfMultiple")&&u.push(a.$watch(t("ngfMultiple"),function(){x.attr("multiple",t("ngfMultiple",a))})),t("ngfCapture")&&u.push(a.$watch(t("ngfCapture"),function(){x.attr("capture",t("ngfCapture",a))})),t("ngfAccept")&&u.push(a.$watch(t("ngfAccept"),function(){x.attr("accept",t("ngfAccept",a))})),u.push(c.$observe("accept",function(){x.attr("accept",t("accept"))}));var v=0,w=0,x=b;k()||(x=o()),x.bind("change",m),k()?b.bind("click",r):b.bind("click touchstart touchend",p),-1!==navigator.appVersion.indexOf("MSIE 10")&&x.bind("click",s),d&&d.$formatters.push(function(a){return(null==a||0===a.length)&&x.val()&&x.val(null),a}),a.$on("$destroy",function(){k()||x.parent().remove(),angular.forEach(u,function(a){a()})}),h(function(){for(var a=0;a-1&&l.height&&l.height.indexOf("px")>-1&&(k={width:parseInt(l.width.slice(0,-2)),height:parseInt(l.height.slice(0,-2))})}return angular.isString(c)?(e.removeClass("ng-hide"),i?e.css("background-image","url('"+c+"')"):e.attr("src",c)):void(!c||!c.type||0!==c.type.search(a(e[0]))||i&&0!==c.type.indexOf("image")?e.addClass("ng-hide"):k&&b.isResizeSupported()?(k.resizeIf=function(a,e){return b.attrGetter("ngfResizeIf",f,d,{$width:a,$height:e,$file:c})},b.resize(c,k).then(function(a){j(a)},function(a){throw a})):j(c))});d.$on("$destroy",function(){c()})})}ngFileUpload.service("UploadDataUrl",["UploadBase","$timeout","$q",function(a,b,c){var d=a;return d.base64DataUrl=function(a){if(angular.isArray(a)){var b=c.defer(),e=0;return angular.forEach(a,function(c){d.dataUrl(c,!0)["finally"](function(){if(e++,e===a.length){var c=[];angular.forEach(a,function(a){c.push(a.$ngfDataUrl)}),b.resolve(c,a)}})}),b.promise}return d.dataUrl(a,!0)},d.dataUrl=function(a,e){if(!a)return d.emptyPromise(a,a);if(e&&null!=a.$ngfDataUrl||!e&&null!=a.$ngfBlobUrl)return d.emptyPromise(e?a.$ngfDataUrl:a.$ngfBlobUrl,a);var f=e?a.$$ngfDataUrlPromise:a.$$ngfBlobUrlPromise;if(f)return f;var g=c.defer();return b(function(){if(window.FileReader&&a&&(!window.FileAPI||-1===navigator.userAgent.indexOf("MSIE 8")||a.size<2e4)&&(!window.FileAPI||-1===navigator.userAgent.indexOf("MSIE 9")||a.size<4e6)){var c=window.URL||window.webkitURL;if(c&&c.createObjectURL&&!e){var f;try{f=c.createObjectURL(a)}catch(h){return void b(function(){a.$ngfBlobUrl="",g.reject()})}b(function(){if(a.$ngfBlobUrl=f,f){g.resolve(f,a),d.blobUrls=d.blobUrls||[],d.blobUrlsTotalSize=d.blobUrlsTotalSize||0,d.blobUrls.push({url:f,size:a.size}),d.blobUrlsTotalSize+=a.size||0;for(var b=d.defaults.blobUrlsMaxMemory||268435456,e=d.defaults.blobUrlsMaxQueueSize||200;(d.blobUrlsTotalSize>b||d.blobUrls.length>e)&&d.blobUrls.length>1;){var h=d.blobUrls.splice(0,1)[0];c.revokeObjectURL(h.url),d.blobUrlsTotalSize-=h.size}}})}else{var i=new FileReader;i.onload=function(c){b(function(){a.$ngfDataUrl=c.target.result,g.resolve(c.target.result,a), -b(function(){delete a.$ngfDataUrl},1e3)})},i.onerror=function(){b(function(){a.$ngfDataUrl="",g.reject()})},i.readAsDataURL(a)}}else b(function(){a[e?"$ngfDataUrl":"$ngfBlobUrl"]="",g.reject()})}),f=e?a.$$ngfDataUrlPromise=g.promise:a.$$ngfBlobUrlPromise=g.promise,f["finally"](function(){delete a[e?"$$ngfDataUrlPromise":"$$ngfBlobUrlPromise"]}),f},d}]),ngFileUpload.directive("ngfSrc",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){b(a,c,d,e,f,"ngfSrc",a.attrGetter("ngfResize",f,d),!1)}}}]),ngFileUpload.directive("ngfBackground",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){b(a,c,d,e,f,"ngfBackground",a.attrGetter("ngfResize",f,d),!0)}}}]),ngFileUpload.directive("ngfThumbnail",["Upload","$timeout",function(a,c){return{restrict:"AE",link:function(d,e,f){var g=a.attrGetter("ngfSize",f,d);b(a,c,d,e,f,"ngfThumbnail",g,a.attrGetter("ngfAsBackground",f,d))}}}]),ngFileUpload.config(["$compileProvider",function(a){a.imgSrcSanitizationWhitelist&&a.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/),a.aHrefSanitizationWhitelist&&a.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|webcal|local|file|data|blob):/)}]),ngFileUpload.filter("ngfDataUrl",["UploadDataUrl","$sce",function(a,b){return function(c,d,e){if(angular.isString(c))return b.trustAsResourceUrl(c);var f=c&&((d?c.$ngfDataUrl:c.$ngfBlobUrl)||c.$ngfDataUrl);return c&&!f?(!c.$ngfDataUrlFilterInProgress&&angular.isObject(c)&&(c.$ngfDataUrlFilterInProgress=!0,a.dataUrl(c,d)),""):(c&&delete c.$ngfDataUrlFilterInProgress,(c&&f?e?b.trustAsResourceUrl(f):f:c)||"")}}])}(),ngFileUpload.service("UploadValidate",["UploadDataUrl","$q","$timeout",function(a,b,c){function d(a){var b="",c=[];if(a.length>2&&"/"===a[0]&&"/"===a[a.length-1])b=a.substring(1,a.length-1);else{var e=a.split(",");if(e.length>1)for(var f=0;f|:\\-]","g"),"\\$&")+"$",b=b.replace(/\\\*/g,".*").replace(/\\\?/g,"."))}return{regexp:b,excludes:c}}function e(a,b){null==b||a.$dirty||(a.$setDirty?a.$setDirty():a.$dirty=!0)}var f=a;return f.validatePattern=function(a,b){if(!b)return!0;var c=d(b),e=!0;if(c.regexp&&c.regexp.length){var f=new RegExp(c.regexp,"i");e=null!=a.type&&f.test(a.type)||null!=a.name&&f.test(a.name)}for(var g=c.excludes.length;g--;){var h=new RegExp(c.excludes[g],"i");e=e&&(null==a.type||h.test(a.type))&&(null==a.name||h.test(a.name))}return e},f.ratioToFloat=function(a){var b=a.toString(),c=b.search(/[x:]/i);return b=c>-1?parseFloat(b.substring(0,c))/parseFloat(b.substring(c+1)):parseFloat(b)},f.registerModelChangeValidator=function(a,b,c){a&&a.$formatters.push(function(d){if(a.$dirty){var e=d;d&&!angular.isArray(d)&&(e=[d]),f.validate(e,0,a,b,c).then(function(){f.applyModelValidation(a,e)})}return d})},f.applyModelValidation=function(a,b){e(a,b),angular.forEach(a.$ngfValidations,function(b){a.$setValidity(b.name,b.valid)})},f.getValidationAttr=function(a,b,c,d,e){var g="ngf"+c[0].toUpperCase()+c.substr(1),h=f.attrGetter(g,a,b,{$file:e});if(null==h&&(h=f.attrGetter("ngfValidate",a,b,{$file:e}))){var i=(d||c).split(".");h=h[i[0]],i.length>1&&(h=h&&h[i[1]])}return h},f.validate=function(a,c,d,e,g){function h(b,c,h){if(a){for(var i=a.length,j=null;i--;){var n=a[i];if(n){var o=f.getValidationAttr(e,g,b,c,n);null!=o&&(h(n,o,i)||(-1===k.indexOf(b)?(n.$error=b,(n.$errorMessages=n.$errorMessages||{})[b]=!0,n.$errorParam=o,-1===m.indexOf(n)&&m.push(n),l||a.splice(i,1),j=!1):a.splice(i,1)))}}null!==j&&d.$ngfValidations.push({name:b,valid:j})}}function i(c,h,i,n,o){function p(b,d,e){function f(f){if(f())if(-1===k.indexOf(c)){if(d.$error=c,(d.$errorMessages=d.$errorMessages||{})[c]=!0,d.$errorParam=e,-1===m.indexOf(d)&&m.push(d),!l){var g=a.indexOf(d);g>-1&&a.splice(g,1)}b.resolve(!1)}else{var h=a.indexOf(d);h>-1&&a.splice(h,1),b.resolve(!0)}else b.resolve(!0)}null!=e?n(d,e).then(function(a){f(function(){return!o(a,e)})},function(){f(function(){return j("ngfValidateForce",{$file:d})})}):b.resolve(!0)}var q=[f.emptyPromise(!0)];a&&(a=void 0===a.length?[a]:a,angular.forEach(a,function(a){var d=b.defer();return q.push(d.promise),!i||null!=a.type&&0===a.type.search(i)?void("dimensions"===c&&null!=f.attrGetter("ngfDimensions",e)?f.imageDimensions(a).then(function(b){p(d,a,j("ngfDimensions",{$file:a,$width:b.width,$height:b.height}))},function(){d.resolve(!1)}):"duration"===c&&null!=f.attrGetter("ngfDuration",e)?f.mediaDuration(a).then(function(b){p(d,a,j("ngfDuration",{$file:a,$duration:b}))},function(){d.resolve(!1)}):p(d,a,f.getValidationAttr(e,g,c,h,a))):void d.resolve(!0)}));var r=b.defer();return b.all(q).then(function(a){for(var b=!0,e=0;e=f.translateScalars(b)}),h("maxSize","size.max",function(a,b){return a.size-.1<=f.translateScalars(b)});var n=0;if(h("maxTotalSize",null,function(b,c){return n+=b.size,!(n>f.translateScalars(c))||(a.splice(0,a.length),!1)}),h("validateFn",null,function(a,b){return b===!0||null===b||""===b}),!a.length)return f.emptyPromise({validFiles:[],invalidFiles:m});var o=b.defer(),p=[];return p.push(i("maxHeight","height.max",/image/,this.imageDimensions,function(a,b){return a.height<=b})),p.push(i("minHeight","height.min",/image/,this.imageDimensions,function(a,b){return a.height>=b})),p.push(i("maxWidth","width.max",/image/,this.imageDimensions,function(a,b){return a.width<=b})),p.push(i("minWidth","width.min",/image/,this.imageDimensions,function(a,b){return a.width>=b})),p.push(i("dimensions",null,/image/,function(a,b){return f.emptyPromise(b)},function(a){return a})),p.push(i("ratio",null,/image/,this.imageDimensions,function(a,b){for(var c=b.toString().split(","),d=!1,e=0;e-1e-4})),p.push(i("maxDuration","duration.max",/audio|video/,this.mediaDuration,function(a,b){return a<=f.translateScalars(b)})),p.push(i("minDuration","duration.min",/audio|video/,this.mediaDuration,function(a,b){return a>=f.translateScalars(b)})),p.push(i("duration",null,/audio|video/,function(a,b){return f.emptyPromise(b)},function(a){return a})),p.push(i("validateAsyncFn",null,null,function(a,b){return b},function(a){return a===!0||null===a||""===a})),b.all(p).then(function(){if(l)for(var b=0;bc+d}),o.resolve({validFiles:a,invalidFiles:m})}),o.promise},f.imageDimensions=function(a){if(a.$ngfWidth&&a.$ngfHeight){var d=b.defer();return c(function(){d.resolve({width:a.$ngfWidth,height:a.$ngfHeight})}),d.promise}if(a.$ngfDimensionPromise)return a.$ngfDimensionPromise;var e=b.defer();return c(function(){return 0!==a.type.indexOf("image")?void e.reject("not image"):void f.dataUrl(a).then(function(b){function d(){var b=h[0].naturalWidth||h[0].clientWidth,c=h[0].naturalHeight||h[0].clientHeight;h.remove(),a.$ngfWidth=b,a.$ngfHeight=c,e.resolve({width:b,height:c})}function f(){h.remove(),e.reject("load error")}function g(){c(function(){h[0].parentNode&&(h[0].clientWidth?d():i++>10?f():g())},1e3)}var h=angular.element("").attr("src",b).css("visibility","hidden").css("position","fixed").css("max-width","none !important").css("max-height","none !important");h.on("load",d),h.on("error",f);var i=0;g(),angular.element(document.getElementsByTagName("body")[0]).append(h)},function(){e.reject("load error")})}),a.$ngfDimensionPromise=e.promise,a.$ngfDimensionPromise["finally"](function(){delete a.$ngfDimensionPromise}),a.$ngfDimensionPromise},f.mediaDuration=function(a){if(a.$ngfDuration){var d=b.defer();return c(function(){d.resolve(a.$ngfDuration)}),d.promise}if(a.$ngfDurationPromise)return a.$ngfDurationPromise;var e=b.defer();return c(function(){return 0!==a.type.indexOf("audio")&&0!==a.type.indexOf("video")?void e.reject("not media"):void f.dataUrl(a).then(function(b){function d(){var b=h[0].duration;a.$ngfDuration=b,h.remove(),e.resolve(b)}function f(){h.remove(),e.reject("load error")}function g(){c(function(){h[0].parentNode&&(h[0].duration?d():i>10?f():g())},1e3)}var h=angular.element(0===a.type.indexOf("audio")?"