datatables.net-columncontrol 1.2.0 → 1.2.1

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,4 +1,4 @@
1
- /*! ColumnControl 1.2.0
1
+ /*! ColumnControl 1.2.1
2
2
  * Copyright (c) SpryMedia Ltd - datatables.net/license
3
3
  *
4
4
  * SVG icons: ISC License
@@ -81,73 +81,6 @@ function addClass(el, classes) {
81
81
  });
82
82
  }
83
83
 
84
- // The SVG for many of these icons are from Lucide ( https://lucide.dev ), which are available
85
- // under the ISC License. There are a number of custom icons as well. These are optimised through
86
- // https://optimize.svgomg.net/
87
- function wrap(paths) {
88
- return ('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">' +
89
- paths +
90
- '</svg>');
91
- }
92
- var icons = {
93
- chevronRight: wrap('<path d="m9 18 6-6-6-6"/>'),
94
- // columns-3
95
- columns: wrap('<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 3v18"/><path d="M15 3v18"/>'),
96
- // Custom
97
- contains: wrap('<path d="M10 3h4v18h-4z"/><path d="M18 8h3v9h-3"/><path d="M6 17H3V8h3"/>'),
98
- empty: wrap('<circle cx="12" cy="12" r="10"/>'),
99
- ends: wrap('<path d="M21 3h-4v18h4z"/><path d="M13 8H3v9h10"/>'),
100
- // Customised
101
- equal: wrap('<line x1="5" x2="19" y1="9" y2="9"/><line x1="5" x2="19" y1="15" y2="15"/>'),
102
- greater: wrap('<path d="m9 18 6-6-6-6"/>'),
103
- // Custom
104
- greaterOrEqual: wrap('<path d="m9 16 6-6-6-6"/><path d="m9 21 6-6"/>'),
105
- // Custom
106
- groupAdd: wrap('<path d="M6 21v-7.5m-3.549 3.75H9.75"/><rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" fill="currentColor" rx="1.5"/>'),
107
- // Custom
108
- groupClear: wrap('<rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),
109
- // Custom
110
- groupTop: wrap('<rect width="13.5" height="7.5" x="3" y="3" fill="currentColor" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),
111
- // Custom
112
- groupRemove: wrap('<path d="M2.451 17.25H9.75"/><rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),
113
- less: wrap('<path d="m15 18-6-6 6-6"/>'),
114
- // Custom
115
- lessOrEqual: wrap('<path d="m15 16-6-6 6-6"/><path d="m15 21-6-6"/>'),
116
- menu: wrap('<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>'),
117
- // move-horizontal
118
- move: wrap('<line x1="12" x2="12" y1="3" y2="21"/><polyline points="8 8 4 12 8 16"/><polyline points="16 16 20 12 16 8"/>'),
119
- // arrow-left-from-line
120
- moveLeft: wrap('<path d="m9 6-6 6 6 6"/><path d="M3 12h14"/><path d="M21 19V5"/>'),
121
- // arrow-right-from-line
122
- moveRight: wrap('<path d="M3 5v14"/><path d="M21 12H7"/><path d="m15 18 6-6-6-6"/>'),
123
- // Custom
124
- notContains: wrap('<path d="M15 4 9 20"/><path d="M3 8h18v9H3z"/>'),
125
- notEmpty: wrap('<circle cx="12" cy="12" r="10"/><line x1="9" x2="15" y1="15" y2="9"/>'),
126
- notEqual: wrap('<path d="M5 9h14"/><path d="M5 15h14"/><path d="M15 5 9 19"/>'),
127
- // Custom
128
- orderAddAsc: wrap('<path d="M17 21v-8"/><path d="M3 4h6"/><path d="M3 8h9"/><path d="M3 12h10"/><path d="M13 17h8"/>'),
129
- // Custom
130
- orderAddDesc: wrap('<path d="M17 21v-8"/><path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="M13 17h8"/>'),
131
- orderAsc: wrap('<path d="m3 8 4-4 4 4"/><path d="M7 4v16"/><path d="M11 12h4"/><path d="M11 16h7"/><path d="M11 20h10"/>'),
132
- // Custom
133
- orderClear: wrap('<path d="m21 21-8-8"/><path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="m13 21 8-8"/>'),
134
- orderDesc: wrap('<path d="m3 16 4 4 4-4"/><path d="M7 20V4"/><path d="M11 4h10"/><path d="M11 8h7"/><path d="M11 12h4"/>'),
135
- // Custom
136
- orderRemove: wrap('<path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="M13 17h8"/>'),
137
- // Custom
138
- orderNone: wrap('<path d="m3 8 4-4 4 4"/><path d="m11 16-4 4-4-4"/><path d="M7 4v16"/><path d="M15 8h6"/><path d="M15 16h6"/><path d="M13 12h8"/>'),
139
- // search
140
- search: wrap('<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>'),
141
- // search-x
142
- searchClear: wrap('<path d="m13.5 8.5-5 5"/><path d="m8.5 8.5 5 5"/><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>'),
143
- // Custom
144
- starts: wrap('<path d="M3 3h4v18H3z"/><path d="M11 8h10v9H11"/>'),
145
- // tick
146
- tick: wrap('<path d="M20 6 9 17l-5-5"/>'),
147
- // x
148
- x: wrap('<path d="M18 6 6 18"/><path d="m6 6 12 12"/>')
149
- };
150
-
151
84
  /**
152
85
  * Close all or only other dropdowns
153
86
  *
@@ -395,6 +328,73 @@ var dropdownContent = {
395
328
  }
396
329
  };
397
330
 
331
+ // The SVG for many of these icons are from Lucide ( https://lucide.dev ), which are available
332
+ // under the ISC License. There are a number of custom icons as well. These are optimised through
333
+ // https://optimize.svgomg.net/
334
+ function wrap(paths) {
335
+ return ('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">' +
336
+ paths +
337
+ '</svg>');
338
+ }
339
+ var icons = {
340
+ chevronRight: wrap('<path d="m9 18 6-6-6-6"/>'),
341
+ // columns-3
342
+ columns: wrap('<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 3v18"/><path d="M15 3v18"/>'),
343
+ // Custom
344
+ contains: wrap('<path d="M10 3h4v18h-4z"/><path d="M18 8h3v9h-3"/><path d="M6 17H3V8h3"/>'),
345
+ empty: wrap('<circle cx="12" cy="12" r="10"/>'),
346
+ ends: wrap('<path d="M21 3h-4v18h4z"/><path d="M13 8H3v9h10"/>'),
347
+ // Customised
348
+ equal: wrap('<line x1="5" x2="19" y1="9" y2="9"/><line x1="5" x2="19" y1="15" y2="15"/>'),
349
+ greater: wrap('<path d="m9 18 6-6-6-6"/>'),
350
+ // Custom
351
+ greaterOrEqual: wrap('<path d="m9 16 6-6-6-6"/><path d="m9 21 6-6"/>'),
352
+ // Custom
353
+ groupAdd: wrap('<path d="M6 21v-7.5m-3.549 3.75H9.75"/><rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" fill="currentColor" rx="1.5"/>'),
354
+ // Custom
355
+ groupClear: wrap('<rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),
356
+ // Custom
357
+ groupTop: wrap('<rect width="13.5" height="7.5" x="3" y="3" fill="currentColor" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),
358
+ // Custom
359
+ groupRemove: wrap('<path d="M2.451 17.25H9.75"/><rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),
360
+ less: wrap('<path d="m15 18-6-6 6-6"/>'),
361
+ // Custom
362
+ lessOrEqual: wrap('<path d="m15 16-6-6 6-6"/><path d="m15 21-6-6"/>'),
363
+ menu: wrap('<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>'),
364
+ // move-horizontal
365
+ move: wrap('<line x1="12" x2="12" y1="3" y2="21"/><polyline points="8 8 4 12 8 16"/><polyline points="16 16 20 12 16 8"/>'),
366
+ // arrow-left-from-line
367
+ moveLeft: wrap('<path d="m9 6-6 6 6 6"/><path d="M3 12h14"/><path d="M21 19V5"/>'),
368
+ // arrow-right-from-line
369
+ moveRight: wrap('<path d="M3 5v14"/><path d="M21 12H7"/><path d="m15 18 6-6-6-6"/>'),
370
+ // Custom
371
+ notContains: wrap('<path d="M15 4 9 20"/><path d="M3 8h18v9H3z"/>'),
372
+ notEmpty: wrap('<circle cx="12" cy="12" r="10"/><line x1="9" x2="15" y1="15" y2="9"/>'),
373
+ notEqual: wrap('<path d="M5 9h14"/><path d="M5 15h14"/><path d="M15 5 9 19"/>'),
374
+ // Custom
375
+ orderAddAsc: wrap('<path d="M17 21v-8"/><path d="M3 4h6"/><path d="M3 8h9"/><path d="M3 12h10"/><path d="M13 17h8"/>'),
376
+ // Custom
377
+ orderAddDesc: wrap('<path d="M17 21v-8"/><path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="M13 17h8"/>'),
378
+ orderAsc: wrap('<path d="m3 8 4-4 4 4"/><path d="M7 4v16"/><path d="M11 12h4"/><path d="M11 16h7"/><path d="M11 20h10"/>'),
379
+ // Custom
380
+ orderClear: wrap('<path d="m21 21-8-8"/><path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="m13 21 8-8"/>'),
381
+ orderDesc: wrap('<path d="m3 16 4 4 4-4"/><path d="M7 20V4"/><path d="M11 4h10"/><path d="M11 8h7"/><path d="M11 12h4"/>'),
382
+ // Custom
383
+ orderRemove: wrap('<path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="M13 17h8"/>'),
384
+ // Custom
385
+ orderNone: wrap('<path d="m3 8 4-4 4 4"/><path d="m11 16-4 4-4-4"/><path d="M7 4v16"/><path d="M15 8h6"/><path d="M15 16h6"/><path d="M13 12h8"/>'),
386
+ // search
387
+ search: wrap('<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>'),
388
+ // search-x
389
+ searchClear: wrap('<path d="m13.5 8.5-5 5"/><path d="m8.5 8.5 5 5"/><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>'),
390
+ // Custom
391
+ starts: wrap('<path d="M3 3h4v18H3z"/><path d="M11 8h10v9H11"/>'),
392
+ // tick
393
+ tick: wrap('<path d="M20 6 9 17l-5-5"/>'),
394
+ // x
395
+ x: wrap('<path d="M18 6 6 18"/><path d="m6 6 12 12"/>')
396
+ };
397
+
398
398
  var _namespace = 0;
399
399
  var Button = /** @class */ (function () {
400
400
  /**
@@ -1446,13 +1446,14 @@ var SearchInput = /** @class */ (function () {
1446
1446
  /**
1447
1447
  * Create a container element, for consistent DOM structure and styling
1448
1448
  */
1449
- function SearchInput(dt, idx) {
1449
+ function SearchInput(dt, idx, columnUnique) {
1450
1450
  var _this = this;
1451
1451
  this._type = 'text';
1452
1452
  this._sspTransform = null;
1453
1453
  this._sspData = {};
1454
1454
  this._dt = dt;
1455
1455
  this._idx = idx;
1456
+ this._colUnique = columnUnique;
1456
1457
  this._dom = {
1457
1458
  clear: createElement('span', 'dtcc-search-clear', icons['x']),
1458
1459
  container: createElement('div', SearchInput.classes.container),
@@ -1493,10 +1494,10 @@ var SearchInput = /** @class */ (function () {
1493
1494
  if (!data.columnControl) {
1494
1495
  data.columnControl = {};
1495
1496
  }
1496
- if (!data.columnControl[_this._idx]) {
1497
- data.columnControl[_this._idx] = {};
1497
+ if (!data.columnControl[_this._colUnique]) {
1498
+ data.columnControl[_this._colUnique] = {};
1498
1499
  }
1499
- data.columnControl[_this._idx].searchInput = {
1500
+ data.columnControl[_this._colUnique].searchInput = {
1500
1501
  logic: dom.select.value,
1501
1502
  type: _this._type,
1502
1503
  value: dom.input.value
@@ -1719,7 +1720,7 @@ var SearchInput = /** @class */ (function () {
1719
1720
  SearchInput.prototype._stateLoad = function (state) {
1720
1721
  var _a, _b;
1721
1722
  var dom = this._dom;
1722
- var idx = this._idx;
1723
+ var idx = this._colUnique;
1723
1724
  var loadedState = (_b = (_a = state === null || state === void 0 ? void 0 : state.columnControl) === null || _a === void 0 ? void 0 : _a[idx]) === null || _b === void 0 ? void 0 : _b.searchInput;
1724
1725
  if (loadedState) {
1725
1726
  // The search callback needs to know if we are loading an existing state or not
@@ -1760,7 +1761,7 @@ var searchDateTime = {
1760
1761
  var pickerFormat = '';
1761
1762
  var dataSrcFormat = '';
1762
1763
  var dateTime;
1763
- var searchInput = new SearchInput(dt, this.idx())
1764
+ var searchInput = new SearchInput(dt, this.idx(), this.idxOriginal())
1764
1765
  .type('date')
1765
1766
  .addClass('dtcc-searchDateTime')
1766
1767
  .sspTransform(function (val) { return toISO(val, pickerFormat, moment, luxon); })
@@ -1781,7 +1782,7 @@ var searchDateTime = {
1781
1782
  // If in a dropdown, set the parent levels as active
1782
1783
  if (config._parents) {
1783
1784
  config._parents.forEach(function (btn) {
1784
- return btn.activeList(_this.unique(), searchType === 'empty' || searchType === 'notEmpty' || !!searchTerm);
1785
+ return btn.activeList(_this.unique() + 'date', searchType === 'empty' || searchType === 'notEmpty' || !!searchTerm);
1785
1786
  });
1786
1787
  }
1787
1788
  var column = dt.column(_this.idx());
@@ -2015,20 +2016,21 @@ function toISO(input, srcFormat, moment, luxon) {
2015
2016
  }
2016
2017
 
2017
2018
  /** Set the options to show in the list */
2018
- function setOptions(checkList, opts) {
2019
+ function setOptions(checkList, opts, activeList) {
2020
+ if (activeList === void 0) { activeList = []; }
2019
2021
  var existing = checkList.values();
2020
2022
  checkList.clear();
2021
2023
  for (var i = 0; i < opts.length; i++) {
2022
2024
  if (typeof opts[i] === 'object') {
2023
2025
  checkList.add({
2024
- active: false,
2026
+ active: activeList.includes(opts[i].value),
2025
2027
  label: opts[i].label,
2026
2028
  value: opts[i].value
2027
2029
  }, i === opts.length - 1);
2028
2030
  }
2029
2031
  else {
2030
2032
  checkList.add({
2031
- active: false,
2033
+ active: activeList.includes(opts[i]),
2032
2034
  label: opts[i],
2033
2035
  value: opts[i]
2034
2036
  }, i === opts.length - 1);
@@ -2137,7 +2139,7 @@ var searchList = {
2137
2139
  var applySearch = function (values) {
2138
2140
  // If in a dropdown, set the parent levels as active
2139
2141
  if (config._parents) {
2140
- config._parents.forEach(function (btn) { return btn.activeList(_this.unique(), values && !!values.length); });
2142
+ config._parents.forEach(function (btn) { return btn.activeList(_this.unique() + 'list', values && !!values.length); });
2141
2143
  }
2142
2144
  var col = dt.column(_this.idx());
2143
2145
  // When SSP, don't do any client-side filtering
@@ -2178,8 +2180,9 @@ var searchList = {
2178
2180
  dt.draw();
2179
2181
  }
2180
2182
  });
2183
+ loadedValues = getState(this.idx(), dt.state.loaded());
2181
2184
  if (config.options) {
2182
- setOptions(checkList, config.options);
2185
+ setOptions(checkList, config.options, loadedValues);
2183
2186
  }
2184
2187
  else {
2185
2188
  dt.ready(function () {
@@ -2215,14 +2218,14 @@ var searchList = {
2215
2218
  // (since the mechanism for column visibility is different), so state saving is handled
2216
2219
  // here.
2217
2220
  dt.on('stateLoaded', function (e, s, state) {
2218
- var values = getState(_this.idx(), state);
2221
+ var values = getState(_this.idxOriginal(), state);
2219
2222
  if (values) {
2220
2223
  checkList.values(values);
2221
2224
  applySearch(values);
2222
2225
  }
2223
2226
  });
2224
2227
  dt.on('stateSaveParams', function (e, s, data) {
2225
- var idx = _this.idx();
2228
+ var idx = _this.idxOriginal();
2226
2229
  if (!data.columnControl) {
2227
2230
  data.columnControl = {};
2228
2231
  }
@@ -2244,7 +2247,6 @@ var searchList = {
2244
2247
  setOptions(checkList, options);
2245
2248
  }
2246
2249
  };
2247
- loadedValues = getState(this.idx(), dt.state.loaded());
2248
2250
  applySearch(loadedValues);
2249
2251
  // If SSP, then there are no options yet, so for a saved state we need
2250
2252
  // to use the values from the state in a temporary variable
@@ -2267,7 +2269,7 @@ var searchNumber = {
2267
2269
  var _this = this;
2268
2270
  var dt = this.dt();
2269
2271
  var i18nBase = 'columnControl.search.number.';
2270
- var searchInput = new SearchInput(dt, this.idx())
2272
+ var searchInput = new SearchInput(dt, this.idx(), this.idxOriginal())
2271
2273
  .type('num')
2272
2274
  .addClass('dtcc-searchNumber')
2273
2275
  .clearable(config.clear)
@@ -2294,7 +2296,7 @@ var searchNumber = {
2294
2296
  // If in a dropdown, set the parent levels as active
2295
2297
  if (config._parents) {
2296
2298
  config._parents.forEach(function (btn) {
2297
- return btn.activeList(_this.unique(), searchType === 'empty' || searchType === 'notEmpty' || !!searchTerm);
2299
+ return btn.activeList(_this.unique() + 'number', searchType === 'empty' || searchType === 'notEmpty' || !!searchTerm);
2298
2300
  });
2299
2301
  }
2300
2302
  var column = dt.column(_this.idx());
@@ -2382,7 +2384,7 @@ var searchText = {
2382
2384
  var _this = this;
2383
2385
  var dt = this.dt();
2384
2386
  var i18nBase = 'columnControl.search.text.';
2385
- var searchInput = new SearchInput(dt, this.idx())
2387
+ var searchInput = new SearchInput(dt, this.idx(), this.idxOriginal())
2386
2388
  .addClass('dtcc-searchText')
2387
2389
  .clearable(config.clear)
2388
2390
  .placeholder(config.placeholder)
@@ -2405,7 +2407,7 @@ var searchText = {
2405
2407
  // If in a dropdown, set the parent levels as active
2406
2408
  if (config._parents) {
2407
2409
  config._parents.forEach(function (btn) {
2408
- return btn.activeList(_this.unique(), searchType === 'empty' || searchType === 'notEmpty' || !!searchTerm);
2410
+ return btn.activeList(_this.unique() + 'text', searchType === 'empty' || searchType === 'notEmpty' || !!searchTerm);
2409
2411
  });
2410
2412
  }
2411
2413
  var column = dt.column(_this.idx());
@@ -2465,7 +2467,7 @@ var searchText = {
2465
2467
  // If in a dropdown, set the parent levels as active
2466
2468
  if (config._parents) {
2467
2469
  config._parents.forEach(function (btn) {
2468
- return btn.activeList(_this.unique(), !!column.search.fixed('dtcc'));
2470
+ return btn.activeList(_this.unique() + 'string', !!column.search.fixed('dtcc'));
2469
2471
  });
2470
2472
  }
2471
2473
  if (!loadingState) {
@@ -2518,7 +2520,7 @@ var search = {
2518
2520
  displayEl = initType('list');
2519
2521
  }
2520
2522
  }
2521
- else {
2523
+ if (!displayEl) {
2522
2524
  // Wait until we can get the data type for the column and the run the corresponding type
2523
2525
  displayEl = document.createElement('div');
2524
2526
  dt.ready(function () {
@@ -2740,6 +2742,20 @@ var ColumnControl = /** @class */ (function () {
2740
2742
  ColumnControl.prototype.idx = function () {
2741
2743
  return this._s.columnIdx;
2742
2744
  };
2745
+ /**
2746
+ * Get the column index that was originally used for initialisation of this
2747
+ * column. This is important when used with ColReorder and when arrays can
2748
+ * be reordered (i.e. state saving on initialisation).
2749
+ *
2750
+ * @returns Column index
2751
+ */
2752
+ ColumnControl.prototype.idxOriginal = function () {
2753
+ var currentIdx = this.idx();
2754
+ if (this._dt.colReorder) {
2755
+ return this._dt.colReorder.transpose(currentIdx, 'toOriginal');
2756
+ }
2757
+ return currentIdx;
2758
+ };
2743
2759
  /**
2744
2760
  * Covert the options from `content` in the DataTable initialisation for this instance into a
2745
2761
  * resolved plugin and options.
@@ -2834,7 +2850,7 @@ var ColumnControl = /** @class */ (function () {
2834
2850
  /** SVG icons that can be used by the content plugins */
2835
2851
  ColumnControl.icons = icons;
2836
2852
  /** Version */
2837
- ColumnControl.version = '1.2.0';
2853
+ ColumnControl.version = '1.2.1';
2838
2854
  return ColumnControl;
2839
2855
  }());
2840
2856
 
@@ -2936,7 +2952,10 @@ DataTable.ext.buttons.ccSearchClear = {
2936
2952
  // No point in wasting clock cycles if we already know it will be enabled
2937
2953
  if (!glob) {
2938
2954
  dt.columns().every(function () {
2939
- if (this.search.fixed('dtcc') || this.search.fixed('dtcc-list')) {
2955
+ if (this.search.fixed('dtcc') ||
2956
+ this.search.fixed('dtcc-list') ||
2957
+ this.init().__ccList // server-side processing
2958
+ ) {
2940
2959
  enabled = true;
2941
2960
  }
2942
2961
  });
@@ -1,8 +1,8 @@
1
- /*! ColumnControl 1.2.0
1
+ /*! ColumnControl 1.2.1
2
2
  * Copyright (c) SpryMedia Ltd - datatables.net/license
3
3
  *
4
4
  * SVG icons: ISC License
5
5
  * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT).
6
6
  * All other copyright (c) for Lucide are held by Lucide Contributors 2022.
7
7
  */
8
- (n=>{var r,o;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return n(t,window,document)}):"object"==typeof exports?(r=require("jquery"),o=function(t,e){e.fn.dataTable||require("datatables.net")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||r(t),o(t,e),n(e,0,t.document)}:(o(window,r),module.exports=n(r,window,window.document))):n(jQuery,window,document)})(function(t,o,u){var x=t.fn.dataTable;function y(t,e,n,r){void 0===e&&(e=[]),void 0===n&&(n=null),void 0===r&&(r=[]);var o=u.createElement(t);return i(o,e),n&&(o.innerHTML=n),r.forEach(function(t){o.appendChild(t)}),o}function i(e,t){t&&(t=Array.isArray(t)?t:[t]).forEach(function(t){e&&t&&e.classList.add(t)})}function e(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'+t+"</svg>"}var c={chevronRight:e('<path d="m9 18 6-6-6-6"/>'),columns:e('<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 3v18"/><path d="M15 3v18"/>'),contains:e('<path d="M10 3h4v18h-4z"/><path d="M18 8h3v9h-3"/><path d="M6 17H3V8h3"/>'),empty:e('<circle cx="12" cy="12" r="10"/>'),ends:e('<path d="M21 3h-4v18h4z"/><path d="M13 8H3v9h10"/>'),equal:e('<line x1="5" x2="19" y1="9" y2="9"/><line x1="5" x2="19" y1="15" y2="15"/>'),greater:e('<path d="m9 18 6-6-6-6"/>'),greaterOrEqual:e('<path d="m9 16 6-6-6-6"/><path d="m9 21 6-6"/>'),groupAdd:e('<path d="M6 21v-7.5m-3.549 3.75H9.75"/><rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" fill="currentColor" rx="1.5"/>'),groupClear:e('<rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),groupTop:e('<rect width="13.5" height="7.5" x="3" y="3" fill="currentColor" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),groupRemove:e('<path d="M2.451 17.25H9.75"/><rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),less:e('<path d="m15 18-6-6 6-6"/>'),lessOrEqual:e('<path d="m15 16-6-6 6-6"/><path d="m15 21-6-6"/>'),menu:e('<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>'),move:e('<line x1="12" x2="12" y1="3" y2="21"/><polyline points="8 8 4 12 8 16"/><polyline points="16 16 20 12 16 8"/>'),moveLeft:e('<path d="m9 6-6 6 6 6"/><path d="M3 12h14"/><path d="M21 19V5"/>'),moveRight:e('<path d="M3 5v14"/><path d="M21 12H7"/><path d="m15 18 6-6-6-6"/>'),notContains:e('<path d="M15 4 9 20"/><path d="M3 8h18v9H3z"/>'),notEmpty:e('<circle cx="12" cy="12" r="10"/><line x1="9" x2="15" y1="15" y2="9"/>'),notEqual:e('<path d="M5 9h14"/><path d="M5 15h14"/><path d="M15 5 9 19"/>'),orderAddAsc:e('<path d="M17 21v-8"/><path d="M3 4h6"/><path d="M3 8h9"/><path d="M3 12h10"/><path d="M13 17h8"/>'),orderAddDesc:e('<path d="M17 21v-8"/><path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="M13 17h8"/>'),orderAsc:e('<path d="m3 8 4-4 4 4"/><path d="M7 4v16"/><path d="M11 12h4"/><path d="M11 16h7"/><path d="M11 20h10"/>'),orderClear:e('<path d="m21 21-8-8"/><path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="m13 21 8-8"/>'),orderDesc:e('<path d="m3 16 4 4 4-4"/><path d="M7 20V4"/><path d="M11 4h10"/><path d="M11 8h7"/><path d="M11 12h4"/>'),orderRemove:e('<path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="M13 17h8"/>'),orderNone:e('<path d="m3 8 4-4 4 4"/><path d="m11 16-4 4-4-4"/><path d="M7 4v16"/><path d="M15 8h6"/><path d="M15 16h6"/><path d="M13 12h8"/>'),search:e('<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>'),searchClear:e('<path d="m13.5 8.5-5 5"/><path d="m8.5 8.5 5 5"/><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>'),starts:e('<path d="M3 3h4v18H3z"/><path d="M11 8h10v9H11"/>'),tick:e('<path d="M20 6 9 17l-5-5"/>'),x:e('<path d="M18 6 6 18"/><path d="m6 6 12 12"/>')};function a(t,e){return e.closest("div.dtfh-floatingparent")||t.table().container()}function d(t,e,n){var r=n.closest("div.dt-column-header"),e=a(e,n),r=getComputedStyle(r),o=t.offsetWidth,i=((t,e)=>{for(var n=0,r=0;e&&e!==t&&e!==u.body;)n+=e.offsetTop,r+=e.offsetLeft,e.scrollTop&&(r-=e.scrollTop),e.scrollLeft&&(r-=e.scrollLeft),e=e.offsetParent;return{top:n,left:r}})(e,n),s=i.top+n.offsetHeight,r="row-reverse"===r.flexDirection?i.left:i.left-o+n.offsetWidth,i=e.offsetWidth;i<r+o&&(r-=r+o-i),r<0&&(r=0),t.style.top=s+"px",t.style.left=r+"px"}function h(n,t,e){function r(t){var e;n._shown?t.target===n||n.contains(t.target)||(e=u.querySelector("div.dt-datetime"))&&(t.target===e||e.contains(t.target))||(n._close(),u.body.removeEventListener("click",r)):u.body.removeEventListener("click",r)}var o=a(t,e.element());n._shown=!0,o.append(n),d(n,t,e.element()),e.element().setAttribute("aria-expanded","true");u.body.addEventListener("click",r)}var p={classes:{container:"dtcc-dropdown",liner:"dtcc-dropdown-liner"},defaults:{className:"dropdown",content:[],icon:"menu",text:"More..."},init:function(n){var r=this.dt(),o=y("div",p.classes.container,"",[y("div",p.classes.liner)]),t=(o._shown=!1,o._close=function(){o.remove(),o._shown=!1,i.element().setAttribute("aria-expanded","false")},o.setAttribute("role","dialog"),o.setAttribute("aria-label",r.i18n("columnControl.dropdown",n.text)),r.on("fixedheader-mode",function(){o._shown&&h(o,r,n._parents?n._parents[0]:i)}),o.childNodes[0]),i=new f(r,this).text(r.i18n("columnControl.dropdown",n.text)).icon(n.icon).className(n.className).dropdownDisplay(t).handler(function(t){var e;t._closed&&t._closed.includes(o)||(h(o,r,n._parents?n._parents[0]:i),(e=o.querySelector("input, a, button"))&&"keypress"===t.type&&e.focus())});i.element().setAttribute("aria-haspopup","dialog"),i.element().setAttribute("aria-expanded","false");for(var e=0;e<n.content.length;e++){var s=this.resolve(n.content[e]),s=(s.config._parents||(s.config._parents=[]),s.config._parents.push(i),s.plugin.init.call(this,s.config));t.appendChild(s)}n._parents&&n._parents.length&&i.extra("chevronRight"),r.on("columns-reordered",function(){d(o,r,i.element())});function a(t){var e,n;c._shown&&(e=Array.from(c.querySelectorAll("a, button, input, select")),n=u.activeElement,"Escape"===t.key?(c._close(),l.focus()):"Tab"===t.key&&0!==e.length&&(e.includes(n)?t.shiftKey?n===e[0]&&(e[e.length-1].focus(),t.preventDefault()):n===e[e.length-1]&&(e[0].focus(),t.preventDefault()):(e[0].focus(),t.preventDefault())))}var c,l;c=o,l=i.element();return u.body.addEventListener("keydown",a),r.on("destroy",function(){u.body.removeEventListener("keydown",a)}),i.element()}},R=0,f=(n.prototype.active=function(t){return void 0===t?this._s.active:(this._s.active=t,this._checkActive(),this)},n.prototype.activeList=function(t,e){return this._s.activeList[t]=e,this._checkActive(),this},n.prototype.checkDisplay=function(){for(var t=0,e=this._dom.dropdownDisplay.childNodes,n=0;n<e.length;n++)"none"!==e[n].style.display&&t++;return 0===t&&(this._dom.button.style.display="none"),this},n.prototype.className=function(t){return this._dom.button.classList.add("dtcc-button_"+t),this},n.prototype.destroy=function(){this._s.buttonClick&&(this._dom.button.removeEventListener("click",this._s.buttonClick),this._dom.button.removeEventListener("keypress",this._s.buttonClick)),this._s.host.destroyRemove(this)},n.prototype.dropdownDisplay=function(t){return this._dom.dropdownDisplay=t,this},n.prototype.element=function(){return this._dom.button},n.prototype.enable=function(t){return void 0===t?this._s.enabled:(this._dom.button.classList.toggle("dtcc-button_disabled",!t),this._s.enabled=t,this)},n.prototype.extra=function(t){return this._dom.extra.innerHTML=t?c[t]:"",this},n.prototype.handler=function(n){function t(t){var e;void 0===(e=t)&&(e=null),u.querySelectorAll("div.dtcc-dropdown").forEach(function(t){null!==e&&t.contains(e.target)||(t._close(),e._closed||(e._closed=[]),e._closed.push(t))}),t.stopPropagation(),t.preventDefault(),r._s.enabled&&n(t)}var r=this;return this._s.buttonClick=t,this._s.namespace="dtcc-"+R++,this._dom.button.addEventListener("click",t),this._dom.button.addEventListener("keypress",t),this._s.host.destroyAdd(this),this},n.prototype.icon=function(t){return this._dom.icon.innerHTML=t?c[t]:"",this},n.prototype.text=function(t){return void 0===t?this._s.label:(this._dom.text.innerHTML=t,this._s.label=t,this._dom.button.setAttribute("aria-label",t),this)},n.prototype.value=function(t){return void 0===t?this._s.value:(this._s.value=t,this)},n.prototype._checkActive=function(){return!0===this._s.active||Object.values(this._s.activeList).includes(!0)?(this._dom.state.innerHTML=c.tick,this._dom.button.classList.add("dtcc-button_active")):(this._dom.state.innerHTML="",this._dom.button.classList.remove("dtcc-button_active")),this},n.classes={container:"dtcc-button"},n);function n(t,e){this._s={active:!1,activeList:[],buttonClick:null,dt:null,enabled:!0,host:null,label:"",namespace:"",value:null},this._s.dt=t,this._s.host=e,this._dom={button:y("button",n.classes.container),dropdownDisplay:null,extra:y("span","dtcc-button-extra"),icon:y("span","dtcc-button-icon"),state:y("span","dtcc-button-state"),text:y("span","dtcc-button-text")},this._dom.button.setAttribute("type","button"),this._dom.button.append(this._dom.icon),this._dom.button.append(this._dom.text),this._dom.button.append(this._dom.state),this._dom.button.append(this._dom.extra),this.enable(!0)}l.prototype.add=function(n,t){for(var r=this,o=(Array.isArray(n)||(n=[n]),this),e=0;e<n.length;e++)(t=>{var t=n[t],e=new f(o._s.dt,o._s.host).active(t.active||!1).handler(function(t){r._s.handler(t,e,r._s.buttons,!0),r._updateCount()}).icon(t.icon||"").text(""!==t.label?t.label:o._s.dt.i18n("columnControl.list.empty","Empty")).value(t.value);""===t.label&&e.className("empty"),o._s.buttons.push(e)})(e);var i=this._s.buttons.length;return!0!==t&&void 0!==t||(this._dom.selectAllCount.innerHTML=i?"("+i+")":"",this._redraw()),this},l.prototype.button=function(t){for(var e=this._s.buttons,n=0;n<e.length;n++)if(e[n].value()===t)return e[n];return null},l.prototype.clear=function(){for(var t=0;t<this._s.buttons.length;t++)this._s.buttons[t].destroy();return this._dom.buttons.replaceChildren(),this._s.buttons.length=0,this},l.prototype.element=function(){return this._dom.container},l.prototype.handler=function(t){return this._s.handler=t,this},l.prototype.searchListener=function(t){var n=this;return t.on("cc-search-clear",function(t,e){e===n._s.host.idx()&&(n.selectNone(),n._s.handler(t,null,n._s.buttons,!1),n._s.search="",n._dom.search.value="",n._redraw(),n._updateCount())}),this},l.prototype.selectAll=function(){for(var t=0;t<this._s.buttons.length;t++)this._s.buttons[t].active(!0);return this},l.prototype.selectNone=function(){for(var t=0;t<this._s.buttons.length;t++)this._s.buttons[t].active(!1);return this},l.prototype.title=function(t){return this._dom.title.innerHTML=t,this},l.prototype.values=function(t){var e,n=[],r=this._s.buttons;if(void 0!==t){for(e=0;e<r.length;e++)t.includes(r[e].value())&&r[e].active(!0);return this._updateCount(),this}for(e=0;e<r.length;e++)r[e].active()&&n.push(r[e].value());return n},l.prototype._updateCount=function(){var t=this.values().length;this._dom.selectNoneCount.innerHTML=t?"("+t+")":""},l.prototype._redraw=function(){var t=this._s.buttons,e=this._dom.buttons,n=this._s.search.toLowerCase();e.replaceChildren();for(var r=0;r<t.length;r++){var o=t[r];n&&!o.text().toLowerCase().includes(n)||e.appendChild(o.element())}this._dom.empty.style.display=0===t.length?"block":"none",e.style.display=0<t.length?"block":"none"},l.classes={container:"dtcc-list",input:"dtcc-list-search"};var m=l;function l(t,e,n){function r(){s._s.search=a.search.value,s._redraw()}function o(t){s.selectAll(),s._s.handler(t,null,s._s.buttons,!0),s._updateCount()}function i(t){s.selectNone(),s._s.handler(t,null,s._s.buttons,!0),s._updateCount()}var s=this,a=(this._s={buttons:[],dt:null,handler:function(){},host:null,search:""},this._s.dt=t,this._s.host=e,this._dom={buttons:y("div","dtcc-list-buttons"),container:y("div",l.classes.container),controls:y("div","dtcc-list-controls"),empty:y("div","dtcc-list-empty",t.i18n("columnControl.list.empty","No options")),title:y("div","dtcc-list-title"),selectAll:y("button","dtcc-list-selectAll",t.i18n("columnControl.list.all","Select all")),selectAllCount:y("span"),selectNone:y("button","dtcc-list-selectNone",t.i18n("columnControl.list.none","Deselect")),selectNoneCount:y("span"),search:y("input",l.classes.input)},this._dom);a.search.setAttribute("type","text"),a.container.append(a.title),a.container.append(a.controls),a.container.append(a.empty),a.container.append(a.buttons),n.select&&(a.controls.append(a.selectAll),a.controls.append(a.selectNone),a.selectAll.append(a.selectAllCount),a.selectNone.append(a.selectNoneCount),a.selectAll.setAttribute("type","button"),a.selectNone.setAttribute("type","button"));n.search&&(a.controls.append(a.search),a.search.setAttribute("placeholder",t.i18n("columnControl.list.search","Search...")),a.search.addEventListener("input",r)),a.selectAll.addEventListener("click",o),a.selectNone.addEventListener("click",i),t.on("destroy",function(){a.selectAll.removeEventListener("click",o),a.selectNone.removeEventListener("click",i),a.search.removeEventListener("input",r)})}var r={defaults:{className:"colVis",columns:"",search:!1,select:!1,title:"Column visibility"},init:function(t){function n(){o.columns(t.columns).every(function(){i.add({active:this.visible(),label:this.title(),value:this.index()})})}var o=this.dt(),i=new m(o,this,{search:t.search,select:t.select}).title(o.i18n("columnControl.colVis",t.title)).handler(function(t,e,n){e&&e.active(!e.active()),r(n)}),r=function(t){for(var e=0;e<t.length;e++){var n=t[e],r=n.value(),r=o.column(r);n.active()&&!r.visible()?r.visible(!0):!n.active()&&r.visible()&&r.visible(!1)}};return n(),o.on("column-visibility",function(t,e,n,r){n=i.button(n);n&&n.active(r)}),o.on("columns-reordered",function(t,e){i.clear(),n()}),i.element()}},H={defaults:{className:"colVis",columns:"",search:!1,select:!1,text:"Column visibility",title:"Column visibility"},extend:function(t){return{extend:"dropdown",icon:"columns",text:this.dt().i18n("columnControl.colVisDropdown",t.text),content:[Object.assign(t,{extend:"colVis"})]}}},I={defaults:{className:"reorder",icon:"move",text:"Reorder columns"},init:function(t){var n=this,e=this.dt(),r=new f(e,this).text(e.i18n("columnControl.reorder",t.text)).icon(t.icon).className(t.className);return 0===this.idx()&&r.enable(!1),e.on("columns-reordered",function(t,e){r.enable(0<n.idx())}),e.init().colReorder||new x.ColReorder(e,{}),r.element()}},G={defaults:{className:"reorderLeft",icon:"moveLeft",text:"Move column left"},init:function(t){var n=this,e=this.dt(),r=new f(e,this).text(e.i18n("columnControl.reorderLeft",t.text)).icon(t.icon).className(t.className).handler(function(){var t=n.idx();0<t&&e.colReorder.move(t,t-1)});return 0===this.idx()&&r.enable(!1),e.on("columns-reordered",function(t,e){r.enable(0<n.idx())}),r.element()}},V={defaults:{className:"reorderRight",icon:"moveRight",text:"Move column right"},init:function(t){var n=this,r=this.dt(),o=new f(r,this).text(r.i18n("columnControl.reorderRight",t.text)).icon(t.icon).className(t.className).handler(function(){var t=n.idx();t<r.columns().count()-1&&r.colReorder.move(t,t+1)});return this.idx()===r.columns().count()-1&&o.enable(!1),r.on("columns-reordered",function(t,e){o.enable(n.idx()<r.columns().count()-1)}),o.element()}},P={defaults:{className:"order",iconAsc:"orderAsc",iconDesc:"orderDesc",iconNone:"orderNone",statusOnly:!1,text:"Toggle ordering"},init:function(r){var o=this,t=this.dt(),i=new f(t,this).text(t.i18n("columnControl.order",r.text)).icon("orderAsc").className(r.className);return r.statusOnly||t.order.listener(i.element(),x.versionCheck("2.3.2")?function(){return[o.idx()]}:this.idx(),function(){}),t.on("order",function(t,e,n){n=n.find(function(t){return t.col===o.idx()});n?"asc"===n.dir?i.active(!0).icon(r.iconAsc):"desc"===n.dir&&i.active(!0).icon(r.iconDesc):i.active(!1).icon(r.iconNone)}),i.element()}},U={defaults:{className:"orderAddAsc",icon:"orderAddAsc",text:"Add Sort Ascending"},init:function(t){var r=this,e=this.dt(),o=new f(e,this).text(e.i18n("columnControl.orderAddAsc",t.text)).icon(t.icon).className(t.className).handler(function(){e.order().push([r.idx(),"asc"]),e.draw()});return e.on("order",function(t,e,n){n=n.some(function(t){return t.col===r.idx()});o.enable(!n)}),o.element()}},W={defaults:{className:"orderAddDesc",icon:"orderAddDesc",text:"Add Sort Descending"},init:function(t){var r=this,e=this.dt(),o=new f(e,this).text(e.i18n("columnControl.orderAddDesc",t.text)).icon(t.icon).className(t.className).handler(function(){e.order().push([r.idx(),"desc"]),e.draw()});return e.on("order",function(t,e,n){n=n.some(function(t){return t.col===r.idx()});o.enable(!n)}),o.element()}},B={defaults:{className:"orderAsc",icon:"orderAsc",text:"Sort Ascending"},init:function(t){var r=this,e=this.dt(),o=new f(e,this).text(e.i18n("columnControl.orderAsc",t.text)).icon(t.icon).className(t.className).handler(function(){r.dt().order([{idx:r.idx(),dir:"asc"}]).draw()});return e.on("order",function(t,e,n){n=n.some(function(t){return t.col===r.idx()&&"asc"===t.dir});o.active(n)}),o.element()}},z={defaults:{className:"orderClear",icon:"orderClear",text:"Clear sort"},init:function(t){var e=this.dt(),r=new f(e,this).text(e.i18n("columnControl.orderClear",t.text)).icon(t.icon).className(t.className).handler(function(){e.order([]).draw()});return e.on("order",function(t,e,n){r.enable(0<n.length)}),0===e.order().length&&r.enable(!1),r.element()}},F={defaults:{className:"orderDesc",icon:"orderDesc",text:"Sort Descending"},init:function(t){var r=this,e=this.dt(),o=new f(e,this).text(e.i18n("columnControl.orderDesc",t.text)).icon(t.icon).className(t.className).handler(function(){r.dt().order([{idx:r.idx(),dir:"desc"}]).draw()});return e.on("order",function(t,e,n){n=n.some(function(t){return t.col===r.idx()&&"desc"===t.dir});o.active(n)}),o.element()}},X={defaults:{className:"orderRemove",icon:"orderRemove",text:"Remove from sort"},init:function(t){var r=this,n=this.dt(),o=new f(n,this).text(n.i18n("columnControl.orderRemove",t.text)).icon(t.icon).className(t.className).handler(function(){var t=n.order(),e=t.findIndex(function(t){return t[0]===r.idx()});t.splice(e,1),n.order(t).draw()});return n.on("order",function(t,e,n){n=n.some(function(t){return t.col===r.idx()});o.enable(n)}),o.enable(!1),o.element()}},Z={defaults:{className:"order",iconAsc:"orderAsc",iconDesc:"orderDesc",iconNone:"orderNone",statusOnly:!0,text:"Sort status"},extend:function(t){return Object.assign(t,{extend:"order"})}};function s(t,e){var n=v(t);-1===n.indexOf(e)&&(n.push(e),t.rowGroup().dataSrc(n))}function v(t){t=t.rowGroup().dataSrc();return Array.isArray(t)?t:[t]}function _(t){t.rowGroup().dataSrc([])}function g(t,e){var n=v(t),e=n.indexOf(e);-1!==e&&(n.splice(e,1),t.rowGroup().dataSrc(n))}var K={defaults:{className:"rowGroup",icon:"groupTop",order:!0,text:"Group rows"},init:function(e){var n=this,r=this.dt(),o=new f(r,this).text(r.i18n("columnControl.rowGroup",e.text)).icon(e.icon).className(e.className).handler(function(){var t=r.column(n.idx()).dataSrc();o.active()?g(r,t):(_(r),s(r,t),!1!==e.order&&r.order([n.idx(),"asc"])),r.draw()});return r.on("rowgroup-datasrc",function(){var t=v(r),e=r.column(n.idx()).dataSrc();o.active(t.includes(e))}),o.element()}},Q={defaults:{className:"rowGroupAdd",icon:"groupAdd",order:!0,text:"Add to grouping"},init:function(t){var n=this,r=this.dt(),o=new f(r,this).text(r.i18n("columnControl.rowGroup",t.text)).icon(t.icon).className(t.className).handler(function(){var t=r.column(n.idx()).dataSrc();o.enable()&&s(r,t),r.draw()});return r.on("rowgroup-datasrc",function(){var t=v(r),e=r.column(n.idx()).dataSrc();o.enable(!t.includes(e))}),o.element()}},$={defaults:{className:"rowGroupClear",icon:"groupClear",text:"Clear all grouping"},init:function(t){var e=this.dt(),n=new f(e,this).text(e.i18n("columnControl.rowGroup",t.text)).icon(t.icon).className(t.className).handler(function(){_(e),e.draw()});return e.on("rowgroup-datasrc",function(){n.enable(0<v(e).length)}),n.enable(0<v(e).length),n.element()}},J={defaults:{className:"rowGroupRemove",icon:"groupRemove",order:!0,text:"Remove from grouping"},init:function(t){var n=this,r=this.dt(),o=new f(r,this).text(r.i18n("columnControl.rowGroup",t.text)).icon(t.icon).className(t.className).handler(function(){var t=r.column(n.idx()).dataSrc();o.enable()&&(g(r,t),r.draw())});return r.on("rowgroup-datasrc",function(){var t=v(r),e=r.column(n.idx()).dataSrc();o.enable(t.includes(e))}),o.enable(!1),o.element()}},b=(w.prototype.addClass=function(t){return this._dom.container.classList.add(t),this},w.prototype.clear=function(){return this.set(this._dom.select.children[0].getAttribute("value"),""),this},w.prototype.clearable=function(t){return t||this._dom.clear.remove(),this},w.prototype.element=function(){return this._dom.container},w.prototype.input=function(){return this._dom.input},w.prototype.options=function(t){for(var e=this._dom.select,n=0;n<t.length;n++)e.add(new Option(t[n].label,t[n].value));return this._dom.typeIcon.innerHTML=c[t[0].value],this},w.prototype.placeholder=function(t){var e;return t&&(e=this._dt.column(this._idx).title(),this._dom.input.placeholder=t.replace("[title]",e)),this},w.prototype.runSearch=function(){var t=this._dom,e="empty"===t.select.value||"notEmpty"===t.select.value||""!==t.input.value;t.container.classList.toggle("dtcc-search_active",e),!this._search||this._lastValue===t.input.value&&this._lastType===t.select.value||(this._search(t.select.value,t.input.value,this._loadingState),this._lastValue=t.input.value,this._lastType=t.select.value)},w.prototype.search=function(t){return this._search=t,this._stateLoad(this._dt.state.loaded()),this},w.prototype.set=function(t,e){var n=this._dom;return n.input.value=e,n.select.value=t,n.typeIcon.innerHTML=c[n.select.value],this.runSearch(),this},w.prototype.sspTransform=function(t){return this._sspTransform=t,this},w.prototype.sspData=function(t){return this._sspData=t,this},w.prototype.title=function(t){var e;return t&&(e=this._dt.column(this._idx).title(),this._dom.title.innerHTML=t.replace("[title]",e)),this},w.prototype.titleAttr=function(t){var e;return t&&(e=this._dt.column(this._idx).title(),this._dom.input.title=t.replace("[title]",e)),this},w.prototype.type=function(t){return this._type=t,this},w.prototype._stateLoad=function(t){var e=this._dom,n=this._idx,n=null==(t=null==(t=null==t?void 0:t.columnControl)?void 0:t[n])?void 0:t.searchInput;n&&(this._loadingState=!0,e.select.value=n.logic,e.input.value=n.value,e.select.dispatchEvent(new Event("input")),this._loadingState=!1)},w.classes={container:["dtcc-content","dtcc-search"],input:"",select:""},w);function w(n,t){function e(){i.runSearch()}function r(){s.typeIcon.innerHTML=c[s.select.value],i.runSearch()}function o(){i.clear()}var i=this,s=(this._type="text",this._sspTransform=null,this._sspData={},this._dt=n,this._idx=t,this._dom={clear:y("span","dtcc-search-clear",c.x),container:y("div",w.classes.container),typeIcon:y("div","dtcc-search-type-icon"),searchIcon:y("div","dtcc-search-icon",c.search),input:y("input",w.classes.input),inputs:y("div"),select:y("select",w.classes.select),title:y("div","dtcc-search-title")},this._dom),a=t;s.input.setAttribute("type","text"),s.container.append(s.title,s.inputs),s.inputs.append(s.typeIcon,s.select,s.searchIcon,s.clear,s.input);s.input.addEventListener("input",e),s.select.addEventListener("input",r),s.clear.addEventListener("click",o),n.on("destroy",function(){s.input.removeEventListener("input",e),s.select.removeEventListener("input",r),s.clear.removeEventListener("click",o)}),n.on("stateSaveParams.DT",function(t,e,n){n.columnControl||(n.columnControl={}),n.columnControl[i._idx]||(n.columnControl[i._idx]={}),n.columnControl[i._idx].searchInput={logic:s.select.value,type:i._type,value:s.input.value}}),n.on("stateLoaded.DT",function(t,e,n){i._stateLoad(n)}),n.on("columns-reordered.DT",function(t,e){i._idx=n.colReorder.transpose(a,"fromOriginal")}),n.on("cc-search-clear.DT",function(t,e){e===i._idx&&(i._loadingState=!0,i.clear(),i._loadingState=!1)}),n.page.info().serverSide&&n.on("preXhr.DT",function(t,e,n){var r;n.columns&&n.columns[i._idx]&&(n.columns[i._idx].columnControl||(n.columns[i._idx].columnControl={}),r=i._dom.input.value,i._sspTransform&&(r=i._sspTransform(r)),n.columns[i._idx].columnControl.search=Object.assign({value:r,logic:i._dom.select.value,type:i._type},i._sspData))})}var C={defaults:{clear:!0,excludeLogic:[],format:"",mask:"",placeholder:"",title:"",titleAttr:""},init:function(s){var a,c=this,l=!1,u=x.use("moment"),d=x.use("luxon"),h=this.dt(),t="columnControl.search.datetime.",p="",f="",e=new b(h,this.idx()).type("date").addClass("dtcc-searchDateTime").sspTransform(function(t){var e=p,n=u,r=d;return""===t?"":"YYYY-MM-DD"!==e&&n?n.utc(t,e).toISOString():"YYYY-MM-DD"!==e&&r?r.DateTime.fromFormat(t,e).toISO():t=t.replace(/\//g,"-")}).sspData({mask:s.mask}).clearable(s.clear).placeholder(s.placeholder).title(s.title).titleAttr(s.titleAttr).options([{label:h.i18n(t+"equal","Equals"),value:"equal"},{label:h.i18n(t+"notEqual","Does not equal"),value:"notEqual"},{label:h.i18n(t+"greater","After"),value:"greater"},{label:h.i18n(t+"less","Before"),value:"less"},{label:h.i18n(t+"empty","Empty"),value:"empty"},{label:h.i18n(t+"notEmpty","Not empty"),value:"notEmpty"}].filter(function(t){return!s.excludeLogic.includes(t.value)})).search(function(e,n,t){s._parents&&s._parents.forEach(function(t){return t.activeList(c.unique(),"empty"===e||"notEmpty"===e||!!n)});var r=h.column(c.idx());if(h.page.info().serverSide)r.init().__ccList=!("empty"!==e&&"notEmpty"!==e&&!n),t||h.draw();else{var o=s.mask,i=""===n?"":A(a&&l?a.val():n.trim(),p,u,d,o);if("empty"===e)r.search.fixed("dtcc",function(t){return!t});else if("notEmpty"===e)r.search.fixed("dtcc",function(t){return!!t});else{if(""===r.search.fixed("dtcc")&&""===i)return;i?"equal"===e?r.search.fixed("dtcc",function(t){return A(t,f,u,d,o)==i}):"notEqual"===e?r.search.fixed("dtcc",function(t){return A(t,f,u,d,o)!=i}):"greater"===e?r.search.fixed("dtcc",function(t){return A(t,f,u,d,o)>i}):"less"===e&&r.search.fixed("dtcc",function(t){return A(t,f,u,d,o)<i}):r.search.fixed("dtcc","")}t||r.draw()}});return h.ready(function(){var t=x.use("datetime");f=((t,e)=>{var n=t.column(e).type();if(n)if("datetime"===n){t=t.settings()[0].aoColumns[e].mRender,e=t("1999-08-07T23:05:04Z","display"),t=t("1999-08-07T03:05:04Z","display").includes("03");if(x.use("moment"))return e.replace("23",t?"HH":"H").replace("11",t?"hh":"h").replace("05","mm").replace("04","ss").replace("PM","A").replace("pm","a").replace("07","DD").replace("7","D").replace("08","MM").replace("8","M").replace("1999","YYYY").replace("99","YY");if(x.use("luxon"))return e.replace("23",t?"HH":"H").replace("11",t?"hh":"h").replace("05","mm").replace("04","ss").replace("PM","a").replace("07","dd").replace("7","d").replace("08","MM").replace("8","M").replace("1999","yyyy").replace("99","yy");if(e.includes("23")&&e.includes("1999"))return"YYYY-MM-DD hh:mm:ss";if(e.includes("23"))return"hh:mm:ss"}else{if(n.includes("datetime-"))return n.replace(/datetime-/g,"");if(n.includes("moment"))return n.replace(/moment-/g,"");if(n.includes("luxon"))return n.replace(/luxon-/g,"")}return"YYYY-MM-DD"})(h,c.idx()),p=s.format||f,t&&(a=new t(e.input(),{format:p,i18n:h.settings()[0].oLanguage.datetime,onChange:function(){l=!0,e.runSearch(),l=!1}}))}),e.element()}};function A(t,e,n,r,o){return""===t?"":(n=t instanceof Date?t:"YYYY-MM-DD"!==e&&(n||r)?new Date(n?1e3*n(t,e).unix():r.DateTime.fromFormat(t,e).toMillis()):new Date(t.replace(/\//g,"-")),o&&(o.includes("YYYY")||n.setFullYear(1970),o.includes("MM")||n.setUTCMonth(0),o.includes("DD")||n.setUTCDate(1),o.includes("hh")||n.setUTCHours(0),o.includes("mm")||n.setUTCMinutes(0),o.includes("ss")||n.setUTCSeconds(0),o.includes("sss")||n.setUTCMilliseconds(0)),n.getTime())}function L(t,e){var n=t.values();t.clear();for(var r=0;r<e.length;r++)"object"==typeof e[r]?t.add({active:!1,label:e[r].label,value:e[r].value},r===e.length-1):t.add({active:!1,label:e[r],value:e[r]},r===e.length-1);n.length&&t.values(n)}function M(t,e){t=null==(e=null==(e=null==e?void 0:e.columnControl)?void 0:e[t])?void 0:e.searchList;if(t)return t}function tt(t,e){var n=null==(n=t.ajax.json())?void 0:n.columnControl,t=t.column(e),r=t.name(),t=t.dataSrc();return n&&n[r]?n[r]:n&&"string"==typeof t&&n[t]?n[t]:n&&n[e]?n[e]:null}function N(t,e,n,r,o){var i=null==(i=t.ajax.json())?void 0:i.columnControl,s=[],a=tt(t,n);if(a)s=a;else{if(i&&e.ajaxOnly)return void(e.hidable&&(r.element().style.display="none",e._parents)&&e._parents.forEach(function(t){return t.checkDisplay()}));if(!t.page.info().serverSide)for(var c={},l=t.rows({order:n}).indexes().toArray(),u=t.settings()[0],d=0;d<l.length;d++){var h=u.fastData(l[d],n,"filter"),h=null!=h?h.toString():"";c[h]||(c[h]=!0,s.push({label:u.fastData(l[d],n,e.orthogonal),value:h}))}}L(r,s),o&&r.values(o)}var E={defaults:{ajaxOnly:!0,className:"searchList",hidable:!0,options:null,orthogonal:"display",search:!0,select:!0,title:""},init:function(r){function o(e){r._parents&&r._parents.forEach(function(t){return t.activeList(i.unique(),e&&!!e.length)});var t=a.column(i.idx());a.page.info().serverSide?t.init().__ccList=e&&0!==e.length:e&&(0===e.length?t.search.fixed("dtcc-list",""):t.search.fixed("dtcc-list",function(t){return e.includes(t)}))}var i=this,s=null,a=this.dt(),c=new m(a,this,{search:r.search,select:r.select}).searchListener(a).title(a.i18n("columnControl.searchList",r.title).replace("[title]",a.column(this.idx()).title())).handler(function(t,e,n,r){e&&e.active(!e.active()),o(c.values()),r&&a.draw()}),l=(r.options?L(c,r.options):(a.ready(function(){N(a,r,i.idx(),c,s)}),a.on("xhr",function(t,e,n){a.one("draw",function(){N(a,r,i.idx(),c,s),s=null})})),[]);return a.page.info().serverSide&&a.on("preXhr.DT",function(t,e,n){var r;n.columns&&n.columns[i.idx()]&&(n.columns[i.idx()].columnControl||(n.columns[i.idx()].columnControl={}),r=l.length?l:c.values(),l=[],n.columns[i.idx()].columnControl.list=Object.assign({},r))}),a.on("stateLoaded",function(t,e,n){n=M(i.idx(),n);n&&(c.values(n),o(n))}),a.on("stateSaveParams",function(t,e,n){var r=i.idx();n.columnControl||(n.columnControl={}),n.columnControl[r]||(n.columnControl[r]={}),n.columnControl[r].searchList=a.ready()?c.values():s}),a.settings()[0].aoColumns[this.idx()].columnControlSearchList=function(t){"refresh"===t?N(a,r,i.idx(),c,null):L(c,t)},s=M(this.idx(),a.state.loaded()),o(s),a.page.info().serverSide&&s&&s.length&&(l=s),c.element()}},D={defaults:{clear:!0,excludeLogic:[],placeholder:"",title:"",titleAttr:""},init:function(o){var i=this,s=this.dt(),t="columnControl.search.number.",t=new b(s,this.idx()).type("num").addClass("dtcc-searchNumber").clearable(o.clear).placeholder(o.placeholder).title(o.title).titleAttr(o.titleAttr).options([{label:s.i18n(t+"equal","Equals"),value:"equal"},{label:s.i18n(t+"notEqual","Does not equal"),value:"notEqual"},{label:s.i18n(t+"greater","Greater than"),value:"greater"},{label:s.i18n(t+"greaterOrEqual","Greater or equal"),value:"greaterOrEqual"},{label:s.i18n(t+"less","Less than"),value:"less"},{label:s.i18n(t+"lessOrEqual","Less or equal"),value:"lessOrEqual"},{label:s.i18n(t+"empty","Empty"),value:"empty"},{label:s.i18n(t+"notEmpty","Not empty"),value:"notEmpty"}].filter(function(t){return!o.excludeLogic.includes(t.value)})).search(function(e,n,t){o._parents&&o._parents.forEach(function(t){return t.activeList(i.unique(),"empty"===e||"notEmpty"===e||!!n)});var r=s.column(i.idx());if(s.page.info().serverSide)r.init().__ccList=!("empty"!==e&&"notEmpty"!==e&&!n),t||s.draw();else{if("empty"===e)r.search.fixed("dtcc",function(t){return!t});else if("notEmpty"===e)r.search.fixed("dtcc",function(t){return!!t});else{if(""===r.search.fixed("dtcc")&&""===n)return;""===n?r.search.fixed("dtcc",""):"equal"===e?r.search.fixed("dtcc",function(t){return S(t)==n}):"notEqual"===e?r.search.fixed("dtcc",function(t){return S(t)!=n}):"greater"===e?r.search.fixed("dtcc",function(t){return S(t)>n}):"greaterOrEqual"===e?r.search.fixed("dtcc",function(t){return S(t)>=n}):"less"===e?r.search.fixed("dtcc",function(t){return S(t)<n}):"lessOrEqual"===e&&r.search.fixed("dtcc",function(t){return S(t)<=n})}t||r.draw()}});return t.input().setAttribute("inputmode","numeric"),t.input().setAttribute("pattern","[0-9]*"),t.element()}},et=/<([^>]*>)/g,nt=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi;function S(t){var e;return 0===t||t&&"-"!==t?"number"==(e=typeof t)||"bigint"==e?t:+(t=t.replace?t.replace(et,"").replace(nt,""):t):-1/0}var q={defaults:{clear:!0,excludeLogic:[],placeholder:"",title:"",titleAttr:""},init:function(o){var i=this,s=this.dt(),t="columnControl.search.text.";return new b(s,this.idx()).addClass("dtcc-searchText").clearable(o.clear).placeholder(o.placeholder).title(o.title).titleAttr(o.titleAttr).options([{label:s.i18n(t+"contains","Contains"),value:"contains"},{label:s.i18n(t+"notContains","Does not contain"),value:"notContains"},{label:s.i18n(t+"equal","Equals"),value:"equal"},{label:s.i18n(t+"notEqual","Does not equal"),value:"notEqual"},{label:s.i18n(t+"starts","Starts"),value:"starts"},{label:s.i18n(t+"ends","Ends"),value:"ends"},{label:s.i18n(t+"empty","Empty"),value:"empty"},{label:s.i18n(t+"notEmpty","Not empty"),value:"notEmpty"}].filter(function(t){return!o.excludeLogic.includes(t.value)})).search(function(e,n,t){o._parents&&o._parents.forEach(function(t){return t.activeList(i.unique(),"empty"===e||"notEmpty"===e||!!n)});var r=s.column(i.idx());if(s.page.info().serverSide)r.init().__ccList=!("empty"!==e&&"notEmpty"!==e&&!n),t||s.draw();else{if(n=n.toLowerCase(),"empty"===e)r.search.fixed("dtcc",function(t){return!t});else if("notEmpty"===e)r.search.fixed("dtcc",function(t){return!!t});else{if(""===r.search.fixed("dtcc")&&""===n)return;""===n?r.search.fixed("dtcc",""):"equal"===e?r.search.fixed("dtcc",function(t){return t.toLowerCase()==n}):"notEqual"===e?r.search.fixed("dtcc",function(t){return t.toLowerCase()!=n}):"contains"===e?r.search.fixed("dtcc",n):"notContains"===e?r.search.fixed("dtcc",function(t){return!t.toLowerCase().includes(n)}):"starts"===e?r.search.fixed("dtcc",function(t){return t.toLowerCase().startsWith(n)}):"ends"===e&&r.search.fixed("dtcc",function(t){return t.toLowerCase().endsWith(n)})}o._parents&&o._parents.forEach(function(t){return t.activeList(i.unique(),!!r.search.fixed("dtcc"))}),t||r.draw()}}).element()}},r={colVis:r,colVisDropdown:H,dropdown:p,reorder:I,reorderLeft:G,reorderRight:V,rowGroup:K,rowGroupAdd:Q,rowGroupClear:$,rowGroupRemove:J,order:P,orderAddAsc:U,orderAddDesc:W,orderAsc:B,orderClear:z,orderDesc:F,orderRemove:X,orderStatus:Z,search:{defaults:{allowSearchList:!1},init:function(n){function e(t){var e=tt(i,s);return"list"===t||n.allowSearchList&&e?E.init.call(o,Object.assign({},E.defaults,n)):"date"===t||t.startsWith("datetime")?C.init.call(o,Object.assign({},C.defaults,n)):t.includes("num")?D.init.call(o,Object.assign({},D.defaults,n)):q.init.call(o,Object.assign({},q.defaults,n))}var r,o=this,i=this.dt(),s=this.idx(),t=null==(t=null==(t=i.state.loaded())?void 0:t.columnControl)?void 0:t[s];return t?t.searchInput?r=e(t.searchInput.type):t.searchList&&(r=e("list")):(r=u.createElement("div"),i.ready(function(){var t=i.column(s),t=e(t.type());r.replaceWith(t)})),r}},searchClear:{defaults:{className:"searchClear",icon:"searchClear",text:"Clear Search"},init:function(t){var o=this,i=this.dt(),s=new f(i,this).text(i.i18n("columnControl.searchClear",t.text)).icon(t.icon).className(t.className).handler(function(){i.column(o.idx()).columnControl.searchClear().draw()}).enable(!1);return i.on("draw",function(){var t=i.column(o.idx()),e=t.search.fixed("dtcc"),n=t.search.fixed("dtcc-list"),r=t.init().__ccSearch,t=t.init().__ccList;s.enable(!!(e||n||r||t))}),s.element()}},searchDropdown:{defaults:{ajaxOnly:!0,allowSearchList:!0,className:"searchDropdown",clear:!0,columns:"",hidable:!0,options:null,orthogonal:"display",placeholder:"",search:!0,select:!0,text:"Search",title:"",titleAttr:""},extend:function(t){return{extend:"dropdown",icon:"search",text:this.dt().i18n("columnControl.searchDropdown",t.text),content:[Object.assign(t,{extend:"search"})]}}},searchDateTime:C,searchList:E,searchNumber:D,searchText:q,spacer:{defaults:{className:"dtcc-spacer",text:""},init:function(t){var e=this.dt(),e=y("div",t.className,e.i18n("columnControl.spacer",t.text));return e.setAttribute("role","separator"),e}},title:{defaults:{className:"dtcc-title",text:null},init:function(t){var e=this.dt().column(this.idx()).title(),n=null===t.text?"[title]":t.text;return y("div",t.className,n.replace("[title]",e))}}},T=(k.prototype.destroyAdd=function(t){this._s.toDestroy.push(t)},k.prototype.destroyRemove=function(t){t=this._s.toDestroy.indexOf(t);-1!==t&&this._s.toDestroy.splice(t,1)},k.prototype.dt=function(){return this._dt},k.prototype.idx=function(){return this._s.columnIdx},k.prototype.resolve=function(t){var e=null,n=null,r=null;if("string"==typeof t?(e=k.content[r=t],n=Object.assign({},null==e?void 0:e.defaults)):Array.isArray(t)?(e=k.content[r="dropdown"],n=Object.assign({},null==e?void 0:e.defaults,{content:t})):t.extend&&(r=t.extend,e=k.content[r],n=Object.assign({},null==e?void 0:e.defaults,t)),e)return e.extend?(t=e.extend.call(this,n),this.resolve(t)):{config:n,type:r,plugin:e};throw new Error("Unknown ColumnControl content type: "+r)},k.prototype.unique=function(){return this._s.unique},k.prototype._target=function(){var t,e,n=this._c.target,r=this._dt.column(this._s.columnIdx),o="header";return"number"==typeof n?t=r.header(n):(e="tfoot"!==(n=n.split(":"))[0],n=n[1]?parseInt(n[1]):0,e?t=r.header(n):(t=r.footer(n),o="footer")),t.querySelector("div.dt-column-"+o)},k.Button=f,k.CheckList=m,k.SearchInput=b,k.content=r,k.defaults={className:"",content:null,target:0},k.icons=c,k.version="1.2.0",k);function k(n,t,e){var r=this,o=(this._dom={target:null,wrapper:null},this._c={},this._s={columnIdx:null,unique:null,toDestroy:[]},this._dt=n,this._s.columnIdx=t,this._s.unique=Math.random(),t);Object.assign(this._c,k.defaults,e),this._dom.target=this._target(),e.className&&i(this._dom.target.closest("tr"),e.className),this._c.content&&(n.on("columns-reordered",function(t,e){r._s.columnIdx=n.colReorder.transpose(o,"fromOriginal")}),this._dom.wrapper=u.createElement("span"),this._dom.wrapper.classList.add("dtcc"),this._dom.target.appendChild(this._dom.wrapper),this._c.content.forEach(function(t){t=r.resolve(t),t=t.plugin.init.call(r,t.config);r._dom.wrapper.appendChild(t)}),n.on("destroy",function(){r._s.toDestroy.slice().forEach(function(t){t.destroy()}),r._dom.wrapper.remove()}))}function rt(){var n=this;return this.iterator("column",function(t,e){n.trigger("cc-search-clear",[e])})}function O(t,e){var n=T.defaults.target;if(ot(e)){if(n===t)return{target:n,content:e}}else if(Array.isArray(e))for(var r=0;r<e.length;r++){var o=e[r];if(ot(o)){if(n===t)return{target:n,content:o}}else if(Y(o)){if(t===(void 0!==o.target?o.target:n))return o}else if(t===n)return{target:n,content:e}}else if("object"==typeof e)if(Y(e)){if(t===(void 0!==e.target?e.target:n))return e}else if(t===n)return{target:n,content:e}}function j(e,t){function n(t){e.includes(t)||e.push(t)}return Array.isArray(t)?0===t.length?n(T.defaults.target):t.forEach(function(t){n(("object"==typeof t&&void 0!==t.target?t:T.defaults).target)}):"object"==typeof t&&n((void 0!==t.target?t:T.defaults).target),e}function Y(t){return"object"==typeof t&&void 0!==t.target}function ot(t){var e=!1;if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(Y(t[n])){e=!0;break}return!e}}return x.ColumnControl=T,t(u).on("i18n.dt",function(t,e){if("dt"===t.namespace){var n=new x.Api(e),t=n.table().header(),r=e.oInit.columnControl,o=T.defaults,i=[],s={};t.querySelectorAll("tr").length<=1&&null===e.titleRow&&(e.titleRow=0),j(i,r),T.defaults.content&&j(i,o),n.columns().every(function(t){var e=this.init().columnControl;j(i,e)});for(var a=0;a<i.length;a++){v=m=f=p=h=d=u=l=c=void 0;var c=s,l=i[a],u=n;if(!c[l]){var d=!0,h=0,p=("number"==typeof l?h=l:("tfoot"===(p=l.split(":"))[0]&&(d=!1),p[1]&&(h=parseInt(p[1]))),d?u.table().header():u.table().footer());if(!p.querySelectorAll("tr")[h]){var f=u.columns().count(),m=y("tr");m.setAttribute("data-dt-order","disable");for(var v=0;v<f;v++)m.appendChild(y("td"));p.appendChild(m)}c[l]=!0}}}}),t(u).on("preInit.dt",function(t,e){var a,c,l,u;"dt"===t.namespace&&(a=new x.Api(e),c=e.oInit.columnControl,l=T.defaults,j(u=[],c),T.defaults.content&&j(u,l),a.columns().every(function(t){for(var e=this.init().columnControl,n=j(u.slice(),e),r=0;r<n.length;r++){var o=O(n[r],e),i=O(n[r],c),s=O(n[r],l);(s||i||o)&&new T(a,this.index(),Object.assign({},s||{},i||{},o||{}))}}))}),x.Api.registerPlural("columns().columnControl.searchClear()","column().columnControl.searchClear()",rt),x.Api.registerPlural("columns().ccSearchClear()","column().ccSearchClear()",rt),x.Api.registerPlural("columns().columnControl.searchList()","column().columnControl.searchList()",function(n){return this.iterator("column",function(t,e){t=t.aoColumns[e].columnControlSearchList;t&&t(n)})}),x.ext.buttons.ccSearchClear={text:function(t){return t.i18n("columnControl.buttons.searchClear","Clear search")},init:function(n,t,e){var r=this;n.on("draw.DT",function(){var t=!1,e=!!n.search();e||n.columns().every(function(){(this.search.fixed("dtcc")||this.search.fixed("dtcc-list"))&&(t=!0)}),r.enable(e||t)}),this.enable(!1)},action:function(t,e,n,r){e.search(""),e.columns().columnControl.searchClear(),e.draw()}},x});
8
+ (n=>{var r,o;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(t){return n(t,window,document)}):"object"==typeof exports?(r=require("jquery"),o=function(t,e){e.fn.dataTable||require("datatables.net")(t,e)},"undefined"==typeof window?module.exports=function(t,e){return t=t||window,e=e||r(t),o(t,e),n(e,0,t.document)}:(o(window,r),module.exports=n(r,window,window.document))):n(jQuery,window,document)})(function(t,o,u){var x=t.fn.dataTable;function y(t,e,n,r){void 0===e&&(e=[]),void 0===n&&(n=null),void 0===r&&(r=[]);var o=u.createElement(t);return i(o,e),n&&(o.innerHTML=n),r.forEach(function(t){o.appendChild(t)}),o}function i(e,t){t&&(t=Array.isArray(t)?t:[t]).forEach(function(t){e&&t&&e.classList.add(t)})}function a(t,e){return e.closest("div.dtfh-floatingparent")||t.table().container()}function d(t,e,n){var r=n.closest("div.dt-column-header"),e=a(e,n),r=getComputedStyle(r),o=t.offsetWidth,i=((t,e)=>{for(var n=0,r=0;e&&e!==t&&e!==u.body;)n+=e.offsetTop,r+=e.offsetLeft,e.scrollTop&&(r-=e.scrollTop),e.scrollLeft&&(r-=e.scrollLeft),e=e.offsetParent;return{top:n,left:r}})(e,n),s=i.top+n.offsetHeight,r="row-reverse"===r.flexDirection?i.left:i.left-o+n.offsetWidth,i=e.offsetWidth;i<r+o&&(r-=r+o-i),r<0&&(r=0),t.style.top=s+"px",t.style.left=r+"px"}function h(n,t,e){function r(t){var e;n._shown?t.target===n||n.contains(t.target)||(e=u.querySelector("div.dt-datetime"))&&(t.target===e||e.contains(t.target))||(n._close(),u.body.removeEventListener("click",r)):u.body.removeEventListener("click",r)}var o=a(t,e.element());n._shown=!0,o.append(n),d(n,t,e.element()),e.element().setAttribute("aria-expanded","true");u.body.addEventListener("click",r)}var p={classes:{container:"dtcc-dropdown",liner:"dtcc-dropdown-liner"},defaults:{className:"dropdown",content:[],icon:"menu",text:"More..."},init:function(n){var r=this.dt(),o=y("div",p.classes.container,"",[y("div",p.classes.liner)]),t=(o._shown=!1,o._close=function(){o.remove(),o._shown=!1,i.element().setAttribute("aria-expanded","false")},o.setAttribute("role","dialog"),o.setAttribute("aria-label",r.i18n("columnControl.dropdown",n.text)),r.on("fixedheader-mode",function(){o._shown&&h(o,r,n._parents?n._parents[0]:i)}),o.childNodes[0]),i=new f(r,this).text(r.i18n("columnControl.dropdown",n.text)).icon(n.icon).className(n.className).dropdownDisplay(t).handler(function(t){var e;t._closed&&t._closed.includes(o)||(h(o,r,n._parents?n._parents[0]:i),(e=o.querySelector("input, a, button"))&&"keypress"===t.type&&e.focus())});i.element().setAttribute("aria-haspopup","dialog"),i.element().setAttribute("aria-expanded","false");for(var e=0;e<n.content.length;e++){var s=this.resolve(n.content[e]),s=(s.config._parents||(s.config._parents=[]),s.config._parents.push(i),s.plugin.init.call(this,s.config));t.appendChild(s)}n._parents&&n._parents.length&&i.extra("chevronRight"),r.on("columns-reordered",function(){d(o,r,i.element())});function a(t){var e,n;c._shown&&(e=Array.from(c.querySelectorAll("a, button, input, select")),n=u.activeElement,"Escape"===t.key?(c._close(),l.focus()):"Tab"===t.key&&0!==e.length&&(e.includes(n)?t.shiftKey?n===e[0]&&(e[e.length-1].focus(),t.preventDefault()):n===e[e.length-1]&&(e[0].focus(),t.preventDefault()):(e[0].focus(),t.preventDefault())))}var c,l;c=o,l=i.element();return u.body.addEventListener("keydown",a),r.on("destroy",function(){u.body.removeEventListener("keydown",a)}),i.element()}};function e(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">'+t+"</svg>"}var l={chevronRight:e('<path d="m9 18 6-6-6-6"/>'),columns:e('<rect width="18" height="18" x="3" y="3" rx="2"/><path d="M9 3v18"/><path d="M15 3v18"/>'),contains:e('<path d="M10 3h4v18h-4z"/><path d="M18 8h3v9h-3"/><path d="M6 17H3V8h3"/>'),empty:e('<circle cx="12" cy="12" r="10"/>'),ends:e('<path d="M21 3h-4v18h4z"/><path d="M13 8H3v9h10"/>'),equal:e('<line x1="5" x2="19" y1="9" y2="9"/><line x1="5" x2="19" y1="15" y2="15"/>'),greater:e('<path d="m9 18 6-6-6-6"/>'),greaterOrEqual:e('<path d="m9 16 6-6-6-6"/><path d="m9 21 6-6"/>'),groupAdd:e('<path d="M6 21v-7.5m-3.549 3.75H9.75"/><rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" fill="currentColor" rx="1.5"/>'),groupClear:e('<rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),groupTop:e('<rect width="13.5" height="7.5" x="3" y="3" fill="currentColor" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),groupRemove:e('<path d="M2.451 17.25H9.75"/><rect width="13.5" height="7.5" x="3" y="3" rx="1.5"/><rect width="7.5" height="7.5" x="13.5" y="13.5" rx="1.5"/>'),less:e('<path d="m15 18-6-6 6-6"/>'),lessOrEqual:e('<path d="m15 16-6-6 6-6"/><path d="m15 21-6-6"/>'),menu:e('<line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/>'),move:e('<line x1="12" x2="12" y1="3" y2="21"/><polyline points="8 8 4 12 8 16"/><polyline points="16 16 20 12 16 8"/>'),moveLeft:e('<path d="m9 6-6 6 6 6"/><path d="M3 12h14"/><path d="M21 19V5"/>'),moveRight:e('<path d="M3 5v14"/><path d="M21 12H7"/><path d="m15 18 6-6-6-6"/>'),notContains:e('<path d="M15 4 9 20"/><path d="M3 8h18v9H3z"/>'),notEmpty:e('<circle cx="12" cy="12" r="10"/><line x1="9" x2="15" y1="15" y2="9"/>'),notEqual:e('<path d="M5 9h14"/><path d="M5 15h14"/><path d="M15 5 9 19"/>'),orderAddAsc:e('<path d="M17 21v-8"/><path d="M3 4h6"/><path d="M3 8h9"/><path d="M3 12h10"/><path d="M13 17h8"/>'),orderAddDesc:e('<path d="M17 21v-8"/><path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="M13 17h8"/>'),orderAsc:e('<path d="m3 8 4-4 4 4"/><path d="M7 4v16"/><path d="M11 12h4"/><path d="M11 16h7"/><path d="M11 20h10"/>'),orderClear:e('<path d="m21 21-8-8"/><path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="m13 21 8-8"/>'),orderDesc:e('<path d="m3 16 4 4 4-4"/><path d="M7 20V4"/><path d="M11 4h10"/><path d="M11 8h7"/><path d="M11 12h4"/>'),orderRemove:e('<path d="M3 4h12"/><path d="M3 8h9"/><path d="M3 12h6"/><path d="M13 17h8"/>'),orderNone:e('<path d="m3 8 4-4 4 4"/><path d="m11 16-4 4-4-4"/><path d="M7 4v16"/><path d="M15 8h6"/><path d="M15 16h6"/><path d="M13 12h8"/>'),search:e('<circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>'),searchClear:e('<path d="m13.5 8.5-5 5"/><path d="m8.5 8.5 5 5"/><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/>'),starts:e('<path d="M3 3h4v18H3z"/><path d="M11 8h10v9H11"/>'),tick:e('<path d="M20 6 9 17l-5-5"/>'),x:e('<path d="M18 6 6 18"/><path d="m6 6 12 12"/>')},Y=0,f=(n.prototype.active=function(t){return void 0===t?this._s.active:(this._s.active=t,this._checkActive(),this)},n.prototype.activeList=function(t,e){return this._s.activeList[t]=e,this._checkActive(),this},n.prototype.checkDisplay=function(){for(var t=0,e=this._dom.dropdownDisplay.childNodes,n=0;n<e.length;n++)"none"!==e[n].style.display&&t++;return 0===t&&(this._dom.button.style.display="none"),this},n.prototype.className=function(t){return this._dom.button.classList.add("dtcc-button_"+t),this},n.prototype.destroy=function(){this._s.buttonClick&&(this._dom.button.removeEventListener("click",this._s.buttonClick),this._dom.button.removeEventListener("keypress",this._s.buttonClick)),this._s.host.destroyRemove(this)},n.prototype.dropdownDisplay=function(t){return this._dom.dropdownDisplay=t,this},n.prototype.element=function(){return this._dom.button},n.prototype.enable=function(t){return void 0===t?this._s.enabled:(this._dom.button.classList.toggle("dtcc-button_disabled",!t),this._s.enabled=t,this)},n.prototype.extra=function(t){return this._dom.extra.innerHTML=t?l[t]:"",this},n.prototype.handler=function(n){function t(t){var e;void 0===(e=t)&&(e=null),u.querySelectorAll("div.dtcc-dropdown").forEach(function(t){null!==e&&t.contains(e.target)||(t._close(),e._closed||(e._closed=[]),e._closed.push(t))}),t.stopPropagation(),t.preventDefault(),r._s.enabled&&n(t)}var r=this;return this._s.buttonClick=t,this._s.namespace="dtcc-"+Y++,this._dom.button.addEventListener("click",t),this._dom.button.addEventListener("keypress",t),this._s.host.destroyAdd(this),this},n.prototype.icon=function(t){return this._dom.icon.innerHTML=t?l[t]:"",this},n.prototype.text=function(t){return void 0===t?this._s.label:(this._dom.text.innerHTML=t,this._s.label=t,this._dom.button.setAttribute("aria-label",t),this)},n.prototype.value=function(t){return void 0===t?this._s.value:(this._s.value=t,this)},n.prototype._checkActive=function(){return!0===this._s.active||Object.values(this._s.activeList).includes(!0)?(this._dom.state.innerHTML=l.tick,this._dom.button.classList.add("dtcc-button_active")):(this._dom.state.innerHTML="",this._dom.button.classList.remove("dtcc-button_active")),this},n.classes={container:"dtcc-button"},n);function n(t,e){this._s={active:!1,activeList:[],buttonClick:null,dt:null,enabled:!0,host:null,label:"",namespace:"",value:null},this._s.dt=t,this._s.host=e,this._dom={button:y("button",n.classes.container),dropdownDisplay:null,extra:y("span","dtcc-button-extra"),icon:y("span","dtcc-button-icon"),state:y("span","dtcc-button-state"),text:y("span","dtcc-button-text")},this._dom.button.setAttribute("type","button"),this._dom.button.append(this._dom.icon),this._dom.button.append(this._dom.text),this._dom.button.append(this._dom.state),this._dom.button.append(this._dom.extra),this.enable(!0)}c.prototype.add=function(n,t){for(var r=this,o=(Array.isArray(n)||(n=[n]),this),e=0;e<n.length;e++)(t=>{var t=n[t],e=new f(o._s.dt,o._s.host).active(t.active||!1).handler(function(t){r._s.handler(t,e,r._s.buttons,!0),r._updateCount()}).icon(t.icon||"").text(""!==t.label?t.label:o._s.dt.i18n("columnControl.list.empty","Empty")).value(t.value);""===t.label&&e.className("empty"),o._s.buttons.push(e)})(e);var i=this._s.buttons.length;return!0!==t&&void 0!==t||(this._dom.selectAllCount.innerHTML=i?"("+i+")":"",this._redraw()),this},c.prototype.button=function(t){for(var e=this._s.buttons,n=0;n<e.length;n++)if(e[n].value()===t)return e[n];return null},c.prototype.clear=function(){for(var t=0;t<this._s.buttons.length;t++)this._s.buttons[t].destroy();return this._dom.buttons.replaceChildren(),this._s.buttons.length=0,this},c.prototype.element=function(){return this._dom.container},c.prototype.handler=function(t){return this._s.handler=t,this},c.prototype.searchListener=function(t){var n=this;return t.on("cc-search-clear",function(t,e){e===n._s.host.idx()&&(n.selectNone(),n._s.handler(t,null,n._s.buttons,!1),n._s.search="",n._dom.search.value="",n._redraw(),n._updateCount())}),this},c.prototype.selectAll=function(){for(var t=0;t<this._s.buttons.length;t++)this._s.buttons[t].active(!0);return this},c.prototype.selectNone=function(){for(var t=0;t<this._s.buttons.length;t++)this._s.buttons[t].active(!1);return this},c.prototype.title=function(t){return this._dom.title.innerHTML=t,this},c.prototype.values=function(t){var e,n=[],r=this._s.buttons;if(void 0!==t){for(e=0;e<r.length;e++)t.includes(r[e].value())&&r[e].active(!0);return this._updateCount(),this}for(e=0;e<r.length;e++)r[e].active()&&n.push(r[e].value());return n},c.prototype._updateCount=function(){var t=this.values().length;this._dom.selectNoneCount.innerHTML=t?"("+t+")":""},c.prototype._redraw=function(){var t=this._s.buttons,e=this._dom.buttons,n=this._s.search.toLowerCase();e.replaceChildren();for(var r=0;r<t.length;r++){var o=t[r];n&&!o.text().toLowerCase().includes(n)||e.appendChild(o.element())}this._dom.empty.style.display=0===t.length?"block":"none",e.style.display=0<t.length?"block":"none"},c.classes={container:"dtcc-list",input:"dtcc-list-search"};var m=c;function c(t,e,n){function r(){s._s.search=a.search.value,s._redraw()}function o(t){s.selectAll(),s._s.handler(t,null,s._s.buttons,!0),s._updateCount()}function i(t){s.selectNone(),s._s.handler(t,null,s._s.buttons,!0),s._updateCount()}var s=this,a=(this._s={buttons:[],dt:null,handler:function(){},host:null,search:""},this._s.dt=t,this._s.host=e,this._dom={buttons:y("div","dtcc-list-buttons"),container:y("div",c.classes.container),controls:y("div","dtcc-list-controls"),empty:y("div","dtcc-list-empty",t.i18n("columnControl.list.empty","No options")),title:y("div","dtcc-list-title"),selectAll:y("button","dtcc-list-selectAll",t.i18n("columnControl.list.all","Select all")),selectAllCount:y("span"),selectNone:y("button","dtcc-list-selectNone",t.i18n("columnControl.list.none","Deselect")),selectNoneCount:y("span"),search:y("input",c.classes.input)},this._dom);a.search.setAttribute("type","text"),a.container.append(a.title),a.container.append(a.controls),a.container.append(a.empty),a.container.append(a.buttons),n.select&&(a.controls.append(a.selectAll),a.controls.append(a.selectNone),a.selectAll.append(a.selectAllCount),a.selectNone.append(a.selectNoneCount),a.selectAll.setAttribute("type","button"),a.selectNone.setAttribute("type","button"));n.search&&(a.controls.append(a.search),a.search.setAttribute("placeholder",t.i18n("columnControl.list.search","Search...")),a.search.addEventListener("input",r)),a.selectAll.addEventListener("click",o),a.selectNone.addEventListener("click",i),t.on("destroy",function(){a.selectAll.removeEventListener("click",o),a.selectNone.removeEventListener("click",i),a.search.removeEventListener("input",r)})}var r={defaults:{className:"colVis",columns:"",search:!1,select:!1,title:"Column visibility"},init:function(t){function n(){o.columns(t.columns).every(function(){i.add({active:this.visible(),label:this.title(),value:this.index()})})}var o=this.dt(),i=new m(o,this,{search:t.search,select:t.select}).title(o.i18n("columnControl.colVis",t.title)).handler(function(t,e,n){e&&e.active(!e.active()),r(n)}),r=function(t){for(var e=0;e<t.length;e++){var n=t[e],r=n.value(),r=o.column(r);n.active()&&!r.visible()?r.visible(!0):!n.active()&&r.visible()&&r.visible(!1)}};return n(),o.on("column-visibility",function(t,e,n,r){n=i.button(n);n&&n.active(r)}),o.on("columns-reordered",function(t,e){i.clear(),n()}),i.element()}},H={defaults:{className:"colVis",columns:"",search:!1,select:!1,text:"Column visibility",title:"Column visibility"},extend:function(t){return{extend:"dropdown",icon:"columns",text:this.dt().i18n("columnControl.colVisDropdown",t.text),content:[Object.assign(t,{extend:"colVis"})]}}},I={defaults:{className:"reorder",icon:"move",text:"Reorder columns"},init:function(t){var n=this,e=this.dt(),r=new f(e,this).text(e.i18n("columnControl.reorder",t.text)).icon(t.icon).className(t.className);return 0===this.idx()&&r.enable(!1),e.on("columns-reordered",function(t,e){r.enable(0<n.idx())}),e.init().colReorder||new x.ColReorder(e,{}),r.element()}},G={defaults:{className:"reorderLeft",icon:"moveLeft",text:"Move column left"},init:function(t){var n=this,e=this.dt(),r=new f(e,this).text(e.i18n("columnControl.reorderLeft",t.text)).icon(t.icon).className(t.className).handler(function(){var t=n.idx();0<t&&e.colReorder.move(t,t-1)});return 0===this.idx()&&r.enable(!1),e.on("columns-reordered",function(t,e){r.enable(0<n.idx())}),r.element()}},U={defaults:{className:"reorderRight",icon:"moveRight",text:"Move column right"},init:function(t){var n=this,r=this.dt(),o=new f(r,this).text(r.i18n("columnControl.reorderRight",t.text)).icon(t.icon).className(t.className).handler(function(){var t=n.idx();t<r.columns().count()-1&&r.colReorder.move(t,t+1)});return this.idx()===r.columns().count()-1&&o.enable(!1),r.on("columns-reordered",function(t,e){o.enable(n.idx()<r.columns().count()-1)}),o.element()}},V={defaults:{className:"order",iconAsc:"orderAsc",iconDesc:"orderDesc",iconNone:"orderNone",statusOnly:!1,text:"Toggle ordering"},init:function(r){var o=this,t=this.dt(),i=new f(t,this).text(t.i18n("columnControl.order",r.text)).icon("orderAsc").className(r.className);return r.statusOnly||t.order.listener(i.element(),x.versionCheck("2.3.2")?function(){return[o.idx()]}:this.idx(),function(){}),t.on("order",function(t,e,n){n=n.find(function(t){return t.col===o.idx()});n?"asc"===n.dir?i.active(!0).icon(r.iconAsc):"desc"===n.dir&&i.active(!0).icon(r.iconDesc):i.active(!1).icon(r.iconNone)}),i.element()}},P={defaults:{className:"orderAddAsc",icon:"orderAddAsc",text:"Add Sort Ascending"},init:function(t){var r=this,e=this.dt(),o=new f(e,this).text(e.i18n("columnControl.orderAddAsc",t.text)).icon(t.icon).className(t.className).handler(function(){e.order().push([r.idx(),"asc"]),e.draw()});return e.on("order",function(t,e,n){n=n.some(function(t){return t.col===r.idx()});o.enable(!n)}),o.element()}},W={defaults:{className:"orderAddDesc",icon:"orderAddDesc",text:"Add Sort Descending"},init:function(t){var r=this,e=this.dt(),o=new f(e,this).text(e.i18n("columnControl.orderAddDesc",t.text)).icon(t.icon).className(t.className).handler(function(){e.order().push([r.idx(),"desc"]),e.draw()});return e.on("order",function(t,e,n){n=n.some(function(t){return t.col===r.idx()});o.enable(!n)}),o.element()}},B={defaults:{className:"orderAsc",icon:"orderAsc",text:"Sort Ascending"},init:function(t){var r=this,e=this.dt(),o=new f(e,this).text(e.i18n("columnControl.orderAsc",t.text)).icon(t.icon).className(t.className).handler(function(){r.dt().order([{idx:r.idx(),dir:"asc"}]).draw()});return e.on("order",function(t,e,n){n=n.some(function(t){return t.col===r.idx()&&"asc"===t.dir});o.active(n)}),o.element()}},z={defaults:{className:"orderClear",icon:"orderClear",text:"Clear sort"},init:function(t){var e=this.dt(),r=new f(e,this).text(e.i18n("columnControl.orderClear",t.text)).icon(t.icon).className(t.className).handler(function(){e.order([]).draw()});return e.on("order",function(t,e,n){r.enable(0<n.length)}),0===e.order().length&&r.enable(!1),r.element()}},F={defaults:{className:"orderDesc",icon:"orderDesc",text:"Sort Descending"},init:function(t){var r=this,e=this.dt(),o=new f(e,this).text(e.i18n("columnControl.orderDesc",t.text)).icon(t.icon).className(t.className).handler(function(){r.dt().order([{idx:r.idx(),dir:"desc"}]).draw()});return e.on("order",function(t,e,n){n=n.some(function(t){return t.col===r.idx()&&"desc"===t.dir});o.active(n)}),o.element()}},X={defaults:{className:"orderRemove",icon:"orderRemove",text:"Remove from sort"},init:function(t){var r=this,n=this.dt(),o=new f(n,this).text(n.i18n("columnControl.orderRemove",t.text)).icon(t.icon).className(t.className).handler(function(){var t=n.order(),e=t.findIndex(function(t){return t[0]===r.idx()});t.splice(e,1),n.order(t).draw()});return n.on("order",function(t,e,n){n=n.some(function(t){return t.col===r.idx()});o.enable(n)}),o.enable(!1),o.element()}},Z={defaults:{className:"order",iconAsc:"orderAsc",iconDesc:"orderDesc",iconNone:"orderNone",statusOnly:!0,text:"Sort status"},extend:function(t){return Object.assign(t,{extend:"order"})}};function s(t,e){var n=v(t);-1===n.indexOf(e)&&(n.push(e),t.rowGroup().dataSrc(n))}function v(t){t=t.rowGroup().dataSrc();return Array.isArray(t)?t:[t]}function _(t){t.rowGroup().dataSrc([])}function g(t,e){var n=v(t),e=n.indexOf(e);-1!==e&&(n.splice(e,1),t.rowGroup().dataSrc(n))}var K={defaults:{className:"rowGroup",icon:"groupTop",order:!0,text:"Group rows"},init:function(e){var n=this,r=this.dt(),o=new f(r,this).text(r.i18n("columnControl.rowGroup",e.text)).icon(e.icon).className(e.className).handler(function(){var t=r.column(n.idx()).dataSrc();o.active()?g(r,t):(_(r),s(r,t),!1!==e.order&&r.order([n.idx(),"asc"])),r.draw()});return r.on("rowgroup-datasrc",function(){var t=v(r),e=r.column(n.idx()).dataSrc();o.active(t.includes(e))}),o.element()}},Q={defaults:{className:"rowGroupAdd",icon:"groupAdd",order:!0,text:"Add to grouping"},init:function(t){var n=this,r=this.dt(),o=new f(r,this).text(r.i18n("columnControl.rowGroup",t.text)).icon(t.icon).className(t.className).handler(function(){var t=r.column(n.idx()).dataSrc();o.enable()&&s(r,t),r.draw()});return r.on("rowgroup-datasrc",function(){var t=v(r),e=r.column(n.idx()).dataSrc();o.enable(!t.includes(e))}),o.element()}},$={defaults:{className:"rowGroupClear",icon:"groupClear",text:"Clear all grouping"},init:function(t){var e=this.dt(),n=new f(e,this).text(e.i18n("columnControl.rowGroup",t.text)).icon(t.icon).className(t.className).handler(function(){_(e),e.draw()});return e.on("rowgroup-datasrc",function(){n.enable(0<v(e).length)}),n.enable(0<v(e).length),n.element()}},J={defaults:{className:"rowGroupRemove",icon:"groupRemove",order:!0,text:"Remove from grouping"},init:function(t){var n=this,r=this.dt(),o=new f(r,this).text(r.i18n("columnControl.rowGroup",t.text)).icon(t.icon).className(t.className).handler(function(){var t=r.column(n.idx()).dataSrc();o.enable()&&(g(r,t),r.draw())});return r.on("rowgroup-datasrc",function(){var t=v(r),e=r.column(n.idx()).dataSrc();o.enable(t.includes(e))}),o.enable(!1),o.element()}},b=(w.prototype.addClass=function(t){return this._dom.container.classList.add(t),this},w.prototype.clear=function(){return this.set(this._dom.select.children[0].getAttribute("value"),""),this},w.prototype.clearable=function(t){return t||this._dom.clear.remove(),this},w.prototype.element=function(){return this._dom.container},w.prototype.input=function(){return this._dom.input},w.prototype.options=function(t){for(var e=this._dom.select,n=0;n<t.length;n++)e.add(new Option(t[n].label,t[n].value));return this._dom.typeIcon.innerHTML=l[t[0].value],this},w.prototype.placeholder=function(t){var e;return t&&(e=this._dt.column(this._idx).title(),this._dom.input.placeholder=t.replace("[title]",e)),this},w.prototype.runSearch=function(){var t=this._dom,e="empty"===t.select.value||"notEmpty"===t.select.value||""!==t.input.value;t.container.classList.toggle("dtcc-search_active",e),!this._search||this._lastValue===t.input.value&&this._lastType===t.select.value||(this._search(t.select.value,t.input.value,this._loadingState),this._lastValue=t.input.value,this._lastType=t.select.value)},w.prototype.search=function(t){return this._search=t,this._stateLoad(this._dt.state.loaded()),this},w.prototype.set=function(t,e){var n=this._dom;return n.input.value=e,n.select.value=t,n.typeIcon.innerHTML=l[n.select.value],this.runSearch(),this},w.prototype.sspTransform=function(t){return this._sspTransform=t,this},w.prototype.sspData=function(t){return this._sspData=t,this},w.prototype.title=function(t){var e;return t&&(e=this._dt.column(this._idx).title(),this._dom.title.innerHTML=t.replace("[title]",e)),this},w.prototype.titleAttr=function(t){var e;return t&&(e=this._dt.column(this._idx).title(),this._dom.input.title=t.replace("[title]",e)),this},w.prototype.type=function(t){return this._type=t,this},w.prototype._stateLoad=function(t){var e=this._dom,n=this._colUnique,n=null==(t=null==(t=null==t?void 0:t.columnControl)?void 0:t[n])?void 0:t.searchInput;n&&(this._loadingState=!0,e.select.value=n.logic,e.input.value=n.value,e.select.dispatchEvent(new Event("input")),this._loadingState=!1)},w.classes={container:["dtcc-content","dtcc-search"],input:"",select:""},w);function w(n,t,e){function r(){s.runSearch()}function o(){a.typeIcon.innerHTML=l[a.select.value],s.runSearch()}function i(){s.clear()}var s=this,a=(this._type="text",this._sspTransform=null,this._sspData={},this._dt=n,this._idx=t,this._colUnique=e,this._dom={clear:y("span","dtcc-search-clear",l.x),container:y("div",w.classes.container),typeIcon:y("div","dtcc-search-type-icon"),searchIcon:y("div","dtcc-search-icon",l.search),input:y("input",w.classes.input),inputs:y("div"),select:y("select",w.classes.select),title:y("div","dtcc-search-title")},this._dom),c=t;a.input.setAttribute("type","text"),a.container.append(a.title,a.inputs),a.inputs.append(a.typeIcon,a.select,a.searchIcon,a.clear,a.input);a.input.addEventListener("input",r),a.select.addEventListener("input",o),a.clear.addEventListener("click",i),n.on("destroy",function(){a.input.removeEventListener("input",r),a.select.removeEventListener("input",o),a.clear.removeEventListener("click",i)}),n.on("stateSaveParams.DT",function(t,e,n){n.columnControl||(n.columnControl={}),n.columnControl[s._colUnique]||(n.columnControl[s._colUnique]={}),n.columnControl[s._colUnique].searchInput={logic:a.select.value,type:s._type,value:a.input.value}}),n.on("stateLoaded.DT",function(t,e,n){s._stateLoad(n)}),n.on("columns-reordered.DT",function(t,e){s._idx=n.colReorder.transpose(c,"fromOriginal")}),n.on("cc-search-clear.DT",function(t,e){e===s._idx&&(s._loadingState=!0,s.clear(),s._loadingState=!1)}),n.page.info().serverSide&&n.on("preXhr.DT",function(t,e,n){var r;n.columns&&n.columns[s._idx]&&(n.columns[s._idx].columnControl||(n.columns[s._idx].columnControl={}),r=s._dom.input.value,s._sspTransform&&(r=s._sspTransform(r)),n.columns[s._idx].columnControl.search=Object.assign({value:r,logic:s._dom.select.value,type:s._type},s._sspData))})}var C={defaults:{clear:!0,excludeLogic:[],format:"",mask:"",placeholder:"",title:"",titleAttr:""},init:function(s){var a,c=this,l=!1,u=x.use("moment"),d=x.use("luxon"),h=this.dt(),t="columnControl.search.datetime.",p="",f="",e=new b(h,this.idx(),this.idxOriginal()).type("date").addClass("dtcc-searchDateTime").sspTransform(function(t){var e=p,n=u,r=d;return""===t?"":"YYYY-MM-DD"!==e&&n?n.utc(t,e).toISOString():"YYYY-MM-DD"!==e&&r?r.DateTime.fromFormat(t,e).toISO():t=t.replace(/\//g,"-")}).sspData({mask:s.mask}).clearable(s.clear).placeholder(s.placeholder).title(s.title).titleAttr(s.titleAttr).options([{label:h.i18n(t+"equal","Equals"),value:"equal"},{label:h.i18n(t+"notEqual","Does not equal"),value:"notEqual"},{label:h.i18n(t+"greater","After"),value:"greater"},{label:h.i18n(t+"less","Before"),value:"less"},{label:h.i18n(t+"empty","Empty"),value:"empty"},{label:h.i18n(t+"notEmpty","Not empty"),value:"notEmpty"}].filter(function(t){return!s.excludeLogic.includes(t.value)})).search(function(e,n,t){s._parents&&s._parents.forEach(function(t){return t.activeList(c.unique()+"date","empty"===e||"notEmpty"===e||!!n)});var r=h.column(c.idx());if(h.page.info().serverSide)r.init().__ccList=!("empty"!==e&&"notEmpty"!==e&&!n),t||h.draw();else{var o=s.mask,i=""===n?"":A(a&&l?a.val():n.trim(),p,u,d,o);if("empty"===e)r.search.fixed("dtcc",function(t){return!t});else if("notEmpty"===e)r.search.fixed("dtcc",function(t){return!!t});else{if(""===r.search.fixed("dtcc")&&""===i)return;i?"equal"===e?r.search.fixed("dtcc",function(t){return A(t,f,u,d,o)==i}):"notEqual"===e?r.search.fixed("dtcc",function(t){return A(t,f,u,d,o)!=i}):"greater"===e?r.search.fixed("dtcc",function(t){return A(t,f,u,d,o)>i}):"less"===e&&r.search.fixed("dtcc",function(t){return A(t,f,u,d,o)<i}):r.search.fixed("dtcc","")}t||r.draw()}});return h.ready(function(){var t=x.use("datetime");f=((t,e)=>{var n=t.column(e).type();if(n)if("datetime"===n){t=t.settings()[0].aoColumns[e].mRender,e=t("1999-08-07T23:05:04Z","display"),t=t("1999-08-07T03:05:04Z","display").includes("03");if(x.use("moment"))return e.replace("23",t?"HH":"H").replace("11",t?"hh":"h").replace("05","mm").replace("04","ss").replace("PM","A").replace("pm","a").replace("07","DD").replace("7","D").replace("08","MM").replace("8","M").replace("1999","YYYY").replace("99","YY");if(x.use("luxon"))return e.replace("23",t?"HH":"H").replace("11",t?"hh":"h").replace("05","mm").replace("04","ss").replace("PM","a").replace("07","dd").replace("7","d").replace("08","MM").replace("8","M").replace("1999","yyyy").replace("99","yy");if(e.includes("23")&&e.includes("1999"))return"YYYY-MM-DD hh:mm:ss";if(e.includes("23"))return"hh:mm:ss"}else{if(n.includes("datetime-"))return n.replace(/datetime-/g,"");if(n.includes("moment"))return n.replace(/moment-/g,"");if(n.includes("luxon"))return n.replace(/luxon-/g,"")}return"YYYY-MM-DD"})(h,c.idx()),p=s.format||f,t&&(a=new t(e.input(),{format:p,i18n:h.settings()[0].oLanguage.datetime,onChange:function(){l=!0,e.runSearch(),l=!1}}))}),e.element()}};function A(t,e,n,r,o){return""===t?"":(n=t instanceof Date?t:"YYYY-MM-DD"!==e&&(n||r)?new Date(n?1e3*n(t,e).unix():r.DateTime.fromFormat(t,e).toMillis()):new Date(t.replace(/\//g,"-")),o&&(o.includes("YYYY")||n.setFullYear(1970),o.includes("MM")||n.setUTCMonth(0),o.includes("DD")||n.setUTCDate(1),o.includes("hh")||n.setUTCHours(0),o.includes("mm")||n.setUTCMinutes(0),o.includes("ss")||n.setUTCSeconds(0),o.includes("sss")||n.setUTCMilliseconds(0)),n.getTime())}function L(t,e,n){void 0===n&&(n=[]);var r=t.values();t.clear();for(var o=0;o<e.length;o++)"object"==typeof e[o]?t.add({active:n.includes(e[o].value),label:e[o].label,value:e[o].value},o===e.length-1):t.add({active:n.includes(e[o]),label:e[o],value:e[o]},o===e.length-1);r.length&&t.values(r)}function M(t,e){t=null==(e=null==(e=null==e?void 0:e.columnControl)?void 0:e[t])?void 0:e.searchList;if(t)return t}function tt(t,e){var n=null==(n=t.ajax.json())?void 0:n.columnControl,t=t.column(e),r=t.name(),t=t.dataSrc();return n&&n[r]?n[r]:n&&"string"==typeof t&&n[t]?n[t]:n&&n[e]?n[e]:null}function N(t,e,n,r,o){var i=null==(i=t.ajax.json())?void 0:i.columnControl,s=[],a=tt(t,n);if(a)s=a;else{if(i&&e.ajaxOnly)return void(e.hidable&&(r.element().style.display="none",e._parents)&&e._parents.forEach(function(t){return t.checkDisplay()}));if(!t.page.info().serverSide)for(var c={},l=t.rows({order:n}).indexes().toArray(),u=t.settings()[0],d=0;d<l.length;d++){var h=u.fastData(l[d],n,"filter"),h=null!=h?h.toString():"";c[h]||(c[h]=!0,s.push({label:u.fastData(l[d],n,e.orthogonal),value:h}))}}L(r,s),o&&r.values(o)}var E={defaults:{ajaxOnly:!0,className:"searchList",hidable:!0,options:null,orthogonal:"display",search:!0,select:!0,title:""},init:function(r){function o(e){r._parents&&r._parents.forEach(function(t){return t.activeList(i.unique()+"list",e&&!!e.length)});var t=a.column(i.idx());a.page.info().serverSide?t.init().__ccList=e&&0!==e.length:e&&(0===e.length?t.search.fixed("dtcc-list",""):t.search.fixed("dtcc-list",function(t){return e.includes(t)}))}var i=this,s=null,a=this.dt(),c=new m(a,this,{search:r.search,select:r.select}).searchListener(a).title(a.i18n("columnControl.searchList",r.title).replace("[title]",a.column(this.idx()).title())).handler(function(t,e,n,r){e&&e.active(!e.active()),o(c.values()),r&&a.draw()}),s=M(this.idx(),a.state.loaded()),l=(r.options?L(c,r.options,s):(a.ready(function(){N(a,r,i.idx(),c,s)}),a.on("xhr",function(t,e,n){a.one("draw",function(){N(a,r,i.idx(),c,s),s=null})})),[]);return a.page.info().serverSide&&a.on("preXhr.DT",function(t,e,n){var r;n.columns&&n.columns[i.idx()]&&(n.columns[i.idx()].columnControl||(n.columns[i.idx()].columnControl={}),r=l.length?l:c.values(),l=[],n.columns[i.idx()].columnControl.list=Object.assign({},r))}),a.on("stateLoaded",function(t,e,n){n=M(i.idxOriginal(),n);n&&(c.values(n),o(n))}),a.on("stateSaveParams",function(t,e,n){var r=i.idxOriginal();n.columnControl||(n.columnControl={}),n.columnControl[r]||(n.columnControl[r]={}),n.columnControl[r].searchList=a.ready()?c.values():s}),a.settings()[0].aoColumns[this.idx()].columnControlSearchList=function(t){"refresh"===t?N(a,r,i.idx(),c,null):L(c,t)},o(s),a.page.info().serverSide&&s&&s.length&&(l=s),c.element()}},D={defaults:{clear:!0,excludeLogic:[],placeholder:"",title:"",titleAttr:""},init:function(o){var i=this,s=this.dt(),t="columnControl.search.number.",t=new b(s,this.idx(),this.idxOriginal()).type("num").addClass("dtcc-searchNumber").clearable(o.clear).placeholder(o.placeholder).title(o.title).titleAttr(o.titleAttr).options([{label:s.i18n(t+"equal","Equals"),value:"equal"},{label:s.i18n(t+"notEqual","Does not equal"),value:"notEqual"},{label:s.i18n(t+"greater","Greater than"),value:"greater"},{label:s.i18n(t+"greaterOrEqual","Greater or equal"),value:"greaterOrEqual"},{label:s.i18n(t+"less","Less than"),value:"less"},{label:s.i18n(t+"lessOrEqual","Less or equal"),value:"lessOrEqual"},{label:s.i18n(t+"empty","Empty"),value:"empty"},{label:s.i18n(t+"notEmpty","Not empty"),value:"notEmpty"}].filter(function(t){return!o.excludeLogic.includes(t.value)})).search(function(e,n,t){o._parents&&o._parents.forEach(function(t){return t.activeList(i.unique()+"number","empty"===e||"notEmpty"===e||!!n)});var r=s.column(i.idx());if(s.page.info().serverSide)r.init().__ccList=!("empty"!==e&&"notEmpty"!==e&&!n),t||s.draw();else{if("empty"===e)r.search.fixed("dtcc",function(t){return!t});else if("notEmpty"===e)r.search.fixed("dtcc",function(t){return!!t});else{if(""===r.search.fixed("dtcc")&&""===n)return;""===n?r.search.fixed("dtcc",""):"equal"===e?r.search.fixed("dtcc",function(t){return S(t)==n}):"notEqual"===e?r.search.fixed("dtcc",function(t){return S(t)!=n}):"greater"===e?r.search.fixed("dtcc",function(t){return S(t)>n}):"greaterOrEqual"===e?r.search.fixed("dtcc",function(t){return S(t)>=n}):"less"===e?r.search.fixed("dtcc",function(t){return S(t)<n}):"lessOrEqual"===e&&r.search.fixed("dtcc",function(t){return S(t)<=n})}t||r.draw()}});return t.input().setAttribute("inputmode","numeric"),t.input().setAttribute("pattern","[0-9]*"),t.element()}},et=/<([^>]*>)/g,nt=/['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi;function S(t){var e;return 0===t||t&&"-"!==t?"number"==(e=typeof t)||"bigint"==e?t:+(t=t.replace?t.replace(et,"").replace(nt,""):t):-1/0}var q={defaults:{clear:!0,excludeLogic:[],placeholder:"",title:"",titleAttr:""},init:function(o){var i=this,s=this.dt(),t="columnControl.search.text.";return new b(s,this.idx(),this.idxOriginal()).addClass("dtcc-searchText").clearable(o.clear).placeholder(o.placeholder).title(o.title).titleAttr(o.titleAttr).options([{label:s.i18n(t+"contains","Contains"),value:"contains"},{label:s.i18n(t+"notContains","Does not contain"),value:"notContains"},{label:s.i18n(t+"equal","Equals"),value:"equal"},{label:s.i18n(t+"notEqual","Does not equal"),value:"notEqual"},{label:s.i18n(t+"starts","Starts"),value:"starts"},{label:s.i18n(t+"ends","Ends"),value:"ends"},{label:s.i18n(t+"empty","Empty"),value:"empty"},{label:s.i18n(t+"notEmpty","Not empty"),value:"notEmpty"}].filter(function(t){return!o.excludeLogic.includes(t.value)})).search(function(e,n,t){o._parents&&o._parents.forEach(function(t){return t.activeList(i.unique()+"text","empty"===e||"notEmpty"===e||!!n)});var r=s.column(i.idx());if(s.page.info().serverSide)r.init().__ccList=!("empty"!==e&&"notEmpty"!==e&&!n),t||s.draw();else{if(n=n.toLowerCase(),"empty"===e)r.search.fixed("dtcc",function(t){return!t});else if("notEmpty"===e)r.search.fixed("dtcc",function(t){return!!t});else{if(""===r.search.fixed("dtcc")&&""===n)return;""===n?r.search.fixed("dtcc",""):"equal"===e?r.search.fixed("dtcc",function(t){return t.toLowerCase()==n}):"notEqual"===e?r.search.fixed("dtcc",function(t){return t.toLowerCase()!=n}):"contains"===e?r.search.fixed("dtcc",n):"notContains"===e?r.search.fixed("dtcc",function(t){return!t.toLowerCase().includes(n)}):"starts"===e?r.search.fixed("dtcc",function(t){return t.toLowerCase().startsWith(n)}):"ends"===e&&r.search.fixed("dtcc",function(t){return t.toLowerCase().endsWith(n)})}o._parents&&o._parents.forEach(function(t){return t.activeList(i.unique()+"string",!!r.search.fixed("dtcc"))}),t||r.draw()}}).element()}},r={colVis:r,colVisDropdown:H,dropdown:p,reorder:I,reorderLeft:G,reorderRight:U,rowGroup:K,rowGroupAdd:Q,rowGroupClear:$,rowGroupRemove:J,order:V,orderAddAsc:P,orderAddDesc:W,orderAsc:B,orderClear:z,orderDesc:F,orderRemove:X,orderStatus:Z,search:{defaults:{allowSearchList:!1},init:function(n){function e(t){var e=tt(i,s);return"list"===t||n.allowSearchList&&e?E.init.call(o,Object.assign({},E.defaults,n)):"date"===t||t.startsWith("datetime")?C.init.call(o,Object.assign({},C.defaults,n)):t.includes("num")?D.init.call(o,Object.assign({},D.defaults,n)):q.init.call(o,Object.assign({},q.defaults,n))}var r,o=this,i=this.dt(),s=this.idx(),t=null==(t=null==(t=i.state.loaded())?void 0:t.columnControl)?void 0:t[s];return t&&(t.searchInput?r=e(t.searchInput.type):t.searchList&&(r=e("list"))),r||(r=u.createElement("div"),i.ready(function(){var t=i.column(s),t=e(t.type());r.replaceWith(t)})),r}},searchClear:{defaults:{className:"searchClear",icon:"searchClear",text:"Clear Search"},init:function(t){var o=this,i=this.dt(),s=new f(i,this).text(i.i18n("columnControl.searchClear",t.text)).icon(t.icon).className(t.className).handler(function(){i.column(o.idx()).columnControl.searchClear().draw()}).enable(!1);return i.on("draw",function(){var t=i.column(o.idx()),e=t.search.fixed("dtcc"),n=t.search.fixed("dtcc-list"),r=t.init().__ccSearch,t=t.init().__ccList;s.enable(!!(e||n||r||t))}),s.element()}},searchDropdown:{defaults:{ajaxOnly:!0,allowSearchList:!0,className:"searchDropdown",clear:!0,columns:"",hidable:!0,options:null,orthogonal:"display",placeholder:"",search:!0,select:!0,text:"Search",title:"",titleAttr:""},extend:function(t){return{extend:"dropdown",icon:"search",text:this.dt().i18n("columnControl.searchDropdown",t.text),content:[Object.assign(t,{extend:"search"})]}}},searchDateTime:C,searchList:E,searchNumber:D,searchText:q,spacer:{defaults:{className:"dtcc-spacer",text:""},init:function(t){var e=this.dt(),e=y("div",t.className,e.i18n("columnControl.spacer",t.text));return e.setAttribute("role","separator"),e}},title:{defaults:{className:"dtcc-title",text:null},init:function(t){var e=this.dt().column(this.idx()).title(),n=null===t.text?"[title]":t.text;return y("div",t.className,n.replace("[title]",e))}}},T=(k.prototype.destroyAdd=function(t){this._s.toDestroy.push(t)},k.prototype.destroyRemove=function(t){t=this._s.toDestroy.indexOf(t);-1!==t&&this._s.toDestroy.splice(t,1)},k.prototype.dt=function(){return this._dt},k.prototype.idx=function(){return this._s.columnIdx},k.prototype.idxOriginal=function(){var t=this.idx();return this._dt.colReorder?this._dt.colReorder.transpose(t,"toOriginal"):t},k.prototype.resolve=function(t){var e=null,n=null,r=null;if("string"==typeof t?(e=k.content[r=t],n=Object.assign({},null==e?void 0:e.defaults)):Array.isArray(t)?(e=k.content[r="dropdown"],n=Object.assign({},null==e?void 0:e.defaults,{content:t})):t.extend&&(r=t.extend,e=k.content[r],n=Object.assign({},null==e?void 0:e.defaults,t)),e)return e.extend?(t=e.extend.call(this,n),this.resolve(t)):{config:n,type:r,plugin:e};throw new Error("Unknown ColumnControl content type: "+r)},k.prototype.unique=function(){return this._s.unique},k.prototype._target=function(){var t,e,n=this._c.target,r=this._dt.column(this._s.columnIdx),o="header";return"number"==typeof n?t=r.header(n):(e="tfoot"!==(n=n.split(":"))[0],n=n[1]?parseInt(n[1]):0,e?t=r.header(n):(t=r.footer(n),o="footer")),t.querySelector("div.dt-column-"+o)},k.Button=f,k.CheckList=m,k.SearchInput=b,k.content=r,k.defaults={className:"",content:null,target:0},k.icons=l,k.version="1.2.1",k);function k(n,t,e){var r=this,o=(this._dom={target:null,wrapper:null},this._c={},this._s={columnIdx:null,unique:null,toDestroy:[]},this._dt=n,this._s.columnIdx=t,this._s.unique=Math.random(),t);Object.assign(this._c,k.defaults,e),this._dom.target=this._target(),e.className&&i(this._dom.target.closest("tr"),e.className),this._c.content&&(n.on("columns-reordered",function(t,e){r._s.columnIdx=n.colReorder.transpose(o,"fromOriginal")}),this._dom.wrapper=u.createElement("span"),this._dom.wrapper.classList.add("dtcc"),this._dom.target.appendChild(this._dom.wrapper),this._c.content.forEach(function(t){t=r.resolve(t),t=t.plugin.init.call(r,t.config);r._dom.wrapper.appendChild(t)}),n.on("destroy",function(){r._s.toDestroy.slice().forEach(function(t){t.destroy()}),r._dom.wrapper.remove()}))}function rt(){var n=this;return this.iterator("column",function(t,e){n.trigger("cc-search-clear",[e])})}function O(t,e){var n=T.defaults.target;if(ot(e)){if(n===t)return{target:n,content:e}}else if(Array.isArray(e))for(var r=0;r<e.length;r++){var o=e[r];if(ot(o)){if(n===t)return{target:n,content:o}}else if(R(o)){if(t===(void 0!==o.target?o.target:n))return o}else if(t===n)return{target:n,content:e}}else if("object"==typeof e)if(R(e)){if(t===(void 0!==e.target?e.target:n))return e}else if(t===n)return{target:n,content:e}}function j(e,t){function n(t){e.includes(t)||e.push(t)}return Array.isArray(t)?0===t.length?n(T.defaults.target):t.forEach(function(t){n(("object"==typeof t&&void 0!==t.target?t:T.defaults).target)}):"object"==typeof t&&n((void 0!==t.target?t:T.defaults).target),e}function R(t){return"object"==typeof t&&void 0!==t.target}function ot(t){var e=!1;if(Array.isArray(t)){for(var n=0;n<t.length;n++)if(R(t[n])){e=!0;break}return!e}}return x.ColumnControl=T,t(u).on("i18n.dt",function(t,e){if("dt"===t.namespace){var n=new x.Api(e),t=n.table().header(),r=e.oInit.columnControl,o=T.defaults,i=[],s={};t.querySelectorAll("tr").length<=1&&null===e.titleRow&&(e.titleRow=0),j(i,r),T.defaults.content&&j(i,o),n.columns().every(function(t){var e=this.init().columnControl;j(i,e)});for(var a=0;a<i.length;a++){v=m=f=p=h=d=u=l=c=void 0;var c=s,l=i[a],u=n;if(!c[l]){var d=!0,h=0,p=("number"==typeof l?h=l:("tfoot"===(p=l.split(":"))[0]&&(d=!1),p[1]&&(h=parseInt(p[1]))),d?u.table().header():u.table().footer());if(!p.querySelectorAll("tr")[h]){var f=u.columns().count(),m=y("tr");m.setAttribute("data-dt-order","disable");for(var v=0;v<f;v++)m.appendChild(y("td"));p.appendChild(m)}c[l]=!0}}}}),t(u).on("preInit.dt",function(t,e){var a,c,l,u;"dt"===t.namespace&&(a=new x.Api(e),c=e.oInit.columnControl,l=T.defaults,j(u=[],c),T.defaults.content&&j(u,l),a.columns().every(function(t){for(var e=this.init().columnControl,n=j(u.slice(),e),r=0;r<n.length;r++){var o=O(n[r],e),i=O(n[r],c),s=O(n[r],l);(s||i||o)&&new T(a,this.index(),Object.assign({},s||{},i||{},o||{}))}}))}),x.Api.registerPlural("columns().columnControl.searchClear()","column().columnControl.searchClear()",rt),x.Api.registerPlural("columns().ccSearchClear()","column().ccSearchClear()",rt),x.Api.registerPlural("columns().columnControl.searchList()","column().columnControl.searchList()",function(n){return this.iterator("column",function(t,e){t=t.aoColumns[e].columnControlSearchList;t&&t(n)})}),x.ext.buttons.ccSearchClear={text:function(t){return t.i18n("columnControl.buttons.searchClear","Clear search")},init:function(n,t,e){var r=this;n.on("draw.DT",function(){var t=!1,e=!!n.search();e||n.columns().every(function(){(this.search.fixed("dtcc")||this.search.fixed("dtcc-list")||this.init().__ccList)&&(t=!0)}),r.enable(e||t)}),this.enable(!1)},action:function(t,e,n,r){e.search(""),e.columns().columnControl.searchClear(),e.draw()}},x});