@gospore/checkbox 1.0.7
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/LICENSE +0 -0
- package/README.md +1 -0
- package/dist/checkbox.es.js +1408 -0
- package/dist/checkbox.umd.js +458 -0
- package/dist/style.css +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,1408 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com
|
|
3
|
+
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
4
|
+
*/
|
|
5
|
+
function _classCallCheck(instance, Constructor) {
|
|
6
|
+
if (!(instance instanceof Constructor)) {
|
|
7
|
+
throw new TypeError("Cannot call a class as a function");
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function _defineProperties(target, props) {
|
|
11
|
+
for (var i = 0; i < props.length; i++) {
|
|
12
|
+
var descriptor = props[i];
|
|
13
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
14
|
+
descriptor.configurable = true;
|
|
15
|
+
if ("value" in descriptor)
|
|
16
|
+
descriptor.writable = true;
|
|
17
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
21
|
+
if (protoProps)
|
|
22
|
+
_defineProperties(Constructor.prototype, protoProps);
|
|
23
|
+
if (staticProps)
|
|
24
|
+
_defineProperties(Constructor, staticProps);
|
|
25
|
+
return Constructor;
|
|
26
|
+
}
|
|
27
|
+
function _defineProperty(obj, key, value) {
|
|
28
|
+
if (key in obj) {
|
|
29
|
+
Object.defineProperty(obj, key, {
|
|
30
|
+
value,
|
|
31
|
+
enumerable: true,
|
|
32
|
+
configurable: true,
|
|
33
|
+
writable: true
|
|
34
|
+
});
|
|
35
|
+
} else {
|
|
36
|
+
obj[key] = value;
|
|
37
|
+
}
|
|
38
|
+
return obj;
|
|
39
|
+
}
|
|
40
|
+
function _objectSpread(target) {
|
|
41
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
42
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
43
|
+
var ownKeys = Object.keys(source);
|
|
44
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
45
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
46
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
ownKeys.forEach(function(key) {
|
|
50
|
+
_defineProperty(target, key, source[key]);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return target;
|
|
54
|
+
}
|
|
55
|
+
function _slicedToArray(arr, i) {
|
|
56
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
|
|
57
|
+
}
|
|
58
|
+
function _arrayWithHoles(arr) {
|
|
59
|
+
if (Array.isArray(arr))
|
|
60
|
+
return arr;
|
|
61
|
+
}
|
|
62
|
+
function _iterableToArrayLimit(arr, i) {
|
|
63
|
+
var _arr = [];
|
|
64
|
+
var _n = true;
|
|
65
|
+
var _d = false;
|
|
66
|
+
var _e = void 0;
|
|
67
|
+
try {
|
|
68
|
+
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
|
|
69
|
+
_arr.push(_s.value);
|
|
70
|
+
if (i && _arr.length === i)
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
} catch (err) {
|
|
74
|
+
_d = true;
|
|
75
|
+
_e = err;
|
|
76
|
+
} finally {
|
|
77
|
+
try {
|
|
78
|
+
if (!_n && _i["return"] != null)
|
|
79
|
+
_i["return"]();
|
|
80
|
+
} finally {
|
|
81
|
+
if (_d)
|
|
82
|
+
throw _e;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return _arr;
|
|
86
|
+
}
|
|
87
|
+
function _nonIterableRest() {
|
|
88
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
|
89
|
+
}
|
|
90
|
+
var noop = function noop2() {
|
|
91
|
+
};
|
|
92
|
+
var _WINDOW = {};
|
|
93
|
+
var _DOCUMENT = {};
|
|
94
|
+
var _MUTATION_OBSERVER = null;
|
|
95
|
+
var _PERFORMANCE = {
|
|
96
|
+
mark: noop,
|
|
97
|
+
measure: noop
|
|
98
|
+
};
|
|
99
|
+
try {
|
|
100
|
+
if (typeof window !== "undefined")
|
|
101
|
+
_WINDOW = window;
|
|
102
|
+
if (typeof document !== "undefined")
|
|
103
|
+
_DOCUMENT = document;
|
|
104
|
+
if (typeof MutationObserver !== "undefined")
|
|
105
|
+
_MUTATION_OBSERVER = MutationObserver;
|
|
106
|
+
if (typeof performance !== "undefined")
|
|
107
|
+
_PERFORMANCE = performance;
|
|
108
|
+
} catch (e) {
|
|
109
|
+
}
|
|
110
|
+
var _ref = _WINDOW.navigator || {}, _ref$userAgent = _ref.userAgent, userAgent = _ref$userAgent === void 0 ? "" : _ref$userAgent;
|
|
111
|
+
var WINDOW = _WINDOW;
|
|
112
|
+
var DOCUMENT = _DOCUMENT;
|
|
113
|
+
var PERFORMANCE = _PERFORMANCE;
|
|
114
|
+
!!WINDOW.document;
|
|
115
|
+
var IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === "function" && typeof DOCUMENT.createElement === "function";
|
|
116
|
+
~userAgent.indexOf("MSIE") || ~userAgent.indexOf("Trident/");
|
|
117
|
+
var NAMESPACE_IDENTIFIER = "___FONT_AWESOME___";
|
|
118
|
+
var DEFAULT_FAMILY_PREFIX = "fa";
|
|
119
|
+
var DEFAULT_REPLACEMENT_CLASS = "svg-inline--fa";
|
|
120
|
+
var DATA_FA_I2SVG = "data-fa-i2svg";
|
|
121
|
+
(function() {
|
|
122
|
+
try {
|
|
123
|
+
return true;
|
|
124
|
+
} catch (e) {
|
|
125
|
+
return false;
|
|
126
|
+
}
|
|
127
|
+
})();
|
|
128
|
+
var DUOTONE_CLASSES = {
|
|
129
|
+
GROUP: "group",
|
|
130
|
+
SWAP_OPACITY: "swap-opacity",
|
|
131
|
+
PRIMARY: "primary",
|
|
132
|
+
SECONDARY: "secondary"
|
|
133
|
+
};
|
|
134
|
+
var initial = WINDOW.FontAwesomeConfig || {};
|
|
135
|
+
function getAttrConfig(attr) {
|
|
136
|
+
var element = DOCUMENT.querySelector("script[" + attr + "]");
|
|
137
|
+
if (element) {
|
|
138
|
+
return element.getAttribute(attr);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function coerce(val) {
|
|
142
|
+
if (val === "")
|
|
143
|
+
return true;
|
|
144
|
+
if (val === "false")
|
|
145
|
+
return false;
|
|
146
|
+
if (val === "true")
|
|
147
|
+
return true;
|
|
148
|
+
return val;
|
|
149
|
+
}
|
|
150
|
+
if (DOCUMENT && typeof DOCUMENT.querySelector === "function") {
|
|
151
|
+
var attrs = [["data-family-prefix", "familyPrefix"], ["data-replacement-class", "replacementClass"], ["data-auto-replace-svg", "autoReplaceSvg"], ["data-auto-add-css", "autoAddCss"], ["data-auto-a11y", "autoA11y"], ["data-search-pseudo-elements", "searchPseudoElements"], ["data-observe-mutations", "observeMutations"], ["data-mutate-approach", "mutateApproach"], ["data-keep-original-source", "keepOriginalSource"], ["data-measure-performance", "measurePerformance"], ["data-show-missing-icons", "showMissingIcons"]];
|
|
152
|
+
attrs.forEach(function(_ref2) {
|
|
153
|
+
var _ref22 = _slicedToArray(_ref2, 2), attr = _ref22[0], key = _ref22[1];
|
|
154
|
+
var val = coerce(getAttrConfig(attr));
|
|
155
|
+
if (val !== void 0 && val !== null) {
|
|
156
|
+
initial[key] = val;
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
var _default = {
|
|
161
|
+
familyPrefix: DEFAULT_FAMILY_PREFIX,
|
|
162
|
+
replacementClass: DEFAULT_REPLACEMENT_CLASS,
|
|
163
|
+
autoReplaceSvg: true,
|
|
164
|
+
autoAddCss: true,
|
|
165
|
+
autoA11y: true,
|
|
166
|
+
searchPseudoElements: false,
|
|
167
|
+
observeMutations: true,
|
|
168
|
+
mutateApproach: "async",
|
|
169
|
+
keepOriginalSource: true,
|
|
170
|
+
measurePerformance: false,
|
|
171
|
+
showMissingIcons: true
|
|
172
|
+
};
|
|
173
|
+
var _config = _objectSpread({}, _default, initial);
|
|
174
|
+
if (!_config.autoReplaceSvg)
|
|
175
|
+
_config.observeMutations = false;
|
|
176
|
+
var config = _objectSpread({}, _config);
|
|
177
|
+
WINDOW.FontAwesomeConfig = config;
|
|
178
|
+
var w = WINDOW || {};
|
|
179
|
+
if (!w[NAMESPACE_IDENTIFIER])
|
|
180
|
+
w[NAMESPACE_IDENTIFIER] = {};
|
|
181
|
+
if (!w[NAMESPACE_IDENTIFIER].styles)
|
|
182
|
+
w[NAMESPACE_IDENTIFIER].styles = {};
|
|
183
|
+
if (!w[NAMESPACE_IDENTIFIER].hooks)
|
|
184
|
+
w[NAMESPACE_IDENTIFIER].hooks = {};
|
|
185
|
+
if (!w[NAMESPACE_IDENTIFIER].shims)
|
|
186
|
+
w[NAMESPACE_IDENTIFIER].shims = [];
|
|
187
|
+
var namespace = w[NAMESPACE_IDENTIFIER];
|
|
188
|
+
var functions = [];
|
|
189
|
+
var listener = function listener2() {
|
|
190
|
+
DOCUMENT.removeEventListener("DOMContentLoaded", listener2);
|
|
191
|
+
loaded = 1;
|
|
192
|
+
functions.map(function(fn) {
|
|
193
|
+
return fn();
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
var loaded = false;
|
|
197
|
+
if (IS_DOM) {
|
|
198
|
+
loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
|
|
199
|
+
if (!loaded)
|
|
200
|
+
DOCUMENT.addEventListener("DOMContentLoaded", listener);
|
|
201
|
+
}
|
|
202
|
+
typeof global !== "undefined" && typeof global.process !== "undefined" && typeof global.process.emit === "function";
|
|
203
|
+
typeof setImmediate === "undefined" ? setTimeout : setImmediate;
|
|
204
|
+
var meaninglessTransform = {
|
|
205
|
+
size: 16,
|
|
206
|
+
x: 0,
|
|
207
|
+
y: 0,
|
|
208
|
+
rotate: 0,
|
|
209
|
+
flipX: false,
|
|
210
|
+
flipY: false
|
|
211
|
+
};
|
|
212
|
+
function insertCss(css2) {
|
|
213
|
+
if (!css2 || !IS_DOM) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
var style = DOCUMENT.createElement("style");
|
|
217
|
+
style.setAttribute("type", "text/css");
|
|
218
|
+
style.innerHTML = css2;
|
|
219
|
+
var headChildren = DOCUMENT.head.childNodes;
|
|
220
|
+
var beforeChild = null;
|
|
221
|
+
for (var i = headChildren.length - 1; i > -1; i--) {
|
|
222
|
+
var child = headChildren[i];
|
|
223
|
+
var tagName = (child.tagName || "").toUpperCase();
|
|
224
|
+
if (["STYLE", "LINK"].indexOf(tagName) > -1) {
|
|
225
|
+
beforeChild = child;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
DOCUMENT.head.insertBefore(style, beforeChild);
|
|
229
|
+
return css2;
|
|
230
|
+
}
|
|
231
|
+
var idPool = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
232
|
+
function nextUniqueId() {
|
|
233
|
+
var size = 12;
|
|
234
|
+
var id = "";
|
|
235
|
+
while (size-- > 0) {
|
|
236
|
+
id += idPool[Math.random() * 62 | 0];
|
|
237
|
+
}
|
|
238
|
+
return id;
|
|
239
|
+
}
|
|
240
|
+
function htmlEscape(str) {
|
|
241
|
+
return "".concat(str).replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">");
|
|
242
|
+
}
|
|
243
|
+
function joinAttributes(attributes) {
|
|
244
|
+
return Object.keys(attributes || {}).reduce(function(acc, attributeName) {
|
|
245
|
+
return acc + "".concat(attributeName, '="').concat(htmlEscape(attributes[attributeName]), '" ');
|
|
246
|
+
}, "").trim();
|
|
247
|
+
}
|
|
248
|
+
function joinStyles(styles2) {
|
|
249
|
+
return Object.keys(styles2 || {}).reduce(function(acc, styleName) {
|
|
250
|
+
return acc + "".concat(styleName, ": ").concat(styles2[styleName], ";");
|
|
251
|
+
}, "");
|
|
252
|
+
}
|
|
253
|
+
function transformIsMeaningful(transform2) {
|
|
254
|
+
return transform2.size !== meaninglessTransform.size || transform2.x !== meaninglessTransform.x || transform2.y !== meaninglessTransform.y || transform2.rotate !== meaninglessTransform.rotate || transform2.flipX || transform2.flipY;
|
|
255
|
+
}
|
|
256
|
+
function transformForSvg(_ref2) {
|
|
257
|
+
var transform2 = _ref2.transform, containerWidth = _ref2.containerWidth, iconWidth = _ref2.iconWidth;
|
|
258
|
+
var outer = {
|
|
259
|
+
transform: "translate(".concat(containerWidth / 2, " 256)")
|
|
260
|
+
};
|
|
261
|
+
var innerTranslate = "translate(".concat(transform2.x * 32, ", ").concat(transform2.y * 32, ") ");
|
|
262
|
+
var innerScale = "scale(".concat(transform2.size / 16 * (transform2.flipX ? -1 : 1), ", ").concat(transform2.size / 16 * (transform2.flipY ? -1 : 1), ") ");
|
|
263
|
+
var innerRotate = "rotate(".concat(transform2.rotate, " 0 0)");
|
|
264
|
+
var inner = {
|
|
265
|
+
transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
|
|
266
|
+
};
|
|
267
|
+
var path = {
|
|
268
|
+
transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
|
|
269
|
+
};
|
|
270
|
+
return {
|
|
271
|
+
outer,
|
|
272
|
+
inner,
|
|
273
|
+
path
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
var ALL_SPACE = {
|
|
277
|
+
x: 0,
|
|
278
|
+
y: 0,
|
|
279
|
+
width: "100%",
|
|
280
|
+
height: "100%"
|
|
281
|
+
};
|
|
282
|
+
function fillBlack(abstract) {
|
|
283
|
+
var force = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
284
|
+
if (abstract.attributes && (abstract.attributes.fill || force)) {
|
|
285
|
+
abstract.attributes.fill = "black";
|
|
286
|
+
}
|
|
287
|
+
return abstract;
|
|
288
|
+
}
|
|
289
|
+
function deGroup(abstract) {
|
|
290
|
+
if (abstract.tag === "g") {
|
|
291
|
+
return abstract.children;
|
|
292
|
+
} else {
|
|
293
|
+
return [abstract];
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
function makeIconMasking(_ref2) {
|
|
297
|
+
var children = _ref2.children, attributes = _ref2.attributes, main = _ref2.main, mask = _ref2.mask, explicitMaskId = _ref2.maskId, transform2 = _ref2.transform;
|
|
298
|
+
var mainWidth = main.width, mainPath = main.icon;
|
|
299
|
+
var maskWidth = mask.width, maskPath = mask.icon;
|
|
300
|
+
var trans = transformForSvg({
|
|
301
|
+
transform: transform2,
|
|
302
|
+
containerWidth: maskWidth,
|
|
303
|
+
iconWidth: mainWidth
|
|
304
|
+
});
|
|
305
|
+
var maskRect = {
|
|
306
|
+
tag: "rect",
|
|
307
|
+
attributes: _objectSpread({}, ALL_SPACE, {
|
|
308
|
+
fill: "white"
|
|
309
|
+
})
|
|
310
|
+
};
|
|
311
|
+
var maskInnerGroupChildrenMixin = mainPath.children ? {
|
|
312
|
+
children: mainPath.children.map(fillBlack)
|
|
313
|
+
} : {};
|
|
314
|
+
var maskInnerGroup = {
|
|
315
|
+
tag: "g",
|
|
316
|
+
attributes: _objectSpread({}, trans.inner),
|
|
317
|
+
children: [fillBlack(_objectSpread({
|
|
318
|
+
tag: mainPath.tag,
|
|
319
|
+
attributes: _objectSpread({}, mainPath.attributes, trans.path)
|
|
320
|
+
}, maskInnerGroupChildrenMixin))]
|
|
321
|
+
};
|
|
322
|
+
var maskOuterGroup = {
|
|
323
|
+
tag: "g",
|
|
324
|
+
attributes: _objectSpread({}, trans.outer),
|
|
325
|
+
children: [maskInnerGroup]
|
|
326
|
+
};
|
|
327
|
+
var maskId = "mask-".concat(explicitMaskId || nextUniqueId());
|
|
328
|
+
var clipId = "clip-".concat(explicitMaskId || nextUniqueId());
|
|
329
|
+
var maskTag = {
|
|
330
|
+
tag: "mask",
|
|
331
|
+
attributes: _objectSpread({}, ALL_SPACE, {
|
|
332
|
+
id: maskId,
|
|
333
|
+
maskUnits: "userSpaceOnUse",
|
|
334
|
+
maskContentUnits: "userSpaceOnUse"
|
|
335
|
+
}),
|
|
336
|
+
children: [maskRect, maskOuterGroup]
|
|
337
|
+
};
|
|
338
|
+
var defs = {
|
|
339
|
+
tag: "defs",
|
|
340
|
+
children: [{
|
|
341
|
+
tag: "clipPath",
|
|
342
|
+
attributes: {
|
|
343
|
+
id: clipId
|
|
344
|
+
},
|
|
345
|
+
children: deGroup(maskPath)
|
|
346
|
+
}, maskTag]
|
|
347
|
+
};
|
|
348
|
+
children.push(defs, {
|
|
349
|
+
tag: "rect",
|
|
350
|
+
attributes: _objectSpread({
|
|
351
|
+
fill: "currentColor",
|
|
352
|
+
"clip-path": "url(#".concat(clipId, ")"),
|
|
353
|
+
mask: "url(#".concat(maskId, ")")
|
|
354
|
+
}, ALL_SPACE)
|
|
355
|
+
});
|
|
356
|
+
return {
|
|
357
|
+
children,
|
|
358
|
+
attributes
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
function makeIconStandard(_ref2) {
|
|
362
|
+
var children = _ref2.children, attributes = _ref2.attributes, main = _ref2.main, transform2 = _ref2.transform, styles2 = _ref2.styles;
|
|
363
|
+
var styleString = joinStyles(styles2);
|
|
364
|
+
if (styleString.length > 0) {
|
|
365
|
+
attributes["style"] = styleString;
|
|
366
|
+
}
|
|
367
|
+
if (transformIsMeaningful(transform2)) {
|
|
368
|
+
var trans = transformForSvg({
|
|
369
|
+
transform: transform2,
|
|
370
|
+
containerWidth: main.width,
|
|
371
|
+
iconWidth: main.width
|
|
372
|
+
});
|
|
373
|
+
children.push({
|
|
374
|
+
tag: "g",
|
|
375
|
+
attributes: _objectSpread({}, trans.outer),
|
|
376
|
+
children: [{
|
|
377
|
+
tag: "g",
|
|
378
|
+
attributes: _objectSpread({}, trans.inner),
|
|
379
|
+
children: [{
|
|
380
|
+
tag: main.icon.tag,
|
|
381
|
+
children: main.icon.children,
|
|
382
|
+
attributes: _objectSpread({}, main.icon.attributes, trans.path)
|
|
383
|
+
}]
|
|
384
|
+
}]
|
|
385
|
+
});
|
|
386
|
+
} else {
|
|
387
|
+
children.push(main.icon);
|
|
388
|
+
}
|
|
389
|
+
return {
|
|
390
|
+
children,
|
|
391
|
+
attributes
|
|
392
|
+
};
|
|
393
|
+
}
|
|
394
|
+
function asIcon(_ref2) {
|
|
395
|
+
var children = _ref2.children, main = _ref2.main, mask = _ref2.mask, attributes = _ref2.attributes, styles2 = _ref2.styles, transform2 = _ref2.transform;
|
|
396
|
+
if (transformIsMeaningful(transform2) && main.found && !mask.found) {
|
|
397
|
+
var width = main.width, height = main.height;
|
|
398
|
+
var offset = {
|
|
399
|
+
x: width / height / 2,
|
|
400
|
+
y: 0.5
|
|
401
|
+
};
|
|
402
|
+
attributes["style"] = joinStyles(_objectSpread({}, styles2, {
|
|
403
|
+
"transform-origin": "".concat(offset.x + transform2.x / 16, "em ").concat(offset.y + transform2.y / 16, "em")
|
|
404
|
+
}));
|
|
405
|
+
}
|
|
406
|
+
return [{
|
|
407
|
+
tag: "svg",
|
|
408
|
+
attributes,
|
|
409
|
+
children
|
|
410
|
+
}];
|
|
411
|
+
}
|
|
412
|
+
function asSymbol(_ref2) {
|
|
413
|
+
var prefix = _ref2.prefix, iconName = _ref2.iconName, children = _ref2.children, attributes = _ref2.attributes, symbol = _ref2.symbol;
|
|
414
|
+
var id = symbol === true ? "".concat(prefix, "-").concat(config.familyPrefix, "-").concat(iconName) : symbol;
|
|
415
|
+
return [{
|
|
416
|
+
tag: "svg",
|
|
417
|
+
attributes: {
|
|
418
|
+
style: "display: none;"
|
|
419
|
+
},
|
|
420
|
+
children: [{
|
|
421
|
+
tag: "symbol",
|
|
422
|
+
attributes: _objectSpread({}, attributes, {
|
|
423
|
+
id
|
|
424
|
+
}),
|
|
425
|
+
children
|
|
426
|
+
}]
|
|
427
|
+
}];
|
|
428
|
+
}
|
|
429
|
+
function makeInlineSvgAbstract(params) {
|
|
430
|
+
var _params$icons = params.icons, main = _params$icons.main, mask = _params$icons.mask, prefix = params.prefix, iconName = params.iconName, transform2 = params.transform, symbol = params.symbol, title = params.title, maskId = params.maskId, titleId = params.titleId, extra = params.extra, _params$watchable = params.watchable, watchable = _params$watchable === void 0 ? false : _params$watchable;
|
|
431
|
+
var _ref2 = mask.found ? mask : main, width = _ref2.width, height = _ref2.height;
|
|
432
|
+
var isUploadedIcon = prefix === "fak";
|
|
433
|
+
var widthClass = isUploadedIcon ? "" : "fa-w-".concat(Math.ceil(width / height * 16));
|
|
434
|
+
var attrClass = [config.replacementClass, iconName ? "".concat(config.familyPrefix, "-").concat(iconName) : "", widthClass].filter(function(c) {
|
|
435
|
+
return extra.classes.indexOf(c) === -1;
|
|
436
|
+
}).filter(function(c) {
|
|
437
|
+
return c !== "" || !!c;
|
|
438
|
+
}).concat(extra.classes).join(" ");
|
|
439
|
+
var content = {
|
|
440
|
+
children: [],
|
|
441
|
+
attributes: _objectSpread({}, extra.attributes, {
|
|
442
|
+
"data-prefix": prefix,
|
|
443
|
+
"data-icon": iconName,
|
|
444
|
+
"class": attrClass,
|
|
445
|
+
"role": extra.attributes.role || "img",
|
|
446
|
+
"xmlns": "http://www.w3.org/2000/svg",
|
|
447
|
+
"viewBox": "0 0 ".concat(width, " ").concat(height)
|
|
448
|
+
})
|
|
449
|
+
};
|
|
450
|
+
var uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf("fa-fw") ? {
|
|
451
|
+
width: "".concat(width / height * 16 * 0.0625, "em")
|
|
452
|
+
} : {};
|
|
453
|
+
if (watchable) {
|
|
454
|
+
content.attributes[DATA_FA_I2SVG] = "";
|
|
455
|
+
}
|
|
456
|
+
if (title)
|
|
457
|
+
content.children.push({
|
|
458
|
+
tag: "title",
|
|
459
|
+
attributes: {
|
|
460
|
+
id: content.attributes["aria-labelledby"] || "title-".concat(titleId || nextUniqueId())
|
|
461
|
+
},
|
|
462
|
+
children: [title]
|
|
463
|
+
});
|
|
464
|
+
var args = _objectSpread({}, content, {
|
|
465
|
+
prefix,
|
|
466
|
+
iconName,
|
|
467
|
+
main,
|
|
468
|
+
mask,
|
|
469
|
+
maskId,
|
|
470
|
+
transform: transform2,
|
|
471
|
+
symbol,
|
|
472
|
+
styles: _objectSpread({}, uploadedIconWidthStyle, extra.styles)
|
|
473
|
+
});
|
|
474
|
+
var _ref22 = mask.found && main.found ? makeIconMasking(args) : makeIconStandard(args), children = _ref22.children, attributes = _ref22.attributes;
|
|
475
|
+
args.children = children;
|
|
476
|
+
args.attributes = attributes;
|
|
477
|
+
if (symbol) {
|
|
478
|
+
return asSymbol(args);
|
|
479
|
+
} else {
|
|
480
|
+
return asIcon(args);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
var noop$1 = function noop3() {
|
|
484
|
+
};
|
|
485
|
+
config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {
|
|
486
|
+
mark: noop$1,
|
|
487
|
+
measure: noop$1
|
|
488
|
+
};
|
|
489
|
+
var bindInternal4 = function bindInternal42(func, thisContext) {
|
|
490
|
+
return function(a, b, c, d) {
|
|
491
|
+
return func.call(thisContext, a, b, c, d);
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
var reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {
|
|
495
|
+
var keys = Object.keys(subject), length = keys.length, iterator = thisContext !== void 0 ? bindInternal4(fn, thisContext) : fn, i, key, result;
|
|
496
|
+
if (initialValue === void 0) {
|
|
497
|
+
i = 1;
|
|
498
|
+
result = subject[keys[0]];
|
|
499
|
+
} else {
|
|
500
|
+
i = 0;
|
|
501
|
+
result = initialValue;
|
|
502
|
+
}
|
|
503
|
+
for (; i < length; i++) {
|
|
504
|
+
key = keys[i];
|
|
505
|
+
result = iterator(result, subject[key], key, subject);
|
|
506
|
+
}
|
|
507
|
+
return result;
|
|
508
|
+
};
|
|
509
|
+
function defineIcons(prefix, icons) {
|
|
510
|
+
var params = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
511
|
+
var _params$skipHooks = params.skipHooks, skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;
|
|
512
|
+
var normalized = Object.keys(icons).reduce(function(acc, iconName) {
|
|
513
|
+
var icon2 = icons[iconName];
|
|
514
|
+
var expanded = !!icon2.icon;
|
|
515
|
+
if (expanded) {
|
|
516
|
+
acc[icon2.iconName] = icon2.icon;
|
|
517
|
+
} else {
|
|
518
|
+
acc[iconName] = icon2;
|
|
519
|
+
}
|
|
520
|
+
return acc;
|
|
521
|
+
}, {});
|
|
522
|
+
if (typeof namespace.hooks.addPack === "function" && !skipHooks) {
|
|
523
|
+
namespace.hooks.addPack(prefix, normalized);
|
|
524
|
+
} else {
|
|
525
|
+
namespace.styles[prefix] = _objectSpread({}, namespace.styles[prefix] || {}, normalized);
|
|
526
|
+
}
|
|
527
|
+
if (prefix === "fas") {
|
|
528
|
+
defineIcons("fa", icons);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
var styles = namespace.styles, shims = namespace.shims;
|
|
532
|
+
var build = function build2() {
|
|
533
|
+
var lookup = function lookup2(reducer) {
|
|
534
|
+
return reduce(styles, function(o, style, prefix) {
|
|
535
|
+
o[prefix] = reduce(style, reducer, {});
|
|
536
|
+
return o;
|
|
537
|
+
}, {});
|
|
538
|
+
};
|
|
539
|
+
lookup(function(acc, icon2, iconName) {
|
|
540
|
+
if (icon2[3]) {
|
|
541
|
+
acc[icon2[3]] = iconName;
|
|
542
|
+
}
|
|
543
|
+
return acc;
|
|
544
|
+
});
|
|
545
|
+
lookup(function(acc, icon2, iconName) {
|
|
546
|
+
var ligatures = icon2[2];
|
|
547
|
+
acc[iconName] = iconName;
|
|
548
|
+
ligatures.forEach(function(ligature) {
|
|
549
|
+
acc[ligature] = iconName;
|
|
550
|
+
});
|
|
551
|
+
return acc;
|
|
552
|
+
});
|
|
553
|
+
var hasRegular = "far" in styles;
|
|
554
|
+
reduce(shims, function(acc, shim) {
|
|
555
|
+
var oldName = shim[0];
|
|
556
|
+
var prefix = shim[1];
|
|
557
|
+
var iconName = shim[2];
|
|
558
|
+
if (prefix === "far" && !hasRegular) {
|
|
559
|
+
prefix = "fas";
|
|
560
|
+
}
|
|
561
|
+
acc[oldName] = {
|
|
562
|
+
prefix,
|
|
563
|
+
iconName
|
|
564
|
+
};
|
|
565
|
+
return acc;
|
|
566
|
+
}, {});
|
|
567
|
+
};
|
|
568
|
+
build();
|
|
569
|
+
namespace.styles;
|
|
570
|
+
function iconFromMapping(mapping, prefix, iconName) {
|
|
571
|
+
if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
|
|
572
|
+
return {
|
|
573
|
+
prefix,
|
|
574
|
+
iconName,
|
|
575
|
+
icon: mapping[prefix][iconName]
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
function toHtml(abstractNodes) {
|
|
580
|
+
var tag = abstractNodes.tag, _abstractNodes$attrib = abstractNodes.attributes, attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib, _abstractNodes$childr = abstractNodes.children, children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;
|
|
581
|
+
if (typeof abstractNodes === "string") {
|
|
582
|
+
return htmlEscape(abstractNodes);
|
|
583
|
+
} else {
|
|
584
|
+
return "<".concat(tag, " ").concat(joinAttributes(attributes), ">").concat(children.map(toHtml).join(""), "</").concat(tag, ">");
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
var parseTransformString = function parseTransformString2(transformString) {
|
|
588
|
+
var transform2 = {
|
|
589
|
+
size: 16,
|
|
590
|
+
x: 0,
|
|
591
|
+
y: 0,
|
|
592
|
+
flipX: false,
|
|
593
|
+
flipY: false,
|
|
594
|
+
rotate: 0
|
|
595
|
+
};
|
|
596
|
+
if (!transformString) {
|
|
597
|
+
return transform2;
|
|
598
|
+
} else {
|
|
599
|
+
return transformString.toLowerCase().split(" ").reduce(function(acc, n) {
|
|
600
|
+
var parts = n.toLowerCase().split("-");
|
|
601
|
+
var first = parts[0];
|
|
602
|
+
var rest = parts.slice(1).join("-");
|
|
603
|
+
if (first && rest === "h") {
|
|
604
|
+
acc.flipX = true;
|
|
605
|
+
return acc;
|
|
606
|
+
}
|
|
607
|
+
if (first && rest === "v") {
|
|
608
|
+
acc.flipY = true;
|
|
609
|
+
return acc;
|
|
610
|
+
}
|
|
611
|
+
rest = parseFloat(rest);
|
|
612
|
+
if (isNaN(rest)) {
|
|
613
|
+
return acc;
|
|
614
|
+
}
|
|
615
|
+
switch (first) {
|
|
616
|
+
case "grow":
|
|
617
|
+
acc.size = acc.size + rest;
|
|
618
|
+
break;
|
|
619
|
+
case "shrink":
|
|
620
|
+
acc.size = acc.size - rest;
|
|
621
|
+
break;
|
|
622
|
+
case "left":
|
|
623
|
+
acc.x = acc.x - rest;
|
|
624
|
+
break;
|
|
625
|
+
case "right":
|
|
626
|
+
acc.x = acc.x + rest;
|
|
627
|
+
break;
|
|
628
|
+
case "up":
|
|
629
|
+
acc.y = acc.y - rest;
|
|
630
|
+
break;
|
|
631
|
+
case "down":
|
|
632
|
+
acc.y = acc.y + rest;
|
|
633
|
+
break;
|
|
634
|
+
case "rotate":
|
|
635
|
+
acc.rotate = acc.rotate + rest;
|
|
636
|
+
break;
|
|
637
|
+
}
|
|
638
|
+
return acc;
|
|
639
|
+
}, transform2);
|
|
640
|
+
}
|
|
641
|
+
};
|
|
642
|
+
function MissingIcon(error) {
|
|
643
|
+
this.name = "MissingIcon";
|
|
644
|
+
this.message = error || "Icon unavailable";
|
|
645
|
+
this.stack = new Error().stack;
|
|
646
|
+
}
|
|
647
|
+
MissingIcon.prototype = Object.create(Error.prototype);
|
|
648
|
+
MissingIcon.prototype.constructor = MissingIcon;
|
|
649
|
+
var FILL = {
|
|
650
|
+
fill: "currentColor"
|
|
651
|
+
};
|
|
652
|
+
var ANIMATION_BASE = {
|
|
653
|
+
attributeType: "XML",
|
|
654
|
+
repeatCount: "indefinite",
|
|
655
|
+
dur: "2s"
|
|
656
|
+
};
|
|
657
|
+
({
|
|
658
|
+
tag: "path",
|
|
659
|
+
attributes: _objectSpread({}, FILL, {
|
|
660
|
+
d: "M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"
|
|
661
|
+
})
|
|
662
|
+
});
|
|
663
|
+
var OPACITY_ANIMATE = _objectSpread({}, ANIMATION_BASE, {
|
|
664
|
+
attributeName: "opacity"
|
|
665
|
+
});
|
|
666
|
+
({
|
|
667
|
+
tag: "circle",
|
|
668
|
+
attributes: _objectSpread({}, FILL, {
|
|
669
|
+
cx: "256",
|
|
670
|
+
cy: "364",
|
|
671
|
+
r: "28"
|
|
672
|
+
}),
|
|
673
|
+
children: [{
|
|
674
|
+
tag: "animate",
|
|
675
|
+
attributes: _objectSpread({}, ANIMATION_BASE, {
|
|
676
|
+
attributeName: "r",
|
|
677
|
+
values: "28;14;28;28;14;28;"
|
|
678
|
+
})
|
|
679
|
+
}, {
|
|
680
|
+
tag: "animate",
|
|
681
|
+
attributes: _objectSpread({}, OPACITY_ANIMATE, {
|
|
682
|
+
values: "1;0;1;1;0;1;"
|
|
683
|
+
})
|
|
684
|
+
}]
|
|
685
|
+
});
|
|
686
|
+
({
|
|
687
|
+
tag: "path",
|
|
688
|
+
attributes: _objectSpread({}, FILL, {
|
|
689
|
+
opacity: "1",
|
|
690
|
+
d: "M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"
|
|
691
|
+
}),
|
|
692
|
+
children: [{
|
|
693
|
+
tag: "animate",
|
|
694
|
+
attributes: _objectSpread({}, OPACITY_ANIMATE, {
|
|
695
|
+
values: "1;0;0;0;0;1;"
|
|
696
|
+
})
|
|
697
|
+
}]
|
|
698
|
+
});
|
|
699
|
+
({
|
|
700
|
+
tag: "path",
|
|
701
|
+
attributes: _objectSpread({}, FILL, {
|
|
702
|
+
opacity: "0",
|
|
703
|
+
d: "M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"
|
|
704
|
+
}),
|
|
705
|
+
children: [{
|
|
706
|
+
tag: "animate",
|
|
707
|
+
attributes: _objectSpread({}, OPACITY_ANIMATE, {
|
|
708
|
+
values: "0;0;1;1;0;0;"
|
|
709
|
+
})
|
|
710
|
+
}]
|
|
711
|
+
});
|
|
712
|
+
namespace.styles;
|
|
713
|
+
function asFoundIcon(icon2) {
|
|
714
|
+
var width = icon2[0];
|
|
715
|
+
var height = icon2[1];
|
|
716
|
+
var _icon$slice = icon2.slice(4), _icon$slice2 = _slicedToArray(_icon$slice, 1), vectorData = _icon$slice2[0];
|
|
717
|
+
var element = null;
|
|
718
|
+
if (Array.isArray(vectorData)) {
|
|
719
|
+
element = {
|
|
720
|
+
tag: "g",
|
|
721
|
+
attributes: {
|
|
722
|
+
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.GROUP)
|
|
723
|
+
},
|
|
724
|
+
children: [{
|
|
725
|
+
tag: "path",
|
|
726
|
+
attributes: {
|
|
727
|
+
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.SECONDARY),
|
|
728
|
+
fill: "currentColor",
|
|
729
|
+
d: vectorData[0]
|
|
730
|
+
}
|
|
731
|
+
}, {
|
|
732
|
+
tag: "path",
|
|
733
|
+
attributes: {
|
|
734
|
+
class: "".concat(config.familyPrefix, "-").concat(DUOTONE_CLASSES.PRIMARY),
|
|
735
|
+
fill: "currentColor",
|
|
736
|
+
d: vectorData[1]
|
|
737
|
+
}
|
|
738
|
+
}]
|
|
739
|
+
};
|
|
740
|
+
} else {
|
|
741
|
+
element = {
|
|
742
|
+
tag: "path",
|
|
743
|
+
attributes: {
|
|
744
|
+
fill: "currentColor",
|
|
745
|
+
d: vectorData
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
return {
|
|
750
|
+
found: true,
|
|
751
|
+
width,
|
|
752
|
+
height,
|
|
753
|
+
icon: element
|
|
754
|
+
};
|
|
755
|
+
}
|
|
756
|
+
namespace.styles;
|
|
757
|
+
var baseStyles = 'svg:not(:root).svg-inline--fa {\n overflow: visible;\n}\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-border {\n height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n width: 2em;\n}\n.svg-inline--fa.fa-fw {\n width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: 0.25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-lg {\n font-size: 1.3333333333em;\n line-height: 0.75em;\n vertical-align: -0.0667em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit;\n}\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: 0.1em;\n padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n float: left;\n}\n\n.fa-pull-right {\n float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: 0.3em;\n}\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both, .fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical,\n:root .fa-flip-both {\n -webkit-filter: none;\n filter: none;\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: #fff;\n}\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: 0.4;\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\n opacity: 1;\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa mask .fa-primary,\n.svg-inline--fa mask .fa-secondary {\n fill: black;\n}\n\n.fad.fa-inverse {\n color: #fff;\n}';
|
|
758
|
+
function css() {
|
|
759
|
+
var dfp = DEFAULT_FAMILY_PREFIX;
|
|
760
|
+
var drc = DEFAULT_REPLACEMENT_CLASS;
|
|
761
|
+
var fp = config.familyPrefix;
|
|
762
|
+
var rc = config.replacementClass;
|
|
763
|
+
var s = baseStyles;
|
|
764
|
+
if (fp !== dfp || rc !== drc) {
|
|
765
|
+
var dPatt = new RegExp("\\.".concat(dfp, "\\-"), "g");
|
|
766
|
+
var customPropPatt = new RegExp("\\--".concat(dfp, "\\-"), "g");
|
|
767
|
+
var rPatt = new RegExp("\\.".concat(drc), "g");
|
|
768
|
+
s = s.replace(dPatt, ".".concat(fp, "-")).replace(customPropPatt, "--".concat(fp, "-")).replace(rPatt, ".".concat(rc));
|
|
769
|
+
}
|
|
770
|
+
return s;
|
|
771
|
+
}
|
|
772
|
+
var Library = /* @__PURE__ */ function() {
|
|
773
|
+
function Library2() {
|
|
774
|
+
_classCallCheck(this, Library2);
|
|
775
|
+
this.definitions = {};
|
|
776
|
+
}
|
|
777
|
+
_createClass(Library2, [{
|
|
778
|
+
key: "add",
|
|
779
|
+
value: function add() {
|
|
780
|
+
var _this = this;
|
|
781
|
+
for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
782
|
+
definitions[_key] = arguments[_key];
|
|
783
|
+
}
|
|
784
|
+
var additions = definitions.reduce(this._pullDefinitions, {});
|
|
785
|
+
Object.keys(additions).forEach(function(key) {
|
|
786
|
+
_this.definitions[key] = _objectSpread({}, _this.definitions[key] || {}, additions[key]);
|
|
787
|
+
defineIcons(key, additions[key]);
|
|
788
|
+
build();
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
}, {
|
|
792
|
+
key: "reset",
|
|
793
|
+
value: function reset() {
|
|
794
|
+
this.definitions = {};
|
|
795
|
+
}
|
|
796
|
+
}, {
|
|
797
|
+
key: "_pullDefinitions",
|
|
798
|
+
value: function _pullDefinitions(additions, definition) {
|
|
799
|
+
var normalized = definition.prefix && definition.iconName && definition.icon ? {
|
|
800
|
+
0: definition
|
|
801
|
+
} : definition;
|
|
802
|
+
Object.keys(normalized).map(function(key) {
|
|
803
|
+
var _normalized$key = normalized[key], prefix = _normalized$key.prefix, iconName = _normalized$key.iconName, icon2 = _normalized$key.icon;
|
|
804
|
+
if (!additions[prefix])
|
|
805
|
+
additions[prefix] = {};
|
|
806
|
+
additions[prefix][iconName] = icon2;
|
|
807
|
+
});
|
|
808
|
+
return additions;
|
|
809
|
+
}
|
|
810
|
+
}]);
|
|
811
|
+
return Library2;
|
|
812
|
+
}();
|
|
813
|
+
function ensureCss() {
|
|
814
|
+
if (config.autoAddCss && !_cssInserted) {
|
|
815
|
+
insertCss(css());
|
|
816
|
+
_cssInserted = true;
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
function apiObject(val, abstractCreator) {
|
|
820
|
+
Object.defineProperty(val, "abstract", {
|
|
821
|
+
get: abstractCreator
|
|
822
|
+
});
|
|
823
|
+
Object.defineProperty(val, "html", {
|
|
824
|
+
get: function get() {
|
|
825
|
+
return val.abstract.map(function(a) {
|
|
826
|
+
return toHtml(a);
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
});
|
|
830
|
+
Object.defineProperty(val, "node", {
|
|
831
|
+
get: function get() {
|
|
832
|
+
if (!IS_DOM)
|
|
833
|
+
return;
|
|
834
|
+
var container = DOCUMENT.createElement("div");
|
|
835
|
+
container.innerHTML = val.html;
|
|
836
|
+
return container.children;
|
|
837
|
+
}
|
|
838
|
+
});
|
|
839
|
+
return val;
|
|
840
|
+
}
|
|
841
|
+
function findIconDefinition(iconLookup) {
|
|
842
|
+
var _iconLookup$prefix = iconLookup.prefix, prefix = _iconLookup$prefix === void 0 ? "fa" : _iconLookup$prefix, iconName = iconLookup.iconName;
|
|
843
|
+
if (!iconName)
|
|
844
|
+
return;
|
|
845
|
+
return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);
|
|
846
|
+
}
|
|
847
|
+
function resolveIcons(next) {
|
|
848
|
+
return function(maybeIconDefinition) {
|
|
849
|
+
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
850
|
+
var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});
|
|
851
|
+
var mask = params.mask;
|
|
852
|
+
if (mask) {
|
|
853
|
+
mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});
|
|
854
|
+
}
|
|
855
|
+
return next(iconDefinition, _objectSpread({}, params, {
|
|
856
|
+
mask
|
|
857
|
+
}));
|
|
858
|
+
};
|
|
859
|
+
}
|
|
860
|
+
var library = new Library();
|
|
861
|
+
var _cssInserted = false;
|
|
862
|
+
var parse = {
|
|
863
|
+
transform: function transform(transformString) {
|
|
864
|
+
return parseTransformString(transformString);
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
var icon = resolveIcons(function(iconDefinition) {
|
|
868
|
+
var params = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
869
|
+
var _params$transform = params.transform, transform2 = _params$transform === void 0 ? meaninglessTransform : _params$transform, _params$symbol = params.symbol, symbol = _params$symbol === void 0 ? false : _params$symbol, _params$mask = params.mask, mask = _params$mask === void 0 ? null : _params$mask, _params$maskId = params.maskId, maskId = _params$maskId === void 0 ? null : _params$maskId, _params$title = params.title, title = _params$title === void 0 ? null : _params$title, _params$titleId = params.titleId, titleId = _params$titleId === void 0 ? null : _params$titleId, _params$classes = params.classes, classes = _params$classes === void 0 ? [] : _params$classes, _params$attributes = params.attributes, attributes = _params$attributes === void 0 ? {} : _params$attributes, _params$styles = params.styles, styles2 = _params$styles === void 0 ? {} : _params$styles;
|
|
870
|
+
if (!iconDefinition)
|
|
871
|
+
return;
|
|
872
|
+
var prefix = iconDefinition.prefix, iconName = iconDefinition.iconName, icon2 = iconDefinition.icon;
|
|
873
|
+
return apiObject(_objectSpread({
|
|
874
|
+
type: "icon"
|
|
875
|
+
}, iconDefinition), function() {
|
|
876
|
+
ensureCss();
|
|
877
|
+
if (config.autoA11y) {
|
|
878
|
+
if (title) {
|
|
879
|
+
attributes["aria-labelledby"] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
|
|
880
|
+
} else {
|
|
881
|
+
attributes["aria-hidden"] = "true";
|
|
882
|
+
attributes["focusable"] = "false";
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
return makeInlineSvgAbstract({
|
|
886
|
+
icons: {
|
|
887
|
+
main: asFoundIcon(icon2),
|
|
888
|
+
mask: mask ? asFoundIcon(mask.icon) : {
|
|
889
|
+
found: false,
|
|
890
|
+
width: null,
|
|
891
|
+
height: null,
|
|
892
|
+
icon: {}
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
prefix,
|
|
896
|
+
iconName,
|
|
897
|
+
transform: _objectSpread({}, meaninglessTransform, transform2),
|
|
898
|
+
symbol,
|
|
899
|
+
title,
|
|
900
|
+
maskId,
|
|
901
|
+
titleId,
|
|
902
|
+
extra: {
|
|
903
|
+
attributes,
|
|
904
|
+
styles: styles2,
|
|
905
|
+
classes
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
});
|
|
909
|
+
});
|
|
910
|
+
var commonjsGlobal = typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
911
|
+
function createCommonjsModule(fn, module) {
|
|
912
|
+
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
913
|
+
}
|
|
914
|
+
var humps = createCommonjsModule(function(module) {
|
|
915
|
+
(function(global2) {
|
|
916
|
+
var _processKeys = function(convert2, obj, options) {
|
|
917
|
+
if (!_isObject(obj) || _isDate(obj) || _isRegExp(obj) || _isBoolean(obj) || _isFunction(obj)) {
|
|
918
|
+
return obj;
|
|
919
|
+
}
|
|
920
|
+
var output, i = 0, l = 0;
|
|
921
|
+
if (_isArray(obj)) {
|
|
922
|
+
output = [];
|
|
923
|
+
for (l = obj.length; i < l; i++) {
|
|
924
|
+
output.push(_processKeys(convert2, obj[i], options));
|
|
925
|
+
}
|
|
926
|
+
} else {
|
|
927
|
+
output = {};
|
|
928
|
+
for (var key in obj) {
|
|
929
|
+
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
930
|
+
output[convert2(key, options)] = _processKeys(convert2, obj[key], options);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
return output;
|
|
935
|
+
};
|
|
936
|
+
var separateWords = function(string, options) {
|
|
937
|
+
options = options || {};
|
|
938
|
+
var separator = options.separator || "_";
|
|
939
|
+
var split = options.split || /(?=[A-Z])/;
|
|
940
|
+
return string.split(split).join(separator);
|
|
941
|
+
};
|
|
942
|
+
var camelize = function(string) {
|
|
943
|
+
if (_isNumerical(string)) {
|
|
944
|
+
return string;
|
|
945
|
+
}
|
|
946
|
+
string = string.replace(/[\-_\s]+(.)?/g, function(match, chr) {
|
|
947
|
+
return chr ? chr.toUpperCase() : "";
|
|
948
|
+
});
|
|
949
|
+
return string.substr(0, 1).toLowerCase() + string.substr(1);
|
|
950
|
+
};
|
|
951
|
+
var pascalize = function(string) {
|
|
952
|
+
var camelized = camelize(string);
|
|
953
|
+
return camelized.substr(0, 1).toUpperCase() + camelized.substr(1);
|
|
954
|
+
};
|
|
955
|
+
var decamelize = function(string, options) {
|
|
956
|
+
return separateWords(string, options).toLowerCase();
|
|
957
|
+
};
|
|
958
|
+
var toString = Object.prototype.toString;
|
|
959
|
+
var _isFunction = function(obj) {
|
|
960
|
+
return typeof obj === "function";
|
|
961
|
+
};
|
|
962
|
+
var _isObject = function(obj) {
|
|
963
|
+
return obj === Object(obj);
|
|
964
|
+
};
|
|
965
|
+
var _isArray = function(obj) {
|
|
966
|
+
return toString.call(obj) == "[object Array]";
|
|
967
|
+
};
|
|
968
|
+
var _isDate = function(obj) {
|
|
969
|
+
return toString.call(obj) == "[object Date]";
|
|
970
|
+
};
|
|
971
|
+
var _isRegExp = function(obj) {
|
|
972
|
+
return toString.call(obj) == "[object RegExp]";
|
|
973
|
+
};
|
|
974
|
+
var _isBoolean = function(obj) {
|
|
975
|
+
return toString.call(obj) == "[object Boolean]";
|
|
976
|
+
};
|
|
977
|
+
var _isNumerical = function(obj) {
|
|
978
|
+
obj = obj - 0;
|
|
979
|
+
return obj === obj;
|
|
980
|
+
};
|
|
981
|
+
var _processor = function(convert2, options) {
|
|
982
|
+
var callback = options && "process" in options ? options.process : options;
|
|
983
|
+
if (typeof callback !== "function") {
|
|
984
|
+
return convert2;
|
|
985
|
+
}
|
|
986
|
+
return function(string, options2) {
|
|
987
|
+
return callback(string, convert2, options2);
|
|
988
|
+
};
|
|
989
|
+
};
|
|
990
|
+
var humps2 = {
|
|
991
|
+
camelize,
|
|
992
|
+
decamelize,
|
|
993
|
+
pascalize,
|
|
994
|
+
depascalize: decamelize,
|
|
995
|
+
camelizeKeys: function(object, options) {
|
|
996
|
+
return _processKeys(_processor(camelize, options), object);
|
|
997
|
+
},
|
|
998
|
+
decamelizeKeys: function(object, options) {
|
|
999
|
+
return _processKeys(_processor(decamelize, options), object, options);
|
|
1000
|
+
},
|
|
1001
|
+
pascalizeKeys: function(object, options) {
|
|
1002
|
+
return _processKeys(_processor(pascalize, options), object);
|
|
1003
|
+
},
|
|
1004
|
+
depascalizeKeys: function() {
|
|
1005
|
+
return this.decamelizeKeys.apply(this, arguments);
|
|
1006
|
+
}
|
|
1007
|
+
};
|
|
1008
|
+
if (module.exports) {
|
|
1009
|
+
module.exports = humps2;
|
|
1010
|
+
} else {
|
|
1011
|
+
global2.humps = humps2;
|
|
1012
|
+
}
|
|
1013
|
+
})(commonjsGlobal);
|
|
1014
|
+
});
|
|
1015
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function(obj) {
|
|
1016
|
+
return typeof obj;
|
|
1017
|
+
} : function(obj) {
|
|
1018
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
1019
|
+
};
|
|
1020
|
+
var defineProperty = function(obj, key, value) {
|
|
1021
|
+
if (key in obj) {
|
|
1022
|
+
Object.defineProperty(obj, key, {
|
|
1023
|
+
value,
|
|
1024
|
+
enumerable: true,
|
|
1025
|
+
configurable: true,
|
|
1026
|
+
writable: true
|
|
1027
|
+
});
|
|
1028
|
+
} else {
|
|
1029
|
+
obj[key] = value;
|
|
1030
|
+
}
|
|
1031
|
+
return obj;
|
|
1032
|
+
};
|
|
1033
|
+
var _extends = Object.assign || function(target) {
|
|
1034
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1035
|
+
var source = arguments[i];
|
|
1036
|
+
for (var key in source) {
|
|
1037
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1038
|
+
target[key] = source[key];
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
return target;
|
|
1043
|
+
};
|
|
1044
|
+
var objectWithoutProperties = function(obj, keys) {
|
|
1045
|
+
var target = {};
|
|
1046
|
+
for (var i in obj) {
|
|
1047
|
+
if (keys.indexOf(i) >= 0)
|
|
1048
|
+
continue;
|
|
1049
|
+
if (!Object.prototype.hasOwnProperty.call(obj, i))
|
|
1050
|
+
continue;
|
|
1051
|
+
target[i] = obj[i];
|
|
1052
|
+
}
|
|
1053
|
+
return target;
|
|
1054
|
+
};
|
|
1055
|
+
function styleToObject(style) {
|
|
1056
|
+
return style.split(";").map(function(s) {
|
|
1057
|
+
return s.trim();
|
|
1058
|
+
}).filter(function(s) {
|
|
1059
|
+
return s;
|
|
1060
|
+
}).reduce(function(acc, pair) {
|
|
1061
|
+
var i = pair.indexOf(":");
|
|
1062
|
+
var prop = humps.camelize(pair.slice(0, i));
|
|
1063
|
+
var value = pair.slice(i + 1).trim();
|
|
1064
|
+
acc[prop] = value;
|
|
1065
|
+
return acc;
|
|
1066
|
+
}, {});
|
|
1067
|
+
}
|
|
1068
|
+
function classToObject(cls) {
|
|
1069
|
+
return cls.split(/\s+/).reduce(function(acc, c) {
|
|
1070
|
+
acc[c] = true;
|
|
1071
|
+
return acc;
|
|
1072
|
+
}, {});
|
|
1073
|
+
}
|
|
1074
|
+
function combineClassObjects() {
|
|
1075
|
+
for (var _len = arguments.length, objs = Array(_len), _key = 0; _key < _len; _key++) {
|
|
1076
|
+
objs[_key] = arguments[_key];
|
|
1077
|
+
}
|
|
1078
|
+
return objs.reduce(function(acc, obj) {
|
|
1079
|
+
if (Array.isArray(obj)) {
|
|
1080
|
+
acc = acc.concat(obj);
|
|
1081
|
+
} else {
|
|
1082
|
+
acc.push(obj);
|
|
1083
|
+
}
|
|
1084
|
+
return acc;
|
|
1085
|
+
}, []);
|
|
1086
|
+
}
|
|
1087
|
+
function convert(h, element) {
|
|
1088
|
+
var props = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1089
|
+
var data = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
1090
|
+
var children = (element.children || []).map(convert.bind(null, h));
|
|
1091
|
+
var mixins = Object.keys(element.attributes || {}).reduce(function(acc, key) {
|
|
1092
|
+
var val = element.attributes[key];
|
|
1093
|
+
switch (key) {
|
|
1094
|
+
case "class":
|
|
1095
|
+
acc["class"] = classToObject(val);
|
|
1096
|
+
break;
|
|
1097
|
+
case "style":
|
|
1098
|
+
acc["style"] = styleToObject(val);
|
|
1099
|
+
break;
|
|
1100
|
+
default:
|
|
1101
|
+
acc.attrs[key] = val;
|
|
1102
|
+
}
|
|
1103
|
+
return acc;
|
|
1104
|
+
}, { "class": {}, style: {}, attrs: {} });
|
|
1105
|
+
var _data$class = data.class, dClass = _data$class === void 0 ? {} : _data$class, _data$style = data.style, dStyle = _data$style === void 0 ? {} : _data$style, _data$attrs = data.attrs, dAttrs = _data$attrs === void 0 ? {} : _data$attrs, remainingData = objectWithoutProperties(data, ["class", "style", "attrs"]);
|
|
1106
|
+
if (typeof element === "string") {
|
|
1107
|
+
return element;
|
|
1108
|
+
} else {
|
|
1109
|
+
return h(element.tag, _extends({
|
|
1110
|
+
class: combineClassObjects(mixins.class, dClass),
|
|
1111
|
+
style: _extends({}, mixins.style, dStyle),
|
|
1112
|
+
attrs: _extends({}, mixins.attrs, dAttrs)
|
|
1113
|
+
}, remainingData, {
|
|
1114
|
+
props
|
|
1115
|
+
}), children);
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
var PRODUCTION = false;
|
|
1119
|
+
try {
|
|
1120
|
+
PRODUCTION = true;
|
|
1121
|
+
} catch (e) {
|
|
1122
|
+
}
|
|
1123
|
+
function log() {
|
|
1124
|
+
if (!PRODUCTION && console && typeof console.error === "function") {
|
|
1125
|
+
var _console;
|
|
1126
|
+
(_console = console).error.apply(_console, arguments);
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
function objectWithKey(key, value) {
|
|
1130
|
+
return Array.isArray(value) && value.length > 0 || !Array.isArray(value) && value ? defineProperty({}, key, value) : {};
|
|
1131
|
+
}
|
|
1132
|
+
function classList(props) {
|
|
1133
|
+
var _classes;
|
|
1134
|
+
var classes = (_classes = {
|
|
1135
|
+
"fa-spin": props.spin,
|
|
1136
|
+
"fa-pulse": props.pulse,
|
|
1137
|
+
"fa-fw": props.fixedWidth,
|
|
1138
|
+
"fa-border": props.border,
|
|
1139
|
+
"fa-li": props.listItem,
|
|
1140
|
+
"fa-inverse": props.inverse,
|
|
1141
|
+
"fa-flip-horizontal": props.flip === "horizontal" || props.flip === "both",
|
|
1142
|
+
"fa-flip-vertical": props.flip === "vertical" || props.flip === "both"
|
|
1143
|
+
}, defineProperty(_classes, "fa-" + props.size, props.size !== null), defineProperty(_classes, "fa-rotate-" + props.rotation, props.rotation !== null), defineProperty(_classes, "fa-pull-" + props.pull, props.pull !== null), defineProperty(_classes, "fa-swap-opacity", props.swapOpacity), _classes);
|
|
1144
|
+
return Object.keys(classes).map(function(key) {
|
|
1145
|
+
return classes[key] ? key : null;
|
|
1146
|
+
}).filter(function(key) {
|
|
1147
|
+
return key;
|
|
1148
|
+
});
|
|
1149
|
+
}
|
|
1150
|
+
function normalizeIconArgs(icon$$1) {
|
|
1151
|
+
if (icon$$1 === null) {
|
|
1152
|
+
return null;
|
|
1153
|
+
}
|
|
1154
|
+
if ((typeof icon$$1 === "undefined" ? "undefined" : _typeof(icon$$1)) === "object" && icon$$1.prefix && icon$$1.iconName) {
|
|
1155
|
+
return icon$$1;
|
|
1156
|
+
}
|
|
1157
|
+
if (Array.isArray(icon$$1) && icon$$1.length === 2) {
|
|
1158
|
+
return { prefix: icon$$1[0], iconName: icon$$1[1] };
|
|
1159
|
+
}
|
|
1160
|
+
if (typeof icon$$1 === "string") {
|
|
1161
|
+
return { prefix: "fas", iconName: icon$$1 };
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
var FontAwesomeIcon = {
|
|
1165
|
+
name: "FontAwesomeIcon",
|
|
1166
|
+
functional: true,
|
|
1167
|
+
props: {
|
|
1168
|
+
border: {
|
|
1169
|
+
type: Boolean,
|
|
1170
|
+
default: false
|
|
1171
|
+
},
|
|
1172
|
+
fixedWidth: {
|
|
1173
|
+
type: Boolean,
|
|
1174
|
+
default: false
|
|
1175
|
+
},
|
|
1176
|
+
flip: {
|
|
1177
|
+
type: String,
|
|
1178
|
+
default: null,
|
|
1179
|
+
validator: function validator(value) {
|
|
1180
|
+
return ["horizontal", "vertical", "both"].indexOf(value) > -1;
|
|
1181
|
+
}
|
|
1182
|
+
},
|
|
1183
|
+
icon: {
|
|
1184
|
+
type: [Object, Array, String],
|
|
1185
|
+
required: true
|
|
1186
|
+
},
|
|
1187
|
+
mask: {
|
|
1188
|
+
type: [Object, Array, String],
|
|
1189
|
+
default: null
|
|
1190
|
+
},
|
|
1191
|
+
listItem: {
|
|
1192
|
+
type: Boolean,
|
|
1193
|
+
default: false
|
|
1194
|
+
},
|
|
1195
|
+
pull: {
|
|
1196
|
+
type: String,
|
|
1197
|
+
default: null,
|
|
1198
|
+
validator: function validator2(value) {
|
|
1199
|
+
return ["right", "left"].indexOf(value) > -1;
|
|
1200
|
+
}
|
|
1201
|
+
},
|
|
1202
|
+
pulse: {
|
|
1203
|
+
type: Boolean,
|
|
1204
|
+
default: false
|
|
1205
|
+
},
|
|
1206
|
+
rotation: {
|
|
1207
|
+
type: [String, Number],
|
|
1208
|
+
default: null,
|
|
1209
|
+
validator: function validator3(value) {
|
|
1210
|
+
return [90, 180, 270].indexOf(parseInt(value, 10)) > -1;
|
|
1211
|
+
}
|
|
1212
|
+
},
|
|
1213
|
+
swapOpacity: {
|
|
1214
|
+
type: Boolean,
|
|
1215
|
+
default: false
|
|
1216
|
+
},
|
|
1217
|
+
size: {
|
|
1218
|
+
type: String,
|
|
1219
|
+
default: null,
|
|
1220
|
+
validator: function validator4(value) {
|
|
1221
|
+
return ["lg", "xs", "sm", "1x", "2x", "3x", "4x", "5x", "6x", "7x", "8x", "9x", "10x"].indexOf(value) > -1;
|
|
1222
|
+
}
|
|
1223
|
+
},
|
|
1224
|
+
spin: {
|
|
1225
|
+
type: Boolean,
|
|
1226
|
+
default: false
|
|
1227
|
+
},
|
|
1228
|
+
transform: {
|
|
1229
|
+
type: [String, Object],
|
|
1230
|
+
default: null
|
|
1231
|
+
},
|
|
1232
|
+
symbol: {
|
|
1233
|
+
type: [Boolean, String],
|
|
1234
|
+
default: false
|
|
1235
|
+
},
|
|
1236
|
+
title: {
|
|
1237
|
+
type: String,
|
|
1238
|
+
default: null
|
|
1239
|
+
},
|
|
1240
|
+
inverse: {
|
|
1241
|
+
type: Boolean,
|
|
1242
|
+
default: false
|
|
1243
|
+
}
|
|
1244
|
+
},
|
|
1245
|
+
render: function render(createElement, context) {
|
|
1246
|
+
var props = context.props;
|
|
1247
|
+
var iconArgs = props.icon, maskArgs = props.mask, symbol = props.symbol, title = props.title;
|
|
1248
|
+
var icon$$1 = normalizeIconArgs(iconArgs);
|
|
1249
|
+
var classes = objectWithKey("classes", classList(props));
|
|
1250
|
+
var transform2 = objectWithKey("transform", typeof props.transform === "string" ? parse.transform(props.transform) : props.transform);
|
|
1251
|
+
var mask = objectWithKey("mask", normalizeIconArgs(maskArgs));
|
|
1252
|
+
var renderedIcon = icon(icon$$1, _extends({}, classes, transform2, mask, { symbol, title }));
|
|
1253
|
+
if (!renderedIcon) {
|
|
1254
|
+
return log("Could not find one or more icon(s)", icon$$1, mask);
|
|
1255
|
+
}
|
|
1256
|
+
var abstract = renderedIcon.abstract;
|
|
1257
|
+
var convertCurry = convert.bind(null, createElement);
|
|
1258
|
+
return convertCurry(abstract[0], {}, context.data);
|
|
1259
|
+
}
|
|
1260
|
+
};
|
|
1261
|
+
/*!
|
|
1262
|
+
* Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com
|
|
1263
|
+
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
|
1264
|
+
*/
|
|
1265
|
+
var faCheck = {
|
|
1266
|
+
prefix: "fas",
|
|
1267
|
+
iconName: "check",
|
|
1268
|
+
icon: [512, 512, [], "f00c", "M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"]
|
|
1269
|
+
};
|
|
1270
|
+
var render2 = function() {
|
|
1271
|
+
var _vm = this;
|
|
1272
|
+
var _h = _vm.$createElement;
|
|
1273
|
+
var _c = _vm._self._c || _h;
|
|
1274
|
+
return _c("label", _vm._g({ staticClass: "checkbox", class: { "checkbox-disabled": _vm.disabled } }, _vm.listeners), [_c("span", { staticClass: "checkbox-input", class: { "checkbox-checked": _vm.isChecked, "checkbox-focused": _vm.focused } }, [_c("font-awesome-icon", { staticClass: "checkbox-input-icon", attrs: { "icon": _vm.iconCheck } }), _c("input", { directives: [{ name: "model", rawName: "v-model", value: _vm.internalChecked, expression: "internalChecked" }], attrs: { "type": "checkbox", "disabled": _vm.disabled }, domProps: { "value": _vm.value, "checked": Array.isArray(_vm.internalChecked) ? _vm._i(_vm.internalChecked, _vm.value) > -1 : _vm.internalChecked }, on: { "focus": function($event) {
|
|
1275
|
+
_vm.focused = true;
|
|
1276
|
+
}, "focusout": function($event) {
|
|
1277
|
+
_vm.focused = false;
|
|
1278
|
+
}, "change": function($event) {
|
|
1279
|
+
var $$a = _vm.internalChecked, $$el = $event.target, $$c = $$el.checked ? true : false;
|
|
1280
|
+
if (Array.isArray($$a)) {
|
|
1281
|
+
var $$v = _vm.value, $$i = _vm._i($$a, $$v);
|
|
1282
|
+
if ($$el.checked) {
|
|
1283
|
+
$$i < 0 && (_vm.internalChecked = $$a.concat([$$v]));
|
|
1284
|
+
} else {
|
|
1285
|
+
$$i > -1 && (_vm.internalChecked = $$a.slice(0, $$i).concat($$a.slice($$i + 1)));
|
|
1286
|
+
}
|
|
1287
|
+
} else {
|
|
1288
|
+
_vm.internalChecked = $$c;
|
|
1289
|
+
}
|
|
1290
|
+
} } })], 1), _c("span", { staticClass: "checkbox-label" }, [_vm._v(_vm._s(_vm.value))])]);
|
|
1291
|
+
};
|
|
1292
|
+
var staticRenderFns = [];
|
|
1293
|
+
var Checkbox_vue_vue_type_style_index_0_scoped_true_lang = "";
|
|
1294
|
+
function normalizeComponent(scriptExports, render3, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
1295
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
1296
|
+
if (render3) {
|
|
1297
|
+
options.render = render3;
|
|
1298
|
+
options.staticRenderFns = staticRenderFns2;
|
|
1299
|
+
options._compiled = true;
|
|
1300
|
+
}
|
|
1301
|
+
if (functionalTemplate) {
|
|
1302
|
+
options.functional = true;
|
|
1303
|
+
}
|
|
1304
|
+
if (scopeId) {
|
|
1305
|
+
options._scopeId = "data-v-" + scopeId;
|
|
1306
|
+
}
|
|
1307
|
+
var hook;
|
|
1308
|
+
if (moduleIdentifier) {
|
|
1309
|
+
hook = function(context) {
|
|
1310
|
+
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
1311
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
1312
|
+
context = __VUE_SSR_CONTEXT__;
|
|
1313
|
+
}
|
|
1314
|
+
if (injectStyles) {
|
|
1315
|
+
injectStyles.call(this, context);
|
|
1316
|
+
}
|
|
1317
|
+
if (context && context._registeredComponents) {
|
|
1318
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
1319
|
+
}
|
|
1320
|
+
};
|
|
1321
|
+
options._ssrRegister = hook;
|
|
1322
|
+
} else if (injectStyles) {
|
|
1323
|
+
hook = shadowMode ? function() {
|
|
1324
|
+
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
1325
|
+
} : injectStyles;
|
|
1326
|
+
}
|
|
1327
|
+
if (hook) {
|
|
1328
|
+
if (options.functional) {
|
|
1329
|
+
options._injectStyles = hook;
|
|
1330
|
+
var originalRender = options.render;
|
|
1331
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
1332
|
+
hook.call(context);
|
|
1333
|
+
return originalRender(h, context);
|
|
1334
|
+
};
|
|
1335
|
+
} else {
|
|
1336
|
+
var existing = options.beforeCreate;
|
|
1337
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
return {
|
|
1341
|
+
exports: scriptExports,
|
|
1342
|
+
options
|
|
1343
|
+
};
|
|
1344
|
+
}
|
|
1345
|
+
const __vue2_script = {
|
|
1346
|
+
name: "Checkbox",
|
|
1347
|
+
components: {
|
|
1348
|
+
FontAwesomeIcon
|
|
1349
|
+
},
|
|
1350
|
+
model: {
|
|
1351
|
+
prop: "checked",
|
|
1352
|
+
event: "change"
|
|
1353
|
+
},
|
|
1354
|
+
props: {
|
|
1355
|
+
checked: {
|
|
1356
|
+
type: [Boolean, Array],
|
|
1357
|
+
default: false
|
|
1358
|
+
},
|
|
1359
|
+
value: {
|
|
1360
|
+
type: String,
|
|
1361
|
+
default: ""
|
|
1362
|
+
},
|
|
1363
|
+
disabled: {
|
|
1364
|
+
type: Boolean,
|
|
1365
|
+
default: false
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
data() {
|
|
1369
|
+
return {
|
|
1370
|
+
focused: false,
|
|
1371
|
+
internalChecked: this.checked,
|
|
1372
|
+
iconCheck: faCheck
|
|
1373
|
+
};
|
|
1374
|
+
},
|
|
1375
|
+
computed: {
|
|
1376
|
+
isChecked() {
|
|
1377
|
+
if (typeof this.internalChecked === "boolean") {
|
|
1378
|
+
return this.internalChecked;
|
|
1379
|
+
} else {
|
|
1380
|
+
return this.internalChecked.includes(this.value);
|
|
1381
|
+
}
|
|
1382
|
+
},
|
|
1383
|
+
listeners() {
|
|
1384
|
+
let self2 = this;
|
|
1385
|
+
return Object.assign({}, this.$listeners, {
|
|
1386
|
+
change() {
|
|
1387
|
+
self2.$emit("change", self2.internalChecked);
|
|
1388
|
+
}
|
|
1389
|
+
});
|
|
1390
|
+
}
|
|
1391
|
+
},
|
|
1392
|
+
watch: {
|
|
1393
|
+
checked() {
|
|
1394
|
+
this.internalChecked = this.checked;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
};
|
|
1398
|
+
const __cssModules = {};
|
|
1399
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render2, staticRenderFns, false, __vue2_injectStyles, "5b85e201", null, null);
|
|
1400
|
+
function __vue2_injectStyles(context) {
|
|
1401
|
+
for (let o in __cssModules) {
|
|
1402
|
+
this[o] = __cssModules[o];
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
var Checkbox = /* @__PURE__ */ function() {
|
|
1406
|
+
return __component__.exports;
|
|
1407
|
+
}();
|
|
1408
|
+
export { Checkbox as default };
|