svelte-fa.mjs 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742
  1. import { SvelteComponent, init, safe_not_equal, element, append, svg_element, attr, null_to_empty, insert, detach, empty, noop, create_slot, get_slot_context, get_slot_changes, transition_in, transition_out } from 'svelte/internal';
  2. const parseNumber = parseFloat;
  3. function joinCss(obj, separator = ';') {
  4. let texts;
  5. if (Array.isArray(obj)) {
  6. texts = obj.filter((text) => text);
  7. } else {
  8. texts = [];
  9. for (const prop in obj) {
  10. if (obj[prop]) {
  11. texts.push(`${prop}:${obj[prop]}`);
  12. }
  13. }
  14. }
  15. return texts.join(separator);
  16. }
  17. function getStyles(style, size, pull, fw) {
  18. let float;
  19. let width;
  20. const height = '1em';
  21. let lineHeight;
  22. let fontSize;
  23. let textAlign;
  24. let verticalAlign = '-.125em';
  25. const overflow = 'visible';
  26. if (fw) {
  27. textAlign = 'center';
  28. width = '1.25em';
  29. }
  30. if (pull) {
  31. float = pull;
  32. }
  33. if (size) {
  34. if (size == 'lg') {
  35. fontSize = '1.33333em';
  36. lineHeight = '.75em';
  37. verticalAlign = '-.225em';
  38. } else if (size == 'xs') {
  39. fontSize = '.75em';
  40. } else if (size == 'sm') {
  41. fontSize = '.875em';
  42. } else {
  43. fontSize = size.replace('x', 'em');
  44. }
  45. }
  46. return joinCss([
  47. joinCss({
  48. float,
  49. width,
  50. height,
  51. 'line-height': lineHeight,
  52. 'font-size': fontSize,
  53. 'text-align': textAlign,
  54. 'vertical-align': verticalAlign,
  55. 'transform-origin': 'center',
  56. overflow,
  57. }),
  58. style,
  59. ]);
  60. }
  61. function getTransform(
  62. scale,
  63. translateX,
  64. translateY,
  65. rotate,
  66. flip,
  67. translateTimes = 1,
  68. translateUnit = '',
  69. rotateUnit = '',
  70. ) {
  71. let flipX = 1;
  72. let flipY = 1;
  73. if (flip) {
  74. if (flip == 'horizontal') {
  75. flipX = -1;
  76. } else if (flip == 'vertical') {
  77. flipY = -1;
  78. } else {
  79. flipX = flipY = -1;
  80. }
  81. }
  82. return joinCss(
  83. [
  84. `translate(${parseNumber(translateX) * translateTimes}${translateUnit},${parseNumber(translateY) * translateTimes}${translateUnit})`,
  85. `scale(${flipX * parseNumber(scale)},${flipY * parseNumber(scale)})`,
  86. rotate && `rotate(${rotate}${rotateUnit})`,
  87. ],
  88. ' ',
  89. );
  90. }
  91. /* src\fa.svelte generated by Svelte v3.16.7 */
  92. function add_css$1() {
  93. var style = element("style");
  94. style.id = "svelte-1cj2gr0-style";
  95. style.textContent = ".spin.svelte-1cj2gr0{animation:svelte-1cj2gr0-spin 2s 0s infinite linear}.pulse.svelte-1cj2gr0{animation:svelte-1cj2gr0-spin 1s infinite steps(8)}@keyframes svelte-1cj2gr0-spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";
  96. append(document.head, style);
  97. }
  98. // (78:0) {#if i[4]}
  99. function create_if_block(ctx) {
  100. let svg;
  101. let g1;
  102. let g0;
  103. let g1_transform_value;
  104. let g1_transform_origin_value;
  105. let svg_class_value;
  106. let svg_viewBox_value;
  107. function select_block_type(ctx, dirty) {
  108. if (typeof /*i*/ ctx[7][4] == "string") return create_if_block_1;
  109. return create_else_block;
  110. }
  111. let current_block_type = select_block_type(ctx);
  112. let if_block = current_block_type(ctx);
  113. return {
  114. c() {
  115. svg = svg_element("svg");
  116. g1 = svg_element("g");
  117. g0 = svg_element("g");
  118. if_block.c();
  119. attr(g0, "transform", /*transform*/ ctx[10]);
  120. attr(g1, "transform", g1_transform_value = `translate(${/*i*/ ctx[7][0] / 2} ${/*i*/ ctx[7][1] / 2})`);
  121. attr(g1, "transform-origin", g1_transform_origin_value = `${/*i*/ ctx[7][0] / 4} 0`);
  122. attr(svg, "id", /*id*/ ctx[0]);
  123. attr(svg, "class", svg_class_value = "" + (null_to_empty(/*c*/ ctx[8]) + " svelte-1cj2gr0"));
  124. attr(svg, "style", /*s*/ ctx[9]);
  125. attr(svg, "viewBox", svg_viewBox_value = `0 0 ${/*i*/ ctx[7][0]} ${/*i*/ ctx[7][1]}`);
  126. attr(svg, "aria-hidden", "true");
  127. attr(svg, "role", "img");
  128. attr(svg, "xmlns", "http://www.w3.org/2000/svg");
  129. },
  130. m(target, anchor) {
  131. insert(target, svg, anchor);
  132. append(svg, g1);
  133. append(g1, g0);
  134. if_block.m(g0, null);
  135. },
  136. p(ctx, dirty) {
  137. if (current_block_type === (current_block_type = select_block_type(ctx)) && if_block) {
  138. if_block.p(ctx, dirty);
  139. } else {
  140. if_block.d(1);
  141. if_block = current_block_type(ctx);
  142. if (if_block) {
  143. if_block.c();
  144. if_block.m(g0, null);
  145. }
  146. }
  147. if (dirty & /*transform*/ 1024) {
  148. attr(g0, "transform", /*transform*/ ctx[10]);
  149. }
  150. if (dirty & /*i*/ 128 && g1_transform_value !== (g1_transform_value = `translate(${/*i*/ ctx[7][0] / 2} ${/*i*/ ctx[7][1] / 2})`)) {
  151. attr(g1, "transform", g1_transform_value);
  152. }
  153. if (dirty & /*i*/ 128 && g1_transform_origin_value !== (g1_transform_origin_value = `${/*i*/ ctx[7][0] / 4} 0`)) {
  154. attr(g1, "transform-origin", g1_transform_origin_value);
  155. }
  156. if (dirty & /*id*/ 1) {
  157. attr(svg, "id", /*id*/ ctx[0]);
  158. }
  159. if (dirty & /*c*/ 256 && svg_class_value !== (svg_class_value = "" + (null_to_empty(/*c*/ ctx[8]) + " svelte-1cj2gr0"))) {
  160. attr(svg, "class", svg_class_value);
  161. }
  162. if (dirty & /*s*/ 512) {
  163. attr(svg, "style", /*s*/ ctx[9]);
  164. }
  165. if (dirty & /*i*/ 128 && svg_viewBox_value !== (svg_viewBox_value = `0 0 ${/*i*/ ctx[7][0]} ${/*i*/ ctx[7][1]}`)) {
  166. attr(svg, "viewBox", svg_viewBox_value);
  167. }
  168. },
  169. d(detaching) {
  170. if (detaching) detach(svg);
  171. if_block.d();
  172. }
  173. };
  174. }
  175. // (99:8) {:else}
  176. function create_else_block(ctx) {
  177. let path0;
  178. let path0_d_value;
  179. let path0_fill_value;
  180. let path0_fill_opacity_value;
  181. let path0_transform_value;
  182. let path1;
  183. let path1_d_value;
  184. let path1_fill_value;
  185. let path1_fill_opacity_value;
  186. let path1_transform_value;
  187. return {
  188. c() {
  189. path0 = svg_element("path");
  190. path1 = svg_element("path");
  191. attr(path0, "d", path0_d_value = /*i*/ ctx[7][4][0]);
  192. attr(path0, "fill", path0_fill_value = /*secondaryColor*/ ctx[3] || /*color*/ ctx[1] || "currentColor");
  193. attr(path0, "fill-opacity", path0_fill_opacity_value = /*swapOpacity*/ ctx[6] != false
  194. ? /*primaryOpacity*/ ctx[4]
  195. : /*secondaryOpacity*/ ctx[5]);
  196. attr(path0, "transform", path0_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`);
  197. attr(path1, "d", path1_d_value = /*i*/ ctx[7][4][1]);
  198. attr(path1, "fill", path1_fill_value = /*primaryColor*/ ctx[2] || /*color*/ ctx[1] || "currentColor");
  199. attr(path1, "fill-opacity", path1_fill_opacity_value = /*swapOpacity*/ ctx[6] != false
  200. ? /*secondaryOpacity*/ ctx[5]
  201. : /*primaryOpacity*/ ctx[4]);
  202. attr(path1, "transform", path1_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`);
  203. },
  204. m(target, anchor) {
  205. insert(target, path0, anchor);
  206. insert(target, path1, anchor);
  207. },
  208. p(ctx, dirty) {
  209. if (dirty & /*i*/ 128 && path0_d_value !== (path0_d_value = /*i*/ ctx[7][4][0])) {
  210. attr(path0, "d", path0_d_value);
  211. }
  212. if (dirty & /*secondaryColor, color*/ 10 && path0_fill_value !== (path0_fill_value = /*secondaryColor*/ ctx[3] || /*color*/ ctx[1] || "currentColor")) {
  213. attr(path0, "fill", path0_fill_value);
  214. }
  215. if (dirty & /*swapOpacity, primaryOpacity, secondaryOpacity*/ 112 && path0_fill_opacity_value !== (path0_fill_opacity_value = /*swapOpacity*/ ctx[6] != false
  216. ? /*primaryOpacity*/ ctx[4]
  217. : /*secondaryOpacity*/ ctx[5])) {
  218. attr(path0, "fill-opacity", path0_fill_opacity_value);
  219. }
  220. if (dirty & /*i*/ 128 && path0_transform_value !== (path0_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`)) {
  221. attr(path0, "transform", path0_transform_value);
  222. }
  223. if (dirty & /*i*/ 128 && path1_d_value !== (path1_d_value = /*i*/ ctx[7][4][1])) {
  224. attr(path1, "d", path1_d_value);
  225. }
  226. if (dirty & /*primaryColor, color*/ 6 && path1_fill_value !== (path1_fill_value = /*primaryColor*/ ctx[2] || /*color*/ ctx[1] || "currentColor")) {
  227. attr(path1, "fill", path1_fill_value);
  228. }
  229. if (dirty & /*swapOpacity, secondaryOpacity, primaryOpacity*/ 112 && path1_fill_opacity_value !== (path1_fill_opacity_value = /*swapOpacity*/ ctx[6] != false
  230. ? /*secondaryOpacity*/ ctx[5]
  231. : /*primaryOpacity*/ ctx[4])) {
  232. attr(path1, "fill-opacity", path1_fill_opacity_value);
  233. }
  234. if (dirty & /*i*/ 128 && path1_transform_value !== (path1_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`)) {
  235. attr(path1, "transform", path1_transform_value);
  236. }
  237. },
  238. d(detaching) {
  239. if (detaching) detach(path0);
  240. if (detaching) detach(path1);
  241. }
  242. };
  243. }
  244. // (93:8) {#if typeof i[4] == 'string'}
  245. function create_if_block_1(ctx) {
  246. let path;
  247. let path_d_value;
  248. let path_fill_value;
  249. let path_transform_value;
  250. return {
  251. c() {
  252. path = svg_element("path");
  253. attr(path, "d", path_d_value = /*i*/ ctx[7][4]);
  254. attr(path, "fill", path_fill_value = /*color*/ ctx[1] || /*primaryColor*/ ctx[2] || "currentColor");
  255. attr(path, "transform", path_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`);
  256. },
  257. m(target, anchor) {
  258. insert(target, path, anchor);
  259. },
  260. p(ctx, dirty) {
  261. if (dirty & /*i*/ 128 && path_d_value !== (path_d_value = /*i*/ ctx[7][4])) {
  262. attr(path, "d", path_d_value);
  263. }
  264. if (dirty & /*color, primaryColor*/ 6 && path_fill_value !== (path_fill_value = /*color*/ ctx[1] || /*primaryColor*/ ctx[2] || "currentColor")) {
  265. attr(path, "fill", path_fill_value);
  266. }
  267. if (dirty & /*i*/ 128 && path_transform_value !== (path_transform_value = `translate(${/*i*/ ctx[7][0] / -2} ${/*i*/ ctx[7][1] / -2})`)) {
  268. attr(path, "transform", path_transform_value);
  269. }
  270. },
  271. d(detaching) {
  272. if (detaching) detach(path);
  273. }
  274. };
  275. }
  276. function create_fragment$2(ctx) {
  277. let if_block_anchor;
  278. let if_block = /*i*/ ctx[7][4] && create_if_block(ctx);
  279. return {
  280. c() {
  281. if (if_block) if_block.c();
  282. if_block_anchor = empty();
  283. },
  284. m(target, anchor) {
  285. if (if_block) if_block.m(target, anchor);
  286. insert(target, if_block_anchor, anchor);
  287. },
  288. p(ctx, [dirty]) {
  289. if (/*i*/ ctx[7][4]) {
  290. if (if_block) {
  291. if_block.p(ctx, dirty);
  292. } else {
  293. if_block = create_if_block(ctx);
  294. if_block.c();
  295. if_block.m(if_block_anchor.parentNode, if_block_anchor);
  296. }
  297. } else if (if_block) {
  298. if_block.d(1);
  299. if_block = null;
  300. }
  301. },
  302. i: noop,
  303. o: noop,
  304. d(detaching) {
  305. if (if_block) if_block.d(detaching);
  306. if (detaching) detach(if_block_anchor);
  307. }
  308. };
  309. }
  310. function instance$2($$self, $$props, $$invalidate) {
  311. let { class: clazz = "" } = $$props;
  312. let { id = "" } = $$props;
  313. let { style = "" } = $$props;
  314. let { icon } = $$props;
  315. let { size = "" } = $$props;
  316. let { color = "" } = $$props;
  317. let { fw = false } = $$props;
  318. let { pull = "" } = $$props;
  319. let { scale = 1 } = $$props;
  320. let { translateX = 0 } = $$props;
  321. let { translateY = 0 } = $$props;
  322. let { rotate = "" } = $$props;
  323. let { flip = false } = $$props;
  324. let { spin = false } = $$props;
  325. let { pulse = false } = $$props;
  326. let { primaryColor = "" } = $$props;
  327. let { secondaryColor = "" } = $$props;
  328. let { primaryOpacity = 1 } = $$props;
  329. let { secondaryOpacity = 0.4 } = $$props;
  330. let { swapOpacity = false } = $$props;
  331. let i;
  332. let c;
  333. let s;
  334. let transform;
  335. $$self.$set = $$props => {
  336. if ("class" in $$props) $$invalidate(11, clazz = $$props.class);
  337. if ("id" in $$props) $$invalidate(0, id = $$props.id);
  338. if ("style" in $$props) $$invalidate(12, style = $$props.style);
  339. if ("icon" in $$props) $$invalidate(13, icon = $$props.icon);
  340. if ("size" in $$props) $$invalidate(14, size = $$props.size);
  341. if ("color" in $$props) $$invalidate(1, color = $$props.color);
  342. if ("fw" in $$props) $$invalidate(15, fw = $$props.fw);
  343. if ("pull" in $$props) $$invalidate(16, pull = $$props.pull);
  344. if ("scale" in $$props) $$invalidate(17, scale = $$props.scale);
  345. if ("translateX" in $$props) $$invalidate(18, translateX = $$props.translateX);
  346. if ("translateY" in $$props) $$invalidate(19, translateY = $$props.translateY);
  347. if ("rotate" in $$props) $$invalidate(20, rotate = $$props.rotate);
  348. if ("flip" in $$props) $$invalidate(21, flip = $$props.flip);
  349. if ("spin" in $$props) $$invalidate(22, spin = $$props.spin);
  350. if ("pulse" in $$props) $$invalidate(23, pulse = $$props.pulse);
  351. if ("primaryColor" in $$props) $$invalidate(2, primaryColor = $$props.primaryColor);
  352. if ("secondaryColor" in $$props) $$invalidate(3, secondaryColor = $$props.secondaryColor);
  353. if ("primaryOpacity" in $$props) $$invalidate(4, primaryOpacity = $$props.primaryOpacity);
  354. if ("secondaryOpacity" in $$props) $$invalidate(5, secondaryOpacity = $$props.secondaryOpacity);
  355. if ("swapOpacity" in $$props) $$invalidate(6, swapOpacity = $$props.swapOpacity);
  356. };
  357. $$self.$$.update = () => {
  358. if ($$self.$$.dirty & /*icon*/ 8192) {
  359. $$invalidate(7, i = icon && icon.icon || [0, 0, "", [], ""]);
  360. }
  361. if ($$self.$$.dirty & /*clazz, spin, pulse*/ 12584960) {
  362. $$invalidate(8, c = joinCss([clazz, "fa", spin && "spin", pulse && "pulse"], " "));
  363. }
  364. if ($$self.$$.dirty & /*style, size, pull, fw*/ 118784) {
  365. $$invalidate(9, s = getStyles(style, size, pull, fw));
  366. }
  367. if ($$self.$$.dirty & /*scale, translateX, translateY, rotate, flip*/ 4063232) {
  368. $$invalidate(10, transform = getTransform(scale, translateX, translateY, rotate, flip, 512));
  369. }
  370. };
  371. return [
  372. id,
  373. color,
  374. primaryColor,
  375. secondaryColor,
  376. primaryOpacity,
  377. secondaryOpacity,
  378. swapOpacity,
  379. i,
  380. c,
  381. s,
  382. transform,
  383. clazz,
  384. style,
  385. icon,
  386. size,
  387. fw,
  388. pull,
  389. scale,
  390. translateX,
  391. translateY,
  392. rotate,
  393. flip,
  394. spin,
  395. pulse
  396. ];
  397. }
  398. class Fa extends SvelteComponent {
  399. constructor(options) {
  400. super();
  401. if (!document.getElementById("svelte-1cj2gr0-style")) add_css$1();
  402. init(this, options, instance$2, create_fragment$2, safe_not_equal, {
  403. class: 11,
  404. id: 0,
  405. style: 12,
  406. icon: 13,
  407. size: 14,
  408. color: 1,
  409. fw: 15,
  410. pull: 16,
  411. scale: 17,
  412. translateX: 18,
  413. translateY: 19,
  414. rotate: 20,
  415. flip: 21,
  416. spin: 22,
  417. pulse: 23,
  418. primaryColor: 2,
  419. secondaryColor: 3,
  420. primaryOpacity: 4,
  421. secondaryOpacity: 5,
  422. swapOpacity: 6
  423. });
  424. }
  425. }
  426. /* src\fa-layers.svelte generated by Svelte v3.16.7 */
  427. function add_css() {
  428. var style = element("style");
  429. style.id = "svelte-snamjk-style";
  430. style.textContent = ".layers.svelte-snamjk{display:inline-block;position:relative}.layers.svelte-snamjk .fa{position:absolute;bottom:0;left:0;right:0;top:0;margin:auto;text-align:center}.layers.svelte-snamjk .layers-text{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.layers.svelte-snamjk .layers-text span{display:inline-block}";
  431. append(document.head, style);
  432. }
  433. function create_fragment$1(ctx) {
  434. let span;
  435. let span_class_value;
  436. let current;
  437. const default_slot_template = /*$$slots*/ ctx[8].default;
  438. const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[7], null);
  439. return {
  440. c() {
  441. span = element("span");
  442. if (default_slot) default_slot.c();
  443. attr(span, "id", /*id*/ ctx[0]);
  444. attr(span, "class", span_class_value = "" + (null_to_empty(/*c*/ ctx[1]) + " svelte-snamjk"));
  445. attr(span, "style", /*s*/ ctx[2]);
  446. },
  447. m(target, anchor) {
  448. insert(target, span, anchor);
  449. if (default_slot) {
  450. default_slot.m(span, null);
  451. }
  452. current = true;
  453. },
  454. p(ctx, [dirty]) {
  455. if (default_slot && default_slot.p && dirty & /*$$scope*/ 128) {
  456. default_slot.p(get_slot_context(default_slot_template, ctx, /*$$scope*/ ctx[7], null), get_slot_changes(default_slot_template, /*$$scope*/ ctx[7], dirty, null));
  457. }
  458. if (!current || dirty & /*id*/ 1) {
  459. attr(span, "id", /*id*/ ctx[0]);
  460. }
  461. if (!current || dirty & /*c*/ 2 && span_class_value !== (span_class_value = "" + (null_to_empty(/*c*/ ctx[1]) + " svelte-snamjk"))) {
  462. attr(span, "class", span_class_value);
  463. }
  464. if (!current || dirty & /*s*/ 4) {
  465. attr(span, "style", /*s*/ ctx[2]);
  466. }
  467. },
  468. i(local) {
  469. if (current) return;
  470. transition_in(default_slot, local);
  471. current = true;
  472. },
  473. o(local) {
  474. transition_out(default_slot, local);
  475. current = false;
  476. },
  477. d(detaching) {
  478. if (detaching) detach(span);
  479. if (default_slot) default_slot.d(detaching);
  480. }
  481. };
  482. }
  483. function instance$1($$self, $$props, $$invalidate) {
  484. let { class: clazz = "" } = $$props;
  485. let { id = "" } = $$props;
  486. let { style = "" } = $$props;
  487. let { size = "" } = $$props;
  488. let { pull = "" } = $$props;
  489. let c;
  490. let s;
  491. let { $$slots = {}, $$scope } = $$props;
  492. $$self.$set = $$props => {
  493. if ("class" in $$props) $$invalidate(3, clazz = $$props.class);
  494. if ("id" in $$props) $$invalidate(0, id = $$props.id);
  495. if ("style" in $$props) $$invalidate(4, style = $$props.style);
  496. if ("size" in $$props) $$invalidate(5, size = $$props.size);
  497. if ("pull" in $$props) $$invalidate(6, pull = $$props.pull);
  498. if ("$$scope" in $$props) $$invalidate(7, $$scope = $$props.$$scope);
  499. };
  500. $$self.$$.update = () => {
  501. if ($$self.$$.dirty & /*clazz*/ 8) {
  502. $$invalidate(1, c = joinCss([clazz, "layers"], " "));
  503. }
  504. if ($$self.$$.dirty & /*style, size, pull*/ 112) {
  505. $$invalidate(2, s = getStyles(style, size, pull, true));
  506. }
  507. };
  508. return [id, c, s, clazz, style, size, pull, $$scope, $$slots];
  509. }
  510. class Fa_layers extends SvelteComponent {
  511. constructor(options) {
  512. super();
  513. if (!document.getElementById("svelte-snamjk-style")) add_css();
  514. init(this, options, instance$1, create_fragment$1, safe_not_equal, {
  515. class: 3,
  516. id: 0,
  517. style: 4,
  518. size: 5,
  519. pull: 6
  520. });
  521. }
  522. }
  523. /* src\fa-layers-text.svelte generated by Svelte v3.16.7 */
  524. function create_fragment(ctx) {
  525. let span1;
  526. let span0;
  527. let current;
  528. const default_slot_template = /*$$slots*/ ctx[13].default;
  529. const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[12], null);
  530. return {
  531. c() {
  532. span1 = element("span");
  533. span0 = element("span");
  534. if (default_slot) default_slot.c();
  535. attr(span0, "style", /*s*/ ctx[2]);
  536. attr(span1, "id", /*id*/ ctx[0]);
  537. attr(span1, "class", /*c*/ ctx[1]);
  538. },
  539. m(target, anchor) {
  540. insert(target, span1, anchor);
  541. append(span1, span0);
  542. if (default_slot) {
  543. default_slot.m(span0, null);
  544. }
  545. current = true;
  546. },
  547. p(ctx, [dirty]) {
  548. if (default_slot && default_slot.p && dirty & /*$$scope*/ 4096) {
  549. default_slot.p(get_slot_context(default_slot_template, ctx, /*$$scope*/ ctx[12], null), get_slot_changes(default_slot_template, /*$$scope*/ ctx[12], dirty, null));
  550. }
  551. if (!current || dirty & /*s*/ 4) {
  552. attr(span0, "style", /*s*/ ctx[2]);
  553. }
  554. if (!current || dirty & /*id*/ 1) {
  555. attr(span1, "id", /*id*/ ctx[0]);
  556. }
  557. if (!current || dirty & /*c*/ 2) {
  558. attr(span1, "class", /*c*/ ctx[1]);
  559. }
  560. },
  561. i(local) {
  562. if (current) return;
  563. transition_in(default_slot, local);
  564. current = true;
  565. },
  566. o(local) {
  567. transition_out(default_slot, local);
  568. current = false;
  569. },
  570. d(detaching) {
  571. if (detaching) detach(span1);
  572. if (default_slot) default_slot.d(detaching);
  573. }
  574. };
  575. }
  576. function instance($$self, $$props, $$invalidate) {
  577. let { class: clazz = "" } = $$props;
  578. let { id = "" } = $$props;
  579. let { style = "" } = $$props;
  580. let { size = "" } = $$props;
  581. let { color = "" } = $$props;
  582. let { scale = 1 } = $$props;
  583. let { translateX = 0 } = $$props;
  584. let { translateY = 0 } = $$props;
  585. let { rotate = "" } = $$props;
  586. let { flip = false } = $$props;
  587. let c;
  588. let s;
  589. let { $$slots = {}, $$scope } = $$props;
  590. $$self.$set = $$props => {
  591. if ("class" in $$props) $$invalidate(3, clazz = $$props.class);
  592. if ("id" in $$props) $$invalidate(0, id = $$props.id);
  593. if ("style" in $$props) $$invalidate(4, style = $$props.style);
  594. if ("size" in $$props) $$invalidate(5, size = $$props.size);
  595. if ("color" in $$props) $$invalidate(6, color = $$props.color);
  596. if ("scale" in $$props) $$invalidate(7, scale = $$props.scale);
  597. if ("translateX" in $$props) $$invalidate(8, translateX = $$props.translateX);
  598. if ("translateY" in $$props) $$invalidate(9, translateY = $$props.translateY);
  599. if ("rotate" in $$props) $$invalidate(10, rotate = $$props.rotate);
  600. if ("flip" in $$props) $$invalidate(11, flip = $$props.flip);
  601. if ("$$scope" in $$props) $$invalidate(12, $$scope = $$props.$$scope);
  602. };
  603. $$self.$$.update = () => {
  604. if ($$self.$$.dirty & /*clazz*/ 8) {
  605. $$invalidate(1, c = joinCss([clazz, "layers-text"], " "));
  606. }
  607. if ($$self.$$.dirty & /*color, scale, translateX, translateY, rotate, flip, style, size*/ 4080) {
  608. $$invalidate(2, s = getStyles(
  609. joinCss([
  610. joinCss({
  611. color,
  612. display: "inline-block",
  613. height: "auto",
  614. transform: getTransform(scale, translateX, translateY, rotate, flip, undefined, "em", "deg")
  615. }),
  616. style
  617. ]),
  618. size
  619. ));
  620. }
  621. };
  622. return [
  623. id,
  624. c,
  625. s,
  626. clazz,
  627. style,
  628. size,
  629. color,
  630. scale,
  631. translateX,
  632. translateY,
  633. rotate,
  634. flip,
  635. $$scope,
  636. $$slots
  637. ];
  638. }
  639. class Fa_layers_text extends SvelteComponent {
  640. constructor(options) {
  641. super();
  642. init(this, options, instance, create_fragment, safe_not_equal, {
  643. class: 3,
  644. id: 0,
  645. style: 4,
  646. size: 5,
  647. color: 6,
  648. scale: 7,
  649. translateX: 8,
  650. translateY: 9,
  651. rotate: 10,
  652. flip: 11
  653. });
  654. }
  655. }
  656. export default Fa;
  657. export { Fa, Fa_layers as FaLayers, Fa_layers_text as FaLayersText };