import{g as t,C as o,s as e,a as n}from"./p-9babd345.js";
/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */class i{constructor(){this.m=new Map}reset(t){this.m=new Map(Object.entries(t))}get(t,o){const e=this.m.get(t);return void 0!==e?e:o}getBoolean(t,o=!1){const e=this.m.get(t);return void 0===e?o:"string"==typeof e?"true"===e:!!e}getNumber(t,o){const e=parseFloat(this.m.get(t));return isNaN(e)?void 0!==o?o:NaN:e}set(t,o){this.m.set(t,o)}}const r=new i,s=(t,o)=>{return"string"==typeof t&&(o=t,t=void 0),(e=t,c(e)).includes(o);var e},c=(t=window)=>{if(void 0===t)return[];t.Ionic=t.Ionic||{};let o=t.Ionic.platforms;return null==o&&(o=t.Ionic.platforms=a(t),o.forEach((o=>t.document.documentElement.classList.add(`plt-${o}`)))),o},a=t=>{const o=r.get("platform");return Object.keys(w).filter((e=>{const n=o&&o[e];return"function"==typeof n?n(t):w[e](t)}))},d=t=>!!b(t,/iPad/i)||!(!b(t,/Macintosh/i)||!u(t)),p=t=>b(t,/android|sink/i),u=t=>f(t,"(any-pointer:coarse)"),l=t=>m(t)||h(t),m=t=>!!(t.cordova||t.phonegap||t.PhoneGap),h=t=>{const o=t.Capacitor;return!(!o||!o.isNative)},b=(t,o)=>o.test(t.navigator.userAgent),f=(t,o)=>t.matchMedia&&t.matchMedia(o).matches,w={ipad:d,iphone:t=>b(t,/iPhone/i),ios:t=>b(t,/iPhone|iPod/i)||d(t),android:p,phablet:t=>{const o=t.innerWidth,e=t.innerHeight,n=Math.min(o,e),i=Math.max(o,e);return n>390&&n<520&&i>620&&i<800},tablet:t=>{const o=t.innerWidth,e=t.innerHeight,n=Math.min(o,e),i=Math.max(o,e);return d(t)||(t=>p(t)&&!b(t,/mobile/i))(t)||n>460&&n<820&&i>780&&i<1400},cordova:m,capacitor:h,electron:t=>b(t,/electron/i),pwa:t=>!!(t.matchMedia&&t.matchMedia("(display-mode: standalone)").matches||t.navigator.standalone),mobile:u,mobileweb:t=>u(t)&&!l(t),desktop:t=>!u(t),hybrid:l};let g;const O=o=>o&&t(o)||g,v=(t={})=>{if("undefined"==typeof window)return;const i=window.document,a=window;o.config=r;const d=a.Ionic=a.Ionic||{},p={};t._ael&&(p.ael=t._ael),t._rel&&(p.rel=t._rel),t._ce&&(p.ce=t._ce),e(p);const u=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(t=>{try{const o=t.sessionStorage.getItem("ionic-persist-config");return null!==o?JSON.parse(o):{}}catch(t){return{}}})(a)),{persistConfig:!1}),d.config),(t=>{const o={};return t.location.search.slice(1).split("&").map((t=>t.split("="))).map((([t,o])=>[decodeURIComponent(t),decodeURIComponent(o)])).filter((([t])=>{return t.substr(0,(o="ionic:").length)===o;var o})).map((([t,o])=>[t.slice("ionic:".length),o])).forEach((([t,e])=>{o[t]=e})),o})(a)),t);r.reset(u),r.getBoolean("persistConfig")&&((t,o)=>{try{t.sessionStorage.setItem("ionic-persist-config",JSON.stringify(o))}catch(t){return}})(a,u),c(a),d.config=r,d.mode=g=r.get("mode",i.documentElement.getAttribute("mode")||(s(a,"ios")?"ios":"md")),r.set("mode",g),i.documentElement.setAttribute("mode",g),i.documentElement.classList.add(g),r.getBoolean("_testing")&&r.set("animated",!1);const l=t=>t.tagName&&t.tagName.startsWith("ION-"),m=t=>["ios","md"].includes(t);n((t=>{for(;t;){const o=t.mode||t.getAttribute("mode");if(o){if(m(o))return o;l(t)&&console.warn('Invalid ionic mode: "'+o+'", expected: "ios" or "md"')}t=t.parentElement}return g}))};export{s as a,r as c,O as g,v as i}