{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-button_2-md.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAkJ;AACpH;AAC4B;AACsC;;AAEhG;AACA;AACA,QAAQ,2DAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,4DAAO;AACvB;AACA,qBAAqB,8DAAY;AACjC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,2DAAW;AACnC,uBAAuB,2DAAW;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,2DAAY;AACjC,eAAe,iGAAiG;AAChH;AACA;AACA;AACA,eAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2DAAC,CAAC,mDAAI,GAAG,4GAA4G,EAAE,4DAAoB,WAAW,uCAAuC,WAAW,GAAG,OAAO,8BAA8B,WAAW,GAAG,UAAU,iCAAiC,WAAW,GAAG,MAAM,6BAA6B,WAAW,GAAG,KAAK,cAAc,WAAW,iCAAiC,4DAAW,8CAA8C,4DAAW,mJAAmJ,GAAG,EAAE,2DAAC,0BAA0B,UAAU,yGAAyG,GAAG,2DAAC,UAAU,8CAA8C,EAAE,2DAAC,UAAU,oBAAoB,GAAG,2DAAC,UAAU,gBAAgB,GAAG,2DAAC,gBAAgB,2DAAC,UAAU,cAAc,qBAAqB,2DAAC,uBAAuB,wBAAwB;AAC9gC;AACA,cAAc,QAAQ,2DAAU,OAAO;AACvC,wBAAwB,eAAe,kBAAkB,4BAA4B,uBAAuB,uBAAuB,uBAA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AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,2DAAY,QAAQ,SAAS;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,+CAA+C,QAAQ;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA,uBAAuB,2BAA2B;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,2DAAgB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,GAAG,aAAa;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2DAAC,CAAC,mDAAI,GAAG,kDAAkD,eAAe,oCAAoC,UAAU,UAAU,+EAA+E,GAAG;AACpO,cAAc,2DAAC,SAAS,kDAAkD;AAC1E,cAAc,2DAAC,SAAS,sBAAsB;AAC9C;AACA,6BAA6B,gBAAgB;AAC7C,cAAc,QAAQ,2DAAU,OAAO;AACvC,2BAA2B;AAC3B;AACA;AACA;AACA,MAAM;AACN,wBAAwB,eAAe,qBAAqB,UAAU,WAAW,eAAe,kBAAkB,yCAAyC,iCAAiC,eAAe,oBAAoB,mBAAmB,UAAU,sBAAsB,kBAAkB,8CAA8C,yBAAyB,cAAc,YAAY,WAAW,6BAA6B,6BAA6B,qBAAqB,mBAAmB,yBAAyB,mBAAmB,yBAAyB,kBAAkB,sCAAsC,0BAA0B,kDAAkD,4BAA4B,oDAAoD,2BAA2B,mDAAmD,0BAA0B,kDAAkD,0BAA0B,kDAAkD,yBAAyB,iDAAiD,wBAAwB,gDAAgD,yBAAyB,iDAAiD,uBAAuB,+CAA+C,EAAE;AACrxC;AACA;AACA;AACA;AACA;AACA,sBAAsB,MAAM;AAC5B,KAAK;AACL;;AAEkD","file":"13-es2015.js","sourcesContent":["import { r as registerInstance, d as createEvent, c as getIonMode$1, h, H as Host, e as getElement, i as getAssetPath } from './core-0a8d4d2e.js';\nimport './config-3c7f3790.js';\nimport { h as hasShadowDom } from './helpers-46f4a262.js';\nimport { o as openURL, c as createColorClasses$1, h as hostContext } from './theme-18cbe2cc.js';\n\nconst Button = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.inItem = false;\n this.inListHeader = false;\n this.inToolbar = false;\n /**\n * The type of button.\n */\n this.buttonType = 'button';\n /**\n * If `true`, the user cannot interact with the button.\n */\n this.disabled = false;\n /**\n * When using a router, it specifies the transition direction when navigating to\n * another page using `href`.\n */\n this.routerDirection = 'forward';\n /**\n * If `true`, activates a button with a heavier font weight.\n */\n this.strong = false;\n /**\n * The type of the button.\n */\n this.type = 'button';\n this.handleClick = (ev) => {\n if (this.type === 'button') {\n openURL(this.href, ev, this.routerDirection);\n }\n else if (hasShadowDom(this.el)) {\n // this button wants to specifically submit a form\n // climb up the dom to see if we're in a
\n // and if so, then use JS to submit it\n const form = this.el.closest('form');\n if (form) {\n ev.preventDefault();\n const fakeButton = document.createElement('button');\n fakeButton.type = this.type;\n fakeButton.style.display = 'none';\n form.appendChild(fakeButton);\n fakeButton.click();\n fakeButton.remove();\n }\n }\n };\n this.onFocus = () => {\n this.ionFocus.emit();\n };\n this.onBlur = () => {\n this.ionBlur.emit();\n };\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n }\n componentWillLoad() {\n this.inToolbar = !!this.el.closest('ion-buttons');\n this.inListHeader = !!this.el.closest('ion-list-header');\n this.inItem = !!this.el.closest('ion-item') || !!this.el.closest('ion-item-divider');\n }\n get hasIconOnly() {\n return !!this.el.querySelector('ion-icon[slot=\"icon-only\"]');\n }\n get rippleType() {\n const hasClearFill = this.fill === undefined || this.fill === 'clear';\n // If the button is in a toolbar, has a clear fill (which is the default)\n // and only has an icon we use the unbounded \"circular\" ripple effect\n if (hasClearFill && this.hasIconOnly && this.inToolbar) {\n return 'unbounded';\n }\n return 'bounded';\n }\n render() {\n const mode = getIonMode$1(this);\n const { buttonType, type, disabled, rel, target, size, href, color, expand, hasIconOnly, shape, strong } = this;\n const finalSize = size === undefined && this.inItem ? 'small' : size;\n const TagType = href === undefined ? 'button' : 'a';\n const attrs = (TagType === 'button')\n ? { type }\n : {\n download: this.download,\n href,\n rel,\n target\n };\n let fill = this.fill;\n if (fill === undefined) {\n fill = this.inToolbar || this.inListHeader ? 'clear' : 'solid';\n }\n return (h(Host, { onClick: this.handleClick, \"aria-disabled\": disabled ? 'true' : null, class: Object.assign(Object.assign({}, createColorClasses$1(color)), { [mode]: true, [buttonType]: true, [`${buttonType}-${expand}`]: expand !== undefined, [`${buttonType}-${finalSize}`]: finalSize !== undefined, [`${buttonType}-${shape}`]: shape !== undefined, [`${buttonType}-${fill}`]: true, [`${buttonType}-strong`]: strong, 'in-toolbar': hostContext('ion-toolbar', this.el), 'in-toolbar-color': hostContext('ion-toolbar[color]', this.el), 'button-has-icon-only': hasIconOnly, 'button-disabled': disabled, 'ion-activatable': true, 'ion-focusable': true }) }, h(TagType, Object.assign({}, attrs, { class: \"button-native\", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur, part: \"button\" }), h(\"span\", { class: \"button-inner\", part: \"button-inner\" }, h(\"slot\", { name: \"icon-only\" }), h(\"slot\", { name: \"start\" }), h(\"slot\", null), h(\"slot\", { name: \"end\" })), mode === 'md' && h(\"ion-ripple-effect\", { type: this.rippleType }))));\n }\n get el() { return getElement(this); }\n static get style() { return \":host{--overflow:hidden;--ripple-color:currentColor;--border-width:initial;--border-color:initial;--border-style:initial;--color-activated:var(--color);--color-focused:var(--color);--color-hover:var(--color);--box-shadow:none;display:inline-block;width:auto;color:var(--color);font-family:var(--ion-font-family,inherit);text-align:center;text-decoration:none;text-overflow:ellipsis;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;vertical-align:top;vertical-align:-webkit-baseline-middle;pointer-events:auto;-webkit-font-kerning:none;font-kerning:none}:host(.button-disabled){cursor:default;opacity:.5;pointer-events:none}:host(.button-solid){--background:var(--ion-color-primary,#3880ff);--color:var(--ion-color-primary-contrast,#fff)}:host(.button-outline){--border-color:var(--ion-color-primary,#3880ff)}:host(.button-clear),:host(.button-outline){--background:transparent;--color:var(--ion-color-primary,#3880ff)}:host(.button-clear){--border-width:0}:host(.button-block){display:block}:host(.button-block) .button-native{margin-left:0;margin-right:0;display:block;width:100%;clear:both;contain:content}:host(.button-block) .button-native:after{clear:both}:host(.button-full){display:block}:host(.button-full) .button-native{margin-left:0;margin-right:0;display:block;width:100%;contain:content}:host(.button-full:not(.button-round)) .button-native{border-radius:0;border-right-width:0;border-left-width:0}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;-webkit-transition:var(--transition);transition:var(--transition);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);outline:none;background:var(--background);line-height:1;-webkit-box-shadow:var(--box-shadow);box-shadow:var(--box-shadow);contain:layout style;cursor:pointer;opacity:var(--opacity);overflow:var(--overflow);z-index:0;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.button-native{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.button-native::-moz-focus-inner{border:0}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}::slotted(ion-icon){font-size:1.4em;pointer-events:none}::slotted(ion-icon[slot=start]){margin-left:-.3em;margin-right:.3em;margin-top:0;margin-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted(ion-icon[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:-.3em;margin-inline-start:-.3em;-webkit-margin-end:.3em;margin-inline-end:.3em}}::slotted(ion-icon[slot=end]){margin-left:.3em;margin-right:-.2em;margin-top:0;margin-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted(ion-icon[slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:.3em;margin-inline-start:.3em;-webkit-margin-end:-.2em;margin-inline-end:-.2em}}::slotted(ion-icon[slot=icon-only]){font-size:1.8em}ion-ripple-effect{color:var(--ripple-color)}.button-native:after{left:0;right:0;top:0;bottom:0;position:absolute;content:\\\"\\\";opacity:0}:host(.ion-activated){color:var(--color-activated)}:host(.ion-activated) .button-native:after{background:var(--background-activated);opacity:var(--background-activated-opacity)}:host(.ion-focused){color:var(--color-focused)}:host(.ion-focused) .button-native:after{background:var(--background-focused);opacity:var(--background-focused-opacity)}\\@media (any-hover:hover){:host(:hover){color:var(--color-hover)}:host(:hover) .button-native:after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.button-solid.ion-color) .button-native{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.button-outline.ion-color) .button-native{border-color:var(--ion-color-base)}:host(.button-clear.ion-color) .button-native,:host(.button-outline.ion-color) .button-native{background:transparent;color:var(--ion-color-base)}:host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{color:var(--ion-toolbar-color,var(--color))}:host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{border-color:var(--ion-toolbar-color,var(--color,var(--border-color)))}:host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native{background:var(--ion-toolbar-color,var(--background));color:var(--ion-toolbar-background,var(--color))}:host{--border-radius:4px;--padding-top:0;--padding-bottom:0;--padding-start:1.1em;--padding-end:1.1em;--transition:box-shadow 280ms cubic-bezier(.4,0,.2,1),background-color 15ms linear,color 15ms linear;margin-left:2px;margin-right:2px;margin-top:4px;margin-bottom:4px;height:36px;font-size:14px;font-weight:500;letter-spacing:.06em;text-transform:uppercase}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host{margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px}}:host(.button-solid){--background-activated:transparent;--background-hover:var(--ion-color-primary-contrast,#fff);--background-focused:var(--ion-color-primary-contrast,#fff);--background-activated-opacity:0;--background-focused-opacity:.24;--background-hover-opacity:.08;--box-shadow:0 3px 1px -2px rgba(0,0,0,0.2),0 2px 2px 0 rgba(0,0,0,0.14),0 1px 5px 0 rgba(0,0,0,0.12)}:host(.button-solid.ion-activated){--box-shadow:0 5px 5px -3px rgba(0,0,0,0.2),0 8px 10px 1px rgba(0,0,0,0.14),0 3px 14px 2px rgba(0,0,0,0.12)}:host(.button-outline){--border-width:2px;--border-style:solid;--box-shadow:none;--background-activated:transparent;--background-focused:var(--ion-color-primary,#3880ff);--background-hover:var(--ion-color-primary,#3880ff);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-outline.ion-activated.ion-color) .button-native{background:transparent}:host(.button-clear){--background-activated:transparent;--background-focused:var(--ion-color-primary,#3880ff);--background-hover:var(--ion-color-primary,#3880ff);--background-activated-opacity:0;--background-focused-opacity:.12;--background-hover-opacity:.04}:host(.button-round){--border-radius:64px;--padding-top:0;--padding-start:26px;--padding-end:26px;--padding-bottom:0}:host(.button-large){--padding-top:0;--padding-start:1em;--padding-end:1em;--padding-bottom:0;height:2.8em;font-size:20px}:host(.button-small){--padding-top:0;--padding-start:0.9em;--padding-end:0.9em;--padding-bottom:0;height:2.1em;font-size:13px}:host(.button-strong){font-weight:700}::slotted(ion-icon[slot=icon-only]){padding-left:0;padding-right:0;padding-top:0;padding-bottom:0}:host(.button-solid.ion-color.ion-focused) .button-native:after{background:var(--ion-color-contrast);opacity:.24}:host(.button-clear.ion-color.ion-focused) .button-native:after,:host(.button-outline.ion-color.ion-focused) .button-native:after{background:var(--ion-color-base);opacity:.12}\\@media (any-hover:hover){:host(.button-solid.ion-color:hover) .button-native:after{background:var(--ion-color-contrast);opacity:.08}:host(.button-clear.ion-color:hover) .button-native:after,:host(.button-outline.ion-color:hover) .button-native:after{background:var(--ion-color-base);opacity:.04}}\"; }\n};\n\nlet CACHED_MAP;\r\nconst getIconMap = () => {\r\n if (typeof window === 'undefined') {\r\n return new Map();\r\n }\r\n else {\r\n if (!CACHED_MAP) {\r\n const win = window;\r\n win.Ionicons = win.Ionicons || {};\r\n CACHED_MAP = win.Ionicons.map = win.Ionicons.map || new Map();\r\n }\r\n return CACHED_MAP;\r\n }\r\n};\r\nconst getUrl = (i) => {\r\n let url = getSrc(i.src);\r\n if (url) {\r\n return url;\r\n }\r\n url = getName(i.name, i.icon, i.mode, i.ios, i.md);\r\n if (url) {\r\n return getNamedUrl(url);\r\n }\r\n if (i.icon) {\r\n url = getSrc(i.icon);\r\n if (url) {\r\n return url;\r\n }\r\n url = getSrc(i.icon[i.mode]);\r\n if (url) {\r\n return url;\r\n }\r\n }\r\n return null;\r\n};\r\nconst getNamedUrl = (iconName) => {\r\n const url = getIconMap().get(iconName);\r\n if (url) {\r\n return url;\r\n }\r\n return getAssetPath(`svg/${iconName}.svg`);\r\n};\r\nconst getName = (iconName, icon, mode, ios, md) => {\r\n // default to \"md\" if somehow the mode wasn't set\r\n mode = (mode && toLower(mode)) === 'ios' ? 'ios' : 'md';\r\n // if an icon was passed in using the ios or md attributes\r\n // set the iconName to whatever was passed in\r\n if (ios && mode === 'ios') {\r\n iconName = toLower(ios);\r\n }\r\n else if (md && mode === 'md') {\r\n iconName = toLower(md);\r\n }\r\n else {\r\n if (!iconName && icon && !isSrc(icon)) {\r\n iconName = icon;\r\n }\r\n if (isStr(iconName)) {\r\n iconName = toLower(iconName);\r\n }\r\n }\r\n if (!isStr(iconName) || iconName.trim() === '') {\r\n return null;\r\n }\r\n // only allow alpha characters and dash\r\n const invalidChars = iconName.replace(/[a-z]|-|\\d/gi, '');\r\n if (invalidChars !== '') {\r\n return null;\r\n }\r\n return iconName;\r\n};\r\nconst getSrc = (src) => {\r\n if (isStr(src)) {\r\n src = src.trim();\r\n if (isSrc(src)) {\r\n return src;\r\n }\r\n }\r\n return null;\r\n};\r\nconst isSrc = (str) => str.length > 0 && /(\\/|\\.)/.test(str);\r\nconst isStr = (val) => typeof val === 'string';\r\nconst toLower = (val) => val.toLowerCase();\n\nconst validateContent = (svgContent) => {\r\n if (svgContent && typeof document !== 'undefined') {\r\n const div = document.createElement('div');\r\n div.innerHTML = svgContent;\r\n // setup this way to ensure it works on our buddy IE\r\n for (let i = div.childNodes.length - 1; i >= 0; i--) {\r\n if (div.childNodes[i].nodeName.toLowerCase() !== 'svg') {\r\n div.removeChild(div.childNodes[i]);\r\n }\r\n }\r\n // must only have 1 root element\r\n const svgElm = div.firstElementChild;\r\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\r\n const svgClass = svgElm.getAttribute('class') || '';\r\n svgElm.setAttribute('class', (svgClass + ' s-ion-icon').trim());\r\n // root element must be an svg\r\n // lets double check we've got valid elements\r\n // do not allow scripts\r\n if (isValid(svgElm)) {\r\n return div.innerHTML;\r\n }\r\n }\r\n }\r\n return '';\r\n};\r\nconst isValid = (elm) => {\r\n if (elm.nodeType === 1) {\r\n if (elm.nodeName.toLowerCase() === 'script') {\r\n return false;\r\n }\r\n for (let i = 0; i < elm.attributes.length; i++) {\r\n const val = elm.attributes[i].value;\r\n if (isStr(val) && val.toLowerCase().indexOf('on') === 0) {\r\n return false;\r\n }\r\n }\r\n for (let i = 0; i < elm.childNodes.length; i++) {\r\n if (!isValid(elm.childNodes[i])) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n};\n\nconst ioniconContent = new Map();\r\nconst requests = new Map();\r\nconst getSvgContent = (url) => {\r\n // see if we already have a request for this url\r\n let req = requests.get(url);\r\n if (!req) {\r\n if (typeof fetch !== 'undefined') {\r\n // we don't already have a request\r\n req = fetch(url).then(rsp => {\r\n if (rsp.ok) {\r\n return rsp.text().then(svgContent => {\r\n ioniconContent.set(url, validateContent(svgContent));\r\n });\r\n }\r\n ioniconContent.set(url, '');\r\n });\r\n // cache for the same requests\r\n requests.set(url, req);\r\n }\r\n else {\r\n // set to empty for ssr scenarios and resolve promise\r\n ioniconContent.set(url, '');\r\n return Promise.resolve();\r\n }\r\n }\r\n return req;\r\n};\n\nconst Icon = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\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 connectedCallback() {\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 this.waitUntilVisible(this.el, '50px', () => {\n this.isVisible = true;\n this.loadIcon();\n });\n }\n disconnectedCallback() {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n }\n waitUntilVisible(el, rootMargin, cb) {\n if ( this.lazy && typeof window !== 'undefined' && window.IntersectionObserver) {\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 else {\n // browser doesn't support IntersectionObserver\n // so just fallback to always show it\n cb();\n }\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).then(() => this.svgContent = ioniconContent.get(url));\n }\n }\n }\n if (!this.ariaLabel) {\n const label = getName(this.name, this.icon, this.mode, this.ios, this.md);\n // user did not provide a label\n // come up with the label based on the icon name\n if (label) {\n this.ariaLabel = label.replace(/\\-/g, ' ');\n }\n }\n }\n render() {\n const mode = this.mode || 'md';\n const flipRtl = this.flipRtl || (this.ariaLabel && (this.ariaLabel.indexOf('arrow') > -1 || this.ariaLabel.indexOf('chevron') > -1) && this.flipRtl !== false);\n return (h(Host, { role: \"img\", class: Object.assign(Object.assign({ [mode]: true }, createColorClasses(this.color)), { [`icon-${this.size}`]: !!this.size, 'flip-rtl': !!flipRtl && this.el.ownerDocument.dir === 'rtl' }) }, (( this.svgContent)\n ? h(\"div\", { class: \"icon-inner\", innerHTML: this.svgContent })\n : h(\"div\", { class: \"icon-inner\" }))));\n }\n static get assetsDirs() { return [\"svg\"]; }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"name\": [\"loadIcon\"],\n \"src\": [\"loadIcon\"],\n \"icon\": [\"loadIcon\"]\n }; }\n static get style() { return \":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;-webkit-box-sizing:content-box!important;box-sizing:content-box!important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:32px;stroke-width:var(--ionicon-stroke-width,32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}:host(.flip-rtl) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}:host(.icon-small){font-size:18px!important}:host(.icon-large){font-size:32px!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 getIonMode = () => ( typeof document !== 'undefined' && document.documentElement.getAttribute('mode')) || 'md';\nconst createColorClasses = (color) => {\n return (color) ? {\n 'ion-color': true,\n [`ion-color-${color}`]: true\n } : null;\n};\n\nexport { Button as ion_button, Icon as ion_icon };\n"],"sourceRoot":"webpack:///"}