@digipair/skill-web-inputs 0.114.1 → 0.114.3
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.
- package/dist/index.cjs.js +83 -3318
- package/package.json +5 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1,1952 +1,24 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
7
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
8
|
-
}
|
|
9
|
-
function __metadata(metadataKey, metadataValue) {
|
|
10
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
11
|
-
}
|
|
12
|
-
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
13
|
-
var e = new Error(message);
|
|
14
|
-
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* @license
|
|
19
|
-
* Copyright 2019 Google LLC
|
|
20
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/ function _class_call_check$3(instance, Constructor) {
|
|
22
|
-
if (!(instance instanceof Constructor)) {
|
|
23
|
-
throw new TypeError("Cannot call a class as a function");
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function _defineProperties$3(target, props) {
|
|
27
|
-
for(var i = 0; i < props.length; i++){
|
|
28
|
-
var descriptor = props[i];
|
|
29
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
30
|
-
descriptor.configurable = true;
|
|
31
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
32
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
function _create_class$3(Constructor, protoProps, staticProps) {
|
|
36
|
-
if (protoProps) _defineProperties$3(Constructor.prototype, protoProps);
|
|
37
|
-
return Constructor;
|
|
38
|
-
}
|
|
39
|
-
function _instanceof$2(left, right) {
|
|
40
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
41
|
-
return !!right[Symbol.hasInstance](left);
|
|
42
|
-
} else {
|
|
43
|
-
return left instanceof right;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
var t$2 = globalThis, e$2 = t$2.ShadowRoot && (void 0 === t$2.ShadyCSS || t$2.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = Symbol(), o$4 = new WeakMap;
|
|
47
|
-
var n$3 = /*#__PURE__*/ function() {
|
|
48
|
-
function n(t, e, o) {
|
|
49
|
-
_class_call_check$3(this, n);
|
|
50
|
-
if (this._$cssResult$ = true, o !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
51
|
-
this.cssText = t, this.t = e;
|
|
52
|
-
}
|
|
53
|
-
_create_class$3(n, [
|
|
54
|
-
{
|
|
55
|
-
key: "styleSheet",
|
|
56
|
-
get: function get() {
|
|
57
|
-
var t = this.o;
|
|
58
|
-
var s = this.t;
|
|
59
|
-
if (e$2 && void 0 === t) {
|
|
60
|
-
var e1 = void 0 !== s && 1 === s.length;
|
|
61
|
-
e1 && (t = o$4.get(s)), void 0 === t && ((this.o = t = new CSSStyleSheet).replaceSync(this.cssText), e1 && o$4.set(s, t));
|
|
62
|
-
}
|
|
63
|
-
return t;
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
key: "toString",
|
|
68
|
-
value: function toString() {
|
|
69
|
-
return this.cssText;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
]);
|
|
73
|
-
return n;
|
|
74
|
-
}();
|
|
75
|
-
var r$4 = function(t) {
|
|
76
|
-
return new n$3("string" == typeof t ? t : t + "", void 0, s$2);
|
|
77
|
-
}, i$3 = function(t) {
|
|
78
|
-
for(var _len = arguments.length, e = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
79
|
-
e[_key - 1] = arguments[_key];
|
|
80
|
-
}
|
|
81
|
-
var o = 1 === t.length ? t[0] : e.reduce(function(e, s, o) {
|
|
82
|
-
return e + function(t) {
|
|
83
|
-
if (true === t._$cssResult$) return t.cssText;
|
|
84
|
-
if ("number" == typeof t) return t;
|
|
85
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " + t + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
86
|
-
}(s) + t[o + 1];
|
|
87
|
-
}, t[0]);
|
|
88
|
-
return new n$3(o, t, s$2);
|
|
89
|
-
}, S$1 = function(s, o) {
|
|
90
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
91
|
-
if (e$2) s.adoptedStyleSheets = o.map(function(t) {
|
|
92
|
-
return _instanceof$2(t, CSSStyleSheet) ? t : t.styleSheet;
|
|
93
|
-
});
|
|
94
|
-
else try {
|
|
95
|
-
for(var _iterator = o[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
96
|
-
var e1 = _step.value;
|
|
97
|
-
var _$o = document.createElement("style"), n = t$2.litNonce;
|
|
98
|
-
void 0 !== n && _$o.setAttribute("nonce", n), _$o.textContent = e1.cssText, s.appendChild(_$o);
|
|
99
|
-
}
|
|
100
|
-
} catch (err) {
|
|
101
|
-
_didIteratorError = true;
|
|
102
|
-
_iteratorError = err;
|
|
103
|
-
} finally{
|
|
104
|
-
try {
|
|
105
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
106
|
-
_iterator.return();
|
|
107
|
-
}
|
|
108
|
-
} finally{
|
|
109
|
-
if (_didIteratorError) {
|
|
110
|
-
throw _iteratorError;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}, c$2 = e$2 ? function(t) {
|
|
115
|
-
return t;
|
|
116
|
-
} : function(t) {
|
|
117
|
-
return _instanceof$2(t, CSSStyleSheet) ? function(t) {
|
|
118
|
-
var e = "";
|
|
119
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
120
|
-
try {
|
|
121
|
-
for(var _iterator = t.cssRules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
122
|
-
var s = _step.value;
|
|
123
|
-
e += s.cssText;
|
|
124
|
-
}
|
|
125
|
-
} catch (err) {
|
|
126
|
-
_didIteratorError = true;
|
|
127
|
-
_iteratorError = err;
|
|
128
|
-
} finally{
|
|
129
|
-
try {
|
|
130
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
131
|
-
_iterator.return();
|
|
132
|
-
}
|
|
133
|
-
} finally{
|
|
134
|
-
if (_didIteratorError) {
|
|
135
|
-
throw _iteratorError;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
return r$4(e);
|
|
140
|
-
}(t) : t;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
function _array_like_to_array$a(arr, len) {
|
|
144
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
145
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
146
|
-
return arr2;
|
|
147
|
-
}
|
|
148
|
-
function _array_with_holes$3(arr) {
|
|
149
|
-
if (Array.isArray(arr)) return arr;
|
|
150
|
-
}
|
|
151
|
-
function _array_without_holes$9(arr) {
|
|
152
|
-
if (Array.isArray(arr)) return _array_like_to_array$a(arr);
|
|
153
|
-
}
|
|
154
|
-
function _assert_this_initialized$2(self) {
|
|
155
|
-
if (self === void 0) {
|
|
156
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
157
|
-
}
|
|
158
|
-
return self;
|
|
159
|
-
}
|
|
160
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
161
|
-
try {
|
|
162
|
-
var info = gen[key](arg);
|
|
163
|
-
var value = info.value;
|
|
164
|
-
} catch (error) {
|
|
165
|
-
reject(error);
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
if (info.done) {
|
|
169
|
-
resolve(value);
|
|
170
|
-
} else {
|
|
171
|
-
Promise.resolve(value).then(_next, _throw);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
function _async_to_generator(fn) {
|
|
175
|
-
return function() {
|
|
176
|
-
var self = this, args = arguments;
|
|
177
|
-
return new Promise(function(resolve, reject) {
|
|
178
|
-
var gen = fn.apply(self, args);
|
|
179
|
-
function _next(value) {
|
|
180
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
|
|
181
|
-
}
|
|
182
|
-
function _throw(err) {
|
|
183
|
-
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
|
|
184
|
-
}
|
|
185
|
-
_next(undefined);
|
|
186
|
-
});
|
|
187
|
-
};
|
|
188
|
-
}
|
|
189
|
-
function _class_call_check$2(instance, Constructor) {
|
|
190
|
-
if (!(instance instanceof Constructor)) {
|
|
191
|
-
throw new TypeError("Cannot call a class as a function");
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
function _construct(Parent, args, Class) {
|
|
195
|
-
if (_is_native_reflect_construct$2()) {
|
|
196
|
-
_construct = Reflect.construct;
|
|
197
|
-
} else {
|
|
198
|
-
_construct = function construct(Parent, args, Class) {
|
|
199
|
-
var a = [
|
|
200
|
-
null
|
|
201
|
-
];
|
|
202
|
-
a.push.apply(a, args);
|
|
203
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
204
|
-
var instance = new Constructor();
|
|
205
|
-
if (Class) _set_prototype_of$2(instance, Class.prototype);
|
|
206
|
-
return instance;
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
return _construct.apply(null, arguments);
|
|
210
|
-
}
|
|
211
|
-
function _defineProperties$2(target, props) {
|
|
212
|
-
for(var i = 0; i < props.length; i++){
|
|
213
|
-
var descriptor = props[i];
|
|
214
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
215
|
-
descriptor.configurable = true;
|
|
216
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
217
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
function _create_class$2(Constructor, protoProps, staticProps) {
|
|
221
|
-
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
|
222
|
-
if (staticProps) _defineProperties$2(Constructor, staticProps);
|
|
223
|
-
return Constructor;
|
|
224
|
-
}
|
|
225
|
-
function _get_prototype_of$2(o) {
|
|
226
|
-
_get_prototype_of$2 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
227
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
228
|
-
};
|
|
229
|
-
return _get_prototype_of$2(o);
|
|
230
|
-
}
|
|
231
|
-
function _inherits$2(subClass, superClass) {
|
|
232
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
233
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
234
|
-
}
|
|
235
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
236
|
-
constructor: {
|
|
237
|
-
value: subClass,
|
|
238
|
-
writable: true,
|
|
239
|
-
configurable: true
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
if (superClass) _set_prototype_of$2(subClass, superClass);
|
|
243
|
-
}
|
|
244
|
-
function _is_native_function(fn) {
|
|
245
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
246
|
-
}
|
|
247
|
-
function _iterable_to_array$9(iter) {
|
|
248
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
249
|
-
}
|
|
250
|
-
function _iterable_to_array_limit$2(arr, i) {
|
|
251
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
252
|
-
if (_i == null) return;
|
|
253
|
-
var _arr = [];
|
|
254
|
-
var _n = true;
|
|
255
|
-
var _d = false;
|
|
256
|
-
var _s, _e;
|
|
257
|
-
try {
|
|
258
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
259
|
-
_arr.push(_s.value);
|
|
260
|
-
if (i && _arr.length === i) break;
|
|
261
|
-
}
|
|
262
|
-
} catch (err) {
|
|
263
|
-
_d = true;
|
|
264
|
-
_e = err;
|
|
265
|
-
} finally{
|
|
266
|
-
try {
|
|
267
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
268
|
-
} finally{
|
|
269
|
-
if (_d) throw _e;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
return _arr;
|
|
273
|
-
}
|
|
274
|
-
function _non_iterable_rest$3() {
|
|
275
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
276
|
-
}
|
|
277
|
-
function _non_iterable_spread$9() {
|
|
278
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
279
|
-
}
|
|
280
|
-
function _possible_constructor_return$2(self, call) {
|
|
281
|
-
if (call && (_type_of$5(call) === "object" || typeof call === "function")) {
|
|
282
|
-
return call;
|
|
283
|
-
}
|
|
284
|
-
return _assert_this_initialized$2(self);
|
|
285
|
-
}
|
|
286
|
-
function _set_prototype_of$2(o, p) {
|
|
287
|
-
_set_prototype_of$2 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
288
|
-
o.__proto__ = p;
|
|
289
|
-
return o;
|
|
290
|
-
};
|
|
291
|
-
return _set_prototype_of$2(o, p);
|
|
292
|
-
}
|
|
293
|
-
function _sliced_to_array$2(arr, i) {
|
|
294
|
-
return _array_with_holes$3(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$a(arr, i) || _non_iterable_rest$3();
|
|
295
|
-
}
|
|
296
|
-
function _to_consumable_array$9(arr) {
|
|
297
|
-
return _array_without_holes$9(arr) || _iterable_to_array$9(arr) || _unsupported_iterable_to_array$a(arr) || _non_iterable_spread$9();
|
|
298
|
-
}
|
|
299
|
-
function _type_of$5(obj) {
|
|
300
|
-
"@swc/helpers - typeof";
|
|
301
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
302
|
-
}
|
|
303
|
-
function _unsupported_iterable_to_array$a(o, minLen) {
|
|
304
|
-
if (!o) return;
|
|
305
|
-
if (typeof o === "string") return _array_like_to_array$a(o, minLen);
|
|
306
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
307
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
308
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
309
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$a(o, minLen);
|
|
310
|
-
}
|
|
311
|
-
function _wrap_native_super(Class) {
|
|
312
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
313
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
314
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
315
|
-
if (typeof Class !== "function") {
|
|
316
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
317
|
-
}
|
|
318
|
-
if (typeof _cache !== "undefined") {
|
|
319
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
320
|
-
_cache.set(Class, Wrapper);
|
|
321
|
-
}
|
|
322
|
-
function Wrapper() {
|
|
323
|
-
return _construct(Class, arguments, _get_prototype_of$2(this).constructor);
|
|
324
|
-
}
|
|
325
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
326
|
-
constructor: {
|
|
327
|
-
value: Wrapper,
|
|
328
|
-
enumerable: false,
|
|
329
|
-
writable: true,
|
|
330
|
-
configurable: true
|
|
331
|
-
}
|
|
332
|
-
});
|
|
333
|
-
return _set_prototype_of$2(Wrapper, Class);
|
|
334
|
-
};
|
|
335
|
-
return _wrap_native_super(Class);
|
|
336
|
-
}
|
|
337
|
-
function _is_native_reflect_construct$2() {
|
|
338
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
339
|
-
if (Reflect.construct.sham) return false;
|
|
340
|
-
if (typeof Proxy === "function") return true;
|
|
341
|
-
try {
|
|
342
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
343
|
-
return true;
|
|
344
|
-
} catch (e) {
|
|
345
|
-
return false;
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
function _create_super$2(Derived) {
|
|
349
|
-
var hasNativeReflectConstruct = _is_native_reflect_construct$2();
|
|
350
|
-
return function _createSuperInternal() {
|
|
351
|
-
var Super = _get_prototype_of$2(Derived), result;
|
|
352
|
-
if (hasNativeReflectConstruct) {
|
|
353
|
-
var NewTarget = _get_prototype_of$2(this).constructor;
|
|
354
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
355
|
-
} else {
|
|
356
|
-
result = Super.apply(this, arguments);
|
|
357
|
-
}
|
|
358
|
-
return _possible_constructor_return$2(this, result);
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
function _ts_generator$1(thisArg, body) {
|
|
362
|
-
var f, y, t, g, _ = {
|
|
363
|
-
label: 0,
|
|
364
|
-
sent: function() {
|
|
365
|
-
if (t[0] & 1) throw t[1];
|
|
366
|
-
return t[1];
|
|
367
|
-
},
|
|
368
|
-
trys: [],
|
|
369
|
-
ops: []
|
|
370
|
-
};
|
|
371
|
-
return g = {
|
|
372
|
-
next: verb(0),
|
|
373
|
-
"throw": verb(1),
|
|
374
|
-
"return": verb(2)
|
|
375
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
376
|
-
return this;
|
|
377
|
-
}), g;
|
|
378
|
-
function verb(n) {
|
|
379
|
-
return function(v) {
|
|
380
|
-
return step([
|
|
381
|
-
n,
|
|
382
|
-
v
|
|
383
|
-
]);
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
function step(op) {
|
|
387
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
388
|
-
while(_)try {
|
|
389
|
-
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) return t;
|
|
390
|
-
if (y = 0, t) op = [
|
|
391
|
-
op[0] & 2,
|
|
392
|
-
t.value
|
|
393
|
-
];
|
|
394
|
-
switch(op[0]){
|
|
395
|
-
case 0:
|
|
396
|
-
case 1:
|
|
397
|
-
t = op;
|
|
398
|
-
break;
|
|
399
|
-
case 4:
|
|
400
|
-
_.label++;
|
|
401
|
-
return {
|
|
402
|
-
value: op[1],
|
|
403
|
-
done: false
|
|
404
|
-
};
|
|
405
|
-
case 5:
|
|
406
|
-
_.label++;
|
|
407
|
-
y = op[1];
|
|
408
|
-
op = [
|
|
409
|
-
0
|
|
410
|
-
];
|
|
411
|
-
continue;
|
|
412
|
-
case 7:
|
|
413
|
-
op = _.ops.pop();
|
|
414
|
-
_.trys.pop();
|
|
415
|
-
continue;
|
|
416
|
-
default:
|
|
417
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
418
|
-
_ = 0;
|
|
419
|
-
continue;
|
|
420
|
-
}
|
|
421
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
422
|
-
_.label = op[1];
|
|
423
|
-
break;
|
|
424
|
-
}
|
|
425
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
426
|
-
_.label = t[1];
|
|
427
|
-
t = op;
|
|
428
|
-
break;
|
|
429
|
-
}
|
|
430
|
-
if (t && _.label < t[2]) {
|
|
431
|
-
_.label = t[2];
|
|
432
|
-
_.ops.push(op);
|
|
433
|
-
break;
|
|
434
|
-
}
|
|
435
|
-
if (t[2]) _.ops.pop();
|
|
436
|
-
_.trys.pop();
|
|
437
|
-
continue;
|
|
438
|
-
}
|
|
439
|
-
op = body.call(thisArg, _);
|
|
440
|
-
} catch (e) {
|
|
441
|
-
op = [
|
|
442
|
-
6,
|
|
443
|
-
e
|
|
444
|
-
];
|
|
445
|
-
y = 0;
|
|
446
|
-
} finally{
|
|
447
|
-
f = t = 0;
|
|
448
|
-
}
|
|
449
|
-
if (op[0] & 5) throw op[1];
|
|
450
|
-
return {
|
|
451
|
-
value: op[0] ? op[1] : void 0,
|
|
452
|
-
done: true
|
|
453
|
-
};
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
var _Symbol, _a, _a1;
|
|
457
|
-
/**
|
|
458
|
-
* @license
|
|
459
|
-
* Copyright 2017 Google LLC
|
|
460
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
461
|
-
*/ var i$2 = Object.is, e$1 = Object.defineProperty, h$1 = Object.getOwnPropertyDescriptor, r$3 = Object.getOwnPropertyNames, o$3 = Object.getOwnPropertySymbols, n$2 = Object.getPrototypeOf, a$1 = globalThis, c$1 = a$1.trustedTypes, l$1 = c$1 ? c$1.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = function(t, s) {
|
|
462
|
-
return t;
|
|
463
|
-
}, u$1 = {
|
|
464
|
-
toAttribute: function toAttribute(t, s) {
|
|
465
|
-
switch(s){
|
|
466
|
-
case Boolean:
|
|
467
|
-
t = t ? l$1 : null;
|
|
468
|
-
break;
|
|
469
|
-
case Object:
|
|
470
|
-
case Array:
|
|
471
|
-
t = null == t ? t : JSON.stringify(t);
|
|
472
|
-
}
|
|
473
|
-
return t;
|
|
474
|
-
},
|
|
475
|
-
fromAttribute: function fromAttribute(t, s) {
|
|
476
|
-
var i = t;
|
|
477
|
-
switch(s){
|
|
478
|
-
case Boolean:
|
|
479
|
-
i = null !== t;
|
|
480
|
-
break;
|
|
481
|
-
case Number:
|
|
482
|
-
i = null === t ? null : Number(t);
|
|
483
|
-
break;
|
|
484
|
-
case Object:
|
|
485
|
-
case Array:
|
|
486
|
-
try {
|
|
487
|
-
i = JSON.parse(t);
|
|
488
|
-
} catch (t) {
|
|
489
|
-
i = null;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
return i;
|
|
493
|
-
}
|
|
494
|
-
}, f$1 = function(t, s) {
|
|
495
|
-
return !i$2(t, s);
|
|
496
|
-
}, b = {
|
|
497
|
-
attribute: true,
|
|
498
|
-
type: String,
|
|
499
|
-
converter: u$1,
|
|
500
|
-
reflect: false,
|
|
501
|
-
useDefault: false,
|
|
502
|
-
hasChanged: f$1
|
|
503
|
-
};
|
|
504
|
-
var _metadata, _litPropertyMetadata;
|
|
505
|
-
(_metadata = (_Symbol = Symbol).metadata) !== null && _metadata !== void 0 ? _metadata : _Symbol.metadata = Symbol("metadata"), (_litPropertyMetadata = (_a = a$1).litPropertyMetadata) !== null && _litPropertyMetadata !== void 0 ? _litPropertyMetadata : _a.litPropertyMetadata = new WeakMap;
|
|
506
|
-
var y$1 = /*#__PURE__*/ function(HTMLElement1) {
|
|
507
|
-
_inherits$2(y, HTMLElement1);
|
|
508
|
-
var _super = _create_super$2(y);
|
|
509
|
-
function y() {
|
|
510
|
-
_class_call_check$2(this, y);
|
|
511
|
-
var _this;
|
|
512
|
-
_this = _super.call(this), _this._$Ep = void 0, _this.isUpdatePending = false, _this.hasUpdated = false, _this._$Em = null, _this._$Ev();
|
|
513
|
-
return _possible_constructor_return$2(_this);
|
|
514
|
-
}
|
|
515
|
-
_create_class$2(y, [
|
|
516
|
-
{
|
|
517
|
-
key: "_$Ev",
|
|
518
|
-
value: function _$Ev() {
|
|
519
|
-
var _this = this;
|
|
520
|
-
var _this_constructor_l;
|
|
521
|
-
this._$ES = new Promise(function(t) {
|
|
522
|
-
return _this.enableUpdating = t;
|
|
523
|
-
}), this._$AL = new Map, this._$E_(), this.requestUpdate(), (_this_constructor_l = this.constructor.l) === null || _this_constructor_l === void 0 ? void 0 : _this_constructor_l.forEach(function(t) {
|
|
524
|
-
return t(_this);
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
},
|
|
528
|
-
{
|
|
529
|
-
key: "addController",
|
|
530
|
-
value: function addController(t) {
|
|
531
|
-
var _t_hostConnected;
|
|
532
|
-
var _this__$EO;
|
|
533
|
-
((_this__$EO = this._$EO) !== null && _this__$EO !== void 0 ? _this__$EO : this._$EO = new Set).add(t), void 0 !== this.renderRoot && this.isConnected && ((_t_hostConnected = t.hostConnected) === null || _t_hostConnected === void 0 ? void 0 : _t_hostConnected.call(t));
|
|
534
|
-
}
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
key: "removeController",
|
|
538
|
-
value: function removeController(t) {
|
|
539
|
-
var _this__$EO;
|
|
540
|
-
(_this__$EO = this._$EO) === null || _this__$EO === void 0 ? void 0 : _this__$EO.delete(t);
|
|
541
|
-
}
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
key: "_$E_",
|
|
545
|
-
value: function _$E_() {
|
|
546
|
-
var t = new Map, s = this.constructor.elementProperties;
|
|
547
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
548
|
-
try {
|
|
549
|
-
for(var _iterator = s.keys()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
550
|
-
var i = _step.value;
|
|
551
|
-
this.hasOwnProperty(i) && (t.set(i, this[i]), delete this[i]);
|
|
552
|
-
}
|
|
553
|
-
} catch (err) {
|
|
554
|
-
_didIteratorError = true;
|
|
555
|
-
_iteratorError = err;
|
|
556
|
-
} finally{
|
|
557
|
-
try {
|
|
558
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
559
|
-
_iterator.return();
|
|
560
|
-
}
|
|
561
|
-
} finally{
|
|
562
|
-
if (_didIteratorError) {
|
|
563
|
-
throw _iteratorError;
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
t.size > 0 && (this._$Ep = t);
|
|
568
|
-
}
|
|
569
|
-
},
|
|
570
|
-
{
|
|
571
|
-
key: "createRenderRoot",
|
|
572
|
-
value: function createRenderRoot() {
|
|
573
|
-
var _this_shadowRoot;
|
|
574
|
-
var t = (_this_shadowRoot = this.shadowRoot) !== null && _this_shadowRoot !== void 0 ? _this_shadowRoot : this.attachShadow(this.constructor.shadowRootOptions);
|
|
575
|
-
return S$1(t, this.constructor.elementStyles), t;
|
|
576
|
-
}
|
|
577
|
-
},
|
|
578
|
-
{
|
|
579
|
-
key: "connectedCallback",
|
|
580
|
-
value: function connectedCallback() {
|
|
581
|
-
var _this__$EO;
|
|
582
|
-
var _this_renderRoot;
|
|
583
|
-
(_this_renderRoot = this.renderRoot) !== null && _this_renderRoot !== void 0 ? _this_renderRoot : this.renderRoot = this.createRenderRoot(), this.enableUpdating(true), (_this__$EO = this._$EO) === null || _this__$EO === void 0 ? void 0 : _this__$EO.forEach(function(t) {
|
|
584
|
-
var _t_hostConnected;
|
|
585
|
-
return (_t_hostConnected = t.hostConnected) === null || _t_hostConnected === void 0 ? void 0 : _t_hostConnected.call(t);
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
},
|
|
589
|
-
{
|
|
590
|
-
key: "enableUpdating",
|
|
591
|
-
value: function enableUpdating(t) {}
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
key: "disconnectedCallback",
|
|
595
|
-
value: function disconnectedCallback() {
|
|
596
|
-
var _this__$EO;
|
|
597
|
-
(_this__$EO = this._$EO) === null || _this__$EO === void 0 ? void 0 : _this__$EO.forEach(function(t) {
|
|
598
|
-
var _t_hostDisconnected;
|
|
599
|
-
return (_t_hostDisconnected = t.hostDisconnected) === null || _t_hostDisconnected === void 0 ? void 0 : _t_hostDisconnected.call(t);
|
|
600
|
-
});
|
|
601
|
-
}
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
key: "attributeChangedCallback",
|
|
605
|
-
value: function attributeChangedCallback(t, s, i) {
|
|
606
|
-
this._$AK(t, i);
|
|
607
|
-
}
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
key: "_$ET",
|
|
611
|
-
value: function _$ET(t, s) {
|
|
612
|
-
var i = this.constructor.elementProperties.get(t), e = this.constructor._$Eu(t, i);
|
|
613
|
-
if (void 0 !== e && true === i.reflect) {
|
|
614
|
-
var _i_converter;
|
|
615
|
-
var h = (void 0 !== ((_i_converter = i.converter) === null || _i_converter === void 0 ? void 0 : _i_converter.toAttribute) ? i.converter : u$1).toAttribute(s, i.type);
|
|
616
|
-
this._$Em = t, null == h ? this.removeAttribute(e) : this.setAttribute(e, h), this._$Em = null;
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
},
|
|
620
|
-
{
|
|
621
|
-
key: "_$AK",
|
|
622
|
-
value: function _$AK(t, s) {
|
|
623
|
-
var i = this.constructor, e = i._$Eh.get(t);
|
|
624
|
-
if (void 0 !== e && this._$Em !== e) {
|
|
625
|
-
var _t_converter, _this__$Ej;
|
|
626
|
-
var _$t = i.getPropertyOptions(e), h = "function" == typeof _$t.converter ? {
|
|
627
|
-
fromAttribute: _$t.converter
|
|
628
|
-
} : void 0 !== ((_t_converter = _$t.converter) === null || _t_converter === void 0 ? void 0 : _t_converter.fromAttribute) ? _$t.converter : u$1;
|
|
629
|
-
this._$Em = e;
|
|
630
|
-
var r = h.fromAttribute(s, _$t.type);
|
|
631
|
-
var _ref;
|
|
632
|
-
this[e] = (_ref = r !== null && r !== void 0 ? r : (_this__$Ej = this._$Ej) === null || _this__$Ej === void 0 ? void 0 : _this__$Ej.get(e)) !== null && _ref !== void 0 ? _ref : r, this._$Em = null;
|
|
633
|
-
}
|
|
634
|
-
}
|
|
635
|
-
},
|
|
636
|
-
{
|
|
637
|
-
key: "requestUpdate",
|
|
638
|
-
value: function requestUpdate(t, s, i) {
|
|
639
|
-
if (void 0 !== t) {
|
|
640
|
-
var _this__$Ej;
|
|
641
|
-
var e = this.constructor, h = this[t];
|
|
642
|
-
var _i_hasChanged;
|
|
643
|
-
if (i !== null && i !== void 0 ? i : i = e.getPropertyOptions(t), !(((_i_hasChanged = i.hasChanged) !== null && _i_hasChanged !== void 0 ? _i_hasChanged : f$1)(h, s) || i.useDefault && i.reflect && h === ((_this__$Ej = this._$Ej) === null || _this__$Ej === void 0 ? void 0 : _this__$Ej.get(t)) && !this.hasAttribute(e._$Eu(t, i)))) return;
|
|
644
|
-
this.C(t, s, i);
|
|
645
|
-
}
|
|
646
|
-
false === this.isUpdatePending && (this._$ES = this._$EP());
|
|
647
|
-
}
|
|
648
|
-
},
|
|
649
|
-
{
|
|
650
|
-
key: "C",
|
|
651
|
-
value: function C(t, s, param, r) {
|
|
652
|
-
var i = param.useDefault, e = param.reflect, h = param.wrapped;
|
|
653
|
-
var _this__$Ej, _ref, _this__$Eq;
|
|
654
|
-
i && !((_this__$Ej = this._$Ej) !== null && _this__$Ej !== void 0 ? _this__$Ej : this._$Ej = new Map).has(t) && (this._$Ej.set(t, (_ref = r !== null && r !== void 0 ? r : s) !== null && _ref !== void 0 ? _ref : this[t]), true !== h || void 0 !== r) || (this._$AL.has(t) || (this.hasUpdated || i || (s = void 0), this._$AL.set(t, s)), true === e && this._$Em !== t && ((_this__$Eq = this._$Eq) !== null && _this__$Eq !== void 0 ? _this__$Eq : this._$Eq = new Set).add(t));
|
|
655
|
-
}
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
key: "_$EP",
|
|
659
|
-
value: function _$EP() {
|
|
660
|
-
var _this = this;
|
|
661
|
-
return _async_to_generator(function() {
|
|
662
|
-
var t, _$t, _tmp;
|
|
663
|
-
return _ts_generator$1(this, function(_state) {
|
|
664
|
-
switch(_state.label){
|
|
665
|
-
case 0:
|
|
666
|
-
_this.isUpdatePending = true;
|
|
667
|
-
_state.label = 1;
|
|
668
|
-
case 1:
|
|
669
|
-
_state.trys.push([
|
|
670
|
-
1,
|
|
671
|
-
3,
|
|
672
|
-
,
|
|
673
|
-
4
|
|
674
|
-
]);
|
|
675
|
-
return [
|
|
676
|
-
4,
|
|
677
|
-
_this._$ES
|
|
678
|
-
];
|
|
679
|
-
case 2:
|
|
680
|
-
_state.sent();
|
|
681
|
-
return [
|
|
682
|
-
3,
|
|
683
|
-
4
|
|
684
|
-
];
|
|
685
|
-
case 3:
|
|
686
|
-
t = _state.sent();
|
|
687
|
-
Promise.reject(t);
|
|
688
|
-
return [
|
|
689
|
-
3,
|
|
690
|
-
4
|
|
691
|
-
];
|
|
692
|
-
case 4:
|
|
693
|
-
_$t = _this.scheduleUpdate();
|
|
694
|
-
_tmp = null != _$t;
|
|
695
|
-
if (!_tmp) return [
|
|
696
|
-
3,
|
|
697
|
-
6
|
|
698
|
-
];
|
|
699
|
-
return [
|
|
700
|
-
4,
|
|
701
|
-
_$t
|
|
702
|
-
];
|
|
703
|
-
case 5:
|
|
704
|
-
_tmp = _state.sent();
|
|
705
|
-
_state.label = 6;
|
|
706
|
-
case 6:
|
|
707
|
-
return [
|
|
708
|
-
2,
|
|
709
|
-
(!_this.isUpdatePending)
|
|
710
|
-
];
|
|
711
|
-
}
|
|
712
|
-
});
|
|
713
|
-
})();
|
|
714
|
-
}
|
|
715
|
-
},
|
|
716
|
-
{
|
|
717
|
-
key: "scheduleUpdate",
|
|
718
|
-
value: function scheduleUpdate() {
|
|
719
|
-
return this.performUpdate();
|
|
720
|
-
}
|
|
721
|
-
},
|
|
722
|
-
{
|
|
723
|
-
key: "performUpdate",
|
|
724
|
-
value: function performUpdate() {
|
|
725
|
-
if (!this.isUpdatePending) return;
|
|
726
|
-
if (!this.hasUpdated) {
|
|
727
|
-
var _this_renderRoot;
|
|
728
|
-
if ((_this_renderRoot = this.renderRoot) !== null && _this_renderRoot !== void 0 ? _this_renderRoot : this.renderRoot = this.createRenderRoot(), this._$Ep) {
|
|
729
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
730
|
-
try {
|
|
731
|
-
for(var _iterator = this._$Ep[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
732
|
-
var _step_value = _sliced_to_array$2(_step.value, 2), t = _step_value[0], _$s = _step_value[1];
|
|
733
|
-
this[t] = _$s;
|
|
734
|
-
}
|
|
735
|
-
} catch (err) {
|
|
736
|
-
_didIteratorError = true;
|
|
737
|
-
_iteratorError = err;
|
|
738
|
-
} finally{
|
|
739
|
-
try {
|
|
740
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
741
|
-
_iterator.return();
|
|
742
|
-
}
|
|
743
|
-
} finally{
|
|
744
|
-
if (_didIteratorError) {
|
|
745
|
-
throw _iteratorError;
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
this._$Ep = void 0;
|
|
750
|
-
}
|
|
751
|
-
var t1 = this.constructor.elementProperties;
|
|
752
|
-
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
753
|
-
if (t1.size > 0) try {
|
|
754
|
-
for(var _iterator1 = t1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
755
|
-
var _step_value1 = _sliced_to_array$2(_step1.value, 2), _$s1 = _step_value1[0], i = _step_value1[1];
|
|
756
|
-
var t2 = i.wrapped, e = this[_$s1];
|
|
757
|
-
!0 !== t2 || this._$AL.has(_$s1) || void 0 === e || this.C(_$s1, void 0, i, e);
|
|
758
|
-
}
|
|
759
|
-
} catch (err) {
|
|
760
|
-
_didIteratorError1 = true;
|
|
761
|
-
_iteratorError1 = err;
|
|
762
|
-
} finally{
|
|
763
|
-
try {
|
|
764
|
-
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
765
|
-
_iterator1.return();
|
|
766
|
-
}
|
|
767
|
-
} finally{
|
|
768
|
-
if (_didIteratorError1) {
|
|
769
|
-
throw _iteratorError1;
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
|
-
var t3 = false;
|
|
775
|
-
var _$s2 = this._$AL;
|
|
776
|
-
try {
|
|
777
|
-
var _this__$EO;
|
|
778
|
-
t3 = this.shouldUpdate(_$s2), t3 ? (this.willUpdate(_$s2), (_this__$EO = this._$EO) === null || _this__$EO === void 0 ? void 0 : _this__$EO.forEach(function(t) {
|
|
779
|
-
var _t_hostUpdate;
|
|
780
|
-
return (_t_hostUpdate = t.hostUpdate) === null || _t_hostUpdate === void 0 ? void 0 : _t_hostUpdate.call(t);
|
|
781
|
-
}), this.update(_$s2)) : this._$EM();
|
|
782
|
-
} catch (s) {
|
|
783
|
-
throw t3 = false, this._$EM(), s;
|
|
784
|
-
}
|
|
785
|
-
t3 && this._$AE(_$s2);
|
|
786
|
-
}
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
key: "willUpdate",
|
|
790
|
-
value: function willUpdate(t) {}
|
|
791
|
-
},
|
|
792
|
-
{
|
|
793
|
-
key: "_$AE",
|
|
794
|
-
value: function _$AE(t) {
|
|
795
|
-
var _this__$EO;
|
|
796
|
-
(_this__$EO = this._$EO) === null || _this__$EO === void 0 ? void 0 : _this__$EO.forEach(function(t) {
|
|
797
|
-
var _t_hostUpdated;
|
|
798
|
-
return (_t_hostUpdated = t.hostUpdated) === null || _t_hostUpdated === void 0 ? void 0 : _t_hostUpdated.call(t);
|
|
799
|
-
}), this.hasUpdated || (this.hasUpdated = true, this.firstUpdated(t)), this.updated(t);
|
|
800
|
-
}
|
|
801
|
-
},
|
|
802
|
-
{
|
|
803
|
-
key: "_$EM",
|
|
804
|
-
value: function _$EM() {
|
|
805
|
-
this._$AL = new Map, this.isUpdatePending = false;
|
|
806
|
-
}
|
|
807
|
-
},
|
|
808
|
-
{
|
|
809
|
-
key: "updateComplete",
|
|
810
|
-
get: function get() {
|
|
811
|
-
return this.getUpdateComplete();
|
|
812
|
-
}
|
|
813
|
-
},
|
|
814
|
-
{
|
|
815
|
-
key: "getUpdateComplete",
|
|
816
|
-
value: function getUpdateComplete() {
|
|
817
|
-
return this._$ES;
|
|
818
|
-
}
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
key: "shouldUpdate",
|
|
822
|
-
value: function shouldUpdate(t) {
|
|
823
|
-
return true;
|
|
824
|
-
}
|
|
825
|
-
},
|
|
826
|
-
{
|
|
827
|
-
key: "update",
|
|
828
|
-
value: function update(t) {
|
|
829
|
-
var _this = this;
|
|
830
|
-
this._$Eq && (this._$Eq = this._$Eq.forEach(function(t) {
|
|
831
|
-
return _this._$ET(t, _this[t]);
|
|
832
|
-
})), this._$EM();
|
|
833
|
-
}
|
|
834
|
-
},
|
|
835
|
-
{
|
|
836
|
-
key: "updated",
|
|
837
|
-
value: function updated(t) {}
|
|
838
|
-
},
|
|
839
|
-
{
|
|
840
|
-
key: "firstUpdated",
|
|
841
|
-
value: function firstUpdated(t) {}
|
|
842
|
-
}
|
|
843
|
-
], [
|
|
844
|
-
{
|
|
845
|
-
key: "addInitializer",
|
|
846
|
-
value: function addInitializer(t) {
|
|
847
|
-
var _this_l;
|
|
848
|
-
this._$Ei(), ((_this_l = this.l) !== null && _this_l !== void 0 ? _this_l : this.l = []).push(t);
|
|
849
|
-
}
|
|
850
|
-
},
|
|
851
|
-
{
|
|
852
|
-
key: "observedAttributes",
|
|
853
|
-
get: function get() {
|
|
854
|
-
return this.finalize(), this._$Eh && _to_consumable_array$9(this._$Eh.keys());
|
|
855
|
-
}
|
|
856
|
-
},
|
|
857
|
-
{
|
|
858
|
-
key: "createProperty",
|
|
859
|
-
value: function createProperty(t) {
|
|
860
|
-
var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : b;
|
|
861
|
-
if (s.state && (s.attribute = false), this._$Ei(), this.prototype.hasOwnProperty(t) && ((s = Object.create(s)).wrapped = true), this.elementProperties.set(t, s), !s.noAccessor) {
|
|
862
|
-
var i = Symbol(), h = this.getPropertyDescriptor(t, i, s);
|
|
863
|
-
void 0 !== h && e$1(this.prototype, t, h);
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
},
|
|
867
|
-
{
|
|
868
|
-
key: "getPropertyDescriptor",
|
|
869
|
-
value: function getPropertyDescriptor(t, s, i) {
|
|
870
|
-
var _h;
|
|
871
|
-
var _ref = (_h = h$1(this.prototype, t)) !== null && _h !== void 0 ? _h : {
|
|
872
|
-
get: function get() {
|
|
873
|
-
return this[s];
|
|
874
|
-
},
|
|
875
|
-
set: function set(t) {
|
|
876
|
-
this[s] = t;
|
|
877
|
-
}
|
|
878
|
-
}, e = _ref.get, r = _ref.set;
|
|
879
|
-
return {
|
|
880
|
-
get: e,
|
|
881
|
-
set: function set(s) {
|
|
882
|
-
var h = e === null || e === void 0 ? void 0 : e.call(this);
|
|
883
|
-
r === null || r === void 0 ? void 0 : r.call(this, s), this.requestUpdate(t, h, i);
|
|
884
|
-
},
|
|
885
|
-
configurable: true,
|
|
886
|
-
enumerable: true
|
|
887
|
-
};
|
|
888
|
-
}
|
|
889
|
-
},
|
|
890
|
-
{
|
|
891
|
-
key: "getPropertyOptions",
|
|
892
|
-
value: function getPropertyOptions(t) {
|
|
893
|
-
var _this_elementProperties_get;
|
|
894
|
-
return (_this_elementProperties_get = this.elementProperties.get(t)) !== null && _this_elementProperties_get !== void 0 ? _this_elementProperties_get : b;
|
|
895
|
-
}
|
|
896
|
-
},
|
|
897
|
-
{
|
|
898
|
-
key: "_$Ei",
|
|
899
|
-
value: function _$Ei() {
|
|
900
|
-
if (this.hasOwnProperty(d$1("elementProperties"))) return;
|
|
901
|
-
var t = n$2(this);
|
|
902
|
-
t.finalize(), void 0 !== t.l && (this.l = _to_consumable_array$9(t.l)), this.elementProperties = new Map(t.elementProperties);
|
|
903
|
-
}
|
|
904
|
-
},
|
|
905
|
-
{
|
|
906
|
-
key: "finalize",
|
|
907
|
-
value: function finalize() {
|
|
908
|
-
if (this.hasOwnProperty(d$1("finalized"))) return;
|
|
909
|
-
if (this.finalized = true, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
|
|
910
|
-
var t = this.properties, s = _to_consumable_array$9(r$3(t)).concat(_to_consumable_array$9(o$3(t)));
|
|
911
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
912
|
-
try {
|
|
913
|
-
for(var _iterator = s[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
914
|
-
var i = _step.value;
|
|
915
|
-
this.createProperty(i, t[i]);
|
|
916
|
-
}
|
|
917
|
-
} catch (err) {
|
|
918
|
-
_didIteratorError = true;
|
|
919
|
-
_iteratorError = err;
|
|
920
|
-
} finally{
|
|
921
|
-
try {
|
|
922
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
923
|
-
_iterator.return();
|
|
924
|
-
}
|
|
925
|
-
} finally{
|
|
926
|
-
if (_didIteratorError) {
|
|
927
|
-
throw _iteratorError;
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
}
|
|
931
|
-
}
|
|
932
|
-
var t1 = this[Symbol.metadata];
|
|
933
|
-
if (null !== t1) {
|
|
934
|
-
var s1 = litPropertyMetadata.get(t1);
|
|
935
|
-
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
936
|
-
if (void 0 !== s1) try {
|
|
937
|
-
for(var _iterator1 = s1[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
938
|
-
var _step_value = _sliced_to_array$2(_step1.value, 2), t2 = _step_value[0], i1 = _step_value[1];
|
|
939
|
-
this.elementProperties.set(t2, i1);
|
|
940
|
-
}
|
|
941
|
-
} catch (err) {
|
|
942
|
-
_didIteratorError1 = true;
|
|
943
|
-
_iteratorError1 = err;
|
|
944
|
-
} finally{
|
|
945
|
-
try {
|
|
946
|
-
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
947
|
-
_iterator1.return();
|
|
948
|
-
}
|
|
949
|
-
} finally{
|
|
950
|
-
if (_didIteratorError1) {
|
|
951
|
-
throw _iteratorError1;
|
|
952
|
-
}
|
|
953
|
-
}
|
|
954
|
-
}
|
|
955
|
-
}
|
|
956
|
-
this._$Eh = new Map;
|
|
957
|
-
var _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = undefined;
|
|
958
|
-
try {
|
|
959
|
-
for(var _iterator2 = this.elementProperties[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true){
|
|
960
|
-
var _step_value1 = _sliced_to_array$2(_step2.value, 2), t3 = _step_value1[0], s2 = _step_value1[1];
|
|
961
|
-
var i2 = this._$Eu(t3, s2);
|
|
962
|
-
void 0 !== i2 && this._$Eh.set(i2, t3);
|
|
963
|
-
}
|
|
964
|
-
} catch (err) {
|
|
965
|
-
_didIteratorError2 = true;
|
|
966
|
-
_iteratorError2 = err;
|
|
967
|
-
} finally{
|
|
968
|
-
try {
|
|
969
|
-
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
|
|
970
|
-
_iterator2.return();
|
|
971
|
-
}
|
|
972
|
-
} finally{
|
|
973
|
-
if (_didIteratorError2) {
|
|
974
|
-
throw _iteratorError2;
|
|
975
|
-
}
|
|
976
|
-
}
|
|
977
|
-
}
|
|
978
|
-
this.elementStyles = this.finalizeStyles(this.styles);
|
|
979
|
-
}
|
|
980
|
-
},
|
|
981
|
-
{
|
|
982
|
-
key: "finalizeStyles",
|
|
983
|
-
value: function finalizeStyles(s) {
|
|
984
|
-
var i = [];
|
|
985
|
-
if (Array.isArray(s)) {
|
|
986
|
-
var e = new Set(s.flat(1 / 0).reverse());
|
|
987
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
988
|
-
try {
|
|
989
|
-
for(var _iterator = e[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
990
|
-
var _$s = _step.value;
|
|
991
|
-
i.unshift(c$2(_$s));
|
|
992
|
-
}
|
|
993
|
-
} catch (err) {
|
|
994
|
-
_didIteratorError = true;
|
|
995
|
-
_iteratorError = err;
|
|
996
|
-
} finally{
|
|
997
|
-
try {
|
|
998
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
999
|
-
_iterator.return();
|
|
1000
|
-
}
|
|
1001
|
-
} finally{
|
|
1002
|
-
if (_didIteratorError) {
|
|
1003
|
-
throw _iteratorError;
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
} else void 0 !== s && i.push(c$2(s));
|
|
1008
|
-
return i;
|
|
1009
|
-
}
|
|
1010
|
-
},
|
|
1011
|
-
{
|
|
1012
|
-
key: "_$Eu",
|
|
1013
|
-
value: function _$Eu(t, s) {
|
|
1014
|
-
var i = s.attribute;
|
|
1015
|
-
return false === i ? void 0 : "string" == typeof i ? i : "string" == typeof t ? t.toLowerCase() : void 0;
|
|
1016
|
-
}
|
|
1017
|
-
}
|
|
1018
|
-
]);
|
|
1019
|
-
return y;
|
|
1020
|
-
}(_wrap_native_super(HTMLElement));
|
|
1021
|
-
var _reactiveElementVersions;
|
|
1022
|
-
y$1.elementStyles = [], y$1.shadowRootOptions = {
|
|
1023
|
-
mode: "open"
|
|
1024
|
-
}, y$1[d$1("elementProperties")] = new Map, y$1[d$1("finalized")] = new Map, p$1 === null || p$1 === void 0 ? void 0 : p$1({
|
|
1025
|
-
ReactiveElement: y$1
|
|
1026
|
-
}), ((_reactiveElementVersions = (_a1 = a$1).reactiveElementVersions) !== null && _reactiveElementVersions !== void 0 ? _reactiveElementVersions : _a1.reactiveElementVersions = []).push("2.1.1");
|
|
1027
|
-
|
|
1028
|
-
/**
|
|
1029
|
-
* @license
|
|
1030
|
-
* Copyright 2017 Google LLC
|
|
1031
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1032
|
-
*/ function _array_like_to_array$9(arr, len) {
|
|
1033
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
1034
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
1035
|
-
return arr2;
|
|
1036
|
-
}
|
|
1037
|
-
function _array_with_holes$2(arr) {
|
|
1038
|
-
if (Array.isArray(arr)) return arr;
|
|
1039
|
-
}
|
|
1040
|
-
function _array_without_holes$8(arr) {
|
|
1041
|
-
if (Array.isArray(arr)) return _array_like_to_array$9(arr);
|
|
1042
|
-
}
|
|
1043
|
-
function _assert_this_initialized$1(self) {
|
|
1044
|
-
if (self === void 0) {
|
|
1045
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1046
|
-
}
|
|
1047
|
-
return self;
|
|
1048
|
-
}
|
|
1049
|
-
function _class_call_check$1(instance, Constructor) {
|
|
1050
|
-
if (!(instance instanceof Constructor)) {
|
|
1051
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
function _defineProperties$1(target, props) {
|
|
1055
|
-
for(var i = 0; i < props.length; i++){
|
|
1056
|
-
var descriptor = props[i];
|
|
1057
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
1058
|
-
descriptor.configurable = true;
|
|
1059
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
1060
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1061
|
-
}
|
|
1062
|
-
}
|
|
1063
|
-
function _create_class$1(Constructor, protoProps, staticProps) {
|
|
1064
|
-
if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
|
|
1065
|
-
if (staticProps) _defineProperties$1(Constructor, staticProps);
|
|
1066
|
-
return Constructor;
|
|
1067
|
-
}
|
|
1068
|
-
function _get_prototype_of$1(o) {
|
|
1069
|
-
_get_prototype_of$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
1070
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
1071
|
-
};
|
|
1072
|
-
return _get_prototype_of$1(o);
|
|
1073
|
-
}
|
|
1074
|
-
function _inherits$1(subClass, superClass) {
|
|
1075
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
1076
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
1077
|
-
}
|
|
1078
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
1079
|
-
constructor: {
|
|
1080
|
-
value: subClass,
|
|
1081
|
-
writable: true,
|
|
1082
|
-
configurable: true
|
|
1083
|
-
}
|
|
1084
|
-
});
|
|
1085
|
-
if (superClass) _set_prototype_of$1(subClass, superClass);
|
|
1086
|
-
}
|
|
1087
|
-
function _iterable_to_array$8(iter) {
|
|
1088
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1089
|
-
}
|
|
1090
|
-
function _iterable_to_array_limit$1(arr, i) {
|
|
1091
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1092
|
-
if (_i == null) return;
|
|
1093
|
-
var _arr = [];
|
|
1094
|
-
var _n = true;
|
|
1095
|
-
var _d = false;
|
|
1096
|
-
var _s, _e;
|
|
1097
|
-
try {
|
|
1098
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
1099
|
-
_arr.push(_s.value);
|
|
1100
|
-
if (i && _arr.length === i) break;
|
|
1101
|
-
}
|
|
1102
|
-
} catch (err) {
|
|
1103
|
-
_d = true;
|
|
1104
|
-
_e = err;
|
|
1105
|
-
} finally{
|
|
1106
|
-
try {
|
|
1107
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
1108
|
-
} finally{
|
|
1109
|
-
if (_d) throw _e;
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
return _arr;
|
|
1113
|
-
}
|
|
1114
|
-
function _non_iterable_rest$2() {
|
|
1115
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1116
|
-
}
|
|
1117
|
-
function _non_iterable_spread$8() {
|
|
1118
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1119
|
-
}
|
|
1120
|
-
function _possible_constructor_return$1(self, call) {
|
|
1121
|
-
if (call && (_type_of$4(call) === "object" || typeof call === "function")) {
|
|
1122
|
-
return call;
|
|
1123
|
-
}
|
|
1124
|
-
return _assert_this_initialized$1(self);
|
|
1125
|
-
}
|
|
1126
|
-
function _set_prototype_of$1(o, p) {
|
|
1127
|
-
_set_prototype_of$1 = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
1128
|
-
o.__proto__ = p;
|
|
1129
|
-
return o;
|
|
1130
|
-
};
|
|
1131
|
-
return _set_prototype_of$1(o, p);
|
|
1132
|
-
}
|
|
1133
|
-
function _sliced_to_array$1(arr, i) {
|
|
1134
|
-
return _array_with_holes$2(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$9(arr, i) || _non_iterable_rest$2();
|
|
1135
|
-
}
|
|
1136
|
-
function _to_consumable_array$8(arr) {
|
|
1137
|
-
return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$9(arr) || _non_iterable_spread$8();
|
|
1138
|
-
}
|
|
1139
|
-
function _type_of$4(obj) {
|
|
1140
|
-
"@swc/helpers - typeof";
|
|
1141
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1142
|
-
}
|
|
1143
|
-
function _unsupported_iterable_to_array$9(o, minLen) {
|
|
1144
|
-
if (!o) return;
|
|
1145
|
-
if (typeof o === "string") return _array_like_to_array$9(o, minLen);
|
|
1146
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1147
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1148
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
1149
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$9(o, minLen);
|
|
1150
|
-
}
|
|
1151
|
-
function _is_native_reflect_construct$1() {
|
|
1152
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
1153
|
-
if (Reflect.construct.sham) return false;
|
|
1154
|
-
if (typeof Proxy === "function") return true;
|
|
1155
|
-
try {
|
|
1156
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
1157
|
-
return true;
|
|
1158
|
-
} catch (e) {
|
|
1159
|
-
return false;
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
function _create_super$1(Derived) {
|
|
1163
|
-
var hasNativeReflectConstruct = _is_native_reflect_construct$1();
|
|
1164
|
-
return function _createSuperInternal() {
|
|
1165
|
-
var Super = _get_prototype_of$1(Derived), result;
|
|
1166
|
-
if (hasNativeReflectConstruct) {
|
|
1167
|
-
var NewTarget = _get_prototype_of$1(this).constructor;
|
|
1168
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
1169
|
-
} else {
|
|
1170
|
-
result = Super.apply(this, arguments);
|
|
1171
|
-
}
|
|
1172
|
-
return _possible_constructor_return$1(this, result);
|
|
1173
|
-
};
|
|
1174
|
-
}
|
|
1175
|
-
var _t;
|
|
1176
|
-
var t$1 = globalThis, i$1 = t$1.trustedTypes, s$1 = i$1 ? i$1.createPolicy("lit-html", {
|
|
1177
|
-
createHTML: function(t) {
|
|
1178
|
-
return t;
|
|
1179
|
-
}
|
|
1180
|
-
}) : void 0, e = "$lit$", h = "lit$".concat(Math.random().toFixed(9).slice(2), "$"), o$2 = "?" + h, n$1 = "<".concat(o$2, ">"), r$2 = document, l = function() {
|
|
1181
|
-
return r$2.createComment("");
|
|
1182
|
-
}, c = function(t) {
|
|
1183
|
-
return null === t || "object" != (typeof t === "undefined" ? "undefined" : _type_of$4(t)) && "function" != typeof t;
|
|
1184
|
-
}, a = Array.isArray, u = function(t) {
|
|
1185
|
-
return a(t) || "function" == typeof (t === null || t === void 0 ? void 0 : t[Symbol.iterator]);
|
|
1186
|
-
}, d = "[ \t\n\f\r]", f = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, v = /-->/g, _ = />/g, m = RegExp(">|".concat(d, "(?:([^\\s\"'>=/]+)(").concat(d, "*=").concat(d, "*(?:[^ \n\f\r\"'`<>=]|(\"|')|))|$)"), "g"), p = /'/g, g = /"/g, $ = /^(?:script|style|textarea|title)$/i, y = function(t) {
|
|
1187
|
-
return function(i) {
|
|
1188
|
-
for(var _len = arguments.length, s = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
1189
|
-
s[_key - 1] = arguments[_key];
|
|
1190
|
-
}
|
|
1191
|
-
return {
|
|
1192
|
-
_$litType$: t,
|
|
1193
|
-
strings: i,
|
|
1194
|
-
values: s
|
|
1195
|
-
};
|
|
1196
|
-
};
|
|
1197
|
-
}, x = y(1), T = Symbol.for("lit-noChange"), E = Symbol.for("lit-nothing"), A = new WeakMap, C = r$2.createTreeWalker(r$2, 129);
|
|
1198
|
-
function P(t, i) {
|
|
1199
|
-
if (!a(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
1200
|
-
return void 0 !== s$1 ? s$1.createHTML(i) : i;
|
|
1201
|
-
}
|
|
1202
|
-
var V = function(t, i) {
|
|
1203
|
-
var s = t.length - 1, o = [];
|
|
1204
|
-
var r, l = 2 === i ? "<svg>" : 3 === i ? "<math>" : "", c = f;
|
|
1205
|
-
for(var _$i = 0; _$i < s; _$i++){
|
|
1206
|
-
var s1 = t[_$i];
|
|
1207
|
-
var a = void 0, u = void 0, d = -1, y = 0;
|
|
1208
|
-
for(; y < s1.length && (c.lastIndex = y, u = c.exec(s1), null !== u);)y = c.lastIndex, c === f ? "!--" === u[1] ? c = v : void 0 !== u[1] ? c = _ : void 0 !== u[2] ? ($.test(u[2]) && (r = RegExp("</" + u[2], "g")), c = m) : void 0 !== u[3] && (c = m) : c === m ? ">" === u[0] ? (c = r !== null && r !== void 0 ? r : f, d = -1) : void 0 === u[1] ? d = -2 : (d = c.lastIndex - u[2].length, a = u[1], c = void 0 === u[3] ? m : '"' === u[3] ? g : p) : c === g || c === p ? c = m : c === v || c === _ ? c = f : (c = m, r = void 0);
|
|
1209
|
-
var x = c === m && t[_$i + 1].startsWith("/>") ? " " : "";
|
|
1210
|
-
l += c === f ? s1 + n$1 : d >= 0 ? (o.push(a), s1.slice(0, d) + e + s1.slice(d) + h + x) : s1 + h + (-2 === d ? _$i : x);
|
|
1211
|
-
}
|
|
1212
|
-
return [
|
|
1213
|
-
P(t, l + (t[s] || "<?>") + (2 === i ? "</svg>" : 3 === i ? "</math>" : "")),
|
|
1214
|
-
o
|
|
1215
|
-
];
|
|
1216
|
-
};
|
|
1217
|
-
var N = /*#__PURE__*/ function() {
|
|
1218
|
-
function N(param, n) {
|
|
1219
|
-
var t = param.strings, s = param._$litType$;
|
|
1220
|
-
_class_call_check$1(this, N);
|
|
1221
|
-
var r;
|
|
1222
|
-
this.parts = [];
|
|
1223
|
-
var c = 0, a = 0;
|
|
1224
|
-
var u = t.length - 1, d = this.parts, _V = _sliced_to_array$1(V(t, s), 2), f = _V[0], v = _V[1];
|
|
1225
|
-
if (this.el = N.createElement(f, n), C.currentNode = this.el.content, 2 === s || 3 === s) {
|
|
1226
|
-
var _t;
|
|
1227
|
-
var t1 = this.el.content.firstChild;
|
|
1228
|
-
(_t = t1).replaceWith.apply(_t, _to_consumable_array$8(t1.childNodes));
|
|
1229
|
-
}
|
|
1230
|
-
for(; null !== (r = C.nextNode()) && d.length < u;){
|
|
1231
|
-
if (1 === r.nodeType) {
|
|
1232
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1233
|
-
if (r.hasAttributes()) try {
|
|
1234
|
-
for(var _iterator = r.getAttributeNames()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1235
|
-
var t2 = _step.value;
|
|
1236
|
-
if (t2.endsWith(e)) {
|
|
1237
|
-
var i1 = v[a++], s1 = r.getAttribute(t2).split(h), e1 = /([.?@])?(.*)/.exec(i1);
|
|
1238
|
-
d.push({
|
|
1239
|
-
type: 1,
|
|
1240
|
-
index: c,
|
|
1241
|
-
name: e1[2],
|
|
1242
|
-
strings: s1,
|
|
1243
|
-
ctor: "." === e1[1] ? H : "?" === e1[1] ? I : "@" === e1[1] ? L : k
|
|
1244
|
-
}), r.removeAttribute(t2);
|
|
1245
|
-
} else t2.startsWith(h) && (d.push({
|
|
1246
|
-
type: 6,
|
|
1247
|
-
index: c
|
|
1248
|
-
}), r.removeAttribute(t2));
|
|
1249
|
-
}
|
|
1250
|
-
} catch (err) {
|
|
1251
|
-
_didIteratorError = true;
|
|
1252
|
-
_iteratorError = err;
|
|
1253
|
-
} finally{
|
|
1254
|
-
try {
|
|
1255
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1256
|
-
_iterator.return();
|
|
1257
|
-
}
|
|
1258
|
-
} finally{
|
|
1259
|
-
if (_didIteratorError) {
|
|
1260
|
-
throw _iteratorError;
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
if ($.test(r.tagName)) {
|
|
1265
|
-
var t3 = r.textContent.split(h), s2 = t3.length - 1;
|
|
1266
|
-
if (s2 > 0) {
|
|
1267
|
-
r.textContent = i$1 ? i$1.emptyScript : "";
|
|
1268
|
-
for(var i2 = 0; i2 < s2; i2++)r.append(t3[i2], l()), C.nextNode(), d.push({
|
|
1269
|
-
type: 2,
|
|
1270
|
-
index: ++c
|
|
1271
|
-
});
|
|
1272
|
-
r.append(t3[s2], l());
|
|
1273
|
-
}
|
|
1274
|
-
}
|
|
1275
|
-
} else if (8 === r.nodeType) if (r.data === o$2) d.push({
|
|
1276
|
-
type: 2,
|
|
1277
|
-
index: c
|
|
1278
|
-
});
|
|
1279
|
-
else {
|
|
1280
|
-
var t4 = -1;
|
|
1281
|
-
for(; -1 !== (t4 = r.data.indexOf(h, t4 + 1));)d.push({
|
|
1282
|
-
type: 7,
|
|
1283
|
-
index: c
|
|
1284
|
-
}), t4 += h.length - 1;
|
|
1285
|
-
}
|
|
1286
|
-
c++;
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
_create_class$1(N, null, [
|
|
1290
|
-
{
|
|
1291
|
-
key: "createElement",
|
|
1292
|
-
value: function createElement(t, i) {
|
|
1293
|
-
var s = r$2.createElement("template");
|
|
1294
|
-
return s.innerHTML = t, s;
|
|
1295
|
-
}
|
|
1296
|
-
}
|
|
1297
|
-
]);
|
|
1298
|
-
return N;
|
|
1299
|
-
}();
|
|
1300
|
-
function S(t, i) {
|
|
1301
|
-
var s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : t, e = arguments.length > 3 ? arguments[3] : void 0;
|
|
1302
|
-
var _s__$Co, _h__$AO;
|
|
1303
|
-
var _s;
|
|
1304
|
-
if (i === T) return i;
|
|
1305
|
-
var h = void 0 !== e ? (_s__$Co = s._$Co) === null || _s__$Co === void 0 ? void 0 : _s__$Co[e] : s._$Cl;
|
|
1306
|
-
var o = c(i) ? void 0 : i._$litDirective$;
|
|
1307
|
-
var __$Co;
|
|
1308
|
-
return (h === null || h === void 0 ? void 0 : h.constructor) !== o && (h === null || h === void 0 ? void 0 : (_h__$AO = h._$AO) === null || _h__$AO === void 0 ? void 0 : _h__$AO.call(h, false), void 0 === o ? h = void 0 : (h = new o(t), h._$AT(t, s, e)), void 0 !== e ? ((__$Co = (_s = s)._$Co) !== null && __$Co !== void 0 ? __$Co : _s._$Co = [])[e] = h : s._$Cl = h), void 0 !== h && (i = S(t, h._$AS(t, i.values), h, e)), i;
|
|
1309
|
-
}
|
|
1310
|
-
var M = /*#__PURE__*/ function() {
|
|
1311
|
-
function M(t, i) {
|
|
1312
|
-
_class_call_check$1(this, M);
|
|
1313
|
-
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = i;
|
|
1314
|
-
}
|
|
1315
|
-
_create_class$1(M, [
|
|
1316
|
-
{
|
|
1317
|
-
key: "parentNode",
|
|
1318
|
-
get: function get() {
|
|
1319
|
-
return this._$AM.parentNode;
|
|
1320
|
-
}
|
|
1321
|
-
},
|
|
1322
|
-
{
|
|
1323
|
-
key: "_$AU",
|
|
1324
|
-
get: function get() {
|
|
1325
|
-
return this._$AM._$AU;
|
|
1326
|
-
}
|
|
1327
|
-
},
|
|
1328
|
-
{
|
|
1329
|
-
key: "u",
|
|
1330
|
-
value: function u(t) {
|
|
1331
|
-
var _t_creationScope;
|
|
1332
|
-
var _this__$AD = this._$AD, _this__$AD_el = _this__$AD.el, i = _this__$AD_el.content, s = _this__$AD.parts, e = ((_t_creationScope = t === null || t === void 0 ? void 0 : t.creationScope) !== null && _t_creationScope !== void 0 ? _t_creationScope : r$2).importNode(i, true);
|
|
1333
|
-
C.currentNode = e;
|
|
1334
|
-
var h = C.nextNode(), o = 0, n = 0, l = s[0];
|
|
1335
|
-
for(; void 0 !== l;){
|
|
1336
|
-
if (o === l.index) {
|
|
1337
|
-
var i1 = void 0;
|
|
1338
|
-
2 === l.type ? i1 = new R(h, h.nextSibling, this, t) : 1 === l.type ? i1 = new l.ctor(h, l.name, l.strings, this, t) : 6 === l.type && (i1 = new z(h, this, t)), this._$AV.push(i1), l = s[++n];
|
|
1339
|
-
}
|
|
1340
|
-
o !== (l === null || l === void 0 ? void 0 : l.index) && (h = C.nextNode(), o++);
|
|
1341
|
-
}
|
|
1342
|
-
return C.currentNode = r$2, e;
|
|
1343
|
-
}
|
|
1344
|
-
},
|
|
1345
|
-
{
|
|
1346
|
-
key: "p",
|
|
1347
|
-
value: function p(t) {
|
|
1348
|
-
var i = 0;
|
|
1349
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1350
|
-
try {
|
|
1351
|
-
for(var _iterator = this._$AV[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1352
|
-
var s = _step.value;
|
|
1353
|
-
void 0 !== s && (void 0 !== s.strings ? (s._$AI(t, s, i), i += s.strings.length - 2) : s._$AI(t[i])), i++;
|
|
1354
|
-
}
|
|
1355
|
-
} catch (err) {
|
|
1356
|
-
_didIteratorError = true;
|
|
1357
|
-
_iteratorError = err;
|
|
1358
|
-
} finally{
|
|
1359
|
-
try {
|
|
1360
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1361
|
-
_iterator.return();
|
|
1362
|
-
}
|
|
1363
|
-
} finally{
|
|
1364
|
-
if (_didIteratorError) {
|
|
1365
|
-
throw _iteratorError;
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
}
|
|
1371
|
-
]);
|
|
1372
|
-
return M;
|
|
1373
|
-
}();
|
|
1374
|
-
var R = /*#__PURE__*/ function() {
|
|
1375
|
-
function R(t, i, s, e) {
|
|
1376
|
-
_class_call_check$1(this, R);
|
|
1377
|
-
var _e_isConnected;
|
|
1378
|
-
this.type = 2, this._$AH = E, this._$AN = void 0, this._$AA = t, this._$AB = i, this._$AM = s, this.options = e, this._$Cv = (_e_isConnected = e === null || e === void 0 ? void 0 : e.isConnected) !== null && _e_isConnected !== void 0 ? _e_isConnected : true;
|
|
1379
|
-
}
|
|
1380
|
-
_create_class$1(R, [
|
|
1381
|
-
{
|
|
1382
|
-
key: "_$AU",
|
|
1383
|
-
get: function get() {
|
|
1384
|
-
var _this__$AM;
|
|
1385
|
-
var _this__$AM__$AU;
|
|
1386
|
-
return (_this__$AM__$AU = (_this__$AM = this._$AM) === null || _this__$AM === void 0 ? void 0 : _this__$AM._$AU) !== null && _this__$AM__$AU !== void 0 ? _this__$AM__$AU : this._$Cv;
|
|
1387
|
-
}
|
|
1388
|
-
},
|
|
1389
|
-
{
|
|
1390
|
-
key: "parentNode",
|
|
1391
|
-
get: function get() {
|
|
1392
|
-
var t = this._$AA.parentNode;
|
|
1393
|
-
var i = this._$AM;
|
|
1394
|
-
return void 0 !== i && 11 === (t === null || t === void 0 ? void 0 : t.nodeType) && (t = i.parentNode), t;
|
|
1395
|
-
}
|
|
1396
|
-
},
|
|
1397
|
-
{
|
|
1398
|
-
key: "startNode",
|
|
1399
|
-
get: function get() {
|
|
1400
|
-
return this._$AA;
|
|
1401
|
-
}
|
|
1402
|
-
},
|
|
1403
|
-
{
|
|
1404
|
-
key: "endNode",
|
|
1405
|
-
get: function get() {
|
|
1406
|
-
return this._$AB;
|
|
1407
|
-
}
|
|
1408
|
-
},
|
|
1409
|
-
{
|
|
1410
|
-
key: "_$AI",
|
|
1411
|
-
value: function _$AI(t) {
|
|
1412
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this;
|
|
1413
|
-
t = S(this, t, i), c(t) ? t === E || null == t || "" === t ? (this._$AH !== E && this._$AR(), this._$AH = E) : t !== this._$AH && t !== T && this._(t) : void 0 !== t._$litType$ ? this.$(t) : void 0 !== t.nodeType ? this.T(t) : u(t) ? this.k(t) : this._(t);
|
|
1414
|
-
}
|
|
1415
|
-
},
|
|
1416
|
-
{
|
|
1417
|
-
key: "O",
|
|
1418
|
-
value: function O(t) {
|
|
1419
|
-
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
1420
|
-
}
|
|
1421
|
-
},
|
|
1422
|
-
{
|
|
1423
|
-
key: "T",
|
|
1424
|
-
value: function T(t) {
|
|
1425
|
-
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
1426
|
-
}
|
|
1427
|
-
},
|
|
1428
|
-
{
|
|
1429
|
-
key: "_",
|
|
1430
|
-
value: function _(t) {
|
|
1431
|
-
this._$AH !== E && c(this._$AH) ? this._$AA.nextSibling.data = t : this.T(r$2.createTextNode(t)), this._$AH = t;
|
|
1432
|
-
}
|
|
1433
|
-
},
|
|
1434
|
-
{
|
|
1435
|
-
key: "$",
|
|
1436
|
-
value: function $(t) {
|
|
1437
|
-
var _this__$AH;
|
|
1438
|
-
var i = t.values, s = t._$litType$, e = "number" == typeof s ? this._$AC(t) : (void 0 === s.el && (s.el = N.createElement(P(s.h, s.h[0]), this.options)), s);
|
|
1439
|
-
if (((_this__$AH = this._$AH) === null || _this__$AH === void 0 ? void 0 : _this__$AH._$AD) === e) this._$AH.p(i);
|
|
1440
|
-
else {
|
|
1441
|
-
var _$t = new M(e, this), s1 = _$t.u(this.options);
|
|
1442
|
-
_$t.p(i), this.T(s1), this._$AH = _$t;
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
},
|
|
1446
|
-
{
|
|
1447
|
-
key: "_$AC",
|
|
1448
|
-
value: function _$AC(t) {
|
|
1449
|
-
var i = A.get(t.strings);
|
|
1450
|
-
return void 0 === i && A.set(t.strings, i = new N(t)), i;
|
|
1451
|
-
}
|
|
1452
|
-
},
|
|
1453
|
-
{
|
|
1454
|
-
key: "k",
|
|
1455
|
-
value: function k(t) {
|
|
1456
|
-
a(this._$AH) || (this._$AH = [], this._$AR());
|
|
1457
|
-
var i = this._$AH;
|
|
1458
|
-
var s, e = 0;
|
|
1459
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
1460
|
-
try {
|
|
1461
|
-
for(var _iterator = t[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
1462
|
-
var h = _step.value;
|
|
1463
|
-
e === i.length ? i.push(s = new R(this.O(l()), this.O(l()), this, this.options)) : s = i[e], s._$AI(h), e++;
|
|
1464
|
-
}
|
|
1465
|
-
} catch (err) {
|
|
1466
|
-
_didIteratorError = true;
|
|
1467
|
-
_iteratorError = err;
|
|
1468
|
-
} finally{
|
|
1469
|
-
try {
|
|
1470
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
1471
|
-
_iterator.return();
|
|
1472
|
-
}
|
|
1473
|
-
} finally{
|
|
1474
|
-
if (_didIteratorError) {
|
|
1475
|
-
throw _iteratorError;
|
|
1476
|
-
}
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
e < i.length && (this._$AR(s && s._$AB.nextSibling, e), i.length = e);
|
|
1480
|
-
}
|
|
1481
|
-
},
|
|
1482
|
-
{
|
|
1483
|
-
key: "_$AR",
|
|
1484
|
-
value: function _$AR() {
|
|
1485
|
-
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this._$AA.nextSibling, i = arguments.length > 1 ? arguments[1] : void 0;
|
|
1486
|
-
var _this__$AP, _this;
|
|
1487
|
-
for((_this__$AP = (_this = this)._$AP) === null || _this__$AP === void 0 ? void 0 : _this__$AP.call(_this, false, true, i); t !== this._$AB;){
|
|
1488
|
-
var i1 = t.nextSibling;
|
|
1489
|
-
t.remove(), t = i1;
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1492
|
-
},
|
|
1493
|
-
{
|
|
1494
|
-
key: "setConnected",
|
|
1495
|
-
value: function setConnected(t) {
|
|
1496
|
-
var _this__$AP, _this;
|
|
1497
|
-
void 0 === this._$AM && (this._$Cv = t, (_this__$AP = (_this = this)._$AP) === null || _this__$AP === void 0 ? void 0 : _this__$AP.call(_this, t));
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
]);
|
|
1501
|
-
return R;
|
|
1502
|
-
}();
|
|
1503
|
-
var k = /*#__PURE__*/ function() {
|
|
1504
|
-
function k(t, i, s, e, h) {
|
|
1505
|
-
_class_call_check$1(this, k);
|
|
1506
|
-
this.type = 1, this._$AH = E, this._$AN = void 0, this.element = t, this.name = i, this._$AM = e, this.options = h, s.length > 2 || "" !== s[0] || "" !== s[1] ? (this._$AH = Array(s.length - 1).fill(new String), this.strings = s) : this._$AH = E;
|
|
1507
|
-
}
|
|
1508
|
-
_create_class$1(k, [
|
|
1509
|
-
{
|
|
1510
|
-
key: "tagName",
|
|
1511
|
-
get: function get() {
|
|
1512
|
-
return this.element.tagName;
|
|
1513
|
-
}
|
|
1514
|
-
},
|
|
1515
|
-
{
|
|
1516
|
-
key: "_$AU",
|
|
1517
|
-
get: function get() {
|
|
1518
|
-
return this._$AM._$AU;
|
|
1519
|
-
}
|
|
1520
|
-
},
|
|
1521
|
-
{
|
|
1522
|
-
key: "_$AI",
|
|
1523
|
-
value: function _$AI(t) {
|
|
1524
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this, s = arguments.length > 2 ? arguments[2] : void 0, e = arguments.length > 3 ? arguments[3] : void 0;
|
|
1525
|
-
var h = this.strings;
|
|
1526
|
-
var o = false;
|
|
1527
|
-
if (void 0 === h) t = S(this, t, i, 0), o = !c(t) || t !== this._$AH && t !== T, o && (this._$AH = t);
|
|
1528
|
-
else {
|
|
1529
|
-
var e1 = t;
|
|
1530
|
-
var n, r;
|
|
1531
|
-
for(t = h[0], n = 0; n < h.length - 1; n++)r = S(this, e1[s + n], i, n), r === T && (r = this._$AH[n]), o || (o = !c(r) || r !== this._$AH[n]), r === E ? t = E : t !== E && (t += (r !== null && r !== void 0 ? r : "") + h[n + 1]), this._$AH[n] = r;
|
|
1532
|
-
}
|
|
1533
|
-
o && !e && this.j(t);
|
|
1534
|
-
}
|
|
1535
|
-
},
|
|
1536
|
-
{
|
|
1537
|
-
key: "j",
|
|
1538
|
-
value: function j(t) {
|
|
1539
|
-
t === E ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t !== null && t !== void 0 ? t : "");
|
|
1540
|
-
}
|
|
1541
|
-
}
|
|
1542
|
-
]);
|
|
1543
|
-
return k;
|
|
1544
|
-
}();
|
|
1545
|
-
var H = /*#__PURE__*/ function(k) {
|
|
1546
|
-
_inherits$1(H, k);
|
|
1547
|
-
var _super = _create_super$1(H);
|
|
1548
|
-
function H() {
|
|
1549
|
-
_class_call_check$1(this, H);
|
|
1550
|
-
var _this;
|
|
1551
|
-
_this = _super.call.apply(_super, [
|
|
1552
|
-
this
|
|
1553
|
-
].concat(Array.prototype.slice.call(arguments))), _this.type = 3;
|
|
1554
|
-
return _possible_constructor_return$1(_this);
|
|
1555
|
-
}
|
|
1556
|
-
_create_class$1(H, [
|
|
1557
|
-
{
|
|
1558
|
-
key: "j",
|
|
1559
|
-
value: function j(t) {
|
|
1560
|
-
this.element[this.name] = t === E ? void 0 : t;
|
|
1561
|
-
}
|
|
1562
|
-
}
|
|
1563
|
-
]);
|
|
1564
|
-
return H;
|
|
1565
|
-
}(k);
|
|
1566
|
-
var I = /*#__PURE__*/ function(k) {
|
|
1567
|
-
_inherits$1(I, k);
|
|
1568
|
-
var _super = _create_super$1(I);
|
|
1569
|
-
function I() {
|
|
1570
|
-
_class_call_check$1(this, I);
|
|
1571
|
-
var _this;
|
|
1572
|
-
_this = _super.call.apply(_super, [
|
|
1573
|
-
this
|
|
1574
|
-
].concat(Array.prototype.slice.call(arguments))), _this.type = 4;
|
|
1575
|
-
return _possible_constructor_return$1(_this);
|
|
1576
|
-
}
|
|
1577
|
-
_create_class$1(I, [
|
|
1578
|
-
{
|
|
1579
|
-
key: "j",
|
|
1580
|
-
value: function j(t) {
|
|
1581
|
-
this.element.toggleAttribute(this.name, !!t && t !== E);
|
|
1582
|
-
}
|
|
1583
|
-
}
|
|
1584
|
-
]);
|
|
1585
|
-
return I;
|
|
1586
|
-
}(k);
|
|
1587
|
-
var L = /*#__PURE__*/ function(k) {
|
|
1588
|
-
_inherits$1(L, k);
|
|
1589
|
-
var _super = _create_super$1(L);
|
|
1590
|
-
function L(t, i, s, e, h) {
|
|
1591
|
-
_class_call_check$1(this, L);
|
|
1592
|
-
var _this;
|
|
1593
|
-
_this = _super.call(this, t, i, s, e, h), _this.type = 5;
|
|
1594
|
-
return _possible_constructor_return$1(_this);
|
|
1595
|
-
}
|
|
1596
|
-
_create_class$1(L, [
|
|
1597
|
-
{
|
|
1598
|
-
key: "_$AI",
|
|
1599
|
-
value: function _$AI(t) {
|
|
1600
|
-
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this;
|
|
1601
|
-
var _S;
|
|
1602
|
-
if ((t = (_S = S(this, t, i, 0)) !== null && _S !== void 0 ? _S : E) === T) return;
|
|
1603
|
-
var s = this._$AH, e = t === E && s !== E || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, h = t !== E && (s === E || e);
|
|
1604
|
-
e && this.element.removeEventListener(this.name, this, s), h && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
1605
|
-
}
|
|
1606
|
-
},
|
|
1607
|
-
{
|
|
1608
|
-
key: "handleEvent",
|
|
1609
|
-
value: function handleEvent(t) {
|
|
1610
|
-
var _this_options;
|
|
1611
|
-
var _this_options_host;
|
|
1612
|
-
"function" == typeof this._$AH ? this._$AH.call((_this_options_host = (_this_options = this.options) === null || _this_options === void 0 ? void 0 : _this_options.host) !== null && _this_options_host !== void 0 ? _this_options_host : this.element, t) : this._$AH.handleEvent(t);
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
|
-
]);
|
|
1616
|
-
return L;
|
|
1617
|
-
}(k);
|
|
1618
|
-
var z = /*#__PURE__*/ function() {
|
|
1619
|
-
function z(t, i, s) {
|
|
1620
|
-
_class_call_check$1(this, z);
|
|
1621
|
-
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = i, this.options = s;
|
|
1622
|
-
}
|
|
1623
|
-
_create_class$1(z, [
|
|
1624
|
-
{
|
|
1625
|
-
key: "_$AU",
|
|
1626
|
-
get: function get() {
|
|
1627
|
-
return this._$AM._$AU;
|
|
1628
|
-
}
|
|
1629
|
-
},
|
|
1630
|
-
{
|
|
1631
|
-
key: "_$AI",
|
|
1632
|
-
value: function _$AI(t) {
|
|
1633
|
-
S(this, t);
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
]);
|
|
1637
|
-
return z;
|
|
1638
|
-
}();
|
|
1639
|
-
var j = t$1.litHtmlPolyfillSupport;
|
|
1640
|
-
var _litHtmlVersions;
|
|
1641
|
-
j === null || j === void 0 ? void 0 : j(N, R), ((_litHtmlVersions = (_t = t$1).litHtmlVersions) !== null && _litHtmlVersions !== void 0 ? _litHtmlVersions : _t.litHtmlVersions = []).push("3.3.1");
|
|
1642
|
-
var B = function(t, i, s) {
|
|
1643
|
-
var _s_renderBefore;
|
|
1644
|
-
var e = (_s_renderBefore = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore !== void 0 ? _s_renderBefore : i;
|
|
1645
|
-
var h = e._$litPart$;
|
|
1646
|
-
if (void 0 === h) {
|
|
1647
|
-
var _s_renderBefore1;
|
|
1648
|
-
var _$t = (_s_renderBefore1 = s === null || s === void 0 ? void 0 : s.renderBefore) !== null && _s_renderBefore1 !== void 0 ? _s_renderBefore1 : null;
|
|
1649
|
-
e._$litPart$ = h = new R(i.insertBefore(l(), _$t), _$t, void 0, s !== null && s !== void 0 ? s : {});
|
|
1650
|
-
}
|
|
1651
|
-
return h._$AI(t), h;
|
|
1652
|
-
};
|
|
1653
|
-
|
|
1654
|
-
function _assert_this_initialized(self) {
|
|
1655
|
-
if (self === void 0) {
|
|
1656
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
1657
|
-
}
|
|
1658
|
-
return self;
|
|
1659
|
-
}
|
|
1660
|
-
function _class_call_check(instance, Constructor) {
|
|
1661
|
-
if (!(instance instanceof Constructor)) {
|
|
1662
|
-
throw new TypeError("Cannot call a class as a function");
|
|
1663
|
-
}
|
|
1664
|
-
}
|
|
1665
|
-
function _defineProperties(target, props) {
|
|
1666
|
-
for(var i = 0; i < props.length; i++){
|
|
1667
|
-
var descriptor = props[i];
|
|
1668
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
1669
|
-
descriptor.configurable = true;
|
|
1670
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
1671
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
1672
|
-
}
|
|
1673
|
-
}
|
|
1674
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
1675
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
1676
|
-
return Constructor;
|
|
1677
|
-
}
|
|
1678
|
-
function _get(target, property, receiver) {
|
|
1679
|
-
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
1680
|
-
_get = Reflect.get;
|
|
1681
|
-
} else {
|
|
1682
|
-
_get = function get(target, property, receiver) {
|
|
1683
|
-
var base = _super_prop_base(target, property);
|
|
1684
|
-
if (!base) return;
|
|
1685
|
-
var desc = Object.getOwnPropertyDescriptor(base, property);
|
|
1686
|
-
if (desc.get) {
|
|
1687
|
-
return desc.get.call(receiver || target);
|
|
1688
|
-
}
|
|
1689
|
-
return desc.value;
|
|
1690
|
-
};
|
|
1691
|
-
}
|
|
1692
|
-
return _get(target, property, receiver || target);
|
|
1693
|
-
}
|
|
1694
|
-
function _get_prototype_of(o) {
|
|
1695
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
1696
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
1697
|
-
};
|
|
1698
|
-
return _get_prototype_of(o);
|
|
1699
|
-
}
|
|
1700
|
-
function _inherits(subClass, superClass) {
|
|
1701
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
1702
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
1703
|
-
}
|
|
1704
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
1705
|
-
constructor: {
|
|
1706
|
-
value: subClass,
|
|
1707
|
-
writable: true,
|
|
1708
|
-
configurable: true
|
|
1709
|
-
}
|
|
1710
|
-
});
|
|
1711
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
1712
|
-
}
|
|
1713
|
-
function _possible_constructor_return(self, call) {
|
|
1714
|
-
if (call && (_type_of$3(call) === "object" || typeof call === "function")) {
|
|
1715
|
-
return call;
|
|
1716
|
-
}
|
|
1717
|
-
return _assert_this_initialized(self);
|
|
1718
|
-
}
|
|
1719
|
-
function _set_prototype_of(o, p) {
|
|
1720
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
1721
|
-
o.__proto__ = p;
|
|
1722
|
-
return o;
|
|
1723
|
-
};
|
|
1724
|
-
return _set_prototype_of(o, p);
|
|
1725
|
-
}
|
|
1726
|
-
function _super_prop_base(object, property) {
|
|
1727
|
-
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
1728
|
-
object = _get_prototype_of(object);
|
|
1729
|
-
if (object === null) break;
|
|
1730
|
-
}
|
|
1731
|
-
return object;
|
|
1732
|
-
}
|
|
1733
|
-
function _type_of$3(obj) {
|
|
1734
|
-
"@swc/helpers - typeof";
|
|
1735
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1736
|
-
}
|
|
1737
|
-
function _is_native_reflect_construct() {
|
|
1738
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
1739
|
-
if (Reflect.construct.sham) return false;
|
|
1740
|
-
if (typeof Proxy === "function") return true;
|
|
1741
|
-
try {
|
|
1742
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
|
|
1743
|
-
return true;
|
|
1744
|
-
} catch (e) {
|
|
1745
|
-
return false;
|
|
1746
|
-
}
|
|
1747
|
-
}
|
|
1748
|
-
function _create_super(Derived) {
|
|
1749
|
-
var hasNativeReflectConstruct = _is_native_reflect_construct();
|
|
1750
|
-
return function _createSuperInternal() {
|
|
1751
|
-
var Super = _get_prototype_of(Derived), result;
|
|
1752
|
-
if (hasNativeReflectConstruct) {
|
|
1753
|
-
var NewTarget = _get_prototype_of(this).constructor;
|
|
1754
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
1755
|
-
} else {
|
|
1756
|
-
result = Super.apply(this, arguments);
|
|
1757
|
-
}
|
|
1758
|
-
return _possible_constructor_return(this, result);
|
|
1759
|
-
};
|
|
1760
|
-
}
|
|
1761
|
-
var _s_litElementHydrateSupport;
|
|
1762
|
-
var _s;
|
|
1763
|
-
/**
|
|
1764
|
-
* @license
|
|
1765
|
-
* Copyright 2017 Google LLC
|
|
1766
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1767
|
-
*/ var s = globalThis;
|
|
1768
|
-
var i = /*#__PURE__*/ function(t) {
|
|
1769
|
-
_inherits(i, t);
|
|
1770
|
-
var _super = _create_super(i);
|
|
1771
|
-
function i() {
|
|
1772
|
-
_class_call_check(this, i);
|
|
1773
|
-
var _this;
|
|
1774
|
-
_this = _super.call.apply(_super, [
|
|
1775
|
-
this
|
|
1776
|
-
].concat(Array.prototype.slice.call(arguments))), _this.renderOptions = {
|
|
1777
|
-
host: _assert_this_initialized(_this)
|
|
1778
|
-
}, _this._$Do = void 0;
|
|
1779
|
-
return _possible_constructor_return(_this);
|
|
1780
|
-
}
|
|
1781
|
-
_create_class(i, [
|
|
1782
|
-
{
|
|
1783
|
-
key: "createRenderRoot",
|
|
1784
|
-
value: function createRenderRoot() {
|
|
1785
|
-
var _this_renderOptions;
|
|
1786
|
-
var _$t = _get(_get_prototype_of(i.prototype), "createRenderRoot", this).call(this);
|
|
1787
|
-
var _renderBefore;
|
|
1788
|
-
return (_renderBefore = (_this_renderOptions = this.renderOptions).renderBefore) !== null && _renderBefore !== void 0 ? _renderBefore : _this_renderOptions.renderBefore = _$t.firstChild, _$t;
|
|
1789
|
-
}
|
|
1790
|
-
},
|
|
1791
|
-
{
|
|
1792
|
-
key: "update",
|
|
1793
|
-
value: function update(t) {
|
|
1794
|
-
var r = this.render();
|
|
1795
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), _get(_get_prototype_of(i.prototype), "update", this).call(this, t), this._$Do = B(r, this.renderRoot, this.renderOptions);
|
|
1796
|
-
}
|
|
1797
|
-
},
|
|
1798
|
-
{
|
|
1799
|
-
key: "connectedCallback",
|
|
1800
|
-
value: function connectedCallback() {
|
|
1801
|
-
var _this__$Do;
|
|
1802
|
-
_get(_get_prototype_of(i.prototype), "connectedCallback", this).call(this), (_this__$Do = this._$Do) === null || _this__$Do === void 0 ? void 0 : _this__$Do.setConnected(true);
|
|
1803
|
-
}
|
|
1804
|
-
},
|
|
1805
|
-
{
|
|
1806
|
-
key: "disconnectedCallback",
|
|
1807
|
-
value: function disconnectedCallback() {
|
|
1808
|
-
var _this__$Do;
|
|
1809
|
-
_get(_get_prototype_of(i.prototype), "disconnectedCallback", this).call(this), (_this__$Do = this._$Do) === null || _this__$Do === void 0 ? void 0 : _this__$Do.setConnected(false);
|
|
1810
|
-
}
|
|
1811
|
-
},
|
|
1812
|
-
{
|
|
1813
|
-
key: "render",
|
|
1814
|
-
value: function render() {
|
|
1815
|
-
return T;
|
|
1816
|
-
}
|
|
1817
|
-
}
|
|
1818
|
-
]);
|
|
1819
|
-
return i;
|
|
1820
|
-
}(y$1);
|
|
1821
|
-
i._$litElement$ = true, i["finalized"] = true, (_s_litElementHydrateSupport = s.litElementHydrateSupport) === null || _s_litElementHydrateSupport === void 0 ? void 0 : _s_litElementHydrateSupport.call(s, {
|
|
1822
|
-
LitElement: i
|
|
1823
|
-
});
|
|
1824
|
-
var o$1 = s.litElementPolyfillSupport;
|
|
1825
|
-
o$1 === null || o$1 === void 0 ? void 0 : o$1({
|
|
1826
|
-
LitElement: i
|
|
1827
|
-
});
|
|
1828
|
-
var _litElementVersions;
|
|
1829
|
-
((_litElementVersions = (_s = s).litElementVersions) !== null && _litElementVersions !== void 0 ? _litElementVersions : _s.litElementVersions = []).push("4.2.1");
|
|
1830
|
-
|
|
1831
|
-
/**
|
|
1832
|
-
* @license
|
|
1833
|
-
* Copyright 2017 Google LLC
|
|
1834
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1835
|
-
*/ var t = function(t) {
|
|
1836
|
-
return function(e, o) {
|
|
1837
|
-
void 0 !== o ? o.addInitializer(function() {
|
|
1838
|
-
customElements.define(t, e);
|
|
1839
|
-
}) : customElements.define(t, e);
|
|
1840
|
-
};
|
|
1841
|
-
};
|
|
1842
|
-
|
|
1843
|
-
function _type_of$2(obj) {
|
|
1844
|
-
"@swc/helpers - typeof";
|
|
1845
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
1846
|
-
}
|
|
1847
|
-
/**
|
|
1848
|
-
* @license
|
|
1849
|
-
* Copyright 2017 Google LLC
|
|
1850
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1851
|
-
*/ var o = {
|
|
1852
|
-
attribute: true,
|
|
1853
|
-
type: String,
|
|
1854
|
-
converter: u$1,
|
|
1855
|
-
reflect: false,
|
|
1856
|
-
hasChanged: f$1
|
|
1857
|
-
}, r$1 = function() {
|
|
1858
|
-
var _$t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : o, _$e = arguments.length > 1 ? arguments[1] : void 0, r = arguments.length > 2 ? arguments[2] : void 0;
|
|
1859
|
-
var n = r.kind, i = r.metadata;
|
|
1860
|
-
var s = globalThis.litPropertyMetadata.get(i);
|
|
1861
|
-
if (void 0 === s && globalThis.litPropertyMetadata.set(i, s = new Map), "setter" === n && ((_$t = Object.create(_$t)).wrapped = true), s.set(r.name, _$t), "accessor" === n) {
|
|
1862
|
-
var o1 = r.name;
|
|
1863
|
-
return {
|
|
1864
|
-
set: function set(r) {
|
|
1865
|
-
var n = _$e.get.call(this);
|
|
1866
|
-
_$e.set.call(this, r), this.requestUpdate(o1, n, _$t);
|
|
1867
|
-
},
|
|
1868
|
-
init: function init(e) {
|
|
1869
|
-
return void 0 !== e && this.C(o1, void 0, _$t, e), e;
|
|
1870
|
-
}
|
|
1871
|
-
};
|
|
1872
|
-
}
|
|
1873
|
-
if ("setter" === n) {
|
|
1874
|
-
var o2 = r.name;
|
|
1875
|
-
return function r(r) {
|
|
1876
|
-
var n = this[o2];
|
|
1877
|
-
_$e.call(this, r), this.requestUpdate(o2, n, _$t);
|
|
1878
|
-
};
|
|
1879
|
-
}
|
|
1880
|
-
throw Error("Unsupported decorator location: " + n);
|
|
1881
|
-
};
|
|
1882
|
-
function n(t) {
|
|
1883
|
-
return function(e, o) {
|
|
1884
|
-
return "object" == (typeof o === "undefined" ? "undefined" : _type_of$2(o)) ? r$1(t, e, o) : function(t, e, o) {
|
|
1885
|
-
var r = e.hasOwnProperty(o);
|
|
1886
|
-
return e.constructor.createProperty(o, t), r ? Object.getOwnPropertyDescriptor(e, o) : void 0;
|
|
1887
|
-
}(t, e, o);
|
|
1888
|
-
};
|
|
1889
|
-
}
|
|
3
|
+
var lit = require('lit');
|
|
4
|
+
var decorators_js = require('lit/decorators.js');
|
|
5
|
+
var getCssSelectorOrigin = require('css-selector-generator');
|
|
1890
6
|
|
|
1891
|
-
function
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
configurable: true,
|
|
1897
|
-
writable: true
|
|
1898
|
-
});
|
|
1899
|
-
} else {
|
|
1900
|
-
obj[key] = value;
|
|
1901
|
-
}
|
|
1902
|
-
return obj;
|
|
1903
|
-
}
|
|
1904
|
-
function _object_spread(target) {
|
|
1905
|
-
for(var i = 1; i < arguments.length; i++){
|
|
1906
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
1907
|
-
var ownKeys = Object.keys(source);
|
|
1908
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
1909
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
1910
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
1911
|
-
}));
|
|
1912
|
-
}
|
|
1913
|
-
ownKeys.forEach(function(key) {
|
|
1914
|
-
_define_property$1(target, key, source[key]);
|
|
1915
|
-
});
|
|
1916
|
-
}
|
|
1917
|
-
return target;
|
|
1918
|
-
}
|
|
1919
|
-
function ownKeys(object, enumerableOnly) {
|
|
1920
|
-
var keys = Object.keys(object);
|
|
1921
|
-
if (Object.getOwnPropertySymbols) {
|
|
1922
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
1923
|
-
keys.push.apply(keys, symbols);
|
|
1924
|
-
}
|
|
1925
|
-
return keys;
|
|
1926
|
-
}
|
|
1927
|
-
function _object_spread_props(target, source) {
|
|
1928
|
-
source = source != null ? source : {};
|
|
1929
|
-
if (Object.getOwnPropertyDescriptors) {
|
|
1930
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1931
|
-
} else {
|
|
1932
|
-
ownKeys(Object(source)).forEach(function(key) {
|
|
1933
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1934
|
-
});
|
|
1935
|
-
}
|
|
1936
|
-
return target;
|
|
7
|
+
function __decorate(decorators, target, key, desc) {
|
|
8
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
10
|
+
else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
11
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
1937
12
|
}
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
* Copyright 2017 Google LLC
|
|
1941
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1942
|
-
*/ function r(r) {
|
|
1943
|
-
return n(_object_spread_props(_object_spread({}, r), {
|
|
1944
|
-
state: true,
|
|
1945
|
-
attribute: false
|
|
1946
|
-
}));
|
|
13
|
+
function __metadata(metadataKey, metadataValue) {
|
|
14
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
1947
15
|
}
|
|
16
|
+
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
17
|
+
var e = new Error(message);
|
|
18
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
19
|
+
};
|
|
1948
20
|
|
|
1949
|
-
class InputFileElement extends
|
|
21
|
+
class InputFileElement extends lit.LitElement {
|
|
1950
22
|
get content() {
|
|
1951
23
|
return this._content;
|
|
1952
24
|
}
|
|
@@ -1954,7 +26,7 @@ class InputFileElement extends i {
|
|
|
1954
26
|
return this._value;
|
|
1955
27
|
}
|
|
1956
28
|
static{
|
|
1957
|
-
this.styles =
|
|
29
|
+
this.styles = lit.css`
|
|
1958
30
|
.download {
|
|
1959
31
|
padding: 10px 15px;
|
|
1960
32
|
margin-bottom: 10px;
|
|
@@ -2013,7 +85,7 @@ class InputFileElement extends i {
|
|
|
2013
85
|
input.click();
|
|
2014
86
|
}
|
|
2015
87
|
render() {
|
|
2016
|
-
return
|
|
88
|
+
return lit.html`
|
|
2017
89
|
<section
|
|
2018
90
|
class="download ${this.state}"
|
|
2019
91
|
@click=${()=>[
|
|
@@ -2021,8 +93,8 @@ class InputFileElement extends i {
|
|
|
2021
93
|
'loaded'
|
|
2022
94
|
].indexOf(this.state) >= 0 ? this.loadFile() : void 0}
|
|
2023
95
|
>
|
|
2024
|
-
${this.state === 'loaded' ?
|
|
2025
|
-
<p>${this.label}<br />${this._content}</p>` :
|
|
96
|
+
${this.state === 'loaded' ? lit.html` <ui5-icon name="attachment"></ui5-icon>
|
|
97
|
+
<p>${this.label}<br />${this._content}</p>` : lit.html` <ui5-icon name="add-document"></ui5-icon>
|
|
2026
98
|
<p>${this.label}</p>`}
|
|
2027
99
|
</section>
|
|
2028
100
|
`;
|
|
@@ -2039,28 +111,28 @@ class InputFileElement extends i {
|
|
|
2039
111
|
}
|
|
2040
112
|
}
|
|
2041
113
|
__decorate([
|
|
2042
|
-
|
|
114
|
+
decorators_js.property()
|
|
2043
115
|
], InputFileElement.prototype, "label", void 0);
|
|
2044
116
|
__decorate([
|
|
2045
|
-
|
|
117
|
+
decorators_js.property()
|
|
2046
118
|
], InputFileElement.prototype, "accept", void 0);
|
|
2047
119
|
__decorate([
|
|
2048
|
-
|
|
120
|
+
decorators_js.property()
|
|
2049
121
|
], InputFileElement.prototype, "multiple", void 0);
|
|
2050
122
|
__decorate([
|
|
2051
|
-
|
|
123
|
+
decorators_js.property()
|
|
2052
124
|
], InputFileElement.prototype, "required", void 0);
|
|
2053
125
|
__decorate([
|
|
2054
|
-
|
|
126
|
+
decorators_js.state()
|
|
2055
127
|
], InputFileElement.prototype, "state", void 0);
|
|
2056
128
|
__decorate([
|
|
2057
|
-
|
|
129
|
+
decorators_js.state()
|
|
2058
130
|
], InputFileElement.prototype, "_content", void 0);
|
|
2059
131
|
InputFileElement = __decorate([
|
|
2060
|
-
|
|
132
|
+
decorators_js.customElement('digipair-input-file')
|
|
2061
133
|
], InputFileElement);
|
|
2062
134
|
|
|
2063
|
-
class InputJsonElement extends
|
|
135
|
+
class InputJsonElement extends lit.LitElement {
|
|
2064
136
|
get content() {
|
|
2065
137
|
return this._content;
|
|
2066
138
|
}
|
|
@@ -2068,7 +140,7 @@ class InputJsonElement extends i {
|
|
|
2068
140
|
return this._value;
|
|
2069
141
|
}
|
|
2070
142
|
static{
|
|
2071
|
-
this.styles =
|
|
143
|
+
this.styles = lit.css`
|
|
2072
144
|
.download {
|
|
2073
145
|
padding: 10px 15px;
|
|
2074
146
|
margin-bottom: 10px;
|
|
@@ -2127,7 +199,7 @@ class InputJsonElement extends i {
|
|
|
2127
199
|
input.click();
|
|
2128
200
|
}
|
|
2129
201
|
render() {
|
|
2130
|
-
return
|
|
202
|
+
return lit.html`
|
|
2131
203
|
<section
|
|
2132
204
|
class="download ${this.state}"
|
|
2133
205
|
@click=${()=>[
|
|
@@ -2135,8 +207,8 @@ class InputJsonElement extends i {
|
|
|
2135
207
|
'loaded'
|
|
2136
208
|
].indexOf(this.state) >= 0 ? this.loadFile() : void 0}
|
|
2137
209
|
>
|
|
2138
|
-
${this.state === 'loaded' ?
|
|
2139
|
-
<p>${this.label}<br />${this._content}</p>` :
|
|
210
|
+
${this.state === 'loaded' ? lit.html` <ui5-icon name="attachment"></ui5-icon>
|
|
211
|
+
<p>${this.label}<br />${this._content}</p>` : lit.html` <ui5-icon name="add-document"></ui5-icon>
|
|
2140
212
|
<p>${this.label}</p>`}
|
|
2141
213
|
</section>
|
|
2142
214
|
`;
|
|
@@ -2153,28 +225,28 @@ class InputJsonElement extends i {
|
|
|
2153
225
|
}
|
|
2154
226
|
}
|
|
2155
227
|
__decorate([
|
|
2156
|
-
|
|
228
|
+
decorators_js.property()
|
|
2157
229
|
], InputJsonElement.prototype, "label", void 0);
|
|
2158
230
|
__decorate([
|
|
2159
|
-
|
|
231
|
+
decorators_js.property()
|
|
2160
232
|
], InputJsonElement.prototype, "accept", void 0);
|
|
2161
233
|
__decorate([
|
|
2162
|
-
|
|
234
|
+
decorators_js.property()
|
|
2163
235
|
], InputJsonElement.prototype, "multiple", void 0);
|
|
2164
236
|
__decorate([
|
|
2165
|
-
|
|
237
|
+
decorators_js.property()
|
|
2166
238
|
], InputJsonElement.prototype, "required", void 0);
|
|
2167
239
|
__decorate([
|
|
2168
|
-
|
|
240
|
+
decorators_js.state()
|
|
2169
241
|
], InputJsonElement.prototype, "state", void 0);
|
|
2170
242
|
__decorate([
|
|
2171
|
-
|
|
243
|
+
decorators_js.state()
|
|
2172
244
|
], InputJsonElement.prototype, "_content", void 0);
|
|
2173
245
|
InputJsonElement = __decorate([
|
|
2174
|
-
|
|
246
|
+
decorators_js.customElement('digipair-input-json')
|
|
2175
247
|
], InputJsonElement);
|
|
2176
248
|
|
|
2177
|
-
class InputTextElement extends
|
|
249
|
+
class InputTextElement extends lit.LitElement {
|
|
2178
250
|
get content() {
|
|
2179
251
|
return this._content;
|
|
2180
252
|
}
|
|
@@ -2182,7 +254,7 @@ class InputTextElement extends i {
|
|
|
2182
254
|
return this._value;
|
|
2183
255
|
}
|
|
2184
256
|
static{
|
|
2185
|
-
this.styles =
|
|
257
|
+
this.styles = lit.css`
|
|
2186
258
|
.download {
|
|
2187
259
|
padding: 10px 15px;
|
|
2188
260
|
margin-bottom: 10px;
|
|
@@ -2241,7 +313,7 @@ class InputTextElement extends i {
|
|
|
2241
313
|
input.click();
|
|
2242
314
|
}
|
|
2243
315
|
render() {
|
|
2244
|
-
return
|
|
316
|
+
return lit.html`
|
|
2245
317
|
<section
|
|
2246
318
|
class="download ${this.state}"
|
|
2247
319
|
@click=${()=>[
|
|
@@ -2249,8 +321,8 @@ class InputTextElement extends i {
|
|
|
2249
321
|
'loaded'
|
|
2250
322
|
].indexOf(this.state) >= 0 ? this.loadFile() : void 0}
|
|
2251
323
|
>
|
|
2252
|
-
${this.state === 'loaded' ?
|
|
2253
|
-
<p>${this.label}<br />${this._content}</p>` :
|
|
324
|
+
${this.state === 'loaded' ? lit.html` <ui5-icon name="attachment"></ui5-icon>
|
|
325
|
+
<p>${this.label}<br />${this._content}</p>` : lit.html` <ui5-icon name="add-document"></ui5-icon>
|
|
2254
326
|
<p>${this.label}</p>`}
|
|
2255
327
|
</section>
|
|
2256
328
|
`;
|
|
@@ -2267,28 +339,28 @@ class InputTextElement extends i {
|
|
|
2267
339
|
}
|
|
2268
340
|
}
|
|
2269
341
|
__decorate([
|
|
2270
|
-
|
|
342
|
+
decorators_js.property()
|
|
2271
343
|
], InputTextElement.prototype, "label", void 0);
|
|
2272
344
|
__decorate([
|
|
2273
|
-
|
|
345
|
+
decorators_js.property()
|
|
2274
346
|
], InputTextElement.prototype, "accept", void 0);
|
|
2275
347
|
__decorate([
|
|
2276
|
-
|
|
348
|
+
decorators_js.property()
|
|
2277
349
|
], InputTextElement.prototype, "multiple", void 0);
|
|
2278
350
|
__decorate([
|
|
2279
|
-
|
|
351
|
+
decorators_js.property()
|
|
2280
352
|
], InputTextElement.prototype, "required", void 0);
|
|
2281
353
|
__decorate([
|
|
2282
|
-
|
|
354
|
+
decorators_js.state()
|
|
2283
355
|
], InputTextElement.prototype, "state", void 0);
|
|
2284
356
|
__decorate([
|
|
2285
|
-
|
|
357
|
+
decorators_js.state()
|
|
2286
358
|
], InputTextElement.prototype, "_content", void 0);
|
|
2287
359
|
InputTextElement = __decorate([
|
|
2288
|
-
|
|
360
|
+
decorators_js.customElement('digipair-input-text')
|
|
2289
361
|
], InputTextElement);
|
|
2290
362
|
|
|
2291
|
-
class DomAttributeElement extends
|
|
363
|
+
class DomAttributeElement extends lit.LitElement {
|
|
2292
364
|
get value() {
|
|
2293
365
|
return this._value;
|
|
2294
366
|
}
|
|
@@ -2315,7 +387,7 @@ class DomAttributeElement extends i {
|
|
|
2315
387
|
}
|
|
2316
388
|
}
|
|
2317
389
|
render() {
|
|
2318
|
-
return
|
|
390
|
+
return lit.html``;
|
|
2319
391
|
}
|
|
2320
392
|
constructor(...args){
|
|
2321
393
|
super(...args);
|
|
@@ -2325,1334 +397,27 @@ class DomAttributeElement extends i {
|
|
|
2325
397
|
}
|
|
2326
398
|
}
|
|
2327
399
|
__decorate([
|
|
2328
|
-
|
|
400
|
+
decorators_js.property()
|
|
2329
401
|
], DomAttributeElement.prototype, "selector", void 0);
|
|
2330
402
|
__decorate([
|
|
2331
|
-
|
|
403
|
+
decorators_js.property()
|
|
2332
404
|
], DomAttributeElement.prototype, "attribute", void 0);
|
|
2333
405
|
__decorate([
|
|
2334
|
-
|
|
406
|
+
decorators_js.property()
|
|
2335
407
|
], DomAttributeElement.prototype, "required", void 0);
|
|
2336
408
|
DomAttributeElement = __decorate([
|
|
2337
|
-
|
|
409
|
+
decorators_js.customElement('digipair-input-dom-attribute')
|
|
2338
410
|
], DomAttributeElement);
|
|
2339
411
|
|
|
2340
|
-
/**
|
|
2341
|
-
* Guard function that checks if provided `input` is an Element.
|
|
2342
|
-
*/ function _type_of$1(obj) {
|
|
2343
|
-
"@swc/helpers - typeof";
|
|
2344
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
2345
|
-
}
|
|
2346
|
-
function isElement(input) {
|
|
2347
|
-
return (typeof input === "undefined" ? "undefined" : _type_of$1(input)) === "object" && input !== null && input.nodeType === Node.ELEMENT_NODE;
|
|
2348
|
-
}
|
|
2349
|
-
|
|
2350
|
-
var OPERATOR = {
|
|
2351
|
-
NONE: "",
|
|
2352
|
-
DESCENDANT: " ",
|
|
2353
|
-
CHILD: " > "
|
|
2354
|
-
};
|
|
2355
|
-
var CSS_SELECTOR_TYPE = {
|
|
2356
|
-
id: "id",
|
|
2357
|
-
class: "class",
|
|
2358
|
-
tag: "tag",
|
|
2359
|
-
attribute: "attribute",
|
|
2360
|
-
nthchild: "nthchild",
|
|
2361
|
-
nthoftype: "nthoftype"
|
|
2362
|
-
};
|
|
2363
|
-
|
|
2364
|
-
/**
|
|
2365
|
-
* Checks whether value is one of the enum's values.
|
|
2366
|
-
*/ function isEnumValue(haystack, needle) {
|
|
2367
|
-
return Object.values(haystack).includes(needle);
|
|
2368
|
-
}
|
|
2369
|
-
|
|
2370
|
-
function _array_like_to_array$8(arr, len) {
|
|
2371
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
2372
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2373
|
-
return arr2;
|
|
2374
|
-
}
|
|
2375
|
-
function _array_without_holes$7(arr) {
|
|
2376
|
-
if (Array.isArray(arr)) return _array_like_to_array$8(arr);
|
|
2377
|
-
}
|
|
2378
|
-
function _iterable_to_array$7(iter) {
|
|
2379
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
2380
|
-
}
|
|
2381
|
-
function _non_iterable_spread$7() {
|
|
2382
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2383
|
-
}
|
|
2384
|
-
function _to_consumable_array$7(arr) {
|
|
2385
|
-
return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$8(arr) || _non_iterable_spread$7();
|
|
2386
|
-
}
|
|
2387
|
-
function _unsupported_iterable_to_array$8(o, minLen) {
|
|
2388
|
-
if (!o) return;
|
|
2389
|
-
if (typeof o === "string") return _array_like_to_array$8(o, minLen);
|
|
2390
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2391
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2392
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2393
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$8(o, minLen);
|
|
2394
|
-
}
|
|
2395
|
-
var libraryName = "CssSelectorGenerator";
|
|
2396
|
-
/**
|
|
2397
|
-
* Convenient wrapper for `console.warn` using consistent formatting.
|
|
2398
|
-
*/ function showWarning() {
|
|
2399
|
-
var id = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "unknown problem";
|
|
2400
|
-
for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){
|
|
2401
|
-
args[_key - 1] = arguments[_key];
|
|
2402
|
-
}
|
|
2403
|
-
var // eslint-disable-next-line no-console
|
|
2404
|
-
_console;
|
|
2405
|
-
(_console = console).warn.apply(_console, [
|
|
2406
|
-
"".concat(libraryName, ": ").concat(id)
|
|
2407
|
-
].concat(_to_consumable_array$7(args)));
|
|
2408
|
-
}
|
|
2409
|
-
|
|
2410
|
-
function _instanceof$1(left, right) {
|
|
2411
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
2412
|
-
return !!right[Symbol.hasInstance](left);
|
|
2413
|
-
} else {
|
|
2414
|
-
return left instanceof right;
|
|
2415
|
-
}
|
|
2416
|
-
}
|
|
2417
|
-
function _type_of(obj) {
|
|
2418
|
-
"@swc/helpers - typeof";
|
|
2419
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
2420
|
-
}
|
|
2421
|
-
var DEFAULT_OPTIONS = {
|
|
2422
|
-
selectors: [
|
|
2423
|
-
CSS_SELECTOR_TYPE.id,
|
|
2424
|
-
CSS_SELECTOR_TYPE.class,
|
|
2425
|
-
CSS_SELECTOR_TYPE.tag,
|
|
2426
|
-
CSS_SELECTOR_TYPE.attribute
|
|
2427
|
-
],
|
|
2428
|
-
// if set to true, always include tag name
|
|
2429
|
-
includeTag: false,
|
|
2430
|
-
whitelist: [],
|
|
2431
|
-
blacklist: [],
|
|
2432
|
-
combineWithinSelector: true,
|
|
2433
|
-
combineBetweenSelectors: true,
|
|
2434
|
-
root: null,
|
|
2435
|
-
maxCombinations: Number.POSITIVE_INFINITY,
|
|
2436
|
-
maxCandidates: Number.POSITIVE_INFINITY,
|
|
2437
|
-
useScope: false
|
|
2438
|
-
};
|
|
2439
|
-
/**
|
|
2440
|
-
* Makes sure returned value is a list containing only valid selector types.
|
|
2441
|
-
* @param input
|
|
2442
|
-
*/ function sanitizeSelectorTypes(input) {
|
|
2443
|
-
if (!Array.isArray(input)) {
|
|
2444
|
-
return [];
|
|
2445
|
-
}
|
|
2446
|
-
return input.filter(function(item) {
|
|
2447
|
-
return isEnumValue(CSS_SELECTOR_TYPE, item);
|
|
2448
|
-
});
|
|
2449
|
-
}
|
|
2450
|
-
/**
|
|
2451
|
-
* Checks whether provided value is of type RegExp.
|
|
2452
|
-
*/ function isRegExp(input) {
|
|
2453
|
-
return _instanceof$1(input, RegExp);
|
|
2454
|
-
}
|
|
2455
|
-
/**
|
|
2456
|
-
* Checks whether provided value is usable in whitelist or blacklist.
|
|
2457
|
-
* @param input
|
|
2458
|
-
*/ function isCssSelectorMatch(input) {
|
|
2459
|
-
return [
|
|
2460
|
-
"string",
|
|
2461
|
-
"function"
|
|
2462
|
-
].includes(typeof input === "undefined" ? "undefined" : _type_of(input)) || isRegExp(input);
|
|
2463
|
-
}
|
|
2464
|
-
/**
|
|
2465
|
-
* Converts input to a list of valid values for whitelist or blacklist.
|
|
2466
|
-
*/ function sanitizeCssSelectorMatchList(input) {
|
|
2467
|
-
if (!Array.isArray(input)) {
|
|
2468
|
-
return [];
|
|
2469
|
-
}
|
|
2470
|
-
return input.filter(isCssSelectorMatch);
|
|
2471
|
-
}
|
|
2472
|
-
/**
|
|
2473
|
-
* Checks whether provided value is valid Node.
|
|
2474
|
-
*/ function isNode(input) {
|
|
2475
|
-
return _instanceof$1(input, Node);
|
|
2476
|
-
}
|
|
2477
|
-
/**
|
|
2478
|
-
* Checks whether provided value is valid ParentNode.
|
|
2479
|
-
*/ function isParentNode(input) {
|
|
2480
|
-
var validParentNodeTypes = [
|
|
2481
|
-
Node.DOCUMENT_NODE,
|
|
2482
|
-
Node.DOCUMENT_FRAGMENT_NODE,
|
|
2483
|
-
Node.ELEMENT_NODE
|
|
2484
|
-
];
|
|
2485
|
-
return isNode(input) && validParentNodeTypes.includes(input.nodeType);
|
|
2486
|
-
}
|
|
2487
|
-
/**
|
|
2488
|
-
* Makes sure that the root node in options is valid.
|
|
2489
|
-
*/ function sanitizeRoot(input, element) {
|
|
2490
|
-
if (isParentNode(input)) {
|
|
2491
|
-
if (!input.contains(element)) {
|
|
2492
|
-
showWarning("element root mismatch", "Provided root does not contain the element. This will most likely result in producing a fallback selector using element's real root node. If you plan to use the selector using provided root (e.g. `root.querySelector`), it will not work as intended.");
|
|
2493
|
-
}
|
|
2494
|
-
return input;
|
|
2495
|
-
}
|
|
2496
|
-
var rootNode = element.getRootNode({
|
|
2497
|
-
composed: false
|
|
2498
|
-
});
|
|
2499
|
-
if (isParentNode(rootNode)) {
|
|
2500
|
-
if (rootNode !== document) {
|
|
2501
|
-
showWarning("shadow root inferred", "You did not provide a root and the element is a child of Shadow DOM. This will produce a selector using ShadowRoot as a root. If you plan to use the selector using document as a root (e.g. `document.querySelector`), it will not work as intended.");
|
|
2502
|
-
}
|
|
2503
|
-
return rootNode;
|
|
2504
|
-
}
|
|
2505
|
-
return getRootNode(element);
|
|
2506
|
-
}
|
|
2507
|
-
/**
|
|
2508
|
-
* Makes sure that the output is a number, usable as `maxResults` option in
|
|
2509
|
-
* powerset generator.
|
|
2510
|
-
*/ function sanitizeMaxNumber(input) {
|
|
2511
|
-
return typeof input === "number" ? input : Number.POSITIVE_INFINITY;
|
|
2512
|
-
}
|
|
2513
|
-
/**
|
|
2514
|
-
* Makes sure the options object contains all required keys.
|
|
2515
|
-
*/ function sanitizeOptions(element) {
|
|
2516
|
-
var custom_options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
2517
|
-
var options = Object.assign(Object.assign({}, DEFAULT_OPTIONS), custom_options);
|
|
2518
|
-
return {
|
|
2519
|
-
selectors: sanitizeSelectorTypes(options.selectors),
|
|
2520
|
-
whitelist: sanitizeCssSelectorMatchList(options.whitelist),
|
|
2521
|
-
blacklist: sanitizeCssSelectorMatchList(options.blacklist),
|
|
2522
|
-
root: sanitizeRoot(options.root, element),
|
|
2523
|
-
combineWithinSelector: !!options.combineWithinSelector,
|
|
2524
|
-
combineBetweenSelectors: !!options.combineBetweenSelectors,
|
|
2525
|
-
includeTag: !!options.includeTag,
|
|
2526
|
-
maxCombinations: sanitizeMaxNumber(options.maxCombinations),
|
|
2527
|
-
maxCandidates: sanitizeMaxNumber(options.maxCandidates),
|
|
2528
|
-
useScope: !!options.useScope
|
|
2529
|
-
};
|
|
2530
|
-
}
|
|
2531
|
-
|
|
2532
|
-
function _array_like_to_array$7(arr, len) {
|
|
2533
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
2534
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2535
|
-
return arr2;
|
|
2536
|
-
}
|
|
2537
|
-
function _array_with_holes$1(arr) {
|
|
2538
|
-
if (Array.isArray(arr)) return arr;
|
|
2539
|
-
}
|
|
2540
|
-
function _array_without_holes$6(arr) {
|
|
2541
|
-
if (Array.isArray(arr)) return _array_like_to_array$7(arr);
|
|
2542
|
-
}
|
|
2543
|
-
function _iterable_to_array$6(iter) {
|
|
2544
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
2545
|
-
}
|
|
2546
|
-
function _non_iterable_rest$1() {
|
|
2547
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2548
|
-
}
|
|
2549
|
-
function _non_iterable_spread$6() {
|
|
2550
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2551
|
-
}
|
|
2552
|
-
function _to_array(arr) {
|
|
2553
|
-
return _array_with_holes$1(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_rest$1();
|
|
2554
|
-
}
|
|
2555
|
-
function _to_consumable_array$6(arr) {
|
|
2556
|
-
return _array_without_holes$6(arr) || _iterable_to_array$6(arr) || _unsupported_iterable_to_array$7(arr) || _non_iterable_spread$6();
|
|
2557
|
-
}
|
|
2558
|
-
function _unsupported_iterable_to_array$7(o, minLen) {
|
|
2559
|
-
if (!o) return;
|
|
2560
|
-
if (typeof o === "string") return _array_like_to_array$7(o, minLen);
|
|
2561
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2562
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2563
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2564
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$7(o, minLen);
|
|
2565
|
-
}
|
|
2566
|
-
/**
|
|
2567
|
-
* Creates array containing only items included in all input arrays.
|
|
2568
|
-
*/ function getIntersection() {
|
|
2569
|
-
var items = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
2570
|
-
var _items = _to_array(items), tmp = _items[0], firstItem = tmp === void 0 ? [] : tmp, otherItems = _items.slice(1);
|
|
2571
|
-
if (otherItems.length === 0) {
|
|
2572
|
-
return firstItem;
|
|
2573
|
-
}
|
|
2574
|
-
return otherItems.reduce(function(accumulator, currentValue) {
|
|
2575
|
-
return accumulator.filter(function(item) {
|
|
2576
|
-
return currentValue.includes(item);
|
|
2577
|
-
});
|
|
2578
|
-
}, firstItem);
|
|
2579
|
-
}
|
|
2580
|
-
/**
|
|
2581
|
-
* Converts array of arrays into a flat array.
|
|
2582
|
-
*/ function flattenArray(input) {
|
|
2583
|
-
var _instance;
|
|
2584
|
-
return (_instance = []).concat.apply(_instance, _to_consumable_array$6(input));
|
|
2585
|
-
}
|
|
2586
|
-
/**
|
|
2587
|
-
* Convert string that can contain wildcards (asterisks) to RegExp source.
|
|
2588
|
-
*/ function wildcardToRegExp(input) {
|
|
2589
|
-
return input// convert all special characters used by RegExp, except an asterisk
|
|
2590
|
-
.replace(/[|\\{}()[\]^$+?.]/g, "\\$&")// convert asterisk to pattern that matches anything
|
|
2591
|
-
.replace(/\*/g, ".+");
|
|
2592
|
-
}
|
|
2593
|
-
/**
|
|
2594
|
-
* Creates function that will test list of provided matchers against input.
|
|
2595
|
-
* Used for white/blacklist functionality.
|
|
2596
|
-
*/ function createPatternMatcher(list) {
|
|
2597
|
-
var matchFunctions = list.map(function(item) {
|
|
2598
|
-
if (isRegExp(item)) {
|
|
2599
|
-
return function(input) {
|
|
2600
|
-
return item.test(input);
|
|
2601
|
-
};
|
|
2602
|
-
}
|
|
2603
|
-
if (typeof item === "function") {
|
|
2604
|
-
return function(input) {
|
|
2605
|
-
var result = item(input);
|
|
2606
|
-
if (typeof result !== "boolean") {
|
|
2607
|
-
showWarning("pattern matcher function invalid", "Provided pattern matching function does not return boolean. It's result will be ignored.", item);
|
|
2608
|
-
return false;
|
|
2609
|
-
}
|
|
2610
|
-
return result;
|
|
2611
|
-
};
|
|
2612
|
-
}
|
|
2613
|
-
if (typeof item === "string") {
|
|
2614
|
-
var re = new RegExp("^" + wildcardToRegExp(item) + "$");
|
|
2615
|
-
return function(input) {
|
|
2616
|
-
return re.test(input);
|
|
2617
|
-
};
|
|
2618
|
-
}
|
|
2619
|
-
showWarning("pattern matcher invalid", "Pattern matching only accepts strings, regular expressions and/or functions. This item is invalid and will be ignored.", item);
|
|
2620
|
-
return function() {
|
|
2621
|
-
return false;
|
|
2622
|
-
};
|
|
2623
|
-
});
|
|
2624
|
-
return function(input) {
|
|
2625
|
-
return matchFunctions.some(function(matchFunction) {
|
|
2626
|
-
return matchFunction(input);
|
|
2627
|
-
});
|
|
2628
|
-
};
|
|
2629
|
-
}
|
|
2630
|
-
|
|
2631
|
-
/**
|
|
2632
|
-
* Check whether element is matched uniquely by selector.
|
|
2633
|
-
*/ function testSelector(elements, selector, root) {
|
|
2634
|
-
var result = Array.from(sanitizeRoot(root, elements[0]).querySelectorAll(selector));
|
|
2635
|
-
return result.length === elements.length && elements.every(function(element) {
|
|
2636
|
-
return result.includes(element);
|
|
2637
|
-
});
|
|
2638
|
-
}
|
|
2639
|
-
/**
|
|
2640
|
-
* Find all parents of a single element.
|
|
2641
|
-
*/ function getElementParents(element, root) {
|
|
2642
|
-
root = root !== null && root !== void 0 ? root : getRootNode(element);
|
|
2643
|
-
var result = [];
|
|
2644
|
-
var parent = element;
|
|
2645
|
-
while(isElement(parent) && parent !== root){
|
|
2646
|
-
result.push(parent);
|
|
2647
|
-
parent = parent.parentElement;
|
|
2648
|
-
}
|
|
2649
|
-
return result;
|
|
2650
|
-
}
|
|
2651
|
-
/**
|
|
2652
|
-
* Find all common parents of elements.
|
|
2653
|
-
*/ function getParents(elements, root) {
|
|
2654
|
-
return getIntersection(elements.map(function(element) {
|
|
2655
|
-
return getElementParents(element, root);
|
|
2656
|
-
}));
|
|
2657
|
-
}
|
|
2658
|
-
/**
|
|
2659
|
-
* Returns root node for given element. This needs to be used because of document-less environments, e.g. jsdom.
|
|
2660
|
-
*/ function getRootNode(element) {
|
|
2661
|
-
// The `:root` selector always returns a parent node. The `null` return value is not applicable here.
|
|
2662
|
-
return element.ownerDocument.querySelector(":root");
|
|
2663
|
-
}
|
|
2664
|
-
|
|
2665
|
-
var SELECTOR_SEPARATOR = ", ";
|
|
2666
|
-
// RegExp that will match invalid patterns that can be used in ID attribute.
|
|
2667
|
-
var INVALID_ID_RE = new RegExp([
|
|
2668
|
-
"^$",
|
|
2669
|
-
"\\s"
|
|
2670
|
-
].join("|"));
|
|
2671
|
-
// RegExp that will match invalid patterns that can be used in class attribute.
|
|
2672
|
-
var INVALID_CLASS_RE = new RegExp([
|
|
2673
|
-
"^$"
|
|
2674
|
-
].join("|"));
|
|
2675
|
-
// Order in which a combined selector is constructed.
|
|
2676
|
-
var SELECTOR_PATTERN = [
|
|
2677
|
-
CSS_SELECTOR_TYPE.nthoftype,
|
|
2678
|
-
CSS_SELECTOR_TYPE.tag,
|
|
2679
|
-
CSS_SELECTOR_TYPE.id,
|
|
2680
|
-
CSS_SELECTOR_TYPE.class,
|
|
2681
|
-
CSS_SELECTOR_TYPE.attribute,
|
|
2682
|
-
CSS_SELECTOR_TYPE.nthchild
|
|
2683
|
-
];
|
|
2684
|
-
|
|
2685
|
-
function _array_like_to_array$6(arr, len) {
|
|
2686
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
2687
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2688
|
-
return arr2;
|
|
2689
|
-
}
|
|
2690
|
-
function _array_without_holes$5(arr) {
|
|
2691
|
-
if (Array.isArray(arr)) return _array_like_to_array$6(arr);
|
|
2692
|
-
}
|
|
2693
|
-
function _iterable_to_array$5(iter) {
|
|
2694
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
2695
|
-
}
|
|
2696
|
-
function _non_iterable_spread$5() {
|
|
2697
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2698
|
-
}
|
|
2699
|
-
function _to_consumable_array$5(arr) {
|
|
2700
|
-
return _array_without_holes$5(arr) || _iterable_to_array$5(arr) || _unsupported_iterable_to_array$6(arr) || _non_iterable_spread$5();
|
|
2701
|
-
}
|
|
2702
|
-
function _unsupported_iterable_to_array$6(o, minLen) {
|
|
2703
|
-
if (!o) return;
|
|
2704
|
-
if (typeof o === "string") return _array_like_to_array$6(o, minLen);
|
|
2705
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2706
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2707
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2708
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$6(o, minLen);
|
|
2709
|
-
}
|
|
2710
|
-
// List of attributes to be ignored. These are handled by different selector types.
|
|
2711
|
-
var attributeBlacklistMatch = createPatternMatcher([
|
|
2712
|
-
"class",
|
|
2713
|
-
"id",
|
|
2714
|
-
// Angular attributes
|
|
2715
|
-
"ng-*"
|
|
2716
|
-
]);
|
|
2717
|
-
/**
|
|
2718
|
-
* Get simplified attribute selector for an element.
|
|
2719
|
-
*/ function attributeNodeToSimplifiedSelector(param) {
|
|
2720
|
-
var name = param.name;
|
|
2721
|
-
return "[".concat(name, "]");
|
|
2722
|
-
}
|
|
2723
|
-
/**
|
|
2724
|
-
* Get attribute selector for an element.
|
|
2725
|
-
*/ function attributeNodeToSelector(param) {
|
|
2726
|
-
var name = param.name, value = param.value;
|
|
2727
|
-
return "[".concat(name, "='").concat(value, "']");
|
|
2728
|
-
}
|
|
2729
|
-
/**
|
|
2730
|
-
* Checks whether an attribute should be used as a selector.
|
|
2731
|
-
*/ function isValidAttributeNode(param, element) {
|
|
2732
|
-
var nodeName = param.nodeName, nodeValue = param.nodeValue;
|
|
2733
|
-
// form input value should not be used as a selector
|
|
2734
|
-
var tagName = element.tagName.toLowerCase();
|
|
2735
|
-
if ([
|
|
2736
|
-
"input",
|
|
2737
|
-
"option"
|
|
2738
|
-
].includes(tagName) && nodeName === "value") {
|
|
2739
|
-
return false;
|
|
2740
|
-
}
|
|
2741
|
-
// ignore Base64-encoded strings as 'src' attribute values (e.g. in tags like img, audio, video, iframe, object, embed).
|
|
2742
|
-
if (nodeName === "src" && (nodeValue === null || nodeValue === void 0 ? void 0 : nodeValue.startsWith("data:"))) {
|
|
2743
|
-
return false;
|
|
2744
|
-
}
|
|
2745
|
-
return !attributeBlacklistMatch(nodeName);
|
|
2746
|
-
}
|
|
2747
|
-
/**
|
|
2748
|
-
* Sanitize all attribute data. We want to do it once, before we start to generate simplified/full selectors from the same data.
|
|
2749
|
-
*/ function sanitizeAttributeData(param) {
|
|
2750
|
-
var nodeName = param.nodeName, nodeValue = param.nodeValue;
|
|
2751
|
-
return {
|
|
2752
|
-
name: sanitizeSelectorItem(nodeName),
|
|
2753
|
-
value: sanitizeSelectorItem(nodeValue !== null && nodeValue !== void 0 ? nodeValue : undefined)
|
|
2754
|
-
};
|
|
2755
|
-
}
|
|
2756
|
-
/**
|
|
2757
|
-
* Get attribute selectors for an element.
|
|
2758
|
-
*/ function getElementAttributeSelectors(element) {
|
|
2759
|
-
var validAttributes = Array.from(element.attributes).filter(function(attributeNode) {
|
|
2760
|
-
return isValidAttributeNode(attributeNode, element);
|
|
2761
|
-
}).map(sanitizeAttributeData);
|
|
2762
|
-
return _to_consumable_array$5(validAttributes.map(attributeNodeToSimplifiedSelector)).concat(_to_consumable_array$5(validAttributes.map(attributeNodeToSelector)));
|
|
2763
|
-
}
|
|
2764
|
-
/**
|
|
2765
|
-
* Get attribute selectors matching all elements.
|
|
2766
|
-
*/ function getAttributeSelectors(elements) {
|
|
2767
|
-
var elementSelectors = elements.map(getElementAttributeSelectors);
|
|
2768
|
-
return getIntersection(elementSelectors);
|
|
2769
|
-
}
|
|
2770
|
-
|
|
2771
|
-
/**
|
|
2772
|
-
* Get class selectors for an element.
|
|
2773
|
-
*/ function getElementClassSelectors(element) {
|
|
2774
|
-
var _a;
|
|
2775
|
-
return ((_a = element.getAttribute("class")) !== null && _a !== void 0 ? _a : "").trim().split(/\s+/).filter(function(item) {
|
|
2776
|
-
return !INVALID_CLASS_RE.test(item);
|
|
2777
|
-
}).map(function(item) {
|
|
2778
|
-
return ".".concat(sanitizeSelectorItem(item));
|
|
2779
|
-
});
|
|
2780
|
-
}
|
|
2781
|
-
/**
|
|
2782
|
-
* Get class selectors matching all elements.
|
|
2783
|
-
*/ function getClassSelectors(elements) {
|
|
2784
|
-
var elementSelectors = elements.map(getElementClassSelectors);
|
|
2785
|
-
return getIntersection(elementSelectors);
|
|
2786
|
-
}
|
|
2787
|
-
|
|
2788
|
-
/**
|
|
2789
|
-
* Get ID selector for an element.
|
|
2790
|
-
* */ function getElementIdSelectors(element) {
|
|
2791
|
-
var _a;
|
|
2792
|
-
var id = (_a = element.getAttribute("id")) !== null && _a !== void 0 ? _a : "";
|
|
2793
|
-
var selector = "#".concat(sanitizeSelectorItem(id));
|
|
2794
|
-
var rootNode = element.getRootNode({
|
|
2795
|
-
composed: false
|
|
2796
|
-
});
|
|
2797
|
-
return !INVALID_ID_RE.test(id) && testSelector([
|
|
2798
|
-
element
|
|
2799
|
-
], selector, rootNode) ? [
|
|
2800
|
-
selector
|
|
2801
|
-
] : [];
|
|
2802
|
-
}
|
|
2803
|
-
/**
|
|
2804
|
-
* Get ID selector for an element.
|
|
2805
|
-
*/ function getIdSelector(elements) {
|
|
2806
|
-
return elements.length === 0 || elements.length > 1 ? [] : getElementIdSelectors(elements[0]);
|
|
2807
|
-
}
|
|
2808
|
-
|
|
2809
|
-
/**
|
|
2810
|
-
* Get nth-child selector for an element.
|
|
2811
|
-
*/ function getElementNthChildSelector(element) {
|
|
2812
|
-
var parent = element.parentNode;
|
|
2813
|
-
if (parent) {
|
|
2814
|
-
var siblings = Array.from(parent.childNodes).filter(isElement);
|
|
2815
|
-
var elementIndex = siblings.indexOf(element);
|
|
2816
|
-
if (elementIndex > -1) {
|
|
2817
|
-
return [
|
|
2818
|
-
":nth-child(".concat(String(elementIndex + 1), ")")
|
|
2819
|
-
];
|
|
2820
|
-
}
|
|
2821
|
-
}
|
|
2822
|
-
return [];
|
|
2823
|
-
}
|
|
2824
|
-
/**
|
|
2825
|
-
* Get nth-child selector matching all elements.
|
|
2826
|
-
*/ function getNthChildSelector(elements) {
|
|
2827
|
-
return getIntersection(elements.map(getElementNthChildSelector));
|
|
2828
|
-
}
|
|
2829
|
-
|
|
2830
|
-
function _array_like_to_array$5(arr, len) {
|
|
2831
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
2832
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2833
|
-
return arr2;
|
|
2834
|
-
}
|
|
2835
|
-
function _array_without_holes$4(arr) {
|
|
2836
|
-
if (Array.isArray(arr)) return _array_like_to_array$5(arr);
|
|
2837
|
-
}
|
|
2838
|
-
function _iterable_to_array$4(iter) {
|
|
2839
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
2840
|
-
}
|
|
2841
|
-
function _non_iterable_spread$4() {
|
|
2842
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2843
|
-
}
|
|
2844
|
-
function _to_consumable_array$4(arr) {
|
|
2845
|
-
return _array_without_holes$4(arr) || _iterable_to_array$4(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$4();
|
|
2846
|
-
}
|
|
2847
|
-
function _unsupported_iterable_to_array$5(o, minLen) {
|
|
2848
|
-
if (!o) return;
|
|
2849
|
-
if (typeof o === "string") return _array_like_to_array$5(o, minLen);
|
|
2850
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2851
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2852
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2853
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
|
|
2854
|
-
}
|
|
2855
|
-
/**
|
|
2856
|
-
* Get tag selector for an element.
|
|
2857
|
-
*/ function getElementTagSelectors(element) {
|
|
2858
|
-
return [
|
|
2859
|
-
sanitizeSelectorItem(element.tagName.toLowerCase())
|
|
2860
|
-
];
|
|
2861
|
-
}
|
|
2862
|
-
/**
|
|
2863
|
-
* Get tag selector for list of elements.
|
|
2864
|
-
*/ function getTagSelector(elements) {
|
|
2865
|
-
var selectors = _to_consumable_array$4(new Set(flattenArray(elements.map(getElementTagSelectors))));
|
|
2866
|
-
return selectors.length === 0 || selectors.length > 1 ? [] : [
|
|
2867
|
-
selectors[0]
|
|
2868
|
-
];
|
|
2869
|
-
}
|
|
2870
|
-
|
|
2871
|
-
/**
|
|
2872
|
-
* Get nth-of-type selector for an element.
|
|
2873
|
-
*/ function getElementNthOfTypeSelector(element) {
|
|
2874
|
-
var tag = getTagSelector([
|
|
2875
|
-
element
|
|
2876
|
-
])[0];
|
|
2877
|
-
var parentElement = element.parentElement;
|
|
2878
|
-
if (parentElement) {
|
|
2879
|
-
var siblings = Array.from(parentElement.children).filter(function(element) {
|
|
2880
|
-
return element.tagName.toLowerCase() === tag;
|
|
2881
|
-
});
|
|
2882
|
-
var elementIndex = siblings.indexOf(element);
|
|
2883
|
-
if (elementIndex > -1) {
|
|
2884
|
-
return [
|
|
2885
|
-
"".concat(tag, ":nth-of-type(").concat(String(elementIndex + 1), ")")
|
|
2886
|
-
];
|
|
2887
|
-
}
|
|
2888
|
-
}
|
|
2889
|
-
return [];
|
|
2890
|
-
}
|
|
2891
|
-
/**
|
|
2892
|
-
* Get Nth-of-type selector matching all elements.
|
|
2893
|
-
*/ function getNthOfTypeSelector(elements) {
|
|
2894
|
-
return getIntersection(elements.map(getElementNthOfTypeSelector));
|
|
2895
|
-
}
|
|
2896
|
-
|
|
2897
|
-
function _array_like_to_array$4(arr, len) {
|
|
2898
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
2899
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
2900
|
-
return arr2;
|
|
2901
|
-
}
|
|
2902
|
-
function _array_without_holes$3(arr) {
|
|
2903
|
-
if (Array.isArray(arr)) return _array_like_to_array$4(arr);
|
|
2904
|
-
}
|
|
2905
|
-
function _iterable_to_array$3(iter) {
|
|
2906
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
2907
|
-
}
|
|
2908
|
-
function _non_iterable_spread$3() {
|
|
2909
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2910
|
-
}
|
|
2911
|
-
function _to_consumable_array$3(arr) {
|
|
2912
|
-
return _array_without_holes$3(arr) || _iterable_to_array$3(arr) || _unsupported_iterable_to_array$4(arr) || _non_iterable_spread$3();
|
|
2913
|
-
}
|
|
2914
|
-
function _unsupported_iterable_to_array$4(o, minLen) {
|
|
2915
|
-
if (!o) return;
|
|
2916
|
-
if (typeof o === "string") return _array_like_to_array$4(o, minLen);
|
|
2917
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
2918
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
2919
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2920
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
|
|
2921
|
-
}
|
|
2922
|
-
function _ts_generator(thisArg, body) {
|
|
2923
|
-
var f, y, t, g, _ = {
|
|
2924
|
-
label: 0,
|
|
2925
|
-
sent: function() {
|
|
2926
|
-
if (t[0] & 1) throw t[1];
|
|
2927
|
-
return t[1];
|
|
2928
|
-
},
|
|
2929
|
-
trys: [],
|
|
2930
|
-
ops: []
|
|
2931
|
-
};
|
|
2932
|
-
return g = {
|
|
2933
|
-
next: verb(0),
|
|
2934
|
-
"throw": verb(1),
|
|
2935
|
-
"return": verb(2)
|
|
2936
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
2937
|
-
return this;
|
|
2938
|
-
}), g;
|
|
2939
|
-
function verb(n) {
|
|
2940
|
-
return function(v) {
|
|
2941
|
-
return step([
|
|
2942
|
-
n,
|
|
2943
|
-
v
|
|
2944
|
-
]);
|
|
2945
|
-
};
|
|
2946
|
-
}
|
|
2947
|
-
function step(op) {
|
|
2948
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
2949
|
-
while(_)try {
|
|
2950
|
-
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) return t;
|
|
2951
|
-
if (y = 0, t) op = [
|
|
2952
|
-
op[0] & 2,
|
|
2953
|
-
t.value
|
|
2954
|
-
];
|
|
2955
|
-
switch(op[0]){
|
|
2956
|
-
case 0:
|
|
2957
|
-
case 1:
|
|
2958
|
-
t = op;
|
|
2959
|
-
break;
|
|
2960
|
-
case 4:
|
|
2961
|
-
_.label++;
|
|
2962
|
-
return {
|
|
2963
|
-
value: op[1],
|
|
2964
|
-
done: false
|
|
2965
|
-
};
|
|
2966
|
-
case 5:
|
|
2967
|
-
_.label++;
|
|
2968
|
-
y = op[1];
|
|
2969
|
-
op = [
|
|
2970
|
-
0
|
|
2971
|
-
];
|
|
2972
|
-
continue;
|
|
2973
|
-
case 7:
|
|
2974
|
-
op = _.ops.pop();
|
|
2975
|
-
_.trys.pop();
|
|
2976
|
-
continue;
|
|
2977
|
-
default:
|
|
2978
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
2979
|
-
_ = 0;
|
|
2980
|
-
continue;
|
|
2981
|
-
}
|
|
2982
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
2983
|
-
_.label = op[1];
|
|
2984
|
-
break;
|
|
2985
|
-
}
|
|
2986
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
2987
|
-
_.label = t[1];
|
|
2988
|
-
t = op;
|
|
2989
|
-
break;
|
|
2990
|
-
}
|
|
2991
|
-
if (t && _.label < t[2]) {
|
|
2992
|
-
_.label = t[2];
|
|
2993
|
-
_.ops.push(op);
|
|
2994
|
-
break;
|
|
2995
|
-
}
|
|
2996
|
-
if (t[2]) _.ops.pop();
|
|
2997
|
-
_.trys.pop();
|
|
2998
|
-
continue;
|
|
2999
|
-
}
|
|
3000
|
-
op = body.call(thisArg, _);
|
|
3001
|
-
} catch (e) {
|
|
3002
|
-
op = [
|
|
3003
|
-
6,
|
|
3004
|
-
e
|
|
3005
|
-
];
|
|
3006
|
-
y = 0;
|
|
3007
|
-
} finally{
|
|
3008
|
-
f = t = 0;
|
|
3009
|
-
}
|
|
3010
|
-
if (op[0] & 5) throw op[1];
|
|
3011
|
-
return {
|
|
3012
|
-
value: op[0] ? op[1] : void 0,
|
|
3013
|
-
done: true
|
|
3014
|
-
};
|
|
3015
|
-
}
|
|
3016
|
-
}
|
|
3017
|
-
function powerSetGenerator() {
|
|
3018
|
-
var input, _ref, _ref_maxResults, maxResults, resultCounter, offsets, result;
|
|
3019
|
-
var _arguments = arguments;
|
|
3020
|
-
return _ts_generator(this, function(_state) {
|
|
3021
|
-
switch(_state.label){
|
|
3022
|
-
case 0:
|
|
3023
|
-
input = _arguments.length > 0 && _arguments[0] !== void 0 ? _arguments[0] : [], _ref = _arguments.length > 1 && _arguments[1] !== void 0 ? _arguments[1] : {}, _ref_maxResults = _ref.maxResults, maxResults = _ref_maxResults === void 0 ? Number.POSITIVE_INFINITY : _ref_maxResults;
|
|
3024
|
-
resultCounter = 0;
|
|
3025
|
-
offsets = generateOffsets(1);
|
|
3026
|
-
_state.label = 1;
|
|
3027
|
-
case 1:
|
|
3028
|
-
if (!(offsets.length <= input.length && resultCounter < maxResults)) return [
|
|
3029
|
-
3,
|
|
3030
|
-
3
|
|
3031
|
-
];
|
|
3032
|
-
resultCounter += 1;
|
|
3033
|
-
result = offsets.map(function(offset) {
|
|
3034
|
-
return input[offset];
|
|
3035
|
-
});
|
|
3036
|
-
return [
|
|
3037
|
-
4,
|
|
3038
|
-
result
|
|
3039
|
-
];
|
|
3040
|
-
case 2:
|
|
3041
|
-
_state.sent();
|
|
3042
|
-
offsets = bumpOffsets(offsets, input.length - 1);
|
|
3043
|
-
return [
|
|
3044
|
-
3,
|
|
3045
|
-
1
|
|
3046
|
-
];
|
|
3047
|
-
case 3:
|
|
3048
|
-
return [
|
|
3049
|
-
2
|
|
3050
|
-
];
|
|
3051
|
-
}
|
|
3052
|
-
});
|
|
3053
|
-
}
|
|
3054
|
-
/**
|
|
3055
|
-
* Generates power set of input items.
|
|
3056
|
-
*/ function getPowerSet() {
|
|
3057
|
-
var input = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref_maxResults = _ref.maxResults, maxResults = _ref_maxResults === void 0 ? Number.POSITIVE_INFINITY : _ref_maxResults;
|
|
3058
|
-
return Array.from(powerSetGenerator(input, {
|
|
3059
|
-
maxResults: maxResults
|
|
3060
|
-
}));
|
|
3061
|
-
}
|
|
3062
|
-
/**
|
|
3063
|
-
* Helper function used by `getPowerSet`. Updates internal pointers.
|
|
3064
|
-
*/ function bumpOffsets() {
|
|
3065
|
-
var offsets = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], maxValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
3066
|
-
var size = offsets.length;
|
|
3067
|
-
if (size === 0) {
|
|
3068
|
-
return [];
|
|
3069
|
-
}
|
|
3070
|
-
var result = _to_consumable_array$3(offsets);
|
|
3071
|
-
result[size - 1] += 1;
|
|
3072
|
-
for(var index = size - 1; index >= 0; index--){
|
|
3073
|
-
if (result[index] > maxValue) {
|
|
3074
|
-
if (index === 0) {
|
|
3075
|
-
return generateOffsets(size + 1);
|
|
3076
|
-
} else {
|
|
3077
|
-
result[index - 1]++;
|
|
3078
|
-
result[index] = result[index - 1] + 1;
|
|
3079
|
-
}
|
|
3080
|
-
}
|
|
3081
|
-
}
|
|
3082
|
-
if (result[size - 1] > maxValue) {
|
|
3083
|
-
return generateOffsets(size + 1);
|
|
3084
|
-
}
|
|
3085
|
-
return result;
|
|
3086
|
-
}
|
|
3087
|
-
/**
|
|
3088
|
-
* Generates array of size N, filled with numbers sequence starting from 0.
|
|
3089
|
-
*/ function generateOffsets() {
|
|
3090
|
-
var size = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1;
|
|
3091
|
-
return Array.from(Array(size).keys());
|
|
3092
|
-
}
|
|
3093
|
-
|
|
3094
|
-
/**
|
|
3095
|
-
* Generates cartesian product out of input object.
|
|
3096
|
-
*/ function _array_like_to_array$3(arr, len) {
|
|
3097
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3098
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3099
|
-
return arr2;
|
|
3100
|
-
}
|
|
3101
|
-
function _array_with_holes(arr) {
|
|
3102
|
-
if (Array.isArray(arr)) return arr;
|
|
3103
|
-
}
|
|
3104
|
-
function _define_property(obj, key, value) {
|
|
3105
|
-
if (key in obj) {
|
|
3106
|
-
Object.defineProperty(obj, key, {
|
|
3107
|
-
value: value,
|
|
3108
|
-
enumerable: true,
|
|
3109
|
-
configurable: true,
|
|
3110
|
-
writable: true
|
|
3111
|
-
});
|
|
3112
|
-
} else {
|
|
3113
|
-
obj[key] = value;
|
|
3114
|
-
}
|
|
3115
|
-
return obj;
|
|
3116
|
-
}
|
|
3117
|
-
function _iterable_to_array_limit(arr, i) {
|
|
3118
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
3119
|
-
if (_i == null) return;
|
|
3120
|
-
var _arr = [];
|
|
3121
|
-
var _n = true;
|
|
3122
|
-
var _d = false;
|
|
3123
|
-
var _s, _e;
|
|
3124
|
-
try {
|
|
3125
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
3126
|
-
_arr.push(_s.value);
|
|
3127
|
-
if (i && _arr.length === i) break;
|
|
3128
|
-
}
|
|
3129
|
-
} catch (err) {
|
|
3130
|
-
_d = true;
|
|
3131
|
-
_e = err;
|
|
3132
|
-
} finally{
|
|
3133
|
-
try {
|
|
3134
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
3135
|
-
} finally{
|
|
3136
|
-
if (_d) throw _e;
|
|
3137
|
-
}
|
|
3138
|
-
}
|
|
3139
|
-
return _arr;
|
|
3140
|
-
}
|
|
3141
|
-
function _non_iterable_rest() {
|
|
3142
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3143
|
-
}
|
|
3144
|
-
function _sliced_to_array(arr, i) {
|
|
3145
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array$3(arr, i) || _non_iterable_rest();
|
|
3146
|
-
}
|
|
3147
|
-
function _unsupported_iterable_to_array$3(o, minLen) {
|
|
3148
|
-
if (!o) return;
|
|
3149
|
-
if (typeof o === "string") return _array_like_to_array$3(o, minLen);
|
|
3150
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3151
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3152
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3153
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
|
|
3154
|
-
}
|
|
3155
|
-
function getCartesianProduct() {
|
|
3156
|
-
var input = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
3157
|
-
var result = [];
|
|
3158
|
-
Object.entries(input).forEach(function(param) {
|
|
3159
|
-
var _param = _sliced_to_array(param, 2), key = _param[0], values = _param[1];
|
|
3160
|
-
result = values.flatMap(function(value) {
|
|
3161
|
-
if (result.length === 0) {
|
|
3162
|
-
return [
|
|
3163
|
-
_define_property({}, key, value)
|
|
3164
|
-
];
|
|
3165
|
-
} else {
|
|
3166
|
-
return result.map(function(memo) {
|
|
3167
|
-
return Object.assign(Object.assign({}, memo), _define_property({}, key, value));
|
|
3168
|
-
});
|
|
3169
|
-
}
|
|
3170
|
-
});
|
|
3171
|
-
});
|
|
3172
|
-
return result;
|
|
3173
|
-
}
|
|
3174
|
-
|
|
3175
|
-
function _array_like_to_array$2(arr, len) {
|
|
3176
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3177
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3178
|
-
return arr2;
|
|
3179
|
-
}
|
|
3180
|
-
function _array_without_holes$2(arr) {
|
|
3181
|
-
if (Array.isArray(arr)) return _array_like_to_array$2(arr);
|
|
3182
|
-
}
|
|
3183
|
-
function _instanceof(left, right) {
|
|
3184
|
-
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
3185
|
-
return !!right[Symbol.hasInstance](left);
|
|
3186
|
-
} else {
|
|
3187
|
-
return left instanceof right;
|
|
3188
|
-
}
|
|
3189
|
-
}
|
|
3190
|
-
function _iterable_to_array$2(iter) {
|
|
3191
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
3192
|
-
}
|
|
3193
|
-
function _non_iterable_spread$2() {
|
|
3194
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3195
|
-
}
|
|
3196
|
-
function _to_consumable_array$2(arr) {
|
|
3197
|
-
return _array_without_holes$2(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$2(arr) || _non_iterable_spread$2();
|
|
3198
|
-
}
|
|
3199
|
-
function _unsupported_iterable_to_array$2(o, minLen) {
|
|
3200
|
-
if (!o) return;
|
|
3201
|
-
if (typeof o === "string") return _array_like_to_array$2(o, minLen);
|
|
3202
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3203
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3204
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3205
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
|
|
3206
|
-
}
|
|
3207
|
-
var ESCAPED_COLON = ":".charCodeAt(0).toString(16).toUpperCase();
|
|
3208
|
-
// Square brackets need to be escaped, but eslint has a problem with that.
|
|
3209
|
-
/* eslint-disable-next-line no-useless-escape */ var SPECIAL_CHARACTERS_RE = /[ !"#$%&'()\[\]{|}<>*+,./;=?@^`~\\]/;
|
|
3210
|
-
/**
|
|
3211
|
-
* Escapes special characters used by CSS selector items.
|
|
3212
|
-
*/ function sanitizeSelectorItem() {
|
|
3213
|
-
var input = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
3214
|
-
// This should not be necessary, but just to be sure, let's keep the legacy sanitizer in place, for backwards compatibility.
|
|
3215
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
|
|
3216
|
-
return CSS ? CSS.escape(input) : legacySanitizeSelectorItem(input);
|
|
3217
|
-
}
|
|
3218
|
-
/**
|
|
3219
|
-
* Legacy version of escaping utility, originally used for IE11-. Should
|
|
3220
|
-
* probably be replaced by a polyfill:
|
|
3221
|
-
* https://github.com/mathiasbynens/CSS.escape
|
|
3222
|
-
*/ function legacySanitizeSelectorItem() {
|
|
3223
|
-
var input = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
3224
|
-
return input.split("").map(function(character) {
|
|
3225
|
-
if (character === ":") {
|
|
3226
|
-
return "\\".concat(ESCAPED_COLON, " ");
|
|
3227
|
-
}
|
|
3228
|
-
if (SPECIAL_CHARACTERS_RE.test(character)) {
|
|
3229
|
-
return "\\".concat(character);
|
|
3230
|
-
}
|
|
3231
|
-
// needed for backwards compatibility
|
|
3232
|
-
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
3233
|
-
return escape(character).replace(/%/g, "\\");
|
|
3234
|
-
}).join("");
|
|
3235
|
-
}
|
|
3236
|
-
var SELECTOR_TYPE_GETTERS = {
|
|
3237
|
-
tag: getTagSelector,
|
|
3238
|
-
id: getIdSelector,
|
|
3239
|
-
class: getClassSelectors,
|
|
3240
|
-
attribute: getAttributeSelectors,
|
|
3241
|
-
nthchild: getNthChildSelector,
|
|
3242
|
-
nthoftype: getNthOfTypeSelector
|
|
3243
|
-
};
|
|
3244
|
-
var ELEMENT_SELECTOR_TYPE_GETTERS = {
|
|
3245
|
-
tag: getElementTagSelectors,
|
|
3246
|
-
id: getElementIdSelectors,
|
|
3247
|
-
class: getElementClassSelectors,
|
|
3248
|
-
attribute: getElementAttributeSelectors,
|
|
3249
|
-
nthchild: getElementNthChildSelector,
|
|
3250
|
-
nthoftype: getElementNthOfTypeSelector
|
|
3251
|
-
};
|
|
3252
|
-
/**
|
|
3253
|
-
* Creates selector of given type for single element.
|
|
3254
|
-
*/ function getElementSelectorsByType(element, selectorType) {
|
|
3255
|
-
return ELEMENT_SELECTOR_TYPE_GETTERS[selectorType](element);
|
|
3256
|
-
}
|
|
3257
|
-
/**
|
|
3258
|
-
* Returns list of selectors of given type for the element.
|
|
3259
|
-
*/ function getSelectorsByType(elements, selector_type) {
|
|
3260
|
-
var getter = SELECTOR_TYPE_GETTERS[selector_type];
|
|
3261
|
-
return getter(elements);
|
|
3262
|
-
}
|
|
3263
|
-
/**
|
|
3264
|
-
* Remove blacklisted selectors from list.
|
|
3265
|
-
*/ function filterSelectors() {
|
|
3266
|
-
var list = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], matchBlacklist = arguments.length > 1 ? arguments[1] : void 0, matchWhitelist = arguments.length > 2 ? arguments[2] : void 0;
|
|
3267
|
-
return list.filter(function(item) {
|
|
3268
|
-
return matchWhitelist(item) || !matchBlacklist(item);
|
|
3269
|
-
});
|
|
3270
|
-
}
|
|
3271
|
-
/**
|
|
3272
|
-
* Prioritise whitelisted selectors in list.
|
|
3273
|
-
*/ function orderSelectors() {
|
|
3274
|
-
var list = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], matchWhitelist = arguments.length > 1 ? arguments[1] : void 0;
|
|
3275
|
-
return list.sort(function(a, b) {
|
|
3276
|
-
var a_is_whitelisted = matchWhitelist(a);
|
|
3277
|
-
var b_is_whitelisted = matchWhitelist(b);
|
|
3278
|
-
if (a_is_whitelisted && !b_is_whitelisted) {
|
|
3279
|
-
return -1;
|
|
3280
|
-
}
|
|
3281
|
-
if (!a_is_whitelisted && b_is_whitelisted) {
|
|
3282
|
-
return 1;
|
|
3283
|
-
}
|
|
3284
|
-
return 0;
|
|
3285
|
-
});
|
|
3286
|
-
}
|
|
3287
|
-
/**
|
|
3288
|
-
* Returns list of unique selectors applicable to given element.
|
|
3289
|
-
*/ function getAllSelectors(elements, root, options) {
|
|
3290
|
-
var selectors_list = getSelectorsList(elements, options);
|
|
3291
|
-
var type_combinations = getTypeCombinations(selectors_list, options);
|
|
3292
|
-
var all_selectors = flattenArray(type_combinations);
|
|
3293
|
-
return _to_consumable_array$2(new Set(all_selectors));
|
|
3294
|
-
}
|
|
3295
|
-
/**
|
|
3296
|
-
* Creates object containing all selector types and their potential values.
|
|
3297
|
-
*/ function getSelectorsList(elements, options) {
|
|
3298
|
-
var blacklist = options.blacklist, whitelist = options.whitelist, combineWithinSelector = options.combineWithinSelector, maxCombinations = options.maxCombinations;
|
|
3299
|
-
var matchBlacklist = createPatternMatcher(blacklist);
|
|
3300
|
-
var matchWhitelist = createPatternMatcher(whitelist);
|
|
3301
|
-
var reducer = function(data, selector_type) {
|
|
3302
|
-
var selectors_by_type = getSelectorsByType(elements, selector_type);
|
|
3303
|
-
var filtered_selectors = filterSelectors(selectors_by_type, matchBlacklist, matchWhitelist);
|
|
3304
|
-
var found_selectors = orderSelectors(filtered_selectors, matchWhitelist);
|
|
3305
|
-
data[selector_type] = combineWithinSelector ? getPowerSet(found_selectors, {
|
|
3306
|
-
maxResults: maxCombinations
|
|
3307
|
-
}) : found_selectors.map(function(item) {
|
|
3308
|
-
return [
|
|
3309
|
-
item
|
|
3310
|
-
];
|
|
3311
|
-
});
|
|
3312
|
-
return data;
|
|
3313
|
-
};
|
|
3314
|
-
return getSelectorsToGet(options).reduce(reducer, {});
|
|
3315
|
-
}
|
|
3316
|
-
/**
|
|
3317
|
-
* Creates list of selector types that we will need to generate the selector.
|
|
3318
|
-
*/ function getSelectorsToGet(options) {
|
|
3319
|
-
var selectors = options.selectors, includeTag = options.includeTag;
|
|
3320
|
-
var selectors_to_get = _to_consumable_array$2(selectors);
|
|
3321
|
-
if (includeTag && !selectors_to_get.includes("tag")) {
|
|
3322
|
-
selectors_to_get.push("tag");
|
|
3323
|
-
}
|
|
3324
|
-
return selectors_to_get;
|
|
3325
|
-
}
|
|
3326
|
-
/**
|
|
3327
|
-
* Adds "tag" to a list, if it does not contain it. Used to modify selectors
|
|
3328
|
-
* list when includeTag option is enabled to make sure all results contain the
|
|
3329
|
-
* TAG part.
|
|
3330
|
-
*/ function addTagTypeIfNeeded(list) {
|
|
3331
|
-
return list.includes(CSS_SELECTOR_TYPE.tag) || list.includes(CSS_SELECTOR_TYPE.nthoftype) ? _to_consumable_array$2(list) : _to_consumable_array$2(list).concat([
|
|
3332
|
-
CSS_SELECTOR_TYPE.tag
|
|
3333
|
-
]);
|
|
3334
|
-
}
|
|
3335
|
-
/**
|
|
3336
|
-
* Generates list of possible selector type combinations.
|
|
3337
|
-
*/ function combineSelectorTypes(options) {
|
|
3338
|
-
var selectors = options.selectors, combineBetweenSelectors = options.combineBetweenSelectors, includeTag = options.includeTag, maxCandidates = options.maxCandidates;
|
|
3339
|
-
var combinations = combineBetweenSelectors ? getPowerSet(selectors, {
|
|
3340
|
-
maxResults: maxCandidates
|
|
3341
|
-
}) : selectors.map(function(item) {
|
|
3342
|
-
return [
|
|
3343
|
-
item
|
|
3344
|
-
];
|
|
3345
|
-
});
|
|
3346
|
-
return includeTag ? combinations.map(addTagTypeIfNeeded) : combinations;
|
|
3347
|
-
}
|
|
3348
|
-
/**
|
|
3349
|
-
* Generates list of combined CSS selectors.
|
|
3350
|
-
*/ function getTypeCombinations(selectors_list, options) {
|
|
3351
|
-
return combineSelectorTypes(options).map(function(item) {
|
|
3352
|
-
return constructSelectors(item, selectors_list);
|
|
3353
|
-
}).filter(function(item) {
|
|
3354
|
-
return item.length > 0;
|
|
3355
|
-
});
|
|
3356
|
-
}
|
|
3357
|
-
/**
|
|
3358
|
-
* Generates all variations of possible selectors from provided data.
|
|
3359
|
-
*/ function constructSelectors(selector_types, selectors_by_type) {
|
|
3360
|
-
var data = {};
|
|
3361
|
-
selector_types.forEach(function(selector_type) {
|
|
3362
|
-
var selector_variants = selectors_by_type[selector_type];
|
|
3363
|
-
if (selector_variants && selector_variants.length > 0) {
|
|
3364
|
-
data[selector_type] = selector_variants;
|
|
3365
|
-
}
|
|
3366
|
-
});
|
|
3367
|
-
var combinations = getCartesianProduct(data);
|
|
3368
|
-
return combinations.map(constructSelector);
|
|
3369
|
-
}
|
|
3370
|
-
/**
|
|
3371
|
-
* Creates selector for given selector type. Combines several parts if needed.
|
|
3372
|
-
*/ function constructSelectorType(selector_type, selectors_data) {
|
|
3373
|
-
return selectors_data[selector_type] ? selectors_data[selector_type].join("") : "";
|
|
3374
|
-
}
|
|
3375
|
-
/**
|
|
3376
|
-
* Converts selector data object to a selector.
|
|
3377
|
-
*/ function constructSelector() {
|
|
3378
|
-
var selectorData = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
3379
|
-
var pattern = _to_consumable_array$2(SELECTOR_PATTERN);
|
|
3380
|
-
// selector "nthoftype" already contains "tag"
|
|
3381
|
-
if (selectorData[CSS_SELECTOR_TYPE.tag] && selectorData[CSS_SELECTOR_TYPE.nthoftype]) {
|
|
3382
|
-
pattern.splice(pattern.indexOf(CSS_SELECTOR_TYPE.tag), 1);
|
|
3383
|
-
}
|
|
3384
|
-
return pattern.map(function(type) {
|
|
3385
|
-
return constructSelectorType(type, selectorData);
|
|
3386
|
-
}).join("");
|
|
3387
|
-
}
|
|
3388
|
-
/**
|
|
3389
|
-
* Generates combinations of child and descendant selectors within root
|
|
3390
|
-
* selector.
|
|
3391
|
-
*/ function generateCandidateCombinations(selectors, rootSelector) {
|
|
3392
|
-
return _to_consumable_array$2(selectors.map(function(selector) {
|
|
3393
|
-
return rootSelector + OPERATOR.DESCENDANT + selector;
|
|
3394
|
-
})).concat(_to_consumable_array$2(selectors.map(function(selector) {
|
|
3395
|
-
return rootSelector + OPERATOR.CHILD + selector;
|
|
3396
|
-
})));
|
|
3397
|
-
}
|
|
3398
|
-
/**
|
|
3399
|
-
* Generates a list of selector candidates that can potentially match target
|
|
3400
|
-
* element.
|
|
3401
|
-
*/ function generateCandidates(selectors, rootSelector) {
|
|
3402
|
-
return rootSelector === "" ? selectors : generateCandidateCombinations(selectors, rootSelector);
|
|
3403
|
-
}
|
|
3404
|
-
/**
|
|
3405
|
-
* Tries to find a unique CSS selector for element within given parent.
|
|
3406
|
-
*/ function getSelectorWithinRoot(elements, root) {
|
|
3407
|
-
var rootSelector = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "", options = arguments.length > 3 ? arguments[3] : void 0;
|
|
3408
|
-
var elementSelectors = getAllSelectors(elements, root, options);
|
|
3409
|
-
var selectorCandidates = generateCandidates(elementSelectors, rootSelector);
|
|
3410
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
3411
|
-
try {
|
|
3412
|
-
for(var _iterator = selectorCandidates[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
3413
|
-
var candidateSelector = _step.value;
|
|
3414
|
-
if (testSelector(elements, candidateSelector, root)) {
|
|
3415
|
-
return candidateSelector;
|
|
3416
|
-
}
|
|
3417
|
-
}
|
|
3418
|
-
} catch (err) {
|
|
3419
|
-
_didIteratorError = true;
|
|
3420
|
-
_iteratorError = err;
|
|
3421
|
-
} finally{
|
|
3422
|
-
try {
|
|
3423
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
3424
|
-
_iterator.return();
|
|
3425
|
-
}
|
|
3426
|
-
} finally{
|
|
3427
|
-
if (_didIteratorError) {
|
|
3428
|
-
throw _iteratorError;
|
|
3429
|
-
}
|
|
3430
|
-
}
|
|
3431
|
-
}
|
|
3432
|
-
return null;
|
|
3433
|
-
}
|
|
3434
|
-
/**
|
|
3435
|
-
* Climbs through parents of the element and tries to find the one that is
|
|
3436
|
-
* identifiable by unique CSS selector.
|
|
3437
|
-
*/ function getClosestIdentifiableParent(elements, root) {
|
|
3438
|
-
var rootSelector = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "", options = arguments.length > 3 ? arguments[3] : void 0;
|
|
3439
|
-
if (elements.length === 0) {
|
|
3440
|
-
return null;
|
|
3441
|
-
}
|
|
3442
|
-
var candidatesList = [
|
|
3443
|
-
elements.length > 1 ? elements : []
|
|
3444
|
-
].concat(_to_consumable_array$2(getParents(elements, root).map(function(element) {
|
|
3445
|
-
return [
|
|
3446
|
-
element
|
|
3447
|
-
];
|
|
3448
|
-
})));
|
|
3449
|
-
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
3450
|
-
try {
|
|
3451
|
-
for(var _iterator = candidatesList[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
3452
|
-
var currentElements = _step.value;
|
|
3453
|
-
var result = getSelectorWithinRoot(currentElements, root, rootSelector, options);
|
|
3454
|
-
if (result) {
|
|
3455
|
-
return {
|
|
3456
|
-
foundElements: currentElements,
|
|
3457
|
-
selector: result
|
|
3458
|
-
};
|
|
3459
|
-
}
|
|
3460
|
-
}
|
|
3461
|
-
} catch (err) {
|
|
3462
|
-
_didIteratorError = true;
|
|
3463
|
-
_iteratorError = err;
|
|
3464
|
-
} finally{
|
|
3465
|
-
try {
|
|
3466
|
-
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
3467
|
-
_iterator.return();
|
|
3468
|
-
}
|
|
3469
|
-
} finally{
|
|
3470
|
-
if (_didIteratorError) {
|
|
3471
|
-
throw _iteratorError;
|
|
3472
|
-
}
|
|
3473
|
-
}
|
|
3474
|
-
}
|
|
3475
|
-
return null;
|
|
3476
|
-
}
|
|
3477
|
-
/**
|
|
3478
|
-
* Converts input into list of elements, removing duplicates and non-elements.
|
|
3479
|
-
*/ function sanitizeSelectorNeedle(needle) {
|
|
3480
|
-
if (_instanceof(needle, NodeList) || _instanceof(needle, HTMLCollection)) {
|
|
3481
|
-
needle = Array.from(needle);
|
|
3482
|
-
}
|
|
3483
|
-
var elements = (Array.isArray(needle) ? needle : [
|
|
3484
|
-
needle
|
|
3485
|
-
]).filter(isElement);
|
|
3486
|
-
return _to_consumable_array$2(new Set(elements));
|
|
3487
|
-
}
|
|
3488
|
-
|
|
3489
|
-
function _array_like_to_array$1(arr, len) {
|
|
3490
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3491
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3492
|
-
return arr2;
|
|
3493
|
-
}
|
|
3494
|
-
function _array_without_holes$1(arr) {
|
|
3495
|
-
if (Array.isArray(arr)) return _array_like_to_array$1(arr);
|
|
3496
|
-
}
|
|
3497
|
-
function _iterable_to_array$1(iter) {
|
|
3498
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
3499
|
-
}
|
|
3500
|
-
function _non_iterable_spread$1() {
|
|
3501
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3502
|
-
}
|
|
3503
|
-
function _to_consumable_array$1(arr) {
|
|
3504
|
-
return _array_without_holes$1(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_spread$1();
|
|
3505
|
-
}
|
|
3506
|
-
function _unsupported_iterable_to_array$1(o, minLen) {
|
|
3507
|
-
if (!o) return;
|
|
3508
|
-
if (typeof o === "string") return _array_like_to_array$1(o, minLen);
|
|
3509
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3510
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3511
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3512
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
3513
|
-
}
|
|
3514
|
-
/**
|
|
3515
|
-
* Creates data describing a specific selector.
|
|
3516
|
-
*/ function createElementSelectorData(selector) {
|
|
3517
|
-
return {
|
|
3518
|
-
value: selector,
|
|
3519
|
-
include: false
|
|
3520
|
-
};
|
|
3521
|
-
}
|
|
3522
|
-
/**
|
|
3523
|
-
* Creates data describing an element within CssSelector chain.
|
|
3524
|
-
*/ function createElementData(element, selectorTypes) {
|
|
3525
|
-
var operator = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : OPERATOR.NONE;
|
|
3526
|
-
var selectors = {};
|
|
3527
|
-
selectorTypes.forEach(function(selectorType) {
|
|
3528
|
-
Reflect.set(selectors, selectorType, getElementSelectorsByType(element, selectorType).map(createElementSelectorData));
|
|
3529
|
-
});
|
|
3530
|
-
return {
|
|
3531
|
-
element: element,
|
|
3532
|
-
operator: operator,
|
|
3533
|
-
selectors: selectors
|
|
3534
|
-
};
|
|
3535
|
-
}
|
|
3536
|
-
/**
|
|
3537
|
-
* Constructs selector from element data.
|
|
3538
|
-
*/ function constructElementSelector(param) {
|
|
3539
|
-
var selectors = param.selectors, operator = param.operator;
|
|
3540
|
-
var pattern = _to_consumable_array$1(SELECTOR_PATTERN);
|
|
3541
|
-
// `nthoftype` already contains tag
|
|
3542
|
-
if (selectors[CSS_SELECTOR_TYPE.tag] && selectors[CSS_SELECTOR_TYPE.nthoftype]) {
|
|
3543
|
-
pattern = pattern.filter(function(item) {
|
|
3544
|
-
return item !== CSS_SELECTOR_TYPE.tag;
|
|
3545
|
-
});
|
|
3546
|
-
}
|
|
3547
|
-
var selector = "";
|
|
3548
|
-
pattern.forEach(function(selectorType) {
|
|
3549
|
-
var _a;
|
|
3550
|
-
var selectorsOfType = (_a = selectors[selectorType]) !== null && _a !== void 0 ? _a : [];
|
|
3551
|
-
selectorsOfType.forEach(function(param) {
|
|
3552
|
-
var value = param.value, include = param.include;
|
|
3553
|
-
if (include) {
|
|
3554
|
-
selector += value;
|
|
3555
|
-
}
|
|
3556
|
-
});
|
|
3557
|
-
});
|
|
3558
|
-
return operator + selector;
|
|
3559
|
-
}
|
|
3560
|
-
|
|
3561
|
-
function _array_like_to_array(arr, len) {
|
|
3562
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
3563
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
3564
|
-
return arr2;
|
|
3565
|
-
}
|
|
3566
|
-
function _array_without_holes(arr) {
|
|
3567
|
-
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
|
3568
|
-
}
|
|
3569
|
-
function _iterable_to_array(iter) {
|
|
3570
|
-
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
3571
|
-
}
|
|
3572
|
-
function _non_iterable_spread() {
|
|
3573
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3574
|
-
}
|
|
3575
|
-
function _to_consumable_array(arr) {
|
|
3576
|
-
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
|
3577
|
-
}
|
|
3578
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
3579
|
-
if (!o) return;
|
|
3580
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
3581
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
3582
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
3583
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
3584
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
3585
|
-
}
|
|
3586
|
-
/**
|
|
3587
|
-
* Creates fallback selector for single element.
|
|
3588
|
-
*/ function getElementFallbackSelector(element, root) {
|
|
3589
|
-
var parentElements = getElementParents(element, root).reverse();
|
|
3590
|
-
var elementsData = parentElements.map(function(element) {
|
|
3591
|
-
var _a;
|
|
3592
|
-
var elementData = createElementData(element, [
|
|
3593
|
-
CSS_SELECTOR_TYPE.nthchild
|
|
3594
|
-
], OPERATOR.CHILD);
|
|
3595
|
-
((_a = elementData.selectors.nthchild) !== null && _a !== void 0 ? _a : []).forEach(function(selectorData) {
|
|
3596
|
-
selectorData.include = true;
|
|
3597
|
-
});
|
|
3598
|
-
return elementData;
|
|
3599
|
-
});
|
|
3600
|
-
return [
|
|
3601
|
-
root ? ":scope" : ":root"
|
|
3602
|
-
].concat(_to_consumable_array(elementsData.map(constructElementSelector))).join("");
|
|
3603
|
-
}
|
|
3604
|
-
/**
|
|
3605
|
-
* Creates chain of :nth-child selectors from root to the elements.
|
|
3606
|
-
*/ function getFallbackSelector(elements, root) {
|
|
3607
|
-
return elements.map(function(element) {
|
|
3608
|
-
return getElementFallbackSelector(element, root);
|
|
3609
|
-
}).join(SELECTOR_SEPARATOR);
|
|
3610
|
-
}
|
|
3611
|
-
|
|
3612
|
-
/**
|
|
3613
|
-
* Generates unique CSS selector for an element.
|
|
3614
|
-
*/ function getCssSelector$1(needle) {
|
|
3615
|
-
var custom_options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3616
|
-
var _a;
|
|
3617
|
-
var elements = sanitizeSelectorNeedle(needle);
|
|
3618
|
-
var options = sanitizeOptions(elements[0], custom_options);
|
|
3619
|
-
var root = (_a = options.root) !== null && _a !== void 0 ? _a : getRootNode(elements[0]);
|
|
3620
|
-
var partialSelector = "";
|
|
3621
|
-
var currentRoot = root;
|
|
3622
|
-
/**
|
|
3623
|
-
* Utility function to make subsequent calls shorter.
|
|
3624
|
-
*/ function updateIdentifiableParent() {
|
|
3625
|
-
return getClosestIdentifiableParent(elements, currentRoot, partialSelector, options);
|
|
3626
|
-
}
|
|
3627
|
-
var closestIdentifiableParent = updateIdentifiableParent();
|
|
3628
|
-
while(closestIdentifiableParent){
|
|
3629
|
-
var foundElements = closestIdentifiableParent.foundElements, selector = closestIdentifiableParent.selector;
|
|
3630
|
-
if (testSelector(elements, selector, root)) {
|
|
3631
|
-
return selector;
|
|
3632
|
-
}
|
|
3633
|
-
currentRoot = foundElements[0];
|
|
3634
|
-
partialSelector = selector;
|
|
3635
|
-
closestIdentifiableParent = updateIdentifiableParent();
|
|
3636
|
-
}
|
|
3637
|
-
// if failed to find single selector matching all elements, try to find
|
|
3638
|
-
// selector for each standalone element and join them together
|
|
3639
|
-
if (elements.length > 1) {
|
|
3640
|
-
return elements.map(function(element) {
|
|
3641
|
-
return getCssSelector$1(element, options);
|
|
3642
|
-
}).join(SELECTOR_SEPARATOR);
|
|
3643
|
-
}
|
|
3644
|
-
return getFallbackSelector(elements, options.useScope ? root : undefined);
|
|
3645
|
-
}
|
|
3646
|
-
|
|
3647
412
|
function unescapeCSS(cssEscapedString) {
|
|
3648
413
|
return cssEscapedString.replace(/\\([0-9A-Fa-f]{1,6})\s?/g, (_match, charCode)=>String.fromCharCode(parseInt(charCode, 16))).replace(/\\/g, '');
|
|
3649
414
|
}
|
|
3650
415
|
function getCssSelector(element, options = {}) {
|
|
3651
|
-
const selector =
|
|
416
|
+
const selector = getCssSelectorOrigin(element, options);
|
|
3652
417
|
return unescapeCSS(selector);
|
|
3653
418
|
}
|
|
3654
419
|
|
|
3655
|
-
class ElementElement extends
|
|
420
|
+
class ElementElement extends lit.LitElement {
|
|
3656
421
|
get content() {
|
|
3657
422
|
return this._content;
|
|
3658
423
|
}
|
|
@@ -3660,7 +425,7 @@ class ElementElement extends i {
|
|
|
3660
425
|
return this._value;
|
|
3661
426
|
}
|
|
3662
427
|
static{
|
|
3663
|
-
this.styles =
|
|
428
|
+
this.styles = lit.css`
|
|
3664
429
|
.digipair-input {
|
|
3665
430
|
padding: 10px 15px;
|
|
3666
431
|
margin-bottom: 10px;
|
|
@@ -3777,7 +542,7 @@ class ElementElement extends i {
|
|
|
3777
542
|
}
|
|
3778
543
|
}
|
|
3779
544
|
render() {
|
|
3780
|
-
return
|
|
545
|
+
return lit.html`
|
|
3781
546
|
<section
|
|
3782
547
|
class="digipair-input ${this.state}"
|
|
3783
548
|
@click=${()=>[
|
|
@@ -3785,17 +550,17 @@ class ElementElement extends i {
|
|
|
3785
550
|
'loaded'
|
|
3786
551
|
].indexOf(this.state) >= 0 ? this.loadElement() : void 0}
|
|
3787
552
|
>
|
|
3788
|
-
${this.state === 'loaded' ?
|
|
553
|
+
${this.state === 'loaded' ? lit.html`
|
|
3789
554
|
<ui5-icon name="attachment"></ui5-icon>
|
|
3790
555
|
<p>${this.label}<br />${this._content}</p>
|
|
3791
|
-
` : this.state === 'selecting' ?
|
|
556
|
+
` : this.state === 'selecting' ? lit.html` <ui5-icon name="locate-me"></ui5-icon>
|
|
3792
557
|
<p>
|
|
3793
|
-
${this.label}${document.querySelector('.digipair-input-element-selecting') ?
|
|
558
|
+
${this.label}${document.querySelector('.digipair-input-element-selecting') ? lit.html`<br />$(${getCssSelector(document.querySelector('.digipair-input-element-selecting'), {
|
|
3794
559
|
blacklist: [
|
|
3795
560
|
'.digipair-input-element-selecting'
|
|
3796
561
|
]
|
|
3797
|
-
})})` :
|
|
3798
|
-
</p>` :
|
|
562
|
+
})})` : lit.nothing}
|
|
563
|
+
</p>` : lit.html` <ui5-icon name="add-document"></ui5-icon>
|
|
3799
564
|
<p>${this.label}</p>`}
|
|
3800
565
|
</section>
|
|
3801
566
|
`;
|
|
@@ -3812,28 +577,28 @@ class ElementElement extends i {
|
|
|
3812
577
|
}
|
|
3813
578
|
}
|
|
3814
579
|
__decorate([
|
|
3815
|
-
|
|
580
|
+
decorators_js.property()
|
|
3816
581
|
], ElementElement.prototype, "label", void 0);
|
|
3817
582
|
__decorate([
|
|
3818
|
-
|
|
583
|
+
decorators_js.property()
|
|
3819
584
|
], ElementElement.prototype, "selector", void 0);
|
|
3820
585
|
__decorate([
|
|
3821
|
-
|
|
586
|
+
decorators_js.property()
|
|
3822
587
|
], ElementElement.prototype, "filter", void 0);
|
|
3823
588
|
__decorate([
|
|
3824
|
-
|
|
589
|
+
decorators_js.property()
|
|
3825
590
|
], ElementElement.prototype, "required", void 0);
|
|
3826
591
|
__decorate([
|
|
3827
|
-
|
|
592
|
+
decorators_js.state()
|
|
3828
593
|
], ElementElement.prototype, "state", void 0);
|
|
3829
594
|
__decorate([
|
|
3830
|
-
|
|
595
|
+
decorators_js.state()
|
|
3831
596
|
], ElementElement.prototype, "_content", void 0);
|
|
3832
597
|
ElementElement = __decorate([
|
|
3833
|
-
|
|
598
|
+
decorators_js.customElement('digipair-input-element')
|
|
3834
599
|
], ElementElement);
|
|
3835
600
|
|
|
3836
|
-
class FetchElement extends
|
|
601
|
+
class FetchElement extends lit.LitElement {
|
|
3837
602
|
get value() {
|
|
3838
603
|
return this._value;
|
|
3839
604
|
}
|
|
@@ -3855,7 +620,7 @@ class FetchElement extends i {
|
|
|
3855
620
|
}));
|
|
3856
621
|
}
|
|
3857
622
|
render() {
|
|
3858
|
-
return
|
|
623
|
+
return lit.html``;
|
|
3859
624
|
}
|
|
3860
625
|
constructor(...args){
|
|
3861
626
|
super(...args);
|
|
@@ -3864,23 +629,23 @@ class FetchElement extends i {
|
|
|
3864
629
|
}
|
|
3865
630
|
}
|
|
3866
631
|
__decorate([
|
|
3867
|
-
|
|
632
|
+
decorators_js.property(),
|
|
3868
633
|
__metadata("design:type", String)
|
|
3869
634
|
], FetchElement.prototype, "url", void 0);
|
|
3870
635
|
__decorate([
|
|
3871
|
-
|
|
636
|
+
decorators_js.property(),
|
|
3872
637
|
__metadata("design:type", String)
|
|
3873
638
|
], FetchElement.prototype, "type", void 0);
|
|
3874
639
|
__decorate([
|
|
3875
|
-
|
|
640
|
+
decorators_js.property()
|
|
3876
641
|
], FetchElement.prototype, "required", void 0);
|
|
3877
642
|
FetchElement = __decorate([
|
|
3878
|
-
|
|
643
|
+
decorators_js.customElement('digipair-input-fetch')
|
|
3879
644
|
], FetchElement);
|
|
3880
645
|
|
|
3881
|
-
class HiddenElement extends
|
|
646
|
+
class HiddenElement extends lit.LitElement {
|
|
3882
647
|
render() {
|
|
3883
|
-
return
|
|
648
|
+
return lit.html``;
|
|
3884
649
|
}
|
|
3885
650
|
constructor(...args){
|
|
3886
651
|
super(...args);
|
|
@@ -3889,13 +654,13 @@ class HiddenElement extends i {
|
|
|
3889
654
|
}
|
|
3890
655
|
}
|
|
3891
656
|
__decorate([
|
|
3892
|
-
|
|
657
|
+
decorators_js.property()
|
|
3893
658
|
], HiddenElement.prototype, "value", void 0);
|
|
3894
659
|
__decorate([
|
|
3895
|
-
|
|
660
|
+
decorators_js.property()
|
|
3896
661
|
], HiddenElement.prototype, "required", void 0);
|
|
3897
662
|
HiddenElement = __decorate([
|
|
3898
|
-
|
|
663
|
+
decorators_js.customElement('digipair-input-hidden')
|
|
3899
664
|
], HiddenElement);
|
|
3900
665
|
|
|
3901
666
|
exports.DomAttributeElement = DomAttributeElement;
|