fontawesome.js 120 KB

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