index.mjs 113 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083
  1. function ownKeys(object, enumerableOnly) {
  2. var keys = Object.keys(object);
  3. if (Object.getOwnPropertySymbols) {
  4. var symbols = Object.getOwnPropertySymbols(object);
  5. enumerableOnly && (symbols = symbols.filter(function (sym) {
  6. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  7. })), keys.push.apply(keys, symbols);
  8. }
  9. return keys;
  10. }
  11. function _objectSpread2(target) {
  12. for (var i = 1; i < arguments.length; i++) {
  13. var source = null != arguments[i] ? arguments[i] : {};
  14. i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
  15. _defineProperty(target, key, source[key]);
  16. }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
  17. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  18. });
  19. }
  20. return target;
  21. }
  22. function _typeof(obj) {
  23. "@babel/helpers - typeof";
  24. return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
  25. return typeof obj;
  26. } : function (obj) {
  27. return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
  28. }, _typeof(obj);
  29. }
  30. function _wrapRegExp() {
  31. _wrapRegExp = function (re, groups) {
  32. return new BabelRegExp(re, void 0, groups);
  33. };
  34. var _super = RegExp.prototype,
  35. _groups = new WeakMap();
  36. function BabelRegExp(re, flags, groups) {
  37. var _this = new RegExp(re, flags);
  38. return _groups.set(_this, groups || _groups.get(re)), _setPrototypeOf(_this, BabelRegExp.prototype);
  39. }
  40. function buildGroups(result, re) {
  41. var g = _groups.get(re);
  42. return Object.keys(g).reduce(function (groups, name) {
  43. return groups[name] = result[g[name]], groups;
  44. }, Object.create(null));
  45. }
  46. return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (str) {
  47. var result = _super.exec.call(this, str);
  48. return result && (result.groups = buildGroups(result, this)), result;
  49. }, BabelRegExp.prototype[Symbol.replace] = function (str, substitution) {
  50. if ("string" == typeof substitution) {
  51. var groups = _groups.get(this);
  52. return _super[Symbol.replace].call(this, str, substitution.replace(/\$<([^>]+)>/g, function (_, name) {
  53. return "$" + groups[name];
  54. }));
  55. }
  56. if ("function" == typeof substitution) {
  57. var _this = this;
  58. return _super[Symbol.replace].call(this, str, function () {
  59. var args = arguments;
  60. return "object" != typeof args[args.length - 1] && (args = [].slice.call(args)).push(buildGroups(args, _this)), substitution.apply(this, args);
  61. });
  62. }
  63. return _super[Symbol.replace].call(this, str, substitution);
  64. }, _wrapRegExp.apply(this, arguments);
  65. }
  66. function _classCallCheck(instance, Constructor) {
  67. if (!(instance instanceof Constructor)) {
  68. throw new TypeError("Cannot call a class as a function");
  69. }
  70. }
  71. function _defineProperties(target, props) {
  72. for (var i = 0; i < props.length; i++) {
  73. var descriptor = props[i];
  74. descriptor.enumerable = descriptor.enumerable || false;
  75. descriptor.configurable = true;
  76. if ("value" in descriptor) descriptor.writable = true;
  77. Object.defineProperty(target, descriptor.key, descriptor);
  78. }
  79. }
  80. function _createClass(Constructor, protoProps, staticProps) {
  81. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  82. if (staticProps) _defineProperties(Constructor, staticProps);
  83. Object.defineProperty(Constructor, "prototype", {
  84. writable: false
  85. });
  86. return Constructor;
  87. }
  88. function _defineProperty(obj, key, value) {
  89. if (key in obj) {
  90. Object.defineProperty(obj, key, {
  91. value: value,
  92. enumerable: true,
  93. configurable: true,
  94. writable: true
  95. });
  96. } else {
  97. obj[key] = value;
  98. }
  99. return obj;
  100. }
  101. function _inherits(subClass, superClass) {
  102. if (typeof superClass !== "function" && superClass !== null) {
  103. throw new TypeError("Super expression must either be null or a function");
  104. }
  105. subClass.prototype = Object.create(superClass && superClass.prototype, {
  106. constructor: {
  107. value: subClass,
  108. writable: true,
  109. configurable: true
  110. }
  111. });
  112. Object.defineProperty(subClass, "prototype", {
  113. writable: false
  114. });
  115. if (superClass) _setPrototypeOf(subClass, superClass);
  116. }
  117. function _setPrototypeOf(o, p) {
  118. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  119. o.__proto__ = p;
  120. return o;
  121. };
  122. return _setPrototypeOf(o, p);
  123. }
  124. function _slicedToArray(arr, i) {
  125. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
  126. }
  127. function _toConsumableArray(arr) {
  128. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  129. }
  130. function _arrayWithoutHoles(arr) {
  131. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  132. }
  133. function _arrayWithHoles(arr) {
  134. if (Array.isArray(arr)) return arr;
  135. }
  136. function _iterableToArray(iter) {
  137. if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
  138. }
  139. function _iterableToArrayLimit(arr, i) {
  140. var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
  141. if (_i == null) return;
  142. var _arr = [];
  143. var _n = true;
  144. var _d = false;
  145. var _s, _e;
  146. try {
  147. for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
  148. _arr.push(_s.value);
  149. if (i && _arr.length === i) break;
  150. }
  151. } catch (err) {
  152. _d = true;
  153. _e = err;
  154. } finally {
  155. try {
  156. if (!_n && _i["return"] != null) _i["return"]();
  157. } finally {
  158. if (_d) throw _e;
  159. }
  160. }
  161. return _arr;
  162. }
  163. function _unsupportedIterableToArray(o, minLen) {
  164. if (!o) return;
  165. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  166. var n = Object.prototype.toString.call(o).slice(8, -1);
  167. if (n === "Object" && o.constructor) n = o.constructor.name;
  168. if (n === "Map" || n === "Set") return Array.from(o);
  169. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  170. }
  171. function _arrayLikeToArray(arr, len) {
  172. if (len == null || len > arr.length) len = arr.length;
  173. for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
  174. return arr2;
  175. }
  176. function _nonIterableSpread() {
  177. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  178. }
  179. function _nonIterableRest() {
  180. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  181. }
  182. var noop = function noop() {};
  183. var _WINDOW = {};
  184. var _DOCUMENT = {};
  185. var _MUTATION_OBSERVER = null;
  186. var _PERFORMANCE = {
  187. mark: noop,
  188. measure: noop
  189. };
  190. try {
  191. if (typeof window !== 'undefined') _WINDOW = window;
  192. if (typeof document !== 'undefined') _DOCUMENT = document;
  193. if (typeof MutationObserver !== 'undefined') _MUTATION_OBSERVER = MutationObserver;
  194. if (typeof performance !== 'undefined') _PERFORMANCE = performance;
  195. } catch (e) {}
  196. var _ref = _WINDOW.navigator || {},
  197. _ref$userAgent = _ref.userAgent,
  198. userAgent = _ref$userAgent === void 0 ? '' : _ref$userAgent;
  199. var WINDOW = _WINDOW;
  200. var DOCUMENT = _DOCUMENT;
  201. var MUTATION_OBSERVER = _MUTATION_OBSERVER;
  202. var PERFORMANCE = _PERFORMANCE;
  203. var IS_BROWSER = !!WINDOW.document;
  204. var IS_DOM = !!DOCUMENT.documentElement && !!DOCUMENT.head && typeof DOCUMENT.addEventListener === 'function' && typeof DOCUMENT.createElement === 'function';
  205. var IS_IE = ~userAgent.indexOf('MSIE') || ~userAgent.indexOf('Trident/');
  206. var _familyProxy, _familyProxy2, _familyProxy3, _familyProxy4, _familyProxy5;
  207. var NAMESPACE_IDENTIFIER = '___FONT_AWESOME___';
  208. var UNITS_IN_GRID = 16;
  209. var DEFAULT_CSS_PREFIX = 'fa';
  210. var DEFAULT_REPLACEMENT_CLASS = 'svg-inline--fa';
  211. var DATA_FA_I2SVG = 'data-fa-i2svg';
  212. var DATA_FA_PSEUDO_ELEMENT = 'data-fa-pseudo-element';
  213. var DATA_FA_PSEUDO_ELEMENT_PENDING = 'data-fa-pseudo-element-pending';
  214. var DATA_PREFIX = 'data-prefix';
  215. var DATA_ICON = 'data-icon';
  216. var HTML_CLASS_I2SVG_BASE_CLASS = 'fontawesome-i2svg';
  217. var MUTATION_APPROACH_ASYNC = 'async';
  218. var TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS = ['HTML', 'HEAD', 'STYLE', 'SCRIPT'];
  219. var PRODUCTION = function () {
  220. try {
  221. return process.env.NODE_ENV === 'production';
  222. } catch (e) {
  223. return false;
  224. }
  225. }();
  226. var FAMILY_CLASSIC = 'classic';
  227. var FAMILY_SHARP = 'sharp';
  228. var FAMILIES = [FAMILY_CLASSIC, FAMILY_SHARP];
  229. function familyProxy(obj) {
  230. // Defaults to the classic family if family is not available
  231. return new Proxy(obj, {
  232. get: function get(target, prop) {
  233. return prop in target ? target[prop] : target[FAMILY_CLASSIC];
  234. }
  235. });
  236. }
  237. var PREFIX_TO_STYLE = familyProxy((_familyProxy = {}, _defineProperty(_familyProxy, FAMILY_CLASSIC, {
  238. 'fa': 'solid',
  239. 'fas': 'solid',
  240. 'fa-solid': 'solid',
  241. 'far': 'regular',
  242. 'fa-regular': 'regular',
  243. 'fal': 'light',
  244. 'fa-light': 'light',
  245. 'fat': 'thin',
  246. 'fa-thin': 'thin',
  247. 'fad': 'duotone',
  248. 'fa-duotone': 'duotone',
  249. 'fab': 'brands',
  250. 'fa-brands': 'brands',
  251. 'fak': 'kit',
  252. 'fakd': 'kit',
  253. 'fa-kit': 'kit',
  254. 'fa-kit-duotone': 'kit'
  255. }), _defineProperty(_familyProxy, FAMILY_SHARP, {
  256. 'fa': 'solid',
  257. 'fass': 'solid',
  258. 'fa-solid': 'solid',
  259. 'fasr': 'regular',
  260. 'fa-regular': 'regular',
  261. 'fasl': 'light',
  262. 'fa-light': 'light',
  263. 'fast': 'thin',
  264. 'fa-thin': 'thin'
  265. }), _familyProxy));
  266. var STYLE_TO_PREFIX = familyProxy((_familyProxy2 = {}, _defineProperty(_familyProxy2, FAMILY_CLASSIC, {
  267. solid: 'fas',
  268. regular: 'far',
  269. light: 'fal',
  270. thin: 'fat',
  271. duotone: 'fad',
  272. brands: 'fab',
  273. kit: 'fak'
  274. }), _defineProperty(_familyProxy2, FAMILY_SHARP, {
  275. solid: 'fass',
  276. regular: 'fasr',
  277. light: 'fasl',
  278. thin: 'fast'
  279. }), _familyProxy2));
  280. var PREFIX_TO_LONG_STYLE = familyProxy((_familyProxy3 = {}, _defineProperty(_familyProxy3, FAMILY_CLASSIC, {
  281. fab: 'fa-brands',
  282. fad: 'fa-duotone',
  283. fak: 'fa-kit',
  284. fal: 'fa-light',
  285. far: 'fa-regular',
  286. fas: 'fa-solid',
  287. fat: 'fa-thin'
  288. }), _defineProperty(_familyProxy3, FAMILY_SHARP, {
  289. fass: 'fa-solid',
  290. fasr: 'fa-regular',
  291. fasl: 'fa-light',
  292. fast: 'fa-thin'
  293. }), _familyProxy3));
  294. var LONG_STYLE_TO_PREFIX = familyProxy((_familyProxy4 = {}, _defineProperty(_familyProxy4, FAMILY_CLASSIC, {
  295. 'fa-brands': 'fab',
  296. 'fa-duotone': 'fad',
  297. 'fa-kit': 'fak',
  298. 'fa-light': 'fal',
  299. 'fa-regular': 'far',
  300. 'fa-solid': 'fas',
  301. 'fa-thin': 'fat'
  302. }), _defineProperty(_familyProxy4, FAMILY_SHARP, {
  303. 'fa-solid': 'fass',
  304. 'fa-regular': 'fasr',
  305. 'fa-light': 'fasl',
  306. 'fa-thin': 'fast'
  307. }), _familyProxy4));
  308. var ICON_SELECTION_SYNTAX_PATTERN = /fa(s|r|l|t|d|b|k|ss|sr|sl|st)?[\-\ ]/; // eslint-disable-line no-useless-escape
  309. var LAYERS_TEXT_CLASSNAME = 'fa-layers-text';
  310. var FONT_FAMILY_PATTERN = /Font ?Awesome ?([56 ]*)(Solid|Regular|Light|Thin|Duotone|Brands|Free|Pro|Sharp|Kit)?.*/i;
  311. var FONT_WEIGHT_TO_PREFIX = familyProxy((_familyProxy5 = {}, _defineProperty(_familyProxy5, FAMILY_CLASSIC, {
  312. 900: 'fas',
  313. 400: 'far',
  314. normal: 'far',
  315. 300: 'fal',
  316. 100: 'fat'
  317. }), _defineProperty(_familyProxy5, FAMILY_SHARP, {
  318. 900: 'fass',
  319. 400: 'fasr',
  320. 300: 'fasl',
  321. 100: 'fast'
  322. }), _familyProxy5));
  323. var oneToTen = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
  324. var oneToTwenty = oneToTen.concat([11, 12, 13, 14, 15, 16, 17, 18, 19, 20]);
  325. var ATTRIBUTES_WATCHED_FOR_MUTATION = ['class', 'data-prefix', 'data-icon', 'data-fa-transform', 'data-fa-mask'];
  326. var DUOTONE_CLASSES = {
  327. GROUP: 'duotone-group',
  328. SWAP_OPACITY: 'swap-opacity',
  329. PRIMARY: 'primary',
  330. SECONDARY: 'secondary'
  331. };
  332. var prefixes = new Set();
  333. Object.keys(STYLE_TO_PREFIX[FAMILY_CLASSIC]).map(prefixes.add.bind(prefixes));
  334. Object.keys(STYLE_TO_PREFIX[FAMILY_SHARP]).map(prefixes.add.bind(prefixes));
  335. var RESERVED_CLASSES = [].concat(FAMILIES, _toConsumableArray(prefixes), ['2xs', 'xs', 'sm', 'lg', 'xl', '2xl', 'beat', 'border', 'fade', 'beat-fade', 'bounce', 'flip-both', 'flip-horizontal', 'flip-vertical', 'flip', 'fw', 'inverse', 'layers-counter', 'layers-text', 'layers', 'li', 'pull-left', 'pull-right', 'pulse', 'rotate-180', 'rotate-270', 'rotate-90', 'rotate-by', 'shake', 'spin-pulse', 'spin-reverse', 'spin', 'stack-1x', 'stack-2x', 'stack', 'ul', DUOTONE_CLASSES.GROUP, DUOTONE_CLASSES.SWAP_OPACITY, DUOTONE_CLASSES.PRIMARY, DUOTONE_CLASSES.SECONDARY]).concat(oneToTen.map(function (n) {
  336. return "".concat(n, "x");
  337. })).concat(oneToTwenty.map(function (n) {
  338. return "w-".concat(n);
  339. }));
  340. var initial = WINDOW.FontAwesomeConfig || {};
  341. function getAttrConfig(attr) {
  342. var element = DOCUMENT.querySelector('script[' + attr + ']');
  343. if (element) {
  344. return element.getAttribute(attr);
  345. }
  346. }
  347. function coerce(val) {
  348. // Getting an empty string will occur if the attribute is set on the HTML tag but without a value
  349. // We'll assume that this is an indication that it should be toggled to true
  350. if (val === '') return true;
  351. if (val === 'false') return false;
  352. if (val === 'true') return true;
  353. return val;
  354. }
  355. if (DOCUMENT && typeof DOCUMENT.querySelector === 'function') {
  356. var attrs = [['data-family-prefix', 'familyPrefix'], ['data-css-prefix', 'cssPrefix'], ['data-family-default', 'familyDefault'], ['data-style-default', 'styleDefault'], ['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']];
  357. attrs.forEach(function (_ref) {
  358. var _ref2 = _slicedToArray(_ref, 2),
  359. attr = _ref2[0],
  360. key = _ref2[1];
  361. var val = coerce(getAttrConfig(attr));
  362. if (val !== undefined && val !== null) {
  363. initial[key] = val;
  364. }
  365. });
  366. }
  367. var _default = {
  368. styleDefault: 'solid',
  369. familyDefault: 'classic',
  370. cssPrefix: DEFAULT_CSS_PREFIX,
  371. replacementClass: DEFAULT_REPLACEMENT_CLASS,
  372. autoReplaceSvg: true,
  373. autoAddCss: true,
  374. autoA11y: true,
  375. searchPseudoElements: false,
  376. observeMutations: true,
  377. mutateApproach: 'async',
  378. keepOriginalSource: true,
  379. measurePerformance: false,
  380. showMissingIcons: true
  381. }; // familyPrefix is deprecated but we must still support it if present
  382. if (initial.familyPrefix) {
  383. initial.cssPrefix = initial.familyPrefix;
  384. }
  385. var _config = _objectSpread2(_objectSpread2({}, _default), initial);
  386. if (!_config.autoReplaceSvg) _config.observeMutations = false;
  387. var config = {};
  388. Object.keys(_default).forEach(function (key) {
  389. Object.defineProperty(config, key, {
  390. enumerable: true,
  391. set: function set(val) {
  392. _config[key] = val;
  393. _onChangeCb.forEach(function (cb) {
  394. return cb(config);
  395. });
  396. },
  397. get: function get() {
  398. return _config[key];
  399. }
  400. });
  401. }); // familyPrefix is deprecated as of 6.2.0 and should be removed in 7.0.0
  402. Object.defineProperty(config, 'familyPrefix', {
  403. enumerable: true,
  404. set: function set(val) {
  405. _config.cssPrefix = val;
  406. _onChangeCb.forEach(function (cb) {
  407. return cb(config);
  408. });
  409. },
  410. get: function get() {
  411. return _config.cssPrefix;
  412. }
  413. });
  414. WINDOW.FontAwesomeConfig = config;
  415. var _onChangeCb = [];
  416. function onChange(cb) {
  417. _onChangeCb.push(cb);
  418. return function () {
  419. _onChangeCb.splice(_onChangeCb.indexOf(cb), 1);
  420. };
  421. }
  422. var d = UNITS_IN_GRID;
  423. var meaninglessTransform = {
  424. size: 16,
  425. x: 0,
  426. y: 0,
  427. rotate: 0,
  428. flipX: false,
  429. flipY: false
  430. };
  431. function insertCss(css) {
  432. if (!css || !IS_DOM) {
  433. return;
  434. }
  435. var style = DOCUMENT.createElement('style');
  436. style.setAttribute('type', 'text/css');
  437. style.innerHTML = css;
  438. var headChildren = DOCUMENT.head.childNodes;
  439. var beforeChild = null;
  440. for (var i = headChildren.length - 1; i > -1; i--) {
  441. var child = headChildren[i];
  442. var tagName = (child.tagName || '').toUpperCase();
  443. if (['STYLE', 'LINK'].indexOf(tagName) > -1) {
  444. beforeChild = child;
  445. }
  446. }
  447. DOCUMENT.head.insertBefore(style, beforeChild);
  448. return css;
  449. }
  450. var idPool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  451. function nextUniqueId() {
  452. var size = 12;
  453. var id = '';
  454. while (size-- > 0) {
  455. id += idPool[Math.random() * 62 | 0];
  456. }
  457. return id;
  458. }
  459. function toArray(obj) {
  460. var array = [];
  461. for (var i = (obj || []).length >>> 0; i--;) {
  462. array[i] = obj[i];
  463. }
  464. return array;
  465. }
  466. function classArray(node) {
  467. if (node.classList) {
  468. return toArray(node.classList);
  469. } else {
  470. return (node.getAttribute('class') || '').split(' ').filter(function (i) {
  471. return i;
  472. });
  473. }
  474. }
  475. function htmlEscape(str) {
  476. return "".concat(str).replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#39;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
  477. }
  478. function joinAttributes(attributes) {
  479. return Object.keys(attributes || {}).reduce(function (acc, attributeName) {
  480. return acc + "".concat(attributeName, "=\"").concat(htmlEscape(attributes[attributeName]), "\" ");
  481. }, '').trim();
  482. }
  483. function joinStyles(styles) {
  484. return Object.keys(styles || {}).reduce(function (acc, styleName) {
  485. return acc + "".concat(styleName, ": ").concat(styles[styleName].trim(), ";");
  486. }, '');
  487. }
  488. function transformIsMeaningful(transform) {
  489. return transform.size !== meaninglessTransform.size || transform.x !== meaninglessTransform.x || transform.y !== meaninglessTransform.y || transform.rotate !== meaninglessTransform.rotate || transform.flipX || transform.flipY;
  490. }
  491. function transformForSvg(_ref) {
  492. var transform = _ref.transform,
  493. containerWidth = _ref.containerWidth,
  494. iconWidth = _ref.iconWidth;
  495. var outer = {
  496. transform: "translate(".concat(containerWidth / 2, " 256)")
  497. };
  498. var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
  499. var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
  500. var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
  501. var inner = {
  502. transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
  503. };
  504. var path = {
  505. transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
  506. };
  507. return {
  508. outer: outer,
  509. inner: inner,
  510. path: path
  511. };
  512. }
  513. function transformForCss(_ref2) {
  514. var transform = _ref2.transform,
  515. _ref2$width = _ref2.width,
  516. width = _ref2$width === void 0 ? UNITS_IN_GRID : _ref2$width,
  517. _ref2$height = _ref2.height,
  518. height = _ref2$height === void 0 ? UNITS_IN_GRID : _ref2$height,
  519. _ref2$startCentered = _ref2.startCentered,
  520. startCentered = _ref2$startCentered === void 0 ? false : _ref2$startCentered;
  521. var val = '';
  522. if (startCentered && IS_IE) {
  523. val += "translate(".concat(transform.x / d - width / 2, "em, ").concat(transform.y / d - height / 2, "em) ");
  524. } else if (startCentered) {
  525. val += "translate(calc(-50% + ".concat(transform.x / d, "em), calc(-50% + ").concat(transform.y / d, "em)) ");
  526. } else {
  527. val += "translate(".concat(transform.x / d, "em, ").concat(transform.y / d, "em) ");
  528. }
  529. val += "scale(".concat(transform.size / d * (transform.flipX ? -1 : 1), ", ").concat(transform.size / d * (transform.flipY ? -1 : 1), ") ");
  530. val += "rotate(".concat(transform.rotate, "deg) ");
  531. return val;
  532. }
  533. var baseStyles = ":root, :host {\n --fa-font-solid: normal 900 1em/1 \"Font Awesome 6 Solid\";\n --fa-font-regular: normal 400 1em/1 \"Font Awesome 6 Regular\";\n --fa-font-light: normal 300 1em/1 \"Font Awesome 6 Light\";\n --fa-font-thin: normal 100 1em/1 \"Font Awesome 6 Thin\";\n --fa-font-duotone: normal 900 1em/1 \"Font Awesome 6 Duotone\";\n --fa-font-sharp-solid: normal 900 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-sharp-regular: normal 400 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-sharp-light: normal 300 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-sharp-thin: normal 100 1em/1 \"Font Awesome 6 Sharp\";\n --fa-font-brands: normal 400 1em/1 \"Font Awesome 6 Brands\";\n}\n\nsvg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {\n overflow: visible;\n box-sizing: content-box;\n}\n\n.svg-inline--fa {\n display: var(--fa-display, inline-block);\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-2xs {\n vertical-align: 0.1em;\n}\n.svg-inline--fa.fa-xs {\n vertical-align: 0em;\n}\n.svg-inline--fa.fa-sm {\n vertical-align: -0.0714285705em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.2em;\n}\n.svg-inline--fa.fa-xl {\n vertical-align: -0.25em;\n}\n.svg-inline--fa.fa-2xl {\n vertical-align: -0.3125em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: var(--fa-pull-margin, 0.3em);\n width: auto;\n}\n.svg-inline--fa.fa-li {\n width: var(--fa-li-width, 2em);\n top: 0.25em;\n}\n.svg-inline--fa.fa-fw {\n width: var(--fa-fw-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-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\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-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: var(--fa-counter-background-color, #ff253a);\n border-radius: var(--fa-counter-border-radius, 1em);\n box-sizing: border-box;\n color: var(--fa-inverse, #fff);\n line-height: var(--fa-counter-line-height, 1);\n max-width: var(--fa-counter-max-width, 5em);\n min-width: var(--fa-counter-min-width, 1.5em);\n overflow: hidden;\n padding: var(--fa-counter-padding, 0.25em 0.5em);\n right: var(--fa-right, 0);\n text-overflow: ellipsis;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-counter-scale, 0.25));\n transform: scale(var(--fa-counter-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: var(--fa-bottom, 0);\n right: var(--fa-right, 0);\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: var(--fa-bottom, 0);\n left: var(--fa-left, 0);\n right: auto;\n top: auto;\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n top: var(--fa-top, 0);\n right: var(--fa-right, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: var(--fa-left, 0);\n right: auto;\n top: var(--fa-top, 0);\n -webkit-transform: scale(var(--fa-layers-scale, 0.25));\n transform: scale(var(--fa-layers-scale, 0.25));\n -webkit-transform-origin: top left;\n transform-origin: top left;\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-2xs {\n font-size: 0.625em;\n line-height: 0.1em;\n vertical-align: 0.225em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n line-height: 0.0833333337em;\n vertical-align: 0.125em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n line-height: 0.0714285718em;\n vertical-align: 0.0535714295em;\n}\n\n.fa-lg {\n font-size: 1.25em;\n line-height: 0.05em;\n vertical-align: -0.075em;\n}\n\n.fa-xl {\n font-size: 1.5em;\n line-height: 0.0416666682em;\n vertical-align: -0.125em;\n}\n\n.fa-2xl {\n font-size: 2em;\n line-height: 0.03125em;\n vertical-align: -0.1875em;\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: var(--fa-li-margin, 2.5em);\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: calc(var(--fa-li-width, 2em) * -1);\n position: absolute;\n text-align: center;\n width: var(--fa-li-width, 2em);\n line-height: inherit;\n}\n\n.fa-border {\n border-color: var(--fa-border-color, #eee);\n border-radius: var(--fa-border-radius, 0.1em);\n border-style: var(--fa-border-style, solid);\n border-width: var(--fa-border-width, 0.08em);\n padding: var(--fa-border-padding, 0.2em 0.25em 0.15em);\n}\n\n.fa-pull-left {\n float: left;\n margin-right: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-pull-right {\n float: right;\n margin-left: var(--fa-pull-margin, 0.3em);\n}\n\n.fa-beat {\n -webkit-animation-name: fa-beat;\n animation-name: fa-beat;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-bounce {\n -webkit-animation-name: fa-bounce;\n animation-name: fa-bounce;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.28, 0.84, 0.42, 1));\n}\n\n.fa-fade {\n -webkit-animation-name: fa-fade;\n animation-name: fa-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-beat-fade {\n -webkit-animation-name: fa-beat-fade;\n animation-name: fa-beat-fade;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n animation-timing-function: var(--fa-animation-timing, cubic-bezier(0.4, 0, 0.6, 1));\n}\n\n.fa-flip {\n -webkit-animation-name: fa-flip;\n animation-name: fa-flip;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, ease-in-out);\n animation-timing-function: var(--fa-animation-timing, ease-in-out);\n}\n\n.fa-shake {\n -webkit-animation-name: fa-shake;\n animation-name: fa-shake;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-delay: var(--fa-animation-delay, 0s);\n animation-delay: var(--fa-animation-delay, 0s);\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 2s);\n animation-duration: var(--fa-animation-duration, 2s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, linear);\n animation-timing-function: var(--fa-animation-timing, linear);\n}\n\n.fa-spin-reverse {\n --fa-animation-direction: reverse;\n}\n\n.fa-pulse,\n.fa-spin-pulse {\n -webkit-animation-name: fa-spin;\n animation-name: fa-spin;\n -webkit-animation-direction: var(--fa-animation-direction, normal);\n animation-direction: var(--fa-animation-direction, normal);\n -webkit-animation-duration: var(--fa-animation-duration, 1s);\n animation-duration: var(--fa-animation-duration, 1s);\n -webkit-animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n animation-iteration-count: var(--fa-animation-iteration-count, infinite);\n -webkit-animation-timing-function: var(--fa-animation-timing, steps(8));\n animation-timing-function: var(--fa-animation-timing, steps(8));\n}\n\n@media (prefers-reduced-motion: reduce) {\n .fa-beat,\n.fa-bounce,\n.fa-fade,\n.fa-beat-fade,\n.fa-flip,\n.fa-pulse,\n.fa-shake,\n.fa-spin,\n.fa-spin-pulse {\n -webkit-animation-delay: -1ms;\n animation-delay: -1ms;\n -webkit-animation-duration: 1ms;\n animation-duration: 1ms;\n -webkit-animation-iteration-count: 1;\n animation-iteration-count: 1;\n -webkit-transition-delay: 0s;\n transition-delay: 0s;\n -webkit-transition-duration: 0s;\n transition-duration: 0s;\n }\n}\n@-webkit-keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@keyframes fa-beat {\n 0%, 90% {\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 45% {\n -webkit-transform: scale(var(--fa-beat-scale, 1.25));\n transform: scale(var(--fa-beat-scale, 1.25));\n }\n}\n@-webkit-keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@keyframes fa-bounce {\n 0% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 10% {\n -webkit-transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n transform: scale(var(--fa-bounce-start-scale-x, 1.1), var(--fa-bounce-start-scale-y, 0.9)) translateY(0);\n }\n 30% {\n -webkit-transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n transform: scale(var(--fa-bounce-jump-scale-x, 0.9), var(--fa-bounce-jump-scale-y, 1.1)) translateY(var(--fa-bounce-height, -0.5em));\n }\n 50% {\n -webkit-transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n transform: scale(var(--fa-bounce-land-scale-x, 1.05), var(--fa-bounce-land-scale-y, 0.95)) translateY(0);\n }\n 57% {\n -webkit-transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n transform: scale(1, 1) translateY(var(--fa-bounce-rebound, -0.125em));\n }\n 64% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n 100% {\n -webkit-transform: scale(1, 1) translateY(0);\n transform: scale(1, 1) translateY(0);\n }\n}\n@-webkit-keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@keyframes fa-fade {\n 50% {\n opacity: var(--fa-fade-opacity, 0.4);\n }\n}\n@-webkit-keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@keyframes fa-beat-fade {\n 0%, 100% {\n opacity: var(--fa-beat-fade-opacity, 0.4);\n -webkit-transform: scale(1);\n transform: scale(1);\n }\n 50% {\n opacity: 1;\n -webkit-transform: scale(var(--fa-beat-fade-scale, 1.125));\n transform: scale(var(--fa-beat-fade-scale, 1.125));\n }\n}\n@-webkit-keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@keyframes fa-flip {\n 50% {\n -webkit-transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n transform: rotate3d(var(--fa-flip-x, 0), var(--fa-flip-y, 1), var(--fa-flip-z, 0), var(--fa-flip-angle, -180deg));\n }\n}\n@-webkit-keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n}\n@keyframes fa-shake {\n 0% {\n -webkit-transform: rotate(-15deg);\n transform: rotate(-15deg);\n }\n 4% {\n -webkit-transform: rotate(15deg);\n transform: rotate(15deg);\n }\n 8%, 24% {\n -webkit-transform: rotate(-18deg);\n transform: rotate(-18deg);\n }\n 12%, 28% {\n -webkit-transform: rotate(18deg);\n transform: rotate(18deg);\n }\n 16% {\n -webkit-transform: rotate(-22deg);\n transform: rotate(-22deg);\n }\n 20% {\n -webkit-transform: rotate(22deg);\n transform: rotate(22deg);\n }\n 32% {\n -webkit-transform: rotate(-12deg);\n transform: rotate(-12deg);\n }\n 36% {\n -webkit-transform: rotate(12deg);\n transform: rotate(12deg);\n }\n 40%, 100% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\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@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 -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-both,\n.fa-flip-horizontal.fa-flip-vertical {\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n.fa-rotate-by {\n -webkit-transform: rotate(var(--fa-rotate-angle, none));\n transform: rotate(var(--fa-rotate-angle, none));\n}\n\n.fa-stack {\n display: inline-block;\n vertical-align: middle;\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 z-index: var(--fa-stack-z-index, auto);\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: var(--fa-inverse, #fff);\n}\n\n.sr-only,\n.fa-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.sr-only-focusable:not(:focus),\n.fa-sr-only-focusable:not(:focus) {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.svg-inline--fa .fa-primary {\n fill: var(--fa-primary-color, currentColor);\n opacity: var(--fa-primary-opacity, 1);\n}\n\n.svg-inline--fa .fa-secondary {\n fill: var(--fa-secondary-color, currentColor);\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-primary {\n opacity: var(--fa-secondary-opacity, 0.4);\n}\n\n.svg-inline--fa.fa-swap-opacity .fa-secondary {\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.fa-duotone.fa-inverse {\n color: var(--fa-inverse, #fff);\n}";
  534. function css() {
  535. var dcp = DEFAULT_CSS_PREFIX;
  536. var drc = DEFAULT_REPLACEMENT_CLASS;
  537. var fp = config.cssPrefix;
  538. var rc = config.replacementClass;
  539. var s = baseStyles;
  540. if (fp !== dcp || rc !== drc) {
  541. var dPatt = new RegExp("\\.".concat(dcp, "\\-"), 'g');
  542. var customPropPatt = new RegExp("\\--".concat(dcp, "\\-"), 'g');
  543. var rPatt = new RegExp("\\.".concat(drc), 'g');
  544. s = s.replace(dPatt, ".".concat(fp, "-")).replace(customPropPatt, "--".concat(fp, "-")).replace(rPatt, ".".concat(rc));
  545. }
  546. return s;
  547. }
  548. var _cssInserted = false;
  549. function ensureCss() {
  550. if (config.autoAddCss && !_cssInserted) {
  551. insertCss(css());
  552. _cssInserted = true;
  553. }
  554. }
  555. var InjectCSS = {
  556. mixout: function mixout() {
  557. return {
  558. dom: {
  559. css: css,
  560. insertCss: ensureCss
  561. }
  562. };
  563. },
  564. hooks: function hooks() {
  565. return {
  566. beforeDOMElementCreation: function beforeDOMElementCreation() {
  567. ensureCss();
  568. },
  569. beforeI2svg: function beforeI2svg() {
  570. ensureCss();
  571. }
  572. };
  573. }
  574. };
  575. var w = WINDOW || {};
  576. if (!w[NAMESPACE_IDENTIFIER]) w[NAMESPACE_IDENTIFIER] = {};
  577. if (!w[NAMESPACE_IDENTIFIER].styles) w[NAMESPACE_IDENTIFIER].styles = {};
  578. if (!w[NAMESPACE_IDENTIFIER].hooks) w[NAMESPACE_IDENTIFIER].hooks = {};
  579. if (!w[NAMESPACE_IDENTIFIER].shims) w[NAMESPACE_IDENTIFIER].shims = [];
  580. var namespace = w[NAMESPACE_IDENTIFIER];
  581. var functions = [];
  582. var listener = function listener() {
  583. DOCUMENT.removeEventListener('DOMContentLoaded', listener);
  584. loaded = 1;
  585. functions.map(function (fn) {
  586. return fn();
  587. });
  588. };
  589. var loaded = false;
  590. if (IS_DOM) {
  591. loaded = (DOCUMENT.documentElement.doScroll ? /^loaded|^c/ : /^loaded|^i|^c/).test(DOCUMENT.readyState);
  592. if (!loaded) DOCUMENT.addEventListener('DOMContentLoaded', listener);
  593. }
  594. function domready (fn) {
  595. if (!IS_DOM) return;
  596. loaded ? setTimeout(fn, 0) : functions.push(fn);
  597. }
  598. function toHtml(abstractNodes) {
  599. var tag = abstractNodes.tag,
  600. _abstractNodes$attrib = abstractNodes.attributes,
  601. attributes = _abstractNodes$attrib === void 0 ? {} : _abstractNodes$attrib,
  602. _abstractNodes$childr = abstractNodes.children,
  603. children = _abstractNodes$childr === void 0 ? [] : _abstractNodes$childr;
  604. if (typeof abstractNodes === 'string') {
  605. return htmlEscape(abstractNodes);
  606. } else {
  607. return "<".concat(tag, " ").concat(joinAttributes(attributes), ">").concat(children.map(toHtml).join(''), "</").concat(tag, ">");
  608. }
  609. }
  610. function iconFromMapping(mapping, prefix, iconName) {
  611. if (mapping && mapping[prefix] && mapping[prefix][iconName]) {
  612. return {
  613. prefix: prefix,
  614. iconName: iconName,
  615. icon: mapping[prefix][iconName]
  616. };
  617. }
  618. }
  619. /**
  620. * Internal helper to bind a function known to have 4 arguments
  621. * to a given context.
  622. */
  623. var bindInternal4 = function bindInternal4(func, thisContext) {
  624. return function (a, b, c, d) {
  625. return func.call(thisContext, a, b, c, d);
  626. };
  627. };
  628. /**
  629. * # Reduce
  630. *
  631. * A fast object `.reduce()` implementation.
  632. *
  633. * @param {Object} subject The object to reduce over.
  634. * @param {Function} fn The reducer function.
  635. * @param {mixed} initialValue The initial value for the reducer, defaults to subject[0].
  636. * @param {Object} thisContext The context for the reducer.
  637. * @return {mixed} The final result.
  638. */
  639. var reduce = function fastReduceObject(subject, fn, initialValue, thisContext) {
  640. var keys = Object.keys(subject),
  641. length = keys.length,
  642. iterator = thisContext !== undefined ? bindInternal4(fn, thisContext) : fn,
  643. i,
  644. key,
  645. result;
  646. if (initialValue === undefined) {
  647. i = 1;
  648. result = subject[keys[0]];
  649. } else {
  650. i = 0;
  651. result = initialValue;
  652. }
  653. for (; i < length; i++) {
  654. key = keys[i];
  655. result = iterator(result, subject[key], key, subject);
  656. }
  657. return result;
  658. };
  659. /**
  660. * ucs2decode() and codePointAt() are both works of Mathias Bynens and licensed under MIT
  661. *
  662. * Copyright Mathias Bynens <https://mathiasbynens.be/>
  663. * Permission is hereby granted, free of charge, to any person obtaining
  664. * a copy of this software and associated documentation files (the
  665. * "Software"), to deal in the Software without restriction, including
  666. * without limitation the rights to use, copy, modify, merge, publish,
  667. * distribute, sublicense, and/or sell copies of the Software, and to
  668. * permit persons to whom the Software is furnished to do so, subject to
  669. * the following conditions:
  670. * The above copyright notice and this permission notice shall be
  671. * included in all copies or substantial portions of the Software.
  672. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  673. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  674. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  675. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
  676. * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
  677. * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  678. * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  679. */
  680. function ucs2decode(string) {
  681. var output = [];
  682. var counter = 0;
  683. var length = string.length;
  684. while (counter < length) {
  685. var value = string.charCodeAt(counter++);
  686. if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
  687. var extra = string.charCodeAt(counter++);
  688. if ((extra & 0xFC00) == 0xDC00) {
  689. // eslint-disable-line eqeqeq
  690. output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
  691. } else {
  692. output.push(value);
  693. counter--;
  694. }
  695. } else {
  696. output.push(value);
  697. }
  698. }
  699. return output;
  700. }
  701. function toHex(unicode) {
  702. var decoded = ucs2decode(unicode);
  703. return decoded.length === 1 ? decoded[0].toString(16) : null;
  704. }
  705. function codePointAt(string, index) {
  706. var size = string.length;
  707. var first = string.charCodeAt(index);
  708. var second;
  709. if (first >= 0xD800 && first <= 0xDBFF && size > index + 1) {
  710. second = string.charCodeAt(index + 1);
  711. if (second >= 0xDC00 && second <= 0xDFFF) {
  712. return (first - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
  713. }
  714. }
  715. return first;
  716. }
  717. function normalizeIcons(icons) {
  718. return Object.keys(icons).reduce(function (acc, iconName) {
  719. var icon = icons[iconName];
  720. var expanded = !!icon.icon;
  721. if (expanded) {
  722. acc[icon.iconName] = icon.icon;
  723. } else {
  724. acc[iconName] = icon;
  725. }
  726. return acc;
  727. }, {});
  728. }
  729. function defineIcons(prefix, icons) {
  730. var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  731. var _params$skipHooks = params.skipHooks,
  732. skipHooks = _params$skipHooks === void 0 ? false : _params$skipHooks;
  733. var normalized = normalizeIcons(icons);
  734. if (typeof namespace.hooks.addPack === 'function' && !skipHooks) {
  735. namespace.hooks.addPack(prefix, normalizeIcons(icons));
  736. } else {
  737. namespace.styles[prefix] = _objectSpread2(_objectSpread2({}, namespace.styles[prefix] || {}), normalized);
  738. }
  739. /**
  740. * Font Awesome 4 used the prefix of `fa` for all icons. With the introduction
  741. * of new styles we needed to differentiate between them. Prefix `fa` is now an alias
  742. * for `fas` so we'll ease the upgrade process for our users by automatically defining
  743. * this as well.
  744. */
  745. if (prefix === 'fas') {
  746. defineIcons('fa', icons);
  747. }
  748. }
  749. var duotonePathRe = [/*#__PURE__*/_wrapRegExp(/path d="((?:(?!")[\s\S])+)".*path d="((?:(?!")[\s\S])+)"/, {
  750. d1: 1,
  751. d2: 2
  752. }), /*#__PURE__*/_wrapRegExp(/path class="((?:(?!")[\s\S])+)".*d="((?:(?!")[\s\S])+)".*path class="((?:(?!")[\s\S])+)".*d="((?:(?!")[\s\S])+)"/, {
  753. cls1: 1,
  754. d1: 2,
  755. cls2: 3,
  756. d2: 4
  757. }), /*#__PURE__*/_wrapRegExp(/path class="((?:(?!")[\s\S])+)".*d="((?:(?!")[\s\S])+)"/, {
  758. cls1: 1,
  759. d1: 2
  760. })];
  761. var _LONG_STYLE, _PREFIXES, _PREFIXES_FOR_FAMILY;
  762. var styles = namespace.styles,
  763. shims = namespace.shims;
  764. var LONG_STYLE = (_LONG_STYLE = {}, _defineProperty(_LONG_STYLE, FAMILY_CLASSIC, Object.values(PREFIX_TO_LONG_STYLE[FAMILY_CLASSIC])), _defineProperty(_LONG_STYLE, FAMILY_SHARP, Object.values(PREFIX_TO_LONG_STYLE[FAMILY_SHARP])), _LONG_STYLE);
  765. var _defaultUsablePrefix = null;
  766. var _byUnicode = {};
  767. var _byLigature = {};
  768. var _byOldName = {};
  769. var _byOldUnicode = {};
  770. var _byAlias = {};
  771. var PREFIXES = (_PREFIXES = {}, _defineProperty(_PREFIXES, FAMILY_CLASSIC, Object.keys(PREFIX_TO_STYLE[FAMILY_CLASSIC])), _defineProperty(_PREFIXES, FAMILY_SHARP, Object.keys(PREFIX_TO_STYLE[FAMILY_SHARP])), _PREFIXES);
  772. function isReserved(name) {
  773. return ~RESERVED_CLASSES.indexOf(name);
  774. }
  775. function getIconName(cssPrefix, cls) {
  776. var parts = cls.split('-');
  777. var prefix = parts[0];
  778. var iconName = parts.slice(1).join('-');
  779. if (prefix === cssPrefix && iconName !== '' && !isReserved(iconName)) {
  780. return iconName;
  781. } else {
  782. return null;
  783. }
  784. }
  785. var build = function build() {
  786. var lookup = function lookup(reducer) {
  787. return reduce(styles, function (o, style, prefix) {
  788. o[prefix] = reduce(style, reducer, {});
  789. return o;
  790. }, {});
  791. };
  792. _byUnicode = lookup(function (acc, icon, iconName) {
  793. if (icon[3]) {
  794. acc[icon[3]] = iconName;
  795. }
  796. if (icon[2]) {
  797. var aliases = icon[2].filter(function (a) {
  798. return typeof a === 'number';
  799. });
  800. aliases.forEach(function (alias) {
  801. acc[alias.toString(16)] = iconName;
  802. });
  803. }
  804. return acc;
  805. });
  806. _byLigature = lookup(function (acc, icon, iconName) {
  807. acc[iconName] = iconName;
  808. if (icon[2]) {
  809. var aliases = icon[2].filter(function (a) {
  810. return typeof a === 'string';
  811. });
  812. aliases.forEach(function (alias) {
  813. acc[alias] = iconName;
  814. });
  815. }
  816. return acc;
  817. });
  818. _byAlias = lookup(function (acc, icon, iconName) {
  819. var aliases = icon[2];
  820. acc[iconName] = iconName;
  821. aliases.forEach(function (alias) {
  822. acc[alias] = iconName;
  823. });
  824. return acc;
  825. }); // If we have a Kit, we can't determine if regular is available since we
  826. // could be auto-fetching it. We'll have to assume that it is available.
  827. var hasRegular = 'far' in styles || config.autoFetchSvg;
  828. var shimLookups = reduce(shims, function (acc, shim) {
  829. var maybeNameMaybeUnicode = shim[0];
  830. var prefix = shim[1];
  831. var iconName = shim[2];
  832. if (prefix === 'far' && !hasRegular) {
  833. prefix = 'fas';
  834. }
  835. if (typeof maybeNameMaybeUnicode === 'string') {
  836. acc.names[maybeNameMaybeUnicode] = {
  837. prefix: prefix,
  838. iconName: iconName
  839. };
  840. }
  841. if (typeof maybeNameMaybeUnicode === 'number') {
  842. acc.unicodes[maybeNameMaybeUnicode.toString(16)] = {
  843. prefix: prefix,
  844. iconName: iconName
  845. };
  846. }
  847. return acc;
  848. }, {
  849. names: {},
  850. unicodes: {}
  851. });
  852. _byOldName = shimLookups.names;
  853. _byOldUnicode = shimLookups.unicodes;
  854. _defaultUsablePrefix = getCanonicalPrefix(config.styleDefault, {
  855. family: config.familyDefault
  856. });
  857. };
  858. onChange(function (c) {
  859. _defaultUsablePrefix = getCanonicalPrefix(c.styleDefault, {
  860. family: config.familyDefault
  861. });
  862. });
  863. build();
  864. function byUnicode(prefix, unicode) {
  865. return (_byUnicode[prefix] || {})[unicode];
  866. }
  867. function byLigature(prefix, ligature) {
  868. return (_byLigature[prefix] || {})[ligature];
  869. }
  870. function byAlias(prefix, alias) {
  871. return (_byAlias[prefix] || {})[alias];
  872. }
  873. function byOldName(name) {
  874. return _byOldName[name] || {
  875. prefix: null,
  876. iconName: null
  877. };
  878. }
  879. function byOldUnicode(unicode) {
  880. var oldUnicode = _byOldUnicode[unicode];
  881. var newUnicode = byUnicode('fas', unicode);
  882. return oldUnicode || (newUnicode ? {
  883. prefix: 'fas',
  884. iconName: newUnicode
  885. } : null) || {
  886. prefix: null,
  887. iconName: null
  888. };
  889. }
  890. function getDefaultUsablePrefix() {
  891. return _defaultUsablePrefix;
  892. }
  893. var emptyCanonicalIcon = function emptyCanonicalIcon() {
  894. return {
  895. prefix: null,
  896. iconName: null,
  897. rest: []
  898. };
  899. };
  900. function getCanonicalPrefix(styleOrPrefix) {
  901. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  902. var _params$family = params.family,
  903. family = _params$family === void 0 ? FAMILY_CLASSIC : _params$family;
  904. var style = PREFIX_TO_STYLE[family][styleOrPrefix];
  905. var prefix = STYLE_TO_PREFIX[family][styleOrPrefix] || STYLE_TO_PREFIX[family][style];
  906. var defined = styleOrPrefix in namespace.styles ? styleOrPrefix : null;
  907. return prefix || defined || null;
  908. }
  909. var PREFIXES_FOR_FAMILY = (_PREFIXES_FOR_FAMILY = {}, _defineProperty(_PREFIXES_FOR_FAMILY, FAMILY_CLASSIC, Object.keys(PREFIX_TO_LONG_STYLE[FAMILY_CLASSIC])), _defineProperty(_PREFIXES_FOR_FAMILY, FAMILY_SHARP, Object.keys(PREFIX_TO_LONG_STYLE[FAMILY_SHARP])), _PREFIXES_FOR_FAMILY);
  910. function getCanonicalIcon(values) {
  911. var _famProps;
  912. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  913. var _params$skipLookups = params.skipLookups,
  914. skipLookups = _params$skipLookups === void 0 ? false : _params$skipLookups;
  915. var famProps = (_famProps = {}, _defineProperty(_famProps, FAMILY_CLASSIC, "".concat(config.cssPrefix, "-").concat(FAMILY_CLASSIC)), _defineProperty(_famProps, FAMILY_SHARP, "".concat(config.cssPrefix, "-").concat(FAMILY_SHARP)), _famProps);
  916. var givenPrefix = null;
  917. var family = FAMILY_CLASSIC;
  918. if (values.includes(famProps[FAMILY_CLASSIC]) || values.some(function (v) {
  919. return PREFIXES_FOR_FAMILY[FAMILY_CLASSIC].includes(v);
  920. })) {
  921. family = FAMILY_CLASSIC;
  922. }
  923. if (values.includes(famProps[FAMILY_SHARP]) || values.some(function (v) {
  924. return PREFIXES_FOR_FAMILY[FAMILY_SHARP].includes(v);
  925. })) {
  926. family = FAMILY_SHARP;
  927. }
  928. var canonical = values.reduce(function (acc, cls) {
  929. var iconName = getIconName(config.cssPrefix, cls);
  930. if (styles[cls]) {
  931. cls = LONG_STYLE[family].includes(cls) ? LONG_STYLE_TO_PREFIX[family][cls] : cls;
  932. givenPrefix = cls;
  933. acc.prefix = cls;
  934. } else if (PREFIXES[family].indexOf(cls) > -1) {
  935. givenPrefix = cls;
  936. acc.prefix = getCanonicalPrefix(cls, {
  937. family: family
  938. });
  939. } else if (iconName) {
  940. acc.iconName = iconName;
  941. } else if (cls !== config.replacementClass && cls !== famProps[FAMILY_CLASSIC] && cls !== famProps[FAMILY_SHARP]) {
  942. acc.rest.push(cls);
  943. }
  944. if (!skipLookups && acc.prefix && acc.iconName) {
  945. var shim = givenPrefix === 'fa' ? byOldName(acc.iconName) : {};
  946. var aliasIconName = byAlias(acc.prefix, acc.iconName);
  947. if (shim.prefix) {
  948. givenPrefix = null;
  949. }
  950. acc.iconName = shim.iconName || aliasIconName || acc.iconName;
  951. acc.prefix = shim.prefix || acc.prefix;
  952. if (acc.prefix === 'far' && !styles['far'] && styles['fas'] && !config.autoFetchSvg) {
  953. // Allow a fallback from the regular style to solid if regular is not available
  954. // but only if we aren't auto-fetching SVGs
  955. acc.prefix = 'fas';
  956. }
  957. }
  958. return acc;
  959. }, emptyCanonicalIcon());
  960. if (values.includes('fa-brands') || values.includes('fab')) {
  961. canonical.prefix = 'fab';
  962. }
  963. if (values.includes('fa-duotone') || values.includes('fad')) {
  964. canonical.prefix = 'fad';
  965. }
  966. if (!canonical.prefix && family === FAMILY_SHARP && (styles['fass'] || config.autoFetchSvg)) {
  967. canonical.prefix = 'fass';
  968. canonical.iconName = byAlias(canonical.prefix, canonical.iconName) || canonical.iconName;
  969. }
  970. if (canonical.prefix === 'fa' || givenPrefix === 'fa') {
  971. // The fa prefix is not canonical. So if it has made it through until this point
  972. // we will shift it to the correct prefix.
  973. canonical.prefix = getDefaultUsablePrefix() || 'fas';
  974. }
  975. return canonical;
  976. }
  977. var Library = /*#__PURE__*/function () {
  978. function Library() {
  979. _classCallCheck(this, Library);
  980. this.definitions = {};
  981. }
  982. _createClass(Library, [{
  983. key: "add",
  984. value: function add() {
  985. var _this = this;
  986. for (var _len = arguments.length, definitions = new Array(_len), _key = 0; _key < _len; _key++) {
  987. definitions[_key] = arguments[_key];
  988. }
  989. var additions = definitions.reduce(this._pullDefinitions, {});
  990. Object.keys(additions).forEach(function (key) {
  991. _this.definitions[key] = _objectSpread2(_objectSpread2({}, _this.definitions[key] || {}), additions[key]);
  992. defineIcons(key, additions[key]); // TODO can we stop doing this? We can't get the icons by 'fa-solid' any longer so this probably needs to change
  993. var longPrefix = PREFIX_TO_LONG_STYLE[FAMILY_CLASSIC][key];
  994. if (longPrefix) defineIcons(longPrefix, additions[key]);
  995. build();
  996. });
  997. }
  998. }, {
  999. key: "reset",
  1000. value: function reset() {
  1001. this.definitions = {};
  1002. }
  1003. }, {
  1004. key: "_pullDefinitions",
  1005. value: function _pullDefinitions(additions, definition) {
  1006. var normalized = definition.prefix && definition.iconName && definition.icon ? {
  1007. 0: definition
  1008. } : definition;
  1009. Object.keys(normalized).map(function (key) {
  1010. var _normalized$key = normalized[key],
  1011. prefix = _normalized$key.prefix,
  1012. iconName = _normalized$key.iconName,
  1013. icon = _normalized$key.icon;
  1014. var aliases = icon[2];
  1015. if (!additions[prefix]) additions[prefix] = {};
  1016. if (aliases.length > 0) {
  1017. aliases.forEach(function (alias) {
  1018. if (typeof alias === 'string') {
  1019. additions[prefix][alias] = icon;
  1020. }
  1021. });
  1022. }
  1023. additions[prefix][iconName] = icon;
  1024. });
  1025. return additions;
  1026. }
  1027. }]);
  1028. return Library;
  1029. }();
  1030. var _plugins = [];
  1031. var _hooks = {};
  1032. var providers = {};
  1033. var defaultProviderKeys = Object.keys(providers);
  1034. function registerPlugins(nextPlugins, _ref) {
  1035. var obj = _ref.mixoutsTo;
  1036. _plugins = nextPlugins;
  1037. _hooks = {};
  1038. Object.keys(providers).forEach(function (k) {
  1039. if (defaultProviderKeys.indexOf(k) === -1) {
  1040. delete providers[k];
  1041. }
  1042. });
  1043. _plugins.forEach(function (plugin) {
  1044. var mixout = plugin.mixout ? plugin.mixout() : {};
  1045. Object.keys(mixout).forEach(function (tk) {
  1046. if (typeof mixout[tk] === 'function') {
  1047. obj[tk] = mixout[tk];
  1048. }
  1049. if (_typeof(mixout[tk]) === 'object') {
  1050. Object.keys(mixout[tk]).forEach(function (sk) {
  1051. if (!obj[tk]) {
  1052. obj[tk] = {};
  1053. }
  1054. obj[tk][sk] = mixout[tk][sk];
  1055. });
  1056. }
  1057. });
  1058. if (plugin.hooks) {
  1059. var hooks = plugin.hooks();
  1060. Object.keys(hooks).forEach(function (hook) {
  1061. if (!_hooks[hook]) {
  1062. _hooks[hook] = [];
  1063. }
  1064. _hooks[hook].push(hooks[hook]);
  1065. });
  1066. }
  1067. if (plugin.provides) {
  1068. plugin.provides(providers);
  1069. }
  1070. });
  1071. return obj;
  1072. }
  1073. function chainHooks(hook, accumulator) {
  1074. for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
  1075. args[_key - 2] = arguments[_key];
  1076. }
  1077. var hookFns = _hooks[hook] || [];
  1078. hookFns.forEach(function (hookFn) {
  1079. accumulator = hookFn.apply(null, [accumulator].concat(args)); // eslint-disable-line no-useless-call
  1080. });
  1081. return accumulator;
  1082. }
  1083. function callHooks(hook) {
  1084. for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  1085. args[_key2 - 1] = arguments[_key2];
  1086. }
  1087. var hookFns = _hooks[hook] || [];
  1088. hookFns.forEach(function (hookFn) {
  1089. hookFn.apply(null, args);
  1090. });
  1091. return undefined;
  1092. }
  1093. function callProvided() {
  1094. var hook = arguments[0];
  1095. var args = Array.prototype.slice.call(arguments, 1);
  1096. return providers[hook] ? providers[hook].apply(null, args) : undefined;
  1097. }
  1098. function findIconDefinition(iconLookup) {
  1099. if (iconLookup.prefix === 'fa') {
  1100. iconLookup.prefix = 'fas';
  1101. }
  1102. var iconName = iconLookup.iconName;
  1103. var prefix = iconLookup.prefix || getDefaultUsablePrefix();
  1104. if (!iconName) return;
  1105. iconName = byAlias(prefix, iconName) || iconName;
  1106. return iconFromMapping(library.definitions, prefix, iconName) || iconFromMapping(namespace.styles, prefix, iconName);
  1107. }
  1108. var library = new Library();
  1109. var noAuto = function noAuto() {
  1110. config.autoReplaceSvg = false;
  1111. config.observeMutations = false;
  1112. callHooks('noAuto');
  1113. };
  1114. var dom = {
  1115. i2svg: function i2svg() {
  1116. var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1117. if (IS_DOM) {
  1118. callHooks('beforeI2svg', params);
  1119. callProvided('pseudoElements2svg', params);
  1120. return callProvided('i2svg', params);
  1121. } else {
  1122. return Promise.reject('Operation requires a DOM of some kind.');
  1123. }
  1124. },
  1125. watch: function watch() {
  1126. var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1127. var autoReplaceSvgRoot = params.autoReplaceSvgRoot;
  1128. if (config.autoReplaceSvg === false) {
  1129. config.autoReplaceSvg = true;
  1130. }
  1131. config.observeMutations = true;
  1132. domready(function () {
  1133. autoReplace({
  1134. autoReplaceSvgRoot: autoReplaceSvgRoot
  1135. });
  1136. callHooks('watch', params);
  1137. });
  1138. }
  1139. };
  1140. var parse = {
  1141. icon: function icon(_icon) {
  1142. if (_icon === null) {
  1143. return null;
  1144. }
  1145. if (_typeof(_icon) === 'object' && _icon.prefix && _icon.iconName) {
  1146. return {
  1147. prefix: _icon.prefix,
  1148. iconName: byAlias(_icon.prefix, _icon.iconName) || _icon.iconName
  1149. };
  1150. }
  1151. if (Array.isArray(_icon) && _icon.length === 2) {
  1152. var iconName = _icon[1].indexOf('fa-') === 0 ? _icon[1].slice(3) : _icon[1];
  1153. var prefix = getCanonicalPrefix(_icon[0]);
  1154. return {
  1155. prefix: prefix,
  1156. iconName: byAlias(prefix, iconName) || iconName
  1157. };
  1158. }
  1159. if (typeof _icon === 'string' && (_icon.indexOf("".concat(config.cssPrefix, "-")) > -1 || _icon.match(ICON_SELECTION_SYNTAX_PATTERN))) {
  1160. var canonicalIcon = getCanonicalIcon(_icon.split(' '), {
  1161. skipLookups: true
  1162. });
  1163. return {
  1164. prefix: canonicalIcon.prefix || getDefaultUsablePrefix(),
  1165. iconName: byAlias(canonicalIcon.prefix, canonicalIcon.iconName) || canonicalIcon.iconName
  1166. };
  1167. }
  1168. if (typeof _icon === 'string') {
  1169. var _prefix = getDefaultUsablePrefix();
  1170. return {
  1171. prefix: _prefix,
  1172. iconName: byAlias(_prefix, _icon) || _icon
  1173. };
  1174. }
  1175. }
  1176. };
  1177. var api = {
  1178. noAuto: noAuto,
  1179. config: config,
  1180. dom: dom,
  1181. parse: parse,
  1182. library: library,
  1183. findIconDefinition: findIconDefinition,
  1184. toHtml: toHtml
  1185. };
  1186. var autoReplace = function autoReplace() {
  1187. var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  1188. var _params$autoReplaceSv = params.autoReplaceSvgRoot,
  1189. autoReplaceSvgRoot = _params$autoReplaceSv === void 0 ? DOCUMENT : _params$autoReplaceSv;
  1190. if ((Object.keys(namespace.styles).length > 0 || config.autoFetchSvg) && IS_DOM && config.autoReplaceSvg) api.dom.i2svg({
  1191. node: autoReplaceSvgRoot
  1192. });
  1193. };
  1194. function domVariants(val, abstractCreator) {
  1195. Object.defineProperty(val, 'abstract', {
  1196. get: abstractCreator
  1197. });
  1198. Object.defineProperty(val, 'html', {
  1199. get: function get() {
  1200. return val.abstract.map(function (a) {
  1201. return toHtml(a);
  1202. });
  1203. }
  1204. });
  1205. Object.defineProperty(val, 'node', {
  1206. get: function get() {
  1207. if (!IS_DOM) return;
  1208. var container = DOCUMENT.createElement('div');
  1209. container.innerHTML = val.html;
  1210. return container.children;
  1211. }
  1212. });
  1213. return val;
  1214. }
  1215. function asIcon (_ref) {
  1216. var children = _ref.children,
  1217. main = _ref.main,
  1218. mask = _ref.mask,
  1219. attributes = _ref.attributes,
  1220. styles = _ref.styles,
  1221. transform = _ref.transform;
  1222. if (transformIsMeaningful(transform) && main.found && !mask.found) {
  1223. var width = main.width,
  1224. height = main.height;
  1225. var offset = {
  1226. x: width / height / 2,
  1227. y: 0.5
  1228. };
  1229. attributes['style'] = joinStyles(_objectSpread2(_objectSpread2({}, styles), {}, {
  1230. 'transform-origin': "".concat(offset.x + transform.x / 16, "em ").concat(offset.y + transform.y / 16, "em")
  1231. }));
  1232. }
  1233. return [{
  1234. tag: 'svg',
  1235. attributes: attributes,
  1236. children: children
  1237. }];
  1238. }
  1239. function asSymbol (_ref) {
  1240. var prefix = _ref.prefix,
  1241. iconName = _ref.iconName,
  1242. children = _ref.children,
  1243. attributes = _ref.attributes,
  1244. symbol = _ref.symbol;
  1245. var id = symbol === true ? "".concat(prefix, "-").concat(config.cssPrefix, "-").concat(iconName) : symbol;
  1246. return [{
  1247. tag: 'svg',
  1248. attributes: {
  1249. style: 'display: none;'
  1250. },
  1251. children: [{
  1252. tag: 'symbol',
  1253. attributes: _objectSpread2(_objectSpread2({}, attributes), {}, {
  1254. id: id
  1255. }),
  1256. children: children
  1257. }]
  1258. }];
  1259. }
  1260. function makeInlineSvgAbstract(params) {
  1261. var _params$icons = params.icons,
  1262. main = _params$icons.main,
  1263. mask = _params$icons.mask,
  1264. prefix = params.prefix,
  1265. iconName = params.iconName,
  1266. transform = params.transform,
  1267. symbol = params.symbol,
  1268. title = params.title,
  1269. maskId = params.maskId,
  1270. titleId = params.titleId,
  1271. extra = params.extra,
  1272. _params$watchable = params.watchable,
  1273. watchable = _params$watchable === void 0 ? false : _params$watchable;
  1274. var _ref = mask.found ? mask : main,
  1275. width = _ref.width,
  1276. height = _ref.height;
  1277. var isUploadedIcon = prefix === 'fak';
  1278. var attrClass = [config.replacementClass, iconName ? "".concat(config.cssPrefix, "-").concat(iconName) : ''].filter(function (c) {
  1279. return extra.classes.indexOf(c) === -1;
  1280. }).filter(function (c) {
  1281. return c !== '' || !!c;
  1282. }).concat(extra.classes).join(' ');
  1283. var content = {
  1284. children: [],
  1285. attributes: _objectSpread2(_objectSpread2({}, extra.attributes), {}, {
  1286. 'data-prefix': prefix,
  1287. 'data-icon': iconName,
  1288. 'class': attrClass,
  1289. 'role': extra.attributes.role || 'img',
  1290. 'xmlns': 'http://www.w3.org/2000/svg',
  1291. 'viewBox': "0 0 ".concat(width, " ").concat(height)
  1292. })
  1293. };
  1294. var uploadedIconWidthStyle = isUploadedIcon && !~extra.classes.indexOf('fa-fw') ? {
  1295. width: "".concat(width / height * 16 * 0.0625, "em")
  1296. } : {};
  1297. if (watchable) {
  1298. content.attributes[DATA_FA_I2SVG] = '';
  1299. }
  1300. if (title) {
  1301. content.children.push({
  1302. tag: 'title',
  1303. attributes: {
  1304. id: content.attributes['aria-labelledby'] || "title-".concat(titleId || nextUniqueId())
  1305. },
  1306. children: [title]
  1307. });
  1308. delete content.attributes.title;
  1309. }
  1310. var args = _objectSpread2(_objectSpread2({}, content), {}, {
  1311. prefix: prefix,
  1312. iconName: iconName,
  1313. main: main,
  1314. mask: mask,
  1315. maskId: maskId,
  1316. transform: transform,
  1317. symbol: symbol,
  1318. styles: _objectSpread2(_objectSpread2({}, uploadedIconWidthStyle), extra.styles)
  1319. });
  1320. var _ref2 = mask.found && main.found ? callProvided('generateAbstractMask', args) || {
  1321. children: [],
  1322. attributes: {}
  1323. } : callProvided('generateAbstractIcon', args) || {
  1324. children: [],
  1325. attributes: {}
  1326. },
  1327. children = _ref2.children,
  1328. attributes = _ref2.attributes;
  1329. args.children = children;
  1330. args.attributes = attributes;
  1331. if (symbol) {
  1332. return asSymbol(args);
  1333. } else {
  1334. return asIcon(args);
  1335. }
  1336. }
  1337. function makeLayersTextAbstract(params) {
  1338. var content = params.content,
  1339. width = params.width,
  1340. height = params.height,
  1341. transform = params.transform,
  1342. title = params.title,
  1343. extra = params.extra,
  1344. _params$watchable2 = params.watchable,
  1345. watchable = _params$watchable2 === void 0 ? false : _params$watchable2;
  1346. var attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
  1347. 'title': title
  1348. } : {}), {}, {
  1349. 'class': extra.classes.join(' ')
  1350. });
  1351. if (watchable) {
  1352. attributes[DATA_FA_I2SVG] = '';
  1353. }
  1354. var styles = _objectSpread2({}, extra.styles);
  1355. if (transformIsMeaningful(transform)) {
  1356. styles['transform'] = transformForCss({
  1357. transform: transform,
  1358. startCentered: true,
  1359. width: width,
  1360. height: height
  1361. });
  1362. styles['-webkit-transform'] = styles['transform'];
  1363. }
  1364. var styleString = joinStyles(styles);
  1365. if (styleString.length > 0) {
  1366. attributes['style'] = styleString;
  1367. }
  1368. var val = [];
  1369. val.push({
  1370. tag: 'span',
  1371. attributes: attributes,
  1372. children: [content]
  1373. });
  1374. if (title) {
  1375. val.push({
  1376. tag: 'span',
  1377. attributes: {
  1378. class: 'sr-only'
  1379. },
  1380. children: [title]
  1381. });
  1382. }
  1383. return val;
  1384. }
  1385. function makeLayersCounterAbstract(params) {
  1386. var content = params.content,
  1387. title = params.title,
  1388. extra = params.extra;
  1389. var attributes = _objectSpread2(_objectSpread2(_objectSpread2({}, extra.attributes), title ? {
  1390. 'title': title
  1391. } : {}), {}, {
  1392. 'class': extra.classes.join(' ')
  1393. });
  1394. var styleString = joinStyles(extra.styles);
  1395. if (styleString.length > 0) {
  1396. attributes['style'] = styleString;
  1397. }
  1398. var val = [];
  1399. val.push({
  1400. tag: 'span',
  1401. attributes: attributes,
  1402. children: [content]
  1403. });
  1404. if (title) {
  1405. val.push({
  1406. tag: 'span',
  1407. attributes: {
  1408. class: 'sr-only'
  1409. },
  1410. children: [title]
  1411. });
  1412. }
  1413. return val;
  1414. }
  1415. var styles$1 = namespace.styles;
  1416. function asFoundIcon(icon) {
  1417. var width = icon[0];
  1418. var height = icon[1];
  1419. var _icon$slice = icon.slice(4),
  1420. _icon$slice2 = _slicedToArray(_icon$slice, 1),
  1421. vectorData = _icon$slice2[0];
  1422. var element = null;
  1423. if (Array.isArray(vectorData)) {
  1424. element = {
  1425. tag: 'g',
  1426. attributes: {
  1427. class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.GROUP)
  1428. },
  1429. children: [{
  1430. tag: 'path',
  1431. attributes: {
  1432. class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.SECONDARY),
  1433. fill: 'currentColor',
  1434. d: vectorData[0]
  1435. }
  1436. }, {
  1437. tag: 'path',
  1438. attributes: {
  1439. class: "".concat(config.cssPrefix, "-").concat(DUOTONE_CLASSES.PRIMARY),
  1440. fill: 'currentColor',
  1441. d: vectorData[1]
  1442. }
  1443. }]
  1444. };
  1445. } else {
  1446. element = {
  1447. tag: 'path',
  1448. attributes: {
  1449. fill: 'currentColor',
  1450. d: vectorData
  1451. }
  1452. };
  1453. }
  1454. return {
  1455. found: true,
  1456. width: width,
  1457. height: height,
  1458. icon: element
  1459. };
  1460. }
  1461. var missingIconResolutionMixin = {
  1462. found: false,
  1463. width: 512,
  1464. height: 512
  1465. };
  1466. function maybeNotifyMissing(iconName, prefix) {
  1467. if (!PRODUCTION && !config.showMissingIcons && iconName) {
  1468. console.error("Icon with name \"".concat(iconName, "\" and prefix \"").concat(prefix, "\" is missing."));
  1469. }
  1470. }
  1471. function findIcon(iconName, prefix) {
  1472. var givenPrefix = prefix;
  1473. if (prefix === 'fa' && config.styleDefault !== null) {
  1474. prefix = getDefaultUsablePrefix();
  1475. }
  1476. return new Promise(function (resolve, reject) {
  1477. var val = {
  1478. found: false,
  1479. width: 512,
  1480. height: 512,
  1481. icon: callProvided('missingIconAbstract') || {}
  1482. };
  1483. if (givenPrefix === 'fa') {
  1484. var shim = byOldName(iconName) || {};
  1485. iconName = shim.iconName || iconName;
  1486. prefix = shim.prefix || prefix;
  1487. }
  1488. if (iconName && prefix && styles$1[prefix] && styles$1[prefix][iconName]) {
  1489. var icon = styles$1[prefix][iconName];
  1490. return resolve(asFoundIcon(icon));
  1491. }
  1492. maybeNotifyMissing(iconName, prefix);
  1493. resolve(_objectSpread2(_objectSpread2({}, missingIconResolutionMixin), {}, {
  1494. icon: config.showMissingIcons && iconName ? callProvided('missingIconAbstract') || {} : {}
  1495. }));
  1496. });
  1497. }
  1498. var noop$1 = function noop() {};
  1499. var p = config.measurePerformance && PERFORMANCE && PERFORMANCE.mark && PERFORMANCE.measure ? PERFORMANCE : {
  1500. mark: noop$1,
  1501. measure: noop$1
  1502. };
  1503. var preamble = "FA \"6.5.0\"";
  1504. var begin = function begin(name) {
  1505. p.mark("".concat(preamble, " ").concat(name, " begins"));
  1506. return function () {
  1507. return end(name);
  1508. };
  1509. };
  1510. var end = function end(name) {
  1511. p.mark("".concat(preamble, " ").concat(name, " ends"));
  1512. p.measure("".concat(preamble, " ").concat(name), "".concat(preamble, " ").concat(name, " begins"), "".concat(preamble, " ").concat(name, " ends"));
  1513. };
  1514. var perf = {
  1515. begin: begin,
  1516. end: end
  1517. };
  1518. var noop$2 = function noop() {};
  1519. function isWatched(node) {
  1520. var i2svg = node.getAttribute ? node.getAttribute(DATA_FA_I2SVG) : null;
  1521. return typeof i2svg === 'string';
  1522. }
  1523. function hasPrefixAndIcon(node) {
  1524. var prefix = node.getAttribute ? node.getAttribute(DATA_PREFIX) : null;
  1525. var icon = node.getAttribute ? node.getAttribute(DATA_ICON) : null;
  1526. return prefix && icon;
  1527. }
  1528. function hasBeenReplaced(node) {
  1529. return node && node.classList && node.classList.contains && node.classList.contains(config.replacementClass);
  1530. }
  1531. function getMutator() {
  1532. if (config.autoReplaceSvg === true) {
  1533. return mutators.replace;
  1534. }
  1535. var mutator = mutators[config.autoReplaceSvg];
  1536. return mutator || mutators.replace;
  1537. }
  1538. function createElementNS(tag) {
  1539. return DOCUMENT.createElementNS('http://www.w3.org/2000/svg', tag);
  1540. }
  1541. function createElement(tag) {
  1542. return DOCUMENT.createElement(tag);
  1543. }
  1544. function convertSVG(abstractObj) {
  1545. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1546. var _params$ceFn = params.ceFn,
  1547. ceFn = _params$ceFn === void 0 ? abstractObj.tag === 'svg' ? createElementNS : createElement : _params$ceFn;
  1548. if (typeof abstractObj === 'string') {
  1549. return DOCUMENT.createTextNode(abstractObj);
  1550. }
  1551. var tag = ceFn(abstractObj.tag);
  1552. Object.keys(abstractObj.attributes || []).forEach(function (key) {
  1553. tag.setAttribute(key, abstractObj.attributes[key]);
  1554. });
  1555. var children = abstractObj.children || [];
  1556. children.forEach(function (child) {
  1557. tag.appendChild(convertSVG(child, {
  1558. ceFn: ceFn
  1559. }));
  1560. });
  1561. return tag;
  1562. }
  1563. function nodeAsComment(node) {
  1564. var comment = " ".concat(node.outerHTML, " ");
  1565. /* BEGIN.ATTRIBUTION */
  1566. comment = "".concat(comment, "Font Awesome fontawesome.com ");
  1567. /* END.ATTRIBUTION */
  1568. return comment;
  1569. }
  1570. var mutators = {
  1571. replace: function replace(mutation) {
  1572. var node = mutation[0];
  1573. if (node.parentNode) {
  1574. mutation[1].forEach(function (_abstract) {
  1575. node.parentNode.insertBefore(convertSVG(_abstract), node);
  1576. });
  1577. if (node.getAttribute(DATA_FA_I2SVG) === null && config.keepOriginalSource) {
  1578. var comment = DOCUMENT.createComment(nodeAsComment(node));
  1579. node.parentNode.replaceChild(comment, node);
  1580. } else {
  1581. node.remove();
  1582. }
  1583. }
  1584. },
  1585. nest: function nest(mutation) {
  1586. var node = mutation[0];
  1587. var _abstract2 = mutation[1]; // If we already have a replaced node we do not want to continue nesting within it.
  1588. // Short-circuit to the standard replacement
  1589. if (~classArray(node).indexOf(config.replacementClass)) {
  1590. return mutators.replace(mutation);
  1591. }
  1592. var forSvg = new RegExp("".concat(config.cssPrefix, "-.*"));
  1593. delete _abstract2[0].attributes.id;
  1594. if (_abstract2[0].attributes.class) {
  1595. var splitClasses = _abstract2[0].attributes.class.split(' ').reduce(function (acc, cls) {
  1596. if (cls === config.replacementClass || cls.match(forSvg)) {
  1597. acc.toSvg.push(cls);
  1598. } else {
  1599. acc.toNode.push(cls);
  1600. }
  1601. return acc;
  1602. }, {
  1603. toNode: [],
  1604. toSvg: []
  1605. });
  1606. _abstract2[0].attributes.class = splitClasses.toSvg.join(' ');
  1607. if (splitClasses.toNode.length === 0) {
  1608. node.removeAttribute('class');
  1609. } else {
  1610. node.setAttribute('class', splitClasses.toNode.join(' '));
  1611. }
  1612. }
  1613. var newInnerHTML = _abstract2.map(function (a) {
  1614. return toHtml(a);
  1615. }).join('\n');
  1616. node.setAttribute(DATA_FA_I2SVG, '');
  1617. node.innerHTML = newInnerHTML;
  1618. }
  1619. };
  1620. function performOperationSync(op) {
  1621. op();
  1622. }
  1623. function perform(mutations, callback) {
  1624. var callbackFunction = typeof callback === 'function' ? callback : noop$2;
  1625. if (mutations.length === 0) {
  1626. callbackFunction();
  1627. } else {
  1628. var frame = performOperationSync;
  1629. if (config.mutateApproach === MUTATION_APPROACH_ASYNC) {
  1630. frame = WINDOW.requestAnimationFrame || performOperationSync;
  1631. }
  1632. frame(function () {
  1633. var mutator = getMutator();
  1634. var mark = perf.begin('mutate');
  1635. mutations.map(mutator);
  1636. mark();
  1637. callbackFunction();
  1638. });
  1639. }
  1640. }
  1641. var disabled = false;
  1642. function disableObservation() {
  1643. disabled = true;
  1644. }
  1645. function enableObservation() {
  1646. disabled = false;
  1647. }
  1648. var mo = null;
  1649. function observe(options) {
  1650. if (!MUTATION_OBSERVER) {
  1651. return;
  1652. }
  1653. if (!config.observeMutations) {
  1654. return;
  1655. }
  1656. var _options$treeCallback = options.treeCallback,
  1657. treeCallback = _options$treeCallback === void 0 ? noop$2 : _options$treeCallback,
  1658. _options$nodeCallback = options.nodeCallback,
  1659. nodeCallback = _options$nodeCallback === void 0 ? noop$2 : _options$nodeCallback,
  1660. _options$pseudoElemen = options.pseudoElementsCallback,
  1661. pseudoElementsCallback = _options$pseudoElemen === void 0 ? noop$2 : _options$pseudoElemen,
  1662. _options$observeMutat = options.observeMutationsRoot,
  1663. observeMutationsRoot = _options$observeMutat === void 0 ? DOCUMENT : _options$observeMutat;
  1664. mo = new MUTATION_OBSERVER(function (objects) {
  1665. if (disabled) return;
  1666. var defaultPrefix = getDefaultUsablePrefix();
  1667. toArray(objects).forEach(function (mutationRecord) {
  1668. if (mutationRecord.type === 'childList' && mutationRecord.addedNodes.length > 0 && !isWatched(mutationRecord.addedNodes[0])) {
  1669. if (config.searchPseudoElements) {
  1670. pseudoElementsCallback(mutationRecord.target);
  1671. }
  1672. treeCallback(mutationRecord.target);
  1673. }
  1674. if (mutationRecord.type === 'attributes' && mutationRecord.target.parentNode && config.searchPseudoElements) {
  1675. pseudoElementsCallback(mutationRecord.target.parentNode);
  1676. }
  1677. if (mutationRecord.type === 'attributes' && isWatched(mutationRecord.target) && ~ATTRIBUTES_WATCHED_FOR_MUTATION.indexOf(mutationRecord.attributeName)) {
  1678. if (mutationRecord.attributeName === 'class' && hasPrefixAndIcon(mutationRecord.target)) {
  1679. var _getCanonicalIcon = getCanonicalIcon(classArray(mutationRecord.target)),
  1680. prefix = _getCanonicalIcon.prefix,
  1681. iconName = _getCanonicalIcon.iconName;
  1682. mutationRecord.target.setAttribute(DATA_PREFIX, prefix || defaultPrefix);
  1683. if (iconName) mutationRecord.target.setAttribute(DATA_ICON, iconName);
  1684. } else if (hasBeenReplaced(mutationRecord.target)) {
  1685. nodeCallback(mutationRecord.target);
  1686. }
  1687. }
  1688. });
  1689. });
  1690. if (!IS_DOM) return;
  1691. mo.observe(observeMutationsRoot, {
  1692. childList: true,
  1693. attributes: true,
  1694. characterData: true,
  1695. subtree: true
  1696. });
  1697. }
  1698. function disconnect() {
  1699. if (!mo) return;
  1700. mo.disconnect();
  1701. }
  1702. function styleParser (node) {
  1703. var style = node.getAttribute('style');
  1704. var val = [];
  1705. if (style) {
  1706. val = style.split(';').reduce(function (acc, style) {
  1707. var styles = style.split(':');
  1708. var prop = styles[0];
  1709. var value = styles.slice(1);
  1710. if (prop && value.length > 0) {
  1711. acc[prop] = value.join(':').trim();
  1712. }
  1713. return acc;
  1714. }, {});
  1715. }
  1716. return val;
  1717. }
  1718. function classParser (node) {
  1719. var existingPrefix = node.getAttribute('data-prefix');
  1720. var existingIconName = node.getAttribute('data-icon');
  1721. var innerText = node.innerText !== undefined ? node.innerText.trim() : '';
  1722. var val = getCanonicalIcon(classArray(node));
  1723. if (!val.prefix) {
  1724. val.prefix = getDefaultUsablePrefix();
  1725. }
  1726. if (existingPrefix && existingIconName) {
  1727. val.prefix = existingPrefix;
  1728. val.iconName = existingIconName;
  1729. }
  1730. if (val.iconName && val.prefix) {
  1731. return val;
  1732. }
  1733. if (val.prefix && innerText.length > 0) {
  1734. val.iconName = byLigature(val.prefix, node.innerText) || byUnicode(val.prefix, toHex(node.innerText));
  1735. }
  1736. if (!val.iconName && config.autoFetchSvg && node.firstChild && node.firstChild.nodeType === Node.TEXT_NODE) {
  1737. val.iconName = node.firstChild.data;
  1738. }
  1739. return val;
  1740. }
  1741. function attributesParser (node) {
  1742. var extraAttributes = toArray(node.attributes).reduce(function (acc, attr) {
  1743. if (acc.name !== 'class' && acc.name !== 'style') {
  1744. acc[attr.name] = attr.value;
  1745. }
  1746. return acc;
  1747. }, {});
  1748. var title = node.getAttribute('title');
  1749. var titleId = node.getAttribute('data-fa-title-id');
  1750. if (config.autoA11y) {
  1751. if (title) {
  1752. extraAttributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
  1753. } else {
  1754. extraAttributes['aria-hidden'] = 'true';
  1755. extraAttributes['focusable'] = 'false';
  1756. }
  1757. }
  1758. return extraAttributes;
  1759. }
  1760. function blankMeta() {
  1761. return {
  1762. iconName: null,
  1763. title: null,
  1764. titleId: null,
  1765. prefix: null,
  1766. transform: meaninglessTransform,
  1767. symbol: false,
  1768. mask: {
  1769. iconName: null,
  1770. prefix: null,
  1771. rest: []
  1772. },
  1773. maskId: null,
  1774. extra: {
  1775. classes: [],
  1776. styles: {},
  1777. attributes: {}
  1778. }
  1779. };
  1780. }
  1781. function parseMeta(node) {
  1782. var parser = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
  1783. styleParser: true
  1784. };
  1785. var _classParser = classParser(node),
  1786. iconName = _classParser.iconName,
  1787. prefix = _classParser.prefix,
  1788. extraClasses = _classParser.rest;
  1789. var extraAttributes = attributesParser(node);
  1790. var pluginMeta = chainHooks('parseNodeAttributes', {}, node);
  1791. var extraStyles = parser.styleParser ? styleParser(node) : [];
  1792. return _objectSpread2({
  1793. iconName: iconName,
  1794. title: node.getAttribute('title'),
  1795. titleId: node.getAttribute('data-fa-title-id'),
  1796. prefix: prefix,
  1797. transform: meaninglessTransform,
  1798. mask: {
  1799. iconName: null,
  1800. prefix: null,
  1801. rest: []
  1802. },
  1803. maskId: null,
  1804. symbol: false,
  1805. extra: {
  1806. classes: extraClasses,
  1807. styles: extraStyles,
  1808. attributes: extraAttributes
  1809. }
  1810. }, pluginMeta);
  1811. }
  1812. var styles$2 = namespace.styles;
  1813. function generateMutation(node) {
  1814. var nodeMeta = config.autoReplaceSvg === 'nest' ? parseMeta(node, {
  1815. styleParser: false
  1816. }) : parseMeta(node);
  1817. if (~nodeMeta.extra.classes.indexOf(LAYERS_TEXT_CLASSNAME)) {
  1818. return callProvided('generateLayersText', node, nodeMeta);
  1819. } else {
  1820. return callProvided('generateSvgReplacementMutation', node, nodeMeta);
  1821. }
  1822. }
  1823. var knownPrefixes = new Set();
  1824. FAMILIES.map(function (family) {
  1825. knownPrefixes.add("fa-".concat(family));
  1826. });
  1827. Object.keys(PREFIX_TO_STYLE[FAMILY_CLASSIC]).map(knownPrefixes.add.bind(knownPrefixes));
  1828. Object.keys(PREFIX_TO_STYLE[FAMILY_SHARP]).map(knownPrefixes.add.bind(knownPrefixes));
  1829. knownPrefixes = _toConsumableArray(knownPrefixes);
  1830. function onTree(root) {
  1831. var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  1832. if (!IS_DOM) return Promise.resolve();
  1833. var htmlClassList = DOCUMENT.documentElement.classList;
  1834. var hclAdd = function hclAdd(suffix) {
  1835. return htmlClassList.add("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
  1836. };
  1837. var hclRemove = function hclRemove(suffix) {
  1838. return htmlClassList.remove("".concat(HTML_CLASS_I2SVG_BASE_CLASS, "-").concat(suffix));
  1839. };
  1840. var prefixes = config.autoFetchSvg ? knownPrefixes : FAMILIES.map(function (f) {
  1841. return "fa-".concat(f);
  1842. }).concat(Object.keys(styles$2));
  1843. if (!prefixes.includes('fa')) {
  1844. prefixes.push('fa');
  1845. }
  1846. var prefixesDomQuery = [".".concat(LAYERS_TEXT_CLASSNAME, ":not([").concat(DATA_FA_I2SVG, "])")].concat(prefixes.map(function (p) {
  1847. return ".".concat(p, ":not([").concat(DATA_FA_I2SVG, "])");
  1848. })).join(', ');
  1849. if (prefixesDomQuery.length === 0) {
  1850. return Promise.resolve();
  1851. }
  1852. var candidates = [];
  1853. try {
  1854. candidates = toArray(root.querySelectorAll(prefixesDomQuery));
  1855. } catch (e) {// noop
  1856. }
  1857. if (candidates.length > 0) {
  1858. hclAdd('pending');
  1859. hclRemove('complete');
  1860. } else {
  1861. return Promise.resolve();
  1862. }
  1863. var mark = perf.begin('onTree');
  1864. var mutations = candidates.reduce(function (acc, node) {
  1865. try {
  1866. var mutation = generateMutation(node);
  1867. if (mutation) {
  1868. acc.push(mutation);
  1869. }
  1870. } catch (e) {
  1871. if (!PRODUCTION) {
  1872. if (e.name === 'MissingIcon') {
  1873. console.error(e);
  1874. }
  1875. }
  1876. }
  1877. return acc;
  1878. }, []);
  1879. return new Promise(function (resolve, reject) {
  1880. Promise.all(mutations).then(function (resolvedMutations) {
  1881. perform(resolvedMutations, function () {
  1882. hclAdd('active');
  1883. hclAdd('complete');
  1884. hclRemove('pending');
  1885. if (typeof callback === 'function') callback();
  1886. mark();
  1887. resolve();
  1888. });
  1889. }).catch(function (e) {
  1890. mark();
  1891. reject(e);
  1892. });
  1893. });
  1894. }
  1895. function onNode(node) {
  1896. var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  1897. generateMutation(node).then(function (mutation) {
  1898. if (mutation) {
  1899. perform([mutation], callback);
  1900. }
  1901. });
  1902. }
  1903. function resolveIcons(next) {
  1904. return function (maybeIconDefinition) {
  1905. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1906. var iconDefinition = (maybeIconDefinition || {}).icon ? maybeIconDefinition : findIconDefinition(maybeIconDefinition || {});
  1907. var mask = params.mask;
  1908. if (mask) {
  1909. mask = (mask || {}).icon ? mask : findIconDefinition(mask || {});
  1910. }
  1911. return next(iconDefinition, _objectSpread2(_objectSpread2({}, params), {}, {
  1912. mask: mask
  1913. }));
  1914. };
  1915. }
  1916. var render = function render(iconDefinition) {
  1917. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  1918. var _params$transform = params.transform,
  1919. transform = _params$transform === void 0 ? meaninglessTransform : _params$transform,
  1920. _params$symbol = params.symbol,
  1921. symbol = _params$symbol === void 0 ? false : _params$symbol,
  1922. _params$mask = params.mask,
  1923. mask = _params$mask === void 0 ? null : _params$mask,
  1924. _params$maskId = params.maskId,
  1925. maskId = _params$maskId === void 0 ? null : _params$maskId,
  1926. _params$title = params.title,
  1927. title = _params$title === void 0 ? null : _params$title,
  1928. _params$titleId = params.titleId,
  1929. titleId = _params$titleId === void 0 ? null : _params$titleId,
  1930. _params$classes = params.classes,
  1931. classes = _params$classes === void 0 ? [] : _params$classes,
  1932. _params$attributes = params.attributes,
  1933. attributes = _params$attributes === void 0 ? {} : _params$attributes,
  1934. _params$styles = params.styles,
  1935. styles = _params$styles === void 0 ? {} : _params$styles;
  1936. if (!iconDefinition) return;
  1937. var prefix = iconDefinition.prefix,
  1938. iconName = iconDefinition.iconName,
  1939. icon = iconDefinition.icon;
  1940. return domVariants(_objectSpread2({
  1941. type: 'icon'
  1942. }, iconDefinition), function () {
  1943. callHooks('beforeDOMElementCreation', {
  1944. iconDefinition: iconDefinition,
  1945. params: params
  1946. });
  1947. if (config.autoA11y) {
  1948. if (title) {
  1949. attributes['aria-labelledby'] = "".concat(config.replacementClass, "-title-").concat(titleId || nextUniqueId());
  1950. } else {
  1951. attributes['aria-hidden'] = 'true';
  1952. attributes['focusable'] = 'false';
  1953. }
  1954. }
  1955. return makeInlineSvgAbstract({
  1956. icons: {
  1957. main: asFoundIcon(icon),
  1958. mask: mask ? asFoundIcon(mask.icon) : {
  1959. found: false,
  1960. width: null,
  1961. height: null,
  1962. icon: {}
  1963. }
  1964. },
  1965. prefix: prefix,
  1966. iconName: iconName,
  1967. transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
  1968. symbol: symbol,
  1969. title: title,
  1970. maskId: maskId,
  1971. titleId: titleId,
  1972. extra: {
  1973. attributes: attributes,
  1974. styles: styles,
  1975. classes: classes
  1976. }
  1977. });
  1978. });
  1979. };
  1980. var ReplaceElements = {
  1981. mixout: function mixout() {
  1982. return {
  1983. icon: resolveIcons(render)
  1984. };
  1985. },
  1986. hooks: function hooks() {
  1987. return {
  1988. mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
  1989. accumulator.treeCallback = onTree;
  1990. accumulator.nodeCallback = onNode;
  1991. return accumulator;
  1992. }
  1993. };
  1994. },
  1995. provides: function provides(providers$$1) {
  1996. providers$$1.i2svg = function (params) {
  1997. var _params$node = params.node,
  1998. node = _params$node === void 0 ? DOCUMENT : _params$node,
  1999. _params$callback = params.callback,
  2000. callback = _params$callback === void 0 ? function () {} : _params$callback;
  2001. return onTree(node, callback);
  2002. };
  2003. providers$$1.generateSvgReplacementMutation = function (node, nodeMeta) {
  2004. var iconName = nodeMeta.iconName,
  2005. title = nodeMeta.title,
  2006. titleId = nodeMeta.titleId,
  2007. prefix = nodeMeta.prefix,
  2008. transform = nodeMeta.transform,
  2009. symbol = nodeMeta.symbol,
  2010. mask = nodeMeta.mask,
  2011. maskId = nodeMeta.maskId,
  2012. extra = nodeMeta.extra;
  2013. return new Promise(function (resolve, reject) {
  2014. Promise.all([findIcon(iconName, prefix), mask.iconName ? findIcon(mask.iconName, mask.prefix) : Promise.resolve({
  2015. found: false,
  2016. width: 512,
  2017. height: 512,
  2018. icon: {}
  2019. })]).then(function (_ref) {
  2020. var _ref2 = _slicedToArray(_ref, 2),
  2021. main = _ref2[0],
  2022. mask = _ref2[1];
  2023. resolve([node, makeInlineSvgAbstract({
  2024. icons: {
  2025. main: main,
  2026. mask: mask
  2027. },
  2028. prefix: prefix,
  2029. iconName: iconName,
  2030. transform: transform,
  2031. symbol: symbol,
  2032. maskId: maskId,
  2033. title: title,
  2034. titleId: titleId,
  2035. extra: extra,
  2036. watchable: true
  2037. })]);
  2038. }).catch(reject);
  2039. });
  2040. };
  2041. providers$$1.generateAbstractIcon = function (_ref3) {
  2042. var children = _ref3.children,
  2043. attributes = _ref3.attributes,
  2044. main = _ref3.main,
  2045. transform = _ref3.transform,
  2046. styles = _ref3.styles;
  2047. var styleString = joinStyles(styles);
  2048. if (styleString.length > 0) {
  2049. attributes['style'] = styleString;
  2050. }
  2051. var nextChild;
  2052. if (transformIsMeaningful(transform)) {
  2053. nextChild = callProvided('generateAbstractTransformGrouping', {
  2054. main: main,
  2055. transform: transform,
  2056. containerWidth: main.width,
  2057. iconWidth: main.width
  2058. });
  2059. }
  2060. children.push(nextChild || main.icon);
  2061. return {
  2062. children: children,
  2063. attributes: attributes
  2064. };
  2065. };
  2066. }
  2067. };
  2068. var Layers = {
  2069. mixout: function mixout() {
  2070. return {
  2071. layer: function layer(assembler) {
  2072. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2073. var _params$classes = params.classes,
  2074. classes = _params$classes === void 0 ? [] : _params$classes;
  2075. return domVariants({
  2076. type: 'layer'
  2077. }, function () {
  2078. callHooks('beforeDOMElementCreation', {
  2079. assembler: assembler,
  2080. params: params
  2081. });
  2082. var children = [];
  2083. assembler(function (args) {
  2084. Array.isArray(args) ? args.map(function (a) {
  2085. children = children.concat(a.abstract);
  2086. }) : children = children.concat(args.abstract);
  2087. });
  2088. return [{
  2089. tag: 'span',
  2090. attributes: {
  2091. class: ["".concat(config.cssPrefix, "-layers")].concat(_toConsumableArray(classes)).join(' ')
  2092. },
  2093. children: children
  2094. }];
  2095. });
  2096. }
  2097. };
  2098. }
  2099. };
  2100. var LayersCounter = {
  2101. mixout: function mixout() {
  2102. return {
  2103. counter: function counter(content) {
  2104. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2105. var _params$title = params.title,
  2106. title = _params$title === void 0 ? null : _params$title,
  2107. _params$classes = params.classes,
  2108. classes = _params$classes === void 0 ? [] : _params$classes,
  2109. _params$attributes = params.attributes,
  2110. attributes = _params$attributes === void 0 ? {} : _params$attributes,
  2111. _params$styles = params.styles,
  2112. styles = _params$styles === void 0 ? {} : _params$styles;
  2113. return domVariants({
  2114. type: 'counter',
  2115. content: content
  2116. }, function () {
  2117. callHooks('beforeDOMElementCreation', {
  2118. content: content,
  2119. params: params
  2120. });
  2121. return makeLayersCounterAbstract({
  2122. content: content.toString(),
  2123. title: title,
  2124. extra: {
  2125. attributes: attributes,
  2126. styles: styles,
  2127. classes: ["".concat(config.cssPrefix, "-layers-counter")].concat(_toConsumableArray(classes))
  2128. }
  2129. });
  2130. });
  2131. }
  2132. };
  2133. }
  2134. };
  2135. var LayersText = {
  2136. mixout: function mixout() {
  2137. return {
  2138. text: function text(content) {
  2139. var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  2140. var _params$transform = params.transform,
  2141. transform = _params$transform === void 0 ? meaninglessTransform : _params$transform,
  2142. _params$title = params.title,
  2143. title = _params$title === void 0 ? null : _params$title,
  2144. _params$classes = params.classes,
  2145. classes = _params$classes === void 0 ? [] : _params$classes,
  2146. _params$attributes = params.attributes,
  2147. attributes = _params$attributes === void 0 ? {} : _params$attributes,
  2148. _params$styles = params.styles,
  2149. styles = _params$styles === void 0 ? {} : _params$styles;
  2150. return domVariants({
  2151. type: 'text',
  2152. content: content
  2153. }, function () {
  2154. callHooks('beforeDOMElementCreation', {
  2155. content: content,
  2156. params: params
  2157. });
  2158. return makeLayersTextAbstract({
  2159. content: content,
  2160. transform: _objectSpread2(_objectSpread2({}, meaninglessTransform), transform),
  2161. title: title,
  2162. extra: {
  2163. attributes: attributes,
  2164. styles: styles,
  2165. classes: ["".concat(config.cssPrefix, "-layers-text")].concat(_toConsumableArray(classes))
  2166. }
  2167. });
  2168. });
  2169. }
  2170. };
  2171. },
  2172. provides: function provides(providers$$1) {
  2173. providers$$1.generateLayersText = function (node, nodeMeta) {
  2174. var title = nodeMeta.title,
  2175. transform = nodeMeta.transform,
  2176. extra = nodeMeta.extra;
  2177. var width = null;
  2178. var height = null;
  2179. if (IS_IE) {
  2180. var computedFontSize = parseInt(getComputedStyle(node).fontSize, 10);
  2181. var boundingClientRect = node.getBoundingClientRect();
  2182. width = boundingClientRect.width / computedFontSize;
  2183. height = boundingClientRect.height / computedFontSize;
  2184. }
  2185. if (config.autoA11y && !title) {
  2186. extra.attributes['aria-hidden'] = 'true';
  2187. }
  2188. return Promise.resolve([node, makeLayersTextAbstract({
  2189. content: node.innerHTML,
  2190. width: width,
  2191. height: height,
  2192. transform: transform,
  2193. title: title,
  2194. extra: extra,
  2195. watchable: true
  2196. })]);
  2197. };
  2198. }
  2199. };
  2200. var CLEAN_CONTENT_PATTERN = new RegExp("\"", 'ug');
  2201. var SECONDARY_UNICODE_RANGE = [1105920, 1112319];
  2202. function hexValueFromContent(content) {
  2203. var cleaned = content.replace(CLEAN_CONTENT_PATTERN, '');
  2204. var codePoint = codePointAt(cleaned, 0);
  2205. var isPrependTen = codePoint >= SECONDARY_UNICODE_RANGE[0] && codePoint <= SECONDARY_UNICODE_RANGE[1];
  2206. var isDoubled = cleaned.length === 2 ? cleaned[0] === cleaned[1] : false;
  2207. return {
  2208. value: isDoubled ? toHex(cleaned[0]) : toHex(cleaned),
  2209. isSecondary: isPrependTen || isDoubled
  2210. };
  2211. }
  2212. function replaceForPosition(node, position) {
  2213. var pendingAttribute = "".concat(DATA_FA_PSEUDO_ELEMENT_PENDING).concat(position.replace(':', '-'));
  2214. return new Promise(function (resolve, reject) {
  2215. if (node.getAttribute(pendingAttribute) !== null) {
  2216. // This node is already being processed
  2217. return resolve();
  2218. }
  2219. var children = toArray(node.children);
  2220. var alreadyProcessedPseudoElement = children.filter(function (c) {
  2221. return c.getAttribute(DATA_FA_PSEUDO_ELEMENT) === position;
  2222. })[0];
  2223. var styles = WINDOW.getComputedStyle(node, position);
  2224. var fontFamily = styles.getPropertyValue('font-family').match(FONT_FAMILY_PATTERN);
  2225. var fontWeight = styles.getPropertyValue('font-weight');
  2226. var content = styles.getPropertyValue('content');
  2227. if (alreadyProcessedPseudoElement && !fontFamily) {
  2228. // If we've already processed it but the current computed style does not result in a font-family,
  2229. // that probably means that a class name that was previously present to make the icon has been
  2230. // removed. So we now should delete the icon.
  2231. node.removeChild(alreadyProcessedPseudoElement);
  2232. return resolve();
  2233. } else if (fontFamily && content !== 'none' && content !== '') {
  2234. var _content = styles.getPropertyValue('content');
  2235. var family = ~['Sharp'].indexOf(fontFamily[2]) ? FAMILY_SHARP : FAMILY_CLASSIC;
  2236. var prefix = ~['Solid', 'Regular', 'Light', 'Thin', 'Duotone', 'Brands', 'Kit'].indexOf(fontFamily[2]) ? STYLE_TO_PREFIX[family][fontFamily[2].toLowerCase()] : FONT_WEIGHT_TO_PREFIX[family][fontWeight];
  2237. var _hexValueFromContent = hexValueFromContent(_content),
  2238. hexValue = _hexValueFromContent.value,
  2239. isSecondary = _hexValueFromContent.isSecondary;
  2240. var isV4 = fontFamily[0].startsWith('FontAwesome');
  2241. var iconName = byUnicode(prefix, hexValue);
  2242. var iconIdentifier = iconName;
  2243. if (isV4) {
  2244. var iconName4 = byOldUnicode(hexValue);
  2245. if (iconName4.iconName && iconName4.prefix) {
  2246. iconName = iconName4.iconName;
  2247. prefix = iconName4.prefix;
  2248. }
  2249. } // Only convert the pseudo element in this ::before/::after position into an icon if we haven't
  2250. // already done so with the same prefix and iconName
  2251. if (iconName && !isSecondary && (!alreadyProcessedPseudoElement || alreadyProcessedPseudoElement.getAttribute(DATA_PREFIX) !== prefix || alreadyProcessedPseudoElement.getAttribute(DATA_ICON) !== iconIdentifier)) {
  2252. node.setAttribute(pendingAttribute, iconIdentifier);
  2253. if (alreadyProcessedPseudoElement) {
  2254. // Delete the old one, since we're replacing it with a new one
  2255. node.removeChild(alreadyProcessedPseudoElement);
  2256. }
  2257. var meta = blankMeta();
  2258. var extra = meta.extra;
  2259. extra.attributes[DATA_FA_PSEUDO_ELEMENT] = position;
  2260. findIcon(iconName, prefix).then(function (main) {
  2261. var _abstract = makeInlineSvgAbstract(_objectSpread2(_objectSpread2({}, meta), {}, {
  2262. icons: {
  2263. main: main,
  2264. mask: emptyCanonicalIcon()
  2265. },
  2266. prefix: prefix,
  2267. iconName: iconIdentifier,
  2268. extra: extra,
  2269. watchable: true
  2270. }));
  2271. var element = DOCUMENT.createElementNS('http://www.w3.org/2000/svg', 'svg');
  2272. if (position === '::before') {
  2273. node.insertBefore(element, node.firstChild);
  2274. } else {
  2275. node.appendChild(element);
  2276. }
  2277. element.outerHTML = _abstract.map(function (a) {
  2278. return toHtml(a);
  2279. }).join('\n');
  2280. node.removeAttribute(pendingAttribute);
  2281. resolve();
  2282. }).catch(reject);
  2283. } else {
  2284. resolve();
  2285. }
  2286. } else {
  2287. resolve();
  2288. }
  2289. });
  2290. }
  2291. function replace(node) {
  2292. return Promise.all([replaceForPosition(node, '::before'), replaceForPosition(node, '::after')]);
  2293. }
  2294. function processable(node) {
  2295. return node.parentNode !== document.head && !~TAGNAMES_TO_SKIP_FOR_PSEUDOELEMENTS.indexOf(node.tagName.toUpperCase()) && !node.getAttribute(DATA_FA_PSEUDO_ELEMENT) && (!node.parentNode || node.parentNode.tagName !== 'svg');
  2296. }
  2297. function searchPseudoElements(root) {
  2298. if (!IS_DOM) return;
  2299. return new Promise(function (resolve, reject) {
  2300. var operations = toArray(root.querySelectorAll('*')).filter(processable).map(replace);
  2301. var end = perf.begin('searchPseudoElements');
  2302. disableObservation();
  2303. Promise.all(operations).then(function () {
  2304. end();
  2305. enableObservation();
  2306. resolve();
  2307. }).catch(function () {
  2308. end();
  2309. enableObservation();
  2310. reject();
  2311. });
  2312. });
  2313. }
  2314. var PseudoElements = {
  2315. hooks: function hooks() {
  2316. return {
  2317. mutationObserverCallbacks: function mutationObserverCallbacks(accumulator) {
  2318. accumulator.pseudoElementsCallback = searchPseudoElements;
  2319. return accumulator;
  2320. }
  2321. };
  2322. },
  2323. provides: function provides(providers$$1) {
  2324. providers$$1.pseudoElements2svg = function (params) {
  2325. var _params$node = params.node,
  2326. node = _params$node === void 0 ? DOCUMENT : _params$node;
  2327. if (config.searchPseudoElements) {
  2328. searchPseudoElements(node);
  2329. }
  2330. };
  2331. }
  2332. };
  2333. var _unwatched = false;
  2334. var MutationObserver$1 = {
  2335. mixout: function mixout() {
  2336. return {
  2337. dom: {
  2338. unwatch: function unwatch() {
  2339. disableObservation();
  2340. _unwatched = true;
  2341. }
  2342. }
  2343. };
  2344. },
  2345. hooks: function hooks() {
  2346. return {
  2347. bootstrap: function bootstrap() {
  2348. observe(chainHooks('mutationObserverCallbacks', {}));
  2349. },
  2350. noAuto: function noAuto() {
  2351. disconnect();
  2352. },
  2353. watch: function watch(params) {
  2354. var observeMutationsRoot = params.observeMutationsRoot;
  2355. if (_unwatched) {
  2356. enableObservation();
  2357. } else {
  2358. observe(chainHooks('mutationObserverCallbacks', {
  2359. observeMutationsRoot: observeMutationsRoot
  2360. }));
  2361. }
  2362. }
  2363. };
  2364. }
  2365. };
  2366. var parseTransformString = function parseTransformString(transformString) {
  2367. var transform = {
  2368. size: 16,
  2369. x: 0,
  2370. y: 0,
  2371. flipX: false,
  2372. flipY: false,
  2373. rotate: 0
  2374. };
  2375. return transformString.toLowerCase().split(' ').reduce(function (acc, n) {
  2376. var parts = n.toLowerCase().split('-');
  2377. var first = parts[0];
  2378. var rest = parts.slice(1).join('-');
  2379. if (first && rest === 'h') {
  2380. acc.flipX = true;
  2381. return acc;
  2382. }
  2383. if (first && rest === 'v') {
  2384. acc.flipY = true;
  2385. return acc;
  2386. }
  2387. rest = parseFloat(rest);
  2388. if (isNaN(rest)) {
  2389. return acc;
  2390. }
  2391. switch (first) {
  2392. case 'grow':
  2393. acc.size = acc.size + rest;
  2394. break;
  2395. case 'shrink':
  2396. acc.size = acc.size - rest;
  2397. break;
  2398. case 'left':
  2399. acc.x = acc.x - rest;
  2400. break;
  2401. case 'right':
  2402. acc.x = acc.x + rest;
  2403. break;
  2404. case 'up':
  2405. acc.y = acc.y - rest;
  2406. break;
  2407. case 'down':
  2408. acc.y = acc.y + rest;
  2409. break;
  2410. case 'rotate':
  2411. acc.rotate = acc.rotate + rest;
  2412. break;
  2413. }
  2414. return acc;
  2415. }, transform);
  2416. };
  2417. var PowerTransforms = {
  2418. mixout: function mixout() {
  2419. return {
  2420. parse: {
  2421. transform: function transform(transformString) {
  2422. return parseTransformString(transformString);
  2423. }
  2424. }
  2425. };
  2426. },
  2427. hooks: function hooks() {
  2428. return {
  2429. parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
  2430. var transformString = node.getAttribute('data-fa-transform');
  2431. if (transformString) {
  2432. accumulator.transform = parseTransformString(transformString);
  2433. }
  2434. return accumulator;
  2435. }
  2436. };
  2437. },
  2438. provides: function provides(providers) {
  2439. providers.generateAbstractTransformGrouping = function (_ref) {
  2440. var main = _ref.main,
  2441. transform = _ref.transform,
  2442. containerWidth = _ref.containerWidth,
  2443. iconWidth = _ref.iconWidth;
  2444. var outer = {
  2445. transform: "translate(".concat(containerWidth / 2, " 256)")
  2446. };
  2447. var innerTranslate = "translate(".concat(transform.x * 32, ", ").concat(transform.y * 32, ") ");
  2448. var innerScale = "scale(".concat(transform.size / 16 * (transform.flipX ? -1 : 1), ", ").concat(transform.size / 16 * (transform.flipY ? -1 : 1), ") ");
  2449. var innerRotate = "rotate(".concat(transform.rotate, " 0 0)");
  2450. var inner = {
  2451. transform: "".concat(innerTranslate, " ").concat(innerScale, " ").concat(innerRotate)
  2452. };
  2453. var path = {
  2454. transform: "translate(".concat(iconWidth / 2 * -1, " -256)")
  2455. };
  2456. var operations = {
  2457. outer: outer,
  2458. inner: inner,
  2459. path: path
  2460. };
  2461. return {
  2462. tag: 'g',
  2463. attributes: _objectSpread2({}, operations.outer),
  2464. children: [{
  2465. tag: 'g',
  2466. attributes: _objectSpread2({}, operations.inner),
  2467. children: [{
  2468. tag: main.icon.tag,
  2469. children: main.icon.children,
  2470. attributes: _objectSpread2(_objectSpread2({}, main.icon.attributes), operations.path)
  2471. }]
  2472. }]
  2473. };
  2474. };
  2475. }
  2476. };
  2477. var ALL_SPACE = {
  2478. x: 0,
  2479. y: 0,
  2480. width: '100%',
  2481. height: '100%'
  2482. };
  2483. function fillBlack(_abstract) {
  2484. var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
  2485. if (_abstract.attributes && (_abstract.attributes.fill || force)) {
  2486. _abstract.attributes.fill = 'black';
  2487. }
  2488. return _abstract;
  2489. }
  2490. function deGroup(_abstract2) {
  2491. if (_abstract2.tag === 'g') {
  2492. return _abstract2.children;
  2493. } else {
  2494. return [_abstract2];
  2495. }
  2496. }
  2497. var Masks = {
  2498. hooks: function hooks() {
  2499. return {
  2500. parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
  2501. var maskData = node.getAttribute('data-fa-mask');
  2502. var mask = !maskData ? emptyCanonicalIcon() : getCanonicalIcon(maskData.split(' ').map(function (i) {
  2503. return i.trim();
  2504. }));
  2505. if (!mask.prefix) {
  2506. mask.prefix = getDefaultUsablePrefix();
  2507. }
  2508. accumulator.mask = mask;
  2509. accumulator.maskId = node.getAttribute('data-fa-mask-id');
  2510. return accumulator;
  2511. }
  2512. };
  2513. },
  2514. provides: function provides(providers) {
  2515. providers.generateAbstractMask = function (_ref) {
  2516. var children = _ref.children,
  2517. attributes = _ref.attributes,
  2518. main = _ref.main,
  2519. mask = _ref.mask,
  2520. explicitMaskId = _ref.maskId,
  2521. transform = _ref.transform;
  2522. var mainWidth = main.width,
  2523. mainPath = main.icon;
  2524. var maskWidth = mask.width,
  2525. maskPath = mask.icon;
  2526. var trans = transformForSvg({
  2527. transform: transform,
  2528. containerWidth: maskWidth,
  2529. iconWidth: mainWidth
  2530. });
  2531. var maskRect = {
  2532. tag: 'rect',
  2533. attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
  2534. fill: 'white'
  2535. })
  2536. };
  2537. var maskInnerGroupChildrenMixin = mainPath.children ? {
  2538. children: mainPath.children.map(fillBlack)
  2539. } : {};
  2540. var maskInnerGroup = {
  2541. tag: 'g',
  2542. attributes: _objectSpread2({}, trans.inner),
  2543. children: [fillBlack(_objectSpread2({
  2544. tag: mainPath.tag,
  2545. attributes: _objectSpread2(_objectSpread2({}, mainPath.attributes), trans.path)
  2546. }, maskInnerGroupChildrenMixin))]
  2547. };
  2548. var maskOuterGroup = {
  2549. tag: 'g',
  2550. attributes: _objectSpread2({}, trans.outer),
  2551. children: [maskInnerGroup]
  2552. };
  2553. var maskId = "mask-".concat(explicitMaskId || nextUniqueId());
  2554. var clipId = "clip-".concat(explicitMaskId || nextUniqueId());
  2555. var maskTag = {
  2556. tag: 'mask',
  2557. attributes: _objectSpread2(_objectSpread2({}, ALL_SPACE), {}, {
  2558. id: maskId,
  2559. maskUnits: 'userSpaceOnUse',
  2560. maskContentUnits: 'userSpaceOnUse'
  2561. }),
  2562. children: [maskRect, maskOuterGroup]
  2563. };
  2564. var defs = {
  2565. tag: 'defs',
  2566. children: [{
  2567. tag: 'clipPath',
  2568. attributes: {
  2569. id: clipId
  2570. },
  2571. children: deGroup(maskPath)
  2572. }, maskTag]
  2573. };
  2574. children.push(defs, {
  2575. tag: 'rect',
  2576. attributes: _objectSpread2({
  2577. fill: 'currentColor',
  2578. 'clip-path': "url(#".concat(clipId, ")"),
  2579. mask: "url(#".concat(maskId, ")")
  2580. }, ALL_SPACE)
  2581. });
  2582. return {
  2583. children: children,
  2584. attributes: attributes
  2585. };
  2586. };
  2587. }
  2588. };
  2589. var MissingIconIndicator = {
  2590. provides: function provides(providers) {
  2591. var reduceMotion = false;
  2592. if (WINDOW.matchMedia) {
  2593. reduceMotion = WINDOW.matchMedia('(prefers-reduced-motion: reduce)').matches;
  2594. }
  2595. providers.missingIconAbstract = function () {
  2596. var gChildren = [];
  2597. var FILL = {
  2598. fill: 'currentColor'
  2599. };
  2600. var ANIMATION_BASE = {
  2601. attributeType: 'XML',
  2602. repeatCount: 'indefinite',
  2603. dur: '2s'
  2604. }; // Ring
  2605. gChildren.push({
  2606. tag: 'path',
  2607. attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
  2608. 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'
  2609. })
  2610. });
  2611. var OPACITY_ANIMATE = _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
  2612. attributeName: 'opacity'
  2613. });
  2614. var dot = {
  2615. tag: 'circle',
  2616. attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
  2617. cx: '256',
  2618. cy: '364',
  2619. r: '28'
  2620. }),
  2621. children: []
  2622. };
  2623. if (!reduceMotion) {
  2624. dot.children.push({
  2625. tag: 'animate',
  2626. attributes: _objectSpread2(_objectSpread2({}, ANIMATION_BASE), {}, {
  2627. attributeName: 'r',
  2628. values: '28;14;28;28;14;28;'
  2629. })
  2630. }, {
  2631. tag: 'animate',
  2632. attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
  2633. values: '1;0;1;1;0;1;'
  2634. })
  2635. });
  2636. }
  2637. gChildren.push(dot);
  2638. gChildren.push({
  2639. tag: 'path',
  2640. attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
  2641. opacity: '1',
  2642. 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'
  2643. }),
  2644. children: reduceMotion ? [] : [{
  2645. tag: 'animate',
  2646. attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
  2647. values: '1;0;0;0;0;1;'
  2648. })
  2649. }]
  2650. });
  2651. if (!reduceMotion) {
  2652. // Exclamation
  2653. gChildren.push({
  2654. tag: 'path',
  2655. attributes: _objectSpread2(_objectSpread2({}, FILL), {}, {
  2656. opacity: '0',
  2657. 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'
  2658. }),
  2659. children: [{
  2660. tag: 'animate',
  2661. attributes: _objectSpread2(_objectSpread2({}, OPACITY_ANIMATE), {}, {
  2662. values: '0;0;1;1;0;0;'
  2663. })
  2664. }]
  2665. });
  2666. }
  2667. return {
  2668. tag: 'g',
  2669. attributes: {
  2670. 'class': 'missing'
  2671. },
  2672. children: gChildren
  2673. };
  2674. };
  2675. }
  2676. };
  2677. var SvgSymbols = {
  2678. hooks: function hooks() {
  2679. return {
  2680. parseNodeAttributes: function parseNodeAttributes(accumulator, node) {
  2681. var symbolData = node.getAttribute('data-fa-symbol');
  2682. var symbol = symbolData === null ? false : symbolData === '' ? true : symbolData;
  2683. accumulator['symbol'] = symbol;
  2684. return accumulator;
  2685. }
  2686. };
  2687. }
  2688. };
  2689. var plugins = [InjectCSS, ReplaceElements, Layers, LayersCounter, LayersText, PseudoElements, MutationObserver$1, PowerTransforms, Masks, MissingIconIndicator, SvgSymbols];
  2690. registerPlugins(plugins, {
  2691. mixoutsTo: api
  2692. });
  2693. var noAuto$1 = api.noAuto;
  2694. var config$1 = api.config;
  2695. var library$1 = api.library;
  2696. var dom$1 = api.dom;
  2697. var parse$1 = api.parse;
  2698. var findIconDefinition$1 = api.findIconDefinition;
  2699. var toHtml$1 = api.toHtml;
  2700. var icon = api.icon;
  2701. var layer = api.layer;
  2702. var text = api.text;
  2703. var counter = api.counter;
  2704. export { noAuto$1 as noAuto, config$1 as config, library$1 as library, dom$1 as dom, parse$1 as parse, findIconDefinition$1 as findIconDefinition, toHtml$1 as toHtml, icon, layer, text, counter, api };