@insforge/react 0.7.10 → 0.7.11

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.
package/dist/index.js CHANGED
@@ -12,17 +12,418 @@ if (typeof document !== 'undefined' && typeof window !== 'undefined') {
12
12
  }
13
13
  }
14
14
 
15
- import { createContext, useContext, useState, useMemo, useEffect, useRef, useCallback, isValidElement, cloneElement } from 'react';
15
+ import * as React2 from 'react';
16
+ import { createContext, forwardRef, useContext, useState, useMemo, useEffect, useRef, useCallback, isValidElement, cloneElement } from 'react';
16
17
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
17
18
  import { createClient } from '@insforge/sdk';
18
19
  import { InsforgeContext } from '@insforge/shared/react';
19
- import createCache from '@emotion/cache';
20
- import { keyframes as keyframes$1, CacheProvider } from '@emotion/react';
21
- import styled from '@emotion/styled';
22
20
  import { AlertTriangle, Check, EyeOff, Eye, Loader2, CircleCheck, LogOut } from 'lucide-react';
23
21
  import { z } from 'zod';
24
22
 
25
- // src/components/SignIn.tsx
23
+ var __create = Object.create;
24
+ var __defProp = Object.defineProperty;
25
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
26
+ var __getOwnPropNames = Object.getOwnPropertyNames;
27
+ var __getProtoOf = Object.getPrototypeOf;
28
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
29
+ var __commonJS = (cb, mod) => function __require() {
30
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
31
+ };
32
+ var __copyProps = (to, from2, except, desc) => {
33
+ if (from2 && typeof from2 === "object" || typeof from2 === "function") {
34
+ for (let key of __getOwnPropNames(from2))
35
+ if (!__hasOwnProp.call(to, key) && key !== except)
36
+ __defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
37
+ }
38
+ return to;
39
+ };
40
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
41
+ // If the importer is in node compatibility mode or this is not an ESM
42
+ // file that has been converted to a CommonJS file using a Babel-
43
+ // compatible transform (i.e. "__esModule" has not been set), then set
44
+ // "default" to the CommonJS "module.exports" for node compatibility.
45
+ !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
46
+ mod
47
+ ));
48
+
49
+ // ../node_modules/react-is/cjs/react-is.production.min.js
50
+ var require_react_is_production_min = __commonJS({
51
+ "../node_modules/react-is/cjs/react-is.production.min.js"(exports$1) {
52
+ var b = "function" === typeof Symbol && Symbol.for;
53
+ var c = b ? Symbol.for("react.element") : 60103;
54
+ var d = b ? Symbol.for("react.portal") : 60106;
55
+ var e = b ? Symbol.for("react.fragment") : 60107;
56
+ var f = b ? Symbol.for("react.strict_mode") : 60108;
57
+ var g = b ? Symbol.for("react.profiler") : 60114;
58
+ var h = b ? Symbol.for("react.provider") : 60109;
59
+ var k = b ? Symbol.for("react.context") : 60110;
60
+ var l = b ? Symbol.for("react.async_mode") : 60111;
61
+ var m = b ? Symbol.for("react.concurrent_mode") : 60111;
62
+ var n = b ? Symbol.for("react.forward_ref") : 60112;
63
+ var p = b ? Symbol.for("react.suspense") : 60113;
64
+ var q = b ? Symbol.for("react.suspense_list") : 60120;
65
+ var r = b ? Symbol.for("react.memo") : 60115;
66
+ var t = b ? Symbol.for("react.lazy") : 60116;
67
+ var v = b ? Symbol.for("react.block") : 60121;
68
+ var w = b ? Symbol.for("react.fundamental") : 60117;
69
+ var x = b ? Symbol.for("react.responder") : 60118;
70
+ var y = b ? Symbol.for("react.scope") : 60119;
71
+ function z2(a) {
72
+ if ("object" === typeof a && null !== a) {
73
+ var u = a.$$typeof;
74
+ switch (u) {
75
+ case c:
76
+ switch (a = a.type, a) {
77
+ case l:
78
+ case m:
79
+ case e:
80
+ case g:
81
+ case f:
82
+ case p:
83
+ return a;
84
+ default:
85
+ switch (a = a && a.$$typeof, a) {
86
+ case k:
87
+ case n:
88
+ case t:
89
+ case r:
90
+ case h:
91
+ return a;
92
+ default:
93
+ return u;
94
+ }
95
+ }
96
+ case d:
97
+ return u;
98
+ }
99
+ }
100
+ }
101
+ function A(a) {
102
+ return z2(a) === m;
103
+ }
104
+ exports$1.AsyncMode = l;
105
+ exports$1.ConcurrentMode = m;
106
+ exports$1.ContextConsumer = k;
107
+ exports$1.ContextProvider = h;
108
+ exports$1.Element = c;
109
+ exports$1.ForwardRef = n;
110
+ exports$1.Fragment = e;
111
+ exports$1.Lazy = t;
112
+ exports$1.Memo = r;
113
+ exports$1.Portal = d;
114
+ exports$1.Profiler = g;
115
+ exports$1.StrictMode = f;
116
+ exports$1.Suspense = p;
117
+ exports$1.isAsyncMode = function(a) {
118
+ return A(a) || z2(a) === l;
119
+ };
120
+ exports$1.isConcurrentMode = A;
121
+ exports$1.isContextConsumer = function(a) {
122
+ return z2(a) === k;
123
+ };
124
+ exports$1.isContextProvider = function(a) {
125
+ return z2(a) === h;
126
+ };
127
+ exports$1.isElement = function(a) {
128
+ return "object" === typeof a && null !== a && a.$$typeof === c;
129
+ };
130
+ exports$1.isForwardRef = function(a) {
131
+ return z2(a) === n;
132
+ };
133
+ exports$1.isFragment = function(a) {
134
+ return z2(a) === e;
135
+ };
136
+ exports$1.isLazy = function(a) {
137
+ return z2(a) === t;
138
+ };
139
+ exports$1.isMemo = function(a) {
140
+ return z2(a) === r;
141
+ };
142
+ exports$1.isPortal = function(a) {
143
+ return z2(a) === d;
144
+ };
145
+ exports$1.isProfiler = function(a) {
146
+ return z2(a) === g;
147
+ };
148
+ exports$1.isStrictMode = function(a) {
149
+ return z2(a) === f;
150
+ };
151
+ exports$1.isSuspense = function(a) {
152
+ return z2(a) === p;
153
+ };
154
+ exports$1.isValidElementType = function(a) {
155
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
156
+ };
157
+ exports$1.typeOf = z2;
158
+ }
159
+ });
160
+
161
+ // ../node_modules/react-is/cjs/react-is.development.js
162
+ var require_react_is_development = __commonJS({
163
+ "../node_modules/react-is/cjs/react-is.development.js"(exports$1) {
164
+ if (process.env.NODE_ENV !== "production") {
165
+ (function() {
166
+ var hasSymbol = typeof Symbol === "function" && Symbol.for;
167
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
168
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
169
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
170
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
171
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
172
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
173
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
174
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
175
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
176
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
177
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
178
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
179
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
180
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
181
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
182
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
183
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
184
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
185
+ function isValidElementType(type) {
186
+ return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
187
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
188
+ }
189
+ function typeOf(object) {
190
+ if (typeof object === "object" && object !== null) {
191
+ var $$typeof = object.$$typeof;
192
+ switch ($$typeof) {
193
+ case REACT_ELEMENT_TYPE:
194
+ var type = object.type;
195
+ switch (type) {
196
+ case REACT_ASYNC_MODE_TYPE:
197
+ case REACT_CONCURRENT_MODE_TYPE:
198
+ case REACT_FRAGMENT_TYPE:
199
+ case REACT_PROFILER_TYPE:
200
+ case REACT_STRICT_MODE_TYPE:
201
+ case REACT_SUSPENSE_TYPE:
202
+ return type;
203
+ default:
204
+ var $$typeofType = type && type.$$typeof;
205
+ switch ($$typeofType) {
206
+ case REACT_CONTEXT_TYPE:
207
+ case REACT_FORWARD_REF_TYPE:
208
+ case REACT_LAZY_TYPE:
209
+ case REACT_MEMO_TYPE:
210
+ case REACT_PROVIDER_TYPE:
211
+ return $$typeofType;
212
+ default:
213
+ return $$typeof;
214
+ }
215
+ }
216
+ case REACT_PORTAL_TYPE:
217
+ return $$typeof;
218
+ }
219
+ }
220
+ return void 0;
221
+ }
222
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
223
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
224
+ var ContextConsumer = REACT_CONTEXT_TYPE;
225
+ var ContextProvider = REACT_PROVIDER_TYPE;
226
+ var Element = REACT_ELEMENT_TYPE;
227
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
228
+ var Fragment9 = REACT_FRAGMENT_TYPE;
229
+ var Lazy = REACT_LAZY_TYPE;
230
+ var Memo = REACT_MEMO_TYPE;
231
+ var Portal = REACT_PORTAL_TYPE;
232
+ var Profiler = REACT_PROFILER_TYPE;
233
+ var StrictMode = REACT_STRICT_MODE_TYPE;
234
+ var Suspense = REACT_SUSPENSE_TYPE;
235
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
236
+ function isAsyncMode(object) {
237
+ {
238
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
239
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
240
+ console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
241
+ }
242
+ }
243
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
244
+ }
245
+ function isConcurrentMode(object) {
246
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
247
+ }
248
+ function isContextConsumer(object) {
249
+ return typeOf(object) === REACT_CONTEXT_TYPE;
250
+ }
251
+ function isContextProvider(object) {
252
+ return typeOf(object) === REACT_PROVIDER_TYPE;
253
+ }
254
+ function isElement(object) {
255
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
256
+ }
257
+ function isForwardRef(object) {
258
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
259
+ }
260
+ function isFragment(object) {
261
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
262
+ }
263
+ function isLazy(object) {
264
+ return typeOf(object) === REACT_LAZY_TYPE;
265
+ }
266
+ function isMemo(object) {
267
+ return typeOf(object) === REACT_MEMO_TYPE;
268
+ }
269
+ function isPortal(object) {
270
+ return typeOf(object) === REACT_PORTAL_TYPE;
271
+ }
272
+ function isProfiler(object) {
273
+ return typeOf(object) === REACT_PROFILER_TYPE;
274
+ }
275
+ function isStrictMode(object) {
276
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
277
+ }
278
+ function isSuspense(object) {
279
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
280
+ }
281
+ exports$1.AsyncMode = AsyncMode;
282
+ exports$1.ConcurrentMode = ConcurrentMode;
283
+ exports$1.ContextConsumer = ContextConsumer;
284
+ exports$1.ContextProvider = ContextProvider;
285
+ exports$1.Element = Element;
286
+ exports$1.ForwardRef = ForwardRef;
287
+ exports$1.Fragment = Fragment9;
288
+ exports$1.Lazy = Lazy;
289
+ exports$1.Memo = Memo;
290
+ exports$1.Portal = Portal;
291
+ exports$1.Profiler = Profiler;
292
+ exports$1.StrictMode = StrictMode;
293
+ exports$1.Suspense = Suspense;
294
+ exports$1.isAsyncMode = isAsyncMode;
295
+ exports$1.isConcurrentMode = isConcurrentMode;
296
+ exports$1.isContextConsumer = isContextConsumer;
297
+ exports$1.isContextProvider = isContextProvider;
298
+ exports$1.isElement = isElement;
299
+ exports$1.isForwardRef = isForwardRef;
300
+ exports$1.isFragment = isFragment;
301
+ exports$1.isLazy = isLazy;
302
+ exports$1.isMemo = isMemo;
303
+ exports$1.isPortal = isPortal;
304
+ exports$1.isProfiler = isProfiler;
305
+ exports$1.isStrictMode = isStrictMode;
306
+ exports$1.isSuspense = isSuspense;
307
+ exports$1.isValidElementType = isValidElementType;
308
+ exports$1.typeOf = typeOf;
309
+ })();
310
+ }
311
+ }
312
+ });
313
+
314
+ // ../node_modules/react-is/index.js
315
+ var require_react_is = __commonJS({
316
+ "../node_modules/react-is/index.js"(exports$1, module) {
317
+ if (process.env.NODE_ENV === "production") {
318
+ module.exports = require_react_is_production_min();
319
+ } else {
320
+ module.exports = require_react_is_development();
321
+ }
322
+ }
323
+ });
324
+
325
+ // ../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
326
+ var require_hoist_non_react_statics_cjs = __commonJS({
327
+ "../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(exports$1, module) {
328
+ var reactIs = require_react_is();
329
+ var REACT_STATICS = {
330
+ childContextTypes: true,
331
+ contextType: true,
332
+ contextTypes: true,
333
+ defaultProps: true,
334
+ displayName: true,
335
+ getDefaultProps: true,
336
+ getDerivedStateFromError: true,
337
+ getDerivedStateFromProps: true,
338
+ mixins: true,
339
+ propTypes: true,
340
+ type: true
341
+ };
342
+ var KNOWN_STATICS = {
343
+ name: true,
344
+ length: true,
345
+ prototype: true,
346
+ caller: true,
347
+ callee: true,
348
+ arguments: true,
349
+ arity: true
350
+ };
351
+ var FORWARD_REF_STATICS = {
352
+ "$$typeof": true,
353
+ render: true,
354
+ defaultProps: true,
355
+ displayName: true,
356
+ propTypes: true
357
+ };
358
+ var MEMO_STATICS = {
359
+ "$$typeof": true,
360
+ compare: true,
361
+ defaultProps: true,
362
+ displayName: true,
363
+ propTypes: true,
364
+ type: true
365
+ };
366
+ var TYPE_STATICS = {};
367
+ TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
368
+ TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
369
+ function getStatics(component) {
370
+ if (reactIs.isMemo(component)) {
371
+ return MEMO_STATICS;
372
+ }
373
+ return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
374
+ }
375
+ var defineProperty = Object.defineProperty;
376
+ var getOwnPropertyNames = Object.getOwnPropertyNames;
377
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
378
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
379
+ var getPrototypeOf = Object.getPrototypeOf;
380
+ var objectPrototype = Object.prototype;
381
+ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
382
+ if (typeof sourceComponent !== "string") {
383
+ if (objectPrototype) {
384
+ var inheritedComponent = getPrototypeOf(sourceComponent);
385
+ if (inheritedComponent && inheritedComponent !== objectPrototype) {
386
+ hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
387
+ }
388
+ }
389
+ var keys = getOwnPropertyNames(sourceComponent);
390
+ if (getOwnPropertySymbols) {
391
+ keys = keys.concat(getOwnPropertySymbols(sourceComponent));
392
+ }
393
+ var targetStatics = getStatics(targetComponent);
394
+ var sourceStatics = getStatics(sourceComponent);
395
+ for (var i = 0; i < keys.length; ++i) {
396
+ var key = keys[i];
397
+ if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
398
+ var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
399
+ try {
400
+ defineProperty(targetComponent, key, descriptor);
401
+ } catch (e) {
402
+ }
403
+ }
404
+ }
405
+ }
406
+ return targetComponent;
407
+ }
408
+ module.exports = hoistNonReactStatics;
409
+ }
410
+ });
411
+
412
+ // ../node_modules/@babel/runtime/helpers/extends.js
413
+ var require_extends = __commonJS({
414
+ "../node_modules/@babel/runtime/helpers/extends.js"(exports$1, module) {
415
+ function _extends2() {
416
+ return module.exports = _extends2 = Object.assign ? Object.assign.bind() : function(n) {
417
+ for (var e = 1; e < arguments.length; e++) {
418
+ var t = arguments[e];
419
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
420
+ }
421
+ return n;
422
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends2.apply(null, arguments);
423
+ }
424
+ module.exports = _extends2, module.exports.__esModule = true, module.exports["default"] = module.exports;
425
+ }
426
+ });
26
427
  var NavigationContext = createContext(null);
27
428
  function NavigationProvider({ adapter, children }) {
28
429
  return /* @__PURE__ */ jsx(NavigationContext.Provider, { value: adapter, children });
@@ -153,8 +554,8 @@ var InsforgeManager = class _InsforgeManager {
153
554
  try {
154
555
  const sessionResult = this.sdk.auth.getCurrentSession();
155
556
  const session = sessionResult.data?.session;
156
- const token = session?.accessToken || null;
157
- if (!token) {
557
+ const token2 = session?.accessToken || null;
558
+ if (!token2) {
158
559
  this.user = null;
159
560
  if (this.config.onAuthChange) {
160
561
  this.config.onAuthChange(null);
@@ -370,10 +771,10 @@ var InsforgeManager = class _InsforgeManager {
370
771
  const sdkResult = await this.sdk.auth.sendResetPasswordEmail({ email });
371
772
  return sdkResult.data;
372
773
  }
373
- async resetPassword(token, newPassword) {
774
+ async resetPassword(token2, newPassword) {
374
775
  const sdkResult = await this.sdk.auth.resetPassword({
375
776
  newPassword,
376
- otp: token
777
+ otp: token2
377
778
  });
378
779
  return sdkResult.data;
379
780
  }
@@ -469,6 +870,1314 @@ var InsforgeManager = class _InsforgeManager {
469
870
  this.listeners.clear();
470
871
  }
471
872
  };
873
+ function sheetForTag(tag) {
874
+ if (tag.sheet) {
875
+ return tag.sheet;
876
+ }
877
+ for (var i = 0; i < document.styleSheets.length; i++) {
878
+ if (document.styleSheets[i].ownerNode === tag) {
879
+ return document.styleSheets[i];
880
+ }
881
+ }
882
+ return void 0;
883
+ }
884
+ function createStyleElement(options) {
885
+ var tag = document.createElement("style");
886
+ tag.setAttribute("data-emotion", options.key);
887
+ if (options.nonce !== void 0) {
888
+ tag.setAttribute("nonce", options.nonce);
889
+ }
890
+ tag.appendChild(document.createTextNode(""));
891
+ tag.setAttribute("data-s", "");
892
+ return tag;
893
+ }
894
+ var StyleSheet = /* @__PURE__ */ (function() {
895
+ function StyleSheet2(options) {
896
+ var _this = this;
897
+ this._insertTag = function(tag) {
898
+ var before;
899
+ if (_this.tags.length === 0) {
900
+ if (_this.insertionPoint) {
901
+ before = _this.insertionPoint.nextSibling;
902
+ } else if (_this.prepend) {
903
+ before = _this.container.firstChild;
904
+ } else {
905
+ before = _this.before;
906
+ }
907
+ } else {
908
+ before = _this.tags[_this.tags.length - 1].nextSibling;
909
+ }
910
+ _this.container.insertBefore(tag, before);
911
+ _this.tags.push(tag);
912
+ };
913
+ this.isSpeedy = options.speedy === void 0 ? true : options.speedy;
914
+ this.tags = [];
915
+ this.ctr = 0;
916
+ this.nonce = options.nonce;
917
+ this.key = options.key;
918
+ this.container = options.container;
919
+ this.prepend = options.prepend;
920
+ this.insertionPoint = options.insertionPoint;
921
+ this.before = null;
922
+ }
923
+ var _proto = StyleSheet2.prototype;
924
+ _proto.hydrate = function hydrate(nodes) {
925
+ nodes.forEach(this._insertTag);
926
+ };
927
+ _proto.insert = function insert(rule) {
928
+ if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {
929
+ this._insertTag(createStyleElement(this));
930
+ }
931
+ var tag = this.tags[this.tags.length - 1];
932
+ if (this.isSpeedy) {
933
+ var sheet = sheetForTag(tag);
934
+ try {
935
+ sheet.insertRule(rule, sheet.cssRules.length);
936
+ } catch (e) {
937
+ }
938
+ } else {
939
+ tag.appendChild(document.createTextNode(rule));
940
+ }
941
+ this.ctr++;
942
+ };
943
+ _proto.flush = function flush() {
944
+ this.tags.forEach(function(tag) {
945
+ var _tag$parentNode;
946
+ return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
947
+ });
948
+ this.tags = [];
949
+ this.ctr = 0;
950
+ };
951
+ return StyleSheet2;
952
+ })();
953
+
954
+ // ../node_modules/stylis/src/Enum.js
955
+ var MS = "-ms-";
956
+ var MOZ = "-moz-";
957
+ var WEBKIT = "-webkit-";
958
+ var COMMENT = "comm";
959
+ var RULESET = "rule";
960
+ var DECLARATION = "decl";
961
+ var IMPORT = "@import";
962
+ var KEYFRAMES = "@keyframes";
963
+ var LAYER = "@layer";
964
+
965
+ // ../node_modules/stylis/src/Utility.js
966
+ var abs = Math.abs;
967
+ var from = String.fromCharCode;
968
+ var assign = Object.assign;
969
+ function hash(value, length2) {
970
+ return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
971
+ }
972
+ function trim(value) {
973
+ return value.trim();
974
+ }
975
+ function match(value, pattern) {
976
+ return (value = pattern.exec(value)) ? value[0] : value;
977
+ }
978
+ function replace(value, pattern, replacement) {
979
+ return value.replace(pattern, replacement);
980
+ }
981
+ function indexof(value, search) {
982
+ return value.indexOf(search);
983
+ }
984
+ function charat(value, index) {
985
+ return value.charCodeAt(index) | 0;
986
+ }
987
+ function substr(value, begin, end) {
988
+ return value.slice(begin, end);
989
+ }
990
+ function strlen(value) {
991
+ return value.length;
992
+ }
993
+ function sizeof(value) {
994
+ return value.length;
995
+ }
996
+ function append(value, array) {
997
+ return array.push(value), value;
998
+ }
999
+ function combine(array, callback) {
1000
+ return array.map(callback).join("");
1001
+ }
1002
+
1003
+ // ../node_modules/stylis/src/Tokenizer.js
1004
+ var line = 1;
1005
+ var column = 1;
1006
+ var length = 0;
1007
+ var position = 0;
1008
+ var character = 0;
1009
+ var characters = "";
1010
+ function node(value, root, parent, type, props, children, length2) {
1011
+ return { value, root, parent, type, props, children, line, column, length: length2, return: "" };
1012
+ }
1013
+ function copy(root, props) {
1014
+ return assign(node("", null, null, "", null, null, 0), root, { length: -root.length }, props);
1015
+ }
1016
+ function char() {
1017
+ return character;
1018
+ }
1019
+ function prev() {
1020
+ character = position > 0 ? charat(characters, --position) : 0;
1021
+ if (column--, character === 10)
1022
+ column = 1, line--;
1023
+ return character;
1024
+ }
1025
+ function next() {
1026
+ character = position < length ? charat(characters, position++) : 0;
1027
+ if (column++, character === 10)
1028
+ column = 1, line++;
1029
+ return character;
1030
+ }
1031
+ function peek() {
1032
+ return charat(characters, position);
1033
+ }
1034
+ function caret() {
1035
+ return position;
1036
+ }
1037
+ function slice(begin, end) {
1038
+ return substr(characters, begin, end);
1039
+ }
1040
+ function token(type) {
1041
+ switch (type) {
1042
+ // \0 \t \n \r \s whitespace token
1043
+ case 0:
1044
+ case 9:
1045
+ case 10:
1046
+ case 13:
1047
+ case 32:
1048
+ return 5;
1049
+ // ! + , / > @ ~ isolate token
1050
+ case 33:
1051
+ case 43:
1052
+ case 44:
1053
+ case 47:
1054
+ case 62:
1055
+ case 64:
1056
+ case 126:
1057
+ // ; { } breakpoint token
1058
+ case 59:
1059
+ case 123:
1060
+ case 125:
1061
+ return 4;
1062
+ // : accompanied token
1063
+ case 58:
1064
+ return 3;
1065
+ // " ' ( [ opening delimit token
1066
+ case 34:
1067
+ case 39:
1068
+ case 40:
1069
+ case 91:
1070
+ return 2;
1071
+ // ) ] closing delimit token
1072
+ case 41:
1073
+ case 93:
1074
+ return 1;
1075
+ }
1076
+ return 0;
1077
+ }
1078
+ function alloc(value) {
1079
+ return line = column = 1, length = strlen(characters = value), position = 0, [];
1080
+ }
1081
+ function dealloc(value) {
1082
+ return characters = "", value;
1083
+ }
1084
+ function delimit(type) {
1085
+ return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
1086
+ }
1087
+ function whitespace(type) {
1088
+ while (character = peek())
1089
+ if (character < 33)
1090
+ next();
1091
+ else
1092
+ break;
1093
+ return token(type) > 2 || token(character) > 3 ? "" : " ";
1094
+ }
1095
+ function escaping(index, count) {
1096
+ while (--count && next())
1097
+ if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
1098
+ break;
1099
+ return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
1100
+ }
1101
+ function delimiter(type) {
1102
+ while (next())
1103
+ switch (character) {
1104
+ // ] ) " '
1105
+ case type:
1106
+ return position;
1107
+ // " '
1108
+ case 34:
1109
+ case 39:
1110
+ if (type !== 34 && type !== 39)
1111
+ delimiter(character);
1112
+ break;
1113
+ // (
1114
+ case 40:
1115
+ if (type === 41)
1116
+ delimiter(type);
1117
+ break;
1118
+ // \
1119
+ case 92:
1120
+ next();
1121
+ break;
1122
+ }
1123
+ return position;
1124
+ }
1125
+ function commenter(type, index) {
1126
+ while (next())
1127
+ if (type + character === 47 + 10)
1128
+ break;
1129
+ else if (type + character === 42 + 42 && peek() === 47)
1130
+ break;
1131
+ return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
1132
+ }
1133
+ function identifier(index) {
1134
+ while (!token(peek()))
1135
+ next();
1136
+ return slice(index, position);
1137
+ }
1138
+
1139
+ // ../node_modules/stylis/src/Parser.js
1140
+ function compile(value) {
1141
+ return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
1142
+ }
1143
+ function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
1144
+ var index = 0;
1145
+ var offset = 0;
1146
+ var length2 = pseudo;
1147
+ var atrule = 0;
1148
+ var property = 0;
1149
+ var previous = 0;
1150
+ var variable = 1;
1151
+ var scanning = 1;
1152
+ var ampersand = 1;
1153
+ var character2 = 0;
1154
+ var type = "";
1155
+ var props = rules;
1156
+ var children = rulesets;
1157
+ var reference = rule;
1158
+ var characters2 = type;
1159
+ while (scanning)
1160
+ switch (previous = character2, character2 = next()) {
1161
+ // (
1162
+ case 40:
1163
+ if (previous != 108 && charat(characters2, length2 - 1) == 58) {
1164
+ if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1)
1165
+ ampersand = -1;
1166
+ break;
1167
+ }
1168
+ // " ' [
1169
+ case 34:
1170
+ case 39:
1171
+ case 91:
1172
+ characters2 += delimit(character2);
1173
+ break;
1174
+ // \t \n \r \s
1175
+ case 9:
1176
+ case 10:
1177
+ case 13:
1178
+ case 32:
1179
+ characters2 += whitespace(previous);
1180
+ break;
1181
+ // \
1182
+ case 92:
1183
+ characters2 += escaping(caret() - 1, 7);
1184
+ continue;
1185
+ // /
1186
+ case 47:
1187
+ switch (peek()) {
1188
+ case 42:
1189
+ case 47:
1190
+ append(comment(commenter(next(), caret()), root, parent), declarations);
1191
+ break;
1192
+ default:
1193
+ characters2 += "/";
1194
+ }
1195
+ break;
1196
+ // {
1197
+ case 123 * variable:
1198
+ points[index++] = strlen(characters2) * ampersand;
1199
+ // } ; \0
1200
+ case 125 * variable:
1201
+ case 59:
1202
+ case 0:
1203
+ switch (character2) {
1204
+ // \0 }
1205
+ case 0:
1206
+ case 125:
1207
+ scanning = 0;
1208
+ // ;
1209
+ case 59 + offset:
1210
+ if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
1211
+ if (property > 0 && strlen(characters2) - length2)
1212
+ append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
1213
+ break;
1214
+ // @ ;
1215
+ case 59:
1216
+ characters2 += ";";
1217
+ // { rule/at-rule
1218
+ default:
1219
+ append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2), rulesets);
1220
+ if (character2 === 123)
1221
+ if (offset === 0)
1222
+ parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
1223
+ else
1224
+ switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
1225
+ // d l m s
1226
+ case 100:
1227
+ case 108:
1228
+ case 109:
1229
+ case 115:
1230
+ parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
1231
+ break;
1232
+ default:
1233
+ parse(characters2, reference, reference, reference, [""], children, 0, points, children);
1234
+ }
1235
+ }
1236
+ index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
1237
+ break;
1238
+ // :
1239
+ case 58:
1240
+ length2 = 1 + strlen(characters2), property = previous;
1241
+ default:
1242
+ if (variable < 1) {
1243
+ if (character2 == 123)
1244
+ --variable;
1245
+ else if (character2 == 125 && variable++ == 0 && prev() == 125)
1246
+ continue;
1247
+ }
1248
+ switch (characters2 += from(character2), character2 * variable) {
1249
+ // &
1250
+ case 38:
1251
+ ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
1252
+ break;
1253
+ // ,
1254
+ case 44:
1255
+ points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
1256
+ break;
1257
+ // @
1258
+ case 64:
1259
+ if (peek() === 45)
1260
+ characters2 += delimit(next());
1261
+ atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
1262
+ break;
1263
+ // -
1264
+ case 45:
1265
+ if (previous === 45 && strlen(characters2) == 2)
1266
+ variable = 0;
1267
+ }
1268
+ }
1269
+ return rulesets;
1270
+ }
1271
+ function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2) {
1272
+ var post = offset - 1;
1273
+ var rule = offset === 0 ? rules : [""];
1274
+ var size = sizeof(rule);
1275
+ for (var i = 0, j = 0, k = 0; i < index; ++i)
1276
+ for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z2 = value; x < size; ++x)
1277
+ if (z2 = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
1278
+ props[k++] = z2;
1279
+ return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2);
1280
+ }
1281
+ function comment(value, root, parent) {
1282
+ return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
1283
+ }
1284
+ function declaration(value, root, parent, length2) {
1285
+ return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
1286
+ }
1287
+
1288
+ // ../node_modules/stylis/src/Serializer.js
1289
+ function serialize(children, callback) {
1290
+ var output = "";
1291
+ var length2 = sizeof(children);
1292
+ for (var i = 0; i < length2; i++)
1293
+ output += callback(children[i], i, children, callback) || "";
1294
+ return output;
1295
+ }
1296
+ function stringify(element, index, children, callback) {
1297
+ switch (element.type) {
1298
+ case LAYER:
1299
+ if (element.children.length) break;
1300
+ case IMPORT:
1301
+ case DECLARATION:
1302
+ return element.return = element.return || element.value;
1303
+ case COMMENT:
1304
+ return "";
1305
+ case KEYFRAMES:
1306
+ return element.return = element.value + "{" + serialize(element.children, callback) + "}";
1307
+ case RULESET:
1308
+ element.value = element.props.join(",");
1309
+ }
1310
+ return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
1311
+ }
1312
+
1313
+ // ../node_modules/stylis/src/Middleware.js
1314
+ function middleware(collection) {
1315
+ var length2 = sizeof(collection);
1316
+ return function(element, index, children, callback) {
1317
+ var output = "";
1318
+ for (var i = 0; i < length2; i++)
1319
+ output += collection[i](element, index, children, callback) || "";
1320
+ return output;
1321
+ };
1322
+ }
1323
+ function rulesheet(callback) {
1324
+ return function(element) {
1325
+ if (!element.root) {
1326
+ if (element = element.return)
1327
+ callback(element);
1328
+ }
1329
+ };
1330
+ }
1331
+
1332
+ // ../node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
1333
+ var weakMemoize = function weakMemoize2(func) {
1334
+ var cache = /* @__PURE__ */ new WeakMap();
1335
+ return function(arg) {
1336
+ if (cache.has(arg)) {
1337
+ return cache.get(arg);
1338
+ }
1339
+ var ret = func(arg);
1340
+ cache.set(arg, ret);
1341
+ return ret;
1342
+ };
1343
+ };
1344
+
1345
+ // ../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
1346
+ function memoize(fn) {
1347
+ var cache = /* @__PURE__ */ Object.create(null);
1348
+ return function(arg) {
1349
+ if (cache[arg] === void 0) cache[arg] = fn(arg);
1350
+ return cache[arg];
1351
+ };
1352
+ }
1353
+
1354
+ // ../node_modules/@emotion/cache/dist/emotion-cache.esm.js
1355
+ var isBrowser = typeof document !== "undefined";
1356
+ var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index) {
1357
+ var previous = 0;
1358
+ var character2 = 0;
1359
+ while (true) {
1360
+ previous = character2;
1361
+ character2 = peek();
1362
+ if (previous === 38 && character2 === 12) {
1363
+ points[index] = 1;
1364
+ }
1365
+ if (token(character2)) {
1366
+ break;
1367
+ }
1368
+ next();
1369
+ }
1370
+ return slice(begin, position);
1371
+ };
1372
+ var toRules = function toRules2(parsed, points) {
1373
+ var index = -1;
1374
+ var character2 = 44;
1375
+ do {
1376
+ switch (token(character2)) {
1377
+ case 0:
1378
+ if (character2 === 38 && peek() === 12) {
1379
+ points[index] = 1;
1380
+ }
1381
+ parsed[index] += identifierWithPointTracking(position - 1, points, index);
1382
+ break;
1383
+ case 2:
1384
+ parsed[index] += delimit(character2);
1385
+ break;
1386
+ case 4:
1387
+ if (character2 === 44) {
1388
+ parsed[++index] = peek() === 58 ? "&\f" : "";
1389
+ points[index] = parsed[index].length;
1390
+ break;
1391
+ }
1392
+ // fallthrough
1393
+ default:
1394
+ parsed[index] += from(character2);
1395
+ }
1396
+ } while (character2 = next());
1397
+ return parsed;
1398
+ };
1399
+ var getRules = function getRules2(value, points) {
1400
+ return dealloc(toRules(alloc(value), points));
1401
+ };
1402
+ var fixedElements = /* @__PURE__ */ new WeakMap();
1403
+ var compat = function compat2(element) {
1404
+ if (element.type !== "rule" || !element.parent || // positive .length indicates that this rule contains pseudo
1405
+ // negative .length indicates that this rule has been already prefixed
1406
+ element.length < 1) {
1407
+ return;
1408
+ }
1409
+ var value = element.value;
1410
+ var parent = element.parent;
1411
+ var isImplicitRule = element.column === parent.column && element.line === parent.line;
1412
+ while (parent.type !== "rule") {
1413
+ parent = parent.parent;
1414
+ if (!parent) return;
1415
+ }
1416
+ if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {
1417
+ return;
1418
+ }
1419
+ if (isImplicitRule) {
1420
+ return;
1421
+ }
1422
+ fixedElements.set(element, true);
1423
+ var points = [];
1424
+ var rules = getRules(value, points);
1425
+ var parentRules = parent.props;
1426
+ for (var i = 0, k = 0; i < rules.length; i++) {
1427
+ for (var j = 0; j < parentRules.length; j++, k++) {
1428
+ element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
1429
+ }
1430
+ }
1431
+ };
1432
+ var removeLabel = function removeLabel2(element) {
1433
+ if (element.type === "decl") {
1434
+ var value = element.value;
1435
+ if (
1436
+ // charcode for l
1437
+ value.charCodeAt(0) === 108 && // charcode for b
1438
+ value.charCodeAt(2) === 98
1439
+ ) {
1440
+ element["return"] = "";
1441
+ element.value = "";
1442
+ }
1443
+ }
1444
+ };
1445
+ function prefix(value, length2) {
1446
+ switch (hash(value, length2)) {
1447
+ // color-adjust
1448
+ case 5103:
1449
+ return WEBKIT + "print-" + value + value;
1450
+ // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
1451
+ case 5737:
1452
+ case 4201:
1453
+ case 3177:
1454
+ case 3433:
1455
+ case 1641:
1456
+ case 4457:
1457
+ case 2921:
1458
+ // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
1459
+ case 5572:
1460
+ case 6356:
1461
+ case 5844:
1462
+ case 3191:
1463
+ case 6645:
1464
+ case 3005:
1465
+ // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
1466
+ case 6391:
1467
+ case 5879:
1468
+ case 5623:
1469
+ case 6135:
1470
+ case 4599:
1471
+ case 4855:
1472
+ // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
1473
+ case 4215:
1474
+ case 6389:
1475
+ case 5109:
1476
+ case 5365:
1477
+ case 5621:
1478
+ case 3829:
1479
+ return WEBKIT + value + value;
1480
+ // appearance, user-select, transform, hyphens, text-size-adjust
1481
+ case 5349:
1482
+ case 4246:
1483
+ case 4810:
1484
+ case 6968:
1485
+ case 2756:
1486
+ return WEBKIT + value + MOZ + value + MS + value + value;
1487
+ // flex, flex-direction
1488
+ case 6828:
1489
+ case 4268:
1490
+ return WEBKIT + value + MS + value + value;
1491
+ // order
1492
+ case 6165:
1493
+ return WEBKIT + value + MS + "flex-" + value + value;
1494
+ // align-items
1495
+ case 5187:
1496
+ return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
1497
+ // align-self
1498
+ case 5443:
1499
+ return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
1500
+ // align-content
1501
+ case 4675:
1502
+ return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
1503
+ // flex-shrink
1504
+ case 5548:
1505
+ return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
1506
+ // flex-basis
1507
+ case 5292:
1508
+ return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
1509
+ // flex-grow
1510
+ case 6060:
1511
+ return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
1512
+ // transition
1513
+ case 4554:
1514
+ return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
1515
+ // cursor
1516
+ case 6187:
1517
+ return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
1518
+ // background, background-image
1519
+ case 5495:
1520
+ case 3959:
1521
+ return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
1522
+ // justify-content
1523
+ case 4968:
1524
+ return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
1525
+ // (margin|padding)-inline-(start|end)
1526
+ case 4095:
1527
+ case 3583:
1528
+ case 4068:
1529
+ case 2532:
1530
+ return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
1531
+ // (min|max)?(width|height|inline-size|block-size)
1532
+ case 8116:
1533
+ case 7059:
1534
+ case 5753:
1535
+ case 5535:
1536
+ case 5445:
1537
+ case 5701:
1538
+ case 4933:
1539
+ case 4677:
1540
+ case 5533:
1541
+ case 5789:
1542
+ case 5021:
1543
+ case 4765:
1544
+ if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
1545
+ // (m)ax-content, (m)in-content
1546
+ case 109:
1547
+ if (charat(value, length2 + 4) !== 45) break;
1548
+ // (f)ill-available, (f)it-content
1549
+ case 102:
1550
+ return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
1551
+ // (s)tretch
1552
+ case 115:
1553
+ return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value;
1554
+ }
1555
+ break;
1556
+ // position: sticky
1557
+ case 4949:
1558
+ if (charat(value, length2 + 1) !== 115) break;
1559
+ // display: (flex|inline-flex)
1560
+ case 6444:
1561
+ switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
1562
+ // stic(k)y
1563
+ case 107:
1564
+ return replace(value, ":", ":" + WEBKIT) + value;
1565
+ // (inline-)?fl(e)x
1566
+ case 101:
1567
+ return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
1568
+ }
1569
+ break;
1570
+ // writing-mode
1571
+ case 5936:
1572
+ switch (charat(value, length2 + 11)) {
1573
+ // vertical-l(r)
1574
+ case 114:
1575
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
1576
+ // vertical-r(l)
1577
+ case 108:
1578
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
1579
+ // horizontal(-)tb
1580
+ case 45:
1581
+ return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
1582
+ }
1583
+ return WEBKIT + value + MS + value + value;
1584
+ }
1585
+ return value;
1586
+ }
1587
+ var prefixer = function prefixer2(element, index, children, callback) {
1588
+ if (element.length > -1) {
1589
+ if (!element["return"]) switch (element.type) {
1590
+ case DECLARATION:
1591
+ element["return"] = prefix(element.value, element.length);
1592
+ break;
1593
+ case KEYFRAMES:
1594
+ return serialize([copy(element, {
1595
+ value: replace(element.value, "@", "@" + WEBKIT)
1596
+ })], callback);
1597
+ case RULESET:
1598
+ if (element.length) return combine(element.props, function(value) {
1599
+ switch (match(value, /(::plac\w+|:read-\w+)/)) {
1600
+ // :read-(only|write)
1601
+ case ":read-only":
1602
+ case ":read-write":
1603
+ return serialize([copy(element, {
1604
+ props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
1605
+ })], callback);
1606
+ // :placeholder
1607
+ case "::placeholder":
1608
+ return serialize([copy(element, {
1609
+ props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
1610
+ }), copy(element, {
1611
+ props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
1612
+ }), copy(element, {
1613
+ props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
1614
+ })], callback);
1615
+ }
1616
+ return "";
1617
+ });
1618
+ }
1619
+ }
1620
+ };
1621
+ var getServerStylisCache = isBrowser ? void 0 : weakMemoize(function() {
1622
+ return memoize(function() {
1623
+ return {};
1624
+ });
1625
+ });
1626
+ var defaultStylisPlugins = [prefixer];
1627
+ var createCache = function createCache2(options) {
1628
+ var key = options.key;
1629
+ if (isBrowser && key === "css") {
1630
+ var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
1631
+ Array.prototype.forEach.call(ssrStyles, function(node2) {
1632
+ var dataEmotionAttribute = node2.getAttribute("data-emotion");
1633
+ if (dataEmotionAttribute.indexOf(" ") === -1) {
1634
+ return;
1635
+ }
1636
+ document.head.appendChild(node2);
1637
+ node2.setAttribute("data-s", "");
1638
+ });
1639
+ }
1640
+ var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
1641
+ var inserted = {};
1642
+ var container;
1643
+ var nodesToHydrate = [];
1644
+ if (isBrowser) {
1645
+ container = options.container || document.head;
1646
+ Array.prototype.forEach.call(
1647
+ // this means we will ignore elements which don't have a space in them which
1648
+ // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
1649
+ document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
1650
+ function(node2) {
1651
+ var attrib = node2.getAttribute("data-emotion").split(" ");
1652
+ for (var i = 1; i < attrib.length; i++) {
1653
+ inserted[attrib[i]] = true;
1654
+ }
1655
+ nodesToHydrate.push(node2);
1656
+ }
1657
+ );
1658
+ }
1659
+ var _insert;
1660
+ var omnipresentPlugins = [compat, removeLabel];
1661
+ if (!getServerStylisCache) {
1662
+ var currentSheet;
1663
+ var finalizingPlugins = [stringify, rulesheet(function(rule) {
1664
+ currentSheet.insert(rule);
1665
+ })];
1666
+ var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
1667
+ var stylis = function stylis2(styles) {
1668
+ return serialize(compile(styles), serializer);
1669
+ };
1670
+ _insert = function insert(selector, serialized, sheet, shouldCache) {
1671
+ currentSheet = sheet;
1672
+ stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
1673
+ if (shouldCache) {
1674
+ cache.inserted[serialized.name] = true;
1675
+ }
1676
+ };
1677
+ } else {
1678
+ var _finalizingPlugins = [stringify];
1679
+ var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
1680
+ var _stylis = function _stylis2(styles) {
1681
+ return serialize(compile(styles), _serializer);
1682
+ };
1683
+ var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
1684
+ var getRules3 = function getRules4(selector, serialized) {
1685
+ var name = serialized.name;
1686
+ if (serverStylisCache[name] === void 0) {
1687
+ serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
1688
+ }
1689
+ return serverStylisCache[name];
1690
+ };
1691
+ _insert = function _insert2(selector, serialized, sheet, shouldCache) {
1692
+ var name = serialized.name;
1693
+ var rules = getRules3(selector, serialized);
1694
+ if (cache.compat === void 0) {
1695
+ if (shouldCache) {
1696
+ cache.inserted[name] = true;
1697
+ }
1698
+ return rules;
1699
+ } else {
1700
+ if (shouldCache) {
1701
+ cache.inserted[name] = rules;
1702
+ } else {
1703
+ return rules;
1704
+ }
1705
+ }
1706
+ };
1707
+ }
1708
+ var cache = {
1709
+ key,
1710
+ sheet: new StyleSheet({
1711
+ key,
1712
+ container,
1713
+ nonce: options.nonce,
1714
+ speedy: options.speedy,
1715
+ prepend: options.prepend,
1716
+ insertionPoint: options.insertionPoint
1717
+ }),
1718
+ nonce: options.nonce,
1719
+ inserted,
1720
+ registered: {},
1721
+ insert: _insert
1722
+ };
1723
+ cache.sheet.hydrate(nodesToHydrate);
1724
+ return cache;
1725
+ };
1726
+
1727
+ // ../node_modules/@babel/runtime/helpers/esm/extends.js
1728
+ function _extends() {
1729
+ return _extends = Object.assign ? Object.assign.bind() : function(n) {
1730
+ for (var e = 1; e < arguments.length; e++) {
1731
+ var t = arguments[e];
1732
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
1733
+ }
1734
+ return n;
1735
+ }, _extends.apply(null, arguments);
1736
+ }
1737
+
1738
+ // ../node_modules/@emotion/utils/dist/emotion-utils.esm.js
1739
+ var isBrowser2 = typeof document !== "undefined";
1740
+ function getRegisteredStyles(registered, registeredStyles, classNames) {
1741
+ var rawClassName = "";
1742
+ classNames.split(" ").forEach(function(className) {
1743
+ if (registered[className] !== void 0) {
1744
+ registeredStyles.push(registered[className] + ";");
1745
+ } else if (className) {
1746
+ rawClassName += className + " ";
1747
+ }
1748
+ });
1749
+ return rawClassName;
1750
+ }
1751
+ var registerStyles = function registerStyles2(cache, serialized, isStringTag) {
1752
+ var className = cache.key + "-" + serialized.name;
1753
+ if (
1754
+ // we only need to add the styles to the registered cache if the
1755
+ // class name could be used further down
1756
+ // the tree but if it's a string tag, we know it won't
1757
+ // so we don't have to add it to registered cache.
1758
+ // this improves memory usage since we can avoid storing the whole style string
1759
+ (isStringTag === false || // we need to always store it if we're in compat mode and
1760
+ // in node since emotion-server relies on whether a style is in
1761
+ // the registered cache to know whether a style is global or not
1762
+ // also, note that this check will be dead code eliminated in the browser
1763
+ isBrowser2 === false && cache.compat !== void 0) && cache.registered[className] === void 0
1764
+ ) {
1765
+ cache.registered[className] = serialized.styles;
1766
+ }
1767
+ };
1768
+ var insertStyles = function insertStyles2(cache, serialized, isStringTag) {
1769
+ registerStyles(cache, serialized, isStringTag);
1770
+ var className = cache.key + "-" + serialized.name;
1771
+ if (cache.inserted[serialized.name] === void 0) {
1772
+ var stylesForSSR = "";
1773
+ var current = serialized;
1774
+ do {
1775
+ var maybeStyles = cache.insert(serialized === current ? "." + className : "", current, cache.sheet, true);
1776
+ if (!isBrowser2 && maybeStyles !== void 0) {
1777
+ stylesForSSR += maybeStyles;
1778
+ }
1779
+ current = current.next;
1780
+ } while (current !== void 0);
1781
+ if (!isBrowser2 && stylesForSSR.length !== 0) {
1782
+ return stylesForSSR;
1783
+ }
1784
+ }
1785
+ };
1786
+
1787
+ // ../node_modules/@emotion/hash/dist/emotion-hash.esm.js
1788
+ function murmur2(str) {
1789
+ var h = 0;
1790
+ var k, i = 0, len = str.length;
1791
+ for (; len >= 4; ++i, len -= 4) {
1792
+ k = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24;
1793
+ k = /* Math.imul(k, m): */
1794
+ (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16);
1795
+ k ^= /* k >>> r: */
1796
+ k >>> 24;
1797
+ h = /* Math.imul(k, m): */
1798
+ (k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
1799
+ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
1800
+ }
1801
+ switch (len) {
1802
+ case 3:
1803
+ h ^= (str.charCodeAt(i + 2) & 255) << 16;
1804
+ case 2:
1805
+ h ^= (str.charCodeAt(i + 1) & 255) << 8;
1806
+ case 1:
1807
+ h ^= str.charCodeAt(i) & 255;
1808
+ h = /* Math.imul(h, m): */
1809
+ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
1810
+ }
1811
+ h ^= h >>> 13;
1812
+ h = /* Math.imul(h, m): */
1813
+ (h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
1814
+ return ((h ^ h >>> 15) >>> 0).toString(36);
1815
+ }
1816
+
1817
+ // ../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
1818
+ var unitlessKeys = {
1819
+ animationIterationCount: 1,
1820
+ aspectRatio: 1,
1821
+ borderImageOutset: 1,
1822
+ borderImageSlice: 1,
1823
+ borderImageWidth: 1,
1824
+ boxFlex: 1,
1825
+ boxFlexGroup: 1,
1826
+ boxOrdinalGroup: 1,
1827
+ columnCount: 1,
1828
+ columns: 1,
1829
+ flex: 1,
1830
+ flexGrow: 1,
1831
+ flexPositive: 1,
1832
+ flexShrink: 1,
1833
+ flexNegative: 1,
1834
+ flexOrder: 1,
1835
+ gridRow: 1,
1836
+ gridRowEnd: 1,
1837
+ gridRowSpan: 1,
1838
+ gridRowStart: 1,
1839
+ gridColumn: 1,
1840
+ gridColumnEnd: 1,
1841
+ gridColumnSpan: 1,
1842
+ gridColumnStart: 1,
1843
+ msGridRow: 1,
1844
+ msGridRowSpan: 1,
1845
+ msGridColumn: 1,
1846
+ msGridColumnSpan: 1,
1847
+ fontWeight: 1,
1848
+ lineHeight: 1,
1849
+ opacity: 1,
1850
+ order: 1,
1851
+ orphans: 1,
1852
+ scale: 1,
1853
+ tabSize: 1,
1854
+ widows: 1,
1855
+ zIndex: 1,
1856
+ zoom: 1,
1857
+ WebkitLineClamp: 1,
1858
+ // SVG-related properties
1859
+ fillOpacity: 1,
1860
+ floodOpacity: 1,
1861
+ stopOpacity: 1,
1862
+ strokeDasharray: 1,
1863
+ strokeDashoffset: 1,
1864
+ strokeMiterlimit: 1,
1865
+ strokeOpacity: 1,
1866
+ strokeWidth: 1
1867
+ };
1868
+ var hyphenateRegex = /[A-Z]|^ms/g;
1869
+ var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
1870
+ var isCustomProperty = function isCustomProperty2(property) {
1871
+ return property.charCodeAt(1) === 45;
1872
+ };
1873
+ var isProcessableValue = function isProcessableValue2(value) {
1874
+ return value != null && typeof value !== "boolean";
1875
+ };
1876
+ var processStyleName = /* @__PURE__ */ memoize(function(styleName) {
1877
+ return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, "-$&").toLowerCase();
1878
+ });
1879
+ var processStyleValue = function processStyleValue2(key, value) {
1880
+ switch (key) {
1881
+ case "animation":
1882
+ case "animationName": {
1883
+ if (typeof value === "string") {
1884
+ return value.replace(animationRegex, function(match2, p1, p2) {
1885
+ cursor = {
1886
+ name: p1,
1887
+ styles: p2,
1888
+ next: cursor
1889
+ };
1890
+ return p1;
1891
+ });
1892
+ }
1893
+ }
1894
+ }
1895
+ if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === "number" && value !== 0) {
1896
+ return value + "px";
1897
+ }
1898
+ return value;
1899
+ };
1900
+ function handleInterpolation(mergedProps, registered, interpolation) {
1901
+ if (interpolation == null) {
1902
+ return "";
1903
+ }
1904
+ var componentSelector = interpolation;
1905
+ if (componentSelector.__emotion_styles !== void 0) {
1906
+ return componentSelector;
1907
+ }
1908
+ switch (typeof interpolation) {
1909
+ case "boolean": {
1910
+ return "";
1911
+ }
1912
+ case "object": {
1913
+ var keyframes3 = interpolation;
1914
+ if (keyframes3.anim === 1) {
1915
+ cursor = {
1916
+ name: keyframes3.name,
1917
+ styles: keyframes3.styles,
1918
+ next: cursor
1919
+ };
1920
+ return keyframes3.name;
1921
+ }
1922
+ var serializedStyles = interpolation;
1923
+ if (serializedStyles.styles !== void 0) {
1924
+ var next2 = serializedStyles.next;
1925
+ if (next2 !== void 0) {
1926
+ while (next2 !== void 0) {
1927
+ cursor = {
1928
+ name: next2.name,
1929
+ styles: next2.styles,
1930
+ next: cursor
1931
+ };
1932
+ next2 = next2.next;
1933
+ }
1934
+ }
1935
+ var styles = serializedStyles.styles + ";";
1936
+ return styles;
1937
+ }
1938
+ return createStringFromObject(mergedProps, registered, interpolation);
1939
+ }
1940
+ case "function": {
1941
+ if (mergedProps !== void 0) {
1942
+ var previousCursor = cursor;
1943
+ var result = interpolation(mergedProps);
1944
+ cursor = previousCursor;
1945
+ return handleInterpolation(mergedProps, registered, result);
1946
+ }
1947
+ break;
1948
+ }
1949
+ }
1950
+ var asString = interpolation;
1951
+ if (registered == null) {
1952
+ return asString;
1953
+ }
1954
+ var cached = registered[asString];
1955
+ return cached !== void 0 ? cached : asString;
1956
+ }
1957
+ function createStringFromObject(mergedProps, registered, obj) {
1958
+ var string = "";
1959
+ if (Array.isArray(obj)) {
1960
+ for (var i = 0; i < obj.length; i++) {
1961
+ string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
1962
+ }
1963
+ } else {
1964
+ for (var key in obj) {
1965
+ var value = obj[key];
1966
+ if (typeof value !== "object") {
1967
+ var asString = value;
1968
+ if (registered != null && registered[asString] !== void 0) {
1969
+ string += key + "{" + registered[asString] + "}";
1970
+ } else if (isProcessableValue(asString)) {
1971
+ string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
1972
+ }
1973
+ } else {
1974
+ if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) {
1975
+ for (var _i = 0; _i < value.length; _i++) {
1976
+ if (isProcessableValue(value[_i])) {
1977
+ string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
1978
+ }
1979
+ }
1980
+ } else {
1981
+ var interpolated = handleInterpolation(mergedProps, registered, value);
1982
+ switch (key) {
1983
+ case "animation":
1984
+ case "animationName": {
1985
+ string += processStyleName(key) + ":" + interpolated + ";";
1986
+ break;
1987
+ }
1988
+ default: {
1989
+ string += key + "{" + interpolated + "}";
1990
+ }
1991
+ }
1992
+ }
1993
+ }
1994
+ }
1995
+ }
1996
+ return string;
1997
+ }
1998
+ var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g;
1999
+ var cursor;
2000
+ function serializeStyles(args, registered, mergedProps) {
2001
+ if (args.length === 1 && typeof args[0] === "object" && args[0] !== null && args[0].styles !== void 0) {
2002
+ return args[0];
2003
+ }
2004
+ var stringMode = true;
2005
+ var styles = "";
2006
+ cursor = void 0;
2007
+ var strings = args[0];
2008
+ if (strings == null || strings.raw === void 0) {
2009
+ stringMode = false;
2010
+ styles += handleInterpolation(mergedProps, registered, strings);
2011
+ } else {
2012
+ var asTemplateStringsArr = strings;
2013
+ styles += asTemplateStringsArr[0];
2014
+ }
2015
+ for (var i = 1; i < args.length; i++) {
2016
+ styles += handleInterpolation(mergedProps, registered, args[i]);
2017
+ if (stringMode) {
2018
+ var templateStringsArr = strings;
2019
+ styles += templateStringsArr[i];
2020
+ }
2021
+ }
2022
+ labelPattern.lastIndex = 0;
2023
+ var identifierName = "";
2024
+ var match2;
2025
+ while ((match2 = labelPattern.exec(styles)) !== null) {
2026
+ identifierName += "-" + match2[1];
2027
+ }
2028
+ var name = murmur2(styles) + identifierName;
2029
+ return {
2030
+ name,
2031
+ styles,
2032
+ next: cursor
2033
+ };
2034
+ }
2035
+ var isBrowser3 = typeof document !== "undefined";
2036
+ var syncFallback = function syncFallback2(create) {
2037
+ return create();
2038
+ };
2039
+ var useInsertionEffect2 = React2["useInsertionEffect"] ? React2["useInsertionEffect"] : false;
2040
+ var useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect2 || syncFallback;
2041
+ var isBrowser4 = typeof document !== "undefined";
2042
+ var EmotionCacheContext = /* @__PURE__ */ React2.createContext(
2043
+ // we're doing this to avoid preconstruct's dead code elimination in this one case
2044
+ // because this module is primarily intended for the browser and node
2045
+ // but it's also required in react native and similar environments sometimes
2046
+ // and we could have a special build just for that
2047
+ // but this is much easier and the native packages
2048
+ // might use a different theme context in the future anyway
2049
+ typeof HTMLElement !== "undefined" ? /* @__PURE__ */ createCache({
2050
+ key: "css"
2051
+ }) : null
2052
+ );
2053
+ var CacheProvider = EmotionCacheContext.Provider;
2054
+ var withEmotionCache = function withEmotionCache2(func) {
2055
+ return /* @__PURE__ */ forwardRef(function(props, ref) {
2056
+ var cache = useContext(EmotionCacheContext);
2057
+ return func(props, cache, ref);
2058
+ });
2059
+ };
2060
+ if (!isBrowser4) {
2061
+ withEmotionCache = function withEmotionCache3(func) {
2062
+ return function(props) {
2063
+ var cache = useContext(EmotionCacheContext);
2064
+ if (cache === null) {
2065
+ cache = createCache({
2066
+ key: "css"
2067
+ });
2068
+ return /* @__PURE__ */ React2.createElement(EmotionCacheContext.Provider, {
2069
+ value: cache
2070
+ }, func(props, cache));
2071
+ } else {
2072
+ return func(props, cache);
2073
+ }
2074
+ };
2075
+ };
2076
+ }
2077
+ var ThemeContext = /* @__PURE__ */ React2.createContext({});
2078
+ var hasOwn = {}.hasOwnProperty;
2079
+ var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
2080
+ var createEmotionProps = function createEmotionProps2(type, props) {
2081
+ var newProps = {};
2082
+ for (var _key in props) {
2083
+ if (hasOwn.call(props, _key)) {
2084
+ newProps[_key] = props[_key];
2085
+ }
2086
+ }
2087
+ newProps[typePropName] = type;
2088
+ return newProps;
2089
+ };
2090
+ var Insertion = function Insertion2(_ref) {
2091
+ var cache = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
2092
+ registerStyles(cache, serialized, isStringTag);
2093
+ var rules = useInsertionEffectAlwaysWithSyncFallback(function() {
2094
+ return insertStyles(cache, serialized, isStringTag);
2095
+ });
2096
+ if (!isBrowser4 && rules !== void 0) {
2097
+ var _ref2;
2098
+ var serializedNames = serialized.name;
2099
+ var next2 = serialized.next;
2100
+ while (next2 !== void 0) {
2101
+ serializedNames += " " + next2.name;
2102
+ next2 = next2.next;
2103
+ }
2104
+ return /* @__PURE__ */ React2.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
2105
+ __html: rules
2106
+ }, _ref2.nonce = cache.sheet.nonce, _ref2));
2107
+ }
2108
+ return null;
2109
+ };
2110
+ var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
2111
+ var cssProp = props.css;
2112
+ if (typeof cssProp === "string" && cache.registered[cssProp] !== void 0) {
2113
+ cssProp = cache.registered[cssProp];
2114
+ }
2115
+ var WrappedComponent = props[typePropName];
2116
+ var registeredStyles = [cssProp];
2117
+ var className = "";
2118
+ if (typeof props.className === "string") {
2119
+ className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
2120
+ } else if (props.className != null) {
2121
+ className = props.className + " ";
2122
+ }
2123
+ var serialized = serializeStyles(registeredStyles, void 0, React2.useContext(ThemeContext));
2124
+ className += cache.key + "-" + serialized.name;
2125
+ var newProps = {};
2126
+ for (var _key2 in props) {
2127
+ if (hasOwn.call(props, _key2) && _key2 !== "css" && _key2 !== typePropName && true) {
2128
+ newProps[_key2] = props[_key2];
2129
+ }
2130
+ }
2131
+ newProps.className = className;
2132
+ if (ref) {
2133
+ newProps.ref = ref;
2134
+ }
2135
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Insertion, {
2136
+ cache,
2137
+ serialized,
2138
+ isStringTag: typeof WrappedComponent === "string"
2139
+ }), /* @__PURE__ */ React2.createElement(WrappedComponent, newProps));
2140
+ });
2141
+ var Emotion$1 = Emotion;
2142
+ __toESM(require_extends());
2143
+ __toESM(require_hoist_non_react_statics_cjs());
2144
+ var jsx3 = function jsx4(type, props) {
2145
+ var args = arguments;
2146
+ if (props == null || !hasOwn.call(props, "css")) {
2147
+ return React2.createElement.apply(void 0, args);
2148
+ }
2149
+ var argsLength = args.length;
2150
+ var createElementArgArray = new Array(argsLength);
2151
+ createElementArgArray[0] = Emotion$1;
2152
+ createElementArgArray[1] = createEmotionProps(type, props);
2153
+ for (var i = 2; i < argsLength; i++) {
2154
+ createElementArgArray[i] = args[i];
2155
+ }
2156
+ return React2.createElement.apply(null, createElementArgArray);
2157
+ };
2158
+ (function(_jsx) {
2159
+ var JSX;
2160
+ /* @__PURE__ */ (function(_JSX) {
2161
+ })(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
2162
+ })(jsx3 || (jsx3 = {}));
2163
+ function css() {
2164
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2165
+ args[_key] = arguments[_key];
2166
+ }
2167
+ return serializeStyles(args);
2168
+ }
2169
+ function keyframes() {
2170
+ var insertable = css.apply(void 0, arguments);
2171
+ var name = "animation-" + insertable.name;
2172
+ return {
2173
+ name,
2174
+ styles: "@keyframes " + name + "{" + insertable.styles + "}",
2175
+ anim: 1,
2176
+ toString: function toString() {
2177
+ return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
2178
+ }
2179
+ };
2180
+ }
472
2181
  function StyleProvider({ children, nonce }) {
473
2182
  const cache = useMemo(() => {
474
2183
  const emotionCache = createCache({
@@ -531,7 +2240,7 @@ function InsforgeProviderCore({
531
2240
  reloadAuth: () => manager.reloadAuth(),
532
2241
  sendVerificationEmail: (email) => manager.sendVerificationEmail(email),
533
2242
  sendResetPasswordEmail: (email) => manager.sendResetPasswordEmail(email),
534
- resetPassword: (token, newPassword) => manager.resetPassword(token, newPassword),
2243
+ resetPassword: (token2, newPassword) => manager.resetPassword(token2, newPassword),
535
2244
  verifyEmail: (otp, email) => manager.verifyEmail(otp, email),
536
2245
  exchangeResetPasswordToken: (email, code) => manager.exchangeResetPasswordToken(email, code),
537
2246
  loginWithOAuth: (provider, redirectTo) => manager.loginWithOAuth(provider, redirectTo),
@@ -595,6 +2304,294 @@ function usePublicAuthConfig() {
595
2304
  return { authConfig, isLoaded };
596
2305
  }
597
2306
 
2307
+ // ../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js
2308
+ 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|popover|popoverTarget|popoverTargetAction|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)-.*))$/;
2309
+ var isPropValid = /* @__PURE__ */ memoize(
2310
+ function(prop) {
2311
+ return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
2312
+ }
2313
+ /* Z+1 */
2314
+ );
2315
+
2316
+ // ../node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js
2317
+ var isBrowser5 = typeof document !== "undefined";
2318
+ var testOmitPropsOnStringTag = isPropValid;
2319
+ var testOmitPropsOnComponent = function testOmitPropsOnComponent2(key) {
2320
+ return key !== "theme";
2321
+ };
2322
+ var getDefaultShouldForwardProp = function getDefaultShouldForwardProp2(tag) {
2323
+ return typeof tag === "string" && // 96 is one less than the char code
2324
+ // for "a" so this is checking that
2325
+ // it's a lowercase character
2326
+ tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
2327
+ };
2328
+ var composeShouldForwardProps = function composeShouldForwardProps2(tag, options, isReal) {
2329
+ var shouldForwardProp;
2330
+ if (options) {
2331
+ var optionsShouldForwardProp = options.shouldForwardProp;
2332
+ shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function(propName) {
2333
+ return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
2334
+ } : optionsShouldForwardProp;
2335
+ }
2336
+ if (typeof shouldForwardProp !== "function" && isReal) {
2337
+ shouldForwardProp = tag.__emotion_forwardProp;
2338
+ }
2339
+ return shouldForwardProp;
2340
+ };
2341
+ var Insertion3 = function Insertion4(_ref) {
2342
+ var cache = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
2343
+ registerStyles(cache, serialized, isStringTag);
2344
+ var rules = useInsertionEffectAlwaysWithSyncFallback(function() {
2345
+ return insertStyles(cache, serialized, isStringTag);
2346
+ });
2347
+ if (!isBrowser5 && rules !== void 0) {
2348
+ var _ref2;
2349
+ var serializedNames = serialized.name;
2350
+ var next2 = serialized.next;
2351
+ while (next2 !== void 0) {
2352
+ serializedNames += " " + next2.name;
2353
+ next2 = next2.next;
2354
+ }
2355
+ return /* @__PURE__ */ React2.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
2356
+ __html: rules
2357
+ }, _ref2.nonce = cache.sheet.nonce, _ref2));
2358
+ }
2359
+ return null;
2360
+ };
2361
+ var createStyled = function createStyled2(tag, options) {
2362
+ var isReal = tag.__emotion_real === tag;
2363
+ var baseTag = isReal && tag.__emotion_base || tag;
2364
+ var identifierName;
2365
+ var targetClassName;
2366
+ if (options !== void 0) {
2367
+ identifierName = options.label;
2368
+ targetClassName = options.target;
2369
+ }
2370
+ var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);
2371
+ var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);
2372
+ var shouldUseAs = !defaultShouldForwardProp("as");
2373
+ return function() {
2374
+ var args = arguments;
2375
+ var styles = isReal && tag.__emotion_styles !== void 0 ? tag.__emotion_styles.slice(0) : [];
2376
+ if (identifierName !== void 0) {
2377
+ styles.push("label:" + identifierName + ";");
2378
+ }
2379
+ if (args[0] == null || args[0].raw === void 0) {
2380
+ styles.push.apply(styles, args);
2381
+ } else {
2382
+ var templateStringsArr = args[0];
2383
+ styles.push(templateStringsArr[0]);
2384
+ var len = args.length;
2385
+ var i = 1;
2386
+ for (; i < len; i++) {
2387
+ styles.push(args[i], templateStringsArr[i]);
2388
+ }
2389
+ }
2390
+ var Styled = withEmotionCache(function(props, cache, ref) {
2391
+ var FinalTag = shouldUseAs && props.as || baseTag;
2392
+ var className = "";
2393
+ var classInterpolations = [];
2394
+ var mergedProps = props;
2395
+ if (props.theme == null) {
2396
+ mergedProps = {};
2397
+ for (var key in props) {
2398
+ mergedProps[key] = props[key];
2399
+ }
2400
+ mergedProps.theme = React2.useContext(ThemeContext);
2401
+ }
2402
+ if (typeof props.className === "string") {
2403
+ className = getRegisteredStyles(cache.registered, classInterpolations, props.className);
2404
+ } else if (props.className != null) {
2405
+ className = props.className + " ";
2406
+ }
2407
+ var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);
2408
+ className += cache.key + "-" + serialized.name;
2409
+ if (targetClassName !== void 0) {
2410
+ className += " " + targetClassName;
2411
+ }
2412
+ var finalShouldForwardProp = shouldUseAs && shouldForwardProp === void 0 ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;
2413
+ var newProps = {};
2414
+ for (var _key in props) {
2415
+ if (shouldUseAs && _key === "as") continue;
2416
+ if (finalShouldForwardProp(_key)) {
2417
+ newProps[_key] = props[_key];
2418
+ }
2419
+ }
2420
+ newProps.className = className;
2421
+ if (ref) {
2422
+ newProps.ref = ref;
2423
+ }
2424
+ return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(Insertion3, {
2425
+ cache,
2426
+ serialized,
2427
+ isStringTag: typeof FinalTag === "string"
2428
+ }), /* @__PURE__ */ React2.createElement(FinalTag, newProps));
2429
+ });
2430
+ Styled.displayName = identifierName !== void 0 ? identifierName : "Styled(" + (typeof baseTag === "string" ? baseTag : baseTag.displayName || baseTag.name || "Component") + ")";
2431
+ Styled.defaultProps = tag.defaultProps;
2432
+ Styled.__emotion_real = Styled;
2433
+ Styled.__emotion_base = baseTag;
2434
+ Styled.__emotion_styles = styles;
2435
+ Styled.__emotion_forwardProp = shouldForwardProp;
2436
+ Object.defineProperty(Styled, "toString", {
2437
+ value: function value() {
2438
+ return "." + targetClassName;
2439
+ }
2440
+ });
2441
+ Styled.withComponent = function(nextTag, nextOptions) {
2442
+ var newStyled = createStyled2(nextTag, _extends({}, options, nextOptions, {
2443
+ shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
2444
+ }));
2445
+ return newStyled.apply(void 0, styles);
2446
+ };
2447
+ return Styled;
2448
+ };
2449
+ };
2450
+
2451
+ // ../node_modules/@emotion/styled/dist/emotion-styled.esm.js
2452
+ __toESM(require_extends());
2453
+ var tags = [
2454
+ "a",
2455
+ "abbr",
2456
+ "address",
2457
+ "area",
2458
+ "article",
2459
+ "aside",
2460
+ "audio",
2461
+ "b",
2462
+ "base",
2463
+ "bdi",
2464
+ "bdo",
2465
+ "big",
2466
+ "blockquote",
2467
+ "body",
2468
+ "br",
2469
+ "button",
2470
+ "canvas",
2471
+ "caption",
2472
+ "cite",
2473
+ "code",
2474
+ "col",
2475
+ "colgroup",
2476
+ "data",
2477
+ "datalist",
2478
+ "dd",
2479
+ "del",
2480
+ "details",
2481
+ "dfn",
2482
+ "dialog",
2483
+ "div",
2484
+ "dl",
2485
+ "dt",
2486
+ "em",
2487
+ "embed",
2488
+ "fieldset",
2489
+ "figcaption",
2490
+ "figure",
2491
+ "footer",
2492
+ "form",
2493
+ "h1",
2494
+ "h2",
2495
+ "h3",
2496
+ "h4",
2497
+ "h5",
2498
+ "h6",
2499
+ "head",
2500
+ "header",
2501
+ "hgroup",
2502
+ "hr",
2503
+ "html",
2504
+ "i",
2505
+ "iframe",
2506
+ "img",
2507
+ "input",
2508
+ "ins",
2509
+ "kbd",
2510
+ "keygen",
2511
+ "label",
2512
+ "legend",
2513
+ "li",
2514
+ "link",
2515
+ "main",
2516
+ "map",
2517
+ "mark",
2518
+ "marquee",
2519
+ "menu",
2520
+ "menuitem",
2521
+ "meta",
2522
+ "meter",
2523
+ "nav",
2524
+ "noscript",
2525
+ "object",
2526
+ "ol",
2527
+ "optgroup",
2528
+ "option",
2529
+ "output",
2530
+ "p",
2531
+ "param",
2532
+ "picture",
2533
+ "pre",
2534
+ "progress",
2535
+ "q",
2536
+ "rp",
2537
+ "rt",
2538
+ "ruby",
2539
+ "s",
2540
+ "samp",
2541
+ "script",
2542
+ "section",
2543
+ "select",
2544
+ "small",
2545
+ "source",
2546
+ "span",
2547
+ "strong",
2548
+ "style",
2549
+ "sub",
2550
+ "summary",
2551
+ "sup",
2552
+ "table",
2553
+ "tbody",
2554
+ "td",
2555
+ "textarea",
2556
+ "tfoot",
2557
+ "th",
2558
+ "thead",
2559
+ "time",
2560
+ "title",
2561
+ "tr",
2562
+ "track",
2563
+ "u",
2564
+ "ul",
2565
+ "var",
2566
+ "video",
2567
+ "wbr",
2568
+ // SVG
2569
+ "circle",
2570
+ "clipPath",
2571
+ "defs",
2572
+ "ellipse",
2573
+ "foreignObject",
2574
+ "g",
2575
+ "image",
2576
+ "line",
2577
+ "linearGradient",
2578
+ "mask",
2579
+ "path",
2580
+ "pattern",
2581
+ "polygon",
2582
+ "polyline",
2583
+ "radialGradient",
2584
+ "rect",
2585
+ "stop",
2586
+ "svg",
2587
+ "text",
2588
+ "tspan"
2589
+ ];
2590
+ var styled = createStyled.bind(null);
2591
+ tags.forEach(function(tagName) {
2592
+ styled[tagName] = styled(tagName);
2593
+ });
2594
+
598
2595
  // src/styles/theme.ts
599
2596
  var theme = {
600
2597
  colors: {
@@ -718,7 +2715,7 @@ var theme = {
718
2715
  // 32px
719
2716
  }
720
2717
  };
721
- var keyframes = {
2718
+ var keyframes2 = {
722
2719
  spin: `
723
2720
  from {
724
2721
  transform: rotate(0deg);
@@ -730,7 +2727,7 @@ var keyframes = {
730
2727
  };
731
2728
 
732
2729
  // src/components/atoms/styled.ts
733
- var spinAnimation = keyframes$1`${keyframes.spin}`;
2730
+ var spinAnimation = keyframes`${keyframes2.spin}`;
734
2731
  var AuthContainerWrapper = styled.div`
735
2732
  width: 100%;
736
2733
  max-width: 400px;
@@ -1640,7 +3637,7 @@ function AuthOAuthProviders({
1640
3637
  );
1641
3638
  }
1642
3639
  function AuthVerificationCodeInput({
1643
- length = 6,
3640
+ length: length2 = 6,
1644
3641
  value,
1645
3642
  onChange,
1646
3643
  disabled = false,
@@ -1658,10 +3655,10 @@ function AuthVerificationCodeInput({
1658
3655
  newValue[index] = digit;
1659
3656
  const updatedValue = newValue.join("");
1660
3657
  onChange(updatedValue);
1661
- if (digit && index < length - 1) {
3658
+ if (digit && index < length2 - 1) {
1662
3659
  inputRefs.current[index + 1]?.focus();
1663
3660
  }
1664
- if (digit && index === length - 1 && updatedValue.length === length && onComplete) {
3661
+ if (digit && index === length2 - 1 && updatedValue.length === length2 && onComplete) {
1665
3662
  onComplete(updatedValue);
1666
3663
  }
1667
3664
  };
@@ -1674,22 +3671,22 @@ function AuthVerificationCodeInput({
1674
3671
  }
1675
3672
  } else if (e.key === "ArrowLeft" && index > 0) {
1676
3673
  inputRefs.current[index - 1]?.focus();
1677
- } else if (e.key === "ArrowRight" && index < length - 1) {
3674
+ } else if (e.key === "ArrowRight" && index < length2 - 1) {
1678
3675
  inputRefs.current[index + 1]?.focus();
1679
3676
  }
1680
3677
  };
1681
3678
  const handlePaste = (e) => {
1682
3679
  e.preventDefault();
1683
3680
  const pastedData = e.clipboardData.getData("text/plain").trim();
1684
- if (/^\d+$/.test(pastedData) && pastedData.length === length) {
3681
+ if (/^\d+$/.test(pastedData) && pastedData.length === length2) {
1685
3682
  onChange(pastedData);
1686
- inputRefs.current[length - 1]?.focus();
3683
+ inputRefs.current[length2 - 1]?.focus();
1687
3684
  if (onComplete) {
1688
3685
  onComplete(pastedData);
1689
3686
  }
1690
3687
  }
1691
3688
  };
1692
- return /* @__PURE__ */ jsx(VerificationCodeInputContainer, { children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsx(
3689
+ return /* @__PURE__ */ jsx(VerificationCodeInputContainer, { children: Array.from({ length: length2 }).map((_, index) => /* @__PURE__ */ jsx(
1693
3690
  VerificationCodeInput,
1694
3691
  {
1695
3692
  ref: (el) => {
@@ -1708,6 +3705,8 @@ function AuthVerificationCodeInput({
1708
3705
  index
1709
3706
  )) });
1710
3707
  }
3708
+
3709
+ // src/components/forms/styled.ts
1711
3710
  styled.form`
1712
3711
  display: flex;
1713
3712
  flex-direction: column;
@@ -1874,12 +3873,12 @@ function AuthEmailVerificationStep({
1874
3873
  useEffect(() => {
1875
3874
  if (resendDisabled && resendCountdown > 0) {
1876
3875
  const timer = setInterval(() => {
1877
- setResendCountdown((prev) => {
1878
- if (prev <= 1) {
3876
+ setResendCountdown((prev2) => {
3877
+ if (prev2 <= 1) {
1879
3878
  setResendDisabled(false);
1880
3879
  return 0;
1881
3880
  }
1882
- return prev - 1;
3881
+ return prev2 - 1;
1883
3882
  });
1884
3883
  }, 1e3);
1885
3884
  return () => clearInterval(timer);
@@ -1978,12 +3977,12 @@ function AuthResetPasswordVerificationStep({
1978
3977
  useEffect(() => {
1979
3978
  if (resendCountdown > 0) {
1980
3979
  const timer = setInterval(() => {
1981
- setResendCountdown((prev) => {
1982
- if (prev <= 1) {
3980
+ setResendCountdown((prev2) => {
3981
+ if (prev2 <= 1) {
1983
3982
  setResendDisabled(false);
1984
3983
  return 0;
1985
3984
  }
1986
- return prev - 1;
3985
+ return prev2 - 1;
1987
3986
  });
1988
3987
  }, 1e3);
1989
3988
  return () => clearInterval(timer);
@@ -2843,7 +4842,7 @@ function ForgotPassword({ onError, ...uiProps }) {
2843
4842
  }
2844
4843
  function ResetPassword({ onError, ...uiProps }) {
2845
4844
  const searchParams = useSearchParams();
2846
- const token = searchParams.get("token");
4845
+ const token2 = searchParams.get("token");
2847
4846
  const { resetPassword } = useInsforge();
2848
4847
  const { authConfig } = usePublicAuthConfig();
2849
4848
  const [newPassword, setNewPassword] = useState("");
@@ -2865,7 +4864,7 @@ function ResetPassword({ onError, ...uiProps }) {
2865
4864
  setLoading(false);
2866
4865
  return;
2867
4866
  }
2868
- if (!token) {
4867
+ if (!token2) {
2869
4868
  setError("Reset token is missing");
2870
4869
  setLoading(false);
2871
4870
  return;
@@ -2885,7 +4884,7 @@ function ResetPassword({ onError, ...uiProps }) {
2885
4884
  return;
2886
4885
  }
2887
4886
  try {
2888
- const result = await resetPassword(token, newPassword);
4887
+ const result = await resetPassword(token2, newPassword);
2889
4888
  if (result?.message) {
2890
4889
  setSuccess(true);
2891
4890
  } else {
@@ -2908,7 +4907,7 @@ function ResetPassword({ onError, ...uiProps }) {
2908
4907
  if (!authConfig) {
2909
4908
  return null;
2910
4909
  }
2911
- if (!token) {
4910
+ if (!token2) {
2912
4911
  return /* @__PURE__ */ jsxs(AuthContainer, { children: [
2913
4912
  /* @__PURE__ */ jsx(AuthHeader, { title: "Invalid Reset Link", subtitle: "" }),
2914
4913
  /* @__PURE__ */ jsx(
@@ -3056,13 +5055,13 @@ function VerifyEmailStatus({
3056
5055
  /* @__PURE__ */ jsx(VerifyStatusTextCenter, { style: { color: theme.colors.textSecondary }, children: successMessage })
3057
5056
  ] }) }) });
3058
5057
  }
3059
- function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
5058
+ function VerifyEmail({ token: token2, onSuccess, onError, ...uiProps }) {
3060
5059
  const { verifyEmail } = useInsforge();
3061
5060
  const [status, setStatus] = useState("verifying");
3062
5061
  const [error, setError] = useState("");
3063
5062
  useEffect(() => {
3064
5063
  const verifyEmailFn = async () => {
3065
- if (!token) {
5064
+ if (!token2) {
3066
5065
  const errorMessage = "Invalid verification link. Missing required token.";
3067
5066
  setError(errorMessage);
3068
5067
  setStatus("error");
@@ -3072,7 +5071,7 @@ function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
3072
5071
  return;
3073
5072
  }
3074
5073
  try {
3075
- const result = await verifyEmail(token);
5074
+ const result = await verifyEmail(token2);
3076
5075
  if (!result?.accessToken) {
3077
5076
  const errorMessage = result ? "Verification succeeded but no access token received" : "Email verification failed";
3078
5077
  setError(errorMessage);
@@ -3100,7 +5099,7 @@ function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
3100
5099
  }
3101
5100
  };
3102
5101
  void verifyEmailFn();
3103
- }, [token, verifyEmail, onSuccess, onError]);
5102
+ }, [token2, verifyEmail, onSuccess, onError]);
3104
5103
  return /* @__PURE__ */ jsx(VerifyEmailStatus, { status, error, ...uiProps });
3105
5104
  }
3106
5105
  function SignOutButton({ children, className, afterSignOutUrl = "/" }) {
@@ -3122,6 +5121,8 @@ function SignOutButton({ children, className, afterSignOutUrl = "/" }) {
3122
5121
  }
3123
5122
  return /* @__PURE__ */ jsx("button", { type: "button", className, onClick: () => void handleClick(), children: children || "Sign out" });
3124
5123
  }
5124
+
5125
+ // src/components/styled.ts
3125
5126
  var UserButtonContainer = styled.div`
3126
5127
  position: relative;
3127
5128
  display: inline-block;
@@ -3195,7 +5196,17 @@ var UserButtonEmail = styled.div`
3195
5196
  `;
3196
5197
  var UserButtonMenu = styled.div`
3197
5198
  position: absolute;
3198
- margin-top: ${theme.spacing[2]};
5199
+ ${(props) => props.$openUpward ? `
5200
+ bottom: 100%;
5201
+ margin-bottom: ${theme.spacing[2]};
5202
+ ` : `
5203
+ top: 100%;
5204
+ margin-top: ${theme.spacing[2]};
5205
+ `}
5206
+ left: 0;
5207
+ ${(props) => props.$horizontalOffset ? `
5208
+ transform: translateX(${props.$horizontalOffset}px);
5209
+ ` : ""}
3199
5210
  background-color: ${theme.colors.bgWhite};
3200
5211
  border: 1px solid ${theme.colors.border};
3201
5212
  border-radius: ${theme.radius.md};
@@ -3240,7 +5251,10 @@ function UserButton({ afterSignOutUrl = "/", mode = "simple" }) {
3240
5251
  const { user } = useInsforge();
3241
5252
  const [isOpen, setIsOpen] = useState(false);
3242
5253
  const [imageError, setImageError] = useState(false);
5254
+ const [openUpward, setOpenUpward] = useState(false);
5255
+ const [horizontalOffset, setHorizontalOffset] = useState(0);
3243
5256
  const dropdownRef = useRef(null);
5257
+ const menuRef = useRef(null);
3244
5258
  useEffect(() => {
3245
5259
  setImageError(false);
3246
5260
  const avatarUrl = user?.avatarUrl;
@@ -3265,6 +5279,33 @@ function UserButton({ afterSignOutUrl = "/", mode = "simple" }) {
3265
5279
  };
3266
5280
  void checkImageUrl();
3267
5281
  }, [user?.avatarUrl]);
5282
+ useEffect(() => {
5283
+ if (isOpen && dropdownRef.current) {
5284
+ const buttonRect = dropdownRef.current.getBoundingClientRect();
5285
+ const viewportHeight = window.innerHeight;
5286
+ const viewportWidth = window.innerWidth;
5287
+ const spaceBelow = viewportHeight - buttonRect.bottom;
5288
+ const spaceAbove = buttonRect.top;
5289
+ const menuHeight = 200;
5290
+ const shouldOpenUpward = spaceBelow < menuHeight && spaceAbove > spaceBelow;
5291
+ setOpenUpward(shouldOpenUpward);
5292
+ requestAnimationFrame(() => {
5293
+ if (menuRef.current) {
5294
+ const menuWidth = menuRef.current.offsetWidth;
5295
+ const menuRight = buttonRect.left + menuWidth;
5296
+ const viewportPadding = 16;
5297
+ if (menuRight > viewportWidth - viewportPadding) {
5298
+ const overflow = menuRight - (viewportWidth - viewportPadding);
5299
+ setHorizontalOffset(-overflow);
5300
+ } else {
5301
+ setHorizontalOffset(0);
5302
+ }
5303
+ }
5304
+ });
5305
+ } else {
5306
+ setHorizontalOffset(0);
5307
+ }
5308
+ }, [isOpen]);
3268
5309
  useEffect(() => {
3269
5310
  function handleClickOutside(event) {
3270
5311
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
@@ -3306,10 +5347,18 @@ function UserButton({ afterSignOutUrl = "/", mode = "simple" }) {
3306
5347
  ]
3307
5348
  }
3308
5349
  ),
3309
- isOpen && /* @__PURE__ */ jsx(UserButtonMenu, { children: /* @__PURE__ */ jsx(SignOutButton, { afterSignOutUrl, children: /* @__PURE__ */ jsxs(UserButtonMenuItem, { $signout: true, onClick: () => setIsOpen(false), children: [
3310
- /* @__PURE__ */ jsx(UserButtonMenuItemIcon, { children: /* @__PURE__ */ jsx(LogOut, {}) }),
3311
- "Sign out"
3312
- ] }) }) })
5350
+ isOpen && /* @__PURE__ */ jsx(
5351
+ UserButtonMenu,
5352
+ {
5353
+ ref: menuRef,
5354
+ $openUpward: openUpward,
5355
+ $horizontalOffset: horizontalOffset,
5356
+ children: /* @__PURE__ */ jsx(SignOutButton, { afterSignOutUrl, children: /* @__PURE__ */ jsxs(UserButtonMenuItem, { $signout: true, onClick: () => setIsOpen(false), children: [
5357
+ /* @__PURE__ */ jsx(UserButtonMenuItemIcon, { children: /* @__PURE__ */ jsx(LogOut, {}) }),
5358
+ "Sign out"
5359
+ ] }) })
5360
+ }
5361
+ )
3313
5362
  ] });
3314
5363
  }
3315
5364
  function Protect({
@@ -3417,6 +5466,28 @@ function useUser() {
3417
5466
  const { user, isLoaded, updateUser, setUser } = useInsforge();
3418
5467
  return { user, isLoaded, updateUser, setUser };
3419
5468
  }
5469
+ /*! Bundled license information:
5470
+
5471
+ react-is/cjs/react-is.production.min.js:
5472
+ (** @license React v16.13.1
5473
+ * react-is.production.min.js
5474
+ *
5475
+ * Copyright (c) Facebook, Inc. and its affiliates.
5476
+ *
5477
+ * This source code is licensed under the MIT license found in the
5478
+ * LICENSE file in the root directory of this source tree.
5479
+ *)
5480
+
5481
+ react-is/cjs/react-is.development.js:
5482
+ (** @license React v16.13.1
5483
+ * react-is.development.js
5484
+ *
5485
+ * Copyright (c) Facebook, Inc. and its affiliates.
5486
+ *
5487
+ * This source code is licensed under the MIT license found in the
5488
+ * LICENSE file in the root directory of this source tree.
5489
+ *)
5490
+ */
3420
5491
 
3421
5492
  export { AuthBranding, AuthContainer, AuthDivider, AuthEmailVerificationStep, AuthErrorBanner, AuthFormField, AuthHeader, AuthLink, AuthOAuthButton, AuthOAuthProviders, AuthPasswordField, AuthPasswordStrengthIndicator, AuthResetPasswordVerificationStep, AuthSubmitButton, AuthVerificationCodeInput, BrowserNavigationAdapter, ForgotPassword, ForgotPasswordForm, InsforgeProvider, InsforgeProviderCore, NavigationProvider, OAUTH_PROVIDER_CONFIG, Protect, ResetPassword, ResetPasswordForm, SignIn, SignInButton, SignInForm, SignOutButton, SignUp, SignUpButton, SignUpForm, SignedIn, SignedOut, StyleProvider, UserButton, VerifyEmail, VerifyEmailStatus, checkPasswordStrength, createPasswordSchema, emailSchema, getAllProviderConfigs, getProviderConfig, passwordSchema, resolveAuthPath, resolveAuthUrl, theme, useAuth, useInsforge, useNavigationAdapter, usePublicAuthConfig, useSearchParams, useUser, validateEmail, validatePassword };
3422
5493
  //# sourceMappingURL=index.js.map