2014-11-01 06:03:03 +03:00
window . $ = window . $ || { } , function ( ) { $ && $ . fn && $ . fn . select2 && $ . fn . select2 . amd && ( c = $ . fn . select2 . amd . define , b = $ . fn . select2 . amd . require ) ; var a , b , c ; ! function ( d ) { function e ( a , b ) { return u . call ( a , b ) } function f ( a , b ) { var c , d , e , f , g , h , i , j , k , l , m , n = b && b . split ( "/" ) , o = s . map , p = o && o [ "*" ] || { } ; if ( a && "." === a . charAt ( 0 ) ) if ( b ) { for ( n = n . slice ( 0 , n . length - 1 ) , a = a . split ( "/" ) , g = a . length - 1 , s . nodeIdCompat && w . test ( a [ g ] ) && ( a [ g ] = a [ g ] . replace ( w , "" ) ) , a = n . concat ( a ) , k = 0 ; k < a . length ; k += 1 ) if ( m = a [ k ] , "." === m ) a . splice ( k , 1 ) , k -= 1 ; else if ( ".." === m ) { if ( 1 === k && ( ".." === a [ 2 ] || ".." === a [ 0 ] ) ) break ; k > 0 && ( a . splice ( k - 1 , 2 ) , k -= 2 ) } a = a . join ( "/" ) } else 0 === a . indexOf ( "./" ) && ( a = a . substring ( 2 ) ) ; if ( ( n || p ) && o ) { for ( c = a . split ( "/" ) , k = c . length ; k > 0 ; k -= 1 ) { if ( d = c . slice ( 0 , k ) . join ( "/" ) , n ) for ( l = n . length ; l > 0 ; l -= 1 ) if ( e = o [ n . slice ( 0 , l ) . join ( "/" ) ] , e && ( e = e [ d ] ) ) { f = e , h = k ; break } if ( f ) break ; ! i && p && p [ d ] && ( i = p [ d ] , j = k ) } ! f && i && ( f = i , h = j ) , f && ( c . splice ( 0 , h , f ) , a = c . join ( "/" ) ) } return a } function g ( a , b ) { return function ( ) { return n . apply ( d , v . call ( arguments , 0 ) . concat ( [ a , b ] ) ) } } function h ( a ) { return function ( b ) { return f ( b , a ) } } function i ( a ) { return function ( b ) { q [ a ] = b } } function j ( a ) { if ( e ( r , a ) ) { var b = r [ a ] ; delete r [ a ] , t [ a ] = ! 0 , m . apply ( d , b ) } if ( ! e ( q , a ) && ! e ( t , a ) ) throw new Error ( "No " + a ) ; return q [ a ] } function k ( a ) { var b , c = a ? a . indexOf ( "!" ) : - 1 ; return c > - 1 && ( b = a . substring ( 0 , c ) , a = a . substring ( c + 1 , a . length ) ) , [ b , a ] } function l ( a ) { return function ( ) { return s && s . config && s . config [ a ] || { } } } var m , n , o , p , q = { } , r = { } , s = { } , t = { } , u = Object . prototype . hasOwnProperty , v = [ ] . slice , w = /\.js$/ ; o = function ( a , b ) { var c , d = k ( a ) , e = d [ 0 ] ; return a = d [ 1 ] , e && ( e = f ( e , b ) , c = j ( e ) ) , e ? a = c && c . normalize ? c . normalize ( a , h ( b ) ) : f ( a , b ) : ( a = f ( a , b ) , d = k ( a ) , e = d [ 0 ] , a = d [ 1 ] , e && ( c = j ( e ) ) ) , { f : e ? e + "!" + a : a , n : a , pr : e , p : c } } , p = { require : function ( a ) { return g ( a ) } , exports : function ( a ) { var b = q [ a ] ; return "undefined" != typeof b ? b : q [ a ] = { } } , module : function ( a ) { return { id : a , uri : "" , exports : q [ a ] , config : l ( a ) } } } , m = function ( a , b , c , f ) { var h , k , l , m , n , s , u = [ ] , v = typeof c ; if ( f = f || a , "undefined" === v || "function" === v ) { for ( b = ! b . length && c . length ? [ "require" , "exports" , "module" ] : b , n = 0 ; n < b . length ; n += 1 ) if ( m = o ( b [ n ] , f ) , k = m . f , "require" === k ) u [ n ] = p . require ( a ) ; else if ( "exports" === k ) u [ n ] = p . exports ( a ) , s = ! 0 ; else if ( "module" === k ) h = u [ n ] = p . module ( a ) ; else if ( e ( q , k ) || e ( r , k ) || e ( t , k ) ) u [ n ] = j ( k ) ; else { if ( ! m . p ) throw new Error ( a + " missing " + k ) ; m . p . load ( m . n , g ( f , ! 0 ) , i ( k ) , { } ) , u [ n ] = q [ k ] } l = c ? c . apply ( q [ a ] , u ) : void 0 , a && ( h && h . exports !== d && h . exports !== q [ a ] ? q [ a ] = h . exports : l === d && s || ( q [ a ] = l ) ) } else a && ( q [ a ] = c ) } , a = b = n = function ( a , b , c , e , f ) { if ( "string" == typeof a ) return p [ a ] ? p [ a ] ( b ) : j ( o ( a , b ) . f ) ; if ( ! a . splice ) { if ( s = a , s . deps && n ( s . deps , s . callback ) , ! b ) return ; b . splice ? ( a = b , b = c , c = null ) : a = d } return b = b || function ( ) { } , "function" == typeof c && ( c = e , e = f ) , e ? m ( d , a , b , c ) : setTimeout ( function ( ) { m ( d , a , b , c ) } , 4 ) , n } , n . config = function ( a ) { return n ( a ) } , a . _defined = q , c = function ( a , b , c ) { b . splice || ( c = b , b = [ ] ) , e ( q , a ) || e ( r , a ) || ( r [ a ] = [ a , b , c ] ) } , c . amd = { jQuery : ! 0 } } ( ) , c ( "almond" , function ( ) { } ) , function ( a , b ) { "object" == typeof module && "object" == typeof module . exports ? module . exports = a . document ? b ( a , ! 0 ) : function ( a ) { if ( ! a . document ) throw new Error ( "jQuery requires a window with a document" ) ; return b ( a ) } : b ( a ) } ( "undefined" != typeof window ? window : this , function ( a , b ) { function d ( a ) { var b = a . length , c = bb . type ( a ) ; return "function" === c || bb . isWindow ( a ) ? ! 1 : 1 === a . nodeType && b ? ! 0 : "array" === c || 0 === b || "number" == typeof b && b > 0 && b - 1 in a } function e ( a , b , c ) { if ( bb . isFunction ( b ) ) return bb . grep ( a , function ( a , d ) { return ! ! b . call ( a , d , a ) !== c } ) ; if ( b . nodeType ) return bb . grep ( a , function ( a ) { return a === b !== c } ) ; if ( "string" == typeof b ) { if ( ib . test ( b ) ) return bb . filter ( b , a , c ) ; b = bb . filter ( b , a ) } return bb . grep ( a , function ( a ) { return V . call ( b , a ) >= 0 !== c } ) } function f ( a , b ) { for ( ; ( a = a [ b ] ) && 1 !== a . nodeType ; ) ; return a } function g ( a ) { var b = pb [ a ] = { } ; return bb . each ( a . match ( ob ) || [ ] , function ( a , c ) { b [ c ] = ! 0 } ) , b } function h ( ) { _ . removeEventListener ( "DOMContentLoaded" , h , ! 1 ) , a . removeEventListener ( "load" , h , ! 1 ) , bb . ready ( ) } function i ( ) { Object . defineProperty ( this . cache = { } , 0 , { get : function ( ) { return { } } } ) , this . expando = bb . expando + Math . random ( ) } function j ( a , b , c ) { var d ; if ( void 0 === c && 1 === a . nodeType ) if ( d = "data-" + b . replace ( vb , "-$1" ) . toLowerCase ( ) , c = a . getAttribute ( d ) , "string" == typeof c ) { try { c = "true" === c ? ! 0 : "false" === c ? ! 1 : "null" ===
} , selected : function ( a ) { return a . parentNode && a . parentNode . selectedIndex , a . selected === ! 0 } , empty : function ( a ) { for ( a = a . firstChild ; a ; a = a . nextSibling ) if ( a . nodeType < 6 ) return ! 1 ; return ! 0 } , parent : function ( a ) { return ! y . pseudos . empty ( a ) } , header : function ( a ) { return qb . test ( a . nodeName ) } , input : function ( a ) { return pb . test ( a . nodeName ) } , button : function ( a ) { var b = a . nodeName . toLowerCase ( ) ; return "input" === b && "button" === a . type || "button" === b } , text : function ( a ) { var b ; return "input" === a . nodeName . toLowerCase ( ) && "text" === a . type && ( null == ( b = a . getAttribute ( "type" ) ) || "text" === b . toLowerCase ( ) ) } , first : j ( function ( ) { return [ 0 ] } ) , last : j ( function ( a , b ) { return [ b - 1 ] } ) , eq : j ( function ( a , b , c ) { return [ 0 > c ? c + b : c ] } ) , even : j ( function ( a , b ) { for ( var c = 0 ; b > c ; c += 2 ) a . push ( c ) ; return a } ) , odd : j ( function ( a , b ) { for ( var c = 1 ; b > c ; c += 2 ) a . push ( c ) ; return a } ) , lt : j ( function ( a , b , c ) { for ( var d = 0 > c ? c + b : c ; -- d >= 0 ; ) a . push ( d ) ; return a } ) , gt : j ( function ( a , b , c ) { for ( var d = 0 > c ? c + b : c ; ++ d < b ; ) a . push ( d ) ; return a } ) } } , y . pseudos . nth = y . pseudos . eq ; for ( w in { radio : ! 0 , checkbox : ! 0 , file : ! 0 , password : ! 0 , image : ! 0 } ) y . pseudos [ w ] = h ( w ) ; for ( w in { submit : ! 0 , reset : ! 0 } ) y . pseudos [ w ] = i ( w ) ; return l . prototype = y . filters = y . pseudos , y . setFilters = new l , B = b . compile = function ( a , b ) { var c , d = [ ] , e = [ ] , f = T [ a + " " ] ; if ( ! f ) { for ( b || ( b = m ( a ) ) , c = b . length ; c -- ; ) f = s ( b [ c ] ) , f [ N ] ? d . push ( f ) : e . push ( f ) ; f = T ( a , t ( e , d ) ) } return f } , x . sortStable = N . split ( "" ) . sort ( U ) . join ( "" ) === N , x . detectDuplicates = ! ! E , F ( ) , x . sortDetached = e ( function ( a ) { return 1 & a . compareDocumentPosition ( G . createElement ( "div" ) ) } ) , e ( function ( a ) { return a . innerHTML = "<a href='#'></a>" , "#" === a . firstChild . getAttribute ( "href" ) } ) || f ( "type|href|height|width" , function ( a , b , c ) { return c ? void 0 : a . getAttribute ( b , "type" === b . toLowerCase ( ) ? 1 : 2 ) } ) , x . attributes && e ( function ( a ) { return a . innerHTML = "<input/>" , a . firstChild . setAttribute ( "value" , "" ) , "" === a . firstChild . getAttribute ( "value" ) } ) || f ( "value" , function ( a , b , c ) { return c || "input" !== a . nodeName . toLowerCase ( ) ? void 0 : a . defaultValue } ) , e ( function ( a ) { return null == a . getAttribute ( "disabled" ) } ) || f ( cb , function ( a , b , c ) { var d ; return c ? void 0 : a [ b ] === ! 0 ? b . toLowerCase ( ) : ( d = a . getAttributeNode ( b ) ) && d . specified ? d . value : null } ) , b } ( a ) ; bb . find = fb , bb . expr = fb . selectors , bb . expr [ ":" ] = bb . expr . pseudos , bb . unique = fb . uniqueSort , bb . text = fb . getText , bb . isXMLDoc = fb . isXML , bb . contains = fb . contains ; var gb = bb . expr . match . needsContext , hb = /^<(\w+)\s*\/?>(?:<\/\1>|)$/ , ib = /^.[^:#\[\.,]*$/ ; bb . filter = function ( a , b , c ) { var d = b [ 0 ] ; return c && ( a = ":not(" + a + ")" ) , 1 === b . length && 1 === d . nodeType ? bb . find . matchesSelector ( d , a ) ? [ d ] : [ ] : bb . find . matches ( a , bb . grep ( b , function ( a ) { return 1 === a . nodeType } ) ) } , bb . fn . extend ( { find : function ( a ) { var b , c = this . length , d = [ ] , e = this ; if ( "string" != typeof a ) return this . pushStack ( bb ( a ) . filter ( function ( ) { for ( b = 0 ; c > b ; b ++ ) if ( bb . contains ( e [ b ] , this ) ) return ! 0 } ) ) ; for ( b = 0 ; c > b ; b ++ ) bb . find ( a , e [ b ] , d ) ; return d = this . pushStack ( c > 1 ? bb . unique ( d ) : d ) , d . selector = this . selector ? this . selector + " " + a : a , d } , filter : function ( a ) { return this . pushStack ( e ( this , a || [ ] , ! 1 ) ) } , not : function ( a ) { return this . pushStack ( e ( this , a || [ ] , ! 0 ) ) } , is : function ( a ) { return ! ! e ( this , "string" == typeof a && gb . test ( a ) ? bb ( a ) : a || [ ] , ! 1 ) . length } } ) ; var jb , kb = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/ , lb = bb . fn . init = function ( a , b ) { var c , d ; if ( ! a ) return this ; if ( "string" == typeof a ) { if ( c = "<" === a [ 0 ] && ">" === a [ a . length - 1 ] && a . length >= 3 ? [ null , a , null ] : kb . exec ( a ) , ! c || ! c [ 1 ] && b ) return ! b || b . jquery ? ( b || jb ) . find ( a ) : this . constructor ( b ) . find ( a ) ; if ( c [ 1 ] ) { if ( b = b instanceof bb ? b [ 0 ] : b , bb . merge ( this , bb . parseHTML ( c [ 1 ] , b && b . nodeType ? b . ownerDocument || b : _ , ! 0 ) ) , hb . test ( c [ 1 ] ) && bb . isPlainObject ( b ) ) for ( c in b ) bb . isFunction ( this [ c ] ) ? this [ c ] ( b [ c ] ) : this . attr ( c , b [ c ] ) ; return this } return d = _ . getElementById ( c [ 2 ] ) , d && d . parentNode && ( this . length = 1 , this [ 0 ] = d ) , this . context = _ , this . selector = a , this } return a . nodeType ? ( this . context = this [ 0 ] = a , this . length = 1 , this ) : bb . isFunction ( a ) ? "undefined" != typeof jb . ready ? jb . ready ( a ) : a ( bb ) : ( void 0 !== a . selector && ( this . selector = a . selector , this . context = a . context ) , bb . makeArray ( a , this ) ) } ; lb . prototype = bb . fn , jb = bb ( _ ) ; var mb = /^(?:parents|prev(?:Until|All))/ , nb = { children : ! 0 , contents : ! 0 , next : ! 0 , prev : ! 0 } ; bb . extend ( { dir : function ( a , b , c ) { for ( var d = [ ] , e = void 0 !== c ; ( a = a [ b ] ) && 9 !== a . nodeType ; ) if ( 1 === a . nodeType ) { if ( e && bb ( a ) . is ( c ) ) b
2015-01-09 18:04:21 +03:00
} } } , D . propHooks . scrollTop = D . propHooks . scrollLeft = { set : function ( a ) { a . elem . nodeType && a . elem . parentNode && ( a . elem [ a . prop ] = a . now ) } } , bb . easing = { linear : function ( a ) { return a } , swing : function ( a ) { return . 5 - Math . cos ( a * Math . PI ) / 2 } } , bb . fx = D . prototype . init , bb . fx . step = { } ; var Zb , $b , _b = /^(?:toggle|show|hide)$/ , ac = new RegExp ( "^(?:([+-])=|)(" + wb + ")([a-z%]*)$" , "i" ) , bc = /queueHooks$/ , cc = [ H ] , dc = { "*" : [ function ( a , b ) { var c = this . createTween ( a , b ) , d = c . cur ( ) , e = ac . exec ( b ) , f = e && e [ 3 ] || ( bb . cssNumber [ a ] ? "" : "px" ) , g = ( bb . cssNumber [ a ] || "px" !== f && + d ) && ac . exec ( bb . css ( c . elem , a ) ) , h = 1 , i = 20 ; if ( g && g [ 3 ] !== f ) { f = f || g [ 3 ] , e = e || [ ] , g = + d || 1 ; do h = h || ".5" , g /= h , bb . style ( c . elem , a , g + f ) ; while ( h !== ( h = c . cur ( ) / d ) && 1 !== h && -- i ) } return e && ( g = c . start = + g || + d || 0 , c . unit = f , c . end = e [ 1 ] ? g + ( e [ 1 ] + 1 ) * e [ 2 ] : + e [ 2 ] ) , c } ] } ; bb . Animation = bb . extend ( J , { tweener : function ( a , b ) { bb . isFunction ( a ) ? ( b = a , a = [ "*" ] ) : a = a . split ( " " ) ; for ( var c , d = 0 , e = a . length ; e > d ; d ++ ) c = a [ d ] , dc [ c ] = dc [ c ] || [ ] , dc [ c ] . unshift ( b ) } , prefilter : function ( a , b ) { b ? cc . unshift ( a ) : cc . push ( a ) } } ) , bb . speed = function ( a , b , c ) { var d = a && "object" == typeof a ? bb . extend ( { } , a ) : { complete : c || ! c && b || bb . isFunction ( a ) && a , duration : a , easing : c && b || b && ! bb . isFunction ( b ) && b } ; return d . duration = bb . fx . off ? 0 : "number" == typeof d . duration ? d . duration : d . duration in bb . fx . speeds ? bb . fx . speeds [ d . duration ] : bb . fx . speeds . _default , ( null == d . queue || d . queue === ! 0 ) && ( d . queue = "fx" ) , d . old = d . complete , d . complete = function ( ) { bb . isFunction ( d . old ) && d . old . call ( this ) , d . queue && bb . dequeue ( this , d . queue ) } , d } , bb . fn . extend ( { fadeTo : function ( a , b , c , d ) { return this . filter ( yb ) . css ( "opacity" , 0 ) . show ( ) . end ( ) . animate ( { opacity : b } , a , c , d ) } , animate : function ( a , b , c , d ) { var e = bb . isEmptyObject ( a ) , f = bb . speed ( b , c , d ) , g = function ( ) { var b = J ( this , bb . extend ( { } , a ) , f ) ; ( e || sb . get ( this , "finish" ) ) && b . stop ( ! 0 ) } ; return g . finish = g , e || f . queue === ! 1 ? this . each ( g ) : this . queue ( f . queue , g ) } , stop : function ( a , b , c ) { var d = function ( a ) { var b = a . stop ; delete a . stop , b ( c ) } ; return "string" != typeof a && ( c = b , b = a , a = void 0 ) , b && a !== ! 1 && this . queue ( a || "fx" , [ ] ) , this . each ( function ( ) { var b = ! 0 , e = null != a && a + "queueHooks" , f = bb . timers , g = sb . get ( this ) ; if ( e ) g [ e ] && g [ e ] . stop && d ( g [ e ] ) ; else for ( e in g ) g [ e ] && g [ e ] . stop && bc . test ( e ) && d ( g [ e ] ) ; for ( e = f . length ; e -- ; ) f [ e ] . elem !== this || null != a && f [ e ] . queue !== a || ( f [ e ] . anim . stop ( c ) , b = ! 1 , f . splice ( e , 1 ) ) ; ( b || ! c ) && bb . dequeue ( this , a ) } ) } , finish : function ( a ) { return a !== ! 1 && ( a = a || "fx" ) , this . each ( function ( ) { var b , c = sb . get ( this ) , d = c [ a + "queue" ] , e = c [ a + "queueHooks" ] , f = bb . timers , g = d ? d . length : 0 ; for ( c . finish = ! 0 , bb . queue ( this , a , [ ] ) , e && e . stop && e . stop . call ( this , ! 0 ) , b = f . length ; b -- ; ) f [ b ] . elem === this && f [ b ] . queue === a && ( f [ b ] . anim . stop ( ! 0 ) , f . splice ( b , 1 ) ) ; for ( b = 0 ; g > b ; b ++ ) d [ b ] && d [ b ] . finish && d [ b ] . finish . call ( this ) ; delete c . finish } ) } } ) , bb . each ( [ "toggle" , "show" , "hide" ] , function ( a , b ) { var c = bb . fn [ b ] ; bb . fn [ b ] = function ( a , d , e ) { return null == a || "boolean" == typeof a ? c . apply ( this , arguments ) : this . animate ( F ( b , ! 0 ) , a , d , e ) } } ) , bb . each ( { slideDown : F ( "show" ) , slideUp : F ( "hide" ) , slideToggle : F ( "toggle" ) , fadeIn : { opacity : "show" } , fadeOut : { opacity : "hide" } , fadeToggle : { opacity : "toggle" } } , function ( a , b ) { bb . fn [ a ] = function ( a , c , d ) { return this . animate ( b , a , c , d ) } } ) , bb . timers = [ ] , bb . fx . tick = function ( ) { var a , b = 0 , c = bb . timers ; for ( Zb = bb . now ( ) ; b < c . length ; b ++ ) a = c [ b ] , a ( ) || c [ b ] !== a || c . splice ( b -- , 1 ) ; c . length || bb . fx . stop ( ) , Zb = void 0 } , bb . fx . timer = function ( a ) { bb . timers . push ( a ) , a ( ) ? bb . fx . start ( ) : bb . timers . pop ( ) } , bb . fx . interval = 13 , bb . fx . start = function ( ) { $b || ( $b = setInterval ( bb . fx . tick , bb . fx . interval ) ) } , bb . fx . stop = function ( ) { clearInterval ( $b ) , $b = null } , bb . fx . speeds = { slow : 600 , fast : 200 , _default : 400 } , bb . fn . delay = function ( a , b ) { return a = bb . fx ? bb . fx . speeds [ a ] || a : a , b = b || "fx" , this . queue ( b , function ( b , c ) { var d = setTimeout ( b , a ) ; c . stop = function ( ) { clearTimeout ( d ) } } ) } , function ( ) { var a = _ . createElement ( "input" ) , b = _ . createElement ( "select" ) , c = b . appendChild ( _ . createElement ( "option" ) ) ; a . type = "checkbox" , $ . checkOn = "" !== a . value , $ . optSelected = c . selected , b . disabled = ! 0 , $ . optDisabled = ! c . disabled , a = _ . createElement ( "input" ) , a . value = "t" , a . type = "radio" , $ . radioValue = "t" === a . value } ( ) ; var ec , fc , gc = bb . expr . attrHandle ; bb . fn . extend ( { attr : function ( a , b ) { return rb ( this , bb . attr , a , b , arguments . length > 1 ) } , removeAttr : function ( a ) { return this . each ( function ( ) { bb . removeAttr ( this , a ) } ) } } ) , bb . exten
2015-01-09 18:45:35 +03:00
if ( this != c [ 0 ] ) { var b = a . data ( "element" ) ; b . select2 ( "close" ) } } ) } ) , $ ( window ) . on ( "scroll.select2." + a . id , function ( ) { b . trigger ( "close" ) } ) } , c . prototype . _detachCloseHandler = function ( a ) { $ ( document . body ) . off ( "mousedown.select2." + a . id ) , $ ( window ) . off ( "scroll.select2." + a . id ) } , c . prototype . position = function ( a , b ) { var c = b . find ( ".selection" ) ; c . append ( a ) } , c . prototype . destroy = function ( ) { this . _detachCloseHandler ( this . container ) } , c . prototype . update = function ( ) { throw new Error ( "The `update` method must be defined in child classes." ) } , c } ) , c ( "select2/selection/single" , [ "./base" , "../utils" , "../keys" ] , function ( a , b ) { function c ( ) { c . _ _super _ _ . constructor . apply ( this , arguments ) } return b . Extend ( c , a ) , c . prototype . render = function ( ) { var a = $ ( '<span class="select2-selection select2-selection--single" tabindex="0" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false"><span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span></span>' ) ; return a . attr ( "title" , this . $element . attr ( "title" ) ) , this . $selection = a , a } , c . prototype . bind = function ( a ) { var b = this ; c . _ _super _ _ . bind . apply ( this , arguments ) ; var d = a . id + "-container" ; this . $selection . find ( ".select2-selection__rendered" ) . attr ( "id" , d ) , this . $selection . attr ( "aria-labelledby" , d ) , this . $selection . on ( "mousedown" , function ( a ) { 1 === a . which && b . trigger ( "toggle" , { originalEvent : a } ) } ) , this . $selection . on ( "focus" , function ( ) { } ) , this . $selection . on ( "blur" , function ( ) { } ) , a . on ( "enable" , function ( ) { b . $selection . attr ( "tabindex" , "0" ) } ) , a . on ( "disable" , function ( ) { b . $selection . attr ( "tabindex" , "-1" ) } ) , a . on ( "selection:update" , function ( a ) { b . update ( a . data ) } ) } , c . prototype . clear = function ( ) { this . $selection . find ( ".select2-selection__rendered" ) . empty ( ) } , c . prototype . display = function ( a ) { var b = this . options . get ( "templateSelection" ) ; return b ( a ) } , c . prototype . selectionContainer = function ( ) { return $ ( "<span></span>" ) } , c . prototype . update = function ( a ) { if ( 0 === a . length ) return void this . clear ( ) ; var b = a [ 0 ] , c = this . display ( b ) ; this . $selection . find ( ".select2-selection__rendered" ) . html ( c ) } , c } ) , c ( "select2/selection/multiple" , [ "./base" , "../utils" ] , function ( a , b ) { function c ( ) { c . _ _super _ _ . constructor . apply ( this , arguments ) } return b . Extend ( c , a ) , c . prototype . render = function ( ) { var a = $ ( '<span class="select2-selection select2-selection--multiple" tabindex="0" role="combobox" aria-autocomplete="list" aria-haspopup="true" aria-expanded="false"><ul class="select2-selection__rendered"></ul></span>' ) ; return a . attr ( "title" , this . $element . attr ( "title" ) ) , this . $selection = a , a } , c . prototype . bind = function ( a ) { var b = this ; c . _ _super _ _ . bind . apply ( this , arguments ) , this . $selection . on ( "click" , function ( a ) { b . trigger ( "toggle" , { originalEvent : a } ) } ) , this . $selection . on ( "click" , ".select2-selection__choice__remove" , function ( a ) { var c = $ ( this ) , d = c . parent ( ) , e = d . data ( "data" ) ; b . trigger ( "unselect" , { originalEvent : a , data : e } ) } ) , a . on ( "enable" , function ( ) { b . $selection . attr ( "tabindex" , "0" ) } ) , a . on ( "disable" , function ( ) { b . $selection . attr ( "tabindex" , "-1" ) } ) } , c . prototype . clear = function ( ) { this . $selection . find ( ".select2-selection__rendered" ) . empty ( ) } , c . prototype . display = function ( a ) { var b = this . options . get ( "templateSelection" ) ; return b ( a ) } , c . prototype . selectionContainer = function ( ) { var a = $ ( '<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>' ) ; return a } , c . prototype . update = function ( a ) { if ( this . clear ( ) , 0 !== a . length ) { for ( var b = [ ] , c = 0 ; c < a . length ; c ++ ) { var d = a [ c ] , e = this . display ( d ) , f = this . selectionContainer ( ) ; f . append ( e ) , f . data ( "data" , d ) , b . push ( f ) } this . $selection . find ( ".select2-selection__rendered" ) . append ( b ) } } , c } ) , c ( "select2/selection/placeholder" , [ "../utils" ] , function ( ) { function a ( a , b , c ) { this . placeholder = this . normalizePlaceholder ( c . get ( "placeholder" ) ) , a . call ( this , b , c ) } return a . prototype . normalizePlaceholder = function ( a , b ) { return "string" == typeof b && ( b = { id : "" , text : b } ) , b } , a . prototype . createPlaceholder = function ( a , b ) { var c = this . selectionContainer ( ) ; return c . html ( this . display ( b ) ) , c . addClass ( "select2-selection__placeholder" ) . removeClass ( "select2-selection__choice" ) , c } , a . prototype . u
var e = b . data ( ) ; e = c ( e ) ; for ( var f in e ) d . indexOf ( f ) > - 1 || ( a . isPlainObject ( this . options [ f ] ) ? a . extend ( this . options [ f ] , e [ f ] ) : this . options [ f ] = e [ f ] ) ; return this } , c . prototype . get = function ( a ) { return this . options [ a ] } , c . prototype . set = function ( a , b ) { this . options [ a ] = b } , c } ) , c ( "select2/core" , [ "jquery" , "./options" , "./utils" , "./keys" ] , function ( a , b , c , d ) { var e = function ( a , c ) { null != a . data ( "select2" ) && a . data ( "select2" ) . destroy ( ) , this . $element = a , this . id = this . _generateId ( a ) , c = c || { } , this . options = new b ( c , a ) , e . _ _super _ _ . constructor . call ( this ) ; var d = this . options . get ( "dataAdapter" ) ; this . data = new d ( a , this . options ) ; var f = this . render ( ) ; this . _placeContainer ( f ) ; var g = this . options . get ( "selectionAdapter" ) ; this . selection = new g ( a , this . options ) , this . $selection = this . selection . render ( ) , this . selection . position ( this . $selection , f ) ; var h = this . options . get ( "dropdownAdapter" ) ; this . dropdown = new h ( a , this . options ) , this . $dropdown = this . dropdown . render ( ) , this . dropdown . position ( this . $dropdown , f ) ; var i = this . options . get ( "resultsAdapter" ) ; this . results = new i ( a , this . options , this . data ) , this . $results = this . results . render ( ) , this . results . position ( this . $results , this . $dropdown ) ; var j = this ; this . _bindAdapters ( ) , this . _registerDomEvents ( ) , this . _registerDataEvents ( ) , this . _registerSelectionEvents ( ) , this . _registerDropdownEvents ( ) , this . _registerResultsEvents ( ) , this . _registerEvents ( ) , this . data . current ( function ( a ) { j . trigger ( "selection:update" , { data : a } ) } ) , a . hide ( ) , this . _syncAttributes ( ) , this . _tabindex = a . attr ( "tabindex" ) || 0 , a . attr ( "tabindex" , "-1" ) , a . data ( "select2" , this ) } ; return c . Extend ( e , c . Observable ) , e . prototype . _generateId = function ( a ) { var b = "" ; return b = null != a . attr ( "id" ) ? a . attr ( "id" ) : null != a . attr ( "name" ) ? a . attr ( "name" ) + "-" + c . generateChars ( 2 ) : c . generateChars ( 4 ) , b = "select2-" + b } , e . prototype . _placeContainer = function ( a ) { a . insertAfter ( this . $element ) , a . width ( this . $element . outerWidth ( ! 1 ) ) } , e . prototype . _bindAdapters = function ( ) { this . data . bind ( this , this . $container ) , this . selection . bind ( this , this . $container ) , this . dropdown . bind ( this , this . $container ) , this . results . bind ( this , this . $container ) } , e . prototype . _registerDomEvents = function ( ) { var b = this ; this . $element . on ( "change.select2" , function ( ) { b . data . current ( function ( a ) { b . trigger ( "selection:update" , { data : a } ) } ) } ) , this . _sync = c . bind ( this . _syncAttributes , this ) , this . $element [ 0 ] . attachEvent && this . $element [ 0 ] . attachEvent ( "onpropertychange" , this . _sync ) ; var d = window . MutationObserver || window . WebKitMutationObserver || window . MozMutationObserver ; null != d && ( this . _observer = new d ( function ( c ) { a . each ( c , b . _sync ) } ) , this . _observer . observe ( this . $element [ 0 ] , { attributes : ! 0 , subtree : ! 1 } ) ) } , e . prototype . _registerDataEvents = function ( ) { var a = this ; this . data . on ( "*" , function ( b , c ) { a . trigger ( b , c ) } ) } , e . prototype . _registerSelectionEvents = function ( ) { var a = this , b = [ "toggle" ] ; this . selection . on ( "toggle" , function ( ) { a . toggleDropdown ( ) } ) , this . selection . on ( "*" , function ( c , d ) { - 1 === b . indexOf ( c ) && a . trigger ( c , d ) } ) } , e . prototype . _registerDropdownEvents = function ( ) { var a = this ; this . dropdown . on ( "*" , function ( b , c ) { a . trigger ( b , c ) } ) } , e . prototype . _registerResultsEvents = function ( ) { var a = this ; this . results . on ( "*" , function ( b , c ) { a . trigger ( b , c ) } ) } , e . prototype . _registerEvents = function ( ) { var a = this ; this . on ( "open" , function ( ) { a . $container . addClass ( "select2-container--open" ) } ) , this . on ( "close" , function ( ) { a . $container . removeClass ( "select2-container--open" ) } ) , this . on ( "enable" , function ( ) { a . $container . removeClass ( "select2-container--disabled" ) } ) , this . on ( "disable" , function ( ) { a . $container . addClass ( "select2-container--disabled" ) } ) , this . on ( "query" , function ( b ) { this . data . query ( b , function ( c ) { a . trigger ( "results:all" , { data : c , query : b } ) } ) } ) , this . on ( "query:append" , function ( b ) { this . data . query ( b , function ( c ) { a . trigger ( "results:append" , { data : c , query : b } ) } ) } ) , this . on ( "keypress" , function ( b ) { var c = b . which ; a . isOpen ( ) ? c === d . ENTER ? ( a . trigger ( "results:select" ) , b . preventDefault ( ) ) : c === d . UP ? ( a . trigger ( "results:previous" ) , b . preventDefault ( ) ) : c === d . DOWN ? ( a . trigger ( "results:next" ) , b . preventDefault ( ) ) : ( c === d . ESC || c === d . TAB ) && ( a . close ( ) , b . preventDefault ( ) ) : ( c === d . ENTER || c === d . SPACE || ( c === d . DOWN || c === d . UP ) && b . altKey ) && ( a . open ( ) , b . preventDefault ( ) ) } ) } , e . prototype . _syncAttributes