/*!
 * (C) Ionic http://ionicframework.com - MIT License
 */
var getPlatforms=function(t){return setupPlatforms(t)};var isPlatform=function(t,n){if(typeof t==="string"){n=t;t=undefined}return getPlatforms(t).includes(n)};var setupPlatforms=function(t){if(t===void 0){t=window}if(typeof t==="undefined"){return[]}t.Ionic=t.Ionic||{};var n=t.Ionic.platforms;if(n==null){n=t.Ionic.platforms=detectPlatforms(t);n.forEach((function(n){return t.document.documentElement.classList.add("plt-".concat(n))}))}return n};var detectPlatforms=function(t){return Object.keys(PLATFORMS_MAP).filter((function(n){return PLATFORMS_MAP[n](t)}))};var isMobileWeb=function(t){return isMobile(t)&&!isHybrid(t)};var isIpad=function(t){if(testUserAgent(t,/iPad/i)){return true}if(testUserAgent(t,/Macintosh/i)&&isMobile(t)){return true}return false};var isIphone=function(t){return testUserAgent(t,/iPhone/i)};var isIOS=function(t){return testUserAgent(t,/iPhone|iPod/i)||isIpad(t)};var isAndroid=function(t){return testUserAgent(t,/android|sink/i)};var isAndroidTablet=function(t){return isAndroid(t)&&!testUserAgent(t,/mobile/i)};var isPhablet=function(t){var n=t.innerWidth;var r=t.innerHeight;var e=Math.min(n,r);var i=Math.max(n,r);return e>390&&e<520&&(i>620&&i<800)};var isTablet=function(t){var n=t.innerWidth;var r=t.innerHeight;var e=Math.min(n,r);var i=Math.max(n,r);return isIpad(t)||isAndroidTablet(t)||e>460&&e<820&&(i>780&&i<1400)};var isMobile=function(t){return matchMedia(t,"(any-pointer:coarse)")};var isDesktop=function(t){return!isMobile(t)};var isHybrid=function(t){return isCordova(t)||isCapacitorNative(t)};var isCordova=function(t){return!!(t["cordova"]||t["phonegap"]||t["PhoneGap"])};var isCapacitorNative=function(t){var n=t["Capacitor"];return!!(n&&n.isNative)};var isElectron=function(t){return testUserAgent(t,/electron/i)};var isPWA=function(t){return!!(t.matchMedia("(display-mode: standalone)").matches||t.navigator.standalone)};var testUserAgent=function(t,n){return n.test(t.navigator.userAgent)};var matchMedia=function(t,n){return t.matchMedia(n).matches};var PLATFORMS_MAP={ipad:isIpad,iphone:isIphone,ios:isIOS,android:isAndroid,phablet:isPhablet,tablet:isTablet,cordova:isCordova,capacitor:isCapacitorNative,electron:isElectron,pwa:isPWA,mobile:isMobile,mobileweb:isMobileWeb,desktop:isDesktop,hybrid:isHybrid};var Config=function(){function t(){this.m=new Map}t.prototype.reset=function(t){this.m=new Map(Object.entries(t))};t.prototype.get=function(t,n){var r=this.m.get(t);return r!==undefined?r:n};t.prototype.getBoolean=function(t,n){if(n===void 0){n=false}var r=this.m.get(t);if(r===undefined){return n}if(typeof r==="string"){return r==="true"}return!!r};t.prototype.getNumber=function(t,n){var r=parseFloat(this.m.get(t));return isNaN(r)?n!==undefined?n:NaN:r};t.prototype.set=function(t,n){this.m.set(t,n)};return t}();var config=new Config;var configFromSession=function(t){try{var n=t.sessionStorage.getItem(IONIC_SESSION_KEY);return n!==null?JSON.parse(n):{}}catch(r){return{}}};var saveConfig=function(t,n){try{t.sessionStorage.setItem(IONIC_SESSION_KEY,JSON.stringify(n))}catch(r){return}};var configFromURL=function(t){var n={};t.location.search.slice(1).split("&").map((function(t){return t.split("=")})).map((function(t){var n=t[0],r=t[1];return[decodeURIComponent(n),decodeURIComponent(r)]})).filter((function(t){var n=t[0];return startsWith(n,IONIC_PREFIX)})).map((function(t){var n=t[0],r=t[1];return[n.slice(IONIC_PREFIX.length),r]})).forEach((function(t){var r=t[0],e=t[1];n[r]=e}));return n};var startsWith=function(t,n){return t.substr(0,n.length)===n};var IONIC_PREFIX="ionic:";var IONIC_SESSION_KEY="ionic-persist-config";export{configFromURL as a,config as b,configFromSession as c,saveConfig as d,getPlatforms as g,isPlatform as i,setupPlatforms as s};