index.php
1 year ago
select2.css
1 year ago
select2.full.js
1 year ago
select2.full.min.js
1 year ago
select2.js
1 year ago
select2.min.css
1 year ago
select2.min.js
1 year ago
select2.min.js
4981 lines
| 1 | /*! Select2 4.0.13 | https://github.com/select2/select2/blob/master/LICENSE.md */ |
| 2 | ! ( function ( n ) { |
| 3 | 'function' == typeof define && define.amd |
| 4 | ? define( [ 'jquery' ], n ) |
| 5 | : 'object' == typeof module && module.exports |
| 6 | ? ( module.exports = function ( e, t ) { |
| 7 | return ( |
| 8 | void 0 === t && |
| 9 | ( t = |
| 10 | 'undefined' != typeof window |
| 11 | ? require( 'jquery' ) |
| 12 | : require( 'jquery' )( e ) ), |
| 13 | n( t ), |
| 14 | t |
| 15 | ); |
| 16 | } ) |
| 17 | : n( jQuery ); |
| 18 | } )( function ( u ) { |
| 19 | var e = ( function () { |
| 20 | if ( u && u.fn && u.fn.select2 && u.fn.select2.amd ) |
| 21 | var e = u.fn.select2.amd; |
| 22 | var t, n, r, h, o, s, f, g, m, v, y, _, i, a, b; |
| 23 | function w( e, t ) { |
| 24 | return i.call( e, t ); |
| 25 | } |
| 26 | function l( e, t ) { |
| 27 | var n, |
| 28 | r, |
| 29 | i, |
| 30 | o, |
| 31 | s, |
| 32 | a, |
| 33 | l, |
| 34 | c, |
| 35 | u, |
| 36 | d, |
| 37 | p, |
| 38 | h = t && t.split( '/' ), |
| 39 | f = y.map, |
| 40 | g = ( f && f[ '*' ] ) || {}; |
| 41 | if ( e ) { |
| 42 | for ( |
| 43 | s = ( e = e.split( '/' ) ).length - 1, |
| 44 | y.nodeIdCompat && |
| 45 | b.test( e[ s ] ) && |
| 46 | ( e[ s ] = e[ s ].replace( b, '' ) ), |
| 47 | '.' === e[ 0 ].charAt( 0 ) && |
| 48 | h && |
| 49 | ( e = h.slice( 0, h.length - 1 ).concat( e ) ), |
| 50 | u = 0; |
| 51 | u < e.length; |
| 52 | u++ |
| 53 | ) |
| 54 | if ( '.' === ( p = e[ u ] ) ) |
| 55 | e.splice( u, 1 ), ( u -= 1 ); |
| 56 | else if ( '..' === p ) { |
| 57 | if ( |
| 58 | 0 === u || |
| 59 | ( 1 === u && '..' === e[ 2 ] ) || |
| 60 | '..' === e[ u - 1 ] |
| 61 | ) |
| 62 | continue; |
| 63 | 0 < u && ( e.splice( u - 1, 2 ), ( u -= 2 ) ); |
| 64 | } |
| 65 | e = e.join( '/' ); |
| 66 | } |
| 67 | if ( ( h || g ) && f ) { |
| 68 | for ( u = ( n = e.split( '/' ) ).length; 0 < u; u -= 1 ) { |
| 69 | if ( ( ( r = n.slice( 0, u ).join( '/' ) ), h ) ) |
| 70 | for ( d = h.length; 0 < d; d -= 1 ) |
| 71 | if ( |
| 72 | ( i = |
| 73 | ( i = |
| 74 | f[ |
| 75 | h.slice( 0, d ).join( '/' ) |
| 76 | ] ) && i[ r ] ) |
| 77 | ) { |
| 78 | ( o = i ), ( a = u ); |
| 79 | break; |
| 80 | } |
| 81 | if ( o ) break; |
| 82 | ! l && g && g[ r ] && ( ( l = g[ r ] ), ( c = u ) ); |
| 83 | } |
| 84 | ! o && l && ( ( o = l ), ( a = c ) ), |
| 85 | o && ( n.splice( 0, a, o ), ( e = n.join( '/' ) ) ); |
| 86 | } |
| 87 | return e; |
| 88 | } |
| 89 | function A( t, n ) { |
| 90 | return function () { |
| 91 | var e = a.call( arguments, 0 ); |
| 92 | return ( |
| 93 | 'string' != typeof e[ 0 ] && |
| 94 | 1 === e.length && |
| 95 | e.push( null ), |
| 96 | s.apply( h, e.concat( [ t, n ] ) ) |
| 97 | ); |
| 98 | }; |
| 99 | } |
| 100 | function x( t ) { |
| 101 | return function ( e ) { |
| 102 | m[ t ] = e; |
| 103 | }; |
| 104 | } |
| 105 | function D( e ) { |
| 106 | if ( w( v, e ) ) { |
| 107 | var t = v[ e ]; |
| 108 | delete v[ e ], ( _[ e ] = ! 0 ), o.apply( h, t ); |
| 109 | } |
| 110 | if ( ! w( m, e ) && ! w( _, e ) ) throw new Error( 'No ' + e ); |
| 111 | return m[ e ]; |
| 112 | } |
| 113 | function c( e ) { |
| 114 | var t, |
| 115 | n = e ? e.indexOf( '!' ) : -1; |
| 116 | return ( |
| 117 | -1 < n && |
| 118 | ( ( t = e.substring( 0, n ) ), |
| 119 | ( e = e.substring( n + 1, e.length ) ) ), |
| 120 | [ t, e ] |
| 121 | ); |
| 122 | } |
| 123 | function S( e ) { |
| 124 | return e ? c( e ) : []; |
| 125 | } |
| 126 | return ( |
| 127 | ( e && e.requirejs ) || |
| 128 | ( e ? ( n = e ) : ( e = {} ), |
| 129 | ( m = {} ), |
| 130 | ( v = {} ), |
| 131 | ( y = {} ), |
| 132 | ( _ = {} ), |
| 133 | ( i = Object.prototype.hasOwnProperty ), |
| 134 | ( a = [].slice ), |
| 135 | ( b = /\.js$/ ), |
| 136 | ( f = function ( e, t ) { |
| 137 | var n, |
| 138 | r = c( e ), |
| 139 | i = r[ 0 ], |
| 140 | o = t[ 1 ]; |
| 141 | return ( |
| 142 | ( e = r[ 1 ] ), |
| 143 | i && ( n = D( ( i = l( i, o ) ) ) ), |
| 144 | i |
| 145 | ? ( e = |
| 146 | n && n.normalize |
| 147 | ? n.normalize( |
| 148 | e, |
| 149 | ( function ( t ) { |
| 150 | return function ( e ) { |
| 151 | return l( e, t ); |
| 152 | }; |
| 153 | } )( o ) |
| 154 | ) |
| 155 | : l( e, o ) ) |
| 156 | : ( ( i = ( r = c( ( e = l( e, o ) ) ) )[ 0 ] ), |
| 157 | ( e = r[ 1 ] ), |
| 158 | i && ( n = D( i ) ) ), |
| 159 | { f: i ? i + '!' + e : e, n: e, pr: i, p: n } |
| 160 | ); |
| 161 | } ), |
| 162 | ( g = { |
| 163 | require: function ( e ) { |
| 164 | return A( e ); |
| 165 | }, |
| 166 | exports: function ( e ) { |
| 167 | var t = m[ e ]; |
| 168 | return void 0 !== t ? t : ( m[ e ] = {} ); |
| 169 | }, |
| 170 | module: function ( e ) { |
| 171 | return { |
| 172 | id: e, |
| 173 | uri: '', |
| 174 | exports: m[ e ], |
| 175 | config: ( function ( e ) { |
| 176 | return function () { |
| 177 | return ( |
| 178 | ( y && |
| 179 | y.config && |
| 180 | y.config[ e ] ) || |
| 181 | {} |
| 182 | ); |
| 183 | }; |
| 184 | } )( e ), |
| 185 | }; |
| 186 | }, |
| 187 | } ), |
| 188 | ( o = function ( e, t, n, r ) { |
| 189 | var i, |
| 190 | o, |
| 191 | s, |
| 192 | a, |
| 193 | l, |
| 194 | c, |
| 195 | u, |
| 196 | d = [], |
| 197 | p = typeof n; |
| 198 | if ( |
| 199 | ( ( c = S( ( r = r || e ) ) ), |
| 200 | 'undefined' == p || 'function' == p ) |
| 201 | ) { |
| 202 | for ( |
| 203 | t = |
| 204 | ! t.length && n.length |
| 205 | ? [ 'require', 'exports', 'module' ] |
| 206 | : t, |
| 207 | l = 0; |
| 208 | l < t.length; |
| 209 | l += 1 |
| 210 | ) |
| 211 | if ( |
| 212 | 'require' === |
| 213 | ( o = ( a = f( t[ l ], c ) ).f ) |
| 214 | ) |
| 215 | d[ l ] = g.require( e ); |
| 216 | else if ( 'exports' === o ) |
| 217 | ( d[ l ] = g.exports( e ) ), ( u = ! 0 ); |
| 218 | else if ( 'module' === o ) |
| 219 | i = d[ l ] = g.module( e ); |
| 220 | else if ( w( m, o ) || w( v, o ) || w( _, o ) ) |
| 221 | d[ l ] = D( o ); |
| 222 | else { |
| 223 | if ( ! a.p ) |
| 224 | throw new Error( e + ' missing ' + o ); |
| 225 | a.p.load( a.n, A( r, ! 0 ), x( o ), {} ), |
| 226 | ( d[ l ] = m[ o ] ); |
| 227 | } |
| 228 | ( s = n ? n.apply( m[ e ], d ) : void 0 ), |
| 229 | e && |
| 230 | ( i && |
| 231 | i.exports !== h && |
| 232 | i.exports !== m[ e ] |
| 233 | ? ( m[ e ] = i.exports ) |
| 234 | : ( s === h && u ) || ( m[ e ] = s ) ); |
| 235 | } else e && ( m[ e ] = n ); |
| 236 | } ), |
| 237 | ( t = n = s = function ( e, t, n, r, i ) { |
| 238 | if ( 'string' == typeof e ) |
| 239 | return g[ e ] ? g[ e ]( t ) : D( f( e, S( t ) ).f ); |
| 240 | if ( ! e.splice ) { |
| 241 | if ( |
| 242 | ( ( y = e ).deps && s( y.deps, y.callback ), |
| 243 | ! t ) |
| 244 | ) |
| 245 | return; |
| 246 | t.splice |
| 247 | ? ( ( e = t ), ( t = n ), ( n = null ) ) |
| 248 | : ( e = h ); |
| 249 | } |
| 250 | return ( |
| 251 | ( t = t || function () {} ), |
| 252 | 'function' == typeof n && ( ( n = r ), ( r = i ) ), |
| 253 | r |
| 254 | ? o( h, e, t, n ) |
| 255 | : setTimeout( function () { |
| 256 | o( h, e, t, n ); |
| 257 | }, 4 ), |
| 258 | s |
| 259 | ); |
| 260 | } ), |
| 261 | ( s.config = function ( e ) { |
| 262 | return s( e ); |
| 263 | } ), |
| 264 | ( t._defined = m ), |
| 265 | ( ( r = function ( e, t, n ) { |
| 266 | if ( 'string' != typeof e ) |
| 267 | throw new Error( |
| 268 | 'See almond README: incorrect module build, no module name' |
| 269 | ); |
| 270 | t.splice || ( ( n = t ), ( t = [] ) ), |
| 271 | w( m, e ) || w( v, e ) || ( v[ e ] = [ e, t, n ] ); |
| 272 | } ).amd = { jQuery: ! 0 } ), |
| 273 | ( e.requirejs = t ), |
| 274 | ( e.require = n ), |
| 275 | ( e.define = r ) ), |
| 276 | e.define( 'almond', function () {} ), |
| 277 | e.define( 'jquery', [], function () { |
| 278 | var e = u || $; |
| 279 | return ( |
| 280 | null == e && |
| 281 | console && |
| 282 | console.error && |
| 283 | console.error( |
| 284 | 'Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page.' |
| 285 | ), |
| 286 | e |
| 287 | ); |
| 288 | } ), |
| 289 | e.define( 'select2/utils', [ 'jquery' ], function ( o ) { |
| 290 | var i = {}; |
| 291 | function u( e ) { |
| 292 | var t = e.prototype, |
| 293 | n = []; |
| 294 | for ( var r in t ) { |
| 295 | 'function' == typeof t[ r ] && |
| 296 | 'constructor' !== r && |
| 297 | n.push( r ); |
| 298 | } |
| 299 | return n; |
| 300 | } |
| 301 | ( i.Extend = function ( e, t ) { |
| 302 | var n = {}.hasOwnProperty; |
| 303 | function r() { |
| 304 | this.constructor = e; |
| 305 | } |
| 306 | for ( var i in t ) |
| 307 | n.call( t, i ) && ( e[ i ] = t[ i ] ); |
| 308 | return ( |
| 309 | ( r.prototype = t.prototype ), |
| 310 | ( e.prototype = new r() ), |
| 311 | ( e.__super__ = t.prototype ), |
| 312 | e |
| 313 | ); |
| 314 | } ), |
| 315 | ( i.Decorate = function ( r, i ) { |
| 316 | var e = u( i ), |
| 317 | t = u( r ); |
| 318 | function o() { |
| 319 | var e = Array.prototype.unshift, |
| 320 | t = i.prototype.constructor.length, |
| 321 | n = r.prototype.constructor; |
| 322 | 0 < t && |
| 323 | ( e.call( |
| 324 | arguments, |
| 325 | r.prototype.constructor |
| 326 | ), |
| 327 | ( n = i.prototype.constructor ) ), |
| 328 | n.apply( this, arguments ); |
| 329 | } |
| 330 | ( i.displayName = r.displayName ), |
| 331 | ( o.prototype = new ( function () { |
| 332 | this.constructor = o; |
| 333 | } )() ); |
| 334 | for ( var n = 0; n < t.length; n++ ) { |
| 335 | var s = t[ n ]; |
| 336 | o.prototype[ s ] = r.prototype[ s ]; |
| 337 | } |
| 338 | function a( e ) { |
| 339 | var t = function () {}; |
| 340 | e in o.prototype && ( t = o.prototype[ e ] ); |
| 341 | var n = i.prototype[ e ]; |
| 342 | return function () { |
| 343 | return ( |
| 344 | Array.prototype.unshift.call( |
| 345 | arguments, |
| 346 | t |
| 347 | ), |
| 348 | n.apply( this, arguments ) |
| 349 | ); |
| 350 | }; |
| 351 | } |
| 352 | for ( var l = 0; l < e.length; l++ ) { |
| 353 | var c = e[ l ]; |
| 354 | o.prototype[ c ] = a( c ); |
| 355 | } |
| 356 | return o; |
| 357 | } ); |
| 358 | function e() { |
| 359 | this.listeners = {}; |
| 360 | } |
| 361 | ( e.prototype.on = function ( e, t ) { |
| 362 | ( this.listeners = this.listeners || {} ), |
| 363 | e in this.listeners |
| 364 | ? this.listeners[ e ].push( t ) |
| 365 | : ( this.listeners[ e ] = [ t ] ); |
| 366 | } ), |
| 367 | ( e.prototype.trigger = function ( e ) { |
| 368 | var t = Array.prototype.slice, |
| 369 | n = t.call( arguments, 1 ); |
| 370 | ( this.listeners = this.listeners || {} ), |
| 371 | null == n && ( n = [] ), |
| 372 | 0 === n.length && n.push( {} ), |
| 373 | ( n[ 0 ]._type = e ) in this.listeners && |
| 374 | this.invoke( |
| 375 | this.listeners[ e ], |
| 376 | t.call( arguments, 1 ) |
| 377 | ), |
| 378 | '*' in this.listeners && |
| 379 | this.invoke( |
| 380 | this.listeners[ '*' ], |
| 381 | arguments |
| 382 | ); |
| 383 | } ), |
| 384 | ( e.prototype.invoke = function ( e, t ) { |
| 385 | for ( var n = 0, r = e.length; n < r; n++ ) |
| 386 | e[ n ].apply( this, t ); |
| 387 | } ), |
| 388 | ( i.Observable = e ), |
| 389 | ( i.generateChars = function ( e ) { |
| 390 | for ( var t = '', n = 0; n < e; n++ ) { |
| 391 | t += Math.floor( 36 * Math.random() ).toString( |
| 392 | 36 |
| 393 | ); |
| 394 | } |
| 395 | return t; |
| 396 | } ), |
| 397 | ( i.bind = function ( e, t ) { |
| 398 | return function () { |
| 399 | e.apply( t, arguments ); |
| 400 | }; |
| 401 | } ), |
| 402 | ( i._convertData = function ( e ) { |
| 403 | for ( var t in e ) { |
| 404 | var n = t.split( '-' ), |
| 405 | r = e; |
| 406 | if ( 1 !== n.length ) { |
| 407 | for ( var i = 0; i < n.length; i++ ) { |
| 408 | var o = n[ i ]; |
| 409 | ( o = |
| 410 | o.substring( 0, 1 ).toLowerCase() + |
| 411 | o.substring( 1 ) ) in r || |
| 412 | ( r[ o ] = {} ), |
| 413 | i == n.length - 1 && |
| 414 | ( r[ o ] = e[ t ] ), |
| 415 | ( r = r[ o ] ); |
| 416 | } |
| 417 | delete e[ t ]; |
| 418 | } |
| 419 | } |
| 420 | return e; |
| 421 | } ), |
| 422 | ( i.hasScroll = function ( e, t ) { |
| 423 | var n = o( t ), |
| 424 | r = t.style.overflowX, |
| 425 | i = t.style.overflowY; |
| 426 | return ( |
| 427 | ( r !== i || |
| 428 | ( 'hidden' !== i && 'visible' !== i ) ) && |
| 429 | ( 'scroll' === r || |
| 430 | 'scroll' === i || |
| 431 | n.innerHeight() < t.scrollHeight || |
| 432 | n.innerWidth() < t.scrollWidth ) |
| 433 | ); |
| 434 | } ), |
| 435 | ( i.escapeMarkup = function ( e ) { |
| 436 | var t = { |
| 437 | '\\': '\', |
| 438 | '&': '&', |
| 439 | '<': '<', |
| 440 | '>': '>', |
| 441 | '"': '"', |
| 442 | "'": ''', |
| 443 | '/': '/', |
| 444 | }; |
| 445 | return 'string' != typeof e |
| 446 | ? e |
| 447 | : String( e ).replace( |
| 448 | /[&<>"'\/\\]/g, |
| 449 | function ( e ) { |
| 450 | return t[ e ]; |
| 451 | } |
| 452 | ); |
| 453 | } ), |
| 454 | ( i.appendMany = function ( e, t ) { |
| 455 | if ( '1.7' === o.fn.jquery.substr( 0, 3 ) ) { |
| 456 | var n = o(); |
| 457 | o.map( t, function ( e ) { |
| 458 | n = n.add( e ); |
| 459 | } ), |
| 460 | ( t = n ); |
| 461 | } |
| 462 | e.append( t ); |
| 463 | } ), |
| 464 | ( i.__cache = {} ); |
| 465 | var n = 0; |
| 466 | return ( |
| 467 | ( i.GetUniqueElementId = function ( e ) { |
| 468 | var t = e.getAttribute( 'data-select2-id' ); |
| 469 | return ( |
| 470 | null == t && |
| 471 | ( e.id |
| 472 | ? ( ( t = e.id ), |
| 473 | e.setAttribute( |
| 474 | 'data-select2-id', |
| 475 | t |
| 476 | ) ) |
| 477 | : ( e.setAttribute( |
| 478 | 'data-select2-id', |
| 479 | ++n |
| 480 | ), |
| 481 | ( t = n.toString() ) ) ), |
| 482 | t |
| 483 | ); |
| 484 | } ), |
| 485 | ( i.StoreData = function ( e, t, n ) { |
| 486 | var r = i.GetUniqueElementId( e ); |
| 487 | i.__cache[ r ] || ( i.__cache[ r ] = {} ), |
| 488 | ( i.__cache[ r ][ t ] = n ); |
| 489 | } ), |
| 490 | ( i.GetData = function ( e, t ) { |
| 491 | var n = i.GetUniqueElementId( e ); |
| 492 | return t |
| 493 | ? i.__cache[ n ] && null != i.__cache[ n ][ t ] |
| 494 | ? i.__cache[ n ][ t ] |
| 495 | : o( e ).data( t ) |
| 496 | : i.__cache[ n ]; |
| 497 | } ), |
| 498 | ( i.RemoveData = function ( e ) { |
| 499 | var t = i.GetUniqueElementId( e ); |
| 500 | null != i.__cache[ t ] && delete i.__cache[ t ], |
| 501 | e.removeAttribute( 'data-select2-id' ); |
| 502 | } ), |
| 503 | i |
| 504 | ); |
| 505 | } ), |
| 506 | e.define( |
| 507 | 'select2/results', |
| 508 | [ 'jquery', './utils' ], |
| 509 | function ( h, f ) { |
| 510 | function r( e, t, n ) { |
| 511 | ( this.$element = e ), |
| 512 | ( this.data = n ), |
| 513 | ( this.options = t ), |
| 514 | r.__super__.constructor.call( this ); |
| 515 | } |
| 516 | return ( |
| 517 | f.Extend( r, f.Observable ), |
| 518 | ( r.prototype.render = function () { |
| 519 | var e = h( |
| 520 | '<ul class="select2-results__options" role="listbox"></ul>' |
| 521 | ); |
| 522 | return ( |
| 523 | this.options.get( 'multiple' ) && |
| 524 | e.attr( |
| 525 | 'aria-multiselectable', |
| 526 | 'true' |
| 527 | ), |
| 528 | ( this.$results = e ) |
| 529 | ); |
| 530 | } ), |
| 531 | ( r.prototype.clear = function () { |
| 532 | this.$results.empty(); |
| 533 | } ), |
| 534 | ( r.prototype.displayMessage = function ( e ) { |
| 535 | var t = this.options.get( 'escapeMarkup' ); |
| 536 | this.clear(), this.hideLoading(); |
| 537 | var n = h( |
| 538 | '<li role="alert" aria-live="assertive" class="select2-results__option"></li>' |
| 539 | ), |
| 540 | r = this.options |
| 541 | .get( 'translations' ) |
| 542 | .get( e.message ); |
| 543 | n.append( t( r( e.args ) ) ), |
| 544 | ( n[ 0 ].className += |
| 545 | ' select2-results__message' ), |
| 546 | this.$results.append( n ); |
| 547 | } ), |
| 548 | ( r.prototype.hideMessages = function () { |
| 549 | this.$results |
| 550 | .find( '.select2-results__message' ) |
| 551 | .remove(); |
| 552 | } ), |
| 553 | ( r.prototype.append = function ( e ) { |
| 554 | this.hideLoading(); |
| 555 | var t = []; |
| 556 | if ( |
| 557 | null != e.results && |
| 558 | 0 !== e.results.length |
| 559 | ) { |
| 560 | e.results = this.sort( e.results ); |
| 561 | for ( |
| 562 | var n = 0; |
| 563 | n < e.results.length; |
| 564 | n++ |
| 565 | ) { |
| 566 | var r = e.results[ n ], |
| 567 | i = this.option( r ); |
| 568 | t.push( i ); |
| 569 | } |
| 570 | this.$results.append( t ); |
| 571 | } else |
| 572 | 0 === this.$results.children().length && |
| 573 | this.trigger( 'results:message', { |
| 574 | message: 'noResults', |
| 575 | } ); |
| 576 | } ), |
| 577 | ( r.prototype.position = function ( e, t ) { |
| 578 | t.find( '.select2-results' ).append( e ); |
| 579 | } ), |
| 580 | ( r.prototype.sort = function ( e ) { |
| 581 | return this.options.get( 'sorter' )( e ); |
| 582 | } ), |
| 583 | ( r.prototype.highlightFirstItem = function () { |
| 584 | var e = this.$results.find( |
| 585 | '.select2-results__option[aria-selected]' |
| 586 | ), |
| 587 | t = e.filter( '[aria-selected=true]' ); |
| 588 | 0 < t.length |
| 589 | ? t.first().trigger( 'mouseenter' ) |
| 590 | : e.first().trigger( 'mouseenter' ), |
| 591 | this.ensureHighlightVisible(); |
| 592 | } ), |
| 593 | ( r.prototype.setClasses = function () { |
| 594 | var t = this; |
| 595 | this.data.current( function ( e ) { |
| 596 | var r = h.map( e, function ( e ) { |
| 597 | return e.id.toString(); |
| 598 | } ); |
| 599 | t.$results |
| 600 | .find( |
| 601 | '.select2-results__option[aria-selected]' |
| 602 | ) |
| 603 | .each( function () { |
| 604 | var e = h( this ), |
| 605 | t = f.GetData( this, 'data' ), |
| 606 | n = '' + t.id; |
| 607 | ( null != t.element && |
| 608 | t.element.selected ) || |
| 609 | ( null == t.element && |
| 610 | -1 < h.inArray( n, r ) ) |
| 611 | ? e.attr( |
| 612 | 'aria-selected', |
| 613 | 'true' |
| 614 | ) |
| 615 | : e.attr( |
| 616 | 'aria-selected', |
| 617 | 'false' |
| 618 | ); |
| 619 | } ); |
| 620 | } ); |
| 621 | } ), |
| 622 | ( r.prototype.showLoading = function ( e ) { |
| 623 | this.hideLoading(); |
| 624 | var t = { |
| 625 | disabled: ! 0, |
| 626 | loading: ! 0, |
| 627 | text: this.options |
| 628 | .get( 'translations' ) |
| 629 | .get( 'searching' )( e ), |
| 630 | }, |
| 631 | n = this.option( t ); |
| 632 | ( n.className += ' loading-results' ), |
| 633 | this.$results.prepend( n ); |
| 634 | } ), |
| 635 | ( r.prototype.hideLoading = function () { |
| 636 | this.$results |
| 637 | .find( '.loading-results' ) |
| 638 | .remove(); |
| 639 | } ), |
| 640 | ( r.prototype.option = function ( e ) { |
| 641 | var t = document.createElement( 'li' ); |
| 642 | t.className = 'select2-results__option'; |
| 643 | var n = { |
| 644 | role: 'option', |
| 645 | 'aria-selected': 'false', |
| 646 | }, |
| 647 | r = |
| 648 | window.Element.prototype.matches || |
| 649 | window.Element.prototype |
| 650 | .msMatchesSelector || |
| 651 | window.Element.prototype |
| 652 | .webkitMatchesSelector; |
| 653 | for ( var i in ( ( ( null != e.element && |
| 654 | r.call( e.element, ':disabled' ) ) || |
| 655 | ( null == e.element && e.disabled ) ) && |
| 656 | ( delete n[ 'aria-selected' ], |
| 657 | ( n[ 'aria-disabled' ] = 'true' ) ), |
| 658 | null == e.id && delete n[ 'aria-selected' ], |
| 659 | null != e._resultId && ( t.id = e._resultId ), |
| 660 | e.title && ( t.title = e.title ), |
| 661 | e.children && |
| 662 | ( ( n.role = 'group' ), |
| 663 | ( n[ 'aria-label' ] = e.text ), |
| 664 | delete n[ 'aria-selected' ] ), |
| 665 | n ) ) { |
| 666 | var o = n[ i ]; |
| 667 | t.setAttribute( i, o ); |
| 668 | } |
| 669 | if ( e.children ) { |
| 670 | var s = h( t ), |
| 671 | a = document.createElement( 'strong' ); |
| 672 | a.className = 'select2-results__group'; |
| 673 | h( a ); |
| 674 | this.template( e, a ); |
| 675 | for ( |
| 676 | var l = [], c = 0; |
| 677 | c < e.children.length; |
| 678 | c++ |
| 679 | ) { |
| 680 | var u = e.children[ c ], |
| 681 | d = this.option( u ); |
| 682 | l.push( d ); |
| 683 | } |
| 684 | var p = h( '<ul></ul>', { |
| 685 | class: |
| 686 | 'select2-results__options select2-results__options--nested', |
| 687 | } ); |
| 688 | p.append( l ), s.append( a ), s.append( p ); |
| 689 | } else this.template( e, t ); |
| 690 | return f.StoreData( t, 'data', e ), t; |
| 691 | } ), |
| 692 | ( r.prototype.bind = function ( t, e ) { |
| 693 | var l = this, |
| 694 | n = t.id + '-results'; |
| 695 | this.$results.attr( 'id', n ), |
| 696 | t.on( 'results:all', function ( e ) { |
| 697 | l.clear(), |
| 698 | l.append( e.data ), |
| 699 | t.isOpen() && |
| 700 | ( l.setClasses(), |
| 701 | l.highlightFirstItem() ); |
| 702 | } ), |
| 703 | t.on( 'results:append', function ( e ) { |
| 704 | l.append( e.data ), |
| 705 | t.isOpen() && l.setClasses(); |
| 706 | } ), |
| 707 | t.on( 'query', function ( e ) { |
| 708 | l.hideMessages(), l.showLoading( e ); |
| 709 | } ), |
| 710 | t.on( 'select', function () { |
| 711 | t.isOpen() && |
| 712 | ( l.setClasses(), |
| 713 | l.options.get( |
| 714 | 'scrollAfterSelect' |
| 715 | ) && l.highlightFirstItem() ); |
| 716 | } ), |
| 717 | t.on( 'unselect', function () { |
| 718 | t.isOpen() && |
| 719 | ( l.setClasses(), |
| 720 | l.options.get( |
| 721 | 'scrollAfterSelect' |
| 722 | ) && l.highlightFirstItem() ); |
| 723 | } ), |
| 724 | t.on( 'open', function () { |
| 725 | l.$results.attr( |
| 726 | 'aria-expanded', |
| 727 | 'true' |
| 728 | ), |
| 729 | l.$results.attr( |
| 730 | 'aria-hidden', |
| 731 | 'false' |
| 732 | ), |
| 733 | l.setClasses(), |
| 734 | l.ensureHighlightVisible(); |
| 735 | } ), |
| 736 | t.on( 'close', function () { |
| 737 | l.$results.attr( |
| 738 | 'aria-expanded', |
| 739 | 'false' |
| 740 | ), |
| 741 | l.$results.attr( |
| 742 | 'aria-hidden', |
| 743 | 'true' |
| 744 | ), |
| 745 | l.$results.removeAttr( |
| 746 | 'aria-activedescendant' |
| 747 | ); |
| 748 | } ), |
| 749 | t.on( 'results:toggle', function () { |
| 750 | var e = l.getHighlightedResults(); |
| 751 | 0 !== e.length && |
| 752 | e.trigger( 'mouseup' ); |
| 753 | } ), |
| 754 | t.on( 'results:select', function () { |
| 755 | var e = l.getHighlightedResults(); |
| 756 | if ( 0 !== e.length ) { |
| 757 | var t = f.GetData( e[ 0 ], 'data' ); |
| 758 | 'true' == e.attr( 'aria-selected' ) |
| 759 | ? l.trigger( 'close', {} ) |
| 760 | : l.trigger( 'select', { |
| 761 | data: t, |
| 762 | } ); |
| 763 | } |
| 764 | } ), |
| 765 | t.on( 'results:previous', function () { |
| 766 | var e = l.getHighlightedResults(), |
| 767 | t = l.$results.find( |
| 768 | '[aria-selected]' |
| 769 | ), |
| 770 | n = t.index( e ); |
| 771 | if ( ! ( n <= 0 ) ) { |
| 772 | var r = n - 1; |
| 773 | 0 === e.length && ( r = 0 ); |
| 774 | var i = t.eq( r ); |
| 775 | i.trigger( 'mouseenter' ); |
| 776 | var o = l.$results.offset().top, |
| 777 | s = i.offset().top, |
| 778 | a = |
| 779 | l.$results.scrollTop() + |
| 780 | ( s - o ); |
| 781 | 0 === r |
| 782 | ? l.$results.scrollTop( 0 ) |
| 783 | : s - o < 0 && |
| 784 | l.$results.scrollTop( a ); |
| 785 | } |
| 786 | } ), |
| 787 | t.on( 'results:next', function () { |
| 788 | var e = l.getHighlightedResults(), |
| 789 | t = l.$results.find( |
| 790 | '[aria-selected]' |
| 791 | ), |
| 792 | n = t.index( e ) + 1; |
| 793 | if ( ! ( n >= t.length ) ) { |
| 794 | var r = t.eq( n ); |
| 795 | r.trigger( 'mouseenter' ); |
| 796 | var i = |
| 797 | l.$results.offset().top + |
| 798 | l.$results.outerHeight( |
| 799 | ! 1 |
| 800 | ), |
| 801 | o = |
| 802 | r.offset().top + |
| 803 | r.outerHeight( ! 1 ), |
| 804 | s = |
| 805 | l.$results.scrollTop() + |
| 806 | o - |
| 807 | i; |
| 808 | 0 === n |
| 809 | ? l.$results.scrollTop( 0 ) |
| 810 | : i < o && |
| 811 | l.$results.scrollTop( s ); |
| 812 | } |
| 813 | } ), |
| 814 | t.on( 'results:focus', function ( e ) { |
| 815 | e.element.addClass( |
| 816 | 'select2-results__option--highlighted' |
| 817 | ); |
| 818 | } ), |
| 819 | t.on( 'results:message', function ( e ) { |
| 820 | l.displayMessage( e ); |
| 821 | } ), |
| 822 | h.fn.mousewheel && |
| 823 | this.$results.on( |
| 824 | 'mousewheel', |
| 825 | function ( e ) { |
| 826 | var t = l.$results.scrollTop(), |
| 827 | n = |
| 828 | l.$results.get( 0 ) |
| 829 | .scrollHeight - |
| 830 | t + |
| 831 | e.deltaY, |
| 832 | r = |
| 833 | 0 < e.deltaY && |
| 834 | t - e.deltaY <= 0, |
| 835 | i = |
| 836 | e.deltaY < 0 && |
| 837 | n <= |
| 838 | l.$results.height(); |
| 839 | r |
| 840 | ? ( l.$results.scrollTop( |
| 841 | 0 |
| 842 | ), |
| 843 | e.preventDefault(), |
| 844 | e.stopPropagation() ) |
| 845 | : i && |
| 846 | ( l.$results.scrollTop( |
| 847 | l.$results.get( 0 ) |
| 848 | .scrollHeight - |
| 849 | l.$results.height() |
| 850 | ), |
| 851 | e.preventDefault(), |
| 852 | e.stopPropagation() ); |
| 853 | } |
| 854 | ), |
| 855 | this.$results.on( |
| 856 | 'mouseup', |
| 857 | '.select2-results__option[aria-selected]', |
| 858 | function ( e ) { |
| 859 | var t = h( this ), |
| 860 | n = f.GetData( this, 'data' ); |
| 861 | 'true' !== t.attr( 'aria-selected' ) |
| 862 | ? l.trigger( 'select', { |
| 863 | originalEvent: e, |
| 864 | data: n, |
| 865 | } ) |
| 866 | : l.options.get( 'multiple' ) |
| 867 | ? l.trigger( 'unselect', { |
| 868 | originalEvent: e, |
| 869 | data: n, |
| 870 | } ) |
| 871 | : l.trigger( 'close', {} ); |
| 872 | } |
| 873 | ), |
| 874 | this.$results.on( |
| 875 | 'mouseenter', |
| 876 | '.select2-results__option[aria-selected]', |
| 877 | function ( e ) { |
| 878 | var t = f.GetData( this, 'data' ); |
| 879 | l |
| 880 | .getHighlightedResults() |
| 881 | .removeClass( |
| 882 | 'select2-results__option--highlighted' |
| 883 | ), |
| 884 | l.trigger( 'results:focus', { |
| 885 | data: t, |
| 886 | element: h( this ), |
| 887 | } ); |
| 888 | } |
| 889 | ); |
| 890 | } ), |
| 891 | ( r.prototype.getHighlightedResults = function () { |
| 892 | return this.$results.find( |
| 893 | '.select2-results__option--highlighted' |
| 894 | ); |
| 895 | } ), |
| 896 | ( r.prototype.destroy = function () { |
| 897 | this.$results.remove(); |
| 898 | } ), |
| 899 | ( r.prototype.ensureHighlightVisible = function () { |
| 900 | var e = this.getHighlightedResults(); |
| 901 | if ( 0 !== e.length ) { |
| 902 | var t = this.$results |
| 903 | .find( '[aria-selected]' ) |
| 904 | .index( e ), |
| 905 | n = this.$results.offset().top, |
| 906 | r = e.offset().top, |
| 907 | i = |
| 908 | this.$results.scrollTop() + |
| 909 | ( r - n ), |
| 910 | o = r - n; |
| 911 | ( i -= 2 * e.outerHeight( ! 1 ) ), |
| 912 | t <= 2 |
| 913 | ? this.$results.scrollTop( 0 ) |
| 914 | : ( o > |
| 915 | this.$results.outerHeight() || |
| 916 | o < 0 ) && |
| 917 | this.$results.scrollTop( i ); |
| 918 | } |
| 919 | } ), |
| 920 | ( r.prototype.template = function ( e, t ) { |
| 921 | var n = this.options.get( 'templateResult' ), |
| 922 | r = this.options.get( 'escapeMarkup' ), |
| 923 | i = n( e, t ); |
| 924 | null == i |
| 925 | ? ( t.style.display = 'none' ) |
| 926 | : 'string' == typeof i |
| 927 | ? ( t.innerHTML = r( i ) ) |
| 928 | : h( t ).append( i ); |
| 929 | } ), |
| 930 | r |
| 931 | ); |
| 932 | } |
| 933 | ), |
| 934 | e.define( 'select2/keys', [], function () { |
| 935 | return { |
| 936 | BACKSPACE: 8, |
| 937 | TAB: 9, |
| 938 | ENTER: 13, |
| 939 | SHIFT: 16, |
| 940 | CTRL: 17, |
| 941 | ALT: 18, |
| 942 | ESC: 27, |
| 943 | SPACE: 32, |
| 944 | PAGE_UP: 33, |
| 945 | PAGE_DOWN: 34, |
| 946 | END: 35, |
| 947 | HOME: 36, |
| 948 | LEFT: 37, |
| 949 | UP: 38, |
| 950 | RIGHT: 39, |
| 951 | DOWN: 40, |
| 952 | DELETE: 46, |
| 953 | }; |
| 954 | } ), |
| 955 | e.define( |
| 956 | 'select2/selection/base', |
| 957 | [ 'jquery', '../utils', '../keys' ], |
| 958 | function ( n, r, i ) { |
| 959 | function o( e, t ) { |
| 960 | ( this.$element = e ), |
| 961 | ( this.options = t ), |
| 962 | o.__super__.constructor.call( this ); |
| 963 | } |
| 964 | return ( |
| 965 | r.Extend( o, r.Observable ), |
| 966 | ( o.prototype.render = function () { |
| 967 | var e = n( |
| 968 | '<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>' |
| 969 | ); |
| 970 | return ( |
| 971 | ( this._tabindex = 0 ), |
| 972 | null != |
| 973 | r.GetData( |
| 974 | this.$element[ 0 ], |
| 975 | 'old-tabindex' |
| 976 | ) |
| 977 | ? ( this._tabindex = r.GetData( |
| 978 | this.$element[ 0 ], |
| 979 | 'old-tabindex' |
| 980 | ) ) |
| 981 | : null != |
| 982 | this.$element.attr( |
| 983 | 'tabindex' |
| 984 | ) && |
| 985 | ( this._tabindex = this.$element.attr( |
| 986 | 'tabindex' |
| 987 | ) ), |
| 988 | e.attr( |
| 989 | 'title', |
| 990 | this.$element.attr( 'title' ) |
| 991 | ), |
| 992 | e.attr( 'tabindex', this._tabindex ), |
| 993 | e.attr( 'aria-disabled', 'false' ), |
| 994 | ( this.$selection = e ) |
| 995 | ); |
| 996 | } ), |
| 997 | ( o.prototype.bind = function ( e, t ) { |
| 998 | var n = this, |
| 999 | r = e.id + '-results'; |
| 1000 | ( this.container = e ), |
| 1001 | this.$selection.on( |
| 1002 | 'focus', |
| 1003 | function ( e ) { |
| 1004 | n.trigger( 'focus', e ); |
| 1005 | } |
| 1006 | ), |
| 1007 | this.$selection.on( 'blur', function ( e ) { |
| 1008 | n._handleBlur( e ); |
| 1009 | } ), |
| 1010 | this.$selection.on( |
| 1011 | 'keydown', |
| 1012 | function ( e ) { |
| 1013 | n.trigger( 'keypress', e ), |
| 1014 | e.which === i.SPACE && |
| 1015 | e.preventDefault(); |
| 1016 | } |
| 1017 | ), |
| 1018 | e.on( 'results:focus', function ( e ) { |
| 1019 | n.$selection.attr( |
| 1020 | 'aria-activedescendant', |
| 1021 | e.data._resultId |
| 1022 | ); |
| 1023 | } ), |
| 1024 | e.on( 'selection:update', function ( e ) { |
| 1025 | n.update( e.data ); |
| 1026 | } ), |
| 1027 | e.on( 'open', function () { |
| 1028 | n.$selection.attr( |
| 1029 | 'aria-expanded', |
| 1030 | 'true' |
| 1031 | ), |
| 1032 | n.$selection.attr( 'aria-owns', r ), |
| 1033 | n._attachCloseHandler( e ); |
| 1034 | } ), |
| 1035 | e.on( 'close', function () { |
| 1036 | n.$selection.attr( |
| 1037 | 'aria-expanded', |
| 1038 | 'false' |
| 1039 | ), |
| 1040 | n.$selection.removeAttr( |
| 1041 | 'aria-activedescendant' |
| 1042 | ), |
| 1043 | n.$selection.removeAttr( |
| 1044 | 'aria-owns' |
| 1045 | ), |
| 1046 | n.$selection.trigger( 'focus' ), |
| 1047 | n._detachCloseHandler( e ); |
| 1048 | } ), |
| 1049 | e.on( 'enable', function () { |
| 1050 | n.$selection.attr( |
| 1051 | 'tabindex', |
| 1052 | n._tabindex |
| 1053 | ), |
| 1054 | n.$selection.attr( |
| 1055 | 'aria-disabled', |
| 1056 | 'false' |
| 1057 | ); |
| 1058 | } ), |
| 1059 | e.on( 'disable', function () { |
| 1060 | n.$selection.attr( 'tabindex', '-1' ), |
| 1061 | n.$selection.attr( |
| 1062 | 'aria-disabled', |
| 1063 | 'true' |
| 1064 | ); |
| 1065 | } ); |
| 1066 | } ), |
| 1067 | ( o.prototype._handleBlur = function ( e ) { |
| 1068 | var t = this; |
| 1069 | window.setTimeout( function () { |
| 1070 | document.activeElement == |
| 1071 | t.$selection[ 0 ] || |
| 1072 | n.contains( |
| 1073 | t.$selection[ 0 ], |
| 1074 | document.activeElement |
| 1075 | ) || |
| 1076 | t.trigger( 'blur', e ); |
| 1077 | }, 1 ); |
| 1078 | } ), |
| 1079 | ( o.prototype._attachCloseHandler = function ( e ) { |
| 1080 | n( document.body ).on( |
| 1081 | 'mousedown.select2.' + e.id, |
| 1082 | function ( e ) { |
| 1083 | var t = n( e.target ).closest( |
| 1084 | '.select2' |
| 1085 | ); |
| 1086 | n( |
| 1087 | '.select2.select2-container--open' |
| 1088 | ).each( function () { |
| 1089 | this != t[ 0 ] && |
| 1090 | r |
| 1091 | .GetData( this, 'element' ) |
| 1092 | .select2( 'close' ); |
| 1093 | } ); |
| 1094 | } |
| 1095 | ); |
| 1096 | } ), |
| 1097 | ( o.prototype._detachCloseHandler = function ( e ) { |
| 1098 | n( document.body ).off( |
| 1099 | 'mousedown.select2.' + e.id |
| 1100 | ); |
| 1101 | } ), |
| 1102 | ( o.prototype.position = function ( e, t ) { |
| 1103 | t.find( '.selection' ).append( e ); |
| 1104 | } ), |
| 1105 | ( o.prototype.destroy = function () { |
| 1106 | this._detachCloseHandler( this.container ); |
| 1107 | } ), |
| 1108 | ( o.prototype.update = function ( e ) { |
| 1109 | throw new Error( |
| 1110 | 'The `update` method must be defined in child classes.' |
| 1111 | ); |
| 1112 | } ), |
| 1113 | ( o.prototype.isEnabled = function () { |
| 1114 | return ! this.isDisabled(); |
| 1115 | } ), |
| 1116 | ( o.prototype.isDisabled = function () { |
| 1117 | return this.options.get( 'disabled' ); |
| 1118 | } ), |
| 1119 | o |
| 1120 | ); |
| 1121 | } |
| 1122 | ), |
| 1123 | e.define( |
| 1124 | 'select2/selection/single', |
| 1125 | [ 'jquery', './base', '../utils', '../keys' ], |
| 1126 | function ( e, t, n, r ) { |
| 1127 | function i() { |
| 1128 | i.__super__.constructor.apply( this, arguments ); |
| 1129 | } |
| 1130 | return ( |
| 1131 | n.Extend( i, t ), |
| 1132 | ( i.prototype.render = function () { |
| 1133 | var e = i.__super__.render.call( this ); |
| 1134 | return ( |
| 1135 | e.addClass( 'select2-selection--single' ), |
| 1136 | e.html( |
| 1137 | '<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>' |
| 1138 | ), |
| 1139 | e |
| 1140 | ); |
| 1141 | } ), |
| 1142 | ( i.prototype.bind = function ( t, e ) { |
| 1143 | var n = this; |
| 1144 | i.__super__.bind.apply( this, arguments ); |
| 1145 | var r = t.id + '-container'; |
| 1146 | this.$selection |
| 1147 | .find( '.select2-selection__rendered' ) |
| 1148 | .attr( 'id', r ) |
| 1149 | .attr( 'role', 'textbox' ) |
| 1150 | .attr( 'aria-readonly', 'true' ), |
| 1151 | this.$selection.attr( |
| 1152 | 'aria-labelledby', |
| 1153 | r |
| 1154 | ), |
| 1155 | this.$selection.on( |
| 1156 | 'mousedown', |
| 1157 | function ( e ) { |
| 1158 | 1 === e.which && |
| 1159 | n.trigger( 'toggle', { |
| 1160 | originalEvent: e, |
| 1161 | } ); |
| 1162 | } |
| 1163 | ), |
| 1164 | this.$selection.on( |
| 1165 | 'focus', |
| 1166 | function ( e ) {} |
| 1167 | ), |
| 1168 | this.$selection.on( |
| 1169 | 'blur', |
| 1170 | function ( e ) {} |
| 1171 | ), |
| 1172 | t.on( 'focus', function ( e ) { |
| 1173 | t.isOpen() || |
| 1174 | n.$selection.trigger( 'focus' ); |
| 1175 | } ); |
| 1176 | } ), |
| 1177 | ( i.prototype.clear = function () { |
| 1178 | var e = this.$selection.find( |
| 1179 | '.select2-selection__rendered' |
| 1180 | ); |
| 1181 | e.empty(), e.removeAttr( 'title' ); |
| 1182 | } ), |
| 1183 | ( i.prototype.display = function ( e, t ) { |
| 1184 | var n = this.options.get( 'templateSelection' ); |
| 1185 | return this.options.get( 'escapeMarkup' )( |
| 1186 | n( e, t ) |
| 1187 | ); |
| 1188 | } ), |
| 1189 | ( i.prototype.selectionContainer = function () { |
| 1190 | return e( '<span></span>' ); |
| 1191 | } ), |
| 1192 | ( i.prototype.update = function ( e ) { |
| 1193 | if ( 0 !== e.length ) { |
| 1194 | var t = e[ 0 ], |
| 1195 | n = this.$selection.find( |
| 1196 | '.select2-selection__rendered' |
| 1197 | ), |
| 1198 | r = this.display( t, n ); |
| 1199 | n.empty().append( r ); |
| 1200 | var i = t.title || t.text; |
| 1201 | i |
| 1202 | ? n.attr( 'title', i ) |
| 1203 | : n.removeAttr( 'title' ); |
| 1204 | } else this.clear(); |
| 1205 | } ), |
| 1206 | i |
| 1207 | ); |
| 1208 | } |
| 1209 | ), |
| 1210 | e.define( |
| 1211 | 'select2/selection/multiple', |
| 1212 | [ 'jquery', './base', '../utils' ], |
| 1213 | function ( i, e, l ) { |
| 1214 | function n( e, t ) { |
| 1215 | n.__super__.constructor.apply( this, arguments ); |
| 1216 | } |
| 1217 | return ( |
| 1218 | l.Extend( n, e ), |
| 1219 | ( n.prototype.render = function () { |
| 1220 | var e = n.__super__.render.call( this ); |
| 1221 | return ( |
| 1222 | e.addClass( 'select2-selection--multiple' ), |
| 1223 | e.html( |
| 1224 | '<ul class="select2-selection__rendered"></ul>' |
| 1225 | ), |
| 1226 | e |
| 1227 | ); |
| 1228 | } ), |
| 1229 | ( n.prototype.bind = function ( e, t ) { |
| 1230 | var r = this; |
| 1231 | n.__super__.bind.apply( this, arguments ), |
| 1232 | this.$selection.on( |
| 1233 | 'click', |
| 1234 | function ( e ) { |
| 1235 | r.trigger( 'toggle', { |
| 1236 | originalEvent: e, |
| 1237 | } ); |
| 1238 | } |
| 1239 | ), |
| 1240 | this.$selection.on( |
| 1241 | 'click', |
| 1242 | '.select2-selection__choice__remove', |
| 1243 | function ( e ) { |
| 1244 | if ( ! r.isDisabled() ) { |
| 1245 | var t = i( this ).parent(), |
| 1246 | n = l.GetData( |
| 1247 | t[ 0 ], |
| 1248 | 'data' |
| 1249 | ); |
| 1250 | r.trigger( 'unselect', { |
| 1251 | originalEvent: e, |
| 1252 | data: n, |
| 1253 | } ); |
| 1254 | } |
| 1255 | } |
| 1256 | ); |
| 1257 | } ), |
| 1258 | ( n.prototype.clear = function () { |
| 1259 | var e = this.$selection.find( |
| 1260 | '.select2-selection__rendered' |
| 1261 | ); |
| 1262 | e.empty(), e.removeAttr( 'title' ); |
| 1263 | } ), |
| 1264 | ( n.prototype.display = function ( e, t ) { |
| 1265 | var n = this.options.get( 'templateSelection' ); |
| 1266 | return this.options.get( 'escapeMarkup' )( |
| 1267 | n( e, t ) |
| 1268 | ); |
| 1269 | } ), |
| 1270 | ( n.prototype.selectionContainer = function () { |
| 1271 | return i( |
| 1272 | '<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>' |
| 1273 | ); |
| 1274 | } ), |
| 1275 | ( n.prototype.update = function ( e ) { |
| 1276 | if ( ( this.clear(), 0 !== e.length ) ) { |
| 1277 | for ( |
| 1278 | var t = [], n = 0; |
| 1279 | n < e.length; |
| 1280 | n++ |
| 1281 | ) { |
| 1282 | var r = e[ n ], |
| 1283 | i = this.selectionContainer(), |
| 1284 | o = this.display( r, i ); |
| 1285 | i.append( o ); |
| 1286 | var s = r.title || r.text; |
| 1287 | s && i.attr( 'title', s ), |
| 1288 | l.StoreData( i[ 0 ], 'data', r ), |
| 1289 | t.push( i ); |
| 1290 | } |
| 1291 | var a = this.$selection.find( |
| 1292 | '.select2-selection__rendered' |
| 1293 | ); |
| 1294 | l.appendMany( a, t ); |
| 1295 | } |
| 1296 | } ), |
| 1297 | n |
| 1298 | ); |
| 1299 | } |
| 1300 | ), |
| 1301 | e.define( |
| 1302 | 'select2/selection/placeholder', |
| 1303 | [ '../utils' ], |
| 1304 | function ( e ) { |
| 1305 | function t( e, t, n ) { |
| 1306 | ( this.placeholder = this.normalizePlaceholder( |
| 1307 | n.get( 'placeholder' ) |
| 1308 | ) ), |
| 1309 | e.call( this, t, n ); |
| 1310 | } |
| 1311 | return ( |
| 1312 | ( t.prototype.normalizePlaceholder = function ( |
| 1313 | e, |
| 1314 | t |
| 1315 | ) { |
| 1316 | return ( |
| 1317 | 'string' == typeof t && |
| 1318 | ( t = { id: '', text: t } ), |
| 1319 | t |
| 1320 | ); |
| 1321 | } ), |
| 1322 | ( t.prototype.createPlaceholder = function ( |
| 1323 | e, |
| 1324 | t |
| 1325 | ) { |
| 1326 | var n = this.selectionContainer(); |
| 1327 | return ( |
| 1328 | n.html( this.display( t ) ), |
| 1329 | n |
| 1330 | .addClass( |
| 1331 | 'select2-selection__placeholder' |
| 1332 | ) |
| 1333 | .removeClass( |
| 1334 | 'select2-selection__choice' |
| 1335 | ), |
| 1336 | n |
| 1337 | ); |
| 1338 | } ), |
| 1339 | ( t.prototype.update = function ( e, t ) { |
| 1340 | var n = |
| 1341 | 1 == t.length && |
| 1342 | t[ 0 ].id != this.placeholder.id; |
| 1343 | if ( 1 < t.length || n ) |
| 1344 | return e.call( this, t ); |
| 1345 | this.clear(); |
| 1346 | var r = this.createPlaceholder( |
| 1347 | this.placeholder |
| 1348 | ); |
| 1349 | this.$selection |
| 1350 | .find( '.select2-selection__rendered' ) |
| 1351 | .append( r ); |
| 1352 | } ), |
| 1353 | t |
| 1354 | ); |
| 1355 | } |
| 1356 | ), |
| 1357 | e.define( |
| 1358 | 'select2/selection/allowClear', |
| 1359 | [ 'jquery', '../keys', '../utils' ], |
| 1360 | function ( i, r, a ) { |
| 1361 | function e() {} |
| 1362 | return ( |
| 1363 | ( e.prototype.bind = function ( e, t, n ) { |
| 1364 | var r = this; |
| 1365 | e.call( this, t, n ), |
| 1366 | null == this.placeholder && |
| 1367 | this.options.get( 'debug' ) && |
| 1368 | window.console && |
| 1369 | console.error && |
| 1370 | console.error( |
| 1371 | 'Select2: The `allowClear` option should be used in combination with the `placeholder` option.' |
| 1372 | ), |
| 1373 | this.$selection.on( |
| 1374 | 'mousedown', |
| 1375 | '.select2-selection__clear', |
| 1376 | function ( e ) { |
| 1377 | r._handleClear( e ); |
| 1378 | } |
| 1379 | ), |
| 1380 | t.on( 'keypress', function ( e ) { |
| 1381 | r._handleKeyboardClear( e, t ); |
| 1382 | } ); |
| 1383 | } ), |
| 1384 | ( e.prototype._handleClear = function ( e, t ) { |
| 1385 | if ( ! this.isDisabled() ) { |
| 1386 | var n = this.$selection.find( |
| 1387 | '.select2-selection__clear' |
| 1388 | ); |
| 1389 | if ( 0 !== n.length ) { |
| 1390 | t.stopPropagation(); |
| 1391 | var r = a.GetData( n[ 0 ], 'data' ), |
| 1392 | i = this.$element.val(); |
| 1393 | this.$element.val( |
| 1394 | this.placeholder.id |
| 1395 | ); |
| 1396 | var o = { data: r }; |
| 1397 | if ( |
| 1398 | ( this.trigger( 'clear', o ), |
| 1399 | o.prevented ) |
| 1400 | ) |
| 1401 | this.$element.val( i ); |
| 1402 | else { |
| 1403 | for ( var s = 0; s < r.length; s++ ) |
| 1404 | if ( |
| 1405 | ( ( o = { data: r[ s ] } ), |
| 1406 | this.trigger( |
| 1407 | 'unselect', |
| 1408 | o |
| 1409 | ), |
| 1410 | o.prevented ) |
| 1411 | ) |
| 1412 | return void this.$element.val( |
| 1413 | i |
| 1414 | ); |
| 1415 | this.$element |
| 1416 | .trigger( 'input' ) |
| 1417 | .trigger( 'change' ), |
| 1418 | this.trigger( 'toggle', {} ); |
| 1419 | } |
| 1420 | } |
| 1421 | } |
| 1422 | } ), |
| 1423 | ( e.prototype._handleKeyboardClear = function ( |
| 1424 | e, |
| 1425 | t, |
| 1426 | n |
| 1427 | ) { |
| 1428 | n.isOpen() || |
| 1429 | ( t.which != r.DELETE && |
| 1430 | t.which != r.BACKSPACE ) || |
| 1431 | this._handleClear( t ); |
| 1432 | } ), |
| 1433 | ( e.prototype.update = function ( e, t ) { |
| 1434 | if ( |
| 1435 | ( e.call( this, t ), |
| 1436 | ! ( |
| 1437 | 0 < |
| 1438 | this.$selection.find( |
| 1439 | '.select2-selection__placeholder' |
| 1440 | ).length || 0 === t.length |
| 1441 | ) ) |
| 1442 | ) { |
| 1443 | var n = this.options |
| 1444 | .get( 'translations' ) |
| 1445 | .get( 'removeAllItems' ), |
| 1446 | r = i( |
| 1447 | '<span class="select2-selection__clear" title="' + |
| 1448 | n() + |
| 1449 | '">×</span>' |
| 1450 | ); |
| 1451 | a.StoreData( r[ 0 ], 'data', t ), |
| 1452 | this.$selection |
| 1453 | .find( |
| 1454 | '.select2-selection__rendered' |
| 1455 | ) |
| 1456 | .prepend( r ); |
| 1457 | } |
| 1458 | } ), |
| 1459 | e |
| 1460 | ); |
| 1461 | } |
| 1462 | ), |
| 1463 | e.define( |
| 1464 | 'select2/selection/search', |
| 1465 | [ 'jquery', '../utils', '../keys' ], |
| 1466 | function ( r, a, l ) { |
| 1467 | function e( e, t, n ) { |
| 1468 | e.call( this, t, n ); |
| 1469 | } |
| 1470 | return ( |
| 1471 | ( e.prototype.render = function ( e ) { |
| 1472 | var t = r( |
| 1473 | '<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>' |
| 1474 | ); |
| 1475 | ( this.$searchContainer = t ), |
| 1476 | ( this.$search = t.find( 'input' ) ); |
| 1477 | var n = e.call( this ); |
| 1478 | return this._transferTabIndex(), n; |
| 1479 | } ), |
| 1480 | ( e.prototype.bind = function ( e, t, n ) { |
| 1481 | var r = this, |
| 1482 | i = t.id + '-results'; |
| 1483 | e.call( this, t, n ), |
| 1484 | t.on( 'open', function () { |
| 1485 | r.$search.attr( 'aria-controls', i ), |
| 1486 | r.$search.trigger( 'focus' ); |
| 1487 | } ), |
| 1488 | t.on( 'close', function () { |
| 1489 | r.$search.val( '' ), |
| 1490 | r.$search.removeAttr( |
| 1491 | 'aria-controls' |
| 1492 | ), |
| 1493 | r.$search.removeAttr( |
| 1494 | 'aria-activedescendant' |
| 1495 | ), |
| 1496 | r.$search.trigger( 'focus' ); |
| 1497 | } ), |
| 1498 | t.on( 'enable', function () { |
| 1499 | r.$search.prop( 'disabled', ! 1 ), |
| 1500 | r._transferTabIndex(); |
| 1501 | } ), |
| 1502 | t.on( 'disable', function () { |
| 1503 | r.$search.prop( 'disabled', ! 0 ); |
| 1504 | } ), |
| 1505 | t.on( 'focus', function ( e ) { |
| 1506 | r.$search.trigger( 'focus' ); |
| 1507 | } ), |
| 1508 | t.on( 'results:focus', function ( e ) { |
| 1509 | e.data._resultId |
| 1510 | ? r.$search.attr( |
| 1511 | 'aria-activedescendant', |
| 1512 | e.data._resultId |
| 1513 | ) |
| 1514 | : r.$search.removeAttr( |
| 1515 | 'aria-activedescendant' |
| 1516 | ); |
| 1517 | } ), |
| 1518 | this.$selection.on( |
| 1519 | 'focusin', |
| 1520 | '.select2-search--inline', |
| 1521 | function ( e ) { |
| 1522 | r.trigger( 'focus', e ); |
| 1523 | } |
| 1524 | ), |
| 1525 | this.$selection.on( |
| 1526 | 'focusout', |
| 1527 | '.select2-search--inline', |
| 1528 | function ( e ) { |
| 1529 | r._handleBlur( e ); |
| 1530 | } |
| 1531 | ), |
| 1532 | this.$selection.on( |
| 1533 | 'keydown', |
| 1534 | '.select2-search--inline', |
| 1535 | function ( e ) { |
| 1536 | if ( |
| 1537 | ( e.stopPropagation(), |
| 1538 | r.trigger( 'keypress', e ), |
| 1539 | ( r._keyUpPrevented = e.isDefaultPrevented() ), |
| 1540 | e.which === l.BACKSPACE && |
| 1541 | '' === r.$search.val() ) |
| 1542 | ) { |
| 1543 | var t = r.$searchContainer.prev( |
| 1544 | '.select2-selection__choice' |
| 1545 | ); |
| 1546 | if ( 0 < t.length ) { |
| 1547 | var n = a.GetData( |
| 1548 | t[ 0 ], |
| 1549 | 'data' |
| 1550 | ); |
| 1551 | r.searchRemoveChoice( n ), |
| 1552 | e.preventDefault(); |
| 1553 | } |
| 1554 | } |
| 1555 | } |
| 1556 | ), |
| 1557 | this.$selection.on( |
| 1558 | 'click', |
| 1559 | '.select2-search--inline', |
| 1560 | function ( e ) { |
| 1561 | r.$search.val() && |
| 1562 | e.stopPropagation(); |
| 1563 | } |
| 1564 | ); |
| 1565 | var o = document.documentMode, |
| 1566 | s = o && o <= 11; |
| 1567 | this.$selection.on( |
| 1568 | 'input.searchcheck', |
| 1569 | '.select2-search--inline', |
| 1570 | function ( e ) { |
| 1571 | s |
| 1572 | ? r.$selection.off( |
| 1573 | 'input.search input.searchcheck' |
| 1574 | ) |
| 1575 | : r.$selection.off( |
| 1576 | 'keyup.search' |
| 1577 | ); |
| 1578 | } |
| 1579 | ), |
| 1580 | this.$selection.on( |
| 1581 | 'keyup.search input.search', |
| 1582 | '.select2-search--inline', |
| 1583 | function ( e ) { |
| 1584 | if ( s && 'input' === e.type ) |
| 1585 | r.$selection.off( |
| 1586 | 'input.search input.searchcheck' |
| 1587 | ); |
| 1588 | else { |
| 1589 | var t = e.which; |
| 1590 | t != l.SHIFT && |
| 1591 | t != l.CTRL && |
| 1592 | t != l.ALT && |
| 1593 | t != l.TAB && |
| 1594 | r.handleSearch( e ); |
| 1595 | } |
| 1596 | } |
| 1597 | ); |
| 1598 | } ), |
| 1599 | ( e.prototype._transferTabIndex = function ( e ) { |
| 1600 | this.$search.attr( |
| 1601 | 'tabindex', |
| 1602 | this.$selection.attr( 'tabindex' ) |
| 1603 | ), |
| 1604 | this.$selection.attr( 'tabindex', '-1' ); |
| 1605 | } ), |
| 1606 | ( e.prototype.createPlaceholder = function ( |
| 1607 | e, |
| 1608 | t |
| 1609 | ) { |
| 1610 | this.$search.attr( 'placeholder', t.text ); |
| 1611 | } ), |
| 1612 | ( e.prototype.update = function ( e, t ) { |
| 1613 | var n = |
| 1614 | this.$search[ 0 ] == document.activeElement; |
| 1615 | this.$search.attr( 'placeholder', '' ), |
| 1616 | e.call( this, t ), |
| 1617 | this.$selection |
| 1618 | .find( '.select2-selection__rendered' ) |
| 1619 | .append( this.$searchContainer ), |
| 1620 | this.resizeSearch(), |
| 1621 | n && this.$search.trigger( 'focus' ); |
| 1622 | } ), |
| 1623 | ( e.prototype.handleSearch = function () { |
| 1624 | if ( |
| 1625 | ( this.resizeSearch(), |
| 1626 | ! this._keyUpPrevented ) |
| 1627 | ) { |
| 1628 | var e = this.$search.val(); |
| 1629 | this.trigger( 'query', { term: e } ); |
| 1630 | } |
| 1631 | this._keyUpPrevented = ! 1; |
| 1632 | } ), |
| 1633 | ( e.prototype.searchRemoveChoice = function ( |
| 1634 | e, |
| 1635 | t |
| 1636 | ) { |
| 1637 | this.trigger( 'unselect', { data: t } ), |
| 1638 | this.$search.val( t.text ), |
| 1639 | this.handleSearch(); |
| 1640 | } ), |
| 1641 | ( e.prototype.resizeSearch = function () { |
| 1642 | this.$search.css( 'width', '25px' ); |
| 1643 | var e = ''; |
| 1644 | '' !== this.$search.attr( 'placeholder' ) |
| 1645 | ? ( e = this.$selection |
| 1646 | .find( |
| 1647 | '.select2-selection__rendered' |
| 1648 | ) |
| 1649 | .width() ) |
| 1650 | : ( e = |
| 1651 | 0.75 * |
| 1652 | ( this.$search.val().length + |
| 1653 | 1 ) + |
| 1654 | 'em' ); |
| 1655 | this.$search.css( 'width', e ); |
| 1656 | } ), |
| 1657 | e |
| 1658 | ); |
| 1659 | } |
| 1660 | ), |
| 1661 | e.define( |
| 1662 | 'select2/selection/eventRelay', |
| 1663 | [ 'jquery' ], |
| 1664 | function ( s ) { |
| 1665 | function e() {} |
| 1666 | return ( |
| 1667 | ( e.prototype.bind = function ( e, t, n ) { |
| 1668 | var r = this, |
| 1669 | i = [ |
| 1670 | 'open', |
| 1671 | 'opening', |
| 1672 | 'close', |
| 1673 | 'closing', |
| 1674 | 'select', |
| 1675 | 'selecting', |
| 1676 | 'unselect', |
| 1677 | 'unselecting', |
| 1678 | 'clear', |
| 1679 | 'clearing', |
| 1680 | ], |
| 1681 | o = [ |
| 1682 | 'opening', |
| 1683 | 'closing', |
| 1684 | 'selecting', |
| 1685 | 'unselecting', |
| 1686 | 'clearing', |
| 1687 | ]; |
| 1688 | e.call( this, t, n ), |
| 1689 | t.on( '*', function ( e, t ) { |
| 1690 | if ( -1 !== s.inArray( e, i ) ) { |
| 1691 | t = t || {}; |
| 1692 | var n = s.Event( 'select2:' + e, { |
| 1693 | params: t, |
| 1694 | } ); |
| 1695 | r.$element.trigger( n ), |
| 1696 | -1 !== s.inArray( e, o ) && |
| 1697 | ( t.prevented = n.isDefaultPrevented() ); |
| 1698 | } |
| 1699 | } ); |
| 1700 | } ), |
| 1701 | e |
| 1702 | ); |
| 1703 | } |
| 1704 | ), |
| 1705 | e.define( |
| 1706 | 'select2/translation', |
| 1707 | [ 'jquery', 'require' ], |
| 1708 | function ( t, n ) { |
| 1709 | function r( e ) { |
| 1710 | this.dict = e || {}; |
| 1711 | } |
| 1712 | return ( |
| 1713 | ( r.prototype.all = function () { |
| 1714 | return this.dict; |
| 1715 | } ), |
| 1716 | ( r.prototype.get = function ( e ) { |
| 1717 | return this.dict[ e ]; |
| 1718 | } ), |
| 1719 | ( r.prototype.extend = function ( e ) { |
| 1720 | this.dict = t.extend( {}, e.all(), this.dict ); |
| 1721 | } ), |
| 1722 | ( r._cache = {} ), |
| 1723 | ( r.loadPath = function ( e ) { |
| 1724 | if ( ! ( e in r._cache ) ) { |
| 1725 | var t = n( e ); |
| 1726 | r._cache[ e ] = t; |
| 1727 | } |
| 1728 | return new r( r._cache[ e ] ); |
| 1729 | } ), |
| 1730 | r |
| 1731 | ); |
| 1732 | } |
| 1733 | ), |
| 1734 | e.define( 'select2/diacritics', [], function () { |
| 1735 | return { |
| 1736 | 'Ⓐ': 'A', |
| 1737 | A: 'A', |
| 1738 | À: 'A', |
| 1739 | Á: 'A', |
| 1740 | Â: 'A', |
| 1741 | Ầ: 'A', |
| 1742 | Ấ: 'A', |
| 1743 | Ẫ: 'A', |
| 1744 | Ẩ: 'A', |
| 1745 | Ã: 'A', |
| 1746 | Ā: 'A', |
| 1747 | Ă: 'A', |
| 1748 | Ằ: 'A', |
| 1749 | Ắ: 'A', |
| 1750 | Ẵ: 'A', |
| 1751 | Ẳ: 'A', |
| 1752 | Ȧ: 'A', |
| 1753 | Ǡ: 'A', |
| 1754 | Ä: 'A', |
| 1755 | Ǟ: 'A', |
| 1756 | Ả: 'A', |
| 1757 | � |
| 1758 | : 'A', |
| 1759 | Ǻ: 'A', |
| 1760 | Ǎ: 'A', |
| 1761 | Ȁ: 'A', |
| 1762 | Ȃ: 'A', |
| 1763 | Ạ: 'A', |
| 1764 | Ậ: 'A', |
| 1765 | Ặ: 'A', |
| 1766 | Ḁ: 'A', |
| 1767 | Ą: 'A', |
| 1768 | Ⱥ: 'A', |
| 1769 | Ɐ: 'A', |
| 1770 | Ꜳ: 'AA', |
| 1771 | Æ: 'AE', |
| 1772 | Ǽ: 'AE', |
| 1773 | Ǣ: 'AE', |
| 1774 | Ꜵ: 'AO', |
| 1775 | Ꜷ: 'AU', |
| 1776 | Ꜹ: 'AV', |
| 1777 | Ꜻ: 'AV', |
| 1778 | Ꜽ: 'AY', |
| 1779 | 'Ⓑ': 'B', |
| 1780 | B: 'B', |
| 1781 | Ḃ: 'B', |
| 1782 | Ḅ: 'B', |
| 1783 | Ḇ: 'B', |
| 1784 | Ƀ: 'B', |
| 1785 | Ƃ: 'B', |
| 1786 | Ɓ: 'B', |
| 1787 | 'Ⓒ': 'C', |
| 1788 | C: 'C', |
| 1789 | Ć: 'C', |
| 1790 | Ĉ: 'C', |
| 1791 | Ċ: 'C', |
| 1792 | Č: 'C', |
| 1793 | Ç: 'C', |
| 1794 | Ḉ: 'C', |
| 1795 | Ƈ: 'C', |
| 1796 | Ȼ: 'C', |
| 1797 | Ꜿ: 'C', |
| 1798 | 'Ⓓ': 'D', |
| 1799 | D: 'D', |
| 1800 | Ḋ: 'D', |
| 1801 | Ď: 'D', |
| 1802 | Ḍ: 'D', |
| 1803 | Ḑ: 'D', |
| 1804 | Ḓ: 'D', |
| 1805 | Ḏ: 'D', |
| 1806 | Đ: 'D', |
| 1807 | Ƌ: 'D', |
| 1808 | Ɗ: 'D', |
| 1809 | Ɖ: 'D', |
| 1810 | Ꝺ: 'D', |
| 1811 | DZ: 'DZ', |
| 1812 | DŽ: 'DZ', |
| 1813 | Dz: 'Dz', |
| 1814 | � |
| 1815 | : 'Dz', |
| 1816 | 'Ⓔ': 'E', |
| 1817 | E: 'E', |
| 1818 | È: 'E', |
| 1819 | É: 'E', |
| 1820 | Ê: 'E', |
| 1821 | Ề: 'E', |
| 1822 | Ế: 'E', |
| 1823 | Ễ: 'E', |
| 1824 | Ể: 'E', |
| 1825 | Ẽ: 'E', |
| 1826 | Ē: 'E', |
| 1827 | Ḕ: 'E', |
| 1828 | Ḗ: 'E', |
| 1829 | Ĕ: 'E', |
| 1830 | Ė: 'E', |
| 1831 | Ë: 'E', |
| 1832 | Ẻ: 'E', |
| 1833 | Ě: 'E', |
| 1834 | Ȅ: 'E', |
| 1835 | Ȇ: 'E', |
| 1836 | Ẹ: 'E', |
| 1837 | Ệ: 'E', |
| 1838 | Ȩ: 'E', |
| 1839 | Ḝ: 'E', |
| 1840 | Ę: 'E', |
| 1841 | Ḙ: 'E', |
| 1842 | Ḛ: 'E', |
| 1843 | Ɛ: 'E', |
| 1844 | Ǝ: 'E', |
| 1845 | 'Ⓕ': 'F', |
| 1846 | F: 'F', |
| 1847 | Ḟ: 'F', |
| 1848 | Ƒ: 'F', |
| 1849 | Ꝼ: 'F', |
| 1850 | 'Ⓖ': 'G', |
| 1851 | G: 'G', |
| 1852 | Ǵ: 'G', |
| 1853 | Ĝ: 'G', |
| 1854 | Ḡ: 'G', |
| 1855 | Ğ: 'G', |
| 1856 | Ġ: 'G', |
| 1857 | Ǧ: 'G', |
| 1858 | Ģ: 'G', |
| 1859 | Ǥ: 'G', |
| 1860 | Ɠ: 'G', |
| 1861 | Ꞡ: 'G', |
| 1862 | Ᵹ: 'G', |
| 1863 | Ꝿ: 'G', |
| 1864 | 'Ⓗ': 'H', |
| 1865 | H: 'H', |
| 1866 | Ĥ: 'H', |
| 1867 | Ḣ: 'H', |
| 1868 | Ḧ: 'H', |
| 1869 | Ȟ: 'H', |
| 1870 | Ḥ: 'H', |
| 1871 | Ḩ: 'H', |
| 1872 | Ḫ: 'H', |
| 1873 | Ħ: 'H', |
| 1874 | Ⱨ: 'H', |
| 1875 | Ⱶ: 'H', |
| 1876 | Ɥ: 'H', |
| 1877 | 'Ⓘ': 'I', |
| 1878 | I: 'I', |
| 1879 | Ì: 'I', |
| 1880 | Í: 'I', |
| 1881 | Î: 'I', |
| 1882 | Ĩ: 'I', |
| 1883 | Ī: 'I', |
| 1884 | Ĭ: 'I', |
| 1885 | İ: 'I', |
| 1886 | Ï: 'I', |
| 1887 | Ḯ: 'I', |
| 1888 | Ỉ: 'I', |
| 1889 | Ǐ: 'I', |
| 1890 | Ȉ: 'I', |
| 1891 | Ȋ: 'I', |
| 1892 | Ị: 'I', |
| 1893 | Į: 'I', |
| 1894 | Ḭ: 'I', |
| 1895 | Ɨ: 'I', |
| 1896 | 'Ⓙ': 'J', |
| 1897 | J: 'J', |
| 1898 | Ĵ: 'J', |
| 1899 | Ɉ: 'J', |
| 1900 | 'Ⓚ': 'K', |
| 1901 | K: 'K', |
| 1902 | Ḱ: 'K', |
| 1903 | Ǩ: 'K', |
| 1904 | Ḳ: 'K', |
| 1905 | Ķ: 'K', |
| 1906 | Ḵ: 'K', |
| 1907 | Ƙ: 'K', |
| 1908 | Ⱪ: 'K', |
| 1909 | Ꝁ: 'K', |
| 1910 | Ꝃ: 'K', |
| 1911 | Ꝅ: 'K', |
| 1912 | Ꞣ: 'K', |
| 1913 | 'Ⓛ': 'L', |
| 1914 | L: 'L', |
| 1915 | Ŀ: 'L', |
| 1916 | Ĺ: 'L', |
| 1917 | Ľ: 'L', |
| 1918 | Ḷ: 'L', |
| 1919 | Ḹ: 'L', |
| 1920 | Ļ: 'L', |
| 1921 | Ḽ: 'L', |
| 1922 | Ḻ: 'L', |
| 1923 | Ł: 'L', |
| 1924 | Ƚ: 'L', |
| 1925 | Ɫ: 'L', |
| 1926 | Ⱡ: 'L', |
| 1927 | Ꝉ: 'L', |
| 1928 | Ꝇ: 'L', |
| 1929 | Ꞁ: 'L', |
| 1930 | LJ: 'LJ', |
| 1931 | Lj: 'Lj', |
| 1932 | 'Ⓜ': 'M', |
| 1933 | M: 'M', |
| 1934 | Ḿ: 'M', |
| 1935 | Ṁ: 'M', |
| 1936 | Ṃ: 'M', |
| 1937 | Ɱ: 'M', |
| 1938 | Ɯ: 'M', |
| 1939 | 'Ⓝ': 'N', |
| 1940 | N: 'N', |
| 1941 | Ǹ: 'N', |
| 1942 | Ń: 'N', |
| 1943 | Ñ: 'N', |
| 1944 | Ṅ: 'N', |
| 1945 | Ň: 'N', |
| 1946 | Ṇ: 'N', |
| 1947 | � |
| 1948 | : 'N', |
| 1949 | Ṋ: 'N', |
| 1950 | Ṉ: 'N', |
| 1951 | Ƞ: 'N', |
| 1952 | Ɲ: 'N', |
| 1953 | Ꞑ: 'N', |
| 1954 | Ꞥ: 'N', |
| 1955 | NJ: 'NJ', |
| 1956 | Nj: 'Nj', |
| 1957 | 'Ⓞ': 'O', |
| 1958 | O: 'O', |
| 1959 | Ò: 'O', |
| 1960 | Ó: 'O', |
| 1961 | Ô: 'O', |
| 1962 | Ồ: 'O', |
| 1963 | Ố: 'O', |
| 1964 | Ỗ: 'O', |
| 1965 | Ổ: 'O', |
| 1966 | Õ: 'O', |
| 1967 | Ṍ: 'O', |
| 1968 | Ȭ: 'O', |
| 1969 | Ṏ: 'O', |
| 1970 | Ō: 'O', |
| 1971 | Ṑ: 'O', |
| 1972 | Ṓ: 'O', |
| 1973 | Ŏ: 'O', |
| 1974 | Ȯ: 'O', |
| 1975 | Ȱ: 'O', |
| 1976 | Ö: 'O', |
| 1977 | Ȫ: 'O', |
| 1978 | Ỏ: 'O', |
| 1979 | Ő: 'O', |
| 1980 | Ǒ: 'O', |
| 1981 | Ȍ: 'O', |
| 1982 | Ȏ: 'O', |
| 1983 | Ơ: 'O', |
| 1984 | Ờ: 'O', |
| 1985 | Ớ: 'O', |
| 1986 | Ỡ: 'O', |
| 1987 | Ở: 'O', |
| 1988 | Ợ: 'O', |
| 1989 | Ọ: 'O', |
| 1990 | Ộ: 'O', |
| 1991 | Ǫ: 'O', |
| 1992 | Ǭ: 'O', |
| 1993 | Ø: 'O', |
| 1994 | Ǿ: 'O', |
| 1995 | Ɔ: 'O', |
| 1996 | Ɵ: 'O', |
| 1997 | Ꝋ: 'O', |
| 1998 | Ꝍ: 'O', |
| 1999 | Œ: 'OE', |
| 2000 | Ƣ: 'OI', |
| 2001 | Ꝏ: 'OO', |
| 2002 | Ȣ: 'OU', |
| 2003 | '� |
| 2004 | ': 'P', |
| 2005 | P: 'P', |
| 2006 | Ṕ: 'P', |
| 2007 | Ṗ: 'P', |
| 2008 | Ƥ: 'P', |
| 2009 | Ᵽ: 'P', |
| 2010 | Ꝑ: 'P', |
| 2011 | Ꝓ: 'P', |
| 2012 | Ꝕ: 'P', |
| 2013 | 'Ⓠ': 'Q', |
| 2014 | Q: 'Q', |
| 2015 | Ꝗ: 'Q', |
| 2016 | Ꝙ: 'Q', |
| 2017 | Ɋ: 'Q', |
| 2018 | 'Ⓡ': 'R', |
| 2019 | R: 'R', |
| 2020 | Ŕ: 'R', |
| 2021 | Ṙ: 'R', |
| 2022 | Ř: 'R', |
| 2023 | Ȑ: 'R', |
| 2024 | Ȓ: 'R', |
| 2025 | Ṛ: 'R', |
| 2026 | Ṝ: 'R', |
| 2027 | Ŗ: 'R', |
| 2028 | Ṟ: 'R', |
| 2029 | Ɍ: 'R', |
| 2030 | Ɽ: 'R', |
| 2031 | Ꝛ: 'R', |
| 2032 | Ꞧ: 'R', |
| 2033 | Ꞃ: 'R', |
| 2034 | 'Ⓢ': 'S', |
| 2035 | S: 'S', |
| 2036 | ẞ: 'S', |
| 2037 | Ś: 'S', |
| 2038 | Ṥ: 'S', |
| 2039 | Ŝ: 'S', |
| 2040 | Ṡ: 'S', |
| 2041 | Š: 'S', |
| 2042 | Ṧ: 'S', |
| 2043 | Ṣ: 'S', |
| 2044 | Ṩ: 'S', |
| 2045 | Ș: 'S', |
| 2046 | Ş: 'S', |
| 2047 | Ȿ: 'S', |
| 2048 | Ꞩ: 'S', |
| 2049 | Ꞅ: 'S', |
| 2050 | 'Ⓣ': 'T', |
| 2051 | T: 'T', |
| 2052 | Ṫ: 'T', |
| 2053 | Ť: 'T', |
| 2054 | Ṭ: 'T', |
| 2055 | Ț: 'T', |
| 2056 | Ţ: 'T', |
| 2057 | Ṱ: 'T', |
| 2058 | Ṯ: 'T', |
| 2059 | Ŧ: 'T', |
| 2060 | Ƭ: 'T', |
| 2061 | Ʈ: 'T', |
| 2062 | Ⱦ: 'T', |
| 2063 | Ꞇ: 'T', |
| 2064 | Ꜩ: 'TZ', |
| 2065 | 'Ⓤ': 'U', |
| 2066 | U: 'U', |
| 2067 | Ù: 'U', |
| 2068 | Ú: 'U', |
| 2069 | Û: 'U', |
| 2070 | Ũ: 'U', |
| 2071 | Ṹ: 'U', |
| 2072 | Ū: 'U', |
| 2073 | Ṻ: 'U', |
| 2074 | Ŭ: 'U', |
| 2075 | Ü: 'U', |
| 2076 | Ǜ: 'U', |
| 2077 | Ǘ: 'U', |
| 2078 | Ǖ: 'U', |
| 2079 | Ǚ: 'U', |
| 2080 | Ủ: 'U', |
| 2081 | Ů: 'U', |
| 2082 | Ű: 'U', |
| 2083 | Ǔ: 'U', |
| 2084 | Ȕ: 'U', |
| 2085 | Ȗ: 'U', |
| 2086 | Ư: 'U', |
| 2087 | Ừ: 'U', |
| 2088 | Ứ: 'U', |
| 2089 | Ữ: 'U', |
| 2090 | Ử: 'U', |
| 2091 | Ự: 'U', |
| 2092 | Ụ: 'U', |
| 2093 | Ṳ: 'U', |
| 2094 | Ų: 'U', |
| 2095 | Ṷ: 'U', |
| 2096 | Ṵ: 'U', |
| 2097 | Ʉ: 'U', |
| 2098 | 'Ⓥ': 'V', |
| 2099 | V: 'V', |
| 2100 | Ṽ: 'V', |
| 2101 | Ṿ: 'V', |
| 2102 | Ʋ: 'V', |
| 2103 | Ꝟ: 'V', |
| 2104 | � |
| 2105 | : 'V', |
| 2106 | Ꝡ: 'VY', |
| 2107 | 'Ⓦ': 'W', |
| 2108 | W: 'W', |
| 2109 | Ẁ: 'W', |
| 2110 | Ẃ: 'W', |
| 2111 | Ŵ: 'W', |
| 2112 | Ẇ: 'W', |
| 2113 | Ẅ: 'W', |
| 2114 | Ẉ: 'W', |
| 2115 | Ⱳ: 'W', |
| 2116 | 'Ⓧ': 'X', |
| 2117 | X: 'X', |
| 2118 | Ẋ: 'X', |
| 2119 | Ẍ: 'X', |
| 2120 | 'Ⓨ': 'Y', |
| 2121 | Y: 'Y', |
| 2122 | Ỳ: 'Y', |
| 2123 | Ý: 'Y', |
| 2124 | Ŷ: 'Y', |
| 2125 | Ỹ: 'Y', |
| 2126 | Ȳ: 'Y', |
| 2127 | Ẏ: 'Y', |
| 2128 | Ÿ: 'Y', |
| 2129 | Ỷ: 'Y', |
| 2130 | Ỵ: 'Y', |
| 2131 | Ƴ: 'Y', |
| 2132 | Ɏ: 'Y', |
| 2133 | Ỿ: 'Y', |
| 2134 | 'Ⓩ': 'Z', |
| 2135 | Z: 'Z', |
| 2136 | Ź: 'Z', |
| 2137 | Ẑ: 'Z', |
| 2138 | Ż: 'Z', |
| 2139 | Ž: 'Z', |
| 2140 | Ẓ: 'Z', |
| 2141 | Ẕ: 'Z', |
| 2142 | Ƶ: 'Z', |
| 2143 | Ȥ: 'Z', |
| 2144 | Ɀ: 'Z', |
| 2145 | Ⱬ: 'Z', |
| 2146 | Ꝣ: 'Z', |
| 2147 | 'ⓐ': 'a', |
| 2148 | a: 'a', |
| 2149 | ẚ: 'a', |
| 2150 | à: 'a', |
| 2151 | á: 'a', |
| 2152 | â: 'a', |
| 2153 | ầ: 'a', |
| 2154 | ấ: 'a', |
| 2155 | ẫ: 'a', |
| 2156 | ẩ: 'a', |
| 2157 | ã: 'a', |
| 2158 | ā: 'a', |
| 2159 | ă: 'a', |
| 2160 | ằ: 'a', |
| 2161 | ắ: 'a', |
| 2162 | ẵ: 'a', |
| 2163 | ẳ: 'a', |
| 2164 | ȧ: 'a', |
| 2165 | ǡ: 'a', |
| 2166 | ä: 'a', |
| 2167 | ǟ: 'a', |
| 2168 | ả: 'a', |
| 2169 | å: 'a', |
| 2170 | ǻ: 'a', |
| 2171 | ǎ: 'a', |
| 2172 | ȁ: 'a', |
| 2173 | ȃ: 'a', |
| 2174 | ạ: 'a', |
| 2175 | ậ: 'a', |
| 2176 | ặ: 'a', |
| 2177 | ḁ: 'a', |
| 2178 | � |
| 2179 | : 'a', |
| 2180 | ⱥ: 'a', |
| 2181 | ɐ: 'a', |
| 2182 | ꜳ: 'aa', |
| 2183 | æ: 'ae', |
| 2184 | ǽ: 'ae', |
| 2185 | ǣ: 'ae', |
| 2186 | ꜵ: 'ao', |
| 2187 | ꜷ: 'au', |
| 2188 | ꜹ: 'av', |
| 2189 | ꜻ: 'av', |
| 2190 | ꜽ: 'ay', |
| 2191 | 'ⓑ': 'b', |
| 2192 | b: 'b', |
| 2193 | ḃ: 'b', |
| 2194 | � |
| 2195 | : 'b', |
| 2196 | ḇ: 'b', |
| 2197 | ƀ: 'b', |
| 2198 | ƃ: 'b', |
| 2199 | ɓ: 'b', |
| 2200 | 'ⓒ': 'c', |
| 2201 | c: 'c', |
| 2202 | ć: 'c', |
| 2203 | ĉ: 'c', |
| 2204 | ċ: 'c', |
| 2205 | č: 'c', |
| 2206 | ç: 'c', |
| 2207 | ḉ: 'c', |
| 2208 | ƈ: 'c', |
| 2209 | ȼ: 'c', |
| 2210 | ꜿ: 'c', |
| 2211 | ↄ: 'c', |
| 2212 | 'ⓓ': 'd', |
| 2213 | d: 'd', |
| 2214 | ḋ: 'd', |
| 2215 | ď: 'd', |
| 2216 | ḍ: 'd', |
| 2217 | ḑ: 'd', |
| 2218 | ḓ: 'd', |
| 2219 | ḏ: 'd', |
| 2220 | đ: 'd', |
| 2221 | ƌ: 'd', |
| 2222 | ɖ: 'd', |
| 2223 | ɗ: 'd', |
| 2224 | ꝺ: 'd', |
| 2225 | dz: 'dz', |
| 2226 | dž: 'dz', |
| 2227 | 'ⓔ': 'e', |
| 2228 | � |
| 2229 | : 'e', |
| 2230 | è: 'e', |
| 2231 | é: 'e', |
| 2232 | ê: 'e', |
| 2233 | ề: 'e', |
| 2234 | ế: 'e', |
| 2235 | � |
| 2236 | : 'e', |
| 2237 | ể: 'e', |
| 2238 | ẽ: 'e', |
| 2239 | ē: 'e', |
| 2240 | ḕ: 'e', |
| 2241 | ḗ: 'e', |
| 2242 | ĕ: 'e', |
| 2243 | ė: 'e', |
| 2244 | ë: 'e', |
| 2245 | ẻ: 'e', |
| 2246 | ě: 'e', |
| 2247 | � |
| 2248 | : 'e', |
| 2249 | ȇ: 'e', |
| 2250 | ẹ: 'e', |
| 2251 | ệ: 'e', |
| 2252 | ȩ: 'e', |
| 2253 | ḝ: 'e', |
| 2254 | ę: 'e', |
| 2255 | ḙ: 'e', |
| 2256 | ḛ: 'e', |
| 2257 | ɇ: 'e', |
| 2258 | ɛ: 'e', |
| 2259 | ǝ: 'e', |
| 2260 | 'ⓕ': 'f', |
| 2261 | f: 'f', |
| 2262 | ḟ: 'f', |
| 2263 | ƒ: 'f', |
| 2264 | ꝼ: 'f', |
| 2265 | 'ⓖ': 'g', |
| 2266 | g: 'g', |
| 2267 | ǵ: 'g', |
| 2268 | ĝ: 'g', |
| 2269 | ḡ: 'g', |
| 2270 | ğ: 'g', |
| 2271 | ġ: 'g', |
| 2272 | ǧ: 'g', |
| 2273 | ģ: 'g', |
| 2274 | ǥ: 'g', |
| 2275 | ɠ: 'g', |
| 2276 | ꞡ: 'g', |
| 2277 | ᵹ: 'g', |
| 2278 | ꝿ: 'g', |
| 2279 | 'ⓗ': 'h', |
| 2280 | h: 'h', |
| 2281 | ĥ: 'h', |
| 2282 | ḣ: 'h', |
| 2283 | ḧ: 'h', |
| 2284 | ȟ: 'h', |
| 2285 | ḥ: 'h', |
| 2286 | ḩ: 'h', |
| 2287 | ḫ: 'h', |
| 2288 | ẖ: 'h', |
| 2289 | ħ: 'h', |
| 2290 | ⱨ: 'h', |
| 2291 | ⱶ: 'h', |
| 2292 | ɥ: 'h', |
| 2293 | ƕ: 'hv', |
| 2294 | 'ⓘ': 'i', |
| 2295 | i: 'i', |
| 2296 | ì: 'i', |
| 2297 | í: 'i', |
| 2298 | î: 'i', |
| 2299 | ĩ: 'i', |
| 2300 | ī: 'i', |
| 2301 | ĭ: 'i', |
| 2302 | ï: 'i', |
| 2303 | ḯ: 'i', |
| 2304 | ỉ: 'i', |
| 2305 | ǐ: 'i', |
| 2306 | ȉ: 'i', |
| 2307 | ȋ: 'i', |
| 2308 | ị: 'i', |
| 2309 | į: 'i', |
| 2310 | ḭ: 'i', |
| 2311 | ɨ: 'i', |
| 2312 | ı: 'i', |
| 2313 | 'ⓙ': 'j', |
| 2314 | j: 'j', |
| 2315 | ĵ: 'j', |
| 2316 | ǰ: 'j', |
| 2317 | ɉ: 'j', |
| 2318 | 'ⓚ': 'k', |
| 2319 | k: 'k', |
| 2320 | ḱ: 'k', |
| 2321 | ǩ: 'k', |
| 2322 | ḳ: 'k', |
| 2323 | ķ: 'k', |
| 2324 | ḵ: 'k', |
| 2325 | ƙ: 'k', |
| 2326 | ⱪ: 'k', |
| 2327 | ꝁ: 'k', |
| 2328 | ꝃ: 'k', |
| 2329 | � |
| 2330 | : 'k', |
| 2331 | ꞣ: 'k', |
| 2332 | 'ⓛ': 'l', |
| 2333 | l: 'l', |
| 2334 | ŀ: 'l', |
| 2335 | ĺ: 'l', |
| 2336 | ľ: 'l', |
| 2337 | ḷ: 'l', |
| 2338 | ḹ: 'l', |
| 2339 | ļ: 'l', |
| 2340 | ḽ: 'l', |
| 2341 | ḻ: 'l', |
| 2342 | ſ: 'l', |
| 2343 | ł: 'l', |
| 2344 | ƚ: 'l', |
| 2345 | ɫ: 'l', |
| 2346 | ⱡ: 'l', |
| 2347 | ꝉ: 'l', |
| 2348 | ꞁ: 'l', |
| 2349 | ꝇ: 'l', |
| 2350 | lj: 'lj', |
| 2351 | 'ⓜ': 'm', |
| 2352 | m: 'm', |
| 2353 | ḿ: 'm', |
| 2354 | ṁ: 'm', |
| 2355 | ṃ: 'm', |
| 2356 | ɱ: 'm', |
| 2357 | ɯ: 'm', |
| 2358 | 'ⓝ': 'n', |
| 2359 | n: 'n', |
| 2360 | ǹ: 'n', |
| 2361 | ń: 'n', |
| 2362 | ñ: 'n', |
| 2363 | � |
| 2364 | : 'n', |
| 2365 | ň: 'n', |
| 2366 | ṇ: 'n', |
| 2367 | ņ: 'n', |
| 2368 | ṋ: 'n', |
| 2369 | ṉ: 'n', |
| 2370 | ƞ: 'n', |
| 2371 | ɲ: 'n', |
| 2372 | ʼn: 'n', |
| 2373 | ꞑ: 'n', |
| 2374 | ꞥ: 'n', |
| 2375 | nj: 'nj', |
| 2376 | 'ⓞ': 'o', |
| 2377 | o: 'o', |
| 2378 | ò: 'o', |
| 2379 | ó: 'o', |
| 2380 | ô: 'o', |
| 2381 | ồ: 'o', |
| 2382 | ố: 'o', |
| 2383 | ỗ: 'o', |
| 2384 | ổ: 'o', |
| 2385 | õ: 'o', |
| 2386 | ṍ: 'o', |
| 2387 | ȭ: 'o', |
| 2388 | ṏ: 'o', |
| 2389 | ō: 'o', |
| 2390 | ṑ: 'o', |
| 2391 | ṓ: 'o', |
| 2392 | ŏ: 'o', |
| 2393 | ȯ: 'o', |
| 2394 | ȱ: 'o', |
| 2395 | ö: 'o', |
| 2396 | ȫ: 'o', |
| 2397 | ỏ: 'o', |
| 2398 | ő: 'o', |
| 2399 | ǒ: 'o', |
| 2400 | ȍ: 'o', |
| 2401 | ȏ: 'o', |
| 2402 | ơ: 'o', |
| 2403 | ờ: 'o', |
| 2404 | ớ: 'o', |
| 2405 | ỡ: 'o', |
| 2406 | ở: 'o', |
| 2407 | ợ: 'o', |
| 2408 | ọ: 'o', |
| 2409 | ộ: 'o', |
| 2410 | ǫ: 'o', |
| 2411 | ǭ: 'o', |
| 2412 | ø: 'o', |
| 2413 | ǿ: 'o', |
| 2414 | ɔ: 'o', |
| 2415 | ꝋ: 'o', |
| 2416 | ꝍ: 'o', |
| 2417 | ɵ: 'o', |
| 2418 | œ: 'oe', |
| 2419 | ƣ: 'oi', |
| 2420 | ȣ: 'ou', |
| 2421 | ꝏ: 'oo', |
| 2422 | 'ⓟ': 'p', |
| 2423 | p: 'p', |
| 2424 | ṕ: 'p', |
| 2425 | ṗ: 'p', |
| 2426 | ƥ: 'p', |
| 2427 | ᵽ: 'p', |
| 2428 | ꝑ: 'p', |
| 2429 | ꝓ: 'p', |
| 2430 | ꝕ: 'p', |
| 2431 | 'ⓠ': 'q', |
| 2432 | q: 'q', |
| 2433 | ɋ: 'q', |
| 2434 | ꝗ: 'q', |
| 2435 | ꝙ: 'q', |
| 2436 | 'ⓡ': 'r', |
| 2437 | r: 'r', |
| 2438 | ŕ: 'r', |
| 2439 | ṙ: 'r', |
| 2440 | ř: 'r', |
| 2441 | ȑ: 'r', |
| 2442 | ȓ: 'r', |
| 2443 | ṛ: 'r', |
| 2444 | ṝ: 'r', |
| 2445 | ŗ: 'r', |
| 2446 | ṟ: 'r', |
| 2447 | ɍ: 'r', |
| 2448 | ɽ: 'r', |
| 2449 | ꝛ: 'r', |
| 2450 | ꞧ: 'r', |
| 2451 | ꞃ: 'r', |
| 2452 | 'ⓢ': 's', |
| 2453 | s: 's', |
| 2454 | ß: 's', |
| 2455 | ś: 's', |
| 2456 | ṥ: 's', |
| 2457 | ŝ: 's', |
| 2458 | ṡ: 's', |
| 2459 | š: 's', |
| 2460 | ṧ: 's', |
| 2461 | ṣ: 's', |
| 2462 | ṩ: 's', |
| 2463 | ș: 's', |
| 2464 | ş: 's', |
| 2465 | ȿ: 's', |
| 2466 | ꞩ: 's', |
| 2467 | � |
| 2468 | : 's', |
| 2469 | ẛ: 's', |
| 2470 | 'ⓣ': 't', |
| 2471 | t: 't', |
| 2472 | ṫ: 't', |
| 2473 | ẗ: 't', |
| 2474 | ť: 't', |
| 2475 | ṭ: 't', |
| 2476 | ț: 't', |
| 2477 | ţ: 't', |
| 2478 | ṱ: 't', |
| 2479 | ṯ: 't', |
| 2480 | ŧ: 't', |
| 2481 | ƭ: 't', |
| 2482 | ʈ: 't', |
| 2483 | ⱦ: 't', |
| 2484 | ꞇ: 't', |
| 2485 | ꜩ: 'tz', |
| 2486 | 'ⓤ': 'u', |
| 2487 | u: 'u', |
| 2488 | ù: 'u', |
| 2489 | ú: 'u', |
| 2490 | û: 'u', |
| 2491 | ũ: 'u', |
| 2492 | ṹ: 'u', |
| 2493 | ū: 'u', |
| 2494 | ṻ: 'u', |
| 2495 | ŭ: 'u', |
| 2496 | ü: 'u', |
| 2497 | ǜ: 'u', |
| 2498 | ǘ: 'u', |
| 2499 | ǖ: 'u', |
| 2500 | ǚ: 'u', |
| 2501 | ủ: 'u', |
| 2502 | ů: 'u', |
| 2503 | ű: 'u', |
| 2504 | ǔ: 'u', |
| 2505 | ȕ: 'u', |
| 2506 | ȗ: 'u', |
| 2507 | ư: 'u', |
| 2508 | ừ: 'u', |
| 2509 | ứ: 'u', |
| 2510 | ữ: 'u', |
| 2511 | ử: 'u', |
| 2512 | ự: 'u', |
| 2513 | ụ: 'u', |
| 2514 | ṳ: 'u', |
| 2515 | ų: 'u', |
| 2516 | ṷ: 'u', |
| 2517 | ṵ: 'u', |
| 2518 | ʉ: 'u', |
| 2519 | 'ⓥ': 'v', |
| 2520 | v: 'v', |
| 2521 | ṽ: 'v', |
| 2522 | ṿ: 'v', |
| 2523 | ʋ: 'v', |
| 2524 | ꝟ: 'v', |
| 2525 | ʌ: 'v', |
| 2526 | ꝡ: 'vy', |
| 2527 | 'ⓦ': 'w', |
| 2528 | w: 'w', |
| 2529 | ẁ: 'w', |
| 2530 | ẃ: 'w', |
| 2531 | ŵ: 'w', |
| 2532 | ẇ: 'w', |
| 2533 | � |
| 2534 | : 'w', |
| 2535 | ẘ: 'w', |
| 2536 | ẉ: 'w', |
| 2537 | ⱳ: 'w', |
| 2538 | 'ⓧ': 'x', |
| 2539 | x: 'x', |
| 2540 | ẋ: 'x', |
| 2541 | ẍ: 'x', |
| 2542 | 'ⓨ': 'y', |
| 2543 | y: 'y', |
| 2544 | ỳ: 'y', |
| 2545 | ý: 'y', |
| 2546 | ŷ: 'y', |
| 2547 | ỹ: 'y', |
| 2548 | ȳ: 'y', |
| 2549 | ẏ: 'y', |
| 2550 | ÿ: 'y', |
| 2551 | ỷ: 'y', |
| 2552 | ẙ: 'y', |
| 2553 | ỵ: 'y', |
| 2554 | ƴ: 'y', |
| 2555 | ɏ: 'y', |
| 2556 | ỿ: 'y', |
| 2557 | 'ⓩ': 'z', |
| 2558 | z: 'z', |
| 2559 | ź: 'z', |
| 2560 | ẑ: 'z', |
| 2561 | ż: 'z', |
| 2562 | ž: 'z', |
| 2563 | ẓ: 'z', |
| 2564 | ẕ: 'z', |
| 2565 | ƶ: 'z', |
| 2566 | ȥ: 'z', |
| 2567 | ɀ: 'z', |
| 2568 | ⱬ: 'z', |
| 2569 | ꝣ: 'z', |
| 2570 | Ά: 'Α', |
| 2571 | Έ: 'Ε', |
| 2572 | Ή: 'Η', |
| 2573 | Ί: 'Ι', |
| 2574 | Ϊ: 'Ι', |
| 2575 | Ό: 'Ο', |
| 2576 | Ύ: 'Υ', |
| 2577 | Ϋ: 'Υ', |
| 2578 | Ώ: 'Ω', |
| 2579 | ά: 'α', |
| 2580 | έ: 'ε', |
| 2581 | ή: 'η', |
| 2582 | ί: 'ι', |
| 2583 | ϊ: 'ι', |
| 2584 | ΐ: 'ι', |
| 2585 | ό: 'ο', |
| 2586 | ύ: '� |
| 2587 | ', |
| 2588 | ϋ: '� |
| 2589 | ', |
| 2590 | ΰ: '� |
| 2591 | ', |
| 2592 | ώ: 'ω', |
| 2593 | ς: 'σ', |
| 2594 | '’': "'", |
| 2595 | }; |
| 2596 | } ), |
| 2597 | e.define( 'select2/data/base', [ '../utils' ], function ( r ) { |
| 2598 | function n( e, t ) { |
| 2599 | n.__super__.constructor.call( this ); |
| 2600 | } |
| 2601 | return ( |
| 2602 | r.Extend( n, r.Observable ), |
| 2603 | ( n.prototype.current = function ( e ) { |
| 2604 | throw new Error( |
| 2605 | 'The `current` method must be defined in child classes.' |
| 2606 | ); |
| 2607 | } ), |
| 2608 | ( n.prototype.query = function ( e, t ) { |
| 2609 | throw new Error( |
| 2610 | 'The `query` method must be defined in child classes.' |
| 2611 | ); |
| 2612 | } ), |
| 2613 | ( n.prototype.bind = function ( e, t ) {} ), |
| 2614 | ( n.prototype.destroy = function () {} ), |
| 2615 | ( n.prototype.generateResultId = function ( e, t ) { |
| 2616 | var n = e.id + '-result-'; |
| 2617 | return ( |
| 2618 | ( n += r.generateChars( 4 ) ), |
| 2619 | null != t.id |
| 2620 | ? ( n += '-' + t.id.toString() ) |
| 2621 | : ( n += '-' + r.generateChars( 4 ) ), |
| 2622 | n |
| 2623 | ); |
| 2624 | } ), |
| 2625 | n |
| 2626 | ); |
| 2627 | } ), |
| 2628 | e.define( |
| 2629 | 'select2/data/select', |
| 2630 | [ './base', '../utils', 'jquery' ], |
| 2631 | function ( e, a, l ) { |
| 2632 | function n( e, t ) { |
| 2633 | ( this.$element = e ), |
| 2634 | ( this.options = t ), |
| 2635 | n.__super__.constructor.call( this ); |
| 2636 | } |
| 2637 | return ( |
| 2638 | a.Extend( n, e ), |
| 2639 | ( n.prototype.current = function ( e ) { |
| 2640 | var n = [], |
| 2641 | r = this; |
| 2642 | this.$element |
| 2643 | .find( ':selected' ) |
| 2644 | .each( function () { |
| 2645 | var e = l( this ), |
| 2646 | t = r.item( e ); |
| 2647 | n.push( t ); |
| 2648 | } ), |
| 2649 | e( n ); |
| 2650 | } ), |
| 2651 | ( n.prototype.select = function ( i ) { |
| 2652 | var o = this; |
| 2653 | if ( |
| 2654 | ( ( i.selected = ! 0 ), |
| 2655 | l( i.element ).is( 'option' ) ) |
| 2656 | ) |
| 2657 | return ( |
| 2658 | ( i.element.selected = ! 0 ), |
| 2659 | void this.$element |
| 2660 | .trigger( 'input' ) |
| 2661 | .trigger( 'change' ) |
| 2662 | ); |
| 2663 | if ( this.$element.prop( 'multiple' ) ) |
| 2664 | this.current( function ( e ) { |
| 2665 | var t = []; |
| 2666 | ( i = [ i ] ).push.apply( i, e ); |
| 2667 | for ( var n = 0; n < i.length; n++ ) { |
| 2668 | var r = i[ n ].id; |
| 2669 | -1 === l.inArray( r, t ) && |
| 2670 | t.push( r ); |
| 2671 | } |
| 2672 | o.$element.val( t ), |
| 2673 | o.$element |
| 2674 | .trigger( 'input' ) |
| 2675 | .trigger( 'change' ); |
| 2676 | } ); |
| 2677 | else { |
| 2678 | var e = i.id; |
| 2679 | this.$element.val( e ), |
| 2680 | this.$element |
| 2681 | .trigger( 'input' ) |
| 2682 | .trigger( 'change' ); |
| 2683 | } |
| 2684 | } ), |
| 2685 | ( n.prototype.unselect = function ( i ) { |
| 2686 | var o = this; |
| 2687 | if ( this.$element.prop( 'multiple' ) ) { |
| 2688 | if ( |
| 2689 | ( ( i.selected = ! 1 ), |
| 2690 | l( i.element ).is( 'option' ) ) |
| 2691 | ) |
| 2692 | return ( |
| 2693 | ( i.element.selected = ! 1 ), |
| 2694 | void this.$element |
| 2695 | .trigger( 'input' ) |
| 2696 | .trigger( 'change' ) |
| 2697 | ); |
| 2698 | this.current( function ( e ) { |
| 2699 | for ( |
| 2700 | var t = [], n = 0; |
| 2701 | n < e.length; |
| 2702 | n++ |
| 2703 | ) { |
| 2704 | var r = e[ n ].id; |
| 2705 | r !== i.id && |
| 2706 | -1 === l.inArray( r, t ) && |
| 2707 | t.push( r ); |
| 2708 | } |
| 2709 | o.$element.val( t ), |
| 2710 | o.$element |
| 2711 | .trigger( 'input' ) |
| 2712 | .trigger( 'change' ); |
| 2713 | } ); |
| 2714 | } |
| 2715 | } ), |
| 2716 | ( n.prototype.bind = function ( e, t ) { |
| 2717 | var n = this; |
| 2718 | ( this.container = e ).on( |
| 2719 | 'select', |
| 2720 | function ( e ) { |
| 2721 | n.select( e.data ); |
| 2722 | } |
| 2723 | ), |
| 2724 | e.on( 'unselect', function ( e ) { |
| 2725 | n.unselect( e.data ); |
| 2726 | } ); |
| 2727 | } ), |
| 2728 | ( n.prototype.destroy = function () { |
| 2729 | this.$element.find( '*' ).each( function () { |
| 2730 | a.RemoveData( this ); |
| 2731 | } ); |
| 2732 | } ), |
| 2733 | ( n.prototype.query = function ( r, e ) { |
| 2734 | var i = [], |
| 2735 | o = this; |
| 2736 | this.$element.children().each( function () { |
| 2737 | var e = l( this ); |
| 2738 | if ( |
| 2739 | e.is( 'option' ) || |
| 2740 | e.is( 'optgroup' ) |
| 2741 | ) { |
| 2742 | var t = o.item( e ), |
| 2743 | n = o.matches( r, t ); |
| 2744 | null !== n && i.push( n ); |
| 2745 | } |
| 2746 | } ), |
| 2747 | e( { results: i } ); |
| 2748 | } ), |
| 2749 | ( n.prototype.addOptions = function ( e ) { |
| 2750 | a.appendMany( this.$element, e ); |
| 2751 | } ), |
| 2752 | ( n.prototype.option = function ( e ) { |
| 2753 | var t; |
| 2754 | e.children |
| 2755 | ? ( ( t = document.createElement( |
| 2756 | 'optgroup' |
| 2757 | ) ).label = e.text ) |
| 2758 | : void 0 !== |
| 2759 | ( t = document.createElement( 'option' ) ) |
| 2760 | .textContent |
| 2761 | ? ( t.textContent = e.text ) |
| 2762 | : ( t.innerText = e.text ), |
| 2763 | void 0 !== e.id && ( t.value = e.id ), |
| 2764 | e.disabled && ( t.disabled = ! 0 ), |
| 2765 | e.selected && ( t.selected = ! 0 ), |
| 2766 | e.title && ( t.title = e.title ); |
| 2767 | var n = l( t ), |
| 2768 | r = this._normalizeItem( e ); |
| 2769 | return ( |
| 2770 | ( r.element = t ), |
| 2771 | a.StoreData( t, 'data', r ), |
| 2772 | n |
| 2773 | ); |
| 2774 | } ), |
| 2775 | ( n.prototype.item = function ( e ) { |
| 2776 | var t = {}; |
| 2777 | if ( |
| 2778 | null != ( t = a.GetData( e[ 0 ], 'data' ) ) |
| 2779 | ) |
| 2780 | return t; |
| 2781 | if ( e.is( 'option' ) ) |
| 2782 | t = { |
| 2783 | id: e.val(), |
| 2784 | text: e.text(), |
| 2785 | disabled: e.prop( 'disabled' ), |
| 2786 | selected: e.prop( 'selected' ), |
| 2787 | title: e.prop( 'title' ), |
| 2788 | }; |
| 2789 | else if ( e.is( 'optgroup' ) ) { |
| 2790 | t = { |
| 2791 | text: e.prop( 'label' ), |
| 2792 | children: [], |
| 2793 | title: e.prop( 'title' ), |
| 2794 | }; |
| 2795 | for ( |
| 2796 | var n = e.children( 'option' ), |
| 2797 | r = [], |
| 2798 | i = 0; |
| 2799 | i < n.length; |
| 2800 | i++ |
| 2801 | ) { |
| 2802 | var o = l( n[ i ] ), |
| 2803 | s = this.item( o ); |
| 2804 | r.push( s ); |
| 2805 | } |
| 2806 | t.children = r; |
| 2807 | } |
| 2808 | return ( |
| 2809 | ( ( t = this._normalizeItem( t ) ).element = |
| 2810 | e[ 0 ] ), |
| 2811 | a.StoreData( e[ 0 ], 'data', t ), |
| 2812 | t |
| 2813 | ); |
| 2814 | } ), |
| 2815 | ( n.prototype._normalizeItem = function ( e ) { |
| 2816 | e !== Object( e ) && ( e = { id: e, text: e } ); |
| 2817 | return ( |
| 2818 | null != |
| 2819 | ( e = l.extend( {}, { text: '' }, e ) ) |
| 2820 | .id && ( e.id = e.id.toString() ), |
| 2821 | null != e.text && |
| 2822 | ( e.text = e.text.toString() ), |
| 2823 | null == e._resultId && |
| 2824 | e.id && |
| 2825 | null != this.container && |
| 2826 | ( e._resultId = this.generateResultId( |
| 2827 | this.container, |
| 2828 | e |
| 2829 | ) ), |
| 2830 | l.extend( |
| 2831 | {}, |
| 2832 | { selected: ! 1, disabled: ! 1 }, |
| 2833 | e |
| 2834 | ) |
| 2835 | ); |
| 2836 | } ), |
| 2837 | ( n.prototype.matches = function ( e, t ) { |
| 2838 | return this.options.get( 'matcher' )( e, t ); |
| 2839 | } ), |
| 2840 | n |
| 2841 | ); |
| 2842 | } |
| 2843 | ), |
| 2844 | e.define( |
| 2845 | 'select2/data/array', |
| 2846 | [ './select', '../utils', 'jquery' ], |
| 2847 | function ( e, f, g ) { |
| 2848 | function r( e, t ) { |
| 2849 | ( this._dataToConvert = t.get( 'data' ) || [] ), |
| 2850 | r.__super__.constructor.call( this, e, t ); |
| 2851 | } |
| 2852 | return ( |
| 2853 | f.Extend( r, e ), |
| 2854 | ( r.prototype.bind = function ( e, t ) { |
| 2855 | r.__super__.bind.call( this, e, t ), |
| 2856 | this.addOptions( |
| 2857 | this.convertToOptions( |
| 2858 | this._dataToConvert |
| 2859 | ) |
| 2860 | ); |
| 2861 | } ), |
| 2862 | ( r.prototype.select = function ( n ) { |
| 2863 | var e = this.$element |
| 2864 | .find( 'option' ) |
| 2865 | .filter( function ( e, t ) { |
| 2866 | return t.value == n.id.toString(); |
| 2867 | } ); |
| 2868 | 0 === e.length && |
| 2869 | ( ( e = this.option( n ) ), |
| 2870 | this.addOptions( e ) ), |
| 2871 | r.__super__.select.call( this, n ); |
| 2872 | } ), |
| 2873 | ( r.prototype.convertToOptions = function ( e ) { |
| 2874 | var t = this, |
| 2875 | n = this.$element.find( 'option' ), |
| 2876 | r = n |
| 2877 | .map( function () { |
| 2878 | return t.item( g( this ) ).id; |
| 2879 | } ) |
| 2880 | .get(), |
| 2881 | i = []; |
| 2882 | function o( e ) { |
| 2883 | return function () { |
| 2884 | return g( this ).val() == e.id; |
| 2885 | }; |
| 2886 | } |
| 2887 | for ( var s = 0; s < e.length; s++ ) { |
| 2888 | var a = this._normalizeItem( e[ s ] ); |
| 2889 | if ( 0 <= g.inArray( a.id, r ) ) { |
| 2890 | var l = n.filter( o( a ) ), |
| 2891 | c = this.item( l ), |
| 2892 | u = g.extend( ! 0, {}, a, c ), |
| 2893 | d = this.option( u ); |
| 2894 | l.replaceWith( d ); |
| 2895 | } else { |
| 2896 | var p = this.option( a ); |
| 2897 | if ( a.children ) { |
| 2898 | var h = this.convertToOptions( |
| 2899 | a.children |
| 2900 | ); |
| 2901 | f.appendMany( p, h ); |
| 2902 | } |
| 2903 | i.push( p ); |
| 2904 | } |
| 2905 | } |
| 2906 | return i; |
| 2907 | } ), |
| 2908 | r |
| 2909 | ); |
| 2910 | } |
| 2911 | ), |
| 2912 | e.define( |
| 2913 | 'select2/data/ajax', |
| 2914 | [ './array', '../utils', 'jquery' ], |
| 2915 | function ( e, t, o ) { |
| 2916 | function n( e, t ) { |
| 2917 | ( this.ajaxOptions = this._applyDefaults( |
| 2918 | t.get( 'ajax' ) |
| 2919 | ) ), |
| 2920 | null != this.ajaxOptions.processResults && |
| 2921 | ( this.processResults = this.ajaxOptions.processResults ), |
| 2922 | n.__super__.constructor.call( this, e, t ); |
| 2923 | } |
| 2924 | return ( |
| 2925 | t.Extend( n, e ), |
| 2926 | ( n.prototype._applyDefaults = function ( e ) { |
| 2927 | var t = { |
| 2928 | data: function ( e ) { |
| 2929 | return o.extend( {}, e, { q: e.term } ); |
| 2930 | }, |
| 2931 | transport: function ( e, t, n ) { |
| 2932 | var r = o.ajax( e ); |
| 2933 | return r.then( t ), r.fail( n ), r; |
| 2934 | }, |
| 2935 | }; |
| 2936 | return o.extend( {}, t, e, ! 0 ); |
| 2937 | } ), |
| 2938 | ( n.prototype.processResults = function ( e ) { |
| 2939 | return e; |
| 2940 | } ), |
| 2941 | ( n.prototype.query = function ( n, r ) { |
| 2942 | var i = this; |
| 2943 | null != this._request && |
| 2944 | ( o.isFunction( this._request.abort ) && |
| 2945 | this._request.abort(), |
| 2946 | ( this._request = null ) ); |
| 2947 | var t = o.extend( |
| 2948 | { type: 'GET' }, |
| 2949 | this.ajaxOptions |
| 2950 | ); |
| 2951 | function e() { |
| 2952 | var e = t.transport( |
| 2953 | t, |
| 2954 | function ( e ) { |
| 2955 | var t = i.processResults( e, n ); |
| 2956 | i.options.get( 'debug' ) && |
| 2957 | window.console && |
| 2958 | console.error && |
| 2959 | ( ( t && |
| 2960 | t.results && |
| 2961 | o.isArray( t.results ) ) || |
| 2962 | console.error( |
| 2963 | 'Select2: The AJAX results did not return an array in the `results` key of the response.' |
| 2964 | ) ), |
| 2965 | r( t ); |
| 2966 | }, |
| 2967 | function () { |
| 2968 | ( 'status' in e && |
| 2969 | ( 0 === e.status || |
| 2970 | '0' === e.status ) ) || |
| 2971 | i.trigger( 'results:message', { |
| 2972 | message: 'errorLoading', |
| 2973 | } ); |
| 2974 | } |
| 2975 | ); |
| 2976 | i._request = e; |
| 2977 | } |
| 2978 | 'function' == typeof t.url && |
| 2979 | ( t.url = t.url.call( this.$element, n ) ), |
| 2980 | 'function' == typeof t.data && |
| 2981 | ( t.data = t.data.call( |
| 2982 | this.$element, |
| 2983 | n |
| 2984 | ) ), |
| 2985 | this.ajaxOptions.delay && null != n.term |
| 2986 | ? ( this._queryTimeout && |
| 2987 | window.clearTimeout( |
| 2988 | this._queryTimeout |
| 2989 | ), |
| 2990 | ( this._queryTimeout = window.setTimeout( |
| 2991 | e, |
| 2992 | this.ajaxOptions.delay |
| 2993 | ) ) ) |
| 2994 | : e(); |
| 2995 | } ), |
| 2996 | n |
| 2997 | ); |
| 2998 | } |
| 2999 | ), |
| 3000 | e.define( 'select2/data/tags', [ 'jquery' ], function ( u ) { |
| 3001 | function e( e, t, n ) { |
| 3002 | var r = n.get( 'tags' ), |
| 3003 | i = n.get( 'createTag' ); |
| 3004 | void 0 !== i && ( this.createTag = i ); |
| 3005 | var o = n.get( 'insertTag' ); |
| 3006 | if ( |
| 3007 | ( void 0 !== o && ( this.insertTag = o ), |
| 3008 | e.call( this, t, n ), |
| 3009 | u.isArray( r ) ) |
| 3010 | ) |
| 3011 | for ( var s = 0; s < r.length; s++ ) { |
| 3012 | var a = r[ s ], |
| 3013 | l = this._normalizeItem( a ), |
| 3014 | c = this.option( l ); |
| 3015 | this.$element.append( c ); |
| 3016 | } |
| 3017 | } |
| 3018 | return ( |
| 3019 | ( e.prototype.query = function ( e, c, u ) { |
| 3020 | var d = this; |
| 3021 | this._removeOldTags(), |
| 3022 | null != c.term && null == c.page |
| 3023 | ? e.call( this, c, function e( t, n ) { |
| 3024 | for ( |
| 3025 | var r = t.results, i = 0; |
| 3026 | i < r.length; |
| 3027 | i++ |
| 3028 | ) { |
| 3029 | var o = r[ i ], |
| 3030 | s = |
| 3031 | null != o.children && |
| 3032 | ! e( |
| 3033 | { |
| 3034 | results: |
| 3035 | o.children, |
| 3036 | }, |
| 3037 | ! 0 |
| 3038 | ); |
| 3039 | if ( |
| 3040 | ( |
| 3041 | o.text || '' |
| 3042 | ).toUpperCase() === |
| 3043 | ( |
| 3044 | c.term || '' |
| 3045 | ).toUpperCase() || |
| 3046 | s |
| 3047 | ) |
| 3048 | return ( |
| 3049 | ! n && |
| 3050 | ( ( t.data = r ), |
| 3051 | void u( t ) ) |
| 3052 | ); |
| 3053 | } |
| 3054 | if ( n ) return ! 0; |
| 3055 | var a = d.createTag( c ); |
| 3056 | if ( null != a ) { |
| 3057 | var l = d.option( a ); |
| 3058 | l.attr( |
| 3059 | 'data-select2-tag', |
| 3060 | ! 0 |
| 3061 | ), |
| 3062 | d.addOptions( [ l ] ), |
| 3063 | d.insertTag( r, a ); |
| 3064 | } |
| 3065 | ( t.results = r ), u( t ); |
| 3066 | } ) |
| 3067 | : e.call( this, c, u ); |
| 3068 | } ), |
| 3069 | ( e.prototype.createTag = function ( e, t ) { |
| 3070 | var n = u.trim( t.term ); |
| 3071 | return '' === n ? null : { id: n, text: n }; |
| 3072 | } ), |
| 3073 | ( e.prototype.insertTag = function ( e, t, n ) { |
| 3074 | t.unshift( n ); |
| 3075 | } ), |
| 3076 | ( e.prototype._removeOldTags = function ( e ) { |
| 3077 | this.$element |
| 3078 | .find( 'option[data-select2-tag]' ) |
| 3079 | .each( function () { |
| 3080 | this.selected || u( this ).remove(); |
| 3081 | } ); |
| 3082 | } ), |
| 3083 | e |
| 3084 | ); |
| 3085 | } ), |
| 3086 | e.define( |
| 3087 | 'select2/data/tokenizer', |
| 3088 | [ 'jquery' ], |
| 3089 | function ( d ) { |
| 3090 | function e( e, t, n ) { |
| 3091 | var r = n.get( 'tokenizer' ); |
| 3092 | void 0 !== r && ( this.tokenizer = r ), |
| 3093 | e.call( this, t, n ); |
| 3094 | } |
| 3095 | return ( |
| 3096 | ( e.prototype.bind = function ( e, t, n ) { |
| 3097 | e.call( this, t, n ), |
| 3098 | ( this.$search = |
| 3099 | t.dropdown.$search || |
| 3100 | t.selection.$search || |
| 3101 | n.find( '.select2-search__field' ) ); |
| 3102 | } ), |
| 3103 | ( e.prototype.query = function ( e, t, n ) { |
| 3104 | var r = this; |
| 3105 | t.term = t.term || ''; |
| 3106 | var i = this.tokenizer( |
| 3107 | t, |
| 3108 | this.options, |
| 3109 | function ( e ) { |
| 3110 | var t = r._normalizeItem( e ); |
| 3111 | if ( |
| 3112 | ! r.$element |
| 3113 | .find( 'option' ) |
| 3114 | .filter( function () { |
| 3115 | return ( |
| 3116 | d( this ).val() === t.id |
| 3117 | ); |
| 3118 | } ).length |
| 3119 | ) { |
| 3120 | var n = r.option( t ); |
| 3121 | n.attr( 'data-select2-tag', ! 0 ), |
| 3122 | r._removeOldTags(), |
| 3123 | r.addOptions( [ n ] ); |
| 3124 | } |
| 3125 | ! ( function ( e ) { |
| 3126 | r.trigger( 'select', { data: e } ); |
| 3127 | } )( t ); |
| 3128 | } |
| 3129 | ); |
| 3130 | i.term !== t.term && |
| 3131 | ( this.$search.length && |
| 3132 | ( this.$search.val( i.term ), |
| 3133 | this.$search.trigger( 'focus' ) ), |
| 3134 | ( t.term = i.term ) ), |
| 3135 | e.call( this, t, n ); |
| 3136 | } ), |
| 3137 | ( e.prototype.tokenizer = function ( e, t, n, r ) { |
| 3138 | for ( |
| 3139 | var i = n.get( 'tokenSeparators' ) || [], |
| 3140 | o = t.term, |
| 3141 | s = 0, |
| 3142 | a = |
| 3143 | this.createTag || |
| 3144 | function ( e ) { |
| 3145 | return { |
| 3146 | id: e.term, |
| 3147 | text: e.term, |
| 3148 | }; |
| 3149 | }; |
| 3150 | s < o.length; |
| 3151 | |
| 3152 | ) { |
| 3153 | var l = o[ s ]; |
| 3154 | if ( -1 !== d.inArray( l, i ) ) { |
| 3155 | var c = o.substr( 0, s ), |
| 3156 | u = a( |
| 3157 | d.extend( {}, t, { term: c } ) |
| 3158 | ); |
| 3159 | null != u |
| 3160 | ? ( r( u ), |
| 3161 | ( o = o.substr( s + 1 ) || '' ), |
| 3162 | ( s = 0 ) ) |
| 3163 | : s++; |
| 3164 | } else s++; |
| 3165 | } |
| 3166 | return { term: o }; |
| 3167 | } ), |
| 3168 | e |
| 3169 | ); |
| 3170 | } |
| 3171 | ), |
| 3172 | e.define( 'select2/data/minimumInputLength', [], function () { |
| 3173 | function e( e, t, n ) { |
| 3174 | ( this.minimumInputLength = n.get( |
| 3175 | 'minimumInputLength' |
| 3176 | ) ), |
| 3177 | e.call( this, t, n ); |
| 3178 | } |
| 3179 | return ( |
| 3180 | ( e.prototype.query = function ( e, t, n ) { |
| 3181 | ( t.term = t.term || '' ), |
| 3182 | t.term.length < this.minimumInputLength |
| 3183 | ? this.trigger( 'results:message', { |
| 3184 | message: 'inputTooShort', |
| 3185 | args: { |
| 3186 | minimum: this |
| 3187 | .minimumInputLength, |
| 3188 | input: t.term, |
| 3189 | params: t, |
| 3190 | }, |
| 3191 | } ) |
| 3192 | : e.call( this, t, n ); |
| 3193 | } ), |
| 3194 | e |
| 3195 | ); |
| 3196 | } ), |
| 3197 | e.define( 'select2/data/maximumInputLength', [], function () { |
| 3198 | function e( e, t, n ) { |
| 3199 | ( this.maximumInputLength = n.get( |
| 3200 | 'maximumInputLength' |
| 3201 | ) ), |
| 3202 | e.call( this, t, n ); |
| 3203 | } |
| 3204 | return ( |
| 3205 | ( e.prototype.query = function ( e, t, n ) { |
| 3206 | ( t.term = t.term || '' ), |
| 3207 | 0 < this.maximumInputLength && |
| 3208 | t.term.length > this.maximumInputLength |
| 3209 | ? this.trigger( 'results:message', { |
| 3210 | message: 'inputTooLong', |
| 3211 | args: { |
| 3212 | maximum: this |
| 3213 | .maximumInputLength, |
| 3214 | input: t.term, |
| 3215 | params: t, |
| 3216 | }, |
| 3217 | } ) |
| 3218 | : e.call( this, t, n ); |
| 3219 | } ), |
| 3220 | e |
| 3221 | ); |
| 3222 | } ), |
| 3223 | e.define( |
| 3224 | 'select2/data/maximumSelectionLength', |
| 3225 | [], |
| 3226 | function () { |
| 3227 | function e( e, t, n ) { |
| 3228 | ( this.maximumSelectionLength = n.get( |
| 3229 | 'maximumSelectionLength' |
| 3230 | ) ), |
| 3231 | e.call( this, t, n ); |
| 3232 | } |
| 3233 | return ( |
| 3234 | ( e.prototype.bind = function ( e, t, n ) { |
| 3235 | var r = this; |
| 3236 | e.call( this, t, n ), |
| 3237 | t.on( 'select', function () { |
| 3238 | r._checkIfMaximumSelected(); |
| 3239 | } ); |
| 3240 | } ), |
| 3241 | ( e.prototype.query = function ( e, t, n ) { |
| 3242 | var r = this; |
| 3243 | this._checkIfMaximumSelected( function () { |
| 3244 | e.call( r, t, n ); |
| 3245 | } ); |
| 3246 | } ), |
| 3247 | ( e.prototype._checkIfMaximumSelected = function ( |
| 3248 | e, |
| 3249 | n |
| 3250 | ) { |
| 3251 | var r = this; |
| 3252 | this.current( function ( e ) { |
| 3253 | var t = null != e ? e.length : 0; |
| 3254 | 0 < r.maximumSelectionLength && |
| 3255 | t >= r.maximumSelectionLength |
| 3256 | ? r.trigger( 'results:message', { |
| 3257 | message: 'maximumSelected', |
| 3258 | args: { |
| 3259 | maximum: |
| 3260 | r.maximumSelectionLength, |
| 3261 | }, |
| 3262 | } ) |
| 3263 | : n && n(); |
| 3264 | } ); |
| 3265 | } ), |
| 3266 | e |
| 3267 | ); |
| 3268 | } |
| 3269 | ), |
| 3270 | e.define( |
| 3271 | 'select2/dropdown', |
| 3272 | [ 'jquery', './utils' ], |
| 3273 | function ( t, e ) { |
| 3274 | function n( e, t ) { |
| 3275 | ( this.$element = e ), |
| 3276 | ( this.options = t ), |
| 3277 | n.__super__.constructor.call( this ); |
| 3278 | } |
| 3279 | return ( |
| 3280 | e.Extend( n, e.Observable ), |
| 3281 | ( n.prototype.render = function () { |
| 3282 | var e = t( |
| 3283 | '<span class="select2-dropdown"><span class="select2-results"></span></span>' |
| 3284 | ); |
| 3285 | return ( |
| 3286 | e.attr( 'dir', this.options.get( 'dir' ) ), |
| 3287 | ( this.$dropdown = e ) |
| 3288 | ); |
| 3289 | } ), |
| 3290 | ( n.prototype.bind = function () {} ), |
| 3291 | ( n.prototype.position = function ( e, t ) {} ), |
| 3292 | ( n.prototype.destroy = function () { |
| 3293 | this.$dropdown.remove(); |
| 3294 | } ), |
| 3295 | n |
| 3296 | ); |
| 3297 | } |
| 3298 | ), |
| 3299 | e.define( |
| 3300 | 'select2/dropdown/search', |
| 3301 | [ 'jquery', '../utils' ], |
| 3302 | function ( o, e ) { |
| 3303 | function t() {} |
| 3304 | return ( |
| 3305 | ( t.prototype.render = function ( e ) { |
| 3306 | var t = e.call( this ), |
| 3307 | n = o( |
| 3308 | '<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>' |
| 3309 | ); |
| 3310 | return ( |
| 3311 | ( this.$searchContainer = n ), |
| 3312 | ( this.$search = n.find( 'input' ) ), |
| 3313 | t.prepend( n ), |
| 3314 | t |
| 3315 | ); |
| 3316 | } ), |
| 3317 | ( t.prototype.bind = function ( e, t, n ) { |
| 3318 | var r = this, |
| 3319 | i = t.id + '-results'; |
| 3320 | e.call( this, t, n ), |
| 3321 | this.$search.on( 'keydown', function ( e ) { |
| 3322 | r.trigger( 'keypress', e ), |
| 3323 | ( r._keyUpPrevented = e.isDefaultPrevented() ); |
| 3324 | } ), |
| 3325 | this.$search.on( 'input', function ( e ) { |
| 3326 | o( this ).off( 'keyup' ); |
| 3327 | } ), |
| 3328 | this.$search.on( |
| 3329 | 'keyup input', |
| 3330 | function ( e ) { |
| 3331 | r.handleSearch( e ); |
| 3332 | } |
| 3333 | ), |
| 3334 | t.on( 'open', function () { |
| 3335 | r.$search.attr( 'tabindex', 0 ), |
| 3336 | r.$search.attr( |
| 3337 | 'aria-controls', |
| 3338 | i |
| 3339 | ), |
| 3340 | r.$search.trigger( 'focus' ), |
| 3341 | window.setTimeout( function () { |
| 3342 | r.$search.trigger( 'focus' ); |
| 3343 | }, 0 ); |
| 3344 | } ), |
| 3345 | t.on( 'close', function () { |
| 3346 | r.$search.attr( 'tabindex', -1 ), |
| 3347 | r.$search.removeAttr( |
| 3348 | 'aria-controls' |
| 3349 | ), |
| 3350 | r.$search.removeAttr( |
| 3351 | 'aria-activedescendant' |
| 3352 | ), |
| 3353 | r.$search.val( '' ), |
| 3354 | r.$search.trigger( 'blur' ); |
| 3355 | } ), |
| 3356 | t.on( 'focus', function () { |
| 3357 | t.isOpen() || |
| 3358 | r.$search.trigger( 'focus' ); |
| 3359 | } ), |
| 3360 | t.on( 'results:all', function ( e ) { |
| 3361 | ( null != e.query.term && |
| 3362 | '' !== e.query.term ) || |
| 3363 | ( r.showSearch( e ) |
| 3364 | ? r.$searchContainer.removeClass( |
| 3365 | 'select2-search--hide' |
| 3366 | ) |
| 3367 | : r.$searchContainer.addClass( |
| 3368 | 'select2-search--hide' |
| 3369 | ) ); |
| 3370 | } ), |
| 3371 | t.on( 'results:focus', function ( e ) { |
| 3372 | e.data._resultId |
| 3373 | ? r.$search.attr( |
| 3374 | 'aria-activedescendant', |
| 3375 | e.data._resultId |
| 3376 | ) |
| 3377 | : r.$search.removeAttr( |
| 3378 | 'aria-activedescendant' |
| 3379 | ); |
| 3380 | } ); |
| 3381 | } ), |
| 3382 | ( t.prototype.handleSearch = function ( e ) { |
| 3383 | if ( ! this._keyUpPrevented ) { |
| 3384 | var t = this.$search.val(); |
| 3385 | this.trigger( 'query', { term: t } ); |
| 3386 | } |
| 3387 | this._keyUpPrevented = ! 1; |
| 3388 | } ), |
| 3389 | ( t.prototype.showSearch = function ( e, t ) { |
| 3390 | return ! 0; |
| 3391 | } ), |
| 3392 | t |
| 3393 | ); |
| 3394 | } |
| 3395 | ), |
| 3396 | e.define( 'select2/dropdown/hidePlaceholder', [], function () { |
| 3397 | function e( e, t, n, r ) { |
| 3398 | ( this.placeholder = this.normalizePlaceholder( |
| 3399 | n.get( 'placeholder' ) |
| 3400 | ) ), |
| 3401 | e.call( this, t, n, r ); |
| 3402 | } |
| 3403 | return ( |
| 3404 | ( e.prototype.append = function ( e, t ) { |
| 3405 | ( t.results = this.removePlaceholder( t.results ) ), |
| 3406 | e.call( this, t ); |
| 3407 | } ), |
| 3408 | ( e.prototype.normalizePlaceholder = function ( e, t ) { |
| 3409 | return ( |
| 3410 | 'string' == typeof t && |
| 3411 | ( t = { id: '', text: t } ), |
| 3412 | t |
| 3413 | ); |
| 3414 | } ), |
| 3415 | ( e.prototype.removePlaceholder = function ( e, t ) { |
| 3416 | for ( |
| 3417 | var n = t.slice( 0 ), r = t.length - 1; |
| 3418 | 0 <= r; |
| 3419 | r-- |
| 3420 | ) { |
| 3421 | var i = t[ r ]; |
| 3422 | this.placeholder.id === i.id && |
| 3423 | n.splice( r, 1 ); |
| 3424 | } |
| 3425 | return n; |
| 3426 | } ), |
| 3427 | e |
| 3428 | ); |
| 3429 | } ), |
| 3430 | e.define( |
| 3431 | 'select2/dropdown/infiniteScroll', |
| 3432 | [ 'jquery' ], |
| 3433 | function ( n ) { |
| 3434 | function e( e, t, n, r ) { |
| 3435 | ( this.lastParams = {} ), |
| 3436 | e.call( this, t, n, r ), |
| 3437 | ( this.$loadingMore = this.createLoadingMore() ), |
| 3438 | ( this.loading = ! 1 ); |
| 3439 | } |
| 3440 | return ( |
| 3441 | ( e.prototype.append = function ( e, t ) { |
| 3442 | this.$loadingMore.remove(), |
| 3443 | ( this.loading = ! 1 ), |
| 3444 | e.call( this, t ), |
| 3445 | this.showLoadingMore( t ) && |
| 3446 | ( this.$results.append( |
| 3447 | this.$loadingMore |
| 3448 | ), |
| 3449 | this.loadMoreIfNeeded() ); |
| 3450 | } ), |
| 3451 | ( e.prototype.bind = function ( e, t, n ) { |
| 3452 | var r = this; |
| 3453 | e.call( this, t, n ), |
| 3454 | t.on( 'query', function ( e ) { |
| 3455 | ( r.lastParams = e ), |
| 3456 | ( r.loading = ! 0 ); |
| 3457 | } ), |
| 3458 | t.on( 'query:append', function ( e ) { |
| 3459 | ( r.lastParams = e ), |
| 3460 | ( r.loading = ! 0 ); |
| 3461 | } ), |
| 3462 | this.$results.on( |
| 3463 | 'scroll', |
| 3464 | this.loadMoreIfNeeded.bind( this ) |
| 3465 | ); |
| 3466 | } ), |
| 3467 | ( e.prototype.loadMoreIfNeeded = function () { |
| 3468 | var e = n.contains( |
| 3469 | document.documentElement, |
| 3470 | this.$loadingMore[ 0 ] |
| 3471 | ); |
| 3472 | if ( ! this.loading && e ) { |
| 3473 | var t = |
| 3474 | this.$results.offset().top + |
| 3475 | this.$results.outerHeight( ! 1 ); |
| 3476 | this.$loadingMore.offset().top + |
| 3477 | this.$loadingMore.outerHeight( ! 1 ) <= |
| 3478 | t + 50 && this.loadMore(); |
| 3479 | } |
| 3480 | } ), |
| 3481 | ( e.prototype.loadMore = function () { |
| 3482 | this.loading = ! 0; |
| 3483 | var e = n.extend( |
| 3484 | {}, |
| 3485 | { page: 1 }, |
| 3486 | this.lastParams |
| 3487 | ); |
| 3488 | e.page++, this.trigger( 'query:append', e ); |
| 3489 | } ), |
| 3490 | ( e.prototype.showLoadingMore = function ( e, t ) { |
| 3491 | return t.pagination && t.pagination.more; |
| 3492 | } ), |
| 3493 | ( e.prototype.createLoadingMore = function () { |
| 3494 | var e = n( |
| 3495 | '<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>' |
| 3496 | ), |
| 3497 | t = this.options |
| 3498 | .get( 'translations' ) |
| 3499 | .get( 'loadingMore' ); |
| 3500 | return e.html( t( this.lastParams ) ), e; |
| 3501 | } ), |
| 3502 | e |
| 3503 | ); |
| 3504 | } |
| 3505 | ), |
| 3506 | e.define( |
| 3507 | 'select2/dropdown/attachBody', |
| 3508 | [ 'jquery', '../utils' ], |
| 3509 | function ( f, a ) { |
| 3510 | function e( e, t, n ) { |
| 3511 | ( this.$dropdownParent = f( |
| 3512 | n.get( 'dropdownParent' ) || document.body |
| 3513 | ) ), |
| 3514 | e.call( this, t, n ); |
| 3515 | } |
| 3516 | return ( |
| 3517 | ( e.prototype.bind = function ( e, t, n ) { |
| 3518 | var r = this; |
| 3519 | e.call( this, t, n ), |
| 3520 | t.on( 'open', function () { |
| 3521 | r._showDropdown(), |
| 3522 | r._attachPositioningHandler( t ), |
| 3523 | r._bindContainerResultHandlers( t ); |
| 3524 | } ), |
| 3525 | t.on( 'close', function () { |
| 3526 | r._hideDropdown(), |
| 3527 | r._detachPositioningHandler( t ); |
| 3528 | } ), |
| 3529 | this.$dropdownContainer.on( |
| 3530 | 'mousedown', |
| 3531 | function ( e ) { |
| 3532 | e.stopPropagation(); |
| 3533 | } |
| 3534 | ); |
| 3535 | } ), |
| 3536 | ( e.prototype.destroy = function ( e ) { |
| 3537 | e.call( this ), |
| 3538 | this.$dropdownContainer.remove(); |
| 3539 | } ), |
| 3540 | ( e.prototype.position = function ( e, t, n ) { |
| 3541 | t.attr( 'class', n.attr( 'class' ) ), |
| 3542 | t.removeClass( 'select2' ), |
| 3543 | t.addClass( 'select2-container--open' ), |
| 3544 | t.css( { |
| 3545 | position: 'absolute', |
| 3546 | top: -999999, |
| 3547 | } ), |
| 3548 | ( this.$container = n ); |
| 3549 | } ), |
| 3550 | ( e.prototype.render = function ( e ) { |
| 3551 | var t = f( '<span></span>' ), |
| 3552 | n = e.call( this ); |
| 3553 | return ( |
| 3554 | t.append( n ), |
| 3555 | ( this.$dropdownContainer = t ) |
| 3556 | ); |
| 3557 | } ), |
| 3558 | ( e.prototype._hideDropdown = function ( e ) { |
| 3559 | this.$dropdownContainer.detach(); |
| 3560 | } ), |
| 3561 | ( e.prototype._bindContainerResultHandlers = function ( |
| 3562 | e, |
| 3563 | t |
| 3564 | ) { |
| 3565 | if ( ! this._containerResultsHandlersBound ) { |
| 3566 | var n = this; |
| 3567 | t.on( 'results:all', function () { |
| 3568 | n._positionDropdown(), |
| 3569 | n._resizeDropdown(); |
| 3570 | } ), |
| 3571 | t.on( 'results:append', function () { |
| 3572 | n._positionDropdown(), |
| 3573 | n._resizeDropdown(); |
| 3574 | } ), |
| 3575 | t.on( 'results:message', function () { |
| 3576 | n._positionDropdown(), |
| 3577 | n._resizeDropdown(); |
| 3578 | } ), |
| 3579 | t.on( 'select', function () { |
| 3580 | n._positionDropdown(), |
| 3581 | n._resizeDropdown(); |
| 3582 | } ), |
| 3583 | t.on( 'unselect', function () { |
| 3584 | n._positionDropdown(), |
| 3585 | n._resizeDropdown(); |
| 3586 | } ), |
| 3587 | ( this._containerResultsHandlersBound = ! 0 ); |
| 3588 | } |
| 3589 | } ), |
| 3590 | ( e.prototype._attachPositioningHandler = function ( |
| 3591 | e, |
| 3592 | t |
| 3593 | ) { |
| 3594 | var n = this, |
| 3595 | r = 'scroll.select2.' + t.id, |
| 3596 | i = 'resize.select2.' + t.id, |
| 3597 | o = 'orientationchange.select2.' + t.id, |
| 3598 | s = this.$container |
| 3599 | .parents() |
| 3600 | .filter( a.hasScroll ); |
| 3601 | s.each( function () { |
| 3602 | a.StoreData( |
| 3603 | this, |
| 3604 | 'select2-scroll-position', |
| 3605 | { |
| 3606 | x: f( this ).scrollLeft(), |
| 3607 | y: f( this ).scrollTop(), |
| 3608 | } |
| 3609 | ); |
| 3610 | } ), |
| 3611 | s.on( r, function ( e ) { |
| 3612 | var t = a.GetData( |
| 3613 | this, |
| 3614 | 'select2-scroll-position' |
| 3615 | ); |
| 3616 | f( this ).scrollTop( t.y ); |
| 3617 | } ), |
| 3618 | f( window ).on( |
| 3619 | r + ' ' + i + ' ' + o, |
| 3620 | function ( e ) { |
| 3621 | n._positionDropdown(), |
| 3622 | n._resizeDropdown(); |
| 3623 | } |
| 3624 | ); |
| 3625 | } ), |
| 3626 | ( e.prototype._detachPositioningHandler = function ( |
| 3627 | e, |
| 3628 | t |
| 3629 | ) { |
| 3630 | var n = 'scroll.select2.' + t.id, |
| 3631 | r = 'resize.select2.' + t.id, |
| 3632 | i = 'orientationchange.select2.' + t.id; |
| 3633 | this.$container |
| 3634 | .parents() |
| 3635 | .filter( a.hasScroll ) |
| 3636 | .off( n ), |
| 3637 | f( window ).off( n + ' ' + r + ' ' + i ); |
| 3638 | } ), |
| 3639 | ( e.prototype._positionDropdown = function () { |
| 3640 | var e = f( window ), |
| 3641 | t = this.$dropdown.hasClass( |
| 3642 | 'select2-dropdown--above' |
| 3643 | ), |
| 3644 | n = this.$dropdown.hasClass( |
| 3645 | 'select2-dropdown--below' |
| 3646 | ), |
| 3647 | r = null, |
| 3648 | i = this.$container.offset(); |
| 3649 | i.bottom = |
| 3650 | i.top + this.$container.outerHeight( ! 1 ); |
| 3651 | var o = { |
| 3652 | height: this.$container.outerHeight( ! 1 ), |
| 3653 | }; |
| 3654 | ( o.top = i.top ), |
| 3655 | ( o.bottom = i.top + o.height ); |
| 3656 | var s = this.$dropdown.outerHeight( ! 1 ), |
| 3657 | a = e.scrollTop(), |
| 3658 | l = e.scrollTop() + e.height(), |
| 3659 | c = a < i.top - s, |
| 3660 | u = l > i.bottom + s, |
| 3661 | d = { left: i.left, top: o.bottom }, |
| 3662 | p = this.$dropdownParent; |
| 3663 | 'static' === p.css( 'position' ) && |
| 3664 | ( p = p.offsetParent() ); |
| 3665 | var h = { top: 0, left: 0 }; |
| 3666 | ( f.contains( document.body, p[ 0 ] ) || |
| 3667 | p[ 0 ].isConnected ) && |
| 3668 | ( h = p.offset() ), |
| 3669 | ( d.top -= h.top ), |
| 3670 | ( d.left -= h.left ), |
| 3671 | t || n || ( r = 'below' ), |
| 3672 | u || ! c || t |
| 3673 | ? ! c && u && t && ( r = 'below' ) |
| 3674 | : ( r = 'above' ), |
| 3675 | ( 'above' == r || |
| 3676 | ( t && 'below' !== r ) ) && |
| 3677 | ( d.top = o.top - h.top - s ), |
| 3678 | null != r && |
| 3679 | ( this.$dropdown |
| 3680 | .removeClass( |
| 3681 | 'select2-dropdown--below select2-dropdown--above' |
| 3682 | ) |
| 3683 | .addClass( |
| 3684 | 'select2-dropdown--' + r |
| 3685 | ), |
| 3686 | this.$container |
| 3687 | .removeClass( |
| 3688 | 'select2-container--below select2-container--above' |
| 3689 | ) |
| 3690 | .addClass( |
| 3691 | 'select2-container--' + r |
| 3692 | ) ), |
| 3693 | this.$dropdownContainer.css( d ); |
| 3694 | } ), |
| 3695 | ( e.prototype._resizeDropdown = function () { |
| 3696 | var e = { |
| 3697 | width: |
| 3698 | this.$container.outerWidth( ! 1 ) + |
| 3699 | 'px', |
| 3700 | }; |
| 3701 | this.options.get( 'dropdownAutoWidth' ) && |
| 3702 | ( ( e.minWidth = e.width ), |
| 3703 | ( e.position = 'relative' ), |
| 3704 | ( e.width = 'auto' ) ), |
| 3705 | this.$dropdown.css( e ); |
| 3706 | } ), |
| 3707 | ( e.prototype._showDropdown = function ( e ) { |
| 3708 | this.$dropdownContainer.appendTo( |
| 3709 | this.$dropdownParent |
| 3710 | ), |
| 3711 | this._positionDropdown(), |
| 3712 | this._resizeDropdown(); |
| 3713 | } ), |
| 3714 | e |
| 3715 | ); |
| 3716 | } |
| 3717 | ), |
| 3718 | e.define( |
| 3719 | 'select2/dropdown/minimumResultsForSearch', |
| 3720 | [], |
| 3721 | function () { |
| 3722 | function e( e, t, n, r ) { |
| 3723 | ( this.minimumResultsForSearch = n.get( |
| 3724 | 'minimumResultsForSearch' |
| 3725 | ) ), |
| 3726 | this.minimumResultsForSearch < 0 && |
| 3727 | ( this.minimumResultsForSearch = 1 / 0 ), |
| 3728 | e.call( this, t, n, r ); |
| 3729 | } |
| 3730 | return ( |
| 3731 | ( e.prototype.showSearch = function ( e, t ) { |
| 3732 | return ( |
| 3733 | ! ( |
| 3734 | ( function e( t ) { |
| 3735 | for ( |
| 3736 | var n = 0, r = 0; |
| 3737 | r < t.length; |
| 3738 | r++ |
| 3739 | ) { |
| 3740 | var i = t[ r ]; |
| 3741 | i.children |
| 3742 | ? ( n += e( i.children ) ) |
| 3743 | : n++; |
| 3744 | } |
| 3745 | return n; |
| 3746 | } )( t.data.results ) < |
| 3747 | this.minimumResultsForSearch |
| 3748 | ) && e.call( this, t ) |
| 3749 | ); |
| 3750 | } ), |
| 3751 | e |
| 3752 | ); |
| 3753 | } |
| 3754 | ), |
| 3755 | e.define( |
| 3756 | 'select2/dropdown/selectOnClose', |
| 3757 | [ '../utils' ], |
| 3758 | function ( o ) { |
| 3759 | function e() {} |
| 3760 | return ( |
| 3761 | ( e.prototype.bind = function ( e, t, n ) { |
| 3762 | var r = this; |
| 3763 | e.call( this, t, n ), |
| 3764 | t.on( 'close', function ( e ) { |
| 3765 | r._handleSelectOnClose( e ); |
| 3766 | } ); |
| 3767 | } ), |
| 3768 | ( e.prototype._handleSelectOnClose = function ( |
| 3769 | e, |
| 3770 | t |
| 3771 | ) { |
| 3772 | if ( t && null != t.originalSelect2Event ) { |
| 3773 | var n = t.originalSelect2Event; |
| 3774 | if ( |
| 3775 | 'select' === n._type || |
| 3776 | 'unselect' === n._type |
| 3777 | ) |
| 3778 | return; |
| 3779 | } |
| 3780 | var r = this.getHighlightedResults(); |
| 3781 | if ( ! ( r.length < 1 ) ) { |
| 3782 | var i = o.GetData( r[ 0 ], 'data' ); |
| 3783 | ( null != i.element && |
| 3784 | i.element.selected ) || |
| 3785 | ( null == i.element && i.selected ) || |
| 3786 | this.trigger( 'select', { data: i } ); |
| 3787 | } |
| 3788 | } ), |
| 3789 | e |
| 3790 | ); |
| 3791 | } |
| 3792 | ), |
| 3793 | e.define( 'select2/dropdown/closeOnSelect', [], function () { |
| 3794 | function e() {} |
| 3795 | return ( |
| 3796 | ( e.prototype.bind = function ( e, t, n ) { |
| 3797 | var r = this; |
| 3798 | e.call( this, t, n ), |
| 3799 | t.on( 'select', function ( e ) { |
| 3800 | r._selectTriggered( e ); |
| 3801 | } ), |
| 3802 | t.on( 'unselect', function ( e ) { |
| 3803 | r._selectTriggered( e ); |
| 3804 | } ); |
| 3805 | } ), |
| 3806 | ( e.prototype._selectTriggered = function ( e, t ) { |
| 3807 | var n = t.originalEvent; |
| 3808 | ( n && ( n.ctrlKey || n.metaKey ) ) || |
| 3809 | this.trigger( 'close', { |
| 3810 | originalEvent: n, |
| 3811 | originalSelect2Event: t, |
| 3812 | } ); |
| 3813 | } ), |
| 3814 | e |
| 3815 | ); |
| 3816 | } ), |
| 3817 | e.define( 'select2/i18n/en', [], function () { |
| 3818 | return { |
| 3819 | errorLoading: function () { |
| 3820 | return 'The results could not be loaded.'; |
| 3821 | }, |
| 3822 | inputTooLong: function ( e ) { |
| 3823 | var t = e.input.length - e.maximum, |
| 3824 | n = 'Please delete ' + t + ' character'; |
| 3825 | return 1 != t && ( n += 's' ), n; |
| 3826 | }, |
| 3827 | inputTooShort: function ( e ) { |
| 3828 | return ( |
| 3829 | 'Please enter ' + |
| 3830 | ( e.minimum - e.input.length ) + |
| 3831 | ' or more characters' |
| 3832 | ); |
| 3833 | }, |
| 3834 | loadingMore: function () { |
| 3835 | return 'Loading more results…'; |
| 3836 | }, |
| 3837 | maximumSelected: function ( e ) { |
| 3838 | var t = |
| 3839 | 'You can only select ' + e.maximum + ' item'; |
| 3840 | return 1 != e.maximum && ( t += 's' ), t; |
| 3841 | }, |
| 3842 | noResults: function () { |
| 3843 | return 'No results found'; |
| 3844 | }, |
| 3845 | searching: function () { |
| 3846 | return 'Searching…'; |
| 3847 | }, |
| 3848 | removeAllItems: function () { |
| 3849 | return 'Remove all items'; |
| 3850 | }, |
| 3851 | }; |
| 3852 | } ), |
| 3853 | e.define( |
| 3854 | 'select2/defaults', |
| 3855 | [ |
| 3856 | 'jquery', |
| 3857 | 'require', |
| 3858 | './results', |
| 3859 | './selection/single', |
| 3860 | './selection/multiple', |
| 3861 | './selection/placeholder', |
| 3862 | './selection/allowClear', |
| 3863 | './selection/search', |
| 3864 | './selection/eventRelay', |
| 3865 | './utils', |
| 3866 | './translation', |
| 3867 | './diacritics', |
| 3868 | './data/select', |
| 3869 | './data/array', |
| 3870 | './data/ajax', |
| 3871 | './data/tags', |
| 3872 | './data/tokenizer', |
| 3873 | './data/minimumInputLength', |
| 3874 | './data/maximumInputLength', |
| 3875 | './data/maximumSelectionLength', |
| 3876 | './dropdown', |
| 3877 | './dropdown/search', |
| 3878 | './dropdown/hidePlaceholder', |
| 3879 | './dropdown/infiniteScroll', |
| 3880 | './dropdown/attachBody', |
| 3881 | './dropdown/minimumResultsForSearch', |
| 3882 | './dropdown/selectOnClose', |
| 3883 | './dropdown/closeOnSelect', |
| 3884 | './i18n/en', |
| 3885 | ], |
| 3886 | function ( |
| 3887 | c, |
| 3888 | u, |
| 3889 | d, |
| 3890 | p, |
| 3891 | h, |
| 3892 | f, |
| 3893 | g, |
| 3894 | m, |
| 3895 | v, |
| 3896 | y, |
| 3897 | s, |
| 3898 | t, |
| 3899 | _, |
| 3900 | $, |
| 3901 | b, |
| 3902 | w, |
| 3903 | A, |
| 3904 | x, |
| 3905 | D, |
| 3906 | S, |
| 3907 | E, |
| 3908 | C, |
| 3909 | O, |
| 3910 | T, |
| 3911 | q, |
| 3912 | L, |
| 3913 | I, |
| 3914 | j, |
| 3915 | e |
| 3916 | ) { |
| 3917 | function n() { |
| 3918 | this.reset(); |
| 3919 | } |
| 3920 | return ( |
| 3921 | ( n.prototype.apply = function ( e ) { |
| 3922 | if ( |
| 3923 | null == |
| 3924 | ( e = c.extend( |
| 3925 | ! 0, |
| 3926 | {}, |
| 3927 | this.defaults, |
| 3928 | e |
| 3929 | ) ).dataAdapter |
| 3930 | ) { |
| 3931 | if ( |
| 3932 | ( null != e.ajax |
| 3933 | ? ( e.dataAdapter = b ) |
| 3934 | : null != e.data |
| 3935 | ? ( e.dataAdapter = $ ) |
| 3936 | : ( e.dataAdapter = _ ), |
| 3937 | 0 < e.minimumInputLength && |
| 3938 | ( e.dataAdapter = y.Decorate( |
| 3939 | e.dataAdapter, |
| 3940 | x |
| 3941 | ) ), |
| 3942 | 0 < e.maximumInputLength && |
| 3943 | ( e.dataAdapter = y.Decorate( |
| 3944 | e.dataAdapter, |
| 3945 | D |
| 3946 | ) ), |
| 3947 | 0 < e.maximumSelectionLength && |
| 3948 | ( e.dataAdapter = y.Decorate( |
| 3949 | e.dataAdapter, |
| 3950 | S |
| 3951 | ) ), |
| 3952 | e.tags && |
| 3953 | ( e.dataAdapter = y.Decorate( |
| 3954 | e.dataAdapter, |
| 3955 | w |
| 3956 | ) ), |
| 3957 | ( null == e.tokenSeparators && |
| 3958 | null == e.tokenizer ) || |
| 3959 | ( e.dataAdapter = y.Decorate( |
| 3960 | e.dataAdapter, |
| 3961 | A |
| 3962 | ) ), |
| 3963 | null != e.query ) |
| 3964 | ) { |
| 3965 | var t = u( e.amdBase + 'compat/query' ); |
| 3966 | e.dataAdapter = y.Decorate( |
| 3967 | e.dataAdapter, |
| 3968 | t |
| 3969 | ); |
| 3970 | } |
| 3971 | if ( null != e.initSelection ) { |
| 3972 | var n = u( |
| 3973 | e.amdBase + 'compat/initSelection' |
| 3974 | ); |
| 3975 | e.dataAdapter = y.Decorate( |
| 3976 | e.dataAdapter, |
| 3977 | n |
| 3978 | ); |
| 3979 | } |
| 3980 | } |
| 3981 | if ( |
| 3982 | ( null == e.resultsAdapter && |
| 3983 | ( ( e.resultsAdapter = d ), |
| 3984 | null != e.ajax && |
| 3985 | ( e.resultsAdapter = y.Decorate( |
| 3986 | e.resultsAdapter, |
| 3987 | T |
| 3988 | ) ), |
| 3989 | null != e.placeholder && |
| 3990 | ( e.resultsAdapter = y.Decorate( |
| 3991 | e.resultsAdapter, |
| 3992 | O |
| 3993 | ) ), |
| 3994 | e.selectOnClose && |
| 3995 | ( e.resultsAdapter = y.Decorate( |
| 3996 | e.resultsAdapter, |
| 3997 | I |
| 3998 | ) ) ), |
| 3999 | null == e.dropdownAdapter ) |
| 4000 | ) { |
| 4001 | if ( e.multiple ) e.dropdownAdapter = E; |
| 4002 | else { |
| 4003 | var r = y.Decorate( E, C ); |
| 4004 | e.dropdownAdapter = r; |
| 4005 | } |
| 4006 | if ( |
| 4007 | ( 0 !== e.minimumResultsForSearch && |
| 4008 | ( e.dropdownAdapter = y.Decorate( |
| 4009 | e.dropdownAdapter, |
| 4010 | L |
| 4011 | ) ), |
| 4012 | e.closeOnSelect && |
| 4013 | ( e.dropdownAdapter = y.Decorate( |
| 4014 | e.dropdownAdapter, |
| 4015 | j |
| 4016 | ) ), |
| 4017 | null != e.dropdownCssClass || |
| 4018 | null != e.dropdownCss || |
| 4019 | null != e.adaptDropdownCssClass ) |
| 4020 | ) { |
| 4021 | var i = u( |
| 4022 | e.amdBase + 'compat/dropdownCss' |
| 4023 | ); |
| 4024 | e.dropdownAdapter = y.Decorate( |
| 4025 | e.dropdownAdapter, |
| 4026 | i |
| 4027 | ); |
| 4028 | } |
| 4029 | e.dropdownAdapter = y.Decorate( |
| 4030 | e.dropdownAdapter, |
| 4031 | q |
| 4032 | ); |
| 4033 | } |
| 4034 | if ( null == e.selectionAdapter ) { |
| 4035 | if ( |
| 4036 | ( e.multiple |
| 4037 | ? ( e.selectionAdapter = h ) |
| 4038 | : ( e.selectionAdapter = p ), |
| 4039 | null != e.placeholder && |
| 4040 | ( e.selectionAdapter = y.Decorate( |
| 4041 | e.selectionAdapter, |
| 4042 | f |
| 4043 | ) ), |
| 4044 | e.allowClear && |
| 4045 | ( e.selectionAdapter = y.Decorate( |
| 4046 | e.selectionAdapter, |
| 4047 | g |
| 4048 | ) ), |
| 4049 | e.multiple && |
| 4050 | ( e.selectionAdapter = y.Decorate( |
| 4051 | e.selectionAdapter, |
| 4052 | m |
| 4053 | ) ), |
| 4054 | null != e.containerCssClass || |
| 4055 | null != e.containerCss || |
| 4056 | null != e.adaptContainerCssClass ) |
| 4057 | ) { |
| 4058 | var o = u( |
| 4059 | e.amdBase + 'compat/containerCss' |
| 4060 | ); |
| 4061 | e.selectionAdapter = y.Decorate( |
| 4062 | e.selectionAdapter, |
| 4063 | o |
| 4064 | ); |
| 4065 | } |
| 4066 | e.selectionAdapter = y.Decorate( |
| 4067 | e.selectionAdapter, |
| 4068 | v |
| 4069 | ); |
| 4070 | } |
| 4071 | ( e.language = this._resolveLanguage( |
| 4072 | e.language |
| 4073 | ) ), |
| 4074 | e.language.push( 'en' ); |
| 4075 | for ( |
| 4076 | var s = [], a = 0; |
| 4077 | a < e.language.length; |
| 4078 | a++ |
| 4079 | ) { |
| 4080 | var l = e.language[ a ]; |
| 4081 | -1 === s.indexOf( l ) && s.push( l ); |
| 4082 | } |
| 4083 | return ( |
| 4084 | ( e.language = s ), |
| 4085 | ( e.translations = this._processTranslations( |
| 4086 | e.language, |
| 4087 | e.debug |
| 4088 | ) ), |
| 4089 | e |
| 4090 | ); |
| 4091 | } ), |
| 4092 | ( n.prototype.reset = function () { |
| 4093 | function a( e ) { |
| 4094 | return e.replace( |
| 4095 | /[^\u0000-\u007E]/g, |
| 4096 | function ( e ) { |
| 4097 | return t[ e ] || e; |
| 4098 | } |
| 4099 | ); |
| 4100 | } |
| 4101 | this.defaults = { |
| 4102 | amdBase: './', |
| 4103 | amdLanguageBase: './i18n/', |
| 4104 | closeOnSelect: ! 0, |
| 4105 | debug: ! 1, |
| 4106 | dropdownAutoWidth: ! 1, |
| 4107 | escapeMarkup: y.escapeMarkup, |
| 4108 | language: {}, |
| 4109 | matcher: function e( t, n ) { |
| 4110 | if ( '' === c.trim( t.term ) ) return n; |
| 4111 | if ( |
| 4112 | n.children && |
| 4113 | 0 < n.children.length |
| 4114 | ) { |
| 4115 | for ( |
| 4116 | var r = c.extend( ! 0, {}, n ), |
| 4117 | i = n.children.length - 1; |
| 4118 | 0 <= i; |
| 4119 | i-- |
| 4120 | ) |
| 4121 | null == |
| 4122 | e( t, n.children[ i ] ) && |
| 4123 | r.children.splice( i, 1 ); |
| 4124 | return 0 < r.children.length |
| 4125 | ? r |
| 4126 | : e( t, r ); |
| 4127 | } |
| 4128 | var o = a( n.text ).toUpperCase(), |
| 4129 | s = a( t.term ).toUpperCase(); |
| 4130 | return -1 < o.indexOf( s ) ? n : null; |
| 4131 | }, |
| 4132 | minimumInputLength: 0, |
| 4133 | maximumInputLength: 0, |
| 4134 | maximumSelectionLength: 0, |
| 4135 | minimumResultsForSearch: 0, |
| 4136 | selectOnClose: ! 1, |
| 4137 | scrollAfterSelect: ! 1, |
| 4138 | sorter: function ( e ) { |
| 4139 | return e; |
| 4140 | }, |
| 4141 | templateResult: function ( e ) { |
| 4142 | return e.text; |
| 4143 | }, |
| 4144 | templateSelection: function ( e ) { |
| 4145 | return e.text; |
| 4146 | }, |
| 4147 | theme: 'default', |
| 4148 | width: 'resolve', |
| 4149 | }; |
| 4150 | } ), |
| 4151 | ( n.prototype.applyFromElement = function ( e, t ) { |
| 4152 | var n = e.language, |
| 4153 | r = this.defaults.language, |
| 4154 | i = t.prop( 'lang' ), |
| 4155 | o = t.closest( '[lang]' ).prop( 'lang' ), |
| 4156 | s = Array.prototype.concat.call( |
| 4157 | this._resolveLanguage( i ), |
| 4158 | this._resolveLanguage( n ), |
| 4159 | this._resolveLanguage( r ), |
| 4160 | this._resolveLanguage( o ) |
| 4161 | ); |
| 4162 | return ( e.language = s ), e; |
| 4163 | } ), |
| 4164 | ( n.prototype._resolveLanguage = function ( e ) { |
| 4165 | if ( ! e ) return []; |
| 4166 | if ( c.isEmptyObject( e ) ) return []; |
| 4167 | if ( c.isPlainObject( e ) ) return [ e ]; |
| 4168 | var t; |
| 4169 | t = c.isArray( e ) ? e : [ e ]; |
| 4170 | for ( var n = [], r = 0; r < t.length; r++ ) |
| 4171 | if ( |
| 4172 | ( n.push( t[ r ] ), |
| 4173 | 'string' == typeof t[ r ] && |
| 4174 | 0 < t[ r ].indexOf( '-' ) ) |
| 4175 | ) { |
| 4176 | var i = t[ r ].split( '-' )[ 0 ]; |
| 4177 | n.push( i ); |
| 4178 | } |
| 4179 | return n; |
| 4180 | } ), |
| 4181 | ( n.prototype._processTranslations = function ( |
| 4182 | e, |
| 4183 | t |
| 4184 | ) { |
| 4185 | for ( |
| 4186 | var n = new s(), r = 0; |
| 4187 | r < e.length; |
| 4188 | r++ |
| 4189 | ) { |
| 4190 | var i = new s(), |
| 4191 | o = e[ r ]; |
| 4192 | if ( 'string' == typeof o ) |
| 4193 | try { |
| 4194 | i = s.loadPath( o ); |
| 4195 | } catch ( e ) { |
| 4196 | try { |
| 4197 | ( o = |
| 4198 | this.defaults |
| 4199 | .amdLanguageBase + o ), |
| 4200 | ( i = s.loadPath( o ) ); |
| 4201 | } catch ( e ) { |
| 4202 | t && |
| 4203 | window.console && |
| 4204 | console.warn && |
| 4205 | console.warn( |
| 4206 | 'Select2: The language file for "' + |
| 4207 | o + |
| 4208 | '" could not be automatically loaded. A fallback will be used instead.' |
| 4209 | ); |
| 4210 | } |
| 4211 | } |
| 4212 | else |
| 4213 | i = c.isPlainObject( o ) |
| 4214 | ? new s( o ) |
| 4215 | : o; |
| 4216 | n.extend( i ); |
| 4217 | } |
| 4218 | return n; |
| 4219 | } ), |
| 4220 | ( n.prototype.set = function ( e, t ) { |
| 4221 | var n = {}; |
| 4222 | n[ c.camelCase( e ) ] = t; |
| 4223 | var r = y._convertData( n ); |
| 4224 | c.extend( ! 0, this.defaults, r ); |
| 4225 | } ), |
| 4226 | new n() |
| 4227 | ); |
| 4228 | } |
| 4229 | ), |
| 4230 | e.define( |
| 4231 | 'select2/options', |
| 4232 | [ 'require', 'jquery', './defaults', './utils' ], |
| 4233 | function ( r, d, i, p ) { |
| 4234 | function e( e, t ) { |
| 4235 | if ( |
| 4236 | ( ( this.options = e ), |
| 4237 | null != t && this.fromElement( t ), |
| 4238 | null != t && |
| 4239 | ( this.options = i.applyFromElement( |
| 4240 | this.options, |
| 4241 | t |
| 4242 | ) ), |
| 4243 | ( this.options = i.apply( this.options ) ), |
| 4244 | t && t.is( 'input' ) ) |
| 4245 | ) { |
| 4246 | var n = r( |
| 4247 | this.get( 'amdBase' ) + 'compat/inputData' |
| 4248 | ); |
| 4249 | this.options.dataAdapter = p.Decorate( |
| 4250 | this.options.dataAdapter, |
| 4251 | n |
| 4252 | ); |
| 4253 | } |
| 4254 | } |
| 4255 | return ( |
| 4256 | ( e.prototype.fromElement = function ( e ) { |
| 4257 | var t = [ 'select2' ]; |
| 4258 | null == this.options.multiple && |
| 4259 | ( this.options.multiple = e.prop( |
| 4260 | 'multiple' |
| 4261 | ) ), |
| 4262 | null == this.options.disabled && |
| 4263 | ( this.options.disabled = e.prop( |
| 4264 | 'disabled' |
| 4265 | ) ), |
| 4266 | null == this.options.dir && |
| 4267 | ( e.prop( 'dir' ) |
| 4268 | ? ( this.options.dir = e.prop( |
| 4269 | 'dir' |
| 4270 | ) ) |
| 4271 | : e.closest( '[dir]' ).prop( 'dir' ) |
| 4272 | ? ( this.options.dir = e |
| 4273 | .closest( '[dir]' ) |
| 4274 | .prop( 'dir' ) ) |
| 4275 | : ( this.options.dir = 'ltr' ) ), |
| 4276 | e.prop( 'disabled', this.options.disabled ), |
| 4277 | e.prop( 'multiple', this.options.multiple ), |
| 4278 | p.GetData( e[ 0 ], 'select2Tags' ) && |
| 4279 | ( this.options.debug && |
| 4280 | window.console && |
| 4281 | console.warn && |
| 4282 | console.warn( |
| 4283 | 'Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.' |
| 4284 | ), |
| 4285 | p.StoreData( |
| 4286 | e[ 0 ], |
| 4287 | 'data', |
| 4288 | p.GetData( e[ 0 ], 'select2Tags' ) |
| 4289 | ), |
| 4290 | p.StoreData( e[ 0 ], 'tags', ! 0 ) ), |
| 4291 | p.GetData( e[ 0 ], 'ajaxUrl' ) && |
| 4292 | ( this.options.debug && |
| 4293 | window.console && |
| 4294 | console.warn && |
| 4295 | console.warn( |
| 4296 | 'Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2.' |
| 4297 | ), |
| 4298 | e.attr( |
| 4299 | 'ajax--url', |
| 4300 | p.GetData( e[ 0 ], 'ajaxUrl' ) |
| 4301 | ), |
| 4302 | p.StoreData( |
| 4303 | e[ 0 ], |
| 4304 | 'ajax-Url', |
| 4305 | p.GetData( e[ 0 ], 'ajaxUrl' ) |
| 4306 | ) ); |
| 4307 | var n = {}; |
| 4308 | function r( e, t ) { |
| 4309 | return t.toUpperCase(); |
| 4310 | } |
| 4311 | for ( |
| 4312 | var i = 0; |
| 4313 | i < e[ 0 ].attributes.length; |
| 4314 | i++ |
| 4315 | ) { |
| 4316 | var o = e[ 0 ].attributes[ i ].name, |
| 4317 | s = 'data-'; |
| 4318 | if ( o.substr( 0, s.length ) == s ) { |
| 4319 | var a = o.substring( s.length ), |
| 4320 | l = p.GetData( e[ 0 ], a ); |
| 4321 | n[ a.replace( /-([a-z])/g, r ) ] = l; |
| 4322 | } |
| 4323 | } |
| 4324 | d.fn.jquery && |
| 4325 | '1.' == d.fn.jquery.substr( 0, 2 ) && |
| 4326 | e[ 0 ].dataset && |
| 4327 | ( n = d.extend( |
| 4328 | ! 0, |
| 4329 | {}, |
| 4330 | e[ 0 ].dataset, |
| 4331 | n |
| 4332 | ) ); |
| 4333 | var c = d.extend( |
| 4334 | ! 0, |
| 4335 | {}, |
| 4336 | p.GetData( e[ 0 ] ), |
| 4337 | n |
| 4338 | ); |
| 4339 | for ( var u in ( c = p._convertData( c ) ) ) |
| 4340 | -1 < d.inArray( u, t ) || |
| 4341 | ( d.isPlainObject( this.options[ u ] ) |
| 4342 | ? d.extend( |
| 4343 | this.options[ u ], |
| 4344 | c[ u ] |
| 4345 | ) |
| 4346 | : ( this.options[ u ] = c[ u ] ) ); |
| 4347 | return this; |
| 4348 | } ), |
| 4349 | ( e.prototype.get = function ( e ) { |
| 4350 | return this.options[ e ]; |
| 4351 | } ), |
| 4352 | ( e.prototype.set = function ( e, t ) { |
| 4353 | this.options[ e ] = t; |
| 4354 | } ), |
| 4355 | e |
| 4356 | ); |
| 4357 | } |
| 4358 | ), |
| 4359 | e.define( |
| 4360 | 'select2/core', |
| 4361 | [ 'jquery', './options', './utils', './keys' ], |
| 4362 | function ( o, c, u, r ) { |
| 4363 | var d = function ( e, t ) { |
| 4364 | null != u.GetData( e[ 0 ], 'select2' ) && |
| 4365 | u.GetData( e[ 0 ], 'select2' ).destroy(), |
| 4366 | ( this.$element = e ), |
| 4367 | ( this.id = this._generateId( e ) ), |
| 4368 | ( t = t || {} ), |
| 4369 | ( this.options = new c( t, e ) ), |
| 4370 | d.__super__.constructor.call( this ); |
| 4371 | var n = e.attr( 'tabindex' ) || 0; |
| 4372 | u.StoreData( e[ 0 ], 'old-tabindex', n ), |
| 4373 | e.attr( 'tabindex', '-1' ); |
| 4374 | var r = this.options.get( 'dataAdapter' ); |
| 4375 | this.dataAdapter = new r( e, this.options ); |
| 4376 | var i = this.render(); |
| 4377 | this._placeContainer( i ); |
| 4378 | var o = this.options.get( 'selectionAdapter' ); |
| 4379 | ( this.selection = new o( e, this.options ) ), |
| 4380 | ( this.$selection = this.selection.render() ), |
| 4381 | this.selection.position( this.$selection, i ); |
| 4382 | var s = this.options.get( 'dropdownAdapter' ); |
| 4383 | ( this.dropdown = new s( e, this.options ) ), |
| 4384 | ( this.$dropdown = this.dropdown.render() ), |
| 4385 | this.dropdown.position( this.$dropdown, i ); |
| 4386 | var a = this.options.get( 'resultsAdapter' ); |
| 4387 | ( this.results = new a( |
| 4388 | e, |
| 4389 | this.options, |
| 4390 | this.dataAdapter |
| 4391 | ) ), |
| 4392 | ( this.$results = this.results.render() ), |
| 4393 | this.results.position( |
| 4394 | this.$results, |
| 4395 | this.$dropdown |
| 4396 | ); |
| 4397 | var l = this; |
| 4398 | this._bindAdapters(), |
| 4399 | this._registerDomEvents(), |
| 4400 | this._registerDataEvents(), |
| 4401 | this._registerSelectionEvents(), |
| 4402 | this._registerDropdownEvents(), |
| 4403 | this._registerResultsEvents(), |
| 4404 | this._registerEvents(), |
| 4405 | this.dataAdapter.current( function ( e ) { |
| 4406 | l.trigger( 'selection:update', { |
| 4407 | data: e, |
| 4408 | } ); |
| 4409 | } ), |
| 4410 | e.addClass( 'select2-hidden-accessible' ), |
| 4411 | e.attr( 'aria-hidden', 'true' ), |
| 4412 | this._syncAttributes(), |
| 4413 | u.StoreData( e[ 0 ], 'select2', this ), |
| 4414 | e.data( 'select2', this ); |
| 4415 | }; |
| 4416 | return ( |
| 4417 | u.Extend( d, u.Observable ), |
| 4418 | ( d.prototype._generateId = function ( e ) { |
| 4419 | return ( |
| 4420 | 'select2-' + |
| 4421 | ( null != e.attr( 'id' ) |
| 4422 | ? e.attr( 'id' ) |
| 4423 | : null != e.attr( 'name' ) |
| 4424 | ? e.attr( 'name' ) + |
| 4425 | '-' + |
| 4426 | u.generateChars( 2 ) |
| 4427 | : u.generateChars( 4 ) |
| 4428 | ).replace( /(:|\.|\[|\]|,)/g, '' ) |
| 4429 | ); |
| 4430 | } ), |
| 4431 | ( d.prototype._placeContainer = function ( e ) { |
| 4432 | e.insertAfter( this.$element ); |
| 4433 | var t = this._resolveWidth( |
| 4434 | this.$element, |
| 4435 | this.options.get( 'width' ) |
| 4436 | ); |
| 4437 | null != t && e.css( 'width', t ); |
| 4438 | } ), |
| 4439 | ( d.prototype._resolveWidth = function ( e, t ) { |
| 4440 | var n = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; |
| 4441 | if ( 'resolve' == t ) { |
| 4442 | var r = this._resolveWidth( e, 'style' ); |
| 4443 | return null != r |
| 4444 | ? r |
| 4445 | : this._resolveWidth( e, 'element' ); |
| 4446 | } |
| 4447 | if ( 'element' == t ) { |
| 4448 | var i = e.outerWidth( ! 1 ); |
| 4449 | return i <= 0 ? 'auto' : i + 'px'; |
| 4450 | } |
| 4451 | if ( 'style' != t ) |
| 4452 | return 'computedstyle' != t |
| 4453 | ? t |
| 4454 | : window.getComputedStyle( e[ 0 ] ) |
| 4455 | .width; |
| 4456 | var o = e.attr( 'style' ); |
| 4457 | if ( 'string' != typeof o ) return null; |
| 4458 | for ( |
| 4459 | var s = o.split( ';' ), a = 0, l = s.length; |
| 4460 | a < l; |
| 4461 | a += 1 |
| 4462 | ) { |
| 4463 | var c = s[ a ] |
| 4464 | .replace( /\s/g, '' ) |
| 4465 | .match( n ); |
| 4466 | if ( null !== c && 1 <= c.length ) |
| 4467 | return c[ 1 ]; |
| 4468 | } |
| 4469 | return null; |
| 4470 | } ), |
| 4471 | ( d.prototype._bindAdapters = function () { |
| 4472 | this.dataAdapter.bind( this, this.$container ), |
| 4473 | this.selection.bind( |
| 4474 | this, |
| 4475 | this.$container |
| 4476 | ), |
| 4477 | this.dropdown.bind( this, this.$container ), |
| 4478 | this.results.bind( this, this.$container ); |
| 4479 | } ), |
| 4480 | ( d.prototype._registerDomEvents = function () { |
| 4481 | var t = this; |
| 4482 | this.$element.on( |
| 4483 | 'change.select2', |
| 4484 | function () { |
| 4485 | t.dataAdapter.current( function ( e ) { |
| 4486 | t.trigger( 'selection:update', { |
| 4487 | data: e, |
| 4488 | } ); |
| 4489 | } ); |
| 4490 | } |
| 4491 | ), |
| 4492 | this.$element.on( |
| 4493 | 'focus.select2', |
| 4494 | function ( e ) { |
| 4495 | t.trigger( 'focus', e ); |
| 4496 | } |
| 4497 | ), |
| 4498 | ( this._syncA = u.bind( |
| 4499 | this._syncAttributes, |
| 4500 | this |
| 4501 | ) ), |
| 4502 | ( this._syncS = u.bind( |
| 4503 | this._syncSubtree, |
| 4504 | this |
| 4505 | ) ), |
| 4506 | this.$element[ 0 ].attachEvent && |
| 4507 | this.$element[ 0 ].attachEvent( |
| 4508 | 'onpropertychange', |
| 4509 | this._syncA |
| 4510 | ); |
| 4511 | var e = |
| 4512 | window.MutationObserver || |
| 4513 | window.WebKitMutationObserver || |
| 4514 | window.MozMutationObserver; |
| 4515 | null != e |
| 4516 | ? ( ( this._observer = new e( function ( |
| 4517 | e |
| 4518 | ) { |
| 4519 | t._syncA(), t._syncS( null, e ); |
| 4520 | } ) ), |
| 4521 | this._observer.observe( |
| 4522 | this.$element[ 0 ], |
| 4523 | { |
| 4524 | attributes: ! 0, |
| 4525 | childList: ! 0, |
| 4526 | subtree: ! 1, |
| 4527 | } |
| 4528 | ) ) |
| 4529 | : this.$element[ 0 ].addEventListener && |
| 4530 | ( this.$element[ 0 ].addEventListener( |
| 4531 | 'DOMAttrModified', |
| 4532 | t._syncA, |
| 4533 | ! 1 |
| 4534 | ), |
| 4535 | this.$element[ 0 ].addEventListener( |
| 4536 | 'DOMNodeInserted', |
| 4537 | t._syncS, |
| 4538 | ! 1 |
| 4539 | ), |
| 4540 | this.$element[ 0 ].addEventListener( |
| 4541 | 'DOMNodeRemoved', |
| 4542 | t._syncS, |
| 4543 | ! 1 |
| 4544 | ) ); |
| 4545 | } ), |
| 4546 | ( d.prototype._registerDataEvents = function () { |
| 4547 | var n = this; |
| 4548 | this.dataAdapter.on( '*', function ( e, t ) { |
| 4549 | n.trigger( e, t ); |
| 4550 | } ); |
| 4551 | } ), |
| 4552 | ( d.prototype._registerSelectionEvents = function () { |
| 4553 | var n = this, |
| 4554 | r = [ 'toggle', 'focus' ]; |
| 4555 | this.selection.on( 'toggle', function () { |
| 4556 | n.toggleDropdown(); |
| 4557 | } ), |
| 4558 | this.selection.on( 'focus', function ( e ) { |
| 4559 | n.focus( e ); |
| 4560 | } ), |
| 4561 | this.selection.on( '*', function ( e, t ) { |
| 4562 | -1 === o.inArray( e, r ) && |
| 4563 | n.trigger( e, t ); |
| 4564 | } ); |
| 4565 | } ), |
| 4566 | ( d.prototype._registerDropdownEvents = function () { |
| 4567 | var n = this; |
| 4568 | this.dropdown.on( '*', function ( e, t ) { |
| 4569 | n.trigger( e, t ); |
| 4570 | } ); |
| 4571 | } ), |
| 4572 | ( d.prototype._registerResultsEvents = function () { |
| 4573 | var n = this; |
| 4574 | this.results.on( '*', function ( e, t ) { |
| 4575 | n.trigger( e, t ); |
| 4576 | } ); |
| 4577 | } ), |
| 4578 | ( d.prototype._registerEvents = function () { |
| 4579 | var n = this; |
| 4580 | this.on( 'open', function () { |
| 4581 | n.$container.addClass( |
| 4582 | 'select2-container--open' |
| 4583 | ); |
| 4584 | } ), |
| 4585 | this.on( 'close', function () { |
| 4586 | n.$container.removeClass( |
| 4587 | 'select2-container--open' |
| 4588 | ); |
| 4589 | } ), |
| 4590 | this.on( 'enable', function () { |
| 4591 | n.$container.removeClass( |
| 4592 | 'select2-container--disabled' |
| 4593 | ); |
| 4594 | } ), |
| 4595 | this.on( 'disable', function () { |
| 4596 | n.$container.addClass( |
| 4597 | 'select2-container--disabled' |
| 4598 | ); |
| 4599 | } ), |
| 4600 | this.on( 'blur', function () { |
| 4601 | n.$container.removeClass( |
| 4602 | 'select2-container--focus' |
| 4603 | ); |
| 4604 | } ), |
| 4605 | this.on( 'query', function ( t ) { |
| 4606 | n.isOpen() || n.trigger( 'open', {} ), |
| 4607 | this.dataAdapter.query( |
| 4608 | t, |
| 4609 | function ( e ) { |
| 4610 | n.trigger( 'results:all', { |
| 4611 | data: e, |
| 4612 | query: t, |
| 4613 | } ); |
| 4614 | } |
| 4615 | ); |
| 4616 | } ), |
| 4617 | this.on( 'query:append', function ( t ) { |
| 4618 | this.dataAdapter.query( |
| 4619 | t, |
| 4620 | function ( e ) { |
| 4621 | n.trigger( 'results:append', { |
| 4622 | data: e, |
| 4623 | query: t, |
| 4624 | } ); |
| 4625 | } |
| 4626 | ); |
| 4627 | } ), |
| 4628 | this.on( 'keypress', function ( e ) { |
| 4629 | var t = e.which; |
| 4630 | n.isOpen() |
| 4631 | ? t === r.ESC || |
| 4632 | t === r.TAB || |
| 4633 | ( t === r.UP && e.altKey ) |
| 4634 | ? ( n.close( e ), |
| 4635 | e.preventDefault() ) |
| 4636 | : t === r.ENTER |
| 4637 | ? ( n.trigger( |
| 4638 | 'results:select', |
| 4639 | {} |
| 4640 | ), |
| 4641 | e.preventDefault() ) |
| 4642 | : t === r.SPACE && e.ctrlKey |
| 4643 | ? ( n.trigger( |
| 4644 | 'results:toggle', |
| 4645 | {} |
| 4646 | ), |
| 4647 | e.preventDefault() ) |
| 4648 | : t === r.UP |
| 4649 | ? ( n.trigger( |
| 4650 | 'results:previous', |
| 4651 | {} |
| 4652 | ), |
| 4653 | e.preventDefault() ) |
| 4654 | : t === r.DOWN && |
| 4655 | ( n.trigger( |
| 4656 | 'results:next', |
| 4657 | {} |
| 4658 | ), |
| 4659 | e.preventDefault() ) |
| 4660 | : ( t === r.ENTER || |
| 4661 | t === r.SPACE || |
| 4662 | ( t === r.DOWN && |
| 4663 | e.altKey ) ) && |
| 4664 | ( n.open(), e.preventDefault() ); |
| 4665 | } ); |
| 4666 | } ), |
| 4667 | ( d.prototype._syncAttributes = function () { |
| 4668 | this.options.set( |
| 4669 | 'disabled', |
| 4670 | this.$element.prop( 'disabled' ) |
| 4671 | ), |
| 4672 | this.isDisabled() |
| 4673 | ? ( this.isOpen() && this.close(), |
| 4674 | this.trigger( 'disable', {} ) ) |
| 4675 | : this.trigger( 'enable', {} ); |
| 4676 | } ), |
| 4677 | ( d.prototype._isChangeMutation = function ( |
| 4678 | e, |
| 4679 | t |
| 4680 | ) { |
| 4681 | var n = ! 1, |
| 4682 | r = this; |
| 4683 | if ( |
| 4684 | ! e || |
| 4685 | ! e.target || |
| 4686 | 'OPTION' === e.target.nodeName || |
| 4687 | 'OPTGROUP' === e.target.nodeName |
| 4688 | ) { |
| 4689 | if ( t ) |
| 4690 | if ( |
| 4691 | t.addedNodes && |
| 4692 | 0 < t.addedNodes.length |
| 4693 | ) |
| 4694 | for ( |
| 4695 | var i = 0; |
| 4696 | i < t.addedNodes.length; |
| 4697 | i++ |
| 4698 | ) { |
| 4699 | t.addedNodes[ i ].selected && |
| 4700 | ( n = ! 0 ); |
| 4701 | } |
| 4702 | else |
| 4703 | t.removedNodes && |
| 4704 | 0 < t.removedNodes.length |
| 4705 | ? ( n = ! 0 ) |
| 4706 | : o.isArray( t ) && |
| 4707 | o.each( t, function ( e, t ) { |
| 4708 | if ( |
| 4709 | r._isChangeMutation( |
| 4710 | e, |
| 4711 | t |
| 4712 | ) |
| 4713 | ) |
| 4714 | return ! ( n = ! 0 ); |
| 4715 | } ); |
| 4716 | else n = ! 0; |
| 4717 | return n; |
| 4718 | } |
| 4719 | } ), |
| 4720 | ( d.prototype._syncSubtree = function ( e, t ) { |
| 4721 | var n = this._isChangeMutation( e, t ), |
| 4722 | r = this; |
| 4723 | n && |
| 4724 | this.dataAdapter.current( function ( e ) { |
| 4725 | r.trigger( 'selection:update', { |
| 4726 | data: e, |
| 4727 | } ); |
| 4728 | } ); |
| 4729 | } ), |
| 4730 | ( d.prototype.trigger = function ( e, t ) { |
| 4731 | var n = d.__super__.trigger, |
| 4732 | r = { |
| 4733 | open: 'opening', |
| 4734 | close: 'closing', |
| 4735 | select: 'selecting', |
| 4736 | unselect: 'unselecting', |
| 4737 | clear: 'clearing', |
| 4738 | }; |
| 4739 | if ( ( void 0 === t && ( t = {} ), e in r ) ) { |
| 4740 | var i = r[ e ], |
| 4741 | o = { |
| 4742 | prevented: ! 1, |
| 4743 | name: e, |
| 4744 | args: t, |
| 4745 | }; |
| 4746 | if ( ( n.call( this, i, o ), o.prevented ) ) |
| 4747 | return void ( t.prevented = ! 0 ); |
| 4748 | } |
| 4749 | n.call( this, e, t ); |
| 4750 | } ), |
| 4751 | ( d.prototype.toggleDropdown = function () { |
| 4752 | this.isDisabled() || |
| 4753 | ( this.isOpen() |
| 4754 | ? this.close() |
| 4755 | : this.open() ); |
| 4756 | } ), |
| 4757 | ( d.prototype.open = function () { |
| 4758 | this.isOpen() || |
| 4759 | this.isDisabled() || |
| 4760 | this.trigger( 'query', {} ); |
| 4761 | } ), |
| 4762 | ( d.prototype.close = function ( e ) { |
| 4763 | this.isOpen() && |
| 4764 | this.trigger( 'close', { |
| 4765 | originalEvent: e, |
| 4766 | } ); |
| 4767 | } ), |
| 4768 | ( d.prototype.isEnabled = function () { |
| 4769 | return ! this.isDisabled(); |
| 4770 | } ), |
| 4771 | ( d.prototype.isDisabled = function () { |
| 4772 | return this.options.get( 'disabled' ); |
| 4773 | } ), |
| 4774 | ( d.prototype.isOpen = function () { |
| 4775 | return this.$container.hasClass( |
| 4776 | 'select2-container--open' |
| 4777 | ); |
| 4778 | } ), |
| 4779 | ( d.prototype.hasFocus = function () { |
| 4780 | return this.$container.hasClass( |
| 4781 | 'select2-container--focus' |
| 4782 | ); |
| 4783 | } ), |
| 4784 | ( d.prototype.focus = function ( e ) { |
| 4785 | this.hasFocus() || |
| 4786 | ( this.$container.addClass( |
| 4787 | 'select2-container--focus' |
| 4788 | ), |
| 4789 | this.trigger( 'focus', {} ) ); |
| 4790 | } ), |
| 4791 | ( d.prototype.enable = function ( e ) { |
| 4792 | this.options.get( 'debug' ) && |
| 4793 | window.console && |
| 4794 | console.warn && |
| 4795 | console.warn( |
| 4796 | 'Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.' |
| 4797 | ), |
| 4798 | ( null != e && 0 !== e.length ) || |
| 4799 | ( e = [ ! 0 ] ); |
| 4800 | var t = ! e[ 0 ]; |
| 4801 | this.$element.prop( 'disabled', t ); |
| 4802 | } ), |
| 4803 | ( d.prototype.data = function () { |
| 4804 | this.options.get( 'debug' ) && |
| 4805 | 0 < arguments.length && |
| 4806 | window.console && |
| 4807 | console.warn && |
| 4808 | console.warn( |
| 4809 | 'Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.' |
| 4810 | ); |
| 4811 | var t = []; |
| 4812 | return ( |
| 4813 | this.dataAdapter.current( function ( e ) { |
| 4814 | t = e; |
| 4815 | } ), |
| 4816 | t |
| 4817 | ); |
| 4818 | } ), |
| 4819 | ( d.prototype.val = function ( e ) { |
| 4820 | if ( |
| 4821 | ( this.options.get( 'debug' ) && |
| 4822 | window.console && |
| 4823 | console.warn && |
| 4824 | console.warn( |
| 4825 | 'Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.' |
| 4826 | ), |
| 4827 | null == e || 0 === e.length ) |
| 4828 | ) |
| 4829 | return this.$element.val(); |
| 4830 | var t = e[ 0 ]; |
| 4831 | o.isArray( t ) && |
| 4832 | ( t = o.map( t, function ( e ) { |
| 4833 | return e.toString(); |
| 4834 | } ) ), |
| 4835 | this.$element |
| 4836 | .val( t ) |
| 4837 | .trigger( 'input' ) |
| 4838 | .trigger( 'change' ); |
| 4839 | } ), |
| 4840 | ( d.prototype.destroy = function () { |
| 4841 | this.$container.remove(), |
| 4842 | this.$element[ 0 ].detachEvent && |
| 4843 | this.$element[ 0 ].detachEvent( |
| 4844 | 'onpropertychange', |
| 4845 | this._syncA |
| 4846 | ), |
| 4847 | null != this._observer |
| 4848 | ? ( this._observer.disconnect(), |
| 4849 | ( this._observer = null ) ) |
| 4850 | : this.$element[ 0 ] |
| 4851 | .removeEventListener && |
| 4852 | ( this.$element[ 0 ].removeEventListener( |
| 4853 | 'DOMAttrModified', |
| 4854 | this._syncA, |
| 4855 | ! 1 |
| 4856 | ), |
| 4857 | this.$element[ 0 ].removeEventListener( |
| 4858 | 'DOMNodeInserted', |
| 4859 | this._syncS, |
| 4860 | ! 1 |
| 4861 | ), |
| 4862 | this.$element[ 0 ].removeEventListener( |
| 4863 | 'DOMNodeRemoved', |
| 4864 | this._syncS, |
| 4865 | ! 1 |
| 4866 | ) ), |
| 4867 | ( this._syncA = null ), |
| 4868 | ( this._syncS = null ), |
| 4869 | this.$element.off( '.select2' ), |
| 4870 | this.$element.attr( |
| 4871 | 'tabindex', |
| 4872 | u.GetData( |
| 4873 | this.$element[ 0 ], |
| 4874 | 'old-tabindex' |
| 4875 | ) |
| 4876 | ), |
| 4877 | this.$element.removeClass( |
| 4878 | 'select2-hidden-accessible' |
| 4879 | ), |
| 4880 | this.$element.attr( |
| 4881 | 'aria-hidden', |
| 4882 | 'false' |
| 4883 | ), |
| 4884 | u.RemoveData( this.$element[ 0 ] ), |
| 4885 | this.$element.removeData( 'select2' ), |
| 4886 | this.dataAdapter.destroy(), |
| 4887 | this.selection.destroy(), |
| 4888 | this.dropdown.destroy(), |
| 4889 | this.results.destroy(), |
| 4890 | ( this.dataAdapter = null ), |
| 4891 | ( this.selection = null ), |
| 4892 | ( this.dropdown = null ), |
| 4893 | ( this.results = null ); |
| 4894 | } ), |
| 4895 | ( d.prototype.render = function () { |
| 4896 | var e = o( |
| 4897 | '<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>' |
| 4898 | ); |
| 4899 | return ( |
| 4900 | e.attr( 'dir', this.options.get( 'dir' ) ), |
| 4901 | ( this.$container = e ), |
| 4902 | this.$container.addClass( |
| 4903 | 'select2-container--' + |
| 4904 | this.options.get( 'theme' ) |
| 4905 | ), |
| 4906 | u.StoreData( |
| 4907 | e[ 0 ], |
| 4908 | 'element', |
| 4909 | this.$element |
| 4910 | ), |
| 4911 | e |
| 4912 | ); |
| 4913 | } ), |
| 4914 | d |
| 4915 | ); |
| 4916 | } |
| 4917 | ), |
| 4918 | e.define( 'jquery-mousewheel', [ 'jquery' ], function ( e ) { |
| 4919 | return e; |
| 4920 | } ), |
| 4921 | e.define( |
| 4922 | 'jquery.select2', |
| 4923 | [ |
| 4924 | 'jquery', |
| 4925 | 'jquery-mousewheel', |
| 4926 | './select2/core', |
| 4927 | './select2/defaults', |
| 4928 | './select2/utils', |
| 4929 | ], |
| 4930 | function ( i, e, o, t, s ) { |
| 4931 | if ( null == i.fn.select2 ) { |
| 4932 | var a = [ 'open', 'close', 'destroy' ]; |
| 4933 | i.fn.select2 = function ( t ) { |
| 4934 | if ( 'object' == typeof ( t = t || {} ) ) |
| 4935 | return ( |
| 4936 | this.each( function () { |
| 4937 | var e = i.extend( ! 0, {}, t ); |
| 4938 | new o( i( this ), e ); |
| 4939 | } ), |
| 4940 | this |
| 4941 | ); |
| 4942 | if ( 'string' != typeof t ) |
| 4943 | throw new Error( |
| 4944 | 'Invalid arguments for Select2: ' + t |
| 4945 | ); |
| 4946 | var n, |
| 4947 | r = Array.prototype.slice.call( |
| 4948 | arguments, |
| 4949 | 1 |
| 4950 | ); |
| 4951 | return ( |
| 4952 | this.each( function () { |
| 4953 | var e = s.GetData( this, 'select2' ); |
| 4954 | null == e && |
| 4955 | window.console && |
| 4956 | console.error && |
| 4957 | console.error( |
| 4958 | "The select2('" + |
| 4959 | t + |
| 4960 | "') method was called on an element that is not using Select2." |
| 4961 | ), |
| 4962 | ( n = e[ t ].apply( e, r ) ); |
| 4963 | } ), |
| 4964 | -1 < i.inArray( t, a ) ? this : n |
| 4965 | ); |
| 4966 | }; |
| 4967 | } |
| 4968 | return ( |
| 4969 | null == i.fn.select2.defaults && |
| 4970 | ( i.fn.select2.defaults = t ), |
| 4971 | o |
| 4972 | ); |
| 4973 | } |
| 4974 | ), |
| 4975 | { define: e.define, require: e.require } |
| 4976 | ); |
| 4977 | } )(), |
| 4978 | t = e.require( 'jquery.select2' ); |
| 4979 | return ( u.fn.select2.amd = e ), t; |
| 4980 | } ); |
| 4981 |