define("ng.cla.core.role_picker",["cla_angular"],function(e){return function(e){function n(r){if(t[r])return t[r].exports;var l=t[r]={i:r,l:!1,exports:{}};return e[r].call(l.exports,l,l.exports,n),l.l=!0,l.exports}var t={};return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="/components/",n(n.s="./assets/js/angular/cla/role_picker/role_picker.directive.js")}({"./assets/js/angular/cla/role_picker/role_picker.directive.js":function(e,n,t){(function(e){var r,l;r=[t(0),t("./assets/js/angular/cla/role_picker/role_picker.html")],void 0!==(l=function(e,n){function t(t){function r(n,r,l,o){n.id=l.selectId+"-inner",n.placeholder=n.placeholder?n.placeholder:"Select a role",0==n.ngModel&&(n.ngModel=[]),r.hide(),n.startSelect2=function(n,t,r){var l=e.element("#"+n);l.select2({placeholder:r,minimumInputLength:1,ajax:{url:"/intranet/common/role_picker.php?json=1&multi=1"+t,dataType:"json",data:function(e){return{keywords:e.term.trim(),page:e.page,page_size:10,st:10*(e.page-1)}},processResults:function(e,n){return n.page=n.page||1,{results:e.data,pagination:{more:10*n.page<e.total}}}}})},t(function(e,t,r){n.initSelect2(e,t),r.show()},0,!0,n.id,n.placeholder,r),n.startSelect2(n.id,"",n.placeholder),o.$viewChangeListeners.push(function(){n.$eval(l.ngChange)}),n.initSelect2=function(t,r){var l=e.element("#"+t);l.find("option").remove();for(var o=0;o<n.ngModel.length;o++)l.append(e.element("<option>").attr("value",""+n.ngModel[o]).text(n.roles[n.ngModel[o]]).attr("selected","selected"));l.on("change",function(){n.ngModel.length=0,e.element(this).find("option:selected").each(function(){var t=e.element(this).val();n.ngModel.push(t)}),n.change()}),n.startSelect2(n.id,"",r)},n.change=function(){var r=n.ngModel;n.roles={},e.element.each(r,function(t,r){n.roles[r]=e.element("#"+n.id+' [value="'+r+'"]').text()}),o.$setViewValue(r),o.$render(),t(function(e){o.$setViewValue(e),o.$render()},0,!0,r)},n.internalControl=n.control||{},n.internalControl.reset=function(){o.$setViewValue(n.ngModel),n.initSelect2(n.id,n.placeholder,!0)}}return{link:r,restrict:"E",require:"^ngModel",templateUrl:n,scope:{ngModel:"=",control:"=",roles:"=",placeholder:"@"}}}var r=null;try{r=e.module("cla.core.role_picker")}catch(n){r=e.module("cla.core.role_picker",[])}r.directive("claRolePicker",t),t.$inject=["$timeout"]}.apply(n,r))&&(e.exports=l)}).call(n,t("./node_modules/webpack/buildin/module.js")(e))},"./assets/js/angular/cla/role_picker/role_picker.html":function(e,n){var t="/assets/js/angular/cla/role_picker/role_picker.html";window.angular.module("ng").run(["$templateCache",function(e){e.put(t,'\n<div class="row">\n\t<div class="col-md-12">\n\t\t<select multiple="multiple" name="role_picker_select" id="{{id}}" class="form-control" size="30" style="width: 100%;"></select>\n\t</div>\n</div>\n')}]),e.exports=t},"./node_modules/webpack/buildin/module.js":function(e,n){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},0:function(n,t){n.exports=e}})});