@@ -3,14 +3,17 @@ import { h, defineComponent, computed, watch } from 'vue';
33
44function ownKeys ( object , enumerableOnly ) {
55 var keys = Object . keys ( object ) ;
6+
67 if ( Object . getOwnPropertySymbols ) {
78 var symbols = Object . getOwnPropertySymbols ( object ) ;
89 enumerableOnly && ( symbols = symbols . filter ( function ( sym ) {
910 return Object . getOwnPropertyDescriptor ( object , sym ) . enumerable ;
1011 } ) ) , keys . push . apply ( keys , symbols ) ;
1112 }
13+
1214 return keys ;
1315}
16+
1417function _objectSpread2 ( target ) {
1518 for ( var i = 1 ; i < arguments . length ; i ++ ) {
1619 var source = null != arguments [ i ] ? arguments [ i ] : { } ;
@@ -20,8 +23,10 @@ function _objectSpread2(target) {
2023 Object . defineProperty ( target , key , Object . getOwnPropertyDescriptor ( source , key ) ) ;
2124 } ) ;
2225 }
26+
2327 return target ;
2428}
29+
2530function _typeof ( obj ) {
2631 "@babel/helpers - typeof" ;
2732
@@ -31,6 +36,7 @@ function _typeof(obj) {
3136 return obj && "function" == typeof Symbol && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ;
3237 } , _typeof ( obj ) ;
3338}
39+
3440function _defineProperty ( obj , key , value ) {
3541 if ( key in obj ) {
3642 Object . defineProperty ( obj , key , {
@@ -42,44 +48,58 @@ function _defineProperty(obj, key, value) {
4248 } else {
4349 obj [ key ] = value ;
4450 }
51+
4552 return obj ;
4653}
54+
4755function _objectWithoutPropertiesLoose ( source , excluded ) {
4856 if ( source == null ) return { } ;
4957 var target = { } ;
5058 var sourceKeys = Object . keys ( source ) ;
5159 var key , i ;
60+
5261 for ( i = 0 ; i < sourceKeys . length ; i ++ ) {
5362 key = sourceKeys [ i ] ;
5463 if ( excluded . indexOf ( key ) >= 0 ) continue ;
5564 target [ key ] = source [ key ] ;
5665 }
66+
5767 return target ;
5868}
69+
5970function _objectWithoutProperties ( source , excluded ) {
6071 if ( source == null ) return { } ;
72+
6173 var target = _objectWithoutPropertiesLoose ( source , excluded ) ;
74+
6275 var key , i ;
76+
6377 if ( Object . getOwnPropertySymbols ) {
6478 var sourceSymbolKeys = Object . getOwnPropertySymbols ( source ) ;
79+
6580 for ( i = 0 ; i < sourceSymbolKeys . length ; i ++ ) {
6681 key = sourceSymbolKeys [ i ] ;
6782 if ( excluded . indexOf ( key ) >= 0 ) continue ;
6883 if ( ! Object . prototype . propertyIsEnumerable . call ( source , key ) ) continue ;
6984 target [ key ] = source [ key ] ;
7085 }
7186 }
87+
7288 return target ;
7389}
90+
7491function _toConsumableArray ( arr ) {
7592 return _arrayWithoutHoles ( arr ) || _iterableToArray ( arr ) || _unsupportedIterableToArray ( arr ) || _nonIterableSpread ( ) ;
7693}
94+
7795function _arrayWithoutHoles ( arr ) {
7896 if ( Array . isArray ( arr ) ) return _arrayLikeToArray ( arr ) ;
7997}
98+
8099function _iterableToArray ( iter ) {
81100 if ( typeof Symbol !== "undefined" && iter [ Symbol . iterator ] != null || iter [ "@@iterator" ] != null ) return Array . from ( iter ) ;
82101}
102+
83103function _unsupportedIterableToArray ( o , minLen ) {
84104 if ( ! o ) return ;
85105 if ( typeof o === "string" ) return _arrayLikeToArray ( o , minLen ) ;
@@ -88,11 +108,15 @@ function _unsupportedIterableToArray(o, minLen) {
88108 if ( n === "Map" || n === "Set" ) return Array . from ( o ) ;
89109 if ( n === "Arguments" || / ^ (?: U i | I ) n t (?: 8 | 1 6 | 3 2 ) (?: C l a m p e d ) ? A r r a y $ / . test ( n ) ) return _arrayLikeToArray ( o , minLen ) ;
90110}
111+
91112function _arrayLikeToArray ( arr , len ) {
92113 if ( len == null || len > arr . length ) len = arr . length ;
114+
93115 for ( var i = 0 , arr2 = new Array ( len ) ; i < len ; i ++ ) arr2 [ i ] = arr [ i ] ;
116+
94117 return arr2 ;
95118}
119+
96120function _nonIterableSpread ( ) {
97121 throw new TypeError ( "Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method." ) ;
98122}
@@ -236,12 +260,12 @@ var humps$1 = {exports: {}};
236260var humps = humps$1 . exports ;
237261
238262var _excluded = [ "class" , "style" ] ;
239-
240263/**
241264 * Converts a CSS style into a plain Javascript object.
242265 * @param {String } style The style to converts into a plain Javascript object.
243266 * @returns {Object }
244267 */
268+
245269function styleToObject ( style ) {
246270 return style . split ( ';' ) . map ( function ( s ) {
247271 return s . trim ( ) ;
@@ -255,77 +279,86 @@ function styleToObject(style) {
255279 return output ;
256280 } , { } ) ;
257281}
258-
259282/**
260283 * Converts a CSS class list into a plain Javascript object.
261284 * @param {Array<String> } classes The class list to convert.
262285 * @returns {Object }
263286 */
287+
288+
264289function classToObject ( classes ) {
265290 return classes . split ( / \s + / ) . reduce ( function ( output , className ) {
266291 output [ className ] = true ;
267292 return output ;
268293 } , { } ) ;
269294}
270-
271295/**
272296 * Converts a FontAwesome abstract element of an icon into a Vue VNode.
273297 * @param {AbstractElement | String } abstractElement The element to convert.
274298 * @param {Object } props The user-defined props.
275299 * @param {Object } attrs The user-defined native HTML attributes.
276300 * @returns {VNode }
277301 */
302+
303+
278304function convert ( abstractElement ) {
279305 var props = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : { } ;
280306 var attrs = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : { } ;
307+
281308 // If the abstract element is a string, we'll just return a string render function
282309 if ( typeof abstractElement === 'string' ) {
283310 return abstractElement ;
284- }
311+ } // Converting abstract element children into Vue VNodes
312+
285313
286- // Converting abstract element children into Vue VNodes
287314 var children = ( abstractElement . children || [ ] ) . map ( function ( child ) {
288315 return convert ( child ) ;
289- } ) ;
316+ } ) ; // Converting abstract element attributes into valid Vue format
290317
291- // Converting abstract element attributes into valid Vue format
292318 var mixins = Object . keys ( abstractElement . attributes || { } ) . reduce ( function ( mixins , key ) {
293319 var value = abstractElement . attributes [ key ] ;
320+
294321 switch ( key ) {
295322 case 'class' :
296323 mixins . class = classToObject ( value ) ;
297324 break ;
325+
298326 case 'style' :
299327 mixins . style = styleToObject ( value ) ;
300328 break ;
329+
301330 default :
302331 mixins . attrs [ key ] = value ;
303332 }
333+
304334 return mixins ;
305335 } , {
306336 attrs : { } ,
307337 class : { } ,
308338 style : { }
309- } ) ;
339+ } ) ; // Now, we'll return the VNode
310340
311- // Now, we'll return the VNode
312341 attrs . class ;
313- var _attrs$style = attrs . style ,
314- aStyle = _attrs$style === void 0 ? { } : _attrs$style ,
315- otherAttrs = _objectWithoutProperties ( attrs , _excluded ) ;
342+ var _attrs$style = attrs . style ,
343+ aStyle = _attrs$style === void 0 ? { } : _attrs$style ,
344+ otherAttrs = _objectWithoutProperties ( attrs , _excluded ) ;
345+
316346 return h ( abstractElement . tag , _objectSpread2 ( _objectSpread2 ( _objectSpread2 ( { } , props ) , { } , {
317347 class : mixins . class ,
318348 style : _objectSpread2 ( _objectSpread2 ( { } , mixins . style ) , aStyle )
319349 } , mixins . attrs ) , otherAttrs ) , children ) ;
320350}
321351
322352var PRODUCTION = false ;
353+
323354try {
324355 PRODUCTION = process . env . NODE_ENV === 'production' ;
325356} catch ( e ) { }
357+
326358function log ( ) {
327359 if ( ! PRODUCTION && console && typeof console . error === 'function' ) {
328360 var _console ;
361+
329362 ( _console = console ) . error . apply ( _console , arguments ) ;
330363 }
331364}
@@ -335,6 +368,7 @@ function objectWithKey(key, value) {
335368}
336369function classList ( props ) {
337370 var _classes ;
371+
338372 var classes = ( _classes = {
339373 'fa-spin' : props . spin ,
340374 'fa-pulse' : props . pulse ,
@@ -357,28 +391,34 @@ function normalizeIconArgs(icon) {
357391 if ( icon && _typeof ( icon ) === 'object' && icon . prefix && icon . iconName && icon . icon ) {
358392 return icon ;
359393 }
394+
360395 if ( parse . icon ) {
361396 return parse . icon ( icon ) ;
362397 }
398+
363399 if ( icon === null ) {
364400 return null ;
365401 }
402+
366403 if ( _typeof ( icon ) === 'object' && icon . prefix && icon . iconName ) {
367404 return icon ;
368405 }
406+
369407 if ( Array . isArray ( icon ) && icon . length === 2 ) {
370408 return {
371409 prefix : icon [ 0 ] ,
372410 iconName : icon [ 1 ]
373411 } ;
374412 }
413+
375414 if ( typeof icon === 'string' ) {
376415 return {
377416 prefix : 'fas' ,
378417 iconName : icon
379418 } ;
380419 }
381420}
421+
382422var FontAwesomeIcon = defineComponent ( {
383423 name : 'FontAwesomeIcon' ,
384424 props : {
@@ -583,10 +623,12 @@ var FontAwesomeLayersText = defineComponent({
583623 } ) ;
584624 var abstractElement = computed ( function ( ) {
585625 var _text = text ( props . value . toString ( ) , _objectSpread2 ( _objectSpread2 ( { } , transform . value ) , classes . value ) ) ,
586- abstract = _text . abstract ;
626+ abstract = _text . abstract ;
627+
587628 if ( props . counter ) {
588629 abstract [ 0 ] . attributes . class = abstract [ 0 ] . attributes . class . replace ( 'fa-layers-text' , '' ) ;
589630 }
631+
590632 return abstract [ 0 ] ;
591633 } ) ;
592634 var vnode = computed ( function ( ) {
0 commit comments