@deijose/nix-ionic 0.1.8-beta.2 → 0.1.8-beta.4
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.
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ionic-nix/IonRouterOutlet.ts
|
|
3
|
-
*
|
|
4
|
-
* Bridge 100% nativo. Genera exactamente el mismo DOM que Vanilla Ionic.
|
|
5
|
-
* Delegamos el view-caching y los ciclos de vida a los Eventos del DOM de ion-router-outlet.
|
|
6
|
-
*/
|
|
7
1
|
import { NixComponent } from "@deijose/nix-js";
|
|
8
2
|
import type { NixTemplate } from "@deijose/nix-js";
|
|
9
3
|
import { type PageLifecycle } from "./lifecycle";
|
|
10
4
|
export declare function useRouter(): {
|
|
11
|
-
navigate: (path: string) => void;
|
|
5
|
+
navigate: (path: string, direction?: "forward" | "back" | "root") => void;
|
|
12
6
|
replace: (path: string) => void;
|
|
13
7
|
back: () => void;
|
|
14
8
|
};
|
|
15
|
-
export declare function IonBackButton(defaultHref?: string): NixTemplate;
|
|
9
|
+
export declare function IonBackButton(defaultHref?: string | undefined): NixTemplate;
|
|
16
10
|
export interface PageContext {
|
|
17
11
|
lc: PageLifecycle;
|
|
18
12
|
params: Record<string, string>;
|
|
@@ -24,8 +18,6 @@ export interface RouteDefinition {
|
|
|
24
18
|
export declare class IonRouterOutlet extends NixComponent {
|
|
25
19
|
private routes;
|
|
26
20
|
constructor(routes: RouteDefinition[]);
|
|
27
|
-
private
|
|
28
|
-
private _pathToTag;
|
|
29
|
-
private _registerCustomElements;
|
|
21
|
+
private _pathToRouteId;
|
|
30
22
|
render(): NixTemplate;
|
|
31
23
|
}
|
package/dist/lib/nix-ionic.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let e=require("@deijose/nix-js"),t=require("@ionic/core/components"),n=require("@ionic/core/components/ion-router.js"),r=require("@ionic/core/components/ion-route.js"),i=require("@ionic/core/components/ion-router-outlet.js"),a=require("@ionic/core/components/ion-back-button.js");function o(){return{willEnter:(0,e.signal)(0),didEnter:(0,e.signal)(0),willLeave:(0,e.signal)(0),didLeave:(0,e.signal)(0)}}var s=class extends e.NixComponent{__lc;constructor(e){super(),this.__lc=e}onInit(){let t=this.__lc;this.ionViewWillEnter&&(0,e.watch)(t.willEnter,this.ionViewWillEnter.bind(this)),this.ionViewDidEnter&&(0,e.watch)(t.didEnter,this.ionViewDidEnter.bind(this)),this.ionViewWillLeave&&(0,e.watch)(t.willLeave,this.ionViewWillLeave.bind(this)),this.ionViewDidLeave&&(0,e.watch)(t.didLeave,this.ionViewDidLeave.bind(this))}};function c(t,n){(0,e.watch)(t.willEnter,n)}function l(t,n){(0,e.watch)(t.didEnter,n)}function u(t,n){(0,e.watch)(t.willLeave,n)}function d(t,n){(0,e.watch)(t.didLeave,n)}var f=!1;function p(e={}){f||=((0,t.initialize)(e),(0,n.defineCustomElement)(),(0,r.defineCustomElement)(),(0,i.defineCustomElement)(),(0,a.defineCustomElement)(),!0)}function m(){let e=document.querySelector("ion-router");return{navigate:t=>{e?.push(t,"forward")},replace:t=>{e?.push(t,"root")},back:()=>{e?.back()}}}function h(e){return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,n){let i=document.createElement("ion-back-button");return e&&i.setAttribute("default-href",e),t.insertBefore(i,n),()=>i.remove()}}}var g=class extends e.NixComponent{routes;constructor(e){super(),this.routes=e,this._registerCustomElements()}_extractParams(e,t){let n={},i=e.split("/"),r=t.split("/");for(let e=0;e<i.length;e++)i[e]?.startsWith(":")&&(n[i[e].slice(1)]=r[e]??"");return n}_pathToTag(e){return e&&"/"!==e?`nix-page-${e.replace(/\/:?[^/]+/g,e=>"-"+e.replace(/\//g,"").replace(/:/g,"")).replace(/^\//,"").replace(/\//g,"-")}`:"nix-page-home"}_registerCustomElements(){let e=this;for(let t of this.routes){if("*"===t.path)continue;let n=this._pathToTag(t.path);customElements.get(n)||customElements.define(n,class extends HTMLElement{_handle=null;connectedCallback(){if(this._handle)return;this.classList.add("ion-page");let n=o();this.addEventListener("ionViewWillEnter",()=>n.willEnter.update(e=>e+1)),this.addEventListener("ionViewDidEnter",()=>n.didEnter.update(e=>e+1)),this.addEventListener("ionViewWillLeave",()=>n.willLeave.update(e=>e+1)),this.addEventListener("ionViewDidLeave",()=>n.didLeave.update(e=>e+1));let i=e._extractParams(t.path,location.pathname),r=t.component({lc:n,params:i});if("render"in r&&"function"==typeof r.render){let e=r;e.onInit?.();let t=e.render()._render(this,null),n=e.onMount?.();this._handle={unmount:()=>{e.onUnmount?.(),"function"==typeof n&&n(),t()}}}else this._handle={unmount:r._render(this,null)}}disconnectedCallback(){this._handle?.unmount(),this._handle=null}})}}render(){let e=this;return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,n){let i=document.createElement("ion-router");i.setAttribute("use-hash","false"),i.innerHTML=e.routes.filter(e=>"*"!==e.path).map(t=>`<ion-route url="${t.path}" component="${e._pathToTag(t.path)}"></ion-route>`).join("");let r=document.createElement("ion-router-outlet");return t.insertBefore(i,n),t.insertBefore(r,n),()=>{i.remove(),r.remove()}}}}};exports.IonBackButton=h,exports.IonPage=s,exports.IonRouterOutlet=g,exports.createPageLifecycle=o,exports.setupNixIonic=p,exports.useIonViewDidEnter=l,exports.useIonViewDidLeave=d,exports.useIonViewWillEnter=c,exports.useIonViewWillLeave=u,exports.useRouter=m;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});let e=require("@deijose/nix-js");require("@ionic/core/css/core.css"),require("@ionic/core/css/normalize.css"),require("@ionic/core/css/structure.css"),require("@ionic/core/css/typography.css"),require("@ionic/core/css/padding.css"),require("@ionic/core/css/flex-utils.css"),require("@ionic/core/css/display.css");let t=require("@ionic/core/components"),n=require("@ionic/core/components/ion-app.js"),r=require("@ionic/core/components/ion-header.js"),i=require("@ionic/core/components/ion-toolbar.js"),a=require("@ionic/core/components/ion-title.js"),o=require("@ionic/core/components/ion-content.js"),s=require("@ionic/core/components/ion-buttons.js"),c=require("@ionic/core/components/ion-note.js"),l=require("@ionic/core/components/ion-spinner.js"),u=require("@ionic/core/components/ion-list.js"),d=require("@ionic/core/components/ion-item.js"),f=require("@ionic/core/components/ion-label.js"),p=require("@ionic/core/components/ion-card.js"),m=require("@ionic/core/components/ion-card-header.js"),h=require("@ionic/core/components/ion-card-title.js"),g=require("@ionic/core/components/ion-card-subtitle.js"),ee=require("@ionic/core/components/ion-card-content.js"),te=require("@ionic/core/components/ion-ripple-effect.js"),ne=require("@ionic/core/components/ion-router.js"),re=require("@ionic/core/components/ion-route.js"),ie=require("@ionic/core/components/ion-router-outlet.js"),ae=require("@ionic/core/components/ion-back-button.js");function oe(){return{willEnter:(0,e.signal)(0),didEnter:(0,e.signal)(0),willLeave:(0,e.signal)(0),didLeave:(0,e.signal)(0)}}var se=class extends e.NixComponent{__lc;constructor(e){super(),this.__lc=e}onInit(){let t=this.__lc;this.ionViewWillEnter&&(0,e.watch)(t.willEnter,this.ionViewWillEnter.bind(this)),this.ionViewDidEnter&&(0,e.watch)(t.didEnter,this.ionViewDidEnter.bind(this)),this.ionViewWillLeave&&(0,e.watch)(t.willLeave,this.ionViewWillLeave.bind(this)),this.ionViewDidLeave&&(0,e.watch)(t.didLeave,this.ionViewDidLeave.bind(this))}};function ce(t,n){(0,e.watch)(t.willEnter,n)}function le(t,n){(0,e.watch)(t.didEnter,n)}function ue(t,n){(0,e.watch)(t.willLeave,n)}function de(t,n){(0,e.watch)(t.didLeave,n)}var fe="ionicons",_={hydratedSelectorName:"hydrated",lazyLoad:!1,updatable:!0},pe=Object.defineProperty,me=(e,t)=>{for(var n in t)pe(e,n,{get:t[n],enumerable:!0})},v=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},he=(e,t)=>{let n={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};n.$onReadyPromise$=new Promise(e=>n.$onReadyResolve$=e),e["s-p"]=[],e["s-rc"]=[];let o=n;return e.__stencil__getHostRef=()=>o,o},ge=(e,t)=>t in e,y=(e,t)=>(0,console.error)(e,t),b=new Map,_e="slot-fb{display:contents}slot-fb[hidden]{display:none}",ve="http://www.w3.org/1999/xlink",x=typeof window<"u"?window:{},ye=x.HTMLElement||class{},S={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,o)=>e.addEventListener(t,n,o),rel:(e,t,n,o)=>e.removeEventListener(t,n,o),ce:(e,t)=>new CustomEvent(e,t)},be=e=>Promise.resolve(e),xe=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch{}return!1})(),C=!1,Se=[],Ce=[],we=(e,t)=>n=>{e.push(n),C||(C=!0,t&&4&S.$flags$?E(T):S.raf(T))},w=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){y(e)}e.length=0},T=()=>{w(Se),w(Ce),(C=Se.length>0)&&S.raf(T)},E=e=>be().then(e),Te=we(Ce,!0),Ee=e=>{let t=new URL(e,S.$resourcesUrl$);return t.origin===x.location.origin?t.pathname:t.href},D=e=>"object"===(e=typeof e)||"function"===e;function De(e){return(e.head?.querySelector('meta[name="csp-nonce"]'))?.getAttribute("content")??void 0}var Oe=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");me({},{err:()=>k,map:()=>ke,ok:()=>O,unwrap:()=>Ae,unwrapErr:()=>je});var O=e=>({isOk:!0,isErr:!1,value:e}),k=e=>({isOk:!1,isErr:!0,value:e});function ke(e,t){if(e.isOk){let n=t(e.value);return n instanceof Promise?n.then(e=>O(e)):O(n)}if(e.isErr){let t=e.value;return k(t)}throw"should never get here"}var A,Ae=e=>{if(e.isOk)return e.value;throw e.value},je=e=>{if(e.isErr)return e.value;throw e.value};function Me(e){let t=this.attachShadow({mode:"open"});void 0===A&&(A=null),A&&t.adoptedStyleSheets.push(A)}var j=(e,t="")=>()=>{},M=new WeakMap,Ne=(e,t,n)=>{let o=b.get(e);xe&&n?(o||=new CSSStyleSheet,"string"==typeof o?o=t:o.replaceSync(t)):o=t,b.set(e,o)},Pe=(e,t,n)=>{let o=N(t),i=b.get(o);if(!x.document)return o;if(e=11===e.nodeType?e:x.document,i)if("string"==typeof i){e=e.head||e;let n,r=M.get(e);if(r||M.set(e,r=new Set),!r.has(o)){{n=x.document.createElement("style"),n.innerHTML=i;let o=S.$nonce$??De(x.document);if(null!=o&&n.setAttribute("nonce",o),!(1&t.$flags$))if("HEAD"===e.nodeName){let t=e.querySelectorAll("link[rel=preconnect]"),o=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(n,o?.parentNode===e?o:null)}else if("host"in e)if(xe){let t=new CSSStyleSheet;t.replaceSync(i),e.adoptedStyleSheets.unshift(t)}else{let t=e.querySelector("style");t?t.innerHTML=i+t.innerHTML:e.prepend(n)}else e.append(n);1&t.$flags$&&e.insertBefore(n,null)}4&t.$flags$&&(n.innerHTML+=_e),r&&r.add(o)}}else e.adoptedStyleSheets.includes(i)||e.adoptedStyleSheets.push(i);return o},Fe=e=>{let t=e.$cmpMeta$,n=e.$hostElement$,o=t.$flags$,i=j("attachStyles",t.$tagName$),r=Pe(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&o&&(n["s-sc"]=r,n.classList.add(r+"-h")),i()},N=(e,t)=>"sc-"+e.$tagName$,P=(e,t,...n)=>{let o=null,i=null,r=!1,s=!1,l=[],a=t=>{for(let n=0;n<t.length;n++)o=t[n],Array.isArray(o)?a(o):null!=o&&"boolean"!=typeof o&&((r="function"!=typeof e&&!D(o))&&(o=String(o)),r&&s?l[l.length-1].$text$+=o:l.push(r?F(null,o):o),s=r)};if(a(n),t){t.key&&(i=t.key);{let e=t.className||t.class;e&&(t.class="object"==typeof e?Object.keys(e).filter(t=>e[t]).join(" "):e)}}let c=F(e,null);return c.$attrs$=t,l.length>0&&(c.$children$=l),c.$key$=i,c},F=(e,t)=>{let n={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null};return n},I={},Ie=e=>e&&e.$tag$===I,L=e=>{let t=Oe(e);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};L("::slotted"),L(":host"),L(":host-context");var R=(e,t,n)=>null==e||D(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?String(e):e,Le=(e,t,n)=>{let o=S.ce(t,n);return e.dispatchEvent(o),o},z=(e,t,n,o,i,r,s)=>{if(n===o)return;let l=ge(e,t),a=t.toLowerCase();if("class"===t){let t=e.classList,i=ze(n),r=ze(o);t.remove(...i.filter(e=>e&&!r.includes(e))),t.add(...r.filter(e=>e&&!i.includes(e)))}else if("style"===t){for(let t in n)(!o||null==o[t])&&(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(let t in o)(!n||o[t]!==n[t])&&(t.includes("-")?e.style.setProperty(t,o[t]):e.style[t]=o[t])}else if("key"!==t)if("ref"===t)o&&o(e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){let s=D(o);if(l||s&&null!==o)try{if(e.tagName.includes("-"))e[t]!==o&&(e[t]=o);else{let i=o??"";"list"===t?l=!1:(null==n||e[t]!=i)&&("function"==typeof e.__lookupSetter__(t)?e[t]=i:e.setAttribute(t,i))}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),null==o||!1===o?(!1!==o||""===e.getAttribute(t))&&(c?e.removeAttributeNS(ve,t):e.removeAttribute(t)):(!l||4&r||i)&&!s&&1===e.nodeType&&(o=!0===o?"":o,c?e.setAttributeNS(ve,t,o):e.setAttribute(t,o))}else if(t="-"===t[2]?t.slice(3):ge(x,a)?a.slice(2):a[2]+t.slice(3),n||o){let i=t.endsWith(B);t=t.replace(Be,""),n&&S.rel(e,t,n,i),o&&S.ael(e,t,o,i)}},Re=/\s/,ze=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(Re):[]),B="Capture",Be=RegExp(B+"$"),Ve=(e,t,n,o)=>{let i=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,r=e&&e.$attrs$||{},s=t.$attrs$||{};for(let e of He(Object.keys(r)))e in s||z(i,e,r[e],void 0,n,t.$flags$);for(let e of He(Object.keys(s)))z(i,e,r[e],s[e],n,t.$flags$)};function He(e){return e.includes("ref")?[...e.filter(e=>"ref"!==e),"ref"]:e}var V,J,Ct,Ue=!1,H=(e,t,n)=>{let o,i,r=t.$children$[n],s=0;if(null!==r.$text$)o=r.$elm$=x.document.createTextNode(r.$text$);else{if(!x.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(o=r.$elm$=x.document.createElement(r.$tag$),Ve(null,r,Ue),r.$children$)for(s=0;s<r.$children$.length;++s)i=H(e,r,s),i&&o.appendChild(i)}return o["s-hn"]=V,o},We=(e,t,n,o,i,r)=>{let s,l=e;for(l.shadowRoot&&l.tagName===V&&(l=l.shadowRoot);i<=r;++i)o[i]&&(s=H(null,n,i),s&&(o[i].$elm$=s,G(l,s,t)))},Ge=(e,t,n)=>{for(let o=t;o<=n;++o){let t=e[o];if(t){let e=t.$elm$;qe(t),e&&e.remove()}}},Ke=(e,t,n,o,i=!1)=>{let r,s,l=0,a=0,c=0,u=0,d=t.length-1,$=t[0],m=t[d],h=o.length-1,f=o[0],p=o[h];for(;l<=d&&a<=h;)if(null==$)$=t[++l];else if(null==m)m=t[--d];else if(null==f)f=o[++a];else if(null==p)p=o[--h];else if(U($,f,i))W($,f,i),$=t[++l],f=o[++a];else if(U(m,p,i))W(m,p,i),m=t[--d],p=o[--h];else if(U($,p,i))W($,p,i),G(e,$.$elm$,m.$elm$.nextSibling),$=t[++l],p=o[--h];else if(U(m,f,i))W(m,f,i),G(e,m.$elm$,$.$elm$),m=t[--d],f=o[++a];else{for(c=-1,u=l;u<=d;++u)if(t[u]&&null!==t[u].$key$&&t[u].$key$===f.$key$){c=u;break}c>=0?(s=t[c],s.$tag$===f.$tag$?(W(s,f,i),t[c]=void 0,r=s.$elm$):r=H(t&&t[a],n,c),f=o[++a]):(r=H(t&&t[a],n,a),f=o[++a]),r&&G($.$elm$.parentNode,r,$.$elm$)}l>d?We(e,null==o[h+1]?null:o[h+1].$elm$,n,o,a,h):a>h&&Ge(t,l,d)},U=(e,t,n=!1)=>e.$tag$===t.$tag$&&(n?(n&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$),W=(e,t,n=!1)=>{let o=t.$elm$=e.$elm$,i=e.$children$,r=t.$children$,s=t.$text$;null===s?(Ve(e,t,Ue),null!==i&&null!==r?Ke(o,i,t,r,n):null===r?!n&&_.updatable&&null!==i&&Ge(i,0,i.length-1):(null!==e.$text$&&(o.textContent=""),We(o,null,t,r,0,r.length-1))):e.$text$!==s&&(o.data=s)},qe=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(qe)},G=(e,t,n)=>e?.insertBefore(t,n),Je=(e,t,n=!1)=>{let o=e.$hostElement$,i=e.$cmpMeta$,r=e.$vnode$||F(null,null),s=Ie(t)?t:P(null,null,t);if(V=o.tagName,i.$attrsToReflect$&&(s.$attrs$=s.$attrs$||{},i.$attrsToReflect$.map(([e,t])=>s.$attrs$[t]=o[e])),n&&s.$attrs$)for(let e of Object.keys(s.$attrs$))o.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(s.$attrs$[e]=o[e]);s.$tag$=null,s.$flags$|=4,e.$vnode$=s,s.$elm$=r.$elm$=o.shadowRoot||o,W(r,s,n)},Ye=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){let n=t["s-p"].push(new Promise(o=>e.$onRenderResolve$=()=>{t["s-p"].splice(n-1,1),o()}))}},K=(e,t)=>{if(e.$flags$|=16,!(4&e.$flags$))return Ye(e,e.$ancestorComponent$),Te(()=>Xe(e,t));e.$flags$|=512},Xe=(e,t)=>{let n,o=e.$hostElement$,i=j("scheduleUpdate",e.$cmpMeta$.$tagName$),r=o;if(!r)throw Error(`Can't render component <${o.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return n=q(r,t?"componentWillLoad":"componentWillUpdate",void 0,o),n=Ze(n,()=>q(r,"componentWillRender",void 0,o)),i(),Ze(n,()=>$e(e,r,t))},Ze=(e,t)=>Qe(e)?e.then(t).catch(e=>{console.error(e),t()}):t(),Qe=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,$e=async(e,t,n)=>{let o=e.$hostElement$,i=j("update",e.$cmpMeta$.$tagName$),r=o["s-rc"];n&&Fe(e);let s=j("render",e.$cmpMeta$.$tagName$);et(e,t,o,n),r&&(r.map(e=>e()),o["s-rc"]=void 0),s(),i();{let t=o["s-p"]??[],n=()=>tt(e);0===t.length?n():(Promise.all(t).then(n),e.$flags$|=4,t.length=0)}},et=(e,t,n,o)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,Je(e,t,o)}catch(t){y(t,e.$hostElement$)}return null},tt=e=>{let t=e.$cmpMeta$.$tagName$,n=e.$hostElement$,o=j("postUpdate",t),i=n,r=e.$ancestorComponent$;q(i,"componentDidRender",void 0,n),64&e.$flags$?(q(i,"componentDidUpdate",void 0,n),o()):(e.$flags$|=64,rt(n),q(i,"componentDidLoad",void 0,n),o(),e.$onReadyResolve$(n),r||nt()),e.$onRenderResolve$&&=void e.$onRenderResolve$(),512&e.$flags$&&E(()=>K(e,!1)),e.$flags$&=-517},nt=e=>{E(()=>Le(x,"appload",{detail:{namespace:fe}}))},q=(e,t,n,o)=>{if(e&&e[t])try{return e[t](n)}catch(e){y(e,o)}},rt=e=>e.classList.add(_.hydratedSelectorName??"hydrated"),it=(e,t)=>v(e).$instanceValues$.get(t),at=(e,t,n,o)=>{let i=v(e),r=e,s=i.$instanceValues$.get(t),l=i.$flags$,a=r;if(!((n=R(n,o.$members$[t][0]))===s||Number.isNaN(s)&&Number.isNaN(n))){if(i.$instanceValues$.set(t,n),o.$watchers$&&128&l){let e=o.$watchers$[t];e&&e.map(e=>{try{a[e](n,s,t)}catch(e){y(e,r)}})}if(2==(18&l)){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(n,s,t))return;K(i,!1)}}},ot=(e,t,n)=>{let o=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);let n=Object.entries(t.$members$??{});n.map(([e,[n]])=>{if(31&n||32&n){let{get:i,set:r}=Object.getOwnPropertyDescriptor(o,e)||{};i&&(t.$members$[e][0]|=2048),r&&(t.$members$[e][0]|=4096),Object.defineProperty(o,e,{get(){return i?i.apply(this):it(this,e)},configurable:!0,enumerable:!0}),Object.defineProperty(o,e,{set(o){let i=v(this);if(r){let s=32&n?this[e]:i.$hostElement$[e];return void 0===s&&i.$instanceValues$.get(e)?o=i.$instanceValues$.get(e):!i.$instanceValues$.get(e)&&s&&i.$instanceValues$.set(e,s),r.apply(this,[R(o,n)]),o=32&n?this[e]:i.$hostElement$[e],void at(this,e,o,t)}at(this,e,o,t)}})}});{let i=new Map;o.attributeChangedCallback=function(e,n,r){S.jmp(()=>{let s=i.get(e);if(!this.hasOwnProperty(s)||!_.lazyLoad){if(o.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==r)return;if(null==s){let o=v(this)?.$flags$;if(o&&!(8&o)&&128&o&&r!==n){let o=this;(t.$watchers$?.[e])?.forEach(t=>{null!=o[t]&&o[t].call(o,r,n,e)})}return}}let l=Object.getOwnPropertyDescriptor(o,s);(r=(null!==r||"boolean"!=typeof this[s])&&r)!==this[s]&&(!l.get||l.set)&&(this[s]=r)})},e.observedAttributes=Array.from(new Set([...Object.keys(t.$watchers$??{}),...n.filter(([e,t])=>15&t[0]).map(([e,n])=>{var o;let r=n[1]||e;return i.set(r,e),512&n[0]&&(null==(o=t.$attrsToReflect$)||o.push([e,r])),r})]))}}return e},st=async(e,t,n,o)=>{let i;if(!(32&t.$flags$)){t.$flags$|=32;{i=e.constructor;let n=e.localName;customElements.whenDefined(n).then(()=>t.$flags$|=128)}if(i&&i.style){let e;"string"==typeof i.style&&(e=i.style);let t=N(n);if(!b.has(t)){let o=j("registerStyles",n.$tagName$);Ne(t,e,!!(1&n.$flags$)),o()}}}let r=t.$ancestorComponent$,s=()=>K(t,!0);r&&r["s-rc"]?r["s-rc"].push(s):s()},ct=e=>{if(!(1&S.$flags$)){let t=v(e),n=t.$cmpMeta$,o=j("connectedCallback",n.$tagName$);if(1&t.$flags$)t?.$lazyInstance$||t?.$onReadyPromise$&&t.$onReadyPromise$.then(()=>{});else{t.$flags$|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Ye(t,t.$ancestorComponent$=n);break}}n.$members$&&Object.entries(n.$members$).map(([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){let n=e[t];delete e[t],e[t]=n}}),_.initializeNextTick?E(()=>st(e,t,n)):st(e,t,n)}o()}},lt=async e=>{1&S.$flags$||v(e),M.has(e)&&M.delete(e),e.shadowRoot&&M.has(e.shadowRoot)&&M.delete(e.shadowRoot)},ut=(e,t)=>{let n={$flags$:t[0],$tagName$:t[1]};n.$members$=t[2],n.$watchers$=e.$watchers$,n.$attrsToReflect$=[];let o=e.prototype.connectedCallback,i=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){he(this,n)},connectedCallback(){this.__hasHostListenerAttached||=(v(this),!0),ct(this),o&&o.call(this)},disconnectedCallback(){lt(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${n.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Me.call(this,n)}}),e.is=n.$tagName$,ot(e,n)},dt=()=>{if(typeof window>"u")return new Map;if(!J){let e=window;e.Ionicons=e.Ionicons||{},J=e.Ionicons.map=e.Ionicons.map||new Map}return J},ft=e=>{let t=Y(e.src);return t||(t=mt(e.name,e.icon,e.mode,e.ios,e.md),t?pt(t,e):e.icon&&(t=Y(e.icon),t||(t=Y(e.icon[e.mode]),t))?t:null)},pt=(e,t)=>{let n=dt().get(e);if(n)return n;try{return Ee(`svg/${e}.svg`)}catch(n){console.log("e",n),console.warn(`[Ionicons Warning]: Could not load icon with name "${e}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`,t)}},mt=(e,t,n,o,i)=>(n="ios"===(n&&Z(n))?"ios":"md",o&&"ios"===n?e=Z(o):i&&"md"===n?e=Z(i):(!e&&t&&!ht(t)&&(e=t),X(e)&&(e=Z(e))),X(e)&&""!==e.trim()&&""===e.replace(/[a-z]|-|\d/gi,"")?e:null),Y=e=>X(e)&&(e=e.trim(),ht(e))?e:null,ht=e=>e.length>0&&/(\/|\.)/.test(e),X=e=>"string"==typeof e,Z=e=>e.toLowerCase(),gt=(e,t=[])=>{let n={};return t.forEach(t=>{e.hasAttribute(t)&&(null!==e.getAttribute(t)&&(n[t]=e.getAttribute(t)),e.removeAttribute(t))}),n},_t=e=>e&&""!==e.dir?"rtl"===e.dir.toLowerCase():"rtl"===(null==document?void 0:document.dir.toLowerCase()),vt=e=>{let t=document.createElement("div");t.innerHTML=e;for(let e=t.childNodes.length-1;e>=0;e--)"svg"!==t.childNodes[e].nodeName.toLowerCase()&&t.removeChild(t.childNodes[e]);let n=t.firstElementChild;if(n&&"svg"===n.nodeName.toLowerCase()){let e=n.getAttribute("class")||"";if(n.setAttribute("class",(e+" s-ion-icon").trim()),yt(n))return t.innerHTML}return""},yt=e=>{if(1===e.nodeType){if("script"===e.nodeName.toLowerCase())return!1;for(let t=0;t<e.attributes.length;t++){let n=e.attributes[t].name;if(X(n)&&0===n.toLowerCase().indexOf("on"))return!1}for(let t=0;t<e.childNodes.length;t++)if(!yt(e.childNodes[t]))return!1}return!0},bt=e=>e.startsWith("data:image/svg+xml"),xt=e=>-1!==e.indexOf(";utf8,"),Q=new Map,St=new Map;function $(e){return Q.set(e,""),""}var wt=(e,t)=>St.get(e)||(typeof fetch<"u"&&typeof document<"u"?bt(e)&&xt(e)?Promise.resolve(Tt(e)):Et(e,t):Promise.resolve($(e)));function Tt(e){Ct||=new DOMParser;let t=Ct.parseFromString(e,"text/html").querySelector("svg");if(t)return Q.set(e,t.outerHTML),t.outerHTML;throw Error(`Could not parse svg from ${e}`)}function Et(e,t){let n=fetch(e).then(n=>n.text().then(n=>{n&&!1!==t&&(n=vt(n));let o=n||"";return Q.set(e,o),o}).catch(()=>$(e))).catch(()=>$(e));return St.set(e,n),n}var Dt=":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}",Ot=ut(class extends ye{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.iconName=null,this.inheritedAttributes={},this.didLoadIcon=!1,this.isVisible=!1,this.mode=kt(),this.lazy=!1,this.sanitize=!0}componentWillLoad(){this.inheritedAttributes=gt(this.el,["aria-label"])}connectedCallback(){this.waitUntilVisible(this.el,"50px",()=>{this.isVisible=!0,this.loadIcon()})}componentDidLoad(){this.didLoadIcon||this.loadIcon()}disconnectedCallback(){this.io&&=void this.io.disconnect()}waitUntilVisible(e,t,n){if(!(this.lazy&&typeof window<"u"&&window.IntersectionObserver))return n();let o=this.io=new window.IntersectionObserver(e=>{e[0].isIntersecting&&(o.disconnect(),this.io=void 0,n())},{rootMargin:t});o.observe(e)}loadIcon(){if(this.isVisible){let e=ft(this);e&&(Q.has(e)?this.svgContent=Q.get(e):wt(e,this.sanitize).then(()=>this.svgContent=Q.get(e)),this.didLoadIcon=!0)}this.iconName=mt(this.name,this.icon,this.mode,this.ios,this.md)}render(){let{flipRtl:e,iconName:t,inheritedAttributes:n,el:o}=this,i=this.mode||"md",r=!!t&&((t.includes("arrow")||t.includes("chevron"))&&!1!==e),s=e||r;return P(I,Object.assign({key:"0578c899781ca145dd8205acd9670af39b57cf2e",role:"img",class:Object.assign(Object.assign({[i]:!0},At(this.color)),{[`icon-${this.size}`]:!!this.size,"flip-rtl":s,"icon-rtl":s&&_t(o)})},n),this.svgContent?P("div",{class:"icon-inner",innerHTML:this.svgContent}):P("div",{class:"icon-inner"}))}static get assetsDirs(){return["svg"]}get el(){return this}static get watchers(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}}static get style(){return Dt}},[1,"ion-icon",{mode:[1025],color:[1],ios:[1],md:[1],flipRtl:[4,"flip-rtl"],name:[513],src:[1],icon:[8],size:[1],lazy:[4],sanitize:[4],svgContent:[32],isVisible:[32]},void 0,{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}]),kt=()=>typeof document<"u"&&document.documentElement.getAttribute("mode")||"md",At=e=>e?{"ion-color":!0,[`ion-color-${e}`]:!0}:null;function jt(){typeof customElements>"u"||["ion-icon"].forEach(e=>{if("ion-icon"===e)customElements.get(e)||customElements.define(e,Ot)})}var Mt=jt,Nt=!1;function Pt(){Nt||=((0,t.initialize)(),(0,n.defineCustomElement)(),(0,r.defineCustomElement)(),(0,i.defineCustomElement)(),(0,a.defineCustomElement)(),(0,o.defineCustomElement)(),(0,s.defineCustomElement)(),(0,c.defineCustomElement)(),(0,l.defineCustomElement)(),(0,u.defineCustomElement)(),(0,d.defineCustomElement)(),(0,f.defineCustomElement)(),(0,p.defineCustomElement)(),(0,m.defineCustomElement)(),(0,h.defineCustomElement)(),(0,g.defineCustomElement)(),(0,ee.defineCustomElement)(),(0,te.defineCustomElement)(),Mt(),(0,ne.defineCustomElement)(),(0,re.defineCustomElement)(),(0,ie.defineCustomElement)(),(0,ae.defineCustomElement)(),!0)}function Ft(){return{navigate:(e,t="forward")=>{let n=document.querySelector("ion-router");n&&"function"==typeof n.push&&n.push(e,t)},replace:e=>{let t=document.querySelector("ion-router");t&&"function"==typeof t.push&&t.push(e,"root")},back:()=>{let e=document.querySelector("ion-router");e&&"function"==typeof e.back&&e.back()}}}function It(e="/"){return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,n){let o=document.createElement("ion-back-button");return e&&o.setAttribute("default-href",e),t.insertBefore(o,n),()=>o.remove()}}}var Lt=class extends e.NixComponent{routes;constructor(e){super(),this.routes=e}_pathToRouteId(e){return e&&"/"!==e?`nix-route-${e.replace(/\/:?[^/]+/g,e=>"-"+e.replace(/\//g,"").replace(/:/g,"")).replace(/^\//,"").replace(/\//g,"-")}`:"nix-route-home"}render(){let e=this;return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,n){let o=document.createElement("ion-router");o.setAttribute("use-hash","false"),e.routes.filter(e=>"*"!==e.path).forEach(t=>{let n=document.createElement("ion-route");n.setAttribute("url",t.path),n.setAttribute("component",e._pathToRouteId(t.path)),o.appendChild(n)});let i=document.createElement("ion-router-outlet");return i.delegate={attachViewToDom:async(t,n,o,i)=>{let r=e.routes.find(t=>e._pathToRouteId(t.path)===n),s=document.createElement("div");s.classList.add("ion-page"),i&&i.length&&s.classList.add(...i);let l=oe();if(s.addEventListener("ionViewWillEnter",()=>l.willEnter.update(e=>e+1)),s.addEventListener("ionViewDidEnter",()=>l.didEnter.update(e=>e+1)),s.addEventListener("ionViewWillLeave",()=>l.willLeave.update(e=>e+1)),s.addEventListener("ionViewDidLeave",()=>l.didLeave.update(e=>e+1)),r){let e=o||{},t=r.component({lc:l,params:e});if("render"in t&&"function"==typeof t.render){let e=t;e.onInit?.();let n=e.render()._render(s,null),o=e.onMount?.();s._nixCleanup=()=>{e.onUnmount?.(),"function"==typeof o&&o(),n()}}else s._nixCleanup=t._render(s,null)}return t.appendChild(s),s},removeViewFromDom:async(e,t)=>{t._nixCleanup&&t._nixCleanup(),t.remove()}},t.insertBefore(o,n),t.insertBefore(i,n),()=>{o.remove(),i.remove()}}}}};exports.IonBackButton=It,exports.IonPage=se,exports.IonRouterOutlet=Lt,exports.createPageLifecycle=oe,exports.setupNixIonic=Pt,exports.useIonViewDidEnter=le,exports.useIonViewDidLeave=de,exports.useIonViewWillEnter=ce,exports.useIonViewWillLeave=ue,exports.useRouter=Ft;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nix-ionic.cjs","names":[],"sources":["../../src/lifecycle.ts","../../src/setup.ts","../../src/IonRouterOutlet.ts"],"sourcesContent":["/**\n * ionic-nix/lifecycle.ts\n *\n * Sistema de ciclo de vida de navegación, análogo a los hooks de Ionic:\n * ionViewWillEnter / ionViewDidEnter / ionViewWillLeave / ionViewDidLeave\n *\n * Cómo funciona (sin provide/inject):\n * 1. IonRouterOutlet crea un `PageLifecycle` por cada ruta.\n * 2. Lo pasa directamente al factory de la ruta como argumento.\n * 3. El factory llama a `new MiPagina(lc)` o `MiPagina(lc)`.\n * 4. IonPage/composables registran watchers sobre las señales del lc.\n * 5. Cuando el router navega, incrementa las señales → watchers se disparan.\n */\n\nimport { signal, watch } from \"@deijose/nix-js\";\nimport type { Signal } from \"@deijose/nix-js\";\nimport { NixComponent } from \"@deijose/nix-js\";\n\n// --------------------------------------------------------------------------\n// Tipos públicos\n// --------------------------------------------------------------------------\n\nexport interface PageLifecycle {\n willEnter: Signal<number>;\n didEnter: Signal<number>;\n willLeave: Signal<number>;\n didLeave: Signal<number>;\n}\n\n/** Crea un nuevo PageLifecycle con señales en 0. */\nexport function createPageLifecycle(): PageLifecycle {\n return {\n willEnter: signal(0),\n didEnter: signal(0),\n willLeave: signal(0),\n didLeave: signal(0),\n };\n}\n\n// --------------------------------------------------------------------------\n// IonPage — clase base para páginas con hooks de navegación\n// --------------------------------------------------------------------------\n//\n// Uso:\n// class HomePage extends IonPage {\n// constructor(lc: PageLifecycle) { super(lc); }\n//\n// ionViewWillEnter() { /* fetch de datos frescos */ }\n// render() { return html`...`; }\n// }\n\nexport abstract class IonPage extends NixComponent {\n private __lc: PageLifecycle;\n\n constructor(lc: PageLifecycle) {\n super();\n this.__lc = lc;\n }\n\n override onInit(): void {\n const lc = this.__lc;\n // watch no corre en init (immediate: false), así que ionViewWillEnter\n // solo se llama cuando el outlet incrementa la señal, no al construir.\n if (this.ionViewWillEnter) watch(lc.willEnter, this.ionViewWillEnter.bind(this));\n if (this.ionViewDidEnter) watch(lc.didEnter, this.ionViewDidEnter.bind(this));\n if (this.ionViewWillLeave) watch(lc.willLeave, this.ionViewWillLeave.bind(this));\n if (this.ionViewDidLeave) watch(lc.didLeave, this.ionViewDidLeave.bind(this));\n }\n\n ionViewWillEnter?(): void;\n ionViewDidEnter?(): void;\n ionViewWillLeave?(): void;\n ionViewDidLeave?(): void;\n}\n\n// --------------------------------------------------------------------------\n// Composables para function components\n// --------------------------------------------------------------------------\n//\n// Uso:\n// function ProfilePage(lc: PageLifecycle): NixTemplate {\n// useIonViewWillEnter(lc, () => { /* fetch */ });\n// return html`...`;\n// }\n\nexport function useIonViewWillEnter(lc: PageLifecycle, fn: () => void): void {\n watch(lc.willEnter, fn);\n}\n\nexport function useIonViewDidEnter(lc: PageLifecycle, fn: () => void): void {\n watch(lc.didEnter, fn);\n}\n\nexport function useIonViewWillLeave(lc: PageLifecycle, fn: () => void): void {\n watch(lc.willLeave, fn);\n}\n\nexport function useIonViewDidLeave(lc: PageLifecycle, fn: () => void): void {\n watch(lc.didLeave, fn);\n}","import { initialize } from \"@ionic/core/components\";\nimport { defineCustomElement as defineIonRouter } from \"@ionic/core/components/ion-router.js\";\nimport { defineCustomElement as defineIonRoute } from \"@ionic/core/components/ion-route.js\";\nimport { defineCustomElement as defineIonRouterOutlet } from \"@ionic/core/components/ion-router-outlet.js\";\nimport { defineCustomElement as defineIonBackButton } from \"@ionic/core/components/ion-back-button.js\";\n\nlet isInitialized = false;\n\nexport function setupNixIonic(config: any = {}) {\n if (isInitialized) return;\n \n // 1. Inicializa el core de Ionic de forma segura\n initialize(config);\n \n // 2. Registra los Web Components vitales para el enrutamiento\n defineIonRouter();\n defineIonRoute();\n defineIonRouterOutlet();\n defineIonBackButton();\n \n isInitialized = true;\n}","/**\n * ionic-nix/IonRouterOutlet.ts\n *\n * Bridge 100% nativo. Genera exactamente el mismo DOM que Vanilla Ionic.\n * Delegamos el view-caching y los ciclos de vida a los Eventos del DOM de ion-router-outlet.\n */\n\nimport { NixComponent } from \"@deijose/nix-js\";\nimport type { NixTemplate } from \"@deijose/nix-js\";\nimport { createPageLifecycle, type PageLifecycle } from \"./lifecycle\";\nimport { Components } from \"@ionic/core\";\n\n// --------------------------------------------------------------------------\n// Router store singleton\n// --------------------------------------------------------------------------\n\nexport function useRouter() {\n const router = <Components.IonRouter>document.querySelector(\"ion-router\");\n return {\n navigate: (path: string) => {\n router?.push(path, \"forward\");\n },\n replace: (path: string) => {\n router?.push(path, \"root\");\n },\n back: () => {\n router?.back();\n }\n };\n}\n\n// --------------------------------------------------------------------------\n// IonBackButton (Sin listeners, 100% nativo)\n// --------------------------------------------------------------------------\n\nexport function IonBackButton(defaultHref?: string): NixTemplate {\n return {\n __isNixTemplate: true as const,\n mount(container) {\n const el = typeof container === \"string\" ? document.querySelector(container)! : container;\n const cleanup = this._render(el, null);\n return { unmount: cleanup };\n },\n _render(parent: Node, before: Node | null): () => void {\n const btn = document.createElement(\"ion-back-button\") as HTMLElement;\n if (defaultHref) btn.setAttribute(\"default-href\", defaultHref);\n parent.insertBefore(btn, before);\n return () => btn.remove();\n },\n };\n}\n\n// --------------------------------------------------------------------------\n// Tipos públicos\n// --------------------------------------------------------------------------\n\nexport interface PageContext {\n lc: PageLifecycle;\n params: Record<string, string>;\n}\n\nexport interface RouteDefinition {\n path: string;\n component: (ctx: PageContext) => NixComponent | NixTemplate;\n}\n\n// --------------------------------------------------------------------------\n// IonRouterOutlet (El Bridge Maestro)\n// --------------------------------------------------------------------------\n\nexport class IonRouterOutlet extends NixComponent {\n private routes: RouteDefinition[];\n\n constructor(routes: RouteDefinition[]) {\n super();\n this.routes = routes;\n this._registerCustomElements();\n }\n\n // -------------------------------------------------------------------------\n // Helpers\n // -------------------------------------------------------------------------\n\n private _extractParams(routePath: string, realPath: string): Record<string, string> {\n const params: Record<string, string> = {};\n const rP = routePath.split(\"/\");\n const uP = realPath.split(\"/\");\n for (let i = 0; i < rP.length; i++) {\n if (rP[i]?.startsWith(\":\")) params[rP[i].slice(1)] = uP[i] ?? \"\";\n }\n return params;\n }\n\n private _pathToTag(path: string): string {\n if (!path || path === \"/\") return \"nix-page-home\";\n const clean = path\n .replace(/\\/:?[^/]+/g, (m) => \"-\" + m.replace(/\\//g, \"\").replace(/:/g, \"\"))\n .replace(/^\\//, \"\")\n .replace(/\\//g, \"-\");\n return `nix-page-${clean}`;\n }\n\n // -------------------------------------------------------------------------\n // Registro de Custom Elements estilo Vanilla JS\n // -------------------------------------------------------------------------\n\n private _registerCustomElements(): void {\n const self = this;\n for (const route of this.routes) {\n if (route.path === \"*\") continue;\n\n const tag = this._pathToTag(route.path);\n if (customElements.get(tag)) continue;\n\n customElements.define(tag, class extends HTMLElement {\n private _handle: { unmount(): void } | null = null;\n\n connectedCallback(): void {\n // Prevenir doble montaje si Ionic reconecta el nodo\n if (this._handle) return; \n\n this.classList.add(\"ion-page\");\n\n // 1. Escuchar los eventos NATIVOS del DOM que dispara ion-router-outlet\n const lc = createPageLifecycle();\n this.addEventListener(\"ionViewWillEnter\", () => lc.willEnter.update((n) => n + 1));\n this.addEventListener(\"ionViewDidEnter\", () => lc.didEnter.update((n) => n + 1));\n this.addEventListener(\"ionViewWillLeave\", () => lc.willLeave.update((n) => n + 1));\n this.addEventListener(\"ionViewDidLeave\", () => lc.didLeave.update((n) => n + 1));\n\n // 2. Extraer parámetros\n const params = self._extractParams(route.path, location.pathname);\n\n // 3. Montar componente Nix\n const pageNode = route.component({ lc, params });\n\n if (\"render\" in pageNode && typeof (pageNode as NixComponent).render === \"function\") {\n const comp = pageNode as NixComponent;\n comp.onInit?.();\n const renderCleanup = comp.render()._render(this, null);\n const mountRet = comp.onMount?.();\n\n this._handle = {\n unmount: () => {\n comp.onUnmount?.();\n if (typeof mountRet === \"function\") mountRet();\n renderCleanup();\n }\n };\n } else {\n const renderCleanup = (pageNode as NixTemplate)._render(this, null);\n this._handle = { unmount: renderCleanup };\n }\n }\n\n disconnectedCallback(): void {\n // ion-router-outlet SOLO desconecta el elemento cuando lo saca \n // definitivamente de la caché (ej. al hacer click en el back-button)\n this._handle?.unmount();\n this._handle = null;\n }\n });\n }\n }\n\n // -------------------------------------------------------------------------\n // Render exacto al HTML que te funcionaba\n // -------------------------------------------------------------------------\n\n override render(): NixTemplate {\n const self = this;\n return {\n __isNixTemplate: true as const,\n mount(container: Element | string) {\n const el = typeof container === \"string\" ? document.querySelector(container)! : container;\n const cleanup = this._render(el, null);\n return { unmount: cleanup };\n },\n _render(parent: Node, before: Node | null): () => void {\n \n // Creamos <ion-router>\n const routerEl = document.createElement(\"ion-router\");\n routerEl.setAttribute(\"use-hash\", \"false\");\n routerEl.innerHTML = self.routes\n .filter((r) => r.path !== \"*\")\n .map((r) => `<ion-route url=\"${r.path}\" component=\"${self._pathToTag(r.path)}\"></ion-route>`)\n .join(\"\");\n\n // Creamos <ion-router-outlet> real\n const outletEl = document.createElement(\"ion-router-outlet\");\n\n parent.insertBefore(routerEl, before);\n parent.insertBefore(outletEl, before);\n\n return () => {\n routerEl.remove();\n outletEl.remove();\n };\n },\n };\n }\n}"],"mappings":"2VA8BA,SAAgB,GAAqC,CACnD,MAAO,CACL,WAAA,EAAA,EAAA,QAAkB,EAAE,CACpB,UAAA,EAAA,EAAA,QAAkB,EAAE,CACpB,WAAA,EAAA,EAAA,QAAkB,EAAE,CACpB,UAAA,EAAA,EAAA,QAAkB,EAAE,CACrB,CAeH,IAAsB,EAAtB,cAAsC,EAAA,YAAa,CACjD,KAEA,YAAY,EAAmB,CAC7B,OAAO,CACP,KAAK,KAAO,EAGd,QAAwB,CACtB,IAAM,EAAK,KAAK,KAGZ,KAAK,mBAAkB,EAAA,EAAA,OAAM,EAAG,UAAW,KAAK,iBAAiB,KAAK,KAAK,CAAC,CAC5E,KAAK,kBAAkB,EAAA,EAAA,OAAM,EAAG,SAAW,KAAK,gBAAgB,KAAK,KAAK,CAAC,CAC3E,KAAK,mBAAkB,EAAA,EA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AAM,SAAS,SAAS,CAG3D,EAAW,EAAM,UAAU,CAAE,KAAI,SAAQ,CAAC,CAEhD,GAAI,WAAY,GAAY,OAAQ,EAA0B,QAAW,WAAY,CACnF,IAAM,EAAO,EACb,EAAK,UAAU,CACf,IAAM,EAAgB,EAAK,QAAQ,CAAC,QAAQ,KAAM,KAAK,CACjD,EAAW,EAAK,WAAW,CAEjC,KAAK,QAAU,CACb,YAAe,CACb,EAAK,aAAa,CACd,OAAO,GAAa,YAAY,GAAU,CAC9C,GAAe,EAElB,MAGD,KAAK,QAAU,CAAE,QADM,EAAyB,QAAQ,KAAM,KAAK,CAC1B,CAI7C,sBAA6B,CAG3B,KAAK,SAAS,SAAS,CACvB,KAAK,QAAU,OAEjB,EAQN,QAA+B,CAC7B,IAAM,EAAO,KACb,MAAO,CACL,gBAAiB,GACjB,MAAM,EAA6B,CACjC,IAAM,EAAK,OAAO,GAAc,SAAW,SAAS,cAAc,EAAU,CAAI,EAEhF,MAAO,CAAE,QADO,KAAK,QAAQ,EAAI,KAAK,CACX,EAE7B,QAAQ,EAAc,EAAiC,CAGrD,IAAM,EAAW,SAAS,cAAc,aAAa,CACrD,EAAS,aAAa,WAAY,QAAQ,CAC1C,EAAS,UAAY,EAAK,OACvB,OAAQ,GAAM,EAAE,OAAS,IAAI,CAC7B,IAAK,GAAM,mBAAmB,EAAE,KAAK,eAAe,EAAK,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAC5F,KAAK,GAAG,CAGX,IAAM,EAAW,SAAS,cAAc,oBAAoB,CAK5D,OAHA,EAAO,aAAa,EAAU,EAAO,CACrC,EAAO,aAAa,EAAU,EAAO,KAExB,CACX,EAAS,QAAQ,CACjB,EAAS,QAAQ,GAGtB"}
|
|
1
|
+
{"version":3,"file":"nix-ionic.cjs","names":[],"sources":["../../src/lifecycle.ts","../../node_modules/ionicons/components/index.js","../../node_modules/ionicons/components/ion-icon.js","../../src/setup.ts","../../src/IonRouterOutlet.ts"],"sourcesContent":["/**\n * ionic-nix/lifecycle.ts\n *\n * Sistema de ciclo de vida de navegación, análogo a los hooks de Ionic:\n * ionViewWillEnter / ionViewDidEnter / ionViewWillLeave / ionViewDidLeave\n *\n * Cómo funciona (sin provide/inject):\n * 1. IonRouterOutlet crea un `PageLifecycle` por cada ruta.\n * 2. Lo pasa directamente al factory de la ruta como argumento.\n * 3. El factory llama a `new MiPagina(lc)` o `MiPagina(lc)`.\n * 4. IonPage/composables registran watchers sobre las señales del lc.\n * 5. Cuando el router navega, incrementa las señales → watchers se disparan.\n */\n\nimport { signal, watch } from \"@deijose/nix-js\";\nimport type { Signal } from \"@deijose/nix-js\";\nimport { NixComponent } from \"@deijose/nix-js\";\n\n// --------------------------------------------------------------------------\n// Tipos públicos\n// --------------------------------------------------------------------------\n\nexport interface PageLifecycle {\n willEnter: Signal<number>;\n didEnter: Signal<number>;\n willLeave: Signal<number>;\n didLeave: Signal<number>;\n}\n\n/** Crea un nuevo PageLifecycle con señales en 0. */\nexport function createPageLifecycle(): PageLifecycle {\n return {\n willEnter: signal(0),\n didEnter: signal(0),\n willLeave: signal(0),\n didLeave: signal(0),\n };\n}\n\n// --------------------------------------------------------------------------\n// IonPage — clase base para páginas con hooks de navegación\n// --------------------------------------------------------------------------\n//\n// Uso:\n// class HomePage extends IonPage {\n// constructor(lc: PageLifecycle) { super(lc); }\n//\n// ionViewWillEnter() { /* fetch de datos frescos */ }\n// render() { return html`...`; }\n// }\n\nexport abstract class IonPage extends NixComponent {\n private __lc: PageLifecycle;\n\n constructor(lc: PageLifecycle) {\n super();\n this.__lc = lc;\n }\n\n override onInit(): void {\n const lc = this.__lc;\n // watch no corre en init (immediate: false), así que ionViewWillEnter\n // solo se llama cuando el outlet incrementa la señal, no al construir.\n if (this.ionViewWillEnter) watch(lc.willEnter, this.ionViewWillEnter.bind(this));\n if (this.ionViewDidEnter) watch(lc.didEnter, this.ionViewDidEnter.bind(this));\n if (this.ionViewWillLeave) watch(lc.willLeave, this.ionViewWillLeave.bind(this));\n if (this.ionViewDidLeave) watch(lc.didLeave, this.ionViewDidLeave.bind(this));\n }\n\n ionViewWillEnter?(): void;\n ionViewDidEnter?(): void;\n ionViewWillLeave?(): void;\n ionViewDidLeave?(): void;\n}\n\n// --------------------------------------------------------------------------\n// Composables para function components\n// --------------------------------------------------------------------------\n//\n// Uso:\n// function ProfilePage(lc: PageLifecycle): NixTemplate {\n// useIonViewWillEnter(lc, () => { /* fetch */ });\n// return html`...`;\n// }\n\nexport function useIonViewWillEnter(lc: PageLifecycle, fn: () => void): void {\n watch(lc.willEnter, fn);\n}\n\nexport function useIonViewDidEnter(lc: PageLifecycle, fn: () => void): void {\n watch(lc.didEnter, fn);\n}\n\nexport function useIonViewWillLeave(lc: PageLifecycle, fn: () => void): void {\n watch(lc.willLeave, fn);\n}\n\nexport function useIonViewDidLeave(lc: PageLifecycle, fn: () => void): void {\n watch(lc.didLeave, fn);\n}","const NAMESPACE = 'ionicons';\nconst BUILD = /* ionicons */ { hydratedSelectorName: \"hydrated\", lazyLoad: false, updatable: true};\n\n/*\n Stencil Client Platform v4.35.3 | MIT Licensed | https://stenciljs.com\n */\nvar __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\n\n// src/client/client-host-ref.ts\nvar getHostRef = (ref) => {\n if (ref.__stencil__getHostRef) {\n return ref.__stencil__getHostRef();\n }\n return void 0;\n};\nvar registerHost = (hostElement, cmpMeta) => {\n const hostRef = {\n $flags$: 0,\n $hostElement$: hostElement,\n $cmpMeta$: cmpMeta,\n $instanceValues$: /* @__PURE__ */ new Map()\n };\n {\n hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);\n hostElement[\"s-p\"] = [];\n hostElement[\"s-rc\"] = [];\n }\n const ref = hostRef;\n hostElement.__stencil__getHostRef = () => ref;\n return ref;\n};\nvar isMemberInElement = (elm, memberName) => memberName in elm;\nvar consoleError = (e, el) => (0, console.error)(e, el);\n\n// src/client/client-style.ts\nvar styles = /* @__PURE__ */ new Map();\nvar SLOT_FB_CSS = \"slot-fb{display:contents}slot-fb[hidden]{display:none}\";\nvar XLINK_NS = \"http://www.w3.org/1999/xlink\";\nvar win = typeof window !== \"undefined\" ? window : {};\nvar H = win.HTMLElement || class {\n};\nvar plt = {\n $flags$: 0,\n $resourcesUrl$: \"\",\n jmp: (h2) => h2(),\n raf: (h2) => requestAnimationFrame(h2),\n ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),\n rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),\n ce: (eventName, opts) => new CustomEvent(eventName, opts)\n};\nvar promiseResolve = (v) => Promise.resolve(v);\nvar supportsConstructableStylesheets = /* @__PURE__ */ (() => {\n try {\n new CSSStyleSheet();\n return typeof new CSSStyleSheet().replaceSync === \"function\";\n } catch (e) {\n }\n return false;\n})() ;\nvar queuePending = false;\nvar queueDomReads = [];\nvar queueDomWrites = [];\nvar queueTask = (queue, write) => (cb) => {\n queue.push(cb);\n if (!queuePending) {\n queuePending = true;\n if (write && plt.$flags$ & 4 /* queueSync */) {\n nextTick(flush);\n } else {\n plt.raf(flush);\n }\n }\n};\nvar consume = (queue) => {\n for (let i2 = 0; i2 < queue.length; i2++) {\n try {\n queue[i2](performance.now());\n } catch (e) {\n consoleError(e);\n }\n }\n queue.length = 0;\n};\nvar flush = () => {\n consume(queueDomReads);\n {\n consume(queueDomWrites);\n if (queuePending = queueDomReads.length > 0) {\n plt.raf(flush);\n }\n }\n};\nvar nextTick = (cb) => promiseResolve().then(cb);\nvar writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);\n\n// src/runtime/asset-path.ts\nvar getAssetPath = (path) => {\n const assetUrl = new URL(path, plt.$resourcesUrl$);\n return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;\n};\nvar setAssetPath = (path) => plt.$resourcesUrl$ = path;\nvar isComplexType = (o) => {\n o = typeof o;\n return o === \"object\" || o === \"function\";\n};\n\n// src/utils/query-nonce-meta-tag-content.ts\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) == null ? void 0 : _b.getAttribute(\"content\")) != null ? _c : void 0;\n}\n\n// src/utils/regular-expression.ts\nvar escapeRegExpSpecialCharacters = (text) => {\n return text.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\n// src/utils/result.ts\nvar result_exports = {};\n__export(result_exports, {\n err: () => err,\n map: () => map,\n ok: () => ok,\n unwrap: () => unwrap,\n unwrapErr: () => unwrapErr\n});\nvar ok = (value) => ({\n isOk: true,\n isErr: false,\n value\n});\nvar err = (value) => ({\n isOk: false,\n isErr: true,\n value\n});\nfunction map(result, fn) {\n if (result.isOk) {\n const val = fn(result.value);\n if (val instanceof Promise) {\n return val.then((newVal) => ok(newVal));\n } else {\n return ok(val);\n }\n }\n if (result.isErr) {\n const value = result.value;\n return err(value);\n }\n throw \"should never get here\";\n}\nvar unwrap = (result) => {\n if (result.isOk) {\n return result.value;\n } else {\n throw result.value;\n }\n};\nvar unwrapErr = (result) => {\n if (result.isErr) {\n return result.value;\n } else {\n throw result.value;\n }\n};\n\n// src/utils/style.ts\nfunction createStyleSheetIfNeededAndSupported(styles2) {\n return void 0;\n}\n\n// src/utils/shadow-root.ts\nvar globalStyleSheet;\nfunction createShadowRoot(cmpMeta) {\n var _a;\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;\n if (globalStyleSheet) shadowRoot.adoptedStyleSheets.push(globalStyleSheet);\n}\nvar createTime = (fnName, tagName = \"\") => {\n {\n return () => {\n return;\n };\n }\n};\nvar rootAppliedStyles = /* @__PURE__ */ new WeakMap();\nvar registerStyle = (scopeId2, cssText, allowCS) => {\n let style = styles.get(scopeId2);\n if (supportsConstructableStylesheets && allowCS) {\n style = style || new CSSStyleSheet();\n if (typeof style === \"string\") {\n style = cssText;\n } else {\n style.replaceSync(cssText);\n }\n } else {\n style = cssText;\n }\n styles.set(scopeId2, style);\n};\nvar addStyle = (styleContainerNode, cmpMeta, mode) => {\n var _a;\n const scopeId2 = getScopeId(cmpMeta);\n const style = styles.get(scopeId2);\n if (!win.document) {\n return scopeId2;\n }\n styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;\n if (style) {\n if (typeof style === \"string\") {\n styleContainerNode = styleContainerNode.head || styleContainerNode;\n let appliedStyles = rootAppliedStyles.get(styleContainerNode);\n let styleElm;\n if (!appliedStyles) {\n rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());\n }\n if (!appliedStyles.has(scopeId2)) {\n {\n styleElm = win.document.createElement(\"style\");\n styleElm.innerHTML = style;\n const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);\n if (nonce != null) {\n styleElm.setAttribute(\"nonce\", nonce);\n }\n if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {\n if (styleContainerNode.nodeName === \"HEAD\") {\n const preconnectLinks = styleContainerNode.querySelectorAll(\"link[rel=preconnect]\");\n const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector(\"style\");\n styleContainerNode.insertBefore(\n styleElm,\n (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null\n );\n } else if (\"host\" in styleContainerNode) {\n if (supportsConstructableStylesheets) {\n const stylesheet = new CSSStyleSheet();\n stylesheet.replaceSync(style);\n styleContainerNode.adoptedStyleSheets.unshift(stylesheet);\n } else {\n const existingStyleContainer = styleContainerNode.querySelector(\"style\");\n if (existingStyleContainer) {\n existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;\n } else {\n styleContainerNode.prepend(styleElm);\n }\n }\n } else {\n styleContainerNode.append(styleElm);\n }\n }\n if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {\n styleContainerNode.insertBefore(styleElm, null);\n }\n }\n if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {\n styleElm.innerHTML += SLOT_FB_CSS;\n }\n if (appliedStyles) {\n appliedStyles.add(scopeId2);\n }\n }\n } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {\n styleContainerNode.adoptedStyleSheets.push(style);\n }\n }\n return scopeId2;\n};\nvar attachStyles = (hostRef) => {\n const cmpMeta = hostRef.$cmpMeta$;\n const elm = hostRef.$hostElement$;\n const flags = cmpMeta.$flags$;\n const endAttachStyles = createTime(\"attachStyles\", cmpMeta.$tagName$);\n const scopeId2 = addStyle(\n elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),\n cmpMeta);\n if (flags & 10 /* needsScopedEncapsulation */) {\n elm[\"s-sc\"] = scopeId2;\n elm.classList.add(scopeId2 + \"-h\");\n }\n endAttachStyles();\n};\nvar getScopeId = (cmp, mode) => \"sc-\" + (cmp.$tagName$);\nvar h = (nodeName, vnodeData, ...children) => {\n let child = null;\n let key = null;\n let simple = false;\n let lastSimple = false;\n const vNodeChildren = [];\n const walk = (c) => {\n for (let i2 = 0; i2 < c.length; i2++) {\n child = c[i2];\n if (Array.isArray(child)) {\n walk(child);\n } else if (child != null && typeof child !== \"boolean\") {\n if (simple = typeof nodeName !== \"function\" && !isComplexType(child)) {\n child = String(child);\n }\n if (simple && lastSimple) {\n vNodeChildren[vNodeChildren.length - 1].$text$ += child;\n } else {\n vNodeChildren.push(simple ? newVNode(null, child) : child);\n }\n lastSimple = simple;\n }\n }\n };\n walk(children);\n if (vnodeData) {\n if (vnodeData.key) {\n key = vnodeData.key;\n }\n {\n const classData = vnodeData.className || vnodeData.class;\n if (classData) {\n vnodeData.class = typeof classData !== \"object\" ? classData : Object.keys(classData).filter((k) => classData[k]).join(\" \");\n }\n }\n }\n const vnode = newVNode(nodeName, null);\n vnode.$attrs$ = vnodeData;\n if (vNodeChildren.length > 0) {\n vnode.$children$ = vNodeChildren;\n }\n {\n vnode.$key$ = key;\n }\n return vnode;\n};\nvar newVNode = (tag, text) => {\n const vnode = {\n $flags$: 0,\n $tag$: tag,\n $text$: text,\n $elm$: null,\n $children$: null\n };\n {\n vnode.$attrs$ = null;\n }\n {\n vnode.$key$ = null;\n }\n return vnode;\n};\nvar Host = {};\nvar isHost = (node) => node && node.$tag$ === Host;\nvar createSupportsRuleRe = (selector) => {\n const safeSelector2 = escapeRegExpSpecialCharacters(selector);\n return new RegExp(\n // First capture group: match any context before the selector that's not inside @supports selector()\n // Using negative lookahead to avoid matching inside @supports selector(...) condition\n `(^|[^@]|@(?!supports\\\\s+selector\\\\s*\\\\([^{]*?${safeSelector2}))(${safeSelector2}\\\\b)`,\n \"g\"\n );\n};\ncreateSupportsRuleRe(\"::slotted\");\ncreateSupportsRuleRe(\":host\");\ncreateSupportsRuleRe(\":host-context\");\nvar parsePropertyValue = (propValue, propType, isFormAssociated) => {\n if (propValue != null && !isComplexType(propValue)) {\n if (propType & 4 /* Boolean */) {\n {\n return propValue === \"false\" ? false : propValue === \"\" || !!propValue;\n }\n }\n if (propType & 1 /* String */) {\n return String(propValue);\n }\n return propValue;\n }\n return propValue;\n};\nvar emitEvent = (elm, name, opts) => {\n const ev = plt.ce(name, opts);\n elm.dispatchEvent(ev);\n return ev;\n};\nvar setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {\n if (oldValue === newValue) {\n return;\n }\n let isProp = isMemberInElement(elm, memberName);\n let ln = memberName.toLowerCase();\n if (memberName === \"class\") {\n const classList = elm.classList;\n const oldClasses = parseClassList(oldValue);\n let newClasses = parseClassList(newValue);\n {\n classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));\n classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));\n }\n } else if (memberName === \"style\") {\n {\n for (const prop in oldValue) {\n if (!newValue || newValue[prop] == null) {\n if (prop.includes(\"-\")) {\n elm.style.removeProperty(prop);\n } else {\n elm.style[prop] = \"\";\n }\n }\n }\n }\n for (const prop in newValue) {\n if (!oldValue || newValue[prop] !== oldValue[prop]) {\n if (prop.includes(\"-\")) {\n elm.style.setProperty(prop, newValue[prop]);\n } else {\n elm.style[prop] = newValue[prop];\n }\n }\n }\n } else if (memberName === \"key\") ; else if (memberName === \"ref\") {\n if (newValue) {\n newValue(elm);\n }\n } else if ((!elm.__lookupSetter__(memberName)) && memberName[0] === \"o\" && memberName[1] === \"n\") {\n if (memberName[2] === \"-\") {\n memberName = memberName.slice(3);\n } else if (isMemberInElement(win, ln)) {\n memberName = ln.slice(2);\n } else {\n memberName = ln[2] + memberName.slice(3);\n }\n if (oldValue || newValue) {\n const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);\n memberName = memberName.replace(CAPTURE_EVENT_REGEX, \"\");\n if (oldValue) {\n plt.rel(elm, memberName, oldValue, capture);\n }\n if (newValue) {\n plt.ael(elm, memberName, newValue, capture);\n }\n }\n } else {\n const isComplex = isComplexType(newValue);\n if ((isProp || isComplex && newValue !== null) && true) {\n try {\n if (!elm.tagName.includes(\"-\")) {\n const n = newValue == null ? \"\" : newValue;\n if (memberName === \"list\") {\n isProp = false;\n } else if (oldValue == null || elm[memberName] != n) {\n if (typeof elm.__lookupSetter__(memberName) === \"function\") {\n elm[memberName] = n;\n } else {\n elm.setAttribute(memberName, n);\n }\n }\n } else if (elm[memberName] !== newValue) {\n elm[memberName] = newValue;\n }\n } catch (e) {\n }\n }\n let xlink = false;\n {\n if (ln !== (ln = ln.replace(/^xlink\\:?/, \"\"))) {\n memberName = ln;\n xlink = true;\n }\n }\n if (newValue == null || newValue === false) {\n if (newValue !== false || elm.getAttribute(memberName) === \"\") {\n if (xlink) {\n elm.removeAttributeNS(XLINK_NS, memberName);\n } else {\n elm.removeAttribute(memberName);\n }\n }\n } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {\n newValue = newValue === true ? \"\" : newValue;\n if (xlink) {\n elm.setAttributeNS(XLINK_NS, memberName, newValue);\n } else {\n elm.setAttribute(memberName, newValue);\n }\n }\n }\n};\nvar parseClassListRegex = /\\s/;\nvar parseClassList = (value) => {\n if (typeof value === \"object\" && value && \"baseVal\" in value) {\n value = value.baseVal;\n }\n if (!value || typeof value !== \"string\") {\n return [];\n }\n return value.split(parseClassListRegex);\n};\nvar CAPTURE_EVENT_SUFFIX = \"Capture\";\nvar CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + \"$\");\n\n// src/runtime/vdom/update-element.ts\nvar updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {\n const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;\n const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};\n const newVnodeAttrs = newVnode.$attrs$ || {};\n {\n for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {\n if (!(memberName in newVnodeAttrs)) {\n setAccessor(\n elm,\n memberName,\n oldVnodeAttrs[memberName],\n void 0,\n isSvgMode2,\n newVnode.$flags$);\n }\n }\n }\n for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {\n setAccessor(\n elm,\n memberName,\n oldVnodeAttrs[memberName],\n newVnodeAttrs[memberName],\n isSvgMode2,\n newVnode.$flags$);\n }\n};\nfunction sortedAttrNames(attrNames) {\n return attrNames.includes(\"ref\") ? (\n // we need to sort these to ensure that `'ref'` is the last attr\n [...attrNames.filter((attr) => attr !== \"ref\"), \"ref\"]\n ) : (\n // no need to sort, return the original array\n attrNames\n );\n}\nvar hostTagName;\nvar isSvgMode = false;\nvar createElm = (oldParentVNode, newParentVNode, childIndex) => {\n const newVNode2 = newParentVNode.$children$[childIndex];\n let i2 = 0;\n let elm;\n let childNode;\n if (newVNode2.$text$ !== null) {\n elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);\n } else {\n if (!win.document) {\n throw new Error(\n \"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.\"\n );\n }\n elm = newVNode2.$elm$ = win.document.createElement(\n newVNode2.$tag$\n );\n {\n updateElement(null, newVNode2, isSvgMode);\n }\n if (newVNode2.$children$) {\n for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {\n childNode = createElm(oldParentVNode, newVNode2, i2);\n if (childNode) {\n elm.appendChild(childNode);\n }\n }\n }\n }\n elm[\"s-hn\"] = hostTagName;\n return elm;\n};\nvar addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {\n let containerElm = parentElm;\n let childNode;\n if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {\n containerElm = containerElm.shadowRoot;\n }\n for (; startIdx <= endIdx; ++startIdx) {\n if (vnodes[startIdx]) {\n childNode = createElm(null, parentVNode, startIdx);\n if (childNode) {\n vnodes[startIdx].$elm$ = childNode;\n insertBefore(containerElm, childNode, before);\n }\n }\n }\n};\nvar removeVnodes = (vnodes, startIdx, endIdx) => {\n for (let index = startIdx; index <= endIdx; ++index) {\n const vnode = vnodes[index];\n if (vnode) {\n const elm = vnode.$elm$;\n nullifyVNodeRefs(vnode);\n if (elm) {\n elm.remove();\n }\n }\n }\n};\nvar updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {\n let oldStartIdx = 0;\n let newStartIdx = 0;\n let idxInOld = 0;\n let i2 = 0;\n let oldEndIdx = oldCh.length - 1;\n let oldStartVnode = oldCh[0];\n let oldEndVnode = oldCh[oldEndIdx];\n let newEndIdx = newCh.length - 1;\n let newStartVnode = newCh[0];\n let newEndVnode = newCh[newEndIdx];\n let node;\n let elmToMove;\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (oldStartVnode == null) {\n oldStartVnode = oldCh[++oldStartIdx];\n } else if (oldEndVnode == null) {\n oldEndVnode = oldCh[--oldEndIdx];\n } else if (newStartVnode == null) {\n newStartVnode = newCh[++newStartIdx];\n } else if (newEndVnode == null) {\n newEndVnode = newCh[--newEndIdx];\n } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {\n patch(oldStartVnode, newStartVnode, isInitialRender);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {\n patch(oldEndVnode, newEndVnode, isInitialRender);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {\n patch(oldStartVnode, newEndVnode, isInitialRender);\n insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);\n oldStartVnode = oldCh[++oldStartIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {\n patch(oldEndVnode, newStartVnode, isInitialRender);\n insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);\n oldEndVnode = oldCh[--oldEndIdx];\n newStartVnode = newCh[++newStartIdx];\n } else {\n idxInOld = -1;\n {\n for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {\n if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {\n idxInOld = i2;\n break;\n }\n }\n }\n if (idxInOld >= 0) {\n elmToMove = oldCh[idxInOld];\n if (elmToMove.$tag$ !== newStartVnode.$tag$) {\n node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);\n } else {\n patch(elmToMove, newStartVnode, isInitialRender);\n oldCh[idxInOld] = void 0;\n node = elmToMove.$elm$;\n }\n newStartVnode = newCh[++newStartIdx];\n } else {\n node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);\n newStartVnode = newCh[++newStartIdx];\n }\n if (node) {\n {\n insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);\n }\n }\n }\n }\n if (oldStartIdx > oldEndIdx) {\n addVnodes(\n parentElm,\n newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,\n newVNode2,\n newCh,\n newStartIdx,\n newEndIdx\n );\n } else if (newStartIdx > newEndIdx) {\n removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n }\n};\nvar isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {\n if (leftVNode.$tag$ === rightVNode.$tag$) {\n if (!isInitialRender) {\n return leftVNode.$key$ === rightVNode.$key$;\n }\n if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {\n leftVNode.$key$ = rightVNode.$key$;\n }\n return true;\n }\n return false;\n};\nvar patch = (oldVNode, newVNode2, isInitialRender = false) => {\n const elm = newVNode2.$elm$ = oldVNode.$elm$;\n const oldChildren = oldVNode.$children$;\n const newChildren = newVNode2.$children$;\n const text = newVNode2.$text$;\n if (text === null) {\n {\n updateElement(oldVNode, newVNode2, isSvgMode);\n }\n if (oldChildren !== null && newChildren !== null) {\n updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);\n } else if (newChildren !== null) {\n if (oldVNode.$text$ !== null) {\n elm.textContent = \"\";\n }\n addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);\n } else if (\n // don't do this on initial render as it can cause non-hydrated content to be removed\n !isInitialRender && BUILD.updatable && oldChildren !== null\n ) {\n removeVnodes(oldChildren, 0, oldChildren.length - 1);\n } else ;\n } else if (oldVNode.$text$ !== text) {\n elm.data = text;\n }\n};\nvar nullifyVNodeRefs = (vNode) => {\n {\n vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);\n vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);\n }\n};\nvar insertBefore = (parent, newNode, reference) => {\n {\n return parent == null ? void 0 : parent.insertBefore(newNode, reference);\n }\n};\nvar renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {\n const hostElm = hostRef.$hostElement$;\n const cmpMeta = hostRef.$cmpMeta$;\n const oldVNode = hostRef.$vnode$ || newVNode(null, null);\n const isHostElement = isHost(renderFnResults);\n const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);\n hostTagName = hostElm.tagName;\n if (cmpMeta.$attrsToReflect$) {\n rootVnode.$attrs$ = rootVnode.$attrs$ || {};\n cmpMeta.$attrsToReflect$.map(\n ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]\n );\n }\n if (isInitialLoad && rootVnode.$attrs$) {\n for (const key of Object.keys(rootVnode.$attrs$)) {\n if (hostElm.hasAttribute(key) && ![\"key\", \"ref\", \"style\", \"class\"].includes(key)) {\n rootVnode.$attrs$[key] = hostElm[key];\n }\n }\n }\n rootVnode.$tag$ = null;\n rootVnode.$flags$ |= 4 /* isHost */;\n hostRef.$vnode$ = rootVnode;\n rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;\n patch(oldVNode, rootVnode, isInitialLoad);\n};\n\n// src/runtime/update-component.ts\nvar attachToAncestor = (hostRef, ancestorComponent) => {\n if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent[\"s-p\"]) {\n const index = ancestorComponent[\"s-p\"].push(\n new Promise(\n (r) => hostRef.$onRenderResolve$ = () => {\n ancestorComponent[\"s-p\"].splice(index - 1, 1);\n r();\n }\n )\n );\n }\n};\nvar scheduleUpdate = (hostRef, isInitialLoad) => {\n {\n hostRef.$flags$ |= 16 /* isQueuedForUpdate */;\n }\n if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {\n hostRef.$flags$ |= 512 /* needsRerender */;\n return;\n }\n attachToAncestor(hostRef, hostRef.$ancestorComponent$);\n const dispatch = () => dispatchHooks(hostRef, isInitialLoad);\n return writeTask(dispatch) ;\n};\nvar dispatchHooks = (hostRef, isInitialLoad) => {\n const elm = hostRef.$hostElement$;\n const endSchedule = createTime(\"scheduleUpdate\", hostRef.$cmpMeta$.$tagName$);\n const instance = elm;\n if (!instance) {\n throw new Error(\n `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \\`externalRuntime: true\\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`\n );\n }\n let maybePromise;\n if (isInitialLoad) {\n maybePromise = safeCall(instance, \"componentWillLoad\", void 0, elm);\n } else {\n maybePromise = safeCall(instance, \"componentWillUpdate\", void 0, elm);\n }\n maybePromise = enqueue(maybePromise, () => safeCall(instance, \"componentWillRender\", void 0, elm));\n endSchedule();\n return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));\n};\nvar enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {\n console.error(err2);\n fn();\n}) : fn();\nvar isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === \"function\";\nvar updateComponent = async (hostRef, instance, isInitialLoad) => {\n var _a;\n const elm = hostRef.$hostElement$;\n const endUpdate = createTime(\"update\", hostRef.$cmpMeta$.$tagName$);\n const rc = elm[\"s-rc\"];\n if (isInitialLoad) {\n attachStyles(hostRef);\n }\n const endRender = createTime(\"render\", hostRef.$cmpMeta$.$tagName$);\n {\n callRender(hostRef, instance, elm, isInitialLoad);\n }\n if (rc) {\n rc.map((cb) => cb());\n elm[\"s-rc\"] = void 0;\n }\n endRender();\n endUpdate();\n {\n const childrenPromises = (_a = elm[\"s-p\"]) != null ? _a : [];\n const postUpdate = () => postUpdateComponent(hostRef);\n if (childrenPromises.length === 0) {\n postUpdate();\n } else {\n Promise.all(childrenPromises).then(postUpdate);\n hostRef.$flags$ |= 4 /* isWaitingForChildren */;\n childrenPromises.length = 0;\n }\n }\n};\nvar callRender = (hostRef, instance, elm, isInitialLoad) => {\n try {\n instance = instance.render() ;\n {\n hostRef.$flags$ &= -17 /* isQueuedForUpdate */;\n }\n {\n hostRef.$flags$ |= 2 /* hasRendered */;\n }\n {\n {\n {\n renderVdom(hostRef, instance, isInitialLoad);\n }\n }\n }\n } catch (e) {\n consoleError(e, hostRef.$hostElement$);\n }\n return null;\n};\nvar postUpdateComponent = (hostRef) => {\n const tagName = hostRef.$cmpMeta$.$tagName$;\n const elm = hostRef.$hostElement$;\n const endPostUpdate = createTime(\"postUpdate\", tagName);\n const instance = elm;\n const ancestorComponent = hostRef.$ancestorComponent$;\n safeCall(instance, \"componentDidRender\", void 0, elm);\n if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {\n hostRef.$flags$ |= 64 /* hasLoadedComponent */;\n {\n addHydratedFlag(elm);\n }\n safeCall(instance, \"componentDidLoad\", void 0, elm);\n endPostUpdate();\n {\n hostRef.$onReadyResolve$(elm);\n if (!ancestorComponent) {\n appDidLoad();\n }\n }\n } else {\n safeCall(instance, \"componentDidUpdate\", void 0, elm);\n endPostUpdate();\n }\n {\n if (hostRef.$onRenderResolve$) {\n hostRef.$onRenderResolve$();\n hostRef.$onRenderResolve$ = void 0;\n }\n if (hostRef.$flags$ & 512 /* needsRerender */) {\n nextTick(() => scheduleUpdate(hostRef, false));\n }\n hostRef.$flags$ &= -517;\n }\n};\nvar appDidLoad = (who) => {\n nextTick(() => emitEvent(win, \"appload\", { detail: { namespace: NAMESPACE } }));\n};\nvar safeCall = (instance, method, arg, elm) => {\n if (instance && instance[method]) {\n try {\n return instance[method](arg);\n } catch (e) {\n consoleError(e, elm);\n }\n }\n return void 0;\n};\nvar addHydratedFlag = (elm) => {\n var _a;\n return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : \"hydrated\") ;\n};\n\n// src/runtime/set-value.ts\nvar getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);\nvar setValue = (ref, propName, newVal, cmpMeta) => {\n const hostRef = getHostRef(ref);\n const elm = ref;\n const oldVal = hostRef.$instanceValues$.get(propName);\n const flags = hostRef.$flags$;\n const instance = elm;\n newVal = parsePropertyValue(\n newVal,\n cmpMeta.$members$[propName][0]);\n const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);\n const didValueChange = newVal !== oldVal && !areBothNaN;\n if (didValueChange) {\n hostRef.$instanceValues$.set(propName, newVal);\n {\n if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {\n const watchMethods = cmpMeta.$watchers$[propName];\n if (watchMethods) {\n watchMethods.map((watchMethodName) => {\n try {\n instance[watchMethodName](newVal, oldVal, propName);\n } catch (e) {\n consoleError(e, elm);\n }\n });\n }\n }\n if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {\n if (instance.componentShouldUpdate) {\n if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {\n return;\n }\n }\n scheduleUpdate(hostRef, false);\n }\n }\n }\n};\n\n// src/runtime/proxy-component.ts\nvar proxyComponent = (Cstr, cmpMeta, flags) => {\n var _a, _b;\n const prototype = Cstr.prototype;\n if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {\n if (Cstr.watchers && !cmpMeta.$watchers$) {\n cmpMeta.$watchers$ = Cstr.watchers;\n }\n const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});\n members.map(([memberName, [memberFlags]]) => {\n if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {\n const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};\n if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;\n if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;\n {\n Object.defineProperty(prototype, memberName, {\n get() {\n {\n return origGetter ? origGetter.apply(this) : getValue(this, memberName);\n }\n },\n configurable: true,\n enumerable: true\n });\n }\n Object.defineProperty(prototype, memberName, {\n set(newValue) {\n const ref = getHostRef(this);\n if (origSetter) {\n const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];\n if (typeof currentValue === \"undefined\" && ref.$instanceValues$.get(memberName)) {\n newValue = ref.$instanceValues$.get(memberName);\n } else if (!ref.$instanceValues$.get(memberName) && currentValue) {\n ref.$instanceValues$.set(memberName, currentValue);\n }\n origSetter.apply(this, [\n parsePropertyValue(\n newValue,\n memberFlags)\n ]);\n newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];\n setValue(this, memberName, newValue, cmpMeta);\n return;\n }\n {\n setValue(this, memberName, newValue, cmpMeta);\n return;\n }\n }\n });\n }\n });\n {\n const attrNameToPropName = /* @__PURE__ */ new Map();\n prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {\n plt.jmp(() => {\n var _a2;\n const propName = attrNameToPropName.get(attrName);\n if (this.hasOwnProperty(propName) && BUILD.lazyLoad) ; else if (prototype.hasOwnProperty(propName) && typeof this[propName] === \"number\" && // cast type to number to avoid TS compiler issues\n this[propName] == newValue) {\n return;\n } else if (propName == null) {\n const hostRef = getHostRef(this);\n const flags2 = hostRef == null ? void 0 : hostRef.$flags$;\n if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {\n const elm = this;\n const instance = elm;\n const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];\n entry == null ? void 0 : entry.forEach((callbackName) => {\n if (instance[callbackName] != null) {\n instance[callbackName].call(instance, newValue, oldValue, attrName);\n }\n });\n }\n return;\n }\n const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);\n newValue = newValue === null && typeof this[propName] === \"boolean\" ? false : newValue;\n if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {\n this[propName] = newValue;\n }\n });\n };\n Cstr.observedAttributes = Array.from(\n /* @__PURE__ */ new Set([\n ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),\n ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {\n var _a2;\n const attrName = m[1] || propName;\n attrNameToPropName.set(attrName, propName);\n if (m[0] & 512 /* ReflectAttr */) {\n (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);\n }\n return attrName;\n })\n ])\n );\n }\n }\n return Cstr;\n};\n\n// src/runtime/initialize-component.ts\nvar initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {\n let Cstr;\n if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {\n hostRef.$flags$ |= 32 /* hasInitializedComponent */;\n {\n Cstr = elm.constructor;\n const cmpTag = elm.localName;\n customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);\n }\n if (Cstr && Cstr.style) {\n let style;\n if (typeof Cstr.style === \"string\") {\n style = Cstr.style;\n }\n const scopeId2 = getScopeId(cmpMeta);\n if (!styles.has(scopeId2)) {\n const endRegisterStyles = createTime(\"registerStyles\", cmpMeta.$tagName$);\n registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));\n endRegisterStyles();\n }\n }\n }\n const ancestorComponent = hostRef.$ancestorComponent$;\n const schedule = () => scheduleUpdate(hostRef, true);\n if (ancestorComponent && ancestorComponent[\"s-rc\"]) {\n ancestorComponent[\"s-rc\"].push(schedule);\n } else {\n schedule();\n }\n};\nvar fireConnectedCallback = (instance, elm) => {\n};\n\n// src/runtime/connected-callback.ts\nvar connectedCallback = (elm) => {\n if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n const cmpMeta = hostRef.$cmpMeta$;\n const endConnected = createTime(\"connectedCallback\", cmpMeta.$tagName$);\n if (!(hostRef.$flags$ & 1 /* hasConnected */)) {\n hostRef.$flags$ |= 1 /* hasConnected */;\n {\n let ancestorComponent = elm;\n while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {\n if (ancestorComponent[\"s-p\"]) {\n attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);\n break;\n }\n }\n }\n if (cmpMeta.$members$) {\n Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {\n if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {\n const value = elm[memberName];\n delete elm[memberName];\n elm[memberName] = value;\n }\n });\n }\n if (BUILD.initializeNextTick) {\n nextTick(() => initializeComponent(elm, hostRef, cmpMeta));\n } else {\n initializeComponent(elm, hostRef, cmpMeta);\n }\n } else {\n if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {\n hostRef.$onReadyPromise$.then(() => fireConnectedCallback());\n }\n }\n endConnected();\n }\n};\nvar disconnectedCallback = async (elm) => {\n if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {\n getHostRef(elm);\n }\n if (rootAppliedStyles.has(elm)) {\n rootAppliedStyles.delete(elm);\n }\n if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {\n rootAppliedStyles.delete(elm.shadowRoot);\n }\n};\nvar proxyCustomElement = (Cstr, compactMeta) => {\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1]\n };\n {\n cmpMeta.$members$ = compactMeta[2];\n }\n {\n cmpMeta.$watchers$ = Cstr.$watchers$;\n }\n {\n cmpMeta.$attrsToReflect$ = [];\n }\n const originalConnectedCallback = Cstr.prototype.connectedCallback;\n const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;\n Object.assign(Cstr.prototype, {\n __hasHostListenerAttached: false,\n __registerHost() {\n registerHost(this, cmpMeta);\n },\n connectedCallback() {\n if (!this.__hasHostListenerAttached) {\n getHostRef(this);\n this.__hasHostListenerAttached = true;\n }\n connectedCallback(this);\n if (originalConnectedCallback) {\n originalConnectedCallback.call(this);\n }\n },\n disconnectedCallback() {\n disconnectedCallback(this);\n if (originalDisconnectedCallback) {\n originalDisconnectedCallback.call(this);\n }\n },\n __attachShadow() {\n {\n if (!this.shadowRoot) {\n createShadowRoot.call(this, cmpMeta);\n } else {\n if (this.shadowRoot.mode !== \"open\") {\n throw new Error(\n `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`\n );\n }\n }\n }\n }\n });\n Cstr.is = cmpMeta.$tagName$;\n return proxyComponent(Cstr, cmpMeta);\n};\n\n// src/runtime/nonce.ts\nvar setNonce = (nonce) => plt.$nonce$ = nonce;\n\n// src/runtime/platform-options.ts\nvar setPlatformOptions = (opts) => Object.assign(plt, opts);\n\n// src/runtime/render.ts\nfunction render(vnode, container) {\n const cmpMeta = {\n $flags$: 0,\n $tagName$: container.tagName\n };\n const ref = {\n $cmpMeta$: cmpMeta,\n $hostElement$: container\n };\n renderVdom(ref, vnode);\n}\n\nlet CACHED_MAP;\nconst getIconMap = () => {\n if (typeof window === 'undefined') {\n return new Map();\n }\n else {\n if (!CACHED_MAP) {\n const win = window;\n win.Ionicons = win.Ionicons || {};\n CACHED_MAP = win.Ionicons.map = win.Ionicons.map || new Map();\n }\n return CACHED_MAP;\n }\n};\nconst addIcons = (icons) => {\n Object.keys(icons).forEach((name) => {\n addToIconMap(name, icons[name]);\n /**\n * Developers can also pass in the SVG object directly\n * and Ionicons can map the object to a kebab case name.\n * Example: addIcons({ addCircleOutline });\n * This will create an \"addCircleOutline\" entry and\n * an \"add-circle-outline\" entry.\n * Usage: <ion-icon name=\"add-circle-outline\"></ion-icon>\n * Using name=\"addCircleOutline\" is valid too, but the\n * kebab case naming is preferred.\n */\n const toKebabCase = name.replace(/([a-z0-9]|(?=[A-Z]))([A-Z0-9])/g, '$1-$2').toLowerCase();\n if (name !== toKebabCase) {\n addToIconMap(toKebabCase, icons[name]);\n }\n });\n};\nconst addToIconMap = (name, data) => {\n const map = getIconMap();\n const existingIcon = map.get(name);\n if (existingIcon === undefined) {\n map.set(name, data);\n /**\n * Importing and defining the same icon reference\n * multiple times should not yield a warning.\n */\n }\n else if (existingIcon !== data) {\n console.warn(`[Ionicons Warning]: Multiple icons were mapped to name \"${name}\". Ensure that multiple icons are not mapped to the same icon name.`);\n }\n};\nconst getUrl = (i) => {\n let url = getSrc(i.src);\n if (url) {\n return url;\n }\n url = getName(i.name, i.icon, i.mode, i.ios, i.md);\n if (url) {\n return getNamedUrl(url, i);\n }\n if (i.icon) {\n url = getSrc(i.icon);\n if (url) {\n return url;\n }\n url = getSrc(i.icon[i.mode]);\n if (url) {\n return url;\n }\n }\n return null;\n};\nconst getNamedUrl = (iconName, iconEl) => {\n const url = getIconMap().get(iconName);\n if (url) {\n return url;\n }\n try {\n return getAssetPath(`svg/${iconName}.svg`);\n }\n catch (e) {\n console.log('e', e);\n /**\n * In the custom elements build version of ionicons, referencing an icon\n * by name will throw an invalid URL error because the asset path is not defined.\n * This catches that error and logs something that is more developer-friendly.\n * We also include a reference to the ion-icon element so developers can\n * figure out which instance of ion-icon needs to be updated.\n */\n console.warn(`[Ionicons Warning]: Could not load icon with name \"${iconName}\". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`, iconEl);\n }\n};\nconst getName = (iconName, icon, mode, ios, md) => {\n // default to \"md\" if somehow the mode wasn't set\n mode = (mode && toLower(mode)) === 'ios' ? 'ios' : 'md';\n // if an icon was passed in using the ios or md attributes\n // set the iconName to whatever was passed in\n if (ios && mode === 'ios') {\n iconName = toLower(ios);\n }\n else if (md && mode === 'md') {\n iconName = toLower(md);\n }\n else {\n if (!iconName && icon && !isSrc(icon)) {\n iconName = icon;\n }\n if (isStr(iconName)) {\n iconName = toLower(iconName);\n }\n }\n if (!isStr(iconName) || iconName.trim() === '') {\n return null;\n }\n // only allow alpha characters and dash\n const invalidChars = iconName.replace(/[a-z]|-|\\d/gi, '');\n if (invalidChars !== '') {\n return null;\n }\n return iconName;\n};\nconst getSrc = (src) => {\n if (isStr(src)) {\n src = src.trim();\n if (isSrc(src)) {\n return src;\n }\n }\n return null;\n};\nconst isSrc = (str) => str.length > 0 && /(\\/|\\.)/.test(str);\nconst isStr = (val) => typeof val === 'string';\nconst toLower = (val) => val.toLowerCase();\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `ion-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nconst inheritAttributes = (el, attributes = []) => {\n const attributeObject = {};\n attributes.forEach((attr) => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n el.removeAttribute(attr);\n }\n });\n return attributeObject;\n};\n/**\n * Returns `true` if the document or host element\n * has a `dir` set to `rtl`. The host value will always\n * take priority over the root document value.\n */\nconst isRTL = (hostEl) => {\n if (hostEl) {\n if (hostEl.dir !== '') {\n return hostEl.dir.toLowerCase() === 'rtl';\n }\n }\n return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === 'rtl';\n};\n\nexport { H, inheritAttributes as a, addIcons, getName as b, isRTL as c, Host as d, getUrl as g, getAssetPath, h, isStr as i, proxyCustomElement as p, render, setAssetPath, setNonce, setPlatformOptions };\n","import { i as isStr, p as proxyCustomElement, H, a as inheritAttributes, g as getUrl, b as getName, h, c as isRTL, d as Host } from './index.js';\n\nconst validateContent = (svgContent) => {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n // setup this way to ensure it works on our buddy IE\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n // must only have 1 root element\n const svgElm = div.firstElementChild;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\n const svgClass = svgElm.getAttribute('class') || '';\n svgElm.setAttribute('class', (svgClass + ' s-ion-icon').trim());\n // root element must be an svg\n // lets double check we've got valid elements\n // do not allow scripts\n if (isValid(svgElm)) {\n return div.innerHTML;\n }\n }\n return '';\n};\nconst isValid = (elm) => {\n if (elm.nodeType === 1) {\n if (elm.nodeName.toLowerCase() === 'script') {\n return false;\n }\n for (let i = 0; i < elm.attributes.length; i++) {\n const name = elm.attributes[i].name;\n if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {\n return false;\n }\n }\n for (let i = 0; i < elm.childNodes.length; i++) {\n if (!isValid(elm.childNodes[i])) {\n return false;\n }\n }\n }\n return true;\n};\nconst isSvgDataUrl = (url) => url.startsWith('data:image/svg+xml');\nconst isEncodedDataUrl = (url) => url.indexOf(';utf8,') !== -1;\n\nconst ioniconContent = new Map();\nconst requests = new Map();\nlet parser;\n/**\n * Safely fallback to an empty svg\n */\nfunction safeFallback(url) {\n const svg = '';\n ioniconContent.set(url, svg);\n return svg;\n}\nconst getSvgContent = (url, sanitize) => {\n /**\n * See if we already have a request for this url\n */\n const req = requests.get(url);\n if (req) {\n return req;\n }\n if (typeof fetch !== 'undefined' && typeof document !== 'undefined') {\n /**\n * If the url is a data url of an svg, then try to parse it\n * with the DOMParser. This works with content security policies enabled.\n */\n if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n return Promise.resolve(getSvgByUrl(url));\n }\n return fetchSvg(url, sanitize);\n }\n return Promise.resolve(safeFallback(url));\n};\nfunction getSvgByUrl(url) {\n if (!parser) {\n /**\n * Create an instance of the DOM parser. This creates a single\n * parser instance for the entire app, which is more efficient.\n */\n parser = new DOMParser();\n }\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n if (svg) {\n ioniconContent.set(url, svg.outerHTML);\n return svg.outerHTML;\n }\n throw new Error(`Could not parse svg from ${url}`);\n}\nfunction fetchSvg(url, sanitize) {\n /**\n * We don't already have a request\n */\n const req = fetch(url)\n .then((rsp) => {\n /**\n * When fetching from a file:// URL, some browsers return\n * a 0 status code even when the request succeeds so don't\n * rely on rsp.ok as the only signal of success.\n */\n return rsp\n .text()\n .then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n const svg = svgContent || '';\n ioniconContent.set(url, svg);\n return svg;\n })\n .catch(() => safeFallback(url));\n })\n .catch(() => safeFallback(url));\n /**\n * Cache for the same requests\n */\n requests.set(url, req);\n return req;\n}\n\nconst iconCss = \":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}\";\n\nconst Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends H {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n this.iconName = null;\n this.inheritedAttributes = {};\n this.didLoadIcon = false;\n this.isVisible = false;\n /**\n * The mode determines which platform styles to use.\n */\n this.mode = getIonMode();\n /**\n * If enabled, ion-icon will be loaded lazily when it's visible in the viewport.\n * Default, `false`.\n */\n this.lazy = false;\n /**\n * When set to `false`, SVG content that is HTTP fetched will not be checked\n * if the response SVG content has any `<script>` elements, or any attributes\n * that start with `on`, such as `onclick`.\n * @default true\n */\n this.sanitize = true;\n }\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n }\n connectedCallback() {\n /**\n * purposely do not return the promise here because loading\n * the svg file should not hold up loading the app\n * only load the svg if it's visible\n */\n this.waitUntilVisible(this.el, '50px', () => {\n this.isVisible = true;\n this.loadIcon();\n });\n }\n /**\n * Loads the icon after the component has finished rendering.\n */\n componentDidLoad() {\n /**\n * Addresses an Angular issue where property values are assigned after the 'connectedCallback' but prior to the registration of watchers.\n * This enhancement ensures the loading of an icon when the component has finished rendering and the icon has yet to apply the SVG data.\n * This modification pertains to the usage of Angular's binding syntax:\n * `<ion-icon [name]=\"myIconName\"></ion-icon>`\n */\n if (!this.didLoadIcon) {\n this.loadIcon();\n }\n }\n /**\n * Disconnect the IntersectionObserver.\n */\n disconnectedCallback() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n /**\n * Wait until the icon is visible in the viewport.\n * @param el - The element to observe.\n * @param rootMargin - The root margin of the observer.\n * @param cb - The callback to call when the element is visible.\n */\n waitUntilVisible(el, rootMargin, cb) {\n /**\n * IntersectionObserver is a browser API that allows you to observe\n * the visibility of an element relative to a root element. It is\n * supported in all modern browsers, except IE and when server-side\n * rendering.\n */\n const hasIntersectionObserverSupport = Boolean(this.lazy && typeof window !== 'undefined' && window.IntersectionObserver);\n /**\n * browser doesn't support IntersectionObserver\n * so just fallback to always show it\n */\n if (!hasIntersectionObserverSupport) {\n return cb();\n }\n const io = (this.io = new window.IntersectionObserver((data) => {\n if (data[0].isIntersecting) {\n io.disconnect();\n this.io = undefined;\n cb();\n }\n }, { rootMargin }));\n io.observe(el);\n }\n /**\n * Watch for changes to the icon name, src, icon, ios, or md properties.\n * When a change is detected, the icon will be loaded.\n */\n loadIcon() {\n if (this.isVisible) {\n const url = getUrl(this);\n if (url) {\n if (ioniconContent.has(url)) {\n // sync if it's already loaded\n this.svgContent = ioniconContent.get(url);\n }\n else {\n // async if it hasn't been loaded\n getSvgContent(url, this.sanitize).then(() => (this.svgContent = ioniconContent.get(url)));\n }\n this.didLoadIcon = true;\n }\n }\n this.iconName = getName(this.name, this.icon, this.mode, this.ios, this.md);\n }\n render() {\n const { flipRtl, iconName, inheritedAttributes, el } = this;\n const mode = this.mode || 'md';\n /**\n * we have designated that arrows & chevrons should automatically flip (unless flip-rtl\n * is set to false) because \"back\" is left in ltr and right in rtl, and \"forward\" is the opposite\n */\n const shouldAutoFlip = iconName\n ? (iconName.includes('arrow') || iconName.includes('chevron')) && flipRtl !== false\n : false;\n /**\n * if shouldBeFlippable is true, the icon should change direction when `dir` changes\n */\n const shouldBeFlippable = flipRtl || shouldAutoFlip;\n return (h(Host, Object.assign({ key: '0578c899781ca145dd8205acd9670af39b57cf2e', role: \"img\", class: Object.assign(Object.assign({ [mode]: true }, createColorClasses(this.color)), { [`icon-${this.size}`]: !!this.size, 'flip-rtl': shouldBeFlippable, 'icon-rtl': shouldBeFlippable && isRTL(el) }) }, inheritedAttributes), this.svgContent ? (h(\"div\", { class: \"icon-inner\", innerHTML: this.svgContent })) : (h(\"div\", { class: \"icon-inner\" }))));\n }\n static get assetsDirs() { return [\"svg\"]; }\n get el() { return this; }\n static get watchers() { return {\n \"name\": [\"loadIcon\"],\n \"src\": [\"loadIcon\"],\n \"icon\": [\"loadIcon\"],\n \"ios\": [\"loadIcon\"],\n \"md\": [\"loadIcon\"]\n }; }\n static get style() { return iconCss; }\n}, [1, \"ion-icon\", {\n \"mode\": [1025],\n \"color\": [1],\n \"ios\": [1],\n \"md\": [1],\n \"flipRtl\": [4, \"flip-rtl\"],\n \"name\": [513],\n \"src\": [1],\n \"icon\": [8],\n \"size\": [1],\n \"lazy\": [4],\n \"sanitize\": [4],\n \"svgContent\": [32],\n \"isVisible\": [32]\n }, undefined, {\n \"name\": [\"loadIcon\"],\n \"src\": [\"loadIcon\"],\n \"icon\": [\"loadIcon\"],\n \"ios\": [\"loadIcon\"],\n \"md\": [\"loadIcon\"]\n }]);\n/**\n * Get the mode of the document.\n * @returns The mode of the document.\n */\nconst getIonMode = () => (typeof document !== 'undefined' && document.documentElement.getAttribute('mode')) || 'md';\n/**\n * Create color classes for the icon.\n * @param color - The color of the icon.\n * @returns The color classes for the icon.\n */\nconst createColorClasses = (color) => {\n return color\n ? {\n 'ion-color': true,\n [`ion-color-${color}`]: true,\n }\n : null;\n};\nfunction defineCustomElement$1() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-icon\"];\n components.forEach(tagName => { switch (tagName) {\n case \"ion-icon\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, Icon);\n }\n break;\n } });\n}\n\nconst IonIcon = Icon;\nconst defineCustomElement = defineCustomElement$1;\n\nexport { IonIcon, defineCustomElement };\n","import \"@ionic/core/css/core.css\";\nimport \"@ionic/core/css/normalize.css\";\nimport \"@ionic/core/css/structure.css\";\nimport \"@ionic/core/css/typography.css\";\nimport \"@ionic/core/css/padding.css\";\nimport \"@ionic/core/css/flex-utils.css\";\nimport \"@ionic/core/css/display.css\";\n\nimport { initialize } from \"@ionic/core/components\";\nimport { defineCustomElement as defineIonApp } from \"@ionic/core/components/ion-app.js\";\nimport { defineCustomElement as defineIonHeader } from \"@ionic/core/components/ion-header.js\";\nimport { defineCustomElement as defineIonToolbar } from \"@ionic/core/components/ion-toolbar.js\";\nimport { defineCustomElement as defineIonTitle } from \"@ionic/core/components/ion-title.js\";\nimport { defineCustomElement as defineIonContent } from \"@ionic/core/components/ion-content.js\";\nimport { defineCustomElement as defineIonButtons } from \"@ionic/core/components/ion-buttons.js\";\nimport { defineCustomElement as defineIonNote } from \"@ionic/core/components/ion-note.js\";\nimport { defineCustomElement as defineIonSpinner } from \"@ionic/core/components/ion-spinner.js\";\nimport { defineCustomElement as defineIonList } from \"@ionic/core/components/ion-list.js\";\nimport { defineCustomElement as defineIonItem } from \"@ionic/core/components/ion-item.js\";\nimport { defineCustomElement as defineIonLabel } from \"@ionic/core/components/ion-label.js\";\nimport { defineCustomElement as defineIonCard } from \"@ionic/core/components/ion-card.js\";\nimport { defineCustomElement as defineIonCardHeader } from \"@ionic/core/components/ion-card-header.js\";\nimport { defineCustomElement as defineIonCardTitle } from \"@ionic/core/components/ion-card-title.js\";\nimport { defineCustomElement as defineIonCardSubtitle } from \"@ionic/core/components/ion-card-subtitle.js\";\nimport { defineCustomElement as defineIonCardContent } from \"@ionic/core/components/ion-card-content.js\";\nimport { defineCustomElement as defineIonRippleEffect } from \"@ionic/core/components/ion-ripple-effect.js\";\nimport { defineCustomElement as defineIonIcon } from \"ionicons/components/ion-icon.js\";\nimport { defineCustomElement as defineIonRouter } from \"@ionic/core/components/ion-router.js\";\nimport { defineCustomElement as defineIonRoute } from \"@ionic/core/components/ion-route.js\";\nimport { defineCustomElement as defineIonRouterOutlet } from \"@ionic/core/components/ion-router-outlet.js\";\nimport { defineCustomElement as defineIonBackButton } from \"@ionic/core/components/ion-back-button.js\";\n\nlet isInitialized = false;\n\nexport function setupNixIonic() {\n if (isInitialized) return;\n\n // Inicializa la configuración global del framework\n initialize();\n\n // Define los web components en el navegador de forma síncrona\n defineIonApp();\n defineIonHeader();\n defineIonToolbar();\n defineIonTitle();\n defineIonContent();\n defineIonButtons();\n defineIonNote();\n defineIonSpinner();\n defineIonList();\n defineIonItem();\n defineIonLabel();\n defineIonCard();\n defineIonCardHeader();\n defineIonCardTitle();\n defineIonCardSubtitle();\n defineIonCardContent();\n defineIonRippleEffect();\n defineIonIcon();\n\n defineIonRouter();\n defineIonRoute();\n defineIonRouterOutlet();\n defineIonBackButton();\n\n isInitialized = true;\n}","import { NixComponent } from \"@deijose/nix-js\";\nimport type { NixTemplate } from \"@deijose/nix-js\";\nimport { createPageLifecycle, type PageLifecycle } from \"./lifecycle\";\n\n// --------------------------------------------------------------------------\n// Router store singleton\n// --------------------------------------------------------------------------\n\nexport function useRouter() {\n return {\n navigate: (path: string, direction: \"forward\" | \"back\" | \"root\" = \"forward\") => {\n const router = document.querySelector(\"ion-router\");\n if (router && typeof (router as any).push === \"function\") {\n (router as any).push(path, direction);\n }\n },\n replace: (path: string) => {\n const router = document.querySelector(\"ion-router\");\n if (router && typeof (router as any).push === \"function\") {\n (router as any).push(path, \"root\");\n }\n },\n back: () => {\n const router = document.querySelector(\"ion-router\");\n if (router && typeof (router as any).back === \"function\") {\n (router as any).back();\n }\n }\n };\n}\n\n// --------------------------------------------------------------------------\n// IonBackButton (Sin listeners, 100% nativo)\n// --------------------------------------------------------------------------\n\nexport function IonBackButton(defaultHref: string | undefined = \"/\"): NixTemplate {\n return {\n __isNixTemplate: true as const,\n mount(container) {\n const el = typeof container === \"string\" ? document.querySelector(container)! : container;\n const cleanup = this._render(el, null);\n return { unmount: cleanup };\n },\n _render(parent: Node, before: Node | null): () => void {\n const btn = document.createElement(\"ion-back-button\");\n if (defaultHref) btn.setAttribute(\"default-href\", defaultHref);\n parent.insertBefore(btn, before);\n return () => btn.remove();\n },\n };\n}\n\n// --------------------------------------------------------------------------\n// Tipos públicos\n// --------------------------------------------------------------------------\n\nexport interface PageContext {\n lc: PageLifecycle;\n params: Record<string, string>;\n}\n\nexport interface RouteDefinition {\n path: string;\n component: (ctx: PageContext) => NixComponent | NixTemplate;\n}\n\n// --------------------------------------------------------------------------\n// IonRouterOutlet (El Bridge Maestro usando Framework Delegate)\n// --------------------------------------------------------------------------\n\nexport class IonRouterOutlet extends NixComponent {\n private routes: RouteDefinition[];\n\n constructor(routes: RouteDefinition[]) {\n super();\n this.routes = routes;\n }\n\n // Crea un ID único interno para mapear la ruta\n private _pathToRouteId(path: string): string {\n if (!path || path === \"/\") return \"nix-route-home\";\n const clean = path\n .replace(/\\/:?[^/]+/g, (m) => \"-\" + m.replace(/\\//g, \"\").replace(/:/g, \"\"))\n .replace(/^\\//, \"\")\n .replace(/\\//g, \"-\");\n return `nix-route-${clean}`;\n }\n\n override render(): NixTemplate {\n const self = this;\n return {\n __isNixTemplate: true as const,\n mount(container: Element | string) {\n const el = typeof container === \"string\" ? document.querySelector(container)! : container;\n const cleanup = this._render(el, null);\n return { unmount: cleanup };\n },\n _render(parent: Node, before: Node | null): () => void {\n \n const routerEl = document.createElement(\"ion-router\");\n routerEl.setAttribute(\"use-hash\", \"false\");\n \n // Creamos los <ion-route> asociados a un Component ID en vez de un Custom Element\n self.routes.filter((r) => r.path !== \"*\").forEach((r) => {\n const routeEl = document.createElement(\"ion-route\");\n routeEl.setAttribute(\"url\", r.path);\n routeEl.setAttribute(\"component\", self._pathToRouteId(r.path));\n routerEl.appendChild(routeEl);\n });\n\n const outletEl = document.createElement(\"ion-router-outlet\");\n\n // 🔥 INVERSIÓN DE CONTROL: Framework Delegate 🔥\n (outletEl as any).delegate = {\n // Ionic llama a attachViewToDom cuando debe instanciar una vista nueva o usar caché\n attachViewToDom: async (container: HTMLElement, componentTag: string, props: any, classes: string[]) => {\n \n const routeDef = self.routes.find(r => self._pathToRouteId(r.path) === componentTag);\n \n // Requisito de Ionic: la vista debe ser un elemento con clase .ion-page\n const pageEl = document.createElement(\"div\");\n pageEl.classList.add(\"ion-page\");\n if (classes && classes.length) pageEl.classList.add(...classes);\n\n // 1. Escuchar los eventos DOM nativos que dispara el outlet\n const lc = createPageLifecycle();\n pageEl.addEventListener(\"ionViewWillEnter\", () => lc.willEnter.update((n) => n + 1));\n pageEl.addEventListener(\"ionViewDidEnter\", () => lc.didEnter.update((n) => n + 1));\n pageEl.addEventListener(\"ionViewWillLeave\", () => lc.willLeave.update((n) => n + 1));\n pageEl.addEventListener(\"ionViewDidLeave\", () => lc.didLeave.update((n) => n + 1));\n\n if (routeDef) {\n // 2. Props entregadas DIRECTAMENTE por Ionic (contiene los Params de la ruta)\n const params = props || {};\n \n // 3. Renderizado agnóstico mediante Nix.js\n const pageNode = routeDef.component({ lc, params });\n\n if (\"render\" in pageNode && typeof (pageNode as NixComponent).render === \"function\") {\n const comp = pageNode as NixComponent;\n comp.onInit?.();\n const renderCleanup = comp.render()._render(pageEl, null);\n const mountRet = comp.onMount?.();\n\n // Registrar en el nodo DOM cómo debe Nix limpiar esta vista\n (pageEl as any)._nixCleanup = () => {\n comp.onUnmount?.();\n if (typeof mountRet === \"function\") mountRet();\n renderCleanup();\n };\n } else {\n const renderCleanup = (pageNode as NixTemplate)._render(pageEl, null);\n (pageEl as any)._nixCleanup = renderCleanup;\n }\n }\n\n container.appendChild(pageEl);\n return pageEl;\n },\n // Ionic llama a removeViewFromDom cuando el usuario navega hacia atrás y se destruye el caché\n removeViewFromDom: async (_container: HTMLElement, component: HTMLElement) => {\n if ((component as any)._nixCleanup) {\n (component as any)._nixCleanup(); // 🧹 Destrucción Segura de Effects (Memory Leaks evitados)\n }\n component.remove();\n }\n };\n\n parent.insertBefore(routerEl, before);\n parent.insertBefore(outletEl, before);\n\n return () => {\n routerEl.remove();\n outletEl.remove();\n };\n },\n };\n }\n}"],"x_google_ignoreList":[1,2],"mappings":"m+CA8BA,SAAgB,IAAqC,CACnD,MAAO,CACL,WAAA,EAAA,EAAA,QAAkB,EAAE,CACpB,UAAA,EAAA,EAAA,QAAkB,EAAE,CACpB,WAAA,EAAA,EAAA,QAAkB,EAAE,CACpB,UAAA,EAAA,EAAA,QAAkB,EAAE,CACrB,CAeH,IAAsB,GAAtB,cAAsC,EAAA,YAAa,CACjD,KAEA,YAAY,EAAmB,CAC7B,OAAO,CACP,KAAK,KAAO,EAGd,QAAwB,CACtB,IAAM,EAAK,KAAK,KAGZ,KAAK,mBAAkB,EAAA,EAAA,OAAM,EAAG,UAAW,KAAK,iBAAiB,KAAK,KAAK,CAAC,CAC5E,KAAK,kBAAkB,EAAA,EAAA,OAAM,EAAG,SAAW,KAAK,gBAAgB,KAAK,KAAK,CAAC,CAC3E,KAAK,mBAAkB,EAAA,EAAA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}
|
package/dist/lib/nix-ionic.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{NixComponent as e,signal as t,watch as n}from"@deijose/nix-js";import{initialize as r}from"@ionic/core/components";import{defineCustomElement as i}from"@ionic/core/components/ion-router.js";import{defineCustomElement as a}from"@ionic/core/components/ion-route.js";import{defineCustomElement as o}from"@ionic/core/components/ion-router-outlet.js";import{defineCustomElement as s}from"@ionic/core/components/ion-back-button.js";function c(){return{willEnter:t(0),didEnter:t(0),willLeave:t(0),didLeave:t(0)}}var l=class extends e{__lc;constructor(e){super(),this.__lc=e}onInit(){let e=this.__lc;this.ionViewWillEnter&&n(e.willEnter,this.ionViewWillEnter.bind(this)),this.ionViewDidEnter&&n(e.didEnter,this.ionViewDidEnter.bind(this)),this.ionViewWillLeave&&n(e.willLeave,this.ionViewWillLeave.bind(this)),this.ionViewDidLeave&&n(e.didLeave,this.ionViewDidLeave.bind(this))}};function u(e,t){n(e.willEnter,t)}function d(e,t){n(e.didEnter,t)}function f(e,t){n(e.willLeave,t)}function p(e,t){n(e.didLeave,t)}var m=!1;function h(e={}){m||=(r(e),i(),a(),o(),s(),!0)}function g(){let e=document.querySelector("ion-router");return{navigate:t=>{e?.push(t,"forward")},replace:t=>{e?.push(t,"root")},back:()=>{e?.back()}}}function _(e){return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,n){let i=document.createElement("ion-back-button");return e&&i.setAttribute("default-href",e),t.insertBefore(i,n),()=>i.remove()}}}var v=class extends e{routes;constructor(e){super(),this.routes=e,this._registerCustomElements()}_extractParams(e,t){let n={},i=e.split("/"),o=t.split("/");for(let e=0;e<i.length;e++)i[e]?.startsWith(":")&&(n[i[e].slice(1)]=o[e]??"");return n}_pathToTag(e){return e&&"/"!==e?`nix-page-${e.replace(/\/:?[^/]+/g,e=>"-"+e.replace(/\//g,"").replace(/:/g,"")).replace(/^\//,"").replace(/\//g,"-")}`:"nix-page-home"}_registerCustomElements(){let e=this;for(let t of this.routes){if("*"===t.path)continue;let n=this._pathToTag(t.path);customElements.get(n)||customElements.define(n,class extends HTMLElement{_handle=null;connectedCallback(){if(this._handle)return;this.classList.add("ion-page");let n=c();this.addEventListener("ionViewWillEnter",()=>n.willEnter.update(e=>e+1)),this.addEventListener("ionViewDidEnter",()=>n.didEnter.update(e=>e+1)),this.addEventListener("ionViewWillLeave",()=>n.willLeave.update(e=>e+1)),this.addEventListener("ionViewDidLeave",()=>n.didLeave.update(e=>e+1));let i=e._extractParams(t.path,location.pathname),o=t.component({lc:n,params:i});if("render"in o&&"function"==typeof o.render){let e=o;e.onInit?.();let t=e.render()._render(this,null),n=e.onMount?.();this._handle={unmount:()=>{e.onUnmount?.(),"function"==typeof n&&n(),t()}}}else this._handle={unmount:o._render(this,null)}}disconnectedCallback(){this._handle?.unmount(),this._handle=null}})}}render(){let e=this;return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,n){let i=document.createElement("ion-router");i.setAttribute("use-hash","false"),i.innerHTML=e.routes.filter(e=>"*"!==e.path).map(t=>`<ion-route url="${t.path}" component="${e._pathToTag(t.path)}"></ion-route>`).join("");let o=document.createElement("ion-router-outlet");return t.insertBefore(i,n),t.insertBefore(o,n),()=>{i.remove(),o.remove()}}}}};export{_ as IonBackButton,l as IonPage,v as IonRouterOutlet,c as createPageLifecycle,h as setupNixIonic,d as useIonViewDidEnter,p as useIonViewDidLeave,u as useIonViewWillEnter,f as useIonViewWillLeave,g as useRouter};
|
|
1
|
+
import{NixComponent as e,signal as t,watch as n}from"@deijose/nix-js";import"@ionic/core/css/core.css";import"@ionic/core/css/normalize.css";import"@ionic/core/css/structure.css";import"@ionic/core/css/typography.css";import"@ionic/core/css/padding.css";import"@ionic/core/css/flex-utils.css";import"@ionic/core/css/display.css";import{initialize as r}from"@ionic/core/components";import{defineCustomElement as i}from"@ionic/core/components/ion-app.js";import{defineCustomElement as a}from"@ionic/core/components/ion-header.js";import{defineCustomElement as o}from"@ionic/core/components/ion-toolbar.js";import{defineCustomElement as s}from"@ionic/core/components/ion-title.js";import{defineCustomElement as c}from"@ionic/core/components/ion-content.js";import{defineCustomElement as l}from"@ionic/core/components/ion-buttons.js";import{defineCustomElement as u}from"@ionic/core/components/ion-note.js";import{defineCustomElement as d}from"@ionic/core/components/ion-spinner.js";import{defineCustomElement as f}from"@ionic/core/components/ion-list.js";import{defineCustomElement as p}from"@ionic/core/components/ion-item.js";import{defineCustomElement as m}from"@ionic/core/components/ion-label.js";import{defineCustomElement as h}from"@ionic/core/components/ion-card.js";import{defineCustomElement as g}from"@ionic/core/components/ion-card-header.js";import{defineCustomElement as ee}from"@ionic/core/components/ion-card-title.js";import{defineCustomElement as te}from"@ionic/core/components/ion-card-subtitle.js";import{defineCustomElement as ne}from"@ionic/core/components/ion-card-content.js";import{defineCustomElement as re}from"@ionic/core/components/ion-ripple-effect.js";import{defineCustomElement as ie}from"@ionic/core/components/ion-router.js";import{defineCustomElement as ae}from"@ionic/core/components/ion-route.js";import{defineCustomElement as oe}from"@ionic/core/components/ion-router-outlet.js";import{defineCustomElement as se}from"@ionic/core/components/ion-back-button.js";function ce(){return{willEnter:t(0),didEnter:t(0),willLeave:t(0),didLeave:t(0)}}var le=class extends e{__lc;constructor(e){super(),this.__lc=e}onInit(){let e=this.__lc;this.ionViewWillEnter&&n(e.willEnter,this.ionViewWillEnter.bind(this)),this.ionViewDidEnter&&n(e.didEnter,this.ionViewDidEnter.bind(this)),this.ionViewWillLeave&&n(e.willLeave,this.ionViewWillLeave.bind(this)),this.ionViewDidLeave&&n(e.didLeave,this.ionViewDidLeave.bind(this))}};function ue(e,t){n(e.willEnter,t)}function de(e,t){n(e.didEnter,t)}function fe(e,t){n(e.willLeave,t)}function pe(e,t){n(e.didLeave,t)}var me="ionicons",_={hydratedSelectorName:"hydrated",lazyLoad:!1,updatable:!0},he=Object.defineProperty,ge=(e,t)=>{for(var o in t)he(e,o,{get:t[o],enumerable:!0})},v=e=>{if(e.__stencil__getHostRef)return e.__stencil__getHostRef()},_e=(e,t)=>{let o={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};o.$onReadyPromise$=new Promise(e=>o.$onReadyResolve$=e),e["s-p"]=[],e["s-rc"]=[];let n=o;return e.__stencil__getHostRef=()=>n,n},y=(e,t)=>t in e,b=(e,t)=>(0,console.error)(e,t),x=new Map,ve="slot-fb{display:contents}slot-fb[hidden]{display:none}",S="http://www.w3.org/1999/xlink",C=typeof window<"u"?window:{},ye=C.HTMLElement||class{},w={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,o,n)=>e.addEventListener(t,o,n),rel:(e,t,o,n)=>e.removeEventListener(t,o,n),ce:(e,t)=>new CustomEvent(e,t)},be=e=>Promise.resolve(e),T=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch{}return!1})(),E=!1,xe=[],Se=[],Ce=(e,t)=>o=>{e.push(o),E||(E=!0,t&&4&w.$flags$?k(O):w.raf(O))},D=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){b(e)}e.length=0},O=()=>{D(xe),D(Se),(E=xe.length>0)&&w.raf(O)},k=e=>be().then(e),we=Ce(Se,!0),Te=e=>{let t=new URL(e,w.$resourcesUrl$);return t.origin===C.location.origin?t.pathname:t.href},A=e=>"object"===(e=typeof e)||"function"===e;function Ee(e){return(e.head?.querySelector('meta[name="csp-nonce"]'))?.getAttribute("content")??void 0}var De=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");ge({},{err:()=>Oe,map:()=>ke,ok:()=>j,unwrap:()=>Ae,unwrapErr:()=>je});var j=e=>({isOk:!0,isErr:!1,value:e}),Oe=e=>({isOk:!1,isErr:!0,value:e});function ke(e,t){if(e.isOk){let o=t(e.value);return o instanceof Promise?o.then(e=>j(e)):j(o)}if(e.isErr){let t=e.value;return Oe(t)}throw"should never get here"}var M,Ae=e=>{if(e.isOk)return e.value;throw e.value},je=e=>{if(e.isErr)return e.value;throw e.value};function Me(e){let t=this.attachShadow({mode:"open"});void 0===M&&(M=null),M&&t.adoptedStyleSheets.push(M)}var N=(e,t="")=>()=>{},P=new WeakMap,Ne=(e,t,o)=>{let n=x.get(e);T&&o?(n||=new CSSStyleSheet,"string"==typeof n?n=t:n.replaceSync(t)):n=t,x.set(e,n)},Pe=(e,t,o)=>{let n=F(t),i=x.get(n);if(!C.document)return n;if(e=11===e.nodeType?e:C.document,i)if("string"==typeof i){e=e.head||e;let o,r=P.get(e);if(r||P.set(e,r=new Set),!r.has(n)){{o=C.document.createElement("style"),o.innerHTML=i;let n=w.$nonce$??Ee(C.document);if(null!=n&&o.setAttribute("nonce",n),!(1&t.$flags$))if("HEAD"===e.nodeName){let t=e.querySelectorAll("link[rel=preconnect]"),n=t.length>0?t[t.length-1].nextSibling:e.querySelector("style");e.insertBefore(o,n?.parentNode===e?n:null)}else if("host"in e)if(T){let t=new CSSStyleSheet;t.replaceSync(i),e.adoptedStyleSheets.unshift(t)}else{let t=e.querySelector("style");t?t.innerHTML=i+t.innerHTML:e.prepend(o)}else e.append(o);1&t.$flags$&&e.insertBefore(o,null)}4&t.$flags$&&(o.innerHTML+=ve),r&&r.add(n)}}else e.adoptedStyleSheets.includes(i)||e.adoptedStyleSheets.push(i);return n},Fe=e=>{let t=e.$cmpMeta$,o=e.$hostElement$,n=t.$flags$,i=N("attachStyles",t.$tagName$),r=Pe(o.shadowRoot?o.shadowRoot:o.getRootNode(),t);10&n&&(o["s-sc"]=r,o.classList.add(r+"-h")),i()},F=(e,t)=>"sc-"+e.$tagName$,I=(e,t,...o)=>{let n=null,i=null,r=!1,s=!1,l=[],a=t=>{for(let o=0;o<t.length;o++)n=t[o],Array.isArray(n)?a(n):null!=n&&"boolean"!=typeof n&&((r="function"!=typeof e&&!A(n))&&(n=String(n)),r&&s?l[l.length-1].$text$+=n:l.push(r?L(null,n):n),s=r)};if(a(o),t){t.key&&(i=t.key);{let e=t.className||t.class;e&&(t.class="object"==typeof e?Object.keys(e).filter(t=>e[t]).join(" "):e)}}let c=L(e,null);return c.$attrs$=t,l.length>0&&(c.$children$=l),c.$key$=i,c},L=(e,t)=>{let o={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null,$attrs$:null,$key$:null};return o},R={},Ie=e=>e&&e.$tag$===R,z=e=>{let t=De(e);return RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${t}))(${t}\\b)`,"g")};z("::slotted"),z(":host"),z(":host-context");var B=(e,t,o)=>null==e||A(e)?e:4&t?"false"!==e&&(""===e||!!e):1&t?String(e):e,Le=(e,t,o)=>{let n=w.ce(t,o);return e.dispatchEvent(n),n},Re=(e,t,o,n,i,r,s)=>{if(o===n)return;let l=y(e,t),a=t.toLowerCase();if("class"===t){let t=e.classList,i=Be(o),r=Be(n);t.remove(...i.filter(e=>e&&!r.includes(e))),t.add(...r.filter(e=>e&&!i.includes(e)))}else if("style"===t){for(let t in o)(!n||null==n[t])&&(t.includes("-")?e.style.removeProperty(t):e.style[t]="");for(let t in n)(!o||n[t]!==o[t])&&(t.includes("-")?e.style.setProperty(t,n[t]):e.style[t]=n[t])}else if("key"!==t)if("ref"===t)n&&n(e);else if(e.__lookupSetter__(t)||"o"!==t[0]||"n"!==t[1]){let s=A(n);if(l||s&&null!==n)try{if(e.tagName.includes("-"))e[t]!==n&&(e[t]=n);else{let i=n??"";"list"===t?l=!1:(null==o||e[t]!=i)&&("function"==typeof e.__lookupSetter__(t)?e[t]=i:e.setAttribute(t,i))}}catch{}let c=!1;a!==(a=a.replace(/^xlink\:?/,""))&&(t=a,c=!0),null==n||!1===n?(!1!==n||""===e.getAttribute(t))&&(c?e.removeAttributeNS(S,t):e.removeAttribute(t)):(!l||4&r||i)&&!s&&1===e.nodeType&&(n=!0===n?"":n,c?e.setAttributeNS(S,t,n):e.setAttribute(t,n))}else if(t="-"===t[2]?t.slice(3):y(C,a)?a.slice(2):a[2]+t.slice(3),o||n){let i=t.endsWith(Ve);t=t.replace(He,""),o&&w.rel(e,t,o,i),n&&w.ael(e,t,n,i)}},ze=/\s/,Be=e=>("object"==typeof e&&e&&"baseVal"in e&&(e=e.baseVal),e&&"string"==typeof e?e.split(ze):[]),Ve="Capture",He=RegExp(Ve+"$"),Ue=(e,t,o,n)=>{let i=11===t.$elm$.nodeType&&t.$elm$.host?t.$elm$.host:t.$elm$,r=e&&e.$attrs$||{},s=t.$attrs$||{};for(let e of We(Object.keys(r)))e in s||Re(i,e,r[e],void 0,o,t.$flags$);for(let e of We(Object.keys(s)))Re(i,e,r[e],s[e],o,t.$flags$)};function We(e){return e.includes("ref")?[...e.filter(e=>"ref"!==e),"ref"]:e}var V,J,Tt,Ge=!1,H=(e,t,o)=>{let n,i,r=t.$children$[o],s=0;if(null!==r.$text$)n=r.$elm$=C.document.createTextNode(r.$text$);else{if(!C.document)throw Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");if(n=r.$elm$=C.document.createElement(r.$tag$),Ue(null,r,Ge),r.$children$)for(s=0;s<r.$children$.length;++s)i=H(e,r,s),i&&n.appendChild(i)}return n["s-hn"]=V,n},Ke=(e,t,o,n,i,r)=>{let s,l=e;for(l.shadowRoot&&l.tagName===V&&(l=l.shadowRoot);i<=r;++i)n[i]&&(s=H(null,o,i),s&&(n[i].$elm$=s,G(l,s,t)))},qe=(e,t,o)=>{for(let n=t;n<=o;++n){let t=e[n];if(t){let e=t.$elm$;Ye(t),e&&e.remove()}}},Je=(e,t,o,n,i=!1)=>{let r,s,l=0,a=0,c=0,d=0,m=t.length-1,u=t[0],$=t[m],h=n.length-1,f=n[0],p=n[h];for(;l<=m&&a<=h;)if(null==u)u=t[++l];else if(null==$)$=t[--m];else if(null==f)f=n[++a];else if(null==p)p=n[--h];else if(U(u,f,i))W(u,f,i),u=t[++l],f=n[++a];else if(U($,p,i))W($,p,i),$=t[--m],p=n[--h];else if(U(u,p,i))W(u,p,i),G(e,u.$elm$,$.$elm$.nextSibling),u=t[++l],p=n[--h];else if(U($,f,i))W($,f,i),G(e,$.$elm$,u.$elm$),$=t[--m],f=n[++a];else{for(c=-1,d=l;d<=m;++d)if(t[d]&&null!==t[d].$key$&&t[d].$key$===f.$key$){c=d;break}c>=0?(s=t[c],s.$tag$===f.$tag$?(W(s,f,i),t[c]=void 0,r=s.$elm$):r=H(t&&t[a],o,c),f=n[++a]):(r=H(t&&t[a],o,a),f=n[++a]),r&&G(u.$elm$.parentNode,r,u.$elm$)}l>m?Ke(e,null==n[h+1]?null:n[h+1].$elm$,o,n,a,h):a>h&&qe(t,l,m)},U=(e,t,o=!1)=>e.$tag$===t.$tag$&&(o?(o&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$),W=(e,t,o=!1)=>{let n=t.$elm$=e.$elm$,i=e.$children$,r=t.$children$,s=t.$text$;null===s?(Ue(e,t,Ge),null!==i&&null!==r?Je(n,i,t,r,o):null===r?!o&&_.updatable&&null!==i&&qe(i,0,i.length-1):(null!==e.$text$&&(n.textContent=""),Ke(n,null,t,r,0,r.length-1))):e.$text$!==s&&(n.data=s)},Ye=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(Ye)},G=(e,t,o)=>e?.insertBefore(t,o),Xe=(e,t,o=!1)=>{let n=e.$hostElement$,i=e.$cmpMeta$,r=e.$vnode$||L(null,null),s=Ie(t)?t:I(null,null,t);if(V=n.tagName,i.$attrsToReflect$&&(s.$attrs$=s.$attrs$||{},i.$attrsToReflect$.map(([e,t])=>s.$attrs$[t]=n[e])),o&&s.$attrs$)for(let e of Object.keys(s.$attrs$))n.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(s.$attrs$[e]=n[e]);s.$tag$=null,s.$flags$|=4,e.$vnode$=s,s.$elm$=r.$elm$=n.shadowRoot||n,W(r,s,o)},Ze=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){let o=t["s-p"].push(new Promise(n=>e.$onRenderResolve$=()=>{t["s-p"].splice(o-1,1),n()}))}},K=(e,t)=>{if(e.$flags$|=16,!(4&e.$flags$))return Ze(e,e.$ancestorComponent$),we(()=>Qe(e,t));e.$flags$|=512},Qe=(e,t)=>{let o,n=e.$hostElement$,i=N("scheduleUpdate",e.$cmpMeta$.$tagName$),r=n;if(!r)throw Error(`Can't render component <${n.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);return o=q(r,t?"componentWillLoad":"componentWillUpdate",void 0,n),o=$e(o,()=>q(r,"componentWillRender",void 0,n)),i(),$e(o,()=>tt(e,r,t))},$e=(e,t)=>et(e)?e.then(t).catch(e=>{console.error(e),t()}):t(),et=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,tt=async(e,t,o)=>{let n=e.$hostElement$,i=N("update",e.$cmpMeta$.$tagName$),r=n["s-rc"];o&&Fe(e);let s=N("render",e.$cmpMeta$.$tagName$);nt(e,t,n,o),r&&(r.map(e=>e()),n["s-rc"]=void 0),s(),i();{let t=n["s-p"]??[],o=()=>rt(e);0===t.length?o():(Promise.all(t).then(o),e.$flags$|=4,t.length=0)}},nt=(e,t,o,n)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,Xe(e,t,n)}catch(t){b(t,e.$hostElement$)}return null},rt=e=>{let t=e.$cmpMeta$.$tagName$,o=e.$hostElement$,n=N("postUpdate",t),i=o,r=e.$ancestorComponent$;q(i,"componentDidRender",void 0,o),64&e.$flags$?(q(i,"componentDidUpdate",void 0,o),n()):(e.$flags$|=64,at(o),q(i,"componentDidLoad",void 0,o),n(),e.$onReadyResolve$(o),r||it()),e.$onRenderResolve$&&=void e.$onRenderResolve$(),512&e.$flags$&&k(()=>K(e,!1)),e.$flags$&=-517},it=e=>{k(()=>Le(C,"appload",{detail:{namespace:me}}))},q=(e,t,o,n)=>{if(e&&e[t])try{return e[t](o)}catch(e){b(e,n)}},at=e=>e.classList.add(_.hydratedSelectorName??"hydrated"),ot=(e,t)=>v(e).$instanceValues$.get(t),st=(e,t,o,n)=>{let i=v(e),r=e,s=i.$instanceValues$.get(t),l=i.$flags$,a=r;if(!((o=B(o,n.$members$[t][0]))===s||Number.isNaN(s)&&Number.isNaN(o))){if(i.$instanceValues$.set(t,o),n.$watchers$&&128&l){let e=n.$watchers$[t];e&&e.map(e=>{try{a[e](o,s,t)}catch(e){b(e,r)}})}if(2==(18&l)){if(a.componentShouldUpdate&&!1===a.componentShouldUpdate(o,s,t))return;K(i,!1)}}},ct=(e,t,o)=>{let n=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);let o=Object.entries(t.$members$??{});o.map(([e,[o]])=>{if(31&o||32&o){let{get:i,set:r}=Object.getOwnPropertyDescriptor(n,e)||{};i&&(t.$members$[e][0]|=2048),r&&(t.$members$[e][0]|=4096),Object.defineProperty(n,e,{get(){return i?i.apply(this):ot(this,e)},configurable:!0,enumerable:!0}),Object.defineProperty(n,e,{set(n){let i=v(this);if(r){let s=32&o?this[e]:i.$hostElement$[e];return void 0===s&&i.$instanceValues$.get(e)?n=i.$instanceValues$.get(e):!i.$instanceValues$.get(e)&&s&&i.$instanceValues$.set(e,s),r.apply(this,[B(n,o)]),n=32&o?this[e]:i.$hostElement$[e],void st(this,e,n,t)}st(this,e,n,t)}})}});{let i=new Map;n.attributeChangedCallback=function(e,o,r){w.jmp(()=>{let s=i.get(e);if(!this.hasOwnProperty(s)||!_.lazyLoad){if(n.hasOwnProperty(s)&&"number"==typeof this[s]&&this[s]==r)return;if(null==s){let n=v(this)?.$flags$;if(n&&!(8&n)&&128&n&&r!==o){let n=this;(t.$watchers$?.[e])?.forEach(t=>{null!=n[t]&&n[t].call(n,r,o,e)})}return}}let l=Object.getOwnPropertyDescriptor(n,s);(r=(null!==r||"boolean"!=typeof this[s])&&r)!==this[s]&&(!l.get||l.set)&&(this[s]=r)})},e.observedAttributes=Array.from(new Set([...Object.keys(t.$watchers$??{}),...o.filter(([e,t])=>15&t[0]).map(([e,o])=>{var n;let r=o[1]||e;return i.set(r,e),512&o[0]&&(null==(n=t.$attrsToReflect$)||n.push([e,r])),r})]))}}return e},lt=async(e,t,o,n)=>{let i;if(!(32&t.$flags$)){t.$flags$|=32;{i=e.constructor;let o=e.localName;customElements.whenDefined(o).then(()=>t.$flags$|=128)}if(i&&i.style){let e;"string"==typeof i.style&&(e=i.style);let t=F(o);if(!x.has(t)){let n=N("registerStyles",o.$tagName$);Ne(t,e,!!(1&o.$flags$)),n()}}}let r=t.$ancestorComponent$,s=()=>K(t,!0);r&&r["s-rc"]?r["s-rc"].push(s):s()},ut=e=>{if(!(1&w.$flags$)){let t=v(e),o=t.$cmpMeta$,n=N("connectedCallback",o.$tagName$);if(1&t.$flags$)t?.$lazyInstance$||t?.$onReadyPromise$&&t.$onReadyPromise$.then(()=>{});else{t.$flags$|=1;{let o=e;for(;o=o.parentNode||o.host;)if(o["s-p"]){Ze(t,t.$ancestorComponent$=o);break}}o.$members$&&Object.entries(o.$members$).map(([t,[o]])=>{if(31&o&&e.hasOwnProperty(t)){let o=e[t];delete e[t],e[t]=o}}),_.initializeNextTick?k(()=>lt(e,t,o)):lt(e,t,o)}n()}},dt=async e=>{1&w.$flags$||v(e),P.has(e)&&P.delete(e),e.shadowRoot&&P.has(e.shadowRoot)&&P.delete(e.shadowRoot)},ft=(e,t)=>{let o={$flags$:t[0],$tagName$:t[1]};o.$members$=t[2],o.$watchers$=e.$watchers$,o.$attrsToReflect$=[];let n=e.prototype.connectedCallback,i=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){_e(this,o)},connectedCallback(){this.__hasHostListenerAttached||=(v(this),!0),ut(this),n&&n.call(this)},disconnectedCallback(){dt(this),i&&i.call(this)},__attachShadow(){if(this.shadowRoot){if("open"!==this.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${o.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else Me.call(this,o)}}),e.is=o.$tagName$,ct(e,o)},pt=()=>{if(typeof window>"u")return new Map;if(!J){let e=window;e.Ionicons=e.Ionicons||{},J=e.Ionicons.map=e.Ionicons.map||new Map}return J},mt=e=>{let t=Y(e.src);return t||(t=gt(e.name,e.icon,e.mode,e.ios,e.md),t?ht(t,e):e.icon&&(t=Y(e.icon),t||(t=Y(e.icon[e.mode]),t))?t:null)},ht=(e,t)=>{let o=pt().get(e);if(o)return o;try{return Te(`svg/${e}.svg`)}catch(o){console.log("e",o),console.warn(`[Ionicons Warning]: Could not load icon with name "${e}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`,t)}},gt=(e,t,o,n,i)=>(o="ios"===(o&&Z(o))?"ios":"md",n&&"ios"===o?e=Z(n):i&&"md"===o?e=Z(i):(!e&&t&&!_t(t)&&(e=t),X(e)&&(e=Z(e))),X(e)&&""!==e.trim()&&""===e.replace(/[a-z]|-|\d/gi,"")?e:null),Y=e=>X(e)&&(e=e.trim(),_t(e))?e:null,_t=e=>e.length>0&&/(\/|\.)/.test(e),X=e=>"string"==typeof e,Z=e=>e.toLowerCase(),vt=(e,t=[])=>{let o={};return t.forEach(t=>{e.hasAttribute(t)&&(null!==e.getAttribute(t)&&(o[t]=e.getAttribute(t)),e.removeAttribute(t))}),o},yt=e=>e&&""!==e.dir?"rtl"===e.dir.toLowerCase():"rtl"===(null==document?void 0:document.dir.toLowerCase()),bt=e=>{let t=document.createElement("div");t.innerHTML=e;for(let e=t.childNodes.length-1;e>=0;e--)"svg"!==t.childNodes[e].nodeName.toLowerCase()&&t.removeChild(t.childNodes[e]);let o=t.firstElementChild;if(o&&"svg"===o.nodeName.toLowerCase()){let e=o.getAttribute("class")||"";if(o.setAttribute("class",(e+" s-ion-icon").trim()),xt(o))return t.innerHTML}return""},xt=e=>{if(1===e.nodeType){if("script"===e.nodeName.toLowerCase())return!1;for(let t=0;t<e.attributes.length;t++){let o=e.attributes[t].name;if(X(o)&&0===o.toLowerCase().indexOf("on"))return!1}for(let t=0;t<e.childNodes.length;t++)if(!xt(e.childNodes[t]))return!1}return!0},St=e=>e.startsWith("data:image/svg+xml"),Ct=e=>-1!==e.indexOf(";utf8,"),Q=new Map,wt=new Map;function $(e){return Q.set(e,""),""}var Et=(e,t)=>wt.get(e)||(typeof fetch<"u"&&typeof document<"u"?St(e)&&Ct(e)?Promise.resolve(Dt(e)):Ot(e,t):Promise.resolve($(e)));function Dt(e){Tt||=new DOMParser;let t=Tt.parseFromString(e,"text/html").querySelector("svg");if(t)return Q.set(e,t.outerHTML),t.outerHTML;throw Error(`Could not parse svg from ${e}`)}function Ot(e,t){let o=fetch(e).then(o=>o.text().then(o=>{o&&!1!==t&&(o=bt(o));let n=o||"";return Q.set(e,n),n}).catch(()=>$(e))).catch(()=>$(e));return wt.set(e,o),o}var kt=":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}",At=ft(class extends ye{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.iconName=null,this.inheritedAttributes={},this.didLoadIcon=!1,this.isVisible=!1,this.mode=jt(),this.lazy=!1,this.sanitize=!0}componentWillLoad(){this.inheritedAttributes=vt(this.el,["aria-label"])}connectedCallback(){this.waitUntilVisible(this.el,"50px",()=>{this.isVisible=!0,this.loadIcon()})}componentDidLoad(){this.didLoadIcon||this.loadIcon()}disconnectedCallback(){this.io&&=void this.io.disconnect()}waitUntilVisible(e,t,o){if(!(this.lazy&&typeof window<"u"&&window.IntersectionObserver))return o();let n=this.io=new window.IntersectionObserver(e=>{e[0].isIntersecting&&(n.disconnect(),this.io=void 0,o())},{rootMargin:t});n.observe(e)}loadIcon(){if(this.isVisible){let e=mt(this);e&&(Q.has(e)?this.svgContent=Q.get(e):Et(e,this.sanitize).then(()=>this.svgContent=Q.get(e)),this.didLoadIcon=!0)}this.iconName=gt(this.name,this.icon,this.mode,this.ios,this.md)}render(){let{flipRtl:e,iconName:t,inheritedAttributes:o,el:n}=this,i=this.mode||"md",r=!!t&&((t.includes("arrow")||t.includes("chevron"))&&!1!==e),s=e||r;return I(R,Object.assign({key:"0578c899781ca145dd8205acd9670af39b57cf2e",role:"img",class:Object.assign(Object.assign({[i]:!0},Mt(this.color)),{[`icon-${this.size}`]:!!this.size,"flip-rtl":s,"icon-rtl":s&&yt(n)})},o),this.svgContent?I("div",{class:"icon-inner",innerHTML:this.svgContent}):I("div",{class:"icon-inner"}))}static get assetsDirs(){return["svg"]}get el(){return this}static get watchers(){return{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}}static get style(){return kt}},[1,"ion-icon",{mode:[1025],color:[1],ios:[1],md:[1],flipRtl:[4,"flip-rtl"],name:[513],src:[1],icon:[8],size:[1],lazy:[4],sanitize:[4],svgContent:[32],isVisible:[32]},void 0,{name:["loadIcon"],src:["loadIcon"],icon:["loadIcon"],ios:["loadIcon"],md:["loadIcon"]}]),jt=()=>typeof document<"u"&&document.documentElement.getAttribute("mode")||"md",Mt=e=>e?{"ion-color":!0,[`ion-color-${e}`]:!0}:null;function Nt(){typeof customElements>"u"||["ion-icon"].forEach(e=>{if("ion-icon"===e)customElements.get(e)||customElements.define(e,At)})}var Pt=Nt,Ft=!1;function It(){Ft||=(r(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g(),ee(),te(),ne(),re(),Pt(),ie(),ae(),oe(),se(),!0)}function Lt(){return{navigate:(e,t="forward")=>{let o=document.querySelector("ion-router");o&&"function"==typeof o.push&&o.push(e,t)},replace:e=>{let t=document.querySelector("ion-router");t&&"function"==typeof t.push&&t.push(e,"root")},back:()=>{let e=document.querySelector("ion-router");e&&"function"==typeof e.back&&e.back()}}}function Rt(e="/"){return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,o){let n=document.createElement("ion-back-button");return e&&n.setAttribute("default-href",e),t.insertBefore(n,o),()=>n.remove()}}}var zt=class extends e{routes;constructor(e){super(),this.routes=e}_pathToRouteId(e){return e&&"/"!==e?`nix-route-${e.replace(/\/:?[^/]+/g,e=>"-"+e.replace(/\//g,"").replace(/:/g,"")).replace(/^\//,"").replace(/\//g,"-")}`:"nix-route-home"}render(){let e=this;return{__isNixTemplate:!0,mount(e){let t="string"==typeof e?document.querySelector(e):e;return{unmount:this._render(t,null)}},_render(t,o){let n=document.createElement("ion-router");n.setAttribute("use-hash","false"),e.routes.filter(e=>"*"!==e.path).forEach(t=>{let o=document.createElement("ion-route");o.setAttribute("url",t.path),o.setAttribute("component",e._pathToRouteId(t.path)),n.appendChild(o)});let i=document.createElement("ion-router-outlet");return i.delegate={attachViewToDom:async(t,o,n,i)=>{let r=e.routes.find(t=>e._pathToRouteId(t.path)===o),s=document.createElement("div");s.classList.add("ion-page"),i&&i.length&&s.classList.add(...i);let l=ce();if(s.addEventListener("ionViewWillEnter",()=>l.willEnter.update(e=>e+1)),s.addEventListener("ionViewDidEnter",()=>l.didEnter.update(e=>e+1)),s.addEventListener("ionViewWillLeave",()=>l.willLeave.update(e=>e+1)),s.addEventListener("ionViewDidLeave",()=>l.didLeave.update(e=>e+1)),r){let e=n||{},t=r.component({lc:l,params:e});if("render"in t&&"function"==typeof t.render){let e=t;e.onInit?.();let o=e.render()._render(s,null),n=e.onMount?.();s._nixCleanup=()=>{e.onUnmount?.(),"function"==typeof n&&n(),o()}}else s._nixCleanup=t._render(s,null)}return t.appendChild(s),s},removeViewFromDom:async(e,t)=>{t._nixCleanup&&t._nixCleanup(),t.remove()}},t.insertBefore(n,o),t.insertBefore(i,o),()=>{n.remove(),i.remove()}}}}};export{Rt as IonBackButton,le as IonPage,zt as IonRouterOutlet,ce as createPageLifecycle,It as setupNixIonic,de as useIonViewDidEnter,pe as useIonViewDidLeave,ue as useIonViewWillEnter,fe as useIonViewWillLeave,Lt as useRouter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nix-ionic.js","names":[],"sources":["../../src/lifecycle.ts","../../src/setup.ts","../../src/IonRouterOutlet.ts"],"sourcesContent":["/**\n * ionic-nix/lifecycle.ts\n *\n * Sistema de ciclo de vida de navegación, análogo a los hooks de Ionic:\n * ionViewWillEnter / ionViewDidEnter / ionViewWillLeave / ionViewDidLeave\n *\n * Cómo funciona (sin provide/inject):\n * 1. IonRouterOutlet crea un `PageLifecycle` por cada ruta.\n * 2. Lo pasa directamente al factory de la ruta como argumento.\n * 3. El factory llama a `new MiPagina(lc)` o `MiPagina(lc)`.\n * 4. IonPage/composables registran watchers sobre las señales del lc.\n * 5. Cuando el router navega, incrementa las señales → watchers se disparan.\n */\n\nimport { signal, watch } from \"@deijose/nix-js\";\nimport type { Signal } from \"@deijose/nix-js\";\nimport { NixComponent } from \"@deijose/nix-js\";\n\n// --------------------------------------------------------------------------\n// Tipos públicos\n// --------------------------------------------------------------------------\n\nexport interface PageLifecycle {\n willEnter: Signal<number>;\n didEnter: Signal<number>;\n willLeave: Signal<number>;\n didLeave: Signal<number>;\n}\n\n/** Crea un nuevo PageLifecycle con señales en 0. */\nexport function createPageLifecycle(): PageLifecycle {\n return {\n willEnter: signal(0),\n didEnter: signal(0),\n willLeave: signal(0),\n didLeave: signal(0),\n };\n}\n\n// --------------------------------------------------------------------------\n// IonPage — clase base para páginas con hooks de navegación\n// --------------------------------------------------------------------------\n//\n// Uso:\n// class HomePage extends IonPage {\n// constructor(lc: PageLifecycle) { super(lc); }\n//\n// ionViewWillEnter() { /* fetch de datos frescos */ }\n// render() { return html`...`; }\n// }\n\nexport abstract class IonPage extends NixComponent {\n private __lc: PageLifecycle;\n\n constructor(lc: PageLifecycle) {\n super();\n this.__lc = lc;\n }\n\n override onInit(): void {\n const lc = this.__lc;\n // watch no corre en init (immediate: false), así que ionViewWillEnter\n // solo se llama cuando el outlet incrementa la señal, no al construir.\n if (this.ionViewWillEnter) watch(lc.willEnter, this.ionViewWillEnter.bind(this));\n if (this.ionViewDidEnter) watch(lc.didEnter, this.ionViewDidEnter.bind(this));\n if (this.ionViewWillLeave) watch(lc.willLeave, this.ionViewWillLeave.bind(this));\n if (this.ionViewDidLeave) watch(lc.didLeave, this.ionViewDidLeave.bind(this));\n }\n\n ionViewWillEnter?(): void;\n ionViewDidEnter?(): void;\n ionViewWillLeave?(): void;\n ionViewDidLeave?(): void;\n}\n\n// --------------------------------------------------------------------------\n// Composables para function components\n// --------------------------------------------------------------------------\n//\n// Uso:\n// function ProfilePage(lc: PageLifecycle): NixTemplate {\n// useIonViewWillEnter(lc, () => { /* fetch */ });\n// return html`...`;\n// }\n\nexport function useIonViewWillEnter(lc: PageLifecycle, fn: () => void): void {\n watch(lc.willEnter, fn);\n}\n\nexport function useIonViewDidEnter(lc: PageLifecycle, fn: () => void): void {\n watch(lc.didEnter, fn);\n}\n\nexport function useIonViewWillLeave(lc: PageLifecycle, fn: () => void): void {\n watch(lc.willLeave, fn);\n}\n\nexport function useIonViewDidLeave(lc: PageLifecycle, fn: () => void): void {\n watch(lc.didLeave, fn);\n}","import { initialize } from \"@ionic/core/components\";\nimport { defineCustomElement as defineIonRouter } from \"@ionic/core/components/ion-router.js\";\nimport { defineCustomElement as defineIonRoute } from \"@ionic/core/components/ion-route.js\";\nimport { defineCustomElement as defineIonRouterOutlet } from \"@ionic/core/components/ion-router-outlet.js\";\nimport { defineCustomElement as defineIonBackButton } from \"@ionic/core/components/ion-back-button.js\";\n\nlet isInitialized = false;\n\nexport function setupNixIonic(config: any = {}) {\n if (isInitialized) return;\n \n // 1. Inicializa el core de Ionic de forma segura\n initialize(config);\n \n // 2. Registra los Web Components vitales para el enrutamiento\n defineIonRouter();\n defineIonRoute();\n defineIonRouterOutlet();\n defineIonBackButton();\n \n isInitialized = true;\n}","/**\n * ionic-nix/IonRouterOutlet.ts\n *\n * Bridge 100% nativo. Genera exactamente el mismo DOM que Vanilla Ionic.\n * Delegamos el view-caching y los ciclos de vida a los Eventos del DOM de ion-router-outlet.\n */\n\nimport { NixComponent } from \"@deijose/nix-js\";\nimport type { NixTemplate } from \"@deijose/nix-js\";\nimport { createPageLifecycle, type PageLifecycle } from \"./lifecycle\";\nimport { Components } from \"@ionic/core\";\n\n// --------------------------------------------------------------------------\n// Router store singleton\n// --------------------------------------------------------------------------\n\nexport function useRouter() {\n const router = <Components.IonRouter>document.querySelector(\"ion-router\");\n return {\n navigate: (path: string) => {\n router?.push(path, \"forward\");\n },\n replace: (path: string) => {\n router?.push(path, \"root\");\n },\n back: () => {\n router?.back();\n }\n };\n}\n\n// --------------------------------------------------------------------------\n// IonBackButton (Sin listeners, 100% nativo)\n// --------------------------------------------------------------------------\n\nexport function IonBackButton(defaultHref?: string): NixTemplate {\n return {\n __isNixTemplate: true as const,\n mount(container) {\n const el = typeof container === \"string\" ? document.querySelector(container)! : container;\n const cleanup = this._render(el, null);\n return { unmount: cleanup };\n },\n _render(parent: Node, before: Node | null): () => void {\n const btn = document.createElement(\"ion-back-button\") as HTMLElement;\n if (defaultHref) btn.setAttribute(\"default-href\", defaultHref);\n parent.insertBefore(btn, before);\n return () => btn.remove();\n },\n };\n}\n\n// --------------------------------------------------------------------------\n// Tipos públicos\n// --------------------------------------------------------------------------\n\nexport interface PageContext {\n lc: PageLifecycle;\n params: Record<string, string>;\n}\n\nexport interface RouteDefinition {\n path: string;\n component: (ctx: PageContext) => NixComponent | NixTemplate;\n}\n\n// --------------------------------------------------------------------------\n// IonRouterOutlet (El Bridge Maestro)\n// --------------------------------------------------------------------------\n\nexport class IonRouterOutlet extends NixComponent {\n private routes: RouteDefinition[];\n\n constructor(routes: RouteDefinition[]) {\n super();\n this.routes = routes;\n this._registerCustomElements();\n }\n\n // -------------------------------------------------------------------------\n // Helpers\n // -------------------------------------------------------------------------\n\n private _extractParams(routePath: string, realPath: string): Record<string, string> {\n const params: Record<string, string> = {};\n const rP = routePath.split(\"/\");\n const uP = realPath.split(\"/\");\n for (let i = 0; i < rP.length; i++) {\n if (rP[i]?.startsWith(\":\")) params[rP[i].slice(1)] = uP[i] ?? \"\";\n }\n return params;\n }\n\n private _pathToTag(path: string): string {\n if (!path || path === \"/\") return \"nix-page-home\";\n const clean = path\n .replace(/\\/:?[^/]+/g, (m) => \"-\" + m.replace(/\\//g, \"\").replace(/:/g, \"\"))\n .replace(/^\\//, \"\")\n .replace(/\\//g, \"-\");\n return `nix-page-${clean}`;\n }\n\n // -------------------------------------------------------------------------\n // Registro de Custom Elements estilo Vanilla JS\n // -------------------------------------------------------------------------\n\n private _registerCustomElements(): void {\n const self = this;\n for (const route of this.routes) {\n if (route.path === \"*\") continue;\n\n const tag = this._pathToTag(route.path);\n if (customElements.get(tag)) continue;\n\n customElements.define(tag, class extends HTMLElement {\n private _handle: { unmount(): void } | null = null;\n\n connectedCallback(): void {\n // Prevenir doble montaje si Ionic reconecta el nodo\n if (this._handle) return; \n\n this.classList.add(\"ion-page\");\n\n // 1. Escuchar los eventos NATIVOS del DOM que dispara ion-router-outlet\n const lc = createPageLifecycle();\n this.addEventListener(\"ionViewWillEnter\", () => lc.willEnter.update((n) => n + 1));\n this.addEventListener(\"ionViewDidEnter\", () => lc.didEnter.update((n) => n + 1));\n this.addEventListener(\"ionViewWillLeave\", () => lc.willLeave.update((n) => n + 1));\n this.addEventListener(\"ionViewDidLeave\", () => lc.didLeave.update((n) => n + 1));\n\n // 2. Extraer parámetros\n const params = self._extractParams(route.path, location.pathname);\n\n // 3. Montar componente Nix\n const pageNode = route.component({ lc, params });\n\n if (\"render\" in pageNode && typeof (pageNode as NixComponent).render === \"function\") {\n const comp = pageNode as NixComponent;\n comp.onInit?.();\n const renderCleanup = comp.render()._render(this, null);\n const mountRet = comp.onMount?.();\n\n this._handle = {\n unmount: () => {\n comp.onUnmount?.();\n if (typeof mountRet === \"function\") mountRet();\n renderCleanup();\n }\n };\n } else {\n const renderCleanup = (pageNode as NixTemplate)._render(this, null);\n this._handle = { unmount: renderCleanup };\n }\n }\n\n disconnectedCallback(): void {\n // ion-router-outlet SOLO desconecta el elemento cuando lo saca \n // definitivamente de la caché (ej. al hacer click en el back-button)\n this._handle?.unmount();\n this._handle = null;\n }\n });\n }\n }\n\n // -------------------------------------------------------------------------\n // Render exacto al HTML que te funcionaba\n // -------------------------------------------------------------------------\n\n override render(): NixTemplate {\n const self = this;\n return {\n __isNixTemplate: true as const,\n mount(container: Element | string) {\n const el = typeof container === \"string\" ? document.querySelector(container)! : container;\n const cleanup = this._render(el, null);\n return { unmount: cleanup };\n },\n _render(parent: Node, before: Node | null): () => void {\n \n // Creamos <ion-router>\n const routerEl = document.createElement(\"ion-router\");\n routerEl.setAttribute(\"use-hash\", \"false\");\n routerEl.innerHTML = self.routes\n .filter((r) => r.path !== \"*\")\n .map((r) => `<ion-route url=\"${r.path}\" component=\"${self._pathToTag(r.path)}\"></ion-route>`)\n .join(\"\");\n\n // Creamos <ion-router-outlet> real\n const outletEl = document.createElement(\"ion-router-outlet\");\n\n parent.insertBefore(routerEl, before);\n parent.insertBefore(outletEl, before);\n\n return () => {\n routerEl.remove();\n outletEl.remove();\n };\n },\n };\n }\n}"],"mappings":";;;;;;;AA8BA,SAAgB,IAAqC;AACnD,QAAO;EACL,WAAW,EAAO,EAAE;EACpB,UAAW,EAAO,EAAE;EACpB,WAAW,EAAO,EAAE;EACpB,UAAW,EAAO,EAAE;EACrB;;AAeH,IAAsB,IAAtB,cAAsC,EAAa;CACjD;CAEA,YAAY,GAAmB;AAE7B,EADA,OAAO,EACP,KAAK,OAAO;;CAGd,SAAwB;EACtB,IAAM,IAAK,KAAK;AAMhB,EAHI,KAAK,oBAAkB,EAAM,EAAG,WAAW,KAAK,iBAAiB,KAAK,KAAK,CAAC,EAC5E,KAAK,mBAAkB,EAAM,EAAG,UAAW,KAAK,gBAAgB,KAAK,KAAK,CAAC,EAC3E,KAAK,oBAAkB,EAAM,EAAG,WAAW,KAAK,iBAAiB,KAAK,KAAK,CAAC,EAC5E,KAAK,mBAAkB,EAAM,EAAG,UAAW,KAAK,gBAAgB,KAAK,KAAK,CAAC;;;AAmBnF,SAAgB,EAAoB,GAAmB,GAAsB;AAC3E,GAAM,EAAG,WAAW,EAAG;;AAGzB,SAAgB,EAAmB,GAAmB,GAAsB;AAC1E,GAAM,EAAG,UAAU,EAAG;;AAGxB,SAAgB,EAAoB,GAAmB,GAAsB;AAC3E,GAAM,EAAG,WA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,uBAA6B;AAI3B,KADA,KAAK,SAAS,SAAS,EACvB,KAAK,UAAU;;KAEjB;;;CAQN,SAA+B;EAC7B,IAAM,IAAO;AACb,SAAO;GACL,iBAAiB;GACjB,MAAM,GAA6B;IACjC,IAAM,IAAK,OAAO,KAAc,WAAW,SAAS,cAAc,EAAU,GAAI;AAEhF,WAAO,EAAE,SADO,KAAK,QAAQ,GAAI,KAAK,EACX;;GAE7B,QAAQ,GAAc,GAAiC;IAGrD,IAAM,IAAW,SAAS,cAAc,aAAa;AAErD,IADA,EAAS,aAAa,YAAY,QAAQ,EAC1C,EAAS,YAAY,EAAK,OACvB,QAAQ,MAAM,EAAE,SAAS,IAAI,CAC7B,KAAK,MAAM,mBAAmB,EAAE,KAAK,eAAe,EAAK,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAC5F,KAAK,GAAG;IAGX,IAAM,IAAW,SAAS,cAAc,oBAAoB;AAK5D,WAHA,EAAO,aAAa,GAAU,EAAO,EACrC,EAAO,aAAa,GAAU,EAAO,QAExB;AAEX,KADA,EAAS,QAAQ,EACjB,EAAS,QAAQ;;;GAGtB"}
|
|
1
|
+
{"version":3,"file":"nix-ionic.js","names":["defineCustomElement$1","defineCustomElement"],"sources":["../../src/lifecycle.ts","../../node_modules/ionicons/components/index.js","../../node_modules/ionicons/components/ion-icon.js","../../src/setup.ts","../../src/IonRouterOutlet.ts"],"sourcesContent":["/**\n * ionic-nix/lifecycle.ts\n *\n * Sistema de ciclo de vida de navegación, análogo a los hooks de Ionic:\n * ionViewWillEnter / ionViewDidEnter / ionViewWillLeave / ionViewDidLeave\n *\n * Cómo funciona (sin provide/inject):\n * 1. IonRouterOutlet crea un `PageLifecycle` por cada ruta.\n * 2. Lo pasa directamente al factory de la ruta como argumento.\n * 3. El factory llama a `new MiPagina(lc)` o `MiPagina(lc)`.\n * 4. IonPage/composables registran watchers sobre las señales del lc.\n * 5. Cuando el router navega, incrementa las señales → watchers se disparan.\n */\n\nimport { signal, watch } from \"@deijose/nix-js\";\nimport type { Signal } from \"@deijose/nix-js\";\nimport { NixComponent } from \"@deijose/nix-js\";\n\n// --------------------------------------------------------------------------\n// Tipos públicos\n// --------------------------------------------------------------------------\n\nexport interface PageLifecycle {\n willEnter: Signal<number>;\n didEnter: Signal<number>;\n willLeave: Signal<number>;\n didLeave: Signal<number>;\n}\n\n/** Crea un nuevo PageLifecycle con señales en 0. */\nexport function createPageLifecycle(): PageLifecycle {\n return {\n willEnter: signal(0),\n didEnter: signal(0),\n willLeave: signal(0),\n didLeave: signal(0),\n };\n}\n\n// --------------------------------------------------------------------------\n// IonPage — clase base para páginas con hooks de navegación\n// --------------------------------------------------------------------------\n//\n// Uso:\n// class HomePage extends IonPage {\n// constructor(lc: PageLifecycle) { super(lc); }\n//\n// ionViewWillEnter() { /* fetch de datos frescos */ }\n// render() { return html`...`; }\n// }\n\nexport abstract class IonPage extends NixComponent {\n private __lc: PageLifecycle;\n\n constructor(lc: PageLifecycle) {\n super();\n this.__lc = lc;\n }\n\n override onInit(): void {\n const lc = this.__lc;\n // watch no corre en init (immediate: false), así que ionViewWillEnter\n // solo se llama cuando el outlet incrementa la señal, no al construir.\n if (this.ionViewWillEnter) watch(lc.willEnter, this.ionViewWillEnter.bind(this));\n if (this.ionViewDidEnter) watch(lc.didEnter, this.ionViewDidEnter.bind(this));\n if (this.ionViewWillLeave) watch(lc.willLeave, this.ionViewWillLeave.bind(this));\n if (this.ionViewDidLeave) watch(lc.didLeave, this.ionViewDidLeave.bind(this));\n }\n\n ionViewWillEnter?(): void;\n ionViewDidEnter?(): void;\n ionViewWillLeave?(): void;\n ionViewDidLeave?(): void;\n}\n\n// --------------------------------------------------------------------------\n// Composables para function components\n// --------------------------------------------------------------------------\n//\n// Uso:\n// function ProfilePage(lc: PageLifecycle): NixTemplate {\n// useIonViewWillEnter(lc, () => { /* fetch */ });\n// return html`...`;\n// }\n\nexport function useIonViewWillEnter(lc: PageLifecycle, fn: () => void): void {\n watch(lc.willEnter, fn);\n}\n\nexport function useIonViewDidEnter(lc: PageLifecycle, fn: () => void): void {\n watch(lc.didEnter, fn);\n}\n\nexport function useIonViewWillLeave(lc: PageLifecycle, fn: () => void): void {\n watch(lc.willLeave, fn);\n}\n\nexport function useIonViewDidLeave(lc: PageLifecycle, fn: () => void): void {\n watch(lc.didLeave, fn);\n}","const NAMESPACE = 'ionicons';\nconst BUILD = /* ionicons */ { hydratedSelectorName: \"hydrated\", lazyLoad: false, updatable: true};\n\n/*\n Stencil Client Platform v4.35.3 | MIT Licensed | https://stenciljs.com\n */\nvar __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\n\n// src/client/client-host-ref.ts\nvar getHostRef = (ref) => {\n if (ref.__stencil__getHostRef) {\n return ref.__stencil__getHostRef();\n }\n return void 0;\n};\nvar registerHost = (hostElement, cmpMeta) => {\n const hostRef = {\n $flags$: 0,\n $hostElement$: hostElement,\n $cmpMeta$: cmpMeta,\n $instanceValues$: /* @__PURE__ */ new Map()\n };\n {\n hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);\n hostElement[\"s-p\"] = [];\n hostElement[\"s-rc\"] = [];\n }\n const ref = hostRef;\n hostElement.__stencil__getHostRef = () => ref;\n return ref;\n};\nvar isMemberInElement = (elm, memberName) => memberName in elm;\nvar consoleError = (e, el) => (0, console.error)(e, el);\n\n// src/client/client-style.ts\nvar styles = /* @__PURE__ */ new Map();\nvar SLOT_FB_CSS = \"slot-fb{display:contents}slot-fb[hidden]{display:none}\";\nvar XLINK_NS = \"http://www.w3.org/1999/xlink\";\nvar win = typeof window !== \"undefined\" ? window : {};\nvar H = win.HTMLElement || class {\n};\nvar plt = {\n $flags$: 0,\n $resourcesUrl$: \"\",\n jmp: (h2) => h2(),\n raf: (h2) => requestAnimationFrame(h2),\n ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),\n rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),\n ce: (eventName, opts) => new CustomEvent(eventName, opts)\n};\nvar promiseResolve = (v) => Promise.resolve(v);\nvar supportsConstructableStylesheets = /* @__PURE__ */ (() => {\n try {\n new CSSStyleSheet();\n return typeof new CSSStyleSheet().replaceSync === \"function\";\n } catch (e) {\n }\n return false;\n})() ;\nvar queuePending = false;\nvar queueDomReads = [];\nvar queueDomWrites = [];\nvar queueTask = (queue, write) => (cb) => {\n queue.push(cb);\n if (!queuePending) {\n queuePending = true;\n if (write && plt.$flags$ & 4 /* queueSync */) {\n nextTick(flush);\n } else {\n plt.raf(flush);\n }\n }\n};\nvar consume = (queue) => {\n for (let i2 = 0; i2 < queue.length; i2++) {\n try {\n queue[i2](performance.now());\n } catch (e) {\n consoleError(e);\n }\n }\n queue.length = 0;\n};\nvar flush = () => {\n consume(queueDomReads);\n {\n consume(queueDomWrites);\n if (queuePending = queueDomReads.length > 0) {\n plt.raf(flush);\n }\n }\n};\nvar nextTick = (cb) => promiseResolve().then(cb);\nvar writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);\n\n// src/runtime/asset-path.ts\nvar getAssetPath = (path) => {\n const assetUrl = new URL(path, plt.$resourcesUrl$);\n return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;\n};\nvar setAssetPath = (path) => plt.$resourcesUrl$ = path;\nvar isComplexType = (o) => {\n o = typeof o;\n return o === \"object\" || o === \"function\";\n};\n\n// src/utils/query-nonce-meta-tag-content.ts\nfunction queryNonceMetaTagContent(doc) {\n var _a, _b, _c;\n return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector('meta[name=\"csp-nonce\"]')) == null ? void 0 : _b.getAttribute(\"content\")) != null ? _c : void 0;\n}\n\n// src/utils/regular-expression.ts\nvar escapeRegExpSpecialCharacters = (text) => {\n return text.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n};\n\n// src/utils/result.ts\nvar result_exports = {};\n__export(result_exports, {\n err: () => err,\n map: () => map,\n ok: () => ok,\n unwrap: () => unwrap,\n unwrapErr: () => unwrapErr\n});\nvar ok = (value) => ({\n isOk: true,\n isErr: false,\n value\n});\nvar err = (value) => ({\n isOk: false,\n isErr: true,\n value\n});\nfunction map(result, fn) {\n if (result.isOk) {\n const val = fn(result.value);\n if (val instanceof Promise) {\n return val.then((newVal) => ok(newVal));\n } else {\n return ok(val);\n }\n }\n if (result.isErr) {\n const value = result.value;\n return err(value);\n }\n throw \"should never get here\";\n}\nvar unwrap = (result) => {\n if (result.isOk) {\n return result.value;\n } else {\n throw result.value;\n }\n};\nvar unwrapErr = (result) => {\n if (result.isErr) {\n return result.value;\n } else {\n throw result.value;\n }\n};\n\n// src/utils/style.ts\nfunction createStyleSheetIfNeededAndSupported(styles2) {\n return void 0;\n}\n\n// src/utils/shadow-root.ts\nvar globalStyleSheet;\nfunction createShadowRoot(cmpMeta) {\n var _a;\n const shadowRoot = this.attachShadow({ mode: \"open\" });\n if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;\n if (globalStyleSheet) shadowRoot.adoptedStyleSheets.push(globalStyleSheet);\n}\nvar createTime = (fnName, tagName = \"\") => {\n {\n return () => {\n return;\n };\n }\n};\nvar rootAppliedStyles = /* @__PURE__ */ new WeakMap();\nvar registerStyle = (scopeId2, cssText, allowCS) => {\n let style = styles.get(scopeId2);\n if (supportsConstructableStylesheets && allowCS) {\n style = style || new CSSStyleSheet();\n if (typeof style === \"string\") {\n style = cssText;\n } else {\n style.replaceSync(cssText);\n }\n } else {\n style = cssText;\n }\n styles.set(scopeId2, style);\n};\nvar addStyle = (styleContainerNode, cmpMeta, mode) => {\n var _a;\n const scopeId2 = getScopeId(cmpMeta);\n const style = styles.get(scopeId2);\n if (!win.document) {\n return scopeId2;\n }\n styleContainerNode = styleContainerNode.nodeType === 11 /* DocumentFragment */ ? styleContainerNode : win.document;\n if (style) {\n if (typeof style === \"string\") {\n styleContainerNode = styleContainerNode.head || styleContainerNode;\n let appliedStyles = rootAppliedStyles.get(styleContainerNode);\n let styleElm;\n if (!appliedStyles) {\n rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());\n }\n if (!appliedStyles.has(scopeId2)) {\n {\n styleElm = win.document.createElement(\"style\");\n styleElm.innerHTML = style;\n const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);\n if (nonce != null) {\n styleElm.setAttribute(\"nonce\", nonce);\n }\n if (!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */)) {\n if (styleContainerNode.nodeName === \"HEAD\") {\n const preconnectLinks = styleContainerNode.querySelectorAll(\"link[rel=preconnect]\");\n const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector(\"style\");\n styleContainerNode.insertBefore(\n styleElm,\n (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null\n );\n } else if (\"host\" in styleContainerNode) {\n if (supportsConstructableStylesheets) {\n const stylesheet = new CSSStyleSheet();\n stylesheet.replaceSync(style);\n styleContainerNode.adoptedStyleSheets.unshift(stylesheet);\n } else {\n const existingStyleContainer = styleContainerNode.querySelector(\"style\");\n if (existingStyleContainer) {\n existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;\n } else {\n styleContainerNode.prepend(styleElm);\n }\n }\n } else {\n styleContainerNode.append(styleElm);\n }\n }\n if (cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */) {\n styleContainerNode.insertBefore(styleElm, null);\n }\n }\n if (cmpMeta.$flags$ & 4 /* hasSlotRelocation */) {\n styleElm.innerHTML += SLOT_FB_CSS;\n }\n if (appliedStyles) {\n appliedStyles.add(scopeId2);\n }\n }\n } else if (!styleContainerNode.adoptedStyleSheets.includes(style)) {\n styleContainerNode.adoptedStyleSheets.push(style);\n }\n }\n return scopeId2;\n};\nvar attachStyles = (hostRef) => {\n const cmpMeta = hostRef.$cmpMeta$;\n const elm = hostRef.$hostElement$;\n const flags = cmpMeta.$flags$;\n const endAttachStyles = createTime(\"attachStyles\", cmpMeta.$tagName$);\n const scopeId2 = addStyle(\n elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(),\n cmpMeta);\n if (flags & 10 /* needsScopedEncapsulation */) {\n elm[\"s-sc\"] = scopeId2;\n elm.classList.add(scopeId2 + \"-h\");\n }\n endAttachStyles();\n};\nvar getScopeId = (cmp, mode) => \"sc-\" + (cmp.$tagName$);\nvar h = (nodeName, vnodeData, ...children) => {\n let child = null;\n let key = null;\n let simple = false;\n let lastSimple = false;\n const vNodeChildren = [];\n const walk = (c) => {\n for (let i2 = 0; i2 < c.length; i2++) {\n child = c[i2];\n if (Array.isArray(child)) {\n walk(child);\n } else if (child != null && typeof child !== \"boolean\") {\n if (simple = typeof nodeName !== \"function\" && !isComplexType(child)) {\n child = String(child);\n }\n if (simple && lastSimple) {\n vNodeChildren[vNodeChildren.length - 1].$text$ += child;\n } else {\n vNodeChildren.push(simple ? newVNode(null, child) : child);\n }\n lastSimple = simple;\n }\n }\n };\n walk(children);\n if (vnodeData) {\n if (vnodeData.key) {\n key = vnodeData.key;\n }\n {\n const classData = vnodeData.className || vnodeData.class;\n if (classData) {\n vnodeData.class = typeof classData !== \"object\" ? classData : Object.keys(classData).filter((k) => classData[k]).join(\" \");\n }\n }\n }\n const vnode = newVNode(nodeName, null);\n vnode.$attrs$ = vnodeData;\n if (vNodeChildren.length > 0) {\n vnode.$children$ = vNodeChildren;\n }\n {\n vnode.$key$ = key;\n }\n return vnode;\n};\nvar newVNode = (tag, text) => {\n const vnode = {\n $flags$: 0,\n $tag$: tag,\n $text$: text,\n $elm$: null,\n $children$: null\n };\n {\n vnode.$attrs$ = null;\n }\n {\n vnode.$key$ = null;\n }\n return vnode;\n};\nvar Host = {};\nvar isHost = (node) => node && node.$tag$ === Host;\nvar createSupportsRuleRe = (selector) => {\n const safeSelector2 = escapeRegExpSpecialCharacters(selector);\n return new RegExp(\n // First capture group: match any context before the selector that's not inside @supports selector()\n // Using negative lookahead to avoid matching inside @supports selector(...) condition\n `(^|[^@]|@(?!supports\\\\s+selector\\\\s*\\\\([^{]*?${safeSelector2}))(${safeSelector2}\\\\b)`,\n \"g\"\n );\n};\ncreateSupportsRuleRe(\"::slotted\");\ncreateSupportsRuleRe(\":host\");\ncreateSupportsRuleRe(\":host-context\");\nvar parsePropertyValue = (propValue, propType, isFormAssociated) => {\n if (propValue != null && !isComplexType(propValue)) {\n if (propType & 4 /* Boolean */) {\n {\n return propValue === \"false\" ? false : propValue === \"\" || !!propValue;\n }\n }\n if (propType & 1 /* String */) {\n return String(propValue);\n }\n return propValue;\n }\n return propValue;\n};\nvar emitEvent = (elm, name, opts) => {\n const ev = plt.ce(name, opts);\n elm.dispatchEvent(ev);\n return ev;\n};\nvar setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {\n if (oldValue === newValue) {\n return;\n }\n let isProp = isMemberInElement(elm, memberName);\n let ln = memberName.toLowerCase();\n if (memberName === \"class\") {\n const classList = elm.classList;\n const oldClasses = parseClassList(oldValue);\n let newClasses = parseClassList(newValue);\n {\n classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));\n classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));\n }\n } else if (memberName === \"style\") {\n {\n for (const prop in oldValue) {\n if (!newValue || newValue[prop] == null) {\n if (prop.includes(\"-\")) {\n elm.style.removeProperty(prop);\n } else {\n elm.style[prop] = \"\";\n }\n }\n }\n }\n for (const prop in newValue) {\n if (!oldValue || newValue[prop] !== oldValue[prop]) {\n if (prop.includes(\"-\")) {\n elm.style.setProperty(prop, newValue[prop]);\n } else {\n elm.style[prop] = newValue[prop];\n }\n }\n }\n } else if (memberName === \"key\") ; else if (memberName === \"ref\") {\n if (newValue) {\n newValue(elm);\n }\n } else if ((!elm.__lookupSetter__(memberName)) && memberName[0] === \"o\" && memberName[1] === \"n\") {\n if (memberName[2] === \"-\") {\n memberName = memberName.slice(3);\n } else if (isMemberInElement(win, ln)) {\n memberName = ln.slice(2);\n } else {\n memberName = ln[2] + memberName.slice(3);\n }\n if (oldValue || newValue) {\n const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);\n memberName = memberName.replace(CAPTURE_EVENT_REGEX, \"\");\n if (oldValue) {\n plt.rel(elm, memberName, oldValue, capture);\n }\n if (newValue) {\n plt.ael(elm, memberName, newValue, capture);\n }\n }\n } else {\n const isComplex = isComplexType(newValue);\n if ((isProp || isComplex && newValue !== null) && true) {\n try {\n if (!elm.tagName.includes(\"-\")) {\n const n = newValue == null ? \"\" : newValue;\n if (memberName === \"list\") {\n isProp = false;\n } else if (oldValue == null || elm[memberName] != n) {\n if (typeof elm.__lookupSetter__(memberName) === \"function\") {\n elm[memberName] = n;\n } else {\n elm.setAttribute(memberName, n);\n }\n }\n } else if (elm[memberName] !== newValue) {\n elm[memberName] = newValue;\n }\n } catch (e) {\n }\n }\n let xlink = false;\n {\n if (ln !== (ln = ln.replace(/^xlink\\:?/, \"\"))) {\n memberName = ln;\n xlink = true;\n }\n }\n if (newValue == null || newValue === false) {\n if (newValue !== false || elm.getAttribute(memberName) === \"\") {\n if (xlink) {\n elm.removeAttributeNS(XLINK_NS, memberName);\n } else {\n elm.removeAttribute(memberName);\n }\n }\n } else if ((!isProp || flags & 4 /* isHost */ || isSvg) && !isComplex && elm.nodeType === 1 /* ElementNode */) {\n newValue = newValue === true ? \"\" : newValue;\n if (xlink) {\n elm.setAttributeNS(XLINK_NS, memberName, newValue);\n } else {\n elm.setAttribute(memberName, newValue);\n }\n }\n }\n};\nvar parseClassListRegex = /\\s/;\nvar parseClassList = (value) => {\n if (typeof value === \"object\" && value && \"baseVal\" in value) {\n value = value.baseVal;\n }\n if (!value || typeof value !== \"string\") {\n return [];\n }\n return value.split(parseClassListRegex);\n};\nvar CAPTURE_EVENT_SUFFIX = \"Capture\";\nvar CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + \"$\");\n\n// src/runtime/vdom/update-element.ts\nvar updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {\n const elm = newVnode.$elm$.nodeType === 11 /* DocumentFragment */ && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;\n const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};\n const newVnodeAttrs = newVnode.$attrs$ || {};\n {\n for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) {\n if (!(memberName in newVnodeAttrs)) {\n setAccessor(\n elm,\n memberName,\n oldVnodeAttrs[memberName],\n void 0,\n isSvgMode2,\n newVnode.$flags$);\n }\n }\n }\n for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) {\n setAccessor(\n elm,\n memberName,\n oldVnodeAttrs[memberName],\n newVnodeAttrs[memberName],\n isSvgMode2,\n newVnode.$flags$);\n }\n};\nfunction sortedAttrNames(attrNames) {\n return attrNames.includes(\"ref\") ? (\n // we need to sort these to ensure that `'ref'` is the last attr\n [...attrNames.filter((attr) => attr !== \"ref\"), \"ref\"]\n ) : (\n // no need to sort, return the original array\n attrNames\n );\n}\nvar hostTagName;\nvar isSvgMode = false;\nvar createElm = (oldParentVNode, newParentVNode, childIndex) => {\n const newVNode2 = newParentVNode.$children$[childIndex];\n let i2 = 0;\n let elm;\n let childNode;\n if (newVNode2.$text$ !== null) {\n elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);\n } else {\n if (!win.document) {\n throw new Error(\n \"You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.\"\n );\n }\n elm = newVNode2.$elm$ = win.document.createElement(\n newVNode2.$tag$\n );\n {\n updateElement(null, newVNode2, isSvgMode);\n }\n if (newVNode2.$children$) {\n for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {\n childNode = createElm(oldParentVNode, newVNode2, i2);\n if (childNode) {\n elm.appendChild(childNode);\n }\n }\n }\n }\n elm[\"s-hn\"] = hostTagName;\n return elm;\n};\nvar addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {\n let containerElm = parentElm;\n let childNode;\n if (containerElm.shadowRoot && containerElm.tagName === hostTagName) {\n containerElm = containerElm.shadowRoot;\n }\n for (; startIdx <= endIdx; ++startIdx) {\n if (vnodes[startIdx]) {\n childNode = createElm(null, parentVNode, startIdx);\n if (childNode) {\n vnodes[startIdx].$elm$ = childNode;\n insertBefore(containerElm, childNode, before);\n }\n }\n }\n};\nvar removeVnodes = (vnodes, startIdx, endIdx) => {\n for (let index = startIdx; index <= endIdx; ++index) {\n const vnode = vnodes[index];\n if (vnode) {\n const elm = vnode.$elm$;\n nullifyVNodeRefs(vnode);\n if (elm) {\n elm.remove();\n }\n }\n }\n};\nvar updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {\n let oldStartIdx = 0;\n let newStartIdx = 0;\n let idxInOld = 0;\n let i2 = 0;\n let oldEndIdx = oldCh.length - 1;\n let oldStartVnode = oldCh[0];\n let oldEndVnode = oldCh[oldEndIdx];\n let newEndIdx = newCh.length - 1;\n let newStartVnode = newCh[0];\n let newEndVnode = newCh[newEndIdx];\n let node;\n let elmToMove;\n while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) {\n if (oldStartVnode == null) {\n oldStartVnode = oldCh[++oldStartIdx];\n } else if (oldEndVnode == null) {\n oldEndVnode = oldCh[--oldEndIdx];\n } else if (newStartVnode == null) {\n newStartVnode = newCh[++newStartIdx];\n } else if (newEndVnode == null) {\n newEndVnode = newCh[--newEndIdx];\n } else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {\n patch(oldStartVnode, newStartVnode, isInitialRender);\n oldStartVnode = oldCh[++oldStartIdx];\n newStartVnode = newCh[++newStartIdx];\n } else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {\n patch(oldEndVnode, newEndVnode, isInitialRender);\n oldEndVnode = oldCh[--oldEndIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {\n patch(oldStartVnode, newEndVnode, isInitialRender);\n insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);\n oldStartVnode = oldCh[++oldStartIdx];\n newEndVnode = newCh[--newEndIdx];\n } else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {\n patch(oldEndVnode, newStartVnode, isInitialRender);\n insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);\n oldEndVnode = oldCh[--oldEndIdx];\n newStartVnode = newCh[++newStartIdx];\n } else {\n idxInOld = -1;\n {\n for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) {\n if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {\n idxInOld = i2;\n break;\n }\n }\n }\n if (idxInOld >= 0) {\n elmToMove = oldCh[idxInOld];\n if (elmToMove.$tag$ !== newStartVnode.$tag$) {\n node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);\n } else {\n patch(elmToMove, newStartVnode, isInitialRender);\n oldCh[idxInOld] = void 0;\n node = elmToMove.$elm$;\n }\n newStartVnode = newCh[++newStartIdx];\n } else {\n node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);\n newStartVnode = newCh[++newStartIdx];\n }\n if (node) {\n {\n insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);\n }\n }\n }\n }\n if (oldStartIdx > oldEndIdx) {\n addVnodes(\n parentElm,\n newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$,\n newVNode2,\n newCh,\n newStartIdx,\n newEndIdx\n );\n } else if (newStartIdx > newEndIdx) {\n removeVnodes(oldCh, oldStartIdx, oldEndIdx);\n }\n};\nvar isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {\n if (leftVNode.$tag$ === rightVNode.$tag$) {\n if (!isInitialRender) {\n return leftVNode.$key$ === rightVNode.$key$;\n }\n if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) {\n leftVNode.$key$ = rightVNode.$key$;\n }\n return true;\n }\n return false;\n};\nvar patch = (oldVNode, newVNode2, isInitialRender = false) => {\n const elm = newVNode2.$elm$ = oldVNode.$elm$;\n const oldChildren = oldVNode.$children$;\n const newChildren = newVNode2.$children$;\n const text = newVNode2.$text$;\n if (text === null) {\n {\n updateElement(oldVNode, newVNode2, isSvgMode);\n }\n if (oldChildren !== null && newChildren !== null) {\n updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);\n } else if (newChildren !== null) {\n if (oldVNode.$text$ !== null) {\n elm.textContent = \"\";\n }\n addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);\n } else if (\n // don't do this on initial render as it can cause non-hydrated content to be removed\n !isInitialRender && BUILD.updatable && oldChildren !== null\n ) {\n removeVnodes(oldChildren, 0, oldChildren.length - 1);\n } else ;\n } else if (oldVNode.$text$ !== text) {\n elm.data = text;\n }\n};\nvar nullifyVNodeRefs = (vNode) => {\n {\n vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);\n vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);\n }\n};\nvar insertBefore = (parent, newNode, reference) => {\n {\n return parent == null ? void 0 : parent.insertBefore(newNode, reference);\n }\n};\nvar renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {\n const hostElm = hostRef.$hostElement$;\n const cmpMeta = hostRef.$cmpMeta$;\n const oldVNode = hostRef.$vnode$ || newVNode(null, null);\n const isHostElement = isHost(renderFnResults);\n const rootVnode = isHostElement ? renderFnResults : h(null, null, renderFnResults);\n hostTagName = hostElm.tagName;\n if (cmpMeta.$attrsToReflect$) {\n rootVnode.$attrs$ = rootVnode.$attrs$ || {};\n cmpMeta.$attrsToReflect$.map(\n ([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]\n );\n }\n if (isInitialLoad && rootVnode.$attrs$) {\n for (const key of Object.keys(rootVnode.$attrs$)) {\n if (hostElm.hasAttribute(key) && ![\"key\", \"ref\", \"style\", \"class\"].includes(key)) {\n rootVnode.$attrs$[key] = hostElm[key];\n }\n }\n }\n rootVnode.$tag$ = null;\n rootVnode.$flags$ |= 4 /* isHost */;\n hostRef.$vnode$ = rootVnode;\n rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm ;\n patch(oldVNode, rootVnode, isInitialLoad);\n};\n\n// src/runtime/update-component.ts\nvar attachToAncestor = (hostRef, ancestorComponent) => {\n if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent[\"s-p\"]) {\n const index = ancestorComponent[\"s-p\"].push(\n new Promise(\n (r) => hostRef.$onRenderResolve$ = () => {\n ancestorComponent[\"s-p\"].splice(index - 1, 1);\n r();\n }\n )\n );\n }\n};\nvar scheduleUpdate = (hostRef, isInitialLoad) => {\n {\n hostRef.$flags$ |= 16 /* isQueuedForUpdate */;\n }\n if (hostRef.$flags$ & 4 /* isWaitingForChildren */) {\n hostRef.$flags$ |= 512 /* needsRerender */;\n return;\n }\n attachToAncestor(hostRef, hostRef.$ancestorComponent$);\n const dispatch = () => dispatchHooks(hostRef, isInitialLoad);\n return writeTask(dispatch) ;\n};\nvar dispatchHooks = (hostRef, isInitialLoad) => {\n const elm = hostRef.$hostElement$;\n const endSchedule = createTime(\"scheduleUpdate\", hostRef.$cmpMeta$.$tagName$);\n const instance = elm;\n if (!instance) {\n throw new Error(\n `Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \\`externalRuntime: true\\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`\n );\n }\n let maybePromise;\n if (isInitialLoad) {\n maybePromise = safeCall(instance, \"componentWillLoad\", void 0, elm);\n } else {\n maybePromise = safeCall(instance, \"componentWillUpdate\", void 0, elm);\n }\n maybePromise = enqueue(maybePromise, () => safeCall(instance, \"componentWillRender\", void 0, elm));\n endSchedule();\n return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));\n};\nvar enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {\n console.error(err2);\n fn();\n}) : fn();\nvar isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === \"function\";\nvar updateComponent = async (hostRef, instance, isInitialLoad) => {\n var _a;\n const elm = hostRef.$hostElement$;\n const endUpdate = createTime(\"update\", hostRef.$cmpMeta$.$tagName$);\n const rc = elm[\"s-rc\"];\n if (isInitialLoad) {\n attachStyles(hostRef);\n }\n const endRender = createTime(\"render\", hostRef.$cmpMeta$.$tagName$);\n {\n callRender(hostRef, instance, elm, isInitialLoad);\n }\n if (rc) {\n rc.map((cb) => cb());\n elm[\"s-rc\"] = void 0;\n }\n endRender();\n endUpdate();\n {\n const childrenPromises = (_a = elm[\"s-p\"]) != null ? _a : [];\n const postUpdate = () => postUpdateComponent(hostRef);\n if (childrenPromises.length === 0) {\n postUpdate();\n } else {\n Promise.all(childrenPromises).then(postUpdate);\n hostRef.$flags$ |= 4 /* isWaitingForChildren */;\n childrenPromises.length = 0;\n }\n }\n};\nvar callRender = (hostRef, instance, elm, isInitialLoad) => {\n try {\n instance = instance.render() ;\n {\n hostRef.$flags$ &= -17 /* isQueuedForUpdate */;\n }\n {\n hostRef.$flags$ |= 2 /* hasRendered */;\n }\n {\n {\n {\n renderVdom(hostRef, instance, isInitialLoad);\n }\n }\n }\n } catch (e) {\n consoleError(e, hostRef.$hostElement$);\n }\n return null;\n};\nvar postUpdateComponent = (hostRef) => {\n const tagName = hostRef.$cmpMeta$.$tagName$;\n const elm = hostRef.$hostElement$;\n const endPostUpdate = createTime(\"postUpdate\", tagName);\n const instance = elm;\n const ancestorComponent = hostRef.$ancestorComponent$;\n safeCall(instance, \"componentDidRender\", void 0, elm);\n if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {\n hostRef.$flags$ |= 64 /* hasLoadedComponent */;\n {\n addHydratedFlag(elm);\n }\n safeCall(instance, \"componentDidLoad\", void 0, elm);\n endPostUpdate();\n {\n hostRef.$onReadyResolve$(elm);\n if (!ancestorComponent) {\n appDidLoad();\n }\n }\n } else {\n safeCall(instance, \"componentDidUpdate\", void 0, elm);\n endPostUpdate();\n }\n {\n if (hostRef.$onRenderResolve$) {\n hostRef.$onRenderResolve$();\n hostRef.$onRenderResolve$ = void 0;\n }\n if (hostRef.$flags$ & 512 /* needsRerender */) {\n nextTick(() => scheduleUpdate(hostRef, false));\n }\n hostRef.$flags$ &= -517;\n }\n};\nvar appDidLoad = (who) => {\n nextTick(() => emitEvent(win, \"appload\", { detail: { namespace: NAMESPACE } }));\n};\nvar safeCall = (instance, method, arg, elm) => {\n if (instance && instance[method]) {\n try {\n return instance[method](arg);\n } catch (e) {\n consoleError(e, elm);\n }\n }\n return void 0;\n};\nvar addHydratedFlag = (elm) => {\n var _a;\n return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : \"hydrated\") ;\n};\n\n// src/runtime/set-value.ts\nvar getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);\nvar setValue = (ref, propName, newVal, cmpMeta) => {\n const hostRef = getHostRef(ref);\n const elm = ref;\n const oldVal = hostRef.$instanceValues$.get(propName);\n const flags = hostRef.$flags$;\n const instance = elm;\n newVal = parsePropertyValue(\n newVal,\n cmpMeta.$members$[propName][0]);\n const areBothNaN = Number.isNaN(oldVal) && Number.isNaN(newVal);\n const didValueChange = newVal !== oldVal && !areBothNaN;\n if (didValueChange) {\n hostRef.$instanceValues$.set(propName, newVal);\n {\n if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {\n const watchMethods = cmpMeta.$watchers$[propName];\n if (watchMethods) {\n watchMethods.map((watchMethodName) => {\n try {\n instance[watchMethodName](newVal, oldVal, propName);\n } catch (e) {\n consoleError(e, elm);\n }\n });\n }\n }\n if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {\n if (instance.componentShouldUpdate) {\n if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {\n return;\n }\n }\n scheduleUpdate(hostRef, false);\n }\n }\n }\n};\n\n// src/runtime/proxy-component.ts\nvar proxyComponent = (Cstr, cmpMeta, flags) => {\n var _a, _b;\n const prototype = Cstr.prototype;\n if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {\n if (Cstr.watchers && !cmpMeta.$watchers$) {\n cmpMeta.$watchers$ = Cstr.watchers;\n }\n const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});\n members.map(([memberName, [memberFlags]]) => {\n if ((memberFlags & 31 /* Prop */ || memberFlags & 32 /* State */)) {\n const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};\n if (origGetter) cmpMeta.$members$[memberName][0] |= 2048 /* Getter */;\n if (origSetter) cmpMeta.$members$[memberName][0] |= 4096 /* Setter */;\n {\n Object.defineProperty(prototype, memberName, {\n get() {\n {\n return origGetter ? origGetter.apply(this) : getValue(this, memberName);\n }\n },\n configurable: true,\n enumerable: true\n });\n }\n Object.defineProperty(prototype, memberName, {\n set(newValue) {\n const ref = getHostRef(this);\n if (origSetter) {\n const currentValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];\n if (typeof currentValue === \"undefined\" && ref.$instanceValues$.get(memberName)) {\n newValue = ref.$instanceValues$.get(memberName);\n } else if (!ref.$instanceValues$.get(memberName) && currentValue) {\n ref.$instanceValues$.set(memberName, currentValue);\n }\n origSetter.apply(this, [\n parsePropertyValue(\n newValue,\n memberFlags)\n ]);\n newValue = memberFlags & 32 /* State */ ? this[memberName] : ref.$hostElement$[memberName];\n setValue(this, memberName, newValue, cmpMeta);\n return;\n }\n {\n setValue(this, memberName, newValue, cmpMeta);\n return;\n }\n }\n });\n }\n });\n {\n const attrNameToPropName = /* @__PURE__ */ new Map();\n prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {\n plt.jmp(() => {\n var _a2;\n const propName = attrNameToPropName.get(attrName);\n if (this.hasOwnProperty(propName) && BUILD.lazyLoad) ; else if (prototype.hasOwnProperty(propName) && typeof this[propName] === \"number\" && // cast type to number to avoid TS compiler issues\n this[propName] == newValue) {\n return;\n } else if (propName == null) {\n const hostRef = getHostRef(this);\n const flags2 = hostRef == null ? void 0 : hostRef.$flags$;\n if (flags2 && !(flags2 & 8 /* isConstructingInstance */) && flags2 & 128 /* isWatchReady */ && newValue !== oldValue) {\n const elm = this;\n const instance = elm;\n const entry = (_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName];\n entry == null ? void 0 : entry.forEach((callbackName) => {\n if (instance[callbackName] != null) {\n instance[callbackName].call(instance, newValue, oldValue, attrName);\n }\n });\n }\n return;\n }\n const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);\n newValue = newValue === null && typeof this[propName] === \"boolean\" ? false : newValue;\n if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) {\n this[propName] = newValue;\n }\n });\n };\n Cstr.observedAttributes = Array.from(\n /* @__PURE__ */ new Set([\n ...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}),\n ...members.filter(([_, m]) => m[0] & 15 /* HasAttribute */).map(([propName, m]) => {\n var _a2;\n const attrName = m[1] || propName;\n attrNameToPropName.set(attrName, propName);\n if (m[0] & 512 /* ReflectAttr */) {\n (_a2 = cmpMeta.$attrsToReflect$) == null ? void 0 : _a2.push([propName, attrName]);\n }\n return attrName;\n })\n ])\n );\n }\n }\n return Cstr;\n};\n\n// src/runtime/initialize-component.ts\nvar initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {\n let Cstr;\n if ((hostRef.$flags$ & 32 /* hasInitializedComponent */) === 0) {\n hostRef.$flags$ |= 32 /* hasInitializedComponent */;\n {\n Cstr = elm.constructor;\n const cmpTag = elm.localName;\n customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128 /* isWatchReady */);\n }\n if (Cstr && Cstr.style) {\n let style;\n if (typeof Cstr.style === \"string\") {\n style = Cstr.style;\n }\n const scopeId2 = getScopeId(cmpMeta);\n if (!styles.has(scopeId2)) {\n const endRegisterStyles = createTime(\"registerStyles\", cmpMeta.$tagName$);\n registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1 /* shadowDomEncapsulation */));\n endRegisterStyles();\n }\n }\n }\n const ancestorComponent = hostRef.$ancestorComponent$;\n const schedule = () => scheduleUpdate(hostRef, true);\n if (ancestorComponent && ancestorComponent[\"s-rc\"]) {\n ancestorComponent[\"s-rc\"].push(schedule);\n } else {\n schedule();\n }\n};\nvar fireConnectedCallback = (instance, elm) => {\n};\n\n// src/runtime/connected-callback.ts\nvar connectedCallback = (elm) => {\n if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {\n const hostRef = getHostRef(elm);\n const cmpMeta = hostRef.$cmpMeta$;\n const endConnected = createTime(\"connectedCallback\", cmpMeta.$tagName$);\n if (!(hostRef.$flags$ & 1 /* hasConnected */)) {\n hostRef.$flags$ |= 1 /* hasConnected */;\n {\n let ancestorComponent = elm;\n while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) {\n if (ancestorComponent[\"s-p\"]) {\n attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);\n break;\n }\n }\n }\n if (cmpMeta.$members$) {\n Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {\n if (memberFlags & 31 /* Prop */ && elm.hasOwnProperty(memberName)) {\n const value = elm[memberName];\n delete elm[memberName];\n elm[memberName] = value;\n }\n });\n }\n if (BUILD.initializeNextTick) {\n nextTick(() => initializeComponent(elm, hostRef, cmpMeta));\n } else {\n initializeComponent(elm, hostRef, cmpMeta);\n }\n } else {\n if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {\n hostRef.$onReadyPromise$.then(() => fireConnectedCallback());\n }\n }\n endConnected();\n }\n};\nvar disconnectedCallback = async (elm) => {\n if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {\n getHostRef(elm);\n }\n if (rootAppliedStyles.has(elm)) {\n rootAppliedStyles.delete(elm);\n }\n if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) {\n rootAppliedStyles.delete(elm.shadowRoot);\n }\n};\nvar proxyCustomElement = (Cstr, compactMeta) => {\n const cmpMeta = {\n $flags$: compactMeta[0],\n $tagName$: compactMeta[1]\n };\n {\n cmpMeta.$members$ = compactMeta[2];\n }\n {\n cmpMeta.$watchers$ = Cstr.$watchers$;\n }\n {\n cmpMeta.$attrsToReflect$ = [];\n }\n const originalConnectedCallback = Cstr.prototype.connectedCallback;\n const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;\n Object.assign(Cstr.prototype, {\n __hasHostListenerAttached: false,\n __registerHost() {\n registerHost(this, cmpMeta);\n },\n connectedCallback() {\n if (!this.__hasHostListenerAttached) {\n getHostRef(this);\n this.__hasHostListenerAttached = true;\n }\n connectedCallback(this);\n if (originalConnectedCallback) {\n originalConnectedCallback.call(this);\n }\n },\n disconnectedCallback() {\n disconnectedCallback(this);\n if (originalDisconnectedCallback) {\n originalDisconnectedCallback.call(this);\n }\n },\n __attachShadow() {\n {\n if (!this.shadowRoot) {\n createShadowRoot.call(this, cmpMeta);\n } else {\n if (this.shadowRoot.mode !== \"open\") {\n throw new Error(\n `Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`\n );\n }\n }\n }\n }\n });\n Cstr.is = cmpMeta.$tagName$;\n return proxyComponent(Cstr, cmpMeta);\n};\n\n// src/runtime/nonce.ts\nvar setNonce = (nonce) => plt.$nonce$ = nonce;\n\n// src/runtime/platform-options.ts\nvar setPlatformOptions = (opts) => Object.assign(plt, opts);\n\n// src/runtime/render.ts\nfunction render(vnode, container) {\n const cmpMeta = {\n $flags$: 0,\n $tagName$: container.tagName\n };\n const ref = {\n $cmpMeta$: cmpMeta,\n $hostElement$: container\n };\n renderVdom(ref, vnode);\n}\n\nlet CACHED_MAP;\nconst getIconMap = () => {\n if (typeof window === 'undefined') {\n return new Map();\n }\n else {\n if (!CACHED_MAP) {\n const win = window;\n win.Ionicons = win.Ionicons || {};\n CACHED_MAP = win.Ionicons.map = win.Ionicons.map || new Map();\n }\n return CACHED_MAP;\n }\n};\nconst addIcons = (icons) => {\n Object.keys(icons).forEach((name) => {\n addToIconMap(name, icons[name]);\n /**\n * Developers can also pass in the SVG object directly\n * and Ionicons can map the object to a kebab case name.\n * Example: addIcons({ addCircleOutline });\n * This will create an \"addCircleOutline\" entry and\n * an \"add-circle-outline\" entry.\n * Usage: <ion-icon name=\"add-circle-outline\"></ion-icon>\n * Using name=\"addCircleOutline\" is valid too, but the\n * kebab case naming is preferred.\n */\n const toKebabCase = name.replace(/([a-z0-9]|(?=[A-Z]))([A-Z0-9])/g, '$1-$2').toLowerCase();\n if (name !== toKebabCase) {\n addToIconMap(toKebabCase, icons[name]);\n }\n });\n};\nconst addToIconMap = (name, data) => {\n const map = getIconMap();\n const existingIcon = map.get(name);\n if (existingIcon === undefined) {\n map.set(name, data);\n /**\n * Importing and defining the same icon reference\n * multiple times should not yield a warning.\n */\n }\n else if (existingIcon !== data) {\n console.warn(`[Ionicons Warning]: Multiple icons were mapped to name \"${name}\". Ensure that multiple icons are not mapped to the same icon name.`);\n }\n};\nconst getUrl = (i) => {\n let url = getSrc(i.src);\n if (url) {\n return url;\n }\n url = getName(i.name, i.icon, i.mode, i.ios, i.md);\n if (url) {\n return getNamedUrl(url, i);\n }\n if (i.icon) {\n url = getSrc(i.icon);\n if (url) {\n return url;\n }\n url = getSrc(i.icon[i.mode]);\n if (url) {\n return url;\n }\n }\n return null;\n};\nconst getNamedUrl = (iconName, iconEl) => {\n const url = getIconMap().get(iconName);\n if (url) {\n return url;\n }\n try {\n return getAssetPath(`svg/${iconName}.svg`);\n }\n catch (e) {\n console.log('e', e);\n /**\n * In the custom elements build version of ionicons, referencing an icon\n * by name will throw an invalid URL error because the asset path is not defined.\n * This catches that error and logs something that is more developer-friendly.\n * We also include a reference to the ion-icon element so developers can\n * figure out which instance of ion-icon needs to be updated.\n */\n console.warn(`[Ionicons Warning]: Could not load icon with name \"${iconName}\". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`, iconEl);\n }\n};\nconst getName = (iconName, icon, mode, ios, md) => {\n // default to \"md\" if somehow the mode wasn't set\n mode = (mode && toLower(mode)) === 'ios' ? 'ios' : 'md';\n // if an icon was passed in using the ios or md attributes\n // set the iconName to whatever was passed in\n if (ios && mode === 'ios') {\n iconName = toLower(ios);\n }\n else if (md && mode === 'md') {\n iconName = toLower(md);\n }\n else {\n if (!iconName && icon && !isSrc(icon)) {\n iconName = icon;\n }\n if (isStr(iconName)) {\n iconName = toLower(iconName);\n }\n }\n if (!isStr(iconName) || iconName.trim() === '') {\n return null;\n }\n // only allow alpha characters and dash\n const invalidChars = iconName.replace(/[a-z]|-|\\d/gi, '');\n if (invalidChars !== '') {\n return null;\n }\n return iconName;\n};\nconst getSrc = (src) => {\n if (isStr(src)) {\n src = src.trim();\n if (isSrc(src)) {\n return src;\n }\n }\n return null;\n};\nconst isSrc = (str) => str.length > 0 && /(\\/|\\.)/.test(str);\nconst isStr = (val) => typeof val === 'string';\nconst toLower = (val) => val.toLowerCase();\n/**\n * Elements inside of web components sometimes need to inherit global attributes\n * set on the host. For example, the inner input in `ion-input` should inherit\n * the `title` attribute that developers set directly on `ion-input`. This\n * helper function should be called in componentWillLoad and assigned to a variable\n * that is later used in the render function.\n *\n * This does not need to be reactive as changing attributes on the host element\n * does not trigger a re-render.\n */\nconst inheritAttributes = (el, attributes = []) => {\n const attributeObject = {};\n attributes.forEach((attr) => {\n if (el.hasAttribute(attr)) {\n const value = el.getAttribute(attr);\n if (value !== null) {\n attributeObject[attr] = el.getAttribute(attr);\n }\n el.removeAttribute(attr);\n }\n });\n return attributeObject;\n};\n/**\n * Returns `true` if the document or host element\n * has a `dir` set to `rtl`. The host value will always\n * take priority over the root document value.\n */\nconst isRTL = (hostEl) => {\n if (hostEl) {\n if (hostEl.dir !== '') {\n return hostEl.dir.toLowerCase() === 'rtl';\n }\n }\n return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === 'rtl';\n};\n\nexport { H, inheritAttributes as a, addIcons, getName as b, isRTL as c, Host as d, getUrl as g, getAssetPath, h, isStr as i, proxyCustomElement as p, render, setAssetPath, setNonce, setPlatformOptions };\n","import { i as isStr, p as proxyCustomElement, H, a as inheritAttributes, g as getUrl, b as getName, h, c as isRTL, d as Host } from './index.js';\n\nconst validateContent = (svgContent) => {\n const div = document.createElement('div');\n div.innerHTML = svgContent;\n // setup this way to ensure it works on our buddy IE\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\n div.removeChild(div.childNodes[i]);\n }\n }\n // must only have 1 root element\n const svgElm = div.firstElementChild;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\n const svgClass = svgElm.getAttribute('class') || '';\n svgElm.setAttribute('class', (svgClass + ' s-ion-icon').trim());\n // root element must be an svg\n // lets double check we've got valid elements\n // do not allow scripts\n if (isValid(svgElm)) {\n return div.innerHTML;\n }\n }\n return '';\n};\nconst isValid = (elm) => {\n if (elm.nodeType === 1) {\n if (elm.nodeName.toLowerCase() === 'script') {\n return false;\n }\n for (let i = 0; i < elm.attributes.length; i++) {\n const name = elm.attributes[i].name;\n if (isStr(name) && name.toLowerCase().indexOf('on') === 0) {\n return false;\n }\n }\n for (let i = 0; i < elm.childNodes.length; i++) {\n if (!isValid(elm.childNodes[i])) {\n return false;\n }\n }\n }\n return true;\n};\nconst isSvgDataUrl = (url) => url.startsWith('data:image/svg+xml');\nconst isEncodedDataUrl = (url) => url.indexOf(';utf8,') !== -1;\n\nconst ioniconContent = new Map();\nconst requests = new Map();\nlet parser;\n/**\n * Safely fallback to an empty svg\n */\nfunction safeFallback(url) {\n const svg = '';\n ioniconContent.set(url, svg);\n return svg;\n}\nconst getSvgContent = (url, sanitize) => {\n /**\n * See if we already have a request for this url\n */\n const req = requests.get(url);\n if (req) {\n return req;\n }\n if (typeof fetch !== 'undefined' && typeof document !== 'undefined') {\n /**\n * If the url is a data url of an svg, then try to parse it\n * with the DOMParser. This works with content security policies enabled.\n */\n if (isSvgDataUrl(url) && isEncodedDataUrl(url)) {\n return Promise.resolve(getSvgByUrl(url));\n }\n return fetchSvg(url, sanitize);\n }\n return Promise.resolve(safeFallback(url));\n};\nfunction getSvgByUrl(url) {\n if (!parser) {\n /**\n * Create an instance of the DOM parser. This creates a single\n * parser instance for the entire app, which is more efficient.\n */\n parser = new DOMParser();\n }\n const doc = parser.parseFromString(url, 'text/html');\n const svg = doc.querySelector('svg');\n if (svg) {\n ioniconContent.set(url, svg.outerHTML);\n return svg.outerHTML;\n }\n throw new Error(`Could not parse svg from ${url}`);\n}\nfunction fetchSvg(url, sanitize) {\n /**\n * We don't already have a request\n */\n const req = fetch(url)\n .then((rsp) => {\n /**\n * When fetching from a file:// URL, some browsers return\n * a 0 status code even when the request succeeds so don't\n * rely on rsp.ok as the only signal of success.\n */\n return rsp\n .text()\n .then((svgContent) => {\n if (svgContent && sanitize !== false) {\n svgContent = validateContent(svgContent);\n }\n const svg = svgContent || '';\n ioniconContent.set(url, svg);\n return svg;\n })\n .catch(() => safeFallback(url));\n })\n .catch(() => safeFallback(url));\n /**\n * Cache for the same requests\n */\n requests.set(url, req);\n return req;\n}\n\nconst iconCss = \":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}\";\n\nconst Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends H {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n this.iconName = null;\n this.inheritedAttributes = {};\n this.didLoadIcon = false;\n this.isVisible = false;\n /**\n * The mode determines which platform styles to use.\n */\n this.mode = getIonMode();\n /**\n * If enabled, ion-icon will be loaded lazily when it's visible in the viewport.\n * Default, `false`.\n */\n this.lazy = false;\n /**\n * When set to `false`, SVG content that is HTTP fetched will not be checked\n * if the response SVG content has any `<script>` elements, or any attributes\n * that start with `on`, such as `onclick`.\n * @default true\n */\n this.sanitize = true;\n }\n componentWillLoad() {\n this.inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n }\n connectedCallback() {\n /**\n * purposely do not return the promise here because loading\n * the svg file should not hold up loading the app\n * only load the svg if it's visible\n */\n this.waitUntilVisible(this.el, '50px', () => {\n this.isVisible = true;\n this.loadIcon();\n });\n }\n /**\n * Loads the icon after the component has finished rendering.\n */\n componentDidLoad() {\n /**\n * Addresses an Angular issue where property values are assigned after the 'connectedCallback' but prior to the registration of watchers.\n * This enhancement ensures the loading of an icon when the component has finished rendering and the icon has yet to apply the SVG data.\n * This modification pertains to the usage of Angular's binding syntax:\n * `<ion-icon [name]=\"myIconName\"></ion-icon>`\n */\n if (!this.didLoadIcon) {\n this.loadIcon();\n }\n }\n /**\n * Disconnect the IntersectionObserver.\n */\n disconnectedCallback() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n /**\n * Wait until the icon is visible in the viewport.\n * @param el - The element to observe.\n * @param rootMargin - The root margin of the observer.\n * @param cb - The callback to call when the element is visible.\n */\n waitUntilVisible(el, rootMargin, cb) {\n /**\n * IntersectionObserver is a browser API that allows you to observe\n * the visibility of an element relative to a root element. It is\n * supported in all modern browsers, except IE and when server-side\n * rendering.\n */\n const hasIntersectionObserverSupport = Boolean(this.lazy && typeof window !== 'undefined' && window.IntersectionObserver);\n /**\n * browser doesn't support IntersectionObserver\n * so just fallback to always show it\n */\n if (!hasIntersectionObserverSupport) {\n return cb();\n }\n const io = (this.io = new window.IntersectionObserver((data) => {\n if (data[0].isIntersecting) {\n io.disconnect();\n this.io = undefined;\n cb();\n }\n }, { rootMargin }));\n io.observe(el);\n }\n /**\n * Watch for changes to the icon name, src, icon, ios, or md properties.\n * When a change is detected, the icon will be loaded.\n */\n loadIcon() {\n if (this.isVisible) {\n const url = getUrl(this);\n if (url) {\n if (ioniconContent.has(url)) {\n // sync if it's already loaded\n this.svgContent = ioniconContent.get(url);\n }\n else {\n // async if it hasn't been loaded\n getSvgContent(url, this.sanitize).then(() => (this.svgContent = ioniconContent.get(url)));\n }\n this.didLoadIcon = true;\n }\n }\n this.iconName = getName(this.name, this.icon, this.mode, this.ios, this.md);\n }\n render() {\n const { flipRtl, iconName, inheritedAttributes, el } = this;\n const mode = this.mode || 'md';\n /**\n * we have designated that arrows & chevrons should automatically flip (unless flip-rtl\n * is set to false) because \"back\" is left in ltr and right in rtl, and \"forward\" is the opposite\n */\n const shouldAutoFlip = iconName\n ? (iconName.includes('arrow') || iconName.includes('chevron')) && flipRtl !== false\n : false;\n /**\n * if shouldBeFlippable is true, the icon should change direction when `dir` changes\n */\n const shouldBeFlippable = flipRtl || shouldAutoFlip;\n return (h(Host, Object.assign({ key: '0578c899781ca145dd8205acd9670af39b57cf2e', role: \"img\", class: Object.assign(Object.assign({ [mode]: true }, createColorClasses(this.color)), { [`icon-${this.size}`]: !!this.size, 'flip-rtl': shouldBeFlippable, 'icon-rtl': shouldBeFlippable && isRTL(el) }) }, inheritedAttributes), this.svgContent ? (h(\"div\", { class: \"icon-inner\", innerHTML: this.svgContent })) : (h(\"div\", { class: \"icon-inner\" }))));\n }\n static get assetsDirs() { return [\"svg\"]; }\n get el() { return this; }\n static get watchers() { return {\n \"name\": [\"loadIcon\"],\n \"src\": [\"loadIcon\"],\n \"icon\": [\"loadIcon\"],\n \"ios\": [\"loadIcon\"],\n \"md\": [\"loadIcon\"]\n }; }\n static get style() { return iconCss; }\n}, [1, \"ion-icon\", {\n \"mode\": [1025],\n \"color\": [1],\n \"ios\": [1],\n \"md\": [1],\n \"flipRtl\": [4, \"flip-rtl\"],\n \"name\": [513],\n \"src\": [1],\n \"icon\": [8],\n \"size\": [1],\n \"lazy\": [4],\n \"sanitize\": [4],\n \"svgContent\": [32],\n \"isVisible\": [32]\n }, undefined, {\n \"name\": [\"loadIcon\"],\n \"src\": [\"loadIcon\"],\n \"icon\": [\"loadIcon\"],\n \"ios\": [\"loadIcon\"],\n \"md\": [\"loadIcon\"]\n }]);\n/**\n * Get the mode of the document.\n * @returns The mode of the document.\n */\nconst getIonMode = () => (typeof document !== 'undefined' && document.documentElement.getAttribute('mode')) || 'md';\n/**\n * Create color classes for the icon.\n * @param color - The color of the icon.\n * @returns The color classes for the icon.\n */\nconst createColorClasses = (color) => {\n return color\n ? {\n 'ion-color': true,\n [`ion-color-${color}`]: true,\n }\n : null;\n};\nfunction defineCustomElement$1() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-icon\"];\n components.forEach(tagName => { switch (tagName) {\n case \"ion-icon\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, Icon);\n }\n break;\n } });\n}\n\nconst IonIcon = Icon;\nconst defineCustomElement = defineCustomElement$1;\n\nexport { IonIcon, defineCustomElement };\n","import \"@ionic/core/css/core.css\";\nimport \"@ionic/core/css/normalize.css\";\nimport \"@ionic/core/css/structure.css\";\nimport \"@ionic/core/css/typography.css\";\nimport \"@ionic/core/css/padding.css\";\nimport \"@ionic/core/css/flex-utils.css\";\nimport \"@ionic/core/css/display.css\";\n\nimport { initialize } from \"@ionic/core/components\";\nimport { defineCustomElement as defineIonApp } from \"@ionic/core/components/ion-app.js\";\nimport { defineCustomElement as defineIonHeader } from \"@ionic/core/components/ion-header.js\";\nimport { defineCustomElement as defineIonToolbar } from \"@ionic/core/components/ion-toolbar.js\";\nimport { defineCustomElement as defineIonTitle } from \"@ionic/core/components/ion-title.js\";\nimport { defineCustomElement as defineIonContent } from \"@ionic/core/components/ion-content.js\";\nimport { defineCustomElement as defineIonButtons } from \"@ionic/core/components/ion-buttons.js\";\nimport { defineCustomElement as defineIonNote } from \"@ionic/core/components/ion-note.js\";\nimport { defineCustomElement as defineIonSpinner } from \"@ionic/core/components/ion-spinner.js\";\nimport { defineCustomElement as defineIonList } from \"@ionic/core/components/ion-list.js\";\nimport { defineCustomElement as defineIonItem } from \"@ionic/core/components/ion-item.js\";\nimport { defineCustomElement as defineIonLabel } from \"@ionic/core/components/ion-label.js\";\nimport { defineCustomElement as defineIonCard } from \"@ionic/core/components/ion-card.js\";\nimport { defineCustomElement as defineIonCardHeader } from \"@ionic/core/components/ion-card-header.js\";\nimport { defineCustomElement as defineIonCardTitle } from \"@ionic/core/components/ion-card-title.js\";\nimport { defineCustomElement as defineIonCardSubtitle } from \"@ionic/core/components/ion-card-subtitle.js\";\nimport { defineCustomElement as defineIonCardContent } from \"@ionic/core/components/ion-card-content.js\";\nimport { defineCustomElement as defineIonRippleEffect } from \"@ionic/core/components/ion-ripple-effect.js\";\nimport { defineCustomElement as defineIonIcon } from \"ionicons/components/ion-icon.js\";\nimport { defineCustomElement as defineIonRouter } from \"@ionic/core/components/ion-router.js\";\nimport { defineCustomElement as defineIonRoute } from \"@ionic/core/components/ion-route.js\";\nimport { defineCustomElement as defineIonRouterOutlet } from \"@ionic/core/components/ion-router-outlet.js\";\nimport { defineCustomElement as defineIonBackButton } from \"@ionic/core/components/ion-back-button.js\";\n\nlet isInitialized = false;\n\nexport function setupNixIonic() {\n if (isInitialized) return;\n\n // Inicializa la configuración global del framework\n initialize();\n\n // Define los web components en el navegador de forma síncrona\n defineIonApp();\n defineIonHeader();\n defineIonToolbar();\n defineIonTitle();\n defineIonContent();\n defineIonButtons();\n defineIonNote();\n defineIonSpinner();\n defineIonList();\n defineIonItem();\n defineIonLabel();\n defineIonCard();\n defineIonCardHeader();\n defineIonCardTitle();\n defineIonCardSubtitle();\n defineIonCardContent();\n defineIonRippleEffect();\n defineIonIcon();\n\n defineIonRouter();\n defineIonRoute();\n defineIonRouterOutlet();\n defineIonBackButton();\n\n isInitialized = true;\n}","import { NixComponent } from \"@deijose/nix-js\";\nimport type { NixTemplate } from \"@deijose/nix-js\";\nimport { createPageLifecycle, type PageLifecycle } from \"./lifecycle\";\n\n// --------------------------------------------------------------------------\n// Router store singleton\n// --------------------------------------------------------------------------\n\nexport function useRouter() {\n return {\n navigate: (path: string, direction: \"forward\" | \"back\" | \"root\" = \"forward\") => {\n const router = document.querySelector(\"ion-router\");\n if (router && typeof (router as any).push === \"function\") {\n (router as any).push(path, direction);\n }\n },\n replace: (path: string) => {\n const router = document.querySelector(\"ion-router\");\n if (router && typeof (router as any).push === \"function\") {\n (router as any).push(path, \"root\");\n }\n },\n back: () => {\n const router = document.querySelector(\"ion-router\");\n if (router && typeof (router as any).back === \"function\") {\n (router as any).back();\n }\n }\n };\n}\n\n// --------------------------------------------------------------------------\n// IonBackButton (Sin listeners, 100% nativo)\n// --------------------------------------------------------------------------\n\nexport function IonBackButton(defaultHref: string | undefined = \"/\"): NixTemplate {\n return {\n __isNixTemplate: true as const,\n mount(container) {\n const el = typeof container === \"string\" ? document.querySelector(container)! : container;\n const cleanup = this._render(el, null);\n return { unmount: cleanup };\n },\n _render(parent: Node, before: Node | null): () => void {\n const btn = document.createElement(\"ion-back-button\");\n if (defaultHref) btn.setAttribute(\"default-href\", defaultHref);\n parent.insertBefore(btn, before);\n return () => btn.remove();\n },\n };\n}\n\n// --------------------------------------------------------------------------\n// Tipos públicos\n// --------------------------------------------------------------------------\n\nexport interface PageContext {\n lc: PageLifecycle;\n params: Record<string, string>;\n}\n\nexport interface RouteDefinition {\n path: string;\n component: (ctx: PageContext) => NixComponent | NixTemplate;\n}\n\n// --------------------------------------------------------------------------\n// IonRouterOutlet (El Bridge Maestro usando Framework Delegate)\n// --------------------------------------------------------------------------\n\nexport class IonRouterOutlet extends NixComponent {\n private routes: RouteDefinition[];\n\n constructor(routes: RouteDefinition[]) {\n super();\n this.routes = routes;\n }\n\n // Crea un ID único interno para mapear la ruta\n private _pathToRouteId(path: string): string {\n if (!path || path === \"/\") return \"nix-route-home\";\n const clean = path\n .replace(/\\/:?[^/]+/g, (m) => \"-\" + m.replace(/\\//g, \"\").replace(/:/g, \"\"))\n .replace(/^\\//, \"\")\n .replace(/\\//g, \"-\");\n return `nix-route-${clean}`;\n }\n\n override render(): NixTemplate {\n const self = this;\n return {\n __isNixTemplate: true as const,\n mount(container: Element | string) {\n const el = typeof container === \"string\" ? document.querySelector(container)! : container;\n const cleanup = this._render(el, null);\n return { unmount: cleanup };\n },\n _render(parent: Node, before: Node | null): () => void {\n \n const routerEl = document.createElement(\"ion-router\");\n routerEl.setAttribute(\"use-hash\", \"false\");\n \n // Creamos los <ion-route> asociados a un Component ID en vez de un Custom Element\n self.routes.filter((r) => r.path !== \"*\").forEach((r) => {\n const routeEl = document.createElement(\"ion-route\");\n routeEl.setAttribute(\"url\", r.path);\n routeEl.setAttribute(\"component\", self._pathToRouteId(r.path));\n routerEl.appendChild(routeEl);\n });\n\n const outletEl = document.createElement(\"ion-router-outlet\");\n\n // 🔥 INVERSIÓN DE CONTROL: Framework Delegate 🔥\n (outletEl as any).delegate = {\n // Ionic llama a attachViewToDom cuando debe instanciar una vista nueva o usar caché\n attachViewToDom: async (container: HTMLElement, componentTag: string, props: any, classes: string[]) => {\n \n const routeDef = self.routes.find(r => self._pathToRouteId(r.path) === componentTag);\n \n // Requisito de Ionic: la vista debe ser un elemento con clase .ion-page\n const pageEl = document.createElement(\"div\");\n pageEl.classList.add(\"ion-page\");\n if (classes && classes.length) pageEl.classList.add(...classes);\n\n // 1. Escuchar los eventos DOM nativos que dispara el outlet\n const lc = createPageLifecycle();\n pageEl.addEventListener(\"ionViewWillEnter\", () => lc.willEnter.update((n) => n + 1));\n pageEl.addEventListener(\"ionViewDidEnter\", () => lc.didEnter.update((n) => n + 1));\n pageEl.addEventListener(\"ionViewWillLeave\", () => lc.willLeave.update((n) => n + 1));\n pageEl.addEventListener(\"ionViewDidLeave\", () => lc.didLeave.update((n) => n + 1));\n\n if (routeDef) {\n // 2. Props entregadas DIRECTAMENTE por Ionic (contiene los Params de la ruta)\n const params = props || {};\n \n // 3. Renderizado agnóstico mediante Nix.js\n const pageNode = routeDef.component({ lc, params });\n\n if (\"render\" in pageNode && typeof (pageNode as NixComponent).render === \"function\") {\n const comp = pageNode as NixComponent;\n comp.onInit?.();\n const renderCleanup = comp.render()._render(pageEl, null);\n const mountRet = comp.onMount?.();\n\n // Registrar en el nodo DOM cómo debe Nix limpiar esta vista\n (pageEl as any)._nixCleanup = () => {\n comp.onUnmount?.();\n if (typeof mountRet === \"function\") mountRet();\n renderCleanup();\n };\n } else {\n const renderCleanup = (pageNode as NixTemplate)._render(pageEl, null);\n (pageEl as any)._nixCleanup = renderCleanup;\n }\n }\n\n container.appendChild(pageEl);\n return pageEl;\n },\n // Ionic llama a removeViewFromDom cuando el usuario navega hacia atrás y se destruye el caché\n removeViewFromDom: async (_container: HTMLElement, component: HTMLElement) => {\n if ((component as any)._nixCleanup) {\n (component as any)._nixCleanup(); // 🧹 Destrucción Segura de Effects (Memory Leaks evitados)\n }\n component.remove();\n }\n };\n\n parent.insertBefore(routerEl, before);\n parent.insertBefore(outletEl, before);\n\n return () => {\n routerEl.remove();\n outletEl.remove();\n };\n },\n };\n }\n}"],"x_google_ignoreList":[1,2],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAgB,KAAqC;AACnD,QAAO;EACL,WAAW,EAAO,EAAE;EACpB,UAAW,EAAO,EAAE;EACpB,WAAW,EAAO,EAAE;EACpB,UAAW,EAAO,EAAE;EACrB;;AAeH,IAAsB,KAAtB,cAAsC,EAAa;CACjD;CAEA,YAAY,GAAmB;AAE7B,EADA,OAAO,EACP,KAAK,OAAO;;CAGd,SAAwB;EACtB,IAAM,IAAK,KAAK;AAMhB,EAHI,KAAK,oBAAkB,EAAM,EAAG,WAAW,KAAK,iBAAiB,KAAK,KAAK,CAAC,EAC5E,KAAK,mBAAkB,EAAM,EAAG,UAAW,KAAK,gBAAgB,KAAK,KAAK,CAAC,EAC3E,KAAK,oBAAkB,EAAM,EAAG,WAAW,KAAK,iBAAiB,KAAK,KAAK,CAAC,EAC5E,KAAK,mBAAkB,EAAM,EAAG,UAAW,KAAK,gBAAgB,KAAK,KAAK,CAAC;;;AAmBnF,SAAgB,GAAoB,GAAmB,GAAsB;AAC3E,GAAM,EAAG,WAAW,EAAG;;AAGzB,SAAgB,GAAmB,GAAmB,GAAsB;AAC1E,GAAM,EAAG,UAAU,EAAG;;AAGxB,SAAgB,GAAoB,GAAmB,GAAsB;AAC3E,GAAM,EAAG,WAAW,EAAG;;AAGzB,SAAgB,GAAmB,GAAmB,GAAsB;AAC1E,GAAM,EAAG,UAAU,EAAG;;;;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 @@
|
|
|
1
|
-
|
|
1
|
+
import "@ionic/core/css/core.css";
|
|
2
|
+
import "@ionic/core/css/normalize.css";
|
|
3
|
+
import "@ionic/core/css/structure.css";
|
|
4
|
+
import "@ionic/core/css/typography.css";
|
|
5
|
+
import "@ionic/core/css/padding.css";
|
|
6
|
+
import "@ionic/core/css/flex-utils.css";
|
|
7
|
+
import "@ionic/core/css/display.css";
|
|
8
|
+
export declare function setupNixIonic(): void;
|