@felfhenor/ui 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3335 @@
1
+ import { signal } from "@angular/core";
2
+ import { clamp, get, sortBy } from "es-toolkit/compat";
3
+ const CALLOUT_WIDTH = 320;
4
+ const CALLOUT_HEIGHT_ESTIMATE = 160;
5
+ const CALLOUT_GAP = 12;
6
+ function ffSpotlightCalloutPosition(rect, viewportWidth, viewportHeight) {
7
+ if (!rect) return void 0;
8
+ return {
9
+ top: viewportHeight - rect.bottom > 172 ? rect.bottom + CALLOUT_GAP : Math.max(rect.top - CALLOUT_HEIGHT_ESTIMATE - CALLOUT_GAP, CALLOUT_GAP),
10
+ left: clamp(rect.left, CALLOUT_GAP, viewportWidth - CALLOUT_WIDTH - CALLOUT_GAP)
11
+ };
12
+ }
13
+ const LABEL_SELECTOR = ".type-label, .label-text, label, .type-section-title";
14
+ const LABEL_SEARCH_DEPTH = 4;
15
+ function ffNearestControlLabel(element) {
16
+ let node = element;
17
+ for (let depth = 0; node && depth < LABEL_SEARCH_DEPTH; depth++) {
18
+ for (let sibling = node.previousElementSibling; sibling; sibling = sibling.previousElementSibling) {
19
+ const text = (sibling.matches(LABEL_SELECTOR) ? sibling : sibling.querySelector(LABEL_SELECTOR))?.textContent?.trim();
20
+ if (text) return text;
21
+ }
22
+ node = node.parentElement;
23
+ }
24
+ }
25
+ function ffStepDecimals(step) {
26
+ const [, fraction = ""] = String(step).split(".");
27
+ return fraction.length;
28
+ }
29
+ function ffStepNumber(value, steps, { min, max, step }) {
30
+ const next = clamp(value + steps * step, min ?? -Infinity, max ?? Infinity);
31
+ return Number(next.toFixed(ffStepDecimals(step)));
32
+ }
33
+ function ffGroupSelectOptions(options) {
34
+ return options.reduce((groups, option) => {
35
+ if (option.children) return [...groups, {
36
+ header: option,
37
+ items: []
38
+ }];
39
+ const last = groups.at(-1);
40
+ if (last) last.items.push(option);
41
+ else groups.push({ items: [option] });
42
+ return groups;
43
+ }, []);
44
+ }
45
+ function ffSearchFold(text) {
46
+ return text.normalize("NFD").replace(/\p{Diacritic}/gu, "").toLowerCase();
47
+ }
48
+ function ffSelectSearchMatches(term, text) {
49
+ return ffSearchFold(text).includes(ffSearchFold(term));
50
+ }
51
+ function ffTitleCase(text) {
52
+ return text.replace(/(^|\s)(\p{L})/gu, (_, space, letter) => space + letter.toUpperCase());
53
+ }
54
+ function ffSelectTitleFromPlaceholder(placeholder) {
55
+ const core = (placeholder ?? "").replace(/^\s*(select|choose|pick)\s+(an?\s+|the\s+)?/i, "").replace(/(\.{3}|…)\s*$/, "").trim();
56
+ return core ? ffTitleCase(core) : void 0;
57
+ }
58
+ const cssColorCache = /* @__PURE__ */ new Map();
59
+ function ffCssColorVar(variable) {
60
+ const cached = cssColorCache.get(variable);
61
+ if (cached) return cached;
62
+ const color = getComputedStyle(document.documentElement).getPropertyValue(variable).trim();
63
+ if (!color) return "#ffffff";
64
+ cssColorCache.set(variable, color);
65
+ return color;
66
+ }
67
+ function ffCssColorCacheClear() {
68
+ cssColorCache.clear();
69
+ }
70
+ function ffIsPageVisible() {
71
+ return !document.hidden;
72
+ }
73
+ const FF_DIRECTIONS = [
74
+ "up",
75
+ "down",
76
+ "left",
77
+ "right"
78
+ ];
79
+ const FF_STANDARD_BUTTON = {
80
+ south: 0,
81
+ east: 1,
82
+ west: 2,
83
+ north: 3,
84
+ lb: 4,
85
+ rb: 5,
86
+ lt: 6,
87
+ rt: 7,
88
+ select: 8,
89
+ start: 9,
90
+ l3: 10,
91
+ r3: 11,
92
+ up: 12,
93
+ down: 13,
94
+ left: 14,
95
+ right: 15
96
+ };
97
+ const FF_DPAD_ALL_BUTTON = 99;
98
+ const B = FF_STANDARD_BUTTON;
99
+ const DEFAULT_ACTION_MAP = {
100
+ confirm: B.south,
101
+ back: B.east,
102
+ context: B.west,
103
+ details: B.north,
104
+ tabPrev: B.lb,
105
+ tabNext: B.rb,
106
+ subPrev: B.lt,
107
+ subNext: B.rt,
108
+ pause: B.select,
109
+ menu: B.start,
110
+ rightStick: B.r3,
111
+ leftStick: B.l3,
112
+ up: B.up,
113
+ down: B.down,
114
+ left: B.left,
115
+ right: B.right,
116
+ dpad: 99
117
+ };
118
+ const NINTENDO_FACE = {
119
+ confirm: B.east,
120
+ back: B.south,
121
+ context: B.north,
122
+ details: B.west
123
+ };
124
+ const FAMILY_OVERRIDES = {
125
+ switch: NINTENDO_FACE,
126
+ switch2: NINTENDO_FACE
127
+ };
128
+ function ffActionMap(family) {
129
+ return {
130
+ ...DEFAULT_ACTION_MAP,
131
+ ...FAMILY_OVERRIDES[family]
132
+ };
133
+ }
134
+ function ffActionForButton(actionMap, button) {
135
+ return Object.keys(actionMap).find((action) => actionMap[action] === button);
136
+ }
137
+ function ffActionCandidates(registrations, action, isElementActive) {
138
+ const candidates = registrations.filter((registration) => registration.action === action && (registration.enabled?.() ?? true) && (!registration.element || isElementActive(registration.element)));
139
+ return sortBy(candidates, [(registration) => -registration.priority, (registration) => -registration.order]);
140
+ }
141
+ function ffActionDispatch(registrations, action, isElementActive) {
142
+ return ffActionCandidates(registrations, action, isElementActive).find((registration) => registration.handler() !== false);
143
+ }
144
+ function ffRegistrationLabel(registration) {
145
+ const label = registration?.label;
146
+ return typeof label === "function" ? label() : label;
147
+ }
148
+ function ffActivePrompts(registrations, actions, isElementActive) {
149
+ return actions.reduce((prompts, action) => {
150
+ const top = ffActionCandidates(registrations, action, isElementActive)[0];
151
+ const label = ffRegistrationLabel(top);
152
+ if (!label) return prompts;
153
+ const existing = prompts.find((prompt) => prompt.label === label);
154
+ if (existing) existing.actions.push(action);
155
+ else prompts.push({
156
+ actions: [action],
157
+ label
158
+ });
159
+ return prompts;
160
+ }, []).map(ffCollapseDirections);
161
+ }
162
+ function ffCollapseDirections(prompt) {
163
+ const isDirection = (action) => FF_DIRECTIONS.includes(action);
164
+ if (!FF_DIRECTIONS.every((direction) => prompt.actions.includes(direction))) return prompt;
165
+ return {
166
+ ...prompt,
167
+ actions: [...prompt.actions.filter((action) => !isDirection(action)), "dpad"]
168
+ };
169
+ }
170
+ const VENDOR_SONY = 1356;
171
+ const VENDOR_NINTENDO = 1406;
172
+ const VENDOR_VALVE = 10462;
173
+ const PRODUCT_STEAM_DECK = 4613;
174
+ const PRODUCT_STEAM_VIRTUAL_GAMEPAD = 4607;
175
+ const PRODUCTS_SWITCH2 = /* @__PURE__ */ new Set([
176
+ 8294,
177
+ 8295,
178
+ 8297,
179
+ 8307
180
+ ]);
181
+ const ID_PATTERNS = [/Vendor:\s*([0-9a-f]{4})\s*Product:\s*([0-9a-f]{4})/i, /^([0-9a-f]{1,4})-([0-9a-f]{1,4})-/i];
182
+ const NAME_FAMILIES = [[/dualsense|dualshock|playstation/i, "playstation"], [/nintendo|joy-con/i, "switch"]];
183
+ function ffVendorProduct(id) {
184
+ const match = ID_PATTERNS.map((pattern) => id.match(pattern)).find(Boolean);
185
+ return match ? [parseInt(match[1], 16), parseInt(match[2], 16)] : void 0;
186
+ }
187
+ function ffValveFamily(product) {
188
+ if (product === PRODUCT_STEAM_DECK) return "steam-deck";
189
+ if (product === PRODUCT_STEAM_VIRTUAL_GAMEPAD) return "xbox";
190
+ return "steam-controller";
191
+ }
192
+ function ffFamilyFromIds(vendor, product) {
193
+ if (vendor === VENDOR_SONY) return "playstation";
194
+ if (vendor === VENDOR_NINTENDO) return PRODUCTS_SWITCH2.has(product) ? "switch2" : "switch";
195
+ if (vendor === VENDOR_VALVE) return ffValveFamily(product);
196
+ }
197
+ function ffControllerFamily(id) {
198
+ const ids = ffVendorProduct(id);
199
+ return (ids ? ffFamilyFromIds(ids[0], ids[1]) : void 0) ?? NAME_FAMILIES.find(([pattern]) => pattern.test(id))?.[1] ?? "xbox";
200
+ }
201
+ function ffCycleStep(items, current, direction) {
202
+ const index = items.indexOf(current);
203
+ if (index === -1) return items[0];
204
+ return items[(index + direction + items.length) % items.length];
205
+ }
206
+ const FF_PLACEHOLDER_PATTERN = /\{\{\s*([\w.]+)\s*\}\}/g;
207
+ const FF_I18N_DEFAULTS = {
208
+ "gamepad.adjust": "Adjust",
209
+ "gamepad.back": "Back",
210
+ "gamepad.cancel": "Cancel",
211
+ "gamepad.choose": "Choose",
212
+ "gamepad.drop": "Drop",
213
+ "gamepad.edit": "Edit",
214
+ "gamepad.move": "Move",
215
+ "gamepad.none": "None",
216
+ "gamepad.page": "Page",
217
+ "gamepad.select": "Select",
218
+ "gamepad.type": "Type",
219
+ "numberPopup.done": "Done",
220
+ "ffTriggerTabsDirective.switchTab": "Switch Tab",
221
+ "gamepad.close": "Close",
222
+ "pagePagedGrid.previousPage": "Previous Page",
223
+ "pagePagedGrid.nextPage": "Next Page",
224
+ "pagePagedGrid.page": "Page",
225
+ "pagePagedGrid.page2": "Page {{ page }} / {{ totalPages }}",
226
+ "pagePagedGrid.searchByNameOr": "Search by name or description...",
227
+ "pagePagedGrid.noResultsFound": "No results found.",
228
+ "gamepad.confirm": "Confirm",
229
+ "gamepad.inspect": "Inspect",
230
+ "gamepad.browse": "Browse"
231
+ };
232
+ function ffFillPlaceholders(template, params = {}) {
233
+ return template.replace(FF_PLACEHOLDER_PATTERN, (match, key) => key in params ? String(params[key] ?? "") : match);
234
+ }
235
+ function ffTranslateDefault(key, params) {
236
+ return ffFillPlaceholders(FF_I18N_DEFAULTS[key], params);
237
+ }
238
+ function ffSpriteFrameDefault() {}
239
+ function ffReducedMotionSignal() {
240
+ const query = matchMedia("(prefers-reduced-motion: reduce)");
241
+ const reduced = signal(query.matches, ...ngDevMode ? [{ debugName: "reduced" }] : /* istanbul ignore next */ []);
242
+ query.addEventListener("change", (event) => reduced.set(event.matches));
243
+ return reduced.asReadonly();
244
+ }
245
+ function ffSelectSearchTextDefault(option, bindLabel) {
246
+ if (typeof option !== "object" || option === null) return String(option ?? "");
247
+ const label = bindLabel ? get(option, bindLabel) : void 0;
248
+ return typeof label === "string" || typeof label === "number" ? String(label) : "";
249
+ }
250
+ const ANALOG_PRESS_THRESHOLD = .5;
251
+ function ffGamepadSnapshot(gamepad) {
252
+ return {
253
+ buttons: gamepad.buttons.map((button) => button.pressed || button.value > ANALOG_PRESS_THRESHOLD),
254
+ axes: [...gamepad.axes]
255
+ };
256
+ }
257
+ function ffButtonsJustPressed(previous, next) {
258
+ return next.buttons.flatMap((pressed, index) => pressed && !previous?.buttons[index] ? [index] : []);
259
+ }
260
+ function ffButtonsJustReleased(previous, next) {
261
+ return (previous?.buttons ?? []).flatMap((pressed, index) => pressed && !next.buttons[index] ? [index] : []);
262
+ }
263
+ const STANDARD_AXIS_COUNT = 4;
264
+ function ffAxesActive(axes, deadzone) {
265
+ return axes.slice(0, STANDARD_AXIS_COUNT).some((axis) => Math.abs(axis) > deadzone);
266
+ }
267
+ function ffGamepadMayTakeInput(activeIndex, index, msSinceActiveInput, takeoverMs) {
268
+ return activeIndex === void 0 || activeIndex === index || msSinceActiveInput >= takeoverMs;
269
+ }
270
+ function ffStickDirection(x, y, deadzone) {
271
+ if (Math.max(Math.abs(x), Math.abs(y)) <= deadzone) return void 0;
272
+ if (Math.abs(x) > Math.abs(y)) return x > 0 ? "right" : "left";
273
+ return y > 0 ? "down" : "up";
274
+ }
275
+ function ffHeldDirection(snapshot, actionMap, deadzone, useStick = true) {
276
+ const dpad = FF_DIRECTIONS.find((direction) => snapshot.buttons[actionMap[direction]]);
277
+ if (dpad || !useStick) return dpad;
278
+ return ffStickDirection(snapshot.axes[0] ?? 0, snapshot.axes[1] ?? 0, deadzone);
279
+ }
280
+ function ffStickVector(x, y, deadzone) {
281
+ const length = Math.hypot(x, y);
282
+ if (length <= deadzone) return {
283
+ x: 0,
284
+ y: 0
285
+ };
286
+ const scale = Math.min(1, (length - deadzone) / (1 - deadzone)) / length;
287
+ return {
288
+ x: x * scale,
289
+ y: y * scale
290
+ };
291
+ }
292
+ function ffRepeatFires(heldMs, delayMs, intervalMs) {
293
+ return heldMs < delayMs ? 1 : 2 + Math.floor((heldMs - delayMs) / intervalMs);
294
+ }
295
+ const FF_GAMEPAD_PRIORITY = {
296
+ dialog: 300,
297
+ tutorial: 275,
298
+ popover: 260,
299
+ pauseMenu: 250,
300
+ modal: 200,
301
+ overlay: 100,
302
+ pageMode: 10,
303
+ page: 0,
304
+ global: -50
305
+ };
306
+ const FF_GLYPH_XBOX = {
307
+ button_a: {
308
+ code: 57348,
309
+ inkHeight: 983
310
+ },
311
+ button_a_outline: {
312
+ code: 57349,
313
+ inkHeight: 983
314
+ },
315
+ button_b: {
316
+ code: 57350,
317
+ inkHeight: 983
318
+ },
319
+ button_b_outline: {
320
+ code: 57351,
321
+ inkHeight: 983
322
+ },
323
+ button_back: {
324
+ code: 57352,
325
+ inkHeight: 655
326
+ },
327
+ button_back_icon: {
328
+ code: 57353,
329
+ inkHeight: 655
330
+ },
331
+ button_back_icon_outline: {
332
+ code: 57354,
333
+ inkHeight: 655
334
+ },
335
+ button_back_outline: {
336
+ code: 57355,
337
+ inkHeight: 655
338
+ },
339
+ button_color_a: {
340
+ code: 57356,
341
+ inkHeight: 983
342
+ },
343
+ button_color_a_outline: {
344
+ code: 57357,
345
+ inkHeight: 983
346
+ },
347
+ button_color_b: {
348
+ code: 57358,
349
+ inkHeight: 983
350
+ },
351
+ button_color_b_outline: {
352
+ code: 57359,
353
+ inkHeight: 983
354
+ },
355
+ button_color_x: {
356
+ code: 57360,
357
+ inkHeight: 983
358
+ },
359
+ button_color_x_outline: {
360
+ code: 57361,
361
+ inkHeight: 983
362
+ },
363
+ button_color_y: {
364
+ code: 57362,
365
+ inkHeight: 983
366
+ },
367
+ button_color_y_outline: {
368
+ code: 57363,
369
+ inkHeight: 983
370
+ },
371
+ button_menu: {
372
+ code: 57364,
373
+ inkHeight: 983
374
+ },
375
+ button_menu_outline: {
376
+ code: 57365,
377
+ inkHeight: 983
378
+ },
379
+ button_share: {
380
+ code: 57366,
381
+ inkHeight: 655
382
+ },
383
+ button_share_outline: {
384
+ code: 57367,
385
+ inkHeight: 655
386
+ },
387
+ button_start: {
388
+ code: 57368,
389
+ inkHeight: 655
390
+ },
391
+ button_start_icon: {
392
+ code: 57369,
393
+ inkHeight: 655
394
+ },
395
+ button_start_icon_outline: {
396
+ code: 57370,
397
+ inkHeight: 655
398
+ },
399
+ button_start_outline: {
400
+ code: 57371,
401
+ inkHeight: 655
402
+ },
403
+ button_view: {
404
+ code: 57372,
405
+ inkHeight: 983
406
+ },
407
+ button_view_outline: {
408
+ code: 57373,
409
+ inkHeight: 983
410
+ },
411
+ button_x: {
412
+ code: 57374,
413
+ inkHeight: 983
414
+ },
415
+ button_x_outline: {
416
+ code: 57375,
417
+ inkHeight: 983
418
+ },
419
+ button_y: {
420
+ code: 57376,
421
+ inkHeight: 983
422
+ },
423
+ button_y_outline: {
424
+ code: 57377,
425
+ inkHeight: 983
426
+ },
427
+ controller_xbox360: {
428
+ code: 57344,
429
+ inkHeight: 683
430
+ },
431
+ controller_xbox_adaptive: {
432
+ code: 57345,
433
+ inkHeight: 492
434
+ },
435
+ controller_xboxone: {
436
+ code: 57346,
437
+ inkHeight: 696
438
+ },
439
+ controller_xboxseries: {
440
+ code: 57347,
441
+ inkHeight: 676
442
+ },
443
+ dpad: {
444
+ code: 57378,
445
+ inkHeight: 983
446
+ },
447
+ dpad_all: {
448
+ code: 57379,
449
+ inkHeight: 983
450
+ },
451
+ dpad_down: {
452
+ code: 57380,
453
+ inkHeight: 983
454
+ },
455
+ dpad_down_outline: {
456
+ code: 57381,
457
+ inkHeight: 983
458
+ },
459
+ dpad_horizontal: {
460
+ code: 57382,
461
+ inkHeight: 983
462
+ },
463
+ dpad_horizontal_outline: {
464
+ code: 57383,
465
+ inkHeight: 983
466
+ },
467
+ dpad_left: {
468
+ code: 57384,
469
+ inkHeight: 983
470
+ },
471
+ dpad_left_outline: {
472
+ code: 57385,
473
+ inkHeight: 983
474
+ },
475
+ dpad_none: {
476
+ code: 57386,
477
+ inkHeight: 983
478
+ },
479
+ dpad_right: {
480
+ code: 57387,
481
+ inkHeight: 983
482
+ },
483
+ dpad_right_outline: {
484
+ code: 57388,
485
+ inkHeight: 983
486
+ },
487
+ dpad_round: {
488
+ code: 57389,
489
+ inkHeight: 983
490
+ },
491
+ dpad_round_all: {
492
+ code: 57390,
493
+ inkHeight: 983
494
+ },
495
+ dpad_round_down: {
496
+ code: 57391,
497
+ inkHeight: 983
498
+ },
499
+ dpad_round_horizontal: {
500
+ code: 57392,
501
+ inkHeight: 983
502
+ },
503
+ dpad_round_left: {
504
+ code: 57393,
505
+ inkHeight: 983
506
+ },
507
+ dpad_round_right: {
508
+ code: 57394,
509
+ inkHeight: 983
510
+ },
511
+ dpad_round_up: {
512
+ code: 57395,
513
+ inkHeight: 983
514
+ },
515
+ dpad_round_vertical: {
516
+ code: 57396,
517
+ inkHeight: 983
518
+ },
519
+ dpad_up: {
520
+ code: 57397,
521
+ inkHeight: 983
522
+ },
523
+ dpad_up_outline: {
524
+ code: 57398,
525
+ inkHeight: 983
526
+ },
527
+ dpad_vertical: {
528
+ code: 57399,
529
+ inkHeight: 983
530
+ },
531
+ dpad_vertical_outline: {
532
+ code: 57400,
533
+ inkHeight: 983
534
+ },
535
+ elite_paddle_bottom_left: {
536
+ code: 57401,
537
+ inkHeight: 734
538
+ },
539
+ elite_paddle_bottom_left_outline: {
540
+ code: 57402,
541
+ inkHeight: 734
542
+ },
543
+ elite_paddle_bottom_right: {
544
+ code: 57403,
545
+ inkHeight: 737
546
+ },
547
+ elite_paddle_bottom_right_outline: {
548
+ code: 57404,
549
+ inkHeight: 737
550
+ },
551
+ elite_paddle_top_left: {
552
+ code: 57405,
553
+ inkHeight: 409
554
+ },
555
+ elite_paddle_top_left_outline: {
556
+ code: 57406,
557
+ inkHeight: 409
558
+ },
559
+ elite_paddle_top_right: {
560
+ code: 57407,
561
+ inkHeight: 409
562
+ },
563
+ elite_paddle_top_right_outline: {
564
+ code: 57408,
565
+ inkHeight: 409
566
+ },
567
+ guide: {
568
+ code: 57409,
569
+ inkHeight: 981
570
+ },
571
+ guide_outline: {
572
+ code: 57410,
573
+ inkHeight: 983
574
+ },
575
+ lb: {
576
+ code: 57411,
577
+ inkHeight: 655
578
+ },
579
+ lb_outline: {
580
+ code: 57412,
581
+ inkHeight: 655
582
+ },
583
+ ls: {
584
+ code: 57413,
585
+ inkHeight: 983
586
+ },
587
+ ls_outline: {
588
+ code: 57414,
589
+ inkHeight: 983
590
+ },
591
+ lt: {
592
+ code: 57415,
593
+ inkHeight: 901
594
+ },
595
+ lt_outline: {
596
+ code: 57416,
597
+ inkHeight: 901
598
+ },
599
+ rb: {
600
+ code: 57417,
601
+ inkHeight: 655
602
+ },
603
+ rb_outline: {
604
+ code: 57418,
605
+ inkHeight: 655
606
+ },
607
+ rs: {
608
+ code: 57419,
609
+ inkHeight: 983
610
+ },
611
+ rs_outline: {
612
+ code: 57420,
613
+ inkHeight: 983
614
+ },
615
+ rt: {
616
+ code: 57421,
617
+ inkHeight: 901
618
+ },
619
+ rt_outline: {
620
+ code: 57422,
621
+ inkHeight: 901
622
+ },
623
+ stick_l: {
624
+ code: 57423,
625
+ inkHeight: 983
626
+ },
627
+ stick_l_down: {
628
+ code: 57424,
629
+ inkHeight: 983
630
+ },
631
+ stick_l_horizontal: {
632
+ code: 57425,
633
+ inkHeight: 983
634
+ },
635
+ stick_l_left: {
636
+ code: 57426,
637
+ inkHeight: 983
638
+ },
639
+ stick_l_press: {
640
+ code: 57427,
641
+ inkHeight: 1065
642
+ },
643
+ stick_l_right: {
644
+ code: 57428,
645
+ inkHeight: 983
646
+ },
647
+ stick_l_up: {
648
+ code: 57429,
649
+ inkHeight: 1106
650
+ },
651
+ stick_l_vertical: {
652
+ code: 57430,
653
+ inkHeight: 1106
654
+ },
655
+ stick_r: {
656
+ code: 57431,
657
+ inkHeight: 983
658
+ },
659
+ stick_r_down: {
660
+ code: 57432,
661
+ inkHeight: 983
662
+ },
663
+ stick_r_horizontal: {
664
+ code: 57433,
665
+ inkHeight: 983
666
+ },
667
+ stick_r_left: {
668
+ code: 57434,
669
+ inkHeight: 983
670
+ },
671
+ stick_r_press: {
672
+ code: 57435,
673
+ inkHeight: 1065
674
+ },
675
+ stick_r_right: {
676
+ code: 57436,
677
+ inkHeight: 983
678
+ },
679
+ stick_r_up: {
680
+ code: 57437,
681
+ inkHeight: 1106
682
+ },
683
+ stick_r_vertical: {
684
+ code: 57438,
685
+ inkHeight: 1106
686
+ },
687
+ stick_side_l: {
688
+ code: 57439,
689
+ inkHeight: 983
690
+ },
691
+ stick_side_r: {
692
+ code: 57440,
693
+ inkHeight: 983
694
+ },
695
+ stick_top_l: {
696
+ code: 57441,
697
+ inkHeight: 983
698
+ },
699
+ stick_top_r: {
700
+ code: 57442,
701
+ inkHeight: 983
702
+ }
703
+ };
704
+ const FF_GLYPH_PLAYSTATION = {
705
+ button_analog: {
706
+ code: 57407,
707
+ inkHeight: 737
708
+ },
709
+ button_analog_outline: {
710
+ code: 57408,
711
+ inkHeight: 737
712
+ },
713
+ button_circle: {
714
+ code: 57409,
715
+ inkHeight: 983
716
+ },
717
+ button_circle_outline: {
718
+ code: 57410,
719
+ inkHeight: 983
720
+ },
721
+ button_color_circle: {
722
+ code: 57411,
723
+ inkHeight: 983
724
+ },
725
+ button_color_circle_outline: {
726
+ code: 57412,
727
+ inkHeight: 983
728
+ },
729
+ button_color_cross: {
730
+ code: 57413,
731
+ inkHeight: 983
732
+ },
733
+ button_color_cross_outline: {
734
+ code: 57414,
735
+ inkHeight: 983
736
+ },
737
+ button_color_square: {
738
+ code: 57415,
739
+ inkHeight: 983
740
+ },
741
+ button_color_square_outline: {
742
+ code: 57416,
743
+ inkHeight: 983
744
+ },
745
+ button_color_triangle: {
746
+ code: 57417,
747
+ inkHeight: 983
748
+ },
749
+ button_color_triangle_outline: {
750
+ code: 57418,
751
+ inkHeight: 983
752
+ },
753
+ button_cross: {
754
+ code: 57419,
755
+ inkHeight: 983
756
+ },
757
+ button_cross_outline: {
758
+ code: 57420,
759
+ inkHeight: 983
760
+ },
761
+ button_l3: {
762
+ code: 57421,
763
+ inkHeight: 983
764
+ },
765
+ button_l3_outline: {
766
+ code: 57422,
767
+ inkHeight: 983
768
+ },
769
+ button_r3: {
770
+ code: 57423,
771
+ inkHeight: 983
772
+ },
773
+ button_r3_outline: {
774
+ code: 57424,
775
+ inkHeight: 983
776
+ },
777
+ button_square: {
778
+ code: 57425,
779
+ inkHeight: 983
780
+ },
781
+ button_square_outline: {
782
+ code: 57426,
783
+ inkHeight: 983
784
+ },
785
+ button_triangle: {
786
+ code: 57427,
787
+ inkHeight: 983
788
+ },
789
+ button_triangle_outline: {
790
+ code: 57428,
791
+ inkHeight: 983
792
+ },
793
+ controller_playstation1: {
794
+ code: 57344,
795
+ inkHeight: 614
796
+ },
797
+ controller_playstation2: {
798
+ code: 57345,
799
+ inkHeight: 614
800
+ },
801
+ controller_playstation3: {
802
+ code: 57346,
803
+ inkHeight: 614
804
+ },
805
+ controller_playstation4: {
806
+ code: 57347,
807
+ inkHeight: 615
808
+ },
809
+ controller_playstation5: {
810
+ code: 57348,
811
+ inkHeight: 654
812
+ },
813
+ dpad: {
814
+ code: 57429,
815
+ inkHeight: 983
816
+ },
817
+ dpad_all: {
818
+ code: 57430,
819
+ inkHeight: 983
820
+ },
821
+ dpad_down: {
822
+ code: 57431,
823
+ inkHeight: 983
824
+ },
825
+ dpad_down_outline: {
826
+ code: 57432,
827
+ inkHeight: 983
828
+ },
829
+ dpad_horizontal: {
830
+ code: 57433,
831
+ inkHeight: 983
832
+ },
833
+ dpad_horizontal_outline: {
834
+ code: 57434,
835
+ inkHeight: 983
836
+ },
837
+ dpad_left: {
838
+ code: 57435,
839
+ inkHeight: 983
840
+ },
841
+ dpad_left_outline: {
842
+ code: 57436,
843
+ inkHeight: 983
844
+ },
845
+ dpad_none: {
846
+ code: 57437,
847
+ inkHeight: 983
848
+ },
849
+ dpad_right: {
850
+ code: 57438,
851
+ inkHeight: 983
852
+ },
853
+ dpad_right_outline: {
854
+ code: 57439,
855
+ inkHeight: 983
856
+ },
857
+ dpad_up: {
858
+ code: 57440,
859
+ inkHeight: 983
860
+ },
861
+ dpad_up_outline: {
862
+ code: 57441,
863
+ inkHeight: 983
864
+ },
865
+ dpad_vertical: {
866
+ code: 57442,
867
+ inkHeight: 983
868
+ },
869
+ dpad_vertical_outline: {
870
+ code: 57443,
871
+ inkHeight: 983
872
+ },
873
+ playstation3_button_select: {
874
+ code: 57349,
875
+ inkHeight: 737
876
+ },
877
+ playstation3_button_select_outline: {
878
+ code: 57350,
879
+ inkHeight: 737
880
+ },
881
+ playstation3_button_start: {
882
+ code: 57351,
883
+ inkHeight: 732
884
+ },
885
+ playstation3_button_start_outline: {
886
+ code: 57352,
887
+ inkHeight: 732
888
+ },
889
+ playstation4_button_options: {
890
+ code: 57353,
891
+ inkHeight: 901
892
+ },
893
+ playstation4_button_options_outline: {
894
+ code: 57354,
895
+ inkHeight: 901
896
+ },
897
+ playstation4_button_share: {
898
+ code: 57355,
899
+ inkHeight: 901
900
+ },
901
+ playstation4_button_share_outline: {
902
+ code: 57356,
903
+ inkHeight: 901
904
+ },
905
+ playstation4_touchpad: {
906
+ code: 57357,
907
+ inkHeight: 655
908
+ },
909
+ playstation4_touchpad_grid: {
910
+ code: 57358,
911
+ inkHeight: 655
912
+ },
913
+ playstation4_touchpad_grid_outline: {
914
+ code: 57359,
915
+ inkHeight: 655
916
+ },
917
+ playstation4_touchpad_outline: {
918
+ code: 57360,
919
+ inkHeight: 655
920
+ },
921
+ playstation4_touchpad_press: {
922
+ code: 57361,
923
+ inkHeight: 717
924
+ },
925
+ playstation4_touchpad_press_center: {
926
+ code: 57362,
927
+ inkHeight: 717
928
+ },
929
+ playstation4_touchpad_press_left: {
930
+ code: 57363,
931
+ inkHeight: 717
932
+ },
933
+ playstation4_touchpad_press_right: {
934
+ code: 57364,
935
+ inkHeight: 717
936
+ },
937
+ playstation4_touchpad_selected: {
938
+ code: 57365,
939
+ inkHeight: 655
940
+ },
941
+ playstation4_touchpad_swipe_down: {
942
+ code: 57366,
943
+ inkHeight: 717
944
+ },
945
+ playstation4_touchpad_swipe_horizontal: {
946
+ code: 57367,
947
+ inkHeight: 655
948
+ },
949
+ playstation4_touchpad_swipe_left: {
950
+ code: 57368,
951
+ inkHeight: 655
952
+ },
953
+ playstation4_touchpad_swipe_right: {
954
+ code: 57369,
955
+ inkHeight: 655
956
+ },
957
+ playstation4_touchpad_swipe_up: {
958
+ code: 57370,
959
+ inkHeight: 717
960
+ },
961
+ playstation4_touchpad_swipe_vertical: {
962
+ code: 57371,
963
+ inkHeight: 778
964
+ },
965
+ playstation4_touchpad_touch: {
966
+ code: 57372,
967
+ inkHeight: 955
968
+ },
969
+ playstation4_touchpad_touch_outline: {
970
+ code: 57373,
971
+ inkHeight: 955
972
+ },
973
+ playstation5_button_create: {
974
+ code: 57374,
975
+ inkHeight: 921
976
+ },
977
+ playstation5_button_create_alternative: {
978
+ code: 57375,
979
+ inkHeight: 738
980
+ },
981
+ playstation5_button_create_alternative_outline: {
982
+ code: 57376,
983
+ inkHeight: 738
984
+ },
985
+ playstation5_button_create_outline: {
986
+ code: 57377,
987
+ inkHeight: 921
988
+ },
989
+ playstation5_button_mute: {
990
+ code: 57378,
991
+ inkHeight: 819
992
+ },
993
+ playstation5_button_mute_outline: {
994
+ code: 57379,
995
+ inkHeight: 819
996
+ },
997
+ playstation5_button_options: {
998
+ code: 57380,
999
+ inkHeight: 941
1000
+ },
1001
+ playstation5_button_options_alternative: {
1002
+ code: 57381,
1003
+ inkHeight: 738
1004
+ },
1005
+ playstation5_button_options_alternative_outline: {
1006
+ code: 57382,
1007
+ inkHeight: 738
1008
+ },
1009
+ playstation5_button_options_outline: {
1010
+ code: 57383,
1011
+ inkHeight: 941
1012
+ },
1013
+ playstation5_elite_fn_l: {
1014
+ code: 57384,
1015
+ inkHeight: 983
1016
+ },
1017
+ playstation5_elite_fn_l_outline: {
1018
+ code: 57385,
1019
+ inkHeight: 983
1020
+ },
1021
+ playstation5_elite_fn_r: {
1022
+ code: 57386,
1023
+ inkHeight: 983
1024
+ },
1025
+ playstation5_elite_fn_r_outline: {
1026
+ code: 57387,
1027
+ inkHeight: 983
1028
+ },
1029
+ playstation5_elite_lb: {
1030
+ code: 57388,
1031
+ inkHeight: 983
1032
+ },
1033
+ playstation5_elite_lb_outline: {
1034
+ code: 57389,
1035
+ inkHeight: 983
1036
+ },
1037
+ playstation5_elite_rb: {
1038
+ code: 57390,
1039
+ inkHeight: 983
1040
+ },
1041
+ playstation5_elite_rb_outline: {
1042
+ code: 57391,
1043
+ inkHeight: 983
1044
+ },
1045
+ playstation5_touchpad: {
1046
+ code: 57392,
1047
+ inkHeight: 655
1048
+ },
1049
+ playstation5_touchpad_outline: {
1050
+ code: 57393,
1051
+ inkHeight: 655
1052
+ },
1053
+ playstation5_touchpad_press: {
1054
+ code: 57394,
1055
+ inkHeight: 717
1056
+ },
1057
+ playstation5_touchpad_press_center: {
1058
+ code: 57395,
1059
+ inkHeight: 717
1060
+ },
1061
+ playstation5_touchpad_press_left: {
1062
+ code: 57396,
1063
+ inkHeight: 717
1064
+ },
1065
+ playstation5_touchpad_press_right: {
1066
+ code: 57397,
1067
+ inkHeight: 717
1068
+ },
1069
+ playstation5_touchpad_selected: {
1070
+ code: 57398,
1071
+ inkHeight: 655
1072
+ },
1073
+ playstation5_touchpad_swipe_down: {
1074
+ code: 57399,
1075
+ inkHeight: 717
1076
+ },
1077
+ playstation5_touchpad_swipe_horizontal: {
1078
+ code: 57400,
1079
+ inkHeight: 655
1080
+ },
1081
+ playstation5_touchpad_swipe_left: {
1082
+ code: 57401,
1083
+ inkHeight: 655
1084
+ },
1085
+ playstation5_touchpad_swipe_right: {
1086
+ code: 57402,
1087
+ inkHeight: 655
1088
+ },
1089
+ playstation5_touchpad_swipe_up: {
1090
+ code: 57403,
1091
+ inkHeight: 717
1092
+ },
1093
+ playstation5_touchpad_swipe_vertical: {
1094
+ code: 57404,
1095
+ inkHeight: 778
1096
+ },
1097
+ playstation5_touchpad_touch: {
1098
+ code: 57405,
1099
+ inkHeight: 955
1100
+ },
1101
+ playstation5_touchpad_touch_outline: {
1102
+ code: 57406,
1103
+ inkHeight: 955
1104
+ },
1105
+ stick_l: {
1106
+ code: 57444,
1107
+ inkHeight: 983
1108
+ },
1109
+ stick_l_down: {
1110
+ code: 57445,
1111
+ inkHeight: 983
1112
+ },
1113
+ stick_l_horizontal: {
1114
+ code: 57446,
1115
+ inkHeight: 983
1116
+ },
1117
+ stick_l_left: {
1118
+ code: 57447,
1119
+ inkHeight: 983
1120
+ },
1121
+ stick_l_press: {
1122
+ code: 57448,
1123
+ inkHeight: 1065
1124
+ },
1125
+ stick_l_right: {
1126
+ code: 57449,
1127
+ inkHeight: 983
1128
+ },
1129
+ stick_l_up: {
1130
+ code: 57450,
1131
+ inkHeight: 1106
1132
+ },
1133
+ stick_l_vertical: {
1134
+ code: 57451,
1135
+ inkHeight: 1106
1136
+ },
1137
+ stick_r: {
1138
+ code: 57452,
1139
+ inkHeight: 983
1140
+ },
1141
+ stick_r_down: {
1142
+ code: 57453,
1143
+ inkHeight: 983
1144
+ },
1145
+ stick_r_horizontal: {
1146
+ code: 57454,
1147
+ inkHeight: 983
1148
+ },
1149
+ stick_r_left: {
1150
+ code: 57455,
1151
+ inkHeight: 983
1152
+ },
1153
+ stick_r_press: {
1154
+ code: 57456,
1155
+ inkHeight: 1065
1156
+ },
1157
+ stick_r_right: {
1158
+ code: 57457,
1159
+ inkHeight: 983
1160
+ },
1161
+ stick_r_up: {
1162
+ code: 57458,
1163
+ inkHeight: 1106
1164
+ },
1165
+ stick_r_vertical: {
1166
+ code: 57459,
1167
+ inkHeight: 1106
1168
+ },
1169
+ stick_side_l: {
1170
+ code: 57460,
1171
+ inkHeight: 983
1172
+ },
1173
+ stick_side_r: {
1174
+ code: 57461,
1175
+ inkHeight: 983
1176
+ },
1177
+ stick_top_l: {
1178
+ code: 57462,
1179
+ inkHeight: 983
1180
+ },
1181
+ stick_top_r: {
1182
+ code: 57463,
1183
+ inkHeight: 983
1184
+ },
1185
+ trigger_l1: {
1186
+ code: 57464,
1187
+ inkHeight: 901
1188
+ },
1189
+ trigger_l1_alternative: {
1190
+ code: 57465,
1191
+ inkHeight: 819
1192
+ },
1193
+ trigger_l1_alternative_outline: {
1194
+ code: 57466,
1195
+ inkHeight: 819
1196
+ },
1197
+ trigger_l1_outline: {
1198
+ code: 57467,
1199
+ inkHeight: 901
1200
+ },
1201
+ trigger_l2: {
1202
+ code: 57468,
1203
+ inkHeight: 983
1204
+ },
1205
+ trigger_l2_alternative: {
1206
+ code: 57469,
1207
+ inkHeight: 819
1208
+ },
1209
+ trigger_l2_alternative_outline: {
1210
+ code: 57470,
1211
+ inkHeight: 819
1212
+ },
1213
+ trigger_l2_outline: {
1214
+ code: 57471,
1215
+ inkHeight: 983
1216
+ },
1217
+ trigger_r1: {
1218
+ code: 57472,
1219
+ inkHeight: 901
1220
+ },
1221
+ trigger_r1_alternative: {
1222
+ code: 57473,
1223
+ inkHeight: 819
1224
+ },
1225
+ trigger_r1_alternative_outline: {
1226
+ code: 57474,
1227
+ inkHeight: 819
1228
+ },
1229
+ trigger_r1_outline: {
1230
+ code: 57475,
1231
+ inkHeight: 901
1232
+ },
1233
+ trigger_r2: {
1234
+ code: 57476,
1235
+ inkHeight: 983
1236
+ },
1237
+ trigger_r2_alternative: {
1238
+ code: 57477,
1239
+ inkHeight: 819
1240
+ },
1241
+ trigger_r2_alternative_outline: {
1242
+ code: 57478,
1243
+ inkHeight: 819
1244
+ },
1245
+ trigger_r2_outline: {
1246
+ code: 57479,
1247
+ inkHeight: 983
1248
+ }
1249
+ };
1250
+ const FF_GLYPH_SWITCH = {
1251
+ button_a: {
1252
+ code: 57348,
1253
+ inkHeight: 983
1254
+ },
1255
+ button_a_outline: {
1256
+ code: 57349,
1257
+ inkHeight: 983
1258
+ },
1259
+ button_b: {
1260
+ code: 57350,
1261
+ inkHeight: 983
1262
+ },
1263
+ button_b_outline: {
1264
+ code: 57351,
1265
+ inkHeight: 983
1266
+ },
1267
+ button_home: {
1268
+ code: 57352,
1269
+ inkHeight: 983
1270
+ },
1271
+ button_home_outline: {
1272
+ code: 57353,
1273
+ inkHeight: 983
1274
+ },
1275
+ button_l: {
1276
+ code: 57354,
1277
+ inkHeight: 819
1278
+ },
1279
+ button_l_outline: {
1280
+ code: 57355,
1281
+ inkHeight: 819
1282
+ },
1283
+ button_minus: {
1284
+ code: 57356,
1285
+ inkHeight: 983
1286
+ },
1287
+ button_minus_outline: {
1288
+ code: 57357,
1289
+ inkHeight: 983
1290
+ },
1291
+ button_plus: {
1292
+ code: 57358,
1293
+ inkHeight: 983
1294
+ },
1295
+ button_plus_outline: {
1296
+ code: 57359,
1297
+ inkHeight: 983
1298
+ },
1299
+ button_r: {
1300
+ code: 57360,
1301
+ inkHeight: 819
1302
+ },
1303
+ button_r_outline: {
1304
+ code: 57361,
1305
+ inkHeight: 819
1306
+ },
1307
+ button_sl: {
1308
+ code: 57362,
1309
+ inkHeight: 655
1310
+ },
1311
+ button_sl_outline: {
1312
+ code: 57363,
1313
+ inkHeight: 655
1314
+ },
1315
+ button_sr: {
1316
+ code: 57364,
1317
+ inkHeight: 655
1318
+ },
1319
+ button_sr_outline: {
1320
+ code: 57365,
1321
+ inkHeight: 655
1322
+ },
1323
+ button_sync: {
1324
+ code: 57366,
1325
+ inkHeight: 983
1326
+ },
1327
+ button_sync_outline: {
1328
+ code: 57367,
1329
+ inkHeight: 983
1330
+ },
1331
+ button_x: {
1332
+ code: 57368,
1333
+ inkHeight: 983
1334
+ },
1335
+ button_x_outline: {
1336
+ code: 57369,
1337
+ inkHeight: 983
1338
+ },
1339
+ button_y: {
1340
+ code: 57370,
1341
+ inkHeight: 983
1342
+ },
1343
+ button_y_outline: {
1344
+ code: 57371,
1345
+ inkHeight: 983
1346
+ },
1347
+ button_zl: {
1348
+ code: 57372,
1349
+ inkHeight: 901
1350
+ },
1351
+ button_zl_outline: {
1352
+ code: 57373,
1353
+ inkHeight: 901
1354
+ },
1355
+ button_zr: {
1356
+ code: 57374,
1357
+ inkHeight: 901
1358
+ },
1359
+ button_zr_outline: {
1360
+ code: 57375,
1361
+ inkHeight: 901
1362
+ },
1363
+ buttons: {
1364
+ code: 57376,
1365
+ inkHeight: 983
1366
+ },
1367
+ buttons_all: {
1368
+ code: 57377,
1369
+ inkHeight: 983
1370
+ },
1371
+ buttons_down: {
1372
+ code: 57378,
1373
+ inkHeight: 983
1374
+ },
1375
+ buttons_down_outline: {
1376
+ code: 57379,
1377
+ inkHeight: 983
1378
+ },
1379
+ buttons_horizontal: {
1380
+ code: 57380,
1381
+ inkHeight: 983
1382
+ },
1383
+ buttons_horizontal_outline: {
1384
+ code: 57381,
1385
+ inkHeight: 983
1386
+ },
1387
+ buttons_left: {
1388
+ code: 57382,
1389
+ inkHeight: 983
1390
+ },
1391
+ buttons_left_outline: {
1392
+ code: 57383,
1393
+ inkHeight: 983
1394
+ },
1395
+ buttons_none: {
1396
+ code: 57384,
1397
+ inkHeight: 983
1398
+ },
1399
+ buttons_right: {
1400
+ code: 57385,
1401
+ inkHeight: 983
1402
+ },
1403
+ buttons_right_outline: {
1404
+ code: 57386,
1405
+ inkHeight: 983
1406
+ },
1407
+ buttons_up: {
1408
+ code: 57387,
1409
+ inkHeight: 983
1410
+ },
1411
+ buttons_up_outline: {
1412
+ code: 57388,
1413
+ inkHeight: 983
1414
+ },
1415
+ buttons_vertical: {
1416
+ code: 57389,
1417
+ inkHeight: 983
1418
+ },
1419
+ buttons_vertical_outline: {
1420
+ code: 57390,
1421
+ inkHeight: 983
1422
+ },
1423
+ controller_switch: {
1424
+ code: 57344,
1425
+ inkHeight: 451
1426
+ },
1427
+ controller_switch_joycon_down: {
1428
+ code: 57345,
1429
+ inkHeight: 860
1430
+ },
1431
+ controller_switch_joycon_up: {
1432
+ code: 57346,
1433
+ inkHeight: 840
1434
+ },
1435
+ controller_switch_pro: {
1436
+ code: 57347,
1437
+ inkHeight: 676
1438
+ },
1439
+ down: {
1440
+ code: 57391,
1441
+ inkHeight: 983
1442
+ },
1443
+ down_outline: {
1444
+ code: 57392,
1445
+ inkHeight: 983
1446
+ },
1447
+ dpad: {
1448
+ code: 57393,
1449
+ inkHeight: 983
1450
+ },
1451
+ dpad_all: {
1452
+ code: 57394,
1453
+ inkHeight: 983
1454
+ },
1455
+ dpad_down: {
1456
+ code: 57395,
1457
+ inkHeight: 983
1458
+ },
1459
+ dpad_down_outline: {
1460
+ code: 57396,
1461
+ inkHeight: 983
1462
+ },
1463
+ dpad_horizontal: {
1464
+ code: 57397,
1465
+ inkHeight: 983
1466
+ },
1467
+ dpad_horizontal_outline: {
1468
+ code: 57398,
1469
+ inkHeight: 983
1470
+ },
1471
+ dpad_left: {
1472
+ code: 57399,
1473
+ inkHeight: 983
1474
+ },
1475
+ dpad_left_outline: {
1476
+ code: 57400,
1477
+ inkHeight: 983
1478
+ },
1479
+ dpad_none: {
1480
+ code: 57401,
1481
+ inkHeight: 983
1482
+ },
1483
+ dpad_right: {
1484
+ code: 57402,
1485
+ inkHeight: 983
1486
+ },
1487
+ dpad_right_outline: {
1488
+ code: 57403,
1489
+ inkHeight: 983
1490
+ },
1491
+ dpad_up: {
1492
+ code: 57404,
1493
+ inkHeight: 983
1494
+ },
1495
+ dpad_up_outline: {
1496
+ code: 57405,
1497
+ inkHeight: 983
1498
+ },
1499
+ dpad_vertical: {
1500
+ code: 57406,
1501
+ inkHeight: 983
1502
+ },
1503
+ dpad_vertical_outline: {
1504
+ code: 57407,
1505
+ inkHeight: 983
1506
+ },
1507
+ joycon: {
1508
+ code: 57408,
1509
+ inkHeight: 983
1510
+ },
1511
+ joycon_left: {
1512
+ code: 57409,
1513
+ inkHeight: 983
1514
+ },
1515
+ joycon_left_diagonal: {
1516
+ code: 57410,
1517
+ inkHeight: 956
1518
+ },
1519
+ joycon_left_diagonal_outline: {
1520
+ code: 57411,
1521
+ inkHeight: 985
1522
+ },
1523
+ joycon_left_horizontal: {
1524
+ code: 57412,
1525
+ inkHeight: 983
1526
+ },
1527
+ joycon_left_horizontal_outline: {
1528
+ code: 57413,
1529
+ inkHeight: 983
1530
+ },
1531
+ joycon_left_outline: {
1532
+ code: 57414,
1533
+ inkHeight: 983
1534
+ },
1535
+ joycon_left_rotate: {
1536
+ code: 57415,
1537
+ inkHeight: 996
1538
+ },
1539
+ joycon_left_rotate_outline: {
1540
+ code: 57416,
1541
+ inkHeight: 1004
1542
+ },
1543
+ joycon_left_vertical: {
1544
+ code: 57417,
1545
+ inkHeight: 983
1546
+ },
1547
+ joycon_left_vertical_outline: {
1548
+ code: 57418,
1549
+ inkHeight: 983
1550
+ },
1551
+ joycon_outline: {
1552
+ code: 57419,
1553
+ inkHeight: 983
1554
+ },
1555
+ joycon_right: {
1556
+ code: 57420,
1557
+ inkHeight: 983
1558
+ },
1559
+ joycon_right_diagonal: {
1560
+ code: 57421,
1561
+ inkHeight: 956
1562
+ },
1563
+ joycon_right_diagonal_outline: {
1564
+ code: 57422,
1565
+ inkHeight: 985
1566
+ },
1567
+ joycon_right_horizontal: {
1568
+ code: 57423,
1569
+ inkHeight: 983
1570
+ },
1571
+ joycon_right_horizontal_outline: {
1572
+ code: 57424,
1573
+ inkHeight: 983
1574
+ },
1575
+ joycon_right_outline: {
1576
+ code: 57425,
1577
+ inkHeight: 983
1578
+ },
1579
+ joycon_right_rotate: {
1580
+ code: 57426,
1581
+ inkHeight: 1004
1582
+ },
1583
+ joycon_right_rotate_outline: {
1584
+ code: 57427,
1585
+ inkHeight: 1004
1586
+ },
1587
+ joycon_right_vertical: {
1588
+ code: 57428,
1589
+ inkHeight: 983
1590
+ },
1591
+ joycon_right_vertical_outline: {
1592
+ code: 57429,
1593
+ inkHeight: 983
1594
+ },
1595
+ left: {
1596
+ code: 57430,
1597
+ inkHeight: 983
1598
+ },
1599
+ left_outline: {
1600
+ code: 57431,
1601
+ inkHeight: 983
1602
+ },
1603
+ right: {
1604
+ code: 57432,
1605
+ inkHeight: 983
1606
+ },
1607
+ right_outline: {
1608
+ code: 57433,
1609
+ inkHeight: 983
1610
+ },
1611
+ stick_l: {
1612
+ code: 57434,
1613
+ inkHeight: 983
1614
+ },
1615
+ stick_l_down: {
1616
+ code: 57435,
1617
+ inkHeight: 983
1618
+ },
1619
+ stick_l_horizontal: {
1620
+ code: 57436,
1621
+ inkHeight: 983
1622
+ },
1623
+ stick_l_left: {
1624
+ code: 57437,
1625
+ inkHeight: 983
1626
+ },
1627
+ stick_l_press: {
1628
+ code: 57438,
1629
+ inkHeight: 1065
1630
+ },
1631
+ stick_l_right: {
1632
+ code: 57439,
1633
+ inkHeight: 983
1634
+ },
1635
+ stick_l_up: {
1636
+ code: 57440,
1637
+ inkHeight: 1106
1638
+ },
1639
+ stick_l_vertical: {
1640
+ code: 57441,
1641
+ inkHeight: 1106
1642
+ },
1643
+ stick_r: {
1644
+ code: 57442,
1645
+ inkHeight: 983
1646
+ },
1647
+ stick_r_down: {
1648
+ code: 57443,
1649
+ inkHeight: 983
1650
+ },
1651
+ stick_r_horizontal: {
1652
+ code: 57444,
1653
+ inkHeight: 983
1654
+ },
1655
+ stick_r_left: {
1656
+ code: 57445,
1657
+ inkHeight: 983
1658
+ },
1659
+ stick_r_press: {
1660
+ code: 57446,
1661
+ inkHeight: 1065
1662
+ },
1663
+ stick_r_right: {
1664
+ code: 57447,
1665
+ inkHeight: 983
1666
+ },
1667
+ stick_r_up: {
1668
+ code: 57448,
1669
+ inkHeight: 1106
1670
+ },
1671
+ stick_r_vertical: {
1672
+ code: 57449,
1673
+ inkHeight: 1106
1674
+ },
1675
+ stick_side_l: {
1676
+ code: 57450,
1677
+ inkHeight: 983
1678
+ },
1679
+ stick_side_r: {
1680
+ code: 57451,
1681
+ inkHeight: 983
1682
+ },
1683
+ stick_top_l: {
1684
+ code: 57452,
1685
+ inkHeight: 983
1686
+ },
1687
+ stick_top_r: {
1688
+ code: 57453,
1689
+ inkHeight: 983
1690
+ },
1691
+ up: {
1692
+ code: 57454,
1693
+ inkHeight: 983
1694
+ },
1695
+ up_outline: {
1696
+ code: 57455,
1697
+ inkHeight: 983
1698
+ }
1699
+ };
1700
+ const FF_GLYPH_SWITCH2 = {
1701
+ button_a: {
1702
+ code: 57348,
1703
+ inkHeight: 983
1704
+ },
1705
+ button_a_outline: {
1706
+ code: 57349,
1707
+ inkHeight: 983
1708
+ },
1709
+ button_b: {
1710
+ code: 57350,
1711
+ inkHeight: 983
1712
+ },
1713
+ button_b_outline: {
1714
+ code: 57351,
1715
+ inkHeight: 983
1716
+ },
1717
+ button_c: {
1718
+ code: 57352,
1719
+ inkHeight: 983
1720
+ },
1721
+ button_c_outline: {
1722
+ code: 57353,
1723
+ inkHeight: 983
1724
+ },
1725
+ button_gl: {
1726
+ code: 57354,
1727
+ inkHeight: 982
1728
+ },
1729
+ button_gl_outline: {
1730
+ code: 57355,
1731
+ inkHeight: 982
1732
+ },
1733
+ button_gr: {
1734
+ code: 57356,
1735
+ inkHeight: 982
1736
+ },
1737
+ button_gr_outline: {
1738
+ code: 57357,
1739
+ inkHeight: 982
1740
+ },
1741
+ button_home: {
1742
+ code: 57358,
1743
+ inkHeight: 983
1744
+ },
1745
+ button_home_outline: {
1746
+ code: 57359,
1747
+ inkHeight: 983
1748
+ },
1749
+ button_l: {
1750
+ code: 57360,
1751
+ inkHeight: 819
1752
+ },
1753
+ button_l_outline: {
1754
+ code: 57361,
1755
+ inkHeight: 819
1756
+ },
1757
+ button_minus: {
1758
+ code: 57362,
1759
+ inkHeight: 983
1760
+ },
1761
+ button_minus_outline: {
1762
+ code: 57363,
1763
+ inkHeight: 983
1764
+ },
1765
+ button_plus: {
1766
+ code: 57364,
1767
+ inkHeight: 983
1768
+ },
1769
+ button_plus_outline: {
1770
+ code: 57365,
1771
+ inkHeight: 983
1772
+ },
1773
+ button_r: {
1774
+ code: 57366,
1775
+ inkHeight: 819
1776
+ },
1777
+ button_r_outline: {
1778
+ code: 57367,
1779
+ inkHeight: 819
1780
+ },
1781
+ button_sl: {
1782
+ code: 57368,
1783
+ inkHeight: 655
1784
+ },
1785
+ button_sl_outline: {
1786
+ code: 57369,
1787
+ inkHeight: 655
1788
+ },
1789
+ button_sr: {
1790
+ code: 57370,
1791
+ inkHeight: 655
1792
+ },
1793
+ button_sr_outline: {
1794
+ code: 57371,
1795
+ inkHeight: 655
1796
+ },
1797
+ button_sync: {
1798
+ code: 57372,
1799
+ inkHeight: 983
1800
+ },
1801
+ button_sync_outline: {
1802
+ code: 57373,
1803
+ inkHeight: 983
1804
+ },
1805
+ button_x: {
1806
+ code: 57374,
1807
+ inkHeight: 983
1808
+ },
1809
+ button_x_outline: {
1810
+ code: 57375,
1811
+ inkHeight: 983
1812
+ },
1813
+ button_y: {
1814
+ code: 57376,
1815
+ inkHeight: 983
1816
+ },
1817
+ button_y_outline: {
1818
+ code: 57377,
1819
+ inkHeight: 983
1820
+ },
1821
+ button_zl: {
1822
+ code: 57378,
1823
+ inkHeight: 901
1824
+ },
1825
+ button_zl_outline: {
1826
+ code: 57379,
1827
+ inkHeight: 901
1828
+ },
1829
+ button_zr: {
1830
+ code: 57380,
1831
+ inkHeight: 901
1832
+ },
1833
+ button_zr_outline: {
1834
+ code: 57381,
1835
+ inkHeight: 901
1836
+ },
1837
+ buttons: {
1838
+ code: 57382,
1839
+ inkHeight: 983
1840
+ },
1841
+ buttons_all: {
1842
+ code: 57383,
1843
+ inkHeight: 983
1844
+ },
1845
+ buttons_down: {
1846
+ code: 57384,
1847
+ inkHeight: 983
1848
+ },
1849
+ buttons_down_outline: {
1850
+ code: 57385,
1851
+ inkHeight: 983
1852
+ },
1853
+ buttons_horizontal: {
1854
+ code: 57386,
1855
+ inkHeight: 983
1856
+ },
1857
+ buttons_horizontal_outline: {
1858
+ code: 57387,
1859
+ inkHeight: 983
1860
+ },
1861
+ buttons_left: {
1862
+ code: 57388,
1863
+ inkHeight: 983
1864
+ },
1865
+ buttons_left_outline: {
1866
+ code: 57389,
1867
+ inkHeight: 983
1868
+ },
1869
+ buttons_none: {
1870
+ code: 57390,
1871
+ inkHeight: 983
1872
+ },
1873
+ buttons_right: {
1874
+ code: 57391,
1875
+ inkHeight: 983
1876
+ },
1877
+ buttons_right_outline: {
1878
+ code: 57392,
1879
+ inkHeight: 983
1880
+ },
1881
+ buttons_up: {
1882
+ code: 57393,
1883
+ inkHeight: 983
1884
+ },
1885
+ buttons_up_outline: {
1886
+ code: 57394,
1887
+ inkHeight: 983
1888
+ },
1889
+ buttons_vertical: {
1890
+ code: 57395,
1891
+ inkHeight: 983
1892
+ },
1893
+ buttons_vertical_outline: {
1894
+ code: 57396,
1895
+ inkHeight: 983
1896
+ },
1897
+ controller_switch: {
1898
+ code: 57344,
1899
+ inkHeight: 451
1900
+ },
1901
+ controller_switch_joycon_down: {
1902
+ code: 57345,
1903
+ inkHeight: 778
1904
+ },
1905
+ controller_switch_joycon_up: {
1906
+ code: 57346,
1907
+ inkHeight: 758
1908
+ },
1909
+ controller_switch_pro: {
1910
+ code: 57347,
1911
+ inkHeight: 717
1912
+ },
1913
+ down: {
1914
+ code: 57397,
1915
+ inkHeight: 983
1916
+ },
1917
+ down_outline: {
1918
+ code: 57398,
1919
+ inkHeight: 983
1920
+ },
1921
+ dpad: {
1922
+ code: 57399,
1923
+ inkHeight: 983
1924
+ },
1925
+ dpad_all: {
1926
+ code: 57400,
1927
+ inkHeight: 983
1928
+ },
1929
+ dpad_down: {
1930
+ code: 57401,
1931
+ inkHeight: 983
1932
+ },
1933
+ dpad_down_outline: {
1934
+ code: 57402,
1935
+ inkHeight: 983
1936
+ },
1937
+ dpad_horizontal: {
1938
+ code: 57403,
1939
+ inkHeight: 983
1940
+ },
1941
+ dpad_horizontal_outline: {
1942
+ code: 57404,
1943
+ inkHeight: 983
1944
+ },
1945
+ dpad_left: {
1946
+ code: 57405,
1947
+ inkHeight: 983
1948
+ },
1949
+ dpad_left_outline: {
1950
+ code: 57406,
1951
+ inkHeight: 983
1952
+ },
1953
+ dpad_none: {
1954
+ code: 57407,
1955
+ inkHeight: 983
1956
+ },
1957
+ dpad_right: {
1958
+ code: 57408,
1959
+ inkHeight: 983
1960
+ },
1961
+ dpad_right_outline: {
1962
+ code: 57409,
1963
+ inkHeight: 983
1964
+ },
1965
+ dpad_up: {
1966
+ code: 57410,
1967
+ inkHeight: 983
1968
+ },
1969
+ dpad_up_outline: {
1970
+ code: 57411,
1971
+ inkHeight: 983
1972
+ },
1973
+ dpad_vertical: {
1974
+ code: 57412,
1975
+ inkHeight: 983
1976
+ },
1977
+ dpad_vertical_outline: {
1978
+ code: 57413,
1979
+ inkHeight: 983
1980
+ },
1981
+ joycon: {
1982
+ code: 57414,
1983
+ inkHeight: 983
1984
+ },
1985
+ joycon_left: {
1986
+ code: 57415,
1987
+ inkHeight: 983
1988
+ },
1989
+ joycon_left_diagonal: {
1990
+ code: 57416,
1991
+ inkHeight: 956
1992
+ },
1993
+ joycon_left_diagonal_outline: {
1994
+ code: 57417,
1995
+ inkHeight: 985
1996
+ },
1997
+ joycon_left_horizontal: {
1998
+ code: 57418,
1999
+ inkHeight: 983
2000
+ },
2001
+ joycon_left_horizontal_outline: {
2002
+ code: 57419,
2003
+ inkHeight: 983
2004
+ },
2005
+ joycon_left_mouse: {
2006
+ code: 57420,
2007
+ inkHeight: 983
2008
+ },
2009
+ joycon_left_mouse_outline: {
2010
+ code: 57421,
2011
+ inkHeight: 983
2012
+ },
2013
+ joycon_left_outline: {
2014
+ code: 57422,
2015
+ inkHeight: 983
2016
+ },
2017
+ joycon_left_rotate: {
2018
+ code: 57423,
2019
+ inkHeight: 996
2020
+ },
2021
+ joycon_left_rotate_outline: {
2022
+ code: 57424,
2023
+ inkHeight: 1004
2024
+ },
2025
+ joycon_left_vertical: {
2026
+ code: 57425,
2027
+ inkHeight: 983
2028
+ },
2029
+ joycon_left_vertical_outline: {
2030
+ code: 57426,
2031
+ inkHeight: 983
2032
+ },
2033
+ joycon_outline: {
2034
+ code: 57427,
2035
+ inkHeight: 983
2036
+ },
2037
+ joycon_right: {
2038
+ code: 57428,
2039
+ inkHeight: 983
2040
+ },
2041
+ joycon_right_diagonal: {
2042
+ code: 57429,
2043
+ inkHeight: 956
2044
+ },
2045
+ joycon_right_diagonal_outline: {
2046
+ code: 57430,
2047
+ inkHeight: 985
2048
+ },
2049
+ joycon_right_horizontal: {
2050
+ code: 57431,
2051
+ inkHeight: 983
2052
+ },
2053
+ joycon_right_horizontal_outline: {
2054
+ code: 57432,
2055
+ inkHeight: 983
2056
+ },
2057
+ joycon_right_mouse: {
2058
+ code: 57433,
2059
+ inkHeight: 983
2060
+ },
2061
+ joycon_right_mouse_outline: {
2062
+ code: 57434,
2063
+ inkHeight: 983
2064
+ },
2065
+ joycon_right_outline: {
2066
+ code: 57435,
2067
+ inkHeight: 983
2068
+ },
2069
+ joycon_right_rotate: {
2070
+ code: 57436,
2071
+ inkHeight: 1004
2072
+ },
2073
+ joycon_right_rotate_outline: {
2074
+ code: 57437,
2075
+ inkHeight: 1004
2076
+ },
2077
+ joycon_right_vertical: {
2078
+ code: 57438,
2079
+ inkHeight: 983
2080
+ },
2081
+ joycon_right_vertical_outline: {
2082
+ code: 57439,
2083
+ inkHeight: 983
2084
+ },
2085
+ left: {
2086
+ code: 57440,
2087
+ inkHeight: 983
2088
+ },
2089
+ left_outline: {
2090
+ code: 57441,
2091
+ inkHeight: 983
2092
+ },
2093
+ right: {
2094
+ code: 57442,
2095
+ inkHeight: 983
2096
+ },
2097
+ right_outline: {
2098
+ code: 57443,
2099
+ inkHeight: 983
2100
+ },
2101
+ stick_l: {
2102
+ code: 57444,
2103
+ inkHeight: 983
2104
+ },
2105
+ stick_l_down: {
2106
+ code: 57445,
2107
+ inkHeight: 983
2108
+ },
2109
+ stick_l_horizontal: {
2110
+ code: 57446,
2111
+ inkHeight: 983
2112
+ },
2113
+ stick_l_left: {
2114
+ code: 57447,
2115
+ inkHeight: 983
2116
+ },
2117
+ stick_l_press: {
2118
+ code: 57448,
2119
+ inkHeight: 1065
2120
+ },
2121
+ stick_l_right: {
2122
+ code: 57449,
2123
+ inkHeight: 983
2124
+ },
2125
+ stick_l_up: {
2126
+ code: 57450,
2127
+ inkHeight: 1106
2128
+ },
2129
+ stick_l_vertical: {
2130
+ code: 57451,
2131
+ inkHeight: 1106
2132
+ },
2133
+ stick_r: {
2134
+ code: 57452,
2135
+ inkHeight: 983
2136
+ },
2137
+ stick_r_down: {
2138
+ code: 57453,
2139
+ inkHeight: 983
2140
+ },
2141
+ stick_r_horizontal: {
2142
+ code: 57454,
2143
+ inkHeight: 983
2144
+ },
2145
+ stick_r_left: {
2146
+ code: 57455,
2147
+ inkHeight: 983
2148
+ },
2149
+ stick_r_press: {
2150
+ code: 57456,
2151
+ inkHeight: 1065
2152
+ },
2153
+ stick_r_right: {
2154
+ code: 57457,
2155
+ inkHeight: 983
2156
+ },
2157
+ stick_r_up: {
2158
+ code: 57458,
2159
+ inkHeight: 1106
2160
+ },
2161
+ stick_r_vertical: {
2162
+ code: 57459,
2163
+ inkHeight: 1106
2164
+ },
2165
+ stick_side_l: {
2166
+ code: 57460,
2167
+ inkHeight: 983
2168
+ },
2169
+ stick_side_r: {
2170
+ code: 57461,
2171
+ inkHeight: 983
2172
+ },
2173
+ stick_top_l: {
2174
+ code: 57462,
2175
+ inkHeight: 983
2176
+ },
2177
+ stick_top_r: {
2178
+ code: 57463,
2179
+ inkHeight: 983
2180
+ },
2181
+ up: {
2182
+ code: 57464,
2183
+ inkHeight: 983
2184
+ },
2185
+ up_outline: {
2186
+ code: 57465,
2187
+ inkHeight: 983
2188
+ }
2189
+ };
2190
+ const FF_GLYPH_STEAM_CONTROLLER = {
2191
+ button_a: {
2192
+ code: 57378,
2193
+ inkHeight: 983
2194
+ },
2195
+ button_a_outline: {
2196
+ code: 57379,
2197
+ inkHeight: 983
2198
+ },
2199
+ button_b: {
2200
+ code: 57380,
2201
+ inkHeight: 983
2202
+ },
2203
+ button_b_outline: {
2204
+ code: 57381,
2205
+ inkHeight: 983
2206
+ },
2207
+ button_back_icon: {
2208
+ code: 57382,
2209
+ inkHeight: 655
2210
+ },
2211
+ button_back_icon_outline: {
2212
+ code: 57383,
2213
+ inkHeight: 655
2214
+ },
2215
+ button_color_a: {
2216
+ code: 57384,
2217
+ inkHeight: 983
2218
+ },
2219
+ button_color_a_outline: {
2220
+ code: 57385,
2221
+ inkHeight: 983
2222
+ },
2223
+ button_color_b: {
2224
+ code: 57386,
2225
+ inkHeight: 983
2226
+ },
2227
+ button_color_b_outline: {
2228
+ code: 57387,
2229
+ inkHeight: 983
2230
+ },
2231
+ button_color_x: {
2232
+ code: 57388,
2233
+ inkHeight: 983
2234
+ },
2235
+ button_color_x_outline: {
2236
+ code: 57389,
2237
+ inkHeight: 983
2238
+ },
2239
+ button_color_y: {
2240
+ code: 57390,
2241
+ inkHeight: 983
2242
+ },
2243
+ button_color_y_outline: {
2244
+ code: 57391,
2245
+ inkHeight: 983
2246
+ },
2247
+ button_lp: {
2248
+ code: 57392,
2249
+ inkHeight: 983
2250
+ },
2251
+ button_lp_outline: {
2252
+ code: 57393,
2253
+ inkHeight: 983
2254
+ },
2255
+ button_rp: {
2256
+ code: 57394,
2257
+ inkHeight: 983
2258
+ },
2259
+ button_rp_outline: {
2260
+ code: 57395,
2261
+ inkHeight: 983
2262
+ },
2263
+ button_start_icon: {
2264
+ code: 57396,
2265
+ inkHeight: 655
2266
+ },
2267
+ button_start_icon_outline: {
2268
+ code: 57397,
2269
+ inkHeight: 655
2270
+ },
2271
+ button_x: {
2272
+ code: 57398,
2273
+ inkHeight: 983
2274
+ },
2275
+ button_x_outline: {
2276
+ code: 57399,
2277
+ inkHeight: 983
2278
+ },
2279
+ button_y: {
2280
+ code: 57400,
2281
+ inkHeight: 983
2282
+ },
2283
+ button_y_outline: {
2284
+ code: 57401,
2285
+ inkHeight: 983
2286
+ },
2287
+ controller_button_l1: {
2288
+ code: 57344,
2289
+ inkHeight: 983
2290
+ },
2291
+ controller_button_l1_outline: {
2292
+ code: 57345,
2293
+ inkHeight: 983
2294
+ },
2295
+ controller_button_l2: {
2296
+ code: 57346,
2297
+ inkHeight: 984
2298
+ },
2299
+ controller_button_l2_outline: {
2300
+ code: 57347,
2301
+ inkHeight: 984
2302
+ },
2303
+ controller_button_l4: {
2304
+ code: 57348,
2305
+ inkHeight: 983
2306
+ },
2307
+ controller_button_l4_outline: {
2308
+ code: 57349,
2309
+ inkHeight: 983
2310
+ },
2311
+ controller_button_l5: {
2312
+ code: 57350,
2313
+ inkHeight: 983
2314
+ },
2315
+ controller_button_l5_outline: {
2316
+ code: 57351,
2317
+ inkHeight: 983
2318
+ },
2319
+ controller_button_options: {
2320
+ code: 57352,
2321
+ inkHeight: 410
2322
+ },
2323
+ controller_button_options_outline: {
2324
+ code: 57353,
2325
+ inkHeight: 410
2326
+ },
2327
+ controller_button_quickaccess: {
2328
+ code: 57354,
2329
+ inkHeight: 492
2330
+ },
2331
+ controller_button_quickaccess_outline: {
2332
+ code: 57355,
2333
+ inkHeight: 492
2334
+ },
2335
+ controller_button_r1: {
2336
+ code: 57356,
2337
+ inkHeight: 983
2338
+ },
2339
+ controller_button_r1_outline: {
2340
+ code: 57357,
2341
+ inkHeight: 983
2342
+ },
2343
+ controller_button_r2: {
2344
+ code: 57358,
2345
+ inkHeight: 984
2346
+ },
2347
+ controller_button_r2_outline: {
2348
+ code: 57359,
2349
+ inkHeight: 984
2350
+ },
2351
+ controller_button_r4: {
2352
+ code: 57360,
2353
+ inkHeight: 983
2354
+ },
2355
+ controller_button_r4_outline: {
2356
+ code: 57361,
2357
+ inkHeight: 983
2358
+ },
2359
+ controller_button_r5: {
2360
+ code: 57362,
2361
+ inkHeight: 983
2362
+ },
2363
+ controller_button_r5_outline: {
2364
+ code: 57363,
2365
+ inkHeight: 983
2366
+ },
2367
+ controller_button_view: {
2368
+ code: 57364,
2369
+ inkHeight: 410
2370
+ },
2371
+ controller_button_view_outline: {
2372
+ code: 57365,
2373
+ inkHeight: 410
2374
+ },
2375
+ controller_icon: {
2376
+ code: 57366,
2377
+ inkHeight: 983
2378
+ },
2379
+ controller_icon_outline: {
2380
+ code: 57367,
2381
+ inkHeight: 983
2382
+ },
2383
+ controller_lg: {
2384
+ code: 57368,
2385
+ inkHeight: 982
2386
+ },
2387
+ controller_lg_gradient: {
2388
+ code: 57369,
2389
+ inkHeight: 983
2390
+ },
2391
+ controller_lg_gradient_outline: {
2392
+ code: 57370,
2393
+ inkHeight: 982
2394
+ },
2395
+ controller_lg_outline: {
2396
+ code: 57371,
2397
+ inkHeight: 982
2398
+ },
2399
+ controller_rg: {
2400
+ code: 57372,
2401
+ inkHeight: 982
2402
+ },
2403
+ controller_rg_gradient: {
2404
+ code: 57373,
2405
+ inkHeight: 982
2406
+ },
2407
+ controller_rg_gradient_outline: {
2408
+ code: 57374,
2409
+ inkHeight: 982
2410
+ },
2411
+ controller_rg_outline: {
2412
+ code: 57375,
2413
+ inkHeight: 982
2414
+ },
2415
+ controller_steam: {
2416
+ code: 57376,
2417
+ inkHeight: 676
2418
+ },
2419
+ controller_steam_new: {
2420
+ code: 57377,
2421
+ inkHeight: 691
2422
+ },
2423
+ dpad: {
2424
+ code: 57402,
2425
+ inkHeight: 983
2426
+ },
2427
+ dpad_all: {
2428
+ code: 57403,
2429
+ inkHeight: 983
2430
+ },
2431
+ dpad_down: {
2432
+ code: 57404,
2433
+ inkHeight: 983
2434
+ },
2435
+ dpad_down_outline: {
2436
+ code: 57405,
2437
+ inkHeight: 983
2438
+ },
2439
+ dpad_horizontal: {
2440
+ code: 57406,
2441
+ inkHeight: 983
2442
+ },
2443
+ dpad_horizontal_outline: {
2444
+ code: 57407,
2445
+ inkHeight: 983
2446
+ },
2447
+ dpad_left: {
2448
+ code: 57408,
2449
+ inkHeight: 983
2450
+ },
2451
+ dpad_left_outline: {
2452
+ code: 57409,
2453
+ inkHeight: 983
2454
+ },
2455
+ dpad_none: {
2456
+ code: 57410,
2457
+ inkHeight: 983
2458
+ },
2459
+ dpad_right: {
2460
+ code: 57411,
2461
+ inkHeight: 983
2462
+ },
2463
+ dpad_right_outline: {
2464
+ code: 57412,
2465
+ inkHeight: 983
2466
+ },
2467
+ dpad_up: {
2468
+ code: 57413,
2469
+ inkHeight: 983
2470
+ },
2471
+ dpad_up_outline: {
2472
+ code: 57414,
2473
+ inkHeight: 983
2474
+ },
2475
+ dpad_vertical: {
2476
+ code: 57415,
2477
+ inkHeight: 983
2478
+ },
2479
+ dpad_vertical_outline: {
2480
+ code: 57416,
2481
+ inkHeight: 983
2482
+ },
2483
+ lb: {
2484
+ code: 57417,
2485
+ inkHeight: 771
2486
+ },
2487
+ lb_outline: {
2488
+ code: 57418,
2489
+ inkHeight: 771
2490
+ },
2491
+ lg: {
2492
+ code: 57419,
2493
+ inkHeight: 983
2494
+ },
2495
+ lg_outline: {
2496
+ code: 57420,
2497
+ inkHeight: 983
2498
+ },
2499
+ lt: {
2500
+ code: 57421,
2501
+ inkHeight: 982
2502
+ },
2503
+ lt_outline: {
2504
+ code: 57422,
2505
+ inkHeight: 982
2506
+ },
2507
+ pad: {
2508
+ code: 57423,
2509
+ inkHeight: 983
2510
+ },
2511
+ pad_center: {
2512
+ code: 57424,
2513
+ inkHeight: 983
2514
+ },
2515
+ pad_down: {
2516
+ code: 57425,
2517
+ inkHeight: 983
2518
+ },
2519
+ pad_left: {
2520
+ code: 57426,
2521
+ inkHeight: 983
2522
+ },
2523
+ pad_right: {
2524
+ code: 57427,
2525
+ inkHeight: 983
2526
+ },
2527
+ pad_up: {
2528
+ code: 57428,
2529
+ inkHeight: 983
2530
+ },
2531
+ rb: {
2532
+ code: 57429,
2533
+ inkHeight: 771
2534
+ },
2535
+ rb_outline: {
2536
+ code: 57430,
2537
+ inkHeight: 771
2538
+ },
2539
+ rg: {
2540
+ code: 57431,
2541
+ inkHeight: 982
2542
+ },
2543
+ rg_outline: {
2544
+ code: 57432,
2545
+ inkHeight: 982
2546
+ },
2547
+ rt: {
2548
+ code: 57433,
2549
+ inkHeight: 982
2550
+ },
2551
+ rt_outline: {
2552
+ code: 57434,
2553
+ inkHeight: 982
2554
+ },
2555
+ stick: {
2556
+ code: 57435,
2557
+ inkHeight: 983
2558
+ },
2559
+ stick_down: {
2560
+ code: 57436,
2561
+ inkHeight: 983
2562
+ },
2563
+ stick_horizontal: {
2564
+ code: 57437,
2565
+ inkHeight: 983
2566
+ },
2567
+ stick_l_press: {
2568
+ code: 57438,
2569
+ inkHeight: 1065
2570
+ },
2571
+ stick_left: {
2572
+ code: 57439,
2573
+ inkHeight: 983
2574
+ },
2575
+ stick_right: {
2576
+ code: 57440,
2577
+ inkHeight: 983
2578
+ },
2579
+ stick_side_l: {
2580
+ code: 57441,
2581
+ inkHeight: 983
2582
+ },
2583
+ stick_up: {
2584
+ code: 57442,
2585
+ inkHeight: 1106
2586
+ },
2587
+ stick_vertical: {
2588
+ code: 57443,
2589
+ inkHeight: 1106
2590
+ }
2591
+ };
2592
+ const FF_GLYPH_STEAM_DECK = {
2593
+ button_a: {
2594
+ code: 57345,
2595
+ inkHeight: 983
2596
+ },
2597
+ button_a_outline: {
2598
+ code: 57346,
2599
+ inkHeight: 983
2600
+ },
2601
+ button_b: {
2602
+ code: 57347,
2603
+ inkHeight: 983
2604
+ },
2605
+ button_b_outline: {
2606
+ code: 57348,
2607
+ inkHeight: 983
2608
+ },
2609
+ button_guide: {
2610
+ code: 57349,
2611
+ inkHeight: 492
2612
+ },
2613
+ button_guide_outline: {
2614
+ code: 57350,
2615
+ inkHeight: 492
2616
+ },
2617
+ button_l1: {
2618
+ code: 57351,
2619
+ inkHeight: 983
2620
+ },
2621
+ button_l1_outline: {
2622
+ code: 57352,
2623
+ inkHeight: 983
2624
+ },
2625
+ button_l2: {
2626
+ code: 57353,
2627
+ inkHeight: 983
2628
+ },
2629
+ button_l2_outline: {
2630
+ code: 57354,
2631
+ inkHeight: 983
2632
+ },
2633
+ button_l4: {
2634
+ code: 57355,
2635
+ inkHeight: 983
2636
+ },
2637
+ button_l4_outline: {
2638
+ code: 57356,
2639
+ inkHeight: 983
2640
+ },
2641
+ button_l5: {
2642
+ code: 57357,
2643
+ inkHeight: 983
2644
+ },
2645
+ button_l5_outline: {
2646
+ code: 57358,
2647
+ inkHeight: 983
2648
+ },
2649
+ button_options: {
2650
+ code: 57359,
2651
+ inkHeight: 410
2652
+ },
2653
+ button_options_outline: {
2654
+ code: 57360,
2655
+ inkHeight: 410
2656
+ },
2657
+ button_quickaccess: {
2658
+ code: 57361,
2659
+ inkHeight: 492
2660
+ },
2661
+ button_quickaccess_outline: {
2662
+ code: 57362,
2663
+ inkHeight: 492
2664
+ },
2665
+ button_r1: {
2666
+ code: 57363,
2667
+ inkHeight: 983
2668
+ },
2669
+ button_r1_outline: {
2670
+ code: 57364,
2671
+ inkHeight: 983
2672
+ },
2673
+ button_r2: {
2674
+ code: 57365,
2675
+ inkHeight: 983
2676
+ },
2677
+ button_r2_outline: {
2678
+ code: 57366,
2679
+ inkHeight: 983
2680
+ },
2681
+ button_r4: {
2682
+ code: 57367,
2683
+ inkHeight: 983
2684
+ },
2685
+ button_r4_outline: {
2686
+ code: 57368,
2687
+ inkHeight: 983
2688
+ },
2689
+ button_r5: {
2690
+ code: 57369,
2691
+ inkHeight: 983
2692
+ },
2693
+ button_r5_outline: {
2694
+ code: 57370,
2695
+ inkHeight: 983
2696
+ },
2697
+ button_view: {
2698
+ code: 57371,
2699
+ inkHeight: 410
2700
+ },
2701
+ button_view_outline: {
2702
+ code: 57372,
2703
+ inkHeight: 410
2704
+ },
2705
+ button_x: {
2706
+ code: 57373,
2707
+ inkHeight: 983
2708
+ },
2709
+ button_x_outline: {
2710
+ code: 57374,
2711
+ inkHeight: 983
2712
+ },
2713
+ button_y: {
2714
+ code: 57375,
2715
+ inkHeight: 983
2716
+ },
2717
+ button_y_outline: {
2718
+ code: 57376,
2719
+ inkHeight: 983
2720
+ },
2721
+ controller_steamdeck: {
2722
+ code: 57344,
2723
+ inkHeight: 492
2724
+ },
2725
+ dpad: {
2726
+ code: 57377,
2727
+ inkHeight: 983
2728
+ },
2729
+ dpad_all: {
2730
+ code: 57378,
2731
+ inkHeight: 983
2732
+ },
2733
+ dpad_down: {
2734
+ code: 57379,
2735
+ inkHeight: 983
2736
+ },
2737
+ dpad_down_outline: {
2738
+ code: 57380,
2739
+ inkHeight: 983
2740
+ },
2741
+ dpad_horizontal: {
2742
+ code: 57381,
2743
+ inkHeight: 983
2744
+ },
2745
+ dpad_horizontal_outline: {
2746
+ code: 57382,
2747
+ inkHeight: 983
2748
+ },
2749
+ dpad_left: {
2750
+ code: 57383,
2751
+ inkHeight: 983
2752
+ },
2753
+ dpad_left_outline: {
2754
+ code: 57384,
2755
+ inkHeight: 983
2756
+ },
2757
+ dpad_none: {
2758
+ code: 57385,
2759
+ inkHeight: 983
2760
+ },
2761
+ dpad_right: {
2762
+ code: 57386,
2763
+ inkHeight: 983
2764
+ },
2765
+ dpad_right_outline: {
2766
+ code: 57387,
2767
+ inkHeight: 983
2768
+ },
2769
+ dpad_up: {
2770
+ code: 57388,
2771
+ inkHeight: 983
2772
+ },
2773
+ dpad_up_outline: {
2774
+ code: 57389,
2775
+ inkHeight: 983
2776
+ },
2777
+ dpad_vertical: {
2778
+ code: 57390,
2779
+ inkHeight: 983
2780
+ },
2781
+ dpad_vertical_outline: {
2782
+ code: 57391,
2783
+ inkHeight: 983
2784
+ },
2785
+ stick_l: {
2786
+ code: 57392,
2787
+ inkHeight: 983
2788
+ },
2789
+ stick_l_down: {
2790
+ code: 57393,
2791
+ inkHeight: 983
2792
+ },
2793
+ stick_l_horizontal: {
2794
+ code: 57394,
2795
+ inkHeight: 983
2796
+ },
2797
+ stick_l_left: {
2798
+ code: 57395,
2799
+ inkHeight: 983
2800
+ },
2801
+ stick_l_press: {
2802
+ code: 57396,
2803
+ inkHeight: 1065
2804
+ },
2805
+ stick_l_right: {
2806
+ code: 57397,
2807
+ inkHeight: 983
2808
+ },
2809
+ stick_l_up: {
2810
+ code: 57398,
2811
+ inkHeight: 1106
2812
+ },
2813
+ stick_l_vertical: {
2814
+ code: 57399,
2815
+ inkHeight: 1106
2816
+ },
2817
+ stick_r: {
2818
+ code: 57400,
2819
+ inkHeight: 983
2820
+ },
2821
+ stick_r_down: {
2822
+ code: 57401,
2823
+ inkHeight: 983
2824
+ },
2825
+ stick_r_horizontal: {
2826
+ code: 57402,
2827
+ inkHeight: 983
2828
+ },
2829
+ stick_r_left: {
2830
+ code: 57403,
2831
+ inkHeight: 983
2832
+ },
2833
+ stick_r_press: {
2834
+ code: 57404,
2835
+ inkHeight: 1065
2836
+ },
2837
+ stick_r_right: {
2838
+ code: 57405,
2839
+ inkHeight: 983
2840
+ },
2841
+ stick_r_up: {
2842
+ code: 57406,
2843
+ inkHeight: 1106
2844
+ },
2845
+ stick_r_vertical: {
2846
+ code: 57407,
2847
+ inkHeight: 1106
2848
+ },
2849
+ stick_side_l: {
2850
+ code: 57408,
2851
+ inkHeight: 983
2852
+ },
2853
+ stick_side_r: {
2854
+ code: 57409,
2855
+ inkHeight: 983
2856
+ },
2857
+ stick_top_l: {
2858
+ code: 57410,
2859
+ inkHeight: 983
2860
+ },
2861
+ stick_top_r: {
2862
+ code: 57411,
2863
+ inkHeight: 983
2864
+ },
2865
+ trackpad: {
2866
+ code: 57412,
2867
+ inkHeight: 983
2868
+ },
2869
+ trackpad_all: {
2870
+ code: 57413,
2871
+ inkHeight: 1188
2872
+ },
2873
+ trackpad_all_outline: {
2874
+ code: 57414,
2875
+ inkHeight: 1188
2876
+ },
2877
+ trackpad_down: {
2878
+ code: 57415,
2879
+ inkHeight: 1085
2880
+ },
2881
+ trackpad_down_outline: {
2882
+ code: 57416,
2883
+ inkHeight: 1085
2884
+ },
2885
+ trackpad_horizontal: {
2886
+ code: 57417,
2887
+ inkHeight: 983
2888
+ },
2889
+ trackpad_horizontal_outline: {
2890
+ code: 57418,
2891
+ inkHeight: 983
2892
+ },
2893
+ trackpad_l: {
2894
+ code: 57419,
2895
+ inkHeight: 983
2896
+ },
2897
+ trackpad_l_all: {
2898
+ code: 57420,
2899
+ inkHeight: 1188
2900
+ },
2901
+ trackpad_l_all_outline: {
2902
+ code: 57421,
2903
+ inkHeight: 1188
2904
+ },
2905
+ trackpad_l_down: {
2906
+ code: 57422,
2907
+ inkHeight: 1085
2908
+ },
2909
+ trackpad_l_down_outline: {
2910
+ code: 57423,
2911
+ inkHeight: 1085
2912
+ },
2913
+ trackpad_l_horizontal: {
2914
+ code: 57424,
2915
+ inkHeight: 983
2916
+ },
2917
+ trackpad_l_horizontal_outline: {
2918
+ code: 57425,
2919
+ inkHeight: 983
2920
+ },
2921
+ trackpad_l_left: {
2922
+ code: 57426,
2923
+ inkHeight: 983
2924
+ },
2925
+ trackpad_l_left_outline: {
2926
+ code: 57427,
2927
+ inkHeight: 983
2928
+ },
2929
+ trackpad_l_outline: {
2930
+ code: 57428,
2931
+ inkHeight: 983
2932
+ },
2933
+ trackpad_l_right: {
2934
+ code: 57429,
2935
+ inkHeight: 983
2936
+ },
2937
+ trackpad_l_right_outline: {
2938
+ code: 57430,
2939
+ inkHeight: 983
2940
+ },
2941
+ trackpad_l_up: {
2942
+ code: 57431,
2943
+ inkHeight: 1085
2944
+ },
2945
+ trackpad_l_up_outline: {
2946
+ code: 57432,
2947
+ inkHeight: 1085
2948
+ },
2949
+ trackpad_l_vertical: {
2950
+ code: 57433,
2951
+ inkHeight: 1188
2952
+ },
2953
+ trackpad_l_vertical_outline: {
2954
+ code: 57434,
2955
+ inkHeight: 1188
2956
+ },
2957
+ trackpad_left: {
2958
+ code: 57435,
2959
+ inkHeight: 983
2960
+ },
2961
+ trackpad_left_outline: {
2962
+ code: 57436,
2963
+ inkHeight: 983
2964
+ },
2965
+ trackpad_outline: {
2966
+ code: 57437,
2967
+ inkHeight: 983
2968
+ },
2969
+ trackpad_r: {
2970
+ code: 57438,
2971
+ inkHeight: 983
2972
+ },
2973
+ trackpad_r_all: {
2974
+ code: 57439,
2975
+ inkHeight: 1188
2976
+ },
2977
+ trackpad_r_all_outline: {
2978
+ code: 57440,
2979
+ inkHeight: 1188
2980
+ },
2981
+ trackpad_r_down: {
2982
+ code: 57441,
2983
+ inkHeight: 1085
2984
+ },
2985
+ trackpad_r_down_outline: {
2986
+ code: 57442,
2987
+ inkHeight: 1085
2988
+ },
2989
+ trackpad_r_horizontal: {
2990
+ code: 57443,
2991
+ inkHeight: 983
2992
+ },
2993
+ trackpad_r_horizontal_outline: {
2994
+ code: 57444,
2995
+ inkHeight: 983
2996
+ },
2997
+ trackpad_r_left: {
2998
+ code: 57445,
2999
+ inkHeight: 983
3000
+ },
3001
+ trackpad_r_left_outline: {
3002
+ code: 57446,
3003
+ inkHeight: 983
3004
+ },
3005
+ trackpad_r_outline: {
3006
+ code: 57447,
3007
+ inkHeight: 983
3008
+ },
3009
+ trackpad_r_right: {
3010
+ code: 57448,
3011
+ inkHeight: 983
3012
+ },
3013
+ trackpad_r_right_outline: {
3014
+ code: 57449,
3015
+ inkHeight: 983
3016
+ },
3017
+ trackpad_r_up: {
3018
+ code: 57450,
3019
+ inkHeight: 1085
3020
+ },
3021
+ trackpad_r_up_outline: {
3022
+ code: 57451,
3023
+ inkHeight: 1085
3024
+ },
3025
+ trackpad_r_vertical: {
3026
+ code: 57452,
3027
+ inkHeight: 1188
3028
+ },
3029
+ trackpad_r_vertical_outline: {
3030
+ code: 57453,
3031
+ inkHeight: 1188
3032
+ },
3033
+ trackpad_right: {
3034
+ code: 57454,
3035
+ inkHeight: 983
3036
+ },
3037
+ trackpad_right_outline: {
3038
+ code: 57455,
3039
+ inkHeight: 983
3040
+ },
3041
+ trackpad_up: {
3042
+ code: 57456,
3043
+ inkHeight: 1085
3044
+ },
3045
+ trackpad_up_outline: {
3046
+ code: 57457,
3047
+ inkHeight: 1085
3048
+ },
3049
+ trackpad_vertical: {
3050
+ code: 57458,
3051
+ inkHeight: 1188
3052
+ },
3053
+ trackpad_vertical_outline: {
3054
+ code: 57459,
3055
+ inkHeight: 1188
3056
+ }
3057
+ };
3058
+ const UNITS_PER_EM = 2048;
3059
+ const CENTERING_OFFSET_EM = (1228 - UNITS_PER_EM / 2) / UNITS_PER_EM;
3060
+ const GLYPHS = {
3061
+ xbox: [
3062
+ FF_GLYPH_XBOX.button_a,
3063
+ FF_GLYPH_XBOX.button_b,
3064
+ FF_GLYPH_XBOX.button_x,
3065
+ FF_GLYPH_XBOX.button_y,
3066
+ FF_GLYPH_XBOX.lb,
3067
+ FF_GLYPH_XBOX.rb,
3068
+ FF_GLYPH_XBOX.lt,
3069
+ FF_GLYPH_XBOX.rt,
3070
+ FF_GLYPH_XBOX.button_view,
3071
+ FF_GLYPH_XBOX.button_menu,
3072
+ FF_GLYPH_XBOX.stick_l_press,
3073
+ FF_GLYPH_XBOX.stick_r_press,
3074
+ FF_GLYPH_XBOX.dpad_up_outline,
3075
+ FF_GLYPH_XBOX.dpad_down_outline,
3076
+ FF_GLYPH_XBOX.dpad_left_outline,
3077
+ FF_GLYPH_XBOX.dpad_right_outline
3078
+ ],
3079
+ playstation: [
3080
+ FF_GLYPH_PLAYSTATION.button_cross,
3081
+ FF_GLYPH_PLAYSTATION.button_circle,
3082
+ FF_GLYPH_PLAYSTATION.button_square,
3083
+ FF_GLYPH_PLAYSTATION.button_triangle,
3084
+ FF_GLYPH_PLAYSTATION.trigger_l1,
3085
+ FF_GLYPH_PLAYSTATION.trigger_r1,
3086
+ FF_GLYPH_PLAYSTATION.trigger_l2,
3087
+ FF_GLYPH_PLAYSTATION.trigger_r2,
3088
+ FF_GLYPH_PLAYSTATION.playstation5_button_create,
3089
+ FF_GLYPH_PLAYSTATION.playstation5_button_options,
3090
+ FF_GLYPH_PLAYSTATION.button_l3,
3091
+ FF_GLYPH_PLAYSTATION.button_r3,
3092
+ FF_GLYPH_PLAYSTATION.dpad_up_outline,
3093
+ FF_GLYPH_PLAYSTATION.dpad_down_outline,
3094
+ FF_GLYPH_PLAYSTATION.dpad_left_outline,
3095
+ FF_GLYPH_PLAYSTATION.dpad_right_outline
3096
+ ],
3097
+ switch: [
3098
+ FF_GLYPH_SWITCH.button_b,
3099
+ FF_GLYPH_SWITCH.button_a,
3100
+ FF_GLYPH_SWITCH.button_y,
3101
+ FF_GLYPH_SWITCH.button_x,
3102
+ FF_GLYPH_SWITCH.button_l,
3103
+ FF_GLYPH_SWITCH.button_r,
3104
+ FF_GLYPH_SWITCH.button_zl,
3105
+ FF_GLYPH_SWITCH.button_zr,
3106
+ FF_GLYPH_SWITCH.button_minus,
3107
+ FF_GLYPH_SWITCH.button_plus,
3108
+ FF_GLYPH_SWITCH.stick_l_press,
3109
+ FF_GLYPH_SWITCH.stick_r_press,
3110
+ FF_GLYPH_SWITCH.dpad_up_outline,
3111
+ FF_GLYPH_SWITCH.dpad_down_outline,
3112
+ FF_GLYPH_SWITCH.dpad_left_outline,
3113
+ FF_GLYPH_SWITCH.dpad_right_outline
3114
+ ],
3115
+ switch2: [
3116
+ FF_GLYPH_SWITCH2.button_b,
3117
+ FF_GLYPH_SWITCH2.button_a,
3118
+ FF_GLYPH_SWITCH2.button_y,
3119
+ FF_GLYPH_SWITCH2.button_x,
3120
+ FF_GLYPH_SWITCH2.button_l,
3121
+ FF_GLYPH_SWITCH2.button_r,
3122
+ FF_GLYPH_SWITCH2.button_zl,
3123
+ FF_GLYPH_SWITCH2.button_zr,
3124
+ FF_GLYPH_SWITCH2.button_minus,
3125
+ FF_GLYPH_SWITCH2.button_plus,
3126
+ FF_GLYPH_SWITCH2.stick_l_press,
3127
+ FF_GLYPH_SWITCH2.stick_r_press,
3128
+ FF_GLYPH_SWITCH2.dpad_up_outline,
3129
+ FF_GLYPH_SWITCH2.dpad_down_outline,
3130
+ FF_GLYPH_SWITCH2.dpad_left_outline,
3131
+ FF_GLYPH_SWITCH2.dpad_right_outline
3132
+ ],
3133
+ "steam-controller": [
3134
+ FF_GLYPH_STEAM_CONTROLLER.button_a,
3135
+ FF_GLYPH_STEAM_CONTROLLER.button_b,
3136
+ FF_GLYPH_STEAM_CONTROLLER.button_x,
3137
+ FF_GLYPH_STEAM_CONTROLLER.button_y,
3138
+ FF_GLYPH_STEAM_CONTROLLER.lb,
3139
+ FF_GLYPH_STEAM_CONTROLLER.rb,
3140
+ FF_GLYPH_STEAM_CONTROLLER.lt,
3141
+ FF_GLYPH_STEAM_CONTROLLER.rt,
3142
+ FF_GLYPH_STEAM_CONTROLLER.button_back_icon,
3143
+ FF_GLYPH_STEAM_CONTROLLER.button_start_icon,
3144
+ FF_GLYPH_STEAM_CONTROLLER.stick_l_press,
3145
+ FF_GLYPH_STEAM_CONTROLLER.pad,
3146
+ FF_GLYPH_STEAM_CONTROLLER.dpad_up_outline,
3147
+ FF_GLYPH_STEAM_CONTROLLER.dpad_down_outline,
3148
+ FF_GLYPH_STEAM_CONTROLLER.dpad_left_outline,
3149
+ FF_GLYPH_STEAM_CONTROLLER.dpad_right_outline
3150
+ ],
3151
+ "steam-deck": [
3152
+ FF_GLYPH_STEAM_DECK.button_a,
3153
+ FF_GLYPH_STEAM_DECK.button_b,
3154
+ FF_GLYPH_STEAM_DECK.button_x,
3155
+ FF_GLYPH_STEAM_DECK.button_y,
3156
+ FF_GLYPH_STEAM_DECK.button_l1,
3157
+ FF_GLYPH_STEAM_DECK.button_r1,
3158
+ FF_GLYPH_STEAM_DECK.button_l2,
3159
+ FF_GLYPH_STEAM_DECK.button_r2,
3160
+ FF_GLYPH_STEAM_DECK.button_view,
3161
+ FF_GLYPH_STEAM_DECK.button_options,
3162
+ FF_GLYPH_STEAM_DECK.stick_l_press,
3163
+ FF_GLYPH_STEAM_DECK.stick_r_press,
3164
+ FF_GLYPH_STEAM_DECK.dpad_up_outline,
3165
+ FF_GLYPH_STEAM_DECK.dpad_down_outline,
3166
+ FF_GLYPH_STEAM_DECK.dpad_left_outline,
3167
+ FF_GLYPH_STEAM_DECK.dpad_right_outline
3168
+ ]
3169
+ };
3170
+ const DPAD_ALL_GLYPHS = {
3171
+ xbox: FF_GLYPH_XBOX.dpad_all,
3172
+ playstation: FF_GLYPH_PLAYSTATION.dpad_all,
3173
+ switch: FF_GLYPH_SWITCH.dpad_all,
3174
+ switch2: FF_GLYPH_SWITCH2.dpad_all,
3175
+ "steam-controller": FF_GLYPH_STEAM_CONTROLLER.dpad_all,
3176
+ "steam-deck": FF_GLYPH_STEAM_DECK.dpad_all
3177
+ };
3178
+ function ffGlyph(family, button) {
3179
+ const glyph = button === 99 ? DPAD_ALL_GLYPHS[family] : GLYPHS[family][button];
3180
+ if (!glyph) return void 0;
3181
+ return {
3182
+ text: String.fromCodePoint(glyph.code),
3183
+ lineHeightEm: glyph.inkHeight / UNITS_PER_EM - CENTERING_OFFSET_EM
3184
+ };
3185
+ }
3186
+ function ffCreateGlyphElement(family, button) {
3187
+ const glyph = ffGlyph(family, button);
3188
+ if (!glyph) return void 0;
3189
+ const element = document.createElement("span");
3190
+ element.className = `ff-glyph ff-glyph-${family}`;
3191
+ element.style.lineHeight = `${glyph.lineHeightEm}em`;
3192
+ element.textContent = glyph.text;
3193
+ element.setAttribute("aria-hidden", "true");
3194
+ return element;
3195
+ }
3196
+ const MODIFIER_KEYS = {
3197
+ control: (event) => event.ctrlKey,
3198
+ alt: (event) => event.altKey,
3199
+ shift: (event) => event.shiftKey,
3200
+ meta: (event) => event.metaKey
3201
+ };
3202
+ function ffHotkeyMatches(event, key) {
3203
+ const segments = key.toLowerCase().split(".");
3204
+ const targetKey = segments.pop() ?? "";
3205
+ if (!(targetKey === "space" ? event.key === " " : event.key.toLowerCase() === targetKey)) return false;
3206
+ return segments.every((modifier) => MODIFIER_KEYS[modifier]?.(event) ?? false);
3207
+ }
3208
+ const modalStack = signal([], ...ngDevMode ? [{ debugName: "modalStack" }] : /* istanbul ignore next */ []);
3209
+ function ffModalOpen(id) {
3210
+ modalStack.update((stack) => stack.includes(id) ? stack : [...stack, id]);
3211
+ }
3212
+ function ffModalClose(id) {
3213
+ modalStack.update((stack) => stack.filter((openId) => openId !== id));
3214
+ }
3215
+ function ffModalCloseTop() {
3216
+ modalStack.update((stack) => stack.slice(0, -1));
3217
+ }
3218
+ function ffModalCloseAll() {
3219
+ modalStack.set([]);
3220
+ }
3221
+ function ffModalIsOpen(id) {
3222
+ return modalStack().includes(id);
3223
+ }
3224
+ function ffModalIsTopmost(id) {
3225
+ const stack = modalStack();
3226
+ return stack.length > 0 && stack[stack.length - 1] === id;
3227
+ }
3228
+ function ffModalHasAnyOpen() {
3229
+ return modalStack().length > 0;
3230
+ }
3231
+ function inSwal(event) {
3232
+ return !!event.target?.closest?.(".swal2-container");
3233
+ }
3234
+ function ffHotkeysBlockOutside(host) {
3235
+ const onKeydown = (event) => {
3236
+ if (event.key === "Escape" || ffModalHasAnyOpen() || inSwal(event)) return;
3237
+ event.stopImmediatePropagation();
3238
+ const isShortcut = event.ctrlKey || event.metaKey;
3239
+ if (event.key === "Tab" || isShortcut || host.contains(event.target)) return;
3240
+ event.preventDefault();
3241
+ };
3242
+ window.addEventListener("keydown", onKeydown, { capture: true });
3243
+ return () => window.removeEventListener("keydown", onKeydown, { capture: true });
3244
+ }
3245
+ const DIRECTION_AXES = {
3246
+ up: {
3247
+ axis: "y",
3248
+ sign: -1
3249
+ },
3250
+ down: {
3251
+ axis: "y",
3252
+ sign: 1
3253
+ },
3254
+ left: {
3255
+ axis: "x",
3256
+ sign: -1
3257
+ },
3258
+ right: {
3259
+ axis: "x",
3260
+ sign: 1
3261
+ }
3262
+ };
3263
+ const CROSS_AXIS_WEIGHT = 2;
3264
+ const CROSS_CENTER_WEIGHT = .1;
3265
+ const EDGE_TOLERANCE = 2;
3266
+ function ffSpan(rect, axis) {
3267
+ return axis === "x" ? [rect.left, rect.right] : [rect.top, rect.bottom];
3268
+ }
3269
+ function ffSpanGap([aStart, aEnd], [bStart, bEnd]) {
3270
+ return Math.max(0, bStart - aEnd, aStart - bEnd);
3271
+ }
3272
+ function ffSpanCenter([start, end]) {
3273
+ return (start + end) / 2;
3274
+ }
3275
+ function ffDirectionalScore(from, to, direction) {
3276
+ const { axis, sign } = DIRECTION_AXES[direction];
3277
+ const cross = axis === "x" ? "y" : "x";
3278
+ const [fromStart, fromEnd] = ffSpan(from, axis);
3279
+ const [toStart, toEnd] = ffSpan(to, axis);
3280
+ if (!(sign > 0 ? toStart >= fromEnd - EDGE_TOLERANCE : toEnd <= fromStart + EDGE_TOLERANCE)) return void 0;
3281
+ const distance = Math.max(0, sign > 0 ? toStart - fromEnd : fromStart - toEnd);
3282
+ const drift = ffSpanGap(ffSpan(from, cross), ffSpan(to, cross));
3283
+ const centerDrift = Math.abs(ffSpanCenter(ffSpan(to, cross)) - ffSpanCenter(ffSpan(from, cross)));
3284
+ return distance + drift * CROSS_AXIS_WEIGHT + centerDrift * CROSS_CENTER_WEIGHT;
3285
+ }
3286
+ function ffNearestInDirection(from, candidates, direction) {
3287
+ return candidates.reduce((best, candidate, index) => {
3288
+ const score = ffDirectionalScore(from, candidate, direction);
3289
+ return score !== void 0 && score < best.score ? {
3290
+ index,
3291
+ score
3292
+ } : best;
3293
+ }, {
3294
+ index: -1,
3295
+ score: Infinity
3296
+ }).index;
3297
+ }
3298
+ function ffCenterDistance(a, b) {
3299
+ const dx = (a.left + a.right - b.left - b.right) / 2;
3300
+ const dy = (a.top + a.bottom - b.top - b.bottom) / 2;
3301
+ return Math.hypot(dx, dy);
3302
+ }
3303
+ function ffNearestTo(from, candidates) {
3304
+ return candidates.reduce((best, candidate, index) => {
3305
+ const distance = ffCenterDistance(from, candidate);
3306
+ return distance < best.distance ? {
3307
+ index,
3308
+ distance
3309
+ } : best;
3310
+ }, {
3311
+ index: -1,
3312
+ distance: Infinity
3313
+ }).index;
3314
+ }
3315
+ const targets = /* @__PURE__ */ new Map();
3316
+ const registryVersion = signal(0, ...ngDevMode ? [{ debugName: "registryVersion" }] : /* istanbul ignore next */ []);
3317
+ function ffSpotlightTargetRegister(key, elementRef) {
3318
+ targets.set(key, elementRef);
3319
+ registryVersion.update((v) => v + 1);
3320
+ }
3321
+ function ffSpotlightTargetUnregister(key) {
3322
+ targets.delete(key);
3323
+ registryVersion.update((v) => v + 1);
3324
+ }
3325
+ function ffSpotlightTargetHas(key) {
3326
+ registryVersion();
3327
+ return targets.has(key);
3328
+ }
3329
+ function ffSpotlightTargetRect(key) {
3330
+ registryVersion();
3331
+ return targets.get(key)?.nativeElement?.getBoundingClientRect();
3332
+ }
3333
+ export { FF_DIRECTIONS, FF_DPAD_ALL_BUTTON, FF_GAMEPAD_PRIORITY, FF_GLYPH_PLAYSTATION, FF_GLYPH_STEAM_CONTROLLER, FF_GLYPH_STEAM_DECK, FF_GLYPH_SWITCH, FF_GLYPH_SWITCH2, FF_GLYPH_XBOX, FF_I18N_DEFAULTS, FF_PLACEHOLDER_PATTERN, FF_STANDARD_BUTTON, ffActionCandidates, ffActionDispatch, ffActionForButton, ffActionMap, ffActivePrompts, ffAxesActive, ffButtonsJustPressed, ffButtonsJustReleased, ffControllerFamily, ffCreateGlyphElement, ffCssColorCacheClear, ffCssColorVar, ffCycleStep, ffFillPlaceholders, ffGamepadMayTakeInput, ffGamepadSnapshot, ffGlyph, ffGroupSelectOptions, ffHeldDirection, ffHotkeyMatches, ffHotkeysBlockOutside, ffIsPageVisible, ffModalClose, ffModalCloseAll, ffModalCloseTop, ffModalHasAnyOpen, ffModalIsOpen, ffModalIsTopmost, ffModalOpen, ffNearestControlLabel, ffNearestInDirection, ffNearestTo, ffReducedMotionSignal, ffRepeatFires, ffSelectSearchMatches, ffSelectSearchTextDefault, ffSelectTitleFromPlaceholder, ffSpotlightCalloutPosition, ffSpotlightTargetHas, ffSpotlightTargetRect, ffSpotlightTargetRegister, ffSpotlightTargetUnregister, ffSpriteFrameDefault, ffStepNumber, ffStickDirection, ffStickVector, ffTitleCase, ffTranslateDefault };
3334
+
3335
+ //# sourceMappingURL=felfhenor-ui-core.mjs.map