define("ng.cla.core.group_picker",["cla_angular"],function(e){return function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.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/group_picker/group_picker.directive.js")}({"./assets/js/angular/cla/group_picker/group_picker.directive.js":function(e,n,t){(function(e){var r,o;r=[t(0),t("./assets/js/angular/cla/group_picker/group_picker.html")],void 0!==(o=function(e,n){function t(t){function r(n,r,o,l){n.id=o.selectId+"-inner",n.placeholder=n.placeholder?n.placeholder:"Select a group",r.hide(),n.startSelect2=function(n,t,r){var o=e.element("#"+n);o.select2({placeholder:r,minimumInputLength:1,ajax:{url:"/intranet/common/group_picker.php?json=1&multi=1"+t,dataType:"json",delay:250,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),l.$viewChangeListeners.push(function(){n.$eval(o.ngChange)}),n.initSelect2=function(t,r){var o=e.element("#"+t);o.find("option").remove(),void 0===n.ngModel&&(n.ngModel=[]);for(var l=0;l<n.ngModel.length;l++)o.append(e.element("<option>").attr("value",""+n.ngModel[l]).text(n.groups[n.ngModel[l]]).attr("selected","selected"));o.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.groups={},e.element.each(r,function(t,r){n.groups[r]=e.element("#"+n.id+' [value="'+r+'"]').text()}),l.$setViewValue(r),l.$render(),t(function(e){l.$setViewValue(e),l.$render()},0,!0,r)},n.internalControl=n.control||{},n.internalControl.reset=function(){l.$setViewValue(n.ngModel),n.initSelect2(n.id,n.placeholder,!0)}}return{link:r,restrict:"E",require:"^ngModel",templateUrl:n,scope:{ngModel:"=",control:"=",groups:"=",placeholder:"@"}}}var r=null;try{r=e.module("cla.core.group_picker")}catch(n){r=e.module("cla.core.group_picker",[])}r.directive("claGroupPicker",t),t.$inject=["$timeout"]}.apply(n,r))&&(e.exports=o)}).call(n,t("./node_modules/webpack/buildin/module.js")(e))},"./assets/js/angular/cla/group_picker/group_picker.html":function(e,n){var t="/assets/js/angular/cla/group_picker/group_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="group_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}})});