@ionic/core 8.5.9-nightly.20250603 → 8.5.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.
- package/components/modal.js +101 -161
- package/css/core.css +1 -1
- package/css/core.css.map +1 -1
- package/css/ionic.bundle.css +1 -1
- package/css/ionic.bundle.css.map +1 -1
- package/dist/cjs/ion-modal.cjs.entry.js +101 -161
- package/dist/collection/components/modal/animations/ios.enter.js +1 -41
- package/dist/collection/components/modal/animations/ios.leave.js +2 -24
- package/dist/collection/components/modal/animations/md.enter.js +2 -42
- package/dist/collection/components/modal/animations/md.leave.js +2 -24
- package/dist/collection/components/modal/gestures/sheet.js +93 -29
- package/dist/collection/components/modal/modal.ios.css +0 -10
- package/dist/docs.json +1 -1
- package/dist/esm/ion-modal.entry.js +101 -161
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-4393fc08.entry.js +4 -0
- package/dist/ionic/p-44548aa3.system.entry.js +4 -0
- package/dist/ionic/p-f725bf9e.system.js +1 -1
- package/hydrate/index.js +101 -161
- package/hydrate/index.mjs +101 -161
- package/package.json +1 -1
- package/dist/ionic/p-12914457.entry.js +0 -4
- package/dist/ionic/p-cec902a0.system.entry.js +0 -4
package/hydrate/index.mjs
CHANGED
|
@@ -19201,47 +19201,7 @@ const iosEnterAnimation$3 = (baseEl, opts) => {
|
|
|
19201
19201
|
.addElement(baseEl)
|
|
19202
19202
|
.easing('cubic-bezier(0.32,0.72,0,1)')
|
|
19203
19203
|
.duration(500)
|
|
19204
|
-
.addAnimation([wrapperAnimation])
|
|
19205
|
-
.beforeAddWrite(() => {
|
|
19206
|
-
if (expandToScroll) {
|
|
19207
|
-
// Scroll can only be done when the modal is fully expanded.
|
|
19208
|
-
return;
|
|
19209
|
-
}
|
|
19210
|
-
/**
|
|
19211
|
-
* There are some browsers that causes flickering when
|
|
19212
|
-
* dragging the content when scroll is enabled at every
|
|
19213
|
-
* breakpoint. This is due to the wrapper element being
|
|
19214
|
-
* transformed off the screen and having a snap animation.
|
|
19215
|
-
*
|
|
19216
|
-
* A workaround is to clone the footer element and append
|
|
19217
|
-
* it outside of the wrapper element. This way, the footer
|
|
19218
|
-
* is still visible and the drag can be done without
|
|
19219
|
-
* flickering. The original footer is hidden until the modal
|
|
19220
|
-
* is dismissed. This maintains the animation of the footer
|
|
19221
|
-
* when the modal is dismissed.
|
|
19222
|
-
*
|
|
19223
|
-
* The workaround needs to be done before the animation starts
|
|
19224
|
-
* so there are no flickering issues.
|
|
19225
|
-
*/
|
|
19226
|
-
const ionFooter = baseEl.querySelector('ion-footer');
|
|
19227
|
-
/**
|
|
19228
|
-
* This check is needed to prevent more than one footer
|
|
19229
|
-
* from being appended to the shadow root.
|
|
19230
|
-
* Otherwise, iOS and MD enter animations would append
|
|
19231
|
-
* the footer twice.
|
|
19232
|
-
*/
|
|
19233
|
-
const ionFooterAlreadyAppended = baseEl.shadowRoot.querySelector('ion-footer');
|
|
19234
|
-
if (ionFooter && !ionFooterAlreadyAppended) {
|
|
19235
|
-
const footerHeight = ionFooter.clientHeight;
|
|
19236
|
-
const clonedFooter = ionFooter.cloneNode(true);
|
|
19237
|
-
baseEl.shadowRoot.appendChild(clonedFooter);
|
|
19238
|
-
ionFooter.style.setProperty('display', 'none');
|
|
19239
|
-
ionFooter.setAttribute('aria-hidden', 'true');
|
|
19240
|
-
// Padding is added to prevent some content from being hidden.
|
|
19241
|
-
const page = baseEl.querySelector('.ion-page');
|
|
19242
|
-
page.style.setProperty('padding-bottom', `${footerHeight}px`);
|
|
19243
|
-
}
|
|
19244
|
-
});
|
|
19204
|
+
.addAnimation([wrapperAnimation]);
|
|
19245
19205
|
if (contentAnimation) {
|
|
19246
19206
|
baseAnimation.addAnimation(contentAnimation);
|
|
19247
19207
|
}
|
|
@@ -19322,7 +19282,7 @@ const createLeaveAnimation$1 = () => {
|
|
|
19322
19282
|
* iOS Modal Leave Animation
|
|
19323
19283
|
*/
|
|
19324
19284
|
const iosLeaveAnimation$3 = (baseEl, opts, duration = 500) => {
|
|
19325
|
-
const { presentingEl, currentBreakpoint
|
|
19285
|
+
const { presentingEl, currentBreakpoint } = opts;
|
|
19326
19286
|
const root = getElementRoot(baseEl);
|
|
19327
19287
|
const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetLeaveAnimation(opts) : createLeaveAnimation$1();
|
|
19328
19288
|
backdropAnimation.addElement(root.querySelector('ion-backdrop'));
|
|
@@ -19331,29 +19291,7 @@ const iosLeaveAnimation$3 = (baseEl, opts, duration = 500) => {
|
|
|
19331
19291
|
.addElement(baseEl)
|
|
19332
19292
|
.easing('cubic-bezier(0.32,0.72,0,1)')
|
|
19333
19293
|
.duration(duration)
|
|
19334
|
-
.addAnimation(wrapperAnimation)
|
|
19335
|
-
.beforeAddWrite(() => {
|
|
19336
|
-
if (expandToScroll) {
|
|
19337
|
-
// Scroll can only be done when the modal is fully expanded.
|
|
19338
|
-
return;
|
|
19339
|
-
}
|
|
19340
|
-
/**
|
|
19341
|
-
* If expandToScroll is disabled, we need to swap
|
|
19342
|
-
* the visibility to the original, so the footer
|
|
19343
|
-
* dismisses with the modal and doesn't stay
|
|
19344
|
-
* until the modal is removed from the DOM.
|
|
19345
|
-
*/
|
|
19346
|
-
const ionFooter = baseEl.querySelector('ion-footer');
|
|
19347
|
-
if (ionFooter) {
|
|
19348
|
-
const clonedFooter = baseEl.shadowRoot.querySelector('ion-footer');
|
|
19349
|
-
ionFooter.style.removeProperty('display');
|
|
19350
|
-
ionFooter.removeAttribute('aria-hidden');
|
|
19351
|
-
clonedFooter.style.setProperty('display', 'none');
|
|
19352
|
-
clonedFooter.setAttribute('aria-hidden', 'true');
|
|
19353
|
-
const page = baseEl.querySelector('.ion-page');
|
|
19354
|
-
page.style.removeProperty('padding-bottom');
|
|
19355
|
-
}
|
|
19356
|
-
});
|
|
19294
|
+
.addAnimation(wrapperAnimation);
|
|
19357
19295
|
if (presentingEl) {
|
|
19358
19296
|
const isMobile = window.innerWidth < 768;
|
|
19359
19297
|
const hasCardModal = presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined;
|
|
@@ -19444,52 +19382,12 @@ const mdEnterAnimation$2 = (baseEl, opts) => {
|
|
|
19444
19382
|
wrapperAnimation.addElement(root.querySelector('.modal-wrapper'));
|
|
19445
19383
|
// The content animation is only added if scrolling is enabled for
|
|
19446
19384
|
// all the breakpoints.
|
|
19447
|
-
expandToScroll && (contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.addElement(baseEl.querySelector('.ion-page')));
|
|
19385
|
+
!expandToScroll && (contentAnimation === null || contentAnimation === void 0 ? void 0 : contentAnimation.addElement(baseEl.querySelector('.ion-page')));
|
|
19448
19386
|
const baseAnimation = createAnimation()
|
|
19449
19387
|
.addElement(baseEl)
|
|
19450
19388
|
.easing('cubic-bezier(0.36,0.66,0.04,1)')
|
|
19451
19389
|
.duration(280)
|
|
19452
|
-
.addAnimation([backdropAnimation, wrapperAnimation])
|
|
19453
|
-
.beforeAddWrite(() => {
|
|
19454
|
-
if (expandToScroll) {
|
|
19455
|
-
// Scroll can only be done when the modal is fully expanded.
|
|
19456
|
-
return;
|
|
19457
|
-
}
|
|
19458
|
-
/**
|
|
19459
|
-
* There are some browsers that causes flickering when
|
|
19460
|
-
* dragging the content when scroll is enabled at every
|
|
19461
|
-
* breakpoint. This is due to the wrapper element being
|
|
19462
|
-
* transformed off the screen and having a snap animation.
|
|
19463
|
-
*
|
|
19464
|
-
* A workaround is to clone the footer element and append
|
|
19465
|
-
* it outside of the wrapper element. This way, the footer
|
|
19466
|
-
* is still visible and the drag can be done without
|
|
19467
|
-
* flickering. The original footer is hidden until the modal
|
|
19468
|
-
* is dismissed. This maintains the animation of the footer
|
|
19469
|
-
* when the modal is dismissed.
|
|
19470
|
-
*
|
|
19471
|
-
* The workaround needs to be done before the animation starts
|
|
19472
|
-
* so there are no flickering issues.
|
|
19473
|
-
*/
|
|
19474
|
-
const ionFooter = baseEl.querySelector('ion-footer');
|
|
19475
|
-
/**
|
|
19476
|
-
* This check is needed to prevent more than one footer
|
|
19477
|
-
* from being appended to the shadow root.
|
|
19478
|
-
* Otherwise, iOS and MD enter animations would append
|
|
19479
|
-
* the footer twice.
|
|
19480
|
-
*/
|
|
19481
|
-
const ionFooterAlreadyAppended = baseEl.shadowRoot.querySelector('ion-footer');
|
|
19482
|
-
if (ionFooter && !ionFooterAlreadyAppended) {
|
|
19483
|
-
const footerHeight = ionFooter.clientHeight;
|
|
19484
|
-
const clonedFooter = ionFooter.cloneNode(true);
|
|
19485
|
-
baseEl.shadowRoot.appendChild(clonedFooter);
|
|
19486
|
-
ionFooter.style.setProperty('display', 'none');
|
|
19487
|
-
ionFooter.setAttribute('aria-hidden', 'true');
|
|
19488
|
-
// Padding is added to prevent some content from being hidden.
|
|
19489
|
-
const page = baseEl.querySelector('.ion-page');
|
|
19490
|
-
page.style.setProperty('padding-bottom', `${footerHeight}px`);
|
|
19491
|
-
}
|
|
19492
|
-
});
|
|
19390
|
+
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
19493
19391
|
if (contentAnimation) {
|
|
19494
19392
|
baseAnimation.addAnimation(contentAnimation);
|
|
19495
19393
|
}
|
|
@@ -19508,7 +19406,7 @@ const createLeaveAnimation = () => {
|
|
|
19508
19406
|
* Md Modal Leave Animation
|
|
19509
19407
|
*/
|
|
19510
19408
|
const mdLeaveAnimation$2 = (baseEl, opts) => {
|
|
19511
|
-
const { currentBreakpoint
|
|
19409
|
+
const { currentBreakpoint } = opts;
|
|
19512
19410
|
const root = getElementRoot(baseEl);
|
|
19513
19411
|
const { wrapperAnimation, backdropAnimation } = currentBreakpoint !== undefined ? createSheetLeaveAnimation(opts) : createLeaveAnimation();
|
|
19514
19412
|
backdropAnimation.addElement(root.querySelector('ion-backdrop'));
|
|
@@ -19516,29 +19414,7 @@ const mdLeaveAnimation$2 = (baseEl, opts) => {
|
|
|
19516
19414
|
const baseAnimation = createAnimation()
|
|
19517
19415
|
.easing('cubic-bezier(0.47,0,0.745,0.715)')
|
|
19518
19416
|
.duration(200)
|
|
19519
|
-
.addAnimation([backdropAnimation, wrapperAnimation])
|
|
19520
|
-
.beforeAddWrite(() => {
|
|
19521
|
-
if (expandToScroll) {
|
|
19522
|
-
// Scroll can only be done when the modal is fully expanded.
|
|
19523
|
-
return;
|
|
19524
|
-
}
|
|
19525
|
-
/**
|
|
19526
|
-
* If expandToScroll is disabled, we need to swap
|
|
19527
|
-
* the visibility to the original, so the footer
|
|
19528
|
-
* dismisses with the modal and doesn't stay
|
|
19529
|
-
* until the modal is removed from the DOM.
|
|
19530
|
-
*/
|
|
19531
|
-
const ionFooter = baseEl.querySelector('ion-footer');
|
|
19532
|
-
if (ionFooter) {
|
|
19533
|
-
const clonedFooter = baseEl.shadowRoot.querySelector('ion-footer');
|
|
19534
|
-
ionFooter.style.removeProperty('display');
|
|
19535
|
-
ionFooter.removeAttribute('aria-hidden');
|
|
19536
|
-
clonedFooter.style.setProperty('display', 'none');
|
|
19537
|
-
clonedFooter.setAttribute('aria-hidden', 'true');
|
|
19538
|
-
const page = baseEl.querySelector('.ion-page');
|
|
19539
|
-
page.style.removeProperty('padding-bottom');
|
|
19540
|
-
}
|
|
19541
|
-
});
|
|
19417
|
+
.addAnimation([backdropAnimation, wrapperAnimation]);
|
|
19542
19418
|
return baseAnimation;
|
|
19543
19419
|
};
|
|
19544
19420
|
|
|
@@ -19570,6 +19446,9 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19570
19446
|
let offset = 0;
|
|
19571
19447
|
let canDismissBlocksGesture = false;
|
|
19572
19448
|
let cachedScrollEl = null;
|
|
19449
|
+
let cachedFooterEl = null;
|
|
19450
|
+
let cachedFooterYPosition = null;
|
|
19451
|
+
let currentFooterState = null;
|
|
19573
19452
|
const canDismissMaxStep = 0.95;
|
|
19574
19453
|
const maxBreakpoint = breakpoints[breakpoints.length - 1];
|
|
19575
19454
|
const minBreakpoint = breakpoints[0];
|
|
@@ -19599,29 +19478,66 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19599
19478
|
baseEl.classList.add(FOCUS_TRAP_DISABLE_CLASS);
|
|
19600
19479
|
};
|
|
19601
19480
|
/**
|
|
19602
|
-
* Toggles the
|
|
19603
|
-
*
|
|
19481
|
+
* Toggles the footer to an absolute position while moving to prevent
|
|
19482
|
+
* it from shaking while the sheet is being dragged.
|
|
19483
|
+
* @param newPosition Whether the footer is in a moving or stationary position.
|
|
19604
19484
|
*/
|
|
19605
|
-
const
|
|
19606
|
-
|
|
19607
|
-
|
|
19608
|
-
|
|
19485
|
+
const swapFooterPosition = (newPosition) => {
|
|
19486
|
+
if (!cachedFooterEl) {
|
|
19487
|
+
cachedFooterEl = baseEl.querySelector('ion-footer');
|
|
19488
|
+
if (!cachedFooterEl) {
|
|
19489
|
+
return;
|
|
19490
|
+
}
|
|
19609
19491
|
}
|
|
19610
|
-
const clonedFooter = wrapperEl.nextElementSibling;
|
|
19611
|
-
const footerToHide = footer === 'original' ? clonedFooter : originalFooter;
|
|
19612
|
-
const footerToShow = footer === 'original' ? originalFooter : clonedFooter;
|
|
19613
|
-
footerToShow.style.removeProperty('display');
|
|
19614
|
-
footerToShow.removeAttribute('aria-hidden');
|
|
19615
19492
|
const page = baseEl.querySelector('.ion-page');
|
|
19616
|
-
|
|
19617
|
-
|
|
19493
|
+
currentFooterState = newPosition;
|
|
19494
|
+
if (newPosition === 'stationary') {
|
|
19495
|
+
// Reset positioning styles to allow normal document flow
|
|
19496
|
+
cachedFooterEl.classList.remove('modal-footer-moving');
|
|
19497
|
+
cachedFooterEl.style.removeProperty('position');
|
|
19498
|
+
cachedFooterEl.style.removeProperty('width');
|
|
19499
|
+
cachedFooterEl.style.removeProperty('height');
|
|
19500
|
+
cachedFooterEl.style.removeProperty('top');
|
|
19501
|
+
cachedFooterEl.style.removeProperty('left');
|
|
19502
|
+
page === null || page === void 0 ? void 0 : page.style.removeProperty('padding-bottom');
|
|
19503
|
+
// Move to page
|
|
19504
|
+
page === null || page === void 0 ? void 0 : page.appendChild(cachedFooterEl);
|
|
19618
19505
|
}
|
|
19619
19506
|
else {
|
|
19620
|
-
|
|
19621
|
-
|
|
19507
|
+
// Get both the footer and document body positions
|
|
19508
|
+
const cachedFooterElRect = cachedFooterEl.getBoundingClientRect();
|
|
19509
|
+
const bodyRect = document.body.getBoundingClientRect();
|
|
19510
|
+
// Add padding to the parent element to prevent content from being hidden
|
|
19511
|
+
// when the footer is positioned absolutely. This has to be done before we
|
|
19512
|
+
// make the footer absolutely positioned or we may accidentally cause the
|
|
19513
|
+
// sheet to scroll.
|
|
19514
|
+
const footerHeight = cachedFooterEl.clientHeight;
|
|
19515
|
+
page === null || page === void 0 ? void 0 : page.style.setProperty('padding-bottom', `${footerHeight}px`);
|
|
19516
|
+
// Apply positioning styles to keep footer at bottom
|
|
19517
|
+
cachedFooterEl.classList.add('modal-footer-moving');
|
|
19518
|
+
// Calculate absolute position relative to body
|
|
19519
|
+
// We need to subtract the body's offsetTop to get true position within document.body
|
|
19520
|
+
const absoluteTop = cachedFooterElRect.top - bodyRect.top;
|
|
19521
|
+
const absoluteLeft = cachedFooterElRect.left - bodyRect.left;
|
|
19522
|
+
// Capture the footer's current dimensions and hard code them during the drag
|
|
19523
|
+
cachedFooterEl.style.setProperty('position', 'absolute');
|
|
19524
|
+
cachedFooterEl.style.setProperty('width', `${cachedFooterEl.clientWidth}px`);
|
|
19525
|
+
cachedFooterEl.style.setProperty('height', `${cachedFooterEl.clientHeight}px`);
|
|
19526
|
+
cachedFooterEl.style.setProperty('top', `${absoluteTop}px`);
|
|
19527
|
+
cachedFooterEl.style.setProperty('left', `${absoluteLeft}px`);
|
|
19528
|
+
// Also cache the footer Y position, which we use to determine if the
|
|
19529
|
+
// sheet has been moved below the footer. When that happens, we need to swap
|
|
19530
|
+
// the position back so it will collapse correctly.
|
|
19531
|
+
cachedFooterYPosition = absoluteTop;
|
|
19532
|
+
// If there's a toolbar, we need to combine the toolbar height with the footer position
|
|
19533
|
+
// because the toolbar moves with the drag handle, so when it starts overlapping the footer,
|
|
19534
|
+
// we need to account for that.
|
|
19535
|
+
const toolbar = baseEl.querySelector('ion-toolbar');
|
|
19536
|
+
if (toolbar) {
|
|
19537
|
+
cachedFooterYPosition -= toolbar.clientHeight;
|
|
19538
|
+
}
|
|
19539
|
+
document.body.appendChild(cachedFooterEl);
|
|
19622
19540
|
}
|
|
19623
|
-
footerToHide.style.setProperty('display', 'none');
|
|
19624
|
-
footerToHide.setAttribute('aria-hidden', 'true');
|
|
19625
19541
|
};
|
|
19626
19542
|
/**
|
|
19627
19543
|
* After the entering animation completes,
|
|
@@ -19715,12 +19631,11 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19715
19631
|
}
|
|
19716
19632
|
/**
|
|
19717
19633
|
* If expandToScroll is disabled, we need to swap
|
|
19718
|
-
* the footer
|
|
19719
|
-
*
|
|
19720
|
-
* and doesn't stay on the screen after the modal is gone.
|
|
19634
|
+
* the footer position to moving so that it doesn't shake
|
|
19635
|
+
* while the sheet is being dragged.
|
|
19721
19636
|
*/
|
|
19722
19637
|
if (!expandToScroll) {
|
|
19723
|
-
|
|
19638
|
+
swapFooterPosition('moving');
|
|
19724
19639
|
}
|
|
19725
19640
|
/**
|
|
19726
19641
|
* If we are pulling down, then it is possible we are pulling on the content.
|
|
@@ -19739,6 +19654,21 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19739
19654
|
animation.progressStart(true, 1 - currentBreakpoint);
|
|
19740
19655
|
};
|
|
19741
19656
|
const onMove = (detail) => {
|
|
19657
|
+
/**
|
|
19658
|
+
* If `expandToScroll` is disabled, we need to see if we're currently below
|
|
19659
|
+
* the footer element and the footer is in a stationary position. If so,
|
|
19660
|
+
* we need to make the stationary the original position so that the footer
|
|
19661
|
+
* collapses with the sheet.
|
|
19662
|
+
*/
|
|
19663
|
+
if (!expandToScroll && cachedFooterYPosition !== null && currentFooterState !== null) {
|
|
19664
|
+
// Check if we need to swap the footer position
|
|
19665
|
+
if (detail.currentY >= cachedFooterYPosition && currentFooterState === 'moving') {
|
|
19666
|
+
swapFooterPosition('stationary');
|
|
19667
|
+
}
|
|
19668
|
+
else if (detail.currentY < cachedFooterYPosition && currentFooterState === 'stationary') {
|
|
19669
|
+
swapFooterPosition('moving');
|
|
19670
|
+
}
|
|
19671
|
+
}
|
|
19742
19672
|
/**
|
|
19743
19673
|
* If `expandToScroll` is disabled, and an upwards swipe gesture is done within
|
|
19744
19674
|
* the scrollable content, we should not allow the swipe gesture to continue.
|
|
@@ -19872,14 +19802,6 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19872
19802
|
* snapping animation completes.
|
|
19873
19803
|
*/
|
|
19874
19804
|
gesture.enable(false);
|
|
19875
|
-
/**
|
|
19876
|
-
* If expandToScroll is disabled, we need to swap
|
|
19877
|
-
* the footer visibility to the cloned one so the footer
|
|
19878
|
-
* doesn't flicker when the sheet's height is animated.
|
|
19879
|
-
*/
|
|
19880
|
-
if (!expandToScroll && shouldRemainOpen) {
|
|
19881
|
-
swapFooterVisibility('cloned');
|
|
19882
|
-
}
|
|
19883
19805
|
if (shouldPreventDismiss) {
|
|
19884
19806
|
handleCanDismiss(baseEl, animation);
|
|
19885
19807
|
}
|
|
@@ -19896,10 +19818,28 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19896
19818
|
if (contentEl && (snapToBreakpoint === breakpoints[breakpoints.length - 1] || !expandToScroll)) {
|
|
19897
19819
|
contentEl.scrollY = true;
|
|
19898
19820
|
}
|
|
19821
|
+
/**
|
|
19822
|
+
* If expandToScroll is disabled and we're animating
|
|
19823
|
+
* to close the sheet, we need to swap
|
|
19824
|
+
* the footer position to stationary so that it
|
|
19825
|
+
* will collapse correctly. We cannot just always swap
|
|
19826
|
+
* here or it'll be jittery while animating movement.
|
|
19827
|
+
*/
|
|
19828
|
+
if (!expandToScroll && snapToBreakpoint === 0) {
|
|
19829
|
+
swapFooterPosition('stationary');
|
|
19830
|
+
}
|
|
19899
19831
|
return new Promise((resolve) => {
|
|
19900
19832
|
animation
|
|
19901
19833
|
.onFinish(() => {
|
|
19902
19834
|
if (shouldRemainOpen) {
|
|
19835
|
+
/**
|
|
19836
|
+
* If expandToScroll is disabled, we need to swap
|
|
19837
|
+
* the footer position to stationary so that it
|
|
19838
|
+
* will act as it would by default.
|
|
19839
|
+
*/
|
|
19840
|
+
if (!expandToScroll) {
|
|
19841
|
+
swapFooterPosition('stationary');
|
|
19842
|
+
}
|
|
19903
19843
|
/**
|
|
19904
19844
|
* Once the snapping animation completes,
|
|
19905
19845
|
* we need to reset the animation to go
|
|
@@ -19964,7 +19904,7 @@ const createSheetGesture = (baseEl, backdropEl, wrapperEl, initialBreakpoint, ba
|
|
|
19964
19904
|
};
|
|
19965
19905
|
};
|
|
19966
19906
|
|
|
19967
|
-
const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}
|
|
19907
|
+
const modalIosCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}";
|
|
19968
19908
|
var IonModalIosStyle0 = modalIosCss;
|
|
19969
19909
|
|
|
19970
19910
|
const modalMdCss = ":host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:\"\"}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}";
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,c as o,w as i,h as a,e,f as r}from"./p-66a5d6a8.js";import{f as n,i as s,d,r as p,a as h,p as l}from"./p-25b10f81.js";import{C as c,a as m,d as f}from"./p-f08a92cc.js";import{g as b,j as u,r as x,h as w,k as v}from"./p-94551927.js";import{c as g}from"./p-ccd02320.js";import{p as k,c as y}from"./p-17e21141.js";import{g as A}from"./p-c61cc894.js";import{G as D,O as B,F as Y,e as S,B as j,j as E,k as M,f as T,g as C,h as O}from"./p-95001a19.js";import{g as $}from"./p-47794def.js";import{e as P,w as z}from"./p-809483ac.js";import{b as I}from"./p-dabe3bd4.js";import{KEYBOARD_DID_OPEN as W}from"./p-2b7827c7.js";import{c as R}from"./p-4c667fce.js";import{g as L}from"./p-2408c236.js";import{createGesture as H}from"./p-8ededb41.js";import{w as N}from"./p-7b30edcc.js";import"./p-b7b1d91a.js";import"./p-9b97df10.js";import"./p-27281edd.js";var F;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(F||(F={}));const K={getEngine(){const t=A();if(null==t?void 0:t.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},setStyle(t){const o=this.getEngine();o&&o.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return F.Default;const{style:o}=await t.getInfo();return o}},V=(t,o)=>{if(1===o)return 0;const i=1/(1-o);return t*i+-o*i},Z=()=>{!N||N.innerWidth>=768||K.setStyle({style:F.Dark})},_=(t=F.Default)=>{!N||N.innerWidth>=768||K.setStyle({style:t})},G=async(t,o)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,D)&&(o.isRunning()?o.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},U=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,q=.915,J=(t,o)=>u(400,t/Math.abs(1.1*o),500),Q=t=>{const{currentBreakpoint:o,backdropBreakpoint:i,expandToScroll:a}=t,e=void 0===i||i<o,r=e?`calc(var(--backdrop-opacity) * ${o})`:"0",n=R("backdropAnimation").fromTo("opacity",0,r);return e&&n.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:R("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*o}%)`}]),backdropAnimation:n,contentAnimation:a?void 0:R("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:100*(1-o)+"%"},{offset:1,opacity:1,maxHeight:100*o+"%"}])}},X=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=`calc(var(--backdrop-opacity) * ${V(o,i)})`,e=[{offset:0,opacity:a},{offset:1,opacity:0}],r=[{offset:0,opacity:a},{offset:i,opacity:0},{offset:1,opacity:0}],n=R("backdropAnimation").keyframes(0!==i?r:e);return{wrapperAnimation:R("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*o}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:n}},tt=(t,o)=>{const{presentingEl:i,currentBreakpoint:a,expandToScroll:e}=o,r=b(t),{wrapperAnimation:n,backdropAnimation:s,contentAnimation:d}=void 0!==a?Q(o):{backdropAnimation:R().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:R().fromTo("transform","translateY(100vh)","translateY(0vh)"),contentAnimation:void 0};s.addElement(r.querySelector("ion-backdrop")),n.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1}),!e&&(null==d||d.addElement(t.querySelector(".ion-page")));const p=R("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([n]).beforeAddWrite((()=>{if(e)return;const o=t.querySelector("ion-footer"),i=t.shadowRoot.querySelector("ion-footer");if(o&&!i){const i=o.clientHeight,a=o.cloneNode(!0);t.shadowRoot.appendChild(a),o.style.setProperty("display","none"),o.setAttribute("aria-hidden","true"),t.querySelector(".ion-page").style.setProperty("padding-bottom",`${i}px`)}}));if(d&&p.addAnimation(d),i){const t=window.innerWidth<768,o="ION-MODAL"===i.tagName&&void 0!==i.presentingElement,a=b(i),e=R().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),r=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",a=`translateY(${o?"-10px":t}) scale(0.915)`;e.afterStyles({transform:a}).beforeAddWrite((()=>r.style.setProperty("background-color","black"))).addElement(i).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:a,borderRadius:"10px 10px 0 0"}]),p.addAnimation(e)}else if(p.addAnimation(s),o){const t=`translateY(-10px) scale(${o?q:1})`;e.afterStyles({transform:t}).addElement(a.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:t}]);const i=R().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);p.addAnimation([e,i])}else n.fromTo("opacity","0","1")}else p.addAnimation(s);return p},ot=(t,o,i=500)=>{const{presentingEl:a,currentBreakpoint:e,expandToScroll:r}=o,n=b(t),{wrapperAnimation:s,backdropAnimation:d}=void 0!==e?X(o):{backdropAnimation:R().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:R().fromTo("transform","translateY(0vh)","translateY(100vh)")};d.addElement(n.querySelector("ion-backdrop")),s.addElement(n.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const p=R("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i).addAnimation(s).beforeAddWrite((()=>{if(r)return;const o=t.querySelector("ion-footer");if(o){const i=t.shadowRoot.querySelector("ion-footer");o.style.removeProperty("display"),o.removeAttribute("aria-hidden"),i.style.setProperty("display","none"),i.setAttribute("aria-hidden","true"),t.querySelector(".ion-page").style.removeProperty("padding-bottom")}}));if(a){const t=window.innerWidth<768,o="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,i=b(a),e=R().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(r.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&r.style.setProperty("background-color",""))})),r=document.body;if(t){const t=CSS.supports("width","max(0px, 1px)")?"max(30px, var(--ion-safe-area-top))":"30px",i=`translateY(${o?"-10px":t}) scale(0.915)`;e.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:i,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]),p.addAnimation(e)}else if(p.addAnimation(d),o){const t=`translateY(-10px) scale(${o?q:1})`;e.addElement(i.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:t},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);const a=R().addElement(i.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:t},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);p.addAnimation([e,a])}else s.fromTo("opacity","1","0")}else p.addAnimation(d);return p},it=(t,o)=>{const{currentBreakpoint:i,expandToScroll:a}=o,e=b(t),{wrapperAnimation:r,backdropAnimation:n,contentAnimation:s}=void 0!==i?Q(o):{backdropAnimation:R().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:R().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]),contentAnimation:void 0};n.addElement(e.querySelector("ion-backdrop")),r.addElement(e.querySelector(".modal-wrapper")),a&&(null==s||s.addElement(t.querySelector(".ion-page")));const d=R().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([n,r]).beforeAddWrite((()=>{if(a)return;const o=t.querySelector("ion-footer"),i=t.shadowRoot.querySelector("ion-footer");if(o&&!i){const i=o.clientHeight,a=o.cloneNode(!0);t.shadowRoot.appendChild(a),o.style.setProperty("display","none"),o.setAttribute("aria-hidden","true"),t.querySelector(".ion-page").style.setProperty("padding-bottom",`${i}px`)}}));return s&&d.addAnimation(s),d},at=(t,o)=>{const{currentBreakpoint:i,expandToScroll:a}=o,e=b(t),{wrapperAnimation:r,backdropAnimation:n}=void 0!==i?X(o):{backdropAnimation:R().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:R().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return n.addElement(e.querySelector("ion-backdrop")),r.addElement(e.querySelector(".modal-wrapper")),R().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([n,r]).beforeAddWrite((()=>{if(a)return;const o=t.querySelector("ion-footer");if(o){const i=t.shadowRoot.querySelector("ion-footer");o.style.removeProperty("display"),o.removeAttribute("aria-hidden"),i.style.setProperty("display","none"),i.setAttribute("aria-hidden","true"),t.querySelector(".ion-page").style.removeProperty("padding-bottom")}}))},et=class{constructor(i){t(this,i),this.didPresent=o(this,"ionModalDidPresent",7),this.willPresent=o(this,"ionModalWillPresent",7),this.willDismiss=o(this,"ionModalWillDismiss",7),this.didDismiss=o(this,"ionModalDidDismiss",7),this.ionBreakpointDidChange=o(this,"ionBreakpointDidChange",7),this.didPresentShorthand=o(this,"didPresent",7),this.willPresentShorthand=o(this,"willPresent",7),this.willDismissShorthand=o(this,"willDismiss",7),this.didDismissShorthand=o(this,"didDismiss",7),this.ionMount=o(this,"ionMount",7),this.lockController=g(),this.triggerController=S(),this.coreDelegate=c(),this.isSheetModal=!1,this.inheritedAttributes={},this.inline=!1,this.gestureAnimationDismissing=!1,this.onHandleClick=()=>{const{sheetTransition:t,handleBehavior:o}=this;"cycle"===o&&void 0===t&&this.moveToNextBreakpoint()},this.onBackdropTap=()=>{const{sheetTransition:t}=this;void 0===t&&this.dismiss(void 0,j)},this.onLifecycle=t=>{const o=this.usersElement,i=rt[t.type];if(o&&i){const a=new CustomEvent(i,{bubbles:!1,cancelable:!1,detail:t.detail});o.dispatchEvent(a)}},this.presented=!1,this.hasController=!1,this.overlayIndex=void 0,this.delegate=void 0,this.keyboardClose=!0,this.enterAnimation=void 0,this.leaveAnimation=void 0,this.breakpoints=void 0,this.expandToScroll=!0,this.initialBreakpoint=void 0,this.backdropBreakpoint=0,this.handle=void 0,this.handleBehavior="none",this.component=void 0,this.componentProps=void 0,this.cssClass=void 0,this.backdropDismiss=!0,this.showBackdrop=!0,this.animated=!0,this.presentingElement=void 0,this.htmlAttributes=void 0,this.isOpen=!1,this.trigger=void 0,this.keepContentsMounted=!1,this.focusTrap=!0,this.canDismiss=!0}onIsOpenChange(t,o){!0===t&&!1===o?this.present():!1===t&&!0===o&&this.dismiss()}triggerChanged(){const{trigger:t,el:o,triggerController:i}=this;t&&i.addClickListener(o,t)}breakpointsChanged(t){void 0!==t&&(this.sortedBreakpoints=t.sort(((t,o)=>t-o)))}connectedCallback(){const{el:t}=this;E(t),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener()}componentWillLoad(){var t;const{breakpoints:o,initialBreakpoint:i,el:a,htmlAttributes:e}=this,r=this.isSheetModal=void 0!==o&&void 0!==i,n=["aria-label","role"];this.inheritedAttributes=w(a,n),void 0!==e&&n.forEach((t=>{e[t]&&(this.inheritedAttributes=Object.assign(Object.assign({},this.inheritedAttributes),{[t]:e[t]}),delete e[t])})),r&&(this.currentBreakpoint=this.initialBreakpoint),void 0===o||void 0===i||o.includes(i)||k("[ion-modal] - Your breakpoints array must include the initialBreakpoint value."),(null===(t=this.htmlAttributes)||void 0===t?void 0:t.id)||M(this.el)}componentDidLoad(){!0===this.isOpen&&x((()=>this.present())),this.breakpointsChanged(this.breakpoints),this.triggerChanged()}getDelegate(t=!1){if(this.workingDelegate&&!t)return{delegate:this.workingDelegate,inline:this.inline};const o=this.inline=null!==this.el.parentNode&&!this.hasController;return{inline:o,delegate:this.workingDelegate=o?this.delegate||this.coreDelegate:this.delegate}}async checkCanDismiss(t,o){const{canDismiss:i}=this;return"function"==typeof i?i(t,o):i}async present(){const t=await this.lockController.lock();if(this.presented)return void t();const{presentingElement:o,el:a}=this;this.currentBreakpoint=this.initialBreakpoint;const{inline:e,delegate:r}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await m(r,a,this.component,["ion-page"],this.componentProps,e),v(a)?await P(this.usersElement):this.keepContentsMounted||await z(),i((()=>this.el.classList.add("show-modal")));const n=void 0!==o;n&&"ios"===I(this)&&(this.statusBarStyle=await K.getStyle(),Z()),await T(this,"modalEnter",tt,it,{presentingEl:o,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll}),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),x((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(W,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():n&&this.initSwipeToClose(),t()}initSwipeToClose(){var t;if("ios"!==I(this))return;const{el:o}=this,i=this.leaveAnimation||y.get("modalLeave",ot),a=this.animation=i(o,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});if(!h(o))return void l(o);const e=null!==(t=this.statusBarStyle)&&void 0!==t?t:F.Default;this.gesture=((t,o,i,a)=>{const e=.5,r=t.offsetHeight;let h=!1,l=!1,c=null,m=null,f=!0,x=0;const w=H({el:t,gestureName:"modalSwipeToClose",gesturePriority:B,direction:"y",threshold:10,canStart:t=>{const o=t.event.target;if(null===o||!o.closest)return!0;if(c=n(o),c){if(s(c)){const t=b(c);m=t.querySelector(".inner-scroll")}else m=c;return!c.querySelector("ion-refresher")&&0===m.scrollTop}return null===o.closest("ion-footer")},onStart:i=>{const{deltaY:a}=i;f=!c||!s(c)||c.scrollY,l=void 0!==t.canDismiss&&!0!==t.canDismiss,a>0&&c&&d(c),o.progressStart(!0,h?1:0)},onMove:t=>{const{deltaY:a}=t;a>0&&c&&d(c);const n=t.deltaY/r,s=n>=0&&l,p=s?.2:.9999,h=s?U(n/p):n,m=u(1e-4,h,p);o.progressStep(m),m>=e&&x<e?_(i):m<e&&x>=e&&Z(),x=m},onEnd:i=>{const n=i.velocityY,s=i.deltaY/r,d=s>=0&&l,m=d?.2:.9999,b=d?U(s/m):s,x=u(1e-4,b,m),v=!d&&(i.deltaY+1e3*n)/r>=e;let g=v?-.001:.001;v?(o.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=L([0,0],[.32,.72],[0,1],[1,1],x)[0]):(o.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=L([0,0],[1,0],[.68,.28],[1,1],x)[0]);const k=J(v?s*r:(1-x)*r,n);h=v,w.enable(!1),c&&p(c,f),o.onFinish((()=>{v||w.enable(!0)})).progressEnd(v?1:0,g,k),d&&x>m/4?G(t,o):v&&a()}});return w})(o,a,e,(()=>{this.gestureAnimationDismissing=!0,_(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,D),this.gestureAnimationDismissing=!1}))})),this.gesture.enable(!0)}initSheetGesture(){const{wrapperEl:t,initialBreakpoint:o,backdropBreakpoint:i}=this;if(!t||void 0===o)return;const a=this.enterAnimation||y.get("modalEnter",tt),e=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:o,backdropBreakpoint:i,expandToScroll:this.expandToScroll});e.progressStart(!0,1);const{gesture:r,moveSheetToBreakpoint:d}=((t,o,i,a,e,r,d=[],p,h,l,c)=>{const m={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==e?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-e,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}],CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]},f=t.querySelector("ion-content"),w=i.clientHeight;let v=a,g=0,k=!1,y=null;const A=d[d.length-1],D=d[0],B=r.childAnimations.find((t=>"wrapperAnimation"===t.id)),S=r.childAnimations.find((t=>"backdropAnimation"===t.id)),j=r.childAnimations.find((t=>"contentAnimation"===t.id)),E=()=>{t.style.setProperty("pointer-events","auto"),o.style.setProperty("pointer-events","auto"),t.classList.remove(Y)},M=()=>{t.style.setProperty("pointer-events","none"),o.style.setProperty("pointer-events","none"),t.classList.add(Y)},T=o=>{const a=t.querySelector("ion-footer");if(!a)return;const e=i.nextElementSibling,r="original"===o?e:a,n="original"===o?a:e;n.style.removeProperty("display"),n.removeAttribute("aria-hidden");const s=t.querySelector(".ion-page");"original"===o?s.style.removeProperty("padding-bottom"):s.style.setProperty("padding-bottom",`${n.clientHeight}px`),r.style.setProperty("display","none"),r.setAttribute("aria-hidden","true")};B&&S&&(B.keyframes([...m.WRAPPER_KEYFRAMES]),S.keyframes([...m.BACKDROP_KEYFRAMES]),null==j||j.keyframes([...m.CONTENT_KEYFRAMES]),r.progressStart(!0,1-v),v>e?E():M()),f&&v!==A&&p&&(f.scrollY=!1);const C=o=>{const{breakpoint:i,canDismiss:a,breakpointOffset:n,animated:s}=o,h=a&&0===i,b=h?v:i,u=0!==b;return v=0,B&&S&&(B.keyframes([{offset:0,transform:`translateY(${100*n}%)`},{offset:1,transform:`translateY(${100*(1-b)}%)`}]),S.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${V(1-n,e)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${V(b,e)})`}]),j&&j.keyframes([{offset:0,maxHeight:100*(1-n)+"%"},{offset:1,maxHeight:100*b+"%"}]),r.progressStep(0)),O.enable(!1),!p&&u&&T("cloned"),h?G(t,r):u||l(),!f||b!==d[d.length-1]&&p||(f.scrollY=!0),new Promise((t=>{r.onFinish((()=>{u?B&&S?x((()=>{B.keyframes([...m.WRAPPER_KEYFRAMES]),S.keyframes([...m.BACKDROP_KEYFRAMES]),null==j||j.keyframes([...m.CONTENT_KEYFRAMES]),r.progressStart(!0,1-b),v=b,c(v),v>e?E():M(),O.enable(!0),t()})):(O.enable(!0),t()):t()}),{oneTimeCallback:!0}).progressEnd(1,0,s?500:0)}))},O=H({el:i,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const o=n(t.event.target);if(v=h(),!p&&o)return 0===(s(o)?b(o).querySelector(".inner-scroll"):o).scrollTop;if(1===v&&o){const t=s(o)?b(o).querySelector(".inner-scroll"):o;return!o.querySelector("ion-refresher")&&0===t.scrollTop}return!0},onStart:o=>{if(k=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===D,!p){const t=n(o.event.target);y=t&&s(t)?b(t).querySelector(".inner-scroll"):t}p||T("original"),o.deltaY>0&&f&&(f.scrollY=!1),x((()=>{t.focus()})),r.progressStart(!0,1-v)},onMove:t=>{if(!p&&t.deltaY<=0&&y)return;t.deltaY>0&&f&&(f.scrollY=!1);const o=d.length>1?1-d[1]:void 0,i=1-v+t.deltaY/w,a=void 0!==o&&i>=o&&k,e=a?.95:.9999,n=a&&void 0!==o?o+U((i-o)/(e-o)):i;g=u(1e-4,n,e),r.progressStep(g)},onEnd:t=>{if(!p&&t.deltaY<=0&&y&&y.scrollTop>0)return;const o=v-(t.deltaY+350*t.velocityY)/w,i=d.reduce(((t,i)=>Math.abs(i-o)<Math.abs(t-o)?i:t));C({breakpoint:i,breakpointOffset:g,canDismiss:k,animated:!0})}});return{gesture:O,moveSheetToBreakpoint:C}})(this.el,this.backdropEl,t,o,i,e,this.sortedBreakpoints,this.expandToScroll,(()=>{var t;return null!==(t=this.currentBreakpoint)&&void 0!==t?t:0}),(()=>this.sheetOnDismiss()),(t=>{this.currentBreakpoint!==t&&(this.currentBreakpoint=t,this.ionBreakpointDidChange.emit({breakpoint:t}))}));this.gesture=r,this.moveSheetToBreakpoint=d,this.gesture.enable(!0)}sheetOnDismiss(){this.gestureAnimationDismissing=!0,this.animation.onFinish((async()=>{this.currentBreakpoint=0,this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint}),await this.dismiss(void 0,D),this.gestureAnimationDismissing=!1}))}async dismiss(t,o){var a;if(this.gestureAnimationDismissing&&o!==D)return!1;const e=await this.lockController.lock();if("handler"!==o&&!await this.checkCanDismiss(t,o))return e(),!1;const{presentingElement:r}=this;void 0!==r&&"ios"===I(this)&&_(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(W,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const n=await C(this,t,o,"modalLeave",ot,at,{presentingEl:r,currentBreakpoint:null!==(a=this.currentBreakpoint)&&void 0!==a?a:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll});if(n){const{delegate:t}=this.getDelegate();await f(t,this.usersElement),i((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy()}return this.currentBreakpoint=void 0,this.animation=void 0,e(),n}onDidDismiss(){return O(this.el,"ionModalDidDismiss")}onWillDismiss(){return O(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void k("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void k(`[ion-modal] - Attempted to set invalid breakpoint value ${t}. Please double check that the breakpoint value is part of your defined breakpoints.`);const{currentBreakpoint:o,moveSheetToBreakpoint:i,canDismiss:a,breakpoints:e,animated:r}=this;o!==t&&i&&(this.sheetTransition=i({breakpoint:t,breakpointOffset:1-o,canDismiss:void 0!==a&&!0!==a&&0===e[0],animated:r}),await this.sheetTransition,this.sheetTransition=void 0)}async getCurrentBreakpoint(){return this.currentBreakpoint}async moveToNextBreakpoint(){const{breakpoints:t,currentBreakpoint:o}=this;if(!t||null==o)return!1;const i=t.filter((t=>0!==t)),a=i.indexOf(o),e=i[(a+1)%i.length];return await this.setCurrentBreakpoint(e),!0}render(){const{handle:t,isSheetModal:o,presentingElement:i,htmlAttributes:r,handleBehavior:n,inheritedAttributes:s,focusTrap:d,expandToScroll:p}=this,h=!1!==t&&o,l=I(this),c=void 0!==i&&"ios"===l,m="cycle"===n;return a(e,Object.assign({key:"0991b2e4e32da511e59fb1463b47e4ac1b86d1ca","no-router":!0,tabindex:"-1"},r,{style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign({[l]:!0,"modal-default":!c&&!o,"modal-card":c,"modal-sheet":o,"modal-no-expand-scroll":o&&!p,"overlay-hidden":!0,[Y]:!1===d},$(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle}),a("ion-backdrop",{key:"ca9453ffe1021fb252ad9460676cfabb5633f00f",ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===l&&a("div",{key:"9f8da446a7b0f3b26aec856e13f6d6d131a7e37b",class:"modal-shadow"}),a("div",Object.assign({key:"9d08bf600571849c97b58f66df40b496a358d1e1",role:"dialog"},s,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t}),h&&a("button",{key:"f8bf0d1126e5376519101225d9965727121ee042",class:"modal-handle",tabIndex:m?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:m?this.onHandleClick:void 0,part:"handle"}),a("slot",{key:"6d52849df98f2c6c8fbc03996a931ea6a39a512b"})))}get el(){return r(this)}static get watchers(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}}},rt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};et.style={ios:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer ion-toolbar:first-of-type{padding-top:6px}',md:':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}'};export{et as ion_modal}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,r,e,a){function i(t){return t instanceof e?t:new e((function(r){r(t)}))}return new(e||(e=Promise))((function(e,n){function o(t){try{d(a.next(t))}catch(t){n(t)}}function s(t){try{d(a["throw"](t))}catch(t){n(t)}}function d(t){t.done?e(t.value):i(t.value).then(o,s)}d((a=a.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var e={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},a,i,n,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(r){return d([t,r])}}function d(s){if(a)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(e=0)),e)try{if(a=1,i&&(n=s[0]&2?i["return"]:s[0]?i["throw"]||((n=i["return"])&&n.call(i),0):i.next)&&!(n=n.call(i,s[1])).done)return n;if(i=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:e.label++;return{value:s[1],done:false};case 5:e.label++;i=s[1];s=[0];continue;case 7:s=e.ops.pop();e.trys.pop();continue;default:if(!(n=e.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){e=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){e.label=s[1];break}if(s[0]===6&&e.label<n[1]){e.label=n[1];n=s;break}if(n&&e.label<n[2]){e.label=n[2];e.ops.push(s);break}if(n[2])e.ops.pop();e.trys.pop();continue}s=r.call(t,e)}catch(t){s=[6,t];i=0}finally{a=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,r,e){if(e||arguments.length===2)for(var a=0,i=r.length,n;a<i;a++){if(n||!(a in r)){if(!n)n=Array.prototype.slice.call(r,0,a);n[a]=r[a]}}return t.concat(n||Array.prototype.slice.call(r))};
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/System.register(["./p-f11a9436.system.js","./p-1d307396.system.js","./p-fa3f4b96.system.js","./p-d382f09c.system.js","./p-4f255d5a.system.js","./p-00023f5a.system.js","./p-8985cdb6.system.js","./p-1a81ac09.system.js","./p-4609d030.system.js","./p-a83e3290.system.js","./p-1974d5b2.system.js","./p-abe101da.system.js","./p-c16443a8.system.js","./p-e673a0a2.system.js","./p-3e1e14d9.system.js","./p-792919fd.system.js","./p-8b050e84.system.js","./p-20d469d0.system.js","./p-b06ac4a5.system.js"],(function(t){"use strict";var r,e,a,i,n,o,s,d,f,u,h,c,l,p,v,m,b,w,x,g,y,k,_,A,Y,j,M,D,S,E,O,P,T,C,B,I,z,R,W,L,N,H,K;return{setters:[function(t){r=t.r;e=t.c;a=t.w;i=t.h;n=t.e;o=t.f},function(t){s=t.f;d=t.i;f=t.d;u=t.r;h=t.a;c=t.p},function(t){l=t.C;p=t.a;v=t.d},function(t){m=t.g;b=t.j;w=t.r;x=t.h;g=t.k},function(t){y=t.c},function(t){k=t.p;_=t.c},function(t){A=t.g},function(t){Y=t.G;j=t.O;M=t.F;D=t.e;S=t.B;E=t.j;O=t.k;P=t.f;T=t.g;C=t.h},function(t){B=t.g},function(t){I=t.e;z=t.w},function(t){R=t.b},function(t){W=t.KEYBOARD_DID_OPEN},function(t){L=t.c},function(t){N=t.g},function(t){H=t.createGesture},function(t){K=t.w},function(){},function(){},function(){}],execute:function(){var F=this;var V;(function(t){t["Dark"]="DARK";t["Light"]="LIGHT";t["Default"]="DEFAULT"})(V||(V={}));var Z={getEngine:function(){var t=A();if(t===null||t===void 0?void 0:t.isPluginAvailable("StatusBar")){return t.Plugins.StatusBar}return undefined},setStyle:function(t){var r=this.getEngine();if(!r){return}r.setStyle(t)},getStyle:function(){return __awaiter(this,void 0,void 0,(function(){var t,r;return __generator(this,(function(e){switch(e.label){case 0:t=this.getEngine();if(!t){return[2,V.Default]}return[4,t.getInfo()];case 1:r=e.sent().style;return[2,r]}}))}))}};var G=function(t,r){if(r===1){return 0}var e=1/(1-r);var a=-(r*e);return t*e+a};var U=function(){if(!K||K.innerWidth>=768){return}Z.setStyle({style:V.Dark})};var q=function(t){if(t===void 0){t=V.Default}if(!K||K.innerWidth>=768){return}Z.setStyle({style:t})};var J=function(t,r){return __awaiter(F,void 0,void 0,(function(){var e;return __generator(this,(function(a){switch(a.label){case 0:if(typeof t.canDismiss!=="function"){return[2]}return[4,t.canDismiss(undefined,Y)];case 1:e=a.sent();if(!e){return[2]}if(r.isRunning()){r.onFinish((function(){t.dismiss(undefined,"handler")}),{oneTimeCallback:true})}else{t.dismiss(undefined,"handler")}return[2]}}))}))};var Q=function(t){return.00255275*Math.pow(2.71828,-14.9619*t)-1.00255*Math.pow(2.71828,-.0380968*t)+1};var X={MIN_PRESENTING_SCALE:.915};var $=function(t,r,e,a){var i=.5;var n=t.offsetHeight;var o=false;var h=false;var c=null;var l=null;var p=.2;var v=true;var w=0;var x=function(){if(c&&d(c)){return c.scrollY}else{return true}};var g=function(t){var r=t.event.target;if(r===null||!r.closest){return true}c=s(r);if(c){if(d(c)){var e=m(c);l=e.querySelector(".inner-scroll")}else{l=c}var a=!!c.querySelector("ion-refresher");return!a&&l.scrollTop===0}var i=r.closest("ion-footer");if(i===null){return true}return false};var y=function(e){var a=e.deltaY;v=x();h=t.canDismiss!==undefined&&t.canDismiss!==true;if(a>0&&c){f(c)}r.progressStart(true,o?1:0)};var k=function(t){var a=t.deltaY;if(a>0&&c){f(c)}var o=t.deltaY/n;var s=o>=0&&h;var d=s?p:.9999;var u=s?Q(o/d):o;var l=b(1e-4,u,d);r.progressStep(l);if(l>=i&&w<i){q(e)}else if(l<i&&w>=i){U()}w=l};var _=function(e){var s=e.velocityY;var d=e.deltaY/n;var f=d>=0&&h;var l=f?p:.9999;var m=f?Q(d/l):d;var w=b(1e-4,m,l);var x=(e.deltaY+s*1e3)/n;var g=!f&&x>=i;var y=g?-.001:.001;if(!g){r.easing("cubic-bezier(1, 0, 0.68, 0.28)");y+=N([0,0],[1,0],[.68,.28],[1,1],w)[0]}else{r.easing("cubic-bezier(0.32, 0.72, 0, 1)");y+=N([0,0],[.32,.72],[0,1],[1,1],w)[0]}var k=g?tt(d*n,s):tt((1-w)*n,s);o=g;A.enable(false);if(c){u(c,v)}r.onFinish((function(){if(!g){A.enable(true)}})).progressEnd(g?1:0,y,k);if(f&&w>l/4){J(t,r)}else if(g){a()}};var A=H({el:t,gestureName:"modalSwipeToClose",gesturePriority:j,direction:"y",threshold:10,canStart:g,onStart:y,onMove:k,onEnd:_});return A};var tt=function(t,r){return b(400,t/Math.abs(r*1.1),500)};var rt=function(t){var r=t.currentBreakpoint,e=t.backdropBreakpoint,a=t.expandToScroll;var i=e===undefined||e<r;var n=i?"calc(var(--backdrop-opacity) * ".concat(r,")"):"0";var o=L("backdropAnimation").fromTo("opacity",0,n);if(i){o.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"])}var s=L("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:"translateY(".concat(100-r*100,"%)")}]);var d=!a?L("contentAnimation").keyframes([{offset:0,opacity:1,maxHeight:"".concat((1-r)*100,"%")},{offset:1,opacity:1,maxHeight:"".concat(r*100,"%")}]):undefined;return{wrapperAnimation:s,backdropAnimation:o,contentAnimation:d}};var et=function(t){var r=t.currentBreakpoint,e=t.backdropBreakpoint;var a="calc(var(--backdrop-opacity) * ".concat(G(r,e),")");var i=[{offset:0,opacity:a},{offset:1,opacity:0}];var n=[{offset:0,opacity:a},{offset:e,opacity:0},{offset:1,opacity:0}];var o=L("backdropAnimation").keyframes(e!==0?n:i);var s=L("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(".concat(100-r*100,"%)")},{offset:1,opacity:1,transform:"translateY(100%)"}]);return{wrapperAnimation:s,backdropAnimation:o}};var at=function(){var t=L().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);var r=L().fromTo("transform","translateY(100vh)","translateY(0vh)");return{backdropAnimation:t,wrapperAnimation:r,contentAnimation:undefined}};var it=function(t,r){var e=r.presentingEl,a=r.currentBreakpoint,i=r.expandToScroll;var n=m(t);var o=a!==undefined?rt(r):at(),s=o.wrapperAnimation,d=o.backdropAnimation,f=o.contentAnimation;d.addElement(n.querySelector("ion-backdrop"));s.addElement(n.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});!i&&(f===null||f===void 0?void 0:f.addElement(t.querySelector(".ion-page")));var u=L("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation([s]).beforeAddWrite((function(){if(i){return}var r=t.querySelector("ion-footer");var e=t.shadowRoot.querySelector("ion-footer");if(r&&!e){var a=r.clientHeight;var n=r.cloneNode(true);t.shadowRoot.appendChild(n);r.style.setProperty("display","none");r.setAttribute("aria-hidden","true");var o=t.querySelector(".ion-page");o.style.setProperty("padding-bottom","".concat(a,"px"))}}));if(f){u.addAnimation(f)}if(e){var h=window.innerWidth<768;var c=e.tagName==="ION-MODAL"&&e.presentingElement!==undefined;var l=m(e);var p=L().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"});var v=document.body;if(h){var b=!CSS.supports("width","max(0px, 1px)")?"30px":"max(30px, var(--ion-safe-area-top))";var w=c?"-10px":b;var x=X.MIN_PRESENTING_SCALE;var g="translateY(".concat(w,") scale(").concat(x,")");p.afterStyles({transform:g}).beforeAddWrite((function(){return v.style.setProperty("background-color","black")})).addElement(e).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"},{offset:1,filter:"contrast(0.85)",transform:g,borderRadius:"10px 10px 0 0"}]);u.addAnimation(p)}else{u.addAnimation(d);if(!c){s.fromTo("opacity","0","1")}else{var x=c?X.MIN_PRESENTING_SCALE:1;var g="translateY(-10px) scale(".concat(x,")");p.afterStyles({transform:g}).addElement(l.querySelector(".modal-wrapper")).keyframes([{offset:0,filter:"contrast(1)",transform:"translateY(0) scale(1)"},{offset:1,filter:"contrast(0.85)",transform:g}]);var y=L().afterStyles({transform:g}).addElement(l.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:g}]);u.addAnimation([p,y])}}}else{u.addAnimation(d)}return u};var nt=function(){var t=L().fromTo("opacity","var(--backdrop-opacity)",0);var r=L().fromTo("transform","translateY(0vh)","translateY(100vh)");return{backdropAnimation:t,wrapperAnimation:r}};var ot=function(t,r,e){if(e===void 0){e=500}var a=r.presentingEl,i=r.currentBreakpoint,n=r.expandToScroll;var o=m(t);var s=i!==undefined?et(r):nt(),d=s.wrapperAnimation,f=s.backdropAnimation;f.addElement(o.querySelector("ion-backdrop"));d.addElement(o.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});var u=L("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(e).addAnimation(d).beforeAddWrite((function(){if(n){return}var r=t.querySelector("ion-footer");if(r){var e=t.shadowRoot.querySelector("ion-footer");r.style.removeProperty("display");r.removeAttribute("aria-hidden");e.style.setProperty("display","none");e.setAttribute("aria-hidden","true");var a=t.querySelector(".ion-page");a.style.removeProperty("padding-bottom")}}));if(a){var h=window.innerWidth<768;var c=a.tagName==="ION-MODAL"&&a.presentingElement!==undefined;var l=m(a);var p=L().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((function(t){if(t!==1){return}a.style.setProperty("overflow","");var r=Array.from(v.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((function(t){return t.presentingElement!==undefined})).length;if(r<=1){v.style.setProperty("background-color","")}}));var v=document.body;if(h){var b=!CSS.supports("width","max(0px, 1px)")?"30px":"max(30px, var(--ion-safe-area-top))";var w=c?"-10px":b;var x=X.MIN_PRESENTING_SCALE;var g="translateY(".concat(w,") scale(").concat(x,")");p.addElement(a).keyframes([{offset:0,filter:"contrast(0.85)",transform:g,borderRadius:"10px 10px 0 0"},{offset:1,filter:"contrast(1)",transform:"translateY(0px) scale(1)",borderRadius:"0px"}]);u.addAnimation(p)}else{u.addAnimation(f);if(!c){d.fromTo("opacity","1","0")}else{var x=c?X.MIN_PRESENTING_SCALE:1;var g="translateY(-10px) scale(".concat(x,")");p.addElement(l.querySelector(".modal-wrapper")).afterStyles({transform:"translate3d(0, 0, 0)"}).keyframes([{offset:0,filter:"contrast(0.85)",transform:g},{offset:1,filter:"contrast(1)",transform:"translateY(0) scale(1)"}]);var y=L().addElement(l.querySelector(".modal-shadow")).afterStyles({transform:"translateY(0) scale(1)"}).keyframes([{offset:0,opacity:"0",transform:g},{offset:1,opacity:"1",transform:"translateY(0) scale(1)"}]);u.addAnimation([p,y])}}}else{u.addAnimation(f)}return u};var st=function(){var t=L().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]);var r=L().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}]);return{backdropAnimation:t,wrapperAnimation:r,contentAnimation:undefined}};var dt=function(t,r){var e=r.currentBreakpoint,a=r.expandToScroll;var i=m(t);var n=e!==undefined?rt(r):st(),o=n.wrapperAnimation,s=n.backdropAnimation,d=n.contentAnimation;s.addElement(i.querySelector("ion-backdrop"));o.addElement(i.querySelector(".modal-wrapper"));a&&(d===null||d===void 0?void 0:d.addElement(t.querySelector(".ion-page")));var f=L().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([s,o]).beforeAddWrite((function(){if(a){return}var r=t.querySelector("ion-footer");var e=t.shadowRoot.querySelector("ion-footer");if(r&&!e){var i=r.clientHeight;var n=r.cloneNode(true);t.shadowRoot.appendChild(n);r.style.setProperty("display","none");r.setAttribute("aria-hidden","true");var o=t.querySelector(".ion-page");o.style.setProperty("padding-bottom","".concat(i,"px"))}}));if(d){f.addAnimation(d)}return f};var ft=function(){var t=L().fromTo("opacity","var(--backdrop-opacity)",0);var r=L().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}]);return{backdropAnimation:t,wrapperAnimation:r}};var ut=function(t,r){var e=r.currentBreakpoint,a=r.expandToScroll;var i=m(t);var n=e!==undefined?et(r):ft(),o=n.wrapperAnimation,s=n.backdropAnimation;s.addElement(i.querySelector("ion-backdrop"));o.addElement(i.querySelector(".modal-wrapper"));var d=L().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([s,o]).beforeAddWrite((function(){if(a){return}var r=t.querySelector("ion-footer");if(r){var e=t.shadowRoot.querySelector("ion-footer");r.style.removeProperty("display");r.removeAttribute("aria-hidden");e.style.setProperty("display","none");e.setAttribute("aria-hidden","true");var i=t.querySelector(".ion-page");i.style.removeProperty("padding-bottom")}}));return d};var ht=function(t,r,e,a,i,n,o,f,u,h,c){if(o===void 0){o=[]}var l=[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}];var p=[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-i,opacity:0},{offset:1,opacity:0}];var v={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:i!==0?p:l,CONTENT_KEYFRAMES:[{offset:0,maxHeight:"100%"},{offset:1,maxHeight:"0%"}]};var x=t.querySelector("ion-content");var g=e.clientHeight;var y=a;var k=0;var _=false;var A=null;var Y=.95;var j=o[o.length-1];var D=o[0];var S=n.childAnimations.find((function(t){return t.id==="wrapperAnimation"}));var E=n.childAnimations.find((function(t){return t.id==="backdropAnimation"}));var O=n.childAnimations.find((function(t){return t.id==="contentAnimation"}));var P=function(){t.style.setProperty("pointer-events","auto");r.style.setProperty("pointer-events","auto");t.classList.remove(M)};var T=function(){t.style.setProperty("pointer-events","none");r.style.setProperty("pointer-events","none");t.classList.add(M)};var C=function(r){var a=t.querySelector("ion-footer");if(!a){return}var i=e.nextElementSibling;var n=r==="original"?i:a;var o=r==="original"?a:i;o.style.removeProperty("display");o.removeAttribute("aria-hidden");var s=t.querySelector(".ion-page");if(r==="original"){s.style.removeProperty("padding-bottom")}else{var d=o.clientHeight;s.style.setProperty("padding-bottom","".concat(d,"px"))}n.style.setProperty("display","none");n.setAttribute("aria-hidden","true")};if(S&&E){S.keyframes(__spreadArray([],v.WRAPPER_KEYFRAMES,true));E.keyframes(__spreadArray([],v.BACKDROP_KEYFRAMES,true));O===null||O===void 0?void 0:O.keyframes(__spreadArray([],v.CONTENT_KEYFRAMES,true));n.progressStart(true,1-y);var B=y>i;if(B){P()}else{T()}}if(x&&y!==j&&f){x.scrollY=false}var I=function(t){var r=s(t.event.target);y=u();if(!f&&r){var e=d(r)?m(r).querySelector(".inner-scroll"):r;return e.scrollTop===0}if(y===1&&r){var e=d(r)?m(r).querySelector(".inner-scroll"):r;var a=!!r.querySelector("ion-refresher");return!a&&e.scrollTop===0}return true};var z=function(r){_=t.canDismiss!==undefined&&t.canDismiss!==true&&D===0;if(!f){var e=s(r.event.target);A=e&&d(e)?m(e).querySelector(".inner-scroll"):e}if(!f){C("original")}if(r.deltaY>0&&x){x.scrollY=false}w((function(){t.focus()}));n.progressStart(true,1-y)};var R=function(t){if(!f&&t.deltaY<=0&&A){return}if(t.deltaY>0&&x){x.scrollY=false}var r=1-y;var e=o.length>1?1-o[1]:undefined;var a=r+t.deltaY/g;var i=e!==undefined&&a>=e&&_;var s=i?Y:.9999;var d=i&&e!==undefined?e+Q((a-e)/(s-e)):a;k=b(1e-4,d,s);n.progressStep(k)};var W=function(t){if(!f&&t.deltaY<=0&&A&&A.scrollTop>0){return}var r=t.velocityY;var e=(t.deltaY+r*350)/g;var a=y-e;var i=o.reduce((function(t,r){return Math.abs(r-a)<Math.abs(t-a)?r:t}));L({breakpoint:i,breakpointOffset:k,canDismiss:_,animated:true})};var L=function(r){var e=r.breakpoint,a=r.canDismiss,s=r.breakpointOffset,d=r.animated;var u=a&&e===0;var l=u?y:e;var p=l!==0;y=0;if(S&&E){S.keyframes([{offset:0,transform:"translateY(".concat(s*100,"%)")},{offset:1,transform:"translateY(".concat((1-l)*100,"%)")}]);E.keyframes([{offset:0,opacity:"calc(var(--backdrop-opacity) * ".concat(G(1-s,i),")")},{offset:1,opacity:"calc(var(--backdrop-opacity) * ".concat(G(l,i),")")}]);if(O){O.keyframes([{offset:0,maxHeight:"".concat((1-s)*100,"%")},{offset:1,maxHeight:"".concat(l*100,"%")}])}n.progressStep(0)}N.enable(false);if(!f&&p){C("cloned")}if(u){J(t,n)}else if(!p){h()}if(x&&(l===o[o.length-1]||!f)){x.scrollY=true}return new Promise((function(t){n.onFinish((function(){if(p){if(S&&E){w((function(){S.keyframes(__spreadArray([],v.WRAPPER_KEYFRAMES,true));E.keyframes(__spreadArray([],v.BACKDROP_KEYFRAMES,true));O===null||O===void 0?void 0:O.keyframes(__spreadArray([],v.CONTENT_KEYFRAMES,true));n.progressStart(true,1-l);y=l;c(y);var r=y>i;if(r){P()}else{T()}N.enable(true);t()}))}else{N.enable(true);t()}}else{t()}}),{oneTimeCallback:true}).progressEnd(1,0,d?500:0)}))};var N=H({el:e,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:I,onStart:z,onMove:R,onEnd:W});return{gesture:N,moveSheetToBreakpoint:L}};var ct=':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}:host(.modal-card),:host(.modal-sheet){--border-radius:10px}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:10px}}.modal-wrapper{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){:host(.modal-card){--height:calc(100% - 40px)}}:host(.modal-card) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-card){--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}:host(.modal-card) .modal-shadow{display:none}:host(.modal-card) ion-backdrop{pointer-events:none}}@media screen and (min-width: 768px){:host(.modal-card){--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px;--backdrop-opacity:0;--box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}:host(.modal-card) .modal-wrapper{-webkit-box-shadow:none;box-shadow:none}:host(.modal-card) .modal-shadow{-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow)}}:host(.modal-sheet) .modal-wrapper{border-start-start-radius:var(--border-radius);border-start-end-radius:var(--border-radius);border-end-end-radius:0;border-end-start-radius:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer ion-toolbar:first-of-type{padding-top:6px}';var lt=ct;var pt=':host{--width:100%;--min-width:auto;--max-width:auto;--height:100%;--min-height:auto;--max-height:auto;--overflow:hidden;--border-radius:0;--border-width:0;--border-style:none;--border-color:transparent;--background:var(--ion-background-color, #fff);--box-shadow:none;--backdrop-opacity:0;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;color:var(--ion-text-color, #000);contain:strict}.modal-wrapper,ion-backdrop{pointer-events:auto}:host(.overlay-hidden){display:none}.modal-wrapper,.modal-shadow{border-radius:var(--border-radius);width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);overflow:var(--overflow);z-index:10}.modal-shadow{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--width:600px;--height:500px;--ion-safe-area-top:0px;--ion-safe-area-bottom:0px;--ion-safe-area-right:0px;--ion-safe-area-left:0px}}@media only screen and (min-width: 768px) and (min-height: 768px){:host{--width:600px;--height:600px}}.modal-handle{left:0px;right:0px;top:5px;border-radius:8px;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto;position:absolute;width:36px;height:5px;-webkit-transform:translateZ(0);transform:translateZ(0);border:0;background:var(--ion-color-step-350, var(--ion-background-color-step-350, #c0c0be));cursor:pointer;z-index:11}.modal-handle::before{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:4px;padding-bottom:4px;position:absolute;width:36px;height:5px;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);content:""}:host(.modal-sheet){--height:calc(100% - (var(--ion-safe-area-top) + 10px))}:host(.modal-sheet) .modal-wrapper,:host(.modal-sheet) .modal-shadow{position:absolute;bottom:0}:host(.modal-sheet.modal-no-expand-scroll) ion-footer{position:absolute;bottom:0;width:var(--width)}:host{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){:host{--border-radius:2px;--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}';var vt=pt;var mt=t("ion_modal",function(){function t(t){var a=this;r(this,t);this.didPresent=e(this,"ionModalDidPresent",7);this.willPresent=e(this,"ionModalWillPresent",7);this.willDismiss=e(this,"ionModalWillDismiss",7);this.didDismiss=e(this,"ionModalDidDismiss",7);this.ionBreakpointDidChange=e(this,"ionBreakpointDidChange",7);this.didPresentShorthand=e(this,"didPresent",7);this.willPresentShorthand=e(this,"willPresent",7);this.willDismissShorthand=e(this,"willDismiss",7);this.didDismissShorthand=e(this,"didDismiss",7);this.ionMount=e(this,"ionMount",7);this.lockController=y();this.triggerController=D();this.coreDelegate=l();this.isSheetModal=false;this.inheritedAttributes={};this.inline=false;this.gestureAnimationDismissing=false;this.onHandleClick=function(){var t=a,r=t.sheetTransition,e=t.handleBehavior;if(e!=="cycle"||r!==undefined){return}a.moveToNextBreakpoint()};this.onBackdropTap=function(){var t=a.sheetTransition;if(t!==undefined){return}a.dismiss(undefined,S)};this.onLifecycle=function(t){var r=a.usersElement;var e=bt[t.type];if(r&&e){var i=new CustomEvent(e,{bubbles:false,cancelable:false,detail:t.detail});r.dispatchEvent(i)}};this.presented=false;this.hasController=false;this.overlayIndex=undefined;this.delegate=undefined;this.keyboardClose=true;this.enterAnimation=undefined;this.leaveAnimation=undefined;this.breakpoints=undefined;this.expandToScroll=true;this.initialBreakpoint=undefined;this.backdropBreakpoint=0;this.handle=undefined;this.handleBehavior="none";this.component=undefined;this.componentProps=undefined;this.cssClass=undefined;this.backdropDismiss=true;this.showBackdrop=true;this.animated=true;this.presentingElement=undefined;this.htmlAttributes=undefined;this.isOpen=false;this.trigger=undefined;this.keepContentsMounted=false;this.focusTrap=true;this.canDismiss=true}t.prototype.onIsOpenChange=function(t,r){if(t===true&&r===false){this.present()}else if(t===false&&r===true){this.dismiss()}};t.prototype.triggerChanged=function(){var t=this,r=t.trigger,e=t.el,a=t.triggerController;if(r){a.addClickListener(e,r)}};t.prototype.breakpointsChanged=function(t){if(t!==undefined){this.sortedBreakpoints=t.sort((function(t,r){return t-r}))}};t.prototype.connectedCallback=function(){var t=this.el;E(t);this.triggerChanged()};t.prototype.disconnectedCallback=function(){this.triggerController.removeClickListener()};t.prototype.componentWillLoad=function(){var t=this;var r;var e=this,a=e.breakpoints,i=e.initialBreakpoint,n=e.el,o=e.htmlAttributes;var s=this.isSheetModal=a!==undefined&&i!==undefined;var d=["aria-label","role"];this.inheritedAttributes=x(n,d);if(o!==undefined){d.forEach((function(r){var e;var a=o[r];if(a){t.inheritedAttributes=Object.assign(Object.assign({},t.inheritedAttributes),(e={},e[r]=o[r],e));delete o[r]}}))}if(s){this.currentBreakpoint=this.initialBreakpoint}if(a!==undefined&&i!==undefined&&!a.includes(i)){k("[ion-modal] - Your breakpoints array must include the initialBreakpoint value.")}if(!((r=this.htmlAttributes)===null||r===void 0?void 0:r.id)){O(this.el)}};t.prototype.componentDidLoad=function(){var t=this;if(this.isOpen===true){w((function(){return t.present()}))}this.breakpointsChanged(this.breakpoints);this.triggerChanged()};t.prototype.getDelegate=function(t){if(t===void 0){t=false}if(this.workingDelegate&&!t){return{delegate:this.workingDelegate,inline:this.inline}}var r=this.el.parentNode;var e=this.inline=r!==null&&!this.hasController;var a=this.workingDelegate=e?this.delegate||this.coreDelegate:this.delegate;return{inline:e,delegate:a}};t.prototype.checkCanDismiss=function(t,r){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(a){e=this.canDismiss;if(typeof e==="function"){return[2,e(t,r)]}return[2,e]}))}))};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var t,r,e,i,n,o,s,d,f,u;var h=this;return __generator(this,(function(c){switch(c.label){case 0:return[4,this.lockController.lock()];case 1:t=c.sent();if(this.presented){t();return[2]}r=this,e=r.presentingElement,i=r.el;this.currentBreakpoint=this.initialBreakpoint;n=this.getDelegate(true),o=n.inline,s=n.delegate;this.ionMount.emit();d=this;return[4,p(s,i,this.component,["ion-page"],this.componentProps,o)];case 2:d.usersElement=c.sent();if(!g(i))return[3,4];return[4,I(this.usersElement)];case 3:c.sent();return[3,6];case 4:if(!!this.keepContentsMounted)return[3,6];return[4,z()];case 5:c.sent();c.label=6;case 6:a((function(){return h.el.classList.add("show-modal")}));f=e!==undefined;if(!(f&&R(this)==="ios"))return[3,8];u=this;return[4,Z.getStyle()];case 7:u.statusBarStyle=c.sent();U();c.label=8;case 8:return[4,P(this,"modalEnter",it,dt,{presentingEl:e,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll})];case 9:c.sent();if(typeof window!=="undefined"){this.keyboardOpenCallback=function(){if(h.gesture){h.gesture.enable(false);w((function(){if(h.gesture){h.gesture.enable(true)}}))}};window.addEventListener(W,this.keyboardOpenCallback)}if(this.isSheetModal){this.initSheetGesture()}else if(f){this.initSwipeToClose()}t();return[2]}}))}))};t.prototype.initSwipeToClose=function(){var t=this;var r;if(R(this)!=="ios"){return}var e=this.el;var a=this.leaveAnimation||_.get("modalLeave",ot);var i=this.animation=a(e,{presentingEl:this.presentingElement,expandToScroll:this.expandToScroll});var n=h(e);if(!n){c(e);return}var o=(r=this.statusBarStyle)!==null&&r!==void 0?r:V.Default;this.gesture=$(e,i,o,(function(){t.gestureAnimationDismissing=true;q(t.statusBarStyle);t.animation.onFinish((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:return[4,this.dismiss(undefined,Y)];case 1:t.sent();this.gestureAnimationDismissing=false;return[2]}}))}))}))}));this.gesture.enable(true)};t.prototype.initSheetGesture=function(){var t=this;var r=this,e=r.wrapperEl,a=r.initialBreakpoint,i=r.backdropBreakpoint;if(!e||a===undefined){return}var n=this.enterAnimation||_.get("modalEnter",it);var o=this.animation=n(this.el,{presentingEl:this.presentingElement,currentBreakpoint:a,backdropBreakpoint:i,expandToScroll:this.expandToScroll});o.progressStart(true,1);var s=ht(this.el,this.backdropEl,e,a,i,o,this.sortedBreakpoints,this.expandToScroll,(function(){var r;return(r=t.currentBreakpoint)!==null&&r!==void 0?r:0}),(function(){return t.sheetOnDismiss()}),(function(r){if(t.currentBreakpoint!==r){t.currentBreakpoint=r;t.ionBreakpointDidChange.emit({breakpoint:r})}})),d=s.gesture,f=s.moveSheetToBreakpoint;this.gesture=d;this.moveSheetToBreakpoint=f;this.gesture.enable(true)};t.prototype.sheetOnDismiss=function(){var t=this;this.gestureAnimationDismissing=true;this.animation.onFinish((function(){return __awaiter(t,void 0,void 0,(function(){return __generator(this,(function(t){switch(t.label){case 0:this.currentBreakpoint=0;this.ionBreakpointDidChange.emit({breakpoint:this.currentBreakpoint});return[4,this.dismiss(undefined,Y)];case 1:t.sent();this.gestureAnimationDismissing=false;return[2]}}))}))}))};t.prototype.dismiss=function(t,r){return __awaiter(this,void 0,void 0,(function(){var e,i,n,o,s,d,f;var u=this;return __generator(this,(function(h){switch(h.label){case 0:if(this.gestureAnimationDismissing&&r!==Y){return[2,false]}return[4,this.lockController.lock()];case 1:i=h.sent();n=r!=="handler";if(!n)return[3,3];return[4,this.checkCanDismiss(t,r)];case 2:n=!h.sent();h.label=3;case 3:if(n){i();return[2,false]}o=this.presentingElement;s=o!==undefined;if(s&&R(this)==="ios"){q(this.statusBarStyle)}if(typeof window!=="undefined"&&this.keyboardOpenCallback){window.removeEventListener(W,this.keyboardOpenCallback);this.keyboardOpenCallback=undefined}return[4,T(this,t,r,"modalLeave",ot,ut,{presentingEl:o,currentBreakpoint:(e=this.currentBreakpoint)!==null&&e!==void 0?e:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint,expandToScroll:this.expandToScroll})];case 4:d=h.sent();if(!d)return[3,6];f=this.getDelegate().delegate;return[4,v(f,this.usersElement)];case 5:h.sent();a((function(){return u.el.classList.remove("show-modal")}));if(this.animation){this.animation.destroy()}if(this.gesture){this.gesture.destroy()}h.label=6;case 6:this.currentBreakpoint=undefined;this.animation=undefined;i();return[2,d]}}))}))};t.prototype.onDidDismiss=function(){return C(this.el,"ionModalDidDismiss")};t.prototype.onWillDismiss=function(){return C(this.el,"ionModalWillDismiss")};t.prototype.setCurrentBreakpoint=function(t){return __awaiter(this,void 0,void 0,(function(){var r,e,a,i,n,o;return __generator(this,(function(s){switch(s.label){case 0:if(!this.isSheetModal){k("[ion-modal] - setCurrentBreakpoint is only supported on sheet modals.");return[2]}if(!this.breakpoints.includes(t)){k("[ion-modal] - Attempted to set invalid breakpoint value ".concat(t,". Please double check that the breakpoint value is part of your defined breakpoints."));return[2]}r=this,e=r.currentBreakpoint,a=r.moveSheetToBreakpoint,i=r.canDismiss,n=r.breakpoints,o=r.animated;if(e===t){return[2]}if(!a)return[3,2];this.sheetTransition=a({breakpoint:t,breakpointOffset:1-e,canDismiss:i!==undefined&&i!==true&&n[0]===0,animated:o});return[4,this.sheetTransition];case 1:s.sent();this.sheetTransition=undefined;s.label=2;case 2:return[2]}}))}))};t.prototype.getCurrentBreakpoint=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.currentBreakpoint]}))}))};t.prototype.moveToNextBreakpoint=function(){return __awaiter(this,void 0,void 0,(function(){var t,r,e,a,i,n,o;return __generator(this,(function(s){switch(s.label){case 0:t=this,r=t.breakpoints,e=t.currentBreakpoint;if(!r||e==null){return[2,false]}a=r.filter((function(t){return t!==0}));i=a.indexOf(e);n=(i+1)%a.length;o=a[n];return[4,this.setCurrentBreakpoint(o)];case 1:s.sent();return[2,true]}}))}))};t.prototype.render=function(){var t;var r=this;var e=this,a=e.handle,o=e.isSheetModal,s=e.presentingElement,d=e.htmlAttributes,f=e.handleBehavior,u=e.inheritedAttributes,h=e.focusTrap,c=e.expandToScroll;var l=a!==false&&o;var p=R(this);var v=s!==undefined&&p==="ios";var m=f==="cycle";return i(n,Object.assign({key:"0991b2e4e32da511e59fb1463b47e4ac1b86d1ca","no-router":true,tabindex:"-1"},d,{style:{zIndex:"".concat(2e4+this.overlayIndex)},class:Object.assign((t={},t[p]=true,t["modal-default"]=!v&&!o,t["modal-card"]=v,t["modal-sheet"]=o,t["modal-no-expand-scroll"]=o&&!c,t["overlay-hidden"]=true,t[M]=h===false,t),B(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle}),i("ion-backdrop",{key:"ca9453ffe1021fb252ad9460676cfabb5633f00f",ref:function(t){return r.backdropEl=t},visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),p==="ios"&&i("div",{key:"9f8da446a7b0f3b26aec856e13f6d6d131a7e37b",class:"modal-shadow"}),i("div",Object.assign({key:"9d08bf600571849c97b58f66df40b496a358d1e1",role:"dialog"},u,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:function(t){return r.wrapperEl=t}}),l&&i("button",{key:"f8bf0d1126e5376519101225d9965727121ee042",class:"modal-handle",tabIndex:!m?-1:0,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:m?this.onHandleClick:undefined,part:"handle"}),i("slot",{key:"6d52849df98f2c6c8fbc03996a931ea6a39a512b"})))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}},enumerable:false,configurable:true});return t}());var bt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};mt.style={ios:lt,md:vt}}}}));
|