\").appendTo(i),n=i.uniqueId().attr(\"id\");return this._addClass(s,\"ui-tooltip-content\"),this._addClass(i,\"ui-tooltip\",\"ui-widget ui-widget-content\"),i.appendTo(this._appendTo(e)),this.tooltips[n]={element:e,tooltip:i}},_find:function(t){var e=t.data(\"ui-tooltip-id\");return e?this.tooltips[e]:null},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr(\"id\")]},_appendTo:function(t){var e=t.closest(\".ui-front, dialog\");return e.length||(e=this.document[0].body),e},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event(\"blur\"),o=s.element;n.target=n.currentTarget=o[0],e.close(n,!0),t(\"#\"+i).remove(),o.data(\"ui-tooltip-title\")&&(o.attr(\"title\")||o.attr(\"title\",o.data(\"ui-tooltip-title\")),o.removeData(\"ui-tooltip-title\"))}),this.liveRegion.remove()}}),t.uiBackCompat!==!1&&t.widget(\"ui.tooltip\",t.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),t.ui.tooltip;var f=\"ui-effects-\",g=\"ui-effects-style\",m=\"ui-effects-animated\",_=t;t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,o){var a,r=o.re.exec(i),h=r&&o.parse(r),l=o.space||\"rgba\";return h?(a=s[l](h),s[c[l].cache]=a[c[l].cache],n=s._rgba=a._rgba,!1):e}),n.length?(\"0,0,0,0\"===n.join()&&t.extend(n,o.transparent),s):o[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var o,a=\"backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor\",r=/^([\\-+])=\\s*(\\d+\\.?\\d*)/,h=[{re:/rgba?\\(\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*,\\s*(\\d{1,3})\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\\(\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\\(\\s*(\\d+(?:\\.\\d+)?)\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*,\\s*(\\d+(?:\\.\\d+)?)\\%\\s*(?:,\\s*(\\d?(?:\\.\\d+)?)\\s*)?\\)/,space:\"hsla\",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:\"byte\"},green:{idx:1,type:\"byte\"},blue:{idx:2,type:\"byte\"}}},hsla:{props:{hue:{idx:0,type:\"degrees\"},saturation:{idx:1,type:\"percent\"},lightness:{idx:2,type:\"percent\"}}}},u={\"byte\":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t(\"
\")[0],f=t.each;p.style.cssText=\"background-color:rgba(1,1,1,.5)\",d.rgba=p.style.backgroundColor.indexOf(\"rgba\")>-1,f(c,function(t,e){e.cache=\"_\"+t,e.props.alpha={idx:3,type:\"percent\",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,a,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(a),a=e);var u=this,d=t.type(n),p=this._rgba=[];return a!==e&&(n=[n,a,r,h],d=\"array\"),\"string\"===d?this.parse(s(n)||o._default):\"array\"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):\"object\"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var o=s.cache;f(s.props,function(t,e){if(!u[o]&&s.to){if(\"alpha\"===t||null==n[t])return;u[o]=s.to(u._rgba)}u[o][e.idx]=i(n[t],e,!0)}),u[o]&&0>t.inArray(null,u[o].slice(0,3))&&(u[o][3]=1,s.from&&(u._rgba=s.from(u[o])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,o){var a,r=i[o.cache];return r&&(a=n[o.cache]||o.to&&o.to(n._rgba)||[],f(o.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===a[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),o=c[n],a=0===this.alpha()?l(\"transparent\"):this,r=a[o.cache]||o.to(a._rgba),h=r.slice();return s=s[o.cache],f(o.props,function(t,n){var o=n.idx,a=r[o],l=s[o],c=u[n.type]||{};null!==l&&(null===a?h[o]=l:(c.mod&&(l-a>c.mod/2?a+=c.mod:a-l>c.mod/2&&(a-=c.mod)),h[o]=i((l-a)*e+a,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e=\"rgba(\",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e=\"rgb(\"),e+i.join()+\")\"},toHslaString:function(){var e=\"hsla(\",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+\"%\"),t});return 1===i[3]&&(i.pop(),e=\"hsl(\"),e+i.join()+\")\"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),\"#\"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?\"0\"+t:t}).join(\"\")},toString:function(){return 0===this._rgba[3]?\"transparent\":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,o=t[2]/255,a=t[3],r=Math.max(s,n,o),h=Math.min(s,n,o),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-o)/l+360:n===r?60*(o-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==a?1:a]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],o=t[3],a=.5>=s?s*(1+i):s+i-s*i,r=2*s-a;return[Math.round(255*n(r,a,e+1/3)),Math.round(255*n(r,a,e)),Math.round(255*n(r,a,e-1/3)),o]},f(c,function(s,n){var o=n.props,a=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[a]&&(this[a]=h(this._rgba)),s===e)return this[a].slice();var n,r=t.type(s),u=\"array\"===r||\"object\"===r?s:arguments,d=this[a].slice();return f(o,function(t,e){var s=u[\"object\"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[a]=d,n):l(d)},f(o,function(e,i){l.fn[e]||(l.fn[e]=function(n){var o,a=t.type(n),h=\"alpha\"===e?this._hsla?\"hsla\":\"rgba\":s,l=this[h](),c=l[i.idx];return\"undefined\"===a?c:(\"function\"===a&&(n=n.call(this,c),a=t.type(n)),null==n&&i.empty?this:(\"string\"===a&&(o=r.exec(n),o&&(n=c+parseFloat(o[2])*(\"+\"===o[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(\" \");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var o,a,r=\"\";if(\"transparent\"!==n&&(\"string\"!==t.type(n)||(o=s(n)))){if(n=l(o||n),!d.rgba&&1!==n._rgba[3]){for(a=\"backgroundColor\"===i?e.parentNode:e;(\"\"===r||\"transparent\"===r)&&a&&a.style;)try{r=t.css(a,\"backgroundColor\"),a=a.parentNode}catch(h){}n=n.blend(r&&\"transparent\"!==r?r:\"_default\")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(a),t.cssHooks.borderColor={expand:function(t){var e={};return f([\"Top\",\"Right\",\"Bottom\",\"Left\"],function(i,s){e[\"border\"+s+\"Color\"]=t}),e}},o=t.Color.names={aqua:\"#00ffff\",black:\"#000000\",blue:\"#0000ff\",fuchsia:\"#ff00ff\",gray:\"#808080\",green:\"#008000\",lime:\"#00ff00\",maroon:\"#800000\",navy:\"#000080\",olive:\"#808000\",purple:\"#800080\",red:\"#ff0000\",silver:\"#c0c0c0\",teal:\"#008080\",white:\"#ffffff\",yellow:\"#ffff00\",transparent:[null,null,null,0],_default:\"#ffffff\"}}(_),function(){function e(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,o={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],\"string\"==typeof n[i]&&(o[t.camelCase(i)]=n[i]);else for(i in n)\"string\"==typeof n[i]&&(o[i]=n[i]);return o}function i(e,i){var s,o,a={};for(s in i)o=i[s],e[s]!==o&&(n[s]||(t.fx.step[s]||!isNaN(parseFloat(o)))&&(a[s]=o));return a}var s=[\"add\",\"remove\",\"toggle\"],n={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each([\"borderLeftStyle\",\"borderRightStyle\",\"borderBottomStyle\",\"borderTopStyle\"],function(e,i){t.fx.step[i]=function(t){(\"none\"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(_.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(n,o,a,r){var h=t.speed(o,a,r);return this.queue(function(){var o,a=t(this),r=a.attr(\"class\")||\"\",l=h.children?a.find(\"*\").addBack():a;l=l.map(function(){var i=t(this);return{el:i,start:e(this)}}),o=function(){t.each(s,function(t,e){n[e]&&a[e+\"Class\"](n[e])})},o(),l=l.map(function(){return this.end=e(this.el[0]),this.diff=i(this.start,this.end),this}),a.attr(\"class\",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){o(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,\"\")})}),h.complete.call(a[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,o){return s?t.effects.animateClass.call(this,{add:i},s,n,o):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,o){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,o):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(e){return function(i,s,n,o,a){return\"boolean\"==typeof s||void 0===s?n?t.effects.animateClass.call(this,s?{add:i}:{remove:i},n,o,a):e.apply(this,arguments):t.effects.animateClass.call(this,{toggle:i},s,n,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,o){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,o)}})}(),function(){function e(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),(\"number\"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:\"number\"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function i(e){return!e||\"number\"==typeof e||t.fx.speeds[e]?!0:\"string\"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:\"object\"!=typeof e||e.effect?!1:!0:!0}function s(t,e){var i=e.outerWidth(),s=e.outerHeight(),n=/^rect\\((-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto),?\\s*(-?\\d*\\.?\\d*px|-?\\d+%|auto)\\)$/,o=n.exec(t)||[\"\",0,i,s,0];return{top:parseFloat(o[1])||0,right:\"auto\"===o[2]?i:parseFloat(o[2]),bottom:\"auto\"===o[3]?s:parseFloat(o[3]),left:parseFloat(o[4])||0}}t.expr&&t.expr.filters&&t.expr.filters.animated&&(t.expr.filters.animated=function(e){return function(i){return!!t(i).data(m)||e(i)}}(t.expr.filters.animated)),t.uiBackCompat!==!1&&t.extend(t.effects,{save:function(t,e){for(var i=0,s=e.length;s>i;i++)null!==e[i]&&t.data(f+e[i],t[0].style[e[i]])},restore:function(t,e){for(var i,s=0,n=e.length;n>s;s++)null!==e[s]&&(i=t.data(f+e[s]),t.css(e[s],i))},setMode:function(t,e){return\"toggle\"===e&&(e=t.is(\":hidden\")?\"show\":\"hide\"),e},createWrapper:function(e){if(e.parent().is(\".ui-effects-wrapper\"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),\"float\":e.css(\"float\")},s=t(\"
\").addClass(\"ui-effects-wrapper\").css({fontSize:\"100%\",background:\"transparent\",border:\"none\",margin:0,padding:0}),n={width:e.width(),height:e.height()},o=document.activeElement;try{o.id}catch(a){o=document.body}return e.wrap(s),(e[0]===o||t.contains(e[0],o))&&t(o).trigger(\"focus\"),s=e.parent(),\"static\"===e.css(\"position\")?(s.css({position:\"relative\"}),e.css({position:\"relative\"})):(t.extend(i,{position:e.css(\"position\"),zIndex:e.css(\"z-index\")}),t.each([\"top\",\"left\",\"bottom\",\"right\"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]=\"auto\")}),e.css({position:\"relative\",top:0,left:0,right:\"auto\",bottom:\"auto\"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(\".ui-effects-wrapper\")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).trigger(\"focus\")),e}}),t.extend(t.effects,{version:\"1.12.1\",define:function(e,i,s){return s||(s=i,i=\"effect\"),t.effects.effect[e]=s,t.effects.effect[e].mode=i,s},scaledDimensions:function(t,e,i){if(0===e)return{height:0,width:0,outerHeight:0,outerWidth:0};var s=\"horizontal\"!==i?(e||100)/100:1,n=\"vertical\"!==i?(e||100)/100:1;return{height:t.height()*n,width:t.width()*s,outerHeight:t.outerHeight()*n,outerWidth:t.outerWidth()*s}},clipToBox:function(t){return{width:t.clip.right-t.clip.left,height:t.clip.bottom-t.clip.top,left:t.clip.left,top:t.clip.top}},unshift:function(t,e,i){var s=t.queue();e>1&&s.splice.apply(s,[1,0].concat(s.splice(e,i))),t.dequeue()},saveStyle:function(t){t.data(g,t[0].style.cssText)},restoreStyle:function(t){t[0].style.cssText=t.data(g)||\"\",t.removeData(g)},mode:function(t,e){var i=t.is(\":hidden\");return\"toggle\"===e&&(e=i?\"show\":\"hide\"),(i?\"hide\"===e:\"show\"===e)&&(e=\"none\"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case\"top\":i=0;break;case\"middle\":i=.5;break;case\"bottom\":i=1;break;default:i=t[0]/e.height}switch(t[1]){case\"left\":s=0;break;case\"center\":s=.5;break;case\"right\":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createPlaceholder:function(e){var i,s=e.css(\"position\"),n=e.position();return e.css({marginTop:e.css(\"marginTop\"),marginBottom:e.css(\"marginBottom\"),marginLeft:e.css(\"marginLeft\"),marginRight:e.css(\"marginRight\")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(s)&&(s=\"absolute\",i=t(\"<\"+e[0].nodeName+\">\").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css(\"display\"))?\"inline-block\":\"block\",visibility:\"hidden\",marginTop:e.css(\"marginTop\"),marginBottom:e.css(\"marginBottom\"),marginLeft:e.css(\"marginLeft\"),marginRight:e.css(\"marginRight\"),\"float\":e.css(\"float\")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass(\"ui-effects-placeholder\"),e.data(f+\"placeholder\",i)),e.css({position:s,left:n.left,top:n.top}),i},removePlaceholder:function(t){var e=f+\"placeholder\",i=t.data(e);i&&(i.remove(),t.removeData(e))},cleanUp:function(e){t.effects.restoreStyle(e),t.effects.removePlaceholder(e)},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var o=e.cssUnit(i);o[0]>0&&(n[i]=o[0]*s+o[1])}),n}}),t.fn.extend({effect:function(){function i(e){function i(){r.removeData(m),t.effects.cleanUp(r),\"hide\"===s.mode&&r.hide(),a()}function a(){t.isFunction(h)&&h.call(r[0]),t.isFunction(e)&&e()}var r=t(this);s.mode=c.shift(),t.uiBackCompat===!1||o?\"none\"===s.mode?(r[l](),a()):n.call(r[0],s,i):(r.is(\":hidden\")?\"hide\"===l:\"show\"===l)?(r[l](),a()):n.call(r[0],s,a)}var s=e.apply(this,arguments),n=t.effects.effect[s.effect],o=n.mode,a=s.queue,r=a||\"fx\",h=s.complete,l=s.mode,c=[],u=function(e){var i=t(this),s=t.effects.mode(i,l)||o;i.data(m,!0),c.push(s),o&&(\"show\"===s||s===o&&\"hide\"===s)&&i.show(),o&&\"none\"===s||t.effects.saveStyle(i),t.isFunction(e)&&e()};return t.fx.off||!n?l?this[l](s.duration,h):this.each(function(){h&&h.call(this)}):a===!1?this.each(u).each(i):this.queue(r,u).queue(r,i)},show:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode=\"show\",this.effect.call(this,n)}}(t.fn.show),hide:function(t){return function(s){if(i(s))return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode=\"hide\",this.effect.call(this,n)}}(t.fn.hide),toggle:function(t){return function(s){if(i(s)||\"boolean\"==typeof s)return t.apply(this,arguments);var n=e.apply(this,arguments);return n.mode=\"toggle\",this.effect.call(this,n)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each([\"em\",\"px\",\"%\",\"pt\"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s},cssClip:function(t){return t?this.css(\"clip\",\"rect(\"+t.top+\"px \"+t.right+\"px \"+t.bottom+\"px \"+t.left+\"px)\"):s(this.css(\"clip\"),this)},transfer:function(e,i){var s=t(this),n=t(e.to),o=\"fixed\"===n.css(\"position\"),a=t(\"body\"),r=o?a.scrollTop():0,h=o?a.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t(\"
\").appendTo(\"body\").addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:o?\"fixed\":\"absolute\"}).animate(c,e.duration,e.easing,function(){d.remove(),t.isFunction(i)&&i()})}}),t.fx.step.clip=function(e){e.clipInit||(e.start=t(e.elem).cssClip(),\"string\"==typeof e.end&&(e.end=s(e.end,e.elem)),e.clipInit=!0),t(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),function(){var e={};t.each([\"Quad\",\"Cubic\",\"Quart\",\"Quint\",\"Expo\"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing[\"easeIn\"+e]=i,t.easing[\"easeOut\"+e]=function(t){return 1-i(1-t)},t.easing[\"easeInOut\"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}();var v=t.effects;t.effects.define(\"blind\",\"hide\",function(e,i){var s={up:[\"bottom\",\"top\"],vertical:[\"bottom\",\"top\"],down:[\"top\",\"bottom\"],left:[\"right\",\"left\"],horizontal:[\"right\",\"left\"],right:[\"left\",\"right\"]},n=t(this),o=e.direction||\"up\",a=n.cssClip(),r={clip:t.extend({},a)},h=t.effects.createPlaceholder(n);r.clip[s[o][0]]=r.clip[s[o][1]],\"show\"===e.mode&&(n.cssClip(r.clip),h&&h.css(t.effects.clipToBox(r)),r.clip=a),h&&h.animate(t.effects.clipToBox(r),e.duration,e.easing),n.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define(\"bounce\",function(e,i){var s,n,o,a=t(this),r=e.mode,h=\"hide\"===r,l=\"show\"===r,c=e.direction||\"up\",u=e.distance,d=e.times||5,p=2*d+(l||h?1:0),f=e.duration/p,g=e.easing,m=\"up\"===c||\"down\"===c?\"top\":\"left\",_=\"up\"===c||\"left\"===c,v=0,b=a.queue().length;for(t.effects.createPlaceholder(a),o=a.css(m),u||(u=a[\"top\"===m?\"outerHeight\":\"outerWidth\"]()/3),l&&(n={opacity:1},n[m]=o,a.css(\"opacity\",0).css(m,_?2*-u:2*u).animate(n,f,g)),h&&(u/=Math.pow(2,d-1)),n={},n[m]=o;d>v;v++)s={},s[m]=(_?\"-=\":\"+=\")+u,a.animate(s,f,g).animate(n,f,g),u=h?2*u:u/2;h&&(s={opacity:0},s[m]=(_?\"-=\":\"+=\")+u,a.animate(s,f,g)),a.queue(i),t.effects.unshift(a,b,p+1)}),t.effects.define(\"clip\",\"hide\",function(e,i){var s,n={},o=t(this),a=e.direction||\"vertical\",r=\"both\"===a,h=r||\"horizontal\"===a,l=r||\"vertical\"===a;s=o.cssClip(),n.clip={top:l?(s.bottom-s.top)/2:s.top,right:h?(s.right-s.left)/2:s.right,bottom:l?(s.bottom-s.top)/2:s.bottom,left:h?(s.right-s.left)/2:s.left},t.effects.createPlaceholder(o),\"show\"===e.mode&&(o.cssClip(n.clip),n.clip=s),o.animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define(\"drop\",\"hide\",function(e,i){var s,n=t(this),o=e.mode,a=\"show\"===o,r=e.direction||\"left\",h=\"up\"===r||\"down\"===r?\"top\":\"left\",l=\"up\"===r||\"left\"===r?\"-=\":\"+=\",c=\"+=\"===l?\"-=\":\"+=\",u={opacity:0};t.effects.createPlaceholder(n),s=e.distance||n[\"top\"===h?\"outerHeight\":\"outerWidth\"](!0)/2,u[h]=l+s,a&&(n.css(u),u[h]=c+s,u.opacity=1),n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define(\"explode\",\"hide\",function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:\"visible\"}),t(b).remove(),i()}var o,a,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=e.mode,g=\"show\"===f,m=p.show().css(\"visibility\",\"hidden\").offset(),_=Math.ceil(p.outerWidth()/d),v=Math.ceil(p.outerHeight()/u),b=[];for(o=0;u>o;o++)for(h=m.top+o*v,c=o-(u-1)/2,a=0;d>a;a++)r=m.left+a*_,l=a-(d-1)/2,p.clone().appendTo(\"body\").wrap(\"
\").css({position:\"absolute\",visibility:\"visible\",left:-a*_,top:-o*v}).parent().addClass(\"ui-effects-explode\").css({position:\"absolute\",overflow:\"hidden\",width:_,height:v,left:r+(g?l*_:0),top:h+(g?c*v:0),opacity:g?0:1}).animate({left:r+(g?0:l*_),top:h+(g?0:c*v),opacity:g?1:0},e.duration||500,e.easing,s)}),t.effects.define(\"fade\",\"toggle\",function(e,i){var s=\"show\"===e.mode;t(this).css(\"opacity\",s?0:1).animate({opacity:s?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define(\"fold\",\"hide\",function(e,i){var s=t(this),n=e.mode,o=\"show\"===n,a=\"hide\"===n,r=e.size||15,h=/([0-9]+)%/.exec(r),l=!!e.horizFirst,c=l?[\"right\",\"bottom\"]:[\"bottom\",\"right\"],u=e.duration/2,d=t.effects.createPlaceholder(s),p=s.cssClip(),f={clip:t.extend({},p)},g={clip:t.extend({},p)},m=[p[c[0]],p[c[1]]],_=s.queue().length;h&&(r=parseInt(h[1],10)/100*m[a?0:1]),f.clip[c[0]]=r,g.clip[c[0]]=r,g.clip[c[1]]=0,o&&(s.cssClip(g.clip),d&&d.css(t.effects.clipToBox(g)),g.clip=p),s.queue(function(i){d&&d.animate(t.effects.clipToBox(f),u,e.easing).animate(t.effects.clipToBox(g),u,e.easing),i()}).animate(f,u,e.easing).animate(g,u,e.easing).queue(i),t.effects.unshift(s,_,4)}),t.effects.define(\"highlight\",\"show\",function(e,i){var s=t(this),n={backgroundColor:s.css(\"backgroundColor\")};\"hide\"===e.mode&&(n.opacity=0),t.effects.saveStyle(s),s.css({backgroundImage:\"none\",backgroundColor:e.color||\"#ffff99\"}).animate(n,{queue:!1,duration:e.duration,easing:e.easing,complete:i})}),t.effects.define(\"size\",function(e,i){var s,n,o,a=t(this),r=[\"fontSize\"],h=[\"borderTopWidth\",\"borderBottomWidth\",\"paddingTop\",\"paddingBottom\"],l=[\"borderLeftWidth\",\"borderRightWidth\",\"paddingLeft\",\"paddingRight\"],c=e.mode,u=\"effect\"!==c,d=e.scale||\"both\",p=e.origin||[\"middle\",\"center\"],f=a.css(\"position\"),g=a.position(),m=t.effects.scaledDimensions(a),_=e.from||m,v=e.to||t.effects.scaledDimensions(a,0);t.effects.createPlaceholder(a),\"show\"===c&&(o=_,_=v,v=o),n={from:{y:_.height/m.height,x:_.width/m.width},to:{y:v.height/m.height,x:v.width/m.width}},(\"box\"===d||\"both\"===d)&&(n.from.y!==n.to.y&&(_=t.effects.setTransition(a,h,n.from.y,_),v=t.effects.setTransition(a,h,n.to.y,v)),n.from.x!==n.to.x&&(_=t.effects.setTransition(a,l,n.from.x,_),v=t.effects.setTransition(a,l,n.to.x,v))),(\"content\"===d||\"both\"===d)&&n.from.y!==n.to.y&&(_=t.effects.setTransition(a,r,n.from.y,_),v=t.effects.setTransition(a,r,n.to.y,v)),p&&(s=t.effects.getBaseline(p,m),_.top=(m.outerHeight-_.outerHeight)*s.y+g.top,_.left=(m.outerWidth-_.outerWidth)*s.x+g.left,v.top=(m.outerHeight-v.outerHeight)*s.y+g.top,v.left=(m.outerWidth-v.outerWidth)*s.x+g.left),a.css(_),(\"content\"===d||\"both\"===d)&&(h=h.concat([\"marginTop\",\"marginBottom\"]).concat(r),l=l.concat([\"marginLeft\",\"marginRight\"]),a.find(\"*[width]\").each(function(){var i=t(this),s=t.effects.scaledDimensions(i),o={height:s.height*n.from.y,width:s.width*n.from.x,outerHeight:s.outerHeight*n.from.y,outerWidth:s.outerWidth*n.from.x},a={height:s.height*n.to.y,width:s.width*n.to.x,outerHeight:s.height*n.to.y,outerWidth:s.width*n.to.x};n.from.y!==n.to.y&&(o=t.effects.setTransition(i,h,n.from.y,o),a=t.effects.setTransition(i,h,n.to.y,a)),n.from.x!==n.to.x&&(o=t.effects.setTransition(i,l,n.from.x,o),a=t.effects.setTransition(i,l,n.to.x,a)),u&&t.effects.saveStyle(i),i.css(o),i.animate(a,e.duration,e.easing,function(){u&&t.effects.restoreStyle(i)})})),a.animate(v,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){var e=a.offset();0===v.opacity&&a.css(\"opacity\",_.opacity),u||(a.css(\"position\",\"static\"===f?\"relative\":f).offset(e),t.effects.saveStyle(a)),i()}})}),t.effects.define(\"scale\",function(e,i){var s=t(this),n=e.mode,o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:\"effect\"!==n?0:100),a=t.extend(!0,{from:t.effects.scaledDimensions(s),to:t.effects.scaledDimensions(s,o,e.direction||\"both\"),origin:e.origin||[\"middle\",\"center\"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),t.effects.effect.size.call(this,a,i)}),t.effects.define(\"puff\",\"hide\",function(e,i){var s=t.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});t.effects.effect.scale.call(this,s,i)}),t.effects.define(\"pulsate\",\"show\",function(e,i){var s=t(this),n=e.mode,o=\"show\"===n,a=\"hide\"===n,r=o||a,h=2*(e.times||5)+(r?1:0),l=e.duration/h,c=0,u=1,d=s.queue().length;for((o||!s.is(\":visible\"))&&(s.css(\"opacity\",0).show(),c=1);h>u;u++)s.animate({opacity:c},l,e.easing),c=1-c;s.animate({opacity:c},l,e.easing),s.queue(i),t.effects.unshift(s,d,h+1)}),t.effects.define(\"shake\",function(e,i){var s=1,n=t(this),o=e.direction||\"left\",a=e.distance||20,r=e.times||3,h=2*r+1,l=Math.round(e.duration/h),c=\"up\"===o||\"down\"===o?\"top\":\"left\",u=\"up\"===o||\"left\"===o,d={},p={},f={},g=n.queue().length;for(t.effects.createPlaceholder(n),d[c]=(u?\"-=\":\"+=\")+a,p[c]=(u?\"+=\":\"-=\")+2*a,f[c]=(u?\"-=\":\"+=\")+2*a,n.animate(d,l,e.easing);r>s;s++)n.animate(p,l,e.easing).animate(f,l,e.easing);n.animate(p,l,e.easing).animate(d,l/2,e.easing).queue(i),t.effects.unshift(n,g,h+1)}),t.effects.define(\"slide\",\"show\",function(e,i){var s,n,o=t(this),a={up:[\"bottom\",\"top\"],down:[\"top\",\"bottom\"],left:[\"right\",\"left\"],right:[\"left\",\"right\"]},r=e.mode,h=e.direction||\"left\",l=\"up\"===h||\"down\"===h?\"top\":\"left\",c=\"up\"===h||\"left\"===h,u=e.distance||o[\"top\"===l?\"outerHeight\":\"outerWidth\"](!0),d={};t.effects.createPlaceholder(o),s=o.cssClip(),n=o.position()[l],d[l]=(c?-1:1)*u+n,d.clip=o.cssClip(),d.clip[a[h][1]]=d.clip[a[h][0]],\"show\"===r&&(o.cssClip(d.clip),o.css(l,d[l]),d.clip=s,d[l]=n),o.animate(d,{queue:!1,duration:e.duration,easing:e.easing,complete:i})});var v;t.uiBackCompat!==!1&&(v=t.effects.define(\"transfer\",function(e,i){t(this).transfer(e,i)}))});\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/jquery-ui-bundle/jquery-ui.min.js\n// module id = bUYX\n// module chunks = 0","\n\n
\n \n \n\n\n\n\n\n// WEBPACK FOOTER //\n// resources/assets/js/components/forms/asset-models/fieldset-default-values.vue","exports = module.exports = require(\"../../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \"\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-3351e4cf\",\"scoped\":true,\"hasInlineConfig\":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./resources/assets/js/components/importer/importer-errors.vue\n// module id = g9VR\n// module chunks = 0","exports = module.exports = require(\"../../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".action-link[data-v-edb205e0]{cursor:pointer}.m-b-none[data-v-edb205e0]{margin-bottom:0}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-edb205e0\",\"scoped\":true,\"hasInlineConfig\":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./resources/assets/js/components/passport/PersonalAccessTokens.vue\n// module id = gwdS\n// module chunks = 0","exports = module.exports = require(\"../../../../node_modules/css-loader/lib/css-base.js\")(false);\n// imports\n\n\n// module\nexports.push([module.id, \".select2-dropdown[data-v-09a38dce]{z-index:9999}\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/css-loader?minimize!./node_modules/vue-loader/lib/style-compiler?{\"vue\":true,\"id\":\"data-v-09a38dce\",\"scoped\":true,\"hasInlineConfig\":true}!./node_modules/vue-loader/lib/selector.js?type=styles&index=0!./resources/assets/js/components/select2.vue\n// module id = hLk5\n// module chunks = 0","/* */ \n\"format global\";\n\"deps jquery\";\n\"exports $\";\n/*!\n * Bootstrap v3.3.4 (http://getbootstrap.com)\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n\nif (typeof jQuery === 'undefined') {\n throw new Error('Bootstrap\\'s JavaScript requires jQuery')\n}\n\n+function ($) {\n 'use strict';\n var version = $.fn.jquery.split(' ')[0].split('.')\n if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {\n throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher')\n }\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: transition.js v3.3.4\n * http://getbootstrap.com/javascript/#transitions\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)\n // ============================================================\n\n function transitionEnd() {\n var el = document.createElement('bootstrap')\n\n var transEndEventNames = {\n WebkitTransition : 'webkitTransitionEnd',\n MozTransition : 'transitionend',\n OTransition : 'oTransitionEnd otransitionend',\n transition : 'transitionend'\n }\n\n for (var name in transEndEventNames) {\n if (el.style[name] !== undefined) {\n return { end: transEndEventNames[name] }\n }\n }\n\n return false // explicit for ie8 ( ._.)\n }\n\n // http://blog.alexmaccaw.com/css-transitions\n $.fn.emulateTransitionEnd = function (duration) {\n var called = false\n var $el = this\n $(this).one('bsTransitionEnd', function () { called = true })\n var callback = function () { if (!called) $($el).trigger($.support.transition.end) }\n setTimeout(callback, duration)\n return this\n }\n\n $(function () {\n $.support.transition = transitionEnd()\n\n if (!$.support.transition) return\n\n $.event.special.bsTransitionEnd = {\n bindType: $.support.transition.end,\n delegateType: $.support.transition.end,\n handle: function (e) {\n if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)\n }\n }\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: alert.js v3.3.4\n * http://getbootstrap.com/javascript/#alerts\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // ALERT CLASS DEFINITION\n // ======================\n\n var dismiss = '[data-dismiss=\"alert\"]'\n var Alert = function (el) {\n $(el).on('click', dismiss, this.close)\n }\n\n Alert.VERSION = '3.3.4'\n\n Alert.TRANSITION_DURATION = 150\n\n Alert.prototype.close = function (e) {\n var $this = $(this)\n var selector = $this.attr('data-target')\n\n if (!selector) {\n selector = $this.attr('href')\n selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n }\n\n var $parent = $(selector)\n\n if (e) e.preventDefault()\n\n if (!$parent.length) {\n $parent = $this.closest('.alert')\n }\n\n $parent.trigger(e = $.Event('close.bs.alert'))\n\n if (e.isDefaultPrevented()) return\n\n $parent.removeClass('in')\n\n function removeElement() {\n // detach from parent, fire event then clean up data\n $parent.detach().trigger('closed.bs.alert').remove()\n }\n\n $.support.transition && $parent.hasClass('fade') ?\n $parent\n .one('bsTransitionEnd', removeElement)\n .emulateTransitionEnd(Alert.TRANSITION_DURATION) :\n removeElement()\n }\n\n\n // ALERT PLUGIN DEFINITION\n // =======================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.alert')\n\n if (!data) $this.data('bs.alert', (data = new Alert(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }\n\n var old = $.fn.alert\n\n $.fn.alert = Plugin\n $.fn.alert.Constructor = Alert\n\n\n // ALERT NO CONFLICT\n // =================\n\n $.fn.alert.noConflict = function () {\n $.fn.alert = old\n return this\n }\n\n\n // ALERT DATA-API\n // ==============\n\n $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: button.js v3.3.4\n * http://getbootstrap.com/javascript/#buttons\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // BUTTON PUBLIC CLASS DEFINITION\n // ==============================\n\n var Button = function (element, options) {\n this.$element = $(element)\n this.options = $.extend({}, Button.DEFAULTS, options)\n this.isLoading = false\n }\n\n Button.VERSION = '3.3.4'\n\n Button.DEFAULTS = {\n loadingText: 'loading...'\n }\n\n Button.prototype.setState = function (state) {\n var d = 'disabled'\n var $el = this.$element\n var val = $el.is('input') ? 'val' : 'html'\n var data = $el.data()\n\n state = state + 'Text'\n\n if (data.resetText == null) $el.data('resetText', $el[val]())\n\n // push to event loop to allow forms to submit\n setTimeout($.proxy(function () {\n $el[val](data[state] == null ? this.options[state] : data[state])\n\n if (state == 'loadingText') {\n this.isLoading = true\n $el.addClass(d).attr(d, d)\n } else if (this.isLoading) {\n this.isLoading = false\n $el.removeClass(d).removeAttr(d)\n }\n }, this), 0)\n }\n\n Button.prototype.toggle = function () {\n var changed = true\n var $parent = this.$element.closest('[data-toggle=\"buttons\"]')\n\n if ($parent.length) {\n var $input = this.$element.find('input')\n if ($input.prop('type') == 'radio') {\n if ($input.prop('checked') && this.$element.hasClass('active')) changed = false\n else $parent.find('.active').removeClass('active')\n }\n if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')\n } else {\n this.$element.attr('aria-pressed', !this.$element.hasClass('active'))\n }\n\n if (changed) this.$element.toggleClass('active')\n }\n\n\n // BUTTON PLUGIN DEFINITION\n // ========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.button')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.button', (data = new Button(this, options)))\n\n if (option == 'toggle') data.toggle()\n else if (option) data.setState(option)\n })\n }\n\n var old = $.fn.button\n\n $.fn.button = Plugin\n $.fn.button.Constructor = Button\n\n\n // BUTTON NO CONFLICT\n // ==================\n\n $.fn.button.noConflict = function () {\n $.fn.button = old\n return this\n }\n\n\n // BUTTON DATA-API\n // ===============\n\n $(document)\n .on('click.bs.button.data-api', '[data-toggle^=\"button\"]', function (e) {\n var $btn = $(e.target)\n if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')\n Plugin.call($btn, 'toggle')\n e.preventDefault()\n })\n .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^=\"button\"]', function (e) {\n $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: carousel.js v3.3.4\n * http://getbootstrap.com/javascript/#carousel\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // CAROUSEL CLASS DEFINITION\n // =========================\n\n var Carousel = function (element, options) {\n this.$element = $(element)\n this.$indicators = this.$element.find('.carousel-indicators')\n this.options = options\n this.paused = null\n this.sliding = null\n this.interval = null\n this.$active = null\n this.$items = null\n\n this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))\n\n this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element\n .on('mouseenter.bs.carousel', $.proxy(this.pause, this))\n .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))\n }\n\n Carousel.VERSION = '3.3.4'\n\n Carousel.TRANSITION_DURATION = 600\n\n Carousel.DEFAULTS = {\n interval: 5000,\n pause: 'hover',\n wrap: true,\n keyboard: true\n }\n\n Carousel.prototype.keydown = function (e) {\n if (/input|textarea/i.test(e.target.tagName)) return\n switch (e.which) {\n case 37: this.prev(); break\n case 39: this.next(); break\n default: return\n }\n\n e.preventDefault()\n }\n\n Carousel.prototype.cycle = function (e) {\n e || (this.paused = false)\n\n this.interval && clearInterval(this.interval)\n\n this.options.interval\n && !this.paused\n && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))\n\n return this\n }\n\n Carousel.prototype.getItemIndex = function (item) {\n this.$items = item.parent().children('.item')\n return this.$items.index(item || this.$active)\n }\n\n Carousel.prototype.getItemForDirection = function (direction, active) {\n var activeIndex = this.getItemIndex(active)\n var willWrap = (direction == 'prev' && activeIndex === 0)\n || (direction == 'next' && activeIndex == (this.$items.length - 1))\n if (willWrap && !this.options.wrap) return active\n var delta = direction == 'prev' ? -1 : 1\n var itemIndex = (activeIndex + delta) % this.$items.length\n return this.$items.eq(itemIndex)\n }\n\n Carousel.prototype.to = function (pos) {\n var that = this\n var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))\n\n if (pos > (this.$items.length - 1) || pos < 0) return\n\n if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, \"slid\"\n if (activeIndex == pos) return this.pause().cycle()\n\n return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))\n }\n\n Carousel.prototype.pause = function (e) {\n e || (this.paused = true)\n\n if (this.$element.find('.next, .prev').length && $.support.transition) {\n this.$element.trigger($.support.transition.end)\n this.cycle(true)\n }\n\n this.interval = clearInterval(this.interval)\n\n return this\n }\n\n Carousel.prototype.next = function () {\n if (this.sliding) return\n return this.slide('next')\n }\n\n Carousel.prototype.prev = function () {\n if (this.sliding) return\n return this.slide('prev')\n }\n\n Carousel.prototype.slide = function (type, next) {\n var $active = this.$element.find('.item.active')\n var $next = next || this.getItemForDirection(type, $active)\n var isCycling = this.interval\n var direction = type == 'next' ? 'left' : 'right'\n var that = this\n\n if ($next.hasClass('active')) return (this.sliding = false)\n\n var relatedTarget = $next[0]\n var slideEvent = $.Event('slide.bs.carousel', {\n relatedTarget: relatedTarget,\n direction: direction\n })\n this.$element.trigger(slideEvent)\n if (slideEvent.isDefaultPrevented()) return\n\n this.sliding = true\n\n isCycling && this.pause()\n\n if (this.$indicators.length) {\n this.$indicators.find('.active').removeClass('active')\n var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])\n $nextIndicator && $nextIndicator.addClass('active')\n }\n\n var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, \"slid\"\n if ($.support.transition && this.$element.hasClass('slide')) {\n $next.addClass(type)\n $next[0].offsetWidth // force reflow\n $active.addClass(direction)\n $next.addClass(direction)\n $active\n .one('bsTransitionEnd', function () {\n $next.removeClass([type, direction].join(' ')).addClass('active')\n $active.removeClass(['active', direction].join(' '))\n that.sliding = false\n setTimeout(function () {\n that.$element.trigger(slidEvent)\n }, 0)\n })\n .emulateTransitionEnd(Carousel.TRANSITION_DURATION)\n } else {\n $active.removeClass('active')\n $next.addClass('active')\n this.sliding = false\n this.$element.trigger(slidEvent)\n }\n\n isCycling && this.cycle()\n\n return this\n }\n\n\n // CAROUSEL PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.carousel')\n var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)\n var action = typeof option == 'string' ? option : options.slide\n\n if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))\n if (typeof option == 'number') data.to(option)\n else if (action) data[action]()\n else if (options.interval) data.pause().cycle()\n })\n }\n\n var old = $.fn.carousel\n\n $.fn.carousel = Plugin\n $.fn.carousel.Constructor = Carousel\n\n\n // CAROUSEL NO CONFLICT\n // ====================\n\n $.fn.carousel.noConflict = function () {\n $.fn.carousel = old\n return this\n }\n\n\n // CAROUSEL DATA-API\n // =================\n\n var clickHandler = function (e) {\n var href\n var $this = $(this)\n var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '')) // strip for ie7\n if (!$target.hasClass('carousel')) return\n var options = $.extend({}, $target.data(), $this.data())\n var slideIndex = $this.attr('data-slide-to')\n if (slideIndex) options.interval = false\n\n Plugin.call($target, options)\n\n if (slideIndex) {\n $target.data('bs.carousel').to(slideIndex)\n }\n\n e.preventDefault()\n }\n\n $(document)\n .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)\n .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)\n\n $(window).on('load', function () {\n $('[data-ride=\"carousel\"]').each(function () {\n var $carousel = $(this)\n Plugin.call($carousel, $carousel.data())\n })\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: collapse.js v3.3.4\n * http://getbootstrap.com/javascript/#collapse\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // COLLAPSE PUBLIC CLASS DEFINITION\n // ================================\n\n var Collapse = function (element, options) {\n this.$element = $(element)\n this.options = $.extend({}, Collapse.DEFAULTS, options)\n this.$trigger = $('[data-toggle=\"collapse\"][href=\"#' + element.id + '\"],' +\n '[data-toggle=\"collapse\"][data-target=\"#' + element.id + '\"]')\n this.transitioning = null\n\n if (this.options.parent) {\n this.$parent = this.getParent()\n } else {\n this.addAriaAndCollapsedClass(this.$element, this.$trigger)\n }\n\n if (this.options.toggle) this.toggle()\n }\n\n Collapse.VERSION = '3.3.4'\n\n Collapse.TRANSITION_DURATION = 350\n\n Collapse.DEFAULTS = {\n toggle: true\n }\n\n Collapse.prototype.dimension = function () {\n var hasWidth = this.$element.hasClass('width')\n return hasWidth ? 'width' : 'height'\n }\n\n Collapse.prototype.show = function () {\n if (this.transitioning || this.$element.hasClass('in')) return\n\n var activesData\n var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')\n\n if (actives && actives.length) {\n activesData = actives.data('bs.collapse')\n if (activesData && activesData.transitioning) return\n }\n\n var startEvent = $.Event('show.bs.collapse')\n this.$element.trigger(startEvent)\n if (startEvent.isDefaultPrevented()) return\n\n if (actives && actives.length) {\n Plugin.call(actives, 'hide')\n activesData || actives.data('bs.collapse', null)\n }\n\n var dimension = this.dimension()\n\n this.$element\n .removeClass('collapse')\n .addClass('collapsing')[dimension](0)\n .attr('aria-expanded', true)\n\n this.$trigger\n .removeClass('collapsed')\n .attr('aria-expanded', true)\n\n this.transitioning = 1\n\n var complete = function () {\n this.$element\n .removeClass('collapsing')\n .addClass('collapse in')[dimension]('')\n this.transitioning = 0\n this.$element\n .trigger('shown.bs.collapse')\n }\n\n if (!$.support.transition) return complete.call(this)\n\n var scrollSize = $.camelCase(['scroll', dimension].join('-'))\n\n this.$element\n .one('bsTransitionEnd', $.proxy(complete, this))\n .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])\n }\n\n Collapse.prototype.hide = function () {\n if (this.transitioning || !this.$element.hasClass('in')) return\n\n var startEvent = $.Event('hide.bs.collapse')\n this.$element.trigger(startEvent)\n if (startEvent.isDefaultPrevented()) return\n\n var dimension = this.dimension()\n\n this.$element[dimension](this.$element[dimension]())[0].offsetHeight\n\n this.$element\n .addClass('collapsing')\n .removeClass('collapse in')\n .attr('aria-expanded', false)\n\n this.$trigger\n .addClass('collapsed')\n .attr('aria-expanded', false)\n\n this.transitioning = 1\n\n var complete = function () {\n this.transitioning = 0\n this.$element\n .removeClass('collapsing')\n .addClass('collapse')\n .trigger('hidden.bs.collapse')\n }\n\n if (!$.support.transition) return complete.call(this)\n\n this.$element\n [dimension](0)\n .one('bsTransitionEnd', $.proxy(complete, this))\n .emulateTransitionEnd(Collapse.TRANSITION_DURATION)\n }\n\n Collapse.prototype.toggle = function () {\n this[this.$element.hasClass('in') ? 'hide' : 'show']()\n }\n\n Collapse.prototype.getParent = function () {\n return $(this.options.parent)\n .find('[data-toggle=\"collapse\"][data-parent=\"' + this.options.parent + '\"]')\n .each($.proxy(function (i, element) {\n var $element = $(element)\n this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)\n }, this))\n .end()\n }\n\n Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {\n var isOpen = $element.hasClass('in')\n\n $element.attr('aria-expanded', isOpen)\n $trigger\n .toggleClass('collapsed', !isOpen)\n .attr('aria-expanded', isOpen)\n }\n\n function getTargetFromTrigger($trigger) {\n var href\n var target = $trigger.attr('data-target')\n || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\\s]+$)/, '') // strip for ie7\n\n return $(target)\n }\n\n\n // COLLAPSE PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.collapse')\n var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false\n if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.collapse\n\n $.fn.collapse = Plugin\n $.fn.collapse.Constructor = Collapse\n\n\n // COLLAPSE NO CONFLICT\n // ====================\n\n $.fn.collapse.noConflict = function () {\n $.fn.collapse = old\n return this\n }\n\n\n // COLLAPSE DATA-API\n // =================\n\n $(document).on('click.bs.collapse.data-api', '[data-toggle=\"collapse\"]', function (e) {\n var $this = $(this)\n\n if (!$this.attr('data-target')) e.preventDefault()\n\n var $target = getTargetFromTrigger($this)\n var data = $target.data('bs.collapse')\n var option = data ? 'toggle' : $this.data()\n\n Plugin.call($target, option)\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: dropdown.js v3.3.4\n * http://getbootstrap.com/javascript/#dropdowns\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // DROPDOWN CLASS DEFINITION\n // =========================\n\n var backdrop = '.dropdown-backdrop'\n var toggle = '[data-toggle=\"dropdown\"]'\n var Dropdown = function (element) {\n $(element).on('click.bs.dropdown', this.toggle)\n }\n\n Dropdown.VERSION = '3.3.4'\n\n Dropdown.prototype.toggle = function (e) {\n var $this = $(this)\n\n if ($this.is('.disabled, :disabled')) return\n\n var $parent = getParent($this)\n var isActive = $parent.hasClass('open')\n\n clearMenus()\n\n if (!isActive) {\n if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {\n // if mobile we use a backdrop because click events don't delegate\n $('
').insertAfter($(this)).on('click', clearMenus)\n }\n\n var relatedTarget = { relatedTarget: this }\n $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))\n\n if (e.isDefaultPrevented()) return\n\n $this\n .trigger('focus')\n .attr('aria-expanded', 'true')\n\n $parent\n .toggleClass('open')\n .trigger('shown.bs.dropdown', relatedTarget)\n }\n\n return false\n }\n\n Dropdown.prototype.keydown = function (e) {\n if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return\n\n var $this = $(this)\n\n e.preventDefault()\n e.stopPropagation()\n\n if ($this.is('.disabled, :disabled')) return\n\n var $parent = getParent($this)\n var isActive = $parent.hasClass('open')\n\n if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {\n if (e.which == 27) $parent.find(toggle).trigger('focus')\n return $this.trigger('click')\n }\n\n var desc = ' li:not(.disabled):visible a'\n var $items = $parent.find('[role=\"menu\"]' + desc + ', [role=\"listbox\"]' + desc)\n\n if (!$items.length) return\n\n var index = $items.index(e.target)\n\n if (e.which == 38 && index > 0) index-- // up\n if (e.which == 40 && index < $items.length - 1) index++ // down\n if (!~index) index = 0\n\n $items.eq(index).trigger('focus')\n }\n\n function clearMenus(e) {\n if (e && e.which === 3) return\n $(backdrop).remove()\n $(toggle).each(function () {\n var $this = $(this)\n var $parent = getParent($this)\n var relatedTarget = { relatedTarget: this }\n\n if (!$parent.hasClass('open')) return\n\n $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))\n\n if (e.isDefaultPrevented()) return\n\n $this.attr('aria-expanded', 'false')\n $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)\n })\n }\n\n function getParent($this) {\n var selector = $this.attr('data-target')\n\n if (!selector) {\n selector = $this.attr('href')\n selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n }\n\n var $parent = selector && $(selector)\n\n return $parent && $parent.length ? $parent : $this.parent()\n }\n\n\n // DROPDOWN PLUGIN DEFINITION\n // ==========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.dropdown')\n\n if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))\n if (typeof option == 'string') data[option].call($this)\n })\n }\n\n var old = $.fn.dropdown\n\n $.fn.dropdown = Plugin\n $.fn.dropdown.Constructor = Dropdown\n\n\n // DROPDOWN NO CONFLICT\n // ====================\n\n $.fn.dropdown.noConflict = function () {\n $.fn.dropdown = old\n return this\n }\n\n\n // APPLY TO STANDARD DROPDOWN ELEMENTS\n // ===================================\n\n $(document)\n .on('click.bs.dropdown.data-api', clearMenus)\n .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })\n .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)\n .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)\n .on('keydown.bs.dropdown.data-api', '[role=\"menu\"]', Dropdown.prototype.keydown)\n .on('keydown.bs.dropdown.data-api', '[role=\"listbox\"]', Dropdown.prototype.keydown)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: modal.js v3.3.4\n * http://getbootstrap.com/javascript/#modals\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // MODAL CLASS DEFINITION\n // ======================\n\n var Modal = function (element, options) {\n this.options = options\n this.$body = $(document.body)\n this.$element = $(element)\n this.$dialog = this.$element.find('.modal-dialog')\n this.$backdrop = null\n this.isShown = null\n this.originalBodyPad = null\n this.scrollbarWidth = 0\n this.ignoreBackdropClick = false\n\n if (this.options.remote) {\n this.$element\n .find('.modal-content')\n .load(this.options.remote, $.proxy(function () {\n this.$element.trigger('loaded.bs.modal')\n }, this))\n }\n }\n\n Modal.VERSION = '3.3.4'\n\n Modal.TRANSITION_DURATION = 300\n Modal.BACKDROP_TRANSITION_DURATION = 150\n\n Modal.DEFAULTS = {\n backdrop: true,\n keyboard: true,\n show: true\n }\n\n Modal.prototype.toggle = function (_relatedTarget) {\n return this.isShown ? this.hide() : this.show(_relatedTarget)\n }\n\n Modal.prototype.show = function (_relatedTarget) {\n var that = this\n var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })\n\n this.$element.trigger(e)\n\n if (this.isShown || e.isDefaultPrevented()) return\n\n this.isShown = true\n\n this.checkScrollbar()\n this.setScrollbar()\n this.$body.addClass('modal-open')\n\n this.escape()\n this.resize()\n\n this.$element.on('click.dismiss.bs.modal', '[data-dismiss=\"modal\"]', $.proxy(this.hide, this))\n\n this.$dialog.on('mousedown.dismiss.bs.modal', function () {\n that.$element.one('mouseup.dismiss.bs.modal', function (e) {\n if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true\n })\n })\n\n this.backdrop(function () {\n var transition = $.support.transition && that.$element.hasClass('fade')\n\n if (!that.$element.parent().length) {\n that.$element.appendTo(that.$body) // don't move modals dom position\n }\n\n that.$element\n .show()\n .scrollTop(0)\n\n that.adjustDialog()\n\n if (transition) {\n that.$element[0].offsetWidth // force reflow\n }\n\n that.$element\n .addClass('in')\n .attr('aria-hidden', false)\n\n that.enforceFocus()\n\n var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })\n\n transition ?\n that.$dialog // wait for modal to slide in\n .one('bsTransitionEnd', function () {\n that.$element.trigger('focus').trigger(e)\n })\n .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n that.$element.trigger('focus').trigger(e)\n })\n }\n\n Modal.prototype.hide = function (e) {\n if (e) e.preventDefault()\n\n e = $.Event('hide.bs.modal')\n\n this.$element.trigger(e)\n\n if (!this.isShown || e.isDefaultPrevented()) return\n\n this.isShown = false\n\n this.escape()\n this.resize()\n\n $(document).off('focusin.bs.modal')\n\n this.$element\n .removeClass('in')\n .attr('aria-hidden', true)\n .off('click.dismiss.bs.modal')\n .off('mouseup.dismiss.bs.modal')\n\n this.$dialog.off('mousedown.dismiss.bs.modal')\n\n $.support.transition && this.$element.hasClass('fade') ?\n this.$element\n .one('bsTransitionEnd', $.proxy(this.hideModal, this))\n .emulateTransitionEnd(Modal.TRANSITION_DURATION) :\n this.hideModal()\n }\n\n Modal.prototype.enforceFocus = function () {\n $(document)\n .off('focusin.bs.modal') // guard against infinite focus loop\n .on('focusin.bs.modal', $.proxy(function (e) {\n if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {\n this.$element.trigger('focus')\n }\n }, this))\n }\n\n Modal.prototype.escape = function () {\n if (this.isShown && this.options.keyboard) {\n this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {\n e.which == 27 && this.hide()\n }, this))\n } else if (!this.isShown) {\n this.$element.off('keydown.dismiss.bs.modal')\n }\n }\n\n Modal.prototype.resize = function () {\n if (this.isShown) {\n $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))\n } else {\n $(window).off('resize.bs.modal')\n }\n }\n\n Modal.prototype.hideModal = function () {\n var that = this\n this.$element.hide()\n this.backdrop(function () {\n that.$body.removeClass('modal-open')\n that.resetAdjustments()\n that.resetScrollbar()\n that.$element.trigger('hidden.bs.modal')\n })\n }\n\n Modal.prototype.removeBackdrop = function () {\n this.$backdrop && this.$backdrop.remove()\n this.$backdrop = null\n }\n\n Modal.prototype.backdrop = function (callback) {\n var that = this\n var animate = this.$element.hasClass('fade') ? 'fade' : ''\n\n if (this.isShown && this.options.backdrop) {\n var doAnimate = $.support.transition && animate\n\n this.$backdrop = $('
')\n .appendTo(this.$body)\n\n this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {\n if (this.ignoreBackdropClick) {\n this.ignoreBackdropClick = false\n return\n }\n if (e.target !== e.currentTarget) return\n this.options.backdrop == 'static'\n ? this.$element[0].focus()\n : this.hide()\n }, this))\n\n if (doAnimate) this.$backdrop[0].offsetWidth // force reflow\n\n this.$backdrop.addClass('in')\n\n if (!callback) return\n\n doAnimate ?\n this.$backdrop\n .one('bsTransitionEnd', callback)\n .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n callback()\n\n } else if (!this.isShown && this.$backdrop) {\n this.$backdrop.removeClass('in')\n\n var callbackRemove = function () {\n that.removeBackdrop()\n callback && callback()\n }\n $.support.transition && this.$element.hasClass('fade') ?\n this.$backdrop\n .one('bsTransitionEnd', callbackRemove)\n .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :\n callbackRemove()\n\n } else if (callback) {\n callback()\n }\n }\n\n // these following methods are used to handle overflowing modals\n\n Modal.prototype.handleUpdate = function () {\n this.adjustDialog()\n }\n\n Modal.prototype.adjustDialog = function () {\n var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight\n\n this.$element.css({\n paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',\n paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''\n })\n }\n\n Modal.prototype.resetAdjustments = function () {\n this.$element.css({\n paddingLeft: '',\n paddingRight: ''\n })\n }\n\n Modal.prototype.checkScrollbar = function () {\n var fullWindowWidth = window.innerWidth\n if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8\n var documentElementRect = document.documentElement.getBoundingClientRect()\n fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)\n }\n this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth\n this.scrollbarWidth = this.measureScrollbar()\n }\n\n Modal.prototype.setScrollbar = function () {\n var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)\n this.originalBodyPad = document.body.style.paddingRight || ''\n if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)\n }\n\n Modal.prototype.resetScrollbar = function () {\n this.$body.css('padding-right', this.originalBodyPad)\n }\n\n Modal.prototype.measureScrollbar = function () { // thx walsh\n var scrollDiv = document.createElement('div')\n scrollDiv.className = 'modal-scrollbar-measure'\n this.$body.append(scrollDiv)\n var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth\n this.$body[0].removeChild(scrollDiv)\n return scrollbarWidth\n }\n\n\n // MODAL PLUGIN DEFINITION\n // =======================\n\n function Plugin(option, _relatedTarget) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.modal')\n var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)\n\n if (!data) $this.data('bs.modal', (data = new Modal(this, options)))\n if (typeof option == 'string') data[option](_relatedTarget)\n else if (options.show) data.show(_relatedTarget)\n })\n }\n\n var old = $.fn.modal\n\n $.fn.modal = Plugin\n $.fn.modal.Constructor = Modal\n\n\n // MODAL NO CONFLICT\n // =================\n\n $.fn.modal.noConflict = function () {\n $.fn.modal = old\n return this\n }\n\n\n // MODAL DATA-API\n // ==============\n\n $(document).on('click.bs.modal.data-api', '[data-toggle=\"modal\"]', function (e) {\n var $this = $(this)\n var href = $this.attr('href')\n var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\\s]+$)/, ''))) // strip for ie7\n var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())\n\n if ($this.is('a')) e.preventDefault()\n\n $target.one('show.bs.modal', function (showEvent) {\n if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown\n $target.one('hidden.bs.modal', function () {\n $this.is(':visible') && $this.trigger('focus')\n })\n })\n Plugin.call($target, option, this)\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: tooltip.js v3.3.4\n * http://getbootstrap.com/javascript/#tooltip\n * Inspired by the original jQuery.tipsy by Jason Frame\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // TOOLTIP PUBLIC CLASS DEFINITION\n // ===============================\n\n var Tooltip = function (element, options) {\n this.type = null\n this.options = null\n this.enabled = null\n this.timeout = null\n this.hoverState = null\n this.$element = null\n\n this.init('tooltip', element, options)\n }\n\n Tooltip.VERSION = '3.3.4'\n\n Tooltip.TRANSITION_DURATION = 150\n\n Tooltip.DEFAULTS = {\n animation: true,\n placement: 'top',\n selector: false,\n template: '
',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n container: false,\n viewport: {\n selector: 'body',\n padding: 0\n }\n }\n\n Tooltip.prototype.init = function (type, element, options) {\n this.enabled = true\n this.type = type\n this.$element = $(element)\n this.options = this.getOptions(options)\n this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)\n\n if (this.$element[0] instanceof document.constructor && !this.options.selector) {\n throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')\n }\n\n var triggers = this.options.trigger.split(' ')\n\n for (var i = triggers.length; i--;) {\n var trigger = triggers[i]\n\n if (trigger == 'click') {\n this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))\n } else if (trigger != 'manual') {\n var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'\n var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'\n\n this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))\n this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))\n }\n }\n\n this.options.selector ?\n (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :\n this.fixTitle()\n }\n\n Tooltip.prototype.getDefaults = function () {\n return Tooltip.DEFAULTS\n }\n\n Tooltip.prototype.getOptions = function (options) {\n options = $.extend({}, this.getDefaults(), this.$element.data(), options)\n\n if (options.delay && typeof options.delay == 'number') {\n options.delay = {\n show: options.delay,\n hide: options.delay\n }\n }\n\n return options\n }\n\n Tooltip.prototype.getDelegateOptions = function () {\n var options = {}\n var defaults = this.getDefaults()\n\n this._options && $.each(this._options, function (key, value) {\n if (defaults[key] != value) options[key] = value\n })\n\n return options\n }\n\n Tooltip.prototype.enter = function (obj) {\n var self = obj instanceof this.constructor ?\n obj : $(obj.currentTarget).data('bs.' + this.type)\n\n if (self && self.$tip && self.$tip.is(':visible')) {\n self.hoverState = 'in'\n return\n }\n\n if (!self) {\n self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n $(obj.currentTarget).data('bs.' + this.type, self)\n }\n\n clearTimeout(self.timeout)\n\n self.hoverState = 'in'\n\n if (!self.options.delay || !self.options.delay.show) return self.show()\n\n self.timeout = setTimeout(function () {\n if (self.hoverState == 'in') self.show()\n }, self.options.delay.show)\n }\n\n Tooltip.prototype.leave = function (obj) {\n var self = obj instanceof this.constructor ?\n obj : $(obj.currentTarget).data('bs.' + this.type)\n\n if (!self) {\n self = new this.constructor(obj.currentTarget, this.getDelegateOptions())\n $(obj.currentTarget).data('bs.' + this.type, self)\n }\n\n clearTimeout(self.timeout)\n\n self.hoverState = 'out'\n\n if (!self.options.delay || !self.options.delay.hide) return self.hide()\n\n self.timeout = setTimeout(function () {\n if (self.hoverState == 'out') self.hide()\n }, self.options.delay.hide)\n }\n\n Tooltip.prototype.show = function () {\n var e = $.Event('show.bs.' + this.type)\n\n if (this.hasContent() && this.enabled) {\n this.$element.trigger(e)\n\n var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])\n if (e.isDefaultPrevented() || !inDom) return\n var that = this\n\n var $tip = this.tip()\n\n var tipId = this.getUID(this.type)\n\n this.setContent()\n $tip.attr('id', tipId)\n this.$element.attr('aria-describedby', tipId)\n\n if (this.options.animation) $tip.addClass('fade')\n\n var placement = typeof this.options.placement == 'function' ?\n this.options.placement.call(this, $tip[0], this.$element[0]) :\n this.options.placement\n\n var autoToken = /\\s?auto?\\s?/i\n var autoPlace = autoToken.test(placement)\n if (autoPlace) placement = placement.replace(autoToken, '') || 'top'\n\n $tip\n .detach()\n .css({ top: 0, left: 0, display: 'block' })\n .addClass(placement)\n .data('bs.' + this.type, this)\n\n this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)\n\n var pos = this.getPosition()\n var actualWidth = $tip[0].offsetWidth\n var actualHeight = $tip[0].offsetHeight\n\n if (autoPlace) {\n var orgPlacement = placement\n var $container = this.options.container ? $(this.options.container) : this.$element.parent()\n var containerDim = this.getPosition($container)\n\n placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :\n placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :\n placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :\n placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :\n placement\n\n $tip\n .removeClass(orgPlacement)\n .addClass(placement)\n }\n\n var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)\n\n this.applyPlacement(calculatedOffset, placement)\n\n var complete = function () {\n var prevHoverState = that.hoverState\n that.$element.trigger('shown.bs.' + that.type)\n that.hoverState = null\n\n if (prevHoverState == 'out') that.leave(that)\n }\n\n $.support.transition && this.$tip.hasClass('fade') ?\n $tip\n .one('bsTransitionEnd', complete)\n .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n complete()\n }\n }\n\n Tooltip.prototype.applyPlacement = function (offset, placement) {\n var $tip = this.tip()\n var width = $tip[0].offsetWidth\n var height = $tip[0].offsetHeight\n\n // manually read margins because getBoundingClientRect includes difference\n var marginTop = parseInt($tip.css('margin-top'), 10)\n var marginLeft = parseInt($tip.css('margin-left'), 10)\n\n // we must check for NaN for ie 8/9\n if (isNaN(marginTop)) marginTop = 0\n if (isNaN(marginLeft)) marginLeft = 0\n\n offset.top = offset.top + marginTop\n offset.left = offset.left + marginLeft\n\n // $.fn.offset doesn't round pixel values\n // so we use setOffset directly with our own function B-0\n $.offset.setOffset($tip[0], $.extend({\n using: function (props) {\n $tip.css({\n top: Math.round(props.top),\n left: Math.round(props.left)\n })\n }\n }, offset), 0)\n\n $tip.addClass('in')\n\n // check to see if placing tip in new offset caused the tip to resize itself\n var actualWidth = $tip[0].offsetWidth\n var actualHeight = $tip[0].offsetHeight\n\n if (placement == 'top' && actualHeight != height) {\n offset.top = offset.top + height - actualHeight\n }\n\n var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)\n\n if (delta.left) offset.left += delta.left\n else offset.top += delta.top\n\n var isVertical = /top|bottom/.test(placement)\n var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight\n var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'\n\n $tip.offset(offset)\n this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)\n }\n\n Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {\n this.arrow()\n .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')\n .css(isVertical ? 'top' : 'left', '')\n }\n\n Tooltip.prototype.setContent = function () {\n var $tip = this.tip()\n var title = this.getTitle()\n\n $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)\n $tip.removeClass('fade in top bottom left right')\n }\n\n Tooltip.prototype.hide = function (callback) {\n var that = this\n var $tip = $(this.$tip)\n var e = $.Event('hide.bs.' + this.type)\n\n function complete() {\n if (that.hoverState != 'in') $tip.detach()\n that.$element\n .removeAttr('aria-describedby')\n .trigger('hidden.bs.' + that.type)\n callback && callback()\n }\n\n this.$element.trigger(e)\n\n if (e.isDefaultPrevented()) return\n\n $tip.removeClass('in')\n\n $.support.transition && $tip.hasClass('fade') ?\n $tip\n .one('bsTransitionEnd', complete)\n .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :\n complete()\n\n this.hoverState = null\n\n return this\n }\n\n Tooltip.prototype.fixTitle = function () {\n var $e = this.$element\n if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {\n $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')\n }\n }\n\n Tooltip.prototype.hasContent = function () {\n return this.getTitle()\n }\n\n Tooltip.prototype.getPosition = function ($element) {\n $element = $element || this.$element\n\n var el = $element[0]\n var isBody = el.tagName == 'BODY'\n\n var elRect = el.getBoundingClientRect()\n if (elRect.width == null) {\n // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093\n elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })\n }\n var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()\n var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }\n var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null\n\n return $.extend({}, elRect, scroll, outerDims, elOffset)\n }\n\n Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {\n return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :\n placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :\n /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }\n\n }\n\n Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {\n var delta = { top: 0, left: 0 }\n if (!this.$viewport) return delta\n\n var viewportPadding = this.options.viewport && this.options.viewport.padding || 0\n var viewportDimensions = this.getPosition(this.$viewport)\n\n if (/right|left/.test(placement)) {\n var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll\n var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight\n if (topEdgeOffset < viewportDimensions.top) { // top overflow\n delta.top = viewportDimensions.top - topEdgeOffset\n } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow\n delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset\n }\n } else {\n var leftEdgeOffset = pos.left - viewportPadding\n var rightEdgeOffset = pos.left + viewportPadding + actualWidth\n if (leftEdgeOffset < viewportDimensions.left) { // left overflow\n delta.left = viewportDimensions.left - leftEdgeOffset\n } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow\n delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset\n }\n }\n\n return delta\n }\n\n Tooltip.prototype.getTitle = function () {\n var title\n var $e = this.$element\n var o = this.options\n\n title = $e.attr('data-original-title')\n || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)\n\n return title\n }\n\n Tooltip.prototype.getUID = function (prefix) {\n do prefix += ~~(Math.random() * 1000000)\n while (document.getElementById(prefix))\n return prefix\n }\n\n Tooltip.prototype.tip = function () {\n return (this.$tip = this.$tip || $(this.options.template))\n }\n\n Tooltip.prototype.arrow = function () {\n return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))\n }\n\n Tooltip.prototype.enable = function () {\n this.enabled = true\n }\n\n Tooltip.prototype.disable = function () {\n this.enabled = false\n }\n\n Tooltip.prototype.toggleEnabled = function () {\n this.enabled = !this.enabled\n }\n\n Tooltip.prototype.toggle = function (e) {\n var self = this\n if (e) {\n self = $(e.currentTarget).data('bs.' + this.type)\n if (!self) {\n self = new this.constructor(e.currentTarget, this.getDelegateOptions())\n $(e.currentTarget).data('bs.' + this.type, self)\n }\n }\n\n self.tip().hasClass('in') ? self.leave(self) : self.enter(self)\n }\n\n Tooltip.prototype.destroy = function () {\n var that = this\n clearTimeout(this.timeout)\n this.hide(function () {\n that.$element.off('.' + that.type).removeData('bs.' + that.type)\n })\n }\n\n\n // TOOLTIP PLUGIN DEFINITION\n // =========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tooltip')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.tooltip\n\n $.fn.tooltip = Plugin\n $.fn.tooltip.Constructor = Tooltip\n\n\n // TOOLTIP NO CONFLICT\n // ===================\n\n $.fn.tooltip.noConflict = function () {\n $.fn.tooltip = old\n return this\n }\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: popover.js v3.3.4\n * http://getbootstrap.com/javascript/#popovers\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // POPOVER PUBLIC CLASS DEFINITION\n // ===============================\n\n var Popover = function (element, options) {\n this.init('popover', element, options)\n }\n\n if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')\n\n Popover.VERSION = '3.3.4'\n\n Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {\n placement: 'right',\n trigger: 'click',\n content: '',\n template: '
'\n })\n\n\n // NOTE: POPOVER EXTENDS tooltip.js\n // ================================\n\n Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)\n\n Popover.prototype.constructor = Popover\n\n Popover.prototype.getDefaults = function () {\n return Popover.DEFAULTS\n }\n\n Popover.prototype.setContent = function () {\n var $tip = this.tip()\n var title = this.getTitle()\n var content = this.getContent()\n\n $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)\n $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events\n this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'\n ](content)\n\n $tip.removeClass('fade top bottom left right in')\n\n // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do\n // this manually by checking the contents.\n if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()\n }\n\n Popover.prototype.hasContent = function () {\n return this.getTitle() || this.getContent()\n }\n\n Popover.prototype.getContent = function () {\n var $e = this.$element\n var o = this.options\n\n return $e.attr('data-content')\n || (typeof o.content == 'function' ?\n o.content.call($e[0]) :\n o.content)\n }\n\n Popover.prototype.arrow = function () {\n return (this.$arrow = this.$arrow || this.tip().find('.arrow'))\n }\n\n\n // POPOVER PLUGIN DEFINITION\n // =========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.popover')\n var options = typeof option == 'object' && option\n\n if (!data && /destroy|hide/.test(option)) return\n if (!data) $this.data('bs.popover', (data = new Popover(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.popover\n\n $.fn.popover = Plugin\n $.fn.popover.Constructor = Popover\n\n\n // POPOVER NO CONFLICT\n // ===================\n\n $.fn.popover.noConflict = function () {\n $.fn.popover = old\n return this\n }\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: scrollspy.js v3.3.4\n * http://getbootstrap.com/javascript/#scrollspy\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // SCROLLSPY CLASS DEFINITION\n // ==========================\n\n function ScrollSpy(element, options) {\n this.$body = $(document.body)\n this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)\n this.options = $.extend({}, ScrollSpy.DEFAULTS, options)\n this.selector = (this.options.target || '') + ' .nav li > a'\n this.offsets = []\n this.targets = []\n this.activeTarget = null\n this.scrollHeight = 0\n\n this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))\n this.refresh()\n this.process()\n }\n\n ScrollSpy.VERSION = '3.3.4'\n\n ScrollSpy.DEFAULTS = {\n offset: 10\n }\n\n ScrollSpy.prototype.getScrollHeight = function () {\n return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)\n }\n\n ScrollSpy.prototype.refresh = function () {\n var that = this\n var offsetMethod = 'offset'\n var offsetBase = 0\n\n this.offsets = []\n this.targets = []\n this.scrollHeight = this.getScrollHeight()\n\n if (!$.isWindow(this.$scrollElement[0])) {\n offsetMethod = 'position'\n offsetBase = this.$scrollElement.scrollTop()\n }\n\n this.$body\n .find(this.selector)\n .map(function () {\n var $el = $(this)\n var href = $el.data('target') || $el.attr('href')\n var $href = /^#./.test(href) && $(href)\n\n return ($href\n && $href.length\n && $href.is(':visible')\n && [[$href[offsetMethod]().top + offsetBase, href]]) || null\n })\n .sort(function (a, b) { return a[0] - b[0] })\n .each(function () {\n that.offsets.push(this[0])\n that.targets.push(this[1])\n })\n }\n\n ScrollSpy.prototype.process = function () {\n var scrollTop = this.$scrollElement.scrollTop() + this.options.offset\n var scrollHeight = this.getScrollHeight()\n var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()\n var offsets = this.offsets\n var targets = this.targets\n var activeTarget = this.activeTarget\n var i\n\n if (this.scrollHeight != scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)\n }\n\n if (activeTarget && scrollTop < offsets[0]) {\n this.activeTarget = null\n return this.clear()\n }\n\n for (i = offsets.length; i--;) {\n activeTarget != targets[i]\n && scrollTop >= offsets[i]\n && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])\n && this.activate(targets[i])\n }\n }\n\n ScrollSpy.prototype.activate = function (target) {\n this.activeTarget = target\n\n this.clear()\n\n var selector = this.selector +\n '[data-target=\"' + target + '\"],' +\n this.selector + '[href=\"' + target + '\"]'\n\n var active = $(selector)\n .parents('li')\n .addClass('active')\n\n if (active.parent('.dropdown-menu').length) {\n active = active\n .closest('li.dropdown')\n .addClass('active')\n }\n\n active.trigger('activate.bs.scrollspy')\n }\n\n ScrollSpy.prototype.clear = function () {\n $(this.selector)\n .parentsUntil(this.options.target, '.active')\n .removeClass('active')\n }\n\n\n // SCROLLSPY PLUGIN DEFINITION\n // ===========================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.scrollspy')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.scrollspy\n\n $.fn.scrollspy = Plugin\n $.fn.scrollspy.Constructor = ScrollSpy\n\n\n // SCROLLSPY NO CONFLICT\n // =====================\n\n $.fn.scrollspy.noConflict = function () {\n $.fn.scrollspy = old\n return this\n }\n\n\n // SCROLLSPY DATA-API\n // ==================\n\n $(window).on('load.bs.scrollspy.data-api', function () {\n $('[data-spy=\"scroll\"]').each(function () {\n var $spy = $(this)\n Plugin.call($spy, $spy.data())\n })\n })\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: tab.js v3.3.4\n * http://getbootstrap.com/javascript/#tabs\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // TAB CLASS DEFINITION\n // ====================\n\n var Tab = function (element) {\n this.element = $(element)\n }\n\n Tab.VERSION = '3.3.4'\n\n Tab.TRANSITION_DURATION = 150\n\n Tab.prototype.show = function () {\n var $this = this.element\n var $ul = $this.closest('ul:not(.dropdown-menu)')\n var selector = $this.data('target')\n\n if (!selector) {\n selector = $this.attr('href')\n selector = selector && selector.replace(/.*(?=#[^\\s]*$)/, '') // strip for ie7\n }\n\n if ($this.parent('li').hasClass('active')) return\n\n var $previous = $ul.find('.active:last a')\n var hideEvent = $.Event('hide.bs.tab', {\n relatedTarget: $this[0]\n })\n var showEvent = $.Event('show.bs.tab', {\n relatedTarget: $previous[0]\n })\n\n $previous.trigger(hideEvent)\n $this.trigger(showEvent)\n\n if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return\n\n var $target = $(selector)\n\n this.activate($this.closest('li'), $ul)\n this.activate($target, $target.parent(), function () {\n $previous.trigger({\n type: 'hidden.bs.tab',\n relatedTarget: $this[0]\n })\n $this.trigger({\n type: 'shown.bs.tab',\n relatedTarget: $previous[0]\n })\n })\n }\n\n Tab.prototype.activate = function (element, container, callback) {\n var $active = container.find('> .active')\n var transition = callback\n && $.support.transition\n && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)\n\n function next() {\n $active\n .removeClass('active')\n .find('> .dropdown-menu > .active')\n .removeClass('active')\n .end()\n .find('[data-toggle=\"tab\"]')\n .attr('aria-expanded', false)\n\n element\n .addClass('active')\n .find('[data-toggle=\"tab\"]')\n .attr('aria-expanded', true)\n\n if (transition) {\n element[0].offsetWidth // reflow for transition\n element.addClass('in')\n } else {\n element.removeClass('fade')\n }\n\n if (element.parent('.dropdown-menu').length) {\n element\n .closest('li.dropdown')\n .addClass('active')\n .end()\n .find('[data-toggle=\"tab\"]')\n .attr('aria-expanded', true)\n }\n\n callback && callback()\n }\n\n $active.length && transition ?\n $active\n .one('bsTransitionEnd', next)\n .emulateTransitionEnd(Tab.TRANSITION_DURATION) :\n next()\n\n $active.removeClass('in')\n }\n\n\n // TAB PLUGIN DEFINITION\n // =====================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.tab')\n\n if (!data) $this.data('bs.tab', (data = new Tab(this)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.tab\n\n $.fn.tab = Plugin\n $.fn.tab.Constructor = Tab\n\n\n // TAB NO CONFLICT\n // ===============\n\n $.fn.tab.noConflict = function () {\n $.fn.tab = old\n return this\n }\n\n\n // TAB DATA-API\n // ============\n\n var clickHandler = function (e) {\n e.preventDefault()\n Plugin.call($(this), 'show')\n }\n\n $(document)\n .on('click.bs.tab.data-api', '[data-toggle=\"tab\"]', clickHandler)\n .on('click.bs.tab.data-api', '[data-toggle=\"pill\"]', clickHandler)\n\n}(jQuery);\n\n/* ========================================================================\n * Bootstrap: affix.js v3.3.4\n * http://getbootstrap.com/javascript/#affix\n * ========================================================================\n * Copyright 2011-2015 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * ======================================================================== */\n\n\n+function ($) {\n 'use strict';\n\n // AFFIX CLASS DEFINITION\n // ======================\n\n var Affix = function (element, options) {\n this.options = $.extend({}, Affix.DEFAULTS, options)\n\n this.$target = $(this.options.target)\n .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))\n .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))\n\n this.$element = $(element)\n this.affixed = null\n this.unpin = null\n this.pinnedOffset = null\n\n this.checkPosition()\n }\n\n Affix.VERSION = '3.3.4'\n\n Affix.RESET = 'affix affix-top affix-bottom'\n\n Affix.DEFAULTS = {\n offset: 0,\n target: window\n }\n\n Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {\n var scrollTop = this.$target.scrollTop()\n var position = this.$element.offset()\n var targetHeight = this.$target.height()\n\n if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false\n\n if (this.affixed == 'bottom') {\n if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'\n return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'\n }\n\n var initializing = this.affixed == null\n var colliderTop = initializing ? scrollTop : position.top\n var colliderHeight = initializing ? targetHeight : height\n\n if (offsetTop != null && scrollTop <= offsetTop) return 'top'\n if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'\n\n return false\n }\n\n Affix.prototype.getPinnedOffset = function () {\n if (this.pinnedOffset) return this.pinnedOffset\n this.$element.removeClass(Affix.RESET).addClass('affix')\n var scrollTop = this.$target.scrollTop()\n var position = this.$element.offset()\n return (this.pinnedOffset = position.top - scrollTop)\n }\n\n Affix.prototype.checkPositionWithEventLoop = function () {\n setTimeout($.proxy(this.checkPosition, this), 1)\n }\n\n Affix.prototype.checkPosition = function () {\n if (!this.$element.is(':visible')) return\n\n var height = this.$element.height()\n var offset = this.options.offset\n var offsetTop = offset.top\n var offsetBottom = offset.bottom\n var scrollHeight = $(document.body).height()\n\n if (typeof offset != 'object') offsetBottom = offsetTop = offset\n if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)\n if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)\n\n var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)\n\n if (this.affixed != affix) {\n if (this.unpin != null) this.$element.css('top', '')\n\n var affixType = 'affix' + (affix ? '-' + affix : '')\n var e = $.Event(affixType + '.bs.affix')\n\n this.$element.trigger(e)\n\n if (e.isDefaultPrevented()) return\n\n this.affixed = affix\n this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null\n\n this.$element\n .removeClass(Affix.RESET)\n .addClass(affixType)\n .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')\n }\n\n if (affix == 'bottom') {\n this.$element.offset({\n top: scrollHeight - height - offsetBottom\n })\n }\n }\n\n\n // AFFIX PLUGIN DEFINITION\n // =======================\n\n function Plugin(option) {\n return this.each(function () {\n var $this = $(this)\n var data = $this.data('bs.affix')\n var options = typeof option == 'object' && option\n\n if (!data) $this.data('bs.affix', (data = new Affix(this, options)))\n if (typeof option == 'string') data[option]()\n })\n }\n\n var old = $.fn.affix\n\n $.fn.affix = Plugin\n $.fn.affix.Constructor = Affix\n\n\n // AFFIX NO CONFLICT\n // =================\n\n $.fn.affix.noConflict = function () {\n $.fn.affix = old\n return this\n }\n\n\n // AFFIX DATA-API\n // ==============\n\n $(window).on('load', function () {\n $('[data-spy=\"affix\"]').each(function () {\n var $spy = $(this)\n var data = $spy.data()\n\n data.offset = data.offset || {}\n\n if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom\n if (data.offsetTop != null) data.offset.top = data.offsetTop\n\n Plugin.call($spy, data)\n })\n })\n\n}(jQuery);\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/bootstrap-less/js/bootstrap.js\n// module id = hSCs\n// module chunks = 0","/*!\n * Select2 4.0.5\n * https://select2.github.io\n *\n * Released under the MIT license\n * https://github.com/select2/select2/blob/master/LICENSE.md\n */\n(function (factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['jquery'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node/CommonJS\n module.exports = function (root, jQuery) {\n if (jQuery === undefined) {\n // require('jQuery') returns a factory that requires window to\n // build a jQuery instance, we normalize how we use modules\n // that require this pattern but the window provided is a noop\n // if it's defined (how jquery works)\n if (typeof window !== 'undefined') {\n jQuery = require('jquery');\n }\n else {\n jQuery = require('jquery')(root);\n }\n }\n factory(jQuery);\n return jQuery;\n };\n } else {\n // Browser globals\n factory(jQuery);\n }\n} (function (jQuery) {\n // This is needed so we can catch the AMD loader configuration and use it\n // The inner file should be wrapped (by `banner.start.js`) in a function that\n // returns the AMD loader references.\n var S2 =(function () {\n // Restore the Select2 AMD loader so it can be used\n // Needed mostly in the language files, where the loader is not inserted\n if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) {\n var S2 = jQuery.fn.select2.amd;\n }\nvar S2;(function () { if (!S2 || !S2.requirejs) {\nif (!S2) { S2 = {}; } else { require = S2; }\n/**\n * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.\n * Released under MIT license, http://github.com/requirejs/almond/LICENSE\n */\n//Going sloppy to avoid 'use strict' string cost, but strict practices should\n//be followed.\n/*global setTimeout: false */\n\nvar requirejs, require, define;\n(function (undef) {\n var main, req, makeMap, handlers,\n defined = {},\n waiting = {},\n config = {},\n defining = {},\n hasOwn = Object.prototype.hasOwnProperty,\n aps = [].slice,\n jsSuffixRegExp = /\\.js$/;\n\n function hasProp(obj, prop) {\n return hasOwn.call(obj, prop);\n }\n\n /**\n * Given a relative module name, like ./something, normalize it to\n * a real name that can be mapped to a path.\n * @param {String} name the relative name\n * @param {String} baseName a real name that the name arg is relative\n * to.\n * @returns {String} normalized name\n */\n function normalize(name, baseName) {\n var nameParts, nameSegment, mapValue, foundMap, lastIndex,\n foundI, foundStarMap, starI, i, j, part, normalizedBaseParts,\n baseParts = baseName && baseName.split(\"/\"),\n map = config.map,\n starMap = (map && map['*']) || {};\n\n //Adjust any relative paths.\n if (name) {\n name = name.split('/');\n lastIndex = name.length - 1;\n\n // If wanting node ID compatibility, strip .js from end\n // of IDs. Have to do this here, and not in nameToUrl\n // because node allows either .js or non .js to map\n // to same file.\n if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {\n name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');\n }\n\n // Starts with a '.' so need the baseName\n if (name[0].charAt(0) === '.' && baseParts) {\n //Convert baseName to array, and lop off the last part,\n //so that . matches that 'directory' and not name of the baseName's\n //module. For instance, baseName of 'one/two/three', maps to\n //'one/two/three.js', but we want the directory, 'one/two' for\n //this normalization.\n normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);\n name = normalizedBaseParts.concat(name);\n }\n\n //start trimDots\n for (i = 0; i < name.length; i++) {\n part = name[i];\n if (part === '.') {\n name.splice(i, 1);\n i -= 1;\n } else if (part === '..') {\n // If at the start, or previous value is still ..,\n // keep them so that when converted to a path it may\n // still work when converted to a path, even though\n // as an ID it is less than ideal. In larger point\n // releases, may be better to just kick out an error.\n if (i === 0 || (i === 1 && name[2] === '..') || name[i - 1] === '..') {\n continue;\n } else if (i > 0) {\n name.splice(i - 1, 2);\n i -= 2;\n }\n }\n }\n //end trimDots\n\n name = name.join('/');\n }\n\n //Apply map config if available.\n if ((baseParts || starMap) && map) {\n nameParts = name.split('/');\n\n for (i = nameParts.length; i > 0; i -= 1) {\n nameSegment = nameParts.slice(0, i).join(\"/\");\n\n if (baseParts) {\n //Find the longest baseName segment match in the config.\n //So, do joins on the biggest to smallest lengths of baseParts.\n for (j = baseParts.length; j > 0; j -= 1) {\n mapValue = map[baseParts.slice(0, j).join('/')];\n\n //baseName segment has config, find if it has one for\n //this name.\n if (mapValue) {\n mapValue = mapValue[nameSegment];\n if (mapValue) {\n //Match, update name to the new value.\n foundMap = mapValue;\n foundI = i;\n break;\n }\n }\n }\n }\n\n if (foundMap) {\n break;\n }\n\n //Check for a star map match, but just hold on to it,\n //if there is a shorter segment match later in a matching\n //config, then favor over this star map.\n if (!foundStarMap && starMap && starMap[nameSegment]) {\n foundStarMap = starMap[nameSegment];\n starI = i;\n }\n }\n\n if (!foundMap && foundStarMap) {\n foundMap = foundStarMap;\n foundI = starI;\n }\n\n if (foundMap) {\n nameParts.splice(0, foundI, foundMap);\n name = nameParts.join('/');\n }\n }\n\n return name;\n }\n\n function makeRequire(relName, forceSync) {\n return function () {\n //A version of a require function that passes a moduleName\n //value for items that may need to\n //look up paths relative to the moduleName\n var args = aps.call(arguments, 0);\n\n //If first arg is not require('string'), and there is only\n //one arg, it is the array form without a callback. Insert\n //a null so that the following concat is correct.\n if (typeof args[0] !== 'string' && args.length === 1) {\n args.push(null);\n }\n return req.apply(undef, args.concat([relName, forceSync]));\n };\n }\n\n function makeNormalize(relName) {\n return function (name) {\n return normalize(name, relName);\n };\n }\n\n function makeLoad(depName) {\n return function (value) {\n defined[depName] = value;\n };\n }\n\n function callDep(name) {\n if (hasProp(waiting, name)) {\n var args = waiting[name];\n delete waiting[name];\n defining[name] = true;\n main.apply(undef, args);\n }\n\n if (!hasProp(defined, name) && !hasProp(defining, name)) {\n throw new Error('No ' + name);\n }\n return defined[name];\n }\n\n //Turns a plugin!resource to [plugin, resource]\n //with the plugin being undefined if the name\n //did not have a plugin prefix.\n function splitPrefix(name) {\n var prefix,\n index = name ? name.indexOf('!') : -1;\n if (index > -1) {\n prefix = name.substring(0, index);\n name = name.substring(index + 1, name.length);\n }\n return [prefix, name];\n }\n\n //Creates a parts array for a relName where first part is plugin ID,\n //second part is resource ID. Assumes relName has already been normalized.\n function makeRelParts(relName) {\n return relName ? splitPrefix(relName) : [];\n }\n\n /**\n * Makes a name map, normalizing the name, and using a plugin\n * for normalization if necessary. Grabs a ref to plugin\n * too, as an optimization.\n */\n makeMap = function (name, relParts) {\n var plugin,\n parts = splitPrefix(name),\n prefix = parts[0],\n relResourceName = relParts[1];\n\n name = parts[1];\n\n if (prefix) {\n prefix = normalize(prefix, relResourceName);\n plugin = callDep(prefix);\n }\n\n //Normalize according\n if (prefix) {\n if (plugin && plugin.normalize) {\n name = plugin.normalize(name, makeNormalize(relResourceName));\n } else {\n name = normalize(name, relResourceName);\n }\n } else {\n name = normalize(name, relResourceName);\n parts = splitPrefix(name);\n prefix = parts[0];\n name = parts[1];\n if (prefix) {\n plugin = callDep(prefix);\n }\n }\n\n //Using ridiculous property names for space reasons\n return {\n f: prefix ? prefix + '!' + name : name, //fullName\n n: name,\n pr: prefix,\n p: plugin\n };\n };\n\n function makeConfig(name) {\n return function () {\n return (config && config.config && config.config[name]) || {};\n };\n }\n\n handlers = {\n require: function (name) {\n return makeRequire(name);\n },\n exports: function (name) {\n var e = defined[name];\n if (typeof e !== 'undefined') {\n return e;\n } else {\n return (defined[name] = {});\n }\n },\n module: function (name) {\n return {\n id: name,\n uri: '',\n exports: defined[name],\n config: makeConfig(name)\n };\n }\n };\n\n main = function (name, deps, callback, relName) {\n var cjsModule, depName, ret, map, i, relParts,\n args = [],\n callbackType = typeof callback,\n usingExports;\n\n //Use name if no relName\n relName = relName || name;\n relParts = makeRelParts(relName);\n\n //Call the callback to define the module, if necessary.\n if (callbackType === 'undefined' || callbackType === 'function') {\n //Pull out the defined dependencies and pass the ordered\n //values to the callback.\n //Default to [require, exports, module] if no deps\n deps = !deps.length && callback.length ? ['require', 'exports', 'module'] : deps;\n for (i = 0; i < deps.length; i += 1) {\n map = makeMap(deps[i], relParts);\n depName = map.f;\n\n //Fast path CommonJS standard dependencies.\n if (depName === \"require\") {\n args[i] = handlers.require(name);\n } else if (depName === \"exports\") {\n //CommonJS module spec 1.1\n args[i] = handlers.exports(name);\n usingExports = true;\n } else if (depName === \"module\") {\n //CommonJS module spec 1.1\n cjsModule = args[i] = handlers.module(name);\n } else if (hasProp(defined, depName) ||\n hasProp(waiting, depName) ||\n hasProp(defining, depName)) {\n args[i] = callDep(depName);\n } else if (map.p) {\n map.p.load(map.n, makeRequire(relName, true), makeLoad(depName), {});\n args[i] = defined[depName];\n } else {\n throw new Error(name + ' missing ' + depName);\n }\n }\n\n ret = callback ? callback.apply(defined[name], args) : undefined;\n\n if (name) {\n //If setting exports via \"module\" is in play,\n //favor that over return value and exports. After that,\n //favor a non-undefined return value over exports use.\n if (cjsModule && cjsModule.exports !== undef &&\n cjsModule.exports !== defined[name]) {\n defined[name] = cjsModule.exports;\n } else if (ret !== undef || !usingExports) {\n //Use the return value from the function.\n defined[name] = ret;\n }\n }\n } else if (name) {\n //May just be an object definition for the module. Only\n //worry about defining if have a module name.\n defined[name] = callback;\n }\n };\n\n requirejs = require = req = function (deps, callback, relName, forceSync, alt) {\n if (typeof deps === \"string\") {\n if (handlers[deps]) {\n //callback in this case is really relName\n return handlers[deps](callback);\n }\n //Just return the module wanted. In this scenario, the\n //deps arg is the module name, and second arg (if passed)\n //is just the relName.\n //Normalize module name, if it contains . or ..\n return callDep(makeMap(deps, makeRelParts(callback)).f);\n } else if (!deps.splice) {\n //deps is a config object, not an array.\n config = deps;\n if (config.deps) {\n req(config.deps, config.callback);\n }\n if (!callback) {\n return;\n }\n\n if (callback.splice) {\n //callback is an array, which means it is a dependency list.\n //Adjust args if there are dependencies\n deps = callback;\n callback = relName;\n relName = null;\n } else {\n deps = undef;\n }\n }\n\n //Support require(['a'])\n callback = callback || function () {};\n\n //If relName is a function, it is an errback handler,\n //so remove it.\n if (typeof relName === 'function') {\n relName = forceSync;\n forceSync = alt;\n }\n\n //Simulate async callback;\n if (forceSync) {\n main(undef, deps, callback, relName);\n } else {\n //Using a non-zero value because of concern for what old browsers\n //do, and latest browsers \"upgrade\" to 4 if lower value is used:\n //http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout:\n //If want a value immediately, use require('id') instead -- something\n //that works in almond on the global level, but not guaranteed and\n //unlikely to work in other AMD implementations.\n setTimeout(function () {\n main(undef, deps, callback, relName);\n }, 4);\n }\n\n return req;\n };\n\n /**\n * Just drops the config on the floor, but returns req in case\n * the config return value is used.\n */\n req.config = function (cfg) {\n return req(cfg);\n };\n\n /**\n * Expose module registry for debugging and tooling\n */\n requirejs._defined = defined;\n\n define = function (name, deps, callback) {\n if (typeof name !== 'string') {\n throw new Error('See almond README: incorrect module build, no module name');\n }\n\n //This module may not have dependencies\n if (!deps.splice) {\n //deps is not an array, so probably means\n //an object literal or factory function for\n //the value. Adjust args.\n callback = deps;\n deps = [];\n }\n\n if (!hasProp(defined, name) && !hasProp(waiting, name)) {\n waiting[name] = [name, deps, callback];\n }\n };\n\n define.amd = {\n jQuery: true\n };\n}());\n\nS2.requirejs = requirejs;S2.require = require;S2.define = define;\n}\n}());\nS2.define(\"almond\", function(){});\n\n/* global jQuery:false, $:false */\nS2.define('jquery',[],function () {\n var _$ = jQuery || $;\n\n if (_$ == null && console && console.error) {\n console.error(\n 'Select2: An instance of jQuery or a jQuery-compatible library was not ' +\n 'found. Make sure that you are including jQuery before Select2 on your ' +\n 'web page.'\n );\n }\n\n return _$;\n});\n\nS2.define('select2/utils',[\n 'jquery'\n], function ($) {\n var Utils = {};\n\n Utils.Extend = function (ChildClass, SuperClass) {\n var __hasProp = {}.hasOwnProperty;\n\n function BaseConstructor () {\n this.constructor = ChildClass;\n }\n\n for (var key in SuperClass) {\n if (__hasProp.call(SuperClass, key)) {\n ChildClass[key] = SuperClass[key];\n }\n }\n\n BaseConstructor.prototype = SuperClass.prototype;\n ChildClass.prototype = new BaseConstructor();\n ChildClass.__super__ = SuperClass.prototype;\n\n return ChildClass;\n };\n\n function getMethods (theClass) {\n var proto = theClass.prototype;\n\n var methods = [];\n\n for (var methodName in proto) {\n var m = proto[methodName];\n\n if (typeof m !== 'function') {\n continue;\n }\n\n if (methodName === 'constructor') {\n continue;\n }\n\n methods.push(methodName);\n }\n\n return methods;\n }\n\n Utils.Decorate = function (SuperClass, DecoratorClass) {\n var decoratedMethods = getMethods(DecoratorClass);\n var superMethods = getMethods(SuperClass);\n\n function DecoratedClass () {\n var unshift = Array.prototype.unshift;\n\n var argCount = DecoratorClass.prototype.constructor.length;\n\n var calledConstructor = SuperClass.prototype.constructor;\n\n if (argCount > 0) {\n unshift.call(arguments, SuperClass.prototype.constructor);\n\n calledConstructor = DecoratorClass.prototype.constructor;\n }\n\n calledConstructor.apply(this, arguments);\n }\n\n DecoratorClass.displayName = SuperClass.displayName;\n\n function ctr () {\n this.constructor = DecoratedClass;\n }\n\n DecoratedClass.prototype = new ctr();\n\n for (var m = 0; m < superMethods.length; m++) {\n var superMethod = superMethods[m];\n\n DecoratedClass.prototype[superMethod] =\n SuperClass.prototype[superMethod];\n }\n\n var calledMethod = function (methodName) {\n // Stub out the original method if it's not decorating an actual method\n var originalMethod = function () {};\n\n if (methodName in DecoratedClass.prototype) {\n originalMethod = DecoratedClass.prototype[methodName];\n }\n\n var decoratedMethod = DecoratorClass.prototype[methodName];\n\n return function () {\n var unshift = Array.prototype.unshift;\n\n unshift.call(arguments, originalMethod);\n\n return decoratedMethod.apply(this, arguments);\n };\n };\n\n for (var d = 0; d < decoratedMethods.length; d++) {\n var decoratedMethod = decoratedMethods[d];\n\n DecoratedClass.prototype[decoratedMethod] = calledMethod(decoratedMethod);\n }\n\n return DecoratedClass;\n };\n\n var Observable = function () {\n this.listeners = {};\n };\n\n Observable.prototype.on = function (event, callback) {\n this.listeners = this.listeners || {};\n\n if (event in this.listeners) {\n this.listeners[event].push(callback);\n } else {\n this.listeners[event] = [callback];\n }\n };\n\n Observable.prototype.trigger = function (event) {\n var slice = Array.prototype.slice;\n var params = slice.call(arguments, 1);\n\n this.listeners = this.listeners || {};\n\n // Params should always come in as an array\n if (params == null) {\n params = [];\n }\n\n // If there are no arguments to the event, use a temporary object\n if (params.length === 0) {\n params.push({});\n }\n\n // Set the `_type` of the first object to the event\n params[0]._type = event;\n\n if (event in this.listeners) {\n this.invoke(this.listeners[event], slice.call(arguments, 1));\n }\n\n if ('*' in this.listeners) {\n this.invoke(this.listeners['*'], arguments);\n }\n };\n\n Observable.prototype.invoke = function (listeners, params) {\n for (var i = 0, len = listeners.length; i < len; i++) {\n listeners[i].apply(this, params);\n }\n };\n\n Utils.Observable = Observable;\n\n Utils.generateChars = function (length) {\n var chars = '';\n\n for (var i = 0; i < length; i++) {\n var randomChar = Math.floor(Math.random() * 36);\n chars += randomChar.toString(36);\n }\n\n return chars;\n };\n\n Utils.bind = function (func, context) {\n return function () {\n func.apply(context, arguments);\n };\n };\n\n Utils._convertData = function (data) {\n for (var originalKey in data) {\n var keys = originalKey.split('-');\n\n var dataLevel = data;\n\n if (keys.length === 1) {\n continue;\n }\n\n for (var k = 0; k < keys.length; k++) {\n var key = keys[k];\n\n // Lowercase the first letter\n // By default, dash-separated becomes camelCase\n key = key.substring(0, 1).toLowerCase() + key.substring(1);\n\n if (!(key in dataLevel)) {\n dataLevel[key] = {};\n }\n\n if (k == keys.length - 1) {\n dataLevel[key] = data[originalKey];\n }\n\n dataLevel = dataLevel[key];\n }\n\n delete data[originalKey];\n }\n\n return data;\n };\n\n Utils.hasScroll = function (index, el) {\n // Adapted from the function created by @ShadowScripter\n // and adapted by @BillBarry on the Stack Exchange Code Review website.\n // The original code can be found at\n // http://codereview.stackexchange.com/q/13338\n // and was designed to be used with the Sizzle selector engine.\n\n var $el = $(el);\n var overflowX = el.style.overflowX;\n var overflowY = el.style.overflowY;\n\n //Check both x and y declarations\n if (overflowX === overflowY &&\n (overflowY === 'hidden' || overflowY === 'visible')) {\n return false;\n }\n\n if (overflowX === 'scroll' || overflowY === 'scroll') {\n return true;\n }\n\n return ($el.innerHeight() < el.scrollHeight ||\n $el.innerWidth() < el.scrollWidth);\n };\n\n Utils.escapeMarkup = function (markup) {\n var replaceMap = {\n '\\\\': '\',\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n '\\'': ''',\n '/': '/'\n };\n\n // Do not try to escape the markup if it's not a string\n if (typeof markup !== 'string') {\n return markup;\n }\n\n return String(markup).replace(/[&<>\"'\\/\\\\]/g, function (match) {\n return replaceMap[match];\n });\n };\n\n // Append an array of jQuery nodes to a given element.\n Utils.appendMany = function ($element, $nodes) {\n // jQuery 1.7.x does not support $.fn.append() with an array\n // Fall back to a jQuery object collection using $.fn.add()\n if ($.fn.jquery.substr(0, 3) === '1.7') {\n var $jqNodes = $();\n\n $.map($nodes, function (node) {\n $jqNodes = $jqNodes.add(node);\n });\n\n $nodes = $jqNodes;\n }\n\n $element.append($nodes);\n };\n\n return Utils;\n});\n\nS2.define('select2/results',[\n 'jquery',\n './utils'\n], function ($, Utils) {\n function Results ($element, options, dataAdapter) {\n this.$element = $element;\n this.data = dataAdapter;\n this.options = options;\n\n Results.__super__.constructor.call(this);\n }\n\n Utils.Extend(Results, Utils.Observable);\n\n Results.prototype.render = function () {\n var $results = $(\n '
'\n );\n\n if (this.options.get('multiple')) {\n $results.attr('aria-multiselectable', 'true');\n }\n\n this.$results = $results;\n\n return $results;\n };\n\n Results.prototype.clear = function () {\n this.$results.empty();\n };\n\n Results.prototype.displayMessage = function (params) {\n var escapeMarkup = this.options.get('escapeMarkup');\n\n this.clear();\n this.hideLoading();\n\n var $message = $(\n '
'\n );\n\n var message = this.options.get('translations').get(params.message);\n\n $message.append(\n escapeMarkup(\n message(params.args)\n )\n );\n\n $message[0].className += ' select2-results__message';\n\n this.$results.append($message);\n };\n\n Results.prototype.hideMessages = function () {\n this.$results.find('.select2-results__message').remove();\n };\n\n Results.prototype.append = function (data) {\n this.hideLoading();\n\n var $options = [];\n\n if (data.results == null || data.results.length === 0) {\n if (this.$results.children().length === 0) {\n this.trigger('results:message', {\n message: 'noResults'\n });\n }\n\n return;\n }\n\n data.results = this.sort(data.results);\n\n for (var d = 0; d < data.results.length; d++) {\n var item = data.results[d];\n\n var $option = this.option(item);\n\n $options.push($option);\n }\n\n this.$results.append($options);\n };\n\n Results.prototype.position = function ($results, $dropdown) {\n var $resultsContainer = $dropdown.find('.select2-results');\n $resultsContainer.append($results);\n };\n\n Results.prototype.sort = function (data) {\n var sorter = this.options.get('sorter');\n\n return sorter(data);\n };\n\n Results.prototype.highlightFirstItem = function () {\n var $options = this.$results\n .find('.select2-results__option[aria-selected]');\n\n var $selected = $options.filter('[aria-selected=true]');\n\n // Check if there are any selected options\n if ($selected.length > 0) {\n // If there are selected options, highlight the first\n $selected.first().trigger('mouseenter');\n } else {\n // If there are no selected options, highlight the first option\n // in the dropdown\n $options.first().trigger('mouseenter');\n }\n\n this.ensureHighlightVisible();\n };\n\n Results.prototype.setClasses = function () {\n var self = this;\n\n this.data.current(function (selected) {\n var selectedIds = $.map(selected, function (s) {\n return s.id.toString();\n });\n\n var $options = self.$results\n .find('.select2-results__option[aria-selected]');\n\n $options.each(function () {\n var $option = $(this);\n\n var item = $.data(this, 'data');\n\n // id needs to be converted to a string when comparing\n var id = '' + item.id;\n\n if ((item.element != null && item.element.selected) ||\n (item.element == null && $.inArray(id, selectedIds) > -1)) {\n $option.attr('aria-selected', 'true');\n } else {\n $option.attr('aria-selected', 'false');\n }\n });\n\n });\n };\n\n Results.prototype.showLoading = function (params) {\n this.hideLoading();\n\n var loadingMore = this.options.get('translations').get('searching');\n\n var loading = {\n disabled: true,\n loading: true,\n text: loadingMore(params)\n };\n var $loading = this.option(loading);\n $loading.className += ' loading-results';\n\n this.$results.prepend($loading);\n };\n\n Results.prototype.hideLoading = function () {\n this.$results.find('.loading-results').remove();\n };\n\n Results.prototype.option = function (data) {\n var option = document.createElement('li');\n option.className = 'select2-results__option';\n\n var attrs = {\n 'role': 'treeitem',\n 'aria-selected': 'false'\n };\n\n if (data.disabled) {\n delete attrs['aria-selected'];\n attrs['aria-disabled'] = 'true';\n }\n\n if (data.id == null) {\n delete attrs['aria-selected'];\n }\n\n if (data._resultId != null) {\n option.id = data._resultId;\n }\n\n if (data.title) {\n option.title = data.title;\n }\n\n if (data.children) {\n attrs.role = 'group';\n attrs['aria-label'] = data.text;\n delete attrs['aria-selected'];\n }\n\n for (var attr in attrs) {\n var val = attrs[attr];\n\n option.setAttribute(attr, val);\n }\n\n if (data.children) {\n var $option = $(option);\n\n var label = document.createElement('strong');\n label.className = 'select2-results__group';\n\n var $label = $(label);\n this.template(data, label);\n\n var $children = [];\n\n for (var c = 0; c < data.children.length; c++) {\n var child = data.children[c];\n\n var $child = this.option(child);\n\n $children.push($child);\n }\n\n var $childrenContainer = $('
', {\n 'class': 'select2-results__options select2-results__options--nested'\n });\n\n $childrenContainer.append($children);\n\n $option.append(label);\n $option.append($childrenContainer);\n } else {\n this.template(data, option);\n }\n\n $.data(option, 'data', data);\n\n return option;\n };\n\n Results.prototype.bind = function (container, $container) {\n var self = this;\n\n var id = container.id + '-results';\n\n this.$results.attr('id', id);\n\n container.on('results:all', function (params) {\n self.clear();\n self.append(params.data);\n\n if (container.isOpen()) {\n self.setClasses();\n self.highlightFirstItem();\n }\n });\n\n container.on('results:append', function (params) {\n self.append(params.data);\n\n if (container.isOpen()) {\n self.setClasses();\n }\n });\n\n container.on('query', function (params) {\n self.hideMessages();\n self.showLoading(params);\n });\n\n container.on('select', function () {\n if (!container.isOpen()) {\n return;\n }\n\n self.setClasses();\n self.highlightFirstItem();\n });\n\n container.on('unselect', function () {\n if (!container.isOpen()) {\n return;\n }\n\n self.setClasses();\n self.highlightFirstItem();\n });\n\n container.on('open', function () {\n // When the dropdown is open, aria-expended=\"true\"\n self.$results.attr('aria-expanded', 'true');\n self.$results.attr('aria-hidden', 'false');\n\n self.setClasses();\n self.ensureHighlightVisible();\n });\n\n container.on('close', function () {\n // When the dropdown is closed, aria-expended=\"false\"\n self.$results.attr('aria-expanded', 'false');\n self.$results.attr('aria-hidden', 'true');\n self.$results.removeAttr('aria-activedescendant');\n });\n\n container.on('results:toggle', function () {\n var $highlighted = self.getHighlightedResults();\n\n if ($highlighted.length === 0) {\n return;\n }\n\n $highlighted.trigger('mouseup');\n });\n\n container.on('results:select', function () {\n var $highlighted = self.getHighlightedResults();\n\n if ($highlighted.length === 0) {\n return;\n }\n\n var data = $highlighted.data('data');\n\n if ($highlighted.attr('aria-selected') == 'true') {\n self.trigger('close', {});\n } else {\n self.trigger('select', {\n data: data\n });\n }\n });\n\n container.on('results:previous', function () {\n var $highlighted = self.getHighlightedResults();\n\n var $options = self.$results.find('[aria-selected]');\n\n var currentIndex = $options.index($highlighted);\n\n // If we are already at te top, don't move further\n if (currentIndex === 0) {\n return;\n }\n\n var nextIndex = currentIndex - 1;\n\n // If none are highlighted, highlight the first\n if ($highlighted.length === 0) {\n nextIndex = 0;\n }\n\n var $next = $options.eq(nextIndex);\n\n $next.trigger('mouseenter');\n\n var currentOffset = self.$results.offset().top;\n var nextTop = $next.offset().top;\n var nextOffset = self.$results.scrollTop() + (nextTop - currentOffset);\n\n if (nextIndex === 0) {\n self.$results.scrollTop(0);\n } else if (nextTop - currentOffset < 0) {\n self.$results.scrollTop(nextOffset);\n }\n });\n\n container.on('results:next', function () {\n var $highlighted = self.getHighlightedResults();\n\n var $options = self.$results.find('[aria-selected]');\n\n var currentIndex = $options.index($highlighted);\n\n var nextIndex = currentIndex + 1;\n\n // If we are at the last option, stay there\n if (nextIndex >= $options.length) {\n return;\n }\n\n var $next = $options.eq(nextIndex);\n\n $next.trigger('mouseenter');\n\n var currentOffset = self.$results.offset().top +\n self.$results.outerHeight(false);\n var nextBottom = $next.offset().top + $next.outerHeight(false);\n var nextOffset = self.$results.scrollTop() + nextBottom - currentOffset;\n\n if (nextIndex === 0) {\n self.$results.scrollTop(0);\n } else if (nextBottom > currentOffset) {\n self.$results.scrollTop(nextOffset);\n }\n });\n\n container.on('results:focus', function (params) {\n params.element.addClass('select2-results__option--highlighted');\n });\n\n container.on('results:message', function (params) {\n self.displayMessage(params);\n });\n\n if ($.fn.mousewheel) {\n this.$results.on('mousewheel', function (e) {\n var top = self.$results.scrollTop();\n\n var bottom = self.$results.get(0).scrollHeight - top + e.deltaY;\n\n var isAtTop = e.deltaY > 0 && top - e.deltaY <= 0;\n var isAtBottom = e.deltaY < 0 && bottom <= self.$results.height();\n\n if (isAtTop) {\n self.$results.scrollTop(0);\n\n e.preventDefault();\n e.stopPropagation();\n } else if (isAtBottom) {\n self.$results.scrollTop(\n self.$results.get(0).scrollHeight - self.$results.height()\n );\n\n e.preventDefault();\n e.stopPropagation();\n }\n });\n }\n\n this.$results.on('mouseup', '.select2-results__option[aria-selected]',\n function (evt) {\n var $this = $(this);\n\n var data = $this.data('data');\n\n if ($this.attr('aria-selected') === 'true') {\n if (self.options.get('multiple')) {\n self.trigger('unselect', {\n originalEvent: evt,\n data: data\n });\n } else {\n self.trigger('close', {});\n }\n\n return;\n }\n\n self.trigger('select', {\n originalEvent: evt,\n data: data\n });\n });\n\n this.$results.on('mouseenter', '.select2-results__option[aria-selected]',\n function (evt) {\n var data = $(this).data('data');\n\n self.getHighlightedResults()\n .removeClass('select2-results__option--highlighted');\n\n self.trigger('results:focus', {\n data: data,\n element: $(this)\n });\n });\n };\n\n Results.prototype.getHighlightedResults = function () {\n var $highlighted = this.$results\n .find('.select2-results__option--highlighted');\n\n return $highlighted;\n };\n\n Results.prototype.destroy = function () {\n this.$results.remove();\n };\n\n Results.prototype.ensureHighlightVisible = function () {\n var $highlighted = this.getHighlightedResults();\n\n if ($highlighted.length === 0) {\n return;\n }\n\n var $options = this.$results.find('[aria-selected]');\n\n var currentIndex = $options.index($highlighted);\n\n var currentOffset = this.$results.offset().top;\n var nextTop = $highlighted.offset().top;\n var nextOffset = this.$results.scrollTop() + (nextTop - currentOffset);\n\n var offsetDelta = nextTop - currentOffset;\n nextOffset -= $highlighted.outerHeight(false) * 2;\n\n if (currentIndex <= 2) {\n this.$results.scrollTop(0);\n } else if (offsetDelta > this.$results.outerHeight() || offsetDelta < 0) {\n this.$results.scrollTop(nextOffset);\n }\n };\n\n Results.prototype.template = function (result, container) {\n var template = this.options.get('templateResult');\n var escapeMarkup = this.options.get('escapeMarkup');\n\n var content = template(result, container);\n\n if (content == null) {\n container.style.display = 'none';\n } else if (typeof content === 'string') {\n container.innerHTML = escapeMarkup(content);\n } else {\n $(container).append(content);\n }\n };\n\n return Results;\n});\n\nS2.define('select2/keys',[\n\n], function () {\n var KEYS = {\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n SHIFT: 16,\n CTRL: 17,\n ALT: 18,\n ESC: 27,\n SPACE: 32,\n PAGE_UP: 33,\n PAGE_DOWN: 34,\n END: 35,\n HOME: 36,\n LEFT: 37,\n UP: 38,\n RIGHT: 39,\n DOWN: 40,\n DELETE: 46\n };\n\n return KEYS;\n});\n\nS2.define('select2/selection/base',[\n 'jquery',\n '../utils',\n '../keys'\n], function ($, Utils, KEYS) {\n function BaseSelection ($element, options) {\n this.$element = $element;\n this.options = options;\n\n BaseSelection.__super__.constructor.call(this);\n }\n\n Utils.Extend(BaseSelection, Utils.Observable);\n\n BaseSelection.prototype.render = function () {\n var $selection = $(\n '
' +\n ' '\n );\n\n this._tabindex = 0;\n\n if (this.$element.data('old-tabindex') != null) {\n this._tabindex = this.$element.data('old-tabindex');\n } else if (this.$element.attr('tabindex') != null) {\n this._tabindex = this.$element.attr('tabindex');\n }\n\n $selection.attr('title', this.$element.attr('title'));\n $selection.attr('tabindex', this._tabindex);\n\n this.$selection = $selection;\n\n return $selection;\n };\n\n BaseSelection.prototype.bind = function (container, $container) {\n var self = this;\n\n var id = container.id + '-container';\n var resultsId = container.id + '-results';\n\n this.container = container;\n\n this.$selection.on('focus', function (evt) {\n self.trigger('focus', evt);\n });\n\n this.$selection.on('blur', function (evt) {\n self._handleBlur(evt);\n });\n\n this.$selection.on('keydown', function (evt) {\n self.trigger('keypress', evt);\n\n if (evt.which === KEYS.SPACE) {\n evt.preventDefault();\n }\n });\n\n container.on('results:focus', function (params) {\n self.$selection.attr('aria-activedescendant', params.data._resultId);\n });\n\n container.on('selection:update', function (params) {\n self.update(params.data);\n });\n\n container.on('open', function () {\n // When the dropdown is open, aria-expanded=\"true\"\n self.$selection.attr('aria-expanded', 'true');\n self.$selection.attr('aria-owns', resultsId);\n\n self._attachCloseHandler(container);\n });\n\n container.on('close', function () {\n // When the dropdown is closed, aria-expanded=\"false\"\n self.$selection.attr('aria-expanded', 'false');\n self.$selection.removeAttr('aria-activedescendant');\n self.$selection.removeAttr('aria-owns');\n\n self.$selection.focus();\n\n self._detachCloseHandler(container);\n });\n\n container.on('enable', function () {\n self.$selection.attr('tabindex', self._tabindex);\n });\n\n container.on('disable', function () {\n self.$selection.attr('tabindex', '-1');\n });\n };\n\n BaseSelection.prototype._handleBlur = function (evt) {\n var self = this;\n\n // This needs to be delayed as the active element is the body when the tab\n // key is pressed, possibly along with others.\n window.setTimeout(function () {\n // Don't trigger `blur` if the focus is still in the selection\n if (\n (document.activeElement == self.$selection[0]) ||\n ($.contains(self.$selection[0], document.activeElement))\n ) {\n return;\n }\n\n self.trigger('blur', evt);\n }, 1);\n };\n\n BaseSelection.prototype._attachCloseHandler = function (container) {\n var self = this;\n\n $(document.body).on('mousedown.select2.' + container.id, function (e) {\n var $target = $(e.target);\n\n var $select = $target.closest('.select2');\n\n var $all = $('.select2.select2-container--open');\n\n $all.each(function () {\n var $this = $(this);\n\n if (this == $select[0]) {\n return;\n }\n\n var $element = $this.data('element');\n\n $element.select2('close');\n });\n });\n };\n\n BaseSelection.prototype._detachCloseHandler = function (container) {\n $(document.body).off('mousedown.select2.' + container.id);\n };\n\n BaseSelection.prototype.position = function ($selection, $container) {\n var $selectionContainer = $container.find('.selection');\n $selectionContainer.append($selection);\n };\n\n BaseSelection.prototype.destroy = function () {\n this._detachCloseHandler(this.container);\n };\n\n BaseSelection.prototype.update = function (data) {\n throw new Error('The `update` method must be defined in child classes.');\n };\n\n return BaseSelection;\n});\n\nS2.define('select2/selection/single',[\n 'jquery',\n './base',\n '../utils',\n '../keys'\n], function ($, BaseSelection, Utils, KEYS) {\n function SingleSelection () {\n SingleSelection.__super__.constructor.apply(this, arguments);\n }\n\n Utils.Extend(SingleSelection, BaseSelection);\n\n SingleSelection.prototype.render = function () {\n var $selection = SingleSelection.__super__.render.call(this);\n\n $selection.addClass('select2-selection--single');\n\n $selection.html(\n '
' +\n '
' +\n ' ' +\n ' '\n );\n\n return $selection;\n };\n\n SingleSelection.prototype.bind = function (container, $container) {\n var self = this;\n\n SingleSelection.__super__.bind.apply(this, arguments);\n\n var id = container.id + '-container';\n\n this.$selection.find('.select2-selection__rendered').attr('id', id);\n this.$selection.attr('aria-labelledby', id);\n\n this.$selection.on('mousedown', function (evt) {\n // Only respond to left clicks\n if (evt.which !== 1) {\n return;\n }\n\n self.trigger('toggle', {\n originalEvent: evt\n });\n });\n\n this.$selection.on('focus', function (evt) {\n // User focuses on the container\n });\n\n this.$selection.on('blur', function (evt) {\n // User exits the container\n });\n\n container.on('focus', function (evt) {\n if (!container.isOpen()) {\n self.$selection.focus();\n }\n });\n\n container.on('selection:update', function (params) {\n self.update(params.data);\n });\n };\n\n SingleSelection.prototype.clear = function () {\n this.$selection.find('.select2-selection__rendered').empty();\n };\n\n SingleSelection.prototype.display = function (data, container) {\n var template = this.options.get('templateSelection');\n var escapeMarkup = this.options.get('escapeMarkup');\n\n return escapeMarkup(template(data, container));\n };\n\n SingleSelection.prototype.selectionContainer = function () {\n return $('
');\n };\n\n SingleSelection.prototype.update = function (data) {\n if (data.length === 0) {\n this.clear();\n return;\n }\n\n var selection = data[0];\n\n var $rendered = this.$selection.find('.select2-selection__rendered');\n var formatted = this.display(selection, $rendered);\n\n $rendered.empty().append(formatted);\n $rendered.prop('title', selection.title || selection.text);\n };\n\n return SingleSelection;\n});\n\nS2.define('select2/selection/multiple',[\n 'jquery',\n './base',\n '../utils'\n], function ($, BaseSelection, Utils) {\n function MultipleSelection ($element, options) {\n MultipleSelection.__super__.constructor.apply(this, arguments);\n }\n\n Utils.Extend(MultipleSelection, BaseSelection);\n\n MultipleSelection.prototype.render = function () {\n var $selection = MultipleSelection.__super__.render.call(this);\n\n $selection.addClass('select2-selection--multiple');\n\n $selection.html(\n '
'\n );\n\n return $selection;\n };\n\n MultipleSelection.prototype.bind = function (container, $container) {\n var self = this;\n\n MultipleSelection.__super__.bind.apply(this, arguments);\n\n this.$selection.on('click', function (evt) {\n self.trigger('toggle', {\n originalEvent: evt\n });\n });\n\n this.$selection.on(\n 'click',\n '.select2-selection__choice__remove',\n function (evt) {\n // Ignore the event if it is disabled\n if (self.options.get('disabled')) {\n return;\n }\n\n var $remove = $(this);\n var $selection = $remove.parent();\n\n var data = $selection.data('data');\n\n self.trigger('unselect', {\n originalEvent: evt,\n data: data\n });\n }\n );\n };\n\n MultipleSelection.prototype.clear = function () {\n this.$selection.find('.select2-selection__rendered').empty();\n };\n\n MultipleSelection.prototype.display = function (data, container) {\n var template = this.options.get('templateSelection');\n var escapeMarkup = this.options.get('escapeMarkup');\n\n return escapeMarkup(template(data, container));\n };\n\n MultipleSelection.prototype.selectionContainer = function () {\n var $container = $(\n '
' +\n '' +\n '×' +\n ' ' +\n ' '\n );\n\n return $container;\n };\n\n MultipleSelection.prototype.update = function (data) {\n this.clear();\n\n if (data.length === 0) {\n return;\n }\n\n var $selections = [];\n\n for (var d = 0; d < data.length; d++) {\n var selection = data[d];\n\n var $selection = this.selectionContainer();\n var formatted = this.display(selection, $selection);\n\n $selection.append(formatted);\n $selection.prop('title', selection.title || selection.text);\n\n $selection.data('data', selection);\n\n $selections.push($selection);\n }\n\n var $rendered = this.$selection.find('.select2-selection__rendered');\n\n Utils.appendMany($rendered, $selections);\n };\n\n return MultipleSelection;\n});\n\nS2.define('select2/selection/placeholder',[\n '../utils'\n], function (Utils) {\n function Placeholder (decorated, $element, options) {\n this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\n\n decorated.call(this, $element, options);\n }\n\n Placeholder.prototype.normalizePlaceholder = function (_, placeholder) {\n if (typeof placeholder === 'string') {\n placeholder = {\n id: '',\n text: placeholder\n };\n }\n\n return placeholder;\n };\n\n Placeholder.prototype.createPlaceholder = function (decorated, placeholder) {\n var $placeholder = this.selectionContainer();\n\n $placeholder.html(this.display(placeholder));\n $placeholder.addClass('select2-selection__placeholder')\n .removeClass('select2-selection__choice');\n\n return $placeholder;\n };\n\n Placeholder.prototype.update = function (decorated, data) {\n var singlePlaceholder = (\n data.length == 1 && data[0].id != this.placeholder.id\n );\n var multipleSelections = data.length > 1;\n\n if (multipleSelections || singlePlaceholder) {\n return decorated.call(this, data);\n }\n\n this.clear();\n\n var $placeholder = this.createPlaceholder(this.placeholder);\n\n this.$selection.find('.select2-selection__rendered').append($placeholder);\n };\n\n return Placeholder;\n});\n\nS2.define('select2/selection/allowClear',[\n 'jquery',\n '../keys'\n], function ($, KEYS) {\n function AllowClear () { }\n\n AllowClear.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n if (this.placeholder == null) {\n if (this.options.get('debug') && window.console && console.error) {\n console.error(\n 'Select2: The `allowClear` option should be used in combination ' +\n 'with the `placeholder` option.'\n );\n }\n }\n\n this.$selection.on('mousedown', '.select2-selection__clear',\n function (evt) {\n self._handleClear(evt);\n });\n\n container.on('keypress', function (evt) {\n self._handleKeyboardClear(evt, container);\n });\n };\n\n AllowClear.prototype._handleClear = function (_, evt) {\n // Ignore the event if it is disabled\n if (this.options.get('disabled')) {\n return;\n }\n\n var $clear = this.$selection.find('.select2-selection__clear');\n\n // Ignore the event if nothing has been selected\n if ($clear.length === 0) {\n return;\n }\n\n evt.stopPropagation();\n\n var data = $clear.data('data');\n\n for (var d = 0; d < data.length; d++) {\n var unselectData = {\n data: data[d]\n };\n\n // Trigger the `unselect` event, so people can prevent it from being\n // cleared.\n this.trigger('unselect', unselectData);\n\n // If the event was prevented, don't clear it out.\n if (unselectData.prevented) {\n return;\n }\n }\n\n this.$element.val(this.placeholder.id).trigger('change');\n\n this.trigger('toggle', {});\n };\n\n AllowClear.prototype._handleKeyboardClear = function (_, evt, container) {\n if (container.isOpen()) {\n return;\n }\n\n if (evt.which == KEYS.DELETE || evt.which == KEYS.BACKSPACE) {\n this._handleClear(evt);\n }\n };\n\n AllowClear.prototype.update = function (decorated, data) {\n decorated.call(this, data);\n\n if (this.$selection.find('.select2-selection__placeholder').length > 0 ||\n data.length === 0) {\n return;\n }\n\n var $remove = $(\n '
' +\n '×' +\n ' '\n );\n $remove.data('data', data);\n\n this.$selection.find('.select2-selection__rendered').prepend($remove);\n };\n\n return AllowClear;\n});\n\nS2.define('select2/selection/search',[\n 'jquery',\n '../utils',\n '../keys'\n], function ($, Utils, KEYS) {\n function Search (decorated, $element, options) {\n decorated.call(this, $element, options);\n }\n\n Search.prototype.render = function (decorated) {\n var $search = $(\n '
' +\n ' ' +\n ' '\n );\n\n this.$searchContainer = $search;\n this.$search = $search.find('input');\n\n var $rendered = decorated.call(this);\n\n this._transferTabIndex();\n\n return $rendered;\n };\n\n Search.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('open', function () {\n self.$search.trigger('focus');\n });\n\n container.on('close', function () {\n self.$search.val('');\n self.$search.removeAttr('aria-activedescendant');\n self.$search.trigger('focus');\n });\n\n container.on('enable', function () {\n self.$search.prop('disabled', false);\n\n self._transferTabIndex();\n });\n\n container.on('disable', function () {\n self.$search.prop('disabled', true);\n });\n\n container.on('focus', function (evt) {\n self.$search.trigger('focus');\n });\n\n container.on('results:focus', function (params) {\n self.$search.attr('aria-activedescendant', params.id);\n });\n\n this.$selection.on('focusin', '.select2-search--inline', function (evt) {\n self.trigger('focus', evt);\n });\n\n this.$selection.on('focusout', '.select2-search--inline', function (evt) {\n self._handleBlur(evt);\n });\n\n this.$selection.on('keydown', '.select2-search--inline', function (evt) {\n evt.stopPropagation();\n\n self.trigger('keypress', evt);\n\n self._keyUpPrevented = evt.isDefaultPrevented();\n\n var key = evt.which;\n\n if (key === KEYS.BACKSPACE && self.$search.val() === '') {\n var $previousChoice = self.$searchContainer\n .prev('.select2-selection__choice');\n\n if ($previousChoice.length > 0) {\n var item = $previousChoice.data('data');\n\n self.searchRemoveChoice(item);\n\n evt.preventDefault();\n }\n }\n });\n\n // Try to detect the IE version should the `documentMode` property that\n // is stored on the document. This is only implemented in IE and is\n // slightly cleaner than doing a user agent check.\n // This property is not available in Edge, but Edge also doesn't have\n // this bug.\n var msie = document.documentMode;\n var disableInputEvents = msie && msie <= 11;\n\n // Workaround for browsers which do not support the `input` event\n // This will prevent double-triggering of events for browsers which support\n // both the `keyup` and `input` events.\n this.$selection.on(\n 'input.searchcheck',\n '.select2-search--inline',\n function (evt) {\n // IE will trigger the `input` event when a placeholder is used on a\n // search box. To get around this issue, we are forced to ignore all\n // `input` events in IE and keep using `keyup`.\n if (disableInputEvents) {\n self.$selection.off('input.search input.searchcheck');\n return;\n }\n\n // Unbind the duplicated `keyup` event\n self.$selection.off('keyup.search');\n }\n );\n\n this.$selection.on(\n 'keyup.search input.search',\n '.select2-search--inline',\n function (evt) {\n // IE will trigger the `input` event when a placeholder is used on a\n // search box. To get around this issue, we are forced to ignore all\n // `input` events in IE and keep using `keyup`.\n if (disableInputEvents && evt.type === 'input') {\n self.$selection.off('input.search input.searchcheck');\n return;\n }\n\n var key = evt.which;\n\n // We can freely ignore events from modifier keys\n if (key == KEYS.SHIFT || key == KEYS.CTRL || key == KEYS.ALT) {\n return;\n }\n\n // Tabbing will be handled during the `keydown` phase\n if (key == KEYS.TAB) {\n return;\n }\n\n self.handleSearch(evt);\n }\n );\n };\n\n /**\n * This method will transfer the tabindex attribute from the rendered\n * selection to the search box. This allows for the search box to be used as\n * the primary focus instead of the selection container.\n *\n * @private\n */\n Search.prototype._transferTabIndex = function (decorated) {\n this.$search.attr('tabindex', this.$selection.attr('tabindex'));\n this.$selection.attr('tabindex', '-1');\n };\n\n Search.prototype.createPlaceholder = function (decorated, placeholder) {\n this.$search.attr('placeholder', placeholder.text);\n };\n\n Search.prototype.update = function (decorated, data) {\n var searchHadFocus = this.$search[0] == document.activeElement;\n\n this.$search.attr('placeholder', '');\n\n decorated.call(this, data);\n\n this.$selection.find('.select2-selection__rendered')\n .append(this.$searchContainer);\n\n this.resizeSearch();\n if (searchHadFocus) {\n this.$search.focus();\n }\n };\n\n Search.prototype.handleSearch = function () {\n this.resizeSearch();\n\n if (!this._keyUpPrevented) {\n var input = this.$search.val();\n\n this.trigger('query', {\n term: input\n });\n }\n\n this._keyUpPrevented = false;\n };\n\n Search.prototype.searchRemoveChoice = function (decorated, item) {\n this.trigger('unselect', {\n data: item\n });\n\n this.$search.val(item.text);\n this.handleSearch();\n };\n\n Search.prototype.resizeSearch = function () {\n this.$search.css('width', '25px');\n\n var width = '';\n\n if (this.$search.attr('placeholder') !== '') {\n width = this.$selection.find('.select2-selection__rendered').innerWidth();\n } else {\n var minimumWidth = this.$search.val().length + 1;\n\n width = (minimumWidth * 0.75) + 'em';\n }\n\n this.$search.css('width', width);\n };\n\n return Search;\n});\n\nS2.define('select2/selection/eventRelay',[\n 'jquery'\n], function ($) {\n function EventRelay () { }\n\n EventRelay.prototype.bind = function (decorated, container, $container) {\n var self = this;\n var relayEvents = [\n 'open', 'opening',\n 'close', 'closing',\n 'select', 'selecting',\n 'unselect', 'unselecting'\n ];\n\n var preventableEvents = ['opening', 'closing', 'selecting', 'unselecting'];\n\n decorated.call(this, container, $container);\n\n container.on('*', function (name, params) {\n // Ignore events that should not be relayed\n if ($.inArray(name, relayEvents) === -1) {\n return;\n }\n\n // The parameters should always be an object\n params = params || {};\n\n // Generate the jQuery event for the Select2 event\n var evt = $.Event('select2:' + name, {\n params: params\n });\n\n self.$element.trigger(evt);\n\n // Only handle preventable events if it was one\n if ($.inArray(name, preventableEvents) === -1) {\n return;\n }\n\n params.prevented = evt.isDefaultPrevented();\n });\n };\n\n return EventRelay;\n});\n\nS2.define('select2/translation',[\n 'jquery',\n 'require'\n], function ($, require) {\n function Translation (dict) {\n this.dict = dict || {};\n }\n\n Translation.prototype.all = function () {\n return this.dict;\n };\n\n Translation.prototype.get = function (key) {\n return this.dict[key];\n };\n\n Translation.prototype.extend = function (translation) {\n this.dict = $.extend({}, translation.all(), this.dict);\n };\n\n // Static functions\n\n Translation._cache = {};\n\n Translation.loadPath = function (path) {\n if (!(path in Translation._cache)) {\n var translations = require(path);\n\n Translation._cache[path] = translations;\n }\n\n return new Translation(Translation._cache[path]);\n };\n\n return Translation;\n});\n\nS2.define('select2/diacritics',[\n\n], function () {\n var diacritics = {\n '\\u24B6': 'A',\n '\\uFF21': 'A',\n '\\u00C0': 'A',\n '\\u00C1': 'A',\n '\\u00C2': 'A',\n '\\u1EA6': 'A',\n '\\u1EA4': 'A',\n '\\u1EAA': 'A',\n '\\u1EA8': 'A',\n '\\u00C3': 'A',\n '\\u0100': 'A',\n '\\u0102': 'A',\n '\\u1EB0': 'A',\n '\\u1EAE': 'A',\n '\\u1EB4': 'A',\n '\\u1EB2': 'A',\n '\\u0226': 'A',\n '\\u01E0': 'A',\n '\\u00C4': 'A',\n '\\u01DE': 'A',\n '\\u1EA2': 'A',\n '\\u00C5': 'A',\n '\\u01FA': 'A',\n '\\u01CD': 'A',\n '\\u0200': 'A',\n '\\u0202': 'A',\n '\\u1EA0': 'A',\n '\\u1EAC': 'A',\n '\\u1EB6': 'A',\n '\\u1E00': 'A',\n '\\u0104': 'A',\n '\\u023A': 'A',\n '\\u2C6F': 'A',\n '\\uA732': 'AA',\n '\\u00C6': 'AE',\n '\\u01FC': 'AE',\n '\\u01E2': 'AE',\n '\\uA734': 'AO',\n '\\uA736': 'AU',\n '\\uA738': 'AV',\n '\\uA73A': 'AV',\n '\\uA73C': 'AY',\n '\\u24B7': 'B',\n '\\uFF22': 'B',\n '\\u1E02': 'B',\n '\\u1E04': 'B',\n '\\u1E06': 'B',\n '\\u0243': 'B',\n '\\u0182': 'B',\n '\\u0181': 'B',\n '\\u24B8': 'C',\n '\\uFF23': 'C',\n '\\u0106': 'C',\n '\\u0108': 'C',\n '\\u010A': 'C',\n '\\u010C': 'C',\n '\\u00C7': 'C',\n '\\u1E08': 'C',\n '\\u0187': 'C',\n '\\u023B': 'C',\n '\\uA73E': 'C',\n '\\u24B9': 'D',\n '\\uFF24': 'D',\n '\\u1E0A': 'D',\n '\\u010E': 'D',\n '\\u1E0C': 'D',\n '\\u1E10': 'D',\n '\\u1E12': 'D',\n '\\u1E0E': 'D',\n '\\u0110': 'D',\n '\\u018B': 'D',\n '\\u018A': 'D',\n '\\u0189': 'D',\n '\\uA779': 'D',\n '\\u01F1': 'DZ',\n '\\u01C4': 'DZ',\n '\\u01F2': 'Dz',\n '\\u01C5': 'Dz',\n '\\u24BA': 'E',\n '\\uFF25': 'E',\n '\\u00C8': 'E',\n '\\u00C9': 'E',\n '\\u00CA': 'E',\n '\\u1EC0': 'E',\n '\\u1EBE': 'E',\n '\\u1EC4': 'E',\n '\\u1EC2': 'E',\n '\\u1EBC': 'E',\n '\\u0112': 'E',\n '\\u1E14': 'E',\n '\\u1E16': 'E',\n '\\u0114': 'E',\n '\\u0116': 'E',\n '\\u00CB': 'E',\n '\\u1EBA': 'E',\n '\\u011A': 'E',\n '\\u0204': 'E',\n '\\u0206': 'E',\n '\\u1EB8': 'E',\n '\\u1EC6': 'E',\n '\\u0228': 'E',\n '\\u1E1C': 'E',\n '\\u0118': 'E',\n '\\u1E18': 'E',\n '\\u1E1A': 'E',\n '\\u0190': 'E',\n '\\u018E': 'E',\n '\\u24BB': 'F',\n '\\uFF26': 'F',\n '\\u1E1E': 'F',\n '\\u0191': 'F',\n '\\uA77B': 'F',\n '\\u24BC': 'G',\n '\\uFF27': 'G',\n '\\u01F4': 'G',\n '\\u011C': 'G',\n '\\u1E20': 'G',\n '\\u011E': 'G',\n '\\u0120': 'G',\n '\\u01E6': 'G',\n '\\u0122': 'G',\n '\\u01E4': 'G',\n '\\u0193': 'G',\n '\\uA7A0': 'G',\n '\\uA77D': 'G',\n '\\uA77E': 'G',\n '\\u24BD': 'H',\n '\\uFF28': 'H',\n '\\u0124': 'H',\n '\\u1E22': 'H',\n '\\u1E26': 'H',\n '\\u021E': 'H',\n '\\u1E24': 'H',\n '\\u1E28': 'H',\n '\\u1E2A': 'H',\n '\\u0126': 'H',\n '\\u2C67': 'H',\n '\\u2C75': 'H',\n '\\uA78D': 'H',\n '\\u24BE': 'I',\n '\\uFF29': 'I',\n '\\u00CC': 'I',\n '\\u00CD': 'I',\n '\\u00CE': 'I',\n '\\u0128': 'I',\n '\\u012A': 'I',\n '\\u012C': 'I',\n '\\u0130': 'I',\n '\\u00CF': 'I',\n '\\u1E2E': 'I',\n '\\u1EC8': 'I',\n '\\u01CF': 'I',\n '\\u0208': 'I',\n '\\u020A': 'I',\n '\\u1ECA': 'I',\n '\\u012E': 'I',\n '\\u1E2C': 'I',\n '\\u0197': 'I',\n '\\u24BF': 'J',\n '\\uFF2A': 'J',\n '\\u0134': 'J',\n '\\u0248': 'J',\n '\\u24C0': 'K',\n '\\uFF2B': 'K',\n '\\u1E30': 'K',\n '\\u01E8': 'K',\n '\\u1E32': 'K',\n '\\u0136': 'K',\n '\\u1E34': 'K',\n '\\u0198': 'K',\n '\\u2C69': 'K',\n '\\uA740': 'K',\n '\\uA742': 'K',\n '\\uA744': 'K',\n '\\uA7A2': 'K',\n '\\u24C1': 'L',\n '\\uFF2C': 'L',\n '\\u013F': 'L',\n '\\u0139': 'L',\n '\\u013D': 'L',\n '\\u1E36': 'L',\n '\\u1E38': 'L',\n '\\u013B': 'L',\n '\\u1E3C': 'L',\n '\\u1E3A': 'L',\n '\\u0141': 'L',\n '\\u023D': 'L',\n '\\u2C62': 'L',\n '\\u2C60': 'L',\n '\\uA748': 'L',\n '\\uA746': 'L',\n '\\uA780': 'L',\n '\\u01C7': 'LJ',\n '\\u01C8': 'Lj',\n '\\u24C2': 'M',\n '\\uFF2D': 'M',\n '\\u1E3E': 'M',\n '\\u1E40': 'M',\n '\\u1E42': 'M',\n '\\u2C6E': 'M',\n '\\u019C': 'M',\n '\\u24C3': 'N',\n '\\uFF2E': 'N',\n '\\u01F8': 'N',\n '\\u0143': 'N',\n '\\u00D1': 'N',\n '\\u1E44': 'N',\n '\\u0147': 'N',\n '\\u1E46': 'N',\n '\\u0145': 'N',\n '\\u1E4A': 'N',\n '\\u1E48': 'N',\n '\\u0220': 'N',\n '\\u019D': 'N',\n '\\uA790': 'N',\n '\\uA7A4': 'N',\n '\\u01CA': 'NJ',\n '\\u01CB': 'Nj',\n '\\u24C4': 'O',\n '\\uFF2F': 'O',\n '\\u00D2': 'O',\n '\\u00D3': 'O',\n '\\u00D4': 'O',\n '\\u1ED2': 'O',\n '\\u1ED0': 'O',\n '\\u1ED6': 'O',\n '\\u1ED4': 'O',\n '\\u00D5': 'O',\n '\\u1E4C': 'O',\n '\\u022C': 'O',\n '\\u1E4E': 'O',\n '\\u014C': 'O',\n '\\u1E50': 'O',\n '\\u1E52': 'O',\n '\\u014E': 'O',\n '\\u022E': 'O',\n '\\u0230': 'O',\n '\\u00D6': 'O',\n '\\u022A': 'O',\n '\\u1ECE': 'O',\n '\\u0150': 'O',\n '\\u01D1': 'O',\n '\\u020C': 'O',\n '\\u020E': 'O',\n '\\u01A0': 'O',\n '\\u1EDC': 'O',\n '\\u1EDA': 'O',\n '\\u1EE0': 'O',\n '\\u1EDE': 'O',\n '\\u1EE2': 'O',\n '\\u1ECC': 'O',\n '\\u1ED8': 'O',\n '\\u01EA': 'O',\n '\\u01EC': 'O',\n '\\u00D8': 'O',\n '\\u01FE': 'O',\n '\\u0186': 'O',\n '\\u019F': 'O',\n '\\uA74A': 'O',\n '\\uA74C': 'O',\n '\\u01A2': 'OI',\n '\\uA74E': 'OO',\n '\\u0222': 'OU',\n '\\u24C5': 'P',\n '\\uFF30': 'P',\n '\\u1E54': 'P',\n '\\u1E56': 'P',\n '\\u01A4': 'P',\n '\\u2C63': 'P',\n '\\uA750': 'P',\n '\\uA752': 'P',\n '\\uA754': 'P',\n '\\u24C6': 'Q',\n '\\uFF31': 'Q',\n '\\uA756': 'Q',\n '\\uA758': 'Q',\n '\\u024A': 'Q',\n '\\u24C7': 'R',\n '\\uFF32': 'R',\n '\\u0154': 'R',\n '\\u1E58': 'R',\n '\\u0158': 'R',\n '\\u0210': 'R',\n '\\u0212': 'R',\n '\\u1E5A': 'R',\n '\\u1E5C': 'R',\n '\\u0156': 'R',\n '\\u1E5E': 'R',\n '\\u024C': 'R',\n '\\u2C64': 'R',\n '\\uA75A': 'R',\n '\\uA7A6': 'R',\n '\\uA782': 'R',\n '\\u24C8': 'S',\n '\\uFF33': 'S',\n '\\u1E9E': 'S',\n '\\u015A': 'S',\n '\\u1E64': 'S',\n '\\u015C': 'S',\n '\\u1E60': 'S',\n '\\u0160': 'S',\n '\\u1E66': 'S',\n '\\u1E62': 'S',\n '\\u1E68': 'S',\n '\\u0218': 'S',\n '\\u015E': 'S',\n '\\u2C7E': 'S',\n '\\uA7A8': 'S',\n '\\uA784': 'S',\n '\\u24C9': 'T',\n '\\uFF34': 'T',\n '\\u1E6A': 'T',\n '\\u0164': 'T',\n '\\u1E6C': 'T',\n '\\u021A': 'T',\n '\\u0162': 'T',\n '\\u1E70': 'T',\n '\\u1E6E': 'T',\n '\\u0166': 'T',\n '\\u01AC': 'T',\n '\\u01AE': 'T',\n '\\u023E': 'T',\n '\\uA786': 'T',\n '\\uA728': 'TZ',\n '\\u24CA': 'U',\n '\\uFF35': 'U',\n '\\u00D9': 'U',\n '\\u00DA': 'U',\n '\\u00DB': 'U',\n '\\u0168': 'U',\n '\\u1E78': 'U',\n '\\u016A': 'U',\n '\\u1E7A': 'U',\n '\\u016C': 'U',\n '\\u00DC': 'U',\n '\\u01DB': 'U',\n '\\u01D7': 'U',\n '\\u01D5': 'U',\n '\\u01D9': 'U',\n '\\u1EE6': 'U',\n '\\u016E': 'U',\n '\\u0170': 'U',\n '\\u01D3': 'U',\n '\\u0214': 'U',\n '\\u0216': 'U',\n '\\u01AF': 'U',\n '\\u1EEA': 'U',\n '\\u1EE8': 'U',\n '\\u1EEE': 'U',\n '\\u1EEC': 'U',\n '\\u1EF0': 'U',\n '\\u1EE4': 'U',\n '\\u1E72': 'U',\n '\\u0172': 'U',\n '\\u1E76': 'U',\n '\\u1E74': 'U',\n '\\u0244': 'U',\n '\\u24CB': 'V',\n '\\uFF36': 'V',\n '\\u1E7C': 'V',\n '\\u1E7E': 'V',\n '\\u01B2': 'V',\n '\\uA75E': 'V',\n '\\u0245': 'V',\n '\\uA760': 'VY',\n '\\u24CC': 'W',\n '\\uFF37': 'W',\n '\\u1E80': 'W',\n '\\u1E82': 'W',\n '\\u0174': 'W',\n '\\u1E86': 'W',\n '\\u1E84': 'W',\n '\\u1E88': 'W',\n '\\u2C72': 'W',\n '\\u24CD': 'X',\n '\\uFF38': 'X',\n '\\u1E8A': 'X',\n '\\u1E8C': 'X',\n '\\u24CE': 'Y',\n '\\uFF39': 'Y',\n '\\u1EF2': 'Y',\n '\\u00DD': 'Y',\n '\\u0176': 'Y',\n '\\u1EF8': 'Y',\n '\\u0232': 'Y',\n '\\u1E8E': 'Y',\n '\\u0178': 'Y',\n '\\u1EF6': 'Y',\n '\\u1EF4': 'Y',\n '\\u01B3': 'Y',\n '\\u024E': 'Y',\n '\\u1EFE': 'Y',\n '\\u24CF': 'Z',\n '\\uFF3A': 'Z',\n '\\u0179': 'Z',\n '\\u1E90': 'Z',\n '\\u017B': 'Z',\n '\\u017D': 'Z',\n '\\u1E92': 'Z',\n '\\u1E94': 'Z',\n '\\u01B5': 'Z',\n '\\u0224': 'Z',\n '\\u2C7F': 'Z',\n '\\u2C6B': 'Z',\n '\\uA762': 'Z',\n '\\u24D0': 'a',\n '\\uFF41': 'a',\n '\\u1E9A': 'a',\n '\\u00E0': 'a',\n '\\u00E1': 'a',\n '\\u00E2': 'a',\n '\\u1EA7': 'a',\n '\\u1EA5': 'a',\n '\\u1EAB': 'a',\n '\\u1EA9': 'a',\n '\\u00E3': 'a',\n '\\u0101': 'a',\n '\\u0103': 'a',\n '\\u1EB1': 'a',\n '\\u1EAF': 'a',\n '\\u1EB5': 'a',\n '\\u1EB3': 'a',\n '\\u0227': 'a',\n '\\u01E1': 'a',\n '\\u00E4': 'a',\n '\\u01DF': 'a',\n '\\u1EA3': 'a',\n '\\u00E5': 'a',\n '\\u01FB': 'a',\n '\\u01CE': 'a',\n '\\u0201': 'a',\n '\\u0203': 'a',\n '\\u1EA1': 'a',\n '\\u1EAD': 'a',\n '\\u1EB7': 'a',\n '\\u1E01': 'a',\n '\\u0105': 'a',\n '\\u2C65': 'a',\n '\\u0250': 'a',\n '\\uA733': 'aa',\n '\\u00E6': 'ae',\n '\\u01FD': 'ae',\n '\\u01E3': 'ae',\n '\\uA735': 'ao',\n '\\uA737': 'au',\n '\\uA739': 'av',\n '\\uA73B': 'av',\n '\\uA73D': 'ay',\n '\\u24D1': 'b',\n '\\uFF42': 'b',\n '\\u1E03': 'b',\n '\\u1E05': 'b',\n '\\u1E07': 'b',\n '\\u0180': 'b',\n '\\u0183': 'b',\n '\\u0253': 'b',\n '\\u24D2': 'c',\n '\\uFF43': 'c',\n '\\u0107': 'c',\n '\\u0109': 'c',\n '\\u010B': 'c',\n '\\u010D': 'c',\n '\\u00E7': 'c',\n '\\u1E09': 'c',\n '\\u0188': 'c',\n '\\u023C': 'c',\n '\\uA73F': 'c',\n '\\u2184': 'c',\n '\\u24D3': 'd',\n '\\uFF44': 'd',\n '\\u1E0B': 'd',\n '\\u010F': 'd',\n '\\u1E0D': 'd',\n '\\u1E11': 'd',\n '\\u1E13': 'd',\n '\\u1E0F': 'd',\n '\\u0111': 'd',\n '\\u018C': 'd',\n '\\u0256': 'd',\n '\\u0257': 'd',\n '\\uA77A': 'd',\n '\\u01F3': 'dz',\n '\\u01C6': 'dz',\n '\\u24D4': 'e',\n '\\uFF45': 'e',\n '\\u00E8': 'e',\n '\\u00E9': 'e',\n '\\u00EA': 'e',\n '\\u1EC1': 'e',\n '\\u1EBF': 'e',\n '\\u1EC5': 'e',\n '\\u1EC3': 'e',\n '\\u1EBD': 'e',\n '\\u0113': 'e',\n '\\u1E15': 'e',\n '\\u1E17': 'e',\n '\\u0115': 'e',\n '\\u0117': 'e',\n '\\u00EB': 'e',\n '\\u1EBB': 'e',\n '\\u011B': 'e',\n '\\u0205': 'e',\n '\\u0207': 'e',\n '\\u1EB9': 'e',\n '\\u1EC7': 'e',\n '\\u0229': 'e',\n '\\u1E1D': 'e',\n '\\u0119': 'e',\n '\\u1E19': 'e',\n '\\u1E1B': 'e',\n '\\u0247': 'e',\n '\\u025B': 'e',\n '\\u01DD': 'e',\n '\\u24D5': 'f',\n '\\uFF46': 'f',\n '\\u1E1F': 'f',\n '\\u0192': 'f',\n '\\uA77C': 'f',\n '\\u24D6': 'g',\n '\\uFF47': 'g',\n '\\u01F5': 'g',\n '\\u011D': 'g',\n '\\u1E21': 'g',\n '\\u011F': 'g',\n '\\u0121': 'g',\n '\\u01E7': 'g',\n '\\u0123': 'g',\n '\\u01E5': 'g',\n '\\u0260': 'g',\n '\\uA7A1': 'g',\n '\\u1D79': 'g',\n '\\uA77F': 'g',\n '\\u24D7': 'h',\n '\\uFF48': 'h',\n '\\u0125': 'h',\n '\\u1E23': 'h',\n '\\u1E27': 'h',\n '\\u021F': 'h',\n '\\u1E25': 'h',\n '\\u1E29': 'h',\n '\\u1E2B': 'h',\n '\\u1E96': 'h',\n '\\u0127': 'h',\n '\\u2C68': 'h',\n '\\u2C76': 'h',\n '\\u0265': 'h',\n '\\u0195': 'hv',\n '\\u24D8': 'i',\n '\\uFF49': 'i',\n '\\u00EC': 'i',\n '\\u00ED': 'i',\n '\\u00EE': 'i',\n '\\u0129': 'i',\n '\\u012B': 'i',\n '\\u012D': 'i',\n '\\u00EF': 'i',\n '\\u1E2F': 'i',\n '\\u1EC9': 'i',\n '\\u01D0': 'i',\n '\\u0209': 'i',\n '\\u020B': 'i',\n '\\u1ECB': 'i',\n '\\u012F': 'i',\n '\\u1E2D': 'i',\n '\\u0268': 'i',\n '\\u0131': 'i',\n '\\u24D9': 'j',\n '\\uFF4A': 'j',\n '\\u0135': 'j',\n '\\u01F0': 'j',\n '\\u0249': 'j',\n '\\u24DA': 'k',\n '\\uFF4B': 'k',\n '\\u1E31': 'k',\n '\\u01E9': 'k',\n '\\u1E33': 'k',\n '\\u0137': 'k',\n '\\u1E35': 'k',\n '\\u0199': 'k',\n '\\u2C6A': 'k',\n '\\uA741': 'k',\n '\\uA743': 'k',\n '\\uA745': 'k',\n '\\uA7A3': 'k',\n '\\u24DB': 'l',\n '\\uFF4C': 'l',\n '\\u0140': 'l',\n '\\u013A': 'l',\n '\\u013E': 'l',\n '\\u1E37': 'l',\n '\\u1E39': 'l',\n '\\u013C': 'l',\n '\\u1E3D': 'l',\n '\\u1E3B': 'l',\n '\\u017F': 'l',\n '\\u0142': 'l',\n '\\u019A': 'l',\n '\\u026B': 'l',\n '\\u2C61': 'l',\n '\\uA749': 'l',\n '\\uA781': 'l',\n '\\uA747': 'l',\n '\\u01C9': 'lj',\n '\\u24DC': 'm',\n '\\uFF4D': 'm',\n '\\u1E3F': 'm',\n '\\u1E41': 'm',\n '\\u1E43': 'm',\n '\\u0271': 'm',\n '\\u026F': 'm',\n '\\u24DD': 'n',\n '\\uFF4E': 'n',\n '\\u01F9': 'n',\n '\\u0144': 'n',\n '\\u00F1': 'n',\n '\\u1E45': 'n',\n '\\u0148': 'n',\n '\\u1E47': 'n',\n '\\u0146': 'n',\n '\\u1E4B': 'n',\n '\\u1E49': 'n',\n '\\u019E': 'n',\n '\\u0272': 'n',\n '\\u0149': 'n',\n '\\uA791': 'n',\n '\\uA7A5': 'n',\n '\\u01CC': 'nj',\n '\\u24DE': 'o',\n '\\uFF4F': 'o',\n '\\u00F2': 'o',\n '\\u00F3': 'o',\n '\\u00F4': 'o',\n '\\u1ED3': 'o',\n '\\u1ED1': 'o',\n '\\u1ED7': 'o',\n '\\u1ED5': 'o',\n '\\u00F5': 'o',\n '\\u1E4D': 'o',\n '\\u022D': 'o',\n '\\u1E4F': 'o',\n '\\u014D': 'o',\n '\\u1E51': 'o',\n '\\u1E53': 'o',\n '\\u014F': 'o',\n '\\u022F': 'o',\n '\\u0231': 'o',\n '\\u00F6': 'o',\n '\\u022B': 'o',\n '\\u1ECF': 'o',\n '\\u0151': 'o',\n '\\u01D2': 'o',\n '\\u020D': 'o',\n '\\u020F': 'o',\n '\\u01A1': 'o',\n '\\u1EDD': 'o',\n '\\u1EDB': 'o',\n '\\u1EE1': 'o',\n '\\u1EDF': 'o',\n '\\u1EE3': 'o',\n '\\u1ECD': 'o',\n '\\u1ED9': 'o',\n '\\u01EB': 'o',\n '\\u01ED': 'o',\n '\\u00F8': 'o',\n '\\u01FF': 'o',\n '\\u0254': 'o',\n '\\uA74B': 'o',\n '\\uA74D': 'o',\n '\\u0275': 'o',\n '\\u01A3': 'oi',\n '\\u0223': 'ou',\n '\\uA74F': 'oo',\n '\\u24DF': 'p',\n '\\uFF50': 'p',\n '\\u1E55': 'p',\n '\\u1E57': 'p',\n '\\u01A5': 'p',\n '\\u1D7D': 'p',\n '\\uA751': 'p',\n '\\uA753': 'p',\n '\\uA755': 'p',\n '\\u24E0': 'q',\n '\\uFF51': 'q',\n '\\u024B': 'q',\n '\\uA757': 'q',\n '\\uA759': 'q',\n '\\u24E1': 'r',\n '\\uFF52': 'r',\n '\\u0155': 'r',\n '\\u1E59': 'r',\n '\\u0159': 'r',\n '\\u0211': 'r',\n '\\u0213': 'r',\n '\\u1E5B': 'r',\n '\\u1E5D': 'r',\n '\\u0157': 'r',\n '\\u1E5F': 'r',\n '\\u024D': 'r',\n '\\u027D': 'r',\n '\\uA75B': 'r',\n '\\uA7A7': 'r',\n '\\uA783': 'r',\n '\\u24E2': 's',\n '\\uFF53': 's',\n '\\u00DF': 's',\n '\\u015B': 's',\n '\\u1E65': 's',\n '\\u015D': 's',\n '\\u1E61': 's',\n '\\u0161': 's',\n '\\u1E67': 's',\n '\\u1E63': 's',\n '\\u1E69': 's',\n '\\u0219': 's',\n '\\u015F': 's',\n '\\u023F': 's',\n '\\uA7A9': 's',\n '\\uA785': 's',\n '\\u1E9B': 's',\n '\\u24E3': 't',\n '\\uFF54': 't',\n '\\u1E6B': 't',\n '\\u1E97': 't',\n '\\u0165': 't',\n '\\u1E6D': 't',\n '\\u021B': 't',\n '\\u0163': 't',\n '\\u1E71': 't',\n '\\u1E6F': 't',\n '\\u0167': 't',\n '\\u01AD': 't',\n '\\u0288': 't',\n '\\u2C66': 't',\n '\\uA787': 't',\n '\\uA729': 'tz',\n '\\u24E4': 'u',\n '\\uFF55': 'u',\n '\\u00F9': 'u',\n '\\u00FA': 'u',\n '\\u00FB': 'u',\n '\\u0169': 'u',\n '\\u1E79': 'u',\n '\\u016B': 'u',\n '\\u1E7B': 'u',\n '\\u016D': 'u',\n '\\u00FC': 'u',\n '\\u01DC': 'u',\n '\\u01D8': 'u',\n '\\u01D6': 'u',\n '\\u01DA': 'u',\n '\\u1EE7': 'u',\n '\\u016F': 'u',\n '\\u0171': 'u',\n '\\u01D4': 'u',\n '\\u0215': 'u',\n '\\u0217': 'u',\n '\\u01B0': 'u',\n '\\u1EEB': 'u',\n '\\u1EE9': 'u',\n '\\u1EEF': 'u',\n '\\u1EED': 'u',\n '\\u1EF1': 'u',\n '\\u1EE5': 'u',\n '\\u1E73': 'u',\n '\\u0173': 'u',\n '\\u1E77': 'u',\n '\\u1E75': 'u',\n '\\u0289': 'u',\n '\\u24E5': 'v',\n '\\uFF56': 'v',\n '\\u1E7D': 'v',\n '\\u1E7F': 'v',\n '\\u028B': 'v',\n '\\uA75F': 'v',\n '\\u028C': 'v',\n '\\uA761': 'vy',\n '\\u24E6': 'w',\n '\\uFF57': 'w',\n '\\u1E81': 'w',\n '\\u1E83': 'w',\n '\\u0175': 'w',\n '\\u1E87': 'w',\n '\\u1E85': 'w',\n '\\u1E98': 'w',\n '\\u1E89': 'w',\n '\\u2C73': 'w',\n '\\u24E7': 'x',\n '\\uFF58': 'x',\n '\\u1E8B': 'x',\n '\\u1E8D': 'x',\n '\\u24E8': 'y',\n '\\uFF59': 'y',\n '\\u1EF3': 'y',\n '\\u00FD': 'y',\n '\\u0177': 'y',\n '\\u1EF9': 'y',\n '\\u0233': 'y',\n '\\u1E8F': 'y',\n '\\u00FF': 'y',\n '\\u1EF7': 'y',\n '\\u1E99': 'y',\n '\\u1EF5': 'y',\n '\\u01B4': 'y',\n '\\u024F': 'y',\n '\\u1EFF': 'y',\n '\\u24E9': 'z',\n '\\uFF5A': 'z',\n '\\u017A': 'z',\n '\\u1E91': 'z',\n '\\u017C': 'z',\n '\\u017E': 'z',\n '\\u1E93': 'z',\n '\\u1E95': 'z',\n '\\u01B6': 'z',\n '\\u0225': 'z',\n '\\u0240': 'z',\n '\\u2C6C': 'z',\n '\\uA763': 'z',\n '\\u0386': '\\u0391',\n '\\u0388': '\\u0395',\n '\\u0389': '\\u0397',\n '\\u038A': '\\u0399',\n '\\u03AA': '\\u0399',\n '\\u038C': '\\u039F',\n '\\u038E': '\\u03A5',\n '\\u03AB': '\\u03A5',\n '\\u038F': '\\u03A9',\n '\\u03AC': '\\u03B1',\n '\\u03AD': '\\u03B5',\n '\\u03AE': '\\u03B7',\n '\\u03AF': '\\u03B9',\n '\\u03CA': '\\u03B9',\n '\\u0390': '\\u03B9',\n '\\u03CC': '\\u03BF',\n '\\u03CD': '\\u03C5',\n '\\u03CB': '\\u03C5',\n '\\u03B0': '\\u03C5',\n '\\u03C9': '\\u03C9',\n '\\u03C2': '\\u03C3'\n };\n\n return diacritics;\n});\n\nS2.define('select2/data/base',[\n '../utils'\n], function (Utils) {\n function BaseAdapter ($element, options) {\n BaseAdapter.__super__.constructor.call(this);\n }\n\n Utils.Extend(BaseAdapter, Utils.Observable);\n\n BaseAdapter.prototype.current = function (callback) {\n throw new Error('The `current` method must be defined in child classes.');\n };\n\n BaseAdapter.prototype.query = function (params, callback) {\n throw new Error('The `query` method must be defined in child classes.');\n };\n\n BaseAdapter.prototype.bind = function (container, $container) {\n // Can be implemented in subclasses\n };\n\n BaseAdapter.prototype.destroy = function () {\n // Can be implemented in subclasses\n };\n\n BaseAdapter.prototype.generateResultId = function (container, data) {\n var id = container.id + '-result-';\n\n id += Utils.generateChars(4);\n\n if (data.id != null) {\n id += '-' + data.id.toString();\n } else {\n id += '-' + Utils.generateChars(4);\n }\n return id;\n };\n\n return BaseAdapter;\n});\n\nS2.define('select2/data/select',[\n './base',\n '../utils',\n 'jquery'\n], function (BaseAdapter, Utils, $) {\n function SelectAdapter ($element, options) {\n this.$element = $element;\n this.options = options;\n\n SelectAdapter.__super__.constructor.call(this);\n }\n\n Utils.Extend(SelectAdapter, BaseAdapter);\n\n SelectAdapter.prototype.current = function (callback) {\n var data = [];\n var self = this;\n\n this.$element.find(':selected').each(function () {\n var $option = $(this);\n\n var option = self.item($option);\n\n data.push(option);\n });\n\n callback(data);\n };\n\n SelectAdapter.prototype.select = function (data) {\n var self = this;\n\n data.selected = true;\n\n // If data.element is a DOM node, use it instead\n if ($(data.element).is('option')) {\n data.element.selected = true;\n\n this.$element.trigger('change');\n\n return;\n }\n\n if (this.$element.prop('multiple')) {\n this.current(function (currentData) {\n var val = [];\n\n data = [data];\n data.push.apply(data, currentData);\n\n for (var d = 0; d < data.length; d++) {\n var id = data[d].id;\n\n if ($.inArray(id, val) === -1) {\n val.push(id);\n }\n }\n\n self.$element.val(val);\n self.$element.trigger('change');\n });\n } else {\n var val = data.id;\n\n this.$element.val(val);\n this.$element.trigger('change');\n }\n };\n\n SelectAdapter.prototype.unselect = function (data) {\n var self = this;\n\n if (!this.$element.prop('multiple')) {\n return;\n }\n\n data.selected = false;\n\n if ($(data.element).is('option')) {\n data.element.selected = false;\n\n this.$element.trigger('change');\n\n return;\n }\n\n this.current(function (currentData) {\n var val = [];\n\n for (var d = 0; d < currentData.length; d++) {\n var id = currentData[d].id;\n\n if (id !== data.id && $.inArray(id, val) === -1) {\n val.push(id);\n }\n }\n\n self.$element.val(val);\n\n self.$element.trigger('change');\n });\n };\n\n SelectAdapter.prototype.bind = function (container, $container) {\n var self = this;\n\n this.container = container;\n\n container.on('select', function (params) {\n self.select(params.data);\n });\n\n container.on('unselect', function (params) {\n self.unselect(params.data);\n });\n };\n\n SelectAdapter.prototype.destroy = function () {\n // Remove anything added to child elements\n this.$element.find('*').each(function () {\n // Remove any custom data set by Select2\n $.removeData(this, 'data');\n });\n };\n\n SelectAdapter.prototype.query = function (params, callback) {\n var data = [];\n var self = this;\n\n var $options = this.$element.children();\n\n $options.each(function () {\n var $option = $(this);\n\n if (!$option.is('option') && !$option.is('optgroup')) {\n return;\n }\n\n var option = self.item($option);\n\n var matches = self.matches(params, option);\n\n if (matches !== null) {\n data.push(matches);\n }\n });\n\n callback({\n results: data\n });\n };\n\n SelectAdapter.prototype.addOptions = function ($options) {\n Utils.appendMany(this.$element, $options);\n };\n\n SelectAdapter.prototype.option = function (data) {\n var option;\n\n if (data.children) {\n option = document.createElement('optgroup');\n option.label = data.text;\n } else {\n option = document.createElement('option');\n\n if (option.textContent !== undefined) {\n option.textContent = data.text;\n } else {\n option.innerText = data.text;\n }\n }\n\n if (data.id !== undefined) {\n option.value = data.id;\n }\n\n if (data.disabled) {\n option.disabled = true;\n }\n\n if (data.selected) {\n option.selected = true;\n }\n\n if (data.title) {\n option.title = data.title;\n }\n\n var $option = $(option);\n\n var normalizedData = this._normalizeItem(data);\n normalizedData.element = option;\n\n // Override the option's data with the combined data\n $.data(option, 'data', normalizedData);\n\n return $option;\n };\n\n SelectAdapter.prototype.item = function ($option) {\n var data = {};\n\n data = $.data($option[0], 'data');\n\n if (data != null) {\n return data;\n }\n\n if ($option.is('option')) {\n data = {\n id: $option.val(),\n text: $option.text(),\n disabled: $option.prop('disabled'),\n selected: $option.prop('selected'),\n title: $option.prop('title')\n };\n } else if ($option.is('optgroup')) {\n data = {\n text: $option.prop('label'),\n children: [],\n title: $option.prop('title')\n };\n\n var $children = $option.children('option');\n var children = [];\n\n for (var c = 0; c < $children.length; c++) {\n var $child = $($children[c]);\n\n var child = this.item($child);\n\n children.push(child);\n }\n\n data.children = children;\n }\n\n data = this._normalizeItem(data);\n data.element = $option[0];\n\n $.data($option[0], 'data', data);\n\n return data;\n };\n\n SelectAdapter.prototype._normalizeItem = function (item) {\n if (!$.isPlainObject(item)) {\n item = {\n id: item,\n text: item\n };\n }\n\n item = $.extend({}, {\n text: ''\n }, item);\n\n var defaults = {\n selected: false,\n disabled: false\n };\n\n if (item.id != null) {\n item.id = item.id.toString();\n }\n\n if (item.text != null) {\n item.text = item.text.toString();\n }\n\n if (item._resultId == null && item.id && this.container != null) {\n item._resultId = this.generateResultId(this.container, item);\n }\n\n return $.extend({}, defaults, item);\n };\n\n SelectAdapter.prototype.matches = function (params, data) {\n var matcher = this.options.get('matcher');\n\n return matcher(params, data);\n };\n\n return SelectAdapter;\n});\n\nS2.define('select2/data/array',[\n './select',\n '../utils',\n 'jquery'\n], function (SelectAdapter, Utils, $) {\n function ArrayAdapter ($element, options) {\n var data = options.get('data') || [];\n\n ArrayAdapter.__super__.constructor.call(this, $element, options);\n\n this.addOptions(this.convertToOptions(data));\n }\n\n Utils.Extend(ArrayAdapter, SelectAdapter);\n\n ArrayAdapter.prototype.select = function (data) {\n var $option = this.$element.find('option').filter(function (i, elm) {\n return elm.value == data.id.toString();\n });\n\n if ($option.length === 0) {\n $option = this.option(data);\n\n this.addOptions($option);\n }\n\n ArrayAdapter.__super__.select.call(this, data);\n };\n\n ArrayAdapter.prototype.convertToOptions = function (data) {\n var self = this;\n\n var $existing = this.$element.find('option');\n var existingIds = $existing.map(function () {\n return self.item($(this)).id;\n }).get();\n\n var $options = [];\n\n // Filter out all items except for the one passed in the argument\n function onlyItem (item) {\n return function () {\n return $(this).val() == item.id;\n };\n }\n\n for (var d = 0; d < data.length; d++) {\n var item = this._normalizeItem(data[d]);\n\n // Skip items which were pre-loaded, only merge the data\n if ($.inArray(item.id, existingIds) >= 0) {\n var $existingOption = $existing.filter(onlyItem(item));\n\n var existingData = this.item($existingOption);\n var newData = $.extend(true, {}, item, existingData);\n\n var $newOption = this.option(newData);\n\n $existingOption.replaceWith($newOption);\n\n continue;\n }\n\n var $option = this.option(item);\n\n if (item.children) {\n var $children = this.convertToOptions(item.children);\n\n Utils.appendMany($option, $children);\n }\n\n $options.push($option);\n }\n\n return $options;\n };\n\n return ArrayAdapter;\n});\n\nS2.define('select2/data/ajax',[\n './array',\n '../utils',\n 'jquery'\n], function (ArrayAdapter, Utils, $) {\n function AjaxAdapter ($element, options) {\n this.ajaxOptions = this._applyDefaults(options.get('ajax'));\n\n if (this.ajaxOptions.processResults != null) {\n this.processResults = this.ajaxOptions.processResults;\n }\n\n AjaxAdapter.__super__.constructor.call(this, $element, options);\n }\n\n Utils.Extend(AjaxAdapter, ArrayAdapter);\n\n AjaxAdapter.prototype._applyDefaults = function (options) {\n var defaults = {\n data: function (params) {\n return $.extend({}, params, {\n q: params.term\n });\n },\n transport: function (params, success, failure) {\n var $request = $.ajax(params);\n\n $request.then(success);\n $request.fail(failure);\n\n return $request;\n }\n };\n\n return $.extend({}, defaults, options, true);\n };\n\n AjaxAdapter.prototype.processResults = function (results) {\n return results;\n };\n\n AjaxAdapter.prototype.query = function (params, callback) {\n var matches = [];\n var self = this;\n\n if (this._request != null) {\n // JSONP requests cannot always be aborted\n if ($.isFunction(this._request.abort)) {\n this._request.abort();\n }\n\n this._request = null;\n }\n\n var options = $.extend({\n type: 'GET'\n }, this.ajaxOptions);\n\n if (typeof options.url === 'function') {\n options.url = options.url.call(this.$element, params);\n }\n\n if (typeof options.data === 'function') {\n options.data = options.data.call(this.$element, params);\n }\n\n function request () {\n var $request = options.transport(options, function (data) {\n var results = self.processResults(data, params);\n\n if (self.options.get('debug') && window.console && console.error) {\n // Check to make sure that the response included a `results` key.\n if (!results || !results.results || !$.isArray(results.results)) {\n console.error(\n 'Select2: The AJAX results did not return an array in the ' +\n '`results` key of the response.'\n );\n }\n }\n\n callback(results);\n }, function () {\n // Attempt to detect if a request was aborted\n // Only works if the transport exposes a status property\n if ($request.status && $request.status === '0') {\n return;\n }\n\n self.trigger('results:message', {\n message: 'errorLoading'\n });\n });\n\n self._request = $request;\n }\n\n if (this.ajaxOptions.delay && params.term != null) {\n if (this._queryTimeout) {\n window.clearTimeout(this._queryTimeout);\n }\n\n this._queryTimeout = window.setTimeout(request, this.ajaxOptions.delay);\n } else {\n request();\n }\n };\n\n return AjaxAdapter;\n});\n\nS2.define('select2/data/tags',[\n 'jquery'\n], function ($) {\n function Tags (decorated, $element, options) {\n var tags = options.get('tags');\n\n var createTag = options.get('createTag');\n\n if (createTag !== undefined) {\n this.createTag = createTag;\n }\n\n var insertTag = options.get('insertTag');\n\n if (insertTag !== undefined) {\n this.insertTag = insertTag;\n }\n\n decorated.call(this, $element, options);\n\n if ($.isArray(tags)) {\n for (var t = 0; t < tags.length; t++) {\n var tag = tags[t];\n var item = this._normalizeItem(tag);\n\n var $option = this.option(item);\n\n this.$element.append($option);\n }\n }\n }\n\n Tags.prototype.query = function (decorated, params, callback) {\n var self = this;\n\n this._removeOldTags();\n\n if (params.term == null || params.page != null) {\n decorated.call(this, params, callback);\n return;\n }\n\n function wrapper (obj, child) {\n var data = obj.results;\n\n for (var i = 0; i < data.length; i++) {\n var option = data[i];\n\n var checkChildren = (\n option.children != null &&\n !wrapper({\n results: option.children\n }, true)\n );\n\n var optionText = (option.text || '').toUpperCase();\n var paramsTerm = (params.term || '').toUpperCase();\n\n var checkText = optionText === paramsTerm;\n\n if (checkText || checkChildren) {\n if (child) {\n return false;\n }\n\n obj.data = data;\n callback(obj);\n\n return;\n }\n }\n\n if (child) {\n return true;\n }\n\n var tag = self.createTag(params);\n\n if (tag != null) {\n var $option = self.option(tag);\n $option.attr('data-select2-tag', true);\n\n self.addOptions([$option]);\n\n self.insertTag(data, tag);\n }\n\n obj.results = data;\n\n callback(obj);\n }\n\n decorated.call(this, params, wrapper);\n };\n\n Tags.prototype.createTag = function (decorated, params) {\n var term = $.trim(params.term);\n\n if (term === '') {\n return null;\n }\n\n return {\n id: term,\n text: term\n };\n };\n\n Tags.prototype.insertTag = function (_, data, tag) {\n data.unshift(tag);\n };\n\n Tags.prototype._removeOldTags = function (_) {\n var tag = this._lastTag;\n\n var $options = this.$element.find('option[data-select2-tag]');\n\n $options.each(function () {\n if (this.selected) {\n return;\n }\n\n $(this).remove();\n });\n };\n\n return Tags;\n});\n\nS2.define('select2/data/tokenizer',[\n 'jquery'\n], function ($) {\n function Tokenizer (decorated, $element, options) {\n var tokenizer = options.get('tokenizer');\n\n if (tokenizer !== undefined) {\n this.tokenizer = tokenizer;\n }\n\n decorated.call(this, $element, options);\n }\n\n Tokenizer.prototype.bind = function (decorated, container, $container) {\n decorated.call(this, container, $container);\n\n this.$search = container.dropdown.$search || container.selection.$search ||\n $container.find('.select2-search__field');\n };\n\n Tokenizer.prototype.query = function (decorated, params, callback) {\n var self = this;\n\n function createAndSelect (data) {\n // Normalize the data object so we can use it for checks\n var item = self._normalizeItem(data);\n\n // Check if the data object already exists as a tag\n // Select it if it doesn't\n var $existingOptions = self.$element.find('option').filter(function () {\n return $(this).val() === item.id;\n });\n\n // If an existing option wasn't found for it, create the option\n if (!$existingOptions.length) {\n var $option = self.option(item);\n $option.attr('data-select2-tag', true);\n\n self._removeOldTags();\n self.addOptions([$option]);\n }\n\n // Select the item, now that we know there is an option for it\n select(item);\n }\n\n function select (data) {\n self.trigger('select', {\n data: data\n });\n }\n\n params.term = params.term || '';\n\n var tokenData = this.tokenizer(params, this.options, createAndSelect);\n\n if (tokenData.term !== params.term) {\n // Replace the search term if we have the search box\n if (this.$search.length) {\n this.$search.val(tokenData.term);\n this.$search.focus();\n }\n\n params.term = tokenData.term;\n }\n\n decorated.call(this, params, callback);\n };\n\n Tokenizer.prototype.tokenizer = function (_, params, options, callback) {\n var separators = options.get('tokenSeparators') || [];\n var term = params.term;\n var i = 0;\n\n var createTag = this.createTag || function (params) {\n return {\n id: params.term,\n text: params.term\n };\n };\n\n while (i < term.length) {\n var termChar = term[i];\n\n if ($.inArray(termChar, separators) === -1) {\n i++;\n\n continue;\n }\n\n var part = term.substr(0, i);\n var partParams = $.extend({}, params, {\n term: part\n });\n\n var data = createTag(partParams);\n\n if (data == null) {\n i++;\n continue;\n }\n\n callback(data);\n\n // Reset the term to not include the tokenized portion\n term = term.substr(i + 1) || '';\n i = 0;\n }\n\n return {\n term: term\n };\n };\n\n return Tokenizer;\n});\n\nS2.define('select2/data/minimumInputLength',[\n\n], function () {\n function MinimumInputLength (decorated, $e, options) {\n this.minimumInputLength = options.get('minimumInputLength');\n\n decorated.call(this, $e, options);\n }\n\n MinimumInputLength.prototype.query = function (decorated, params, callback) {\n params.term = params.term || '';\n\n if (params.term.length < this.minimumInputLength) {\n this.trigger('results:message', {\n message: 'inputTooShort',\n args: {\n minimum: this.minimumInputLength,\n input: params.term,\n params: params\n }\n });\n\n return;\n }\n\n decorated.call(this, params, callback);\n };\n\n return MinimumInputLength;\n});\n\nS2.define('select2/data/maximumInputLength',[\n\n], function () {\n function MaximumInputLength (decorated, $e, options) {\n this.maximumInputLength = options.get('maximumInputLength');\n\n decorated.call(this, $e, options);\n }\n\n MaximumInputLength.prototype.query = function (decorated, params, callback) {\n params.term = params.term || '';\n\n if (this.maximumInputLength > 0 &&\n params.term.length > this.maximumInputLength) {\n this.trigger('results:message', {\n message: 'inputTooLong',\n args: {\n maximum: this.maximumInputLength,\n input: params.term,\n params: params\n }\n });\n\n return;\n }\n\n decorated.call(this, params, callback);\n };\n\n return MaximumInputLength;\n});\n\nS2.define('select2/data/maximumSelectionLength',[\n\n], function (){\n function MaximumSelectionLength (decorated, $e, options) {\n this.maximumSelectionLength = options.get('maximumSelectionLength');\n\n decorated.call(this, $e, options);\n }\n\n MaximumSelectionLength.prototype.query =\n function (decorated, params, callback) {\n var self = this;\n\n this.current(function (currentData) {\n var count = currentData != null ? currentData.length : 0;\n if (self.maximumSelectionLength > 0 &&\n count >= self.maximumSelectionLength) {\n self.trigger('results:message', {\n message: 'maximumSelected',\n args: {\n maximum: self.maximumSelectionLength\n }\n });\n return;\n }\n decorated.call(self, params, callback);\n });\n };\n\n return MaximumSelectionLength;\n});\n\nS2.define('select2/dropdown',[\n 'jquery',\n './utils'\n], function ($, Utils) {\n function Dropdown ($element, options) {\n this.$element = $element;\n this.options = options;\n\n Dropdown.__super__.constructor.call(this);\n }\n\n Utils.Extend(Dropdown, Utils.Observable);\n\n Dropdown.prototype.render = function () {\n var $dropdown = $(\n '
' +\n ' ' +\n ' '\n );\n\n $dropdown.attr('dir', this.options.get('dir'));\n\n this.$dropdown = $dropdown;\n\n return $dropdown;\n };\n\n Dropdown.prototype.bind = function () {\n // Should be implemented in subclasses\n };\n\n Dropdown.prototype.position = function ($dropdown, $container) {\n // Should be implmented in subclasses\n };\n\n Dropdown.prototype.destroy = function () {\n // Remove the dropdown from the DOM\n this.$dropdown.remove();\n };\n\n return Dropdown;\n});\n\nS2.define('select2/dropdown/search',[\n 'jquery',\n '../utils'\n], function ($, Utils) {\n function Search () { }\n\n Search.prototype.render = function (decorated) {\n var $rendered = decorated.call(this);\n\n var $search = $(\n '
' +\n ' ' +\n ' '\n );\n\n this.$searchContainer = $search;\n this.$search = $search.find('input');\n\n $rendered.prepend($search);\n\n return $rendered;\n };\n\n Search.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n this.$search.on('keydown', function (evt) {\n self.trigger('keypress', evt);\n\n self._keyUpPrevented = evt.isDefaultPrevented();\n });\n\n // Workaround for browsers which do not support the `input` event\n // This will prevent double-triggering of events for browsers which support\n // both the `keyup` and `input` events.\n this.$search.on('input', function (evt) {\n // Unbind the duplicated `keyup` event\n $(this).off('keyup');\n });\n\n this.$search.on('keyup input', function (evt) {\n self.handleSearch(evt);\n });\n\n container.on('open', function () {\n self.$search.attr('tabindex', 0);\n\n self.$search.focus();\n\n window.setTimeout(function () {\n self.$search.focus();\n }, 0);\n });\n\n container.on('close', function () {\n self.$search.attr('tabindex', -1);\n\n self.$search.val('');\n });\n\n container.on('focus', function () {\n if (!container.isOpen()) {\n self.$search.focus();\n }\n });\n\n container.on('results:all', function (params) {\n if (params.query.term == null || params.query.term === '') {\n var showSearch = self.showSearch(params);\n\n if (showSearch) {\n self.$searchContainer.removeClass('select2-search--hide');\n } else {\n self.$searchContainer.addClass('select2-search--hide');\n }\n }\n });\n };\n\n Search.prototype.handleSearch = function (evt) {\n if (!this._keyUpPrevented) {\n var input = this.$search.val();\n\n this.trigger('query', {\n term: input\n });\n }\n\n this._keyUpPrevented = false;\n };\n\n Search.prototype.showSearch = function (_, params) {\n return true;\n };\n\n return Search;\n});\n\nS2.define('select2/dropdown/hidePlaceholder',[\n\n], function () {\n function HidePlaceholder (decorated, $element, options, dataAdapter) {\n this.placeholder = this.normalizePlaceholder(options.get('placeholder'));\n\n decorated.call(this, $element, options, dataAdapter);\n }\n\n HidePlaceholder.prototype.append = function (decorated, data) {\n data.results = this.removePlaceholder(data.results);\n\n decorated.call(this, data);\n };\n\n HidePlaceholder.prototype.normalizePlaceholder = function (_, placeholder) {\n if (typeof placeholder === 'string') {\n placeholder = {\n id: '',\n text: placeholder\n };\n }\n\n return placeholder;\n };\n\n HidePlaceholder.prototype.removePlaceholder = function (_, data) {\n var modifiedData = data.slice(0);\n\n for (var d = data.length - 1; d >= 0; d--) {\n var item = data[d];\n\n if (this.placeholder.id === item.id) {\n modifiedData.splice(d, 1);\n }\n }\n\n return modifiedData;\n };\n\n return HidePlaceholder;\n});\n\nS2.define('select2/dropdown/infiniteScroll',[\n 'jquery'\n], function ($) {\n function InfiniteScroll (decorated, $element, options, dataAdapter) {\n this.lastParams = {};\n\n decorated.call(this, $element, options, dataAdapter);\n\n this.$loadingMore = this.createLoadingMore();\n this.loading = false;\n }\n\n InfiniteScroll.prototype.append = function (decorated, data) {\n this.$loadingMore.remove();\n this.loading = false;\n\n decorated.call(this, data);\n\n if (this.showLoadingMore(data)) {\n this.$results.append(this.$loadingMore);\n }\n };\n\n InfiniteScroll.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('query', function (params) {\n self.lastParams = params;\n self.loading = true;\n });\n\n container.on('query:append', function (params) {\n self.lastParams = params;\n self.loading = true;\n });\n\n this.$results.on('scroll', function () {\n var isLoadMoreVisible = $.contains(\n document.documentElement,\n self.$loadingMore[0]\n );\n\n if (self.loading || !isLoadMoreVisible) {\n return;\n }\n\n var currentOffset = self.$results.offset().top +\n self.$results.outerHeight(false);\n var loadingMoreOffset = self.$loadingMore.offset().top +\n self.$loadingMore.outerHeight(false);\n\n if (currentOffset + 50 >= loadingMoreOffset) {\n self.loadMore();\n }\n });\n };\n\n InfiniteScroll.prototype.loadMore = function () {\n this.loading = true;\n\n var params = $.extend({}, {page: 1}, this.lastParams);\n\n params.page++;\n\n this.trigger('query:append', params);\n };\n\n InfiniteScroll.prototype.showLoadingMore = function (_, data) {\n return data.pagination && data.pagination.more;\n };\n\n InfiniteScroll.prototype.createLoadingMore = function () {\n var $option = $(\n '
'\n );\n\n var message = this.options.get('translations').get('loadingMore');\n\n $option.html(message(this.lastParams));\n\n return $option;\n };\n\n return InfiniteScroll;\n});\n\nS2.define('select2/dropdown/attachBody',[\n 'jquery',\n '../utils'\n], function ($, Utils) {\n function AttachBody (decorated, $element, options) {\n this.$dropdownParent = options.get('dropdownParent') || $(document.body);\n\n decorated.call(this, $element, options);\n }\n\n AttachBody.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n var setupResultsEvents = false;\n\n decorated.call(this, container, $container);\n\n container.on('open', function () {\n self._showDropdown();\n self._attachPositioningHandler(container);\n\n if (!setupResultsEvents) {\n setupResultsEvents = true;\n\n container.on('results:all', function () {\n self._positionDropdown();\n self._resizeDropdown();\n });\n\n container.on('results:append', function () {\n self._positionDropdown();\n self._resizeDropdown();\n });\n }\n });\n\n container.on('close', function () {\n self._hideDropdown();\n self._detachPositioningHandler(container);\n });\n\n this.$dropdownContainer.on('mousedown', function (evt) {\n evt.stopPropagation();\n });\n };\n\n AttachBody.prototype.destroy = function (decorated) {\n decorated.call(this);\n\n this.$dropdownContainer.remove();\n };\n\n AttachBody.prototype.position = function (decorated, $dropdown, $container) {\n // Clone all of the container classes\n $dropdown.attr('class', $container.attr('class'));\n\n $dropdown.removeClass('select2');\n $dropdown.addClass('select2-container--open');\n\n $dropdown.css({\n position: 'absolute',\n top: -999999\n });\n\n this.$container = $container;\n };\n\n AttachBody.prototype.render = function (decorated) {\n var $container = $('
');\n\n var $dropdown = decorated.call(this);\n $container.append($dropdown);\n\n this.$dropdownContainer = $container;\n\n return $container;\n };\n\n AttachBody.prototype._hideDropdown = function (decorated) {\n this.$dropdownContainer.detach();\n };\n\n AttachBody.prototype._attachPositioningHandler =\n function (decorated, container) {\n var self = this;\n\n var scrollEvent = 'scroll.select2.' + container.id;\n var resizeEvent = 'resize.select2.' + container.id;\n var orientationEvent = 'orientationchange.select2.' + container.id;\n\n var $watchers = this.$container.parents().filter(Utils.hasScroll);\n $watchers.each(function () {\n $(this).data('select2-scroll-position', {\n x: $(this).scrollLeft(),\n y: $(this).scrollTop()\n });\n });\n\n $watchers.on(scrollEvent, function (ev) {\n var position = $(this).data('select2-scroll-position');\n $(this).scrollTop(position.y);\n });\n\n $(window).on(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent,\n function (e) {\n self._positionDropdown();\n self._resizeDropdown();\n });\n };\n\n AttachBody.prototype._detachPositioningHandler =\n function (decorated, container) {\n var scrollEvent = 'scroll.select2.' + container.id;\n var resizeEvent = 'resize.select2.' + container.id;\n var orientationEvent = 'orientationchange.select2.' + container.id;\n\n var $watchers = this.$container.parents().filter(Utils.hasScroll);\n $watchers.off(scrollEvent);\n\n $(window).off(scrollEvent + ' ' + resizeEvent + ' ' + orientationEvent);\n };\n\n AttachBody.prototype._positionDropdown = function () {\n var $window = $(window);\n\n var isCurrentlyAbove = this.$dropdown.hasClass('select2-dropdown--above');\n var isCurrentlyBelow = this.$dropdown.hasClass('select2-dropdown--below');\n\n var newDirection = null;\n\n var offset = this.$container.offset();\n\n offset.bottom = offset.top + this.$container.outerHeight(false);\n\n var container = {\n height: this.$container.outerHeight(false)\n };\n\n container.top = offset.top;\n container.bottom = offset.top + container.height;\n\n var dropdown = {\n height: this.$dropdown.outerHeight(false)\n };\n\n var viewport = {\n top: $window.scrollTop(),\n bottom: $window.scrollTop() + $window.height()\n };\n\n var enoughRoomAbove = viewport.top < (offset.top - dropdown.height);\n var enoughRoomBelow = viewport.bottom > (offset.bottom + dropdown.height);\n\n var css = {\n left: offset.left,\n top: container.bottom\n };\n\n // Determine what the parent element is to use for calciulating the offset\n var $offsetParent = this.$dropdownParent;\n\n // For statically positoned elements, we need to get the element\n // that is determining the offset\n if ($offsetParent.css('position') === 'static') {\n $offsetParent = $offsetParent.offsetParent();\n }\n\n var parentOffset = $offsetParent.offset();\n\n css.top -= parentOffset.top;\n css.left -= parentOffset.left;\n\n if (!isCurrentlyAbove && !isCurrentlyBelow) {\n newDirection = 'below';\n }\n\n if (!enoughRoomBelow && enoughRoomAbove && !isCurrentlyAbove) {\n newDirection = 'above';\n } else if (!enoughRoomAbove && enoughRoomBelow && isCurrentlyAbove) {\n newDirection = 'below';\n }\n\n if (newDirection == 'above' ||\n (isCurrentlyAbove && newDirection !== 'below')) {\n css.top = container.top - parentOffset.top - dropdown.height;\n }\n\n if (newDirection != null) {\n this.$dropdown\n .removeClass('select2-dropdown--below select2-dropdown--above')\n .addClass('select2-dropdown--' + newDirection);\n this.$container\n .removeClass('select2-container--below select2-container--above')\n .addClass('select2-container--' + newDirection);\n }\n\n this.$dropdownContainer.css(css);\n };\n\n AttachBody.prototype._resizeDropdown = function () {\n var css = {\n width: this.$container.outerWidth(false) + 'px'\n };\n\n if (this.options.get('dropdownAutoWidth')) {\n css.minWidth = css.width;\n css.position = 'relative';\n css.width = 'auto';\n }\n\n this.$dropdown.css(css);\n };\n\n AttachBody.prototype._showDropdown = function (decorated) {\n this.$dropdownContainer.appendTo(this.$dropdownParent);\n\n this._positionDropdown();\n this._resizeDropdown();\n };\n\n return AttachBody;\n});\n\nS2.define('select2/dropdown/minimumResultsForSearch',[\n\n], function () {\n function countResults (data) {\n var count = 0;\n\n for (var d = 0; d < data.length; d++) {\n var item = data[d];\n\n if (item.children) {\n count += countResults(item.children);\n } else {\n count++;\n }\n }\n\n return count;\n }\n\n function MinimumResultsForSearch (decorated, $element, options, dataAdapter) {\n this.minimumResultsForSearch = options.get('minimumResultsForSearch');\n\n if (this.minimumResultsForSearch < 0) {\n this.minimumResultsForSearch = Infinity;\n }\n\n decorated.call(this, $element, options, dataAdapter);\n }\n\n MinimumResultsForSearch.prototype.showSearch = function (decorated, params) {\n if (countResults(params.data.results) < this.minimumResultsForSearch) {\n return false;\n }\n\n return decorated.call(this, params);\n };\n\n return MinimumResultsForSearch;\n});\n\nS2.define('select2/dropdown/selectOnClose',[\n\n], function () {\n function SelectOnClose () { }\n\n SelectOnClose.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('close', function (params) {\n self._handleSelectOnClose(params);\n });\n };\n\n SelectOnClose.prototype._handleSelectOnClose = function (_, params) {\n if (params && params.originalSelect2Event != null) {\n var event = params.originalSelect2Event;\n\n // Don't select an item if the close event was triggered from a select or\n // unselect event\n if (event._type === 'select' || event._type === 'unselect') {\n return;\n }\n }\n\n var $highlightedResults = this.getHighlightedResults();\n\n // Only select highlighted results\n if ($highlightedResults.length < 1) {\n return;\n }\n\n var data = $highlightedResults.data('data');\n\n // Don't re-select already selected resulte\n if (\n (data.element != null && data.element.selected) ||\n (data.element == null && data.selected)\n ) {\n return;\n }\n\n this.trigger('select', {\n data: data\n });\n };\n\n return SelectOnClose;\n});\n\nS2.define('select2/dropdown/closeOnSelect',[\n\n], function () {\n function CloseOnSelect () { }\n\n CloseOnSelect.prototype.bind = function (decorated, container, $container) {\n var self = this;\n\n decorated.call(this, container, $container);\n\n container.on('select', function (evt) {\n self._selectTriggered(evt);\n });\n\n container.on('unselect', function (evt) {\n self._selectTriggered(evt);\n });\n };\n\n CloseOnSelect.prototype._selectTriggered = function (_, evt) {\n var originalEvent = evt.originalEvent;\n\n // Don't close if the control key is being held\n if (originalEvent && originalEvent.ctrlKey) {\n return;\n }\n\n this.trigger('close', {\n originalEvent: originalEvent,\n originalSelect2Event: evt\n });\n };\n\n return CloseOnSelect;\n});\n\nS2.define('select2/i18n/en',[],function () {\n // English\n return {\n errorLoading: function () {\n return 'The results could not be loaded.';\n },\n inputTooLong: function (args) {\n var overChars = args.input.length - args.maximum;\n\n var message = 'Please delete ' + overChars + ' character';\n\n if (overChars != 1) {\n message += 's';\n }\n\n return message;\n },\n inputTooShort: function (args) {\n var remainingChars = args.minimum - args.input.length;\n\n var message = 'Please enter ' + remainingChars + ' or more characters';\n\n return message;\n },\n loadingMore: function () {\n return 'Loading more results…';\n },\n maximumSelected: function (args) {\n var message = 'You can only select ' + args.maximum + ' item';\n\n if (args.maximum != 1) {\n message += 's';\n }\n\n return message;\n },\n noResults: function () {\n return 'No results found';\n },\n searching: function () {\n return 'Searching…';\n }\n };\n});\n\nS2.define('select2/defaults',[\n 'jquery',\n 'require',\n\n './results',\n\n './selection/single',\n './selection/multiple',\n './selection/placeholder',\n './selection/allowClear',\n './selection/search',\n './selection/eventRelay',\n\n './utils',\n './translation',\n './diacritics',\n\n './data/select',\n './data/array',\n './data/ajax',\n './data/tags',\n './data/tokenizer',\n './data/minimumInputLength',\n './data/maximumInputLength',\n './data/maximumSelectionLength',\n\n './dropdown',\n './dropdown/search',\n './dropdown/hidePlaceholder',\n './dropdown/infiniteScroll',\n './dropdown/attachBody',\n './dropdown/minimumResultsForSearch',\n './dropdown/selectOnClose',\n './dropdown/closeOnSelect',\n\n './i18n/en'\n], function ($, require,\n\n ResultsList,\n\n SingleSelection, MultipleSelection, Placeholder, AllowClear,\n SelectionSearch, EventRelay,\n\n Utils, Translation, DIACRITICS,\n\n SelectData, ArrayData, AjaxData, Tags, Tokenizer,\n MinimumInputLength, MaximumInputLength, MaximumSelectionLength,\n\n Dropdown, DropdownSearch, HidePlaceholder, InfiniteScroll,\n AttachBody, MinimumResultsForSearch, SelectOnClose, CloseOnSelect,\n\n EnglishTranslation) {\n function Defaults () {\n this.reset();\n }\n\n Defaults.prototype.apply = function (options) {\n options = $.extend(true, {}, this.defaults, options);\n\n if (options.dataAdapter == null) {\n if (options.ajax != null) {\n options.dataAdapter = AjaxData;\n } else if (options.data != null) {\n options.dataAdapter = ArrayData;\n } else {\n options.dataAdapter = SelectData;\n }\n\n if (options.minimumInputLength > 0) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n MinimumInputLength\n );\n }\n\n if (options.maximumInputLength > 0) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n MaximumInputLength\n );\n }\n\n if (options.maximumSelectionLength > 0) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n MaximumSelectionLength\n );\n }\n\n if (options.tags) {\n options.dataAdapter = Utils.Decorate(options.dataAdapter, Tags);\n }\n\n if (options.tokenSeparators != null || options.tokenizer != null) {\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n Tokenizer\n );\n }\n\n if (options.query != null) {\n var Query = require(options.amdBase + 'compat/query');\n\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n Query\n );\n }\n\n if (options.initSelection != null) {\n var InitSelection = require(options.amdBase + 'compat/initSelection');\n\n options.dataAdapter = Utils.Decorate(\n options.dataAdapter,\n InitSelection\n );\n }\n }\n\n if (options.resultsAdapter == null) {\n options.resultsAdapter = ResultsList;\n\n if (options.ajax != null) {\n options.resultsAdapter = Utils.Decorate(\n options.resultsAdapter,\n InfiniteScroll\n );\n }\n\n if (options.placeholder != null) {\n options.resultsAdapter = Utils.Decorate(\n options.resultsAdapter,\n HidePlaceholder\n );\n }\n\n if (options.selectOnClose) {\n options.resultsAdapter = Utils.Decorate(\n options.resultsAdapter,\n SelectOnClose\n );\n }\n }\n\n if (options.dropdownAdapter == null) {\n if (options.multiple) {\n options.dropdownAdapter = Dropdown;\n } else {\n var SearchableDropdown = Utils.Decorate(Dropdown, DropdownSearch);\n\n options.dropdownAdapter = SearchableDropdown;\n }\n\n if (options.minimumResultsForSearch !== 0) {\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n MinimumResultsForSearch\n );\n }\n\n if (options.closeOnSelect) {\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n CloseOnSelect\n );\n }\n\n if (\n options.dropdownCssClass != null ||\n options.dropdownCss != null ||\n options.adaptDropdownCssClass != null\n ) {\n var DropdownCSS = require(options.amdBase + 'compat/dropdownCss');\n\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n DropdownCSS\n );\n }\n\n options.dropdownAdapter = Utils.Decorate(\n options.dropdownAdapter,\n AttachBody\n );\n }\n\n if (options.selectionAdapter == null) {\n if (options.multiple) {\n options.selectionAdapter = MultipleSelection;\n } else {\n options.selectionAdapter = SingleSelection;\n }\n\n // Add the placeholder mixin if a placeholder was specified\n if (options.placeholder != null) {\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n Placeholder\n );\n }\n\n if (options.allowClear) {\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n AllowClear\n );\n }\n\n if (options.multiple) {\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n SelectionSearch\n );\n }\n\n if (\n options.containerCssClass != null ||\n options.containerCss != null ||\n options.adaptContainerCssClass != null\n ) {\n var ContainerCSS = require(options.amdBase + 'compat/containerCss');\n\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n ContainerCSS\n );\n }\n\n options.selectionAdapter = Utils.Decorate(\n options.selectionAdapter,\n EventRelay\n );\n }\n\n if (typeof options.language === 'string') {\n // Check if the language is specified with a region\n if (options.language.indexOf('-') > 0) {\n // Extract the region information if it is included\n var languageParts = options.language.split('-');\n var baseLanguage = languageParts[0];\n\n options.language = [options.language, baseLanguage];\n } else {\n options.language = [options.language];\n }\n }\n\n if ($.isArray(options.language)) {\n var languages = new Translation();\n options.language.push('en');\n\n var languageNames = options.language;\n\n for (var l = 0; l < languageNames.length; l++) {\n var name = languageNames[l];\n var language = {};\n\n try {\n // Try to load it with the original name\n language = Translation.loadPath(name);\n } catch (e) {\n try {\n // If we couldn't load it, check if it wasn't the full path\n name = this.defaults.amdLanguageBase + name;\n language = Translation.loadPath(name);\n } catch (ex) {\n // The translation could not be loaded at all. Sometimes this is\n // because of a configuration problem, other times this can be\n // because of how Select2 helps load all possible translation files.\n if (options.debug && window.console && console.warn) {\n console.warn(\n 'Select2: The language file for \"' + name + '\" could not be ' +\n 'automatically loaded. A fallback will be used instead.'\n );\n }\n\n continue;\n }\n }\n\n languages.extend(language);\n }\n\n options.translations = languages;\n } else {\n var baseTranslation = Translation.loadPath(\n this.defaults.amdLanguageBase + 'en'\n );\n var customTranslation = new Translation(options.language);\n\n customTranslation.extend(baseTranslation);\n\n options.translations = customTranslation;\n }\n\n return options;\n };\n\n Defaults.prototype.reset = function () {\n function stripDiacritics (text) {\n // Used 'uni range + named function' from http://jsperf.com/diacritics/18\n function match(a) {\n return DIACRITICS[a] || a;\n }\n\n return text.replace(/[^\\u0000-\\u007E]/g, match);\n }\n\n function matcher (params, data) {\n // Always return the object if there is nothing to compare\n if ($.trim(params.term) === '') {\n return data;\n }\n\n // Do a recursive check for options with children\n if (data.children && data.children.length > 0) {\n // Clone the data object if there are children\n // This is required as we modify the object to remove any non-matches\n var match = $.extend(true, {}, data);\n\n // Check each child of the option\n for (var c = data.children.length - 1; c >= 0; c--) {\n var child = data.children[c];\n\n var matches = matcher(params, child);\n\n // If there wasn't a match, remove the object in the array\n if (matches == null) {\n match.children.splice(c, 1);\n }\n }\n\n // If any children matched, return the new object\n if (match.children.length > 0) {\n return match;\n }\n\n // If there were no matching children, check just the plain object\n return matcher(params, match);\n }\n\n var original = stripDiacritics(data.text).toUpperCase();\n var term = stripDiacritics(params.term).toUpperCase();\n\n // Check if the text contains the term\n if (original.indexOf(term) > -1) {\n return data;\n }\n\n // If it doesn't contain the term, don't return anything\n return null;\n }\n\n this.defaults = {\n amdBase: './',\n amdLanguageBase: './i18n/',\n closeOnSelect: true,\n debug: false,\n dropdownAutoWidth: false,\n escapeMarkup: Utils.escapeMarkup,\n language: EnglishTranslation,\n matcher: matcher,\n minimumInputLength: 0,\n maximumInputLength: 0,\n maximumSelectionLength: 0,\n minimumResultsForSearch: 0,\n selectOnClose: false,\n sorter: function (data) {\n return data;\n },\n templateResult: function (result) {\n return result.text;\n },\n templateSelection: function (selection) {\n return selection.text;\n },\n theme: 'default',\n width: 'resolve'\n };\n };\n\n Defaults.prototype.set = function (key, value) {\n var camelKey = $.camelCase(key);\n\n var data = {};\n data[camelKey] = value;\n\n var convertedData = Utils._convertData(data);\n\n $.extend(this.defaults, convertedData);\n };\n\n var defaults = new Defaults();\n\n return defaults;\n});\n\nS2.define('select2/options',[\n 'require',\n 'jquery',\n './defaults',\n './utils'\n], function (require, $, Defaults, Utils) {\n function Options (options, $element) {\n this.options = options;\n\n if ($element != null) {\n this.fromElement($element);\n }\n\n this.options = Defaults.apply(this.options);\n\n if ($element && $element.is('input')) {\n var InputCompat = require(this.get('amdBase') + 'compat/inputData');\n\n this.options.dataAdapter = Utils.Decorate(\n this.options.dataAdapter,\n InputCompat\n );\n }\n }\n\n Options.prototype.fromElement = function ($e) {\n var excludedData = ['select2'];\n\n if (this.options.multiple == null) {\n this.options.multiple = $e.prop('multiple');\n }\n\n if (this.options.disabled == null) {\n this.options.disabled = $e.prop('disabled');\n }\n\n if (this.options.language == null) {\n if ($e.prop('lang')) {\n this.options.language = $e.prop('lang').toLowerCase();\n } else if ($e.closest('[lang]').prop('lang')) {\n this.options.language = $e.closest('[lang]').prop('lang');\n }\n }\n\n if (this.options.dir == null) {\n if ($e.prop('dir')) {\n this.options.dir = $e.prop('dir');\n } else if ($e.closest('[dir]').prop('dir')) {\n this.options.dir = $e.closest('[dir]').prop('dir');\n } else {\n this.options.dir = 'ltr';\n }\n }\n\n $e.prop('disabled', this.options.disabled);\n $e.prop('multiple', this.options.multiple);\n\n if ($e.data('select2Tags')) {\n if (this.options.debug && window.console && console.warn) {\n console.warn(\n 'Select2: The `data-select2-tags` attribute has been changed to ' +\n 'use the `data-data` and `data-tags=\"true\"` attributes and will be ' +\n 'removed in future versions of Select2.'\n );\n }\n\n $e.data('data', $e.data('select2Tags'));\n $e.data('tags', true);\n }\n\n if ($e.data('ajaxUrl')) {\n if (this.options.debug && window.console && console.warn) {\n console.warn(\n 'Select2: The `data-ajax-url` attribute has been changed to ' +\n '`data-ajax--url` and support for the old attribute will be removed' +\n ' in future versions of Select2.'\n );\n }\n\n $e.attr('ajax--url', $e.data('ajaxUrl'));\n $e.data('ajax--url', $e.data('ajaxUrl'));\n }\n\n var dataset = {};\n\n // Prefer the element's `dataset` attribute if it exists\n // jQuery 1.x does not correctly handle data attributes with multiple dashes\n if ($.fn.jquery && $.fn.jquery.substr(0, 2) == '1.' && $e[0].dataset) {\n dataset = $.extend(true, {}, $e[0].dataset, $e.data());\n } else {\n dataset = $e.data();\n }\n\n var data = $.extend(true, {}, dataset);\n\n data = Utils._convertData(data);\n\n for (var key in data) {\n if ($.inArray(key, excludedData) > -1) {\n continue;\n }\n\n if ($.isPlainObject(this.options[key])) {\n $.extend(this.options[key], data[key]);\n } else {\n this.options[key] = data[key];\n }\n }\n\n return this;\n };\n\n Options.prototype.get = function (key) {\n return this.options[key];\n };\n\n Options.prototype.set = function (key, val) {\n this.options[key] = val;\n };\n\n return Options;\n});\n\nS2.define('select2/core',[\n 'jquery',\n './options',\n './utils',\n './keys'\n], function ($, Options, Utils, KEYS) {\n var Select2 = function ($element, options) {\n if ($element.data('select2') != null) {\n $element.data('select2').destroy();\n }\n\n this.$element = $element;\n\n this.id = this._generateId($element);\n\n options = options || {};\n\n this.options = new Options(options, $element);\n\n Select2.__super__.constructor.call(this);\n\n // Set up the tabindex\n\n var tabindex = $element.attr('tabindex') || 0;\n $element.data('old-tabindex', tabindex);\n $element.attr('tabindex', '-1');\n\n // Set up containers and adapters\n\n var DataAdapter = this.options.get('dataAdapter');\n this.dataAdapter = new DataAdapter($element, this.options);\n\n var $container = this.render();\n\n this._placeContainer($container);\n\n var SelectionAdapter = this.options.get('selectionAdapter');\n this.selection = new SelectionAdapter($element, this.options);\n this.$selection = this.selection.render();\n\n this.selection.position(this.$selection, $container);\n\n var DropdownAdapter = this.options.get('dropdownAdapter');\n this.dropdown = new DropdownAdapter($element, this.options);\n this.$dropdown = this.dropdown.render();\n\n this.dropdown.position(this.$dropdown, $container);\n\n var ResultsAdapter = this.options.get('resultsAdapter');\n this.results = new ResultsAdapter($element, this.options, this.dataAdapter);\n this.$results = this.results.render();\n\n this.results.position(this.$results, this.$dropdown);\n\n // Bind events\n\n var self = this;\n\n // Bind the container to all of the adapters\n this._bindAdapters();\n\n // Register any DOM event handlers\n this._registerDomEvents();\n\n // Register any internal event handlers\n this._registerDataEvents();\n this._registerSelectionEvents();\n this._registerDropdownEvents();\n this._registerResultsEvents();\n this._registerEvents();\n\n // Set the initial state\n this.dataAdapter.current(function (initialData) {\n self.trigger('selection:update', {\n data: initialData\n });\n });\n\n // Hide the original select\n $element.addClass('select2-hidden-accessible');\n $element.attr('aria-hidden', 'true');\n\n // Synchronize any monitored attributes\n this._syncAttributes();\n\n $element.data('select2', this);\n };\n\n Utils.Extend(Select2, Utils.Observable);\n\n Select2.prototype._generateId = function ($element) {\n var id = '';\n\n if ($element.attr('id') != null) {\n id = $element.attr('id');\n } else if ($element.attr('name') != null) {\n id = $element.attr('name') + '-' + Utils.generateChars(2);\n } else {\n id = Utils.generateChars(4);\n }\n\n id = id.replace(/(:|\\.|\\[|\\]|,)/g, '');\n id = 'select2-' + id;\n\n return id;\n };\n\n Select2.prototype._placeContainer = function ($container) {\n $container.insertAfter(this.$element);\n\n var width = this._resolveWidth(this.$element, this.options.get('width'));\n\n if (width != null) {\n $container.css('width', width);\n }\n };\n\n Select2.prototype._resolveWidth = function ($element, method) {\n var WIDTH = /^width:(([-+]?([0-9]*\\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;\n\n if (method == 'resolve') {\n var styleWidth = this._resolveWidth($element, 'style');\n\n if (styleWidth != null) {\n return styleWidth;\n }\n\n return this._resolveWidth($element, 'element');\n }\n\n if (method == 'element') {\n var elementWidth = $element.outerWidth(false);\n\n if (elementWidth <= 0) {\n return 'auto';\n }\n\n return elementWidth + 'px';\n }\n\n if (method == 'style') {\n var style = $element.attr('style');\n\n if (typeof(style) !== 'string') {\n return null;\n }\n\n var attrs = style.split(';');\n\n for (var i = 0, l = attrs.length; i < l; i = i + 1) {\n var attr = attrs[i].replace(/\\s/g, '');\n var matches = attr.match(WIDTH);\n\n if (matches !== null && matches.length >= 1) {\n return matches[1];\n }\n }\n\n return null;\n }\n\n return method;\n };\n\n Select2.prototype._bindAdapters = function () {\n this.dataAdapter.bind(this, this.$container);\n this.selection.bind(this, this.$container);\n\n this.dropdown.bind(this, this.$container);\n this.results.bind(this, this.$container);\n };\n\n Select2.prototype._registerDomEvents = function () {\n var self = this;\n\n this.$element.on('change.select2', function () {\n self.dataAdapter.current(function (data) {\n self.trigger('selection:update', {\n data: data\n });\n });\n });\n\n this.$element.on('focus.select2', function (evt) {\n self.trigger('focus', evt);\n });\n\n this._syncA = Utils.bind(this._syncAttributes, this);\n this._syncS = Utils.bind(this._syncSubtree, this);\n\n if (this.$element[0].attachEvent) {\n this.$element[0].attachEvent('onpropertychange', this._syncA);\n }\n\n var observer = window.MutationObserver ||\n window.WebKitMutationObserver ||\n window.MozMutationObserver\n ;\n\n if (observer != null) {\n this._observer = new observer(function (mutations) {\n $.each(mutations, self._syncA);\n $.each(mutations, self._syncS);\n });\n this._observer.observe(this.$element[0], {\n attributes: true,\n childList: true,\n subtree: false\n });\n } else if (this.$element[0].addEventListener) {\n this.$element[0].addEventListener(\n 'DOMAttrModified',\n self._syncA,\n false\n );\n this.$element[0].addEventListener(\n 'DOMNodeInserted',\n self._syncS,\n false\n );\n this.$element[0].addEventListener(\n 'DOMNodeRemoved',\n self._syncS,\n false\n );\n }\n };\n\n Select2.prototype._registerDataEvents = function () {\n var self = this;\n\n this.dataAdapter.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerSelectionEvents = function () {\n var self = this;\n var nonRelayEvents = ['toggle', 'focus'];\n\n this.selection.on('toggle', function () {\n self.toggleDropdown();\n });\n\n this.selection.on('focus', function (params) {\n self.focus(params);\n });\n\n this.selection.on('*', function (name, params) {\n if ($.inArray(name, nonRelayEvents) !== -1) {\n return;\n }\n\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerDropdownEvents = function () {\n var self = this;\n\n this.dropdown.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerResultsEvents = function () {\n var self = this;\n\n this.results.on('*', function (name, params) {\n self.trigger(name, params);\n });\n };\n\n Select2.prototype._registerEvents = function () {\n var self = this;\n\n this.on('open', function () {\n self.$container.addClass('select2-container--open');\n });\n\n this.on('close', function () {\n self.$container.removeClass('select2-container--open');\n });\n\n this.on('enable', function () {\n self.$container.removeClass('select2-container--disabled');\n });\n\n this.on('disable', function () {\n self.$container.addClass('select2-container--disabled');\n });\n\n this.on('blur', function () {\n self.$container.removeClass('select2-container--focus');\n });\n\n this.on('query', function (params) {\n if (!self.isOpen()) {\n self.trigger('open', {});\n }\n\n this.dataAdapter.query(params, function (data) {\n self.trigger('results:all', {\n data: data,\n query: params\n });\n });\n });\n\n this.on('query:append', function (params) {\n this.dataAdapter.query(params, function (data) {\n self.trigger('results:append', {\n data: data,\n query: params\n });\n });\n });\n\n this.on('keypress', function (evt) {\n var key = evt.which;\n\n if (self.isOpen()) {\n if (key === KEYS.ESC || key === KEYS.TAB ||\n (key === KEYS.UP && evt.altKey)) {\n self.close();\n\n evt.preventDefault();\n } else if (key === KEYS.ENTER) {\n self.trigger('results:select', {});\n\n evt.preventDefault();\n } else if ((key === KEYS.SPACE && evt.ctrlKey)) {\n self.trigger('results:toggle', {});\n\n evt.preventDefault();\n } else if (key === KEYS.UP) {\n self.trigger('results:previous', {});\n\n evt.preventDefault();\n } else if (key === KEYS.DOWN) {\n self.trigger('results:next', {});\n\n evt.preventDefault();\n }\n } else {\n if (key === KEYS.ENTER || key === KEYS.SPACE ||\n (key === KEYS.DOWN && evt.altKey)) {\n self.open();\n\n evt.preventDefault();\n }\n }\n });\n };\n\n Select2.prototype._syncAttributes = function () {\n this.options.set('disabled', this.$element.prop('disabled'));\n\n if (this.options.get('disabled')) {\n if (this.isOpen()) {\n this.close();\n }\n\n this.trigger('disable', {});\n } else {\n this.trigger('enable', {});\n }\n };\n\n Select2.prototype._syncSubtree = function (evt, mutations) {\n var changed = false;\n var self = this;\n\n // Ignore any mutation events raised for elements that aren't options or\n // optgroups. This handles the case when the select element is destroyed\n if (\n evt && evt.target && (\n evt.target.nodeName !== 'OPTION' && evt.target.nodeName !== 'OPTGROUP'\n )\n ) {\n return;\n }\n\n if (!mutations) {\n // If mutation events aren't supported, then we can only assume that the\n // change affected the selections\n changed = true;\n } else if (mutations.addedNodes && mutations.addedNodes.length > 0) {\n for (var n = 0; n < mutations.addedNodes.length; n++) {\n var node = mutations.addedNodes[n];\n\n if (node.selected) {\n changed = true;\n }\n }\n } else if (mutations.removedNodes && mutations.removedNodes.length > 0) {\n changed = true;\n }\n\n // Only re-pull the data if we think there is a change\n if (changed) {\n this.dataAdapter.current(function (currentData) {\n self.trigger('selection:update', {\n data: currentData\n });\n });\n }\n };\n\n /**\n * Override the trigger method to automatically trigger pre-events when\n * there are events that can be prevented.\n */\n Select2.prototype.trigger = function (name, args) {\n var actualTrigger = Select2.__super__.trigger;\n var preTriggerMap = {\n 'open': 'opening',\n 'close': 'closing',\n 'select': 'selecting',\n 'unselect': 'unselecting'\n };\n\n if (args === undefined) {\n args = {};\n }\n\n if (name in preTriggerMap) {\n var preTriggerName = preTriggerMap[name];\n var preTriggerArgs = {\n prevented: false,\n name: name,\n args: args\n };\n\n actualTrigger.call(this, preTriggerName, preTriggerArgs);\n\n if (preTriggerArgs.prevented) {\n args.prevented = true;\n\n return;\n }\n }\n\n actualTrigger.call(this, name, args);\n };\n\n Select2.prototype.toggleDropdown = function () {\n if (this.options.get('disabled')) {\n return;\n }\n\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n };\n\n Select2.prototype.open = function () {\n if (this.isOpen()) {\n return;\n }\n\n this.trigger('query', {});\n };\n\n Select2.prototype.close = function () {\n if (!this.isOpen()) {\n return;\n }\n\n this.trigger('close', {});\n };\n\n Select2.prototype.isOpen = function () {\n return this.$container.hasClass('select2-container--open');\n };\n\n Select2.prototype.hasFocus = function () {\n return this.$container.hasClass('select2-container--focus');\n };\n\n Select2.prototype.focus = function (data) {\n // No need to re-trigger focus events if we are already focused\n if (this.hasFocus()) {\n return;\n }\n\n this.$container.addClass('select2-container--focus');\n this.trigger('focus', {});\n };\n\n Select2.prototype.enable = function (args) {\n if (this.options.get('debug') && window.console && console.warn) {\n console.warn(\n 'Select2: The `select2(\"enable\")` method has been deprecated and will' +\n ' be removed in later Select2 versions. Use $element.prop(\"disabled\")' +\n ' instead.'\n );\n }\n\n if (args == null || args.length === 0) {\n args = [true];\n }\n\n var disabled = !args[0];\n\n this.$element.prop('disabled', disabled);\n };\n\n Select2.prototype.data = function () {\n if (this.options.get('debug') &&\n arguments.length > 0 && window.console && console.warn) {\n console.warn(\n 'Select2: Data can no longer be set using `select2(\"data\")`. You ' +\n 'should consider setting the value instead using `$element.val()`.'\n );\n }\n\n var data = [];\n\n this.dataAdapter.current(function (currentData) {\n data = currentData;\n });\n\n return data;\n };\n\n Select2.prototype.val = function (args) {\n if (this.options.get('debug') && window.console && console.warn) {\n console.warn(\n 'Select2: The `select2(\"val\")` method has been deprecated and will be' +\n ' removed in later Select2 versions. Use $element.val() instead.'\n );\n }\n\n if (args == null || args.length === 0) {\n return this.$element.val();\n }\n\n var newVal = args[0];\n\n if ($.isArray(newVal)) {\n newVal = $.map(newVal, function (obj) {\n return obj.toString();\n });\n }\n\n this.$element.val(newVal).trigger('change');\n };\n\n Select2.prototype.destroy = function () {\n this.$container.remove();\n\n if (this.$element[0].detachEvent) {\n this.$element[0].detachEvent('onpropertychange', this._syncA);\n }\n\n if (this._observer != null) {\n this._observer.disconnect();\n this._observer = null;\n } else if (this.$element[0].removeEventListener) {\n this.$element[0]\n .removeEventListener('DOMAttrModified', this._syncA, false);\n this.$element[0]\n .removeEventListener('DOMNodeInserted', this._syncS, false);\n this.$element[0]\n .removeEventListener('DOMNodeRemoved', this._syncS, false);\n }\n\n this._syncA = null;\n this._syncS = null;\n\n this.$element.off('.select2');\n this.$element.attr('tabindex', this.$element.data('old-tabindex'));\n\n this.$element.removeClass('select2-hidden-accessible');\n this.$element.attr('aria-hidden', 'false');\n this.$element.removeData('select2');\n\n this.dataAdapter.destroy();\n this.selection.destroy();\n this.dropdown.destroy();\n this.results.destroy();\n\n this.dataAdapter = null;\n this.selection = null;\n this.dropdown = null;\n this.results = null;\n };\n\n Select2.prototype.render = function () {\n var $container = $(\n '
' +\n ' ' +\n ' ' +\n ' '\n );\n\n $container.attr('dir', this.options.get('dir'));\n\n this.$container = $container;\n\n this.$container.addClass('select2-container--' + this.options.get('theme'));\n\n $container.data('element', this.$element);\n\n return $container;\n };\n\n return Select2;\n});\n\nS2.define('jquery-mousewheel',[\n 'jquery'\n], function ($) {\n // Used to shim jQuery.mousewheel for non-full builds.\n return $;\n});\n\nS2.define('jquery.select2',[\n 'jquery',\n 'jquery-mousewheel',\n\n './select2/core',\n './select2/defaults'\n], function ($, _, Select2, Defaults) {\n if ($.fn.select2 == null) {\n // All methods that should return the element\n var thisMethods = ['open', 'close', 'destroy'];\n\n $.fn.select2 = function (options) {\n options = options || {};\n\n if (typeof options === 'object') {\n this.each(function () {\n var instanceOptions = $.extend(true, {}, options);\n\n var instance = new Select2($(this), instanceOptions);\n });\n\n return this;\n } else if (typeof options === 'string') {\n var ret;\n var args = Array.prototype.slice.call(arguments, 1);\n\n this.each(function () {\n var instance = $(this).data('select2');\n\n if (instance == null && window.console && console.error) {\n console.error(\n 'The select2(\\'' + options + '\\') method was called on an ' +\n 'element that is not using Select2.'\n );\n }\n\n ret = instance[options].apply(instance, args);\n });\n\n // Check if we should be returning `this`\n if ($.inArray(options, thisMethods) > -1) {\n return this;\n }\n\n return ret;\n } else {\n throw new Error('Invalid arguments for Select2: ' + options);\n }\n };\n }\n\n if ($.fn.select2.defaults == null) {\n $.fn.select2.defaults = Defaults;\n }\n\n return Select2;\n});\n\n // Return the AMD loader configuration so it can be used outside of this file\n return {\n define: S2.define,\n require: S2.require\n };\n}());\n\n // Autoload the jQuery bindings\n // We know that all of the modules exist above this, so we're safe\n var select2 = S2.require('jquery.select2');\n\n // Hold the AMD module references on the jQuery function that was just loaded\n // This allows Select2 to use the internal loader outside of this file, such\n // as in the language files.\n jQuery.fn.select2.amd = S2;\n\n // Return the Select2 instance for anyone who is importing it.\n return select2;\n}));\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/select2/dist/js/select2.js\n// module id = hv7s\n// module chunks = 0","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"panel panel-default\"},[_c('div',{staticClass:\"panel-heading\"},[_c('div',{staticStyle:{\"display\":\"flex\",\"justify-content\":\"space-between\",\"align-items\":\"center\"}},[_c('span',[_vm._v(\"\\n OAuth Clients\\n \")]),_vm._v(\" \"),_c('a',{staticClass:\"action-link\",on:{\"click\":_vm.showCreateClientForm}},[_vm._v(\"\\n Create New Client\\n \")])])]),_vm._v(\" \"),_c('div',{staticClass:\"panel-body\"},[(_vm.clients.length === 0)?_c('p',{staticClass:\"m-b-none\"},[_vm._v(\"\\n You have not created any OAuth clients.\\n \")]):_vm._e(),_vm._v(\" \"),(_vm.clients.length > 0)?_c('table',{staticClass:\"table table-borderless m-b-none\"},[_vm._m(0),_vm._v(\" \"),_c('tbody',_vm._l((_vm.clients),function(client){return _c('tr',[_c('td',{staticStyle:{\"vertical-align\":\"middle\"}},[_vm._v(\"\\n \"+_vm._s(client.id)+\"\\n \")]),_vm._v(\" \"),_c('td',{staticStyle:{\"vertical-align\":\"middle\"}},[_vm._v(\"\\n \"+_vm._s(client.name)+\"\\n \")]),_vm._v(\" \"),_c('td',{staticStyle:{\"vertical-align\":\"middle\"}},[_c('code',[_vm._v(_vm._s(client.secret))])]),_vm._v(\" \"),_c('td',{staticStyle:{\"vertical-align\":\"middle\"}},[_c('a',{staticClass:\"action-link\",on:{\"click\":function($event){_vm.edit(client)}}},[_vm._v(\"\\n Edit\\n \")])]),_vm._v(\" \"),_c('td',{staticStyle:{\"vertical-align\":\"middle\"}},[_c('a',{staticClass:\"action-link text-danger\",on:{\"click\":function($event){_vm.destroy(client)}}},[_vm._v(\"\\n Delete\\n \")])])])}))]):_vm._e()])]),_vm._v(\" \"),_c('div',{staticClass:\"modal fade\",attrs:{\"id\":\"modal-create-client\",\"tabindex\":\"-1\",\"role\":\"dialog\"}},[_c('div',{staticClass:\"modal-dialog\"},[_c('div',{staticClass:\"modal-content\"},[_vm._m(1),_vm._v(\" \"),_c('div',{staticClass:\"modal-body\"},[(_vm.createForm.errors.length > 0)?_c('div',{staticClass:\"alert alert-danger\"},[_vm._m(2),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('ul',_vm._l((_vm.createForm.errors),function(error){return _c('li',[_vm._v(\"\\n \"+_vm._s(error)+\"\\n \")])}))]):_vm._e(),_vm._v(\" \"),_c('form',{staticClass:\"form-horizontal\",attrs:{\"role\":\"form\"}},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"col-md-3 control-label\"},[_vm._v(\"Name\")]),_vm._v(\" \"),_c('div',{staticClass:\"col-md-7\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.createForm.name),expression:\"createForm.name\"}],staticClass:\"form-control\",attrs:{\"id\":\"create-client-name\",\"type\":\"text\"},domProps:{\"value\":(_vm.createForm.name)},on:{\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13)){ return null; }_vm.store($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.createForm.name=$event.target.value}}}),_vm._v(\" \"),_c('span',{staticClass:\"help-block\"},[_vm._v(\"\\n Something your users will recognize and trust.\\n \")])])]),_vm._v(\" \"),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"col-md-3 control-label\"},[_vm._v(\"Redirect URL\")]),_vm._v(\" \"),_c('div',{staticClass:\"col-md-7\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.createForm.redirect),expression:\"createForm.redirect\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"name\":\"redirect\"},domProps:{\"value\":(_vm.createForm.redirect)},on:{\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13)){ return null; }_vm.store($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.createForm.redirect=$event.target.value}}}),_vm._v(\" \"),_c('span',{staticClass:\"help-block\"},[_vm._v(\"\\n Your application's authorization callback URL.\\n \")])])])])]),_vm._v(\" \"),_c('div',{staticClass:\"modal-footer\"},[_c('button',{staticClass:\"btn btn-default\",attrs:{\"type\":\"button\",\"data-dismiss\":\"modal\"}},[_vm._v(\"Close\")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-primary\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.store}},[_vm._v(\"\\n Create\\n \")])])])])]),_vm._v(\" \"),_c('div',{staticClass:\"modal fade\",attrs:{\"id\":\"modal-edit-client\",\"tabindex\":\"-1\",\"role\":\"dialog\"}},[_c('div',{staticClass:\"modal-dialog\"},[_c('div',{staticClass:\"modal-content\"},[_vm._m(3),_vm._v(\" \"),_c('div',{staticClass:\"modal-body\"},[(_vm.editForm.errors.length > 0)?_c('div',{staticClass:\"alert alert-danger\"},[_vm._m(4),_vm._v(\" \"),_c('br'),_vm._v(\" \"),_c('ul',_vm._l((_vm.editForm.errors),function(error){return _c('li',[_vm._v(\"\\n \"+_vm._s(error)+\"\\n \")])}))]):_vm._e(),_vm._v(\" \"),_c('form',{staticClass:\"form-horizontal\",attrs:{\"role\":\"form\"}},[_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"col-md-3 control-label\"},[_vm._v(\"Name\")]),_vm._v(\" \"),_c('div',{staticClass:\"col-md-7\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.editForm.name),expression:\"editForm.name\"}],staticClass:\"form-control\",attrs:{\"id\":\"edit-client-name\",\"type\":\"text\"},domProps:{\"value\":(_vm.editForm.name)},on:{\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13)){ return null; }_vm.update($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.editForm.name=$event.target.value}}}),_vm._v(\" \"),_c('span',{staticClass:\"help-block\"},[_vm._v(\"\\n Something your users will recognize and trust.\\n \")])])]),_vm._v(\" \"),_c('div',{staticClass:\"form-group\"},[_c('label',{staticClass:\"col-md-3 control-label\"},[_vm._v(\"Redirect URL\")]),_vm._v(\" \"),_c('div',{staticClass:\"col-md-7\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.editForm.redirect),expression:\"editForm.redirect\"}],staticClass:\"form-control\",attrs:{\"type\":\"text\",\"name\":\"redirect\"},domProps:{\"value\":(_vm.editForm.redirect)},on:{\"keyup\":function($event){if(!('button' in $event)&&_vm._k($event.keyCode,\"enter\",13)){ return null; }_vm.update($event)},\"input\":function($event){if($event.target.composing){ return; }_vm.editForm.redirect=$event.target.value}}}),_vm._v(\" \"),_c('span',{staticClass:\"help-block\"},[_vm._v(\"\\n Your application's authorization callback URL.\\n \")])])])])]),_vm._v(\" \"),_c('div',{staticClass:\"modal-footer\"},[_c('button',{staticClass:\"btn btn-default\",attrs:{\"type\":\"button\",\"data-dismiss\":\"modal\"}},[_vm._v(\"Close\")]),_vm._v(\" \"),_c('button',{staticClass:\"btn btn-primary\",attrs:{\"type\":\"button\"},on:{\"click\":_vm.update}},[_vm._v(\"\\n Save Changes\\n \")])])])])])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('thead',[_c('tr',[_c('th',[_vm._v(\"Client ID\")]),_vm._v(\" \"),_c('th',[_vm._v(\"Name\")]),_vm._v(\" \"),_c('th',[_vm._v(\"Secret\")]),_vm._v(\" \"),_c('th'),_vm._v(\" \"),_c('th')])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"modal-header\"},[_c('button',{staticClass:\"close\",attrs:{\"type\":\"button \",\"data-dismiss\":\"modal\",\"aria-hidden\":\"true\"}},[_vm._v(\"×\")]),_vm._v(\" \"),_c('h4',{staticClass:\"modal-title\"},[_vm._v(\"\\n Create Client\\n \")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_c('strong',[_vm._v(\"Whoops!\")]),_vm._v(\" Something went wrong!\")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"modal-header\"},[_c('button',{staticClass:\"close\",attrs:{\"type\":\"button \",\"data-dismiss\":\"modal\",\"aria-hidden\":\"true\"}},[_vm._v(\"×\")]),_vm._v(\" \"),_c('h4',{staticClass:\"modal-title\"},[_vm._v(\"\\n Edit Client\\n \")])])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p',[_c('strong',[_vm._v(\"Whoops!\")]),_vm._v(\" Something went wrong!\")])}]\nmodule.exports = { render: render, staticRenderFns: staticRenderFns }\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-a00fe36c\",\"hasScoped\":true,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./resources/assets/js/components/passport/Clients.vue\n// module id = inAL\n// module chunks = 0","\n\n
\n \n \n \n
\n \n
\n\n
Import File: \n
\n
\n
\n
\n
\n {{ this.statusText }}\n
\n\n\n
\n
\n \n Header Field \n Import Field \n Sample Value \n \n \n \n \n \n {{ header }} \n \n \n \n \n Do Not Import \n \n
\n \n \n {{ activeFile.first_row[index] }}
\n \n \n \n \n
\n
\n
\n Cancel \n Import \n \n
\n\n
\n {{ this.statusText }}\n
\n\n
\n
\n\n \n\n \n \n\n\n\n\n\n// WEBPACK FOOTER //\n// resources/assets/js/components/importer/importer-file.vue","\n\n
\n \n
\n
\n
\n\n
\n \n
\n You have not created any personal access tokens.\n
\n\n \n
0\">\n \n \n Name \n \n \n \n\n \n \n \n \n {{ token.name }}\n \n\n \n \n \n Delete\n \n \n \n \n
\n
\n
\n
\n\n \n
\n
\n
\n \n\n
\n \n
0\">\n
Whoops! Something went wrong!
\n
\n
\n
\n\n \n
\n
\n\n \n \n
\n
\n
\n\n \n
\n
\n
\n \n\n
\n
\n Here is your new personal access token. This is the only time it will be shown so don't lose it!\n You may now use this token to make API requests.\n
\n\n
{{ accessToken }}
\n
\n\n \n \n
\n
\n
\n
\n \n\n\n\n\n\n// WEBPACK FOOTER //\n// resources/assets/js/components/passport/PersonalAccessTokens.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.show && _vm.fields.length)?_c('div',[_c('div',{staticClass:\"form-group\"},[_c('fieldset',[_c('legend',{staticClass:\"col-md-3 control-label\"},[_vm._v(\"Default Values\")]),_vm._v(\" \"),_c('div',{staticClass:\"col-sm-8 col-xl-7\"},[(_vm.error)?_c('p',[_vm._v(\"\\n There was a problem retrieving the fields for this fieldset.\\n \")]):_vm._e(),_vm._v(\" \"),_vm._l((_vm.fields),function(field){return _c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col-sm-12 col-lg-6\"},[_c('label',{staticClass:\"control-label\",attrs:{\"for\":'default-value' + field.id}},[_vm._v(_vm._s(field.name))])]),_vm._v(\" \"),_c('div',{staticClass:\"col-sm-12 col-lg-6\"},[(field.type == 'text')?_c('input',{staticClass:\"form-control m-b-xs\",attrs:{\"type\":\"text\",\"id\":'default-value' + field.id,\"name\":'default_values[' + field.id + ']'},domProps:{\"value\":_vm.getValue(field)}}):_vm._e(),_vm._v(\" \"),(field.type == 'textarea')?_c('textarea',{staticClass:\"form-control\",attrs:{\"id\":'default-value' + field.id,\"name\":'default_values[' + field.id + ']'},domProps:{\"value\":_vm.getValue(field)}}):_vm._e(),_c('br'),_vm._v(\" \"),(field.type == 'listbox')?_c('select',{staticClass:\"form-control m-b-xs\",attrs:{\"name\":'default_values[' + field.id + ']'}},[_c('option',{attrs:{\"value\":\"\"}}),_vm._v(\" \"),_vm._l((field.field_values_array),function(field_value){return _c('option',{domProps:{\"value\":field_value,\"selected\":_vm.getValue(field) == field_value}},[_vm._v(_vm._s(field_value))])})],2):_vm._e()])])})],2)])])]):_vm._e()])}\nvar staticRenderFns = []\nmodule.exports = { render: render, staticRenderFns: staticRenderFns }\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-3bdd24a5\",\"hasScoped\":true,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./resources/assets/js/components/forms/asset-models/fieldset-default-values.vue\n// module id = lafA\n// module chunks = 0","// style-loader: Adds some css to the DOM by adding a \n\n
\n \n
\n
\n Warning Some Errors occured while importing\n
\n\n
\n
\n \n Item \n Errors \n \n \n \n {{ item }} \n \n {{ field }}: \n {{errorString[0]}} \n \n \n \n \n
\n
\n
\n
\n \n\n\n\n\n\n// WEBPACK FOOTER //\n// resources/assets/js/components/importer/importer-errors.vue","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.errors)?_c('div',{staticClass:\"box\"},[_c('div',{staticClass:\"box-body\"},[_vm._m(0),_vm._v(\" \"),_c('div',{staticClass:\"errors-table\"},[_c('table',{staticClass:\"table table-striped table-bordered\",attrs:{\"id\":\"errors-table\"}},[_vm._m(1),_vm._v(\" \"),_c('tbody',_vm._l((_vm.errors),function(error,item){return _c('tr',[_c('td',[_vm._v(_vm._s(item))]),_vm._v(\" \"),_vm._l((error),function(value,field){return _c('td',[_c('b',[_vm._v(_vm._s(field)+\":\")]),_vm._v(\" \"),_vm._l((value),function(errorString){return _c('span',[_vm._v(_vm._s(errorString[0]))])}),_vm._v(\" \"),_c('br')],2)})],2)}))])])])]):_vm._e()}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"alert alert-warning\"},[_c('strong',[_vm._v(\"Warning\")]),_vm._v(\" Some Errors occured while importing\\n \")])},function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('thead',[_c('th',[_vm._v(\"Item\")]),_vm._v(\" \"),_c('th',[_vm._v(\"Errors\")])])}]\nmodule.exports = { render: render, staticRenderFns: staticRenderFns }\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-3351e4cf\",\"hasScoped\":true,\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./resources/assets/js/components/importer/importer-errors.vue\n// module id = zkjN\n// module chunks = 0"],"sourceRoot":""}