wex-ui-lib 1.0.2 → 1.0.4

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.
Files changed (65) hide show
  1. package/dist/index.cjs.js +2296 -0
  2. package/dist/index.cjs.js.map +1 -0
  3. package/dist/index.d.ts +4 -5
  4. package/dist/index.esm.js +2273 -0
  5. package/dist/index.esm.js.map +1 -0
  6. package/dist/types/components/Button/index.d.ts +3 -0
  7. package/dist/types/components/Hero/index.d.ts +3 -0
  8. package/dist/types/components/Navbar/index.d.ts +3 -0
  9. package/dist/types/components/Showcase/index.d.ts +3 -0
  10. package/{src/index.ts → dist/types/index.d.ts} +1 -2
  11. package/dist/types/samples/Holik/Homepage.d.ts +2 -0
  12. package/dist/{shared → types/shared}/components/Fade.d.ts +1 -1
  13. package/dist/{shared → types/shared}/components/Icon.d.ts +2 -1
  14. package/package.json +28 -19
  15. package/.storybook/main.ts +0 -19
  16. package/.storybook/manager-head.html +0 -1
  17. package/.storybook/preview.ts +0 -15
  18. package/dist/components/Button/index.d.ts +0 -2
  19. package/dist/components/Hero/index.d.ts +0 -2
  20. package/dist/components/Navbar/index.d.ts +0 -2
  21. package/dist/components/Showcase/index.d.ts +0 -2
  22. package/dist/index.js +0 -11
  23. package/dist/index.js.map +0 -1
  24. package/dist/index.mjs +0 -11
  25. package/dist/index.mjs.map +0 -1
  26. package/dist/samples/Holik/Homepage.d.ts +0 -1
  27. package/public/logo.png +0 -0
  28. package/rollup.config.mjs +0 -42
  29. package/src/components/Button/index.stories.tsx +0 -54
  30. package/src/components/Button/index.tsx +0 -157
  31. package/src/components/Button/index.types.ts +0 -11
  32. package/src/components/Hero/index.stories.tsx +0 -40
  33. package/src/components/Hero/index.tsx +0 -76
  34. package/src/components/Hero/index.types.ts +0 -13
  35. package/src/components/Navbar/index.stories.tsx +0 -59
  36. package/src/components/Navbar/index.tsx +0 -196
  37. package/src/components/Navbar/index.types.ts +0 -27
  38. package/src/components/Showcase/index.stories.tsx +0 -54
  39. package/src/components/Showcase/index.tsx +0 -66
  40. package/src/components/Showcase/index.types.ts +0 -9
  41. package/src/samples/Holik/Homepage.tsx +0 -141
  42. package/src/samples/Holik/index.stories.tsx +0 -17
  43. package/src/shared/components/Fade.tsx +0 -48
  44. package/src/shared/components/Icon.tsx +0 -81
  45. package/src/shared/styles/animations.ts +0 -80
  46. package/src/shared/styles/global.css +0 -6
  47. package/src/shared/styles/theme.ts +0 -7
  48. package/src/shared/types.ts +0 -18
  49. package/src/shared/utils/formatters.ts +0 -12
  50. package/src/shared/utils/useIntObs.ts +0 -112
  51. package/tsconfig.json +0 -25
  52. /package/dist/{components → types/components}/Button/index.stories.d.ts +0 -0
  53. /package/dist/{components → types/components}/Button/index.types.d.ts +0 -0
  54. /package/dist/{components → types/components}/Hero/index.stories.d.ts +0 -0
  55. /package/dist/{components → types/components}/Hero/index.types.d.ts +0 -0
  56. /package/dist/{components → types/components}/Navbar/index.stories.d.ts +0 -0
  57. /package/dist/{components → types/components}/Navbar/index.types.d.ts +0 -0
  58. /package/dist/{components → types/components}/Showcase/index.stories.d.ts +0 -0
  59. /package/dist/{components → types/components}/Showcase/index.types.d.ts +0 -0
  60. /package/dist/{samples → types/samples}/Holik/index.stories.d.ts +0 -0
  61. /package/dist/{shared → types/shared}/styles/animations.d.ts +0 -0
  62. /package/dist/{shared → types/shared}/styles/theme.d.ts +0 -0
  63. /package/dist/{shared → types/shared}/types.d.ts +0 -0
  64. /package/dist/{shared → types/shared}/utils/formatters.d.ts +0 -0
  65. /package/dist/{shared → types/shared}/utils/useIntObs.d.ts +0 -0
@@ -0,0 +1,2296 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+
5
+ function _interopNamespaceDefault(e) {
6
+ var n = Object.create(null);
7
+ if (e) {
8
+ Object.keys(e).forEach(function (k) {
9
+ if (k !== 'default') {
10
+ var d = Object.getOwnPropertyDescriptor(e, k);
11
+ Object.defineProperty(n, k, d.get ? d : {
12
+ enumerable: true,
13
+ get: function () { return e[k]; }
14
+ });
15
+ }
16
+ });
17
+ }
18
+ n.default = e;
19
+ return Object.freeze(n);
20
+ }
21
+
22
+ var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
23
+
24
+ /******************************************************************************
25
+ Copyright (c) Microsoft Corporation.
26
+
27
+ Permission to use, copy, modify, and/or distribute this software for any
28
+ purpose with or without fee is hereby granted.
29
+
30
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
31
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
32
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
33
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
34
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
35
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
36
+ PERFORMANCE OF THIS SOFTWARE.
37
+ ***************************************************************************** */
38
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
39
+
40
+
41
+ function __makeTemplateObject(cooked, raw) {
42
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
43
+ return cooked;
44
+ }
45
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
46
+ var e = new Error(message);
47
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
48
+ };
49
+
50
+ function _extends() {
51
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
52
+ for (var e = 1; e < arguments.length; e++) {
53
+ var t = arguments[e];
54
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
55
+ }
56
+ return n;
57
+ }, _extends.apply(null, arguments);
58
+ }
59
+
60
+ /*
61
+
62
+ Based off glamor's StyleSheet, thanks Sunil ❤️
63
+
64
+ high performance StyleSheet for css-in-js systems
65
+
66
+ - uses multiple style tags behind the scenes for millions of rules
67
+ - uses `insertRule` for appending in production for *much* faster performance
68
+
69
+ // usage
70
+
71
+ import { StyleSheet } from '@emotion/sheet'
72
+
73
+ let styleSheet = new StyleSheet({ key: '', container: document.head })
74
+
75
+ styleSheet.insert('#box { border: 1px solid red; }')
76
+ - appends a css rule into the stylesheet
77
+
78
+ styleSheet.flush()
79
+ - empties the stylesheet of all its contents
80
+
81
+ */
82
+
83
+ function sheetForTag(tag) {
84
+ if (tag.sheet) {
85
+ return tag.sheet;
86
+ } // this weirdness brought to you by firefox
87
+
88
+ /* istanbul ignore next */
89
+
90
+
91
+ for (var i = 0; i < document.styleSheets.length; i++) {
92
+ if (document.styleSheets[i].ownerNode === tag) {
93
+ return document.styleSheets[i];
94
+ }
95
+ } // this function should always return with a value
96
+ // TS can't understand it though so we make it stop complaining here
97
+
98
+
99
+ return undefined;
100
+ }
101
+
102
+ function createStyleElement(options) {
103
+ var tag = document.createElement('style');
104
+ tag.setAttribute('data-emotion', options.key);
105
+
106
+ if (options.nonce !== undefined) {
107
+ tag.setAttribute('nonce', options.nonce);
108
+ }
109
+
110
+ tag.appendChild(document.createTextNode(''));
111
+ tag.setAttribute('data-s', '');
112
+ return tag;
113
+ }
114
+
115
+ var StyleSheet = /*#__PURE__*/function () {
116
+ // Using Node instead of HTMLElement since container may be a ShadowRoot
117
+ function StyleSheet(options) {
118
+ var _this = this;
119
+
120
+ this._insertTag = function (tag) {
121
+ var before;
122
+
123
+ if (_this.tags.length === 0) {
124
+ if (_this.insertionPoint) {
125
+ before = _this.insertionPoint.nextSibling;
126
+ } else if (_this.prepend) {
127
+ before = _this.container.firstChild;
128
+ } else {
129
+ before = _this.before;
130
+ }
131
+ } else {
132
+ before = _this.tags[_this.tags.length - 1].nextSibling;
133
+ }
134
+
135
+ _this.container.insertBefore(tag, before);
136
+
137
+ _this.tags.push(tag);
138
+ };
139
+
140
+ this.isSpeedy = options.speedy === undefined ? true : options.speedy;
141
+ this.tags = [];
142
+ this.ctr = 0;
143
+ this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets
144
+
145
+ this.key = options.key;
146
+ this.container = options.container;
147
+ this.prepend = options.prepend;
148
+ this.insertionPoint = options.insertionPoint;
149
+ this.before = null;
150
+ }
151
+
152
+ var _proto = StyleSheet.prototype;
153
+
154
+ _proto.hydrate = function hydrate(nodes) {
155
+ nodes.forEach(this._insertTag);
156
+ };
157
+
158
+ _proto.insert = function insert(rule) {
159
+ // the max length is how many rules we have per style tag, it's 65000 in speedy mode
160
+ // it's 1 in dev because we insert source maps that map a single rule to a location
161
+ // and you can only have one source map per style tag
162
+ if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {
163
+ this._insertTag(createStyleElement(this));
164
+ }
165
+
166
+ var tag = this.tags[this.tags.length - 1];
167
+
168
+ if (this.isSpeedy) {
169
+ var sheet = sheetForTag(tag);
170
+
171
+ try {
172
+ // this is the ultrafast version, works across browsers
173
+ // the big drawback is that the css won't be editable in devtools
174
+ sheet.insertRule(rule, sheet.cssRules.length);
175
+ } catch (e) {
176
+ }
177
+ } else {
178
+ tag.appendChild(document.createTextNode(rule));
179
+ }
180
+
181
+ this.ctr++;
182
+ };
183
+
184
+ _proto.flush = function flush() {
185
+ this.tags.forEach(function (tag) {
186
+ var _tag$parentNode;
187
+
188
+ return (_tag$parentNode = tag.parentNode) == null ? undefined : _tag$parentNode.removeChild(tag);
189
+ });
190
+ this.tags = [];
191
+ this.ctr = 0;
192
+ };
193
+
194
+ return StyleSheet;
195
+ }();
196
+
197
+ var MS = '-ms-';
198
+ var MOZ = '-moz-';
199
+ var WEBKIT = '-webkit-';
200
+
201
+ var COMMENT = 'comm';
202
+ var RULESET = 'rule';
203
+ var DECLARATION = 'decl';
204
+ var IMPORT = '@import';
205
+ var KEYFRAMES = '@keyframes';
206
+ var LAYER = '@layer';
207
+
208
+ /**
209
+ * @param {number}
210
+ * @return {number}
211
+ */
212
+ var abs = Math.abs;
213
+
214
+ /**
215
+ * @param {number}
216
+ * @return {string}
217
+ */
218
+ var from = String.fromCharCode;
219
+
220
+ /**
221
+ * @param {object}
222
+ * @return {object}
223
+ */
224
+ var assign = Object.assign;
225
+
226
+ /**
227
+ * @param {string} value
228
+ * @param {number} length
229
+ * @return {number}
230
+ */
231
+ function hash (value, length) {
232
+ return charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0
233
+ }
234
+
235
+ /**
236
+ * @param {string} value
237
+ * @return {string}
238
+ */
239
+ function trim (value) {
240
+ return value.trim()
241
+ }
242
+
243
+ /**
244
+ * @param {string} value
245
+ * @param {RegExp} pattern
246
+ * @return {string?}
247
+ */
248
+ function match (value, pattern) {
249
+ return (value = pattern.exec(value)) ? value[0] : value
250
+ }
251
+
252
+ /**
253
+ * @param {string} value
254
+ * @param {(string|RegExp)} pattern
255
+ * @param {string} replacement
256
+ * @return {string}
257
+ */
258
+ function replace (value, pattern, replacement) {
259
+ return value.replace(pattern, replacement)
260
+ }
261
+
262
+ /**
263
+ * @param {string} value
264
+ * @param {string} search
265
+ * @return {number}
266
+ */
267
+ function indexof (value, search) {
268
+ return value.indexOf(search)
269
+ }
270
+
271
+ /**
272
+ * @param {string} value
273
+ * @param {number} index
274
+ * @return {number}
275
+ */
276
+ function charat (value, index) {
277
+ return value.charCodeAt(index) | 0
278
+ }
279
+
280
+ /**
281
+ * @param {string} value
282
+ * @param {number} begin
283
+ * @param {number} end
284
+ * @return {string}
285
+ */
286
+ function substr (value, begin, end) {
287
+ return value.slice(begin, end)
288
+ }
289
+
290
+ /**
291
+ * @param {string} value
292
+ * @return {number}
293
+ */
294
+ function strlen (value) {
295
+ return value.length
296
+ }
297
+
298
+ /**
299
+ * @param {any[]} value
300
+ * @return {number}
301
+ */
302
+ function sizeof (value) {
303
+ return value.length
304
+ }
305
+
306
+ /**
307
+ * @param {any} value
308
+ * @param {any[]} array
309
+ * @return {any}
310
+ */
311
+ function append (value, array) {
312
+ return array.push(value), value
313
+ }
314
+
315
+ /**
316
+ * @param {string[]} array
317
+ * @param {function} callback
318
+ * @return {string}
319
+ */
320
+ function combine (array, callback) {
321
+ return array.map(callback).join('')
322
+ }
323
+
324
+ var line = 1;
325
+ var column = 1;
326
+ var length = 0;
327
+ var position = 0;
328
+ var character = 0;
329
+ var characters = '';
330
+
331
+ /**
332
+ * @param {string} value
333
+ * @param {object | null} root
334
+ * @param {object | null} parent
335
+ * @param {string} type
336
+ * @param {string[] | string} props
337
+ * @param {object[] | string} children
338
+ * @param {number} length
339
+ */
340
+ function node (value, root, parent, type, props, children, length) {
341
+ return {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}
342
+ }
343
+
344
+ /**
345
+ * @param {object} root
346
+ * @param {object} props
347
+ * @return {object}
348
+ */
349
+ function copy (root, props) {
350
+ return assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)
351
+ }
352
+
353
+ /**
354
+ * @return {number}
355
+ */
356
+ function char () {
357
+ return character
358
+ }
359
+
360
+ /**
361
+ * @return {number}
362
+ */
363
+ function prev () {
364
+ character = position > 0 ? charat(characters, --position) : 0;
365
+
366
+ if (column--, character === 10)
367
+ column = 1, line--;
368
+
369
+ return character
370
+ }
371
+
372
+ /**
373
+ * @return {number}
374
+ */
375
+ function next () {
376
+ character = position < length ? charat(characters, position++) : 0;
377
+
378
+ if (column++, character === 10)
379
+ column = 1, line++;
380
+
381
+ return character
382
+ }
383
+
384
+ /**
385
+ * @return {number}
386
+ */
387
+ function peek () {
388
+ return charat(characters, position)
389
+ }
390
+
391
+ /**
392
+ * @return {number}
393
+ */
394
+ function caret () {
395
+ return position
396
+ }
397
+
398
+ /**
399
+ * @param {number} begin
400
+ * @param {number} end
401
+ * @return {string}
402
+ */
403
+ function slice (begin, end) {
404
+ return substr(characters, begin, end)
405
+ }
406
+
407
+ /**
408
+ * @param {number} type
409
+ * @return {number}
410
+ */
411
+ function token (type) {
412
+ switch (type) {
413
+ // \0 \t \n \r \s whitespace token
414
+ case 0: case 9: case 10: case 13: case 32:
415
+ return 5
416
+ // ! + , / > @ ~ isolate token
417
+ case 33: case 43: case 44: case 47: case 62: case 64: case 126:
418
+ // ; { } breakpoint token
419
+ case 59: case 123: case 125:
420
+ return 4
421
+ // : accompanied token
422
+ case 58:
423
+ return 3
424
+ // " ' ( [ opening delimit token
425
+ case 34: case 39: case 40: case 91:
426
+ return 2
427
+ // ) ] closing delimit token
428
+ case 41: case 93:
429
+ return 1
430
+ }
431
+
432
+ return 0
433
+ }
434
+
435
+ /**
436
+ * @param {string} value
437
+ * @return {any[]}
438
+ */
439
+ function alloc (value) {
440
+ return line = column = 1, length = strlen(characters = value), position = 0, []
441
+ }
442
+
443
+ /**
444
+ * @param {any} value
445
+ * @return {any}
446
+ */
447
+ function dealloc (value) {
448
+ return characters = '', value
449
+ }
450
+
451
+ /**
452
+ * @param {number} type
453
+ * @return {string}
454
+ */
455
+ function delimit (type) {
456
+ return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))
457
+ }
458
+
459
+ /**
460
+ * @param {number} type
461
+ * @return {string}
462
+ */
463
+ function whitespace (type) {
464
+ while (character = peek())
465
+ if (character < 33)
466
+ next();
467
+ else
468
+ break
469
+
470
+ return token(type) > 2 || token(character) > 3 ? '' : ' '
471
+ }
472
+
473
+ /**
474
+ * @param {number} index
475
+ * @param {number} count
476
+ * @return {string}
477
+ */
478
+ function escaping (index, count) {
479
+ while (--count && next())
480
+ // not 0-9 A-F a-f
481
+ if (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))
482
+ break
483
+
484
+ return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))
485
+ }
486
+
487
+ /**
488
+ * @param {number} type
489
+ * @return {number}
490
+ */
491
+ function delimiter (type) {
492
+ while (next())
493
+ switch (character) {
494
+ // ] ) " '
495
+ case type:
496
+ return position
497
+ // " '
498
+ case 34: case 39:
499
+ if (type !== 34 && type !== 39)
500
+ delimiter(character);
501
+ break
502
+ // (
503
+ case 40:
504
+ if (type === 41)
505
+ delimiter(type);
506
+ break
507
+ // \
508
+ case 92:
509
+ next();
510
+ break
511
+ }
512
+
513
+ return position
514
+ }
515
+
516
+ /**
517
+ * @param {number} type
518
+ * @param {number} index
519
+ * @return {number}
520
+ */
521
+ function commenter (type, index) {
522
+ while (next())
523
+ // //
524
+ if (type + character === 47 + 10)
525
+ break
526
+ // /*
527
+ else if (type + character === 42 + 42 && peek() === 47)
528
+ break
529
+
530
+ return '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())
531
+ }
532
+
533
+ /**
534
+ * @param {number} index
535
+ * @return {string}
536
+ */
537
+ function identifier (index) {
538
+ while (!token(peek()))
539
+ next();
540
+
541
+ return slice(index, position)
542
+ }
543
+
544
+ /**
545
+ * @param {string} value
546
+ * @return {object[]}
547
+ */
548
+ function compile (value) {
549
+ return dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))
550
+ }
551
+
552
+ /**
553
+ * @param {string} value
554
+ * @param {object} root
555
+ * @param {object?} parent
556
+ * @param {string[]} rule
557
+ * @param {string[]} rules
558
+ * @param {string[]} rulesets
559
+ * @param {number[]} pseudo
560
+ * @param {number[]} points
561
+ * @param {string[]} declarations
562
+ * @return {object}
563
+ */
564
+ function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
565
+ var index = 0;
566
+ var offset = 0;
567
+ var length = pseudo;
568
+ var atrule = 0;
569
+ var property = 0;
570
+ var previous = 0;
571
+ var variable = 1;
572
+ var scanning = 1;
573
+ var ampersand = 1;
574
+ var character = 0;
575
+ var type = '';
576
+ var props = rules;
577
+ var children = rulesets;
578
+ var reference = rule;
579
+ var characters = type;
580
+
581
+ while (scanning)
582
+ switch (previous = character, character = next()) {
583
+ // (
584
+ case 40:
585
+ if (previous != 108 && charat(characters, length - 1) == 58) {
586
+ if (indexof(characters += replace(delimit(character), '&', '&\f'), '&\f') != -1)
587
+ ampersand = -1;
588
+ break
589
+ }
590
+ // " ' [
591
+ case 34: case 39: case 91:
592
+ characters += delimit(character);
593
+ break
594
+ // \t \n \r \s
595
+ case 9: case 10: case 13: case 32:
596
+ characters += whitespace(previous);
597
+ break
598
+ // \
599
+ case 92:
600
+ characters += escaping(caret() - 1, 7);
601
+ continue
602
+ // /
603
+ case 47:
604
+ switch (peek()) {
605
+ case 42: case 47:
606
+ append(comment(commenter(next(), caret()), root, parent), declarations);
607
+ break
608
+ default:
609
+ characters += '/';
610
+ }
611
+ break
612
+ // {
613
+ case 123 * variable:
614
+ points[index++] = strlen(characters) * ampersand;
615
+ // } ; \0
616
+ case 125 * variable: case 59: case 0:
617
+ switch (character) {
618
+ // \0 }
619
+ case 0: case 125: scanning = 0;
620
+ // ;
621
+ case 59 + offset: if (ampersand == -1) characters = replace(characters, /\f/g, '');
622
+ if (property > 0 && (strlen(characters) - length))
623
+ append(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations);
624
+ break
625
+ // @ ;
626
+ case 59: characters += ';';
627
+ // { rule/at-rule
628
+ default:
629
+ append(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets);
630
+
631
+ if (character === 123)
632
+ if (offset === 0)
633
+ parse(characters, root, reference, reference, props, rulesets, length, points, children);
634
+ else
635
+ switch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {
636
+ // d l m s
637
+ case 100: case 108: case 109: case 115:
638
+ parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children);
639
+ break
640
+ default:
641
+ parse(characters, reference, reference, reference, [''], children, 0, points, children);
642
+ }
643
+ }
644
+
645
+ index = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo;
646
+ break
647
+ // :
648
+ case 58:
649
+ length = 1 + strlen(characters), property = previous;
650
+ default:
651
+ if (variable < 1)
652
+ if (character == 123)
653
+ --variable;
654
+ else if (character == 125 && variable++ == 0 && prev() == 125)
655
+ continue
656
+
657
+ switch (characters += from(character), character * variable) {
658
+ // &
659
+ case 38:
660
+ ampersand = offset > 0 ? 1 : (characters += '\f', -1);
661
+ break
662
+ // ,
663
+ case 44:
664
+ points[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1;
665
+ break
666
+ // @
667
+ case 64:
668
+ // -
669
+ if (peek() === 45)
670
+ characters += delimit(next());
671
+
672
+ atrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++;
673
+ break
674
+ // -
675
+ case 45:
676
+ if (previous === 45 && strlen(characters) == 2)
677
+ variable = 0;
678
+ }
679
+ }
680
+
681
+ return rulesets
682
+ }
683
+
684
+ /**
685
+ * @param {string} value
686
+ * @param {object} root
687
+ * @param {object?} parent
688
+ * @param {number} index
689
+ * @param {number} offset
690
+ * @param {string[]} rules
691
+ * @param {number[]} points
692
+ * @param {string} type
693
+ * @param {string[]} props
694
+ * @param {string[]} children
695
+ * @param {number} length
696
+ * @return {object}
697
+ */
698
+ function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {
699
+ var post = offset - 1;
700
+ var rule = offset === 0 ? rules : [''];
701
+ var size = sizeof(rule);
702
+
703
+ for (var i = 0, j = 0, k = 0; i < index; ++i)
704
+ for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)
705
+ if (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\f/g, rule[x])))
706
+ props[k++] = z;
707
+
708
+ return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)
709
+ }
710
+
711
+ /**
712
+ * @param {number} value
713
+ * @param {object} root
714
+ * @param {object?} parent
715
+ * @return {object}
716
+ */
717
+ function comment (value, root, parent) {
718
+ return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)
719
+ }
720
+
721
+ /**
722
+ * @param {string} value
723
+ * @param {object} root
724
+ * @param {object?} parent
725
+ * @param {number} length
726
+ * @return {object}
727
+ */
728
+ function declaration (value, root, parent, length) {
729
+ return node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)
730
+ }
731
+
732
+ /**
733
+ * @param {object[]} children
734
+ * @param {function} callback
735
+ * @return {string}
736
+ */
737
+ function serialize (children, callback) {
738
+ var output = '';
739
+ var length = sizeof(children);
740
+
741
+ for (var i = 0; i < length; i++)
742
+ output += callback(children[i], i, children, callback) || '';
743
+
744
+ return output
745
+ }
746
+
747
+ /**
748
+ * @param {object} element
749
+ * @param {number} index
750
+ * @param {object[]} children
751
+ * @param {function} callback
752
+ * @return {string}
753
+ */
754
+ function stringify (element, index, children, callback) {
755
+ switch (element.type) {
756
+ case LAYER: if (element.children.length) break
757
+ case IMPORT: case DECLARATION: return element.return = element.return || element.value
758
+ case COMMENT: return ''
759
+ case KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'
760
+ case RULESET: element.value = element.props.join(',');
761
+ }
762
+
763
+ return strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''
764
+ }
765
+
766
+ /**
767
+ * @param {function[]} collection
768
+ * @return {function}
769
+ */
770
+ function middleware (collection) {
771
+ var length = sizeof(collection);
772
+
773
+ return function (element, index, children, callback) {
774
+ var output = '';
775
+
776
+ for (var i = 0; i < length; i++)
777
+ output += collection[i](element, index, children, callback) || '';
778
+
779
+ return output
780
+ }
781
+ }
782
+
783
+ /**
784
+ * @param {function} callback
785
+ * @return {function}
786
+ */
787
+ function rulesheet (callback) {
788
+ return function (element) {
789
+ if (!element.root)
790
+ if (element = element.return)
791
+ callback(element);
792
+ }
793
+ }
794
+
795
+ var weakMemoize = function weakMemoize(func) {
796
+ var cache = new WeakMap();
797
+ return function (arg) {
798
+ if (cache.has(arg)) {
799
+ // Use non-null assertion because we just checked that the cache `has` it
800
+ // This allows us to remove `undefined` from the return value
801
+ return cache.get(arg);
802
+ }
803
+
804
+ var ret = func(arg);
805
+ cache.set(arg, ret);
806
+ return ret;
807
+ };
808
+ };
809
+
810
+ function memoize(fn) {
811
+ var cache = Object.create(null);
812
+ return function (arg) {
813
+ if (cache[arg] === undefined) cache[arg] = fn(arg);
814
+ return cache[arg];
815
+ };
816
+ }
817
+
818
+ var isBrowser$4 = typeof document !== 'undefined';
819
+
820
+ var identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {
821
+ var previous = 0;
822
+ var character = 0;
823
+
824
+ while (true) {
825
+ previous = character;
826
+ character = peek(); // &\f
827
+
828
+ if (previous === 38 && character === 12) {
829
+ points[index] = 1;
830
+ }
831
+
832
+ if (token(character)) {
833
+ break;
834
+ }
835
+
836
+ next();
837
+ }
838
+
839
+ return slice(begin, position);
840
+ };
841
+
842
+ var toRules = function toRules(parsed, points) {
843
+ // pretend we've started with a comma
844
+ var index = -1;
845
+ var character = 44;
846
+
847
+ do {
848
+ switch (token(character)) {
849
+ case 0:
850
+ // &\f
851
+ if (character === 38 && peek() === 12) {
852
+ // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
853
+ // stylis inserts \f after & to know when & where it should replace this sequence with the context selector
854
+ // and when it should just concatenate the outer and inner selectors
855
+ // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
856
+ points[index] = 1;
857
+ }
858
+
859
+ parsed[index] += identifierWithPointTracking(position - 1, points, index);
860
+ break;
861
+
862
+ case 2:
863
+ parsed[index] += delimit(character);
864
+ break;
865
+
866
+ case 4:
867
+ // comma
868
+ if (character === 44) {
869
+ // colon
870
+ parsed[++index] = peek() === 58 ? '&\f' : '';
871
+ points[index] = parsed[index].length;
872
+ break;
873
+ }
874
+
875
+ // fallthrough
876
+
877
+ default:
878
+ parsed[index] += from(character);
879
+ }
880
+ } while (character = next());
881
+
882
+ return parsed;
883
+ };
884
+
885
+ var getRules = function getRules(value, points) {
886
+ return dealloc(toRules(alloc(value), points));
887
+ }; // WeakSet would be more appropriate, but only WeakMap is supported in IE11
888
+
889
+
890
+ var fixedElements = /* #__PURE__ */new WeakMap();
891
+ var compat = function compat(element) {
892
+ if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo
893
+ // negative .length indicates that this rule has been already prefixed
894
+ element.length < 1) {
895
+ return;
896
+ }
897
+
898
+ var value = element.value;
899
+ var parent = element.parent;
900
+ var isImplicitRule = element.column === parent.column && element.line === parent.line;
901
+
902
+ while (parent.type !== 'rule') {
903
+ parent = parent.parent;
904
+ if (!parent) return;
905
+ } // short-circuit for the simplest case
906
+
907
+
908
+ if (element.props.length === 1 && value.charCodeAt(0) !== 58
909
+ /* colon */
910
+ && !fixedElements.get(parent)) {
911
+ return;
912
+ } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
913
+ // then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
914
+
915
+
916
+ if (isImplicitRule) {
917
+ return;
918
+ }
919
+
920
+ fixedElements.set(element, true);
921
+ var points = [];
922
+ var rules = getRules(value, points);
923
+ var parentRules = parent.props;
924
+
925
+ for (var i = 0, k = 0; i < rules.length; i++) {
926
+ for (var j = 0; j < parentRules.length; j++, k++) {
927
+ element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
928
+ }
929
+ }
930
+ };
931
+ var removeLabel = function removeLabel(element) {
932
+ if (element.type === 'decl') {
933
+ var value = element.value;
934
+
935
+ if ( // charcode for l
936
+ value.charCodeAt(0) === 108 && // charcode for b
937
+ value.charCodeAt(2) === 98) {
938
+ // this ignores label
939
+ element["return"] = '';
940
+ element.value = '';
941
+ }
942
+ }
943
+ };
944
+
945
+ /* eslint-disable no-fallthrough */
946
+
947
+ function prefix(value, length) {
948
+ switch (hash(value, length)) {
949
+ // color-adjust
950
+ case 5103:
951
+ return WEBKIT + 'print-' + value + value;
952
+ // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
953
+
954
+ case 5737:
955
+ case 4201:
956
+ case 3177:
957
+ case 3433:
958
+ case 1641:
959
+ case 4457:
960
+ case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
961
+
962
+ case 5572:
963
+ case 6356:
964
+ case 5844:
965
+ case 3191:
966
+ case 6645:
967
+ case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
968
+
969
+ case 6391:
970
+ case 5879:
971
+ case 5623:
972
+ case 6135:
973
+ case 4599:
974
+ case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
975
+
976
+ case 4215:
977
+ case 6389:
978
+ case 5109:
979
+ case 5365:
980
+ case 5621:
981
+ case 3829:
982
+ return WEBKIT + value + value;
983
+ // appearance, user-select, transform, hyphens, text-size-adjust
984
+
985
+ case 5349:
986
+ case 4246:
987
+ case 4810:
988
+ case 6968:
989
+ case 2756:
990
+ return WEBKIT + value + MOZ + value + MS + value + value;
991
+ // flex, flex-direction
992
+
993
+ case 6828:
994
+ case 4268:
995
+ return WEBKIT + value + MS + value + value;
996
+ // order
997
+
998
+ case 6165:
999
+ return WEBKIT + value + MS + 'flex-' + value + value;
1000
+ // align-items
1001
+
1002
+ case 5187:
1003
+ return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;
1004
+ // align-self
1005
+
1006
+ case 5443:
1007
+ return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;
1008
+ // align-content
1009
+
1010
+ case 4675:
1011
+ return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;
1012
+ // flex-shrink
1013
+
1014
+ case 5548:
1015
+ return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;
1016
+ // flex-basis
1017
+
1018
+ case 5292:
1019
+ return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;
1020
+ // flex-grow
1021
+
1022
+ case 6060:
1023
+ return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;
1024
+ // transition
1025
+
1026
+ case 4554:
1027
+ return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;
1028
+ // cursor
1029
+
1030
+ case 6187:
1031
+ return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;
1032
+ // background, background-image
1033
+
1034
+ case 5495:
1035
+ case 3959:
1036
+ return replace(value, /(image-set\([^]*)/, WEBKIT + '$1' + '$`$1');
1037
+ // justify-content
1038
+
1039
+ case 4968:
1040
+ return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;
1041
+ // (margin|padding)-inline-(start|end)
1042
+
1043
+ case 4095:
1044
+ case 3583:
1045
+ case 4068:
1046
+ case 2532:
1047
+ return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;
1048
+ // (min|max)?(width|height|inline-size|block-size)
1049
+
1050
+ case 8116:
1051
+ case 7059:
1052
+ case 5753:
1053
+ case 5535:
1054
+ case 5445:
1055
+ case 5701:
1056
+ case 4933:
1057
+ case 4677:
1058
+ case 5533:
1059
+ case 5789:
1060
+ case 5021:
1061
+ case 4765:
1062
+ // stretch, max-content, min-content, fill-available
1063
+ if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {
1064
+ // (m)ax-content, (m)in-content
1065
+ case 109:
1066
+ // -
1067
+ if (charat(value, length + 4) !== 45) break;
1068
+ // (f)ill-available, (f)it-content
1069
+
1070
+ case 102:
1071
+ return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;
1072
+ // (s)tretch
1073
+
1074
+ case 115:
1075
+ return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;
1076
+ }
1077
+ break;
1078
+ // position: sticky
1079
+
1080
+ case 4949:
1081
+ // (s)ticky?
1082
+ if (charat(value, length + 1) !== 115) break;
1083
+ // display: (flex|inline-flex)
1084
+
1085
+ case 6444:
1086
+ switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {
1087
+ // stic(k)y
1088
+ case 107:
1089
+ return replace(value, ':', ':' + WEBKIT) + value;
1090
+ // (inline-)?fl(e)x
1091
+
1092
+ case 101:
1093
+ return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;
1094
+ }
1095
+
1096
+ break;
1097
+ // writing-mode
1098
+
1099
+ case 5936:
1100
+ switch (charat(value, length + 11)) {
1101
+ // vertical-l(r)
1102
+ case 114:
1103
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb') + value;
1104
+ // vertical-r(l)
1105
+
1106
+ case 108:
1107
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'tb-rl') + value;
1108
+ // horizontal(-)tb
1109
+
1110
+ case 45:
1111
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, 'lr') + value;
1112
+ }
1113
+
1114
+ return WEBKIT + value + MS + value + value;
1115
+ }
1116
+
1117
+ return value;
1118
+ }
1119
+
1120
+ var prefixer = function prefixer(element, index, children, callback) {
1121
+ if (element.length > -1) if (!element["return"]) switch (element.type) {
1122
+ case DECLARATION:
1123
+ element["return"] = prefix(element.value, element.length);
1124
+ break;
1125
+
1126
+ case KEYFRAMES:
1127
+ return serialize([copy(element, {
1128
+ value: replace(element.value, '@', '@' + WEBKIT)
1129
+ })], callback);
1130
+
1131
+ case RULESET:
1132
+ if (element.length) return combine(element.props, function (value) {
1133
+ switch (match(value, /(::plac\w+|:read-\w+)/)) {
1134
+ // :read-(only|write)
1135
+ case ':read-only':
1136
+ case ':read-write':
1137
+ return serialize([copy(element, {
1138
+ props: [replace(value, /:(read-\w+)/, ':' + MOZ + '$1')]
1139
+ })], callback);
1140
+ // :placeholder
1141
+
1142
+ case '::placeholder':
1143
+ return serialize([copy(element, {
1144
+ props: [replace(value, /:(plac\w+)/, ':' + WEBKIT + 'input-$1')]
1145
+ }), copy(element, {
1146
+ props: [replace(value, /:(plac\w+)/, ':' + MOZ + '$1')]
1147
+ }), copy(element, {
1148
+ props: [replace(value, /:(plac\w+)/, MS + 'input-$1')]
1149
+ })], callback);
1150
+ }
1151
+
1152
+ return '';
1153
+ });
1154
+ }
1155
+ };
1156
+
1157
+ var getServerStylisCache = isBrowser$4 ? undefined : weakMemoize(function () {
1158
+ return memoize(function () {
1159
+ return {};
1160
+ });
1161
+ });
1162
+ var defaultStylisPlugins = [prefixer];
1163
+
1164
+ var createCache = function createCache(options) {
1165
+ var key = options.key;
1166
+
1167
+ if (isBrowser$4 && key === 'css') {
1168
+ var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])"); // get SSRed styles out of the way of React's hydration
1169
+ // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
1170
+ // note this very very intentionally targets all style elements regardless of the key to ensure
1171
+ // that creating a cache works inside of render of a React component
1172
+
1173
+ Array.prototype.forEach.call(ssrStyles, function (node) {
1174
+ // we want to only move elements which have a space in the data-emotion attribute value
1175
+ // because that indicates that it is an Emotion 11 server-side rendered style elements
1176
+ // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
1177
+ // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
1178
+ // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
1179
+ // will not result in the Emotion 10 styles being destroyed
1180
+ var dataEmotionAttribute = node.getAttribute('data-emotion');
1181
+
1182
+ if (dataEmotionAttribute.indexOf(' ') === -1) {
1183
+ return;
1184
+ }
1185
+
1186
+ document.head.appendChild(node);
1187
+ node.setAttribute('data-s', '');
1188
+ });
1189
+ }
1190
+
1191
+ var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
1192
+
1193
+ var inserted = {};
1194
+ var container;
1195
+ var nodesToHydrate = [];
1196
+
1197
+ if (isBrowser$4) {
1198
+ container = options.container || document.head;
1199
+ Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which
1200
+ // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
1201
+ document.querySelectorAll("style[data-emotion^=\"" + key + " \"]"), function (node) {
1202
+ var attrib = node.getAttribute("data-emotion").split(' ');
1203
+
1204
+ for (var i = 1; i < attrib.length; i++) {
1205
+ inserted[attrib[i]] = true;
1206
+ }
1207
+
1208
+ nodesToHydrate.push(node);
1209
+ });
1210
+ }
1211
+
1212
+ var _insert;
1213
+
1214
+ var omnipresentPlugins = [compat, removeLabel];
1215
+
1216
+ if (!getServerStylisCache) {
1217
+ var currentSheet;
1218
+ var finalizingPlugins = [stringify, rulesheet(function (rule) {
1219
+ currentSheet.insert(rule);
1220
+ })];
1221
+ var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
1222
+
1223
+ var stylis = function stylis(styles) {
1224
+ return serialize(compile(styles), serializer);
1225
+ };
1226
+
1227
+ _insert = function insert(selector, serialized, sheet, shouldCache) {
1228
+ currentSheet = sheet;
1229
+
1230
+ stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
1231
+
1232
+ if (shouldCache) {
1233
+ cache.inserted[serialized.name] = true;
1234
+ }
1235
+ };
1236
+ } else {
1237
+ var _finalizingPlugins = [stringify];
1238
+
1239
+ var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
1240
+
1241
+ var _stylis = function _stylis(styles) {
1242
+ return serialize(compile(styles), _serializer);
1243
+ };
1244
+
1245
+ var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
1246
+
1247
+ var getRules = function getRules(selector, serialized) {
1248
+ var name = serialized.name;
1249
+
1250
+ if (serverStylisCache[name] === undefined) {
1251
+ serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
1252
+ }
1253
+
1254
+ return serverStylisCache[name];
1255
+ };
1256
+
1257
+ _insert = function _insert(selector, serialized, sheet, shouldCache) {
1258
+ var name = serialized.name;
1259
+ var rules = getRules(selector, serialized);
1260
+
1261
+ if (cache.compat === undefined) {
1262
+ // in regular mode, we don't set the styles on the inserted cache
1263
+ // since we don't need to and that would be wasting memory
1264
+ // we return them so that they are rendered in a style tag
1265
+ if (shouldCache) {
1266
+ cache.inserted[name] = true;
1267
+ }
1268
+
1269
+ return rules;
1270
+ } else {
1271
+ // in compat mode, we put the styles on the inserted cache so
1272
+ // that emotion-server can pull out the styles
1273
+ // except when we don't want to cache it which was in Global but now
1274
+ // is nowhere but we don't want to do a major right now
1275
+ // and just in case we're going to leave the case here
1276
+ // it's also not affecting client side bundle size
1277
+ // so it's really not a big deal
1278
+ if (shouldCache) {
1279
+ cache.inserted[name] = rules;
1280
+ } else {
1281
+ return rules;
1282
+ }
1283
+ }
1284
+ };
1285
+ }
1286
+
1287
+ var cache = {
1288
+ key: key,
1289
+ sheet: new StyleSheet({
1290
+ key: key,
1291
+ container: container,
1292
+ nonce: options.nonce,
1293
+ speedy: options.speedy,
1294
+ prepend: options.prepend,
1295
+ insertionPoint: options.insertionPoint
1296
+ }),
1297
+ nonce: options.nonce,
1298
+ inserted: inserted,
1299
+ registered: {},
1300
+ insert: _insert
1301
+ };
1302
+ cache.sheet.hydrate(nodesToHydrate);
1303
+ return cache;
1304
+ };
1305
+
1306
+ var isBrowser$3 = typeof document !== 'undefined';
1307
+
1308
+ function getRegisteredStyles(registered, registeredStyles, classNames) {
1309
+ var rawClassName = '';
1310
+ classNames.split(' ').forEach(function (className) {
1311
+ if (registered[className] !== undefined) {
1312
+ registeredStyles.push(registered[className] + ";");
1313
+ } else if (className) {
1314
+ rawClassName += className + " ";
1315
+ }
1316
+ });
1317
+ return rawClassName;
1318
+ }
1319
+ var registerStyles = function registerStyles(cache, serialized, isStringTag) {
1320
+ var className = cache.key + "-" + serialized.name;
1321
+
1322
+ if ( // we only need to add the styles to the registered cache if the
1323
+ // class name could be used further down
1324
+ // the tree but if it's a string tag, we know it won't
1325
+ // so we don't have to add it to registered cache.
1326
+ // this improves memory usage since we can avoid storing the whole style string
1327
+ (isStringTag === false || // we need to always store it if we're in compat mode and
1328
+ // in node since emotion-server relies on whether a style is in
1329
+ // the registered cache to know whether a style is global or not
1330
+ // also, note that this check will be dead code eliminated in the browser
1331
+ isBrowser$3 === false && cache.compat !== undefined) && cache.registered[className] === undefined) {
1332
+ cache.registered[className] = serialized.styles;
1333
+ }
1334
+ };
1335
+ var insertStyles = function insertStyles(cache, serialized, isStringTag) {
1336
+ registerStyles(cache, serialized, isStringTag);
1337
+ var className = cache.key + "-" + serialized.name;
1338
+
1339
+ if (cache.inserted[serialized.name] === undefined) {
1340
+ var stylesForSSR = '';
1341
+ var current = serialized;
1342
+
1343
+ do {
1344
+ var maybeStyles = cache.insert(serialized === current ? "." + className : '', current, cache.sheet, true);
1345
+
1346
+ if (!isBrowser$3 && maybeStyles !== undefined) {
1347
+ stylesForSSR += maybeStyles;
1348
+ }
1349
+
1350
+ current = current.next;
1351
+ } while (current !== undefined);
1352
+
1353
+ if (!isBrowser$3 && stylesForSSR.length !== 0) {
1354
+ return stylesForSSR;
1355
+ }
1356
+ }
1357
+ };
1358
+
1359
+ /* eslint-disable */
1360
+ // Inspired by https://github.com/garycourt/murmurhash-js
1361
+ // Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
1362
+ function murmur2(str) {
1363
+ // 'm' and 'r' are mixing constants generated offline.
1364
+ // They're not really 'magic', they just happen to work well.
1365
+ // const m = 0x5bd1e995;
1366
+ // const r = 24;
1367
+ // Initialize the hash
1368
+ var h = 0; // Mix 4 bytes at a time into the hash
1369
+
1370
+ var k,
1371
+ i = 0,
1372
+ len = str.length;
1373
+
1374
+ for (; len >= 4; ++i, len -= 4) {
1375
+ k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
1376
+ k =
1377
+ /* Math.imul(k, m): */
1378
+ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
1379
+ k ^=
1380
+ /* k >>> r: */
1381
+ k >>> 24;
1382
+ h =
1383
+ /* Math.imul(k, m): */
1384
+ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
1385
+ /* Math.imul(h, m): */
1386
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
1387
+ } // Handle the last few bytes of the input array
1388
+
1389
+
1390
+ switch (len) {
1391
+ case 3:
1392
+ h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
1393
+
1394
+ case 2:
1395
+ h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
1396
+
1397
+ case 1:
1398
+ h ^= str.charCodeAt(i) & 0xff;
1399
+ h =
1400
+ /* Math.imul(h, m): */
1401
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
1402
+ } // Do a few final mixes of the hash to ensure the last few
1403
+ // bytes are well-incorporated.
1404
+
1405
+
1406
+ h ^= h >>> 13;
1407
+ h =
1408
+ /* Math.imul(h, m): */
1409
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
1410
+ return ((h ^ h >>> 15) >>> 0).toString(36);
1411
+ }
1412
+
1413
+ var unitlessKeys = {
1414
+ animationIterationCount: 1,
1415
+ aspectRatio: 1,
1416
+ borderImageOutset: 1,
1417
+ borderImageSlice: 1,
1418
+ borderImageWidth: 1,
1419
+ boxFlex: 1,
1420
+ boxFlexGroup: 1,
1421
+ boxOrdinalGroup: 1,
1422
+ columnCount: 1,
1423
+ columns: 1,
1424
+ flex: 1,
1425
+ flexGrow: 1,
1426
+ flexPositive: 1,
1427
+ flexShrink: 1,
1428
+ flexNegative: 1,
1429
+ flexOrder: 1,
1430
+ gridRow: 1,
1431
+ gridRowEnd: 1,
1432
+ gridRowSpan: 1,
1433
+ gridRowStart: 1,
1434
+ gridColumn: 1,
1435
+ gridColumnEnd: 1,
1436
+ gridColumnSpan: 1,
1437
+ gridColumnStart: 1,
1438
+ msGridRow: 1,
1439
+ msGridRowSpan: 1,
1440
+ msGridColumn: 1,
1441
+ msGridColumnSpan: 1,
1442
+ fontWeight: 1,
1443
+ lineHeight: 1,
1444
+ opacity: 1,
1445
+ order: 1,
1446
+ orphans: 1,
1447
+ scale: 1,
1448
+ tabSize: 1,
1449
+ widows: 1,
1450
+ zIndex: 1,
1451
+ zoom: 1,
1452
+ WebkitLineClamp: 1,
1453
+ // SVG-related properties
1454
+ fillOpacity: 1,
1455
+ floodOpacity: 1,
1456
+ stopOpacity: 1,
1457
+ strokeDasharray: 1,
1458
+ strokeDashoffset: 1,
1459
+ strokeMiterlimit: 1,
1460
+ strokeOpacity: 1,
1461
+ strokeWidth: 1
1462
+ };
1463
+
1464
+ var hyphenateRegex = /[A-Z]|^ms/g;
1465
+ var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
1466
+
1467
+ var isCustomProperty = function isCustomProperty(property) {
1468
+ return property.charCodeAt(1) === 45;
1469
+ };
1470
+
1471
+ var isProcessableValue = function isProcessableValue(value) {
1472
+ return value != null && typeof value !== 'boolean';
1473
+ };
1474
+
1475
+ var processStyleName = /* #__PURE__ */memoize(function (styleName) {
1476
+ return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();
1477
+ });
1478
+
1479
+ var processStyleValue = function processStyleValue(key, value) {
1480
+ switch (key) {
1481
+ case 'animation':
1482
+ case 'animationName':
1483
+ {
1484
+ if (typeof value === 'string') {
1485
+ return value.replace(animationRegex, function (match, p1, p2) {
1486
+ cursor = {
1487
+ name: p1,
1488
+ styles: p2,
1489
+ next: cursor
1490
+ };
1491
+ return p1;
1492
+ });
1493
+ }
1494
+ }
1495
+ }
1496
+
1497
+ if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {
1498
+ return value + 'px';
1499
+ }
1500
+
1501
+ return value;
1502
+ };
1503
+
1504
+ function handleInterpolation(mergedProps, registered, interpolation) {
1505
+ if (interpolation == null) {
1506
+ return '';
1507
+ }
1508
+
1509
+ var componentSelector = interpolation;
1510
+
1511
+ if (componentSelector.__emotion_styles !== undefined) {
1512
+
1513
+ return componentSelector;
1514
+ }
1515
+
1516
+ switch (typeof interpolation) {
1517
+ case 'boolean':
1518
+ {
1519
+ return '';
1520
+ }
1521
+
1522
+ case 'object':
1523
+ {
1524
+ var keyframes = interpolation;
1525
+
1526
+ if (keyframes.anim === 1) {
1527
+ cursor = {
1528
+ name: keyframes.name,
1529
+ styles: keyframes.styles,
1530
+ next: cursor
1531
+ };
1532
+ return keyframes.name;
1533
+ }
1534
+
1535
+ var serializedStyles = interpolation;
1536
+
1537
+ if (serializedStyles.styles !== undefined) {
1538
+ var next = serializedStyles.next;
1539
+
1540
+ if (next !== undefined) {
1541
+ // not the most efficient thing ever but this is a pretty rare case
1542
+ // and there will be very few iterations of this generally
1543
+ while (next !== undefined) {
1544
+ cursor = {
1545
+ name: next.name,
1546
+ styles: next.styles,
1547
+ next: cursor
1548
+ };
1549
+ next = next.next;
1550
+ }
1551
+ }
1552
+
1553
+ var styles = serializedStyles.styles + ";";
1554
+ return styles;
1555
+ }
1556
+
1557
+ return createStringFromObject(mergedProps, registered, interpolation);
1558
+ }
1559
+
1560
+ case 'function':
1561
+ {
1562
+ if (mergedProps !== undefined) {
1563
+ var previousCursor = cursor;
1564
+ var result = interpolation(mergedProps);
1565
+ cursor = previousCursor;
1566
+ return handleInterpolation(mergedProps, registered, result);
1567
+ }
1568
+
1569
+ break;
1570
+ }
1571
+ } // finalize string values (regular strings and functions interpolated into css calls)
1572
+
1573
+
1574
+ var asString = interpolation;
1575
+
1576
+ if (registered == null) {
1577
+ return asString;
1578
+ }
1579
+
1580
+ var cached = registered[asString];
1581
+ return cached !== undefined ? cached : asString;
1582
+ }
1583
+
1584
+ function createStringFromObject(mergedProps, registered, obj) {
1585
+ var string = '';
1586
+
1587
+ if (Array.isArray(obj)) {
1588
+ for (var i = 0; i < obj.length; i++) {
1589
+ string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
1590
+ }
1591
+ } else {
1592
+ for (var key in obj) {
1593
+ var value = obj[key];
1594
+
1595
+ if (typeof value !== 'object') {
1596
+ var asString = value;
1597
+
1598
+ if (registered != null && registered[asString] !== undefined) {
1599
+ string += key + "{" + registered[asString] + "}";
1600
+ } else if (isProcessableValue(asString)) {
1601
+ string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
1602
+ }
1603
+ } else {
1604
+
1605
+ if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {
1606
+ for (var _i = 0; _i < value.length; _i++) {
1607
+ if (isProcessableValue(value[_i])) {
1608
+ string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
1609
+ }
1610
+ }
1611
+ } else {
1612
+ var interpolated = handleInterpolation(mergedProps, registered, value);
1613
+
1614
+ switch (key) {
1615
+ case 'animation':
1616
+ case 'animationName':
1617
+ {
1618
+ string += processStyleName(key) + ":" + interpolated + ";";
1619
+ break;
1620
+ }
1621
+
1622
+ default:
1623
+ {
1624
+
1625
+ string += key + "{" + interpolated + "}";
1626
+ }
1627
+ }
1628
+ }
1629
+ }
1630
+ }
1631
+ }
1632
+
1633
+ return string;
1634
+ }
1635
+
1636
+ var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g; // this is the cursor for keyframes
1637
+ // keyframes are stored on the SerializedStyles object as a linked list
1638
+
1639
+ var cursor;
1640
+ function serializeStyles(args, registered, mergedProps) {
1641
+ if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {
1642
+ return args[0];
1643
+ }
1644
+
1645
+ var stringMode = true;
1646
+ var styles = '';
1647
+ cursor = undefined;
1648
+ var strings = args[0];
1649
+
1650
+ if (strings == null || strings.raw === undefined) {
1651
+ stringMode = false;
1652
+ styles += handleInterpolation(mergedProps, registered, strings);
1653
+ } else {
1654
+ var asTemplateStringsArr = strings;
1655
+
1656
+ styles += asTemplateStringsArr[0];
1657
+ } // we start at 1 since we've already handled the first arg
1658
+
1659
+
1660
+ for (var i = 1; i < args.length; i++) {
1661
+ styles += handleInterpolation(mergedProps, registered, args[i]);
1662
+
1663
+ if (stringMode) {
1664
+ var templateStringsArr = strings;
1665
+
1666
+ styles += templateStringsArr[i];
1667
+ }
1668
+ } // using a global regex with .exec is stateful so lastIndex has to be reset each time
1669
+
1670
+
1671
+ labelPattern.lastIndex = 0;
1672
+ var identifierName = '';
1673
+ var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5
1674
+
1675
+ while ((match = labelPattern.exec(styles)) !== null) {
1676
+ identifierName += '-' + match[1];
1677
+ }
1678
+
1679
+ var name = murmur2(styles) + identifierName;
1680
+
1681
+ return {
1682
+ name: name,
1683
+ styles: styles,
1684
+ next: cursor
1685
+ };
1686
+ }
1687
+
1688
+ var isBrowser$2 = typeof document !== 'undefined';
1689
+
1690
+ var syncFallback = function syncFallback(create) {
1691
+ return create();
1692
+ };
1693
+
1694
+ var useInsertionEffect = React__namespace['useInsertion' + 'Effect'] ? React__namespace['useInsertion' + 'Effect'] : false;
1695
+ var useInsertionEffectAlwaysWithSyncFallback = !isBrowser$2 ? syncFallback : useInsertionEffect || syncFallback;
1696
+
1697
+ var isBrowser$1 = typeof document !== 'undefined';
1698
+
1699
+ var EmotionCacheContext = /* #__PURE__ */React__namespace.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
1700
+ // because this module is primarily intended for the browser and node
1701
+ // but it's also required in react native and similar environments sometimes
1702
+ // and we could have a special build just for that
1703
+ // but this is much easier and the native packages
1704
+ // might use a different theme context in the future anyway
1705
+ typeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({
1706
+ key: 'css'
1707
+ }) : null);
1708
+
1709
+ EmotionCacheContext.Provider;
1710
+
1711
+ var withEmotionCache = function withEmotionCache(func) {
1712
+ return /*#__PURE__*/React.forwardRef(function (props, ref) {
1713
+ // the cache will never be null in the browser
1714
+ var cache = React.useContext(EmotionCacheContext);
1715
+ return func(props, cache, ref);
1716
+ });
1717
+ };
1718
+
1719
+ if (!isBrowser$1) {
1720
+ withEmotionCache = function withEmotionCache(func) {
1721
+ return function (props) {
1722
+ var cache = React.useContext(EmotionCacheContext);
1723
+
1724
+ if (cache === null) {
1725
+ // yes, we're potentially creating this on every render
1726
+ // it doesn't actually matter though since it's only on the server
1727
+ // so there will only every be a single render
1728
+ // that could change in the future because of suspense and etc. but for now,
1729
+ // this works and i don't want to optimise for a future thing that we aren't sure about
1730
+ cache = createCache({
1731
+ key: 'css'
1732
+ });
1733
+ return /*#__PURE__*/React__namespace.createElement(EmotionCacheContext.Provider, {
1734
+ value: cache
1735
+ }, func(props, cache));
1736
+ } else {
1737
+ return func(props, cache);
1738
+ }
1739
+ };
1740
+ };
1741
+ }
1742
+
1743
+ var ThemeContext = /* #__PURE__ */React__namespace.createContext({});
1744
+
1745
+ // eslint-disable-next-line no-undef
1746
+ var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
1747
+
1748
+ var isPropValid = /* #__PURE__ */memoize(function (prop) {
1749
+ return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
1750
+ /* o */
1751
+ && prop.charCodeAt(1) === 110
1752
+ /* n */
1753
+ && prop.charCodeAt(2) < 91;
1754
+ }
1755
+ /* Z+1 */
1756
+ );
1757
+
1758
+ var isBrowser = typeof document !== 'undefined';
1759
+
1760
+ var testOmitPropsOnStringTag = isPropValid;
1761
+
1762
+ var testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {
1763
+ return key !== 'theme';
1764
+ };
1765
+
1766
+ var getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {
1767
+ return typeof tag === 'string' && // 96 is one less than the char code
1768
+ // for "a" so this is checking that
1769
+ // it's a lowercase character
1770
+ tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
1771
+ };
1772
+ var composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {
1773
+ var shouldForwardProp;
1774
+
1775
+ if (options) {
1776
+ var optionsShouldForwardProp = options.shouldForwardProp;
1777
+ shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {
1778
+ return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
1779
+ } : optionsShouldForwardProp;
1780
+ }
1781
+
1782
+ if (typeof shouldForwardProp !== 'function' && isReal) {
1783
+ shouldForwardProp = tag.__emotion_forwardProp;
1784
+ }
1785
+
1786
+ return shouldForwardProp;
1787
+ };
1788
+
1789
+ var Insertion = function Insertion(_ref) {
1790
+ var cache = _ref.cache,
1791
+ serialized = _ref.serialized,
1792
+ isStringTag = _ref.isStringTag;
1793
+ registerStyles(cache, serialized, isStringTag);
1794
+ var rules = useInsertionEffectAlwaysWithSyncFallback(function () {
1795
+ return insertStyles(cache, serialized, isStringTag);
1796
+ });
1797
+
1798
+ if (!isBrowser && rules !== undefined) {
1799
+ var _ref2;
1800
+
1801
+ var serializedNames = serialized.name;
1802
+ var next = serialized.next;
1803
+
1804
+ while (next !== undefined) {
1805
+ serializedNames += ' ' + next.name;
1806
+ next = next.next;
1807
+ }
1808
+
1809
+ return /*#__PURE__*/React__namespace.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
1810
+ __html: rules
1811
+ }, _ref2.nonce = cache.sheet.nonce, _ref2));
1812
+ }
1813
+
1814
+ return null;
1815
+ };
1816
+
1817
+ var createStyled = function createStyled(tag, options) {
1818
+
1819
+ var isReal = tag.__emotion_real === tag;
1820
+ var baseTag = isReal && tag.__emotion_base || tag;
1821
+ var identifierName;
1822
+ var targetClassName;
1823
+
1824
+ if (options !== undefined) {
1825
+ identifierName = options.label;
1826
+ targetClassName = options.target;
1827
+ }
1828
+
1829
+ var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);
1830
+ var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);
1831
+ var shouldUseAs = !defaultShouldForwardProp('as');
1832
+ return function () {
1833
+ // eslint-disable-next-line prefer-rest-params
1834
+ var args = arguments;
1835
+ var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];
1836
+
1837
+ if (identifierName !== undefined) {
1838
+ styles.push("label:" + identifierName + ";");
1839
+ }
1840
+
1841
+ if (args[0] == null || args[0].raw === undefined) {
1842
+ // eslint-disable-next-line prefer-spread
1843
+ styles.push.apply(styles, args);
1844
+ } else {
1845
+ var templateStringsArr = args[0];
1846
+
1847
+ styles.push(templateStringsArr[0]);
1848
+ var len = args.length;
1849
+ var i = 1;
1850
+
1851
+ for (; i < len; i++) {
1852
+
1853
+ styles.push(args[i], templateStringsArr[i]);
1854
+ }
1855
+ }
1856
+
1857
+ var Styled = withEmotionCache(function (props, cache, ref) {
1858
+ var FinalTag = shouldUseAs && props.as || baseTag;
1859
+ var className = '';
1860
+ var classInterpolations = [];
1861
+ var mergedProps = props;
1862
+
1863
+ if (props.theme == null) {
1864
+ mergedProps = {};
1865
+
1866
+ for (var key in props) {
1867
+ mergedProps[key] = props[key];
1868
+ }
1869
+
1870
+ mergedProps.theme = React__namespace.useContext(ThemeContext);
1871
+ }
1872
+
1873
+ if (typeof props.className === 'string') {
1874
+ className = getRegisteredStyles(cache.registered, classInterpolations, props.className);
1875
+ } else if (props.className != null) {
1876
+ className = props.className + " ";
1877
+ }
1878
+
1879
+ var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);
1880
+ className += cache.key + "-" + serialized.name;
1881
+
1882
+ if (targetClassName !== undefined) {
1883
+ className += " " + targetClassName;
1884
+ }
1885
+
1886
+ var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;
1887
+ var newProps = {};
1888
+
1889
+ for (var _key in props) {
1890
+ if (shouldUseAs && _key === 'as') continue;
1891
+
1892
+ if (finalShouldForwardProp(_key)) {
1893
+ newProps[_key] = props[_key];
1894
+ }
1895
+ }
1896
+
1897
+ newProps.className = className;
1898
+
1899
+ if (ref) {
1900
+ newProps.ref = ref;
1901
+ }
1902
+
1903
+ return /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/React__namespace.createElement(Insertion, {
1904
+ cache: cache,
1905
+ serialized: serialized,
1906
+ isStringTag: typeof FinalTag === 'string'
1907
+ }), /*#__PURE__*/React__namespace.createElement(FinalTag, newProps));
1908
+ });
1909
+ Styled.displayName = identifierName !== undefined ? identifierName : "Styled(" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + ")";
1910
+ Styled.defaultProps = tag.defaultProps;
1911
+ Styled.__emotion_real = Styled;
1912
+ Styled.__emotion_base = baseTag;
1913
+ Styled.__emotion_styles = styles;
1914
+ Styled.__emotion_forwardProp = shouldForwardProp;
1915
+ Object.defineProperty(Styled, 'toString', {
1916
+ value: function value() {
1917
+
1918
+ return "." + targetClassName;
1919
+ }
1920
+ });
1921
+
1922
+ Styled.withComponent = function (nextTag, nextOptions) {
1923
+ var newStyled = createStyled(nextTag, _extends({}, options, nextOptions, {
1924
+ shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
1925
+ }));
1926
+ return newStyled.apply(undefined, styles);
1927
+ };
1928
+
1929
+ return Styled;
1930
+ };
1931
+ };
1932
+
1933
+ var tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG
1934
+ 'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];
1935
+
1936
+ // bind it to avoid mutating the original function
1937
+ var newStyled = createStyled.bind(null);
1938
+ tags.forEach(function (tagName) {
1939
+ newStyled[tagName] = newStyled(tagName);
1940
+ });
1941
+
1942
+ function Icon(props) {
1943
+ var _a = props.color, color = _a === undefined ? 'white' : _a, icon = props.icon, size = props.size, withBorder = props.withBorder, link = props.link;
1944
+ return (React.createElement(IconContainer, { color: color, size: size, withBorder: withBorder, onClick: function () { return window.open(link, "_blank"); } },
1945
+ icon === "twitter" && (React.createElement("svg", { width: "22", height: "19", viewBox: "0 0 22 19", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1946
+ React.createElement("path", { d: "M7.22838 0H0.34375L8.46766 10.4263L0.786371 18.9328H3.3926L9.67543 11.9759L15.0966 18.9328H21.9812L13.515 8.06725L20.801 0H18.1946L12.3072 6.51855L7.22838 0ZM16.0801 17.0395L4.27784 1.89327H6.24482L18.0471 17.0395H16.0801Z" }))),
1947
+ icon === "instagram" && (React.createElement("svg", { width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1948
+ React.createElement("path", { d: "M12.1711 0C8.8681 0 8.4528 0.0152137 7.15509 0.0730262C5.85739 0.133881 4.97336 0.337747 4.19901 0.63898C3.3868 0.944501 2.65099 1.42374 2.04325 2.04325C1.42415 2.65126 0.944947 3.38693 0.63898 4.19901C0.337747 4.97188 0.132367 5.85725 0.0730262 7.1505C0.0152137 8.45131 0 8.86513 0 12.1725C0 15.477 0.0152137 15.8908 0.0730262 17.1886C0.133881 18.4849 0.337747 19.3687 0.63898 20.1431C0.950857 20.9433 1.36627 21.6219 2.04325 22.2989C2.71874 22.9758 3.39721 23.3928 4.19753 23.7031C4.97336 24.0043 5.85577 24.2097 7.15198 24.2691C8.45131 24.3268 8.86513 24.3421 12.1711 24.3421C15.477 24.3421 15.8893 24.3268 17.1886 24.2691C18.4832 24.2082 19.3702 24.0043 20.1446 23.7031C20.9564 23.3975 21.6915 22.9182 22.2989 22.2989C22.9758 21.6219 23.3913 20.9433 23.7031 20.1431C24.0028 19.3687 24.2082 18.4849 24.2691 17.1886C24.3268 15.8908 24.3421 15.477 24.3421 12.1711C24.3421 8.86513 24.3268 8.45131 24.2691 7.15198C24.2082 5.85739 24.0028 4.97188 23.7031 4.19901C23.3972 3.38693 22.918 2.65126 22.2989 2.04325C21.6913 1.42347 20.9554 0.944244 20.1431 0.63898C19.3671 0.337747 18.4817 0.132367 17.187 0.0730262C15.8878 0.0152137 15.4755 0 12.1681 0H12.1725H12.1711ZM11.0803 2.1939H12.1725C15.4222 2.1939 15.8071 2.20445 17.0896 2.26382C18.2763 2.3171 18.9214 2.51643 19.3505 2.68223C19.9179 2.9028 20.3242 3.16745 20.7502 3.59344C21.1761 4.01942 21.4393 4.42418 21.6599 4.99324C21.8273 5.42072 22.025 6.06578 22.0783 7.25246C22.1377 8.53502 22.1498 8.9199 22.1498 12.1681C22.1498 15.4161 22.1377 15.8026 22.0783 17.0851C22.025 18.2717 21.8258 18.9153 21.6599 19.3444C21.4647 19.8729 21.1533 20.3507 20.7485 20.7425C20.3226 21.1684 19.9179 21.4317 19.349 21.6523C18.923 21.8197 18.2778 22.0174 17.0896 22.0722C15.8071 22.1301 15.4222 22.1437 12.1725 22.1437C8.92287 22.1437 8.53651 22.1301 7.25395 22.0722C6.06727 22.0174 5.42369 21.8197 4.99473 21.6523C4.46597 21.4574 3.98778 21.1465 3.59506 20.7425C3.1899 20.35 2.87805 19.8718 2.68223 19.3428C2.51643 18.9153 2.3171 18.2702 2.26382 17.0836C2.20607 15.8011 2.1939 15.4161 2.1939 12.165C2.1939 8.9153 2.20607 8.53191 2.26382 7.24935C2.31859 6.06267 2.51643 5.41761 2.68372 4.98865C2.90428 4.4212 3.16907 4.01496 3.59506 3.58897C4.02105 3.16299 4.42567 2.89982 4.99473 2.67912C5.42369 2.51184 6.06727 2.31399 7.25395 2.25922C8.3768 2.20756 8.81184 2.19228 11.0803 2.19079V2.1939ZM18.6689 4.21416C18.477 4.21416 18.2871 4.25203 18.11 4.32546C17.9327 4.39875 17.7718 4.5064 17.6361 4.64204C17.5005 4.77768 17.393 4.93861 17.3195 5.1159C17.2461 5.29306 17.2084 5.48292 17.2084 5.67482C17.2084 5.86658 17.2461 6.05645 17.3195 6.23361C17.393 6.4109 17.5005 6.57183 17.6361 6.70747C17.7718 6.84311 17.9327 6.95076 18.11 7.02405C18.2871 7.09748 18.477 7.13535 18.6689 7.13535C19.0562 7.13535 19.4277 6.98145 19.7017 6.70747C19.9755 6.43362 20.1294 6.06213 20.1294 5.67482C20.1294 5.28738 19.9755 4.91589 19.7017 4.64204C19.4277 4.36806 19.0562 4.21416 18.6689 4.21416ZM12.1725 5.92122C11.3436 5.90824 10.5203 6.06037 9.7505 6.36871C8.98075 6.67704 8.2801 7.13535 7.68927 7.71713C7.09843 8.29877 6.62917 8.99224 6.30893 9.75699C5.9887 10.5217 5.82372 11.3426 5.82372 12.1719C5.82372 13.001 5.9887 13.8219 6.30893 14.5866C6.62917 15.3514 7.09843 16.0448 7.68927 16.6265C8.2801 17.2083 8.98075 17.6666 9.7505 17.9749C10.5203 18.2832 11.3436 18.4354 12.1725 18.4224C13.8135 18.3968 15.3784 17.727 16.5298 16.5576C17.6812 15.3881 18.3264 13.8129 18.3264 12.1719C18.3264 10.5308 17.6812 8.95546 16.5298 7.78609C15.3784 6.61659 13.8135 5.94678 12.1725 5.92122ZM12.1725 8.1135C13.2487 8.1135 14.2807 8.54097 15.0417 9.30193C15.8026 10.0629 16.2301 11.095 16.2301 12.1711C16.2301 13.2471 15.8026 14.2792 15.0417 15.0402C14.2807 15.8011 13.2487 16.2286 12.1725 16.2286C11.0965 16.2286 10.0644 15.8011 9.30342 15.0402C8.54259 14.2792 8.11512 13.2471 8.11512 12.1711C8.11512 11.095 8.54259 10.0629 9.30342 9.30193C10.0644 8.54097 11.0965 8.1135 12.1725 8.1135Z" }))),
1949
+ icon === "youtube" && (React.createElement("svg", { width: "33", height: "23", viewBox: "0 0 33 23", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1950
+ React.createElement("path", { d: "M19.537 11.1568L20.0249 12.046C20.3495 11.8679 20.5513 11.5271 20.5513 11.1568C20.5513 10.7865 20.3495 10.4457 20.0249 10.2676L19.537 11.1568ZM14.3305 14.0139H13.3163C13.3163 14.3723 13.5054 14.7041 13.8139 14.8867C14.1222 15.0693 14.5043 15.0755 14.8184 14.9031L14.3305 14.0139ZM14.3305 8.29971L14.8184 7.41055C14.5043 7.23813 14.1222 7.24435 13.8139 7.42691C13.5054 7.60948 13.3163 7.94134 13.3163 8.29971H14.3305ZM16.5619 21.2993L16.5589 22.3136H16.5619V21.2993ZM10.7425 21.2051L10.7724 20.1912H10.7698L10.7425 21.2051ZM19.0491 10.2676L13.8426 13.1247L14.8184 14.9031L20.0249 12.046L19.0491 10.2676ZM15.3448 14.0139V8.29971H13.3163V14.0139H15.3448ZM13.8426 9.18888L19.0491 12.046L20.0249 10.2676L14.8184 7.41055L13.8426 9.18888ZM2.70039 10.1454C2.70039 8.04791 2.70271 6.58075 2.85884 5.4671C3.01002 4.38875 3.28882 3.78371 3.74519 3.33284L2.31959 1.88976C1.42971 2.76891 1.03537 3.86309 0.84998 5.18541C0.66955 6.47243 0.671876 8.10728 0.671876 10.1454H2.70039ZM3.74519 3.33284C4.20981 2.87386 4.84263 2.5827 5.96155 2.405C7.10955 2.22271 8.62188 2.17957 10.7702 2.12101L10.715 0.0931763C8.62228 0.15038 6.95309 0.193655 5.64335 0.401645C4.3044 0.614232 3.20271 1.01736 2.31959 1.88976L3.74519 3.33284ZM10.7702 2.12101C12.7741 2.06678 14.8165 2.02851 16.5619 2.02851V0C14.7906 0 12.7276 0.0388123 10.715 0.0931763L10.7702 2.12101ZM16.5619 2.02851C18.3057 2.02851 20.3484 2.06678 22.3538 2.12101L22.409 0.0931763C20.3949 0.0388123 18.3317 0 16.5619 0V2.02851ZM22.3538 2.12101C24.5021 2.17957 26.0142 2.22271 27.162 2.405C28.2807 2.5827 28.9129 2.87386 29.3766 3.33257L30.8031 1.89017C29.9205 1.01737 28.8189 0.614232 27.4802 0.401645C26.1706 0.193655 24.5017 0.15038 22.409 0.0931763L22.3538 2.12101ZM29.3766 3.33257C29.8335 3.78344 30.1134 4.38929 30.2647 5.46778C30.421 6.58143 30.4233 8.04872 30.4233 10.1454H32.4519C32.4519 8.10795 32.4542 6.47311 32.2735 5.18582C32.0879 3.86323 31.694 2.76932 30.8031 1.89017L29.3766 3.33257ZM30.4233 10.1454V12.1667H32.4519V10.1454H30.4233ZM30.4233 12.1667C30.4233 14.2649 30.421 15.7322 30.2649 16.8458C30.1138 17.924 29.8349 18.5294 29.3781 18.981L30.8038 20.4242C31.6932 19.5445 32.0883 18.45 32.2738 17.1274C32.4542 15.8404 32.4519 14.2056 32.4519 12.1667H30.4233ZM29.3781 18.981C28.9133 19.4396 28.2814 19.7302 27.1627 19.9078C26.015 20.0901 24.5027 20.1334 22.3539 20.1912L22.4086 22.2189C24.5024 22.1625 26.1712 22.1193 27.4809 21.9113C28.8199 21.6986 29.9208 21.2954 30.8038 20.4242L29.3781 18.981ZM22.3539 20.1912C20.3506 20.2468 18.3072 20.2851 16.5619 20.2851V22.3136C18.3332 22.3136 20.3955 22.2748 22.4086 22.2189L22.3539 20.1912ZM16.5648 20.2851C14.6337 20.2795 12.7027 20.2482 10.7724 20.1912L10.7126 22.2189C12.6608 22.2764 14.6098 22.3079 16.5589 22.3136L16.5648 20.2851ZM10.7698 20.1912C8.6216 20.1332 7.10942 20.0905 5.96142 19.9083C4.84259 19.7308 4.20979 19.4396 3.74518 18.9808L2.31919 20.4234C3.20232 21.2958 4.30444 21.6994 5.64348 21.9118C6.95336 22.1197 8.62228 22.1625 10.7152 22.2189L10.7698 20.1912ZM3.74518 18.9808C3.28844 18.5291 3.01002 17.9238 2.85884 16.8454C2.70271 15.7318 2.70039 14.2649 2.70039 12.1682H0.671876C0.671876 14.2057 0.66955 15.8401 0.84998 17.1271C1.03537 18.4494 1.42967 19.5437 2.31919 20.4234L3.74518 18.9808ZM2.70039 12.1682V10.1454H0.671876V12.1682H2.70039Z" }))),
1951
+ icon === "linkedin" && (React.createElement("svg", { width: "27", height: "26", viewBox: "0 0 27 26", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1952
+ React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.43122 0C3.51704 0 2.64031 0.363144 1.99392 1.00955C1.34752 1.65595 0.984375 2.53266 0.984375 3.44684C0.984375 4.36102 1.34752 5.23775 1.99392 5.88403C2.64031 6.53045 3.51704 6.89369 4.43122 6.89369C5.3454 6.89369 6.22212 6.53045 6.8684 5.88403C7.51482 5.23775 7.87806 4.36102 7.87806 3.44684C7.87806 2.53266 7.51482 1.65595 6.8684 1.00955C6.22212 0.363144 5.3454 0 4.43122 0ZM2.8644 3.44684C2.8644 3.03127 3.02952 2.63279 3.32338 2.33897C3.61711 2.04514 4.01564 1.88008 4.43122 1.88008C4.84666 1.88008 5.24519 2.04514 5.53905 2.33897C5.83292 2.63279 5.9979 3.03127 5.9979 3.44684C5.9979 3.86228 5.83292 4.26082 5.53905 4.55468C5.24519 4.84854 4.84666 5.01353 4.43122 5.01353C4.01564 5.01353 3.61711 4.84854 3.32338 4.55468C3.02952 4.26082 2.8644 3.86228 2.8644 3.44684ZM0.984375 8.46037C0.984375 8.211 1.08342 7.97191 1.25971 7.7957C1.436 7.61935 1.6751 7.52036 1.92441 7.52036H6.93791C7.18729 7.52036 7.42638 7.61935 7.60272 7.7957C7.77893 7.97191 7.87806 8.211 7.87806 8.46037V24.7544C7.87806 25.0037 7.77893 25.2428 7.60272 25.4191C7.42638 25.5955 7.18729 25.6945 6.93791 25.6945H1.92441C1.6751 25.6945 1.436 25.5955 1.25971 25.4191C1.08342 25.2428 0.984375 25.0037 0.984375 24.7544V8.46037ZM2.8644 9.40038V23.8144H5.9979V9.40038H2.8644ZM9.75808 8.46037C9.75808 8.211 9.85707 7.97191 10.0334 7.7957C10.2098 7.61935 10.4489 7.52036 10.6981 7.52036H15.7116C15.961 7.52036 16.2001 7.61935 16.3764 7.7957C16.5526 7.97191 16.6518 8.211 16.6518 8.46037V9.00428L17.1969 8.76992C18.137 8.36828 19.1343 8.11661 20.1524 8.02424C23.6307 7.70834 26.6788 10.4407 26.6788 13.9502V24.7544C26.6788 25.0037 26.5798 25.2428 26.4035 25.4191C26.2271 25.5955 25.9881 25.6945 25.7388 25.6945H20.7253C20.4759 25.6945 20.2368 25.5955 20.0605 25.4191C19.8843 25.2428 19.7851 25.0037 19.7851 24.7544V15.9807C19.7851 15.5652 19.6202 15.1666 19.3263 14.8729C19.0324 14.579 18.634 14.4139 18.2185 14.4139C17.8029 14.4139 17.4045 14.579 17.1106 14.8729C16.8168 15.1666 16.6518 15.5652 16.6518 15.9807V24.7544C16.6518 25.0037 16.5526 25.2428 16.3764 25.4191C16.2001 25.5955 15.961 25.6945 15.7116 25.6945H10.6981C10.4489 25.6945 10.2098 25.5955 10.0334 25.4191C9.85707 25.2428 9.75808 25.0037 9.75808 24.7544V8.46037ZM11.6381 9.40038V23.8144H14.7716V15.9807C14.7716 15.0666 15.1349 14.1898 15.7811 13.5434C16.4276 12.897 17.3043 12.5339 18.2185 12.5339C19.1326 12.5339 20.0094 12.897 20.6558 13.5434C21.3022 14.1898 21.6653 15.0666 21.6653 15.9807V23.8144H24.7988V13.9502C24.7988 11.5637 22.7169 9.67869 20.3242 9.89669C19.5021 9.97148 18.6969 10.1746 17.9377 10.4983L16.0827 11.2943C15.9396 11.3557 15.7836 11.3807 15.6285 11.367C15.4733 11.3532 15.324 11.301 15.1941 11.2152C15.0641 11.1295 14.9574 11.0128 14.8837 10.8757C14.81 10.7385 14.7715 10.5852 14.7716 10.4294V9.40038H11.6381Z" }))),
1953
+ icon === "hamburgerMenu" && (React.createElement("svg", { width: "36px", height: "36px", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" },
1954
+ React.createElement("path", { d: "M3 6.00092H21M3 12.0009H21M3 18.0009H21", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round" }))),
1955
+ icon === "arrow-long" && (React.createElement("svg", { width: "18", height: "10", viewBox: "0 0 18 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1956
+ React.createElement("path", { d: "M11.9985 0C13.2081 1.34446 14.2541 2.36903 15.1363 3.07371C16.0186 3.76912 16.8508 4.28836 17.633 4.63143V5.2573C16.7325 5.70236 15.8594 6.2726 15.0135 6.96801C14.1677 7.65415 13.1581 8.66481 11.9848 10H10.9343C11.7893 8.1363 12.6852 6.70375 13.622 5.70236H0V4.29764H13.622C12.9307 3.39824 12.4487 2.73064 12.1758 2.29485C11.903 1.85906 11.4982 1.09411 10.9616 0H11.9985Z" }))),
1957
+ icon === "arrow-caret" && (React.createElement("svg", { width: "8", height: "10", viewBox: "0 0 8 10", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
1958
+ React.createElement("path", { d: "M1 1L6 5L1 9", stroke: "white", "stroke-width": "1.5" })))));
1959
+ }
1960
+ var IconContainer = newStyled.span(templateObject_1$5 || (templateObject_1$5 = __makeTemplateObject(["\n all: unset;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-top: 1px;\n width: ", ";\n height: ", ";\n border: ", ";\n border-radius: 4px;\n transition: all 0.2s;\n cursor: pointer;\n svg {\n transition: all 0.2s;\n height: ", ";\n fill: ", ";\n path{\n fill: ", "\n }\n }\n"], ["\n all: unset;\n display: flex;\n align-items: center;\n justify-content: center;\n padding-top: 1px;\n width: ", ";\n height: ", ";\n border: ", ";\n border-radius: 4px;\n transition: all 0.2s;\n cursor: pointer;\n svg {\n transition: all 0.2s;\n height: ", ";\n fill: ", ";\n path{\n fill: ", "\n }\n }\n"])), function (props) { return props.withBorder ? props.size : "unset"; }, function (props) { return props.withBorder ? props.size : "unset"; }, function (props) { return props.withBorder ? "2px solid ".concat(props.color) : "unset"; }, function (props) { return props.withBorder ? "53%" : props.size; }, function (props) { return props.color; }, function (props) { return props.color; });
1961
+ var templateObject_1$5;
1962
+
1963
+ var theme = {
1964
+ primary: "#DC3737",
1965
+ secondary: "hsl(0, 0%, 96%)",
1966
+ accent: "",
1967
+ black: "#2c2c2c",
1968
+ white: "white",
1969
+ };
1970
+
1971
+ var formatText = function (text, format) {
1972
+ switch (format) {
1973
+ case 'first-capitalized':
1974
+ return text.slice(0, 1).toLocaleUpperCase() + text.slice(1).toLocaleLowerCase();
1975
+ case 'uppercase':
1976
+ return text.toLocaleUpperCase();
1977
+ case 'lowercase':
1978
+ return text.toLocaleLowerCase();
1979
+ }
1980
+ };
1981
+
1982
+ function Button(props) {
1983
+ var children = props.children, onClick = props.onClick, type = props.type, colors = props.colors, arrow = props.arrow, _a = props.font, font = _a === undefined ? {
1984
+ size: '16px',
1985
+ casing: 'uppercase',
1986
+ weight: '600'
1987
+ } : _a;
1988
+ switch (type) {
1989
+ default:
1990
+ return (React.createElement(DefaultButton, { onClick: onClick, colors: colors, font: font, hasArrow: arrow !== undefined },
1991
+ font.casing ? formatText(children, font.casing) : children,
1992
+ arrow &&
1993
+ React.createElement(Icon, { icon: arrow, color: (colors === null || colors === undefined ? undefined : colors.text) || theme.white })));
1994
+ case "rounded":
1995
+ return (React.createElement(RoundedButton, { onClick: onClick, colors: colors, font: font, hasArrow: arrow !== undefined },
1996
+ font.casing ? formatText(children, font.casing) : children,
1997
+ arrow &&
1998
+ React.createElement(Icon, { icon: arrow, color: (colors === null || colors === undefined ? undefined : colors.text) || theme.white })));
1999
+ case "pill":
2000
+ return (React.createElement(PillButton, { onClick: onClick, colors: colors, font: font, hasArrow: arrow !== undefined },
2001
+ font.casing ? formatText(children, font.casing) : children,
2002
+ arrow &&
2003
+ React.createElement(Icon, { icon: arrow, color: (colors === null || colors === undefined ? undefined : colors.text) || theme.white })));
2004
+ case "underlined":
2005
+ return (React.createElement(UnderlinedButton, { onClick: onClick, colors: colors, font: font, hasArrow: arrow !== undefined },
2006
+ font.casing ? formatText(children, font.casing) : children,
2007
+ arrow &&
2008
+ React.createElement(Icon, { icon: arrow, color: (colors === null || colors === undefined ? undefined : colors.text) || theme.primary })));
2009
+ }
2010
+ }
2011
+ var DefaultButton = newStyled.button(templateObject_1$4 || (templateObject_1$4 = __makeTemplateObject(["\n all: unset; \n display: flex;\n align-items: center;\n padding: 10px 14px;\n letter-spacing: 1px;\n font-size: ", ";\n font-weight: ", ";\n cursor: pointer;\n width: fit-content;\n grid-area: button;\n transition: filter 0.3s, background-color 0.3s;\n gap: 11px;\n background-color: ", ";\n color: ", ";\n position: relative;\n svg {\n fill: ", ";\n transition: all 0.3s;\n }\n &:hover{\n ", ";\n color: ", ";\n svg {\n fill: ", ";\n transform: translateX(5px);\n }\n &::after{\n transform: translateX(4px);\n }\n }\n &::after{\n display: ", ";\n content: \"\";\n width: 100%;\n height: 100%;\n position: absolute;\n transition: all 0.3s;\n background-color: ", ";\n left: 0;\n top: 0;\n z-index: -1;\n border-radius: inherit;\n transform-origin: left;\n }\n"], ["\n all: unset; \n display: flex;\n align-items: center;\n padding: 10px 14px;\n letter-spacing: 1px;\n font-size: ", ";\n font-weight: ", ";\n cursor: pointer;\n width: fit-content;\n grid-area: button;\n transition: filter 0.3s, background-color 0.3s;\n gap: 11px;\n background-color: ", ";\n color: ", ";\n position: relative;\n svg {\n fill: ", ";\n transition: all 0.3s;\n }\n &:hover{\n ", ";\n color: ", ";\n svg {\n fill: ", ";\n transform: translateX(5px);\n }\n &::after{\n transform: translateX(4px);\n }\n }\n &::after{\n display: ", ";\n content: \"\";\n width: 100%;\n height: 100%;\n position: absolute;\n transition: all 0.3s;\n background-color: ", ";\n left: 0;\n top: 0;\n z-index: -1;\n border-radius: inherit;\n transform-origin: left;\n }\n"])), function (props) { var _a; return (_a = props.font) === null || _a === undefined ? undefined : _a.size; }, function (props) { var _a; return (_a = props.font) === null || _a === undefined ? undefined : _a.weight; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.background) || theme.primary; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.text) || theme.white; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.text) || theme.white; }, function (props) { var _a, _b; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.backgroundHover) ? "background-color: ".concat((_b = props.colors) === null || _b === undefined ? undefined : _b.backgroundHover) : "filter: brightness(1.4)"; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.textHover) || theme.white; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.textHover) || theme.white; }, function (props) { return props.hasArrow ? "unset" : "none"; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.background) || theme.primary; });
2012
+ var UnderlinedButton = newStyled(DefaultButton)(templateObject_2$3 || (templateObject_2$3 = __makeTemplateObject(["\n background-color: ", ";\n color: ", ";\n padding: 10px 0px;\n letter-spacing: 2px;\n &::before{\n content: \"\";\n position: absolute;\n left: 0;\n bottom: 0;\n width: 99%;\n height: 2.5px;\n background-color: ", ";\n transition: 0.2s;\n }\n svg{\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n &::after{\n display: none;\n }\n &:hover{\n color: ", ";\n transform: translateY(-1px);\n svg{\n transform: translateX(6px);\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n &::before{\n transform: translateY(4px);\n }\n }\n"], ["\n background-color: ", ";\n color: ", ";\n padding: 10px 0px;\n letter-spacing: 2px;\n &::before{\n content: \"\";\n position: absolute;\n left: 0;\n bottom: 0;\n width: 99%;\n height: 2.5px;\n background-color: ", ";\n transition: 0.2s;\n }\n svg{\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n &::after{\n display: none;\n }\n &:hover{\n color: ", ";\n transform: translateY(-1px);\n svg{\n transform: translateX(6px);\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n &::before{\n transform: translateY(4px);\n }\n }\n"])), function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.background) || 'transparent'; }, function (props) { return props.color || theme.black; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.border) || theme.primary; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.border) || theme.primary; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.border) || theme.primary; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.textHover) || theme.black; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.borderHover) || theme.primary; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.borderHover) || theme.primary; });
2013
+ var PillButton = newStyled(DefaultButton)(templateObject_3$3 || (templateObject_3$3 = __makeTemplateObject(["\n border-radius: 30px;\n letter-spacing: 1px;\n text-transform: uppercase;\n "], ["\n border-radius: 30px;\n letter-spacing: 1px;\n text-transform: uppercase;\n "])));
2014
+ var RoundedButton = newStyled(DefaultButton)(templateObject_4$1 || (templateObject_4$1 = __makeTemplateObject(["\n border-radius: 4px;\n"], ["\n border-radius: 4px;\n"])));
2015
+ var templateObject_1$4, templateObject_2$3, templateObject_3$3, templateObject_4$1;
2016
+
2017
+ function insertWithoutScoping(cache, serialized) {
2018
+ if (cache.inserted[serialized.name] === undefined) {
2019
+ return cache.insert('', serialized, cache.sheet, true);
2020
+ }
2021
+ }
2022
+
2023
+ function merge(registered, css, className) {
2024
+ var registeredStyles = [];
2025
+ var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
2026
+
2027
+ if (registeredStyles.length < 2) {
2028
+ return className;
2029
+ }
2030
+
2031
+ return rawClassName + css(registeredStyles);
2032
+ }
2033
+
2034
+ var createEmotion = function createEmotion(options) {
2035
+ var cache = createCache(options);
2036
+
2037
+ cache.sheet.speedy = function (value) {
2038
+
2039
+ this.isSpeedy = value;
2040
+ };
2041
+
2042
+ cache.compat = true;
2043
+
2044
+ var css = function css() {
2045
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2046
+ args[_key] = arguments[_key];
2047
+ }
2048
+
2049
+ var serialized = serializeStyles(args, cache.registered, undefined);
2050
+ insertStyles(cache, serialized, false);
2051
+ return cache.key + "-" + serialized.name;
2052
+ };
2053
+
2054
+ var keyframes = function keyframes() {
2055
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2056
+ args[_key2] = arguments[_key2];
2057
+ }
2058
+
2059
+ var serialized = serializeStyles(args, cache.registered);
2060
+ var animation = "animation-" + serialized.name;
2061
+ insertWithoutScoping(cache, {
2062
+ name: serialized.name,
2063
+ styles: "@keyframes " + animation + "{" + serialized.styles + "}"
2064
+ });
2065
+ return animation;
2066
+ };
2067
+
2068
+ var injectGlobal = function injectGlobal() {
2069
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
2070
+ args[_key3] = arguments[_key3];
2071
+ }
2072
+
2073
+ var serialized = serializeStyles(args, cache.registered);
2074
+ insertWithoutScoping(cache, serialized);
2075
+ };
2076
+
2077
+ var cx = function cx() {
2078
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
2079
+ args[_key4] = arguments[_key4];
2080
+ }
2081
+
2082
+ return merge(cache.registered, css, classnames(args));
2083
+ };
2084
+
2085
+ return {
2086
+ css: css,
2087
+ cx: cx,
2088
+ injectGlobal: injectGlobal,
2089
+ keyframes: keyframes,
2090
+ hydrate: function hydrate(ids) {
2091
+ ids.forEach(function (key) {
2092
+ cache.inserted[key] = true;
2093
+ });
2094
+ },
2095
+ flush: function flush() {
2096
+ cache.registered = {};
2097
+ cache.inserted = {};
2098
+ cache.sheet.flush();
2099
+ },
2100
+ sheet: cache.sheet,
2101
+ cache: cache,
2102
+ getRegisteredStyles: getRegisteredStyles.bind(null, cache.registered),
2103
+ merge: merge.bind(null, cache.registered, css)
2104
+ };
2105
+ };
2106
+
2107
+ var classnames = function classnames(args) {
2108
+ var cls = '';
2109
+
2110
+ for (var i = 0; i < args.length; i++) {
2111
+ var arg = args[i];
2112
+ if (arg == null) continue;
2113
+ var toAdd = undefined;
2114
+
2115
+ switch (typeof arg) {
2116
+ case 'boolean':
2117
+ break;
2118
+
2119
+ case 'object':
2120
+ {
2121
+ if (Array.isArray(arg)) {
2122
+ toAdd = classnames(arg);
2123
+ } else {
2124
+ toAdd = '';
2125
+
2126
+ for (var k in arg) {
2127
+ if (arg[k] && k) {
2128
+ toAdd && (toAdd += ' ');
2129
+ toAdd += k;
2130
+ }
2131
+ }
2132
+ }
2133
+
2134
+ break;
2135
+ }
2136
+
2137
+ default:
2138
+ {
2139
+ toAdd = arg;
2140
+ }
2141
+ }
2142
+
2143
+ if (toAdd) {
2144
+ cls && (cls += ' ');
2145
+ cls += toAdd;
2146
+ }
2147
+ }
2148
+
2149
+ return cls;
2150
+ };
2151
+
2152
+ var _createEmotion = createEmotion({
2153
+ key: 'css'
2154
+ }),
2155
+ keyframes = _createEmotion.keyframes;
2156
+
2157
+ var appearAnimation = keyframes(templateObject_1$3 || (templateObject_1$3 = __makeTemplateObject(["\n 0% {\n display: none;\n opacity: 0%;\n transform: translateY(-6px);\n }\n 1% {\n display: flex;\n opacity: 0%;\n }\n 100% {\n display: flex;\n opacity: 100%;\n transform: translateY(0px);\n }\n"], ["\n 0% {\n display: none;\n opacity: 0%;\n transform: translateY(-6px);\n }\n 1% {\n display: flex;\n opacity: 0%;\n }\n 100% {\n display: flex;\n opacity: 100%;\n transform: translateY(0px);\n }\n"])));
2158
+ var disappearAnimation = keyframes(templateObject_2$2 || (templateObject_2$2 = __makeTemplateObject(["\n 0% {\n transform: translateY(0px);\n display: flex;\n opacity: 100%;\n }\n 99% {\n display: flex;\n opacity: 0%;\n }\n 100% {\n transform: translateY(-6px);\n display: none;\n opacity: 0%;\n }\n"], ["\n 0% {\n transform: translateY(0px);\n display: flex;\n opacity: 100%;\n }\n 99% {\n display: flex;\n opacity: 0%;\n }\n 100% {\n transform: translateY(-6px);\n display: none;\n opacity: 0%;\n }\n"])));
2159
+ var fadeInFromLeft = keyframes(templateObject_3$2 || (templateObject_3$2 = __makeTemplateObject(["\n from {\n opacity: 0;\n transform: translateX(-20px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n"], ["\n from {\n opacity: 0;\n transform: translateX(-20px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n"])));
2160
+ var fadeInFromRight = keyframes(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n from {\n opacity: 0;\n transform: translateX(20px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n"], ["\n from {\n opacity: 0;\n transform: translateX(20px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n"])));
2161
+ var fadeInFromTop = keyframes(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n from {\n opacity: 0;\n transform: translateY(-20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n"], ["\n from {\n opacity: 0;\n transform: translateY(-20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n"])));
2162
+ var fadeInFromBottom = keyframes(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n from {\n opacity: 0;\n transform: translateY(20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n"], ["\n from {\n opacity: 0;\n transform: translateY(20px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n"])));
2163
+ var templateObject_1$3, templateObject_2$2, templateObject_3$2, templateObject_4, templateObject_5, templateObject_6;
2164
+
2165
+ function Navbar(props) {
2166
+ var logo = props.logo, items = props.items, button = props.button, config = props.config;
2167
+ return (React.createElement(React.Fragment, null,
2168
+ React.createElement(NavbarContainer, { height: config.height, colors: config.colors, centeredItems: config.centeredItems },
2169
+ React.createElement(Logo, { src: logo === null || logo === undefined ? undefined : logo.url, onClick: logo === null || logo === undefined ? undefined : logo.onClick }),
2170
+ React.createElement("div", null, items === null || items === undefined ? undefined : items.map(function (item) {
2171
+ var _a;
2172
+ return (React.createElement("a", { key: item.label, href: "#", onClick: function (e) {
2173
+ e.preventDefault();
2174
+ item.onClick && item.onClick();
2175
+ } },
2176
+ item.label,
2177
+ item.subitems && (React.createElement(React.Fragment, null,
2178
+ React.createElement(Icon, { icon: 'arrow-caret', size: '8px' }),
2179
+ React.createElement("div", null, (_a = item.subitems) === null || _a === undefined ? undefined : _a.map(function (subitem) {
2180
+ return (React.createElement(ControlledNavItem, { key: subitem.label },
2181
+ React.createElement("a", { href: "#", onClick: function (e) {
2182
+ e.preventDefault();
2183
+ subitem.onClick && subitem.onClick();
2184
+ } }, subitem.label)));
2185
+ }))))));
2186
+ })),
2187
+ button &&
2188
+ React.createElement(Button, { colors: button.colors, type: button.type, font: button.font, onClick: button.onClick, arrow: button.arrow }, button.label))));
2189
+ }
2190
+ var NavbarContainer = newStyled.div(templateObject_1$2 || (templateObject_1$2 = __makeTemplateObject(["\n background-color: ", ";\n width: 100vw;\n height: ", ";\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n align-items: center;\n justify-content: space-between;\n padding: 0 4vw;\n z-index: 99;\n backdrop-filter: blur(4px);\n * {\n -webkit-user-drag: none;\n -khtml-user-drag: none;\n -moz-user-drag: none;\n -o-user-drag: none;\n }\n @media only screen and (max-width: 800px) {\n height: 80px;\n padding: 0 6vw;\n }\n & > div {\n display: flex;\n align-items: center;\n height: 100%;\n margin-left: ", ";\n & > a {\n color: ", ";\n position: relative;\n display: flex;\n gap: 5px;\n align-items: center;\n justify-content: center;\n height: 100%;\n font-size: 12px;\n letter-spacing: 2px;\n font-weight: 500;\n text-transform: uppercase;\n text-decoration: none;\n padding: 6px 22px 0;\n transition: 0.3s;\n border-bottom: 4px solid transparent;\n svg {\n margin-bottom: 1px;\n transform: rotateZ(90deg);\n }\n & > div {\n z-index: 10;\n position: absolute;\n display: none;\n flex-direction: column;\n align-items: flex-start;\n width: max-content;\n gap: 12px;\n top: 88%;\n left: 0;\n background-color: black;\n padding: 16px 14px;\n animation-name: ", ";\n animation-duration: 0.3s;\n animation-fill-mode: forwards;\n a {\n color: ", ";\n padding: 0;\n }\n &:hover {\n animation-name: ", ";\n display: flex;\n }\n }\n &:hover {\n border-color: white;\n svg {\n transform: rotateZ(90deg) rotateY(-180deg) translateX(1px);\n }\n & > div{\n animation-name: ", ";\n display: flex;\n }\n }\n }\n @media only screen and (max-width: 800px) {\n display: none;\n }\n }\n"], ["\n background-color: ", ";\n width: 100vw;\n height: ", ";\n display: flex;\n position: fixed;\n top: 0;\n left: 0;\n align-items: center;\n justify-content: space-between;\n padding: 0 4vw;\n z-index: 99;\n backdrop-filter: blur(4px);\n * {\n -webkit-user-drag: none;\n -khtml-user-drag: none;\n -moz-user-drag: none;\n -o-user-drag: none;\n }\n @media only screen and (max-width: 800px) {\n height: 80px;\n padding: 0 6vw;\n }\n & > div {\n display: flex;\n align-items: center;\n height: 100%;\n margin-left: ", ";\n & > a {\n color: ", ";\n position: relative;\n display: flex;\n gap: 5px;\n align-items: center;\n justify-content: center;\n height: 100%;\n font-size: 12px;\n letter-spacing: 2px;\n font-weight: 500;\n text-transform: uppercase;\n text-decoration: none;\n padding: 6px 22px 0;\n transition: 0.3s;\n border-bottom: 4px solid transparent;\n svg {\n margin-bottom: 1px;\n transform: rotateZ(90deg);\n }\n & > div {\n z-index: 10;\n position: absolute;\n display: none;\n flex-direction: column;\n align-items: flex-start;\n width: max-content;\n gap: 12px;\n top: 88%;\n left: 0;\n background-color: black;\n padding: 16px 14px;\n animation-name: ", ";\n animation-duration: 0.3s;\n animation-fill-mode: forwards;\n a {\n color: ", ";\n padding: 0;\n }\n &:hover {\n animation-name: ", ";\n display: flex;\n }\n }\n &:hover {\n border-color: white;\n svg {\n transform: rotateZ(90deg) rotateY(-180deg) translateX(1px);\n }\n & > div{\n animation-name: ", ";\n display: flex;\n }\n }\n }\n @media only screen and (max-width: 800px) {\n display: none;\n }\n }\n"])), function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.background) || theme.black; }, function (props) { return props.height || '80px'; }, function (props) { return props.centeredItems ? 'unset' : 'auto'; }, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.text) || theme.white; }, disappearAnimation, function (props) { var _a; return ((_a = props.colors) === null || _a === undefined ? undefined : _a.text) || theme.white; }, appearAnimation, appearAnimation);
2191
+ var Logo = newStyled.img(templateObject_2$1 || (templateObject_2$1 = __makeTemplateObject(["\n cursor: pointer;\n height: 56%;\n transition: all 0.2s;\n &:hover {\n filter: brightness(1.2);\n }\n"], ["\n cursor: pointer;\n height: 56%;\n transition: all 0.2s;\n &:hover {\n filter: brightness(1.2);\n }\n"])));
2192
+ var ControlledNavItem = newStyled.div(templateObject_3$1 || (templateObject_3$1 = __makeTemplateObject(["\n cursor: pointer;\n height: 100%;\n max-height: 90px;\n text-transform: uppercase;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: 0.3s;\n a {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: 0 22px;\n font-size: 12px;\n letter-spacing: 2px;\n font-weight: 500;\n text-decoration: none;\n }\n &:hover {\n & > div{\n display: flex;\n }\n }\n "], ["\n cursor: pointer;\n height: 100%;\n max-height: 90px;\n text-transform: uppercase;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: 0.3s;\n a {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n padding: 0 22px;\n font-size: 12px;\n letter-spacing: 2px;\n font-weight: 500;\n text-decoration: none;\n }\n &:hover {\n & > div{\n display: flex;\n }\n }\n "])));
2193
+ var templateObject_1$2, templateObject_2$1, templateObject_3$1;
2194
+
2195
+ function Hero(props) {
2196
+ var children = props.children, _a = props.imageUrls, imageUrls = _a === undefined ? [""] : _a, overlay = props.overlay, marginTop = props.marginTop, height = props.height;
2197
+ var _b = React.useState(imageUrls && imageUrls[0] ? imageUrls[0] : ""), activeBackgroundUrl = _b[0]; _b[1];
2198
+ return (React.createElement(React.Fragment, null,
2199
+ React.createElement(Container$1, { backgroundUrl: activeBackgroundUrl, marginTop: marginTop, height: height },
2200
+ overlay && (React.createElement(Overlay, { color: overlay.color, opacity: overlay.opacity })),
2201
+ React.createElement(HeroContent, null, children))));
2202
+ }
2203
+ var Container$1 = newStyled.div(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n position: relative;\n width: 100vw;\n height: 100vh;\n height: ", ";\n margin-top: ", ";\n background-image: url(", ");\n /* background-color: rgba(76, 88, 97, 0.7);\n background-blend-mode: luminosity; */\n background-position-y: 69%;\n background-size: cover;\n padding: 0 8vw;\n @media only screen and (max-width: 800px) {\n padding: 80px 10px;\n svg {\n max-height: 300px;\n transform: translateX(20px);\n }\n }\n"], ["\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n position: relative;\n width: 100vw;\n height: 100vh;\n height: ", ";\n margin-top: ", ";\n background-image: url(", ");\n /* background-color: rgba(76, 88, 97, 0.7);\n background-blend-mode: luminosity; */\n background-position-y: 69%;\n background-size: cover;\n padding: 0 8vw;\n @media only screen and (max-width: 800px) {\n padding: 80px 10px;\n svg {\n max-height: 300px;\n transform: translateX(20px);\n }\n }\n"])), function (props) { return "calc(".concat(props.height, " - ").concat(props.marginTop, ")"); }, function (props) { return props.marginTop; }, function (props) { return props.backgroundUrl; });
2204
+ var Overlay = newStyled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n z-index: 1;\n background-color: ", ";\n opacity: ", ";\n"], ["\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n z-index: 1;\n background-color: ", ";\n opacity: ", ";\n"])), function (props) { return props.color; }, function (props) { return props.opacity; });
2205
+ var HeroContent = newStyled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: 100%;\n z-index: 2;\n"], ["\n width: 100%;\n z-index: 2;\n"])));
2206
+ var templateObject_1$1, templateObject_2, templateObject_3;
2207
+
2208
+ function useIntObs(_a) {
2209
+ var _b;
2210
+ var _c = _a === undefined ? {} : _a, _d = _c.threshold, threshold = _d === undefined ? 0 : _d, _e = _c.root, root = _e === undefined ? null : _e, _f = _c.rootMargin, rootMargin = _f === undefined ? '0%' : _f, _g = _c.freezeOnceVisible, freezeOnceVisible = _g === undefined ? false : _g, _h = _c.initialIsIntersecting, initialIsIntersecting = _h === undefined ? false : _h, onChange = _c.onChange;
2211
+ var _j = React.useState(null), ref = _j[0], setRef = _j[1];
2212
+ var _k = React.useState(function () { return ({
2213
+ isIntersecting: initialIsIntersecting,
2214
+ entry: undefined,
2215
+ }); }), state = _k[0], setState = _k[1];
2216
+ var callbackRef = React.useRef(undefined);
2217
+ callbackRef.current = onChange;
2218
+ var frozen = ((_b = state.entry) === null || _b === undefined ? undefined : _b.isIntersecting) && freezeOnceVisible;
2219
+ React.useEffect(function () {
2220
+ if (!ref || frozen || !('IntersectionObserver' in window))
2221
+ return;
2222
+ var unobserve;
2223
+ var observer = new IntersectionObserver(function (entries) {
2224
+ var thresholds = Array.isArray(observer.thresholds)
2225
+ ? observer.thresholds
2226
+ : [observer.thresholds];
2227
+ entries.forEach(function (entry) {
2228
+ var isIntersecting = entry.isIntersecting &&
2229
+ thresholds.some(function (threshold) { return entry.intersectionRatio >= threshold; });
2230
+ setState({ isIntersecting: isIntersecting, entry: entry });
2231
+ if (callbackRef.current) {
2232
+ callbackRef.current(isIntersecting, entry);
2233
+ }
2234
+ if (isIntersecting && freezeOnceVisible && unobserve) {
2235
+ unobserve();
2236
+ unobserve = undefined;
2237
+ }
2238
+ });
2239
+ }, { threshold: threshold, root: root, rootMargin: rootMargin });
2240
+ observer.observe(ref);
2241
+ unobserve = function () { return observer.unobserve(ref); };
2242
+ return function () {
2243
+ observer.disconnect();
2244
+ };
2245
+ }, [ref, JSON.stringify(threshold), root, rootMargin, frozen, freezeOnceVisible]);
2246
+ var prevRef = React.useRef(null);
2247
+ React.useEffect(function () {
2248
+ var _a;
2249
+ if (!ref &&
2250
+ ((_a = state.entry) === null || _a === undefined ? undefined : _a.target) &&
2251
+ !freezeOnceVisible &&
2252
+ !frozen &&
2253
+ prevRef.current !== state.entry.target) {
2254
+ prevRef.current = state.entry.target;
2255
+ setState({ isIntersecting: initialIsIntersecting, entry: undefined });
2256
+ }
2257
+ }, [ref, state.entry, freezeOnceVisible, frozen, initialIsIntersecting]);
2258
+ var result = [
2259
+ setRef,
2260
+ !!state.isIntersecting,
2261
+ state.entry,
2262
+ ];
2263
+ result.ref = result[0];
2264
+ result.isIntersecting = result[1];
2265
+ result.entry = result[2];
2266
+ return result;
2267
+ }
2268
+
2269
+ function Fade(props) {
2270
+ var children = props.children, _a = props.type, type = _a === undefined ? 'bottom-to-top' : _a;
2271
+ var _b = useIntObs({
2272
+ threshold: 0,
2273
+ root: document,
2274
+ rootMargin: "-10% 0% -10% 0%"
2275
+ }), isIntersecting = _b.isIntersecting, ref = _b.ref;
2276
+ return (React.createElement(Container, { ref: ref, isVisible: isIntersecting, animation: function () {
2277
+ switch (type) {
2278
+ case 'bottom-to-top':
2279
+ return fadeInFromBottom;
2280
+ case 'top-to-bottom':
2281
+ return fadeInFromTop;
2282
+ case 'right-to-left':
2283
+ return fadeInFromRight;
2284
+ case 'left-to-right':
2285
+ return fadeInFromLeft;
2286
+ }
2287
+ } }, children));
2288
+ }
2289
+ var Container = newStyled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n opacity: 0;\n ", ";\n"], ["\n opacity: 0;\n ", ";\n"])), function (props) { return props.isVisible ? "animation: ".concat(props.animation(), " 0.8s ease forwards") : ''; });
2290
+ var templateObject_1;
2291
+
2292
+ exports.Button = Button;
2293
+ exports.Fade = Fade;
2294
+ exports.Hero = Hero;
2295
+ exports.Navbar = Navbar;
2296
+ //# sourceMappingURL=index.cjs.js.map