ng-select2-component 16.0.0 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,13 @@
1
- import * as i4 from '@angular/cdk/overlay';
2
- import { CdkConnectedOverlay, OverlayModule } from '@angular/cdk/overlay';
3
1
  import * as i0 from '@angular/core';
4
- import { EventEmitter, signal, TemplateRef, numberAttribute, booleanAttribute, Component, Optional, Self, Attribute, Input, HostBinding, Output, ViewChild, ViewChildren, HostListener, Directive, NgModule } from '@angular/core';
5
- import { Subject } from 'rxjs';
2
+ import { Directive, input, numberAttribute, booleanAttribute, computed, output, viewChild, viewChildren, signal, TemplateRef, Component, ChangeDetectionStrategy, Optional, Self, Attribute, HostBinding, HostListener } from '@angular/core';
3
+ import { moveItemInArray, CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
4
+ import { ConnectionPositionPair, CdkConnectedOverlay, CdkOverlayOrigin } from '@angular/cdk/overlay';
5
+ import { NgTemplateOutlet } from '@angular/common';
6
+ import { toObservable } from '@angular/core/rxjs-interop';
7
+ import { InfiniteScrollDirective } from 'ngx-infinite-scroll';
8
+ import { Subject, Subscription } from 'rxjs';
6
9
  import * as i1 from '@angular/cdk/scrolling';
7
10
  import * as i2 from '@angular/forms';
8
- import { FormsModule, ReactiveFormsModule } from '@angular/forms';
9
- import * as i3 from '@angular/common';
10
- import { CommonModule } from '@angular/common';
11
- import * as i5 from 'ngx-infinite-scroll';
12
- import { InfiniteScrollModule } from 'ngx-infinite-scroll';
13
11
 
14
12
  const timeout = 200;
15
13
  const unicodePatterns = [
@@ -59,6 +57,24 @@ const unicodePatterns = [
59
57
  const defaultMinCountForSearch = 6;
60
58
  const protectRegexp = new RegExp('[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]', 'g');
61
59
 
60
+ class Select2Hint {
61
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2Hint, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
62
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.4", type: Select2Hint, isStandalone: true, selector: "select2-hint, ng-select2-hint", ngImport: i0 }); }
63
+ }
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2Hint, decorators: [{
65
+ type: Directive,
66
+ args: [{ selector: 'select2-hint, ng-select2-hint' }]
67
+ }] });
68
+
69
+ class Select2Label {
70
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2Label, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
71
+ /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.4", type: Select2Label, isStandalone: true, selector: "select2-label, ng-select2-label", ngImport: i0 }); }
72
+ }
73
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2Label, decorators: [{
74
+ type: Directive,
75
+ args: [{ selector: 'select2-label, ng-select2-label' }]
76
+ }] });
77
+
62
78
  class Select2Utils {
63
79
  static getOptionByValue(data, value) {
64
80
  if (Array.isArray(data)) {
@@ -76,7 +92,7 @@ class Select2Utils {
76
92
  }
77
93
  }
78
94
  }
79
- return undefined;
95
+ return null;
80
96
  }
81
97
  static getOptionsByValue(data, value, multiple) {
82
98
  if (multiple) {
@@ -99,41 +115,37 @@ class Select2Utils {
99
115
  if (options) {
100
116
  for (const option of options) {
101
117
  if (!option.disabled) {
102
- return option.value;
118
+ return option;
103
119
  }
104
120
  }
105
121
  }
106
122
  else {
107
123
  const option = groupOrOption;
108
124
  if (!option.disabled) {
109
- return option.value;
125
+ return option;
110
126
  }
111
127
  }
112
128
  }
113
129
  }
114
130
  return null;
115
131
  }
116
- static valueIsNotInFilteredData(filteredData, value) {
117
- if (Select2Utils.isNullOrUndefined(value)) {
132
+ static optionIsNotInFilteredData(filteredData, option) {
133
+ if (Select2Utils.isNullOrUndefined(option)) {
118
134
  return true;
119
135
  }
120
136
  for (const groupOrOption of filteredData) {
121
137
  const options = groupOrOption.options;
122
- if (options) {
123
- for (const option of options) {
124
- if (option.value === value) {
125
- return false;
126
- }
127
- }
138
+ if (options && options.includes(option)) {
139
+ return false;
128
140
  }
129
- else if (groupOrOption.value === value) {
141
+ else if (groupOrOption === option) {
130
142
  return false;
131
143
  }
132
144
  }
133
145
  return true;
134
146
  }
135
- static getPreviousOption(filteredData, hoveringValue) {
136
- let findIt = Select2Utils.isNullOrUndefined(hoveringValue);
147
+ static getPreviousOption(filteredData, hoveringOption) {
148
+ let findIt = Select2Utils.isNullOrUndefined(hoveringOption);
137
149
  for (let i = filteredData.length - 1; i >= 0; i--) {
138
150
  const groupOrOption = filteredData[i];
139
151
  const options = groupOrOption.options;
@@ -144,7 +156,7 @@ class Select2Utils {
144
156
  return option;
145
157
  }
146
158
  if (!findIt) {
147
- findIt = option.value === hoveringValue;
159
+ findIt = option === hoveringOption;
148
160
  }
149
161
  }
150
162
  }
@@ -154,42 +166,71 @@ class Select2Utils {
154
166
  return option;
155
167
  }
156
168
  if (!findIt) {
157
- findIt = option.value === hoveringValue;
169
+ findIt = option === hoveringOption;
158
170
  }
159
171
  }
160
172
  }
161
173
  return null;
162
174
  }
163
- static getNextOption(filteredData, hoveringValue) {
164
- let findIt = Select2Utils.isNullOrUndefined(hoveringValue);
165
- for (const groupOrOption of filteredData) {
166
- const options = groupOrOption.options;
167
- if (options) {
168
- for (const option of options) {
175
+ static getNextOption(filteredData, hoveringOption) {
176
+ let findIt = Select2Utils.isNullOrUndefined(hoveringOption);
177
+ if (filteredData) {
178
+ for (const groupOrOption of filteredData) {
179
+ const options = groupOrOption.options;
180
+ if (options) {
181
+ for (const option of options) {
182
+ if (findIt) {
183
+ if (!option.disabled && !option.hide) {
184
+ return option;
185
+ }
186
+ }
187
+ else if (!findIt) {
188
+ findIt = option === hoveringOption;
189
+ }
190
+ }
191
+ }
192
+ else {
193
+ const option = groupOrOption;
169
194
  if (findIt) {
170
195
  if (!option.disabled && !option.hide) {
171
196
  return option;
172
197
  }
173
198
  }
174
199
  else if (!findIt) {
175
- findIt = option.value === hoveringValue;
200
+ findIt = option === hoveringOption;
176
201
  }
177
202
  }
178
203
  }
179
- else {
180
- const option = groupOrOption;
181
- if (findIt) {
182
- if (!option.disabled && !option.hide) {
183
- return option;
184
- }
185
- }
186
- else if (!findIt) {
187
- findIt = option.value === hoveringValue;
188
- }
189
- }
190
204
  }
191
205
  return null;
192
206
  }
207
+ static getFirstOption(filteredData) {
208
+ const firstElement = filteredData[0];
209
+ if (this.isOption(firstElement)) {
210
+ return firstElement ?? null;
211
+ }
212
+ else {
213
+ return firstElement.options[0] ?? null;
214
+ }
215
+ }
216
+ static getLastOption(filteredData) {
217
+ const lastElement = filteredData.at(-1);
218
+ if (!lastElement) {
219
+ return null;
220
+ }
221
+ if (this.isOption(lastElement)) {
222
+ return lastElement;
223
+ }
224
+ else {
225
+ return lastElement.options.at(-1) ?? null;
226
+ }
227
+ }
228
+ static isGroup(element) {
229
+ return !!element.options;
230
+ }
231
+ static isOption(element) {
232
+ return !this.isGroup(element);
233
+ }
193
234
  static getReduceData(data, maxResults = 0) {
194
235
  if (maxResults > 0) {
195
236
  let counter = 0;
@@ -268,11 +309,8 @@ class Select2Utils {
268
309
  }
269
310
  return result;
270
311
  }
271
- static isSearchboxHiddex(data, minCountForSearch) {
272
- if (minCountForSearch === '' ||
273
- minCountForSearch === undefined ||
274
- minCountForSearch === null ||
275
- isNaN(+minCountForSearch)) {
312
+ static isSearchboxHidden(data, minCountForSearch) {
313
+ if (minCountForSearch === undefined || minCountForSearch === null || isNaN(+minCountForSearch)) {
276
314
  minCountForSearch = defaultMinCountForSearch;
277
315
  }
278
316
  const optionCount = Select2Utils.getOptionsCount(data);
@@ -332,68 +370,28 @@ class Select2Utils {
332
370
  }
333
371
 
334
372
  let nextUniqueId = 0;
335
- const displaySearchStatusList = ['default', 'hidden', 'always'];
373
+ const OPEN_KEYS = ['ArrowDown', 'ArrowUp', 'Enter', ' ', 'Home', 'End', 'PageUp', 'PageDown'];
374
+ const ON_OPEN_KEYS = ['Home', 'End', 'PageUp', 'PageDown'];
375
+ const CLOSE_KEYS = ['Escape', 'Tab', { key: 'ArrowUp', altKey: true }];
336
376
  class Select2 {
337
- /** data of options & optiongrps */
338
- set data(data) {
339
- this._data = data;
340
- this.updateFilteredData(true);
341
- }
342
- get multiple() {
343
- return this._multiple;
344
- }
345
- set multiple(value) {
346
- this._multiple = value;
347
- this.ngOnInit();
348
- }
349
- /** minimal data of show the search field */
350
- get minCountForSearch() {
351
- return this._minCountForSearch;
352
- }
353
- set minCountForSearch(value) {
354
- this._minCountForSearch = value;
355
- this.updateSearchBox();
356
- }
357
- /** Unique id of the element. */
358
- get id() {
359
- return this._id;
360
- }
361
- set id(value) {
362
- this._id = value || this._uid;
363
- }
364
- /** Whether selected items should be hidden. */
365
- get disabled() {
366
- return this._control ? this._control.disabled : this._disabled;
367
- }
368
- set disabled(value) {
369
- this._disabled = value;
370
- }
371
- /** The input element's value. */
372
- get value() {
373
- return this._value;
377
+ // ----------------------- HostBinding
378
+ get classMaterial() {
379
+ return this.styleMode() === 'material';
374
380
  }
375
- set value(value) {
376
- if (this.testValueChange(this._value, value)) {
377
- setTimeout(() => {
378
- if (this._value === undefined) {
379
- this._value = value ?? null;
380
- }
381
- this.writeValue(value ?? null);
382
- }, 10);
383
- }
381
+ get classNostyle() {
382
+ return this.styleMode() === 'noStyle';
384
383
  }
385
- /** Tab index for the select2 element. */
386
- get tabIndex() {
387
- return this.disabled ? -1 : this._tabIndex;
384
+ get classBorderless() {
385
+ return this.styleMode() === 'borderless';
388
386
  }
389
- set tabIndex(value) {
390
- this._tabIndex = value;
387
+ get select2above() {
388
+ return !this.overlay() ? this.listPosition() === 'above' : this._isAbobeOverlay();
391
389
  }
392
390
  get select2Options() {
393
- return this.multiple ? this.option : null;
391
+ return this.multiple() ? (this.selectedOption ?? []) : [];
394
392
  }
395
393
  get select2Option() {
396
- return this.multiple ? null : this.option;
394
+ return this.multiple() ? null : this.selectedOption;
397
395
  }
398
396
  get searchText() {
399
397
  return this.innerSearchText;
@@ -401,26 +399,32 @@ class Select2 {
401
399
  set searchText(text) {
402
400
  this.innerSearchText = text;
403
401
  }
404
- get ariaInvalid() {
405
- return this._isErrorState();
406
- }
407
- get classMaterial() {
408
- return this.styleMode === 'material';
409
- }
410
- get classNostyle() {
411
- return this.styleMode === 'noStyle';
412
- }
413
- get classBorderless() {
414
- return this.styleMode === 'borderless';
415
- }
416
- get select2above() {
417
- return !this.overlay ? this.listPosition === 'above' : this._isAbobeOverlay();
402
+ get disabledState() {
403
+ return this._control?.disabled ?? this._disabled;
418
404
  }
419
405
  get _positions() {
420
- return this.listPosition === 'auto' ? undefined : null;
406
+ switch (this.listPosition()) {
407
+ case 'above':
408
+ return [
409
+ new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }),
410
+ ];
411
+ case 'auto':
412
+ return [
413
+ new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
414
+ new ConnectionPositionPair({ originX: 'start', originY: 'top' }, { overlayX: 'start', overlayY: 'bottom' }),
415
+ ];
416
+ default:
417
+ return [
418
+ new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }),
419
+ ];
420
+ }
421
421
  }
422
422
  get resultsElement() {
423
- return this.resultContainer?.nativeElement;
423
+ return this.resultContainer()?.nativeElement;
424
+ }
425
+ /** Tab index for the element. */
426
+ get _tabIndex() {
427
+ return this.disabledState ? -1 : this.tabIndex();
424
428
  }
425
429
  constructor(_viewportRuler, _changeDetectorRef, _parentForm, _parentFormGroup, _control, tabIndex) {
426
430
  this._viewportRuler = _viewportRuler;
@@ -428,74 +432,146 @@ class Select2 {
428
432
  this._parentForm = _parentForm;
429
433
  this._parentFormGroup = _parentFormGroup;
430
434
  this._control = _control;
431
- this.minCharForSearch = 0;
432
- this.limitSelection = 0;
433
- this.listPosition = 'below';
434
- /** use the material style */
435
- this.overlay = false;
435
+ this._uid = `select2-${nextUniqueId++}`;
436
+ // ----------------------- signal-input
437
+ /** data of options & option groups */
438
+ this.data = input.required();
439
+ /** minimum characters to start filter search */
440
+ this.minCharForSearch = input(0, { transform: numberAttribute });
441
+ /** text placeholder */
442
+ this.displaySearchStatus = input(undefined);
443
+ /** text placeholder */
444
+ this.placeholder = input(undefined);
445
+ /** in multiple: maximum selection element (0 = no limit) */
446
+ this.limitSelection = input(0, { transform: numberAttribute });
447
+ /** dropdown position */
448
+ this.listPosition = input('below');
449
+ /** overlay with CDK Angular position */
450
+ this.overlay = input(false, { transform: booleanAttribute });
451
+ /** select one or more item */
452
+ this.multiple = input(false, { transform: booleanAttribute });
453
+ /** drag'n drop list of items in multiple */
454
+ this.multipleDrag = input(false, { transform: booleanAttribute });
436
455
  /** use the material style */
437
- this.styleMode = 'default';
456
+ this.styleMode = input('default');
457
+ /** message when no result */
458
+ this.noResultMessage = input();
438
459
  /** maximum results limit (0 = no limit) */
439
- this.maxResults = 0;
460
+ this.maxResults = input(0, { transform: numberAttribute });
440
461
  /** message when maximum results */
441
- this.maxResultsMessage = 'Too many results…';
462
+ this.maxResultsMessage = input('Too many results…');
442
463
  /** infinite scroll distance */
443
- this.infiniteScrollDistance = 1.5;
464
+ this.infiniteScrollDistance = input(1.5, { transform: numberAttribute });
444
465
  /** infinite scroll distance */
445
- this.infiniteScrollThrottle = 150;
466
+ this.infiniteScrollThrottle = input(150, { transform: numberAttribute });
446
467
  /** infinite scroll activated */
447
- this.infiniteScroll = false;
468
+ this.infiniteScroll = input(false, { transform: booleanAttribute });
448
469
  /** auto create if not exist */
449
- this.autoCreate = false;
470
+ this.autoCreate = input(false, { transform: booleanAttribute });
450
471
  /** no template for label selection */
451
- this.noLabelTemplate = false;
472
+ this.noLabelTemplate = input(false, { transform: booleanAttribute });
473
+ /** use it for change the pattern of the filter search */
474
+ this.editPattern = input(undefined);
475
+ /** template(s) for formatting */
476
+ this.templates = input(undefined);
477
+ /** template for formatting selected option */
478
+ this.templateSelection = input(undefined);
452
479
  /** the max height of the results container when opening the select */
453
- this.resultMaxHeight = '200px';
480
+ this.resultMaxHeight = input('200px');
454
481
  /** Active Search event */
455
- this.customSearchEnabled = false;
482
+ this.customSearchEnabled = input(false, { transform: booleanAttribute });
483
+ /** minimal data of show the search field */
484
+ this.minCountForSearch = input(undefined, { transform: numberAttribute });
485
+ /** Unique id of the element. */
486
+ this.id = input(this._uid);
487
+ /** Unique id of label element. */
488
+ this.idLabel = computed(() => `${this.id()}-label`);
489
+ /** Unique id of combo element. */
490
+ this.idCombo = computed(() => `${this.id()}-combo`);
491
+ /** Unique id of options element. */
492
+ this.idOptions = computed(() => `${this.id()}-options`);
493
+ /** Unique id of overlay element. */
494
+ this.idOverlay = computed(() => `${this.id()}-overlay`);
456
495
  /** Whether the element is required. */
457
- this.required = false;
496
+ this.required = input(false, { transform: booleanAttribute });
497
+ /** Whether selected items should be hidden. */
498
+ this.disabled = input(false, { transform: booleanAttribute });
458
499
  /** Whether items are hidden when has. */
459
- this.hideSelectedItems = false;
500
+ this.hideSelectedItems = input(false, { transform: booleanAttribute });
460
501
  /** Whether the element is readonly. */
461
- this.readonly = false;
502
+ this.readonly = input(false, { transform: booleanAttribute });
503
+ /** The input element's value. */
504
+ this.value = input();
505
+ /** Tab index for the select2 element. */
506
+ this.tabIndex = input(0, { transform: numberAttribute });
462
507
  /** reset with no selected value */
463
- this.resettable = false;
508
+ this.resettable = input(false, { transform: booleanAttribute });
509
+ /** selected value when × is clicked */
510
+ this.resetSelectedValue = input(undefined);
464
511
  /** grid: item by line
465
512
  * * 0 = no grid
466
513
  * * number = item by line (4)
467
514
  * * string = minimal size item (100px)
468
515
  */
469
- this.grid = '';
516
+ this.grid = input('');
517
+ /**
518
+ * Replace selection by a text
519
+ * * if string: `%size%` = total selected options
520
+ * * if function: juste show the string
521
+ */
522
+ this.selectionOverride = input(undefined);
470
523
  /** force selection on one line */
471
- this.selectionNoWrap = false;
524
+ this.selectionNoWrap = input(false, { transform: booleanAttribute });
472
525
  /** Add an option to select or remove all (if all is selected) */
473
- this.showSelectAll = false;
526
+ this.showSelectAll = input(false, { transform: booleanAttribute });
474
527
  /** Text for remove all options */
475
- this.removeAllText = 'Remove all';
528
+ this.removeAllText = input('Remove all');
476
529
  /** Text for select all options */
477
- this.selectAllText = 'Select all';
478
- this.update = new EventEmitter();
479
- this.autoCreateItem = new EventEmitter();
480
- this.open = new EventEmitter();
481
- this.close = new EventEmitter();
482
- this.focus = new EventEmitter();
483
- this.blur = new EventEmitter();
484
- this.search = new EventEmitter();
485
- this.scroll = new EventEmitter();
486
- this.removeOption = new EventEmitter();
487
- this.option = null;
530
+ this.selectAllText = input('Select all');
531
+ // -- WAI related inputs ---
532
+ /** title attribute applied to the input */
533
+ this.title = input();
534
+ /** aria-labelledby attribute applied to the input, to specify en external label */
535
+ this.ariaLabelledby = input();
536
+ /** aria-describedby attribute applied to the input */
537
+ this.ariaDescribedby = input();
538
+ /** aria-invalid attribute applied to the input, to force error state */
539
+ this.ariaInvalid = input(false, { transform: booleanAttribute });
540
+ /** description of the reset button when using 'resettable'. Default value : 'Reset' */
541
+ this.ariaResetButtonDescription = input('Reset');
542
+ // ----------------------- output
543
+ this.update = output();
544
+ this.autoCreateItem = output();
545
+ this.open = output();
546
+ this.close = output();
547
+ this.focus = output();
548
+ this.blur = output();
549
+ this.search = output();
550
+ this.scroll = output();
551
+ this.removeOption = output();
552
+ // ----------------------- signal viewChild
553
+ this.cdkConnectedOverlay = viewChild.required(CdkConnectedOverlay);
554
+ this.selection = viewChild.required('selection');
555
+ this.resultContainer = viewChild('results');
556
+ this.results = viewChildren('result');
557
+ this.searchInput = viewChild('searchInput');
558
+ this.dropdown = viewChild('dropdown');
559
+ // ----------------------- internal var
560
+ this.selectedOption = null;
488
561
  this.isOpen = false;
489
562
  /** Whether the element is focused or not. */
490
563
  this.focused = false;
491
564
  this.filteredData = signal(undefined);
492
- this.hoveringValue = null;
565
+ this.overlayWidth = '';
566
+ this.overlayHeight = '';
567
+ this.hoveringOption = signal(null);
568
+ this.hoveringOptionId = computed(() => this.getElementId(this.hoveringOption()));
493
569
  this.innerSearchText = '';
494
570
  this._stateChanges = new Subject();
571
+ this._data = [];
495
572
  this._disabled = false;
496
- this._multiple = false;
497
- this._uid = `select2-${nextUniqueId++}`;
498
573
  this._value = null;
574
+ this.toObservable = new Subscription();
499
575
  /** View -> model callback called when select has been touched */
500
576
  this._onTouched = () => {
501
577
  // do nothing
@@ -504,25 +580,43 @@ class Select2 {
504
580
  this._onChange = () => {
505
581
  // do nothing
506
582
  };
507
- // eslint-disable-next-line no-self-assign
508
- this.id = this.id;
509
- this._tabIndex = parseInt(tabIndex, 10) || 0;
510
583
  if (this._control) {
511
584
  this._control.valueAccessor = this;
512
585
  }
586
+ this.toObservable.add(toObservable(this.multiple).subscribe(_multiple => {
587
+ this.ngOnInit();
588
+ }));
589
+ this.toObservable.add(toObservable(this.data).subscribe(_data => {
590
+ this._data = _data;
591
+ this.updateFilteredData();
592
+ }));
593
+ this.toObservable.add(toObservable(this.minCountForSearch).subscribe(minCountForSearch => {
594
+ this.updateSearchBox();
595
+ }));
596
+ this.toObservable.add(toObservable(this.disabled).subscribe(disabled => {
597
+ this._disabled = disabled;
598
+ }));
599
+ this.toObservable.add(toObservable(this.value).subscribe(value => {
600
+ if (this.testValueChange(this._value, value)) {
601
+ if (this._value === undefined) {
602
+ this._value = value;
603
+ }
604
+ this.writeValue(value);
605
+ }
606
+ }));
513
607
  }
514
608
  clickDetection(e) {
515
- if (this.isOpen && focus) {
609
+ if (this.isOpen) {
516
610
  const target = e.target;
517
611
  if (!this.ifParentContainsClass(target, 'selection')) {
518
612
  if (!this.ifParentContainsClass(target, 'select2-dropdown')) {
519
613
  this.toggleOpenAndClose();
520
614
  }
521
- if (!this.overlay && !this.ifParentContainsId(target, this._id)) {
615
+ if (!this.overlay() && !this.ifParentContainsId(target, this.id())) {
522
616
  this.clickExit();
523
617
  }
524
618
  }
525
- else if (!this.ifParentContainsId(target, this._id)) {
619
+ else if (!this.ifParentContainsId(target, this.id())) {
526
620
  this.toggleOpenAndClose();
527
621
  this.clickExit();
528
622
  }
@@ -538,18 +632,18 @@ class Select2 {
538
632
  this.triggerRect();
539
633
  }
540
634
  });
541
- const option = Select2Utils.getOptionsByValue(this._data, this._control ? this._control.value : this.value, this.multiple);
635
+ const option = Select2Utils.getOptionsByValue(this._data, this._control ? this._control.value : this.value(), this.multiple());
542
636
  if (option !== null) {
543
- this.option = option;
637
+ this.selectedOption = option ?? null;
544
638
  }
545
639
  if (!Array.isArray(option)) {
546
- this.hoveringValue = this.value;
640
+ this.hoveringOption.set(Select2Utils.getOptionByValue(this._data, this.value));
547
641
  }
548
642
  this.updateSearchBox();
549
643
  }
550
644
  ngAfterViewInit() {
551
- this.cdkConnectedOverlay.positionChange.subscribe((posChange) => {
552
- if (this.listPosition === 'auto' &&
645
+ this.cdkConnectedOverlay().positionChange.subscribe((posChange) => {
646
+ if (this.listPosition() === 'auto' &&
553
647
  posChange.connectionPair?.originY &&
554
648
  this._overlayPosition !== posChange.connectionPair.originY) {
555
649
  this.triggerRect();
@@ -557,7 +651,7 @@ class Select2 {
557
651
  this._changeDetectorRef.detectChanges();
558
652
  }
559
653
  });
560
- this.selectionElement = this.selection.nativeElement;
654
+ this.selectionElement = this.selection().nativeElement;
561
655
  this.triggerRect();
562
656
  }
563
657
  ngDoCheck() {
@@ -566,33 +660,42 @@ class Select2 {
566
660
  if (this._triggerRect) {
567
661
  if (this.overlayWidth !== this._triggerRect.width) {
568
662
  this.overlayWidth = this._triggerRect.width;
663
+ this._changeDetectorRef.detectChanges();
569
664
  }
570
- if (this._dropdownRect?.height > 0 && this.overlayHeight !== this._dropdownRect.height) {
571
- this.overlayHeight = this.listPosition === 'auto' ? this._dropdownRect.height : 0;
665
+ if (this._dropdownRect &&
666
+ this._dropdownRect.height > 0 &&
667
+ this.overlayHeight !== this._dropdownRect.height) {
668
+ this.overlayHeight = this.listPosition() === 'auto' ? this._dropdownRect.height : 0;
669
+ this._changeDetectorRef.detectChanges();
572
670
  }
573
671
  }
574
672
  }
673
+ ngOnDestroy() {
674
+ this.toObservable.unsubscribe();
675
+ }
575
676
  updateSearchBox() {
576
- const hidden = this.customSearchEnabled
577
- ? false
578
- : Select2Utils.isSearchboxHiddex(this._data, this._minCountForSearch);
579
- if (this.isSearchboxHidden !== hidden) {
580
- this.isSearchboxHidden = hidden;
677
+ if (this.autoCreate() && !this.multiple()) {
678
+ this.isSearchboxHidden = false;
679
+ }
680
+ else {
681
+ const hidden = this.displaySearchStatus() === 'hidden' ||
682
+ (this.displaySearchStatus() !== 'always' &&
683
+ !this.customSearchEnabled() &&
684
+ Select2Utils.isSearchboxHidden(this._data, this.minCountForSearch()));
685
+ if (this.isSearchboxHidden !== hidden) {
686
+ this.isSearchboxHidden = hidden;
687
+ }
581
688
  }
582
- }
583
- hideSearch() {
584
- const displaySearchStatus = displaySearchStatusList.indexOf(this.displaySearchStatus) > -1 ? this.displaySearchStatus : 'default';
585
- return (displaySearchStatus === 'default' && this.isSearchboxHidden) || displaySearchStatus === 'hidden';
586
689
  }
587
690
  getOptionStyle(option) {
588
691
  return ('select2-results__option ' +
589
692
  (option.hide ? 'select2-results__option--hide ' : '') +
590
- (option.value === this.hoveringValue ? 'select2-results__option--highlighted ' : '') +
693
+ (option === this.hoveringOption() ? 'select2-results__option--highlighted ' : '') +
591
694
  (option.classes || ''));
592
695
  }
593
696
  mouseenter(option) {
594
697
  if (!option.disabled) {
595
- this.hoveringValue = option.value;
698
+ this.hoveringOption.set(option);
596
699
  }
597
700
  }
598
701
  click(option) {
@@ -601,14 +704,14 @@ class Select2 {
601
704
  }
602
705
  }
603
706
  reset(event) {
604
- // const test = Select2Utils.getOptionByValue(this._data, this.resetSelectedValue);
605
- // debugger;
606
- this.select(this.resetSelectedValue !== undefined
607
- ? (Select2Utils.getOptionByValue(this._data, this.resetSelectedValue) ?? null)
707
+ const resetSelectedValue = this.resetSelectedValue();
708
+ this.select(resetSelectedValue !== undefined
709
+ ? (Select2Utils.getOptionByValue(this._data, resetSelectedValue) ?? null)
608
710
  : null);
609
711
  if (event) {
610
712
  this.stopEvent(event);
611
713
  }
714
+ this._focus(true);
612
715
  }
613
716
  prevChange(event) {
614
717
  event.stopPropagation();
@@ -618,35 +721,36 @@ class Select2 {
618
721
  event.stopPropagation();
619
722
  }
620
723
  toggleOpenAndClose(focus = true, open, event) {
621
- if (this.disabled) {
724
+ if (this.disabledState || this.readonly()) {
622
725
  return;
623
726
  }
624
727
  this._focus(focus);
728
+ const onOpenAction = event && this._testKey(event, ON_OPEN_KEYS);
625
729
  const changeEmit = this.isOpen !== (open ?? !this.isOpen);
626
730
  this.isOpen = open ?? !this.isOpen;
627
731
  if (this.isOpen) {
628
732
  if (!this.isSearchboxHidden) {
629
733
  this.innerSearchText = '';
630
734
  this.updateFilteredData();
631
- this._focusSearchboxOrResultsElement(focus);
735
+ this._focusSearchbox(focus);
632
736
  }
633
737
  if (this.isSearchboxHidden && !changeEmit && event) {
634
738
  this.keyDown(event);
635
739
  }
636
740
  else {
637
- setTimeout(() => {
638
- if (this.option) {
639
- const option = Array.isArray(this.option) ? this.option[0] : this.option;
640
- this.updateScrollFromOption(option);
641
- }
642
- else if (this.resultsElement) {
643
- this.resultsElement.scrollTop = 0;
644
- }
645
- setTimeout(() => {
646
- this.triggerRect();
647
- this.cdkConnectedOverlay?.overlayRef?.updatePosition();
648
- }, 100);
649
- });
741
+ if (this.selectedOption) {
742
+ const option = Array.isArray(this.selectedOption) ? this.selectedOption[0] : this.selectedOption;
743
+ this.updateScrollFromOption(option);
744
+ }
745
+ else if (this.resultsElement) {
746
+ this.resultsElement.scrollTop = 0;
747
+ }
748
+ if (onOpenAction) {
749
+ this.keyDown(event);
750
+ }
751
+ this._changeDetectorRef.detectChanges();
752
+ this.triggerRect();
753
+ this.cdkConnectedOverlay().overlayRef?.updatePosition();
650
754
  }
651
755
  if (changeEmit) {
652
756
  this.open.emit(this);
@@ -658,47 +762,50 @@ class Select2 {
658
762
  this._changeDetectorRef.markForCheck();
659
763
  }
660
764
  hasTemplate(option, defaultValue, select = false) {
765
+ const templates = this.templates();
766
+ const templatesValue = this.templates();
661
767
  return ((select
662
- ? this.templates?.[option.templateSelectionId] instanceof TemplateRef ||
663
- this.templates?.[`${defaultValue}Selection`] instanceof TemplateRef ||
664
- this.templates?.[`templateSelection`] instanceof TemplateRef ||
665
- this.templateSelection instanceof TemplateRef
768
+ ? templates?.[option.templateSelectionId ?? ''] instanceof TemplateRef ||
769
+ templates?.[`${defaultValue}Selection`] instanceof TemplateRef ||
770
+ templates?.[`templateSelection`] instanceof TemplateRef ||
771
+ this.templateSelection() instanceof TemplateRef
666
772
  : false) ||
667
- this.templates?.[option.templateId] instanceof TemplateRef ||
668
- this.templates?.[defaultValue] instanceof TemplateRef ||
669
- this.templates?.['template'] instanceof TemplateRef ||
670
- this.templates instanceof TemplateRef ||
773
+ templatesValue?.[option.templateId ?? ''] instanceof TemplateRef ||
774
+ templatesValue?.[defaultValue] instanceof TemplateRef ||
775
+ templatesValue?.['template'] instanceof TemplateRef ||
776
+ templatesValue instanceof TemplateRef ||
671
777
  false);
672
778
  }
673
779
  getTemplate(option, defaultValue, select = false) {
780
+ const templates = this.templates();
781
+ const templatesValue = this.templates();
674
782
  return this.hasTemplate(option, defaultValue, select)
675
783
  ? (select
676
- ? this.templates?.[option.templateSelectionId] ||
677
- this.templates?.[`${defaultValue}Selection`] ||
678
- this.templates?.[`templateSelection`] ||
679
- this.templateSelection
784
+ ? templates?.[option.templateSelectionId ?? ''] ||
785
+ templates?.[`${defaultValue}Selection`] ||
786
+ templates?.[`templateSelection`] ||
787
+ this.templateSelection()
680
788
  : undefined) ||
681
- this.templates?.[option.templateId] ||
682
- this.templates?.[defaultValue] ||
683
- this.templates?.['template'] ||
684
- this.templates
789
+ templatesValue?.[option.templateId ?? ''] ||
790
+ templatesValue?.[defaultValue] ||
791
+ templatesValue?.['template'] ||
792
+ templatesValue
685
793
  : undefined;
686
794
  }
687
795
  triggerRect() {
688
- this._triggerRect = this.selectionElement.getBoundingClientRect();
689
- this._dropdownRect = this.dropdown?.nativeElement
690
- ? this.dropdown.nativeElement.getBoundingClientRect()
691
- : undefined;
796
+ this._triggerRect = this.selectionElement?.getBoundingClientRect();
797
+ const dropdown = this.dropdown();
798
+ this._dropdownRect = dropdown?.nativeElement ? dropdown.nativeElement.getBoundingClientRect() : undefined;
692
799
  }
693
800
  isNumber(o) {
694
801
  return !isNaN(o - 0) && o !== null && o !== '' && o !== false;
695
802
  }
696
803
  selectAll() {
697
- if (this.multiple) {
804
+ if (this.multiple()) {
698
805
  if (!this.selectAllTest()) {
699
806
  const options = [];
700
807
  this._data.forEach(e => {
701
- if (e.options) {
808
+ if (Select2Utils.isGroup(e)) {
702
809
  e.options.forEach(f => {
703
810
  if (!f.disabled && !f.hide) {
704
811
  options.push(f);
@@ -709,22 +816,22 @@ class Select2 {
709
816
  options.push(e);
710
817
  }
711
818
  });
712
- this.option = options;
713
- this.value = options.map(e => e.value);
819
+ this.selectedOption = options;
820
+ this.writeValue(options.map(e => e.value));
714
821
  }
715
822
  else {
716
- this.option = [];
717
- this.value = [];
823
+ this.selectedOption = [];
824
+ this.writeValue([]);
718
825
  }
719
826
  this.isOpen = false;
720
827
  this.close.emit(this);
721
828
  }
722
829
  }
723
830
  selectAllTest() {
724
- if (this.multiple && Array.isArray(this.option) && this.option.length) {
831
+ if (this.multiple() && Array.isArray(this.selectedOption) && this.selectedOption.length) {
725
832
  let options = 0;
726
833
  this._data.forEach(e => {
727
- if (e.options) {
834
+ if (Select2Utils.isGroup(e)) {
728
835
  e.options.forEach(f => {
729
836
  if (!f.disabled && !f.hide) {
730
837
  options++;
@@ -735,7 +842,7 @@ class Select2 {
735
842
  options++;
736
843
  }
737
844
  });
738
- return this.option.length === options;
845
+ return this.selectedOption.length === options;
739
846
  }
740
847
  return false;
741
848
  }
@@ -743,16 +850,15 @@ class Select2 {
743
850
  if (option.disabled) {
744
851
  return false;
745
852
  }
746
- return (!this.multiple ||
747
- !this.limitSelection ||
748
- (Array.isArray(this._value) && this._value.length < this.limitSelection));
853
+ const limitSelection = this.limitSelection();
854
+ return (!this.multiple() || !limitSelection || (Array.isArray(this._value) && this._value.length < limitSelection));
749
855
  }
750
856
  testValueChange(value1, value2) {
751
857
  if (((value1 === null || value1 === undefined) && (value2 === null || value2 === undefined)) ||
752
858
  value1 === value2) {
753
859
  return false;
754
860
  }
755
- if (this.multiple &&
861
+ if (this.multiple() &&
756
862
  value1?.length &&
757
863
  value2?.length &&
758
864
  value1.length === value2.length) {
@@ -766,72 +872,69 @@ class Select2 {
766
872
  }
767
873
  return true;
768
874
  }
769
- updateFilteredData(writeValue = false) {
770
- setTimeout(() => {
771
- let result = this._data;
772
- if (this.multiple && this.hideSelectedItems) {
773
- result = Select2Utils.getFilteredSelectedData(result, this.option);
774
- }
775
- if (!this.customSearchEnabled && this.searchText && this.searchText.length >= +this.minCharForSearch) {
776
- result = Select2Utils.getFilteredData(result, this.searchText, this.editPattern);
777
- }
778
- if (this.maxResults > 0) {
779
- const data = Select2Utils.getReduceData(result, +this.maxResults);
780
- result = data.result;
781
- this.maxResultsExceeded = data.reduce;
782
- }
783
- else {
784
- this.maxResultsExceeded = false;
785
- }
786
- if (Select2Utils.valueIsNotInFilteredData(result, this.hoveringValue)) {
787
- this.hoveringValue = Select2Utils.getFirstAvailableOption(result);
788
- }
789
- if (writeValue && this._previousNativeValue !== this._value) {
790
- // refresh current selected value
791
- this.writeValue(this._control ? this._control.value : this._value);
792
- }
793
- this.filteredData.set(result);
794
- // replace selected options when data change
795
- if (this.multiple && Array.isArray(this.option) && this.option.length) {
796
- const options = [];
797
- const value = this.option.map(e => e.value);
798
- this._data.forEach(e => {
799
- if (e.options) {
800
- e.options.forEach(f => {
801
- if (value.includes(f.value)) {
802
- options.push(f);
803
- }
804
- });
805
- }
806
- else if (value.includes(e.value)) {
807
- options.push(e);
808
- }
809
- });
810
- // preserve selection order
811
- this.option = this.option.map(e => options.find(f => f.value === e.value));
812
- }
813
- else if (!Array.isArray(this.option) && this.option) {
814
- let option = undefined;
815
- this._data.forEach(e => {
816
- if (e.options) {
817
- e.options.forEach(f => {
818
- if (this.option.value === f.value) {
819
- option = f;
820
- }
821
- });
822
- }
823
- else if (this.option.value === e.value) {
824
- option = e;
825
- }
826
- });
827
- this.option = option;
828
- }
829
- this._changeDetectorRef.detectChanges();
830
- });
875
+ updateFilteredData() {
876
+ let result = this._data;
877
+ if (this.multiple() && this.hideSelectedItems()) {
878
+ result = Select2Utils.getFilteredSelectedData(result, this.selectedOption);
879
+ }
880
+ if (!this.customSearchEnabled() && this.searchText && this.searchText.length >= +this.minCharForSearch()) {
881
+ result = Select2Utils.getFilteredData(result, this.searchText, this.editPattern());
882
+ }
883
+ if (this.maxResults() > 0) {
884
+ const data = Select2Utils.getReduceData(result, +this.maxResults());
885
+ result = data.result;
886
+ this.maxResultsExceeded = data.reduce;
887
+ }
888
+ else {
889
+ this.maxResultsExceeded = false;
890
+ }
891
+ if (Select2Utils.optionIsNotInFilteredData(result, this.hoveringOption())) {
892
+ this.hoveringOption.set(Select2Utils.getFirstAvailableOption(result));
893
+ }
894
+ this.filteredData.set(result);
895
+ // replace selected options when data change
896
+ if (this.multiple() && Array.isArray(this.selectedOption) && this.selectedOption.length) {
897
+ const options = [];
898
+ const value = this.selectedOption.map(e => e.value);
899
+ this._data.forEach(e => {
900
+ if (Select2Utils.isGroup(e)) {
901
+ e.options.forEach(f => {
902
+ if (value.includes(f.value)) {
903
+ options.push(f);
904
+ }
905
+ });
906
+ }
907
+ else if (value.includes(e.value)) {
908
+ options.push(e);
909
+ }
910
+ });
911
+ // preserve selection order
912
+ this.selectedOption = this.selectedOption.map(e => options.find(f => f.value === e.value));
913
+ }
914
+ else if (!Array.isArray(this.selectedOption) && this.selectedOption) {
915
+ let option = null;
916
+ this._data.forEach(e => {
917
+ if (Select2Utils.isGroup(e)) {
918
+ e.options.forEach(f => {
919
+ if (this.selectedOption.value === f.value) {
920
+ option = f;
921
+ }
922
+ });
923
+ }
924
+ else if (this.selectedOption.value === e.value) {
925
+ option = e;
926
+ }
927
+ });
928
+ this.selectedOption = option;
929
+ }
930
+ this._changeDetectorRef.detectChanges();
831
931
  }
832
932
  clickExit() {
833
933
  this._focus(false);
834
934
  }
935
+ isInSelect(elt) {
936
+ return this.ifParentContainsId(elt, this.id()) || this.ifParentContainsId(elt, this.idOverlay());
937
+ }
835
938
  ifParentContainsClass(element, cssClass) {
836
939
  return this.getParentElementByClass(element, cssClass) !== null;
837
940
  }
@@ -883,13 +986,13 @@ class Select2 {
883
986
  'select2-results__option',
884
987
  ]);
885
988
  }
886
- focusin() {
887
- if (!this.disabled) {
888
- this._focus(true);
989
+ focusin(options) {
990
+ if (!this.disabledState) {
991
+ this._focus(true, options);
889
992
  }
890
993
  }
891
- focusout() {
892
- if (this.selectionElement && !this.selectionElement.classList.contains('select2-focused')) {
994
+ focusout(event) {
995
+ if (!event.relatedTarget || !this.isInSelect(event.relatedTarget)) {
893
996
  this._focus(false);
894
997
  this._onTouched();
895
998
  }
@@ -897,8 +1000,9 @@ class Select2 {
897
1000
  select(option, emit = true) {
898
1001
  let value;
899
1002
  if (option !== null && option !== undefined) {
900
- if (this.multiple) {
901
- const options = this.option;
1003
+ if (this.multiple()) {
1004
+ this.selectedOption ??= [];
1005
+ const options = this.selectedOption;
902
1006
  const index = options.findIndex(op => op.value === option.value);
903
1007
  if (index === -1) {
904
1008
  options.push(option);
@@ -906,29 +1010,29 @@ class Select2 {
906
1010
  else {
907
1011
  options.splice(index, 1);
908
1012
  }
909
- value = this.option.map(op => op.value);
1013
+ value = this.selectedOption.map(op => op.value);
910
1014
  }
911
1015
  else {
912
- this.option = option;
1016
+ this.selectedOption = option;
913
1017
  if (this.isOpen) {
914
1018
  this.isOpen = false;
915
1019
  this.close.emit(this);
916
1020
  this.selectionElement?.focus();
917
1021
  }
918
- value = this.option.value;
1022
+ value = this.selectedOption.value;
919
1023
  if (!option && this._value === null) {
920
- this._value = value ?? null;
1024
+ this._value = value;
921
1025
  }
922
1026
  }
923
1027
  }
924
1028
  else {
925
1029
  // when remove value
926
- if (Array.isArray(this.option) ? this.option?.length : this.option) {
1030
+ if (Array.isArray(this.selectedOption) ? this.selectedOption?.length : this.selectedOption) {
927
1031
  value = '';
928
1032
  }
929
- this.option = null;
1033
+ this.selectedOption = null;
930
1034
  }
931
- if (this.multiple && this.hideSelectedItems) {
1035
+ if (this.multiple() && this.hideSelectedItems()) {
932
1036
  this.updateFilteredData();
933
1037
  }
934
1038
  emit &&= value !== undefined && this.testDiffValue(this._value, value);
@@ -936,13 +1040,9 @@ class Select2 {
936
1040
  this._onChange(value);
937
1041
  }
938
1042
  if (emit) {
939
- this._value = value ?? null;
1043
+ this.writeValue(value);
940
1044
  setTimeout(() => {
941
- this.update.emit({
942
- component: this,
943
- value: this._value,
944
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
945
- });
1045
+ this.updateEvent(value);
946
1046
  });
947
1047
  }
948
1048
  }
@@ -950,48 +1050,60 @@ class Select2 {
950
1050
  return Array.isArray(val1) ? val1?.length !== val2?.length : val1 !== val2;
951
1051
  }
952
1052
  keyDown(event, create = false) {
953
- if (create && this._testKey(event, ['Enter', 13])) {
1053
+ if (create && this._testKey(event, ['Enter'])) {
954
1054
  this.createAndAdd(event);
955
1055
  }
956
- else if (this._testKey(event, ['ArrowDown', 40])) {
1056
+ else if (this._testKey(event, [{ key: 'ArrowDown', altKey: false }])) {
957
1057
  this.moveDown();
958
1058
  event.preventDefault();
959
1059
  }
960
- else if (this._testKey(event, ['ArrowUp', 38])) {
1060
+ else if (this._testKey(event, [{ key: 'ArrowUp', altKey: false }])) {
961
1061
  this.moveUp();
962
1062
  event.preventDefault();
963
1063
  }
964
- else if (this._testKey(event, ['Enter', 13])) {
1064
+ else if (this._testKey(event, ['Home'])) {
1065
+ this.moveStart();
1066
+ event.preventDefault();
1067
+ }
1068
+ else if (this._testKey(event, ['End'])) {
1069
+ this.moveEnd();
1070
+ event.preventDefault();
1071
+ }
1072
+ else if (this._testKey(event, ['PageUp'])) {
1073
+ this.moveUp(10);
1074
+ event.preventDefault();
1075
+ }
1076
+ else if (this._testKey(event, ['PageDown'])) {
1077
+ this.moveDown(10);
1078
+ event.preventDefault();
1079
+ }
1080
+ else if (this._testKey(event, ['Enter']) || (this.isSearchboxHidden && this._testKey(event, [' ']))) {
965
1081
  this.selectByEnter();
966
1082
  event.preventDefault();
967
1083
  }
968
- else if (this._testKey(event, ['Escape', 'Tab', 9, 27]) && this.isOpen) {
1084
+ else if (this._testKey(event, CLOSE_KEYS) && this.isOpen) {
969
1085
  this.toggleOpenAndClose();
970
- this._focus(false);
1086
+ this._focus(true);
971
1087
  }
972
1088
  }
973
1089
  openKey(event, create = false) {
974
- if (create && this._testKey(event, ['Enter', 13])) {
1090
+ if (create && this._testKey(event, ['Enter'])) {
975
1091
  this.createAndAdd(event);
976
1092
  }
977
- else if (this._testKey(event, ['ArrowDown', 'ArrowUp', 'Enter', 40, 38, 13])) {
1093
+ else if (this._testKey(event, OPEN_KEYS)) {
978
1094
  this.toggleOpenAndClose(true, true, event);
979
1095
  event.preventDefault();
980
1096
  }
981
- else if (this._testKey(event, ['Escape', 'Tab', 9, 27])) {
1097
+ else if (this._testKey(event, CLOSE_KEYS)) {
982
1098
  if (this.isOpen) {
983
- this.toggleOpenAndClose(false);
1099
+ this.toggleOpenAndClose();
984
1100
  this._onTouched();
985
- event.preventDefault();
986
- }
987
- else {
988
- this._focus(false);
989
1101
  }
990
1102
  }
991
1103
  }
992
1104
  searchUpdate(e) {
993
1105
  this.searchText = e.target.value;
994
- if (!this.customSearchEnabled) {
1106
+ if (!this.customSearchEnabled()) {
995
1107
  this.updateFilteredData();
996
1108
  }
997
1109
  else {
@@ -1007,32 +1119,28 @@ class Select2 {
1007
1119
  });
1008
1120
  }
1009
1121
  }
1010
- trackBy(_index, item) {
1011
- return item.value;
1012
- }
1013
1122
  isSelected(option) {
1014
- return Select2Utils.isSelected(this.option, option, this.multiple);
1123
+ return Select2Utils.isSelected(this.selectedOption, option, this.multiple());
1015
1124
  }
1016
1125
  isDisabled(option) {
1017
1126
  return option.disabled ? 'true' : 'false';
1018
1127
  }
1019
1128
  removeSelection(e, option) {
1020
- Select2Utils.removeSelection(this.option, option);
1021
- if (this.multiple && this.hideSelectedItems) {
1129
+ if (this.readonly() || this.disabledState) {
1130
+ return;
1131
+ }
1132
+ Select2Utils.removeSelection(this.selectedOption, option);
1133
+ if (this.multiple() && this.hideSelectedItems()) {
1022
1134
  this.updateFilteredData();
1023
1135
  }
1024
- const value = this.option.map(op => op.value);
1136
+ const value = this.selectedOption.map(op => op.value);
1025
1137
  if (this._control) {
1026
1138
  this._onChange(value);
1027
1139
  }
1028
1140
  else {
1029
1141
  this._value = value ?? null;
1030
1142
  }
1031
- this.update.emit({
1032
- component: this,
1033
- value: value,
1034
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1035
- });
1143
+ this.updateEvent(value);
1036
1144
  this.removeOption.emit({
1037
1145
  component: this,
1038
1146
  value: value,
@@ -1041,7 +1149,10 @@ class Select2 {
1041
1149
  e.preventDefault();
1042
1150
  e.stopPropagation();
1043
1151
  if (this.isOpen) {
1044
- this._focusSearchboxOrResultsElement();
1152
+ this._focusSearchbox();
1153
+ }
1154
+ else {
1155
+ this._focus(true);
1045
1156
  }
1046
1157
  }
1047
1158
  /**
@@ -1049,7 +1160,11 @@ class Select2 {
1049
1160
  * @param value
1050
1161
  */
1051
1162
  writeValue(value) {
1163
+ this.selectedOption = null;
1052
1164
  this._setSelectionByValue(value);
1165
+ if (this.testValueChange(this._value, value)) {
1166
+ this._value = value;
1167
+ }
1053
1168
  }
1054
1169
  /**
1055
1170
  * Saves a callback function to be invoked when the select's value
@@ -1077,7 +1192,7 @@ class Select2 {
1077
1192
  * @param isDisabled
1078
1193
  */
1079
1194
  setDisabledState(isDisabled) {
1080
- this.disabled = isDisabled;
1195
+ this._disabled = isDisabled;
1081
1196
  }
1082
1197
  onScroll(way) {
1083
1198
  this.scroll.emit({
@@ -1087,6 +1202,15 @@ class Select2 {
1087
1202
  data: this._data,
1088
1203
  });
1089
1204
  }
1205
+ drop(event) {
1206
+ if (Array.isArray(this.selectedOption)) {
1207
+ moveItemInArray(this.selectedOption, event.previousIndex, event.currentIndex);
1208
+ const value = this.selectedOption.map(e => e.value);
1209
+ this.writeValue(value);
1210
+ this._value = value;
1211
+ this.updateEvent(value);
1212
+ }
1213
+ }
1090
1214
  _isErrorState() {
1091
1215
  const isInvalid = this._control?.invalid;
1092
1216
  const isTouched = this._control?.touched;
@@ -1094,18 +1218,64 @@ class Select2 {
1094
1218
  return !!(isInvalid && (isTouched || isSubmitted));
1095
1219
  }
1096
1220
  _selectionOverrideLabel() {
1097
- if (typeof this.selectionOverride === 'function') {
1098
- return this.selectionOverride({
1221
+ const selectionOverride = this.selectionOverride();
1222
+ if (typeof selectionOverride === 'function') {
1223
+ return selectionOverride({
1099
1224
  size: this.optionsSize(),
1100
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1225
+ options: Array.isArray(this.selectedOption)
1226
+ ? this.selectedOption
1227
+ : this.selectedOption
1228
+ ? [this.selectedOption]
1229
+ : null,
1101
1230
  });
1102
1231
  }
1103
- else if (typeof this.selectionOverride === 'string') {
1104
- return this.selectionOverride.replaceAll('%size%', `${this.optionsSize()}`);
1232
+ else if (typeof selectionOverride === 'string') {
1233
+ return selectionOverride.replaceAll('%size%', `${this.optionsSize()}`);
1105
1234
  }
1235
+ return undefined;
1236
+ }
1237
+ getElementId(elt) {
1238
+ if (!elt) {
1239
+ return null;
1240
+ }
1241
+ const [i, j] = this._getElementPath(elt);
1242
+ const toSuffix = (index) => (index !== undefined ? `-${index}` : '');
1243
+ return elt.id ?? `${this.id()}-option${toSuffix(i)}${toSuffix(j)}`;
1244
+ }
1245
+ _getElementPath(elt) {
1246
+ for (let i = 0; i < this._data.length; i++) {
1247
+ const optionOrGroup = this._data[i];
1248
+ if (optionOrGroup === elt) {
1249
+ return [i];
1250
+ }
1251
+ else if (Select2Utils.isGroup(optionOrGroup)) {
1252
+ const j = optionOrGroup.options.findIndex(o => o === elt);
1253
+ if (j >= 0) {
1254
+ return [i, j];
1255
+ }
1256
+ }
1257
+ }
1258
+ return [];
1259
+ }
1260
+ _toGroup(group) {
1261
+ return group;
1262
+ }
1263
+ _toOption(option) {
1264
+ return option;
1265
+ }
1266
+ updateEvent(value) {
1267
+ this.update.emit({
1268
+ component: this,
1269
+ value: value,
1270
+ options: Array.isArray(this.selectedOption)
1271
+ ? this.selectedOption
1272
+ : this.selectedOption
1273
+ ? [this.selectedOption]
1274
+ : null,
1275
+ });
1106
1276
  }
1107
1277
  optionsSize() {
1108
- return Array.isArray(this.option) ? this.option.length : this.option ? 1 : 0;
1278
+ return Array.isArray(this.selectedOption) ? this.selectedOption.length : this.selectedOption ? 1 : 0;
1109
1279
  }
1110
1280
  addItem(value) {
1111
1281
  let item = Select2Utils.getOptionByValue(this._data, value);
@@ -1121,27 +1291,43 @@ class Select2 {
1121
1291
  createAndAdd(e) {
1122
1292
  const value = e.target.value;
1123
1293
  if (value.trim()) {
1294
+ e.target.value = '';
1295
+ this.searchText = '';
1124
1296
  const item = this.addItem(value.trim());
1125
1297
  this.click(item);
1126
- e.target.value = '';
1298
+ this.updateFilteredData();
1127
1299
  this.autoCreateItem.emit({
1128
1300
  value: item,
1129
1301
  component: this,
1130
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1302
+ options: Array.isArray(this.selectedOption)
1303
+ ? this.selectedOption
1304
+ : this.selectedOption
1305
+ ? [this.selectedOption]
1306
+ : null,
1131
1307
  });
1132
1308
  }
1133
1309
  this.stopEvent(e);
1134
1310
  }
1135
- moveUp() {
1136
- this.updateScrollFromOption(Select2Utils.getPreviousOption(this.filteredData(), this.hoveringValue));
1311
+ moveUp(times = 1) {
1312
+ for (let i = 0; i < times; i++) {
1313
+ this.updateScrollFromOption(Select2Utils.getPreviousOption(this.filteredData(), this.hoveringOption()));
1314
+ }
1315
+ }
1316
+ moveDown(times = 1) {
1317
+ for (let i = 0; i < times; i++) {
1318
+ this.updateScrollFromOption(Select2Utils.getNextOption(this.filteredData(), this.hoveringOption()));
1319
+ }
1320
+ }
1321
+ moveStart() {
1322
+ this.updateScrollFromOption(Select2Utils.getFirstOption(this.filteredData()));
1137
1323
  }
1138
- moveDown() {
1139
- this.updateScrollFromOption(Select2Utils.getNextOption(this.filteredData(), this.hoveringValue));
1324
+ moveEnd() {
1325
+ this.updateScrollFromOption(Select2Utils.getLastOption(this.filteredData()));
1140
1326
  }
1141
1327
  updateScrollFromOption(option) {
1142
1328
  if (option) {
1143
- this.hoveringValue = option.value;
1144
- const domElement = this.results.find(r => r.nativeElement.innerText.trim() === option.label);
1329
+ this.hoveringOption.set(option);
1330
+ const domElement = this.results().find(r => r.nativeElement.innerText.trim() === option.label);
1145
1331
  if (domElement && this.resultsElement) {
1146
1332
  this.resultsElement.scrollTop = 0;
1147
1333
  const listClientRect = this.resultsElement.getBoundingClientRect();
@@ -1151,77 +1337,58 @@ class Select2 {
1151
1337
  }
1152
1338
  }
1153
1339
  selectByEnter() {
1154
- if (this.hoveringValue) {
1155
- const option = Select2Utils.getOptionByValue(this._data, this.hoveringValue);
1156
- this.select(option);
1340
+ if (this.hoveringOption()) {
1341
+ this.select(this.hoveringOption());
1157
1342
  }
1158
1343
  }
1159
1344
  _testKey(event, refs = []) {
1160
- return this._isKey(this._getKey(event), refs);
1161
- }
1162
- _getKey(event) {
1163
- let code;
1164
- if (event.key !== undefined) {
1165
- code = event.key;
1166
- }
1167
- else if (event['keyIdentifier'] !== undefined) {
1168
- code = event['keyIdentifier'];
1169
- }
1170
- else if (event['keyCode'] !== undefined) {
1171
- code = event['keyCode'];
1172
- }
1173
- else {
1174
- event.preventDefault();
1175
- }
1176
- return code;
1177
- }
1178
- _isKey(code, refs = []) {
1179
- return refs && refs.length > 0 ? refs.indexOf(code) !== -1 : false;
1345
+ const { key, altKey } = event;
1346
+ return refs.some(ref => {
1347
+ if (typeof ref === 'string') {
1348
+ return ref === key;
1349
+ }
1350
+ else {
1351
+ return key === ref.key && altKey === ref.altKey;
1352
+ }
1353
+ });
1180
1354
  }
1181
1355
  /**
1182
1356
  * Sets the selected option based on a value. If no option can be
1183
1357
  * found with the designated value, the select trigger is cleared.
1184
1358
  */
1185
1359
  _setSelectionByValue(value) {
1186
- if (this.option || (value !== undefined && value !== null)) {
1360
+ if (this.selectedOption || (value !== undefined && value !== null)) {
1187
1361
  const isArray = Array.isArray(value);
1188
- if (this.multiple && value && !isArray) {
1362
+ if (this.multiple() && value && !isArray) {
1189
1363
  throw new Error('Non array value.');
1190
1364
  }
1191
1365
  else if (this._data) {
1192
- if (this.multiple) {
1193
- this.option = []; // if value is null, then empty option and return
1366
+ if (this.multiple()) {
1367
+ if (!Array.isArray(this.selectedOption)) {
1368
+ this.selectedOption = []; // if value is null, then empty option and return
1369
+ }
1194
1370
  if (isArray) {
1195
1371
  // value is not null. Preselect value
1196
- const selectedValues = Select2Utils.getOptionsByValue(this._data, value, this.multiple);
1197
- selectedValues.map(item => this.select(item, false));
1372
+ Select2Utils.getOptionsByValue(this._data, value, this.multiple()).forEach(item => this.select(item, false));
1198
1373
  this._value ??= value;
1199
1374
  if (this.testDiffValue(this._value, value)) {
1200
- this.update.emit({
1201
- component: this,
1202
- value: value,
1203
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1204
- });
1375
+ this.updateEvent(value);
1205
1376
  }
1206
1377
  }
1207
1378
  else if (value === null) {
1208
1379
  // fix if value is null
1209
- this.value = [];
1380
+ this._value = [];
1210
1381
  this.reset();
1211
1382
  this.select(null, false);
1212
1383
  if (this.testDiffValue(this._value, value)) {
1213
1384
  this._value = [];
1214
- this.update.emit({
1215
- component: this,
1216
- value: this._value,
1217
- options: Array.isArray(this.option) ? this.option : this.option ? [this.option] : null,
1218
- });
1385
+ this.updateEvent(this._value);
1219
1386
  }
1220
1387
  }
1221
1388
  }
1222
1389
  else {
1223
- this._value ??= value;
1224
- this.select(Select2Utils.getOptionByValue(this._data, value));
1390
+ this._value = value;
1391
+ this.select(Select2Utils.getOptionByValue(this._data, this._value));
1225
1392
  }
1226
1393
  }
1227
1394
  else if (this._control) {
@@ -1232,25 +1399,44 @@ class Select2 {
1232
1399
  }
1233
1400
  /** Does some manual dirty checking on the native input `value` property. */
1234
1401
  _dirtyCheckNativeValue() {
1235
- const newValue = this.value;
1402
+ const newValue = this.value();
1236
1403
  if (this._previousNativeValue !== newValue) {
1237
1404
  this._previousNativeValue = newValue;
1238
1405
  this._stateChanges.next();
1239
1406
  }
1240
1407
  }
1241
- _focusSearchboxOrResultsElement(focus = true) {
1408
+ _focusSearchbox(focus = true) {
1242
1409
  if (!this.isSearchboxHidden) {
1243
1410
  setTimeout(() => {
1244
- if (this.searchInput && this.searchInput.nativeElement && focus) {
1245
- this.searchInput.nativeElement.focus();
1411
+ const searchInput = this.searchInput();
1412
+ if (searchInput && searchInput.nativeElement && focus) {
1413
+ searchInput.nativeElement.focus();
1246
1414
  }
1247
1415
  });
1248
- if (this.resultsElement && focus) {
1249
- this.resultsElement.focus();
1416
+ }
1417
+ }
1418
+ _focus(state, options) {
1419
+ if (state) {
1420
+ const eltToFocus = !this.isSearchboxHidden && this.isOpen
1421
+ ? this.searchInput().nativeElement
1422
+ : this.selection().nativeElement;
1423
+ if (document.activeElement !== eltToFocus) {
1424
+ eltToFocus.focus(options);
1250
1425
  }
1251
1426
  }
1427
+ else if (document.activeElement === this.selection()?.nativeElement ||
1428
+ document.activeElement === this.searchInput()?.nativeElement) {
1429
+ document.activeElement.blur();
1430
+ }
1431
+ this._updateFocusState(state);
1252
1432
  }
1253
- _focus(state) {
1433
+ _isAbobeOverlay() {
1434
+ const listPosition = this.listPosition();
1435
+ return this.overlay() && this._overlayPosition && listPosition === 'auto'
1436
+ ? this._overlayPosition === 'top'
1437
+ : listPosition === 'above';
1438
+ }
1439
+ _updateFocusState(state) {
1254
1440
  if (!state && this.focused) {
1255
1441
  this.focused = state;
1256
1442
  this.blur.emit(this);
@@ -1260,17 +1446,15 @@ class Select2 {
1260
1446
  this.focus.emit(this);
1261
1447
  }
1262
1448
  }
1263
- _isAbobeOverlay() {
1264
- return this.overlay && this._overlayPosition && this.listPosition === 'auto'
1265
- ? this._overlayPosition === 'top'
1266
- : this.listPosition === 'above';
1267
- }
1268
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Select2, deps: [{ token: i1.ViewportRuler }, { token: i0.ChangeDetectorRef }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component }); }
1269
- /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.0", type: Select2, isStandalone: false, selector: "select2", inputs: { data: "data", minCharForSearch: ["minCharForSearch", "minCharForSearch", numberAttribute], displaySearchStatus: "displaySearchStatus", placeholder: "placeholder", limitSelection: ["limitSelection", "limitSelection", numberAttribute], listPosition: "listPosition", multiple: ["multiple", "multiple", booleanAttribute], overlay: ["overlay", "overlay", booleanAttribute], styleMode: "styleMode", noResultMessage: "noResultMessage", maxResults: ["maxResults", "maxResults", numberAttribute], maxResultsMessage: "maxResultsMessage", infiniteScrollDistance: ["infiniteScrollDistance", "infiniteScrollDistance", numberAttribute], infiniteScrollThrottle: ["infiniteScrollThrottle", "infiniteScrollThrottle", numberAttribute], infiniteScroll: ["infiniteScroll", "infiniteScroll", booleanAttribute], autoCreate: ["autoCreate", "autoCreate", booleanAttribute], noLabelTemplate: ["noLabelTemplate", "noLabelTemplate", booleanAttribute], editPattern: "editPattern", templates: "templates", templateSelection: "templateSelection", resultMaxHeight: "resultMaxHeight", customSearchEnabled: ["customSearchEnabled", "customSearchEnabled", booleanAttribute], minCountForSearch: ["minCountForSearch", "minCountForSearch", numberAttribute], id: "id", required: ["required", "required", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], hideSelectedItems: ["hideSelectedItems", "hideSelectedItems", booleanAttribute], readonly: ["readonly", "readonly", booleanAttribute], value: "value", tabIndex: ["tabIndex", "tabIndex", numberAttribute], resettable: ["resettable", "resettable", booleanAttribute], resetSelectedValue: "resetSelectedValue", grid: "grid", selectionOverride: "selectionOverride", selectionNoWrap: ["selectionNoWrap", "selectionNoWrap", booleanAttribute], showSelectAll: ["showSelectAll", "showSelectAll", booleanAttribute], removeAllText: "removeAllText", selectAllText: "selectAllText" }, outputs: { update: "update", autoCreateItem: "autoCreateItem", open: "open", close: "close", focus: "focus", blur: "blur", search: "search", scroll: "scroll", removeOption: "removeOption" }, host: { listeners: { "document:click": "clickDetection($event)" }, properties: { "id": "this.id", "class.select2-selection-nowrap": "this.selectionNoWrap", "attr.aria-invalid": "this.ariaInvalid", "class.material": "this.classMaterial", "class.nostyle": "this.classNostyle", "class.borderless": "this.classBorderless", "class.select2-above": "this.select2above" } }, viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true }, { propertyName: "selection", first: true, predicate: ["selection"], descendants: true, static: true }, { propertyName: "resultContainer", first: true, predicate: ["results"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }, { propertyName: "results", predicate: ["result"], descendants: true }], ngImport: i0, template: "<div class=\"select2-label\" (click)=\"toggleOpenAndClose()\">\n <ng-content select=\"select2-label\"></ng-content>\n @if (required) {\n <span class=\"select2-required\"></span>\n }\n</div>\n\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n>\n <div\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (blur)=\"focusout()\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n role=\"combobox\"\n >\n @if (selectionOverride) {\n <span class=\"select2-selection__override\" [innerHTML]=\"_selectionOverrideLabel()\"></span>\n @if (\n !multiple && resettable && resetSelectedValue !== value && select2Option && !(disabled || readonly)\n ) {\n <span (click)=\"reset($event)\" class=\"select2-selection__reset\" role=\"presentation\">\u00D7</span>\n }\n } @else if (!multiple) {\n <span class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n @if (!select2Option) {\n <span>&nbsp;</span>\n }\n @if (select2Option) {\n @if (!hasTemplate(select2Option, 'option', true) || noLabelTemplate) {\n <span [innerHTML]=\"select2Option.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(select2Option, 'option', true); context: select2Option\"\n ></ng-container>\n }\n }\n <span\n [class.select2-selection__placeholder__option]=\"option\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n </span>\n @if (resettable && resetSelectedValue !== value && select2Option && !(disabled || readonly)) {\n <span (click)=\"reset($event)\" class=\"select2-selection__reset\" role=\"presentation\">\u00D7</span>\n }\n <span class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n } @else {\n <ul class=\"select2-selection__rendered\">\n @if (!autoCreate) {\n <span\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n }\n @for (op of option || []; track trackBy($index, op)) {\n <li\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (keydown.enter)=\"removeSelection($event, op)\"\n >\n @if (!(disabled || readonly)) {\n <span\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n >\u00D7</span\n >\n }\n @if (!hasTemplate(op, 'option', true) || noLabelTemplate) {\n <span [innerHTML]=\"op.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(op, 'option', true); context: op\"\n ></ng-container>\n }\n </li>\n }\n @if (autoCreate) {\n <li\n class=\"select2-selection__auto-create\"\n (focus)=\"stopEvent($event)\"\n (blur)=\"stopEvent($event)\"\n >\n <input\n [id]=\"id + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n }\n </ul>\n }\n </div>\n </div>\n @if (!overlay) {\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n }\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n [class.select2-style-borderless]=\"styleMode === 'borderless'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"hideSearch()\">\n <input\n #searchInput\n [id]=\"id + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event, autoCreate)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n />\n </div>\n\n <div class=\"select2-results\">\n <ul\n #results\n class=\"select2-results__options\"\n [class.select2-grid]=\"grid && isNumber(grid)\"\n [class.select2-grid-auto]=\"grid && !isNumber(grid)\"\n [style.max-height]=\"resultMaxHeight\"\n [style.--grid-size]=\"grid || null\"\n role=\"tree\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n @if (showSelectAll && multiple) {\n <li\n class=\"select2-results__option select2-selectall\"\n (click)=\"selectAll()\"\n tabindex=\"1\"\n aria-selected\n >\n <div class=\"select2-label-content\">\n {{ selectAllTest() ? removeAllText : selectAllText }}\n </div>\n </li>\n }\n\n @for (groupOrOption of filteredData(); track trackBy(i, groupOrOption); let i = $index) {\n @if (groupOrOption.options !== undefined) {\n <li class=\"select2-results__option\" role=\"group\">\n @if (!hasTemplate(groupOrOption, 'group')) {\n <strong\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'group'); context: groupOrOption\"\n >\n </ng-container>\n }\n <ul class=\"select2-results__options select2-results__options--nested\">\n @for (option of groupOrOption.options; track trackBy(j, option); let j = $index) {\n <li\n #result\n [id]=\"option.id || id + '-option-' + i + '-' + j\"\n [class]=\"getOptionStyle(option)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div class=\"select2-label-content\" [innerHTML]=\"option.label\"></div>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n }\n </li>\n }\n </ul>\n </li>\n } @else {\n <li\n #result\n [id]=\"groupOrOption.id || id + '-option-' + i\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n @if (!hasTemplate(groupOrOption, 'option')) {\n <div [innerHTML]=\"groupOrOption.label\" class=\"select2-label-content\"></div>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n }\n </li>\n\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n }\n }\n @if (!filteredData()?.length && noResultMessage) {\n <li class=\"select2-no-result select2-results__option\" [innerHTML]=\"noResultMessage\"></li>\n }\n @if (maxResultsExceeded) {\n <li\n class=\"select2-too-much-result select2-results__option\"\n [innerHTML]=\"maxResultsMessage\"\n ></li>\n }\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{position:absolute;width:0px;opacity:0}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding:var(--select2-selection-padding, 0 0 0 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;overflow:hidden;padding-left:8px;padding-bottom:2px;text-overflow:ellipsis;white-space:nowrap;flex-wrap:wrap;gap:var(--select2-selection-multiple-gap, 2px 5px)}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{flex:1 1 150px;min-width:150px;display:flex}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{width:100%;border:0}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{border:0;outline:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:var(--select2-dropdown-background, white);border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);box-sizing:border-box;display:block;position:absolute;width:100%;z-index:1051;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:var(--select2-option-padding, 6px);-webkit-user-select:none;user-select:none;color:var(--select2-option-text-color, #000)}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{width:100%;opacity:1}.select2-container--open .select2-dropdown{overflow:auto;height:auto}.select2-container--open .select2-dropdown--above{border-bottom:var(--select2-dropdown-above-border-bottom, none);border-bottom-left-radius:var(--select2-dropdown-above-border-bottom-left-radius, 0);border-bottom-right-radius:var(--select2-dropdown-above-border-bottom-right-radius, 0);bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:var(--select2-dropdown-below-border-top, none);border-top-left-radius:var(--select2-dropdown-below-border-top-left-radius, 0);border-top-right-radius:var(--select2-dropdown-below-border-top-right-radius, 0)}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:var(--select2-selection-line-height, 28px)}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;width:20px;align-items:center;justify-content:center}.select2-container--default .select2-selection--single .select2-selection__arrow:before{content:\" \";border-color:var(--select2-arrow-color, #888) transparent;border-style:solid;border-width:5px 4px 0;height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-color:transparent transparent var(--select2-arrow-color, #888);border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:text;display:flex}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;box-sizing:border-box;list-style:none;margin:0;padding:var(--select2-selection-multiple-padding, 2px 5px);width:100%;min-height:1em;align-items:center}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none;line-height:var(--select2-selection-choice-line-height, 20px)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;width:100%;color:var(--select2-placeholder-color, #999);margin-top:5px;float:left;overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{color:var(--select2-selection-choice-text-color, #000);background:var(--select2-selection-choice-background, #e4e4e4);border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:default;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:var(--select2-selection-choice-close-color, #999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default.select2-container--disabled .select2-selection--multiple{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);background:1px solid var(--select2-search-background, #fff);border-radius:var(--select2-search-border-radius, 0px)}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0;grid-column:col-start/col-end}.select2-container--default .select2-results__option[aria-disabled=true]{color:var(--select2-option-disabled-text-color, #999);background:var(--select2-option-disabled-background, transparent)}.select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-option-selected-text-color, #000);background:var(--select2-option-selected-background, #ddd)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;color:var(--select2-option-group-text-color, gray);background:var(--select2-option-group-background, transparent)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}.select2-grid,.select2-grid ul{display:grid;grid-template-columns:[col-start] repeat(var(--grid-size),1fr) [col-end]}.select2-grid-auto,.select2-grid-auto ul{display:grid;grid-template-columns:[col-start] repeat(auto-fill,minmax(var(--grid-size, 100px),1fr)) [col-end]}.select2-container--default .select2-grid ul,.select2-container--default .select2-grid-auto ul{padding-left:var(--select2-option-padding, 6px)}.select2-container--default .select2-grid ul .select2-results__group,.select2-container--default .select2-grid-auto ul .select2-results__group{padding-left:0}.select2-container--default .select2-grid ul .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{padding-left:var(--select2-option-padding, 6px)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{background:transparent;border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}:host.borderless .select2-selection--single,:host.borderless .select2-selection--multiple{background:transparent;border-color:transparent}:host.borderless .select2-container--default .select2-focused .select2-selection--single,:host.borderless .select2-container--default .select2-focused .select2-selection--multiple,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.select2-selection-nowrap .select2-selection--single.select2-selection,:host.select2-selection-nowrap .select2-selection--single.select2-selection span,:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection span,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{display:flex;flex-wrap:nowrap}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{padding:.4375em 0;border-top:.84375em solid transparent;display:inline-flex;align-items:baseline;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{width:100%;border:0;border-radius:0;height:24px;box-sizing:border-box}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{content:\" \";display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);height:1px;width:100%}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{content:\" \";display:block;position:absolute;bottom:1.63em;background:var(--select2-material-underline-active, #5a419e);height:2px;width:0%;left:50%;transition:none}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38));transition:transform .3s;position:absolute;transform-origin:0 21px;left:0;top:20px}:host.material .select2-container--default .select2-container--open{left:0;bottom:1.6em}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%;left:0%}:host.material .select2-container--default .select2-dropdown{border-radius:0;border:0;box-shadow:0 5px 5px #00000080}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);font-size:75%;color:var(--select2-hint-text-color, #888)}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}::ng-deep .cdk-overlay-container .select2-style-borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"], dependencies: [{ kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i4.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: i4.CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: i5.InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }] }); }
1449
+ /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2, deps: [{ token: i1.ViewportRuler }, { token: i0.ChangeDetectorRef }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: 'tabindex', attribute: true }], target: i0.ɵɵFactoryTarget.Component }); }
1450
+ /** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: Select2, isStandalone: true, selector: "select2, ng-select2", inputs: { data: { classPropertyName: "data", publicName: "data", isSignal: true, isRequired: true, transformFunction: null }, minCharForSearch: { classPropertyName: "minCharForSearch", publicName: "minCharForSearch", isSignal: true, isRequired: false, transformFunction: null }, displaySearchStatus: { classPropertyName: "displaySearchStatus", publicName: "displaySearchStatus", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, limitSelection: { classPropertyName: "limitSelection", publicName: "limitSelection", isSignal: true, isRequired: false, transformFunction: null }, listPosition: { classPropertyName: "listPosition", publicName: "listPosition", isSignal: true, isRequired: false, transformFunction: null }, overlay: { classPropertyName: "overlay", publicName: "overlay", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, multipleDrag: { classPropertyName: "multipleDrag", publicName: "multipleDrag", isSignal: true, isRequired: false, transformFunction: null }, styleMode: { classPropertyName: "styleMode", publicName: "styleMode", isSignal: true, isRequired: false, transformFunction: null }, noResultMessage: { classPropertyName: "noResultMessage", publicName: "noResultMessage", isSignal: true, isRequired: false, transformFunction: null }, maxResults: { classPropertyName: "maxResults", publicName: "maxResults", isSignal: true, isRequired: false, transformFunction: null }, maxResultsMessage: { classPropertyName: "maxResultsMessage", publicName: "maxResultsMessage", isSignal: true, isRequired: false, transformFunction: null }, infiniteScrollDistance: { classPropertyName: "infiniteScrollDistance", publicName: "infiniteScrollDistance", isSignal: true, isRequired: false, transformFunction: null }, infiniteScrollThrottle: { classPropertyName: "infiniteScrollThrottle", publicName: "infiniteScrollThrottle", isSignal: true, isRequired: false, transformFunction: null }, infiniteScroll: { classPropertyName: "infiniteScroll", publicName: "infiniteScroll", isSignal: true, isRequired: false, transformFunction: null }, autoCreate: { classPropertyName: "autoCreate", publicName: "autoCreate", isSignal: true, isRequired: false, transformFunction: null }, noLabelTemplate: { classPropertyName: "noLabelTemplate", publicName: "noLabelTemplate", isSignal: true, isRequired: false, transformFunction: null }, editPattern: { classPropertyName: "editPattern", publicName: "editPattern", isSignal: true, isRequired: false, transformFunction: null }, templates: { classPropertyName: "templates", publicName: "templates", isSignal: true, isRequired: false, transformFunction: null }, templateSelection: { classPropertyName: "templateSelection", publicName: "templateSelection", isSignal: true, isRequired: false, transformFunction: null }, resultMaxHeight: { classPropertyName: "resultMaxHeight", publicName: "resultMaxHeight", isSignal: true, isRequired: false, transformFunction: null }, customSearchEnabled: { classPropertyName: "customSearchEnabled", publicName: "customSearchEnabled", isSignal: true, isRequired: false, transformFunction: null }, minCountForSearch: { classPropertyName: "minCountForSearch", publicName: "minCountForSearch", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, hideSelectedItems: { classPropertyName: "hideSelectedItems", publicName: "hideSelectedItems", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, tabIndex: { classPropertyName: "tabIndex", publicName: "tabIndex", isSignal: true, isRequired: false, transformFunction: null }, resettable: { classPropertyName: "resettable", publicName: "resettable", isSignal: true, isRequired: false, transformFunction: null }, resetSelectedValue: { classPropertyName: "resetSelectedValue", publicName: "resetSelectedValue", isSignal: true, isRequired: false, transformFunction: null }, grid: { classPropertyName: "grid", publicName: "grid", isSignal: true, isRequired: false, transformFunction: null }, selectionOverride: { classPropertyName: "selectionOverride", publicName: "selectionOverride", isSignal: true, isRequired: false, transformFunction: null }, selectionNoWrap: { classPropertyName: "selectionNoWrap", publicName: "selectionNoWrap", isSignal: true, isRequired: false, transformFunction: null }, showSelectAll: { classPropertyName: "showSelectAll", publicName: "showSelectAll", isSignal: true, isRequired: false, transformFunction: null }, removeAllText: { classPropertyName: "removeAllText", publicName: "removeAllText", isSignal: true, isRequired: false, transformFunction: null }, selectAllText: { classPropertyName: "selectAllText", publicName: "selectAllText", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, ariaInvalid: { classPropertyName: "ariaInvalid", publicName: "ariaInvalid", isSignal: true, isRequired: false, transformFunction: null }, ariaResetButtonDescription: { classPropertyName: "ariaResetButtonDescription", publicName: "ariaResetButtonDescription", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { update: "update", autoCreateItem: "autoCreateItem", open: "open", close: "close", focus: "focus", blur: "blur", search: "search", scroll: "scroll", removeOption: "removeOption" }, host: { listeners: { "document:click": "clickDetection($event)" }, properties: { "id": "id()", "class.select2-selection-nowrap": "selectionNoWrap()", "class.material": "this.classMaterial", "class.nostyle": "this.classNostyle", "class.borderless": "this.classBorderless", "class.select2-above": "this.select2above" } }, viewQueries: [{ propertyName: "cdkConnectedOverlay", first: true, predicate: CdkConnectedOverlay, descendants: true, isSignal: true }, { propertyName: "selection", first: true, predicate: ["selection"], descendants: true, isSignal: true }, { propertyName: "resultContainer", first: true, predicate: ["results"], descendants: true, isSignal: true }, { propertyName: "results", predicate: ["result"], descendants: true, isSignal: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true, isSignal: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, isSignal: true }], ngImport: i0, template: "<label class=\"select2-label\" (click)=\"toggleOpenAndClose()\" [id]=\"idLabel()\">\n <ng-content select=\"select2-label, ng-select2-label\"></ng-content>\n @if (required()) {\n <span class=\"select2-required\" aria-hidden=\"true\"></span>\n }\n</label>\n\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled()\"\n [class.select2-container--readonly]=\"readonly()\"\n>\n <div\n [id]=\"idCombo()\"\n role=\"combobox\"\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? _tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-expanded]=\"isOpen\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"idOptions()\"\n [attr.aria-activedescendant]=\"isOpen ? hoveringOptionId() : null\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.title]=\"title()\"\n [attr.aria-invalid]=\"_isErrorState() || ariaInvalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggleOpenAndClose(); $event.stopPropagation()\"\n (focus)=\"focusin()\"\n (focusout)=\"focusout($event)\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple()\"\n [class.select2-selection--single]=\"!multiple()\"\n >\n @if (selectionOverride()) {\n <span class=\"select2-selection__override\" [innerHTML]=\"_selectionOverrideLabel()\"></span>\n\n @if (\n resettable() &&\n !(disabled() || readonly()) &&\n resetSelectedValue() !== _value &&\n ((!multiple() && select2Option) || (multiple() && select2Options.length > 0))\n ) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n } @else if (!multiple()) {\n <span class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n @if (!select2Option) {\n <span>&nbsp;</span>\n }\n @if (select2Option) {\n @if (!hasTemplate(select2Option, 'option', true) || noLabelTemplate()) {\n <span [innerHTML]=\"select2Option.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(select2Option, 'option', true); context: select2Option\"\n ></ng-container>\n }\n }\n <span\n [class.select2-selection__placeholder__option]=\"selectedOption\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder() }}</span\n >\n </span>\n\n @if (resettable() && resetSelectedValue() !== _value && select2Option && !(disabled() || readonly())) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n <span class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n } @else {\n <ul\n class=\"select2-selection__rendered\"\n cdkDropList\n cdkDropListOrientation=\"mixed\"\n [cdkDropListDisabled]=\"!multipleDrag()\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @if (!autoCreate()) {\n <span\n [class.select2-selection__placeholder__option]=\"select2Options.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder() }}</span\n >\n }\n @for (op of selectedOption || []; track op) {\n <li\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (focus)=\"_updateFocusState(true)\"\n (keydown.enter)=\"removeSelection($event, op)\"\n cdkDrag\n\n >\n @if (!(disabled() || readonly())) {\n <span\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n aria-hidden=\"true\"\n >\u00D7</span\n >\n }\n @if (!hasTemplate(op, 'option', true) || noLabelTemplate()) {\n <span [innerHTML]=\"op.label\"></span>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(op, 'option', true); context: op\"></ng-container>\n }\n </li>\n }\n @if (autoCreate()) {\n <li class=\"select2-selection__auto-create\" (focus)=\"stopEvent($event)\" (blur)=\"stopEvent($event)\">\n <input\n [id]=\"id() + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n }\n </ul>\n @if (resettable() && $any(selectedOption)?.length > 0 && !(disabled() || readonly())) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n }\n </div>\n </div>\n @if (!overlay()) {\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n }\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint, ng-select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay()\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n [id]=\"idOverlay()\"\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay()\"\n [class.select2-position-auto]=\"listPosition() === 'auto'\"\n [class.select2-style-borderless]=\"styleMode() === 'borderless'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"isSearchboxHidden\">\n <input\n #searchInput\n [id]=\"id() + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event, autoCreate())\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"combobox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? _tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"idOptions()\"\n aria-expanded=\"true\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n />\n </div>\n\n <div class=\"select2-results\">\n <ul\n [id]=\"idOptions()\"\n #results\n class=\"select2-results__options\"\n [class.select2-grid]=\"grid() && isNumber(grid())\"\n [class.select2-grid-auto]=\"grid() && !isNumber(grid())\"\n [style.max-height]=\"resultMaxHeight()\"\n [style.--grid-size]=\"grid() || null\"\n role=\"listbox\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll() && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance()\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle()\"\n [infiniteScrollContainer]=\"results\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-multiselectable]=\"multiple()\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n @if (showSelectAll() && multiple()) {\n <li class=\"select2-results__option select2-selectall\" (click)=\"selectAll()\" tabindex=\"1\" aria-selected>\n <div class=\"select2-label-content\">\n {{ selectAllTest() ? removeAllText() : selectAllText() }}\n </div>\n </li>\n }\n\n @for (groupOrOption of filteredData(); track groupOrOption; let i = $index) {\n @let group = _toGroup(groupOrOption);\n @if (group.options !== undefined) {\n <li class=\"select2-results__option select2-results__group\">\n <span [id]=\"getElementId(groupOrOption)\">\n @if (!hasTemplate(group, 'group')) {\n <strong\n [attr.class]=\"'select2-results__group' + (group.classes ? ' ' + group.classes : '')\"\n [innerHTML]=\"group.label\"\n ></strong>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(group, 'group'); context: group\"> </ng-container>\n }\n </span>\n <ul\n class=\"select2-results__options select2-results__options--nested\"\n role=\"group\"\n [attr.aria-labelledby]=\"getElementId(groupOrOption)\"\n >\n @for (option of group.options; track option; let j = $index) {\n <li\n #result\n [id]=\"getElementId(option)\"\n [class]=\"getOptionStyle(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div class=\"select2-label-content\" [innerHTML]=\"option.label\"></div>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\">\n </ng-container>\n }\n </li>\n }\n </ul>\n </li>\n } @else {\n @let option = _toOption(groupOrOption);\n <li\n #result\n [id]=\"getElementId(groupOrOption)\"\n [class]=\"getOptionStyle(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div [innerHTML]=\"option.label\" class=\"select2-label-content\"></div>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"> </ng-container>\n }\n </li>\n\n <ng-template #li>\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"> </ng-container>\n </ng-template>\n }\n }\n @if (!filteredData()?.length && noResultMessage()) {\n <li class=\"select2-no-result select2-results__option\" [innerHTML]=\"noResultMessage()\"></li>\n }\n @if (maxResultsExceeded) {\n <li class=\"select2-too-much-result select2-results__option\" [innerHTML]=\"maxResultsMessage()\"></li>\n }\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #resetButton>\n <button\n type=\"button\"\n (focus)=\"_updateFocusState(true)\"\n (click)=\"reset($event)\"\n (keydown)=\"$event.stopPropagation()\"\n class=\"select2-selection__reset\"\n [attr.aria-description]=\"ariaResetButtonDescription()\"\n [attr.aria-controls]=\"idCombo()\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{display:inline-block;position:relative;vertical-align:middle;box-sizing:border-box;margin:0;width:100%}.select2-container .select2-container-dropdown{position:absolute;opacity:0;width:0px}.select2-container .select2-selection--single{display:block;cursor:pointer;box-sizing:border-box;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;flex:1 1 auto;padding:var(--select2-selection-padding, 0 0 0 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{display:block;cursor:pointer;box-sizing:border-box;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;flex-wrap:wrap;gap:var(--select2-selection-multiple-gap, 2px 5px);padding-bottom:2px;padding-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{display:flex;flex:1 1 150px;min-width:150px}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{border:0;width:100%}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{outline:0;border:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;margin-top:5px;border:none;padding:0;font-size:100%}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{display:block;position:absolute;z-index:1051;box-sizing:border-box;border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-dropdown-background, white);width:100%;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{margin:0;padding:0;list-style:none}.select2-results__option{padding:var(--select2-option-padding, 6px);color:var(--select2-option-text-color, #000);-webkit-user-select:none;user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{opacity:1;width:100%}.select2-container--open .select2-dropdown{height:auto;overflow:auto}.select2-container--open .select2-dropdown--above{display:flex;bottom:27px;flex-direction:column-reverse;border-bottom:var(--select2-dropdown-above-border-bottom, none);border-bottom-right-radius:var(--select2-dropdown-above-border-bottom-right-radius, 0);border-bottom-left-radius:var(--select2-dropdown-above-border-bottom-left-radius, 0)}.select2-container--open .select2-dropdown--below{border-top:var(--select2-dropdown-below-border-top, none);border-top-right-radius:var(--select2-dropdown-below-border-top-right-radius, 0);border-top-left-radius:var(--select2-dropdown-below-border-top-left-radius, 0)}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{box-sizing:border-box;padding:4px;width:100%}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{display:block;position:fixed;top:0;left:0;opacity:0;z-index:99;margin:0;border:0;padding:0;width:auto;min-width:100%;height:auto;min-height:100%}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;position:absolute!important;margin:-1px!important;padding:0!important;width:1px!important;height:1px!important;overflow:hidden!important}.select2-container--default .select2-selection--single{display:flex;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-background, #fff)}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:var(--select2-selection-line-height, 28px)}.select2-container--default .select2-selection--single .select2-selection__clear{float:right;cursor:pointer;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;text-overflow:var(--select2-placeholder-overflow, ellipsis);white-space:nowrap}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;justify-content:center;align-items:center;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow:before{border-width:5px 4px 0;border-style:solid;border-color:var(--select2-arrow-color, #888) transparent;width:0;height:0;content:\" \"}.select2-container--default .select2-selection__reset{align-self:center;border:var(--select2-reset-border, none);border-radius:var(--select2-reset-border-radius, 4px);background:var(--select2-reset-background, transparent);height:fit-content;color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--disabled .select2-selection__choice__remove,.select2-container--default.select2-container--readonly .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--readonly .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--disabled .select2-selection--single,.select2-container--default.select2-container--disabled .select2-selection--multiple{cursor:default;background:var(--select2-selection-disabled-background, #eee)}.select2-container--default.select2-container--readonly .select2-selection--single,.select2-container--default.select2-container--readonly .select2-selection--multiple{background:var(--select2-selection-readonly-background, #eee)}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-width:0 4px 5px;border-color:transparent transparent var(--select2-arrow-color, #888)}.select2-container--default .select2-selection--multiple{display:flex;cursor:text;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-background, #fff)}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;align-items:center;box-sizing:border-box;margin:0;padding:var(--select2-selection-multiple-padding, 2px 5px);width:100%;min-height:1em;list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{line-height:var(--select2-selection-choice-line-height, 20px);list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;float:left;margin:-3px 0;width:100%;overflow:hidden;color:var(--select2-placeholder-color, #999);text-overflow:var(--select2-placeholder-overflow, ellipsis);white-space:nowrap}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__clear{float:right;cursor:pointer;margin-top:5px;margin-right:10px;font-weight:700}.select2-container--default .select2-selection--multiple .select2-selection__choice{cursor:default;border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-choice-background, #e4e4e4);padding:0 5px;color:var(--select2-selection-choice-text-color, #000)}.select2-container--default .select2-selection--multiple .select2-selection__choice.cdk-drag:not(.cdk-drag-disabled){cursor:move}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{display:inline-block;cursor:pointer;margin-right:2px;color:var(--select2-selection-choice-close-color, #999);font-weight:700}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{outline:none;border:solid var(--select2-selection-focus-border-color, #000) 1px}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{outline:none;border:solid var(--select2-selection-focus-border-color, #000) 1px}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-right-radius:0;border-top-left-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-right-radius:0;border-bottom-left-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);border-radius:var(--select2-search-border-radius, 0px);background:1px solid var(--select2-search-background, #fff)}.select2-container--default .select2-search--inline .select2-search__field{-webkit-appearance:textfield;outline:none;box-shadow:none;border:none;background:transparent}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option.select2-results__group{grid-column:col-start/col-end;padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{background:var(--select2-option-disabled-background, transparent);color:var(--select2-option-disabled-text-color, #999)}.select2-container--default .select2-results__option[aria-selected=true]{background:var(--select2-option-selected-background, #ddd);color:var(--select2-option-selected-text-color, #000)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{display:block;cursor:default;background:var(--select2-option-group-background, transparent);padding:6px;color:var(--select2-option-group-text-color, gray)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}.select2-grid,.select2-grid ul{display:grid;grid-template-columns:[col-start] repeat(var(--grid-size),1fr) [col-end]}.select2-grid-auto,.select2-grid-auto ul{display:grid;grid-template-columns:[col-start] repeat(auto-fill,minmax(var(--grid-size, 100px),1fr)) [col-end]}.select2-container--default .select2-grid ul,.select2-container--default .select2-grid-auto ul{padding-left:var(--select2-option-padding, 6px)}.select2-container--default .select2-grid ul .select2-results__group,.select2-container--default .select2-grid-auto ul .select2-results__group{padding-left:0}.select2-container--default .select2-grid ul .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{padding-left:var(--select2-option-padding, 6px)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{border-color:transparent;background:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border-color:transparent;background:transparent}:host.borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}:host.borderless .select2-selection--single,:host.borderless .select2-selection--multiple{border-color:transparent;background:transparent}:host.borderless .select2-container--default .select2-focused .select2-selection--single,:host.borderless .select2-container--default .select2-focused .select2-selection--multiple,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border-color:transparent;background:transparent}:host.select2-selection-nowrap .select2-selection--single.select2-selection,:host.select2-selection-nowrap .select2-selection--single.select2-selection span,:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection span,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{display:flex;flex-wrap:nowrap}:host.select2-selection-nowrap .select2-selection--single.select2-selection li,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection li{display:flex}:host.material{display:inline-block;width:300px}:host.material>.select2-container{vertical-align:inherit;padding-bottom:1.29688em}:host.material>.select2-container .selection{display:inline-flex;align-items:baseline;border-top:.84375em solid transparent;padding:.4375em 0;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{box-sizing:border-box;border:0;border-radius:0;width:100%;height:24px}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);width:100%;height:1px;content:\" \"}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{display:block;position:absolute;bottom:1.63em;left:50%;transition:none;background:var(--select2-material-underline-active, #5a419e);width:0%;height:2px;content:\" \"}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;position:absolute;top:20px;left:0;transform-origin:0 21px;transition:transform .3s;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38))}:host.material .select2-container--default .select2-container--open{bottom:1.6em;left:0}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{left:0%;transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%}:host.material .select2-container--default .select2-dropdown{box-shadow:0 5px 5px #00000080;border:0;border-radius:0}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple,:host.material .select2-container--default.select2-container--readonly .select2-selection--single,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x}:host.material .select2-container--default.select2-container--readonly .select2-selection--single:before,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple:before{background:var(--select2-material-underline-readonly, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);color:var(--select2-hint-text-color, #888);font-size:75%}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:0}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-top:28px;margin-bottom:0}::ng-deep .cdk-overlay-container .select2-style-borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"], dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: InfiniteScrollDirective, selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]", inputs: ["infiniteScrollDistance", "infiniteScrollUpDistance", "infiniteScrollThrottle", "infiniteScrollDisabled", "infiniteScrollContainer", "scrollWindow", "immediateCheck", "horizontal", "alwaysCallback", "fromRoot"], outputs: ["scrolled", "scrolledUp"] }, { kind: "directive", type: CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1270
1451
  }
1271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Select2, decorators: [{
1452
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: Select2, decorators: [{
1272
1453
  type: Component,
1273
- args: [{ selector: 'select2', standalone: false, template: "<div class=\"select2-label\" (click)=\"toggleOpenAndClose()\">\n <ng-content select=\"select2-label\"></ng-content>\n @if (required) {\n <span class=\"select2-required\"></span>\n }\n</div>\n\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled\"\n>\n <div\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? tabIndex : '-1'\"\n (click)=\"toggleOpenAndClose()\"\n (focus)=\"focusin()\"\n (blur)=\"focusout()\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple\"\n [class.select2-selection--single]=\"!multiple\"\n role=\"combobox\"\n >\n @if (selectionOverride) {\n <span class=\"select2-selection__override\" [innerHTML]=\"_selectionOverrideLabel()\"></span>\n @if (\n !multiple && resettable && resetSelectedValue !== value && select2Option && !(disabled || readonly)\n ) {\n <span (click)=\"reset($event)\" class=\"select2-selection__reset\" role=\"presentation\">\u00D7</span>\n }\n } @else if (!multiple) {\n <span class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n @if (!select2Option) {\n <span>&nbsp;</span>\n }\n @if (select2Option) {\n @if (!hasTemplate(select2Option, 'option', true) || noLabelTemplate) {\n <span [innerHTML]=\"select2Option.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(select2Option, 'option', true); context: select2Option\"\n ></ng-container>\n }\n }\n <span\n [class.select2-selection__placeholder__option]=\"option\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n </span>\n @if (resettable && resetSelectedValue !== value && select2Option && !(disabled || readonly)) {\n <span (click)=\"reset($event)\" class=\"select2-selection__reset\" role=\"presentation\">\u00D7</span>\n }\n <span class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n } @else {\n <ul class=\"select2-selection__rendered\">\n @if (!autoCreate) {\n <span\n [class.select2-selection__placeholder__option]=\"select2Options?.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder }}</span\n >\n }\n @for (op of option || []; track trackBy($index, op)) {\n <li\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (keydown.enter)=\"removeSelection($event, op)\"\n >\n @if (!(disabled || readonly)) {\n <span\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n >\u00D7</span\n >\n }\n @if (!hasTemplate(op, 'option', true) || noLabelTemplate) {\n <span [innerHTML]=\"op.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(op, 'option', true); context: op\"\n ></ng-container>\n }\n </li>\n }\n @if (autoCreate) {\n <li\n class=\"select2-selection__auto-create\"\n (focus)=\"stopEvent($event)\"\n (blur)=\"stopEvent($event)\"\n >\n <input\n [id]=\"id + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n }\n </ul>\n }\n </div>\n </div>\n @if (!overlay) {\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n }\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay\"\n [class.select2-position-auto]=\"listPosition === 'auto'\"\n [class.select2-style-borderless]=\"styleMode === 'borderless'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"hideSearch()\">\n <input\n #searchInput\n [id]=\"id + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event, autoCreate)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? tabIndex : '-1'\"\n />\n </div>\n\n <div class=\"select2-results\">\n <ul\n #results\n class=\"select2-results__options\"\n [class.select2-grid]=\"grid && isNumber(grid)\"\n [class.select2-grid-auto]=\"grid && !isNumber(grid)\"\n [style.max-height]=\"resultMaxHeight\"\n [style.--grid-size]=\"grid || null\"\n role=\"tree\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle\"\n [infiniteScrollContainer]=\"results\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n @if (showSelectAll && multiple) {\n <li\n class=\"select2-results__option select2-selectall\"\n (click)=\"selectAll()\"\n tabindex=\"1\"\n aria-selected\n >\n <div class=\"select2-label-content\">\n {{ selectAllTest() ? removeAllText : selectAllText }}\n </div>\n </li>\n }\n\n @for (groupOrOption of filteredData(); track trackBy(i, groupOrOption); let i = $index) {\n @if (groupOrOption.options !== undefined) {\n <li class=\"select2-results__option\" role=\"group\">\n @if (!hasTemplate(groupOrOption, 'group')) {\n <strong\n [attr.class]=\"\n 'select2-results__group' +\n (groupOrOption.classes ? ' ' + groupOrOption.classes : '')\n \"\n [innerHTML]=\"groupOrOption.label\"\n ></strong>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'group'); context: groupOrOption\"\n >\n </ng-container>\n }\n <ul class=\"select2-results__options select2-results__options--nested\">\n @for (option of groupOrOption.options; track trackBy(j, option); let j = $index) {\n <li\n #result\n [id]=\"option.id || id + '-option-' + i + '-' + j\"\n [class]=\"getOptionStyle(option)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div class=\"select2-label-content\" [innerHTML]=\"option.label\"></div>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"\n >\n </ng-container>\n }\n </li>\n }\n </ul>\n </li>\n } @else {\n <li\n #result\n [id]=\"groupOrOption.id || id + '-option-' + i\"\n [class]=\"getOptionStyle(groupOrOption)\"\n role=\"treeitem\"\n [attr.aria-selected]=\"isSelected(groupOrOption)\"\n [attr.aria-disabled]=\"isDisabled(groupOrOption)\"\n (mouseenter)=\"mouseenter(groupOrOption)\"\n (click)=\"click(groupOrOption)\"\n >\n @if (!hasTemplate(groupOrOption, 'option')) {\n <div [innerHTML]=\"groupOrOption.label\" class=\"select2-label-content\"></div>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n }\n </li>\n\n <ng-template #li>\n <ng-container\n *ngTemplateOutlet=\"getTemplate(groupOrOption, 'option'); context: groupOrOption\"\n >\n </ng-container>\n </ng-template>\n }\n }\n @if (!filteredData()?.length && noResultMessage) {\n <li class=\"select2-no-result select2-results__option\" [innerHTML]=\"noResultMessage\"></li>\n }\n @if (maxResultsExceeded) {\n <li\n class=\"select2-too-much-result select2-results__option\"\n [innerHTML]=\"maxResultsMessage\"\n ></li>\n }\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{box-sizing:border-box;display:inline-block;margin:0;position:relative;vertical-align:middle;width:100%}.select2-container .select2-container-dropdown{position:absolute;width:0px;opacity:0}.select2-container .select2-selection--single{box-sizing:border-box;cursor:pointer;display:block;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;padding:var(--select2-selection-padding, 0 0 0 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1 1 auto}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{box-sizing:border-box;cursor:pointer;display:block;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;overflow:hidden;padding-left:8px;padding-bottom:2px;text-overflow:ellipsis;white-space:nowrap;flex-wrap:wrap;gap:var(--select2-selection-multiple-gap, 2px 5px)}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{flex:1 1 150px;min-width:150px;display:flex}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{width:100%;border:0}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{border:0;outline:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;border:none;font-size:100%;margin-top:5px;padding:0}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{background:var(--select2-dropdown-background, white);border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);box-sizing:border-box;display:block;position:absolute;width:100%;z-index:1051;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{list-style:none;margin:0;padding:0}.select2-results__option{padding:var(--select2-option-padding, 6px);-webkit-user-select:none;user-select:none;color:var(--select2-option-text-color, #000)}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{width:100%;opacity:1}.select2-container--open .select2-dropdown{overflow:auto;height:auto}.select2-container--open .select2-dropdown--above{border-bottom:var(--select2-dropdown-above-border-bottom, none);border-bottom-left-radius:var(--select2-dropdown-above-border-bottom-left-radius, 0);border-bottom-right-radius:var(--select2-dropdown-above-border-bottom-right-radius, 0);bottom:27px;display:flex;flex-direction:column-reverse}.select2-container--open .select2-dropdown--below{border-top:var(--select2-dropdown-below-border-top, none);border-top-left-radius:var(--select2-dropdown-below-border-top-left-radius, 0);border-top-right-radius:var(--select2-dropdown-below-border-top-right-radius, 0)}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{padding:4px;width:100%;box-sizing:border-box}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{border:0;margin:0;padding:0;display:block;position:fixed;left:0;top:0;min-height:100%;min-width:100%;height:auto;width:auto;opacity:0;z-index:99}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}.select2-container--default .select2-selection--single{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);display:flex}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:var(--select2-selection-line-height, 28px)}.select2-container--default .select2-selection--single .select2-selection__clear{cursor:pointer;float:right;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;width:20px;align-items:center;justify-content:center}.select2-container--default .select2-selection--single .select2-selection__arrow:before{content:\" \";border-color:var(--select2-arrow-color, #888) transparent;border-style:solid;border-width:5px 4px 0;height:0;width:0}.select2-container--default .select2-selection--single .select2-selection__reset{color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear{display:none}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-color:transparent transparent var(--select2-arrow-color, #888);border-width:0 4px 5px}.select2-container--default .select2-selection--multiple{background:var(--select2-selection-background, #fff);border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:text;display:flex}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;box-sizing:border-box;list-style:none;margin:0;padding:var(--select2-selection-multiple-padding, 2px 5px);width:100%;min-height:1em;align-items:center}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{list-style:none;line-height:var(--select2-selection-choice-line-height, 20px)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;width:100%;color:var(--select2-placeholder-color, #999);margin-top:5px;float:left;overflow:hidden;white-space:nowrap;text-overflow:var(--select2-placeholder-overflow, ellipsis)}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__clear{cursor:pointer;float:right;font-weight:700;margin-top:5px;margin-right:10px}.select2-container--default .select2-selection--multiple .select2-selection__choice{color:var(--select2-selection-choice-text-color, #000);background:var(--select2-selection-choice-background, #e4e4e4);border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);cursor:default;padding:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{color:var(--select2-selection-choice-close-color, #999);cursor:pointer;display:inline-block;font-weight:700;margin-right:2px}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:solid var(--select2-selection-focus-border-color, #000) 1px;outline:none}.select2-container--default.select2-container--disabled .select2-selection--multiple{background:var(--select2-selection-disabled-background, #eee);cursor:default}.select2-container--default.select2-container--disabled .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-left-radius:0;border-top-right-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-left-radius:0;border-bottom-right-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);background:1px solid var(--select2-search-background, #fff);border-radius:var(--select2-search-border-radius, 0px)}.select2-container--default .select2-search--inline .select2-search__field{background:transparent;border:none;outline:none;box-shadow:none;-webkit-appearance:textfield}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option[role=group]{padding:0;grid-column:col-start/col-end}.select2-container--default .select2-results__option[aria-disabled=true]{color:var(--select2-option-disabled-text-color, #999);background:var(--select2-option-disabled-background, transparent)}.select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-option-selected-text-color, #000);background:var(--select2-option-selected-background, #ddd)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{cursor:default;display:block;padding:6px;color:var(--select2-option-group-text-color, gray);background:var(--select2-option-group-background, transparent)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}.select2-grid,.select2-grid ul{display:grid;grid-template-columns:[col-start] repeat(var(--grid-size),1fr) [col-end]}.select2-grid-auto,.select2-grid-auto ul{display:grid;grid-template-columns:[col-start] repeat(auto-fill,minmax(var(--grid-size, 100px),1fr)) [col-end]}.select2-container--default .select2-grid ul,.select2-container--default .select2-grid-auto ul{padding-left:var(--select2-option-padding, 6px)}.select2-container--default .select2-grid ul .select2-results__group,.select2-container--default .select2-grid-auto ul .select2-results__group{padding-left:0}.select2-container--default .select2-grid ul .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{padding-left:var(--select2-option-padding, 6px)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{background:transparent;border-color:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}:host.borderless .select2-selection--single,:host.borderless .select2-selection--multiple{background:transparent;border-color:transparent}:host.borderless .select2-container--default .select2-focused .select2-selection--single,:host.borderless .select2-container--default .select2-focused .select2-selection--multiple,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{background:transparent;border-color:transparent}:host.select2-selection-nowrap .select2-selection--single.select2-selection,:host.select2-selection-nowrap .select2-selection--single.select2-selection span,:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection span,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{display:flex;flex-wrap:nowrap}:host.material{display:inline-block;width:300px}:host.material>.select2-container{padding-bottom:1.29688em;vertical-align:inherit}:host.material>.select2-container .selection{padding:.4375em 0;border-top:.84375em solid transparent;display:inline-flex;align-items:baseline;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{width:100%;border:0;border-radius:0;height:24px;box-sizing:border-box}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{content:\" \";display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);height:1px;width:100%}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{content:\" \";display:block;position:absolute;bottom:1.63em;background:var(--select2-material-underline-active, #5a419e);height:2px;width:0%;left:50%;transition:none}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38));transition:transform .3s;position:absolute;transform-origin:0 21px;left:0;top:20px}:host.material .select2-container--default .select2-container--open{left:0;bottom:1.6em}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%;left:0%}:host.material .select2-container--default .select2-dropdown{border-radius:0;border:0;box-shadow:0 5px 5px #00000080}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-size:4px 1px;background-repeat:repeat-x;background-position:0 bottom}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);font-size:75%;color:var(--select2-hint-text-color, #888)}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-bottom:0;margin-top:28px}::ng-deep .cdk-overlay-container .select2-style-borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"] }]
1454
+ args: [{ selector: 'select2, ng-select2', imports: [CdkOverlayOrigin, NgTemplateOutlet, CdkConnectedOverlay, InfiniteScrollDirective, CdkDropList, CdkDrag], host: {
1455
+ '[id]': 'id()',
1456
+ '[class.select2-selection-nowrap]': 'selectionNoWrap()',
1457
+ }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"select2-label\" (click)=\"toggleOpenAndClose()\" [id]=\"idLabel()\">\n <ng-content select=\"select2-label, ng-select2-label\"></ng-content>\n @if (required()) {\n <span class=\"select2-required\" aria-hidden=\"true\"></span>\n }\n</label>\n\n<div\n class=\"select2 select2-container select2-container--default\"\n [class.select2-container--focus]=\"focused\"\n [class.select2-container--below]=\"!select2above\"\n [class.select2-container--above]=\"select2above\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-container--disabled]=\"disabled()\"\n [class.select2-container--readonly]=\"readonly()\"\n>\n <div\n [id]=\"idCombo()\"\n role=\"combobox\"\n class=\"selection\"\n #selection\n #trigger=\"cdkOverlayOrigin\"\n [tabindex]=\"!this.isOpen ? _tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-expanded]=\"isOpen\"\n aria-haspopup=\"listbox\"\n [attr.aria-controls]=\"idOptions()\"\n [attr.aria-activedescendant]=\"isOpen ? hoveringOptionId() : null\"\n [attr.aria-describedby]=\"ariaDescribedby()\"\n [attr.title]=\"title()\"\n [attr.aria-invalid]=\"_isErrorState() || ariaInvalid() ? 'true' : null\"\n [attr.aria-required]=\"required() ? 'true' : null\"\n [attr.aria-readonly]=\"readonly() ? 'true' : null\"\n [attr.aria-disabled]=\"disabled() ? 'true' : null\"\n (click)=\"toggleOpenAndClose(); $event.stopPropagation()\"\n (focus)=\"focusin()\"\n (focusout)=\"focusout($event)\"\n (keydown)=\"openKey($event)\"\n cdkOverlayOrigin\n [class.select2-focused]=\"focused\"\n >\n <div\n class=\"select2-selection\"\n [class.select2-selection--multiple]=\"multiple()\"\n [class.select2-selection--single]=\"!multiple()\"\n >\n @if (selectionOverride()) {\n <span class=\"select2-selection__override\" [innerHTML]=\"_selectionOverrideLabel()\"></span>\n\n @if (\n resettable() &&\n !(disabled() || readonly()) &&\n resetSelectedValue() !== _value &&\n ((!multiple() && select2Option) || (multiple() && select2Options.length > 0))\n ) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n } @else if (!multiple()) {\n <span class=\"select2-selection__rendered\" [title]=\"select2Option?.label || ''\">\n @if (!select2Option) {\n <span>&nbsp;</span>\n }\n @if (select2Option) {\n @if (!hasTemplate(select2Option, 'option', true) || noLabelTemplate()) {\n <span [innerHTML]=\"select2Option.label\"></span>\n } @else {\n <ng-container\n *ngTemplateOutlet=\"getTemplate(select2Option, 'option', true); context: select2Option\"\n ></ng-container>\n }\n }\n <span\n [class.select2-selection__placeholder__option]=\"selectedOption\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder() }}</span\n >\n </span>\n\n @if (resettable() && resetSelectedValue() !== _value && select2Option && !(disabled() || readonly())) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n <span class=\"select2-selection__arrow\" role=\"presentation\"> </span>\n } @else {\n <ul\n class=\"select2-selection__rendered\"\n cdkDropList\n cdkDropListOrientation=\"mixed\"\n [cdkDropListDisabled]=\"!multipleDrag()\"\n (cdkDropListDropped)=\"drop($event)\"\n >\n @if (!autoCreate()) {\n <span\n [class.select2-selection__placeholder__option]=\"select2Options.length > 0\"\n class=\"select2-selection__placeholder\"\n >{{ placeholder() }}</span\n >\n }\n @for (op of selectedOption || []; track op) {\n <li\n class=\"select2-selection__choice\"\n [title]=\"op.label\"\n tabindex=\"0\"\n (focus)=\"_updateFocusState(true)\"\n (keydown.enter)=\"removeSelection($event, op)\"\n cdkDrag\n\n >\n @if (!(disabled() || readonly())) {\n <span\n (click)=\"removeSelection($event, op)\"\n class=\"select2-selection__choice__remove\"\n role=\"presentation\"\n aria-hidden=\"true\"\n >\u00D7</span\n >\n }\n @if (!hasTemplate(op, 'option', true) || noLabelTemplate()) {\n <span [innerHTML]=\"op.label\"></span>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(op, 'option', true); context: op\"></ng-container>\n }\n </li>\n }\n @if (autoCreate()) {\n <li class=\"select2-selection__auto-create\" (focus)=\"stopEvent($event)\" (blur)=\"stopEvent($event)\">\n <input\n [id]=\"id() + '-create-field'\"\n (click)=\"toggleOpenAndClose(false, true); stopEvent($event)\"\n (keydown)=\"keyDown($event, true)\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-create__field\"\n type=\"search\"\n role=\"textbox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n />\n </li>\n }\n </ul>\n @if (resettable() && $any(selectedOption)?.length > 0 && !(disabled() || readonly())) {\n <ng-container *ngTemplateOutlet=\"resetButton\"></ng-container>\n }\n }\n </div>\n </div>\n @if (!overlay()) {\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n }\n\n <div class=\"select2-subscript-wrapper\">\n <ng-content select=\"select2-hint, ng-select2-hint\"></ng-content>\n </div>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n cdkConnectedOverlayHasBackdrop\n cdkConnectedOverlayBackdropClass=\"select2-overlay-backdrop\"\n [cdkConnectedOverlayOrigin]=\"trigger\"\n [cdkConnectedOverlayOpen]=\"this.isOpen && overlay()\"\n [cdkConnectedOverlayMinWidth]=\"overlayWidth\"\n [cdkConnectedOverlayHeight]=\"overlayHeight\"\n [cdkConnectedOverlayPositions]=\"_positions\"\n (backdropClick)=\"toggleOpenAndClose()\"\n>\n <ng-container *ngTemplateOutlet=\"containerTemplate\"></ng-container>\n</ng-template>\n\n<ng-template #containerTemplate>\n <div\n [id]=\"idOverlay()\"\n class=\"select2-container select2-container--default select2-container-dropdown\"\n [class.select2-container--open]=\"isOpen\"\n [class.select2-overlay]=\"overlay()\"\n [class.select2-position-auto]=\"listPosition() === 'auto'\"\n [class.select2-style-borderless]=\"styleMode() === 'borderless'\"\n >\n <div\n #dropdown\n class=\"select2-dropdown\"\n [class.select2-dropdown--below]=\"!select2above\"\n [class.select2-dropdown--above]=\"select2above\"\n >\n <div class=\"select2-search select2-search--dropdown\" [class.select2-search--hide]=\"isSearchboxHidden\">\n <input\n #searchInput\n [id]=\"id() + '-search-field'\"\n [value]=\"searchText\"\n (keydown)=\"keyDown($event, autoCreate())\"\n (keyup)=\"searchUpdate($event)\"\n (change)=\"prevChange($event)\"\n class=\"select2-search__field\"\n type=\"search\"\n role=\"combobox\"\n autocomplete=\"off\"\n autocorrect=\"off\"\n autocapitalize=\"off\"\n spellcheck=\"false\"\n [attr.tabindex]=\"this.isOpen ? _tabIndex : '-1'\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n aria-autocomplete=\"list\"\n [attr.aria-controls]=\"idOptions()\"\n aria-expanded=\"true\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n />\n </div>\n\n <div class=\"select2-results\">\n <ul\n [id]=\"idOptions()\"\n #results\n class=\"select2-results__options\"\n [class.select2-grid]=\"grid() && isNumber(grid())\"\n [class.select2-grid-auto]=\"grid() && !isNumber(grid())\"\n [style.max-height]=\"resultMaxHeight()\"\n [style.--grid-size]=\"grid() || null\"\n role=\"listbox\"\n tabindex=\"-1\"\n infiniteScroll\n [infiniteScrollDisabled]=\"!infiniteScroll() && !isOpen\"\n [infiniteScrollDistance]=\"infiniteScrollDistance()\"\n [infiniteScrollThrottle]=\"infiniteScrollThrottle()\"\n [infiniteScrollContainer]=\"results\"\n [attr.aria-labelledby]=\"ariaLabelledby() ?? idLabel()\"\n [attr.aria-multiselectable]=\"multiple()\"\n [attr.aria-activedescendant]=\"hoveringOptionId()\"\n (scrolled)=\"onScroll('down')\"\n (scrolledUp)=\"onScroll('up')\"\n (keydown)=\"keyDown($event)\"\n >\n @if (showSelectAll() && multiple()) {\n <li class=\"select2-results__option select2-selectall\" (click)=\"selectAll()\" tabindex=\"1\" aria-selected>\n <div class=\"select2-label-content\">\n {{ selectAllTest() ? removeAllText() : selectAllText() }}\n </div>\n </li>\n }\n\n @for (groupOrOption of filteredData(); track groupOrOption; let i = $index) {\n @let group = _toGroup(groupOrOption);\n @if (group.options !== undefined) {\n <li class=\"select2-results__option select2-results__group\">\n <span [id]=\"getElementId(groupOrOption)\">\n @if (!hasTemplate(group, 'group')) {\n <strong\n [attr.class]=\"'select2-results__group' + (group.classes ? ' ' + group.classes : '')\"\n [innerHTML]=\"group.label\"\n ></strong>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(group, 'group'); context: group\"> </ng-container>\n }\n </span>\n <ul\n class=\"select2-results__options select2-results__options--nested\"\n role=\"group\"\n [attr.aria-labelledby]=\"getElementId(groupOrOption)\"\n >\n @for (option of group.options; track option; let j = $index) {\n <li\n #result\n [id]=\"getElementId(option)\"\n [class]=\"getOptionStyle(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div class=\"select2-label-content\" [innerHTML]=\"option.label\"></div>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\">\n </ng-container>\n }\n </li>\n }\n </ul>\n </li>\n } @else {\n @let option = _toOption(groupOrOption);\n <li\n #result\n [id]=\"getElementId(groupOrOption)\"\n [class]=\"getOptionStyle(option)\"\n role=\"option\"\n [attr.aria-selected]=\"isSelected(option)\"\n [attr.aria-disabled]=\"isDisabled(option)\"\n (mouseenter)=\"mouseenter(option)\"\n (click)=\"click(option)\"\n >\n @if (!hasTemplate(option, 'option')) {\n <div [innerHTML]=\"option.label\" class=\"select2-label-content\"></div>\n } @else {\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"> </ng-container>\n }\n </li>\n\n <ng-template #li>\n <ng-container *ngTemplateOutlet=\"getTemplate(option, 'option'); context: option\"> </ng-container>\n </ng-template>\n }\n }\n @if (!filteredData()?.length && noResultMessage()) {\n <li class=\"select2-no-result select2-results__option\" [innerHTML]=\"noResultMessage()\"></li>\n }\n @if (maxResultsExceeded) {\n <li class=\"select2-too-much-result select2-results__option\" [innerHTML]=\"maxResultsMessage()\"></li>\n }\n </ul>\n </div>\n </div>\n </div>\n</ng-template>\n\n<ng-template #resetButton>\n <button\n type=\"button\"\n (focus)=\"_updateFocusState(true)\"\n (click)=\"reset($event)\"\n (keydown)=\"$event.stopPropagation()\"\n class=\"select2-selection__reset\"\n [attr.aria-description]=\"ariaResetButtonDescription()\"\n [attr.aria-controls]=\"idCombo()\"\n >\n <span aria-hidden=\"true\">\u00D7</span>\n </button>\n</ng-template>\n", styles: [".select2-label{color:var(--select2-label-text-color, #000)}.select2-container{display:inline-block;position:relative;vertical-align:middle;box-sizing:border-box;margin:0;width:100%}.select2-container .select2-container-dropdown{position:absolute;opacity:0;width:0px}.select2-container .select2-selection--single{display:block;cursor:pointer;box-sizing:border-box;height:var(--select2-single-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{display:block;flex:1 1 auto;padding:var(--select2-selection-padding, 0 0 0 8px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--single .select2-selection__clear{position:relative}.select2-container .select2-selection--multiple{display:block;cursor:pointer;box-sizing:border-box;min-height:var(--select2-multiple-height, 28px);-webkit-user-select:none;user-select:none}.select2-container .select2-selection--multiple .select2-selection__rendered{display:inline-flex;flex-wrap:wrap;gap:var(--select2-selection-multiple-gap, 2px 5px);padding-bottom:2px;padding-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-selection__auto-create{display:flex;flex:1 1 150px;min-width:150px}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field{border:0;width:100%}.select2-container .select2-selection--multiple .select2-selection__rendered .select2-create__field:focus{outline:0;border:0}.select2-container .select2-search--inline{float:left}.select2-container .select2-search--inline .select2-search__field{box-sizing:border-box;margin-top:5px;border:none;padding:0;font-size:100%}.select2-container .select2-search--inline .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-dropdown{display:block;position:absolute;z-index:1051;box-sizing:border-box;border:1px solid var(--select2-dropdown-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-dropdown-background, white);width:100%;height:0;overflow:hidden}.select2-dropdown .select2-label-content{display:contents}.select2-results{display:block}.select2-results__options{margin:0;padding:0;list-style:none}.select2-results__option{padding:var(--select2-option-padding, 6px);color:var(--select2-option-text-color, #000);-webkit-user-select:none;user-select:none}.select2-results__option[aria-selected]{cursor:pointer}.select2-container.select2-container-dropdown.select2-container--open{opacity:1;width:100%}.select2-container--open .select2-dropdown{height:auto;overflow:auto}.select2-container--open .select2-dropdown--above{display:flex;bottom:27px;flex-direction:column-reverse;border-bottom:var(--select2-dropdown-above-border-bottom, none);border-bottom-right-radius:var(--select2-dropdown-above-border-bottom-right-radius, 0);border-bottom-left-radius:var(--select2-dropdown-above-border-bottom-left-radius, 0)}.select2-container--open .select2-dropdown--below{border-top:var(--select2-dropdown-below-border-top, none);border-top-right-radius:var(--select2-dropdown-below-border-top-right-radius, 0);border-top-left-radius:var(--select2-dropdown-below-border-top-left-radius, 0)}.select2-search--dropdown{display:block;padding:4px}.select2-search--dropdown .select2-search__field{box-sizing:border-box;padding:4px;width:100%}.select2-search--dropdown .select2-search__field::-webkit-search-cancel-button{-webkit-appearance:none}.select2-search--dropdown.select2-search--hide{display:none}.select2-close-mask{display:block;position:fixed;top:0;left:0;opacity:0;z-index:99;margin:0;border:0;padding:0;width:auto;min-width:100%;height:auto;min-height:100%}.select2-required:before{content:\"*\";color:var(--select2-required-color, red)}.select2-hidden-accessible{border:0!important;clip:rect(0 0 0 0)!important;position:absolute!important;margin:-1px!important;padding:0!important;width:1px!important;height:1px!important;overflow:hidden!important}.select2-container--default .select2-selection--single{display:flex;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-background, #fff)}.select2-container--default .select2-selection--single .select2-selection__rendered{color:var(--select2-selection-text-color, #111);line-height:var(--select2-selection-line-height, 28px)}.select2-container--default .select2-selection--single .select2-selection__clear{float:right;cursor:pointer;font-weight:700}.select2-container--default .select2-selection--single .select2-selection__placeholder{color:var(--select2-placeholder-color, #999)}.select2-container--default .select2-selection--single .select2-selection__placeholder span{overflow:hidden;text-overflow:var(--select2-placeholder-overflow, ellipsis);white-space:nowrap}.select2-container--default .select2-selection--single .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--single .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--single .select2-selection__reset,.select2-container--default .select2-selection--single .select2-selection__arrow{display:flex;justify-content:center;align-items:center;width:20px}.select2-container--default .select2-selection--single .select2-selection__arrow:before{border-width:5px 4px 0;border-style:solid;border-color:var(--select2-arrow-color, #888) transparent;width:0;height:0;content:\" \"}.select2-container--default .select2-selection__reset{align-self:center;border:var(--select2-reset-border, none);border-radius:var(--select2-reset-border-radius, 4px);background:var(--select2-reset-background, transparent);height:fit-content;color:var(--select2-reset-color, #999)}.select2-container--default.select2-container--disabled .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--disabled .select2-selection__choice__remove,.select2-container--default.select2-container--readonly .select2-selection--single .select2-selection__clear,.select2-container--default.select2-container--readonly .select2-selection__choice__remove{display:none}.select2-container--default.select2-container--disabled .select2-selection--single,.select2-container--default.select2-container--disabled .select2-selection--multiple{cursor:default;background:var(--select2-selection-disabled-background, #eee)}.select2-container--default.select2-container--readonly .select2-selection--single,.select2-container--default.select2-container--readonly .select2-selection--multiple{background:var(--select2-selection-readonly-background, #eee)}.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow:before{border-width:0 4px 5px;border-color:transparent transparent var(--select2-arrow-color, #888)}.select2-container--default .select2-selection--multiple{display:flex;cursor:text;border:1px solid var(--select2-selection-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-background, #fff)}.select2-container--default .select2-selection--multiple .select2-selection__rendered{flex:1 1 auto;align-items:center;box-sizing:border-box;margin:0;padding:var(--select2-selection-multiple-padding, 2px 5px);width:100%;min-height:1em;list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__rendered li{line-height:var(--select2-selection-choice-line-height, 20px);list-style:none}.select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;float:left;margin:-3px 0;width:100%;overflow:hidden;color:var(--select2-placeholder-color, #999);text-overflow:var(--select2-placeholder-overflow, ellipsis);white-space:nowrap}.select2-container--default .select2-selection--multiple .select2-selection__placeholder__option{display:none}.select2-container--default .select2-selection--multiple .select2-selection__override{flex:1;margin:0 5px}.select2-container--default .select2-selection--multiple .select2-selection__clear{float:right;cursor:pointer;margin-top:5px;margin-right:10px;font-weight:700}.select2-container--default .select2-selection--multiple .select2-selection__choice{cursor:default;border:1px solid var(--select2-selection-choice-border-color, #aaa);border-radius:var(--select2-selection-border-radius, 4px);background:var(--select2-selection-choice-background, #e4e4e4);padding:0 5px;color:var(--select2-selection-choice-text-color, #000)}.select2-container--default .select2-selection--multiple .select2-selection__choice.cdk-drag:not(.cdk-drag-disabled){cursor:move}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{display:inline-block;cursor:pointer;margin-right:2px;color:var(--select2-selection-choice-close-color, #999);font-weight:700}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:var(--select2-selection-choice-hover-close-color, #333)}.select2-container--default.select2-container--focused .select2-selection--multiple{outline:none;border:solid var(--select2-selection-focus-border-color, #000) 1px}.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,.select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{outline:none;border:solid var(--select2-selection-focus-border-color, #000) 1px}.select2-container--default.select2-container--open.select2-container--above .select2-selection--single,.select2-container--default.select2-container--open.select2-container--above .select2-selection--multiple{border-top-right-radius:0;border-top-left-radius:0}.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,.select2-container--default.select2-container--open.select2-container--below .select2-selection--multiple{border-bottom-right-radius:0;border-bottom-left-radius:0}.select2-container--default .select2-search--dropdown .select2-search__field{border:1px solid var(--select2-search-border-color, #aaa);border-radius:var(--select2-search-border-radius, 0px);background:1px solid var(--select2-search-background, #fff)}.select2-container--default .select2-search--inline .select2-search__field{-webkit-appearance:textfield;outline:none;box-shadow:none;border:none;background:transparent}.select2-container--default .select2-results>.select2-results__options{overflow-y:auto}.select2-container--default .select2-results__option.select2-results__group{grid-column:col-start/col-end;padding:0}.select2-container--default .select2-results__option[aria-disabled=true]{background:var(--select2-option-disabled-background, transparent);color:var(--select2-option-disabled-text-color, #999)}.select2-container--default .select2-results__option[aria-selected=true]{background:var(--select2-option-selected-background, #ddd);color:var(--select2-option-selected-text-color, #000)}.select2-container--default .select2-results__option .select2-results__option{padding-left:1em}.select2-container--default .select2-results__option .select2-results__option .select2-results__group{padding-left:0}.select2-container--default .select2-results__option .select2-results__option .select2-results__option{margin-left:-1em;padding-left:2em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-2em;padding-left:3em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-3em;padding-left:4em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-4em;padding-left:5em}.select2-container--default .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{margin-left:-5em;padding-left:6em}.select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-option-highlighted-background, #5897fb);color:var(--select2-option-highlighted-text-color, #fff)}.select2-container--default .select2-results__option--hide{display:none}.select2-container--default .select2-results__group{display:block;cursor:default;background:var(--select2-option-group-background, transparent);padding:6px;color:var(--select2-option-group-text-color, gray)}.select2-no-result{color:var(--select2-no-result-color, #888);font-style:var(--select2-no-result-font-style, italic)}.select2-too-much-result{color:var(--select2-too-much-result-color, #888);font-style:var(--select2-too-much-font-style, italic)}.select2-grid,.select2-grid ul{display:grid;grid-template-columns:[col-start] repeat(var(--grid-size),1fr) [col-end]}.select2-grid-auto,.select2-grid-auto ul{display:grid;grid-template-columns:[col-start] repeat(auto-fill,minmax(var(--grid-size, 100px),1fr)) [col-end]}.select2-container--default .select2-grid ul,.select2-container--default .select2-grid-auto ul{padding-left:var(--select2-option-padding, 6px)}.select2-container--default .select2-grid ul .select2-results__group,.select2-container--default .select2-grid-auto ul .select2-results__group{padding-left:0}.select2-container--default .select2-grid ul .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option,.select2-container--default .select2-grid-auto ul .select2-results__option .select2-results__option .select2-results__option .select2-results__option .select2-results__option{padding-left:var(--select2-option-padding, 6px)}:host.nostyle .select2-dropdown{border-color:transparent}:host.nostyle .select2-selection--single,:host.nostyle .select2-selection--multiple{border-color:transparent;background:transparent}:host.nostyle .select2-container--default .select2-focused .select2-selection--single,:host.nostyle .select2-container--default .select2-focused .select2-selection--multiple,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.nostyle .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border-color:transparent;background:transparent}:host.borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}:host.borderless .select2-selection--single,:host.borderless .select2-selection--multiple{border-color:transparent;background:transparent}:host.borderless .select2-container--default .select2-focused .select2-selection--single,:host.borderless .select2-container--default .select2-focused .select2-selection--multiple,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--single,:host.borderless .select2-container--default:not(.select2-container--open) .select2-focused .select2-selection--multiple{border-color:transparent;background:transparent}:host.select2-selection-nowrap .select2-selection--single.select2-selection,:host.select2-selection-nowrap .select2-selection--single.select2-selection span,:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection span,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host.select2-selection-nowrap .select2-selection--single.select2-selection ul,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection ul{display:flex;flex-wrap:nowrap}:host.select2-selection-nowrap .select2-selection--single.select2-selection li,:host.select2-selection-nowrap .select2-selection--multiple.select2-selection li{display:flex}:host.material{display:inline-block;width:300px}:host.material>.select2-container{vertical-align:inherit;padding-bottom:1.29688em}:host.material>.select2-container .selection{display:inline-flex;align-items:baseline;border-top:.84375em solid transparent;padding:.4375em 0;width:100%;height:auto}:host.material .select2-container--default .select2-selection--single,:host.material .select2-container--default .select2-selection--multiple{box-sizing:border-box;border:0;border-radius:0;width:100%;height:24px}:host.material .select2-container--default .select2-selection--single:before,:host.material .select2-container--default .select2-selection--multiple:before{display:block;position:absolute;bottom:1.65em;background:var(--select2-material-underline, #ddd);width:100%;height:1px;content:\" \"}:host.material .select2-container--default .select2-selection--single:after,:host.material .select2-container--default .select2-selection--multiple:after{display:block;position:absolute;bottom:1.63em;left:50%;transition:none;background:var(--select2-material-underline-active, #5a419e);width:0%;height:2px;content:\" \"}:host.material .select2-container--default .select2-selection--single .select2-selection__rendered,:host.material .select2-container--default .select2-selection--multiple .select2-selection__rendered{padding-left:1px;line-height:inherit}:host.material .select2-container--default .select2-selection--single .select2-selection__placeholder,:host.material .select2-container--default .select2-selection--multiple .select2-selection__placeholder{display:block;position:absolute;top:20px;left:0;transform-origin:0 21px;transition:transform .3s;color:var(--select2-material-placeholder-color, rgba(0, 0, 0, .38))}:host.material .select2-container--default .select2-container--open{bottom:1.6em;left:0}:host.material .select2-container--default .select2-selection__placeholder__option{transform:translateY(-1.5em) scale(.75) perspective(100px) translateZ(.001px);width:133.33333%}:host.material .select2-container--default .select2-selection__arrow{top:20px}:host.material .select2-container--default.select2-container--open .select2-selection--single:after,:host.material .select2-container--default.select2-container--open .select2-selection--multiple:after,:host.material .select2-container--default .select2-focused .select2-selection--single:after,:host.material .select2-container--default .select2-focused .select2-selection--multiple:after{left:0%;transition:width .3s cubic-bezier(.12,1,.77,1),left .3s cubic-bezier(.12,1,.77,1);width:100%}:host.material .select2-container--default .select2-dropdown{box-shadow:0 5px 5px #00000080;border:0;border-radius:0}:host.material .select2-container--default .select2-results__option[aria-selected=true],:host.material .select2-container--default .select2-results__option--highlighted[aria-selected]{background:var(--select2-material-option-selected-background, rgba(0, 0, 0, .04));color:var(--select2-material-option-highlighted-text-color, #000)}:host.material .select2-container--default .select2-results__option[aria-selected=true]{color:var(--select2-material-option-selected-text-color, #ff5722)}:host.material .select2-container--default.select2-container--disabled .select2-selection--single,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple,:host.material .select2-container--default.select2-container--readonly .select2-selection--single,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple{background:transparent}:host.material .select2-container--default.select2-container--disabled .select2-selection--single:before,:host.material .select2-container--default.select2-container--disabled .select2-selection--multiple:before{background:var(--select2-material-underline-disabled, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x}:host.material .select2-container--default.select2-container--readonly .select2-selection--single:before,:host.material .select2-container--default.select2-container--readonly .select2-selection--multiple:before{background:var(--select2-material-underline-readonly, linear-gradient(to right, rgba(0, 0, 0, .26) 0, rgba(0, 0, 0, .26) 33%, transparent 0));background-position:0 bottom;background-size:4px 1px;background-repeat:repeat-x}:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--single:after,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:before,:host.material.ng-invalid.ng-touched .select2-container--default .select2-selection--multiple:after{background:var(--select2-material-underline-invalid, red)}:host.material:not(.select2-container--open) .select2-focused .select2-selection--single,:host.material:not(.select2-container--open) .select2-focused .select2-selection--multiple{border:0}:host.material .select2-subscript-wrapper{position:absolute;top:calc(100% - 1.72917em);color:var(--select2-hint-text-color, #888);font-size:75%}::ng-deep .select2-overlay-backdrop{background:var(--select2-overlay-backdrop, transparent)}::ng-deep .cdk-overlay-container .select2-container .select2-dropdown.select2-dropdown--above{bottom:0}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown{margin-bottom:28px}::ng-deep .cdk-overlay-container .select2-container--open.select2-position-auto .select2-dropdown.select2-dropdown--above{bottom:0;margin-top:28px;margin-bottom:0}::ng-deep .cdk-overlay-container .select2-style-borderless{--select2-dropdown-above-border-bottom: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-above-border-bottom-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-above-border-bottom-right-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top: 1px solid var(--select2-dropdown-border-color, #aaa);--select2-dropdown-below-border-top-left-radius: var(--select2-selection-border-radius, 4px);--select2-dropdown-below-border-top-right-radius: var(--select2-selection-border-radius, 4px)}@supports (-moz-appearance: none){select2.material .select2-container--default .select2-selection--single,select2.material .select2-container--default .select2-selection--multiple{height:26px}}\n"] }]
1274
1458
  }], ctorParameters: () => [{ type: i1.ViewportRuler }, { type: i0.ChangeDetectorRef }, { type: i2.NgForm, decorators: [{
1275
1459
  type: Optional
1276
1460
  }] }, { type: i2.FormGroupDirective, decorators: [{
@@ -1282,131 +1466,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
1282
1466
  }] }, { type: undefined, decorators: [{
1283
1467
  type: Attribute,
1284
1468
  args: ['tabindex']
1285
- }] }], propDecorators: { data: [{
1286
- type: Input,
1287
- args: [{ required: true }]
1288
- }], minCharForSearch: [{
1289
- type: Input,
1290
- args: [{ transform: numberAttribute }]
1291
- }], displaySearchStatus: [{
1292
- type: Input
1293
- }], placeholder: [{
1294
- type: Input
1295
- }], limitSelection: [{
1296
- type: Input,
1297
- args: [{ transform: numberAttribute }]
1298
- }], listPosition: [{
1299
- type: Input
1300
- }], multiple: [{
1301
- type: Input,
1302
- args: [{ transform: booleanAttribute }]
1303
- }], overlay: [{
1304
- type: Input,
1305
- args: [{ transform: booleanAttribute }]
1306
- }], styleMode: [{
1307
- type: Input
1308
- }], noResultMessage: [{
1309
- type: Input
1310
- }], maxResults: [{
1311
- type: Input,
1312
- args: [{ transform: numberAttribute }]
1313
- }], maxResultsMessage: [{
1314
- type: Input
1315
- }], infiniteScrollDistance: [{
1316
- type: Input,
1317
- args: [{ transform: numberAttribute }]
1318
- }], infiniteScrollThrottle: [{
1319
- type: Input,
1320
- args: [{ transform: numberAttribute }]
1321
- }], infiniteScroll: [{
1322
- type: Input,
1323
- args: [{ transform: booleanAttribute }]
1324
- }], autoCreate: [{
1325
- type: Input,
1326
- args: [{ transform: booleanAttribute }]
1327
- }], noLabelTemplate: [{
1328
- type: Input,
1329
- args: [{ transform: booleanAttribute }]
1330
- }], editPattern: [{
1331
- type: Input
1332
- }], templates: [{
1333
- type: Input
1334
- }], templateSelection: [{
1335
- type: Input
1336
- }], resultMaxHeight: [{
1337
- type: Input
1338
- }], customSearchEnabled: [{
1339
- type: Input,
1340
- args: [{ transform: booleanAttribute }]
1341
- }], minCountForSearch: [{
1342
- type: Input,
1343
- args: [{ transform: numberAttribute }]
1344
- }], id: [{
1345
- type: Input
1346
- }, {
1347
- type: HostBinding,
1348
- args: ['id']
1349
- }], required: [{
1350
- type: Input,
1351
- args: [{ transform: booleanAttribute }]
1352
- }], disabled: [{
1353
- type: Input,
1354
- args: [{ transform: booleanAttribute }]
1355
- }], hideSelectedItems: [{
1356
- type: Input,
1357
- args: [{ transform: booleanAttribute }]
1358
- }], readonly: [{
1359
- type: Input,
1360
- args: [{ transform: booleanAttribute }]
1361
- }], value: [{
1362
- type: Input
1363
- }], tabIndex: [{
1364
- type: Input,
1365
- args: [{ transform: numberAttribute }]
1366
- }], resettable: [{
1367
- type: Input,
1368
- args: [{ transform: booleanAttribute }]
1369
- }], resetSelectedValue: [{
1370
- type: Input
1371
- }], grid: [{
1372
- type: Input
1373
- }], selectionOverride: [{
1374
- type: Input
1375
- }], selectionNoWrap: [{
1376
- type: HostBinding,
1377
- args: ['class.select2-selection-nowrap']
1378
- }, {
1379
- type: Input,
1380
- args: [{ transform: booleanAttribute }]
1381
- }], showSelectAll: [{
1382
- type: Input,
1383
- args: [{ transform: booleanAttribute }]
1384
- }], removeAllText: [{
1385
- type: Input
1386
- }], selectAllText: [{
1387
- type: Input
1388
- }], update: [{
1389
- type: Output
1390
- }], autoCreateItem: [{
1391
- type: Output
1392
- }], open: [{
1393
- type: Output
1394
- }], close: [{
1395
- type: Output
1396
- }], focus: [{
1397
- type: Output
1398
- }], blur: [{
1399
- type: Output
1400
- }], search: [{
1401
- type: Output
1402
- }], scroll: [{
1403
- type: Output
1404
- }], removeOption: [{
1405
- type: Output
1406
- }], ariaInvalid: [{
1407
- type: HostBinding,
1408
- args: ['attr.aria-invalid']
1409
- }], classMaterial: [{
1469
+ }] }], propDecorators: { classMaterial: [{
1410
1470
  type: HostBinding,
1411
1471
  args: ['class.material']
1412
1472
  }], classNostyle: [{
@@ -1418,67 +1478,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
1418
1478
  }], select2above: [{
1419
1479
  type: HostBinding,
1420
1480
  args: ['class.select2-above']
1421
- }], cdkConnectedOverlay: [{
1422
- type: ViewChild,
1423
- args: [CdkConnectedOverlay]
1424
- }], selection: [{
1425
- type: ViewChild,
1426
- args: ['selection', { static: true }]
1427
- }], resultContainer: [{
1428
- type: ViewChild,
1429
- args: ['results']
1430
- }], results: [{
1431
- type: ViewChildren,
1432
- args: ['result']
1433
- }], searchInput: [{
1434
- type: ViewChild,
1435
- args: ['searchInput']
1436
- }], dropdown: [{
1437
- type: ViewChild,
1438
- args: ['dropdown']
1439
1481
  }], clickDetection: [{
1440
1482
  type: HostListener,
1441
1483
  args: ['document:click', ['$event']]
1442
1484
  }] } });
1443
1485
 
1444
- class Select2Hint {
1445
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Select2Hint, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1446
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: Select2Hint, isStandalone: false, selector: "select2-hint", ngImport: i0 }); }
1447
- }
1448
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Select2Hint, decorators: [{
1449
- type: Directive,
1450
- args: [{
1451
- selector: 'select2-hint',
1452
- standalone: false
1453
- }]
1454
- }] });
1455
-
1456
- class Select2Label {
1457
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Select2Label, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1458
- /** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.0", type: Select2Label, isStandalone: false, selector: "select2-label", ngImport: i0 }); }
1459
- }
1460
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Select2Label, decorators: [{
1461
- type: Directive,
1462
- args: [{
1463
- selector: 'select2-label',
1464
- standalone: false
1465
- }]
1466
- }] });
1467
-
1468
- class Select2Module {
1469
- /** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Select2Module, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1470
- /** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.0", ngImport: i0, type: Select2Module, declarations: [Select2Hint, Select2Label, Select2], imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule], exports: [FormsModule, ReactiveFormsModule, Select2Hint, Select2Label, Select2] }); }
1471
- /** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Select2Module, imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule, FormsModule, ReactiveFormsModule] }); }
1472
- }
1473
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImport: i0, type: Select2Module, decorators: [{
1474
- type: NgModule,
1475
- args: [{
1476
- imports: [CommonModule, FormsModule, OverlayModule, ReactiveFormsModule, InfiniteScrollModule],
1477
- declarations: [Select2Hint, Select2Label, Select2],
1478
- exports: [FormsModule, ReactiveFormsModule, Select2Hint, Select2Label, Select2],
1479
- }]
1480
- }] });
1481
-
1482
1486
  /*
1483
1487
  * Public API Surface of ng-select2-component
1484
1488
  */
@@ -1487,5 +1491,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
1487
1491
  * Generated bundle index. Do not edit.
1488
1492
  */
1489
1493
 
1490
- export { Select2, Select2Hint, Select2Label, Select2Module, Select2Utils, defaultMinCountForSearch, protectRegexp, timeout, unicodePatterns };
1494
+ export { Select2, Select2Hint, Select2Label, Select2Utils, defaultMinCountForSearch, protectRegexp, timeout, unicodePatterns };
1491
1495
  //# sourceMappingURL=ng-select2-component.mjs.map