{"version":3,"sources":["webpack:///./node_modules/ionicons/dist/esm/legacy/ion-icon.entry.js"],"names":["getSvgContent","url","req","requests","get","fetch","then","rsp","status","text","Promise","resolve","svgContent","div","document","createElement","innerHTML","i","childNodes","length","nodeName","toLowerCase","removeChild","svgElm","firstElementChild","setAttribute","isValid","set","elm","nodeType","attributes","val","value","indexOf","Map","Icon","prototype","connectedCallback","_this","this","waitUntilVisible","el","isVisible","loadIcon","disconnectedCallback","io","disconnect","undefined","rootMargin","cb","io_1","lazy","window","IntersectionObserver","data","isIntersecting","observe","label","ariaLabel","name","icon","mode","ios","md","replace","render","_a","flipRtl","role","class","Object","assign","createColorClasses","color","_b","size","ownerDocument","dir","defineProperty","enumerable","configurable","hostRef","getIonMode","ref","documentElement","getAttribute"],"mappings":"+FAAA,8CA8CoB,SAAhBA,EAA0BC,GAE1B,IAAIC,EAAMC,EAASC,IAAIH,CAAG,EAY1B,OAXKC,IAEDA,EAAMG,MAAMJ,CAAG,EAAEK,KAAK,SAAUC,GAC5B,OAAIA,EAAIC,QAAU,IACPD,EAAIE,KAAK,EAEbC,QAAQC,QAAQ,IAAI,CAC/B,CAAC,EAAEL,KAAK,SAAUM,GArDtB,GAAIA,EAAY,CACZ,IAAIC,EAAMC,SAASC,cAAc,KAAK,EACtCF,EAAIG,UAAYJ,EAEhB,IAAK,IAAIK,EAAIJ,EAAIK,WAAWC,OAAS,EAAQ,GAALF,EAAQA,CAAC,GACI,QAA7CJ,EAAIK,WAAWD,GAAGG,SAASC,YAAY,GACvCR,EAAIS,YAAYT,EAAIK,WAAWD,EAAE,EAIrCM,EAASV,EAAIW,kBACjB,GAAID,GAA4C,QAAlCA,EAAOH,SAASC,YAAY,IACtCE,EAAOE,aAAa,QAAS,YAAY,EAIrCC,EAAQH,CAAM,GACd,OAAOV,EAAIG,SAGvB,CACA,MAAO,EAgCiE,CAAC,EAErEb,EAASwB,IAAI1B,EAAKC,CAAG,GAElBA,CACX,CA7DA,4BA0BIwB,EAAU,SAAU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,EACA2E,WAAY,GACZC,aAAc,EAClB,CAAC,EACDV,OAAOQ,eAAe3C,EAAM,QAAS,CACjC/B,IAAK,WAAc,MAAO,qlCAAulC,EACjnC2E,WAAY,GACZC,aAAc,EAClB,CAAC,EACM7C,GAnGP,SAASA,EAAK8C,GACV,YAAiB1C,KAAM0C,CAAO,EAC9B1C,KAAKsB,KAAOqB,EAAW3C,IAAI,EAC3BA,KAAKG,UAAY,GAKjBH,KAAKY,KAAO,EAChB,CA4FJ,IAAI+B,EAAa,SAAUC,GACvB,OAAO,YAAQA,CAAG,GAAKrE,SAASsE,gBAAgBC,aAAa,MAAM,GAAK,IAC5E,EACIb,EAAqB,SAAUC,GAC/B,IAAIP,EACJ,OAAO,IAAWA,EAAK,CACf,YAAa,EACjB,GACG,aAAeO,GAAS,GAC3BP,GAAM,IACd,C","file":"js/chunk-2d0df486.c5d32d86.js","sourcesContent":["import { r as registerInstance, c as getMode, h, H as Host, d as getElement } from './chunk-58252182.js';\nimport { i as isStr, g as getUrl, b as getName } from './chunk-2a882949.js';\nvar validateContent = function (svgContent) {\n if (svgContent) {\n var div = document.createElement('div');\n div.innerHTML = svgContent;\n // setup this way to ensure it works on our buddy IE\n for (var 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 var svgElm = div.firstElementChild;\n if (svgElm && svgElm.nodeName.toLowerCase() === 'svg') {\n svgElm.setAttribute('class', 's-ion-icon');\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 }\n return '';\n};\nvar isValid = function (elm) {\n if (elm.nodeType === 1) {\n if (elm.nodeName.toLowerCase() === 'script') {\n return false;\n }\n for (var i = 0; i < elm.attributes.length; i++) {\n var val = elm.attributes[i].value;\n if (isStr(val) && val.toLowerCase().indexOf('on') === 0) {\n return false;\n }\n }\n for (var i = 0; i < elm.childNodes.length; i++) {\n if (!isValid(elm.childNodes[i])) {\n return false;\n }\n }\n }\n return true;\n};\nvar requests = new Map();\nvar getSvgContent = function (url) {\n // see if we already have a request for this url\n var req = requests.get(url);\n if (!req) {\n // we don't already have a request\n req = fetch(url).then(function (rsp) {\n if (rsp.status <= 299) {\n return rsp.text();\n }\n return Promise.resolve(null);\n }).then(function (svgContent) { return validateContent(svgContent); });\n // cache for the same requests\n requests.set(url, req);\n }\n return req;\n};\n/**\n * @virtualProp {\"ios\" | \"md\"} mode - The mode determines which platform styles to use.\n */\nvar Icon = /** @class */ (function () {\n function Icon(hostRef) {\n registerInstance(this, hostRef);\n this.mode = getIonMode(this);\n this.isVisible = false;\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 Icon.prototype.connectedCallback = function () {\n var _this = this;\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', function () {\n _this.isVisible = true;\n _this.loadIcon();\n });\n };\n Icon.prototype.disconnectedCallback = function () {\n if (this.io) {\n this.io.disconnect();\n this.io = undefined;\n }\n };\n Icon.prototype.waitUntilVisible = function (el, rootMargin, cb) {\n var _this = this;\n if (this.lazy && typeof window !== 'undefined' && window.IntersectionObserver) {\n var io_1 = this.io = new window.IntersectionObserver(function (data) {\n if (data[0].isIntersecting) {\n io_1.disconnect();\n _this.io = undefined;\n cb();\n }\n }, { rootMargin: rootMargin });\n io_1.observe(el);\n }\n else {\n // browser doesn't support IntersectionObserver\n // so just fallback to always show it\n cb();\n }\n };\n Icon.prototype.loadIcon = function () {\n var _this = this;\n if (this.isVisible) {\n var url = getUrl(this);\n if (url) {\n getSvgContent(url)\n .then(function (svgContent) { return _this.svgContent = svgContent; });\n }\n }\n if (!this.ariaLabel) {\n var 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\n .replace('ios-', '')\n .replace('md-', '')\n .replace(/\\-/g, ' ');\n }\n }\n };\n Icon.prototype.render = function () {\n var _a, _b;\n var mode = this.mode || 'md';\n var flipRtl = this.flipRtl || (this.ariaLabel && this.ariaLabel.indexOf('arrow') > -1 && this.flipRtl !== false);\n return (h(Host, { role: \"img\", class: Object.assign((_a = {}, _a[mode] = true, _a), createColorClasses(this.color), (_b = {}, _b[\"icon-\" + this.size] = !!this.size, _b['flip-rtl'] = !!flipRtl && this.el.ownerDocument.dir === 'rtl', _b)) }, ((this.svgContent)\n ? h(\"div\", { class: \"icon-inner\", innerHTML: this.svgContent })\n : h(\"div\", { class: \"icon-inner\" }))));\n };\n Object.defineProperty(Icon, \"assetsDirs\", {\n get: function () { return [\"svg\"]; },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Icon.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Icon, \"watchers\", {\n get: function () {\n return {\n \"name\": [\"loadIcon\"],\n \"src\": [\"loadIcon\"],\n \"icon\": [\"loadIcon\"]\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Icon, \"style\", {\n get: function () { return \":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;-webkit-box-sizing:content-box!important;box-sizing:content-box!important}.icon-inner,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 enumerable: true,\n configurable: true\n });\n return Icon;\n}());\nvar getIonMode = function (ref) {\n return getMode(ref) || document.documentElement.getAttribute('mode') || 'md';\n};\nvar createColorClasses = function (color) {\n var _a;\n return (color) ? (_a = {\n 'ion-color': true\n },\n _a[\"ion-color-\" + color] = true,\n _a) : null;\n};\nexport { Icon as ion_icon };\n"],"sourceRoot":""}