@har-analyzer/components 0.0.5 → 0.0.9

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.
@@ -1,996 +0,0 @@
1
- import { Q as Re, R as Fe, U as Oe, V as Me, c as g, W as P, x as ve, X as $e, Y as Le, y as ke, _ as M, l as G, Z as pe, i as De, w as Be, o as oe, $ as Ve, N as We, p as ue, a0 as Ce, a1 as He, a2 as Ge, a3 as Ue, a4 as Ke, a5 as Ye, a6 as Qe, e as Xe, a7 as me, a8 as _e, a9 as we, aa as Ze, ab as xe, ac as Je, ad as ge, ae as le, af as et, f as tt, ag as nt, ah as at, ai as J, aj as it, ak as st, al as rt, H as ot, am as lt, an as ut, A as ct, B as $, K as dt, ao as _t, n as ft, ap as L, s as pt, aq as mt, ar as ht, as as vt, at as wt } from "./content-type.js";
2
- import s, { useRef as q, useEffect as A, createContext as U, useState as H, useLayoutEffect as gt, useCallback as V, useContext as ee, useMemo as bt, useImperativeHandle as yt } from "react";
3
- import '../assets/internal.css';const te = [
4
- ["xl", 1840],
5
- ["l", 1320],
6
- ["m", 1120],
7
- ["s", 912],
8
- ["xs", 688],
9
- ["xxs", 465],
10
- ["default", -1]
11
- ], St = te.filter((e) => e[0] === "xs")[0][1], kt = te.map(([e]) => e);
12
- function Ct(e, t) {
13
- const n = te.slice(kt.indexOf(t));
14
- for (const [a] of n) {
15
- const i = e[a];
16
- if (i !== void 0)
17
- return i;
18
- }
19
- return null;
20
- }
21
- function Ee(e, t) {
22
- for (const [n, a] of te)
23
- if (e > a && (!t || t.indexOf(n) !== -1))
24
- return n;
25
- return "default";
26
- }
27
- function ln(e) {
28
- return te.find((t) => t[0] === e)[1];
29
- }
30
- const xt = Symbol.for("awsui-force-mobile-mode");
31
- function be() {
32
- const e = globalThis[xt];
33
- return typeof e < "u" ? e : typeof window > "u" ? !1 : window.matchMedia ? window.matchMedia(`(max-width: ${St}px)`).matches : Ee(window.innerWidth, ["xs"]) !== "xs";
34
- }
35
- const he = Re({
36
- initialState: () => be(),
37
- factory: (e) => {
38
- const t = () => e(be());
39
- return window.addEventListener("resize", t), () => {
40
- window.removeEventListener("resize", t);
41
- };
42
- }
43
- });
44
- let D = {
45
- funnelStart() {
46
- return "";
47
- },
48
- funnelError() {
49
- },
50
- funnelComplete() {
51
- },
52
- funnelSuccessful() {
53
- },
54
- funnelCancelled() {
55
- },
56
- funnelChange() {
57
- },
58
- funnelStepStart() {
59
- },
60
- funnelStepComplete() {
61
- },
62
- funnelStepNavigation() {
63
- },
64
- funnelStepError() {
65
- },
66
- funnelStepChange() {
67
- },
68
- funnelSubStepStart() {
69
- },
70
- funnelSubStepComplete() {
71
- },
72
- funnelSubStepError() {
73
- },
74
- helpPanelInteracted() {
75
- },
76
- externalLinkInteracted() {
77
- }
78
- }, un = {
79
- tableInteraction() {
80
- },
81
- taskCompletionData() {
82
- },
83
- modalPerformanceData() {
84
- }
85
- }, cn = {
86
- componentMounted() {
87
- return "";
88
- },
89
- componentUpdated() {
90
- }
91
- };
92
- function Et(e) {
93
- const t = Fe(e), n = Oe(e), a = Me(e);
94
- return g({
95
- "awsui-polaris-dark-mode awsui-dark-mode": t === "dark",
96
- "awsui-polaris-compact-mode awsui-compact-mode": n === "compact",
97
- "awsui-visual-refresh": !1,
98
- [`awsui-context-${a}`]: a
99
- });
100
- }
101
- function dn(e) {
102
- return $e(e.currentTarget) || Le(e.currentTarget);
103
- }
104
- function _n(e, { onActivate: t, onBlockEnd: n, onBlockStart: a, onDefault: i, onEnd: l, onEscape: c, onHome: u, onInlineEnd: d, onInlineStart: o, onPageDown: r, onPageUp: _ }) {
105
- switch (e.keyCode) {
106
- case P.down:
107
- n?.();
108
- break;
109
- case P.end:
110
- l?.();
111
- break;
112
- case P.enter:
113
- case P.space:
114
- t?.();
115
- break;
116
- case P.escape:
117
- c?.();
118
- break;
119
- case P.home:
120
- u?.();
121
- break;
122
- case P.left:
123
- ve(e.currentTarget) ? d?.() : o?.();
124
- break;
125
- case P.pageDown:
126
- r?.();
127
- break;
128
- case P.pageUp:
129
- _?.();
130
- break;
131
- case P.right:
132
- ve(e.currentTarget) ? o?.() : d?.();
133
- break;
134
- case P.up:
135
- a?.();
136
- break;
137
- default:
138
- i?.();
139
- break;
140
- }
141
- }
142
- const qt = {
143
- stickyVerticalTopOffset: "--awsui-sticky-vertical-top-offset",
144
- stickyVerticalBottomOffset: "--awsui-sticky-vertical-bottom-offset"
145
- };
146
- var fn = "var(--border-panel-top-width-10990j, 1px)", It = "var(--space-scaled-s-8ozaad, 12px)", pn = "var(--space-xs-ymlm0b, 8px)";
147
- const mn = (e) => {
148
- const t = q();
149
- return A(() => {
150
- t.current = e;
151
- }), t.current;
152
- };
153
- function qe(e) {
154
- const t = e?.join();
155
- return ke((n) => Ee(n.contentBoxWidth, e), [t]);
156
- }
157
- const W = {
158
- grid: "awsui_grid_14yj0_y2kz6_145",
159
- "no-gutters": "awsui_no-gutters_14yj0_y2kz6_181",
160
- "grid-column": "awsui_grid-column_14yj0_y2kz6_186",
161
- "colspan-1": "awsui_colspan-1_14yj0_y2kz6_197",
162
- "push-1": "awsui_push-1_14yj0_y2kz6_201",
163
- "pull-1": "awsui_pull-1_14yj0_y2kz6_204",
164
- "colspan-2": "awsui_colspan-2_14yj0_y2kz6_207",
165
- "push-2": "awsui_push-2_14yj0_y2kz6_211",
166
- "pull-2": "awsui_pull-2_14yj0_y2kz6_214",
167
- "colspan-3": "awsui_colspan-3_14yj0_y2kz6_217",
168
- "push-3": "awsui_push-3_14yj0_y2kz6_221",
169
- "pull-3": "awsui_pull-3_14yj0_y2kz6_224",
170
- "colspan-4": "awsui_colspan-4_14yj0_y2kz6_227",
171
- "push-4": "awsui_push-4_14yj0_y2kz6_231",
172
- "pull-4": "awsui_pull-4_14yj0_y2kz6_234",
173
- "colspan-5": "awsui_colspan-5_14yj0_y2kz6_237",
174
- "push-5": "awsui_push-5_14yj0_y2kz6_241",
175
- "pull-5": "awsui_pull-5_14yj0_y2kz6_244",
176
- "colspan-6": "awsui_colspan-6_14yj0_y2kz6_247",
177
- "push-6": "awsui_push-6_14yj0_y2kz6_251",
178
- "pull-6": "awsui_pull-6_14yj0_y2kz6_254",
179
- "colspan-7": "awsui_colspan-7_14yj0_y2kz6_257",
180
- "push-7": "awsui_push-7_14yj0_y2kz6_261",
181
- "pull-7": "awsui_pull-7_14yj0_y2kz6_264",
182
- "colspan-8": "awsui_colspan-8_14yj0_y2kz6_267",
183
- "push-8": "awsui_push-8_14yj0_y2kz6_271",
184
- "pull-8": "awsui_pull-8_14yj0_y2kz6_274",
185
- "colspan-9": "awsui_colspan-9_14yj0_y2kz6_277",
186
- "push-9": "awsui_push-9_14yj0_y2kz6_281",
187
- "pull-9": "awsui_pull-9_14yj0_y2kz6_284",
188
- "colspan-10": "awsui_colspan-10_14yj0_y2kz6_287",
189
- "push-10": "awsui_push-10_14yj0_y2kz6_291",
190
- "pull-10": "awsui_pull-10_14yj0_y2kz6_294",
191
- "colspan-11": "awsui_colspan-11_14yj0_y2kz6_297",
192
- "push-11": "awsui_push-11_14yj0_y2kz6_301",
193
- "pull-11": "awsui_pull-11_14yj0_y2kz6_304",
194
- "colspan-12": "awsui_colspan-12_14yj0_y2kz6_307",
195
- "push-12": "awsui_push-12_14yj0_y2kz6_311",
196
- "pull-12": "awsui_pull-12_14yj0_y2kz6_314",
197
- "push-0": "awsui_push-0_14yj0_y2kz6_317",
198
- "pull-0": "awsui_pull-0_14yj0_y2kz6_320",
199
- "offset-1": "awsui_offset-1_14yj0_y2kz6_323",
200
- "offset-2": "awsui_offset-2_14yj0_y2kz6_326",
201
- "offset-3": "awsui_offset-3_14yj0_y2kz6_329",
202
- "offset-4": "awsui_offset-4_14yj0_y2kz6_332",
203
- "offset-5": "awsui_offset-5_14yj0_y2kz6_335",
204
- "offset-6": "awsui_offset-6_14yj0_y2kz6_338",
205
- "offset-7": "awsui_offset-7_14yj0_y2kz6_341",
206
- "offset-8": "awsui_offset-8_14yj0_y2kz6_344",
207
- "offset-9": "awsui_offset-9_14yj0_y2kz6_347",
208
- "offset-10": "awsui_offset-10_14yj0_y2kz6_350",
209
- "offset-11": "awsui_offset-11_14yj0_y2kz6_353",
210
- "restore-pointer-events": "awsui_restore-pointer-events_14yj0_y2kz6_357"
211
- }, Tt = s.forwardRef((e, t) => {
212
- var { __breakpoint: n, gridDefinition: a = [], disableGutters: i = !1, children: l, __tagOverride: c, __responsiveClassName: u, __internalRootRef: d = null } = e, o = M(e, ["__breakpoint", "gridDefinition", "disableGutters", "children", "__tagOverride", "__responsiveClassName", "__internalRootRef"]);
213
- let [r, _] = qe(void 0);
214
- n !== void 0 && (r = n, _ = t);
215
- const b = G(o), h = pe(l), C = c ?? "div";
216
- if (De) {
217
- const x = a.length, p = h.length;
218
- x !== p && Be("Grid", `The number of children (${p}) does not match the number of columns defined (${x}).`);
219
- }
220
- const E = oe(_, d);
221
- return s.createElement(C, Object.assign({}, b, { className: g(W.grid, b.className, { [W["no-gutters"]]: i }, u ? u(r) : null), ref: E }), h.map((x, p) => {
222
- var y, f, k, v;
223
- const w = x.key;
224
- return s.createElement(
225
- "div",
226
- { key: w ? String(w) : void 0, className: g(W["grid-column"], se("colspan", (y = a[p]) === null || y === void 0 ? void 0 : y.colspan, r), se("offset", (f = a[p]) === null || f === void 0 ? void 0 : f.offset, r), se("pull", (k = a[p]) === null || k === void 0 ? void 0 : k.pull, r), se("push", (v = a[p]) === null || v === void 0 ? void 0 : v.push, r)) },
227
- s.createElement("div", { className: W["restore-pointer-events"] }, x)
228
- );
229
- }));
230
- });
231
- function se(e, t, n) {
232
- return typeof t == "number" ? W[`${e}-${t}`] : n === null || t === void 0 ? null : W[`${e}-${Ct(t, n)}`];
233
- }
234
- const Ie = U(void 0);
235
- function Nt({ isMobile: e, __stickyOffset: t, __mobileStickyOffset: n, hasInnerOverflowParents: a, __additionalOffset: i }) {
236
- const l = e ? (t ?? 0) - (n ?? 0) : t ?? 0;
237
- return a || t !== void 0 ? `${l}px` : `calc(${`var(${qt.stickyVerticalTopOffset}, 0px)`} + ${l}px + ${i ? It : "0px"})`;
238
- }
239
- const Te = U({
240
- isStuck: !1,
241
- isStuckAtBottom: !1
242
- }), zt = (e, t, n, a, i, l, c = !1) => {
243
- const u = he(), o = !(u && l) && !!n, [r, _] = H(!1), [b, h] = H(!1), [C, E] = H(!1);
244
- gt(() => {
245
- if (e.current) {
246
- const f = Ve(e.current), k = We(e.current, (v) => v.tagName === "MAIN");
247
- _(f.length > 0 && f[0] !== k);
248
- }
249
- }, [e]);
250
- const x = Nt({
251
- isMobile: u,
252
- __stickyOffset: a,
253
- __mobileStickyOffset: i,
254
- hasInnerOverflowParents: r,
255
- __additionalOffset: c
256
- }), p = o ? {
257
- style: {
258
- top: x
259
- }
260
- } : {}, y = V(({ isTrusted: f, target: k, type: v }) => {
261
- if (!(v === "resize" && k === window && !f) && e.current && t.current) {
262
- const w = parseFloat(getComputedStyle(e.current).borderTopWidth) || 0, I = Math.round(e.current.getBoundingClientRect().top + w), N = Math.round(t.current.getBoundingClientRect().top);
263
- I < N ? h(!0) : h(!1);
264
- const z = Math.round(e.current.getBoundingClientRect().bottom - w), R = Math.round(t.current.getBoundingClientRect().bottom);
265
- z <= R ? E(!0) : E(!1);
266
- }
267
- }, [e, t]);
268
- return A(() => {
269
- if (o) {
270
- const f = new AbortController();
271
- return window.addEventListener("scroll", y, { capture: !0, signal: f.signal }), window.addEventListener("resize", y, { signal: f.signal }), () => {
272
- f.abort();
273
- };
274
- }
275
- }, [o, y]), {
276
- isSticky: o,
277
- isStuck: b,
278
- isStuckAtBottom: C,
279
- stickyStyles: p
280
- };
281
- }, Ne = U({}), ze = U({ isInContainer: !1 }), jt = ({ children: e }) => s.createElement(ze.Provider, { value: { isInContainer: !0 } }, e), Pt = () => {
282
- const { isInContainer: e } = ee(ze);
283
- return e;
284
- }, At = (e) => {
285
- if (!e || typeof e != "string")
286
- return;
287
- const n = (e.includes("/") ? e.split("/")[1] : e).match(/\d+/);
288
- return n ? parseInt(n[0], 10) : void 0;
289
- }, je = U(null), hn = je.Provider, Rt = () => ee(je), Ft = (e) => {
290
- const t = Rt(), n = bt(() => At(e), [e]);
291
- A(() => {
292
- var a;
293
- if (!((a = t?.headerRef) === null || a === void 0) && a.current && n !== void 0)
294
- return t.headerRef.current.totalCount = n, () => {
295
- var i;
296
- (i = t.headerRef.current) === null || i === void 0 || delete i.totalCount;
297
- };
298
- }, [t?.headerRef, n]);
299
- }, ye = {
300
- "heading-text": "awsui_heading-text_105ke_268sp_5"
301
- }, S = {
302
- root: "awsui_root_2qdw9_88efd_181",
303
- refresh: "awsui_refresh_2qdw9_88efd_217",
304
- "root-no-actions": "awsui_root-no-actions_2qdw9_88efd_217",
305
- "root-variant-h2": "awsui_root-variant-h2_2qdw9_88efd_220",
306
- "root-variant-h3": "awsui_root-variant-h3_2qdw9_88efd_220",
307
- "root-has-description": "awsui_root-has-description_2qdw9_88efd_220",
308
- "root-variant-h1": "awsui_root-variant-h1_2qdw9_88efd_229",
309
- main: "awsui_main_2qdw9_88efd_239",
310
- "no-wrap": "awsui_no-wrap_2qdw9_88efd_249",
311
- "main-variant-h1": "awsui_main-variant-h1_2qdw9_88efd_255",
312
- actions: "awsui_actions_2qdw9_88efd_263",
313
- "actions-centered": "awsui_actions-centered_2qdw9_88efd_268",
314
- "actions-variant-h1": "awsui_actions-variant-h1_2qdw9_88efd_271",
315
- "actions-variant-h2": "awsui_actions-variant-h2_2qdw9_88efd_275",
316
- "actions-variant-h3": "awsui_actions-variant-h3_2qdw9_88efd_279",
317
- title: "awsui_title_2qdw9_88efd_295",
318
- "title-variant-h1": "awsui_title-variant-h1_2qdw9_88efd_300",
319
- "title-variant-h2": "awsui_title-variant-h2_2qdw9_88efd_307",
320
- "title-variant-h3": "awsui_title-variant-h3_2qdw9_88efd_313",
321
- "virtual-space": "awsui_virtual-space_2qdw9_88efd_334",
322
- info: "awsui_info_2qdw9_88efd_340",
323
- description: "awsui_description_2qdw9_88efd_344",
324
- "description-variant-h1": "awsui_description-variant-h1_2qdw9_88efd_351",
325
- "description-variant-h2": "awsui_description-variant-h2_2qdw9_88efd_355",
326
- "description-variant-h3": "awsui_description-variant-h3_2qdw9_88efd_362",
327
- heading: "awsui_heading_2qdw9_88efd_373",
328
- "heading-variant-h1": "awsui_heading-variant-h1_2qdw9_88efd_384",
329
- "heading-variant-h2": "awsui_heading-variant-h2_2qdw9_88efd_389",
330
- "heading-variant-h3": "awsui_heading-variant-h3_2qdw9_88efd_394",
331
- "heading-text": "awsui_heading-text_2qdw9_88efd_400",
332
- "heading-text-variant-h1": "awsui_heading-text-variant-h1_2qdw9_88efd_403",
333
- "heading-text-variant-h2": "awsui_heading-text-variant-h2_2qdw9_88efd_411",
334
- "heading-text-variant-h3": "awsui_heading-text-variant-h3_2qdw9_88efd_419",
335
- counter: "awsui_counter_2qdw9_88efd_428"
336
- };
337
- function vn(e) {
338
- var { variant: t, headingTagOverride: n, children: a, actions: i, counter: l, description: c, info: u, __internalRootRef: d = null, __disableActionsWrapping: o, __headingTagRef: r, __headingTagTabIndex: _ } = e, b = M(e, ["variant", "headingTagOverride", "children", "actions", "counter", "description", "info", "__internalRootRef", "__disableActionsWrapping", "__headingTagRef", "__headingTagTabIndex"]);
339
- const h = he(), C = n ?? (t === "awsui-h1-sticky" ? "h1" : t), { isStuck: E } = ee(Te), x = G(b), p = ee(Ne).assignId, y = Pt(), f = ue("heading");
340
- Ft(l), p !== void 0 && p(f);
341
- const v = t === "awsui-h1-sticky" ? !h && E ? "h2" : "h1" : t;
342
- return s.createElement(
343
- "div",
344
- Object.assign({}, x, { className: g(S.root, x.className, S[`root-variant-${v}`], S.refresh, !i && [S["root-no-actions"]], c && [S["root-has-description"]]), ref: d }),
345
- s.createElement(
346
- "div",
347
- { className: g(S.main, S[`main-variant-${v}`], S.refresh, o && [S["no-wrap"]]) },
348
- s.createElement(
349
- "div",
350
- { className: g(S.title, S[`title-variant-${v}`], S.refresh) },
351
- s.createElement(
352
- C,
353
- Object.assign({ className: g(S.heading, S[`heading-variant-${v}`]), ref: r, tabIndex: _ }, Ce(`.${ye["heading-text"]}`)),
354
- s.createElement("span", Object.assign({}, y ? { [Ge]: He } : {}, { className: g(S["heading-text"], ye["heading-text"], S[`heading-text-variant-${v}`]), id: f }), a),
355
- l !== void 0 && s.createElement(
356
- "span",
357
- { className: S.counter },
358
- " ",
359
- l
360
- )
361
- ),
362
- u && s.createElement(
363
- Ie.Provider,
364
- { value: f },
365
- s.createElement("span", { className: S["virtual-space"] }, "  "),
366
- s.createElement("span", { className: S.info }, u)
367
- )
368
- ),
369
- i && s.createElement("div", { className: g(S.actions, S[`actions-variant-${v}`], S.refresh, !o && [S["actions-centered"]]) }, i)
370
- ),
371
- s.createElement(Ot, { variantOverride: v }, c)
372
- );
373
- }
374
- function Ot({ children: e, variantOverride: t }) {
375
- return e && s.createElement("p", { className: g(S.description, S[`description-variant-${t}`], S.refresh) }, e) || null;
376
- }
377
- const Pe = {
378
- defaultVariant: "secondary"
379
- }, Ae = U(Pe), Mt = ({ children: e }) => s.createElement(
380
- Ue.Provider,
381
- { value: { onClick: () => {
382
- } } },
383
- s.createElement(
384
- Ne.Provider,
385
- { value: { assignId: () => {
386
- } } },
387
- s.createElement(
388
- Ke.Provider,
389
- { value: {} },
390
- s.createElement(
391
- Ie.Provider,
392
- { value: "" },
393
- s.createElement(
394
- Ae.Provider,
395
- { value: Pe },
396
- s.createElement(Ye.Provider, { value: Qe }, e)
397
- )
398
- )
399
- )
400
- )
401
- );
402
- function $t(e, t) {
403
- const n = q();
404
- return n.current = e, V(Xe((...a) => {
405
- n.current && n.current(...a);
406
- }, t), []);
407
- }
408
- const Lt = "1.4", wn = (e) => {
409
- const { isInFunnel: t } = me();
410
- return t && e.funnelType === "single-page" ? s.createElement(s.Fragment, null, e.children) : s.createElement(Ht, Object.assign({}, e));
411
- }, Dt = "awsui-creation-edit-flow-done", Bt = () => {
412
- var e;
413
- try {
414
- (e = window.top) === null || e === void 0 || e.document.dispatchEvent(new Event(Dt));
415
- } catch {
416
- }
417
- }, Vt = ({ funnelInteractionId: e, funnelIdentifier: t }) => {
418
- }, Se = (e) => {
419
- D.funnelComplete({
420
- funnelInteractionId: e.taskInteractionId,
421
- funnelIdentifier: e.taskIdentifier
422
- }), Bt();
423
- };
424
- function Wt(e, t) {
425
- for (const n of e)
426
- if (document.querySelector(n))
427
- return n;
428
- return t;
429
- }
430
- const Ht = (e) => {
431
- var { mounted: t = !0, children: n, stepConfiguration: a } = e, i = M(e, ["mounted", "children", "stepConfiguration"]);
432
- const [l, c] = H(""), [u, d] = H(0), o = q("default"), r = q(ge()), _ = q(0), b = q(0), h = q(0), C = q(void 0), E = q(0);
433
- A(() => {
434
- if (!t)
435
- return;
436
- let k;
437
- const v = setTimeout(() => {
438
- var w, I;
439
- if (r.current = Wt(((w = i.funnelNameSelectors) === null || w === void 0 ? void 0 : w.call(i)) || [], ge()), i.funnelType === "single-page" && h.current > 0)
440
- return;
441
- o.current = "default";
442
- const N = (I = le(r.current)) !== null && I !== void 0 ? I : "", z = [
443
- {
444
- number: 1,
445
- isOptional: !1,
446
- name: N,
447
- stepIdentifier: i.funnelIdentifier
448
- }
449
- ];
450
- let R = et;
451
- k = D.funnelStart({
452
- funnelName: N,
453
- funnelIdentifier: i.funnelIdentifier,
454
- flowType: i.funnelFlowType,
455
- funnelNameSelector: r.current,
456
- optionalStepNumbers: i.optionalStepNumbers,
457
- funnelType: i.funnelType,
458
- totalFunnelSteps: i.totalFunnelSteps,
459
- componentVersion: tt,
460
- componentTheme: R,
461
- funnelVersion: Lt,
462
- stepConfiguration: a ?? z,
463
- resourceType: i.funnelResourceType || le(`[${nt}]`)
464
- }), c(k);
465
- }, 1);
466
- return () => {
467
- if (clearTimeout(v), !(i.funnelType === "single-page" && h.current > 0)) {
468
- if (o.current === "validating") {
469
- const w = {
470
- taskIdentifier: i.funnelIdentifier,
471
- taskType: i.funnelType,
472
- timeToRespondAfterFormSubmit: performance.now() - E.current,
473
- taskInteractionId: k,
474
- taskFlowType: i.funnelFlowType
475
- };
476
- Se(w), o.current = "complete";
477
- }
478
- o.current === "complete" ? D.funnelSuccessful({ funnelInteractionId: k, funnelIdentifier: i.funnelIdentifier }) : (o.current = "cancelled", Vt({ funnelInteractionId: k, funnelIdentifier: i.funnelIdentifier }));
479
- }
480
- };
481
- }, [t]);
482
- const x = () => {
483
- o.current = "validating", E.current = performance.now();
484
- const k = 50, v = 100, w = () => {
485
- if (o.current !== "complete") {
486
- if (b.current > 0) {
487
- setTimeout(w, v);
488
- return;
489
- }
490
- if (_.current === 0) {
491
- const I = {
492
- taskIdentifier: i.funnelIdentifier,
493
- taskType: i.funnelType,
494
- timeToRespondAfterFormSubmit: performance.now() - E.current,
495
- taskInteractionId: l,
496
- taskFlowType: i.funnelFlowType
497
- };
498
- Se(I), o.current = "complete";
499
- } else
500
- o.current = "default";
501
- }
502
- };
503
- setTimeout(w, k);
504
- }, p = () => d((k) => k + 1), y = () => {
505
- }, f = {
506
- funnelInteractionId: l,
507
- funnelIdentifier: i.funnelIdentifier,
508
- funnelFlowType: i.funnelFlowType,
509
- funnelErrorContext: i.funnelErrorContext,
510
- setFunnelInteractionId: c,
511
- funnelType: i.funnelType,
512
- optionalStepNumbers: i.optionalStepNumbers,
513
- totalFunnelSteps: i.totalFunnelSteps,
514
- funnelNameSelector: r.current,
515
- funnelSubmit: x,
516
- funnelCancel: y,
517
- submissionAttempt: u,
518
- funnelNextOrSubmitAttempt: p,
519
- funnelState: o,
520
- errorCount: _,
521
- loadingButtonCount: b,
522
- latestFocusCleanupFunction: C,
523
- isInFunnel: !0,
524
- wizardCount: h
525
- };
526
- return s.createElement(at.Provider, { value: f }, n);
527
- }, gn = (e) => s.createElement(Ut, Object.assign({}, e, { key: e.stepNumber }));
528
- function fe() {
529
- return Array.from(document.querySelectorAll(J())).map((n, a) => {
530
- var i, l, c, u, d;
531
- const o = (l = (i = n?.__awsuiMetadata__) === null || i === void 0 ? void 0 : i.analytics) === null || l === void 0 ? void 0 : l.instanceIdentifier;
532
- return {
533
- name: (d = (u = (c = n.querySelector(xe())) === null || c === void 0 ? void 0 : c.innerText) === null || u === void 0 ? void 0 : u.trim()) !== null && d !== void 0 ? d : "",
534
- number: a + 1,
535
- subStepIdentifier: o
536
- };
537
- });
538
- }
539
- function Gt(e, t) {
540
- const n = q(/* @__PURE__ */ new Map()), a = 50, i = q(!1);
541
- return A(() => {
542
- const c = setTimeout(() => i.current = !0, a);
543
- return () => {
544
- clearTimeout(c), i.current = !1;
545
- };
546
- }, []), A(() => {
547
- const c = setTimeout(() => n.current.set(e, fe()), a);
548
- return () => {
549
- clearTimeout(c);
550
- };
551
- }, [e]), { onStepChange: $t(() => {
552
- i.current && (n.current.set(e, fe()), t(n.current.get(e)));
553
- }, a), subStepConfiguration: n };
554
- }
555
- const Ut = (e) => {
556
- var { mounted: t = !0, children: n, stepNumber: a, stepIdentifier: i, stepErrorContext: l } = e, c = M(e, ["mounted", "children", "stepNumber", "stepIdentifier", "stepErrorContext"]);
557
- const { funnelInteractionId: u, funnelIdentifier: d, funnelNameSelector: o, funnelState: r, funnelType: _ } = me(), b = _e(), h = b.isInStep, C = b.funnelInteractionId, E = { [rt]: a }, x = q(0), p = c.stepNameSelector || o, { onStepChange: y, subStepConfiguration: f } = Gt(a, (w) => {
558
- u && D.funnelStepChange({
559
- stepIdentifier: i,
560
- funnelIdentifier: d,
561
- funnelInteractionId: u,
562
- stepNumber: a,
563
- stepNameSelector: p,
564
- subStepAllSelector: J(),
565
- totalSubSteps: x.current,
566
- subStepConfiguration: w
567
- });
568
- });
569
- A(() => {
570
- if (!u || t)
571
- return;
572
- const w = le(p), I = setTimeout(() => {
573
- r.current !== "cancelled" && D.funnelStepComplete({
574
- funnelIdentifier: d,
575
- funnelInteractionId: u,
576
- stepIdentifier: i,
577
- stepNumber: a,
578
- stepName: w,
579
- stepNameSelector: p,
580
- subStepAllSelector: J(),
581
- totalSubSteps: x.current
582
- });
583
- }, 0);
584
- return () => {
585
- clearTimeout(I);
586
- };
587
- }, [
588
- i,
589
- d,
590
- u,
591
- a,
592
- p,
593
- r,
594
- h,
595
- _,
596
- C,
597
- t
598
- ]), A(() => {
599
- if (!u || h && C)
600
- return;
601
- const w = le(p);
602
- return r.current === "default" && D.funnelStepStart({
603
- stepIdentifier: i,
604
- funnelIdentifier: d,
605
- funnelInteractionId: u,
606
- stepNumber: a,
607
- stepName: w,
608
- stepNameSelector: p,
609
- subStepAllSelector: J(),
610
- totalSubSteps: x.current,
611
- subStepConfiguration: fe()
612
- }), () => {
613
- r.current !== "cancelled" && D.funnelStepComplete({
614
- funnelIdentifier: d,
615
- funnelInteractionId: u,
616
- stepIdentifier: i,
617
- stepNumber: a,
618
- stepName: w,
619
- stepNameSelector: p,
620
- subStepAllSelector: J(),
621
- // eslint-disable-next-line react-hooks/exhaustive-deps
622
- totalSubSteps: x.current
623
- });
624
- };
625
- }, [
626
- i,
627
- d,
628
- u,
629
- a,
630
- p,
631
- r,
632
- h,
633
- _,
634
- C
635
- ]);
636
- const v = h && C ? b : {
637
- stepIdentifier: i,
638
- stepNumber: a,
639
- stepNameSelector: p,
640
- funnelStepProps: E,
641
- subStepCount: x,
642
- isInStep: !0,
643
- funnelInteractionId: u,
644
- onStepChange: y,
645
- subStepConfiguration: f,
646
- stepErrorContext: l
647
- };
648
- return s.createElement(it.Provider, { value: v }, typeof n == "function" ? n(v) : n);
649
- }, bn = ({ children: e, subStepIdentifier: t, subStepErrorContext: n }) => {
650
- const a = ue("substep"), i = Je(a), l = xe(a), c = q(null), { subStepCount: u, onStepChange: d } = _e(), o = q(!1), r = q(!1), _ = q(void 0), { funnelState: b, funnelInteractionId: h } = me(), { stepNumber: C, stepNameSelector: E } = _e(), x = {
651
- subStepIdentifier: t,
652
- subStepErrorContext: n,
653
- subStepSelector: i,
654
- subStepNameSelector: l,
655
- subStepId: a,
656
- subStepRef: c,
657
- mousePressed: o,
658
- isFocusedSubStep: r,
659
- focusCleanupFunction: _,
660
- isNestedSubStep: !1
661
- }, p = Object.assign(Object.assign({}, ee(we)), { isNestedSubStep: !0 }), y = !!p.subStepId;
662
- A(() => {
663
- if (!y)
664
- return u.current++, d(), () => {
665
- u.current--, d();
666
- };
667
- }, [y, u, d]);
668
- const f = y ? p : x;
669
- return A(() => {
670
- if (y || !c.current)
671
- return;
672
- const k = () => o.current = !0, v = () => Ze(void 0, void 0, void 0, function* () {
673
- var I;
674
- o.current = !1, r.current && (yield new Promise((N) => setTimeout(N, 1)), (!c.current || !document.activeElement || !st(c.current, document.activeElement)) && (r.current = !1, (I = _.current) === null || I === void 0 || I.call(_)));
675
- }), w = new AbortController();
676
- return window.addEventListener("mousedown", k, { signal: w.signal }), window.addEventListener("mouseup", v, { signal: w.signal }), () => {
677
- w.abort();
678
- };
679
- }, [
680
- h,
681
- b,
682
- E,
683
- C,
684
- l,
685
- i,
686
- _,
687
- y,
688
- c
689
- ]), s.createElement(we.Provider, { value: f }, typeof e == "function" ? e(f) : e);
690
- }, yn = (e) => Object.keys(e).filter((n) => n.indexOf("__") !== 0).reduce((n, a) => (n[a] = e[a], n), {}), re = {
691
- header: "awsui_header_164jl_1ns0c_5"
692
- }, m = {
693
- root: "awsui_root_14iqq_1vhb3_189",
694
- "fit-height": "awsui_fit-height_14iqq_1vhb3_222",
695
- "with-side-media": "awsui_with-side-media_14iqq_1vhb3_227",
696
- "variant-default": "awsui_variant-default_14iqq_1vhb3_230",
697
- "variant-stacked": "awsui_variant-stacked_14iqq_1vhb3_230",
698
- refresh: "awsui_refresh_14iqq_1vhb3_238",
699
- "sticky-enabled": "awsui_sticky-enabled_14iqq_1vhb3_288",
700
- "with-stuck-sticky-header-at-bottom": "awsui_with-stuck-sticky-header-at-bottom_14iqq_1vhb3_294",
701
- "with-top-media": "awsui_with-top-media_14iqq_1vhb3_304",
702
- "content-wrapper": "awsui_content-wrapper_14iqq_1vhb3_309",
703
- "content-wrapper-fit-height": "awsui_content-wrapper-fit-height_14iqq_1vhb3_314",
704
- media: "awsui_media_14iqq_1vhb3_321",
705
- "media-top": "awsui_media-top_14iqq_1vhb3_339",
706
- "media-side": "awsui_media-side_14iqq_1vhb3_344",
707
- header: "awsui_header_14iqq_1vhb3_350",
708
- "header-full-page": "awsui_header-full-page_14iqq_1vhb3_355",
709
- "header-variant-embedded": "awsui_header-variant-embedded_14iqq_1vhb3_358",
710
- "header-sticky-enabled": "awsui_header-sticky-enabled_14iqq_1vhb3_358",
711
- "header-with-media": "awsui_header-with-media_14iqq_1vhb3_361",
712
- "header-sticky-disabled": "awsui_header-sticky-disabled_14iqq_1vhb3_367",
713
- "header-stuck": "awsui_header-stuck_14iqq_1vhb3_377",
714
- "header-variant-cards": "awsui_header-variant-cards_14iqq_1vhb3_387",
715
- "header-dynamic-height": "awsui_header-dynamic-height_14iqq_1vhb3_390",
716
- "with-paddings": "awsui_with-paddings_14iqq_1vhb3_396",
717
- "with-hidden-content": "awsui_with-hidden-content_14iqq_1vhb3_405",
718
- "header-variant-full-page": "awsui_header-variant-full-page_14iqq_1vhb3_463",
719
- "header-cover": "awsui_header-cover_14iqq_1vhb3_466",
720
- content: "awsui_content_14iqq_1vhb3_309",
721
- "content-fit-height": "awsui_content-fit-height_14iqq_1vhb3_494",
722
- "content-inner": "awsui_content-inner_14iqq_1vhb3_500",
723
- "with-header": "awsui_with-header_14iqq_1vhb3_507",
724
- footer: "awsui_footer_14iqq_1vhb3_511",
725
- "with-divider": "awsui_with-divider_14iqq_1vhb3_515"
726
- }, Kt = {
727
- "content-inner": "awsui_content-inner_1mwlm_oyjaq_5"
728
- };
729
- function Sn(e) {
730
- const { subStepRef: t, funnelSubStepProps: n } = lt(), a = ut();
731
- return s.createElement(Yt, Object.assign({}, e, { __subStepRef: a?.isInModal ? { current: null } : t, __funnelSubStepProps: a?.isInModal ? {} : n }));
732
- }
733
- function Yt(e) {
734
- var t, { header: n, footer: a, children: i, variant: l = "default", disableHeaderPaddings: c = !1, disableContentPaddings: u = !1, disableFooterPaddings: d = !1, fitHeight: o, media: r, __stickyOffset: _, __mobileStickyOffset: b, __stickyHeader: h = !1, __internalRootRef: C = null, __disableFooterDivider: E = !1, __hiddenContent: x = !1, __headerRef: p, __fullPage: y = !1, __disableStickyMobile: f = !0, __funnelSubStepProps: k, __subStepRef: v } = e, w = M(e, ["header", "footer", "children", "variant", "disableHeaderPaddings", "disableContentPaddings", "disableFooterPaddings", "fitHeight", "media", "__stickyOffset", "__mobileStickyOffset", "__stickyHeader", "__internalRootRef", "__disableFooterDivider", "__hiddenContent", "__headerRef", "__fullPage", "__disableStickyMobile", "__funnelSubStepProps", "__subStepRef"]);
735
- const I = he(), N = ot(), z = G(w), R = q(null), ne = q(null), { isSticky: K, isStuck: B, isStuckAtBottom: ae, stickyStyles: Y } = zt(R, ne, h, _, b, f, y && N && !I), ce = ue(), Q = l === "full-page", ie = oe(R, C), de = oe(ne, p), T = K && !I, j = !!r?.content, X = (t = r?.position) !== null && t !== void 0 ? t : "top";
736
- return s.createElement(
737
- "div",
738
- Object.assign({}, z, k, { className: g(z.className, m.root, m[`variant-${l}`], o && m["fit-height"], j && (X === "side" ? m["with-side-media"] : m["with-top-media"]), T && [m["sticky-enabled"]], T && B && ae && [m["with-stuck-sticky-header-at-bottom"]], m.refresh), ref: ie }, Ce(`.${re.header} h1, .${re.header} h2, .${re.header} h3`)),
739
- j && s.createElement("div", { className: g(m[`media-${X === "side" ? "side" : "top"}`], m.media), style: X === "top" ? { height: r?.height || "" } : { width: r?.width || "" } }, r.content),
740
- s.createElement(
741
- "div",
742
- { id: ce, ref: v, className: g(m["content-wrapper"], o && m["content-wrapper-fit-height"]) },
743
- n && s.createElement(
744
- jt,
745
- null,
746
- s.createElement(
747
- Te.Provider,
748
- { value: { isStuck: B, isStuckAtBottom: ae } },
749
- s.createElement(
750
- "div",
751
- Object.assign({ className: g(m.refresh, m.header, re.header, m[`header-variant-${l}`], {
752
- [m["header-sticky-disabled"]]: h && !K,
753
- [m["header-sticky-enabled"]]: K,
754
- [m["header-dynamic-height"]]: Q,
755
- [m["header-stuck"]]: B,
756
- [m["with-paddings"]]: !c,
757
- [m["with-hidden-content"]]: !i || x,
758
- [m["header-with-media"]]: j,
759
- [m["header-full-page"]]: y && N
760
- }) }, Y, { ref: de }),
761
- B && !I && N && y && s.createElement("div", { className: m["header-cover"] }),
762
- n
763
- )
764
- )
765
- ),
766
- s.createElement(
767
- "div",
768
- { className: g(m.content, o && m["content-fit-height"]) },
769
- s.createElement("div", { className: g(m["content-inner"], Kt["content-inner"], {
770
- [m["with-paddings"]]: !u,
771
- [m["with-header"]]: !!n
772
- }) }, i)
773
- ),
774
- a && s.createElement("div", { className: g(m.footer, {
775
- [m["with-divider"]]: !E,
776
- [m["with-paddings"]]: !d
777
- }) }, a)
778
- )
779
- );
780
- }
781
- const F = {
782
- "icon-shake": "awsui_icon-shake_1cbgc_12wag_153",
783
- "awsui-motion-shake-horizontally": "awsui_awsui-motion-shake-horizontally_1cbgc_12wag_1",
784
- "container-fade-in": "awsui_container-fade-in_1cbgc_12wag_181",
785
- "awsui-motion-fade-in-0": "awsui_awsui-motion-fade-in-0_1cbgc_12wag_1",
786
- root: "awsui_root_1cbgc_12wag_203",
787
- "status-error": "awsui_status-error_1cbgc_12wag_212",
788
- "status-warning": "awsui_status-warning_1cbgc_12wag_215",
789
- "status-success": "awsui_status-success_1cbgc_12wag_218",
790
- "status-info": "awsui_status-info_1cbgc_12wag_221",
791
- "status-stopped": "awsui_status-stopped_1cbgc_12wag_224",
792
- "status-pending": "awsui_status-pending_1cbgc_12wag_227",
793
- "status-in-progress": "awsui_status-in-progress_1cbgc_12wag_230",
794
- "status-loading": "awsui_status-loading_1cbgc_12wag_233",
795
- "color-override-red": "awsui_color-override-red_1cbgc_12wag_236",
796
- "color-override-grey": "awsui_color-override-grey_1cbgc_12wag_239",
797
- "color-override-blue": "awsui_color-override-blue_1cbgc_12wag_242",
798
- "color-override-green": "awsui_color-override-green_1cbgc_12wag_245",
799
- "color-override-yellow": "awsui_color-override-yellow_1cbgc_12wag_248",
800
- container: "awsui_container_1cbgc_12wag_181",
801
- "display-inline": "awsui_display-inline_1cbgc_12wag_252",
802
- icon: "awsui_icon_1cbgc_12wag_153",
803
- "display-inline-block": "awsui_display-inline-block_1cbgc_12wag_260",
804
- "overflow-ellipsis": "awsui_overflow-ellipsis_1cbgc_12wag_269"
805
- }, Qt = (e) => ({
806
- error: s.createElement($, { name: "status-negative", size: e }),
807
- warning: s.createElement($, { name: "status-warning", size: e }),
808
- success: s.createElement($, { name: "status-positive", size: e }),
809
- info: s.createElement($, { name: "status-info", size: e }),
810
- stopped: s.createElement($, { name: "status-stopped", size: e }),
811
- pending: s.createElement($, { name: "status-pending", size: e }),
812
- "in-progress": s.createElement($, { name: "status-in-progress", size: e }),
813
- loading: s.createElement(ct, null)
814
- });
815
- function kn(e) {
816
- var { type: t, children: n, iconAriaLabel: a, colorOverride: i, wrapText: l = !0, __animate: c = !1, __internalRootRef: u, __size: d = "normal", __display: o = "inline-block" } = e, r = M(e, ["type", "children", "iconAriaLabel", "colorOverride", "wrapText", "__animate", "__internalRootRef", "__size", "__display"]);
817
- const _ = G(r);
818
- return s.createElement(
819
- "span",
820
- Object.assign({}, _, { className: g(F.root, F[`status-${t}`], {
821
- [F[`color-override-${i}`]]: i
822
- }, _.className), ref: u }),
823
- s.createElement(
824
- "span",
825
- { className: g(F.container, F[`display-${o}`], l === !1 && F["overflow-ellipsis"], c && F["container-fade-in"]) },
826
- s.createElement(
827
- "span",
828
- { className: g(F.icon, c && F["icon-shake"]), "aria-label": a, role: a ? "img" : void 0 },
829
- Qt(d)[t],
830
- o === "inline" && s.createElement(s.Fragment, null, " ")
831
- ),
832
- n
833
- )
834
- );
835
- }
836
- const Z = {
837
- "css-grid": "awsui_css-grid_zqq3x_1t536_181",
838
- "grid-no-gutters": "awsui_grid-no-gutters_zqq3x_1t536_192",
839
- "grid-variant-text-grid": "awsui_grid-variant-text-grid_zqq3x_1t536_195",
840
- item: "awsui_item_zqq3x_1t536_195",
841
- "first-column": "awsui_first-column_zqq3x_1t536_212"
842
- }, Xt = (e) => e % 2 !== 0;
843
- function Zt(e, t, n) {
844
- if (!n)
845
- return e;
846
- const a = Math.min(e, Math.floor(n / t));
847
- return Math.max(1, a < e && Xt(a) ? a - 1 : a);
848
- }
849
- function Jt({ columns: e = 1, minColumnWidth: t = 0, disableGutters: n, variant: a, children: i, __tagOverride: l }) {
850
- const [c, u] = ke((b) => b.contentBoxWidth), d = Zt(e, t, c), o = a !== "text-grid" && n, r = pe(i), _ = l ?? "div";
851
- return s.createElement(_, { ref: u, className: g(Z["css-grid"], Z[`grid-variant-${a}`], o && [Z["grid-no-gutters"]]), style: { gridTemplateColumns: `repeat(${d}, minmax(0, 1fr))` } }, r.map((b, h) => {
852
- const C = b.key;
853
- return s.createElement("div", { key: C ? String(C) : void 0, className: g(Z.item, {
854
- [Z["first-column"]]: h % d === 0
855
- }) }, b);
856
- }));
857
- }
858
- function en(e, t) {
859
- const n = [];
860
- for (let a = 0; a < t; a++)
861
- n[a] = e;
862
- return n;
863
- }
864
- const O = {
865
- "column-layout": "awsui_column-layout_vvxn7_u5w81_181",
866
- grid: "awsui_grid_vvxn7_u5w81_213",
867
- "grid-no-gutters": "awsui_grid-no-gutters_vvxn7_u5w81_219",
868
- "grid-variant-text-grid": "awsui_grid-variant-text-grid_vvxn7_u5w81_223",
869
- "grid-breakpoint-default": "awsui_grid-breakpoint-default_vvxn7_u5w81_231",
870
- "grid-columns-1": "awsui_grid-columns-1_vvxn7_u5w81_234",
871
- "grid-breakpoint-xxs": "awsui_grid-breakpoint-xxs_vvxn7_u5w81_234",
872
- "grid-breakpoint-xs": "awsui_grid-breakpoint-xs_vvxn7_u5w81_237",
873
- "grid-columns-2": "awsui_grid-columns-2_vvxn7_u5w81_240",
874
- "grid-columns-3": "awsui_grid-columns-3_vvxn7_u5w81_246",
875
- "grid-columns-4": "awsui_grid-columns-4_vvxn7_u5w81_252",
876
- "grid-vertical-borders": "awsui_grid-vertical-borders_vvxn7_u5w81_268",
877
- "grid-horizontal-borders": "awsui_grid-horizontal-borders_vvxn7_u5w81_301"
878
- }, tn = {
879
- 1: { colspan: { default: 12, xxs: 12, xs: 12 } },
880
- 2: { colspan: { default: 12, xxs: 6, xs: 6 } },
881
- 3: { colspan: { default: 12, xxs: 6, xs: 4 } },
882
- 4: { colspan: { default: 12, xxs: 6, xs: 3 } }
883
- };
884
- function nn({ columns: e, variant: t, borders: n, disableGutters: a, __breakpoint: i, children: l, __tagOverride: c }) {
885
- var u;
886
- const d = t === "text-grid", o = !d && a, r = !d && (n === "horizontal" || n === "all"), _ = !d && (n === "vertical" || n === "all"), b = pe(l), [h, C] = qe(an);
887
- return s.createElement(Tt, { ref: C, disableGutters: !0, gridDefinition: en((u = tn[e]) !== null && u !== void 0 ? u : {}, b.length), className: g(O.grid, O[`grid-columns-${e}`], O[`grid-variant-${t}`], {
888
- [O["grid-horizontal-borders"]]: r,
889
- [O["grid-vertical-borders"]]: _,
890
- [O["grid-no-gutters"]]: o
891
- }), __breakpoint: i || h, __responsiveClassName: (E) => E && O[`grid-breakpoint-${E}`], __tagOverride: c }, l);
892
- }
893
- const an = ["default", "xxs", "xs"];
894
- function Cn(e) {
895
- var { columns: t = 1, variant: n = "default", borders: a = "none", disableGutters: i = !1, minColumnWidth: l, children: c, __tagOverride: u, __breakpoint: d, __internalRootRef: o } = e, r = M(e, ["columns", "variant", "borders", "disableGutters", "minColumnWidth", "children", "__tagOverride", "__breakpoint", "__internalRootRef"]);
896
- const _ = G(r);
897
- return s.createElement("div", Object.assign({}, _, { className: g(_.className, O["column-layout"]), ref: o }), l ? s.createElement(Jt, { columns: t, borders: a, variant: n, minColumnWidth: l, disableGutters: i, __tagOverride: u }, c) : s.createElement(nn, { columns: t, variant: n, borders: a, disableGutters: i, __breakpoint: d, __tagOverride: u }, c));
898
- }
899
- const xn = s.forwardRef(sn);
900
- function sn(e, t) {
901
- var { position: n = "right", size: a = "medium", fixedWidth: i = !1, triggerType: l = "text", dismissButton: c = !0, children: u, header: d, content: o, triggerAriaLabel: r, wrapTriggerText: _ = !0, isInline: b = !1, renderWithPortal: h = !1, __onOpen: C, __internalRootRef: E = null, __closeAnalyticsAction: x } = e, p = M(e, ["position", "size", "fixedWidth", "triggerType", "dismissButton", "children", "header", "content", "triggerAriaLabel", "wrapTriggerText", "isInline", "renderWithPortal", "__onOpen", "__internalRootRef", "__closeAnalyticsAction"]);
902
- const y = G(p), f = q(null), k = q(null), v = q(null), I = dt("popover")("dismissAriaLabel", p.dismissAriaLabel), [N, z] = H(!1), R = V(() => {
903
- var T, j;
904
- ["text", "text-inline"].includes(l) ? (T = f.current) === null || T === void 0 || T.focus() : f.current && ((j = _t(f.current)) === null || j === void 0 || j.focus());
905
- }, [l]), ne = V(() => {
906
- ft(C), z(!0);
907
- }, [C]), K = V(() => {
908
- z(!1), R();
909
- }, [R]), B = V((T) => {
910
- const j = T.keyCode === P.escape, X = T.keyCode === P.tab;
911
- j && N && T.stopPropagation(), (X || j) && z(!1);
912
- }, [N]);
913
- yt(t, () => ({
914
- dismiss: () => {
915
- z(!1);
916
- },
917
- focus: () => {
918
- z(!1), R();
919
- }
920
- })), A(() => {
921
- if (!f.current)
922
- return;
923
- const T = f.current.ownerDocument, j = () => {
924
- v.current === null && z(!1);
925
- };
926
- return T.addEventListener("mousedown", j), () => {
927
- T.removeEventListener("mousedown", j);
928
- };
929
- }, []);
930
- const ae = Et(f), Y = {
931
- // https://github.com/microsoft/TypeScript/issues/36659
932
- ref: f,
933
- onClick: ne,
934
- onKeyDown: B,
935
- className: g(L.trigger, L[`trigger-type-${l}`])
936
- }, { tabIndex: ce } = pt(f), Q = ue(), ie = s.createElement(
937
- "div",
938
- { "aria-live": c ? void 0 : "polite", "aria-atomic": c ? void 0 : !0, className: g(ae, !h && L["popover-inline-content"]), "data-awsui-referrer-id": Q },
939
- s.createElement(
940
- mt,
941
- { size: a, fixedWidth: i, position: n, trackRef: f, arrow: (T) => s.createElement(ht, { position: T }), renderWithPortal: h, zIndex: h ? 7e3 : void 0 },
942
- s.createElement(
943
- Ae.Provider,
944
- { value: { defaultVariant: "primary" } },
945
- s.createElement(vt, { dismissButton: c, dismissAriaLabel: I, header: d, onDismiss: K, overflowVisible: "both", closeAnalyticsAction: x }, o)
946
- )
947
- )
948
- ), de = oe(k, E);
949
- return s.createElement(
950
- "span",
951
- Object.assign({}, y, { className: g(L.root, y.className, l === "filtering-token" && L["root-filtering-token"], b && L["no-wrap"]), ref: de, onMouseDown: () => {
952
- v.current = requestAnimationFrame(() => {
953
- v.current = null;
954
- });
955
- } }),
956
- ["text", "text-inline"].includes(l) ? s.createElement("button", Object.assign({}, Y, { className: g(Y.className, _ === !1 && L["overflow-ellipsis"]), tabIndex: ce, type: "button", "aria-haspopup": "dialog", id: Q, "aria-label": r }), u) : s.createElement("span", Object.assign({}, Y, { id: Q }), u),
957
- N && s.createElement(Mt, null, h ? s.createElement(wt, null, ie) : ie)
958
- );
959
- }
960
- export {
961
- bn as A,
962
- Cn as C,
963
- Ot as D,
964
- D as F,
965
- Yt as I,
966
- Ae as L,
967
- un as P,
968
- Mt as R,
969
- kn as S,
970
- hn as T,
971
- xn as a,
972
- Sn as b,
973
- vn as c,
974
- qt as d,
975
- he as e,
976
- fn as f,
977
- yn as g,
978
- _n as h,
979
- qe as i,
980
- wn as j,
981
- gn as k,
982
- ln as l,
983
- Et as m,
984
- Ie as n,
985
- Tt as o,
986
- $t as p,
987
- Rt as q,
988
- At as r,
989
- pn as s,
990
- cn as t,
991
- mn as u,
992
- dn as v,
993
- Te as w,
994
- Ne as x,
995
- S as y
996
- };