first commit

This commit is contained in:
Artem Anufrij
2026-10-07 18:56:27 +02:00
commit 2a8a60b725
7768 changed files with 1550851 additions and 0 deletions
+670
View File
@@ -0,0 +1,670 @@
import { config as config$1, icon, parse as parse$1, text } from "./@fortawesome_fontawesome-svg-core.js";
import { Kn as computed, Pr as h, Wa as watch, fr as defineComponent } from "./vue.runtime.esm-bundler-drX-toMH.js";
//#region node_modules/@fortawesome/vue-fontawesome/index.es.js
function _arrayLikeToArray(r, a) {
(null == a || a > r.length) && (a = r.length);
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
return n;
}
function _arrayWithoutHoles(r) {
if (Array.isArray(r)) return _arrayLikeToArray(r);
}
function _defineProperty(e, r, t) {
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
value: t,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[r] = t, e;
}
function _iterableToArray(r) {
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function ownKeys(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
r && (o = o.filter(function(r) {
return Object.getOwnPropertyDescriptor(e, r).enumerable;
})), t.push.apply(t, o);
}
return t;
}
function _objectSpread2(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? arguments[r] : {};
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
_defineProperty(e, r, t[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
});
}
return e;
}
function _objectWithoutProperties(e, t) {
if (null == e) return {};
var o, r, i = _objectWithoutPropertiesLoose(e, t);
if (Object.getOwnPropertySymbols) {
var n = Object.getOwnPropertySymbols(e);
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
}
return i;
}
function _objectWithoutPropertiesLoose(r, e) {
if (null == r) return {};
var t = {};
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
if (-1 !== e.indexOf(n)) continue;
t[n] = r[n];
}
return t;
}
function _toConsumableArray(r) {
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
}
function _toPrimitive(t, r) {
if ("object" != typeof t || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != typeof i) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
function _toPropertyKey(t) {
var i = _toPrimitive(t, "string");
return "symbol" == typeof i ? i : i + "";
}
function _typeof(o) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
return typeof o;
} : function(o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o);
}
function _unsupportedIterableToArray(r, a) {
if (r) {
if ("string" == typeof r) return _arrayLikeToArray(r, a);
var t = {}.toString.call(r).slice(8, -1);
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
}
}
function objectWithKey(key, value) {
return Array.isArray(value) && value.length > 0 || !Array.isArray(value) && value ? _defineProperty({}, key, value) : {};
}
function classList(props) {
var _classes = {
"fa-spin": props.spin,
"fa-pulse": props.pulse,
"fa-fw": props.fixedWidth,
"fa-border": props.border,
"fa-li": props.listItem,
"fa-inverse": props.inverse,
"fa-flip": props.flip === true,
"fa-flip-horizontal": props.flip === "horizontal" || props.flip === "both",
"fa-flip-vertical": props.flip === "vertical" || props.flip === "both"
};
var classes = (_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_classes, "fa-".concat(props.size), props.size !== null), "fa-rotate-".concat(props.rotation), props.rotation !== null), "fa-rotate-by", props.rotateBy), "fa-pull-".concat(props.pull), props.pull !== null), "fa-swap-opacity", props.swapOpacity), "fa-bounce", props.bounce), "fa-shake", props.shake), "fa-beat", props.beat), "fa-fade", props.fade), "fa-beat-fade", props.beatFade), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_classes, "fa-flash", props.flash), "fa-spin-pulse", props.spinPulse), "fa-spin-reverse", props.spinReverse), "fa-width-auto", props.widthAuto), "fa-canvas-square", props.canvasSquare), "fa-canvas-roomy", props.canvasRoomy), "fa-flip-360", props.flip360), "fa-buzz", props.buzz), "fa-float", props.float), "fa-jello", props.jello), _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_classes, "fa-spin-snap", props.spinSnap), "fa-spin-snap-4", props.spinSnap4), "fa-spin-snap-8", props.spinSnap8), "fa-swing", props.swing), "fa-wag", props.wag));
return Object.keys(classes).map(function(key) {
return classes[key] ? key : null;
}).filter(function(key) {
return key;
});
}
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
var humps$1 = { exports: {} };
(function(module) {
(function(global) {
var _processKeys = function(convert, obj, options) {
if (!_isObject(obj) || _isDate(obj) || _isRegExp(obj) || _isBoolean(obj) || _isFunction(obj)) return obj;
var output, i = 0, l = 0;
if (_isArray(obj)) {
output = [];
for (l = obj.length; i < l; i++) output.push(_processKeys(convert, obj[i], options));
} else {
output = {};
for (var key in obj) if (Object.prototype.hasOwnProperty.call(obj, key)) output[convert(key, options)] = _processKeys(convert, obj[key], options);
}
return output;
};
var separateWords = function(string, options) {
options = options || {};
var separator = options.separator || "_";
var split = options.split || /(?=[A-Z])/;
return string.split(split).join(separator);
};
var camelize = function(string) {
if (_isNumerical(string)) return string;
string = string.replace(/[\-_\s]+(.)?/g, function(match, chr) {
return chr ? chr.toUpperCase() : "";
});
return string.substr(0, 1).toLowerCase() + string.substr(1);
};
var pascalize = function(string) {
var camelized = camelize(string);
return camelized.substr(0, 1).toUpperCase() + camelized.substr(1);
};
var decamelize = function(string, options) {
return separateWords(string, options).toLowerCase();
};
var toString = Object.prototype.toString;
var _isFunction = function(obj) {
return typeof obj === "function";
};
var _isObject = function(obj) {
return obj === Object(obj);
};
var _isArray = function(obj) {
return toString.call(obj) == "[object Array]";
};
var _isDate = function(obj) {
return toString.call(obj) == "[object Date]";
};
var _isRegExp = function(obj) {
return toString.call(obj) == "[object RegExp]";
};
var _isBoolean = function(obj) {
return toString.call(obj) == "[object Boolean]";
};
var _isNumerical = function(obj) {
obj = obj - 0;
return obj === obj;
};
var _processor = function(convert, options) {
var callback = options && "process" in options ? options.process : options;
if (typeof callback !== "function") return convert;
return function(string, options) {
return callback(string, convert, options);
};
};
var humps = {
camelize,
decamelize,
pascalize,
depascalize: decamelize,
camelizeKeys: function(object, options) {
return _processKeys(_processor(camelize, options), object);
},
decamelizeKeys: function(object, options) {
return _processKeys(_processor(decamelize, options), object, options);
},
pascalizeKeys: function(object, options) {
return _processKeys(_processor(pascalize, options), object);
},
depascalizeKeys: function() {
return this.decamelizeKeys.apply(this, arguments);
}
};
if (module.exports) module.exports = humps;
else global.humps = humps;
})(commonjsGlobal);
})(humps$1);
var humps = humps$1.exports;
var _excluded = ["gradientFill"];
var _excluded2 = ["class", "style"];
var _excluded3 = [
"type",
"stops",
"id"
];
/**
* Converts a CSS style into a plain Javascript object.
* @param {String} style The style to converts into a plain Javascript object.
* @returns {Object}
*/
function styleToObject(style) {
return style.split(";").map(function(s) {
return s.trim();
}).filter(function(s) {
return s;
}).reduce(function(output, pair) {
var idx = pair.indexOf(":");
var prop = humps.camelize(pair.slice(0, idx));
output[prop] = pair.slice(idx + 1).trim();
return output;
}, {});
}
/**
* Converts a CSS class list into a plain Javascript object.
* @param {Array<String>} classes The class list to convert.
* @returns {Object}
*/
function classToObject(classes) {
return classes.split(/\s+/).reduce(function(output, className) {
output[className] = true;
return output;
}, {});
}
/**
* Creates a Vue VNode for an SVG gradient stop element.
* @param {Object} stop The gradient stop definition.
* @param {string|number} stop.offset The offset of the stop.
* @param {string} stop.color The color of the stop.
* @param {number} [stop.opacity] The opacity of the stop.
* @param {number} index The index of the stop.
* @returns {VNode}
*/
function createGradientStop(stop, index) {
return h("stop", _objectSpread2({
"key": "".concat(index, "-").concat(stop.offset),
"offset": stop.offset,
"stop-color": stop.color
}, stop.opacity !== void 0 && { "stop-opacity": stop.opacity }));
}
/**
* Recursively removes the fill attribute from all path elements in an abstract element tree.
* @param {AbstractElement | String} abstractElement
* @returns {AbstractElement | String}
*/
function stripFillsFromPaths(abstractElement) {
if (typeof abstractElement === "string") return abstractElement;
var children = (abstractElement.children || []).map(stripFillsFromPaths);
if (abstractElement.tag === "path" && abstractElement.attributes && "fill" in abstractElement.attributes) return _objectSpread2(_objectSpread2({}, abstractElement), {}, {
attributes: _objectSpread2(_objectSpread2({}, abstractElement.attributes), {}, { fill: void 0 }),
children
});
return _objectSpread2(_objectSpread2({}, abstractElement), {}, { children });
}
/**
* Converts a FontAwesome abstract element of an icon into a Vue VNode.
* @param {AbstractElement | String} abstractElement The element to convert.
* @param {Object} props Options including gradientFill and any extra VNode props.
* @param {Object} attrs The user-defined native HTML attributes.
* @returns {VNode}
*/
function convert(abstractElement) {
var props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
var attrs = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
if (typeof abstractElement === "string") return abstractElement;
var _props$gradientFill = props.gradientFill, gradientFill = _props$gradientFill === void 0 ? null : _props$gradientFill, renderProps = _objectWithoutProperties(props, _excluded);
var element = !!gradientFill || "fill" in attrs ? stripFillsFromPaths(abstractElement) : abstractElement;
var children = (element.children || []).map(function(child) {
return convert(child, {}, {});
});
var mixins = Object.keys(element.attributes || {}).reduce(function(mixins, key) {
var value = element.attributes[key];
switch (key) {
case "class":
mixins.class = classToObject(value);
break;
case "style":
mixins.style = styleToObject(value);
break;
default: mixins.attrs[key] = value;
}
return mixins;
}, {
attrs: {},
class: {},
style: {}
});
attrs.class;
var _attrs$style = attrs.style, aStyle = _attrs$style === void 0 ? {} : _attrs$style, otherAttrs = _objectWithoutProperties(attrs, _excluded2);
if (gradientFill && gradientFill.id && (gradientFill.type === "linear" || gradientFill.type === "radial")) {
var gradientType = gradientFill.type, _gradientFill$stops = gradientFill.stops, stops = _gradientFill$stops === void 0 ? [] : _gradientFill$stops, id = gradientFill.id, gradientProps = _objectWithoutProperties(gradientFill, _excluded3);
var gradientVNode = h(gradientType === "linear" ? "linearGradient" : "radialGradient", _objectSpread2(_objectSpread2({}, gradientProps), {}, { id }), stops.map(createGradientStop));
return h(element.tag, _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, renderProps), {}, {
class: mixins.class,
style: _objectSpread2(_objectSpread2({}, mixins.style), aStyle)
}, mixins.attrs), otherAttrs), {}, { fill: "url(#".concat(id, ")") }), [gradientVNode].concat(_toConsumableArray(children)));
}
return h(abstractElement.tag, _objectSpread2(_objectSpread2(_objectSpread2({}, renderProps), {}, {
class: mixins.class,
style: _objectSpread2(_objectSpread2({}, mixins.style), aStyle)
}, mixins.attrs), otherAttrs), children);
}
var PRODUCTION = false;
try {
PRODUCTION = false;
} catch (e) {}
function log() {
if (!PRODUCTION && console && typeof console.error === "function") {
var _console;
(_console = console).error.apply(_console, arguments);
}
}
function normalizeIconArgs(icon) {
if (icon && _typeof(icon) === "object" && icon.prefix && icon.iconName && icon.icon) return icon;
if (parse$1.icon) return parse$1.icon(icon);
if (icon === null) return null;
if (_typeof(icon) === "object" && icon.prefix && icon.iconName) return icon;
if (Array.isArray(icon) && icon.length === 2) return {
prefix: icon[0],
iconName: icon[1]
};
if (typeof icon === "string") return {
prefix: "fas",
iconName: icon
};
}
var FontAwesomeIcon = defineComponent({
name: "FontAwesomeIcon",
props: {
border: {
type: Boolean,
default: false
},
fixedWidth: {
type: Boolean,
default: false
},
flip: {
type: [Boolean, String],
default: false,
validator: function validator(value) {
return [
true,
false,
"horizontal",
"vertical",
"both"
].indexOf(value) > -1;
}
},
icon: {
type: [
Object,
Array,
String
],
required: true
},
mask: {
type: [
Object,
Array,
String
],
default: null
},
maskId: {
type: String,
default: null
},
listItem: {
type: Boolean,
default: false
},
pull: {
type: String,
default: null,
validator: function validator(value) {
return ["right", "left"].indexOf(value) > -1;
}
},
pulse: {
type: Boolean,
default: false
},
rotation: {
type: [String, Number],
default: null,
validator: function validator(value) {
return [
90,
180,
270
].indexOf(Number.parseInt(value, 10)) > -1;
}
},
rotateBy: {
type: Boolean,
default: false
},
swapOpacity: {
type: Boolean,
default: false
},
size: {
type: String,
default: null,
validator: function validator(value) {
return [
"2xs",
"xs",
"sm",
"lg",
"xl",
"2xl",
"1x",
"2x",
"3x",
"4x",
"5x",
"6x",
"7x",
"8x",
"9x",
"10x"
].indexOf(value) > -1;
}
},
spin: {
type: Boolean,
default: false
},
transform: {
type: [String, Object],
default: null
},
symbol: {
type: [Boolean, String],
default: false
},
title: {
type: String,
default: null
},
titleId: {
type: String,
default: null
},
inverse: {
type: Boolean,
default: false
},
bounce: {
type: Boolean,
default: false
},
shake: {
type: Boolean,
default: false
},
beat: {
type: Boolean,
default: false
},
fade: {
type: Boolean,
default: false
},
beatFade: {
type: Boolean,
default: false
},
flash: {
type: Boolean,
default: false
},
spinPulse: {
type: Boolean,
default: false
},
spinReverse: {
type: Boolean,
default: false
},
widthAuto: {
type: Boolean,
default: false
},
canvasSquare: {
type: Boolean,
default: false
},
canvasRoomy: {
type: Boolean,
default: false
},
gradientFill: {
type: Object,
default: null,
validator: function validator(value) {
if (typeof value.id !== "string" || !value.id) {
console.warn("FontAwesomeIcon: gradientFill.id must be a non-empty string");
return false;
}
if (value.type !== "linear" && value.type !== "radial") {
console.warn("FontAwesomeIcon: gradientFill.type must be \"linear\" or \"radial\"");
return false;
}
return true;
}
},
flip360: {
type: Boolean,
default: false
},
buzz: {
type: Boolean,
default: false
},
float: {
type: Boolean,
default: false
},
jello: {
type: Boolean,
default: false
},
spinSnap: {
type: Boolean,
default: false
},
spinSnap4: {
type: Boolean,
default: false
},
spinSnap8: {
type: Boolean,
default: false
},
swing: {
type: Boolean,
default: false
},
wag: {
type: Boolean,
default: false
}
},
setup: function setup(props, _ref) {
var attrs = _ref.attrs;
var icon$1 = computed(function() {
return normalizeIconArgs(props.icon);
});
var classes = computed(function() {
return objectWithKey("classes", classList(props));
});
var transform = computed(function() {
return objectWithKey("transform", typeof props.transform === "string" ? parse$1.transform(props.transform) : props.transform);
});
var mask = computed(function() {
return objectWithKey("mask", normalizeIconArgs(props.mask));
});
var renderedIcon = computed(function() {
var iconProps = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, classes.value), transform.value), mask.value), {}, {
symbol: props.symbol,
maskId: props.maskId
});
iconProps.title = props.title;
iconProps.titleId = props.titleId;
return icon(icon$1.value, iconProps);
});
watch(renderedIcon, function(value) {
if (!value) return log("Could not find one or more icon(s)", icon$1.value, mask.value);
}, { immediate: true });
if (props.gradientFill && props.symbol) log("gradientFill is not supported when symbol is true and will be ignored");
var vnode = computed(function() {
return renderedIcon.value ? convert(renderedIcon.value.abstract[0], { gradientFill: props.symbol ? null : props.gradientFill }, attrs) : null;
});
return function() {
return vnode.value;
};
}
});
var FontAwesomeLayers = defineComponent({
name: "FontAwesomeLayers",
props: { fixedWidth: {
type: Boolean,
default: false
} },
setup: function setup(props, _ref) {
var slots = _ref.slots;
var familyPrefix = config$1.familyPrefix;
var className = computed(function() {
return ["".concat(familyPrefix, "-layers")].concat(_toConsumableArray(props.fixedWidth ? ["".concat(familyPrefix, "-fw")] : []));
});
return function() {
return h("div", { class: className.value }, slots.default ? slots.default() : []);
};
}
});
var FontAwesomeLayersText = defineComponent({
name: "FontAwesomeLayersText",
props: {
value: {
type: [String, Number],
default: ""
},
transform: {
type: [String, Object],
default: null
},
counter: {
type: Boolean,
default: false
},
position: {
type: String,
default: null,
validator: function validator(value) {
return [
"bottom-left",
"bottom-right",
"top-left",
"top-right"
].indexOf(value) > -1;
}
}
},
setup: function setup(props, _ref) {
var attrs = _ref.attrs;
var familyPrefix = config$1.familyPrefix;
var classes = computed(function() {
return objectWithKey("classes", [].concat(_toConsumableArray(props.counter ? ["".concat(familyPrefix, "-layers-counter")] : []), _toConsumableArray(props.position ? ["".concat(familyPrefix, "-layers-").concat(props.position)] : [])));
});
var transform = computed(function() {
return objectWithKey("transform", typeof props.transform === "string" ? parse$1.transform(props.transform) : props.transform);
});
var abstractElement = computed(function() {
var abstract = text(props.value.toString(), _objectSpread2(_objectSpread2({}, transform.value), classes.value)).abstract;
if (props.counter) abstract[0].attributes.class = abstract[0].attributes.class.replace("fa-layers-text", "");
return abstract[0];
});
var vnode = computed(function() {
return convert(abstractElement.value, {}, attrs);
});
return function() {
return vnode.value;
};
}
});
//#endregion
export { FontAwesomeIcon, FontAwesomeLayers, FontAwesomeLayersText };