var NPC=NPC||{};NPC.angularApp=NPC.angularApp||angular.module("npc",["ngRoute","ui.bootstrap"]);NPC.angularApp.filter("montant",["$sce",function($sce){return function(montant,libelleDevise){if(montant!=undefined&&libelleDevise!=undefined)return $sce.trustAsHtml(NPC.formatCurrency(montant,libelleDevise));else return $sce.trustAsHtml("Informations non disponibles")}}]); NPC.angularApp.filter("montantOperation",["$sce",function($sce){return function(op){return $sce.trustAsHtml(NPC.formatCurrency(op.montant,op.libelleDevise))}}]);NPC.angularApp.filter("montantSansDecimale",["$sce",function($sce){return function(montant,libelleDevise){if(montant!=undefined&&libelleDevise!=undefined)return $sce.trustAsHtml(NPC.formatNumber(montant,0,3,"\x26nbsp;",",")+libelleDevise);else return $sce.trustAsHtml("Informations non disponibles")}}]); NPC.angularApp.filter("formatDate",["$sce",function($sce){return function(date){return NPC.formatDate(date,true,true)}}]); NPC.angularApp.directive("npcPagination",["$parse","uibPaginationConfig",function($parse,uibPaginationConfig){return{scope:{totalItems:"\x3d",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"\x3d"},require:["npcPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(element,attrs){return attrs.templateUrl||"uib/template/pagination/pagination.html"},link:function(scope,element,attrs,ctrls){var paginationCtrl=ctrls[0], ngModelCtrl=ctrls[1];if(!ngModelCtrl)return;paginationCtrl.init(ngModelCtrl,uibPaginationConfig)}}}]);NPC.angularApp.factory("logoutInterceptor",["$q",logoutInterceptor]);NPC.angularApp.config(["$httpProvider",httpProviderConfig]); function logoutInterceptor($q){var handleLogout={responseError:function(response){if(response.status===403){var cause=response.data;if(cause!==undefined&&cause.indexOf("Authentication Failed")!==-1){Granite.Sling.LOGIN_URL=NPC.urlMarcheCourant+".npc.login.html";Granite.HTTP.handleLoginRedirect()}}return $q.reject(response)}};return handleLogout} function httpProviderConfig($httpProvider){if(!$httpProvider.defaults.headers.get)$httpProvider.defaults.headers.get={};$httpProvider.defaults.headers.get["If-Modified-Since"]="Mon, 26 Jul 1997 05:00:00 GMT";$httpProvider.defaults.headers.get["Cache-Control"]="no-cache";$httpProvider.defaults.headers.get["Pragma"]="no-cache";$httpProvider.defaults.headers.common["X-Requested-With"]="XMLHttpRequest";$httpProvider.interceptors.push("logoutInterceptor")}var NPC=NPC||{}; NPC.angularApp=NPC.angularApp||angular.module("npc",["ngRoute","ui.bootstrap"]);NPC.angularApp.filter("purcent",function(){if(typeof a=="string")return a;return function(a,b){if(!a||!b||isNaN(a)||isNaN(b)||b==0)return a;return a/(b/100)}});var NPC=NPC||{};NPC.angularApp=NPC.angularApp||angular.module("npc",["ngRoute","ui.bootstrap"]); NPC.angularApp.directive("charPolicy",function(){var latinChars={"\u00c1":"A","\u0102":"A","\u1eae":"A","\u1eb6":"A","\u1eb0":"A","\u1eb2":"A","\u1eb4":"A","\u01cd":"A","\u00c2":"A","\u1ea4":"A","\u1eac":"A","\u1ea6":"A","\u1ea8":"A","\u1eaa":"A","\u00c4":"A","\u01de":"A","\u0226":"A","\u01e0":"A","\u1ea0":"A","\u0200":"A","\u00c0":"A","\u1ea2":"A","\u0202":"A","\u0100":"A","\u0104":"A","\u00c5":"A","\u01fa":"A","\u1e00":"A","\u023a":"A","\u00c3":"A","\ua732":"AA","\u00c6":"AE","\u01fc":"AE","\u01e2":"AE", "\ua734":"AO","\ua736":"AU","\ua738":"AV","\ua73a":"AV","\ua73c":"AY","\u1e02":"B","\u1e04":"B","\u0181":"B","\u1e06":"B","\u0243":"B","\u0182":"B","\u0106":"C","\u010c":"C","\u00c7":"C","\u1e08":"C","\u0108":"C","\u010a":"C","\u0187":"C","\u023b":"C","\u010e":"D","\u1e10":"D","\u1e12":"D","\u1e0a":"D","\u1e0c":"D","\u018a":"D","\u1e0e":"D","\u01f2":"D","\u01c5":"D","\u0110":"D","\u018b":"D","\u01f1":"DZ","\u01c4":"DZ","\u00c9":"E","\u0114":"E","\u011a":"E","\u0228":"E","\u1e1c":"E","\u00ca":"E", "\u1ebe":"E","\u1ec6":"E","\u1ec0":"E","\u1ec2":"E","\u1ec4":"E","\u1e18":"E","\u00cb":"E","\u0116":"E","\u1eb8":"E","\u0204":"E","\u00c8":"E","\u1eba":"E","\u0206":"E","\u0112":"E","\u1e16":"E","\u1e14":"E","\u0118":"E","\u0246":"E","\u1ebc":"E","\u1e1a":"E","\ua76a":"ET","\u1e1e":"F","\u0191":"F","\u01f4":"G","\u011e":"G","\u01e6":"G","\u0122":"G","\u011c":"G","\u0120":"G","\u0193":"G","\u1e20":"G","\u01e4":"G","\u1e2a":"H","\u021e":"H","\u1e28":"H","\u0124":"H","\u2c67":"H","\u1e26":"H","\u1e22":"H", "\u1e24":"H","\u0126":"H","\u00cd":"I","\u012c":"I","\u01cf":"I","\u00ce":"I","\u00cf":"I","\u1e2e":"I","\u0130":"I","\u1eca":"I","\u0208":"I","\u00cc":"I","\u1ec8":"I","\u020a":"I","\u012a":"I","\u012e":"I","\u0197":"I","\u0128":"I","\u1e2c":"I","\ua779":"D","\ua77b":"F","\ua77d":"G","\ua782":"R","\ua784":"S","\ua786":"T","\ua76c":"IS","\u0134":"J","\u0248":"J","\u1e30":"K","\u01e8":"K","\u0136":"K","\u2c69":"K","\ua742":"K","\u1e32":"K","\u0198":"K","\u1e34":"K","\ua740":"K","\ua744":"K","\u0139":"L", "\u023d":"L","\u013d":"L","\u013b":"L","\u1e3c":"L","\u1e36":"L","\u1e38":"L","\u2c60":"L","\ua748":"L","\u1e3a":"L","\u013f":"L","\u2c62":"L","\u01c8":"L","\u0141":"L","\u01c7":"LJ","\u1e3e":"M","\u1e40":"M","\u1e42":"M","\u2c6e":"M","\u0143":"N","\u0147":"N","\u0145":"N","\u1e4a":"N","\u1e44":"N","\u1e46":"N","\u01f8":"N","\u019d":"N","\u1e48":"N","\u0220":"N","\u01cb":"N","\u00d1":"N","\u01ca":"NJ","\u00d3":"O","\u014e":"O","\u01d1":"O","\u00d4":"O","\u1ed0":"O","\u1ed8":"O","\u1ed2":"O","\u1ed4":"O", "\u1ed6":"O","\u00d6":"O","\u022a":"O","\u022e":"O","\u0230":"O","\u1ecc":"O","\u0150":"O","\u020c":"O","\u00d2":"O","\u1ece":"O","\u01a0":"O","\u1eda":"O","\u1ee2":"O","\u1edc":"O","\u1ede":"O","\u1ee0":"O","\u020e":"O","\ua74a":"O","\ua74c":"O","\u014c":"O","\u1e52":"O","\u1e50":"O","\u019f":"O","\u01ea":"O","\u01ec":"O","\u00d8":"O","\u01fe":"O","\u00d5":"O","\u1e4c":"O","\u1e4e":"O","\u022c":"O","\u01a2":"OI","\ua74e":"OO","\u0190":"E","\u0186":"O","\u0222":"OU","\u1e54":"P","\u1e56":"P","\ua752":"P", "\u01a4":"P","\ua754":"P","\u2c63":"P","\ua750":"P","\ua758":"Q","\ua756":"Q","\u0154":"R","\u0158":"R","\u0156":"R","\u1e58":"R","\u1e5a":"R","\u1e5c":"R","\u0210":"R","\u0212":"R","\u1e5e":"R","\u024c":"R","\u2c64":"R","\ua73e":"C","\u018e":"E","\u015a":"S","\u1e64":"S","\u0160":"S","\u1e66":"S","\u015e":"S","\u015c":"S","\u0218":"S","\u1e60":"S","\u1e62":"S","\u1e68":"S","\u0164":"T","\u0162":"T","\u1e70":"T","\u021a":"T","\u023e":"T","\u1e6a":"T","\u1e6c":"T","\u01ac":"T","\u1e6e":"T","\u01ae":"T", "\u0166":"T","\u2c6f":"A","\ua780":"L","\u019c":"M","\u0245":"V","\ua728":"TZ","\u00da":"U","\u016c":"U","\u01d3":"U","\u00db":"U","\u1e76":"U","\u00dc":"U","\u01d7":"U","\u01d9":"U","\u01db":"U","\u01d5":"U","\u1e72":"U","\u1ee4":"U","\u0170":"U","\u0214":"U","\u00d9":"U","\u1ee6":"U","\u01af":"U","\u1ee8":"U","\u1ef0":"U","\u1eea":"U","\u1eec":"U","\u1eee":"U","\u0216":"U","\u016a":"U","\u1e7a":"U","\u0172":"U","\u016e":"U","\u0168":"U","\u1e78":"U","\u1e74":"U","\ua75e":"V","\u1e7e":"V","\u01b2":"V", "\u1e7c":"V","\ua760":"VY","\u1e82":"W","\u0174":"W","\u1e84":"W","\u1e86":"W","\u1e88":"W","\u1e80":"W","\u2c72":"W","\u1e8c":"X","\u1e8a":"X","\u00dd":"Y","\u0176":"Y","\u0178":"Y","\u1e8e":"Y","\u1ef4":"Y","\u1ef2":"Y","\u01b3":"Y","\u1ef6":"Y","\u1efe":"Y","\u0232":"Y","\u024e":"Y","\u1ef8":"Y","\u0179":"Z","\u017d":"Z","\u1e90":"Z","\u2c6b":"Z","\u017b":"Z","\u1e92":"Z","\u0224":"Z","\u1e94":"Z","\u01b5":"Z","\u0132":"IJ","\u0152":"OE","\u1d00":"A","\u1d01":"AE","\u0299":"B","\u1d03":"B","\u1d04":"C", "\u1d05":"D","\u1d07":"E","\ua730":"F","\u0262":"G","\u029b":"G","\u029c":"H","\u026a":"I","\u0281":"R","\u1d0a":"J","\u1d0b":"K","\u029f":"L","\u1d0c":"L","\u1d0d":"M","\u0274":"N","\u1d0f":"O","\u0276":"OE","\u1d10":"O","\u1d15":"OU","\u1d18":"P","\u0280":"R","\u1d0e":"N","\u1d19":"R","\ua731":"S","\u1d1b":"T","\u2c7b":"E","\u1d1a":"R","\u1d1c":"U","\u1d20":"V","\u1d21":"W","\u028f":"Y","\u1d22":"Z","\u00e1":"a","\u0103":"a","\u1eaf":"a","\u1eb7":"a","\u1eb1":"a","\u1eb3":"a","\u1eb5":"a","\u01ce":"a", "\u00e2":"a","\u1ea5":"a","\u1ead":"a","\u1ea7":"a","\u1ea9":"a","\u1eab":"a","\u00e4":"a","\u01df":"a","\u0227":"a","\u01e1":"a","\u1ea1":"a","\u0201":"a","\u00e0":"a","\u1ea3":"a","\u0203":"a","\u0101":"a","\u0105":"a","\u1d8f":"a","\u1e9a":"a","\u00e5":"a","\u01fb":"a","\u1e01":"a","\u2c65":"a","\u00e3":"a","\ua733":"aa","\u00e6":"ae","\u01fd":"ae","\u01e3":"ae","\ua735":"ao","\ua737":"au","\ua739":"av","\ua73b":"av","\ua73d":"ay","\u1e03":"b","\u1e05":"b","\u0253":"b","\u1e07":"b","\u1d6c":"b", "\u1d80":"b","\u0180":"b","\u0183":"b","\u0275":"o","\u0107":"c","\u010d":"c","\u00e7":"c","\u1e09":"c","\u0109":"c","\u0255":"c","\u010b":"c","\u0188":"c","\u023c":"c","\u010f":"d","\u1e11":"d","\u1e13":"d","\u0221":"d","\u1e0b":"d","\u1e0d":"d","\u0257":"d","\u1d91":"d","\u1e0f":"d","\u1d6d":"d","\u1d81":"d","\u0111":"d","\u0256":"d","\u018c":"d","\u0131":"i","\u0237":"j","\u025f":"j","\u0284":"j","\u01f3":"dz","\u01c6":"dz","\u00e9":"e","\u0115":"e","\u011b":"e","\u0229":"e","\u1e1d":"e","\u00ea":"e", "\u1ebf":"e","\u1ec7":"e","\u1ec1":"e","\u1ec3":"e","\u1ec5":"e","\u1e19":"e","\u00eb":"e","\u0117":"e","\u1eb9":"e","\u0205":"e","\u00e8":"e","\u1ebb":"e","\u0207":"e","\u0113":"e","\u1e17":"e","\u1e15":"e","\u2c78":"e","\u0119":"e","\u1d92":"e","\u0247":"e","\u1ebd":"e","\u1e1b":"e","\ua76b":"et","\u1e1f":"f","\u0192":"f","\u1d6e":"f","\u1d82":"f","\u01f5":"g","\u011f":"g","\u01e7":"g","\u0123":"g","\u011d":"g","\u0121":"g","\u0260":"g","\u1e21":"g","\u1d83":"g","\u01e5":"g","\u1e2b":"h","\u021f":"h", "\u1e29":"h","\u0125":"h","\u2c68":"h","\u1e27":"h","\u1e23":"h","\u1e25":"h","\u0266":"h","\u1e96":"h","\u0127":"h","\u0195":"hv","\u00ed":"i","\u012d":"i","\u01d0":"i","\u00ee":"i","\u00ef":"i","\u1e2f":"i","\u1ecb":"i","\u0209":"i","\u00ec":"i","\u1ec9":"i","\u020b":"i","\u012b":"i","\u012f":"i","\u1d96":"i","\u0268":"i","\u0129":"i","\u1e2d":"i","\ua77a":"d","\ua77c":"f","\u1d79":"g","\ua783":"r","\ua785":"s","\ua787":"t","\ua76d":"is","\u01f0":"j","\u0135":"j","\u029d":"j","\u0249":"j","\u1e31":"k", "\u01e9":"k","\u0137":"k","\u2c6a":"k","\ua743":"k","\u1e33":"k","\u0199":"k","\u1e35":"k","\u1d84":"k","\ua741":"k","\ua745":"k","\u013a":"l","\u019a":"l","\u026c":"l","\u013e":"l","\u013c":"l","\u1e3d":"l","\u0234":"l","\u1e37":"l","\u1e39":"l","\u2c61":"l","\ua749":"l","\u1e3b":"l","\u0140":"l","\u026b":"l","\u1d85":"l","\u026d":"l","\u0142":"l","\u01c9":"lj","\u017f":"s","\u1e9c":"s","\u1e9b":"s","\u1e9d":"s","\u1e3f":"m","\u1e41":"m","\u1e43":"m","\u0271":"m","\u1d6f":"m","\u1d86":"m","\u0144":"n", "\u0148":"n","\u0146":"n","\u1e4b":"n","\u0235":"n","\u1e45":"n","\u1e47":"n","\u01f9":"n","\u0272":"n","\u1e49":"n","\u019e":"n","\u1d70":"n","\u1d87":"n","\u0273":"n","\u00f1":"n","\u01cc":"nj","\u00f3":"o","\u014f":"o","\u01d2":"o","\u00f4":"o","\u1ed1":"o","\u1ed9":"o","\u1ed3":"o","\u1ed5":"o","\u1ed7":"o","\u00f6":"o","\u022b":"o","\u022f":"o","\u0231":"o","\u1ecd":"o","\u0151":"o","\u020d":"o","\u00f2":"o","\u1ecf":"o","\u01a1":"o","\u1edb":"o","\u1ee3":"o","\u1edd":"o","\u1edf":"o","\u1ee1":"o", "\u020f":"o","\ua74b":"o","\ua74d":"o","\u2c7a":"o","\u014d":"o","\u1e53":"o","\u1e51":"o","\u01eb":"o","\u01ed":"o","\u00f8":"o","\u01ff":"o","\u00f5":"o","\u1e4d":"o","\u1e4f":"o","\u022d":"o","\u01a3":"oi","\ua74f":"oo","\u025b":"e","\u1d93":"e","\u0254":"o","\u1d97":"o","\u0223":"ou","\u1e55":"p","\u1e57":"p","\ua753":"p","\u01a5":"p","\u1d71":"p","\u1d88":"p","\ua755":"p","\u1d7d":"p","\ua751":"p","\ua759":"q","\u02a0":"q","\u024b":"q","\ua757":"q","\u0155":"r","\u0159":"r","\u0157":"r","\u1e59":"r", "\u1e5b":"r","\u1e5d":"r","\u0211":"r","\u027e":"r","\u1d73":"r","\u0213":"r","\u1e5f":"r","\u027c":"r","\u1d72":"r","\u1d89":"r","\u024d":"r","\u027d":"r","\u2184":"c","\ua73f":"c","\u0258":"e","\u027f":"r","\u015b":"s","\u1e65":"s","\u0161":"s","\u1e67":"s","\u015f":"s","\u015d":"s","\u0219":"s","\u1e61":"s","\u1e63":"s","\u1e69":"s","\u0282":"s","\u1d74":"s","\u1d8a":"s","\u023f":"s","\u0261":"g","\u1d11":"o","\u1d13":"o","\u1d1d":"u","\u0165":"t","\u0163":"t","\u1e71":"t","\u021b":"t","\u0236":"t", "\u1e97":"t","\u2c66":"t","\u1e6b":"t","\u1e6d":"t","\u01ad":"t","\u1e6f":"t","\u1d75":"t","\u01ab":"t","\u0288":"t","\u0167":"t","\u1d7a":"th","\u0250":"a","\u1d02":"ae","\u01dd":"e","\u1d77":"g","\u0265":"h","\u02ae":"h","\u02af":"h","\u1d09":"i","\u029e":"k","\ua781":"l","\u026f":"m","\u0270":"m","\u1d14":"oe","\u0279":"r","\u027b":"r","\u027a":"r","\u2c79":"r","\u0287":"t","\u028c":"v","\u028d":"w","\u028e":"y","\ua729":"tz","\u00fa":"u","\u016d":"u","\u01d4":"u","\u00fb":"u","\u1e77":"u","\u00fc":"u", "\u01d8":"u","\u01da":"u","\u01dc":"u","\u01d6":"u","\u1e73":"u","\u1ee5":"u","\u0171":"u","\u0215":"u","\u00f9":"u","\u1ee7":"u","\u01b0":"u","\u1ee9":"u","\u1ef1":"u","\u1eeb":"u","\u1eed":"u","\u1eef":"u","\u0217":"u","\u016b":"u","\u1e7b":"u","\u0173":"u","\u1d99":"u","\u016f":"u","\u0169":"u","\u1e79":"u","\u1e75":"u","\u1d6b":"ue","\ua778":"um","\u2c74":"v","\ua75f":"v","\u1e7f":"v","\u028b":"v","\u1d8c":"v","\u2c71":"v","\u1e7d":"v","\ua761":"vy","\u1e83":"w","\u0175":"w","\u1e85":"w","\u1e87":"w", "\u1e89":"w","\u1e81":"w","\u2c73":"w","\u1e98":"w","\u1e8d":"x","\u1e8b":"x","\u1d8d":"x","\u00fd":"y","\u0177":"y","\u00ff":"y","\u1e8f":"y","\u1ef5":"y","\u1ef3":"y","\u01b4":"y","\u1ef7":"y","\u1eff":"y","\u0233":"y","\u1e99":"y","\u024f":"y","\u1ef9":"y","\u017a":"z","\u017e":"z","\u1e91":"z","\u0291":"z","\u2c6c":"z","\u017c":"z","\u1e93":"z","\u0225":"z","\u1e95":"z","\u1d76":"z","\u1d8e":"z","\u0290":"z","\u01b6":"z","\u0240":"z","\ufb00":"ff","\ufb03":"ffi","\ufb04":"ffl","\ufb01":"fi","\ufb02":"fl", "\u0133":"ij","\u0153":"oe","\ufb06":"st","\u2090":"a","\u2091":"e","\u1d62":"i","\u2c7c":"j","\u2092":"o","\u1d63":"r","\u1d64":"u","\u1d65":"v","\u2093":"x"};var _getErrorIndex=function(value,policyPattern){var max=value.length;var min=0;var cursor=max;var match,subStr;var pattern=new RegExp(policyPattern);while(true){subStr=value.substr(0,cursor);match=pattern.test(subStr);if(match){min=cursor;cursor=max-Math.floor((max-min)/2)}else cursor=Math.max(min,Math.floor(cursor/2));if(cursor===min)return min; if(cursor>max)return-1}};var _autoClearAccents=function(value){return value.replace(/[^A-Za-z0-9\[\] ]/g,function(a){return latinChars[a]||a})};return{require:"ngModel",restrict:"A",link:function(scope,element,attrs,ngModel){scope.$watch(function(){return ngModel.$viewValue},function(newValue,oldValue){if(newValue!=oldValue){if(attrs.autoClearAccents)newValue=_autoClearAccents(newValue);var errorIndex=_getErrorIndex(newValue,attrs.charPolicy);if(errorIndex>=0){var finalValue=newValue.substr(0,errorIndex); ngModel.$setViewValue(finalValue);ngModel.$render()}}},true)}}});var NPC=NPC||{};NPC.angularApp=NPC.angularApp||angular.module("npc",["ngRoute","ui.bootstrap"]); NPC.angularApp.directive("datePicker",function(){return{template:'\x3cdiv class\x3d"input-field js-input-field--innerLabel1"\x3e\t\t\t\t\t\x3clabel ng-show\x3d"!inline" for\x3d"dateFrom" class\x3d"sr-only"\x3e{{placeholder}}\x3c/label\x3e\t\t\t\t\t\x3cspan ng-show\x3d"inline" class\x3d"input-field-label"\x3e{{label}}\x3c/span\x3e\t\t \x3cinput type\x3d"text"\t\t\t\t\tid\x3d"{{inputId}}" name\x3d"{{inputName}}" class\x3d"{{inputClass}} date form-control" placeholder\x3d"{{inputPlaceholder}}" ng-disabled\x3d"inputDisabled" ng-model\x3d"inputModel"\x3e \x3cspan ng-show\x3d"iconClass !\x3d\x3d false" class\x3d"{{iconClass}} input-field-icon"\x3e\x3c/span\x3e \x3c/div\x3e\t\t\t\t\x3cdiv ng-show\x3d"!inline" ng-transclude\x3e\x3c/div\x3e',transclude:true, restrict:"AE",scope:{inputModel:"\x3d",inputName:"@",inputId:"@",inputPlaceholder:"@",inputDisabled:"\x3c",datepickerOptions:"\x3c",iconClass:"@",label:"@",inline:"\x3d",startDate:"\x3c"},controllerAs:"$ctrl",controller:["$scope","$element",function($scope,$element){var datePicker=this;if($scope.startDate){$scope.datepickerOptions=$scope.datepickerOptions||{};$scope.datepickerOptions.startDate=$scope.startDate}datePicker.$input=$element.find("input");$scope.iconClass="icon ic_calendar_medium";datePicker.$onInit= function(){};$scope.$evalAsync(function(){var baseParams={todayBtn:"linked",language:"fr",autoclose:true,todayHighlight:true};datePicker.$input=$element.find("input");datePicker.$input.datepicker($.extend(baseParams,$scope.datepickerOptions)).on("changeDate.bs.datepicker",function(){$scope.inputModel=datePicker.$input.val();$scope.$apply()})})}]}}); NPC.angularApp.directive("inputDateRange",function(){return{template:'\x3cdiv class\x3d"form-group form-inline js-inputDateRange"\x3e \t\t \t\x3cdate-picker\t\t\t\t\t\tng-click\x3d"checkRadioInput()"\t\t\t\t\t\tinput-id\x3d"{{idStart}}"\t\t\t\t\t\tlabel\x3d"Du"\t\t\t\t\t\tplaceholder\x3d"{{placeholderStart}}"\t\t\t\t\t\tinput-name\x3d"{{nameStart}}"\t\t\t\t\t\tinput-model\x3d"modelStart"\t\t\t\t\t\tdatepicker-options\x3d"options"\t\t\t\t\t\tinline\x3d"true"\t\t\t\t\t\x3e\x3c/date-picker\x3e \t\t \t\x3cdate-picker\t\t\t\t\t\tng-click\x3d"checkRadioInput()"\t\t\t\t\t\tinput-id\x3d"{{idEnd}}"\t\t\t\t\t\tlabel\x3d"Au"\t\t\t\t\t\tplaceholder\x3d"{{placeholderEnd}}"\t\t\t\t\t\tinput-name\x3d"{{nameEnd}}"\t\t\t\t\t\tinput-model\x3d"modelEnd"\t\t\t\t\t\tdatepicker-options\x3d"options"\t\t\t\t\t\tinline\x3d"true"\t\t\t\t\t\x3e\x3c/date-picker\x3e\t\t\t\t \x3c/div\x3e',transclude:true, replace:true,restrict:"AE",scope:{modelStart:"\x3d",modelEnd:"\x3d",inputRadioModel:"\x3d",idStart:"@",idEnd:"@",placeholderStart:"@",placeholderEnd:"@",nameStart:"@",nameEnd:"@",options:"\x3c"},controllerAs:"$ctrl",controller:["$scope","$element",function($scope,$element){$scope.checkRadioInput=function(){var inputRadio=$(".date-range-radio");if(inputRadio)$scope.inputRadioModel=angular.copy(inputRadio[0].value)};$scope.$evalAsync(function(){var baseOptions={withInnerClass:"input-field--innerLabel", labelSelector:".input-field-label",inputSelector:".form-control",marginRight:5};$.fn.addInputInnerLabel1=function(option){if(!this)return $(this);var opt=$.extend({},baseOptions,option);function removeInputInnerLabel($inputWrapper,$input,removeClass){$input.css("paddingLeft","");if(removeClass!==false)$inputWrapper.removeClass(opt.withInnerClass)}function addInputInnerLabel($inputWrapper,$label,$input){removeInputInnerLabel($inputWrapper,$input,false);setTimeout(function(){$inputWrapper.addClass(opt.withInnerClass); $input.css("paddingLeft",parseInt($input.css("paddingLeft"))+opt.marginRight+$label.width())},0)}$(this).each(function(){var $this=$(this);var $label=$this.find(opt.labelSelector);var $input=$this.find(opt.inputSelector);if($label.length===1&&$input.length===1)addInputInnerLabel($this,$label,$input)});return $(this)};$element.find(".js-input-field--innerLabel1").addInputInnerLabel1()})}]}});var NPC=NPC||{};NPC.angularApp=NPC.angularApp||angular.module("npc",["ngRoute","ui.bootstrap"]); NPC.angularApp.directive("autoTab",function(){return{require:"ngModel",restrict:"A",link:function(scope,element,attrs,ngModel){scope.$watch(function(){return ngModel.$viewValue},function(newValue,oldValue){if(newValue!=oldValue)if(newValue.length>=attrs.autoTab)element.next(":input").focus()},true)}}});var NPC=NPC||{};NPC.angularApp=NPC.angularApp||angular.module("npc",["ngRoute","ui.bootstrap"]); var template="\x3cdiv ng-show\x3d'ctrl.qtyItems \x3e 0 \x26\x26 ctrl.infoTxt !\x3d undefined' class\x3d'dataTables_info' id\x3d'virementsTable_info' role\x3d'status' aria-live\x3d'polite' style\x3d'display: block;'\x3e{{ctrl.infoTxt}}\x3c/div\x3e"+"\x3cdiv class\x3d'dataTables_paginate paging_simple_numbers' id\x3d'virementsTable_paginate' ng-show\x3d'ctrl.qtyItems \x3e 0 \x26\x26 ctrl.qtyPages \x3e 1'\x3e"+"\x3ca class\x3d'paginate_button previous' ng-class\x3d'{\"disabled\" : ctrl.currentPage \x3c\x3d 0}' ng-click\x3d'ctrl.gotoPrevious();$event.preventDefault()' \x3e\x26lt;\x3c/a\x3e"+ "\x3cspan\x3e"+"\x3ca class\x3d'paginate_button'\tid\x3d'{{ctrl.paginationId}}-page-0' ng-class\x3d'{\"current\": ctrl.currentPage \x3d\x3d 0}' ng-click\x3d'ctrl.gotoPage(0);$event.preventDefault()' ng-show\x3d'ctrl.qtyPages \x3c\x3d 3'\x3e1\x3c/a\x3e"+"\x3ca class\x3d'paginate_button' id\x3d'{{ctrl.paginationId}}-page-1' ng-class\x3d'{\"current\": ctrl.currentPage \x3d\x3d 1}' ng-click\x3d'ctrl.gotoPage(1);$event.preventDefault()' ng-show\x3d'ctrl.qtyPages \x3d\x3d 2 || ctrl.qtyPages \x3d\x3d 3'\x3e2\x3c/a\x3e"+ "\x3ca class\x3d'paginate_button' id\x3d'{{ctrl.paginationId}}-page-2' ng-class\x3d'{\"current\": ctrl.currentPage \x3d\x3d 2}' ng-click\x3d'ctrl.gotoPage(2);$event.preventDefault()' ng-show\x3d'ctrl.qtyPages \x3d\x3d 3'\x3e3\x3c/a\x3e"+"\x3ca class\x3d'paginate_button' id\x3d'{{ctrl.paginationId}}-page-1' ng-click\x3d'ctrl.gotoPage(0);$event.preventDefault()' ng-show\x3d'ctrl.qtyPages \x3e 3 \x26\x26 ctrl.currentPage \x3e\x3d 2'\x3e1\x3c/a\x3e"+"\x3cspan class\x3d'ellipsis' ng-show\x3d'ctrl.qtyPages \x3e 4 \x26\x26 ctrl.currentPage \x3e\x3d 2'\x3e\u2026\x3c/span\x3e"+ "\x3ca class\x3d'paginate_button current' id\x3d'{{ctrl.paginationId}}-page-0' ng-click\x3d'ctrl.gotoPage(0);$event.preventDefault()' ng-show\x3d'ctrl.qtyPages \x3e 3 \x26\x26 ctrl.currentPage \x3d\x3d 0'\x3e1\x3c/a\x3e"+"\x3ca class\x3d'paginate_button' \t\tid\x3d'{{ctrl.paginationId}}-page-1' ng-click\x3d'ctrl.gotoPage(1);$event.preventDefault()' ng-show\x3d'ctrl.qtyPages \x3e 3 \x26\x26 ctrl.currentPage \x3d\x3d 0'\x3e2\x3c/a\x3e"+"\x3ca class\x3d'paginate_button' \t\tid\x3d'{{ctrl.paginationId}}-page-2' ng-click\x3d'ctrl.gotoPage(2);$event.preventDefault()' ng-show\x3d'ctrl.qtyPages \x3e 3 \x26\x26 ctrl.currentPage \x3d\x3d 0'\x3e3\x3c/a\x3e"+ "\x3ca class\x3d'paginate_button' \t\tid\x3d'{{ctrl.paginationId}}-page-{{ctrl.currentPage}}' \t\tng-click\x3d'ctrl.gotoPage(ctrl.currentPage - 1);$event.preventDefault()' \tng-show\x3d'ctrl.qtyPages \x3e 3 \x26\x26 ctrl.currentPage \x3e 0 \x26\x26 ctrl.currentPage \x3c ctrl.qtyPages - 1'\x3e{{ctrl.currentPage}}\x3c/a\x3e"+"\x3ca class\x3d'paginate_button current' id\x3d'{{ctrl.paginationId}}-page-{{ctrl.currentPage + 1}}' \tng-click\x3d'ctrl.gotoPage(ctrl.currentPage);$event.preventDefault()' \t\tng-show\x3d'ctrl.qtyPages \x3e 3 \x26\x26 ctrl.currentPage \x3e 0 \x26\x26 ctrl.currentPage \x3c ctrl.qtyPages - 1'\x3e{{ctrl.currentPage + 1}}\x3c/a\x3e"+ "\x3ca class\x3d'paginate_button' \t\tid\x3d'{{ctrl.paginationId}}-page-{{ctrl.currentPage + 2}}' \tng-click\x3d'ctrl.gotoPage(ctrl.currentPage + 1);$event.preventDefault()' \tng-show\x3d'ctrl.qtyPages \x3e 3 \x26\x26 ctrl.currentPage \x3e 0 \x26\x26 ctrl.currentPage \x3c ctrl.qtyPages - 1'\x3e{{ctrl.currentPage + 2}}\x3c/a\x3e"+"\x3ca class\x3d'paginate_button' \t\t\tid\x3d'{{ctrl.paginationId}}-page-{{ctrl.qtyPages - 3}}' \tng-click\x3d'ctrl.gotoPage(ctrl.qtyPages - 3);$event.preventDefault()' ng-show\x3d'ctrl.qtyPages \x3e 3 \x26\x26 ctrl.currentPage \x3d\x3d ctrl.qtyPages - 1'\x3e{{ctrl.qtyPages - 2}}\x3c/a\x3e"+ "\x3ca class\x3d'paginate_button' \t\t\tid\x3d'{{ctrl.paginationId}}-page-{{ctrl.qtyPages - 2}}' \tng-click\x3d'ctrl.gotoPage(ctrl.qtyPages - 2);$event.preventDefault()' ng-show\x3d'ctrl.qtyPages \x3e 3 \x26\x26 ctrl.currentPage \x3d\x3d ctrl.qtyPages - 1'\x3e{{ctrl.qtyPages - 1}}\x3c/a\x3e"+"\x3ca class\x3d'paginate_button current' \tid\x3d'{{ctrl.paginationId}}-page-{{ctrl.qtyPages - 1}}' \tng-click\x3d'ctrl.gotoPage(ctrl.qtyPages - 1);$event.preventDefault()' ng-show\x3d'ctrl.qtyPages \x3e 3 \x26\x26 ctrl.currentPage \x3d\x3d ctrl.qtyPages - 1'\x3e{{ctrl.qtyPages}}\x3c/a\x3e"+ "\x3cspan class\x3d'ellipsis' ng-show\x3d'ctrl.qtyPages \x3e 4 \x26\x26 ctrl.currentPage \x3c ctrl.qtyPages - 2'\x3e\u2026\x3c/span\x3e"+"\x3ca class\x3d'paginate_button' id\x3d'{{ctrl.paginationId}}-page-{{ctrl.qtyPages}}' ng-click\x3d'ctrl.gotoPage(ctrl.qtyPages - 1);$event.preventDefault()' ng-show\x3d'ctrl.qtyPages \x3e 3 \x26\x26 ctrl.currentPage \x3c\x3d ctrl.qtyPages - 3'\x3e{{ctrl.qtyPages}}\x3c/a\x3e"+"\x3c/span\x3e"+"\x3ca class\x3d'paginate_button next' ng-class\x3d'{\"disabled\" : ctrl.currentPage \x3e\x3d ctrl.qtyPages - 1}' ng-click\x3d'ctrl.gotoNext();$event.preventDefault()'\x3e\x26gt;\x3c/a\x3e"+ "\x3c/div\x3e"; NPC.angularApp.component("simplePagination",{template:template,transclude:true,bindings:{pageSize:"\x3c",qtyItems:"\x3c",cursor:"\x3d",paginationId:"\x3c",info:"\x3c"},controllerAs:"ctrl",controller:["$scope","$timeout",function($scope,$timeout){var me=this;me.currentPage=0;me.qtyPages=0;me.pages=[];me.infoTxt="";var _generateArray=function(size){var result=[];for(var i=0;i1?"s":"");tmp=tmp.replace("[PAGE_S]",me.qtyPages>1?"s":"");me.infoTxt=tmp}};me.gotoPrevious=function(){if(me.currentPage<= 0)return;me.currentPage--;_calculateCursor()};me.gotoNext=function(){if(me.currentPage>=me.qtyPages-1)return;me.currentPage++;_calculateCursor()};me.gotoPage=function(page){if(page>=me.qtyPages||page<0)return;me.currentPage=page;_calculateCursor()};$scope.$watch(function(){return me.qtyItems},function(val,old){me.cursor=0;me.currentPage=0;_calculateQtyPages()});$scope.$watch(function(){return me.pageSize},function(val,old){me.cursor=0;_calculateQtyPages()});$timeout(function(){_calculateQtyPages()})}]}); NPC.angularApp.filter("simplePaginationFilter",function(){return function(items,start,size){var filtered=[];var i=0;var stop=start+size;angular.forEach(items,function(item){if(i>=start&&i-1)filtered.push(item)}});return filtered}});var NPC=NPC||{};NPC.angularApp=NPC.angularApp||angular.module("npc",["ngRoute","ui.bootstrap"]); NPC.angularApp.filter("orderObjByAttr",function(){return function(items,field,order){var filtered=[];angular.forEach(items,function(item){filtered.push(item)});filtered.sort(function(a,b){return a[field]>b[field]?1:-1});if(order!=="asc")filtered.reverse();return filtered}});var NPC=NPC||{};NPC.angularApp=NPC.angularApp||angular.module("npc",["ngRoute","ui.bootstrap"]); NPC.angularApp.filter("euroAmount",function(){return function(number){if(isNaN(number)||number==="")return number;var result="";var txtNumber=parseFloat(number).toFixed(2);var parts=txtNumber.split(".");var leftPart=parts[0].split("").reverse().join("");var value="";for(var i=0;imax)return-1}};var _toPureNumber=function(value){value=value.replace(/\s/g,"");value=value.replace(/\./g, ",");return value};var _formatNumber=function(value){if(value=="")return"";splValue=value.split(",");var tmp=[];for(var i=splValue[0].length;i>0;i-=3){var qty=3;var j=i-3;if(j<0){qty=3+j;j=0}tmp.push(splValue[0].substr(j,qty))}var formattedNumber=tmp.reverse().join(" ");if(splValue.length>1)formattedNumber+=","+splValue[1];return formattedNumber};return{require:"ngModel",restrict:"A",link:function(scope,element,attrs,ngModel){scope.$watch(function(){return ngModel.$viewValue},function(newValue,oldValue){var type= typeof newValue;if(newValue!=oldValue&&attrs.amountFormat==="true"&&type=="string"){var pureNumber=_toPureNumber(newValue);if(pureNumber!=oldValue){var errorIndex=_getErrorIndex(pureNumber,"^[0-9]+(,)?([0-9]{1,2})?$");var finalValue=pureNumber.substr(0,errorIndex);var formattedValue=_formatNumber(finalValue);if(finalValue.length>0&&finalValue[finalValue.length-1]==",")finalValue=finalValue.substr(0,finalValue.length-1);ngModel.$setViewValue(finalValue);ngModel.$viewValue=formattedValue;ngModel.$render()}}}, true)}}});var NPC=NPC||{};NPC.angularApp=NPC.angularApp||angular.module("npc",["ngRoute","ui.bootstrap"]);NPC.angularApp.filter("absolute",function(){return function(a){return Math.abs(a)}}); (function(angular){angular.module("selectCustom",[]).directive("selectCustom",function(){return{template:'\x3cdiv class\x3d"{{wrapperClass}} input-field" ng-class\x3d"{\'bootstrap-select-wrapper\': inputLabel}"\x3e \x3clabel for\x3d"{{inputId}}" class\x3d"bootstrap-select-wrapperLabel" ng-if\x3d"inputLabel"\x3e{{inputLabel}}\x3c/label\x3e \x3cselect id\x3d"{{inputId}}" name\x3d"{{inputName}}" class\x3d"{{inputClass}} show-menu-arrow bootstrap-select--default" ng-disabled\x3d"inputDisabled" ng-model\x3d"inputModel" ng-change\x3d"inputChange()" ng-transclude\x3e \x3c/select\x3e \x3c/div\x3e',restrict:"AE", transclude:true,scope:{wrapperClass:"@",inputId:"@",inputName:"@",inputModel:"\x3d",inputPlaceholder:"@",inputClass:"@",inputDisabled:"\x3c",inputLabel:"@",inputChange:"\x3c"},controllerAs:"$ctrl",controller:["$scope","$element","$timeout",function($scope,$element,$timeout){var initialized=false;this.$onInit=function(){};var updateSelect=function(){if(initialized===true)$timeout(function(){$element.find("select").selectpicker("refresh")})};$scope.$watch("inputDisabled",updateSelect);$scope.$watch("inputModel", updateSelect);$scope.$evalAsync(function(){$timeout(function(){$element.find(".bootstrap-select-wrapper").addSelectLabel();var $select=$element.find("select");var firstOption=$select[0].options[0];if(firstOption.value[0]==="?"&&firstOption.value[firstOption.value.length-1]==="?")firstOption.parentNode.removeChild(firstOption);$element.find("select").selectpicker({title:$scope.inputPlaceholder}).on("change",function(){$scope.$apply()});initialized=true})})}]}})})(angular); (function(angular){angular.module("npc").component("errorLoadingData",{template:"\x3cdiv ng-show\x3d'ctrl.showMsg'\x3e"+"\x3cdiv class\x3d'OutputMsg'\x3e"+"\x3ci class\x3d'icon npc-ko OutputMsg-icon'\x3e\x3c/i\x3e"+"\x3ch2 class\x3d'OutputMsg-title'\x3e{{ctrl.errorMessageTitle}}\x3c/h2\x3e "+"\x3cdiv class\x3d'OutputMsg-text'\x3e"+"\x3cp\x3e\x3cb\x3e{{ctrl.errorMessageSubtitle}}\x3c/b\x3e\x3c/p\x3e"+"\x3c/div\x3e"+"\x3c/div\x3e"+"\x3cbr /\x3e"+"\x3cdiv style\x3d'text-align:center; margin-bottom:20px;'\x3e"+ "\x3cbutton type\x3d'submit' ng-disabled\x3d'ctrl.cancelDisabled' style\x3d'margin-left: 4px; margin-right: 4px; padding-left: 30px; padding-right: 30px;'"+"class\x3d'btn btn-default'"+"ng-click\x3d'ctrl.cancelAction(); $event.preventDefault()'\x3e{{ctrl.cancelLabel}}\x3c/button\x3e"+"\x3cbutton type\x3d'submit' ng-disabled\x3d'ctrl.submitDisabled' style\x3d'margin-left: 4px; margin-right: 4px; padding-left: 30px; padding-right: 30px;'"+"class\x3d'btn btn-default hover'"+"ng-click\x3d'ctrl.submitAction(); $event.preventDefault()'\x3e{{ctrl.submitLabel}}\x3c/button\x3e"+ "\x3c/div\x3e"+"\x3c/div\x3e",bindings:{showMsg:"\x3c",errorMessageTitle:"\x3c",errorMessageSubtitle:"\x3c",cancelLabel:"\x3c",submitLabel:"\x3c"},controllerAs:"ctrl",controller:ErrorLoadingDataController});ErrorLoadingDataController.$inject=["$scope"];function ErrorLoadingDataController($scope){var vm=this;var OPERATIONS_PATHNAME="operations";var SYNTHESE_PATHNAME=OPERATIONS_PATHNAME+"/synthese.html";vm.cancelDisabled=false;vm.submitDisabled=false;vm.$onInit=function(){if(vm.errorMessageTitle=== undefined)vm.errorMessageTitle="UNE ERREUR TECHNIQUE EST SURVENUE";if(vm.errorMessageSubtitle===undefined)vm.errorMessageSubtitle="Nous vous invitons \u00e0 r\u00e9essayer ult\u00e9rieurement.";if(vm.cancelLabel===undefined)vm.cancelLabel="Retour \u00e0 la synth\u00e8se";if(vm.submitLabel===undefined)vm.submitLabel="R\u00e9essayer"};vm.$onChanges=function(changes){if(changes.showMsg)vm.showMsg=changes.showMsg.currentValue;if(changes.errorMessageTitle)vm.errorMessageTitle=changes.errorMessageTitle.currentValue; if(changes.errorMessageSubtitle)vm.errorMessageSubtitle=changes.errorMessageSubtitle.currentValue;if(changes.cancelLabel)vm.cancelLabel=changes.cancelLabel.currentValue;if(changes.submitLabel)vm.submitLabel=changes.submitLabel.currentValue};vm.cancelAction=function(){vm.cancelDisabled=true;var uriParts=window.location.pathname.split(OPERATIONS_PATHNAME);window.location.href=uriParts[0]+SYNTHESE_PATHNAME};vm.submitAction=function(){vm.submitDisabled=true;window.location.reload(true)}}})(angular); (function(angular){angular.module("npc").component("npcLoader",{template:"\x3cdiv ng-show\x3d'ctrl.showLoader' class\x3d'loader'\x3e...\x3c/div\x3e",bindings:{showLoader:"\x3c"},controllerAs:"ctrl",controller:NpcLoaderController});function NpcLoaderController(){var vm=this;vm.$onInit=function(){}}})(angular);