@react-aria/overlays 3.12.0 → 3.12.1

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/main.js CHANGED
@@ -29,40 +29,68 @@ $parcel$export(module.exports, "usePopover", () => $6c2dfcdee3e15e20$export$542a
29
29
  $parcel$export(module.exports, "useModalOverlay", () => $11b7e0b04b421e95$export$dbc0f175b25fb0fb);
30
30
  $parcel$export(module.exports, "Overlay", () => $745edbb83ab4296f$export$c6fdb837b070b4ff);
31
31
  $parcel$export(module.exports, "useOverlayFocusContain", () => $745edbb83ab4296f$export$14c98a7594375490);
32
- const $5935ba4d7da2c103$var$AXIS = {
33
- top: 'top',
34
- bottom: 'top',
35
- left: 'left',
36
- right: 'left'
32
+ /*
33
+ * Copyright 2020 Adobe. All rights reserved.
34
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
35
+ * you may not use this file except in compliance with the License. You may obtain a copy
36
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
37
+ *
38
+ * Unless required by applicable law or agreed to in writing, software distributed under
39
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
40
+ * OF ANY KIND, either express or implied. See the License for the specific language
41
+ * governing permissions and limitations under the License.
42
+ */ /*
43
+ * Copyright 2020 Adobe. All rights reserved.
44
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
45
+ * you may not use this file except in compliance with the License. You may obtain a copy
46
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
47
+ *
48
+ * Unless required by applicable law or agreed to in writing, software distributed under
49
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
50
+ * OF ANY KIND, either express or implied. See the License for the specific language
51
+ * governing permissions and limitations under the License.
52
+ */ /*
53
+ * Copyright 2020 Adobe. All rights reserved.
54
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
55
+ * you may not use this file except in compliance with the License. You may obtain a copy
56
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
57
+ *
58
+ * Unless required by applicable law or agreed to in writing, software distributed under
59
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
60
+ * OF ANY KIND, either express or implied. See the License for the specific language
61
+ * governing permissions and limitations under the License.
62
+ */ const $5935ba4d7da2c103$var$AXIS = {
63
+ top: "top",
64
+ bottom: "top",
65
+ left: "left",
66
+ right: "left"
37
67
  };
38
68
  const $5935ba4d7da2c103$var$FLIPPED_DIRECTION = {
39
- top: 'bottom',
40
- bottom: 'top',
41
- left: 'right',
42
- right: 'left'
69
+ top: "bottom",
70
+ bottom: "top",
71
+ left: "right",
72
+ right: "left"
43
73
  };
44
74
  const $5935ba4d7da2c103$var$CROSS_AXIS = {
45
- top: 'left',
46
- left: 'top'
75
+ top: "left",
76
+ left: "top"
47
77
  };
48
78
  const $5935ba4d7da2c103$var$AXIS_SIZE = {
49
- top: 'height',
50
- left: 'width'
51
- };
52
- const $5935ba4d7da2c103$var$PARSED_PLACEMENT_CACHE = {
79
+ top: "height",
80
+ left: "width"
53
81
  };
82
+ const $5935ba4d7da2c103$var$PARSED_PLACEMENT_CACHE = {};
54
83
  // @ts-ignore
55
- let $5935ba4d7da2c103$var$visualViewport = typeof window !== 'undefined' && window.visualViewport;
84
+ let $5935ba4d7da2c103$var$visualViewport = typeof window !== "undefined" && window.visualViewport;
56
85
  function $5935ba4d7da2c103$var$getContainerDimensions(containerNode) {
57
86
  let width = 0, height = 0, top = 0, left = 0;
58
- let scroll = {
59
- };
60
- if (containerNode.tagName === 'BODY') {
87
+ let scroll = {};
88
+ if (containerNode.tagName === "BODY") {
61
89
  let documentElement = document.documentElement;
62
- var ref;
63
- width = (ref = $5935ba4d7da2c103$var$visualViewport === null || $5935ba4d7da2c103$var$visualViewport === void 0 ? void 0 : $5935ba4d7da2c103$var$visualViewport.width) !== null && ref !== void 0 ? ref : documentElement.clientWidth;
64
- var ref1;
65
- height = (ref1 = $5935ba4d7da2c103$var$visualViewport === null || $5935ba4d7da2c103$var$visualViewport === void 0 ? void 0 : $5935ba4d7da2c103$var$visualViewport.height) !== null && ref1 !== void 0 ? ref1 : documentElement.clientHeight;
90
+ var _visualViewport_width;
91
+ width = (_visualViewport_width = $5935ba4d7da2c103$var$visualViewport === null || $5935ba4d7da2c103$var$visualViewport === void 0 ? void 0 : $5935ba4d7da2c103$var$visualViewport.width) !== null && _visualViewport_width !== void 0 ? _visualViewport_width : documentElement.clientWidth;
92
+ var _visualViewport_height;
93
+ height = (_visualViewport_height = $5935ba4d7da2c103$var$visualViewport === null || $5935ba4d7da2c103$var$visualViewport === void 0 ? void 0 : $5935ba4d7da2c103$var$visualViewport.height) !== null && _visualViewport_height !== void 0 ? _visualViewport_height : documentElement.clientHeight;
66
94
  scroll.top = documentElement.scrollTop || containerNode.scrollTop;
67
95
  scroll.left = documentElement.scrollLeft || containerNode.scrollLeft;
68
96
  } else {
@@ -106,10 +134,10 @@ function $5935ba4d7da2c103$var$getMargins(node) {
106
134
  }
107
135
  function $5935ba4d7da2c103$var$parsePlacement(input) {
108
136
  if ($5935ba4d7da2c103$var$PARSED_PLACEMENT_CACHE[input]) return $5935ba4d7da2c103$var$PARSED_PLACEMENT_CACHE[input];
109
- let [placement, crossPlacement] = input.split(' ');
110
- let axis = $5935ba4d7da2c103$var$AXIS[placement] || 'right';
137
+ let [placement, crossPlacement] = input.split(" ");
138
+ let axis = $5935ba4d7da2c103$var$AXIS[placement] || "right";
111
139
  let crossAxis = $5935ba4d7da2c103$var$CROSS_AXIS[axis];
112
- if (!$5935ba4d7da2c103$var$AXIS[crossPlacement]) crossPlacement = 'center';
140
+ if (!$5935ba4d7da2c103$var$AXIS[crossPlacement]) crossPlacement = "center";
113
141
  let size = $5935ba4d7da2c103$var$AXIS_SIZE[axis];
114
142
  let crossSize = $5935ba4d7da2c103$var$AXIS_SIZE[crossAxis];
115
143
  $5935ba4d7da2c103$var$PARSED_PLACEMENT_CACHE[input] = {
@@ -124,11 +152,10 @@ function $5935ba4d7da2c103$var$parsePlacement(input) {
124
152
  }
125
153
  function $5935ba4d7da2c103$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned) {
126
154
  let { placement: placement , crossPlacement: crossPlacement , axis: axis , crossAxis: crossAxis , size: size , crossSize: crossSize } = placementInfo;
127
- let position = {
128
- };
155
+ let position = {};
129
156
  // button position
130
157
  position[crossAxis] = childOffset[crossAxis];
131
- if (crossPlacement === 'center') // + (button size / 2) - (overlay size / 2)
158
+ if (crossPlacement === "center") // + (button size / 2) - (overlay size / 2)
132
159
  // at this point the overlay center should match the button center
133
160
  position[crossAxis] += (childOffset[crossSize] - overlaySize[crossSize]) / 2;
134
161
  else if (crossPlacement !== crossAxis) // + (button size) - (overlay size)
@@ -157,9 +184,13 @@ function $5935ba4d7da2c103$var$computePosition(childOffset, boundaryDimensions,
157
184
  return position;
158
185
  }
159
186
  function $5935ba4d7da2c103$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding) {
160
- return position.top != null ? Math.max(0, boundaryDimensions.height + boundaryDimensions.top + boundaryDimensions.scroll.top - (containerOffsetWithBoundary.top + position.top) - (margins.top + margins.bottom + padding) // save additional space for margin and padding
161
- ) : Math.max(0, childOffset.top + containerOffsetWithBoundary.top - (boundaryDimensions.top + boundaryDimensions.scroll.top) - (margins.top + margins.bottom + padding) // save additional space for margin and padding
162
- );
187
+ return position.top != null ? Math.max(0, boundaryDimensions.height + boundaryDimensions.top + boundaryDimensions.scroll.top // this is the bottom of the boundary
188
+ - (containerOffsetWithBoundary.top + position.top // this is the top of the overlay
189
+ ) - (margins.top + margins.bottom + padding // save additional space for margin and padding
190
+ )) : Math.max(0, childOffset.top + containerOffsetWithBoundary.top // this is the top of the trigger
191
+ - (boundaryDimensions.top + boundaryDimensions.scroll.top // this is the top of the boundary
192
+ ) - (margins.top + margins.bottom + padding // save additional space for margin and padding
193
+ ));
163
194
  }
164
195
  function $5935ba4d7da2c103$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo) {
165
196
  let { placement: placement , axis: axis , size: size } = placementInfo;
@@ -192,8 +223,7 @@ function $5935ba4d7da2c103$export$6839422d1f33cee9(placementInput, childOffset,
192
223
  position = $5935ba4d7da2c103$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned);
193
224
  delta = $5935ba4d7da2c103$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, padding);
194
225
  position[crossAxis] += delta;
195
- let arrowPosition = {
196
- };
226
+ let arrowPosition = {};
197
227
  arrowPosition[crossAxis] = childOffset[crossAxis] - position[crossAxis] + childOffset[crossSize] / 2;
198
228
  return {
199
229
  position: position,
@@ -206,9 +236,9 @@ function $5935ba4d7da2c103$export$6839422d1f33cee9(placementInput, childOffset,
206
236
  function $5935ba4d7da2c103$export$b3ceb0cbf1056d98(opts) {
207
237
  let { placement: placement , targetNode: targetNode , overlayNode: overlayNode , scrollNode: scrollNode , padding: padding , shouldFlip: shouldFlip , boundaryElement: boundaryElement , offset: offset , crossOffset: crossOffset , maxHeight: maxHeight } = opts;
208
238
  let container = overlayNode instanceof HTMLElement && overlayNode.offsetParent || document.body;
209
- let isBodyContainer = container.tagName === 'BODY';
239
+ let isBodyContainer = container.tagName === "BODY";
210
240
  const containerPositionStyle = window.getComputedStyle(container).position;
211
- let isContainerPositioned = !!containerPositionStyle && containerPositionStyle !== 'static';
241
+ let isContainerPositioned = !!containerPositionStyle && containerPositionStyle !== "static";
212
242
  let childOffset = isBodyContainer ? $5935ba4d7da2c103$var$getOffset(targetNode) : $5935ba4d7da2c103$var$getPosition(targetNode, container);
213
243
  if (!isBodyContainer) {
214
244
  let { marginTop: marginTop , marginLeft: marginLeft } = window.getComputedStyle(targetNode);
@@ -221,7 +251,7 @@ function $5935ba4d7da2c103$export$b3ceb0cbf1056d98(opts) {
221
251
  overlaySize.height += margins.top + margins.bottom;
222
252
  let scrollSize = $5935ba4d7da2c103$var$getScroll(scrollNode);
223
253
  let boundaryDimensions = $5935ba4d7da2c103$var$getContainerDimensions(boundaryElement);
224
- let containerOffsetWithBoundary = boundaryElement.tagName === 'BODY' ? $5935ba4d7da2c103$var$getOffset(container) : $5935ba4d7da2c103$var$getPosition(container, boundaryElement);
254
+ let containerOffsetWithBoundary = boundaryElement.tagName === "BODY" ? $5935ba4d7da2c103$var$getOffset(container) : $5935ba4d7da2c103$var$getPosition(container, boundaryElement);
225
255
  return $5935ba4d7da2c103$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight);
226
256
  }
227
257
  function $5935ba4d7da2c103$var$getOffset(node) {
@@ -237,7 +267,7 @@ function $5935ba4d7da2c103$var$getOffset(node) {
237
267
  function $5935ba4d7da2c103$var$getPosition(node, parent) {
238
268
  let style = window.getComputedStyle(node);
239
269
  let offset;
240
- if (style.position === 'fixed') {
270
+ if (style.position === "fixed") {
241
271
  let { top: top , left: left , width: width , height: height } = node.getBoundingClientRect();
242
272
  offset = {
243
273
  top: top,
@@ -261,11 +291,21 @@ function $5935ba4d7da2c103$var$getPosition(node, parent) {
261
291
 
262
292
 
263
293
 
264
-
294
+ /*
295
+ * Copyright 2020 Adobe. All rights reserved.
296
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
297
+ * you may not use this file except in compliance with the License. You may obtain a copy
298
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
299
+ *
300
+ * Unless required by applicable law or agreed to in writing, software distributed under
301
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
302
+ * OF ANY KIND, either express or implied. See the License for the specific language
303
+ * governing permissions and limitations under the License.
304
+ */
265
305
  const $9a8aa1b0b336ea3a$export$f6211563215e3b37 = new WeakMap();
266
306
  function $9a8aa1b0b336ea3a$export$18fc8428861184da(opts) {
267
307
  let { triggerRef: triggerRef , isOpen: isOpen , onClose: onClose } = opts;
268
- $6Zb2x$react.useEffect(()=>{
308
+ (0, $6Zb2x$react.useEffect)(()=>{
269
309
  if (!isOpen || onClose === null) return;
270
310
  let onScroll = (e)=>{
271
311
  // Ignore if scrolling an scrollable region outside the trigger's tree.
@@ -275,9 +315,9 @@ function $9a8aa1b0b336ea3a$export$18fc8428861184da(opts) {
275
315
  let onCloseHandler = onClose || $9a8aa1b0b336ea3a$export$f6211563215e3b37.get(triggerRef.current);
276
316
  if (onCloseHandler) onCloseHandler();
277
317
  };
278
- window.addEventListener('scroll', onScroll, true);
318
+ window.addEventListener("scroll", onScroll, true);
279
319
  return ()=>{
280
- window.removeEventListener('scroll', onScroll, true);
320
+ window.removeEventListener("scroll", onScroll, true);
281
321
  };
282
322
  }, [
283
323
  isOpen,
@@ -290,13 +330,12 @@ function $9a8aa1b0b336ea3a$export$18fc8428861184da(opts) {
290
330
 
291
331
 
292
332
  // @ts-ignore
293
- let $cd94b4896dd97759$var$visualViewport = typeof window !== 'undefined' && window.visualViewport;
333
+ let $cd94b4896dd97759$var$visualViewport = typeof window !== "undefined" && window.visualViewport;
294
334
  function $cd94b4896dd97759$export$d39e1813b3bdd0e1(props) {
295
- let { direction: direction } = $6Zb2x$reactariai18n.useLocale();
296
- let { targetRef: targetRef , overlayRef: overlayRef , scrollRef: scrollRef = overlayRef , placement: placement = 'bottom' , containerPadding: containerPadding = 12 , shouldFlip: shouldFlip = true , boundaryElement: boundaryElement = typeof document !== 'undefined' ? document.body : null , offset: offset = 0 , crossOffset: crossOffset = 0 , shouldUpdatePosition: shouldUpdatePosition = true , isOpen: isOpen = true , onClose: onClose , maxHeight: maxHeight } = props;
297
- let [position, setPosition] = $6Zb2x$react.useState({
298
- position: {
299
- },
335
+ let { direction: direction } = (0, $6Zb2x$reactariai18n.useLocale)();
336
+ let { targetRef: targetRef , overlayRef: overlayRef , scrollRef: scrollRef = overlayRef , placement: placement = "bottom" , containerPadding: containerPadding = 12 , shouldFlip: shouldFlip = true , boundaryElement: boundaryElement = typeof document !== "undefined" ? document.body : null , offset: offset = 0 , crossOffset: crossOffset = 0 , shouldUpdatePosition: shouldUpdatePosition = true , isOpen: isOpen = true , onClose: onClose , maxHeight: maxHeight } = props;
337
+ let [position, setPosition] = (0, $6Zb2x$react.useState)({
338
+ position: {},
300
339
  arrowOffsetLeft: undefined,
301
340
  arrowOffsetTop: undefined,
302
341
  maxHeight: undefined,
@@ -317,9 +356,9 @@ function $cd94b4896dd97759$export$d39e1813b3bdd0e1(props) {
317
356
  direction,
318
357
  maxHeight
319
358
  ];
320
- let updatePosition = $6Zb2x$react.useCallback(()=>{
359
+ let updatePosition = (0, $6Zb2x$react.useCallback)(()=>{
321
360
  if (shouldUpdatePosition === false || !isOpen || !overlayRef.current || !targetRef.current || !scrollRef.current || !boundaryElement) return;
322
- setPosition($5935ba4d7da2c103$export$b3ceb0cbf1056d98({
361
+ setPosition((0, $5935ba4d7da2c103$export$b3ceb0cbf1056d98)({
323
362
  placement: $cd94b4896dd97759$var$translateRTL(placement, direction),
324
363
  overlayNode: overlayRef.current,
325
364
  targetNode: targetRef.current,
@@ -335,18 +374,18 @@ function $cd94b4896dd97759$export$d39e1813b3bdd0e1(props) {
335
374
  }, deps);
336
375
  // Update position when anything changes
337
376
  // eslint-disable-next-line react-hooks/exhaustive-deps
338
- $6Zb2x$reactariautils.useLayoutEffect(updatePosition, deps);
377
+ (0, $6Zb2x$reactariautils.useLayoutEffect)(updatePosition, deps);
339
378
  // Update position on window resize
340
379
  $cd94b4896dd97759$var$useResize(updatePosition);
341
380
  // Update position when the overlay changes size (might need to flip).
342
- $6Zb2x$reactariautils.useResizeObserver({
381
+ (0, $6Zb2x$reactariautils.useResizeObserver)({
343
382
  ref: overlayRef,
344
383
  onResize: updatePosition
345
384
  });
346
385
  // Reposition the overlay and do not close on scroll while the visual viewport is resizing.
347
386
  // This will ensure that overlays adjust their positioning when the iOS virtual keyboard appears.
348
- let isResizing = $6Zb2x$react.useRef(false);
349
- $6Zb2x$reactariautils.useLayoutEffect(()=>{
387
+ let isResizing = (0, $6Zb2x$react.useRef)(false);
388
+ (0, $6Zb2x$reactariautils.useLayoutEffect)(()=>{
350
389
  let timeout;
351
390
  let onResize = ()=>{
352
391
  isResizing.current = true;
@@ -356,14 +395,14 @@ function $cd94b4896dd97759$export$d39e1813b3bdd0e1(props) {
356
395
  }, 500);
357
396
  updatePosition();
358
397
  };
359
- $cd94b4896dd97759$var$visualViewport === null || $cd94b4896dd97759$var$visualViewport === void 0 ? void 0 : $cd94b4896dd97759$var$visualViewport.addEventListener('resize', onResize);
398
+ $cd94b4896dd97759$var$visualViewport === null || $cd94b4896dd97759$var$visualViewport === void 0 ? void 0 : $cd94b4896dd97759$var$visualViewport.addEventListener("resize", onResize);
360
399
  return ()=>{
361
- $cd94b4896dd97759$var$visualViewport === null || $cd94b4896dd97759$var$visualViewport === void 0 ? void 0 : $cd94b4896dd97759$var$visualViewport.removeEventListener('resize', onResize);
400
+ $cd94b4896dd97759$var$visualViewport === null || $cd94b4896dd97759$var$visualViewport === void 0 ? void 0 : $cd94b4896dd97759$var$visualViewport.removeEventListener("resize", onResize);
362
401
  };
363
402
  }, [
364
403
  updatePosition
365
404
  ]);
366
- let close = $6Zb2x$react.useCallback(()=>{
405
+ let close = (0, $6Zb2x$react.useCallback)(()=>{
367
406
  if (!isResizing.current) onClose();
368
407
  }, [
369
408
  onClose,
@@ -371,7 +410,7 @@ function $cd94b4896dd97759$export$d39e1813b3bdd0e1(props) {
371
410
  ]);
372
411
  // When scrolling a parent scrollable region of the trigger (other than the body),
373
412
  // we hide the popover. Otherwise, its position would be incorrect.
374
- $9a8aa1b0b336ea3a$export$18fc8428861184da({
413
+ (0, $9a8aa1b0b336ea3a$export$18fc8428861184da)({
375
414
  triggerRef: targetRef,
376
415
  isOpen: isOpen,
377
416
  onClose: onClose && close
@@ -379,7 +418,7 @@ function $cd94b4896dd97759$export$d39e1813b3bdd0e1(props) {
379
418
  return {
380
419
  overlayProps: {
381
420
  style: {
382
- position: 'absolute',
421
+ position: "absolute",
383
422
  zIndex: 100000,
384
423
  ...position.position,
385
424
  maxHeight: position.maxHeight
@@ -396,29 +435,39 @@ function $cd94b4896dd97759$export$d39e1813b3bdd0e1(props) {
396
435
  };
397
436
  }
398
437
  function $cd94b4896dd97759$var$useResize(onResize) {
399
- $6Zb2x$reactariautils.useLayoutEffect(()=>{
400
- window.addEventListener('resize', onResize, false);
438
+ (0, $6Zb2x$reactariautils.useLayoutEffect)(()=>{
439
+ window.addEventListener("resize", onResize, false);
401
440
  return ()=>{
402
- window.removeEventListener('resize', onResize, false);
441
+ window.removeEventListener("resize", onResize, false);
403
442
  };
404
443
  }, [
405
444
  onResize
406
445
  ]);
407
446
  }
408
447
  function $cd94b4896dd97759$var$translateRTL(position, direction) {
409
- if (direction === 'rtl') return position.replace('start', 'right').replace('end', 'left');
410
- return position.replace('start', 'left').replace('end', 'right');
448
+ if (direction === "rtl") return position.replace("start", "right").replace("end", "left");
449
+ return position.replace("start", "left").replace("end", "right");
411
450
  }
412
451
 
413
452
 
414
-
453
+ /*
454
+ * Copyright 2020 Adobe. All rights reserved.
455
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
456
+ * you may not use this file except in compliance with the License. You may obtain a copy
457
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
458
+ *
459
+ * Unless required by applicable law or agreed to in writing, software distributed under
460
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
461
+ * OF ANY KIND, either express or implied. See the License for the specific language
462
+ * governing permissions and limitations under the License.
463
+ */
415
464
 
416
465
 
417
466
  const $82711f9cb668ecdb$var$visibleOverlays = [];
418
467
  function $82711f9cb668ecdb$export$ea8f71083e90600f(props, ref) {
419
468
  let { onClose: onClose , shouldCloseOnBlur: shouldCloseOnBlur , isOpen: isOpen , isDismissable: isDismissable = false , isKeyboardDismissDisabled: isKeyboardDismissDisabled = false , shouldCloseOnInteractOutside: shouldCloseOnInteractOutside } = props;
420
469
  // Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.
421
- $6Zb2x$react.useEffect(()=>{
470
+ (0, $6Zb2x$react.useEffect)(()=>{
422
471
  if (isOpen) $82711f9cb668ecdb$var$visibleOverlays.push(ref);
423
472
  return ()=>{
424
473
  let index = $82711f9cb668ecdb$var$visibleOverlays.indexOf(ref);
@@ -451,25 +500,25 @@ function $82711f9cb668ecdb$export$ea8f71083e90600f(props, ref) {
451
500
  };
452
501
  // Handle the escape key
453
502
  let onKeyDown = (e)=>{
454
- if (e.key === 'Escape' && !isKeyboardDismissDisabled) {
503
+ if (e.key === "Escape" && !isKeyboardDismissDisabled) {
455
504
  e.stopPropagation();
456
505
  e.preventDefault();
457
506
  onHide();
458
507
  }
459
508
  };
460
509
  // Handle clicking outside the overlay to close it
461
- $6Zb2x$reactariainteractions.useInteractOutside({
510
+ (0, $6Zb2x$reactariainteractions.useInteractOutside)({
462
511
  ref: ref,
463
512
  onInteractOutside: isDismissable ? onInteractOutside : null,
464
513
  onInteractOutsideStart: onInteractOutsideStart
465
514
  });
466
- let { focusWithinProps: focusWithinProps } = $6Zb2x$reactariainteractions.useFocusWithin({
515
+ let { focusWithinProps: focusWithinProps } = (0, $6Zb2x$reactariainteractions.useFocusWithin)({
467
516
  isDisabled: !shouldCloseOnBlur,
468
517
  onBlurWithin: (e)=>{
469
518
  // If focus is moving into a child focus scope (e.g. menu inside a dialog),
470
519
  // do not close the outer overlay. At this point, the active scope should
471
520
  // still be the outer overlay, since blur events run before focus.
472
- if (e.relatedTarget && $6Zb2x$reactariafocus.isElementInChildOfActiveScope(e.relatedTarget)) return;
521
+ if (e.relatedTarget && (0, $6Zb2x$reactariafocus.isElementInChildOfActiveScope)(e.relatedTarget)) return;
473
522
  if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose();
474
523
  }
475
524
  });
@@ -489,7 +538,17 @@ function $82711f9cb668ecdb$export$ea8f71083e90600f(props, ref) {
489
538
  }
490
539
 
491
540
 
492
-
541
+ /*
542
+ * Copyright 2020 Adobe. All rights reserved.
543
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
544
+ * you may not use this file except in compliance with the License. You may obtain a copy
545
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
546
+ *
547
+ * Unless required by applicable law or agreed to in writing, software distributed under
548
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
549
+ * OF ANY KIND, either express or implied. See the License for the specific language
550
+ * governing permissions and limitations under the License.
551
+ */
493
552
 
494
553
 
495
554
  function $b4878eb6316f670a$export$f9d5c8beee7d008d(props, state, ref) {
@@ -497,22 +556,22 @@ function $b4878eb6316f670a$export$f9d5c8beee7d008d(props, state, ref) {
497
556
  let { isOpen: isOpen } = state;
498
557
  // Backward compatibility. Share state close function with useOverlayPosition so it can close on scroll
499
558
  // without forcing users to pass onClose.
500
- $6Zb2x$react.useEffect(()=>{
501
- if (ref && ref.current) $9a8aa1b0b336ea3a$export$f6211563215e3b37.set(ref.current, state.close);
559
+ (0, $6Zb2x$react.useEffect)(()=>{
560
+ if (ref && ref.current) (0, $9a8aa1b0b336ea3a$export$f6211563215e3b37).set(ref.current, state.close);
502
561
  });
503
562
  // Aria 1.1 supports multiple values for aria-haspopup other than just menus.
504
563
  // https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup
505
564
  // However, we only add it for menus for now because screen readers often
506
565
  // announce it as a menu even for other values.
507
566
  let ariaHasPopup = undefined;
508
- if (type === 'menu') ariaHasPopup = true;
509
- else if (type === 'listbox') ariaHasPopup = 'listbox';
510
- let overlayId = $6Zb2x$reactariautils.useId();
567
+ if (type === "menu") ariaHasPopup = true;
568
+ else if (type === "listbox") ariaHasPopup = "listbox";
569
+ let overlayId = (0, $6Zb2x$reactariautils.useId)();
511
570
  return {
512
571
  triggerProps: {
513
- 'aria-haspopup': ariaHasPopup,
514
- 'aria-expanded': isOpen,
515
- 'aria-controls': isOpen ? overlayId : null,
572
+ "aria-haspopup": ariaHasPopup,
573
+ "aria-expanded": isOpen,
574
+ "aria-controls": isOpen ? overlayId : null,
516
575
  onPress: state.toggle
517
576
  },
518
577
  overlayProps: {
@@ -522,28 +581,47 @@ function $b4878eb6316f670a$export$f9d5c8beee7d008d(props, state, ref) {
522
581
  }
523
582
 
524
583
 
525
-
584
+ /*
585
+ * Copyright 2020 Adobe. All rights reserved.
586
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
587
+ * you may not use this file except in compliance with the License. You may obtain a copy
588
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
589
+ *
590
+ * Unless required by applicable law or agreed to in writing, software distributed under
591
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
592
+ * OF ANY KIND, either express or implied. See the License for the specific language
593
+ * governing permissions and limitations under the License.
594
+ */
526
595
  // @ts-ignore
527
- const $5c2f5cd01815d369$var$visualViewport = typeof window !== 'undefined' && window.visualViewport;
596
+ const $5c2f5cd01815d369$var$visualViewport = typeof window !== "undefined" && window.visualViewport;
528
597
  // HTML input types that do not cause the software keyboard to appear.
529
598
  const $5c2f5cd01815d369$var$nonTextInputTypes = new Set([
530
- 'checkbox',
531
- 'radio',
532
- 'range',
533
- 'color',
534
- 'file',
535
- 'image',
536
- 'button',
537
- 'submit',
538
- 'reset'
599
+ "checkbox",
600
+ "radio",
601
+ "range",
602
+ "color",
603
+ "file",
604
+ "image",
605
+ "button",
606
+ "submit",
607
+ "reset"
539
608
  ]);
540
- function $5c2f5cd01815d369$export$ee0f7cc6afcd1c18(options = {
541
- }) {
609
+ // The number of active usePreventScroll calls. Used to determine whether to revert back to the original page style/scroll position
610
+ let $5c2f5cd01815d369$var$preventScrollCount = 0;
611
+ let $5c2f5cd01815d369$var$restore;
612
+ function $5c2f5cd01815d369$export$ee0f7cc6afcd1c18(options = {}) {
542
613
  let { isDisabled: isDisabled } = options;
543
- $6Zb2x$reactariautils.useLayoutEffect(()=>{
614
+ (0, $6Zb2x$reactariautils.useLayoutEffect)(()=>{
544
615
  if (isDisabled) return;
545
- if ($6Zb2x$reactariautils.isIOS()) return $5c2f5cd01815d369$var$preventScrollMobileSafari();
546
- else return $5c2f5cd01815d369$var$preventScrollStandard();
616
+ $5c2f5cd01815d369$var$preventScrollCount++;
617
+ if ($5c2f5cd01815d369$var$preventScrollCount === 1) {
618
+ if ((0, $6Zb2x$reactariautils.isIOS)()) $5c2f5cd01815d369$var$restore = $5c2f5cd01815d369$var$preventScrollMobileSafari();
619
+ else $5c2f5cd01815d369$var$restore = $5c2f5cd01815d369$var$preventScrollStandard();
620
+ }
621
+ return ()=>{
622
+ $5c2f5cd01815d369$var$preventScrollCount--;
623
+ if ($5c2f5cd01815d369$var$preventScrollCount === 0) $5c2f5cd01815d369$var$restore();
624
+ };
547
625
  }, [
548
626
  isDisabled
549
627
  ]);
@@ -551,7 +629,7 @@ function $5c2f5cd01815d369$export$ee0f7cc6afcd1c18(options = {
551
629
  // For most browsers, all we need to do is set `overflow: hidden` on the root element, and
552
630
  // add some padding to prevent the page from shifting when the scrollbar is hidden.
553
631
  function $5c2f5cd01815d369$var$preventScrollStandard() {
554
- return $6Zb2x$reactariautils.chain($5c2f5cd01815d369$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $5c2f5cd01815d369$var$setStyle(document.documentElement, 'overflow', 'hidden'));
632
+ return (0, $6Zb2x$reactariautils.chain)($5c2f5cd01815d369$var$setStyle(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), $5c2f5cd01815d369$var$setStyle(document.documentElement, "overflow", "hidden"));
555
633
  }
556
634
  // Mobile Safari is a whole different beast. Even with overflow: hidden,
557
635
  // it still scrolls the page in many situations:
@@ -584,7 +662,7 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
584
662
  let lastY = 0;
585
663
  let onTouchStart = (e)=>{
586
664
  // Store the nearest scrollable parent element from the element that the user touched.
587
- scrollable = $6Zb2x$reactariautils.getScrollParent(e.target);
665
+ scrollable = (0, $6Zb2x$reactariautils.getScrollParent)(e.target);
588
666
  if (scrollable === document.documentElement && scrollable === document.body) return;
589
667
  lastY = e.changedTouches[0].pageY;
590
668
  };
@@ -612,10 +690,10 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
612
690
  // Apply a transform to trick Safari into thinking the input is at the top of the page
613
691
  // so it doesn't try to scroll it into view. When tapping on an input, this needs to
614
692
  // be done before the "focus" event, so we have to focus the element ourselves.
615
- target.style.transform = 'translateY(-2000px)';
693
+ target.style.transform = "translateY(-2000px)";
616
694
  target.focus();
617
695
  requestAnimationFrame(()=>{
618
- target.style.transform = '';
696
+ target.style.transform = "";
619
697
  });
620
698
  }
621
699
  };
@@ -626,9 +704,9 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
626
704
  // other than tapping on an input directly, e.g. the next/previous buttons in the
627
705
  // software keyboard. In these cases, it seems applying the transform in the focus event
628
706
  // is good enough, whereas when tapping an input, it must be done before the focus event. 🤷‍♂️
629
- target.style.transform = 'translateY(-2000px)';
707
+ target.style.transform = "translateY(-2000px)";
630
708
  requestAnimationFrame(()=>{
631
- target.style.transform = '';
709
+ target.style.transform = "";
632
710
  // This will have prevented the browser from scrolling the focused element into view,
633
711
  // so we need to do this ourselves in a way that doesn't cause the whole page to scroll.
634
712
  if ($5c2f5cd01815d369$var$visualViewport) {
@@ -639,8 +717,7 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
639
717
  });
640
718
  else // Otherwise, wait for the visual viewport to resize before scrolling so we can
641
719
  // measure the correct position to scroll to.
642
- $5c2f5cd01815d369$var$visualViewport.addEventListener('resize', ()=>$5c2f5cd01815d369$var$scrollIntoView(target)
643
- , {
720
+ $5c2f5cd01815d369$var$visualViewport.addEventListener("resize", ()=>$5c2f5cd01815d369$var$scrollIntoView(target), {
644
721
  once: true
645
722
  });
646
723
  }
@@ -657,19 +734,19 @@ function $5c2f5cd01815d369$var$preventScrollMobileSafari() {
657
734
  // enable us to scroll the window to the top, which is required for the rest of this to work.
658
735
  let scrollX = window.pageXOffset;
659
736
  let scrollY = window.pageYOffset;
660
- let restoreStyles = $6Zb2x$reactariautils.chain($5c2f5cd01815d369$var$setStyle(document.documentElement, 'paddingRight', `${window.innerWidth - document.documentElement.clientWidth}px`), $5c2f5cd01815d369$var$setStyle(document.documentElement, 'overflow', 'hidden'), $5c2f5cd01815d369$var$setStyle(document.body, 'marginTop', `-${scrollY}px`));
737
+ let restoreStyles = (0, $6Zb2x$reactariautils.chain)($5c2f5cd01815d369$var$setStyle(document.documentElement, "paddingRight", `${window.innerWidth - document.documentElement.clientWidth}px`), $5c2f5cd01815d369$var$setStyle(document.documentElement, "overflow", "hidden"), $5c2f5cd01815d369$var$setStyle(document.body, "marginTop", `-${scrollY}px`));
661
738
  // Scroll to the top. The negative margin on the body will make this appear the same.
662
739
  window.scrollTo(0, 0);
663
- let removeEvents = $6Zb2x$reactariautils.chain($5c2f5cd01815d369$var$addEvent(document, 'touchstart', onTouchStart, {
740
+ let removeEvents = (0, $6Zb2x$reactariautils.chain)($5c2f5cd01815d369$var$addEvent(document, "touchstart", onTouchStart, {
664
741
  passive: false,
665
742
  capture: true
666
- }), $5c2f5cd01815d369$var$addEvent(document, 'touchmove', onTouchMove, {
743
+ }), $5c2f5cd01815d369$var$addEvent(document, "touchmove", onTouchMove, {
667
744
  passive: false,
668
745
  capture: true
669
- }), $5c2f5cd01815d369$var$addEvent(document, 'touchend', onTouchEnd, {
746
+ }), $5c2f5cd01815d369$var$addEvent(document, "touchend", onTouchEnd, {
670
747
  passive: false,
671
748
  capture: true
672
- }), $5c2f5cd01815d369$var$addEvent(document, 'focus', onFocus, true), $5c2f5cd01815d369$var$addEvent(window, 'scroll', onWindowScroll));
749
+ }), $5c2f5cd01815d369$var$addEvent(document, "focus", onFocus, true), $5c2f5cd01815d369$var$addEvent(window, "scroll", onWindowScroll));
673
750
  return ()=>{
674
751
  // Restore styles and scroll the page back to where it was.
675
752
  restoreStyles();
@@ -696,7 +773,7 @@ function $5c2f5cd01815d369$var$scrollIntoView(target) {
696
773
  let root = document.scrollingElement || document.documentElement;
697
774
  while(target && target !== root){
698
775
  // Find the parent scrollable element and adjust the scroll position if the target is not already in view.
699
- let scrollable = $6Zb2x$reactariautils.getScrollParent(target);
776
+ let scrollable = (0, $6Zb2x$reactariautils.getScrollParent)(target);
700
777
  if (scrollable !== document.documentElement && scrollable !== document.body && scrollable !== target) {
701
778
  let scrollableTop = scrollable.getBoundingClientRect().top;
702
779
  let targetTop = target.getBoundingClientRect().top;
@@ -710,41 +787,48 @@ function $5c2f5cd01815d369$var$willOpenKeyboard(target) {
710
787
  }
711
788
 
712
789
 
790
+ /*
791
+ * Copyright 2020 Adobe. All rights reserved.
792
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
793
+ * you may not use this file except in compliance with the License. You may obtain a copy
794
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
795
+ *
796
+ * Unless required by applicable law or agreed to in writing, software distributed under
797
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
798
+ * OF ANY KIND, either express or implied. See the License for the specific language
799
+ * governing permissions and limitations under the License.
800
+ */
713
801
 
714
802
 
715
-
716
- const $0775ea8ea6a0565e$var$Context = /*#__PURE__*/ ($parcel$interopDefault($6Zb2x$react)).createContext(null);
803
+ const $0775ea8ea6a0565e$var$Context = /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createContext(null);
717
804
  function $0775ea8ea6a0565e$export$178405afcd8c5eb(props) {
718
805
  let { children: children } = props;
719
- let parent = $6Zb2x$react.useContext($0775ea8ea6a0565e$var$Context);
720
- let [modalCount, setModalCount] = $6Zb2x$react.useState(0);
721
- let context = $6Zb2x$react.useMemo(()=>({
806
+ let parent = (0, $6Zb2x$react.useContext)($0775ea8ea6a0565e$var$Context);
807
+ let [modalCount, setModalCount] = (0, $6Zb2x$react.useState)(0);
808
+ let context = (0, $6Zb2x$react.useMemo)(()=>({
722
809
  parent: parent,
723
810
  modalCount: modalCount,
724
811
  addModal () {
725
- setModalCount((count)=>count + 1
726
- );
812
+ setModalCount((count)=>count + 1);
727
813
  if (parent) parent.addModal();
728
814
  },
729
815
  removeModal () {
730
- setModalCount((count)=>count - 1
731
- );
816
+ setModalCount((count)=>count - 1);
732
817
  if (parent) parent.removeModal();
733
818
  }
734
- })
735
- , [
819
+ }), [
736
820
  parent,
737
821
  modalCount
738
822
  ]);
739
- return(/*#__PURE__*/ ($parcel$interopDefault($6Zb2x$react)).createElement($0775ea8ea6a0565e$var$Context.Provider, {
823
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement($0775ea8ea6a0565e$var$Context.Provider, {
740
824
  value: context
741
- }, children));
825
+ }, children);
742
826
  }
743
827
  function $0775ea8ea6a0565e$export$d9aaed4c3ece1bc0() {
744
- let context = $6Zb2x$react.useContext($0775ea8ea6a0565e$var$Context);
828
+ let context = (0, $6Zb2x$react.useContext)($0775ea8ea6a0565e$var$Context);
745
829
  return {
746
830
  modalProviderProps: {
747
- 'aria-hidden': context && context.modalCount > 0 ? true : null
831
+ "aria-hidden": context && context.modalCount > 0 ? true : null
748
832
  }
749
833
  };
750
834
  }
@@ -752,32 +836,32 @@ function $0775ea8ea6a0565e$export$d9aaed4c3ece1bc0() {
752
836
  * Creates a root node that will be aria-hidden if there are other modals open.
753
837
  */ function $0775ea8ea6a0565e$var$OverlayContainerDOM(props) {
754
838
  let { modalProviderProps: modalProviderProps } = $0775ea8ea6a0565e$export$d9aaed4c3ece1bc0();
755
- return(/*#__PURE__*/ ($parcel$interopDefault($6Zb2x$react)).createElement("div", {
839
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement("div", {
756
840
  "data-overlay-container": true,
757
841
  ...props,
758
842
  ...modalProviderProps
759
- }));
843
+ });
760
844
  }
761
845
  function $0775ea8ea6a0565e$export$bf688221f59024e5(props) {
762
- return(/*#__PURE__*/ ($parcel$interopDefault($6Zb2x$react)).createElement($0775ea8ea6a0565e$export$178405afcd8c5eb, null, /*#__PURE__*/ ($parcel$interopDefault($6Zb2x$react)).createElement($0775ea8ea6a0565e$var$OverlayContainerDOM, props)));
846
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement($0775ea8ea6a0565e$export$178405afcd8c5eb, null, /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement($0775ea8ea6a0565e$var$OverlayContainerDOM, props));
763
847
  }
764
848
  function $0775ea8ea6a0565e$export$b47c3594eab58386(props) {
765
- let isSSR = $6Zb2x$reactariassr.useIsSSR();
849
+ let isSSR = (0, $6Zb2x$reactariassr.useIsSSR)();
766
850
  let { portalContainer: portalContainer = isSSR ? null : document.body , ...rest } = props;
767
- ($parcel$interopDefault($6Zb2x$react)).useEffect(()=>{
768
- if (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.closest('[data-overlay-container]')) throw new Error('An OverlayContainer must not be inside another container. Please change the portalContainer prop.');
851
+ (0, ($parcel$interopDefault($6Zb2x$react))).useEffect(()=>{
852
+ if (portalContainer === null || portalContainer === void 0 ? void 0 : portalContainer.closest("[data-overlay-container]")) throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
769
853
  }, [
770
854
  portalContainer
771
855
  ]);
772
856
  if (!portalContainer) return null;
773
- let contents = /*#__PURE__*/ ($parcel$interopDefault($6Zb2x$react)).createElement($0775ea8ea6a0565e$export$bf688221f59024e5, rest);
774
- return(/*#__PURE__*/ ($parcel$interopDefault($6Zb2x$reactdom)).createPortal(contents, portalContainer));
857
+ let contents = /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement($0775ea8ea6a0565e$export$bf688221f59024e5, rest);
858
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$reactdom))).createPortal(contents, portalContainer);
775
859
  }
776
860
  function $0775ea8ea6a0565e$export$33ffd74ebf07f060(options) {
777
861
  // Add aria-hidden to all parent providers on mount, and restore on unmount.
778
- let context = $6Zb2x$react.useContext($0775ea8ea6a0565e$var$Context);
779
- if (!context) throw new Error('Modal is not contained within a provider');
780
- $6Zb2x$react.useEffect(()=>{
862
+ let context = (0, $6Zb2x$react.useContext)($0775ea8ea6a0565e$var$Context);
863
+ if (!context) throw new Error("Modal is not contained within a provider");
864
+ (0, $6Zb2x$react.useEffect)(()=>{
781
865
  if ((options === null || options === void 0 ? void 0 : options.isDisabled) || !context || !context.parent) return;
782
866
  // The immediate context is from the provider containing this modal, so we only
783
867
  // want to trigger aria-hidden on its parents not on the modal provider itself.
@@ -792,13 +876,23 @@ function $0775ea8ea6a0565e$export$33ffd74ebf07f060(options) {
792
876
  ]);
793
877
  return {
794
878
  modalProps: {
795
- 'data-ismodal': !(options === null || options === void 0 ? void 0 : options.isDisabled)
879
+ "data-ismodal": !(options === null || options === void 0 ? void 0 : options.isDisabled)
796
880
  }
797
881
  };
798
882
  }
799
883
 
800
884
 
801
- var $18d014414048a7ba$exports = {};
885
+ /*
886
+ * Copyright 2020 Adobe. All rights reserved.
887
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
888
+ * you may not use this file except in compliance with the License. You may obtain a copy
889
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
890
+ *
891
+ * Unless required by applicable law or agreed to in writing, software distributed under
892
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
893
+ * OF ANY KIND, either express or implied. See the License for the specific language
894
+ * governing permissions and limitations under the License.
895
+ */ var $18d014414048a7ba$exports = {};
802
896
  var $4393d9b86d3ad278$exports = {};
803
897
  $4393d9b86d3ad278$exports = {
804
898
  "dismiss": `تجاهل`
@@ -1047,16 +1141,16 @@ $18d014414048a7ba$exports = {
1047
1141
 
1048
1142
  function $f69bb3e6457495cc$export$2317d149ed6f78c4(props) {
1049
1143
  let { onDismiss: onDismiss , ...otherProps } = props;
1050
- let stringFormatter = $6Zb2x$reactariai18n.useLocalizedStringFormatter((/*@__PURE__*/$parcel$interopDefault($18d014414048a7ba$exports)));
1051
- let labels = $6Zb2x$reactariautils.useLabels(otherProps, stringFormatter.format('dismiss'));
1144
+ let stringFormatter = (0, $6Zb2x$reactariai18n.useLocalizedStringFormatter)((0, (/*@__PURE__*/$parcel$interopDefault($18d014414048a7ba$exports))));
1145
+ let labels = (0, $6Zb2x$reactariautils.useLabels)(otherProps, stringFormatter.format("dismiss"));
1052
1146
  let onClick = ()=>{
1053
1147
  if (onDismiss) onDismiss();
1054
1148
  };
1055
- return(/*#__PURE__*/ ($parcel$interopDefault($6Zb2x$react)).createElement($6Zb2x$reactariavisuallyhidden.VisuallyHidden, null, /*#__PURE__*/ ($parcel$interopDefault($6Zb2x$react)).createElement("button", {
1149
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement((0, $6Zb2x$reactariavisuallyhidden.VisuallyHidden), null, /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement("button", {
1056
1150
  ...labels,
1057
1151
  tabIndex: -1,
1058
1152
  onClick: onClick
1059
- })));
1153
+ }));
1060
1154
  }
1061
1155
 
1062
1156
 
@@ -1080,48 +1174,46 @@ function $08ef1685902b6011$export$1c3ebcada18427bf(targets, root = document.body
1080
1174
  let walker = document.createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {
1081
1175
  acceptNode (node) {
1082
1176
  // If this node is a live announcer, add it to the set of nodes to keep visible.
1083
- if ((node instanceof HTMLElement || node instanceof SVGElement) && node.dataset.liveAnnouncer === 'true') visibleNodes.add(node);
1177
+ if ((node instanceof HTMLElement || node instanceof SVGElement) && node.dataset.liveAnnouncer === "true") visibleNodes.add(node);
1084
1178
  // Skip this node and its children if it is one of the target nodes, or a live announcer.
1085
1179
  // Also skip children of already hidden nodes, as aria-hidden is recursive. An exception is
1086
1180
  // made for elements with role="row" since VoiceOver on iOS has issues hiding elements with role="row".
1087
1181
  // For that case we want to hide the cells inside as well (https://bugs.webkit.org/show_bug.cgi?id=222623).
1088
- if (visibleNodes.has(node) || hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute('role') !== 'row') return NodeFilter.FILTER_REJECT;
1182
+ if (visibleNodes.has(node) || hiddenNodes.has(node.parentElement) && node.parentElement.getAttribute("role") !== "row") return NodeFilter.FILTER_REJECT;
1089
1183
  // Skip this node but continue to children if one of the targets is inside the node.
1090
- if (targets.some((target)=>node.contains(target)
1091
- )) return NodeFilter.FILTER_SKIP;
1184
+ if (targets.some((target)=>node.contains(target))) return NodeFilter.FILTER_SKIP;
1092
1185
  return NodeFilter.FILTER_ACCEPT;
1093
1186
  }
1094
1187
  });
1095
1188
  let hide = (node)=>{
1096
- var ref;
1097
- let refCount = (ref = $08ef1685902b6011$var$refCountMap.get(node)) !== null && ref !== void 0 ? ref : 0;
1189
+ var _refCountMap_get;
1190
+ let refCount = (_refCountMap_get = $08ef1685902b6011$var$refCountMap.get(node)) !== null && _refCountMap_get !== void 0 ? _refCountMap_get : 0;
1098
1191
  // If already aria-hidden, and the ref count is zero, then this element
1099
1192
  // was already hidden and there's nothing for us to do.
1100
- if (node.getAttribute('aria-hidden') === 'true' && refCount === 0) return;
1101
- if (refCount === 0) node.setAttribute('aria-hidden', 'true');
1193
+ if (node.getAttribute("aria-hidden") === "true" && refCount === 0) return;
1194
+ if (refCount === 0) node.setAttribute("aria-hidden", "true");
1102
1195
  hiddenNodes.add(node);
1103
1196
  $08ef1685902b6011$var$refCountMap.set(node, refCount + 1);
1104
1197
  };
1105
1198
  // If there is already a MutationObserver listening from a previous call,
1106
1199
  // disconnect it so the new on takes over.
1107
1200
  if ($08ef1685902b6011$var$observerStack.length) $08ef1685902b6011$var$observerStack[$08ef1685902b6011$var$observerStack.length - 1].disconnect();
1108
- let node1 = walker.nextNode();
1109
- while(node1 != null){
1110
- hide(node1);
1111
- node1 = walker.nextNode();
1201
+ let node = walker.nextNode();
1202
+ while(node != null){
1203
+ hide(node);
1204
+ node = walker.nextNode();
1112
1205
  }
1113
1206
  let observer = new MutationObserver((changes)=>{
1114
1207
  for (let change of changes){
1115
- if (change.type !== 'childList' || change.addedNodes.length === 0) continue;
1208
+ if (change.type !== "childList" || change.addedNodes.length === 0) continue;
1116
1209
  // If the parent element of the added nodes is not within one of the targets,
1117
1210
  // and not already inside a hidden node, hide all of the new children.
1118
1211
  if (![
1119
1212
  ...visibleNodes,
1120
1213
  ...hiddenNodes
1121
- ].some((node)=>node.contains(change.target)
1122
- )) for (let node2 of change.addedNodes){
1123
- if ((node2 instanceof HTMLElement || node2 instanceof SVGElement) && node2.dataset.liveAnnouncer === 'true') visibleNodes.add(node2);
1124
- else if (node2 instanceof Element) hide(node2);
1214
+ ].some((node)=>node.contains(change.target))) for (let node of change.addedNodes){
1215
+ if ((node instanceof HTMLElement || node instanceof SVGElement) && node.dataset.liveAnnouncer === "true") visibleNodes.add(node);
1216
+ else if (node instanceof Element) hide(node);
1125
1217
  }
1126
1218
  }
1127
1219
  });
@@ -1146,7 +1238,7 @@ function $08ef1685902b6011$export$1c3ebcada18427bf(targets, root = document.body
1146
1238
  for (let node of hiddenNodes){
1147
1239
  let count = $08ef1685902b6011$var$refCountMap.get(node);
1148
1240
  if (count === 1) {
1149
- node.removeAttribute('aria-hidden');
1241
+ node.removeAttribute("aria-hidden");
1150
1242
  $08ef1685902b6011$var$refCountMap.delete(node);
1151
1243
  } else $08ef1685902b6011$var$refCountMap.set(node, count - 1);
1152
1244
  }
@@ -1159,7 +1251,17 @@ function $08ef1685902b6011$export$1c3ebcada18427bf(targets, root = document.body
1159
1251
  }
1160
1252
 
1161
1253
 
1162
-
1254
+ /*
1255
+ * Copyright 2022 Adobe. All rights reserved.
1256
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1257
+ * you may not use this file except in compliance with the License. You may obtain a copy
1258
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1259
+ *
1260
+ * Unless required by applicable law or agreed to in writing, software distributed under
1261
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1262
+ * OF ANY KIND, either express or implied. See the License for the specific language
1263
+ * governing permissions and limitations under the License.
1264
+ */
1163
1265
 
1164
1266
 
1165
1267
 
@@ -1167,14 +1269,14 @@ function $08ef1685902b6011$export$1c3ebcada18427bf(targets, root = document.body
1167
1269
 
1168
1270
  function $6c2dfcdee3e15e20$export$542a6fd13ac93354(props, state) {
1169
1271
  let { triggerRef: triggerRef , popoverRef: popoverRef , isNonModal: isNonModal , isKeyboardDismissDisabled: isKeyboardDismissDisabled , ...otherProps } = props;
1170
- let { overlayProps: overlayProps , underlayProps: underlayProps } = $82711f9cb668ecdb$export$ea8f71083e90600f({
1272
+ let { overlayProps: overlayProps , underlayProps: underlayProps } = (0, $82711f9cb668ecdb$export$ea8f71083e90600f)({
1171
1273
  isOpen: state.isOpen,
1172
1274
  onClose: state.close,
1173
1275
  shouldCloseOnBlur: true,
1174
1276
  isDismissable: !isNonModal,
1175
1277
  isKeyboardDismissDisabled: isKeyboardDismissDisabled
1176
1278
  }, popoverRef);
1177
- let { overlayProps: positionProps , arrowProps: arrowProps , placement: placement } = $cd94b4896dd97759$export$d39e1813b3bdd0e1({
1279
+ let { overlayProps: positionProps , arrowProps: arrowProps , placement: placement } = (0, $cd94b4896dd97759$export$d39e1813b3bdd0e1)({
1178
1280
  ...otherProps,
1179
1281
  targetRef: triggerRef,
1180
1282
  overlayRef: popoverRef,
@@ -1184,18 +1286,18 @@ function $6c2dfcdee3e15e20$export$542a6fd13ac93354(props, state) {
1184
1286
  // Delay preventing scroll until popover is positioned to avoid extra scroll padding.
1185
1287
  // This requires a layout effect so that positioning has been committed to the DOM
1186
1288
  // by the time usePreventScroll measures the element.
1187
- let [isPositioned, setPositioned] = $6Zb2x$react.useState(false);
1188
- $6Zb2x$reactariautils.useLayoutEffect(()=>{
1289
+ let [isPositioned, setPositioned] = (0, $6Zb2x$react.useState)(false);
1290
+ (0, $6Zb2x$reactariautils.useLayoutEffect)(()=>{
1189
1291
  if (!isNonModal && placement) setPositioned(true);
1190
1292
  }, [
1191
1293
  isNonModal,
1192
1294
  placement
1193
1295
  ]);
1194
- $5c2f5cd01815d369$export$ee0f7cc6afcd1c18({
1296
+ (0, $5c2f5cd01815d369$export$ee0f7cc6afcd1c18)({
1195
1297
  isDisabled: isNonModal || !isPositioned
1196
1298
  });
1197
- $6Zb2x$reactariautils.useLayoutEffect(()=>{
1198
- if (state.isOpen && !isNonModal && popoverRef.current) return $08ef1685902b6011$export$1c3ebcada18427bf([
1299
+ (0, $6Zb2x$reactariautils.useLayoutEffect)(()=>{
1300
+ if (state.isOpen && !isNonModal && popoverRef.current) return (0, $08ef1685902b6011$export$1c3ebcada18427bf)([
1199
1301
  popoverRef.current
1200
1302
  ]);
1201
1303
  }, [
@@ -1204,7 +1306,7 @@ function $6c2dfcdee3e15e20$export$542a6fd13ac93354(props, state) {
1204
1306
  popoverRef
1205
1307
  ]);
1206
1308
  return {
1207
- popoverProps: $6Zb2x$reactariautils.mergeProps(overlayProps, positionProps),
1309
+ popoverProps: (0, $6Zb2x$reactariautils.mergeProps)(overlayProps, positionProps),
1208
1310
  arrowProps: arrowProps,
1209
1311
  underlayProps: underlayProps,
1210
1312
  placement: placement
@@ -1212,41 +1314,60 @@ function $6c2dfcdee3e15e20$export$542a6fd13ac93354(props, state) {
1212
1314
  }
1213
1315
 
1214
1316
 
1317
+ /*
1318
+ * Copyright 2022 Adobe. All rights reserved.
1319
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1320
+ * you may not use this file except in compliance with the License. You may obtain a copy
1321
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1322
+ *
1323
+ * Unless required by applicable law or agreed to in writing, software distributed under
1324
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1325
+ * OF ANY KIND, either express or implied. See the License for the specific language
1326
+ * governing permissions and limitations under the License.
1327
+ */
1215
1328
 
1216
1329
 
1217
1330
 
1331
+ /*
1332
+ * Copyright 2022 Adobe. All rights reserved.
1333
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
1334
+ * you may not use this file except in compliance with the License. You may obtain a copy
1335
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
1336
+ *
1337
+ * Unless required by applicable law or agreed to in writing, software distributed under
1338
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
1339
+ * OF ANY KIND, either express or implied. See the License for the specific language
1340
+ * governing permissions and limitations under the License.
1341
+ */
1218
1342
 
1219
1343
 
1220
1344
 
1221
1345
 
1222
-
1223
-
1224
- const $745edbb83ab4296f$export$a2200b96afd16271 = /*#__PURE__*/ ($parcel$interopDefault($6Zb2x$react)).createContext(null);
1346
+ const $745edbb83ab4296f$export$a2200b96afd16271 = /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createContext(null);
1225
1347
  function $745edbb83ab4296f$export$c6fdb837b070b4ff(props) {
1226
- let isSSR = $6Zb2x$reactariassr.useIsSSR();
1348
+ let isSSR = (0, $6Zb2x$reactariassr.useIsSSR)();
1227
1349
  let { portalContainer: portalContainer = isSSR ? null : document.body } = props;
1228
- let [contain, setContain] = $6Zb2x$react.useState(false);
1229
- let contextValue = $6Zb2x$react.useMemo(()=>({
1350
+ let [contain, setContain] = (0, $6Zb2x$react.useState)(false);
1351
+ let contextValue = (0, $6Zb2x$react.useMemo)(()=>({
1230
1352
  contain: contain,
1231
1353
  setContain: setContain
1232
- })
1233
- , [
1354
+ }), [
1234
1355
  contain,
1235
1356
  setContain
1236
1357
  ]);
1237
1358
  if (!portalContainer) return null;
1238
- let contents = /*#__PURE__*/ ($parcel$interopDefault($6Zb2x$react)).createElement($745edbb83ab4296f$export$a2200b96afd16271.Provider, {
1359
+ let contents = /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement($745edbb83ab4296f$export$a2200b96afd16271.Provider, {
1239
1360
  value: contextValue
1240
- }, /*#__PURE__*/ ($parcel$interopDefault($6Zb2x$react)).createElement($6Zb2x$reactariafocus.FocusScope, {
1361
+ }, /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$react))).createElement((0, $6Zb2x$reactariafocus.FocusScope), {
1241
1362
  restoreFocus: true,
1242
1363
  contain: contain
1243
1364
  }, props.children));
1244
- return(/*#__PURE__*/ ($parcel$interopDefault($6Zb2x$reactdom)).createPortal(contents, portalContainer));
1365
+ return /*#__PURE__*/ (0, ($parcel$interopDefault($6Zb2x$reactdom))).createPortal(contents, portalContainer);
1245
1366
  }
1246
1367
  function $745edbb83ab4296f$export$14c98a7594375490() {
1247
- let ctx = $6Zb2x$react.useContext($745edbb83ab4296f$export$a2200b96afd16271);
1368
+ let ctx = (0, $6Zb2x$react.useContext)($745edbb83ab4296f$export$a2200b96afd16271);
1248
1369
  let setContain = ctx === null || ctx === void 0 ? void 0 : ctx.setContain;
1249
- $6Zb2x$reactariautils.useLayoutEffect(()=>{
1370
+ (0, $6Zb2x$reactariautils.useLayoutEffect)(()=>{
1250
1371
  setContain === null || setContain === void 0 ? void 0 : setContain(true);
1251
1372
  }, [
1252
1373
  setContain
@@ -1256,17 +1377,17 @@ function $745edbb83ab4296f$export$14c98a7594375490() {
1256
1377
 
1257
1378
 
1258
1379
  function $11b7e0b04b421e95$export$dbc0f175b25fb0fb(props, state, ref) {
1259
- let { overlayProps: overlayProps , underlayProps: underlayProps } = $82711f9cb668ecdb$export$ea8f71083e90600f({
1380
+ let { overlayProps: overlayProps , underlayProps: underlayProps } = (0, $82711f9cb668ecdb$export$ea8f71083e90600f)({
1260
1381
  ...props,
1261
1382
  isOpen: state.isOpen,
1262
1383
  onClose: state.close
1263
1384
  }, ref);
1264
- $5c2f5cd01815d369$export$ee0f7cc6afcd1c18({
1385
+ (0, $5c2f5cd01815d369$export$ee0f7cc6afcd1c18)({
1265
1386
  isDisabled: !state.isOpen
1266
1387
  });
1267
- $745edbb83ab4296f$export$14c98a7594375490();
1268
- $6Zb2x$react.useEffect(()=>{
1269
- if (state.isOpen) return $08ef1685902b6011$export$1c3ebcada18427bf([
1388
+ (0, $745edbb83ab4296f$export$14c98a7594375490)();
1389
+ (0, $6Zb2x$react.useEffect)(()=>{
1390
+ if (state.isOpen) return (0, $08ef1685902b6011$export$1c3ebcada18427bf)([
1270
1391
  ref.current
1271
1392
  ]);
1272
1393
  }, [
@@ -1274,7 +1395,7 @@ function $11b7e0b04b421e95$export$dbc0f175b25fb0fb(props, state, ref) {
1274
1395
  ref
1275
1396
  ]);
1276
1397
  return {
1277
- modalProps: $6Zb2x$reactariautils.mergeProps(overlayProps),
1398
+ modalProps: (0, $6Zb2x$reactariautils.mergeProps)(overlayProps),
1278
1399
  underlayProps: underlayProps
1279
1400
  };
1280
1401
  }