1(function(){'use strict';var app=angular.module('RbsChangeApp');app.controller('projectWebsiteManageTrackersGdpr',['$scope','$rootScope','RbsChange.Cookies','RbsChange.ModalStack','$attrs','$element',function(scope,rootScope,Cookies,ModalStack,attrs,element){scope.cookiesCategories=JSON.parse(attrs.cookiesCategories);scope.hideConsent=false;scope.running=false;$(element[0]).removeClass('loading') 2var consent=Cookies.getConsent().acceptedCookies;if(consent){var consentedCategories={};scope.hideConsent=true;for(var i=0;i<scope.cookiesCategories.length;i++){var _id=scope.cookiesCategories[i].id;if(typeof consent[_id]!=='boolean'){scope.hideConsent=false;} 3else{consentedCategories[_id]=consent[_id];}} 4if(!scope.hideConsent){Cookies.removeConsent();}} 5scope.showCookies=function(){var options={templateUrl:'/rbs-website-trackers-ask-consent-modal.twig',windowClass:'',controller:'rbsWebsiteManageTrackersGdprModalCtrl',size:'lg',resolve:{cookiesCategories:function(){return scope.cookiesCategories;}}};ModalStack.open(options);};scope.selectAll=function(){try{var acceptedCookies={};var categories=scope.cookiesCategories;for(var i=0;i<categories.length;i++){acceptedCookies[categories[i].id]=true;} 6setConsent(acceptedCookies,'all','banner');} 7catch(e){console.error(e);}};scope.deselectAll=function(){try{var acceptedCookies={};var categories=scope.cookiesCategories;for(var i=0;i<categories.length;i++){acceptedCookies[categories[i].id]=categories[i].readOnly==='true';} 8setConsent(acceptedCookies,'none','banner');} 9catch(e){console.error(e);}};function setConsent(acceptedCookies,consentMode,consentSource){scope.running=true;Cookies.setConsent(acceptedCookies,consentMode,consentSource).then(function(){scope.running=false;},function(response){scope.running=false;if(response.status===429){ModalStack.open({controller:'RbsMinimalModal',templateUrl:'/rbs-website-trackers-too-many-requests-modal.twig'});} 10else{ModalStack.open({controller:'RbsMinimalModal',templateUrl:'/rbs-website-trackers-ask-consent-error-modal.twig'});}});} 11rootScope.$on('RbsWebsiteCookies:set',function(){scope.hideConsent=true;});}]);})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.