@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,618 +1,764 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/tokens'), require('@angular/common'), require('rxjs')) :
3
- typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/calendar-month', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/tokens', '@angular/common', 'rxjs'], 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["calendar-month"] = {}), global.ng.core, global.i3, global.i1, global["taiga-ui"].kit.tokens, global.ng.common, global.rxjs));
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/tokens'), require('@angular/common'), require('rxjs')) :
3
+ typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/calendar-month', ['exports', '@angular/core', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/tokens', '@angular/common', 'rxjs'], 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["calendar-month"] = {}), global.ng.core, global.i3, global.i1, global["taiga-ui"].kit.tokens, global.ng.common, global.rxjs));
5
5
  })(this, (function (exports, i0, i3, i1, tokens, i2, i4) { '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 i3__namespace = /*#__PURE__*/_interopNamespace(i3);
27
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
28
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
29
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
25
+ var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
27
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
28
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
29
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
30
30
 
31
- /*! *****************************************************************************
32
- Copyright (c) Microsoft Corporation.
31
+ /******************************************************************************
32
+ Copyright (c) Microsoft Corporation.
33
33
 
34
- Permission to use, copy, modify, and/or distribute this software for any
35
- purpose with or without fee is hereby granted.
34
+ Permission to use, copy, modify, and/or distribute this software for any
35
+ purpose with or without fee is hereby granted.
36
36
 
37
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
38
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
39
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
40
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
41
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
42
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43
- PERFORMANCE OF THIS SOFTWARE.
44
- ***************************************************************************** */
45
- /* global Reflect, Promise */
46
- var extendStatics = function (d, b) {
47
- extendStatics = Object.setPrototypeOf ||
48
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49
- function (d, b) { for (var p in b)
50
- if (Object.prototype.hasOwnProperty.call(b, p))
51
- d[p] = b[p]; };
52
- return extendStatics(d, b);
53
- };
54
- function __extends(d, b) {
55
- if (typeof b !== "function" && b !== null)
56
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
57
- extendStatics(d, b);
58
- function __() { this.constructor = d; }
59
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
60
- }
61
- var __assign = function () {
62
- __assign = Object.assign || function __assign(t) {
63
- for (var s, i = 1, n = arguments.length; i < n; i++) {
64
- s = arguments[i];
65
- for (var p in s)
66
- if (Object.prototype.hasOwnProperty.call(s, p))
67
- t[p] = s[p];
68
- }
69
- return t;
70
- };
71
- return __assign.apply(this, arguments);
72
- };
73
- function __rest(s, e) {
74
- var t = {};
75
- for (var p in s)
76
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
77
- t[p] = s[p];
78
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
79
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
80
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
81
- t[p[i]] = s[p[i]];
82
- }
83
- return t;
84
- }
85
- function __decorate(decorators, target, key, desc) {
86
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
87
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
88
- r = Reflect.decorate(decorators, target, key, desc);
89
- else
90
- for (var i = decorators.length - 1; i >= 0; i--)
91
- if (d = decorators[i])
92
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
93
- return c > 3 && r && Object.defineProperty(target, key, r), r;
94
- }
95
- function __param(paramIndex, decorator) {
96
- return function (target, key) { decorator(target, key, paramIndex); };
97
- }
98
- function __metadata(metadataKey, metadataValue) {
99
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
100
- return Reflect.metadata(metadataKey, metadataValue);
101
- }
102
- function __awaiter(thisArg, _arguments, P, generator) {
103
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
104
- return new (P || (P = Promise))(function (resolve, reject) {
105
- function fulfilled(value) { try {
106
- step(generator.next(value));
107
- }
108
- catch (e) {
109
- reject(e);
110
- } }
111
- function rejected(value) { try {
112
- step(generator["throw"](value));
113
- }
114
- catch (e) {
115
- reject(e);
116
- } }
117
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
118
- step((generator = generator.apply(thisArg, _arguments || [])).next());
119
- });
120
- }
121
- function __generator(thisArg, body) {
122
- var _ = { label: 0, sent: function () { if (t[0] & 1)
123
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
124
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
125
- function verb(n) { return function (v) { return step([n, v]); }; }
126
- function step(op) {
127
- if (f)
128
- throw new TypeError("Generator is already executing.");
129
- while (_)
130
- try {
131
- 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)
132
- return t;
133
- if (y = 0, t)
134
- op = [op[0] & 2, t.value];
135
- switch (op[0]) {
136
- case 0:
137
- case 1:
138
- t = op;
139
- break;
140
- case 4:
141
- _.label++;
142
- return { value: op[1], done: false };
143
- case 5:
144
- _.label++;
145
- y = op[1];
146
- op = [0];
147
- continue;
148
- case 7:
149
- op = _.ops.pop();
150
- _.trys.pop();
151
- continue;
152
- default:
153
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
154
- _ = 0;
155
- continue;
156
- }
157
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
158
- _.label = op[1];
159
- break;
160
- }
161
- if (op[0] === 6 && _.label < t[1]) {
162
- _.label = t[1];
163
- t = op;
164
- break;
165
- }
166
- if (t && _.label < t[2]) {
167
- _.label = t[2];
168
- _.ops.push(op);
169
- break;
170
- }
171
- if (t[2])
172
- _.ops.pop();
173
- _.trys.pop();
174
- continue;
175
- }
176
- op = body.call(thisArg, _);
177
- }
178
- catch (e) {
179
- op = [6, e];
180
- y = 0;
181
- }
182
- finally {
183
- f = t = 0;
184
- }
185
- if (op[0] & 5)
186
- throw op[1];
187
- return { value: op[0] ? op[1] : void 0, done: true };
188
- }
189
- }
190
- var __createBinding = Object.create ? (function (o, m, k, k2) {
191
- if (k2 === undefined)
192
- k2 = k;
193
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
194
- }) : (function (o, m, k, k2) {
195
- if (k2 === undefined)
196
- k2 = k;
197
- o[k2] = m[k];
198
- });
199
- function __exportStar(m, o) {
200
- for (var p in m)
201
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
202
- __createBinding(o, m, p);
203
- }
204
- function __values(o) {
205
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
206
- if (m)
207
- return m.call(o);
208
- if (o && typeof o.length === "number")
209
- return {
210
- next: function () {
211
- if (o && i >= o.length)
212
- o = void 0;
213
- return { value: o && o[i++], done: !o };
214
- }
215
- };
216
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
217
- }
218
- function __read(o, n) {
219
- var m = typeof Symbol === "function" && o[Symbol.iterator];
220
- if (!m)
221
- return o;
222
- var i = m.call(o), r, ar = [], e;
223
- try {
224
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
225
- ar.push(r.value);
226
- }
227
- catch (error) {
228
- e = { error: error };
229
- }
230
- finally {
231
- try {
232
- if (r && !r.done && (m = i["return"]))
233
- m.call(i);
234
- }
235
- finally {
236
- if (e)
237
- throw e.error;
238
- }
239
- }
240
- return ar;
241
- }
242
- /** @deprecated */
243
- function __spread() {
244
- for (var ar = [], i = 0; i < arguments.length; i++)
245
- ar = ar.concat(__read(arguments[i]));
246
- return ar;
247
- }
248
- /** @deprecated */
249
- function __spreadArrays() {
250
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
251
- s += arguments[i].length;
252
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
253
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
254
- r[k] = a[j];
255
- return r;
256
- }
257
- function __spreadArray(to, from, pack) {
258
- if (pack || arguments.length === 2)
259
- for (var i = 0, l = from.length, ar; i < l; i++) {
260
- if (ar || !(i in from)) {
261
- if (!ar)
262
- ar = Array.prototype.slice.call(from, 0, i);
263
- ar[i] = from[i];
264
- }
265
- }
266
- return to.concat(ar || from);
267
- }
268
- function __await(v) {
269
- return this instanceof __await ? (this.v = v, this) : new __await(v);
270
- }
271
- function __asyncGenerator(thisArg, _arguments, generator) {
272
- if (!Symbol.asyncIterator)
273
- throw new TypeError("Symbol.asyncIterator is not defined.");
274
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
275
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
276
- function verb(n) { if (g[n])
277
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
278
- function resume(n, v) { try {
279
- step(g[n](v));
280
- }
281
- catch (e) {
282
- settle(q[0][3], e);
283
- } }
284
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
285
- function fulfill(value) { resume("next", value); }
286
- function reject(value) { resume("throw", value); }
287
- function settle(f, v) { if (f(v), q.shift(), q.length)
288
- resume(q[0][0], q[0][1]); }
289
- }
290
- function __asyncDelegator(o) {
291
- var i, p;
292
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
293
- 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; }
294
- }
295
- function __asyncValues(o) {
296
- if (!Symbol.asyncIterator)
297
- throw new TypeError("Symbol.asyncIterator is not defined.");
298
- var m = o[Symbol.asyncIterator], i;
299
- 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);
300
- 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); }); }; }
301
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
302
- }
303
- function __makeTemplateObject(cooked, raw) {
304
- if (Object.defineProperty) {
305
- Object.defineProperty(cooked, "raw", { value: raw });
306
- }
307
- else {
308
- cooked.raw = raw;
309
- }
310
- return cooked;
311
- }
312
- ;
313
- var __setModuleDefault = Object.create ? (function (o, v) {
314
- Object.defineProperty(o, "default", { enumerable: true, value: v });
315
- }) : function (o, v) {
316
- o["default"] = v;
317
- };
318
- function __importStar(mod) {
319
- if (mod && mod.__esModule)
320
- return mod;
321
- var result = {};
322
- if (mod != null)
323
- for (var k in mod)
324
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
325
- __createBinding(result, mod, k);
326
- __setModuleDefault(result, mod);
327
- return result;
328
- }
329
- function __importDefault(mod) {
330
- return (mod && mod.__esModule) ? mod : { default: mod };
331
- }
332
- function __classPrivateFieldGet(receiver, state, kind, f) {
333
- if (kind === "a" && !f)
334
- throw new TypeError("Private accessor was defined without a getter");
335
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
336
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
337
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
338
- }
339
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
340
- if (kind === "m")
341
- throw new TypeError("Private method is not writable");
342
- if (kind === "a" && !f)
343
- throw new TypeError("Private accessor was defined without a setter");
344
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
345
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
346
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
347
- }
37
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
38
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
39
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
40
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
41
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
42
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43
+ PERFORMANCE OF THIS SOFTWARE.
44
+ ***************************************************************************** */
45
+ /* global Reflect, Promise, SuppressedError, Symbol */
46
+ var extendStatics = function (d, b) {
47
+ extendStatics = Object.setPrototypeOf ||
48
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49
+ function (d, b) { for (var p in b)
50
+ if (Object.prototype.hasOwnProperty.call(b, p))
51
+ d[p] = b[p]; };
52
+ return extendStatics(d, b);
53
+ };
54
+ function __extends(d, b) {
55
+ if (typeof b !== "function" && b !== null)
56
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
57
+ extendStatics(d, b);
58
+ function __() { this.constructor = d; }
59
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
60
+ }
61
+ var __assign = function () {
62
+ __assign = Object.assign || function __assign(t) {
63
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
64
+ s = arguments[i];
65
+ for (var p in s)
66
+ if (Object.prototype.hasOwnProperty.call(s, p))
67
+ t[p] = s[p];
68
+ }
69
+ return t;
70
+ };
71
+ return __assign.apply(this, arguments);
72
+ };
73
+ function __rest(s, e) {
74
+ var t = {};
75
+ for (var p in s)
76
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
77
+ t[p] = s[p];
78
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
79
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
80
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
81
+ t[p[i]] = s[p[i]];
82
+ }
83
+ return t;
84
+ }
85
+ function __decorate(decorators, target, key, desc) {
86
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
87
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
88
+ r = Reflect.decorate(decorators, target, key, desc);
89
+ else
90
+ for (var i = decorators.length - 1; i >= 0; i--)
91
+ if (d = decorators[i])
92
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
93
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
94
+ }
95
+ function __param(paramIndex, decorator) {
96
+ return function (target, key) { decorator(target, key, paramIndex); };
97
+ }
98
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
99
+ function accept(f) { if (f !== void 0 && typeof f !== "function")
100
+ throw new TypeError("Function expected"); return f; }
101
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
102
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
103
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
104
+ var _, done = false;
105
+ for (var i = decorators.length - 1; i >= 0; i--) {
106
+ var context = {};
107
+ for (var p in contextIn)
108
+ context[p] = p === "access" ? {} : contextIn[p];
109
+ for (var p in contextIn.access)
110
+ context.access[p] = contextIn.access[p];
111
+ context.addInitializer = function (f) { if (done)
112
+ throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
113
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
114
+ if (kind === "accessor") {
115
+ if (result === void 0)
116
+ continue;
117
+ if (result === null || typeof result !== "object")
118
+ throw new TypeError("Object expected");
119
+ if (_ = accept(result.get))
120
+ descriptor.get = _;
121
+ if (_ = accept(result.set))
122
+ descriptor.set = _;
123
+ if (_ = accept(result.init))
124
+ initializers.unshift(_);
125
+ }
126
+ else if (_ = accept(result)) {
127
+ if (kind === "field")
128
+ initializers.unshift(_);
129
+ else
130
+ descriptor[key] = _;
131
+ }
132
+ }
133
+ if (target)
134
+ Object.defineProperty(target, contextIn.name, descriptor);
135
+ done = true;
136
+ }
137
+ ;
138
+ function __runInitializers(thisArg, initializers, value) {
139
+ var useValue = arguments.length > 2;
140
+ for (var i = 0; i < initializers.length; i++) {
141
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
142
+ }
143
+ return useValue ? value : void 0;
144
+ }
145
+ ;
146
+ function __propKey(x) {
147
+ return typeof x === "symbol" ? x : "".concat(x);
148
+ }
149
+ ;
150
+ function __setFunctionName(f, name, prefix) {
151
+ if (typeof name === "symbol")
152
+ name = name.description ? "[".concat(name.description, "]") : "";
153
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
154
+ }
155
+ ;
156
+ function __metadata(metadataKey, metadataValue) {
157
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
158
+ return Reflect.metadata(metadataKey, metadataValue);
159
+ }
160
+ function __awaiter(thisArg, _arguments, P, generator) {
161
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
162
+ return new (P || (P = Promise))(function (resolve, reject) {
163
+ function fulfilled(value) { try {
164
+ step(generator.next(value));
165
+ }
166
+ catch (e) {
167
+ reject(e);
168
+ } }
169
+ function rejected(value) { try {
170
+ step(generator["throw"](value));
171
+ }
172
+ catch (e) {
173
+ reject(e);
174
+ } }
175
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
176
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
177
+ });
178
+ }
179
+ function __generator(thisArg, body) {
180
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
181
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
182
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
183
+ function verb(n) { return function (v) { return step([n, v]); }; }
184
+ function step(op) {
185
+ if (f)
186
+ throw new TypeError("Generator is already executing.");
187
+ while (g && (g = 0, op[0] && (_ = 0)), _)
188
+ try {
189
+ 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)
190
+ return t;
191
+ if (y = 0, t)
192
+ op = [op[0] & 2, t.value];
193
+ switch (op[0]) {
194
+ case 0:
195
+ case 1:
196
+ t = op;
197
+ break;
198
+ case 4:
199
+ _.label++;
200
+ return { value: op[1], done: false };
201
+ case 5:
202
+ _.label++;
203
+ y = op[1];
204
+ op = [0];
205
+ continue;
206
+ case 7:
207
+ op = _.ops.pop();
208
+ _.trys.pop();
209
+ continue;
210
+ default:
211
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
212
+ _ = 0;
213
+ continue;
214
+ }
215
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
216
+ _.label = op[1];
217
+ break;
218
+ }
219
+ if (op[0] === 6 && _.label < t[1]) {
220
+ _.label = t[1];
221
+ t = op;
222
+ break;
223
+ }
224
+ if (t && _.label < t[2]) {
225
+ _.label = t[2];
226
+ _.ops.push(op);
227
+ break;
228
+ }
229
+ if (t[2])
230
+ _.ops.pop();
231
+ _.trys.pop();
232
+ continue;
233
+ }
234
+ op = body.call(thisArg, _);
235
+ }
236
+ catch (e) {
237
+ op = [6, e];
238
+ y = 0;
239
+ }
240
+ finally {
241
+ f = t = 0;
242
+ }
243
+ if (op[0] & 5)
244
+ throw op[1];
245
+ return { value: op[0] ? op[1] : void 0, done: true };
246
+ }
247
+ }
248
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
249
+ if (k2 === undefined)
250
+ k2 = k;
251
+ var desc = Object.getOwnPropertyDescriptor(m, k);
252
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
253
+ desc = { enumerable: true, get: function () { return m[k]; } };
254
+ }
255
+ Object.defineProperty(o, k2, desc);
256
+ }) : (function (o, m, k, k2) {
257
+ if (k2 === undefined)
258
+ k2 = k;
259
+ o[k2] = m[k];
260
+ });
261
+ function __exportStar(m, o) {
262
+ for (var p in m)
263
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
264
+ __createBinding(o, m, p);
265
+ }
266
+ function __values(o) {
267
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
268
+ if (m)
269
+ return m.call(o);
270
+ if (o && typeof o.length === "number")
271
+ return {
272
+ next: function () {
273
+ if (o && i >= o.length)
274
+ o = void 0;
275
+ return { value: o && o[i++], done: !o };
276
+ }
277
+ };
278
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
279
+ }
280
+ function __read(o, n) {
281
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
282
+ if (!m)
283
+ return o;
284
+ var i = m.call(o), r, ar = [], e;
285
+ try {
286
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
287
+ ar.push(r.value);
288
+ }
289
+ catch (error) {
290
+ e = { error: error };
291
+ }
292
+ finally {
293
+ try {
294
+ if (r && !r.done && (m = i["return"]))
295
+ m.call(i);
296
+ }
297
+ finally {
298
+ if (e)
299
+ throw e.error;
300
+ }
301
+ }
302
+ return ar;
303
+ }
304
+ /** @deprecated */
305
+ function __spread() {
306
+ for (var ar = [], i = 0; i < arguments.length; i++)
307
+ ar = ar.concat(__read(arguments[i]));
308
+ return ar;
309
+ }
310
+ /** @deprecated */
311
+ function __spreadArrays() {
312
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
313
+ s += arguments[i].length;
314
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
315
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
316
+ r[k] = a[j];
317
+ return r;
318
+ }
319
+ function __spreadArray(to, from, pack) {
320
+ if (pack || arguments.length === 2)
321
+ for (var i = 0, l = from.length, ar; i < l; i++) {
322
+ if (ar || !(i in from)) {
323
+ if (!ar)
324
+ ar = Array.prototype.slice.call(from, 0, i);
325
+ ar[i] = from[i];
326
+ }
327
+ }
328
+ return to.concat(ar || Array.prototype.slice.call(from));
329
+ }
330
+ function __await(v) {
331
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
332
+ }
333
+ function __asyncGenerator(thisArg, _arguments, generator) {
334
+ if (!Symbol.asyncIterator)
335
+ throw new TypeError("Symbol.asyncIterator is not defined.");
336
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
337
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
338
+ function verb(n) { if (g[n])
339
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
340
+ function resume(n, v) { try {
341
+ step(g[n](v));
342
+ }
343
+ catch (e) {
344
+ settle(q[0][3], e);
345
+ } }
346
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
347
+ function fulfill(value) { resume("next", value); }
348
+ function reject(value) { resume("throw", value); }
349
+ function settle(f, v) { if (f(v), q.shift(), q.length)
350
+ resume(q[0][0], q[0][1]); }
351
+ }
352
+ function __asyncDelegator(o) {
353
+ var i, p;
354
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
355
+ 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; }
356
+ }
357
+ function __asyncValues(o) {
358
+ if (!Symbol.asyncIterator)
359
+ throw new TypeError("Symbol.asyncIterator is not defined.");
360
+ var m = o[Symbol.asyncIterator], i;
361
+ 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);
362
+ 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); }); }; }
363
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
364
+ }
365
+ function __makeTemplateObject(cooked, raw) {
366
+ if (Object.defineProperty) {
367
+ Object.defineProperty(cooked, "raw", { value: raw });
368
+ }
369
+ else {
370
+ cooked.raw = raw;
371
+ }
372
+ return cooked;
373
+ }
374
+ ;
375
+ var __setModuleDefault = Object.create ? (function (o, v) {
376
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
377
+ }) : function (o, v) {
378
+ o["default"] = v;
379
+ };
380
+ function __importStar(mod) {
381
+ if (mod && mod.__esModule)
382
+ return mod;
383
+ var result = {};
384
+ if (mod != null)
385
+ for (var k in mod)
386
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
387
+ __createBinding(result, mod, k);
388
+ __setModuleDefault(result, mod);
389
+ return result;
390
+ }
391
+ function __importDefault(mod) {
392
+ return (mod && mod.__esModule) ? mod : { default: mod };
393
+ }
394
+ function __classPrivateFieldGet(receiver, state, kind, f) {
395
+ if (kind === "a" && !f)
396
+ throw new TypeError("Private accessor was defined without a getter");
397
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
398
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
399
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
400
+ }
401
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
402
+ if (kind === "m")
403
+ throw new TypeError("Private method is not writable");
404
+ if (kind === "a" && !f)
405
+ throw new TypeError("Private accessor was defined without a setter");
406
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
407
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
408
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
409
+ }
410
+ function __classPrivateFieldIn(state, receiver) {
411
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
412
+ throw new TypeError("Cannot use 'in' operator on non-object");
413
+ return typeof state === "function" ? receiver === state : state.has(receiver);
414
+ }
415
+ function __addDisposableResource(env, value, async) {
416
+ if (value !== null && value !== void 0) {
417
+ if (typeof value !== "object" && typeof value !== "function")
418
+ throw new TypeError("Object expected.");
419
+ var dispose;
420
+ if (async) {
421
+ if (!Symbol.asyncDispose)
422
+ throw new TypeError("Symbol.asyncDispose is not defined.");
423
+ dispose = value[Symbol.asyncDispose];
424
+ }
425
+ if (dispose === void 0) {
426
+ if (!Symbol.dispose)
427
+ throw new TypeError("Symbol.dispose is not defined.");
428
+ dispose = value[Symbol.dispose];
429
+ }
430
+ if (typeof dispose !== "function")
431
+ throw new TypeError("Object not disposable.");
432
+ env.stack.push({ value: value, dispose: dispose, async: async });
433
+ }
434
+ else if (async) {
435
+ env.stack.push({ async: true });
436
+ }
437
+ return value;
438
+ }
439
+ var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
440
+ var e = new Error(message);
441
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
442
+ };
443
+ function __disposeResources(env) {
444
+ function fail(e) {
445
+ env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
446
+ env.hasError = true;
447
+ }
448
+ function next() {
449
+ while (env.stack.length) {
450
+ var rec = env.stack.pop();
451
+ try {
452
+ var result = rec.dispose && rec.dispose.call(rec.value);
453
+ if (rec.async)
454
+ return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
455
+ }
456
+ catch (e) {
457
+ fail(e);
458
+ }
459
+ }
460
+ if (env.hasError)
461
+ throw env.error;
462
+ }
463
+ return next();
464
+ }
465
+ var tslib_es6 = {
466
+ __extends: __extends,
467
+ __assign: __assign,
468
+ __rest: __rest,
469
+ __decorate: __decorate,
470
+ __param: __param,
471
+ __metadata: __metadata,
472
+ __awaiter: __awaiter,
473
+ __generator: __generator,
474
+ __createBinding: __createBinding,
475
+ __exportStar: __exportStar,
476
+ __values: __values,
477
+ __read: __read,
478
+ __spread: __spread,
479
+ __spreadArrays: __spreadArrays,
480
+ __spreadArray: __spreadArray,
481
+ __await: __await,
482
+ __asyncGenerator: __asyncGenerator,
483
+ __asyncDelegator: __asyncDelegator,
484
+ __asyncValues: __asyncValues,
485
+ __makeTemplateObject: __makeTemplateObject,
486
+ __importStar: __importStar,
487
+ __importDefault: __importDefault,
488
+ __classPrivateFieldGet: __classPrivateFieldGet,
489
+ __classPrivateFieldSet: __classPrivateFieldSet,
490
+ __classPrivateFieldIn: __classPrivateFieldIn,
491
+ __addDisposableResource: __addDisposableResource,
492
+ __disposeResources: __disposeResources,
493
+ };
348
494
 
349
- var TODAY = i3.TuiDay.currentLocal();
350
- var TuiCalendarMonthComponent = /** @class */ (function () {
351
- function TuiCalendarMonthComponent(months$) {
352
- this.months$ = months$;
353
- this.value = null;
354
- this.year = TODAY;
355
- this.disabledItemHandler = i3.ALWAYS_FALSE_HANDLER;
356
- this.min = i3.TUI_FIRST_DAY;
357
- this.max = i3.TUI_LAST_DAY;
358
- this.monthClick = new i0.EventEmitter();
359
- this.hoveredItemChange = new i0.EventEmitter();
360
- this.yearChange = new i0.EventEmitter();
361
- this.isYearPickerShown = false;
362
- this.hoveredItem = null;
363
- this.pressedItem = null;
364
- }
365
- Object.defineProperty(TuiCalendarMonthComponent.prototype, "isSingle", {
366
- get: function () {
367
- return (this.value !== null &&
368
- (this.value instanceof i3.TuiMonth || this.value.isSingleMonth));
369
- },
370
- enumerable: false,
371
- configurable: true
372
- });
373
- Object.defineProperty(TuiCalendarMonthComponent.prototype, "computedMin", {
374
- get: function () {
375
- var _a;
376
- return (_a = this.min) !== null && _a !== void 0 ? _a : i3.TUI_FIRST_DAY;
377
- },
378
- enumerable: false,
379
- configurable: true
380
- });
381
- Object.defineProperty(TuiCalendarMonthComponent.prototype, "computedMax", {
382
- get: function () {
383
- var _a;
384
- return (_a = this.max) !== null && _a !== void 0 ? _a : i3.TUI_LAST_DAY;
385
- },
386
- enumerable: false,
387
- configurable: true
388
- });
389
- Object.defineProperty(TuiCalendarMonthComponent.prototype, "previousYearDisabled", {
390
- get: function () {
391
- return this.year.yearSameOrBefore(this.computedMin);
392
- },
393
- enumerable: false,
394
- configurable: true
395
- });
396
- Object.defineProperty(TuiCalendarMonthComponent.prototype, "nextYearDisabled", {
397
- get: function () {
398
- return this.year.yearSameOrAfter(this.computedMax);
399
- },
400
- enumerable: false,
401
- configurable: true
402
- });
403
- TuiCalendarMonthComponent.prototype.getItemState = function (item) {
404
- var _b = this, disabledItemHandlerWithMinMax = _b.disabledItemHandlerWithMinMax, pressedItem = _b.pressedItem, hoveredItem = _b.hoveredItem;
405
- if (disabledItemHandlerWithMinMax(item)) {
406
- return i1.TuiInteractiveState.Disabled;
407
- }
408
- if (pressedItem === null || pressedItem === void 0 ? void 0 : pressedItem.monthSame(item)) {
409
- return i1.TuiInteractiveState.Active;
410
- }
411
- if (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthSame(item)) {
412
- return i1.TuiInteractiveState.Hover;
413
- }
414
- return null;
415
- };
416
- TuiCalendarMonthComponent.prototype.getItemRange = function (item) {
417
- var _b = this, value = _b.value, hoveredItem = _b.hoveredItem;
418
- if (value === null) {
419
- return null;
420
- }
421
- if (value instanceof i3.TuiMonth) {
422
- return value.monthSame(item) ? i1.TuiRangeState.Single : null;
423
- }
424
- var theFirstOfRange = value.from.monthSame(item) && !value.isSingleMonth;
425
- var hoveredItemAfterFrom = (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthAfter(value.from)) &&
426
- value.from.monthSame(item) &&
427
- value.isSingleMonth;
428
- var hoveredItemIsCandidateToBeFrom = (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthSame(item)) &&
429
- (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthBefore(value.from)) &&
430
- value.isSingleMonth;
431
- if (theFirstOfRange || hoveredItemAfterFrom || hoveredItemIsCandidateToBeFrom) {
432
- return i1.TuiRangeState.Start;
433
- }
434
- var theLastOfRange = value.to.monthSame(item) && !value.isSingleMonth;
435
- var hoveredItemBeforeTo = value.to.monthSame(item) &&
436
- (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthBefore(value.to)) &&
437
- value.isSingleMonth;
438
- var hoveredItemIsCandidateToBeTo = (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthSame(item)) &&
439
- (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthAfter(value.from)) &&
440
- value.isSingleMonth;
441
- if (theLastOfRange || hoveredItemBeforeTo || hoveredItemIsCandidateToBeTo) {
442
- return i1.TuiRangeState.End;
443
- }
444
- return value.isSingleMonth && value.from.monthSame(item)
445
- ? i1.TuiRangeState.Single
446
- : null;
447
- };
448
- TuiCalendarMonthComponent.prototype.getTuiMonth = function (monthNumber, yearNumber) {
449
- return new i3.TuiMonth(yearNumber, monthNumber);
450
- };
451
- TuiCalendarMonthComponent.prototype.isItemToday = function (item) {
452
- return TODAY.monthSame(item);
453
- };
454
- TuiCalendarMonthComponent.prototype.isItemInsideRange = function (month) {
455
- var _b = this, value = _b.value, hoveredItem = _b.hoveredItem;
456
- if (value === null || value instanceof i3.TuiMonth) {
457
- return false;
458
- }
459
- if (!value.isSingleMonth) {
460
- return value.from.monthSameOrBefore(month) && value.to.monthAfter(month);
461
- }
462
- if (hoveredItem === null) {
463
- return false;
464
- }
465
- var range = i3.TuiMonthRange.sort(value.from, hoveredItem);
466
- return range.from.monthSameOrBefore(month) && range.to.monthAfter(month);
467
- };
468
- TuiCalendarMonthComponent.prototype.onPickerYearClick = function (year) {
469
- this.isYearPickerShown = false;
470
- if (this.year.yearSame(year)) {
471
- return;
472
- }
473
- this.updateActiveYear(year);
474
- };
475
- TuiCalendarMonthComponent.prototype.onItemClick = function (month) {
476
- if (this.disabledItemHandlerWithMinMax(month)) {
477
- return;
478
- }
479
- this.monthClick.emit(month);
480
- };
481
- TuiCalendarMonthComponent.prototype.onYearClick = function () {
482
- this.isYearPickerShown = true;
483
- };
484
- TuiCalendarMonthComponent.prototype.onNextYear = function () {
485
- this.updateActiveYear(this.year.append({ year: 1 }));
486
- };
487
- TuiCalendarMonthComponent.prototype.onPreviousYear = function () {
488
- this.updateActiveYear(this.year.append({ year: -1 }));
489
- };
490
- TuiCalendarMonthComponent.prototype.onItemHovered = function (hovered, item) {
491
- this.updateHoveredItem(hovered ? item : null);
492
- };
493
- TuiCalendarMonthComponent.prototype.onItemPressed = function (pressed, item) {
494
- this.updatePressedItem(pressed ? item : null);
495
- };
496
- TuiCalendarMonthComponent.prototype.calculateDisabledItemHandlerWithMinMax = function (disabledItemHandler, value, min, max) {
497
- return function (item) { return item.monthBefore(min) ||
498
- item.monthAfter(max) ||
499
- disabledItemHandler(item, { value: value }); };
500
- };
501
- Object.defineProperty(TuiCalendarMonthComponent.prototype, "disabledItemHandlerWithMinMax", {
502
- get: function () {
503
- return this.calculateDisabledItemHandlerWithMinMax(this.disabledItemHandler, this.value, this.computedMin, this.computedMax);
504
- },
505
- enumerable: false,
506
- configurable: true
507
- });
508
- TuiCalendarMonthComponent.prototype.updateHoveredItem = function (month) {
509
- if (i3.tuiNullableSame(this.hoveredItem, month, function (a, b) { return a.monthSame(b); })) {
510
- return;
511
- }
512
- this.hoveredItem = month;
513
- this.hoveredItemChange.emit(month);
514
- };
515
- TuiCalendarMonthComponent.prototype.updatePressedItem = function (item) {
516
- this.pressedItem = item;
517
- };
518
- TuiCalendarMonthComponent.prototype.updateActiveYear = function (year) {
519
- this.year = year;
520
- this.yearChange.emit(year);
521
- };
522
- return TuiCalendarMonthComponent;
523
- }());
524
- TuiCalendarMonthComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthComponent, deps: [{ token: tokens.TUI_CALENDAR_MONTHS }], target: i0__namespace.ɵɵFactoryTarget.Component });
525
- TuiCalendarMonthComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiCalendarMonthComponent, selector: "tui-calendar-month", inputs: { value: "value", year: "year", disabledItemHandler: "disabledItemHandler", min: "min", max: "max" }, outputs: { monthClick: "monthClick", hoveredItemChange: "hoveredItemChange", yearChange: "yearChange" }, host: { properties: { "class._single": "this.isSingle" } }, ngImport: i0__namespace, template: "<tui-scrollbar\n *ngIf=\"isYearPickerShown; else monthSelect\"\n class=\"t-scrollbar\"\n>\n <tui-primitive-year-picker\n [initialItem]=\"year\"\n [max]=\"computedMax\"\n [min]=\"computedMin\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n ></tui-primitive-year-picker>\n</tui-scrollbar>\n<ng-template #monthSelect>\n <tui-primitive-spin-button\n [focusable]=\"false\"\n [leftDisabled]=\"previousYearDisabled\"\n [rightDisabled]=\"nextYearDisabled\"\n (leftClick)=\"onPreviousYear()\"\n (rightClick)=\"onNextYear()\"\n >\n <button\n automation-id=\"tui-calendar-month__active-year\"\n tuiLink\n type=\"button\"\n [tuiFocusable]=\"false\"\n (click)=\"onYearClick()\"\n >\n {{ year.formattedYear }}\n </button>\n </tui-primitive-spin-button>\n <div class=\"t-row\">\n <ng-container *ngFor=\"let month of months$ | async; let index = index\">\n <div\n *tuiLet=\"getTuiMonth(index, year.year) as item\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [attr.data-state]=\"getItemState(item)\"\n [class.t-cell_interval]=\"isItemInsideRange(item)\"\n [class.t-cell_today]=\"isItemToday(item)\"\n (click)=\"onItemClick(item)\"\n (tuiHoveredChange)=\"onItemHovered($event, item)\"\n (tuiPressedChange)=\"onItemHovered($event, item)\"\n >\n <div class=\"t-item\">{{ month }}</div>\n </div>\n </ng-container>\n </div>\n</ng-template>\n", styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;display:flex;justify-content:space-between;height:2.25rem;isolation:isolate}.t-item{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item:before,.t-item:after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-item:after{border-radius:.5rem}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;width:3.9375rem;text-align:center;outline:none;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:.125rem solid transparent}.t-cell:before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today:after{position:absolute;left:50%;transform:translate(-50%);content:\"\";bottom:.3125rem;height:.125rem;width:.75rem;border-radius:.375rem;background-color:var(--tui-text-01)}.t-cell_interval:before{background:var(--tui-base-02)}:host._single .t-cell_interval:before{background:var(--tui-secondary-hover)}.t-cell_interval:not(:last-child):before{right:-.25rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell_interval:not([data-range=\"start\"]):not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell_interval:last-child:first-child:before{right:0}.t-cell_interval:first-child>.t-item{border-top-left-radius:var(--tui-radius-m);border-bottom-left-radius:var(--tui-radius-m)}.t-cell_interval:last-child>.t-item{border-top-right-radius:var(--tui-radius-m);border-bottom-right-radius:var(--tui-radius-m)}.t-cell_interval>.t-item{border-radius:0}.t-cell[data-range]:after{background-color:var(--tui-primary-text)}.t-cell[data-range]>.t-item{color:var(--tui-primary-text)}.t-cell[data-range]>.t-item:before,.t-cell[data-range]>.t-item:after{background-color:var(--tui-primary)}.t-cell[data-range][data-state=hover]>.t-item:before,.t-cell[data-range][data-state=hover]>.t-item:after{background-color:var(--tui-primary-hover)}.t-cell[data-range][data-state=active]>.t-item:before,.t-cell[data-range][data-state=active]>.t-item:after{background-color:var(--tui-primary-active)}.t-cell[data-range=end]:before{background:var(--tui-base-02)}:host._single .t-cell[data-range=end]:before{background:var(--tui-secondary-hover)}.t-cell[data-range=end]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end]>.t-item:before{left:.625rem;border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end]>.t-item:after{left:-2rem;right:100%;transform:translate(1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=start]>.t-item:before{right:.625rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]>.t-item:after{left:100%;right:-2rem;transform:translate(-1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=single]>.t-item:after{display:none}.t-cell[data-state=disabled]{pointer-events:none}.t-cell[data-state=disabled]>.t-item{opacity:.36}.t-cell[data-state=hover]:hover:not([data-range])>.t-item{background-color:var(--tui-secondary-hover)}.t-cell[data-state=active]:hover:not([data-range])>.t-item{background-color:var(--tui-secondary-active)}:host{display:block;height:13.625rem;width:15.75rem;padding:1.125rem;box-sizing:content-box}.t-row{flex-wrap:wrap;margin-top:1.4375rem}.t-cell:nth-child(n + 5){margin-top:1.75rem}.t-cell_interval:nth-child(4n):before{right:0}.t-scrollbar{height:inherit;width:inherit}\n"], components: [{ type: i1__namespace.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1__namespace.TuiPrimitiveYearPickerComponent, selector: "tui-primitive-year-picker", inputs: ["value", "initialItem", "min", "max", "disabledItemHandler"], outputs: ["yearClick"] }, { type: i1__namespace.TuiPrimitiveSpinButtonComponent, selector: "tui-primitive-spin-button", inputs: ["disabled", "leftDisabled", "rightDisabled"], outputs: ["leftClick", "rightClick"] }, { type: i1__namespace.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { type: i3__namespace.TuiHoveredDirective, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { type: i3__namespace.TuiPressedDirective, selector: "[tuiPressedChange]", outputs: ["tuiPressedChange"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
526
- __decorate([
527
- i3.tuiPure
528
- ], TuiCalendarMonthComponent.prototype, "calculateDisabledItemHandlerWithMinMax", null);
529
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthComponent, decorators: [{
530
- type: i0.Component,
531
- args: [{
532
- selector: 'tui-calendar-month',
533
- templateUrl: './calendar-month.template.html',
534
- styleUrls: ['./calendar-month.style.less'],
535
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
536
- }]
537
- }], ctorParameters: function () {
538
- return [{ type: i4__namespace.Observable, decorators: [{
539
- type: i0.Inject,
540
- args: [tokens.TUI_CALENDAR_MONTHS]
541
- }] }];
542
- }, propDecorators: { value: [{
543
- type: i0.Input
544
- }], year: [{
545
- type: i0.Input
546
- }], disabledItemHandler: [{
547
- type: i0.Input
548
- }], min: [{
549
- type: i0.Input
550
- }], max: [{
551
- type: i0.Input
552
- }], monthClick: [{
553
- type: i0.Output
554
- }], hoveredItemChange: [{
555
- type: i0.Output
556
- }], yearChange: [{
557
- type: i0.Output
558
- }], isSingle: [{
559
- type: i0.HostBinding,
560
- args: ['class._single']
561
- }], calculateDisabledItemHandlerWithMinMax: [] } });
495
+ var TODAY = i3.TuiDay.currentLocal();
496
+ var TuiCalendarMonthComponent = /** @class */ (function () {
497
+ function TuiCalendarMonthComponent(months$) {
498
+ this.months$ = months$;
499
+ this.value = null;
500
+ this.year = TODAY;
501
+ this.disabledItemHandler = i3.ALWAYS_FALSE_HANDLER;
502
+ this.min = i3.TUI_FIRST_DAY;
503
+ this.max = i3.TUI_LAST_DAY;
504
+ this.monthClick = new i0.EventEmitter();
505
+ this.hoveredItemChange = new i0.EventEmitter();
506
+ this.yearChange = new i0.EventEmitter();
507
+ this.isYearPickerShown = false;
508
+ this.hoveredItem = null;
509
+ this.pressedItem = null;
510
+ }
511
+ Object.defineProperty(TuiCalendarMonthComponent.prototype, "isSingle", {
512
+ get: function () {
513
+ return (this.value !== null &&
514
+ (this.value instanceof i3.TuiMonth || this.value.isSingleMonth));
515
+ },
516
+ enumerable: false,
517
+ configurable: true
518
+ });
519
+ Object.defineProperty(TuiCalendarMonthComponent.prototype, "computedMin", {
520
+ get: function () {
521
+ var _a;
522
+ return (_a = this.min) !== null && _a !== void 0 ? _a : i3.TUI_FIRST_DAY;
523
+ },
524
+ enumerable: false,
525
+ configurable: true
526
+ });
527
+ Object.defineProperty(TuiCalendarMonthComponent.prototype, "computedMax", {
528
+ get: function () {
529
+ var _a;
530
+ return (_a = this.max) !== null && _a !== void 0 ? _a : i3.TUI_LAST_DAY;
531
+ },
532
+ enumerable: false,
533
+ configurable: true
534
+ });
535
+ Object.defineProperty(TuiCalendarMonthComponent.prototype, "previousYearDisabled", {
536
+ get: function () {
537
+ return this.year.yearSameOrBefore(this.computedMin);
538
+ },
539
+ enumerable: false,
540
+ configurable: true
541
+ });
542
+ Object.defineProperty(TuiCalendarMonthComponent.prototype, "nextYearDisabled", {
543
+ get: function () {
544
+ return this.year.yearSameOrAfter(this.computedMax);
545
+ },
546
+ enumerable: false,
547
+ configurable: true
548
+ });
549
+ TuiCalendarMonthComponent.prototype.getItemState = function (item) {
550
+ var _b = this, disabledItemHandlerWithMinMax = _b.disabledItemHandlerWithMinMax, pressedItem = _b.pressedItem, hoveredItem = _b.hoveredItem;
551
+ if (disabledItemHandlerWithMinMax(item)) {
552
+ return i1.TuiInteractiveState.Disabled;
553
+ }
554
+ if (pressedItem === null || pressedItem === void 0 ? void 0 : pressedItem.monthSame(item)) {
555
+ return i1.TuiInteractiveState.Active;
556
+ }
557
+ if (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthSame(item)) {
558
+ return i1.TuiInteractiveState.Hover;
559
+ }
560
+ return null;
561
+ };
562
+ TuiCalendarMonthComponent.prototype.getItemRange = function (item) {
563
+ var _b = this, value = _b.value, hoveredItem = _b.hoveredItem;
564
+ if (value === null) {
565
+ return null;
566
+ }
567
+ if (value instanceof i3.TuiMonth) {
568
+ return value.monthSame(item) ? i1.TuiRangeState.Single : null;
569
+ }
570
+ var theFirstOfRange = value.from.monthSame(item) && !value.isSingleMonth;
571
+ var hoveredItemAfterFrom = (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthAfter(value.from)) &&
572
+ value.from.monthSame(item) &&
573
+ value.isSingleMonth;
574
+ var hoveredItemIsCandidateToBeFrom = (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthSame(item)) &&
575
+ (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthBefore(value.from)) &&
576
+ value.isSingleMonth;
577
+ if (theFirstOfRange || hoveredItemAfterFrom || hoveredItemIsCandidateToBeFrom) {
578
+ return i1.TuiRangeState.Start;
579
+ }
580
+ var theLastOfRange = value.to.monthSame(item) && !value.isSingleMonth;
581
+ var hoveredItemBeforeTo = value.to.monthSame(item) &&
582
+ (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthBefore(value.to)) &&
583
+ value.isSingleMonth;
584
+ var hoveredItemIsCandidateToBeTo = (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthSame(item)) &&
585
+ (hoveredItem === null || hoveredItem === void 0 ? void 0 : hoveredItem.monthAfter(value.from)) &&
586
+ value.isSingleMonth;
587
+ if (theLastOfRange || hoveredItemBeforeTo || hoveredItemIsCandidateToBeTo) {
588
+ return i1.TuiRangeState.End;
589
+ }
590
+ return value.isSingleMonth && value.from.monthSame(item)
591
+ ? i1.TuiRangeState.Single
592
+ : null;
593
+ };
594
+ TuiCalendarMonthComponent.prototype.getTuiMonth = function (monthNumber, yearNumber) {
595
+ return new i3.TuiMonth(yearNumber, monthNumber);
596
+ };
597
+ TuiCalendarMonthComponent.prototype.isItemToday = function (item) {
598
+ return TODAY.monthSame(item);
599
+ };
600
+ TuiCalendarMonthComponent.prototype.isItemInsideRange = function (month) {
601
+ var _b = this, value = _b.value, hoveredItem = _b.hoveredItem;
602
+ if (value === null || value instanceof i3.TuiMonth) {
603
+ return false;
604
+ }
605
+ if (!value.isSingleMonth) {
606
+ return value.from.monthSameOrBefore(month) && value.to.monthAfter(month);
607
+ }
608
+ if (hoveredItem === null) {
609
+ return false;
610
+ }
611
+ var range = i3.TuiMonthRange.sort(value.from, hoveredItem);
612
+ return range.from.monthSameOrBefore(month) && range.to.monthAfter(month);
613
+ };
614
+ TuiCalendarMonthComponent.prototype.onPickerYearClick = function (year) {
615
+ this.isYearPickerShown = false;
616
+ if (this.year.yearSame(year)) {
617
+ return;
618
+ }
619
+ this.updateActiveYear(year);
620
+ };
621
+ TuiCalendarMonthComponent.prototype.onItemClick = function (month) {
622
+ if (this.disabledItemHandlerWithMinMax(month)) {
623
+ return;
624
+ }
625
+ this.monthClick.emit(month);
626
+ };
627
+ TuiCalendarMonthComponent.prototype.onYearClick = function () {
628
+ this.isYearPickerShown = true;
629
+ };
630
+ TuiCalendarMonthComponent.prototype.onNextYear = function () {
631
+ this.updateActiveYear(this.year.append({ year: 1 }));
632
+ };
633
+ TuiCalendarMonthComponent.prototype.onPreviousYear = function () {
634
+ this.updateActiveYear(this.year.append({ year: -1 }));
635
+ };
636
+ TuiCalendarMonthComponent.prototype.onItemHovered = function (hovered, item) {
637
+ this.updateHoveredItem(hovered ? item : null);
638
+ };
639
+ TuiCalendarMonthComponent.prototype.onItemPressed = function (pressed, item) {
640
+ this.updatePressedItem(pressed ? item : null);
641
+ };
642
+ TuiCalendarMonthComponent.prototype.calculateDisabledItemHandlerWithMinMax = function (disabledItemHandler, value, min, max) {
643
+ return function (item) { return item.monthBefore(min) ||
644
+ item.monthAfter(max) ||
645
+ disabledItemHandler(item, { value: value }); };
646
+ };
647
+ Object.defineProperty(TuiCalendarMonthComponent.prototype, "disabledItemHandlerWithMinMax", {
648
+ get: function () {
649
+ return this.calculateDisabledItemHandlerWithMinMax(this.disabledItemHandler, this.value, this.computedMin, this.computedMax);
650
+ },
651
+ enumerable: false,
652
+ configurable: true
653
+ });
654
+ TuiCalendarMonthComponent.prototype.updateHoveredItem = function (month) {
655
+ if (i3.tuiNullableSame(this.hoveredItem, month, function (a, b) { return a.monthSame(b); })) {
656
+ return;
657
+ }
658
+ this.hoveredItem = month;
659
+ this.hoveredItemChange.emit(month);
660
+ };
661
+ TuiCalendarMonthComponent.prototype.updatePressedItem = function (item) {
662
+ this.pressedItem = item;
663
+ };
664
+ TuiCalendarMonthComponent.prototype.updateActiveYear = function (year) {
665
+ this.year = year;
666
+ this.yearChange.emit(year);
667
+ };
668
+ return TuiCalendarMonthComponent;
669
+ }());
670
+ TuiCalendarMonthComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthComponent, deps: [{ token: tokens.TUI_CALENDAR_MONTHS }], target: i0__namespace.ɵɵFactoryTarget.Component });
671
+ TuiCalendarMonthComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TuiCalendarMonthComponent, selector: "tui-calendar-month", inputs: { value: "value", year: "year", disabledItemHandler: "disabledItemHandler", min: "min", max: "max" }, outputs: { monthClick: "monthClick", hoveredItemChange: "hoveredItemChange", yearChange: "yearChange" }, host: { properties: { "class._single": "this.isSingle" } }, ngImport: i0__namespace, template: "<tui-scrollbar\n *ngIf=\"isYearPickerShown; else monthSelect\"\n class=\"t-scrollbar\"\n>\n <tui-primitive-year-picker\n [initialItem]=\"year\"\n [max]=\"computedMax\"\n [min]=\"computedMin\"\n [value]=\"value\"\n (yearClick)=\"onPickerYearClick($event)\"\n ></tui-primitive-year-picker>\n</tui-scrollbar>\n<ng-template #monthSelect>\n <tui-primitive-spin-button\n [focusable]=\"false\"\n [leftDisabled]=\"previousYearDisabled\"\n [rightDisabled]=\"nextYearDisabled\"\n (leftClick)=\"onPreviousYear()\"\n (rightClick)=\"onNextYear()\"\n >\n <button\n automation-id=\"tui-calendar-month__active-year\"\n tuiLink\n type=\"button\"\n [tuiFocusable]=\"false\"\n (click)=\"onYearClick()\"\n >\n {{ year.formattedYear }}\n </button>\n </tui-primitive-spin-button>\n <div class=\"t-row\">\n <ng-container *ngFor=\"let month of months$ | async; let index = index\">\n <div\n *tuiLet=\"getTuiMonth(index, year.year) as item\"\n class=\"t-cell\"\n [attr.data-range]=\"getItemRange(item)\"\n [attr.data-state]=\"getItemState(item)\"\n [class.t-cell_interval]=\"isItemInsideRange(item)\"\n [class.t-cell_today]=\"isItemToday(item)\"\n (click)=\"onItemClick(item)\"\n (tuiHoveredChange)=\"onItemHovered($event, item)\"\n (tuiPressedChange)=\"onItemHovered($event, item)\"\n >\n <div class=\"t-item\">{{ month }}</div>\n </div>\n </ng-container>\n </div>\n</ng-template>\n", styles: [":host{display:block;font:var(--tui-font-text-m)}.t-row{position:relative;display:flex;justify-content:space-between;height:2.25rem;isolation:isolate}.t-item{position:relative;flex:1;line-height:2rem;border-radius:var(--tui-radius-m)}.t-item:before,.t-item:after{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-item:after{border-radius:.5rem}.t-cell{position:relative;display:flex;align-items:center;justify-content:center;width:3.9375rem;text-align:center;outline:none;cursor:pointer;background-clip:content-box;box-sizing:border-box;border:.125rem solid transparent}.t-cell:before{content:\"\";position:absolute;top:0;left:0;right:0;bottom:0;z-index:-1;border-radius:var(--tui-radius-m)}.t-cell_today:after{position:absolute;left:50%;transform:translate(-50%);content:\"\";bottom:.3125rem;height:.125rem;width:.75rem;border-radius:.375rem;background-color:var(--tui-text-01)}.t-cell_interval:before{background:var(--tui-base-02)}:host._single .t-cell_interval:before{background:var(--tui-secondary-hover)}.t-cell_interval:not(:last-child):before{right:-.25rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell_interval:not([data-range=\"start\"]):not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell_interval:last-child:first-child:before{right:0}.t-cell_interval:first-child>.t-item{border-top-left-radius:var(--tui-radius-m);border-bottom-left-radius:var(--tui-radius-m)}.t-cell_interval:last-child>.t-item{border-top-right-radius:var(--tui-radius-m);border-bottom-right-radius:var(--tui-radius-m)}.t-cell_interval>.t-item{border-radius:0}.t-cell[data-range]:after{background-color:var(--tui-primary-text)}.t-cell[data-range]>.t-item{color:var(--tui-primary-text)}.t-cell[data-range]>.t-item:before,.t-cell[data-range]>.t-item:after{background-color:var(--tui-primary)}.t-cell[data-range][data-state=hover]>.t-item:before,.t-cell[data-range][data-state=hover]>.t-item:after{background-color:var(--tui-primary-hover)}.t-cell[data-range][data-state=active]>.t-item:before,.t-cell[data-range][data-state=active]>.t-item:after{background-color:var(--tui-primary-active)}.t-cell[data-range=end]:before{background:var(--tui-base-02)}:host._single .t-cell[data-range=end]:before{background:var(--tui-secondary-hover)}.t-cell[data-range=end]:not(:first-child):before{border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end]>.t-item:before{left:.625rem;border-top-left-radius:0;border-bottom-left-radius:0}.t-cell[data-range=end]>.t-item:after{left:-2rem;right:100%;transform:translate(1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=start]>.t-item:before{right:.625rem;border-top-right-radius:0;border-bottom-right-radius:0}.t-cell[data-range=start]>.t-item:after{left:100%;right:-2rem;transform:translate(-1.6rem) scaleY(.83) scaleX(.5) rotate(45deg)}.t-cell[data-range=single]>.t-item:after{display:none}.t-cell[data-state=disabled]{pointer-events:none}.t-cell[data-state=disabled]>.t-item{opacity:.36}.t-cell[data-state=hover]:hover:not([data-range])>.t-item{background-color:var(--tui-secondary-hover)}.t-cell[data-state=active]:hover:not([data-range])>.t-item{background-color:var(--tui-secondary-active)}:host{display:block;height:13.625rem;width:15.75rem;padding:1.125rem;box-sizing:content-box}.t-row{flex-wrap:wrap;margin-top:1.4375rem}.t-cell:nth-child(n + 5){margin-top:1.75rem}.t-cell_interval:nth-child(4n):before{right:0}.t-scrollbar{height:inherit;width:inherit}\n"], components: [{ type: i1__namespace.TuiScrollbarComponent, selector: "tui-scrollbar", inputs: ["hidden"] }, { type: i1__namespace.TuiPrimitiveYearPickerComponent, selector: "tui-primitive-year-picker", inputs: ["value", "initialItem", "min", "max", "disabledItemHandler"], outputs: ["yearClick"] }, { type: i1__namespace.TuiPrimitiveSpinButtonComponent, selector: "tui-primitive-spin-button", inputs: ["disabled", "leftDisabled", "rightDisabled"], outputs: ["leftClick", "rightClick"] }, { type: i1__namespace.TuiLinkComponent, selector: "a[tuiLink], button[tuiLink]", inputs: ["pseudo", "icon", "iconAlign", "iconRotated", "mode"], exportAs: ["tuiLink"] }], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.TuiFocusableDirective, selector: "[tuiFocusable]", inputs: ["tuiFocusable"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.TuiLetDirective, selector: "[tuiLet]", inputs: ["tuiLet"] }, { type: i3__namespace.TuiHoveredDirective, selector: "[tuiHoveredChange]", outputs: ["tuiHoveredChange"] }, { type: i3__namespace.TuiPressedDirective, selector: "[tuiPressedChange]", outputs: ["tuiPressedChange"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
672
+ __decorate([
673
+ i3.tuiPure
674
+ ], TuiCalendarMonthComponent.prototype, "calculateDisabledItemHandlerWithMinMax", null);
675
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthComponent, decorators: [{
676
+ type: i0.Component,
677
+ args: [{
678
+ selector: 'tui-calendar-month',
679
+ templateUrl: './calendar-month.template.html',
680
+ styleUrls: ['./calendar-month.style.less'],
681
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
682
+ }]
683
+ }], ctorParameters: function () {
684
+ return [{ type: i4__namespace.Observable, decorators: [{
685
+ type: i0.Inject,
686
+ args: [tokens.TUI_CALENDAR_MONTHS]
687
+ }] }];
688
+ }, propDecorators: { value: [{
689
+ type: i0.Input
690
+ }], year: [{
691
+ type: i0.Input
692
+ }], disabledItemHandler: [{
693
+ type: i0.Input
694
+ }], min: [{
695
+ type: i0.Input
696
+ }], max: [{
697
+ type: i0.Input
698
+ }], monthClick: [{
699
+ type: i0.Output
700
+ }], hoveredItemChange: [{
701
+ type: i0.Output
702
+ }], yearChange: [{
703
+ type: i0.Output
704
+ }], isSingle: [{
705
+ type: i0.HostBinding,
706
+ args: ['class._single']
707
+ }], calculateDisabledItemHandlerWithMinMax: [] } });
562
708
 
563
- var TuiCalendarMonthModule = /** @class */ (function () {
564
- function TuiCalendarMonthModule() {
565
- }
566
- return TuiCalendarMonthModule;
567
- }());
568
- TuiCalendarMonthModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
569
- TuiCalendarMonthModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthModule, declarations: [TuiCalendarMonthComponent], imports: [i2.CommonModule,
570
- i1.TuiPrimitiveYearPickerModule,
571
- i1.TuiPrimitiveSpinButtonModule,
572
- i1.TuiScrollbarModule,
573
- i1.TuiLinkModule,
574
- i3.TuiLetModule,
575
- i3.TuiHoveredModule,
576
- i3.TuiPressedModule,
577
- i3.TuiFocusableModule], exports: [TuiCalendarMonthComponent] });
578
- TuiCalendarMonthModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthModule, imports: [[
579
- i2.CommonModule,
580
- i1.TuiPrimitiveYearPickerModule,
581
- i1.TuiPrimitiveSpinButtonModule,
582
- i1.TuiScrollbarModule,
583
- i1.TuiLinkModule,
584
- i3.TuiLetModule,
585
- i3.TuiHoveredModule,
586
- i3.TuiPressedModule,
587
- i3.TuiFocusableModule,
588
- ]] });
589
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthModule, decorators: [{
590
- type: i0.NgModule,
591
- args: [{
592
- imports: [
593
- i2.CommonModule,
594
- i1.TuiPrimitiveYearPickerModule,
595
- i1.TuiPrimitiveSpinButtonModule,
596
- i1.TuiScrollbarModule,
597
- i1.TuiLinkModule,
598
- i3.TuiLetModule,
599
- i3.TuiHoveredModule,
600
- i3.TuiPressedModule,
601
- i3.TuiFocusableModule,
602
- ],
603
- declarations: [TuiCalendarMonthComponent],
604
- exports: [TuiCalendarMonthComponent],
605
- }]
606
- }] });
709
+ var TuiCalendarMonthModule = /** @class */ (function () {
710
+ function TuiCalendarMonthModule() {
711
+ }
712
+ return TuiCalendarMonthModule;
713
+ }());
714
+ TuiCalendarMonthModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
715
+ TuiCalendarMonthModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthModule, declarations: [TuiCalendarMonthComponent], imports: [i2.CommonModule,
716
+ i1.TuiPrimitiveYearPickerModule,
717
+ i1.TuiPrimitiveSpinButtonModule,
718
+ i1.TuiScrollbarModule,
719
+ i1.TuiLinkModule,
720
+ i3.TuiLetModule,
721
+ i3.TuiHoveredModule,
722
+ i3.TuiPressedModule,
723
+ i3.TuiFocusableModule], exports: [TuiCalendarMonthComponent] });
724
+ TuiCalendarMonthModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthModule, imports: [[
725
+ i2.CommonModule,
726
+ i1.TuiPrimitiveYearPickerModule,
727
+ i1.TuiPrimitiveSpinButtonModule,
728
+ i1.TuiScrollbarModule,
729
+ i1.TuiLinkModule,
730
+ i3.TuiLetModule,
731
+ i3.TuiHoveredModule,
732
+ i3.TuiPressedModule,
733
+ i3.TuiFocusableModule,
734
+ ]] });
735
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TuiCalendarMonthModule, decorators: [{
736
+ type: i0.NgModule,
737
+ args: [{
738
+ imports: [
739
+ i2.CommonModule,
740
+ i1.TuiPrimitiveYearPickerModule,
741
+ i1.TuiPrimitiveSpinButtonModule,
742
+ i1.TuiScrollbarModule,
743
+ i1.TuiLinkModule,
744
+ i3.TuiLetModule,
745
+ i3.TuiHoveredModule,
746
+ i3.TuiPressedModule,
747
+ i3.TuiFocusableModule,
748
+ ],
749
+ declarations: [TuiCalendarMonthComponent],
750
+ exports: [TuiCalendarMonthComponent],
751
+ }]
752
+ }] });
607
753
 
608
- /**
609
- * Generated bundle index. Do not edit.
610
- */
754
+ /**
755
+ * Generated bundle index. Do not edit.
756
+ */
611
757
 
612
- exports.TuiCalendarMonthComponent = TuiCalendarMonthComponent;
613
- exports.TuiCalendarMonthModule = TuiCalendarMonthModule;
758
+ exports.TuiCalendarMonthComponent = TuiCalendarMonthComponent;
759
+ exports.TuiCalendarMonthModule = TuiCalendarMonthModule;
614
760
 
615
- Object.defineProperty(exports, '__esModule', { value: true });
761
+ Object.defineProperty(exports, '__esModule', { value: true });
616
762
 
617
763
  }));
618
764
  //# sourceMappingURL=taiga-ui-kit-components-calendar-month.umd.js.map