@taiga-ui/kit 3.59.0 → 3.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/bundles/taiga-ui-kit-components-accordion.umd.js +774 -628
  2. package/bundles/taiga-ui-kit-components-accordion.umd.js.map +1 -1
  3. package/bundles/taiga-ui-kit-components-action.umd.js +598 -452
  4. package/bundles/taiga-ui-kit-components-action.umd.js.map +1 -1
  5. package/bundles/taiga-ui-kit-components-avatar.umd.js +640 -494
  6. package/bundles/taiga-ui-kit-components-avatar.umd.js.map +1 -1
  7. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js +563 -417
  8. package/bundles/taiga-ui-kit-components-breadcrumbs.umd.js.map +1 -1
  9. package/bundles/taiga-ui-kit-components-calendar-month.umd.js +747 -601
  10. package/bundles/taiga-ui-kit-components-calendar-month.umd.js.map +1 -1
  11. package/bundles/taiga-ui-kit-components-calendar-range.umd.js +718 -572
  12. package/bundles/taiga-ui-kit-components-calendar-range.umd.js.map +1 -1
  13. package/bundles/taiga-ui-kit-components-carousel.umd.js +821 -675
  14. package/bundles/taiga-ui-kit-components-carousel.umd.js.map +1 -1
  15. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js +645 -499
  16. package/bundles/taiga-ui-kit-components-checkbox-block.umd.js.map +1 -1
  17. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js +585 -439
  18. package/bundles/taiga-ui-kit-components-checkbox-labeled.umd.js.map +1 -1
  19. package/bundles/taiga-ui-kit-components-checkbox.umd.js +608 -462
  20. package/bundles/taiga-ui-kit-components-checkbox.umd.js.map +1 -1
  21. package/bundles/taiga-ui-kit-components-combo-box.umd.js +834 -688
  22. package/bundles/taiga-ui-kit-components-combo-box.umd.js.map +1 -1
  23. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js +656 -510
  24. package/bundles/taiga-ui-kit-components-data-list-wrapper.umd.js.map +1 -1
  25. package/bundles/taiga-ui-kit-components-elastic-container.umd.js +587 -441
  26. package/bundles/taiga-ui-kit-components-elastic-container.umd.js.map +1 -1
  27. package/bundles/taiga-ui-kit-components-files.umd.js +808 -662
  28. package/bundles/taiga-ui-kit-components-files.umd.js.map +1 -1
  29. package/bundles/taiga-ui-kit-components-filter.umd.js +607 -461
  30. package/bundles/taiga-ui-kit-components-filter.umd.js.map +1 -1
  31. package/bundles/taiga-ui-kit-components-input-copy.umd.js +700 -554
  32. package/bundles/taiga-ui-kit-components-input-copy.umd.js.map +1 -1
  33. package/bundles/taiga-ui-kit-components-input-count.umd.js +809 -663
  34. package/bundles/taiga-ui-kit-components-input-count.umd.js.map +1 -1
  35. package/bundles/taiga-ui-kit-components-input-date-multi.umd.js +849 -703
  36. package/bundles/taiga-ui-kit-components-input-date-multi.umd.js.map +1 -1
  37. package/bundles/taiga-ui-kit-components-input-date-range.umd.js +973 -827
  38. package/bundles/taiga-ui-kit-components-input-date-range.umd.js.map +1 -1
  39. package/bundles/taiga-ui-kit-components-input-date-time.umd.js +1026 -880
  40. package/bundles/taiga-ui-kit-components-input-date-time.umd.js.map +1 -1
  41. package/bundles/taiga-ui-kit-components-input-date.umd.js +976 -830
  42. package/bundles/taiga-ui-kit-components-input-date.umd.js.map +1 -1
  43. package/bundles/taiga-ui-kit-components-input-files.umd.js +975 -829
  44. package/bundles/taiga-ui-kit-components-input-files.umd.js.map +1 -1
  45. package/bundles/taiga-ui-kit-components-input-inline.umd.js +612 -466
  46. package/bundles/taiga-ui-kit-components-input-inline.umd.js.map +1 -1
  47. package/bundles/taiga-ui-kit-components-input-month-range.umd.js +755 -609
  48. package/bundles/taiga-ui-kit-components-input-month-range.umd.js.map +1 -1
  49. package/bundles/taiga-ui-kit-components-input-month.umd.js +788 -642
  50. package/bundles/taiga-ui-kit-components-input-month.umd.js.map +1 -1
  51. package/bundles/taiga-ui-kit-components-input-number.umd.js +941 -795
  52. package/bundles/taiga-ui-kit-components-input-number.umd.js.map +1 -1
  53. package/bundles/taiga-ui-kit-components-input-password.umd.js +720 -574
  54. package/bundles/taiga-ui-kit-components-input-password.umd.js.map +1 -1
  55. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js +811 -665
  56. package/bundles/taiga-ui-kit-components-input-phone-international.umd.js.map +1 -1
  57. package/bundles/taiga-ui-kit-components-input-phone.umd.js +913 -767
  58. package/bundles/taiga-ui-kit-components-input-phone.umd.js.map +1 -1
  59. package/bundles/taiga-ui-kit-components-input-range.umd.js +796 -650
  60. package/bundles/taiga-ui-kit-components-input-range.umd.js.map +1 -1
  61. package/bundles/taiga-ui-kit-components-input-slider.umd.js +737 -591
  62. package/bundles/taiga-ui-kit-components-input-slider.umd.js.map +1 -1
  63. package/bundles/taiga-ui-kit-components-input-tag.umd.js +1102 -956
  64. package/bundles/taiga-ui-kit-components-input-tag.umd.js.map +1 -1
  65. package/bundles/taiga-ui-kit-components-input-time.umd.js +1021 -875
  66. package/bundles/taiga-ui-kit-components-input-time.umd.js.map +1 -1
  67. package/bundles/taiga-ui-kit-components-input-year.umd.js +706 -560
  68. package/bundles/taiga-ui-kit-components-input-year.umd.js.map +1 -1
  69. package/bundles/taiga-ui-kit-components-input.umd.js +661 -515
  70. package/bundles/taiga-ui-kit-components-input.umd.js.map +1 -1
  71. package/bundles/taiga-ui-kit-components-items-with-more.umd.js +689 -543
  72. package/bundles/taiga-ui-kit-components-items-with-more.umd.js.map +1 -1
  73. package/bundles/taiga-ui-kit-components-line-clamp.umd.js +742 -596
  74. package/bundles/taiga-ui-kit-components-line-clamp.umd.js.map +1 -1
  75. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js +544 -398
  76. package/bundles/taiga-ui-kit-components-multi-select-option.umd.js.map +1 -1
  77. package/bundles/taiga-ui-kit-components-multi-select.umd.js +1337 -1191
  78. package/bundles/taiga-ui-kit-components-multi-select.umd.js.map +1 -1
  79. package/bundles/taiga-ui-kit-components-pagination.umd.js +810 -664
  80. package/bundles/taiga-ui-kit-components-pagination.umd.js.map +1 -1
  81. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js +152 -6
  82. package/bundles/taiga-ui-kit-components-pdf-viewer.umd.js.map +1 -1
  83. package/bundles/taiga-ui-kit-components-progress.umd.js +152 -6
  84. package/bundles/taiga-ui-kit-components-progress.umd.js.map +1 -1
  85. package/bundles/taiga-ui-kit-components-push.umd.js +152 -6
  86. package/bundles/taiga-ui-kit-components-push.umd.js.map +1 -1
  87. package/bundles/taiga-ui-kit-components-radio-block.umd.js +645 -499
  88. package/bundles/taiga-ui-kit-components-radio-block.umd.js.map +1 -1
  89. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js +616 -470
  90. package/bundles/taiga-ui-kit-components-radio-labeled.umd.js.map +1 -1
  91. package/bundles/taiga-ui-kit-components-radio-list.umd.js +628 -482
  92. package/bundles/taiga-ui-kit-components-radio-list.umd.js.map +1 -1
  93. package/bundles/taiga-ui-kit-components-radio.umd.js +689 -543
  94. package/bundles/taiga-ui-kit-components-radio.umd.js.map +1 -1
  95. package/bundles/taiga-ui-kit-components-range.umd.js +811 -665
  96. package/bundles/taiga-ui-kit-components-range.umd.js.map +1 -1
  97. package/bundles/taiga-ui-kit-components-rating.umd.js +646 -500
  98. package/bundles/taiga-ui-kit-components-rating.umd.js.map +1 -1
  99. package/bundles/taiga-ui-kit-components-routable-dialog.umd.js +580 -434
  100. package/bundles/taiga-ui-kit-components-routable-dialog.umd.js.map +1 -1
  101. package/bundles/taiga-ui-kit-components-select.umd.js +933 -787
  102. package/bundles/taiga-ui-kit-components-select.umd.js.map +1 -1
  103. package/bundles/taiga-ui-kit-components-slider.umd.js +943 -797
  104. package/bundles/taiga-ui-kit-components-slider.umd.js.map +1 -1
  105. package/bundles/taiga-ui-kit-components-stepper.umd.js +769 -623
  106. package/bundles/taiga-ui-kit-components-stepper.umd.js.map +1 -1
  107. package/bundles/taiga-ui-kit-components-tabs.umd.js +152 -6
  108. package/bundles/taiga-ui-kit-components-tabs.umd.js.map +1 -1
  109. package/bundles/taiga-ui-kit-components-textarea.umd.js +966 -820
  110. package/bundles/taiga-ui-kit-components-textarea.umd.js.map +1 -1
  111. package/bundles/taiga-ui-kit-components-tiles.umd.js +839 -693
  112. package/bundles/taiga-ui-kit-components-tiles.umd.js.map +1 -1
  113. package/bundles/taiga-ui-kit-components-toggle.umd.js +711 -565
  114. package/bundles/taiga-ui-kit-components-toggle.umd.js.map +1 -1
  115. package/bundles/taiga-ui-kit-constants.umd.js +152 -6
  116. package/bundles/taiga-ui-kit-constants.umd.js.map +1 -1
  117. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js +637 -491
  118. package/bundles/taiga-ui-kit-directives-data-list-dropdown-manager.umd.js.map +1 -1
  119. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js +605 -459
  120. package/bundles/taiga-ui-kit-directives-lazy-loading.umd.js.map +1 -1
  121. package/bundles/taiga-ui-kit-directives-unmask-handler.umd.js +540 -394
  122. package/bundles/taiga-ui-kit-directives-unmask-handler.umd.js.map +1 -1
  123. package/bundles/taiga-ui-kit-pipes-field-error.umd.js +693 -547
  124. package/bundles/taiga-ui-kit-pipes-field-error.umd.js.map +1 -1
  125. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js +616 -470
  126. package/bundles/taiga-ui-kit-pipes-filter-by-input.umd.js.map +1 -1
  127. package/bundles/taiga-ui-kit-pipes-sort-countries.umd.js +524 -378
  128. package/bundles/taiga-ui-kit-pipes-sort-countries.umd.js.map +1 -1
  129. package/bundles/taiga-ui-kit-utils-mask.umd.js +152 -6
  130. package/bundles/taiga-ui-kit-utils-mask.umd.js.map +1 -1
  131. package/bundles/taiga-ui-kit-utils-math.umd.js +152 -6
  132. package/bundles/taiga-ui-kit-utils-math.umd.js.map +1 -1
  133. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js +152 -6
  134. package/bundles/taiga-ui-kit-utils-miscellaneous.umd.js.map +1 -1
  135. package/package.json +6 -6
@@ -1,667 +1,813 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/components/input-number'), require('@taiga-ui/kit/components/range'), require('@taiga-ui/kit/constants'), require('@angular/common'), require('@tinkoff/ng-polymorpheus')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-range', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/components/input-number', '@taiga-ui/kit/components/range', '@taiga-ui/kit/constants', '@angular/common', '@tinkoff/ng-polymorpheus'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-range"] = {}), global.ng.core, global.ng.forms, global.i4, global.i3, global["taiga-ui"].kit.components["input-number"], global["taiga-ui"].kit.components.range, global["taiga-ui"].kit.constants, global.ng.common, global.i7));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/components/input-number'), require('@taiga-ui/kit/components/range'), require('@taiga-ui/kit/constants'), require('@angular/common'), require('@tinkoff/ng-polymorpheus')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-range', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/components/input-number', '@taiga-ui/kit/components/range', '@taiga-ui/kit/constants', '@angular/common', '@tinkoff/ng-polymorpheus'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["taiga-ui"] = global["taiga-ui"] || {}, global["taiga-ui"].kit = global["taiga-ui"].kit || {}, global["taiga-ui"].kit.components = global["taiga-ui"].kit.components || {}, global["taiga-ui"].kit.components["input-range"] = {}), global.ng.core, global.ng.forms, global.i4, global.i3, global["taiga-ui"].kit.components["input-number"], global["taiga-ui"].kit.components.range, global["taiga-ui"].kit.constants, global.ng.common, global.i7));
5
5
  })(this, (function (exports, i0, i5, i4, i3, i1, i2, constants, i6, i7) { 'use strict';
6
6
 
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
20
18
  }
21
- n["default"] = e;
22
- return Object.freeze(n);
19
+ });
23
20
  }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
24
 
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
27
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
28
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
29
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
30
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
32
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
27
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
28
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
29
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
30
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
32
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
33
33
 
34
- /*! *****************************************************************************
35
- Copyright (c) Microsoft Corporation.
34
+ /******************************************************************************
35
+ Copyright (c) Microsoft Corporation.
36
36
 
37
- Permission to use, copy, modify, and/or distribute this software for any
38
- purpose with or without fee is hereby granted.
37
+ Permission to use, copy, modify, and/or distribute this software for any
38
+ purpose with or without fee is hereby granted.
39
39
 
40
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
41
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
42
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
43
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
44
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
45
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
46
- PERFORMANCE OF THIS SOFTWARE.
47
- ***************************************************************************** */
48
- /* global Reflect, Promise */
49
- var extendStatics = function (d, b) {
50
- extendStatics = Object.setPrototypeOf ||
51
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52
- function (d, b) { for (var p in b)
53
- if (Object.prototype.hasOwnProperty.call(b, p))
54
- d[p] = b[p]; };
55
- return extendStatics(d, b);
56
- };
57
- function __extends(d, b) {
58
- if (typeof b !== "function" && b !== null)
59
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
60
- extendStatics(d, b);
61
- function __() { this.constructor = d; }
62
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
63
- }
64
- var __assign = function () {
65
- __assign = Object.assign || function __assign(t) {
66
- for (var s, i = 1, n = arguments.length; i < n; i++) {
67
- s = arguments[i];
68
- for (var p in s)
69
- if (Object.prototype.hasOwnProperty.call(s, p))
70
- t[p] = s[p];
71
- }
72
- return t;
73
- };
74
- return __assign.apply(this, arguments);
75
- };
76
- function __rest(s, e) {
77
- var t = {};
78
- for (var p in s)
79
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
80
- t[p] = s[p];
81
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
82
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
83
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
84
- t[p[i]] = s[p[i]];
85
- }
86
- return t;
87
- }
88
- function __decorate(decorators, target, key, desc) {
89
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
90
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
91
- r = Reflect.decorate(decorators, target, key, desc);
92
- else
93
- for (var i = decorators.length - 1; i >= 0; i--)
94
- if (d = decorators[i])
95
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
96
- return c > 3 && r && Object.defineProperty(target, key, r), r;
97
- }
98
- function __param(paramIndex, decorator) {
99
- return function (target, key) { decorator(target, key, paramIndex); };
100
- }
101
- function __metadata(metadataKey, metadataValue) {
102
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
103
- return Reflect.metadata(metadataKey, metadataValue);
104
- }
105
- function __awaiter(thisArg, _arguments, P, generator) {
106
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
107
- return new (P || (P = Promise))(function (resolve, reject) {
108
- function fulfilled(value) { try {
109
- step(generator.next(value));
110
- }
111
- catch (e) {
112
- reject(e);
113
- } }
114
- function rejected(value) { try {
115
- step(generator["throw"](value));
116
- }
117
- catch (e) {
118
- reject(e);
119
- } }
120
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
121
- step((generator = generator.apply(thisArg, _arguments || [])).next());
122
- });
123
- }
124
- function __generator(thisArg, body) {
125
- var _ = { label: 0, sent: function () { if (t[0] & 1)
126
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
127
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
128
- function verb(n) { return function (v) { return step([n, v]); }; }
129
- function step(op) {
130
- if (f)
131
- throw new TypeError("Generator is already executing.");
132
- while (_)
133
- try {
134
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
135
- return t;
136
- if (y = 0, t)
137
- op = [op[0] & 2, t.value];
138
- switch (op[0]) {
139
- case 0:
140
- case 1:
141
- t = op;
142
- break;
143
- case 4:
144
- _.label++;
145
- return { value: op[1], done: false };
146
- case 5:
147
- _.label++;
148
- y = op[1];
149
- op = [0];
150
- continue;
151
- case 7:
152
- op = _.ops.pop();
153
- _.trys.pop();
154
- continue;
155
- default:
156
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
157
- _ = 0;
158
- continue;
159
- }
160
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
161
- _.label = op[1];
162
- break;
163
- }
164
- if (op[0] === 6 && _.label < t[1]) {
165
- _.label = t[1];
166
- t = op;
167
- break;
168
- }
169
- if (t && _.label < t[2]) {
170
- _.label = t[2];
171
- _.ops.push(op);
172
- break;
173
- }
174
- if (t[2])
175
- _.ops.pop();
176
- _.trys.pop();
177
- continue;
178
- }
179
- op = body.call(thisArg, _);
180
- }
181
- catch (e) {
182
- op = [6, e];
183
- y = 0;
184
- }
185
- finally {
186
- f = t = 0;
187
- }
188
- if (op[0] & 5)
189
- throw op[1];
190
- return { value: op[0] ? op[1] : void 0, done: true };
191
- }
192
- }
193
- var __createBinding = Object.create ? (function (o, m, k, k2) {
194
- if (k2 === undefined)
195
- k2 = k;
196
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
197
- }) : (function (o, m, k, k2) {
198
- if (k2 === undefined)
199
- k2 = k;
200
- o[k2] = m[k];
201
- });
202
- function __exportStar(m, o) {
203
- for (var p in m)
204
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
205
- __createBinding(o, m, p);
206
- }
207
- function __values(o) {
208
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
209
- if (m)
210
- return m.call(o);
211
- if (o && typeof o.length === "number")
212
- return {
213
- next: function () {
214
- if (o && i >= o.length)
215
- o = void 0;
216
- return { value: o && o[i++], done: !o };
217
- }
218
- };
219
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
220
- }
221
- function __read(o, n) {
222
- var m = typeof Symbol === "function" && o[Symbol.iterator];
223
- if (!m)
224
- return o;
225
- var i = m.call(o), r, ar = [], e;
226
- try {
227
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
228
- ar.push(r.value);
229
- }
230
- catch (error) {
231
- e = { error: error };
232
- }
233
- finally {
234
- try {
235
- if (r && !r.done && (m = i["return"]))
236
- m.call(i);
237
- }
238
- finally {
239
- if (e)
240
- throw e.error;
241
- }
242
- }
243
- return ar;
244
- }
245
- /** @deprecated */
246
- function __spread() {
247
- for (var ar = [], i = 0; i < arguments.length; i++)
248
- ar = ar.concat(__read(arguments[i]));
249
- return ar;
250
- }
251
- /** @deprecated */
252
- function __spreadArrays() {
253
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
254
- s += arguments[i].length;
255
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
256
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
257
- r[k] = a[j];
258
- return r;
259
- }
260
- function __spreadArray(to, from, pack) {
261
- if (pack || arguments.length === 2)
262
- for (var i = 0, l = from.length, ar; i < l; i++) {
263
- if (ar || !(i in from)) {
264
- if (!ar)
265
- ar = Array.prototype.slice.call(from, 0, i);
266
- ar[i] = from[i];
267
- }
268
- }
269
- return to.concat(ar || from);
270
- }
271
- function __await(v) {
272
- return this instanceof __await ? (this.v = v, this) : new __await(v);
273
- }
274
- function __asyncGenerator(thisArg, _arguments, generator) {
275
- if (!Symbol.asyncIterator)
276
- throw new TypeError("Symbol.asyncIterator is not defined.");
277
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
278
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
279
- function verb(n) { if (g[n])
280
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
281
- function resume(n, v) { try {
282
- step(g[n](v));
283
- }
284
- catch (e) {
285
- settle(q[0][3], e);
286
- } }
287
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
288
- function fulfill(value) { resume("next", value); }
289
- function reject(value) { resume("throw", value); }
290
- function settle(f, v) { if (f(v), q.shift(), q.length)
291
- resume(q[0][0], q[0][1]); }
292
- }
293
- function __asyncDelegator(o) {
294
- var i, p;
295
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
296
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
297
- }
298
- function __asyncValues(o) {
299
- if (!Symbol.asyncIterator)
300
- throw new TypeError("Symbol.asyncIterator is not defined.");
301
- var m = o[Symbol.asyncIterator], i;
302
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
303
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
304
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
305
- }
306
- function __makeTemplateObject(cooked, raw) {
307
- if (Object.defineProperty) {
308
- Object.defineProperty(cooked, "raw", { value: raw });
309
- }
310
- else {
311
- cooked.raw = raw;
312
- }
313
- return cooked;
314
- }
315
- ;
316
- var __setModuleDefault = Object.create ? (function (o, v) {
317
- Object.defineProperty(o, "default", { enumerable: true, value: v });
318
- }) : function (o, v) {
319
- o["default"] = v;
320
- };
321
- function __importStar(mod) {
322
- if (mod && mod.__esModule)
323
- return mod;
324
- var result = {};
325
- if (mod != null)
326
- for (var k in mod)
327
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
328
- __createBinding(result, mod, k);
329
- __setModuleDefault(result, mod);
330
- return result;
331
- }
332
- function __importDefault(mod) {
333
- return (mod && mod.__esModule) ? mod : { default: mod };
334
- }
335
- function __classPrivateFieldGet(receiver, state, kind, f) {
336
- if (kind === "a" && !f)
337
- throw new TypeError("Private accessor was defined without a getter");
338
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
339
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
340
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
341
- }
342
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
343
- if (kind === "m")
344
- throw new TypeError("Private method is not writable");
345
- if (kind === "a" && !f)
346
- throw new TypeError("Private accessor was defined without a setter");
347
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
348
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
349
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
350
- }
40
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
41
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
42
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
43
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
44
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
45
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
46
+ PERFORMANCE OF THIS SOFTWARE.
47
+ ***************************************************************************** */
48
+ /* global Reflect, Promise, SuppressedError, Symbol */
49
+ var extendStatics = function (d, b) {
50
+ extendStatics = Object.setPrototypeOf ||
51
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52
+ function (d, b) { for (var p in b)
53
+ if (Object.prototype.hasOwnProperty.call(b, p))
54
+ d[p] = b[p]; };
55
+ return extendStatics(d, b);
56
+ };
57
+ function __extends(d, b) {
58
+ if (typeof b !== "function" && b !== null)
59
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
60
+ extendStatics(d, b);
61
+ function __() { this.constructor = d; }
62
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
63
+ }
64
+ var __assign = function () {
65
+ __assign = Object.assign || function __assign(t) {
66
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
67
+ s = arguments[i];
68
+ for (var p in s)
69
+ if (Object.prototype.hasOwnProperty.call(s, p))
70
+ t[p] = s[p];
71
+ }
72
+ return t;
73
+ };
74
+ return __assign.apply(this, arguments);
75
+ };
76
+ function __rest(s, e) {
77
+ var t = {};
78
+ for (var p in s)
79
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
80
+ t[p] = s[p];
81
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
82
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
83
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
84
+ t[p[i]] = s[p[i]];
85
+ }
86
+ return t;
87
+ }
88
+ function __decorate(decorators, target, key, desc) {
89
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
90
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
91
+ r = Reflect.decorate(decorators, target, key, desc);
92
+ else
93
+ for (var i = decorators.length - 1; i >= 0; i--)
94
+ if (d = decorators[i])
95
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
96
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
97
+ }
98
+ function __param(paramIndex, decorator) {
99
+ return function (target, key) { decorator(target, key, paramIndex); };
100
+ }
101
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
102
+ function accept(f) { if (f !== void 0 && typeof f !== "function")
103
+ throw new TypeError("Function expected"); return f; }
104
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
105
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
106
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
107
+ var _, done = false;
108
+ for (var i = decorators.length - 1; i >= 0; i--) {
109
+ var context = {};
110
+ for (var p in contextIn)
111
+ context[p] = p === "access" ? {} : contextIn[p];
112
+ for (var p in contextIn.access)
113
+ context.access[p] = contextIn.access[p];
114
+ context.addInitializer = function (f) { if (done)
115
+ throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
116
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
117
+ if (kind === "accessor") {
118
+ if (result === void 0)
119
+ continue;
120
+ if (result === null || typeof result !== "object")
121
+ throw new TypeError("Object expected");
122
+ if (_ = accept(result.get))
123
+ descriptor.get = _;
124
+ if (_ = accept(result.set))
125
+ descriptor.set = _;
126
+ if (_ = accept(result.init))
127
+ initializers.unshift(_);
128
+ }
129
+ else if (_ = accept(result)) {
130
+ if (kind === "field")
131
+ initializers.unshift(_);
132
+ else
133
+ descriptor[key] = _;
134
+ }
135
+ }
136
+ if (target)
137
+ Object.defineProperty(target, contextIn.name, descriptor);
138
+ done = true;
139
+ }
140
+ ;
141
+ function __runInitializers(thisArg, initializers, value) {
142
+ var useValue = arguments.length > 2;
143
+ for (var i = 0; i < initializers.length; i++) {
144
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
145
+ }
146
+ return useValue ? value : void 0;
147
+ }
148
+ ;
149
+ function __propKey(x) {
150
+ return typeof x === "symbol" ? x : "".concat(x);
151
+ }
152
+ ;
153
+ function __setFunctionName(f, name, prefix) {
154
+ if (typeof name === "symbol")
155
+ name = name.description ? "[".concat(name.description, "]") : "";
156
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
157
+ }
158
+ ;
159
+ function __metadata(metadataKey, metadataValue) {
160
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
161
+ return Reflect.metadata(metadataKey, metadataValue);
162
+ }
163
+ function __awaiter(thisArg, _arguments, P, generator) {
164
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
165
+ return new (P || (P = Promise))(function (resolve, reject) {
166
+ function fulfilled(value) { try {
167
+ step(generator.next(value));
168
+ }
169
+ catch (e) {
170
+ reject(e);
171
+ } }
172
+ function rejected(value) { try {
173
+ step(generator["throw"](value));
174
+ }
175
+ catch (e) {
176
+ reject(e);
177
+ } }
178
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
179
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
180
+ });
181
+ }
182
+ function __generator(thisArg, body) {
183
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
184
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
185
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
186
+ function verb(n) { return function (v) { return step([n, v]); }; }
187
+ function step(op) {
188
+ if (f)
189
+ throw new TypeError("Generator is already executing.");
190
+ while (g && (g = 0, op[0] && (_ = 0)), _)
191
+ try {
192
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
193
+ return t;
194
+ if (y = 0, t)
195
+ op = [op[0] & 2, t.value];
196
+ switch (op[0]) {
197
+ case 0:
198
+ case 1:
199
+ t = op;
200
+ break;
201
+ case 4:
202
+ _.label++;
203
+ return { value: op[1], done: false };
204
+ case 5:
205
+ _.label++;
206
+ y = op[1];
207
+ op = [0];
208
+ continue;
209
+ case 7:
210
+ op = _.ops.pop();
211
+ _.trys.pop();
212
+ continue;
213
+ default:
214
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
215
+ _ = 0;
216
+ continue;
217
+ }
218
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
219
+ _.label = op[1];
220
+ break;
221
+ }
222
+ if (op[0] === 6 && _.label < t[1]) {
223
+ _.label = t[1];
224
+ t = op;
225
+ break;
226
+ }
227
+ if (t && _.label < t[2]) {
228
+ _.label = t[2];
229
+ _.ops.push(op);
230
+ break;
231
+ }
232
+ if (t[2])
233
+ _.ops.pop();
234
+ _.trys.pop();
235
+ continue;
236
+ }
237
+ op = body.call(thisArg, _);
238
+ }
239
+ catch (e) {
240
+ op = [6, e];
241
+ y = 0;
242
+ }
243
+ finally {
244
+ f = t = 0;
245
+ }
246
+ if (op[0] & 5)
247
+ throw op[1];
248
+ return { value: op[0] ? op[1] : void 0, done: true };
249
+ }
250
+ }
251
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
252
+ if (k2 === undefined)
253
+ k2 = k;
254
+ var desc = Object.getOwnPropertyDescriptor(m, k);
255
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
256
+ desc = { enumerable: true, get: function () { return m[k]; } };
257
+ }
258
+ Object.defineProperty(o, k2, desc);
259
+ }) : (function (o, m, k, k2) {
260
+ if (k2 === undefined)
261
+ k2 = k;
262
+ o[k2] = m[k];
263
+ });
264
+ function __exportStar(m, o) {
265
+ for (var p in m)
266
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
267
+ __createBinding(o, m, p);
268
+ }
269
+ function __values(o) {
270
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
271
+ if (m)
272
+ return m.call(o);
273
+ if (o && typeof o.length === "number")
274
+ return {
275
+ next: function () {
276
+ if (o && i >= o.length)
277
+ o = void 0;
278
+ return { value: o && o[i++], done: !o };
279
+ }
280
+ };
281
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
282
+ }
283
+ function __read(o, n) {
284
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
285
+ if (!m)
286
+ return o;
287
+ var i = m.call(o), r, ar = [], e;
288
+ try {
289
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
290
+ ar.push(r.value);
291
+ }
292
+ catch (error) {
293
+ e = { error: error };
294
+ }
295
+ finally {
296
+ try {
297
+ if (r && !r.done && (m = i["return"]))
298
+ m.call(i);
299
+ }
300
+ finally {
301
+ if (e)
302
+ throw e.error;
303
+ }
304
+ }
305
+ return ar;
306
+ }
307
+ /** @deprecated */
308
+ function __spread() {
309
+ for (var ar = [], i = 0; i < arguments.length; i++)
310
+ ar = ar.concat(__read(arguments[i]));
311
+ return ar;
312
+ }
313
+ /** @deprecated */
314
+ function __spreadArrays() {
315
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
316
+ s += arguments[i].length;
317
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
318
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
319
+ r[k] = a[j];
320
+ return r;
321
+ }
322
+ function __spreadArray(to, from, pack) {
323
+ if (pack || arguments.length === 2)
324
+ for (var i = 0, l = from.length, ar; i < l; i++) {
325
+ if (ar || !(i in from)) {
326
+ if (!ar)
327
+ ar = Array.prototype.slice.call(from, 0, i);
328
+ ar[i] = from[i];
329
+ }
330
+ }
331
+ return to.concat(ar || Array.prototype.slice.call(from));
332
+ }
333
+ function __await(v) {
334
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
335
+ }
336
+ function __asyncGenerator(thisArg, _arguments, generator) {
337
+ if (!Symbol.asyncIterator)
338
+ throw new TypeError("Symbol.asyncIterator is not defined.");
339
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
340
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
341
+ function verb(n) { if (g[n])
342
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
343
+ function resume(n, v) { try {
344
+ step(g[n](v));
345
+ }
346
+ catch (e) {
347
+ settle(q[0][3], e);
348
+ } }
349
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
350
+ function fulfill(value) { resume("next", value); }
351
+ function reject(value) { resume("throw", value); }
352
+ function settle(f, v) { if (f(v), q.shift(), q.length)
353
+ resume(q[0][0], q[0][1]); }
354
+ }
355
+ function __asyncDelegator(o) {
356
+ var i, p;
357
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
358
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
359
+ }
360
+ function __asyncValues(o) {
361
+ if (!Symbol.asyncIterator)
362
+ throw new TypeError("Symbol.asyncIterator is not defined.");
363
+ var m = o[Symbol.asyncIterator], i;
364
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
365
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
366
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
367
+ }
368
+ function __makeTemplateObject(cooked, raw) {
369
+ if (Object.defineProperty) {
370
+ Object.defineProperty(cooked, "raw", { value: raw });
371
+ }
372
+ else {
373
+ cooked.raw = raw;
374
+ }
375
+ return cooked;
376
+ }
377
+ ;
378
+ var __setModuleDefault = Object.create ? (function (o, v) {
379
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
380
+ }) : function (o, v) {
381
+ o["default"] = v;
382
+ };
383
+ function __importStar(mod) {
384
+ if (mod && mod.__esModule)
385
+ return mod;
386
+ var result = {};
387
+ if (mod != null)
388
+ for (var k in mod)
389
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
390
+ __createBinding(result, mod, k);
391
+ __setModuleDefault(result, mod);
392
+ return result;
393
+ }
394
+ function __importDefault(mod) {
395
+ return (mod && mod.__esModule) ? mod : { default: mod };
396
+ }
397
+ function __classPrivateFieldGet(receiver, state, kind, f) {
398
+ if (kind === "a" && !f)
399
+ throw new TypeError("Private accessor was defined without a getter");
400
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
401
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
402
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
403
+ }
404
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
405
+ if (kind === "m")
406
+ throw new TypeError("Private method is not writable");
407
+ if (kind === "a" && !f)
408
+ throw new TypeError("Private accessor was defined without a setter");
409
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
410
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
411
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
412
+ }
413
+ function __classPrivateFieldIn(state, receiver) {
414
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
415
+ throw new TypeError("Cannot use 'in' operator on non-object");
416
+ return typeof state === "function" ? receiver === state : state.has(receiver);
417
+ }
418
+ function __addDisposableResource(env, value, async) {
419
+ if (value !== null && value !== void 0) {
420
+ if (typeof value !== "object" && typeof value !== "function")
421
+ throw new TypeError("Object expected.");
422
+ var dispose;
423
+ if (async) {
424
+ if (!Symbol.asyncDispose)
425
+ throw new TypeError("Symbol.asyncDispose is not defined.");
426
+ dispose = value[Symbol.asyncDispose];
427
+ }
428
+ if (dispose === void 0) {
429
+ if (!Symbol.dispose)
430
+ throw new TypeError("Symbol.dispose is not defined.");
431
+ dispose = value[Symbol.dispose];
432
+ }
433
+ if (typeof dispose !== "function")
434
+ throw new TypeError("Object not disposable.");
435
+ env.stack.push({ value: value, dispose: dispose, async: async });
436
+ }
437
+ else if (async) {
438
+ env.stack.push({ async: true });
439
+ }
440
+ return value;
441
+ }
442
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
443
+ var e = new Error(message);
444
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
445
+ };
446
+ function __disposeResources(env) {
447
+ function fail(e) {
448
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
449
+ env.hasError = true;
450
+ }
451
+ function next() {
452
+ while (env.stack.length) {
453
+ var rec = env.stack.pop();
454
+ try {
455
+ var result = rec.dispose && rec.dispose.call(rec.value);
456
+ if (rec.async)
457
+ return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
458
+ }
459
+ catch (e) {
460
+ fail(e);
461
+ }
462
+ }
463
+ if (env.hasError)
464
+ throw env.error;
465
+ }
466
+ return next();
467
+ }
468
+ var tslib_es6 = {
469
+ __extends: __extends,
470
+ __assign: __assign,
471
+ __rest: __rest,
472
+ __decorate: __decorate,
473
+ __param: __param,
474
+ __metadata: __metadata,
475
+ __awaiter: __awaiter,
476
+ __generator: __generator,
477
+ __createBinding: __createBinding,
478
+ __exportStar: __exportStar,
479
+ __values: __values,
480
+ __read: __read,
481
+ __spread: __spread,
482
+ __spreadArrays: __spreadArrays,
483
+ __spreadArray: __spreadArray,
484
+ __await: __await,
485
+ __asyncGenerator: __asyncGenerator,
486
+ __asyncDelegator: __asyncDelegator,
487
+ __asyncValues: __asyncValues,
488
+ __makeTemplateObject: __makeTemplateObject,
489
+ __importStar: __importStar,
490
+ __importDefault: __importDefault,
491
+ __classPrivateFieldGet: __classPrivateFieldGet,
492
+ __classPrivateFieldSet: __classPrivateFieldSet,
493
+ __classPrivateFieldIn: __classPrivateFieldIn,
494
+ __addDisposableResource: __addDisposableResource,
495
+ __disposeResources: __disposeResources,
496
+ };
351
497
 
352
- var TuiInputRangeComponent = /** @class */ (function (_super) {
353
- __extends(TuiInputRangeComponent, _super);
354
- function TuiInputRangeComponent(control, cdr, isMobile, el, controller) {
355
- var _this = _super.call(this, control, cdr) || this;
356
- _this.isMobile = isMobile;
357
- _this.el = el;
358
- _this.controller = controller;
359
- _this.inputNumberRefs = i4.EMPTY_QUERY;
360
- _this.rangeRef = null;
361
- _this.min = 0;
362
- _this.max = 100;
363
- _this.quantum = 1;
364
- _this.steps = 0;
365
- _this.segments = 1;
366
- _this.keySteps = null;
367
- _this.pluralize = null;
368
- _this.leftTextfieldValue = _this.safeCurrentValue[0];
369
- _this.rightTextfieldValue = _this.safeCurrentValue[1];
370
- _this.lastActiveSide = 'left';
371
- return _this;
372
- }
373
- Object.defineProperty(TuiInputRangeComponent.prototype, "leftFocusableElement", {
374
- get: function () {
375
- var _a;
376
- return ((_a = this.inputNumberRefs.first) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) || null;
377
- },
378
- enumerable: false,
379
- configurable: true
380
- });
381
- Object.defineProperty(TuiInputRangeComponent.prototype, "rightFocusableElement", {
382
- get: function () {
383
- var _a;
384
- return ((_a = this.inputNumberRefs.last) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) || null;
385
- },
386
- enumerable: false,
387
- configurable: true
388
- });
389
- Object.defineProperty(TuiInputRangeComponent.prototype, "nativeFocusableElement", {
390
- get: function () {
391
- return this.disabled
392
- ? null
393
- : this.leftFocusableElement || this.rightFocusableElement;
394
- },
395
- enumerable: false,
396
- configurable: true
397
- });
398
- Object.defineProperty(TuiInputRangeComponent.prototype, "focused", {
399
- get: function () {
400
- return i4.tuiIsNativeFocusedIn(this.el.nativeElement);
401
- },
402
- enumerable: false,
403
- configurable: true
404
- });
405
- Object.defineProperty(TuiInputRangeComponent.prototype, "appearance", {
406
- get: function () {
407
- return this.controller.appearance;
408
- },
409
- enumerable: false,
410
- configurable: true
411
- });
412
- Object.defineProperty(TuiInputRangeComponent.prototype, "showLeftValueContent", {
413
- get: function () {
414
- var _a;
415
- return Boolean(this.leftValueContent &&
416
- !i4.tuiIsNativeFocused(this.leftFocusableElement) &&
417
- !(((_a = this.rangeRef) === null || _a === void 0 ? void 0 : _a.focused) && this.lastActiveSide === 'left'));
418
- },
419
- enumerable: false,
420
- configurable: true
421
- });
422
- Object.defineProperty(TuiInputRangeComponent.prototype, "showRightValueContent", {
423
- get: function () {
424
- var _a;
425
- return Boolean(this.rightValueContent &&
426
- !i4.tuiIsNativeFocused(this.rightFocusableElement) &&
427
- !(((_a = this.rangeRef) === null || _a === void 0 ? void 0 : _a.focused) && this.lastActiveSide === 'right'));
428
- },
429
- enumerable: false,
430
- configurable: true
431
- });
432
- Object.defineProperty(TuiInputRangeComponent.prototype, "precision", {
433
- get: function () {
434
- return i3.tuiGetFractionPartPadded(this.quantum).length;
435
- },
436
- enumerable: false,
437
- configurable: true
438
- });
439
- Object.defineProperty(TuiInputRangeComponent.prototype, "decimal", {
440
- get: function () {
441
- return this.precision ? 'not-zero' : 'never';
442
- },
443
- enumerable: false,
444
- configurable: true
445
- });
446
- Object.defineProperty(TuiInputRangeComponent.prototype, "computedSteps", {
447
- get: function () {
448
- return this.steps || (this.max - this.min) / this.quantum;
449
- },
450
- enumerable: false,
451
- configurable: true
452
- });
453
- Object.defineProperty(TuiInputRangeComponent.prototype, "step", {
454
- get: function () {
455
- return (this.max - this.min) / this.computedSteps;
456
- },
457
- enumerable: false,
458
- configurable: true
459
- });
460
- TuiInputRangeComponent.prototype.computeKeySteps = function (keySteps, min, max) {
461
- return (keySteps || [
462
- [0, min],
463
- [100, max],
464
- ]);
465
- };
466
- TuiInputRangeComponent.prototype.onActiveZone = function (active) {
467
- this.updateFocused(active);
468
- };
469
- TuiInputRangeComponent.prototype.onTextInputFocused = function (focused) {
470
- if (!focused) {
471
- this.updateTextfieldValues(this.value);
472
- }
473
- };
474
- TuiInputRangeComponent.prototype.changeByStep = function (event, _b) {
475
- var _c = __read(_b, 2), leftCoefficient = _c[0], rightCoefficient = _c[1];
476
- if (this.readOnly) {
477
- return;
478
- }
479
- event.preventDefault();
480
- var newValue = this.valueGuard([
481
- this.value[0] + leftCoefficient * this.step,
482
- this.value[1] + rightCoefficient * this.step,
483
- ]);
484
- if (newValue[0] !== this.value[0] || newValue[1] !== this.value[1]) {
485
- this.onExternalValueUpdate(newValue);
486
- }
487
- };
488
- TuiInputRangeComponent.prototype.onInputLeft = function (value) {
489
- this.safelyUpdateValue([value !== null && value !== void 0 ? value : this.safeCurrentValue[0], this.value[1]]);
490
- };
491
- TuiInputRangeComponent.prototype.onInputRight = function (value) {
492
- this.safelyUpdateValue([this.value[0], value !== null && value !== void 0 ? value : this.safeCurrentValue[1]]);
493
- };
494
- TuiInputRangeComponent.prototype.onExternalValueUpdate = function (value) {
495
- this.safelyUpdateValue(value);
496
- this.updateTextfieldValues(this.value);
497
- };
498
- TuiInputRangeComponent.prototype.focusToTextInput = function () {
499
- var element = this.lastActiveSide === 'left'
500
- ? this.leftFocusableElement
501
- : this.rightFocusableElement;
502
- if (!this.isMobile && element) {
503
- element.focus();
504
- }
505
- };
506
- TuiInputRangeComponent.prototype.onActiveThumbChange = function (activeThumb) {
507
- this.lastActiveSide = activeThumb;
508
- };
509
- TuiInputRangeComponent.prototype.writeValue = function (value) {
510
- _super.prototype.writeValue.call(this, value);
511
- this.updateTextfieldValues(this.value);
512
- };
513
- TuiInputRangeComponent.prototype.getFallbackValue = function () {
514
- return [0, 0];
515
- };
516
- TuiInputRangeComponent.prototype.safelyUpdateValue = function (value) {
517
- this.value = this.valueGuard(value);
518
- };
519
- TuiInputRangeComponent.prototype.valueGuard = function (_b) {
520
- var _c = __read(_b, 2), leftValue = _c[0], rightValue = _c[1];
521
- var leftCalibratedValue = this.calibrate(leftValue);
522
- var rightCalibratedValue = this.calibrate(rightValue);
523
- return [
524
- Math.min(leftCalibratedValue, this.value[1]),
525
- Math.max(rightCalibratedValue, this.value[0]),
526
- ];
527
- };
528
- TuiInputRangeComponent.prototype.calibrate = function (value) {
529
- var roundedValue = i4.tuiRound(Math.round(value / this.quantum) * this.quantum, constants.TUI_FLOATING_PRECISION);
530
- return i4.tuiClamp(roundedValue, this.min, this.max);
531
- };
532
- TuiInputRangeComponent.prototype.updateTextfieldValues = function (_b) {
533
- var _c = __read(_b, 2), leftValue = _c[0], rightValue = _c[1];
534
- this.leftTextfieldValue = leftValue;
535
- this.rightTextfieldValue = rightValue;
536
- };
537
- return TuiInputRangeComponent;
538
- }(i4.AbstractTuiControl));
539
- TuiInputRangeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeComponent, deps: [{ token: i5.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: i4.TUI_IS_MOBILE }, { token: i0.ElementRef }, { token: i3.TUI_TEXTFIELD_WATCHED_CONTROLLER }], target: i0__namespace.ɵɵFactoryTarget.Component });
540
- TuiInputRangeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputRangeComponent, selector: "tui-input-range", inputs: { min: "min", max: "max", quantum: "quantum", steps: "steps", segments: "segments", keySteps: "keySteps", leftValueContent: "leftValueContent", rightValueContent: "rightValueContent", pluralize: "pluralize" }, host: { properties: { "attr.data-size": "controller.size", "class._label-outside": "controller.labelOutside" } }, providers: [
541
- i4.tuiAsFocusableItemAccessor(TuiInputRangeComponent),
542
- i4.tuiAsControl(TuiInputRangeComponent),
543
- i3.TEXTFIELD_CONTROLLER_PROVIDER,
544
- ], viewQueries: [{ propertyName: "rangeRef", first: true, predicate: i2.TuiRangeComponent, descendants: true }, { propertyName: "inputNumberRefs", predicate: i1.TuiInputNumberComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n tuiWrapper\n class=\"t-wrapper\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-input-number\n automation-id=\"tui-input-range__left-input\"\n tuiTextfieldAppearance=\"none\"\n class=\"t-left\"\n [decimal]=\"decimal\"\n [disabled]=\"computedDisabled\"\n [max]=\"value[1]\"\n [min]=\"min\"\n [precision]=\"precision\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldPostfix]=\"pluralize && !showLeftValueContent ? (value[0] | i18nPlural: pluralize) : ''\"\n [(ngModel)]=\"leftTextfieldValue\"\n (focusedChange)=\"onTextInputFocused($event)\"\n (keydown.arrowDown)=\"changeByStep($event, [-1, 0])\"\n (keydown.arrowUp)=\"changeByStep($event, [1, 0])\"\n (ngModelChange)=\"onInputLeft($event)\"\n >\n <ng-content></ng-content>\n <div\n *ngIf=\"showLeftValueContent\"\n ngProjectAs=\"tuiContent\"\n >\n <ng-container *polymorpheusOutlet=\"leftValueContent as text; context: {$implicit: value[0]}\">\n {{ text }}\n </ng-container>\n </div>\n </tui-input-number>\n\n <tui-input-number\n automation-id=\"tui-input-range__right-input\"\n tuiTextfieldAppearance=\"none\"\n class=\"t-right\"\n [decimal]=\"decimal\"\n [disabled]=\"computedDisabled\"\n [max]=\"max\"\n [min]=\"value[0]\"\n [precision]=\"precision\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldPostfix]=\"pluralize && !showRightValueContent ? (value[1] | i18nPlural: pluralize) : ''\"\n [(ngModel)]=\"rightTextfieldValue\"\n (focusedChange)=\"onTextInputFocused($event)\"\n (keydown.arrowDown)=\"changeByStep($event, [0, -1])\"\n (keydown.arrowUp)=\"changeByStep($event, [0, 1])\"\n (ngModelChange)=\"onInputRight($event)\"\n >\n <div\n *ngIf=\"showRightValueContent\"\n ngProjectAs=\"tuiContent\"\n >\n <ng-container *polymorpheusOutlet=\"rightValueContent as text; context: {$implicit: value[1]}\">\n {{ text }}\n </ng-container>\n </div>\n </tui-input-number>\n\n <tui-range\n class=\"t-range\"\n [disabled]=\"readOnly || disabled\"\n [focusable]=\"false\"\n [keySteps]=\"computeKeySteps(keySteps, min, max)\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value\"\n [segments]=\"segments\"\n [step]=\"step\"\n (activeThumbChange)=\"onActiveThumbChange($event)\"\n (ngModelChange)=\"onExternalValueUpdate($event)\"\n (tuiPressedChange)=\"focusToTextInput()\"\n ></tui-range>\n</div>\n", styles: [".t-wrapper{position:relative}.t-left{width:100%}.t-right{position:absolute;right:0;top:0;display:flex;width:50%;height:100%;text-align:right}:host{display:block;border-radius:var(--tui-radius-m)}.t-range{position:absolute;top:100%;left:0;right:0;z-index:1;margin:-.125rem 0 0;background:transparent}\n"], components: [{ type: i1__namespace.TuiInputNumberComponent, selector: "tui-input-number", inputs: ["min", "max", "decimal", "precision", "step", "prefix", "postfix"] }, { type: i2__namespace.TuiRangeComponent, selector: "tui-range", inputs: ["min", "max", "step", "size", "segments", "keySteps"] }], directives: [{ type: i3__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i4__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i1__namespace.TuiInputNumberDirective, selector: "tui-input-number" }, { type: i3__namespace.TuiTextfieldAppearanceDirective, selector: "[tuiTextfieldAppearance]", inputs: ["tuiTextfieldAppearance"] }, { type: i3__namespace.TuiTextfieldPostfixDirective, selector: "[tuiTextfieldPostfix]", inputs: ["tuiTextfieldPostfix"] }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i2__namespace.TuiRangeChangeDirective, selector: "tui-range", outputs: ["activeThumbChange"] }, { type: i4__namespace.TuiPressedDirective, selector: "[tuiPressedChange]", outputs: ["tuiPressedChange"] }], pipes: { "i18nPlural": i6__namespace.I18nPluralPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
545
- __decorate([
546
- i4.tuiPure
547
- ], TuiInputRangeComponent.prototype, "computeKeySteps", null);
548
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeComponent, decorators: [{
549
- type: i0.Component,
550
- args: [{
551
- selector: 'tui-input-range',
552
- templateUrl: './input-range.template.html',
553
- styleUrls: ['./input-range.style.less'],
554
- host: {
555
- '[attr.data-size]': 'controller.size',
556
- '[class._label-outside]': 'controller.labelOutside',
557
- },
558
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
559
- providers: [
560
- i4.tuiAsFocusableItemAccessor(TuiInputRangeComponent),
561
- i4.tuiAsControl(TuiInputRangeComponent),
562
- i3.TEXTFIELD_CONTROLLER_PROVIDER,
563
- ],
564
- }]
565
- }], ctorParameters: function () {
566
- return [{ type: i5__namespace.NgControl, decorators: [{
567
- type: i0.Optional
568
- }, {
569
- type: i0.Self
570
- }, {
571
- type: i0.Inject,
572
- args: [i5.NgControl]
573
- }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
574
- type: i0.Inject,
575
- args: [i0.ChangeDetectorRef]
576
- }] }, { type: undefined, decorators: [{
577
- type: i0.Inject,
578
- args: [i4.TUI_IS_MOBILE]
579
- }] }, { type: i0__namespace.ElementRef, decorators: [{
580
- type: i0.Inject,
581
- args: [i0.ElementRef]
582
- }] }, { type: i3__namespace.TuiTextfieldController, decorators: [{
583
- type: i0.Inject,
584
- args: [i3.TUI_TEXTFIELD_WATCHED_CONTROLLER]
585
- }] }];
586
- }, propDecorators: { inputNumberRefs: [{
587
- type: i0.ViewChildren,
588
- args: [i1.TuiInputNumberComponent]
589
- }], rangeRef: [{
590
- type: i0.ViewChild,
591
- args: [i2.TuiRangeComponent]
592
- }], min: [{
593
- type: i0.Input
594
- }], max: [{
595
- type: i0.Input
596
- }], quantum: [{
597
- type: i0.Input
598
- }], steps: [{
599
- type: i0.Input
600
- }], segments: [{
601
- type: i0.Input
602
- }], keySteps: [{
603
- type: i0.Input
604
- }], leftValueContent: [{
605
- type: i0.Input
606
- }], rightValueContent: [{
607
- type: i0.Input
608
- }], pluralize: [{
609
- type: i0.Input
610
- }], computeKeySteps: [] } });
498
+ var TuiInputRangeComponent = /** @class */ (function (_super) {
499
+ __extends(TuiInputRangeComponent, _super);
500
+ function TuiInputRangeComponent(control, cdr, isMobile, el, controller) {
501
+ var _this = _super.call(this, control, cdr) || this;
502
+ _this.isMobile = isMobile;
503
+ _this.el = el;
504
+ _this.controller = controller;
505
+ _this.inputNumberRefs = i4.EMPTY_QUERY;
506
+ _this.rangeRef = null;
507
+ _this.min = 0;
508
+ _this.max = 100;
509
+ _this.quantum = 1;
510
+ _this.steps = 0;
511
+ _this.segments = 1;
512
+ _this.keySteps = null;
513
+ _this.pluralize = null;
514
+ _this.leftTextfieldValue = _this.safeCurrentValue[0];
515
+ _this.rightTextfieldValue = _this.safeCurrentValue[1];
516
+ _this.lastActiveSide = 'left';
517
+ return _this;
518
+ }
519
+ Object.defineProperty(TuiInputRangeComponent.prototype, "leftFocusableElement", {
520
+ get: function () {
521
+ var _a;
522
+ return ((_a = this.inputNumberRefs.first) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) || null;
523
+ },
524
+ enumerable: false,
525
+ configurable: true
526
+ });
527
+ Object.defineProperty(TuiInputRangeComponent.prototype, "rightFocusableElement", {
528
+ get: function () {
529
+ var _a;
530
+ return ((_a = this.inputNumberRefs.last) === null || _a === void 0 ? void 0 : _a.nativeFocusableElement) || null;
531
+ },
532
+ enumerable: false,
533
+ configurable: true
534
+ });
535
+ Object.defineProperty(TuiInputRangeComponent.prototype, "nativeFocusableElement", {
536
+ get: function () {
537
+ return this.disabled
538
+ ? null
539
+ : this.leftFocusableElement || this.rightFocusableElement;
540
+ },
541
+ enumerable: false,
542
+ configurable: true
543
+ });
544
+ Object.defineProperty(TuiInputRangeComponent.prototype, "focused", {
545
+ get: function () {
546
+ return i4.tuiIsNativeFocusedIn(this.el.nativeElement);
547
+ },
548
+ enumerable: false,
549
+ configurable: true
550
+ });
551
+ Object.defineProperty(TuiInputRangeComponent.prototype, "appearance", {
552
+ get: function () {
553
+ return this.controller.appearance;
554
+ },
555
+ enumerable: false,
556
+ configurable: true
557
+ });
558
+ Object.defineProperty(TuiInputRangeComponent.prototype, "showLeftValueContent", {
559
+ get: function () {
560
+ var _a;
561
+ return Boolean(this.leftValueContent &&
562
+ !i4.tuiIsNativeFocused(this.leftFocusableElement) &&
563
+ !(((_a = this.rangeRef) === null || _a === void 0 ? void 0 : _a.focused) && this.lastActiveSide === 'left'));
564
+ },
565
+ enumerable: false,
566
+ configurable: true
567
+ });
568
+ Object.defineProperty(TuiInputRangeComponent.prototype, "showRightValueContent", {
569
+ get: function () {
570
+ var _a;
571
+ return Boolean(this.rightValueContent &&
572
+ !i4.tuiIsNativeFocused(this.rightFocusableElement) &&
573
+ !(((_a = this.rangeRef) === null || _a === void 0 ? void 0 : _a.focused) && this.lastActiveSide === 'right'));
574
+ },
575
+ enumerable: false,
576
+ configurable: true
577
+ });
578
+ Object.defineProperty(TuiInputRangeComponent.prototype, "precision", {
579
+ get: function () {
580
+ return i3.tuiGetFractionPartPadded(this.quantum).length;
581
+ },
582
+ enumerable: false,
583
+ configurable: true
584
+ });
585
+ Object.defineProperty(TuiInputRangeComponent.prototype, "decimal", {
586
+ get: function () {
587
+ return this.precision ? 'not-zero' : 'never';
588
+ },
589
+ enumerable: false,
590
+ configurable: true
591
+ });
592
+ Object.defineProperty(TuiInputRangeComponent.prototype, "computedSteps", {
593
+ get: function () {
594
+ return this.steps || (this.max - this.min) / this.quantum;
595
+ },
596
+ enumerable: false,
597
+ configurable: true
598
+ });
599
+ Object.defineProperty(TuiInputRangeComponent.prototype, "step", {
600
+ get: function () {
601
+ return (this.max - this.min) / this.computedSteps;
602
+ },
603
+ enumerable: false,
604
+ configurable: true
605
+ });
606
+ TuiInputRangeComponent.prototype.computeKeySteps = function (keySteps, min, max) {
607
+ return (keySteps || [
608
+ [0, min],
609
+ [100, max],
610
+ ]);
611
+ };
612
+ TuiInputRangeComponent.prototype.onActiveZone = function (active) {
613
+ this.updateFocused(active);
614
+ };
615
+ TuiInputRangeComponent.prototype.onTextInputFocused = function (focused) {
616
+ if (!focused) {
617
+ this.updateTextfieldValues(this.value);
618
+ }
619
+ };
620
+ TuiInputRangeComponent.prototype.changeByStep = function (event, _b) {
621
+ var _c = __read(_b, 2), leftCoefficient = _c[0], rightCoefficient = _c[1];
622
+ if (this.readOnly) {
623
+ return;
624
+ }
625
+ event.preventDefault();
626
+ var newValue = this.valueGuard([
627
+ this.value[0] + leftCoefficient * this.step,
628
+ this.value[1] + rightCoefficient * this.step,
629
+ ]);
630
+ if (newValue[0] !== this.value[0] || newValue[1] !== this.value[1]) {
631
+ this.onExternalValueUpdate(newValue);
632
+ }
633
+ };
634
+ TuiInputRangeComponent.prototype.onInputLeft = function (value) {
635
+ this.safelyUpdateValue([value !== null && value !== void 0 ? value : this.safeCurrentValue[0], this.value[1]]);
636
+ };
637
+ TuiInputRangeComponent.prototype.onInputRight = function (value) {
638
+ this.safelyUpdateValue([this.value[0], value !== null && value !== void 0 ? value : this.safeCurrentValue[1]]);
639
+ };
640
+ TuiInputRangeComponent.prototype.onExternalValueUpdate = function (value) {
641
+ this.safelyUpdateValue(value);
642
+ this.updateTextfieldValues(this.value);
643
+ };
644
+ TuiInputRangeComponent.prototype.focusToTextInput = function () {
645
+ var element = this.lastActiveSide === 'left'
646
+ ? this.leftFocusableElement
647
+ : this.rightFocusableElement;
648
+ if (!this.isMobile && element) {
649
+ element.focus();
650
+ }
651
+ };
652
+ TuiInputRangeComponent.prototype.onActiveThumbChange = function (activeThumb) {
653
+ this.lastActiveSide = activeThumb;
654
+ };
655
+ TuiInputRangeComponent.prototype.writeValue = function (value) {
656
+ _super.prototype.writeValue.call(this, value);
657
+ this.updateTextfieldValues(this.value);
658
+ };
659
+ TuiInputRangeComponent.prototype.getFallbackValue = function () {
660
+ return [0, 0];
661
+ };
662
+ TuiInputRangeComponent.prototype.safelyUpdateValue = function (value) {
663
+ this.value = this.valueGuard(value);
664
+ };
665
+ TuiInputRangeComponent.prototype.valueGuard = function (_b) {
666
+ var _c = __read(_b, 2), leftValue = _c[0], rightValue = _c[1];
667
+ var leftCalibratedValue = this.calibrate(leftValue);
668
+ var rightCalibratedValue = this.calibrate(rightValue);
669
+ return [
670
+ Math.min(leftCalibratedValue, this.value[1]),
671
+ Math.max(rightCalibratedValue, this.value[0]),
672
+ ];
673
+ };
674
+ TuiInputRangeComponent.prototype.calibrate = function (value) {
675
+ var roundedValue = i4.tuiRound(Math.round(value / this.quantum) * this.quantum, constants.TUI_FLOATING_PRECISION);
676
+ return i4.tuiClamp(roundedValue, this.min, this.max);
677
+ };
678
+ TuiInputRangeComponent.prototype.updateTextfieldValues = function (_b) {
679
+ var _c = __read(_b, 2), leftValue = _c[0], rightValue = _c[1];
680
+ this.leftTextfieldValue = leftValue;
681
+ this.rightTextfieldValue = rightValue;
682
+ };
683
+ return TuiInputRangeComponent;
684
+ }(i4.AbstractTuiControl));
685
+ TuiInputRangeComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeComponent, deps: [{ token: i5.NgControl, optional: true, self: true }, { token: i0.ChangeDetectorRef }, { token: i4.TUI_IS_MOBILE }, { token: i0.ElementRef }, { token: i3.TUI_TEXTFIELD_WATCHED_CONTROLLER }], target: i0__namespace.ɵɵFactoryTarget.Component });
686
+ TuiInputRangeComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiInputRangeComponent, selector: "tui-input-range", inputs: { min: "min", max: "max", quantum: "quantum", steps: "steps", segments: "segments", keySteps: "keySteps", leftValueContent: "leftValueContent", rightValueContent: "rightValueContent", pluralize: "pluralize" }, host: { properties: { "attr.data-size": "controller.size", "class._label-outside": "controller.labelOutside" } }, providers: [
687
+ i4.tuiAsFocusableItemAccessor(TuiInputRangeComponent),
688
+ i4.tuiAsControl(TuiInputRangeComponent),
689
+ i3.TEXTFIELD_CONTROLLER_PROVIDER,
690
+ ], viewQueries: [{ propertyName: "rangeRef", first: true, predicate: i2.TuiRangeComponent, descendants: true }, { propertyName: "inputNumberRefs", predicate: i1.TuiInputNumberComponent, descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div\n tuiWrapper\n class=\"t-wrapper\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n (tuiActiveZoneChange)=\"onActiveZone($event)\"\n>\n <tui-input-number\n automation-id=\"tui-input-range__left-input\"\n tuiTextfieldAppearance=\"none\"\n class=\"t-left\"\n [decimal]=\"decimal\"\n [disabled]=\"computedDisabled\"\n [max]=\"value[1]\"\n [min]=\"min\"\n [precision]=\"precision\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldPostfix]=\"pluralize && !showLeftValueContent ? (value[0] | i18nPlural: pluralize) : ''\"\n [(ngModel)]=\"leftTextfieldValue\"\n (focusedChange)=\"onTextInputFocused($event)\"\n (keydown.arrowDown)=\"changeByStep($event, [-1, 0])\"\n (keydown.arrowUp)=\"changeByStep($event, [1, 0])\"\n (ngModelChange)=\"onInputLeft($event)\"\n >\n <ng-content></ng-content>\n <div\n *ngIf=\"showLeftValueContent\"\n ngProjectAs=\"tuiContent\"\n >\n <ng-container *polymorpheusOutlet=\"leftValueContent as text; context: {$implicit: value[0]}\">\n {{ text }}\n </ng-container>\n </div>\n </tui-input-number>\n\n <tui-input-number\n automation-id=\"tui-input-range__right-input\"\n tuiTextfieldAppearance=\"none\"\n class=\"t-right\"\n [decimal]=\"decimal\"\n [disabled]=\"computedDisabled\"\n [max]=\"max\"\n [min]=\"value[0]\"\n [precision]=\"precision\"\n [readOnly]=\"readOnly\"\n [tuiTextfieldPostfix]=\"pluralize && !showRightValueContent ? (value[1] | i18nPlural: pluralize) : ''\"\n [(ngModel)]=\"rightTextfieldValue\"\n (focusedChange)=\"onTextInputFocused($event)\"\n (keydown.arrowDown)=\"changeByStep($event, [0, -1])\"\n (keydown.arrowUp)=\"changeByStep($event, [0, 1])\"\n (ngModelChange)=\"onInputRight($event)\"\n >\n <div\n *ngIf=\"showRightValueContent\"\n ngProjectAs=\"tuiContent\"\n >\n <ng-container *polymorpheusOutlet=\"rightValueContent as text; context: {$implicit: value[1]}\">\n {{ text }}\n </ng-container>\n </div>\n </tui-input-number>\n\n <tui-range\n class=\"t-range\"\n [disabled]=\"readOnly || disabled\"\n [focusable]=\"false\"\n [keySteps]=\"computeKeySteps(keySteps, min, max)\"\n [max]=\"max\"\n [min]=\"min\"\n [ngModel]=\"value\"\n [segments]=\"segments\"\n [step]=\"step\"\n (activeThumbChange)=\"onActiveThumbChange($event)\"\n (ngModelChange)=\"onExternalValueUpdate($event)\"\n (tuiPressedChange)=\"focusToTextInput()\"\n ></tui-range>\n</div>\n", styles: [".t-wrapper{position:relative}.t-left{width:100%}.t-right{position:absolute;right:0;top:0;display:flex;width:50%;height:100%;text-align:right}:host{display:block;border-radius:var(--tui-radius-m)}.t-range{position:absolute;top:100%;left:0;right:0;z-index:1;margin:-.125rem 0 0;background:transparent}\n"], components: [{ type: i1__namespace.TuiInputNumberComponent, selector: "tui-input-number", inputs: ["min", "max", "decimal", "precision", "step", "prefix", "postfix"] }, { type: i2__namespace.TuiRangeComponent, selector: "tui-range", inputs: ["min", "max", "step", "size", "segments", "keySteps"] }], directives: [{ type: i3__namespace.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { type: i4__namespace.TuiActiveZoneDirective, selector: "[tuiActiveZone]:not(ng-container), [tuiActiveZoneChange]:not(ng-container), [tuiActiveZoneParent]:not(ng-container)", inputs: ["tuiActiveZoneParent"], outputs: ["tuiActiveZoneChange"], exportAs: ["tuiActiveZone"] }, { type: i1__namespace.TuiInputNumberDirective, selector: "tui-input-number" }, { type: i3__namespace.TuiTextfieldAppearanceDirective, selector: "[tuiTextfieldAppearance]", inputs: ["tuiTextfieldAppearance"] }, { type: i3__namespace.TuiTextfieldPostfixDirective, selector: "[tuiTextfieldPostfix]", inputs: ["tuiTextfieldPostfix"] }, { type: i5__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i5__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.PolymorpheusOutletDirective, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { type: i2__namespace.TuiRangeChangeDirective, selector: "tui-range", outputs: ["activeThumbChange"] }, { type: i4__namespace.TuiPressedDirective, selector: "[tuiPressedChange]", outputs: ["tuiPressedChange"] }], pipes: { "i18nPlural": i6__namespace.I18nPluralPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
691
+ __decorate([
692
+ i4.tuiPure
693
+ ], TuiInputRangeComponent.prototype, "computeKeySteps", null);
694
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeComponent, decorators: [{
695
+ type: i0.Component,
696
+ args: [{
697
+ selector: 'tui-input-range',
698
+ templateUrl: './input-range.template.html',
699
+ styleUrls: ['./input-range.style.less'],
700
+ host: {
701
+ '[attr.data-size]': 'controller.size',
702
+ '[class._label-outside]': 'controller.labelOutside',
703
+ },
704
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
705
+ providers: [
706
+ i4.tuiAsFocusableItemAccessor(TuiInputRangeComponent),
707
+ i4.tuiAsControl(TuiInputRangeComponent),
708
+ i3.TEXTFIELD_CONTROLLER_PROVIDER,
709
+ ],
710
+ }]
711
+ }], ctorParameters: function () {
712
+ return [{ type: i5__namespace.NgControl, decorators: [{
713
+ type: i0.Optional
714
+ }, {
715
+ type: i0.Self
716
+ }, {
717
+ type: i0.Inject,
718
+ args: [i5.NgControl]
719
+ }] }, { type: i0__namespace.ChangeDetectorRef, decorators: [{
720
+ type: i0.Inject,
721
+ args: [i0.ChangeDetectorRef]
722
+ }] }, { type: undefined, decorators: [{
723
+ type: i0.Inject,
724
+ args: [i4.TUI_IS_MOBILE]
725
+ }] }, { type: i0__namespace.ElementRef, decorators: [{
726
+ type: i0.Inject,
727
+ args: [i0.ElementRef]
728
+ }] }, { type: i3__namespace.TuiTextfieldController, decorators: [{
729
+ type: i0.Inject,
730
+ args: [i3.TUI_TEXTFIELD_WATCHED_CONTROLLER]
731
+ }] }];
732
+ }, propDecorators: { inputNumberRefs: [{
733
+ type: i0.ViewChildren,
734
+ args: [i1.TuiInputNumberComponent]
735
+ }], rangeRef: [{
736
+ type: i0.ViewChild,
737
+ args: [i2.TuiRangeComponent]
738
+ }], min: [{
739
+ type: i0.Input
740
+ }], max: [{
741
+ type: i0.Input
742
+ }], quantum: [{
743
+ type: i0.Input
744
+ }], steps: [{
745
+ type: i0.Input
746
+ }], segments: [{
747
+ type: i0.Input
748
+ }], keySteps: [{
749
+ type: i0.Input
750
+ }], leftValueContent: [{
751
+ type: i0.Input
752
+ }], rightValueContent: [{
753
+ type: i0.Input
754
+ }], pluralize: [{
755
+ type: i0.Input
756
+ }], computeKeySteps: [] } });
611
757
 
612
- var TuiInputRangeModule = /** @class */ (function () {
613
- function TuiInputRangeModule() {
614
- }
615
- return TuiInputRangeModule;
616
- }());
617
- TuiInputRangeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
618
- TuiInputRangeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeModule, declarations: [TuiInputRangeComponent], imports: [i6.CommonModule,
619
- i5.FormsModule,
620
- i7.PolymorpheusModule,
621
- i4.TuiActiveZoneModule,
622
- i1.TuiInputNumberModule,
623
- i4.TuiPressedModule,
624
- i2.TuiRangeModule,
625
- i3.TuiWrapperModule,
626
- i3.TuiTextfieldControllerModule], exports: [TuiInputRangeComponent] });
627
- TuiInputRangeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeModule, imports: [[
628
- i6.CommonModule,
629
- i5.FormsModule,
630
- i7.PolymorpheusModule,
631
- i4.TuiActiveZoneModule,
632
- i1.TuiInputNumberModule,
633
- i4.TuiPressedModule,
634
- i2.TuiRangeModule,
635
- i3.TuiWrapperModule,
636
- i3.TuiTextfieldControllerModule,
637
- ]] });
638
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeModule, decorators: [{
639
- type: i0.NgModule,
640
- args: [{
641
- imports: [
642
- i6.CommonModule,
643
- i5.FormsModule,
644
- i7.PolymorpheusModule,
645
- i4.TuiActiveZoneModule,
646
- i1.TuiInputNumberModule,
647
- i4.TuiPressedModule,
648
- i2.TuiRangeModule,
649
- i3.TuiWrapperModule,
650
- i3.TuiTextfieldControllerModule,
651
- ],
652
- declarations: [TuiInputRangeComponent],
653
- exports: [TuiInputRangeComponent],
654
- }]
655
- }] });
758
+ var TuiInputRangeModule = /** @class */ (function () {
759
+ function TuiInputRangeModule() {
760
+ }
761
+ return TuiInputRangeModule;
762
+ }());
763
+ TuiInputRangeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
764
+ TuiInputRangeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeModule, declarations: [TuiInputRangeComponent], imports: [i6.CommonModule,
765
+ i5.FormsModule,
766
+ i7.PolymorpheusModule,
767
+ i4.TuiActiveZoneModule,
768
+ i1.TuiInputNumberModule,
769
+ i4.TuiPressedModule,
770
+ i2.TuiRangeModule,
771
+ i3.TuiWrapperModule,
772
+ i3.TuiTextfieldControllerModule], exports: [TuiInputRangeComponent] });
773
+ TuiInputRangeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeModule, imports: [[
774
+ i6.CommonModule,
775
+ i5.FormsModule,
776
+ i7.PolymorpheusModule,
777
+ i4.TuiActiveZoneModule,
778
+ i1.TuiInputNumberModule,
779
+ i4.TuiPressedModule,
780
+ i2.TuiRangeModule,
781
+ i3.TuiWrapperModule,
782
+ i3.TuiTextfieldControllerModule,
783
+ ]] });
784
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiInputRangeModule, decorators: [{
785
+ type: i0.NgModule,
786
+ args: [{
787
+ imports: [
788
+ i6.CommonModule,
789
+ i5.FormsModule,
790
+ i7.PolymorpheusModule,
791
+ i4.TuiActiveZoneModule,
792
+ i1.TuiInputNumberModule,
793
+ i4.TuiPressedModule,
794
+ i2.TuiRangeModule,
795
+ i3.TuiWrapperModule,
796
+ i3.TuiTextfieldControllerModule,
797
+ ],
798
+ declarations: [TuiInputRangeComponent],
799
+ exports: [TuiInputRangeComponent],
800
+ }]
801
+ }] });
656
802
 
657
- /**
658
- * Generated bundle index. Do not edit.
659
- */
803
+ /**
804
+ * Generated bundle index. Do not edit.
805
+ */
660
806
 
661
- exports.TuiInputRangeComponent = TuiInputRangeComponent;
662
- exports.TuiInputRangeModule = TuiInputRangeModule;
807
+ exports.TuiInputRangeComponent = TuiInputRangeComponent;
808
+ exports.TuiInputRangeModule = TuiInputRangeModule;
663
809
 
664
- Object.defineProperty(exports, '__esModule', { value: true });
810
+ Object.defineProperty(exports, '__esModule', { value: true });
665
811
 
666
812
  }));
667
813
  //# sourceMappingURL=taiga-ui-kit-components-input-range.umd.js.map