<commit_before>angular.module('TealiumConfigure', [])
  .factory('tealium_configure', ["$location", function($location){
      return function() {
        // import any modules and setup here for view_id and data_connector
        var view_id = $location.path();
        view_id = !(/undefined|^$/i).test(view_id) ? view_id : '/template1.html'; // fall back in case $location.path() isnt ready
         
        this.view_id = view_id;            // place reference or function to return unique key for current view

        this.data_connector  = {};                  // place reference or function to return data model
        this.ui_selectors    = '.trackable, input'; // elements to be autotracked *this is a sample*
        this.account     = "tealiummobile";         // add tealium account name
        this.profile     = "demo";                  // add profile name to use
        this.environment = "dev";                   // add target environment to use
        this.suppress_first_view = true;           // true means utag.view() is not fired when library is loaded initially
        
// DO NOT EDIT BELOW THIS LINE ---------------------------------------------------------            
      };
    }
  ]);

 
 angular.module('TealiumHelper', ['TealiumUDO', 'TealiumConfigure'])
   .factory('tealium', ['tealium_configure', 'tealium_udo', function(tealium_configure, tealium_udo) {
      var config = new tealium_configure();
      var link = function(udo, e) {
         var config = new tealium_configure();
         var b = {};
         angular.forEach(udo, function(value, key) {
           b[key] = value;
         });
         if (e.target.attributes['data-tealium']) {
           var custom_data = e.target.attributes['data-tealium'].value;
           custom_data = JSON.parse(custom_data);
           angular.forEach(custom_data, function(value, key) {
             b[key] = value;
           });
         }
         utag.link(b);
       };

      var view = function() {
         var config = new tealium_configure();
         var udo = tealium_udo(config);
         if (window.utag){
           utag.view(udo);
           angular.element(document.querySelectorAll(config.ui_selectors))
             .bind('click', function(e) {
               link(udo, e);
             });
         }<commit_msg>moved model code out of controller<commit_after>angular.module('TealiumConfigure', [])
  .factory('tealium_configure', ["$location", function($location){
      return function() {
        // import any modules and setup here for view_id and data_connector
        var view_id = $location.path();
        view_id = !(/undefined|^$/i).test(view_id) ? view_id : '/template1.html'; // fall back in case $location.path() isnt ready
         
        this.view_id = view_id;            // place reference or function to return unique key for current view

        this.data_connector  = {};                  // place reference or function to return data model
        this.ui_selectors    = '.trackable, input'; // elements to be autotracked *this is a sample*
        this.account     = "tealiummobile";         // add tealium account name
        this.profile     = "demo";                  // add profile name to use
        this.environment = "dev";                   // add target environment to use
        this.suppress_first_view = true;           // true means utag.view() is not fired when library is loaded initially
        
// DO NOT EDIT BELOW THIS LINE ---------------------------------------------------------            
      };
    }
  ]);

 
 angular.module('TealiumHelper', ['TealiumUDO', 'TealiumConfigure'])
   .factory('tealium', ['tealium_configure', 'tealium_udo', function(tealium_configure, tealium_udo) {
      var config = new tealium_configure();
      var link = function(udo, e) {
         var config = new tealium_configure();
         var b = {};
         angular.forEach(udo, function(value, key) {
           b[key] = value;
         });

         utag.link(b);
       };

      var view = function() {
         var config = new tealium_configure();
         var udo = tealium_udo(config);
         if (window.utag){
           utag.view(udo);
           angular.element(document.querySelectorAll(config.ui_selectors))
             .bind('click', function(e) {
               var udo = tealium_udo(config, e);
               link(udo);
             });
         }
{'fraction_non_alphanumeric': 0.14007252946509519, 'fraction_numerical': 0.00045330915684496827, 'mean_word_length': 1.8452611218568666, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3888948', 'n_tokens_mistral': 1204, 'n_tokens_neox': 1183, 'n_words': 316}