const n="ionViewWillEnter",e="ionViewDidEnter",i="ionViewWillLeave",a="ionViewDidLeave",t="ionViewWillUnload",o=()=>import("./chunk-7b9a8269.js"),s=()=>import("./chunk-ce800c00.js");function r(n){return new Promise((e,i)=>{n.queue.write(()=>{!function(n){const e=n.enteringEl,i=n.leavingEl;(function(e,i,a){void 0!==e&&(e.style.zIndex="back"===n.direction?"99":"101"),void 0!==i&&(i.style.zIndex="100")})(e,i),n.showGoBack?e.classList.add("can-go-back"):e.classList.remove("can-go-back"),p(e,!1),i&&p(i,!1)}(n),async function(n){const e=await async function(n){if(n.leavingEl&&n.animated&&0!==n.duration)return n.animationBuilder?n.animationBuilder:"ios"===n.mode?(await o()).iosTransitionAnimation:(await s()).mdTransitionAnimation}(n);return e?async function(n,e){await l(e,!0);const i=await import("./chunk-3532a9eb.js").then(i=>i.create(n,e.baseEl,e));return d(e.enteringEl,e.leavingEl),await function(n,e){const i=e.progressCallback,a=new Promise(e=>n.onFinish(e));return i?(n.progressStart(),i(n)):n.play(),a}(i,e),e.progressCallback&&e.progressCallback(void 0),i.hasCompleted&&m(e.enteringEl,e.leavingEl),{hasCompleted:i.hasCompleted,animation:i}}(e,n):async function(n){const e=n.enteringEl,i=n.leavingEl;return await l(n,!1),d(e,i),m(e,i),{hasCompleted:!0}}(n)}(n).then(i=>{i.animation&&i.animation.destroy(),c(n),e(i)},e=>{c(n),i(e)})})})}function c(n){const e=n.leavingEl;n.enteringEl.classList.remove("ion-page-invisible"),void 0!==e&&e.classList.remove("ion-page-invisible")}async function l(n,e){const i=(void 0!==n.deepWait?n.deepWait:e)?[g(n.enteringEl),g(n.leavingEl)]:[f(n.enteringEl),f(n.leavingEl)];await Promise.all(i),await async function(n,e){n&&await n(e)}(n.viewIsReady,n.enteringEl)}function d(e,a){u(a,i),u(e,n)}function m(n,i){u(n,e),u(i,a)}function u(n,e){if(n){const i=new CustomEvent(e,{bubbles:!1,cancelable:!1});n.dispatchEvent(i)}}function f(n){return n&&n.componentOnReady?n.componentOnReady():Promise.resolve()}async function g(n){const e=n;if(e){if(null!=e.componentOnReady&&null!=await e.componentOnReady())return;await Promise.all(Array.from(e.children).map(g))}}function p(n,e){e?(n.setAttribute("aria-hidden","true"),n.classList.add("ion-page-hidden")):(n.hidden=!1,n.removeAttribute("aria-hidden"),n.classList.remove("ion-page-hidden"))}async function w(n,e,i,a,t){if(n)return n.attachViewToDom(e,i,t,a);if("string"!=typeof i&&!(i instanceof HTMLElement))throw new Error("framework delegate is missing");const o="string"==typeof i?e.ownerDocument&&e.ownerDocument.createElement(i):i;return a&&a.forEach(n=>o.classList.add(n)),t&&Object.assign(o,t),e.appendChild(o),o.componentOnReady&&await o.componentOnReady(),o}function v(n,e){if(e){if(n)return n.removeViewFromDom(e.parentElement,e);e.remove()}return Promise.resolve()}export{w as a,u as b,t as c,i as d,a as e,r as f,p as g,g as h,v as i};