/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
import{e as i,B as n}from"./p-40ff71fd.js";import{c as e}from"./p-1373e401.js";const a="ionViewWillEnter",o="ionViewDidEnter",s="ionViewWillLeave",t="ionViewDidLeave",r="ionViewWillUnload",c=n=>new Promise(((e,a)=>{i((()=>{p(n),d(n).then((i=>{i.animation&&i.animation.destroy(),w(n),e(i)}),(i=>{w(n),a(i)}))}))})),p=i=>{const n=i.enteringEl,e=i.leavingEl;j(n,e,i.direction),i.showGoBack?n.classList.add("can-go-back"):n.classList.remove("can-go-back"),V(n,!1),n.style.setProperty("pointer-events","none"),e&&(V(e,!1),e.style.setProperty("pointer-events","none"))},d=async i=>{const e=await l(i);return e&&n.isBrowser?m(e,i):v(i)},w=i=>{const n=i.enteringEl,e=i.leavingEl;n.classList.remove("ion-page-invisible"),n.style.removeProperty("pointer-events"),void 0!==e&&(e.classList.remove("ion-page-invisible"),e.style.removeProperty("pointer-events"))},l=async i=>{if(i.leavingEl&&i.animated&&0!==i.duration)return i.animationBuilder?i.animationBuilder:"ios"===i.mode?(await __sc_import_ionic("./p-33225c63.js")).iosTransitionAnimation:(await __sc_import_ionic("./p-2d64f7c2.js")).mdTransitionAnimation},m=async(i,n)=>{await u(n,!0);const e=i(n.baseEl,n);g(n.enteringEl,n.leavingEl);const a=await f(e,n);return n.progressCallback&&n.progressCallback(void 0),a&&y(n.enteringEl,n.leavingEl),{hasCompleted:a,animation:e}},v=async i=>{const n=i.enteringEl,e=i.leavingEl;return await u(i,!1),g(n,e),y(n,e),{hasCompleted:!0}},u=async(i,n)=>{const e=(void 0!==i.deepWait?i.deepWait:n)?[P(i.enteringEl),P(i.leavingEl)]:[h(i.enteringEl),h(i.leavingEl)];await Promise.all(e),await b(i.viewIsReady,i.enteringEl)},b=async(i,n)=>{i&&await i(n)},f=(i,n)=>{const e=n.progressCallback,a=new Promise((n=>{i.onFinish((i=>n(1===i)))}));return e?(i.progressStart(!0),e(i)):i.play(),a},g=(i,n)=>{_(n,s),_(i,a)},y=(i,n)=>{_(i,o),_(n,t)},_=(i,n)=>{if(i){const e=new CustomEvent(n,{bubbles:!1,cancelable:!1});i.dispatchEvent(e)}},h=i=>i?new Promise((n=>e(i,n))):Promise.resolve(),P=async i=>{const n=i;if(n){if(null!=n.componentOnReady&&null!=await n.componentOnReady())return;await Promise.all(Array.from(n.children).map(P))}},V=(i,n)=>{n?(i.setAttribute("aria-hidden","true"),i.classList.add("ion-page-hidden")):(i.hidden=!1,i.removeAttribute("aria-hidden"),i.classList.remove("ion-page-hidden"))},j=(i,n,e)=>{void 0!==i&&(i.style.zIndex="back"===e?"99":"101"),void 0!==n&&(n.style.zIndex="100")},k=i=>{if(i.classList.contains("ion-page"))return i;return i.querySelector(":scope > .ion-page, :scope > ion-nav, :scope > ion-tabs")||i};export{a as L,o as a,s as b,t as c,r as d,P as e,k as g,_ as l,V as s,c as t}