@ionic/core 7.4.4-dev.11696860023.1b8ee3ef → 7.4.4-dev.11696893919.1af6b3c1
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/animation.js +60 -1
- package/components/checkbox.js +3 -0
- package/components/ion-footer.js +11 -21
- package/components/ion-menu.js +51 -19
- package/components/ion-tab-bar.js +11 -21
- package/components/ion-toggle.js +3 -0
- package/components/radio-group.js +1 -1
- package/components/radio.js +4 -1
- package/components/swipe-back.js +5 -1
- package/dist/cjs/{animation-2bb33618.js → animation-c8bdd3c7.js} +60 -1
- package/dist/cjs/{index-97a3eade.js → index-1f1ea05f.js} +1 -1
- package/dist/cjs/{index-acf6bdf0.js → index-fa649bd8.js} +2 -2
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/ion-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/ion-alert.cjs.entry.js +1 -1
- package/dist/cjs/ion-app_8.cjs.entry.js +14 -23
- package/dist/cjs/ion-checkbox.cjs.entry.js +3 -0
- package/dist/cjs/ion-datetime_3.cjs.entry.js +1 -1
- package/dist/cjs/ion-loading.cjs.entry.js +1 -1
- package/dist/cjs/ion-menu_3.cjs.entry.js +53 -21
- package/dist/cjs/ion-modal.cjs.entry.js +2 -2
- package/dist/cjs/ion-nav_2.cjs.entry.js +2 -2
- package/dist/cjs/ion-popover.cjs.entry.js +2 -2
- package/dist/cjs/ion-radio_2.cjs.entry.js +5 -2
- package/dist/cjs/ion-refresher_2.cjs.entry.js +1 -1
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +12 -21
- package/dist/cjs/ion-toast.cjs.entry.js +1 -1
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -0
- package/dist/cjs/{ios.transition-e31445c2.js → ios.transition-4195d10d.js} +2 -2
- package/dist/cjs/{md.transition-fb13ac79.js → md.transition-0713f667.js} +2 -2
- package/dist/cjs/{swipe-back-6c57d1df.js → swipe-back-d0412fb6.js} +5 -1
- package/dist/collection/components/checkbox/checkbox.js +3 -0
- package/dist/collection/components/footer/footer.js +11 -21
- package/dist/collection/components/menu/menu.js +51 -19
- package/dist/collection/components/menu/test/disable/menu.e2e.js +55 -0
- package/dist/collection/components/radio/radio.js +4 -1
- package/dist/collection/components/radio-group/radio-group.js +1 -1
- package/dist/collection/components/tab-bar/tab-bar.js +11 -21
- package/dist/collection/components/toggle/toggle.js +3 -0
- package/dist/collection/utils/animation/animation.js +60 -1
- package/dist/collection/utils/gesture/swipe-back.js +5 -1
- package/dist/collection/utils/keyboard/keyboard-controller.js +1 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{animation-a1d9e088.js → animation-92066c62.js} +60 -1
- package/dist/esm/{index-32c6828b.js → index-0b0dd67c.js} +2 -2
- package/dist/esm/{index-3d6aefa2.js → index-97a2bb98.js} +1 -1
- package/dist/esm/index.js +5 -5
- package/dist/esm/ion-action-sheet.entry.js +1 -1
- package/dist/esm/ion-alert.entry.js +1 -1
- package/dist/esm/ion-app_8.entry.js +14 -23
- package/dist/esm/ion-checkbox.entry.js +3 -0
- package/dist/esm/ion-datetime_3.entry.js +1 -1
- package/dist/esm/ion-loading.entry.js +1 -1
- package/dist/esm/ion-menu_3.entry.js +53 -21
- package/dist/esm/ion-modal.entry.js +2 -2
- package/dist/esm/ion-nav_2.entry.js +2 -2
- package/dist/esm/ion-popover.entry.js +2 -2
- package/dist/esm/ion-radio_2.entry.js +5 -2
- package/dist/esm/ion-refresher_2.entry.js +1 -1
- package/dist/esm/ion-tab-bar_2.entry.js +12 -21
- package/dist/esm/ion-toast.entry.js +1 -1
- package/dist/esm/ion-toggle.entry.js +3 -0
- package/dist/esm/{ios.transition-d8223b18.js → ios.transition-875ba2ea.js} +2 -2
- package/dist/esm/{md.transition-caed184e.js → md.transition-54c79f72.js} +2 -2
- package/dist/esm/{swipe-back-6d4c0a4e.js → swipe-back-0f3bfc8e.js} +5 -1
- package/dist/esm-es5/animation-92066c62.js +4 -0
- package/dist/esm-es5/{index-32c6828b.js → index-0b0dd67c.js} +1 -1
- package/dist/esm-es5/{index-3d6aefa2.js → index-97a2bb98.js} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/ion-action-sheet.entry.js +1 -1
- package/dist/esm-es5/ion-alert.entry.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-datetime_3.entry.js +1 -1
- package/dist/esm-es5/ion-loading.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-modal.entry.js +1 -1
- package/dist/esm-es5/ion-nav_2.entry.js +1 -1
- package/dist/esm-es5/ion-popover.entry.js +1 -1
- package/dist/esm-es5/ion-radio_2.entry.js +1 -1
- package/dist/esm-es5/ion-refresher_2.entry.js +1 -1
- package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ion-toast.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/esm-es5/{ios.transition-d8223b18.js → ios.transition-875ba2ea.js} +1 -1
- package/dist/esm-es5/{md.transition-caed184e.js → md.transition-54c79f72.js} +1 -1
- package/dist/esm-es5/{swipe-back-6d4c0a4e.js → swipe-back-0f3bfc8e.js} +1 -1
- package/dist/ionic/index.esm.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-00d3814a.system.entry.js +4 -0
- package/dist/ionic/p-015187e5.system.js +4 -0
- package/dist/ionic/{p-96ad49f1.entry.js → p-07c816fb.entry.js} +1 -1
- package/dist/ionic/{p-1d2d1ab5.system.entry.js → p-0c7d0167.system.entry.js} +1 -1
- package/dist/ionic/{p-95e44641.system.entry.js → p-0dcdf480.system.entry.js} +1 -1
- package/dist/ionic/{p-8957b1de.system.entry.js → p-0fc8a522.system.entry.js} +1 -1
- package/dist/ionic/{p-57c5eca2.system.js → p-15041a8c.system.js} +1 -1
- package/dist/ionic/{p-30b04d8d.js → p-2062958e.js} +1 -1
- package/dist/ionic/{p-4b23f472.entry.js → p-2134558d.entry.js} +1 -1
- package/dist/ionic/{p-037e2738.system.entry.js → p-2330af92.system.entry.js} +1 -1
- package/dist/ionic/{p-e88ed929.system.entry.js → p-24952f8a.system.entry.js} +1 -1
- package/dist/ionic/{p-1caf1ec6.entry.js → p-32eaa293.entry.js} +1 -1
- package/dist/ionic/{p-fb18f74b.system.entry.js → p-3d278648.system.entry.js} +1 -1
- package/dist/ionic/p-446230d7.js +4 -0
- package/dist/ionic/p-4c274938.entry.js +4 -0
- package/dist/ionic/{p-58565369.system.entry.js → p-52e5f8f0.system.entry.js} +1 -1
- package/dist/ionic/p-53d4606a.entry.js +4 -0
- package/dist/ionic/{p-d580cbb7.system.entry.js → p-63b4ef44.system.entry.js} +1 -1
- package/dist/ionic/{p-7cad90ed.entry.js → p-678f37d7.entry.js} +1 -1
- package/dist/ionic/{p-c381a9a9.system.entry.js → p-7061fa75.system.entry.js} +1 -1
- package/dist/ionic/p-73eba881.system.js +1 -1
- package/dist/ionic/p-775f3749.entry.js +4 -0
- package/dist/ionic/p-77872abc.entry.js +4 -0
- package/dist/ionic/p-77b9d68a.system.entry.js +4 -0
- package/dist/ionic/p-7b15d413.entry.js +4 -0
- package/dist/ionic/p-8b33cfef.entry.js +4 -0
- package/dist/ionic/{p-c57cde35.system.js → p-8dbdb163.system.js} +1 -1
- package/dist/ionic/p-8f36cde3.system.entry.js +4 -0
- package/dist/ionic/{p-9e727d1d.entry.js → p-979dc719.entry.js} +1 -1
- package/dist/ionic/{p-9d0916cb.system.js → p-9e6bf328.system.js} +1 -1
- package/dist/ionic/{p-e7d69cad.entry.js → p-a1528344.entry.js} +1 -1
- package/dist/ionic/p-a1e2f98c.js +4 -0
- package/dist/ionic/{p-c2d6b2fb.entry.js → p-ab37db48.entry.js} +1 -1
- package/dist/ionic/p-af39c1c5.js +4 -0
- package/dist/ionic/{p-a760fd9a.system.js → p-b7258ddb.system.js} +1 -1
- package/dist/ionic/p-c5395981.js +4 -0
- package/dist/ionic/{p-043e8328.system.js → p-c9524896.system.js} +1 -1
- package/dist/ionic/{p-6db9035a.system.entry.js → p-cd075e75.system.entry.js} +1 -1
- package/dist/ionic/{p-a0e2f6d8.entry.js → p-d055bba9.entry.js} +1 -1
- package/dist/ionic/p-d17638e9.system.js +4 -0
- package/dist/ionic/{p-6b3784a2.system.entry.js → p-df951755.system.entry.js} +1 -1
- package/dist/ionic/p-e627ed84.js +4 -0
- package/dist/ionic/{p-ab7edc16.system.entry.js → p-e92068d4.system.entry.js} +1 -1
- package/dist/ionic/{p-e3272ed8.entry.js → p-eaa58d23.entry.js} +1 -1
- package/dist/types/components/menu/menu.d.ts +8 -1
- package/hydrate/index.js +149 -63
- package/package.json +1 -1
- package/dist/esm-es5/animation-a1d9e088.js +0 -4
- package/dist/ionic/p-0cbec498.system.entry.js +0 -4
- package/dist/ionic/p-1c59608c.system.entry.js +0 -4
- package/dist/ionic/p-469d6a98.entry.js +0 -4
- package/dist/ionic/p-4af11953.entry.js +0 -4
- package/dist/ionic/p-606fddbe.system.entry.js +0 -4
- package/dist/ionic/p-6641d7fa.js +0 -4
- package/dist/ionic/p-686a9d53.entry.js +0 -4
- package/dist/ionic/p-68b405cc.entry.js +0 -4
- package/dist/ionic/p-6b2641f6.system.js +0 -4
- package/dist/ionic/p-90ebbca0.entry.js +0 -4
- package/dist/ionic/p-94a4ce40.js +0 -4
- package/dist/ionic/p-9649c54e.js +0 -4
- package/dist/ionic/p-a0b19468.entry.js +0 -4
- package/dist/ionic/p-a732cfec.system.js +0 -4
- package/dist/ionic/p-b370d1b4.js +0 -4
- package/dist/ionic/p-df7357c5.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,d as o,w as i,h as a,H as r,f as e}from"./p-903c36fe.js";import{f as s,i as n,d,r as p,a as h,p as l}from"./p-b24aa895.js";import{C as c,a as m,d as b}from"./p-b287ab05.js";import{g as f,l as u,r as w,k as v,m as x}from"./p-63eb0acd.js";import{c as g}from"./p-53b2a46f.js";import{p as k}from"./p-1b8e1d03.js";import{g as y}from"./p-cc196b34.js";import{G as A,e as D,B,j as Y,k as j,f as M,n as E,g as C,h as S}from"./p-68a3da51.js";import{g as O}from"./p-1d072d3d.js";import{e as P,w as $}from"./p-9649c54e.js";import{b as T,c as z}from"./p-7a590a28.js";import{KEYBOARD_DID_OPEN as I}from"./p-8cf94fc1.js";import{c as W}from"./p-94a4ce40.js";import{g as L}from"./p-7c2bac85.js";import{createGesture as R}from"./p-8b1be026.js";import{w as N}from"./p-b347cfd1.js";import"./p-185e427e.js";import"./p-419eb426.js";import"./p-e0b06b65.js";var K;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(K||(K={}));const V={getEngine(){const t=y();if(null==t?void 0:t.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},supportsDefaultStatusBarStyle(){const t=y();return!!(null==t?void 0:t.PluginHeaders)},setStyle(t){const o=this.getEngine();o&&o.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return K.Default;const{style:o}=await t.getInfo();return o}},Z=(t,o)=>{if(1===o)return 0;const i=1/(1-o);return t*i+-o*i},F=()=>{!N||N.innerWidth>=768||!V.supportsDefaultStatusBarStyle()||V.setStyle({style:K.Dark})},G=(t=K.Default)=>{!N||N.innerWidth>=768||!V.supportsDefaultStatusBarStyle()||V.setStyle({style:t})},_=async(t,o)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,A)&&(o.isRunning()?o.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},H=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,U=.93,q=(t,o)=>u(400,t/Math.abs(1.1*o),500),J=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=void 0===i||i<o,r=a?`calc(var(--backdrop-opacity) * ${o})`:"0",e=W("backdropAnimation").fromTo("opacity",0,r);return a&&e.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:W("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*o}%)`}]),backdropAnimation:e}},Q=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=`calc(var(--backdrop-opacity) * ${Z(o,i)})`,r=[{offset:0,opacity:a},{offset:1,opacity:0}],e=[{offset:0,opacity:a},{offset:i,opacity:0},{offset:1,opacity:0}],s=W("backdropAnimation").keyframes(0!==i?e:r);return{wrapperAnimation:W("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*o}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:s}},X=(t,o)=>{const{presentingEl:i,currentBreakpoint:a}=o,r=f(t),{wrapperAnimation:e,backdropAnimation:s}=void 0!==a?J(o):{backdropAnimation:W().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:W().fromTo("transform","translateY(100vh)","translateY(0vh)")};s.addElement(r.querySelector("ion-backdrop")),e.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const n=W("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation(e);if(i){const t=window.innerWidth<768,o="ION-MODAL"===i.tagName&&void 0!==i.presentingElement,a=f(i),r=W().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),d=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.93)`;r.afterStyles({transform:a}).beforeAddWrite((()=>d.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"}]),n.addAnimation(r)}else if(n.addAnimation(s),o){const t=`translateY(-10px) scale(${o?U:1})`;r.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=W().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);n.addAnimation([r,i])}else e.fromTo("opacity","0","1")}else n.addAnimation(s);return n},tt=(t,o,i=500)=>{const{presentingEl:a,currentBreakpoint:r}=o,e=f(t),{wrapperAnimation:s,backdropAnimation:n}=void 0!==r?Q(o):{backdropAnimation:W().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:W().fromTo("transform","translateY(0vh)","translateY(100vh)")};n.addElement(e.querySelector("ion-backdrop")),s.addElement(e.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=W("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i).addAnimation(s);if(a){const t=window.innerWidth<768,o="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,i=f(a),r=W().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(e.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&e.style.setProperty("background-color",""))})),e=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.93)`;r.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"}]),d.addAnimation(r)}else if(d.addAnimation(n),o){const t=`translateY(-10px) scale(${o?U:1})`;r.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=W().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)"}]);d.addAnimation([r,a])}else s.fromTo("opacity","1","0")}else d.addAnimation(n);return d},ot=(t,o)=>{const{currentBreakpoint:i}=o,a=f(t),{wrapperAnimation:r,backdropAnimation:e}=void 0!==i?J(o):{backdropAnimation:W().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:W().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}])};return e.addElement(a.querySelector("ion-backdrop")),r.addElement(a.querySelector(".modal-wrapper")),W().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([e,r])},it=(t,o)=>{const{currentBreakpoint:i}=o,a=f(t),{wrapperAnimation:r,backdropAnimation:e}=void 0!==i?Q(o):{backdropAnimation:W().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:W().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return e.addElement(a.querySelector("ion-backdrop")),r.addElement(a.querySelector(".modal-wrapper")),W().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([e,r])},at=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=D(),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,B)},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.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.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;Y(t),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener()}componentWillLoad(){const{breakpoints:t,initialBreakpoint:o,el:i}=this,a=this.isSheetModal=void 0!==t&&void 0!==o;this.inheritedAttributes=v(i,["aria-label","role"]),a&&(this.currentBreakpoint=this.initialBreakpoint),void 0===t||void 0===o||t.includes(o)||k("Your breakpoints array must include the initialBreakpoint value."),j(i)}componentDidLoad(){!0===this.isOpen&&w((()=>this.present())),this.breakpointsChanged(this.breakpoints)}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:r,delegate:e}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await m(e,a,this.component,["ion-page"],this.componentProps,r),x(a)?await P(this.usersElement):this.keepContentsMounted||await $(),i((()=>this.el.classList.add("show-modal")));const s=void 0!==o;s&&"ios"===T(this)&&(this.statusBarStyle=await V.getStyle(),F()),await M(this,"modalEnter",X,ot,{presentingEl:o,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint}),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),w((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(I,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():s&&this.initSwipeToClose(),t()}initSwipeToClose(){var t;if("ios"!==T(this))return;const{el:o}=this,i=this.leaveAnimation||z.get("modalLeave",tt),a=this.animation=i(o,{presentingEl:this.presentingElement});if(!h(o))return void l(o);const r=null!==(t=this.statusBarStyle)&&void 0!==t?t:K.Default;this.gesture=((t,o,i,a)=>{const r=.5,e=t.offsetHeight;let h=!1,l=!1,c=null,m=null,b=!0,w=0;const v=R({el:t,gestureName:"modalSwipeToClose",gesturePriority:39,direction:"y",threshold:10,canStart:t=>{const o=t.event.target;if(null===o||!o.closest)return!0;if(c=s(o),c){if(n(c)){const t=f(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;b=!c||!n(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 s=t.deltaY/e,n=s>=0&&l,p=n?.2:.9999,h=n?H(s/p):s,m=u(1e-4,h,p);o.progressStep(m),m>=r&&w<r?G(i):m<r&&w>=r&&F(),w=m},onEnd:i=>{const s=i.velocityY,n=i.deltaY/e,d=n>=0&&l,m=d?.2:.9999,f=d?H(n/m):n,w=u(1e-4,f,m),x=!d&&(i.deltaY+1e3*s)/e>=r;let g=x?-.001:.001;x?(o.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=L([0,0],[.32,.72],[0,1],[1,1],w)[0]):(o.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=L([0,0],[1,0],[.68,.28],[1,1],w)[0]);const k=q(x?n*e:(1-w)*e,s);h=x,v.enable(!1),c&&p(c,b),o.onFinish((()=>{x||v.enable(!0)})).progressEnd(x?1:0,g,k),d&&w>m/4?_(t,o):x&&a()}});return v})(o,a,r,(()=>{this.gestureAnimationDismissing=!0,G(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,A),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||z.get("modalEnter",X),r=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:o,backdropBreakpoint:i});r.progressStart(!0,1);const{gesture:e,moveSheetToBreakpoint:s}=((t,o,i,a,r,e,s=[],n,d,p)=>{const h={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==r?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-r,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}]},l=t.querySelector("ion-content"),c=i.clientHeight;let m=a,b=0,f=!1;const v=e.childAnimations.find((t=>"wrapperAnimation"===t.id)),x=e.childAnimations.find((t=>"backdropAnimation"===t.id)),g=s[s.length-1],k=s[0],y=()=>{t.style.setProperty("pointer-events","auto"),o.style.setProperty("pointer-events","auto"),t.classList.remove("ion-disable-focus-trap")},A=()=>{t.style.setProperty("pointer-events","none"),o.style.setProperty("pointer-events","none"),t.classList.add("ion-disable-focus-trap")};v&&x&&(v.keyframes([...h.WRAPPER_KEYFRAMES]),x.keyframes([...h.BACKDROP_KEYFRAMES]),e.progressStart(!0,1-m),m>r?y():A()),l&&m!==g&&(l.scrollY=!1);const D=o=>{const{breakpoint:i,canDismiss:a,breakpointOffset:n,animated:c}=o,b=a&&0===i,f=b?m:i,u=0!==f;return m=0,v&&x&&(v.keyframes([{offset:0,transform:`translateY(${100*n}%)`},{offset:1,transform:`translateY(${100*(1-f)}%)`}]),x.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${Z(1-n,r)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${Z(f,r)})`}]),e.progressStep(0)),B.enable(!1),b?_(t,e):u||d(),new Promise((t=>{e.onFinish((()=>{u?v&&x?w((()=>{v.keyframes([...h.WRAPPER_KEYFRAMES]),x.keyframes([...h.BACKDROP_KEYFRAMES]),e.progressStart(!0,1-f),m=f,p(m),l&&m===s[s.length-1]&&(l.scrollY=!0),m>r?y():A(),B.enable(!0),t()})):(B.enable(!0),t()):t()}),{oneTimeCallback:!0}).progressEnd(1,0,c?500:0)}))},B=R({el:i,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const o=t.event.target.closest("ion-content");return m=n(),1!==m||!o},onStart:()=>{f=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===k,l&&(l.scrollY=!1),w((()=>{t.focus()})),e.progressStart(!0,1-m)},onMove:t=>{const o=s.length>1?1-s[1]:void 0,i=1-m+t.deltaY/c,a=void 0!==o&&i>=o&&f,r=a?.95:.9999,n=a&&void 0!==o?o+H((i-o)/(r-o)):i;b=u(1e-4,n,r),e.progressStep(b)},onEnd:t=>{const o=m-(t.deltaY+350*t.velocityY)/c,i=s.reduce(((t,i)=>Math.abs(i-o)<Math.abs(t-o)?i:t));D({breakpoint:i,breakpointOffset:b,canDismiss:f,animated:!0})}});return{gesture:B,moveSheetToBreakpoint:D}})(this.el,this.backdropEl,t,o,i,r,this.sortedBreakpoints,(()=>{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=e,this.moveSheetToBreakpoint=s,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,A),this.gestureAnimationDismissing=!1}))}async dismiss(t,o){var a;if(this.gestureAnimationDismissing&&o!==A)return!1;const r=await this.lockController.lock();if("handler"!==o&&!await this.checkCanDismiss(t,o))return r(),!1;const{presentingElement:e}=this;void 0!==e&&"ios"===T(this)&&G(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(I,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=E.get(this)||[],n=await C(this,t,o,"modalLeave",tt,it,{presentingEl:e,currentBreakpoint:null!==(a=this.currentBreakpoint)&&void 0!==a?a:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint});if(n){const{delegate:t}=this.getDelegate();await b(t,this.usersElement),i((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),s.forEach((t=>t.destroy()))}return this.currentBreakpoint=void 0,this.animation=void 0,r(),n}onDidDismiss(){return S(this.el,"ionModalDidDismiss")}onWillDismiss(){return S(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void k("setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void k(`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:r,animated:e}=this;o!==t&&i&&(this.sheetTransition=i({breakpoint:t,breakpointOffset:1-o,canDismiss:void 0!==a&&!0!==a&&0===r[0],animated:e}),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),r=i[(a+1)%i.length];return await this.setCurrentBreakpoint(r),!0}render(){const{handle:t,isSheetModal:o,presentingElement:i,htmlAttributes:e,handleBehavior:s,inheritedAttributes:n}=this,d=!1!==t&&o,p=T(this),h=void 0!==i&&"ios"===p,l="cycle"===s;return a(r,Object.assign({"no-router":!0,tabindex:"-1"},e,{style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign({[p]:!0,"modal-default":!h&&!o,"modal-card":h,"modal-sheet":o,"overlay-hidden":!0},O(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle}),a("ion-backdrop",{ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===p&&a("div",{class:"modal-shadow"}),a("div",Object.assign({role:"dialog"},n,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t}),d&&a("button",{class:"modal-handle",tabIndex:l?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:l?this.onHandleClick:void 0,part:"handle"}),a("slot",null)))}get el(){return e(this)}static get watchers(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}}},rt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};at.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, #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{--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-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-card) .modal-wrapper,:host-context([dir=rtl]).modal-card .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-card) .modal-wrapper:dir(rtl){border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-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-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-sheet) .modal-wrapper,:host-context([dir=rtl]).modal-sheet .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-sheet) .modal-wrapper:dir(rtl){border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}}',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, #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{--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{at as ion_modal}
|
|
4
|
+
import{r as t,d as o,w as i,h as a,H as r,f as e}from"./p-903c36fe.js";import{f as s,i as n,d,r as p,a as h,p as l}from"./p-b24aa895.js";import{C as c,a as m,d as b}from"./p-b287ab05.js";import{g as f,l as u,r as w,k as v,m as x}from"./p-63eb0acd.js";import{c as g}from"./p-53b2a46f.js";import{p as k}from"./p-1b8e1d03.js";import{g as y}from"./p-cc196b34.js";import{G as A,e as D,B,j as Y,k as j,f as M,n as E,g as C,h as S}from"./p-68a3da51.js";import{g as O}from"./p-1d072d3d.js";import{e as P,w as $}from"./p-c5395981.js";import{b as T,c as z}from"./p-7a590a28.js";import{KEYBOARD_DID_OPEN as I}from"./p-8cf94fc1.js";import{c as W}from"./p-446230d7.js";import{g as L}from"./p-7c2bac85.js";import{createGesture as R}from"./p-8b1be026.js";import{w as N}from"./p-b347cfd1.js";import"./p-185e427e.js";import"./p-419eb426.js";import"./p-e0b06b65.js";var K;!function(t){t.Dark="DARK",t.Light="LIGHT",t.Default="DEFAULT"}(K||(K={}));const V={getEngine(){const t=y();if(null==t?void 0:t.isPluginAvailable("StatusBar"))return t.Plugins.StatusBar},supportsDefaultStatusBarStyle(){const t=y();return!!(null==t?void 0:t.PluginHeaders)},setStyle(t){const o=this.getEngine();o&&o.setStyle(t)},getStyle:async function(){const t=this.getEngine();if(!t)return K.Default;const{style:o}=await t.getInfo();return o}},Z=(t,o)=>{if(1===o)return 0;const i=1/(1-o);return t*i+-o*i},F=()=>{!N||N.innerWidth>=768||!V.supportsDefaultStatusBarStyle()||V.setStyle({style:K.Dark})},G=(t=K.Default)=>{!N||N.innerWidth>=768||!V.supportsDefaultStatusBarStyle()||V.setStyle({style:t})},_=async(t,o)=>{"function"==typeof t.canDismiss&&await t.canDismiss(void 0,A)&&(o.isRunning()?o.onFinish((()=>{t.dismiss(void 0,"handler")}),{oneTimeCallback:!0}):t.dismiss(void 0,"handler"))},H=t=>.00255275*2.71828**(-14.9619*t)-1.00255*2.71828**(-.0380968*t)+1,U=.93,q=(t,o)=>u(400,t/Math.abs(1.1*o),500),J=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=void 0===i||i<o,r=a?`calc(var(--backdrop-opacity) * ${o})`:"0",e=W("backdropAnimation").fromTo("opacity",0,r);return a&&e.beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),{wrapperAnimation:W("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:"translateY(100%)"},{offset:1,opacity:1,transform:`translateY(${100-100*o}%)`}]),backdropAnimation:e}},Q=t=>{const{currentBreakpoint:o,backdropBreakpoint:i}=t,a=`calc(var(--backdrop-opacity) * ${Z(o,i)})`,r=[{offset:0,opacity:a},{offset:1,opacity:0}],e=[{offset:0,opacity:a},{offset:i,opacity:0},{offset:1,opacity:0}],s=W("backdropAnimation").keyframes(0!==i?e:r);return{wrapperAnimation:W("wrapperAnimation").keyframes([{offset:0,opacity:1,transform:`translateY(${100-100*o}%)`},{offset:1,opacity:1,transform:"translateY(100%)"}]),backdropAnimation:s}},X=(t,o)=>{const{presentingEl:i,currentBreakpoint:a}=o,r=f(t),{wrapperAnimation:e,backdropAnimation:s}=void 0!==a?J(o):{backdropAnimation:W().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:W().fromTo("transform","translateY(100vh)","translateY(0vh)")};s.addElement(r.querySelector("ion-backdrop")),e.addElement(r.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const n=W("entering-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(500).addAnimation(e);if(i){const t=window.innerWidth<768,o="ION-MODAL"===i.tagName&&void 0!==i.presentingElement,a=f(i),r=W().beforeStyles({transform:"translateY(0)","transform-origin":"top center",overflow:"hidden"}),d=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.93)`;r.afterStyles({transform:a}).beforeAddWrite((()=>d.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"}]),n.addAnimation(r)}else if(n.addAnimation(s),o){const t=`translateY(-10px) scale(${o?U:1})`;r.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=W().afterStyles({transform:t}).addElement(a.querySelector(".modal-shadow")).keyframes([{offset:0,opacity:"1",transform:"translateY(0) scale(1)"},{offset:1,opacity:"0",transform:t}]);n.addAnimation([r,i])}else e.fromTo("opacity","0","1")}else n.addAnimation(s);return n},tt=(t,o,i=500)=>{const{presentingEl:a,currentBreakpoint:r}=o,e=f(t),{wrapperAnimation:s,backdropAnimation:n}=void 0!==r?Q(o):{backdropAnimation:W().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:W().fromTo("transform","translateY(0vh)","translateY(100vh)")};n.addElement(e.querySelector("ion-backdrop")),s.addElement(e.querySelectorAll(".modal-wrapper, .modal-shadow")).beforeStyles({opacity:1});const d=W("leaving-base").addElement(t).easing("cubic-bezier(0.32,0.72,0,1)").duration(i).addAnimation(s);if(a){const t=window.innerWidth<768,o="ION-MODAL"===a.tagName&&void 0!==a.presentingElement,i=f(a),r=W().beforeClearStyles(["transform"]).afterClearStyles(["transform"]).onFinish((t=>{1===t&&(a.style.setProperty("overflow",""),Array.from(e.querySelectorAll("ion-modal:not(.overlay-hidden)")).filter((t=>void 0!==t.presentingElement)).length<=1&&e.style.setProperty("background-color",""))})),e=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.93)`;r.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"}]),d.addAnimation(r)}else if(d.addAnimation(n),o){const t=`translateY(-10px) scale(${o?U:1})`;r.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=W().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)"}]);d.addAnimation([r,a])}else s.fromTo("opacity","1","0")}else d.addAnimation(n);return d},ot=(t,o)=>{const{currentBreakpoint:i}=o,a=f(t),{wrapperAnimation:r,backdropAnimation:e}=void 0!==i?J(o):{backdropAnimation:W().fromTo("opacity",.01,"var(--backdrop-opacity)").beforeStyles({"pointer-events":"none"}).afterClearStyles(["pointer-events"]),wrapperAnimation:W().keyframes([{offset:0,opacity:.01,transform:"translateY(40px)"},{offset:1,opacity:1,transform:"translateY(0px)"}])};return e.addElement(a.querySelector("ion-backdrop")),r.addElement(a.querySelector(".modal-wrapper")),W().addElement(t).easing("cubic-bezier(0.36,0.66,0.04,1)").duration(280).addAnimation([e,r])},it=(t,o)=>{const{currentBreakpoint:i}=o,a=f(t),{wrapperAnimation:r,backdropAnimation:e}=void 0!==i?Q(o):{backdropAnimation:W().fromTo("opacity","var(--backdrop-opacity)",0),wrapperAnimation:W().keyframes([{offset:0,opacity:.99,transform:"translateY(0px)"},{offset:1,opacity:0,transform:"translateY(40px)"}])};return e.addElement(a.querySelector("ion-backdrop")),r.addElement(a.querySelector(".modal-wrapper")),W().easing("cubic-bezier(0.47,0,0.745,0.715)").duration(200).addAnimation([e,r])},at=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=D(),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,B)},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.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.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;Y(t),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener()}componentWillLoad(){const{breakpoints:t,initialBreakpoint:o,el:i}=this,a=this.isSheetModal=void 0!==t&&void 0!==o;this.inheritedAttributes=v(i,["aria-label","role"]),a&&(this.currentBreakpoint=this.initialBreakpoint),void 0===t||void 0===o||t.includes(o)||k("Your breakpoints array must include the initialBreakpoint value."),j(i)}componentDidLoad(){!0===this.isOpen&&w((()=>this.present())),this.breakpointsChanged(this.breakpoints)}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:r,delegate:e}=this.getDelegate(!0);this.ionMount.emit(),this.usersElement=await m(e,a,this.component,["ion-page"],this.componentProps,r),x(a)?await P(this.usersElement):this.keepContentsMounted||await $(),i((()=>this.el.classList.add("show-modal")));const s=void 0!==o;s&&"ios"===T(this)&&(this.statusBarStyle=await V.getStyle(),F()),await M(this,"modalEnter",X,ot,{presentingEl:o,currentBreakpoint:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint}),"undefined"!=typeof window&&(this.keyboardOpenCallback=()=>{this.gesture&&(this.gesture.enable(!1),w((()=>{this.gesture&&this.gesture.enable(!0)})))},window.addEventListener(I,this.keyboardOpenCallback)),this.isSheetModal?this.initSheetGesture():s&&this.initSwipeToClose(),t()}initSwipeToClose(){var t;if("ios"!==T(this))return;const{el:o}=this,i=this.leaveAnimation||z.get("modalLeave",tt),a=this.animation=i(o,{presentingEl:this.presentingElement});if(!h(o))return void l(o);const r=null!==(t=this.statusBarStyle)&&void 0!==t?t:K.Default;this.gesture=((t,o,i,a)=>{const r=.5,e=t.offsetHeight;let h=!1,l=!1,c=null,m=null,b=!0,w=0;const v=R({el:t,gestureName:"modalSwipeToClose",gesturePriority:39,direction:"y",threshold:10,canStart:t=>{const o=t.event.target;if(null===o||!o.closest)return!0;if(c=s(o),c){if(n(c)){const t=f(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;b=!c||!n(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 s=t.deltaY/e,n=s>=0&&l,p=n?.2:.9999,h=n?H(s/p):s,m=u(1e-4,h,p);o.progressStep(m),m>=r&&w<r?G(i):m<r&&w>=r&&F(),w=m},onEnd:i=>{const s=i.velocityY,n=i.deltaY/e,d=n>=0&&l,m=d?.2:.9999,f=d?H(n/m):n,w=u(1e-4,f,m),x=!d&&(i.deltaY+1e3*s)/e>=r;let g=x?-.001:.001;x?(o.easing("cubic-bezier(0.32, 0.72, 0, 1)"),g+=L([0,0],[.32,.72],[0,1],[1,1],w)[0]):(o.easing("cubic-bezier(1, 0, 0.68, 0.28)"),g+=L([0,0],[1,0],[.68,.28],[1,1],w)[0]);const k=q(x?n*e:(1-w)*e,s);h=x,v.enable(!1),c&&p(c,b),o.onFinish((()=>{x||v.enable(!0)})).progressEnd(x?1:0,g,k),d&&w>m/4?_(t,o):x&&a()}});return v})(o,a,r,(()=>{this.gestureAnimationDismissing=!0,G(this.statusBarStyle),this.animation.onFinish((async()=>{await this.dismiss(void 0,A),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||z.get("modalEnter",X),r=this.animation=a(this.el,{presentingEl:this.presentingElement,currentBreakpoint:o,backdropBreakpoint:i});r.progressStart(!0,1);const{gesture:e,moveSheetToBreakpoint:s}=((t,o,i,a,r,e,s=[],n,d,p)=>{const h={WRAPPER_KEYFRAMES:[{offset:0,transform:"translateY(0%)"},{offset:1,transform:"translateY(100%)"}],BACKDROP_KEYFRAMES:0!==r?[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1-r,opacity:0},{offset:1,opacity:0}]:[{offset:0,opacity:"var(--backdrop-opacity)"},{offset:1,opacity:.01}]},l=t.querySelector("ion-content"),c=i.clientHeight;let m=a,b=0,f=!1;const v=e.childAnimations.find((t=>"wrapperAnimation"===t.id)),x=e.childAnimations.find((t=>"backdropAnimation"===t.id)),g=s[s.length-1],k=s[0],y=()=>{t.style.setProperty("pointer-events","auto"),o.style.setProperty("pointer-events","auto"),t.classList.remove("ion-disable-focus-trap")},A=()=>{t.style.setProperty("pointer-events","none"),o.style.setProperty("pointer-events","none"),t.classList.add("ion-disable-focus-trap")};v&&x&&(v.keyframes([...h.WRAPPER_KEYFRAMES]),x.keyframes([...h.BACKDROP_KEYFRAMES]),e.progressStart(!0,1-m),m>r?y():A()),l&&m!==g&&(l.scrollY=!1);const D=o=>{const{breakpoint:i,canDismiss:a,breakpointOffset:n,animated:c}=o,b=a&&0===i,f=b?m:i,u=0!==f;return m=0,v&&x&&(v.keyframes([{offset:0,transform:`translateY(${100*n}%)`},{offset:1,transform:`translateY(${100*(1-f)}%)`}]),x.keyframes([{offset:0,opacity:`calc(var(--backdrop-opacity) * ${Z(1-n,r)})`},{offset:1,opacity:`calc(var(--backdrop-opacity) * ${Z(f,r)})`}]),e.progressStep(0)),B.enable(!1),b?_(t,e):u||d(),new Promise((t=>{e.onFinish((()=>{u?v&&x?w((()=>{v.keyframes([...h.WRAPPER_KEYFRAMES]),x.keyframes([...h.BACKDROP_KEYFRAMES]),e.progressStart(!0,1-f),m=f,p(m),l&&m===s[s.length-1]&&(l.scrollY=!0),m>r?y():A(),B.enable(!0),t()})):(B.enable(!0),t()):t()}),{oneTimeCallback:!0}).progressEnd(1,0,c?500:0)}))},B=R({el:i,gestureName:"modalSheet",gesturePriority:40,direction:"y",threshold:10,canStart:t=>{const o=t.event.target.closest("ion-content");return m=n(),1!==m||!o},onStart:()=>{f=void 0!==t.canDismiss&&!0!==t.canDismiss&&0===k,l&&(l.scrollY=!1),w((()=>{t.focus()})),e.progressStart(!0,1-m)},onMove:t=>{const o=s.length>1?1-s[1]:void 0,i=1-m+t.deltaY/c,a=void 0!==o&&i>=o&&f,r=a?.95:.9999,n=a&&void 0!==o?o+H((i-o)/(r-o)):i;b=u(1e-4,n,r),e.progressStep(b)},onEnd:t=>{const o=m-(t.deltaY+350*t.velocityY)/c,i=s.reduce(((t,i)=>Math.abs(i-o)<Math.abs(t-o)?i:t));D({breakpoint:i,breakpointOffset:b,canDismiss:f,animated:!0})}});return{gesture:B,moveSheetToBreakpoint:D}})(this.el,this.backdropEl,t,o,i,r,this.sortedBreakpoints,(()=>{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=e,this.moveSheetToBreakpoint=s,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,A),this.gestureAnimationDismissing=!1}))}async dismiss(t,o){var a;if(this.gestureAnimationDismissing&&o!==A)return!1;const r=await this.lockController.lock();if("handler"!==o&&!await this.checkCanDismiss(t,o))return r(),!1;const{presentingElement:e}=this;void 0!==e&&"ios"===T(this)&&G(this.statusBarStyle),"undefined"!=typeof window&&this.keyboardOpenCallback&&(window.removeEventListener(I,this.keyboardOpenCallback),this.keyboardOpenCallback=void 0);const s=E.get(this)||[],n=await C(this,t,o,"modalLeave",tt,it,{presentingEl:e,currentBreakpoint:null!==(a=this.currentBreakpoint)&&void 0!==a?a:this.initialBreakpoint,backdropBreakpoint:this.backdropBreakpoint});if(n){const{delegate:t}=this.getDelegate();await b(t,this.usersElement),i((()=>this.el.classList.remove("show-modal"))),this.animation&&this.animation.destroy(),this.gesture&&this.gesture.destroy(),s.forEach((t=>t.destroy()))}return this.currentBreakpoint=void 0,this.animation=void 0,r(),n}onDidDismiss(){return S(this.el,"ionModalDidDismiss")}onWillDismiss(){return S(this.el,"ionModalWillDismiss")}async setCurrentBreakpoint(t){if(!this.isSheetModal)return void k("setCurrentBreakpoint is only supported on sheet modals.");if(!this.breakpoints.includes(t))return void k(`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:r,animated:e}=this;o!==t&&i&&(this.sheetTransition=i({breakpoint:t,breakpointOffset:1-o,canDismiss:void 0!==a&&!0!==a&&0===r[0],animated:e}),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),r=i[(a+1)%i.length];return await this.setCurrentBreakpoint(r),!0}render(){const{handle:t,isSheetModal:o,presentingElement:i,htmlAttributes:e,handleBehavior:s,inheritedAttributes:n}=this,d=!1!==t&&o,p=T(this),h=void 0!==i&&"ios"===p,l="cycle"===s;return a(r,Object.assign({"no-router":!0,tabindex:"-1"},e,{style:{zIndex:`${2e4+this.overlayIndex}`},class:Object.assign({[p]:!0,"modal-default":!h&&!o,"modal-card":h,"modal-sheet":o,"overlay-hidden":!0},O(this.cssClass)),onIonBackdropTap:this.onBackdropTap,onIonModalDidPresent:this.onLifecycle,onIonModalWillPresent:this.onLifecycle,onIonModalWillDismiss:this.onLifecycle,onIonModalDidDismiss:this.onLifecycle}),a("ion-backdrop",{ref:t=>this.backdropEl=t,visible:this.showBackdrop,tappable:this.backdropDismiss,part:"backdrop"}),"ios"===p&&a("div",{class:"modal-shadow"}),a("div",Object.assign({role:"dialog"},n,{"aria-modal":"true",class:"modal-wrapper ion-overlay-wrapper",part:"content",ref:t=>this.wrapperEl=t}),d&&a("button",{class:"modal-handle",tabIndex:l?0:-1,"aria-label":"Activate to adjust the size of the dialog overlaying the screen",onClick:l?this.onHandleClick:void 0,part:"handle"}),a("slot",null)))}get el(){return e(this)}static get watchers(){return{isOpen:["onIsOpenChange"],trigger:["triggerChanged"]}}},rt={ionModalDidPresent:"ionViewDidEnter",ionModalWillPresent:"ionViewWillEnter",ionModalWillDismiss:"ionViewWillLeave",ionModalDidDismiss:"ionViewDidLeave"};at.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, #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{--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-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-card) .modal-wrapper,:host-context([dir=rtl]).modal-card .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-card) .modal-wrapper:dir(rtl){border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-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-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}:host-context([dir=rtl]):host(.modal-sheet) .modal-wrapper,:host-context([dir=rtl]).modal-sheet .modal-wrapper{border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}@supports selector(:dir(rtl)){:host(.modal-sheet) .modal-wrapper:dir(rtl){border-top-left-radius:var(--border-radius);border-top-right-radius:var(--border-radius);border-bottom-right-radius:0;border-bottom-left-radius:0}}',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, #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{--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{at as ion_modal}
|
|
@@ -10,6 +10,14 @@ export declare class Menu implements ComponentInterface, MenuI {
|
|
|
10
10
|
private gesture?;
|
|
11
11
|
private blocker;
|
|
12
12
|
private didLoad;
|
|
13
|
+
/**
|
|
14
|
+
* Flag used to determine if an open/close
|
|
15
|
+
* operation was cancelled. For example, if
|
|
16
|
+
* an app calls "menu.open" then disables the menu
|
|
17
|
+
* part way through the animation, then this would
|
|
18
|
+
* be considered a cancelled operation.
|
|
19
|
+
*/
|
|
20
|
+
private operationCancelled;
|
|
13
21
|
isAnimating: boolean;
|
|
14
22
|
width: number;
|
|
15
23
|
_isOpen: boolean;
|
|
@@ -136,6 +144,5 @@ export declare class Menu implements ComponentInterface, MenuI {
|
|
|
136
144
|
private beforeAnimation;
|
|
137
145
|
private afterAnimation;
|
|
138
146
|
private updateState;
|
|
139
|
-
private forceClosing;
|
|
140
147
|
render(): any;
|
|
141
148
|
}
|
package/hydrate/index.js
CHANGED
|
@@ -9032,6 +9032,7 @@ const createAnimation = (animationId) => {
|
|
|
9032
9032
|
const id = animationId;
|
|
9033
9033
|
const onFinishCallbacks = [];
|
|
9034
9034
|
const onFinishOneTimeCallbacks = [];
|
|
9035
|
+
const onStopOneTimeCallbacks = [];
|
|
9035
9036
|
const elements = [];
|
|
9036
9037
|
const childAnimations = [];
|
|
9037
9038
|
const stylesheets = [];
|
|
@@ -9089,6 +9090,28 @@ const createAnimation = (animationId) => {
|
|
|
9089
9090
|
const isRunning = () => {
|
|
9090
9091
|
return numAnimationsRunning !== 0 && !paused;
|
|
9091
9092
|
};
|
|
9093
|
+
/**
|
|
9094
|
+
* @internal
|
|
9095
|
+
* Remove a callback from a chosen callback array
|
|
9096
|
+
* @param callbackToRemove: A reference to the callback that should be removed
|
|
9097
|
+
* @param callbackObjects: An array of callbacks that callbackToRemove should be removed from.
|
|
9098
|
+
*/
|
|
9099
|
+
const clearCallback = (callbackToRemove, callbackObjects) => {
|
|
9100
|
+
const index = callbackObjects.findIndex((callbackObject) => callbackObject.c === callbackToRemove);
|
|
9101
|
+
if (index > -1) {
|
|
9102
|
+
callbackObjects.splice(index, 1);
|
|
9103
|
+
}
|
|
9104
|
+
};
|
|
9105
|
+
/**
|
|
9106
|
+
* @internal
|
|
9107
|
+
* Add a callback to be fired when an animation is stopped/cancelled.
|
|
9108
|
+
* @param callback: A reference to the callback that should be fired
|
|
9109
|
+
* @param opts: Any options associated with this particular callback
|
|
9110
|
+
*/
|
|
9111
|
+
const onStop = (callback, opts) => {
|
|
9112
|
+
onStopOneTimeCallbacks.push({ c: callback, o: opts });
|
|
9113
|
+
return ani;
|
|
9114
|
+
};
|
|
9092
9115
|
const onFinish = (callback, opts) => {
|
|
9093
9116
|
const callbacks = (opts === null || opts === void 0 ? void 0 : opts.oneTimeCallback) ? onFinishOneTimeCallbacks : onFinishCallbacks;
|
|
9094
9117
|
callbacks.push({ c: callback, o: opts });
|
|
@@ -9757,7 +9780,33 @@ const createAnimation = (animationId) => {
|
|
|
9757
9780
|
numAnimationsRunning = childAnimations.length + 1;
|
|
9758
9781
|
shouldCalculateNumAnimations = false;
|
|
9759
9782
|
}
|
|
9760
|
-
|
|
9783
|
+
/**
|
|
9784
|
+
* When one of these callbacks fires we
|
|
9785
|
+
* need to clear the other's callback otherwise
|
|
9786
|
+
* you can potentially get these callbacks
|
|
9787
|
+
* firing multiple times if the play method
|
|
9788
|
+
* is subsequently called.
|
|
9789
|
+
* Example:
|
|
9790
|
+
* animation.play() (onStop and onFinish callbacks are registered)
|
|
9791
|
+
* animation.stop() (onStop callback is fired, onFinish is not)
|
|
9792
|
+
* animation.play() (onStop and onFinish callbacks are registered)
|
|
9793
|
+
* Total onStop callbacks: 1
|
|
9794
|
+
* Total onFinish callbacks: 2
|
|
9795
|
+
*/
|
|
9796
|
+
const onStopCallback = () => {
|
|
9797
|
+
clearCallback(onFinishCallback, onFinishOneTimeCallbacks);
|
|
9798
|
+
resolve();
|
|
9799
|
+
};
|
|
9800
|
+
const onFinishCallback = () => {
|
|
9801
|
+
clearCallback(onStopCallback, onStopOneTimeCallbacks);
|
|
9802
|
+
resolve();
|
|
9803
|
+
};
|
|
9804
|
+
/**
|
|
9805
|
+
* The play method resolves when an animation
|
|
9806
|
+
* run either finishes or is cancelled.
|
|
9807
|
+
*/
|
|
9808
|
+
onFinish(onFinishCallback, { oneTimeCallback: true });
|
|
9809
|
+
onStop(onStopCallback, { oneTimeCallback: true });
|
|
9761
9810
|
childAnimations.forEach((animation) => {
|
|
9762
9811
|
animation.play();
|
|
9763
9812
|
});
|
|
@@ -9770,6 +9819,14 @@ const createAnimation = (animationId) => {
|
|
|
9770
9819
|
paused = false;
|
|
9771
9820
|
});
|
|
9772
9821
|
};
|
|
9822
|
+
/**
|
|
9823
|
+
* Stops an animation and resets it state to the
|
|
9824
|
+
* beginning. This does not fire any onFinish
|
|
9825
|
+
* callbacks because the animation did not finish.
|
|
9826
|
+
* However, since the animation was not destroyed
|
|
9827
|
+
* (i.e. the animation could run again) we do not
|
|
9828
|
+
* clear the onFinish callbacks.
|
|
9829
|
+
*/
|
|
9773
9830
|
const stop = () => {
|
|
9774
9831
|
childAnimations.forEach((animation) => {
|
|
9775
9832
|
animation.stop();
|
|
@@ -9779,6 +9836,8 @@ const createAnimation = (animationId) => {
|
|
|
9779
9836
|
initialized = false;
|
|
9780
9837
|
}
|
|
9781
9838
|
resetFlags();
|
|
9839
|
+
onStopOneTimeCallbacks.forEach((onStopCallback) => onStopCallback.c(0, ani));
|
|
9840
|
+
onStopOneTimeCallbacks.length = 0;
|
|
9782
9841
|
};
|
|
9783
9842
|
const from = (property, value) => {
|
|
9784
9843
|
const firstFrame = _keyframes[0];
|
|
@@ -12126,6 +12185,9 @@ class Checkbox {
|
|
|
12126
12185
|
this.ionBlur.emit();
|
|
12127
12186
|
};
|
|
12128
12187
|
this.onClick = (ev) => {
|
|
12188
|
+
if (this.disabled) {
|
|
12189
|
+
return;
|
|
12190
|
+
}
|
|
12129
12191
|
this.toggleChecked(ev);
|
|
12130
12192
|
};
|
|
12131
12193
|
this.color = undefined;
|
|
@@ -17203,26 +17265,17 @@ class Footer {
|
|
|
17203
17265
|
this.checkCollapsibleFooter();
|
|
17204
17266
|
}
|
|
17205
17267
|
async connectedCallback() {
|
|
17206
|
-
|
|
17207
|
-
|
|
17208
|
-
|
|
17209
|
-
|
|
17210
|
-
|
|
17211
|
-
|
|
17212
|
-
|
|
17213
|
-
|
|
17214
|
-
|
|
17215
|
-
|
|
17216
|
-
|
|
17217
|
-
* for the webview to resize. Otherwise, the footer
|
|
17218
|
-
* will flicker before the webview resizes.
|
|
17219
|
-
*/
|
|
17220
|
-
if (keyboardOpen === false && waitForResize !== undefined) {
|
|
17221
|
-
await waitForResize;
|
|
17222
|
-
}
|
|
17223
|
-
this.keyboardVisible = keyboardOpen; // trigger re-render by updating state
|
|
17224
|
-
});
|
|
17225
|
-
}
|
|
17268
|
+
this.keyboardCtrl = await createKeyboardController(async (keyboardOpen, waitForResize) => {
|
|
17269
|
+
/**
|
|
17270
|
+
* If the keyboard is hiding, then we need to wait
|
|
17271
|
+
* for the webview to resize. Otherwise, the footer
|
|
17272
|
+
* will flicker before the webview resizes.
|
|
17273
|
+
*/
|
|
17274
|
+
if (keyboardOpen === false && waitForResize !== undefined) {
|
|
17275
|
+
await waitForResize;
|
|
17276
|
+
}
|
|
17277
|
+
this.keyboardVisible = keyboardOpen; // trigger re-render by updating state
|
|
17278
|
+
});
|
|
17226
17279
|
}
|
|
17227
17280
|
disconnectedCallback() {
|
|
17228
17281
|
if (this.keyboardCtrl) {
|
|
@@ -20591,6 +20644,14 @@ class Menu {
|
|
|
20591
20644
|
this.lastOnEnd = 0;
|
|
20592
20645
|
this.blocker = GESTURE_CONTROLLER.createBlocker({ disableScroll: true });
|
|
20593
20646
|
this.didLoad = false;
|
|
20647
|
+
/**
|
|
20648
|
+
* Flag used to determine if an open/close
|
|
20649
|
+
* operation was cancelled. For example, if
|
|
20650
|
+
* an app calls "menu.open" then disables the menu
|
|
20651
|
+
* part way through the animation, then this would
|
|
20652
|
+
* be considered a cancelled operation.
|
|
20653
|
+
*/
|
|
20654
|
+
this.operationCancelled = false;
|
|
20594
20655
|
this.isAnimating = false;
|
|
20595
20656
|
this._isOpen = false;
|
|
20596
20657
|
this.inheritedAttributes = {};
|
|
@@ -20830,6 +20891,15 @@ class Menu {
|
|
|
20830
20891
|
this.beforeAnimation(shouldOpen);
|
|
20831
20892
|
await this.loadAnimation();
|
|
20832
20893
|
await this.startAnimation(shouldOpen, animated);
|
|
20894
|
+
/**
|
|
20895
|
+
* If the animation was cancelled then
|
|
20896
|
+
* return false because the operation
|
|
20897
|
+
* did not succeed.
|
|
20898
|
+
*/
|
|
20899
|
+
if (this.operationCancelled) {
|
|
20900
|
+
this.operationCancelled = false;
|
|
20901
|
+
return false;
|
|
20902
|
+
}
|
|
20833
20903
|
this.afterAnimation(shouldOpen);
|
|
20834
20904
|
return true;
|
|
20835
20905
|
}
|
|
@@ -20866,18 +20936,23 @@ class Menu {
|
|
|
20866
20936
|
const easingReverse = mode === 'ios' ? iosEasingReverse : mdEasingReverse;
|
|
20867
20937
|
const ani = this.animation
|
|
20868
20938
|
.direction(isReversed ? 'reverse' : 'normal')
|
|
20869
|
-
.easing(isReversed ? easingReverse : easing)
|
|
20870
|
-
.onFinish(() => {
|
|
20871
|
-
if (ani.getDirection() === 'reverse') {
|
|
20872
|
-
ani.direction('normal');
|
|
20873
|
-
}
|
|
20874
|
-
});
|
|
20939
|
+
.easing(isReversed ? easingReverse : easing);
|
|
20875
20940
|
if (animated) {
|
|
20876
20941
|
await ani.play();
|
|
20877
20942
|
}
|
|
20878
20943
|
else {
|
|
20879
20944
|
ani.play({ sync: true });
|
|
20880
20945
|
}
|
|
20946
|
+
/**
|
|
20947
|
+
* We run this after the play invocation
|
|
20948
|
+
* instead of using ani.onFinish so that
|
|
20949
|
+
* multiple onFinish callbacks do not get
|
|
20950
|
+
* run if an animation is played, stopped,
|
|
20951
|
+
* and then played again.
|
|
20952
|
+
*/
|
|
20953
|
+
if (ani.getDirection() === 'reverse') {
|
|
20954
|
+
ani.direction('normal');
|
|
20955
|
+
}
|
|
20881
20956
|
}
|
|
20882
20957
|
_isActive() {
|
|
20883
20958
|
return !this.disabled && !this.isPaneVisible;
|
|
@@ -21014,7 +21089,6 @@ class Menu {
|
|
|
21014
21089
|
}
|
|
21015
21090
|
afterAnimation(isOpen) {
|
|
21016
21091
|
var _a;
|
|
21017
|
-
assert(this.isAnimating, '_before() should be called while animating');
|
|
21018
21092
|
// keep opening/closing the menu disabled for a touch more yet
|
|
21019
21093
|
// only add listeners/css if it's enabled and isOpen
|
|
21020
21094
|
// and only remove listeners/css if it's not open
|
|
@@ -21073,10 +21147,29 @@ class Menu {
|
|
|
21073
21147
|
if (this.gesture) {
|
|
21074
21148
|
this.gesture.enable(isActive && this.swipeGesture);
|
|
21075
21149
|
}
|
|
21076
|
-
|
|
21077
|
-
|
|
21078
|
-
|
|
21079
|
-
|
|
21150
|
+
/**
|
|
21151
|
+
* If the menu is disabled but it is still open
|
|
21152
|
+
* then we should close the menu immediately.
|
|
21153
|
+
* Additionally, if the menu is in the process
|
|
21154
|
+
* of animating {open, close} and the menu is disabled
|
|
21155
|
+
* then it should still be closed immediately.
|
|
21156
|
+
*/
|
|
21157
|
+
if (!isActive) {
|
|
21158
|
+
/**
|
|
21159
|
+
* It is possible to disable the menu while
|
|
21160
|
+
* it is mid-animation. When this happens, we
|
|
21161
|
+
* need to set the operationCancelled flag
|
|
21162
|
+
* so that this._setOpen knows to return false
|
|
21163
|
+
* and not run the "afterAnimation" callback.
|
|
21164
|
+
*/
|
|
21165
|
+
if (this.isAnimating) {
|
|
21166
|
+
this.operationCancelled = true;
|
|
21167
|
+
}
|
|
21168
|
+
/**
|
|
21169
|
+
* If the menu is disabled then we should
|
|
21170
|
+
* forcibly close the menu even if it is open.
|
|
21171
|
+
*/
|
|
21172
|
+
this.afterAnimation(false);
|
|
21080
21173
|
}
|
|
21081
21174
|
if (doc === null || doc === void 0 ? void 0 : doc.contains(this.el)) {
|
|
21082
21175
|
/**
|
|
@@ -21089,14 +21182,6 @@ class Menu {
|
|
|
21089
21182
|
menuController._setActiveMenu(this);
|
|
21090
21183
|
}
|
|
21091
21184
|
}
|
|
21092
|
-
assert(!this.isAnimating, 'can not be animating');
|
|
21093
|
-
}
|
|
21094
|
-
forceClosing() {
|
|
21095
|
-
assert(this._isOpen, 'menu cannot be closed');
|
|
21096
|
-
this.isAnimating = true;
|
|
21097
|
-
const ani = this.animation.direction('reverse');
|
|
21098
|
-
ani.play({ sync: true });
|
|
21099
|
-
this.afterAnimation(false);
|
|
21100
21185
|
}
|
|
21101
21186
|
render() {
|
|
21102
21187
|
const { type, disabled, isPaneVisible, inheritedAttributes, side } = this;
|
|
@@ -27110,7 +27195,10 @@ class Radio {
|
|
|
27110
27195
|
}
|
|
27111
27196
|
};
|
|
27112
27197
|
this.onClick = () => {
|
|
27113
|
-
const { radioGroup, checked } = this;
|
|
27198
|
+
const { radioGroup, checked, disabled } = this;
|
|
27199
|
+
if (disabled) {
|
|
27200
|
+
return;
|
|
27201
|
+
}
|
|
27114
27202
|
/**
|
|
27115
27203
|
* The legacy control uses a native input inside
|
|
27116
27204
|
* of the radio host, so we can set this.checked
|
|
@@ -27331,7 +27419,7 @@ class RadioGroup {
|
|
|
27331
27419
|
* using the `name` attribute.
|
|
27332
27420
|
*/
|
|
27333
27421
|
const selectedRadio = ev.target && ev.target.closest('ion-radio');
|
|
27334
|
-
if (selectedRadio) {
|
|
27422
|
+
if (selectedRadio && selectedRadio.disabled === false) {
|
|
27335
27423
|
const currentValue = this.value;
|
|
27336
27424
|
const newValue = selectedRadio.value;
|
|
27337
27425
|
if (newValue !== currentValue) {
|
|
@@ -32787,26 +32875,17 @@ class TabBar {
|
|
|
32787
32875
|
this.selectedTabChanged();
|
|
32788
32876
|
}
|
|
32789
32877
|
async connectedCallback() {
|
|
32790
|
-
|
|
32791
|
-
|
|
32792
|
-
|
|
32793
|
-
|
|
32794
|
-
|
|
32795
|
-
|
|
32796
|
-
|
|
32797
|
-
|
|
32798
|
-
|
|
32799
|
-
|
|
32800
|
-
|
|
32801
|
-
* for the webview to resize. Otherwise, the tab bar
|
|
32802
|
-
* will flicker before the webview resizes.
|
|
32803
|
-
*/
|
|
32804
|
-
if (keyboardOpen === false && waitForResize !== undefined) {
|
|
32805
|
-
await waitForResize;
|
|
32806
|
-
}
|
|
32807
|
-
this.keyboardVisible = keyboardOpen; // trigger re-render by updating state
|
|
32808
|
-
});
|
|
32809
|
-
}
|
|
32878
|
+
this.keyboardCtrl = await createKeyboardController(async (keyboardOpen, waitForResize) => {
|
|
32879
|
+
/**
|
|
32880
|
+
* If the keyboard is hiding, then we need to wait
|
|
32881
|
+
* for the webview to resize. Otherwise, the tab bar
|
|
32882
|
+
* will flicker before the webview resizes.
|
|
32883
|
+
*/
|
|
32884
|
+
if (keyboardOpen === false && waitForResize !== undefined) {
|
|
32885
|
+
await waitForResize;
|
|
32886
|
+
}
|
|
32887
|
+
this.keyboardVisible = keyboardOpen; // trigger re-render by updating state
|
|
32888
|
+
});
|
|
32810
32889
|
}
|
|
32811
32890
|
disconnectedCallback() {
|
|
32812
32891
|
if (this.keyboardCtrl) {
|
|
@@ -34012,6 +34091,9 @@ class Toggle {
|
|
|
34012
34091
|
}
|
|
34013
34092
|
};
|
|
34014
34093
|
this.onClick = (ev) => {
|
|
34094
|
+
if (this.disabled) {
|
|
34095
|
+
return;
|
|
34096
|
+
}
|
|
34015
34097
|
ev.preventDefault();
|
|
34016
34098
|
if (this.lastDrag + 300 < Date.now()) {
|
|
34017
34099
|
this.toggleChecked();
|
|
@@ -35050,7 +35132,11 @@ const createSwipeBackGesture = (el, canStartHandler, onStartHandler, onMoveHandl
|
|
|
35050
35132
|
return createGesture({
|
|
35051
35133
|
el,
|
|
35052
35134
|
gestureName: 'goback-swipe',
|
|
35053
|
-
|
|
35135
|
+
/**
|
|
35136
|
+
* Swipe to go back should have priority over other horizontal swipe
|
|
35137
|
+
* gestures. These gestures have a priority of 100 which is why 101 was chosen here.
|
|
35138
|
+
*/
|
|
35139
|
+
gesturePriority: 101,
|
|
35054
35140
|
threshold: 10,
|
|
35055
35141
|
canStart,
|
|
35056
35142
|
onStart: onStartHandler,
|
package/package.json
CHANGED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{__spreadArray}from"tslib";
|
|
2
|
-
/*!
|
|
3
|
-
* (C) Ionic http://ionicframework.com - MIT License
|
|
4
|
-
*/import{w as win}from"./index-7a14ecec.js";import{r as raf}from"./helpers-3379ba19.js";var animationPrefix;var processKeyframes=function(e){e.forEach((function(e){for(var n in e){if(e.hasOwnProperty(n)){var r=e[n];if(n==="easing"){var t="animation-timing-function";e[t]=r;delete e[n]}else{var t=convertCamelCaseToHypen(n);if(t!==n){e[t]=r;delete e[n]}}}}}));return e};var convertCamelCaseToHypen=function(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()};var getAnimationPrefix=function(e){if(animationPrefix===undefined){var n=e.style.animationName!==undefined;var r=e.style.webkitAnimationName!==undefined;animationPrefix=!n&&r?"-webkit-":""}return animationPrefix};var setStyleProperty=function(e,n,r){var t=n.startsWith("animation")?getAnimationPrefix(e):"";e.style.setProperty(t+n,r)};var removeStyleProperty=function(e,n){var r=n.startsWith("animation")?getAnimationPrefix(e):"";e.style.removeProperty(r+n)};var animationEnd=function(e,n){var r;var t={passive:true};var a=function(){if(r){r()}};var i=function(r){if(e===r.target){a();n(r)}};if(e){e.addEventListener("webkitAnimationEnd",i,t);e.addEventListener("animationend",i,t);r=function(){e.removeEventListener("webkitAnimationEnd",i,t);e.removeEventListener("animationend",i,t)}}return a};var generateKeyframeRules=function(e){if(e===void 0){e=[]}return e.map((function(e){var n=e.offset;var r=[];for(var t in e){if(e.hasOwnProperty(t)&&t!=="offset"){r.push("".concat(t,": ").concat(e[t],";"))}}return"".concat(n*100,"% { ").concat(r.join(" ")," }")})).join(" ")};var keyframeIds=[];var generateKeyframeName=function(e){var n=keyframeIds.indexOf(e);if(n<0){n=keyframeIds.push(e)-1}return"ion-animation-".concat(n)};var getStyleContainer=function(e){var n=e.getRootNode!==undefined?e.getRootNode():e;return n.head||n};var createKeyframeStylesheet=function(e,n,r){var t;var a=getStyleContainer(r);var i=getAnimationPrefix(r);var o=a.querySelector("#"+e);if(o){return o}var f=((t=r.ownerDocument)!==null&&t!==void 0?t:document).createElement("style");f.id=e;f.textContent="@".concat(i,"keyframes ").concat(e," { ").concat(n," } @").concat(i,"keyframes ").concat(e,"-alt { ").concat(n," }");a.appendChild(f);return f};var addClassToArray=function(e,n){if(e===void 0){e=[]}if(n!==undefined){var r=Array.isArray(n)?n:[n];return __spreadArray(__spreadArray([],e,true),r,true)}return e};var createAnimation=function(e){var n;var r;var t;var a;var i;var o;var f=[];var u=[];var c=[];var s=false;var v;var l={};var d=[];var m=[];var y={};var p=0;var h=false;var g=false;var E;var P;var S;var A;var C=true;var T=false;var b=true;var w;var k;var x=false;var K=e;var _=[];var R=[];var I=[];var N=[];var D=[];var L=[];var F=[];var O=[];var W=[];var j=[];var H=typeof AnimationEffect==="function"||win!==undefined&&typeof win.AnimationEffect==="function";var M=typeof Element==="function"&&typeof Element.prototype.animate==="function"&&H;var $=100;var q=function(){return j};var z=function(e){N.forEach((function(n){n.destroy(e)}));Z(e);I.length=0;N.length=0;f.length=0;Q();s=false;b=true;return k};var Z=function(e){U();if(e){V()}};var B=function(){h=false;g=false;b=true;P=undefined;S=undefined;A=undefined;p=0;T=false;C=true;x=false};var G=function(){return p!==0&&!x};var J=function(e,n){var r=(n===null||n===void 0?void 0:n.oneTimeCallback)?R:_;r.push({c:e,o:n});return k};var Q=function(){_.length=0;R.length=0;return k};var U=function(){if(M){j.forEach((function(e){e.cancel()}));j.length=0}else{var e=I.slice();raf((function(){e.forEach((function(e){removeStyleProperty(e,"animation-name");removeStyleProperty(e,"animation-duration");removeStyleProperty(e,"animation-timing-function");removeStyleProperty(e,"animation-iteration-count");removeStyleProperty(e,"animation-delay");removeStyleProperty(e,"animation-play-state");removeStyleProperty(e,"animation-fill-mode");removeStyleProperty(e,"animation-direction")}))}))}};var V=function(){D.forEach((function(e){if(e===null||e===void 0?void 0:e.parentNode){e.parentNode.removeChild(e)}}));D.length=0};var X=function(e){L.push(e);return k};var Y=function(e){F.push(e);return k};var ee=function(e){O.push(e);return k};var ne=function(e){W.push(e);return k};var re=function(e){u=addClassToArray(u,e);return k};var te=function(e){c=addClassToArray(c,e);return k};var ae=function(e){if(e===void 0){e={}}l=e;return k};var ie=function(e){if(e===void 0){e=[]}for(var n=0,r=e;n<r.length;n++){var t=r[n];l[t]=""}return k};var oe=function(e){d=addClassToArray(d,e);return k};var fe=function(e){m=addClassToArray(m,e);return k};var ue=function(e){if(e===void 0){e={}}y=e;return k};var ce=function(e){if(e===void 0){e=[]}for(var n=0,r=e;n<r.length;n++){var t=r[n];y[t]=""}return k};var se=function(){if(i!==undefined){return i}if(v){return v.getFill()}return"both"};var ve=function(){if(P!==undefined){return P}if(o!==undefined){return o}if(v){return v.getDirection()}return"normal"};var le=function(){if(h){return"linear"}if(t!==undefined){return t}if(v){return v.getEasing()}return"linear"};var de=function(){if(g){return 0}if(S!==undefined){return S}if(r!==undefined){return r}if(v){return v.getDuration()}return 0};var me=function(){if(a!==undefined){return a}if(v){return v.getIterations()}return 1};var ye=function(){if(A!==undefined){return A}if(n!==undefined){return n}if(v){return v.getDelay()}return 0};var pe=function(){return f};var he=function(e){o=e;Oe(true);return k};var ge=function(e){i=e;Oe(true);return k};var Ee=function(e){n=e;Oe(true);return k};var Pe=function(e){t=e;Oe(true);return k};var Se=function(e){if(!M&&e===0){e=1}r=e;Oe(true);return k};var Ae=function(e){a=e;Oe(true);return k};var Ce=function(e){v=e;return k};var Te=function(e){if(e!=null){if(e.nodeType===1){I.push(e)}else if(e.length>=0){for(var n=0;n<e.length;n++){I.push(e[n])}}else{console.error("Invalid addElement value")}}return k};var be=function(e){if(e!=null){if(Array.isArray(e)){for(var n=0,r=e;n<r.length;n++){var t=r[n];t.parent(k);N.push(t)}}else{e.parent(k);N.push(e)}}return k};var we=function(e){var n=f!==e;f=e;if(n){ke(f)}return k};var ke=function(e){if(M){q().forEach((function(n){if(n.effect.setKeyframes){n.effect.setKeyframes(e)}else{var r=new KeyframeEffect(n.effect.target,e,n.effect.getTiming());n.effect=r}}))}else{Re()}};var xe=function(){L.forEach((function(e){return e()}));F.forEach((function(e){return e()}));var e=u;var n=c;var r=l;I.forEach((function(t){var a=t.classList;e.forEach((function(e){return a.add(e)}));n.forEach((function(e){return a.remove(e)}));for(var i in r){if(r.hasOwnProperty(i)){setStyleProperty(t,i,r[i])}}}))};var Ke=function(){ze();O.forEach((function(e){return e()}));W.forEach((function(e){return e()}));var e=C?1:0;var n=d;var r=m;var t=y;I.forEach((function(e){var a=e.classList;n.forEach((function(e){return a.add(e)}));r.forEach((function(e){return a.remove(e)}));for(var i in t){if(t.hasOwnProperty(i)){setStyleProperty(e,i,t[i])}}}));_.forEach((function(n){return n.c(e,k)}));R.forEach((function(n){return n.c(e,k)}));R.length=0;b=true;if(C){T=true}C=true};var _e=function(){if(p===0){return}p--;if(p===0){Ke();if(v){v.animationFinish()}}};var Re=function(n){if(n===void 0){n=true}V();var r=processKeyframes(f);I.forEach((function(t){if(r.length>0){var a=generateKeyframeRules(r);w=e!==undefined?e:generateKeyframeName(a);var i=createKeyframeStylesheet(w,a,t);D.push(i);setStyleProperty(t,"animation-duration","".concat(de(),"ms"));setStyleProperty(t,"animation-timing-function",le());setStyleProperty(t,"animation-delay","".concat(ye(),"ms"));setStyleProperty(t,"animation-fill-mode",se());setStyleProperty(t,"animation-direction",ve());var o=me()===Infinity?"infinite":me().toString();setStyleProperty(t,"animation-iteration-count",o);setStyleProperty(t,"animation-play-state","paused");if(n){setStyleProperty(t,"animation-name","".concat(i.id,"-alt"))}raf((function(){setStyleProperty(t,"animation-name",i.id||null)}))}}))};var Ie=function(){I.forEach((function(e){var n=e.animate(f,{id:K,delay:ye(),duration:de(),easing:le(),iterations:me(),fill:se(),direction:ve()});n.pause();j.push(n)}));if(j.length>0){j[0].onfinish=function(){_e()}}};var Ne=function(e){if(e===void 0){e=true}xe();if(f.length>0){if(M){Ie()}else{Re(e)}}s=true};var De=function(e){e=Math.min(Math.max(e,0),.9999);if(M){j.forEach((function(n){n.currentTime=n.effect.getComputedTiming().delay+de()*e;n.pause()}))}else{var n="-".concat(de()*e,"ms");I.forEach((function(e){if(f.length>0){setStyleProperty(e,"animation-delay",n);setStyleProperty(e,"animation-play-state","paused")}}))}};var Le=function(e){j.forEach((function(e){e.effect.updateTiming({delay:ye(),duration:de(),easing:le(),iterations:me(),fill:se(),direction:ve()})}));if(e!==undefined){De(e)}};var Fe=function(e,n){if(e===void 0){e=true}raf((function(){I.forEach((function(r){setStyleProperty(r,"animation-name",w||null);setStyleProperty(r,"animation-duration","".concat(de(),"ms"));setStyleProperty(r,"animation-timing-function",le());setStyleProperty(r,"animation-delay",n!==undefined?"-".concat(n*de(),"ms"):"".concat(ye(),"ms"));setStyleProperty(r,"animation-fill-mode",se()||null);setStyleProperty(r,"animation-direction",ve()||null);var t=me()===Infinity?"infinite":me().toString();setStyleProperty(r,"animation-iteration-count",t);if(e){setStyleProperty(r,"animation-name","".concat(w,"-alt"))}raf((function(){setStyleProperty(r,"animation-name",w||null)}))}))}))};var Oe=function(e,n,r){if(e===void 0){e=false}if(n===void 0){n=true}if(e){N.forEach((function(t){t.update(e,n,r)}))}if(M){Le(r)}else{Fe(n,r)}return k};var We=function(e,n){if(e===void 0){e=false}N.forEach((function(r){r.progressStart(e,n)}));Me();h=e;if(!s){Ne()}Oe(false,true,n);return k};var je=function(e){N.forEach((function(n){n.progressStep(e)}));De(e);return k};var He=function(e,n,r){h=false;N.forEach((function(t){t.progressEnd(e,n,r)}));if(r!==undefined){S=r}T=false;C=true;if(e===0){P=ve()==="reverse"?"normal":"reverse";if(P==="reverse"){C=false}if(M){Oe();De(1-n)}else{A=(1-n)*de()*-1;Oe(false,false)}}else if(e===1){if(M){Oe();De(n)}else{A=n*de()*-1;Oe(false,false)}}if(e!==undefined){J((function(){S=undefined;P=undefined;A=undefined}),{oneTimeCallback:true});if(!v){Qe()}}return k};var Me=function(){if(s){if(M){j.forEach((function(e){e.pause()}))}else{I.forEach((function(e){setStyleProperty(e,"animation-play-state","paused")}))}x=true}};var $e=function(){N.forEach((function(e){e.pause()}));Me();return k};var qe=function(){E=undefined;_e()};var ze=function(){if(E){clearTimeout(E)}};var Ze=function(){ze();raf((function(){I.forEach((function(e){if(f.length>0){setStyleProperty(e,"animation-play-state","running")}}))}));if(f.length===0||I.length===0){_e()}else{var e=ye()||0;var n=de()||0;var r=me()||1;if(isFinite(r)){E=setTimeout(qe,e+n*r+$)}animationEnd(I[0],(function(){ze();raf((function(){Be();raf(_e)}))}))}};var Be=function(){I.forEach((function(e){removeStyleProperty(e,"animation-duration");removeStyleProperty(e,"animation-delay");removeStyleProperty(e,"animation-play-state")}))};var Ge=function(){j.forEach((function(e){e.play()}));if(f.length===0||I.length===0){_e()}};var Je=function(){if(M){De(0);Le()}else{Fe()}};var Qe=function(e){return new Promise((function(n){if(e===null||e===void 0?void 0:e.sync){g=true;J((function(){return g=false}),{oneTimeCallback:true})}if(!s){Ne()}if(T){Je();T=false}if(b){p=N.length+1;b=false}J((function(){return n()}),{oneTimeCallback:true});N.forEach((function(e){e.play()}));if(M){Ge()}else{Ze()}x=false}))};var Ue=function(){N.forEach((function(e){e.stop()}));if(s){U();s=false}B()};var Ve=function(e,n){var r;var t=f[0];if(t!==undefined&&(t.offset===undefined||t.offset===0)){t[e]=n}else{f=__spreadArray([(r={offset:0},r[e]=n,r)],f,true)}return k};var Xe=function(e,n){var r;var t=f[f.length-1];if(t!==undefined&&(t.offset===undefined||t.offset===1)){t[e]=n}else{f=__spreadArray(__spreadArray([],f,true),[(r={offset:1},r[e]=n,r)],false)}return k};var Ye=function(e,n,r){return Ve(e,n).to(e,r)};return k={parentAnimation:v,elements:I,childAnimations:N,id:K,animationFinish:_e,from:Ve,to:Xe,fromTo:Ye,parent:Ce,play:Qe,pause:$e,stop:Ue,destroy:z,keyframes:we,addAnimation:be,addElement:Te,update:Oe,fill:ge,direction:he,iterations:Ae,duration:Se,easing:Pe,delay:Ee,getWebAnimations:q,getKeyframes:pe,getFill:se,getDirection:ve,getDelay:ye,getIterations:me,getEasing:le,getDuration:de,afterAddRead:ee,afterAddWrite:ne,afterClearStyles:ce,afterStyles:ue,afterRemoveClass:fe,afterAddClass:oe,beforeAddRead:X,beforeAddWrite:Y,beforeClearStyles:ie,beforeStyles:ae,beforeRemoveClass:te,beforeAddClass:re,onFinish:J,isRunning:G,progressStart:We,progressStep:je,progressEnd:He}};export{createAnimation as c};
|