-
Notifications
You must be signed in to change notification settings - Fork 0
/
20-es2015.js.map
1 lines (1 loc) · 28.2 KB
/
20-es2015.js.map
1
{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-modal.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6H;AACnD;AACvB;AACY;AACV;AACqB;AAChC;AACU;AACR;AACqG;AAC1F;AACuC;;AAE9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB,8DAAK;AACtB;AACA;AACA;AACA;AACA,iBAAiB,8DAAK;AACtB;AACA;AACA;AACA;AACA;AACA,sBAAsB,mEAAuB;AAC7C;AACA;AACA;AACA,sBAAsB,mEAAuB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,kBAAkB,wEAAa;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,SAAS,8DAAK;AACd;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,gEAAe;AAC3C;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,2BAA2B,gEAAe;AAC1C;AACA,mBAAmB,eAAe;AAClC;AACA,wBAAwB,gEAAe;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gEAAe;AAC/C;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,eAAe,UAAU,kBAAkB;AACtF;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,SAAS,+FAA+F;AACxG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,kBAAkB;AAC5E;AACA;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW,wEAAwE;AACnF,WAAW;AACX;AACA,gCAAgC,gEAAe;AAC/C;AACA;AACA,SAAS;AACT;AACA;AACA,WAAW,+DAA+D;AAC1E,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,4BAA4B,gEAAe;AAC3C;AACA;AACA,2BAA2B,gEAAe;AAC1C;AACA,mBAAmB,eAAe;AAClC;AACA,wBAAwB,gEAAe;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,gEAAe;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA,2CAA2C,eAAe,UAAU,kBAAkB;AACtF;AACA;AACA;AACA,SAAS,gGAAgG;AACzG,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,kBAAkB;AAC5E;AACA;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,iEAAiE;AAC5E,WAAW;AACX;AACA,gCAAgC,gEAAe;AAC/C;AACA;AACA;AACA,SAAS;AACT;AACA,WAAW,qDAAqD;AAChE,WAAW;AACX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,gEAAe;AACvC,4BAA4B,gEAAe;AAC3C,2BAA2B,gEAAe;AAC1C;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,KAAK,0DAA0D;AAC/D,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,wBAAwB,gEAAe;AACvC,4BAA4B,gEAAe;AAC3C,2BAA2B,gEAAe;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,yDAAyD;AAC9D,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,yCAAyC,aAAa,iBAAiB,iBAAiB,cAAc,kBAAkB,kBAAkB,kBAAkB,kBAAkB,iBAAiB,oBAAoB,2BAA2B,+CAA+C,kBAAkB,qBAAqB,OAAO,QAAQ,MAAM,SAAS,oBAAoB,aAAa,kBAAkB,sBAAsB,mBAAmB,qBAAqB,uBAAuB,aAAa,eAAe,mCAAmC,aAAa,+DAA+D,mCAAmC,mBAAmB,2BAA2B,2BAA2B,qBAAqB,6BAA6B,6BAA6B,iCAAiC,iCAAiC,iCAAiC,6BAA6B,qCAAqC,6BAA6B,yBAAyB,WAAW,+BAA+B,kBAAkB,uBAAuB,kEAAkE,oBAAoB,cAAc,eAAe,wBAAwB,2BAA2B,0BAA0B,0BAA0B,kEAAkE,oBAAoB,cAAc,gBAAgB,kCAAkC,oDAAoD,kEAAkE,oBAAoB,sBAAsB,gCAAgC,4CAA4C,oCAAoC,qCAAqC,iCAAiC,+BAA+B,kEAAkE,qCAAqC,+BAA+B,4BAA4B,+DAA+D,4BAA4B,6BAA6B,6BAA6B,4BAA4B,sWAAsW,4BAA4B,6BAA6B,6BAA6B,4BAA4B,+BAA+B,qBAAqB,aAAa,mBAAmB,qBAAqB,8DAA8D,aAAa,6DAA6D,qBAAqB,qCAAqC,+BAA+B,2BAA2B,uFAAuF,kBAAkB,oBAAoB,+BAA+B,qBAAqB,wCAAwC,gCAAgC,6CAA6C,wBAAwB,8DAA8D,wDAAwD,iDAAiD;;AAEx7G,uCAAuC,aAAa,iBAAiB,iBAAiB,cAAc,kBAAkB,kBAAkB,kBAAkB,kBAAkB,iBAAiB,oBAAoB,2BAA2B,+CAA+C,kBAAkB,qBAAqB,OAAO,QAAQ,MAAM,SAAS,oBAAoB,aAAa,kBAAkB,sBAAsB,mBAAmB,qBAAqB,uBAAuB,aAAa,eAAe,kCAAkC,aAAa,6DAA6D,mCAAmC,mBAAmB,2BAA2B,2BAA2B,qBAAqB,6BAA6B,6BAA6B,iCAAiC,iCAAiC,iCAAiC,6BAA6B,qCAAqC,6BAA6B,yBAAyB,WAAW,8BAA8B,kBAAkB,uBAAuB,kEAAkE,mBAAmB,cAAc,eAAe,wBAAwB,2BAA2B,0BAA0B,0BAA0B,kEAAkE,mBAAmB,cAAc,gBAAgB,iCAAiC,qDAAqD,kEAAkE,mBAAmB,oBAAoB,iCAAiC,6CAA6C,+BAA+B,4CAA4C,oCAAoC,aAAa;;AAE7yD;AACA;AACA,IAAI,4DAAgB;AACpB,sBAAsB,4DAAW;AACjC,uBAAuB,4DAAW;AAClC,uBAAuB,4DAAW;AAClC,sBAAsB,4DAAW;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uDAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI,+DAAc;AAClB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,yBAAyB,iBAAiB;AACnG,8BAA8B,0EAAe;AAC7C,UAAU,4DAAS;AACnB,IAAI,4DAAS;AACb,UAAU,+DAAO;AACjB;AACA;AACA;AACA;AACA;AACA,QAAQ,mEAAU;AAClB;AACA;AACA;AACA;AACA;AACA,oDAAoD,2DAAM;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,uDAAgB;AAC9C,4BAA4B,+DAAO;AACnC;AACA,YAAY,0EAAe;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,+DAAW;AACtB;AACA;AACA;AACA;AACA;AACA,WAAW,+DAAW;AACtB;AACA;AACA,iBAAiB,mEAAU;AAC3B,YAAY,4DAAC,CAAC,oDAAI,GAAG,gFAAgF,uFAAuF,EAAE,6DAAW;AACzM,mBAAmB,0BAA0B;AAC7C,OAAO,wOAAwO,EAAE,4DAAC,kBAAkB,6DAA6D,qBAAqB,4DAAC,SAAS,wBAAwB,GAAG,4DAAC,SAAS,gBAAgB,GAAG,4DAAC,SAAS,6DAA6D,GAAG,4DAAC,SAAS,gBAAgB;AAC5f;AACA,YAAY,QAAQ,4DAAU,OAAO;AACrC,yBAAyB;AACzB;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAE8B","file":"20-es2015.js","sourcesContent":["import { r as registerInstance, e as createEvent, c as writeTask, h, H as Host, i as getElement } from './index-e806d1f6.js';\nimport { b as getIonMode, c as config } from './ionic-global-9d5c8ee3.js';\nimport { h as clamp } from './helpers-90f46169.js';\nimport { c as createAnimation } from './animation-54fe0237.js';\nimport { e as deepReady } from './index-1eeeab2e.js';\nimport { g as getTimeGivenProgression } from './cubic-bezier-eea9a7a9.js';\nimport './gesture-controller-31cb6bb9.js';\nimport { createGesture } from './index-f49d994d.js';\nimport './hardware-back-button-4a6b37fb.js';\nimport { B as BACKDROP, e as prepareOverlay, d as present, h as activeAnimations, f as dismiss, g as eventMethod } from './overlays-12c20431.js';\nimport { g as getClassMap } from './theme-ff3fc52f.js';\nimport { a as attachComponent, d as detachComponent } from './framework-delegate-4584ab5a.js';\n\n// Defaults for the card swipe animation\nconst SwipeToCloseDefaults = {\n MIN_PRESENTING_SCALE: 0.93,\n};\nconst createSwipeToCloseGesture = (el, animation, onDismiss) => {\n const height = el.offsetHeight;\n let isOpen = false;\n const canStart = (detail) => {\n const target = detail.event.target;\n if (target === null ||\n !target.closest) {\n return true;\n }\n const content = target.closest('ion-content');\n if (content === null) {\n return true;\n }\n // Target is in the content so we don't start the gesture.\n // We could be more nuanced here and allow it for content that\n // does not need to scroll.\n return false;\n };\n const onStart = () => {\n animation.progressStart(true, (isOpen) ? 1 : 0);\n };\n const onMove = (detail) => {\n const step = clamp(0.0001, detail.deltaY / height, 0.9999);\n animation.progressStep(step);\n };\n const onEnd = (detail) => {\n const velocity = detail.velocityY;\n const step = clamp(0.0001, detail.deltaY / height, 0.9999);\n const threshold = (detail.deltaY + velocity * 1000) / height;\n const shouldComplete = threshold >= 0.5;\n let newStepValue = (shouldComplete) ? -0.001 : 0.001;\n if (!shouldComplete) {\n animation.easing('cubic-bezier(1, 0, 0.68, 0.28)');\n newStepValue += getTimeGivenProgression([0, 0], [1, 0], [0.68, 0.28], [1, 1], step)[0];\n }\n else {\n animation.easing('cubic-bezier(0.32, 0.72, 0, 1)');\n newStepValue += getTimeGivenProgression([0, 0], [0.32, 0.72], [0, 1], [1, 1], step)[0];\n }\n const duration = (shouldComplete) ? computeDuration(step * height, velocity) : computeDuration((1 - step) * height, velocity);\n isOpen = shouldComplete;\n gesture.enable(false);\n animation\n .onFinish(() => {\n if (!shouldComplete) {\n gesture.enable(true);\n }\n })\n .progressEnd((shouldComplete) ? 1 : 0, newStepValue, duration);\n if (shouldComplete) {\n onDismiss();\n }\n };\n const gesture = createGesture({\n el,\n gestureName: 'modalSwipeToClose',\n gesturePriority: 40,\n direction: 'y',\n threshold: 10,\n canStart,\n onStart,\n onMove,\n onEnd\n });\n return gesture;\n};\nconst computeDuration = (remaining, velocity) => {\n return clamp(400, remaining / Math.abs(velocity * 1.1), 500);\n};\n\n/**\n * iOS Modal Enter Animation for the Card presentation style\n */\nconst iosEnterAnimation = (baseEl, presentingEl) => {\n const backdropAnimation = createAnimation()\n .addElement(baseEl.querySelector('ion-backdrop'))\n .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')\n .beforeStyles({\n 'pointer-events': 'none'\n })\n .afterClearStyles(['pointer-events']);\n const wrapperAnimation = createAnimation()\n .addElement(baseEl.querySelectorAll('.modal-wrapper, .modal-shadow'))\n .beforeStyles({ 'opacity': 1 })\n .fromTo('transform', 'translateY(100vh)', 'translateY(0vh)');\n const baseAnimation = createAnimation()\n .addElement(baseEl)\n .easing('cubic-bezier(0.32,0.72,0,1)')\n .duration(500)\n .addAnimation(wrapperAnimation);\n if (presentingEl) {\n const isMobile = window.innerWidth < 768;\n const hasCardModal = (presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined);\n const presentingAnimation = createAnimation()\n .beforeStyles({\n 'transform': 'translateY(0)',\n 'transform-origin': 'top center',\n 'overflow': 'hidden'\n });\n const bodyEl = document.body;\n if (isMobile) {\n /**\n * Fallback for browsers that does not support `max()` (ex: Firefox)\n * No need to worry about statusbar padding since engines like Gecko\n * are not used as the engine for standlone Cordova/Capacitor apps\n */\n const transformOffset = (!CSS.supports('width', 'max(0px, 1px)')) ? '30px' : 'max(30px, var(--ion-safe-area-top))';\n const modalTransform = hasCardModal ? '-10px' : transformOffset;\n const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;\n const finalTransform = `translateY(${modalTransform}) scale(${toPresentingScale})`;\n presentingAnimation\n .afterStyles({\n 'transform': finalTransform\n })\n .beforeAddWrite(() => bodyEl.style.setProperty('background-color', 'black'))\n .addElement(presentingEl)\n .keyframes([\n { offset: 0, filter: 'contrast(1)', transform: 'translateY(0px) scale(1)', borderRadius: '0px' },\n { offset: 1, filter: 'contrast(0.85)', transform: finalTransform, borderRadius: '10px 10px 0 0' }\n ]);\n baseAnimation.addAnimation(presentingAnimation);\n }\n else {\n baseAnimation.addAnimation(backdropAnimation);\n if (!hasCardModal) {\n wrapperAnimation.fromTo('opacity', '0', '1');\n }\n else {\n const toPresentingScale = (hasCardModal) ? SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1;\n const finalTransform = `translateY(-10px) scale(${toPresentingScale})`;\n presentingAnimation\n .afterStyles({\n 'transform': finalTransform\n })\n .addElement(presentingEl.querySelector('.modal-wrapper'))\n .keyframes([\n { offset: 0, filter: 'contrast(1)', transform: 'translateY(0) scale(1)' },\n { offset: 1, filter: 'contrast(0.85)', transform: finalTransform }\n ]);\n const shadowAnimation = createAnimation()\n .afterStyles({\n 'transform': finalTransform\n })\n .addElement(presentingEl.querySelector('.modal-shadow'))\n .keyframes([\n { offset: 0, opacity: '1', transform: 'translateY(0) scale(1)' },\n { offset: 1, opacity: '0', transform: finalTransform }\n ]);\n baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);\n }\n }\n }\n else {\n baseAnimation.addAnimation(backdropAnimation);\n }\n return baseAnimation;\n};\n\n/**\n * iOS Modal Leave Animation\n */\nconst iosLeaveAnimation = (baseEl, presentingEl, duration = 500) => {\n const backdropAnimation = createAnimation()\n .addElement(baseEl.querySelector('ion-backdrop'))\n .fromTo('opacity', 'var(--backdrop-opacity)', 0.0);\n const wrapperAnimation = createAnimation()\n .addElement(baseEl.querySelectorAll('.modal-wrapper, .modal-shadow'))\n .beforeStyles({ 'opacity': 1 })\n .fromTo('transform', 'translateY(0vh)', 'translateY(100vh)');\n const baseAnimation = createAnimation()\n .addElement(baseEl)\n .easing('cubic-bezier(0.32,0.72,0,1)')\n .duration(duration)\n .addAnimation(wrapperAnimation);\n if (presentingEl) {\n const isMobile = window.innerWidth < 768;\n const hasCardModal = (presentingEl.tagName === 'ION-MODAL' && presentingEl.presentingElement !== undefined);\n const presentingAnimation = createAnimation()\n .beforeClearStyles(['transform'])\n .afterClearStyles(['transform'])\n .onFinish(currentStep => {\n // only reset background color if this is the last card-style modal\n if (currentStep !== 1) {\n return;\n }\n presentingEl.style.setProperty('overflow', '');\n const numModals = Array.from(bodyEl.querySelectorAll('ion-modal')).filter(m => m.presentingElement !== undefined).length;\n if (numModals <= 1) {\n bodyEl.style.setProperty('background-color', '');\n }\n });\n const bodyEl = document.body;\n if (isMobile) {\n const transformOffset = (!CSS.supports('width', 'max(0px, 1px)')) ? '30px' : 'max(30px, var(--ion-safe-area-top))';\n const modalTransform = hasCardModal ? '-10px' : transformOffset;\n const toPresentingScale = SwipeToCloseDefaults.MIN_PRESENTING_SCALE;\n const finalTransform = `translateY(${modalTransform}) scale(${toPresentingScale})`;\n presentingAnimation\n .addElement(presentingEl)\n .keyframes([\n { offset: 0, filter: 'contrast(0.85)', transform: finalTransform, borderRadius: '10px 10px 0 0' },\n { offset: 1, filter: 'contrast(1)', transform: 'translateY(0px) scale(1)', borderRadius: '0px' }\n ]);\n baseAnimation.addAnimation(presentingAnimation);\n }\n else {\n baseAnimation.addAnimation(backdropAnimation);\n if (!hasCardModal) {\n wrapperAnimation.fromTo('opacity', '1', '0');\n }\n else {\n const toPresentingScale = (hasCardModal) ? SwipeToCloseDefaults.MIN_PRESENTING_SCALE : 1;\n const finalTransform = `translateY(-10px) scale(${toPresentingScale})`;\n presentingAnimation\n .addElement(presentingEl.querySelector('.modal-wrapper'))\n .afterStyles({\n 'transform': 'translate3d(0, 0, 0)'\n })\n .keyframes([\n { offset: 0, filter: 'contrast(0.85)', transform: finalTransform },\n { offset: 1, filter: 'contrast(1)', transform: 'translateY(0) scale(1)' }\n ]);\n const shadowAnimation = createAnimation()\n .addElement(presentingEl.querySelector('.modal-shadow'))\n .afterStyles({\n 'transform': 'translateY(0) scale(1)'\n })\n .keyframes([\n { offset: 0, opacity: '0', transform: finalTransform },\n { offset: 1, opacity: '1', transform: 'translateY(0) scale(1)' }\n ]);\n baseAnimation.addAnimation([presentingAnimation, shadowAnimation]);\n }\n }\n }\n else {\n baseAnimation.addAnimation(backdropAnimation);\n }\n return baseAnimation;\n};\n\n/**\n * Md Modal Enter Animation\n */\nconst mdEnterAnimation = (baseEl) => {\n const baseAnimation = createAnimation();\n const backdropAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n backdropAnimation\n .addElement(baseEl.querySelector('ion-backdrop'))\n .fromTo('opacity', 0.01, 'var(--backdrop-opacity)')\n .beforeStyles({\n 'pointer-events': 'none'\n })\n .afterClearStyles(['pointer-events']);\n wrapperAnimation\n .addElement(baseEl.querySelector('.modal-wrapper'))\n .keyframes([\n { offset: 0, opacity: 0.01, transform: 'translateY(40px)' },\n { offset: 1, opacity: 1, transform: 'translateY(0px)' }\n ]);\n return baseAnimation\n .addElement(baseEl)\n .easing('cubic-bezier(0.36,0.66,0.04,1)')\n .duration(280)\n .addAnimation([backdropAnimation, wrapperAnimation]);\n};\n\n/**\n * Md Modal Leave Animation\n */\nconst mdLeaveAnimation = (baseEl) => {\n const baseAnimation = createAnimation();\n const backdropAnimation = createAnimation();\n const wrapperAnimation = createAnimation();\n const wrapperEl = baseEl.querySelector('.modal-wrapper');\n backdropAnimation\n .addElement(baseEl.querySelector('ion-backdrop'))\n .fromTo('opacity', 'var(--backdrop-opacity)', 0.0);\n wrapperAnimation\n .addElement(wrapperEl)\n .keyframes([\n { offset: 0, opacity: 0.99, transform: 'translateY(0px)' },\n { offset: 1, opacity: 0, transform: 'translateY(40px)' }\n ]);\n return baseAnimation\n .addElement(baseEl)\n .easing('cubic-bezier(0.47,0,0.745,0.715)')\n .duration(200)\n .addAnimation([backdropAnimation, wrapperAnimation]);\n};\n\nconst modalIosCss = \".sc-ion-modal-ios-h{--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;contain:strict}.overlay-hidden.sc-ion-modal-ios-h{display:none}.modal-wrapper.sc-ion-modal-ios,.modal-shadow.sc-ion-modal-ios{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.sc-ion-modal-ios{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){.sc-ion-modal-ios-h{--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){.sc-ion-modal-ios-h{--width:600px;--height:600px}}.sc-ion-modal-ios-h:first-of-type{--backdrop-opacity:var(--ion-backdrop-opacity, 0.4)}@media only screen and (min-width: 768px) and (min-height: 600px){.sc-ion-modal-ios-h{--border-radius:10px}}.modal-wrapper.sc-ion-modal-ios{-webkit-transform:translate3d(0, 100%, 0);transform:translate3d(0, 100%, 0)}@media screen and (max-width: 767px){@supports (width: max(0px, 1px)){.modal-card.sc-ion-modal-ios-h{--height:calc(100% - max(30px, var(--ion-safe-area-top)) - 10px)}}@supports not (width: max(0px, 1px)){.modal-card.sc-ion-modal-ios-h{--height:calc(100% - 40px)}}.modal-card.sc-ion-modal-ios-h .modal-wrapper.sc-ion-modal-ios{border-top-left-radius:10px;border-top-right-radius:10px;border-bottom-right-radius:0;border-bottom-left-radius:0}[dir=rtl].sc-ion-modal-ios-h -no-combinator.modal-card.sc-ion-modal-ios-h .modal-wrapper.sc-ion-modal-ios,[dir=rtl] .sc-ion-modal-ios-h -no-combinator.modal-card.sc-ion-modal-ios-h .modal-wrapper.sc-ion-modal-ios,[dir=rtl].modal-card.sc-ion-modal-ios-h .modal-wrapper.sc-ion-modal-ios,[dir=rtl] .modal-card.sc-ion-modal-ios-h .modal-wrapper.sc-ion-modal-ios{border-top-left-radius:10px;border-top-right-radius:10px;border-bottom-right-radius:0;border-bottom-left-radius:0}.modal-card.sc-ion-modal-ios-h{--backdrop-opacity:0;--width:100%;-ms-flex-align:end;align-items:flex-end}.modal-card.sc-ion-modal-ios-h .modal-shadow.sc-ion-modal-ios{display:none}.modal-card.sc-ion-modal-ios-h ion-backdrop.sc-ion-modal-ios{pointer-events:none}}@media screen and (min-width: 768px){.modal-card.sc-ion-modal-ios-h{--width:calc(100% - 120px);--height:calc(100% - (120px + var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));--max-width:720px;--max-height:1000px}.modal-card.sc-ion-modal-ios-h{--backdrop-opacity:0;-webkit-transition:all 0.5s ease-in-out;transition:all 0.5s ease-in-out}.modal-card.sc-ion-modal-ios-h:first-of-type{--backdrop-opacity:0.18}.modal-card.sc-ion-modal-ios-h .modal-shadow.sc-ion-modal-ios{-webkit-box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1);box-shadow:0px 0px 30px 10px rgba(0, 0, 0, 0.1)}}\";\n\nconst modalMdCss = \".sc-ion-modal-md-h{--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;contain:strict}.overlay-hidden.sc-ion-modal-md-h{display:none}.modal-wrapper.sc-ion-modal-md,.modal-shadow.sc-ion-modal-md{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.sc-ion-modal-md{position:absolute;background:transparent}@media only screen and (min-width: 768px) and (min-height: 600px){.sc-ion-modal-md-h{--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){.sc-ion-modal-md-h{--width:600px;--height:600px}}.sc-ion-modal-md-h:first-of-type{--backdrop-opacity:var(--ion-backdrop-opacity, 0.32)}@media only screen and (min-width: 768px) and (min-height: 600px){.sc-ion-modal-md-h{--border-radius:2px}.sc-ion-modal-md-h:first-of-type{--box-shadow:0 28px 48px rgba(0, 0, 0, 0.4)}}.modal-wrapper.sc-ion-modal-md{-webkit-transform:translate3d(0, 40px, 0);transform:translate3d(0, 40px, 0);opacity:0.01}\";\n\nconst Modal = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.didPresent = createEvent(this, \"ionModalDidPresent\", 7);\n this.willPresent = createEvent(this, \"ionModalWillPresent\", 7);\n this.willDismiss = createEvent(this, \"ionModalWillDismiss\", 7);\n this.didDismiss = createEvent(this, \"ionModalDidDismiss\", 7);\n // Whether or not modal is being dismissed via gesture\n this.gestureAnimationDismissing = false;\n this.presented = false;\n /**\n * If `true`, the keyboard will be automatically dismissed when the overlay is presented.\n */\n this.keyboardClose = true;\n /**\n * If `true`, the modal will be dismissed when the backdrop is clicked.\n */\n this.backdropDismiss = true;\n /**\n * If `true`, a backdrop will be displayed behind the modal.\n */\n this.showBackdrop = true;\n /**\n * If `true`, the modal will animate.\n */\n this.animated = true;\n /**\n * If `true`, the modal can be swiped to dismiss. Only applies in iOS mode.\n */\n this.swipeToClose = false;\n this.onBackdropTap = () => {\n this.dismiss(undefined, BACKDROP);\n };\n this.onDismiss = (ev) => {\n ev.stopPropagation();\n ev.preventDefault();\n this.dismiss();\n };\n this.onLifecycle = (modalEvent) => {\n const el = this.usersElement;\n const name = LIFECYCLE_MAP[modalEvent.type];\n if (el && name) {\n const ev = new CustomEvent(name, {\n bubbles: false,\n cancelable: false,\n detail: modalEvent.detail\n });\n el.dispatchEvent(ev);\n }\n };\n }\n swipeToCloseChanged(enable) {\n if (this.gesture) {\n this.gesture.enable(enable);\n }\n else if (enable) {\n this.initSwipeToClose();\n }\n }\n connectedCallback() {\n prepareOverlay(this.el);\n }\n /**\n * Present the modal overlay after it has been created.\n */\n async present() {\n if (this.presented) {\n return;\n }\n const container = this.el.querySelector(`.modal-wrapper`);\n if (!container) {\n throw new Error('container is undefined');\n }\n const componentProps = Object.assign(Object.assign({}, this.componentProps), { modal: this.el });\n this.usersElement = await attachComponent(this.delegate, container, this.component, ['ion-page'], componentProps);\n await deepReady(this.usersElement);\n writeTask(() => this.el.classList.add('show-modal'));\n await present(this, 'modalEnter', iosEnterAnimation, mdEnterAnimation, this.presentingElement);\n if (this.swipeToClose) {\n this.initSwipeToClose();\n }\n }\n initSwipeToClose() {\n if (getIonMode(this) !== 'ios') {\n return;\n }\n // All of the elements needed for the swipe gesture\n // should be in the DOM and referenced by now, except\n // for the presenting el\n const animationBuilder = this.leaveAnimation || config.get('modalLeave', iosLeaveAnimation);\n const ani = this.animation = animationBuilder(this.el, this.presentingElement);\n this.gesture = createSwipeToCloseGesture(this.el, ani, () => {\n /**\n * While the gesture animation is finishing\n * it is possible for a user to tap the backdrop.\n * This would result in the dismiss animation\n * being played again. Typically this is avoided\n * by setting `presented = false` on the overlay\n * component; however, we cannot do that here as\n * that would prevent the element from being\n * removed from the DOM.\n */\n this.gestureAnimationDismissing = true;\n this.animation.onFinish(async () => {\n await this.dismiss(undefined, 'gesture');\n this.gestureAnimationDismissing = false;\n });\n });\n this.gesture.enable(true);\n }\n /**\n * Dismiss the modal overlay after it has been presented.\n *\n * @param data Any data to emit in the dismiss events.\n * @param role The role of the element that is dismissing the modal. For example, 'cancel' or 'backdrop'.\n */\n async dismiss(data, role) {\n if (this.gestureAnimationDismissing && role !== 'gesture') {\n return false;\n }\n const enteringAnimation = activeAnimations.get(this) || [];\n const dismissed = await dismiss(this, data, role, 'modalLeave', iosLeaveAnimation, mdLeaveAnimation, this.presentingElement);\n if (dismissed) {\n await detachComponent(this.delegate, this.usersElement);\n if (this.animation) {\n this.animation.destroy();\n }\n enteringAnimation.forEach(ani => ani.destroy());\n }\n this.animation = undefined;\n return dismissed;\n }\n /**\n * Returns a promise that resolves when the modal did dismiss.\n */\n onDidDismiss() {\n return eventMethod(this.el, 'ionModalDidDismiss');\n }\n /**\n * Returns a promise that resolves when the modal will dismiss.\n */\n onWillDismiss() {\n return eventMethod(this.el, 'ionModalWillDismiss');\n }\n render() {\n const mode = getIonMode(this);\n return (h(Host, { \"no-router\": true, \"aria-modal\": \"true\", tabindex: \"-1\", class: Object.assign({ [mode]: true, [`modal-card`]: this.presentingElement !== undefined && mode === 'ios' }, getClassMap(this.cssClass)), style: {\n zIndex: `${20000 + this.overlayIndex}`,\n }, onIonBackdropTap: this.onBackdropTap, onIonDismiss: this.onDismiss, onIonModalDidPresent: this.onLifecycle, onIonModalWillPresent: this.onLifecycle, onIonModalWillDismiss: this.onLifecycle, onIonModalDidDismiss: this.onLifecycle }, h(\"ion-backdrop\", { visible: this.showBackdrop, tappable: this.backdropDismiss }), mode === 'ios' && h(\"div\", { class: \"modal-shadow\" }), h(\"div\", { tabindex: \"0\" }), h(\"div\", { role: \"dialog\", class: \"modal-wrapper ion-overlay-wrapper\" }), h(\"div\", { tabindex: \"0\" })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"swipeToClose\": [\"swipeToCloseChanged\"]\n }; }\n};\nconst LIFECYCLE_MAP = {\n 'ionModalDidPresent': 'ionViewDidEnter',\n 'ionModalWillPresent': 'ionViewWillEnter',\n 'ionModalWillDismiss': 'ionViewWillLeave',\n 'ionModalDidDismiss': 'ionViewDidLeave',\n};\nModal.style = {\n ios: modalIosCss,\n md: modalMdCss\n};\n\nexport { Modal as ion_modal };\n"],"sourceRoot":"webpack:///"}