{"version":3,"sources":["../node_modules/@esri/calcite-components/dist/components/calcite-icon.js","../node_modules/@esri/calcite-components/dist/components/observers.js","../node_modules/@esri/calcite-components/dist/components/icon.js"],"names":["CalciteIcon","Icon","defineCustomElement","defineCustomElement$1","createObserver","type","callback","options","Build","isBrowser","Observer","ExtendedMutationObserver","observedEntry","target","this","push","newObservedEntries","filter","observed","disconnect","forEach","observe","window","MutationObserver","IntersectionObserver","ResizeObserver","getObserver","CSS","iconCache","requestCache","scaleToPx","s","m","l","fetchIcon","a","icon","scale","size","name","normalizeIconName","filled","charAt","length","iconName","substring","id","fetch","getAssetPath","then","resp","json","catch","console","error","path","numberLeadingName","isNaN","Number","parts","split","map","part","index","toUpperCase","slice","join","proxyCustomElement","__registerHost","__attachShadow","flipRtl","visible","waitUntilVisible","loadIconPathData","_a","intersectionObserver","el","pathData","textLabel","dir","getElementDir","semantic","paths","concat","h","Host","toAriaBoolean","role","class","fill","height","viewBox","width","xmlns","d","opacity","entries","entry","isIntersecting","rootMargin","HTMLElement","customElements","tagName","get","define"],"mappings":";gHAAA,oHAOMA,EAAcC,IACdC,EAAsBC,K,4HCM5B,SAASC,EAAeC,EAAMC,EAAUC,GACtC,GAAKC,IAAMC,UAAX,CAGA,IAAMC,EAGR,SAAqBL,GACnB,IACMM,EAAwB,kDAC5B,WAAYL,GAAU,MAGK,OAHL,qBACpB,cAAMA,IACDM,cAAgB,GACrB,EAAKN,SAAWA,EAAS,EAY1B,OAXA,oCACD,SAAQO,EAAQN,GAEd,OADAO,KAAKF,cAAcG,KAAK,CAAEF,SAAQN,YAC3B,+DAAcM,EAAQN,KAC9B,uBACD,SAAUM,GAAQ,WACVG,EAAqBF,KAAKF,cAAcK,QAAO,SAACC,GAAQ,OAAKA,EAASL,SAAWA,KACvFC,KAAKF,cAAgB,GACrBE,KAAKR,SAAS,oEAAqBQ,MACnCA,KAAKK,aACLH,EAAmBI,SAAQ,SAACF,GAAQ,OAAK,EAAKG,QAAQH,EAASL,OAAQK,E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AAMC,EAAmBvB,KAAnBuB,MAAOkC,EAAYzD,KAAZyD,QAChB/D,IAAMC,WAAc2B,GAASmC,EAAO,iEAGnBrC,EAAU,CAAEE,OAAMC,UAAQ,OAAhDvB,KAAK+D,SAAW,EAAH,qDACd,kDAPD,IAOC,8BACD,SAAiBvE,GAAU,WACzBQ,KAAK6D,qBAAuBvE,YAAe,gBAAgB,SAAC4F,GAC1DA,EAAQ5E,SAAQ,SAAC6E,GACXA,EAAMC,iBACR,EAAKvB,qBAAqBxD,aAC1B,EAAKwD,qBAAuB,KAC5BrE,UAGH,CAAE6F,WAAY,SACZrF,KAAK6D,qBAIV7D,KAAK6D,qBAAqBtD,QAAQP,KAAK8D,IAHrCtE,MAIH,cAED,WAAW,OAAOQ,QAAO,uBADzB,WAA0B,MAAO,CAAC,YAAY,oBAE9C,WAAwB,MAAO,CAC7B,KAAQ,CAAC,oBACT,MAAS,CAAC,uBACR,iBACJ,WAAqB,MA1FP,2pDA0FwB,EAxFK,CAAesF,KAyFzD,CAAC,EAAG,eAAgB,CACnB,KAAQ,CAAC,KACT,QAAW,CAAC,IAAK,YACjB,MAAS,CAAC,KACV,UAAa,CAAC,EAAG,cACjB,SAAY,CAAC,IACb,QAAW,CAAC,OAEhB,SAASlG,IACP,GAA8B,qBAAnBmG,eAAX,CAGmB,CAAC,gBACTjF,SAAQ,SAAAkF,GAAa,GACzB,iBADiCA,EAE/BD,eAAeE,IAAID,IACtBD,eAAeG,OAAOF,EAASrG,OAKvCC","file":"static/js/21.c5f785e5.chunk.js","sourcesContent":["/*!\n * All material copyright ESRI, All Rights Reserved, unless otherwise specified.\n * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.\n * v1.0.0-beta.97\n */\nimport { I as Icon, d as defineCustomElement$1 } from './icon.js';\n\nconst CalciteIcon = Icon;\nconst defineCustomElement = defineCustomElement$1;\n\nexport { CalciteIcon, defineCustomElement };\n","/*!\n * All material copyright ESRI, All Rights Reserved, unless otherwise specified.\n * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.\n * v1.0.0-beta.97\n */\nimport { Build } from '@stencil/core/internal/client/index.js';\n\n/**\n * This utility ensures observers are created only for browser contexts.\n *\n * @param type - the type of observer to create\n * @param callback - the observer callback\n * @param options - the observer options\n */\nfunction createObserver(type, callback, options) {\n if (!Build.isBrowser) {\n return undefined;\n }\n const Observer = getObserver(type);\n return new Observer(callback, options);\n}\nfunction getObserver(type) {\n // based on https://github.com/whatwg/dom/issues/126#issuecomment-1049814948\n class ExtendedMutationObserver extends window.MutationObserver {\n constructor(callback) {\n super(callback);\n this.observedEntry = [];\n this.callback = callback;\n }\n observe(target, options) {\n this.observedEntry.push({ target, options });\n return super.observe(target, options);\n }\n unobserve(target) {\n const newObservedEntries = this.observedEntry.filter((observed) => observed.target !== target);\n this.observedEntry = [];\n this.callback(super.takeRecords(), this);\n this.disconnect();\n newObservedEntries.forEach((observed) => this.observe(observed.target, observed.options));\n }\n }\n return (function () {\n return (type === \"intersection\"\n ? window.IntersectionObserver\n : type === \"mutation\"\n ? ExtendedMutationObserver\n : window.ResizeObserver);\n })();\n}\n\nexport { createObserver as c };\n","/*!\n * All material copyright ESRI, All Rights Reserved, unless otherwise specified.\n * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.\n * v1.0.0-beta.97\n */\nimport { getAssetPath, proxyCustomElement, HTMLElement, h, Host, Build } from '@stencil/core/internal/client/index.js';\nimport { c as getElementDir, t as toAriaBoolean } from './dom.js';\nimport { c as createObserver } from './observers.js';\n\nconst CSS = {\n icon: \"icon\",\n flipRtl: \"flip-rtl\"\n};\n\n/**\n * Icon data cache.\n * Exported for testing purposes.\n *\n * @private\n */\nconst iconCache = {};\n/**\n * Icon request cache.\n * Exported for testing purposes.\n *\n * @private\n */\nconst requestCache = {};\nconst scaleToPx = {\n s: 16,\n m: 24,\n l: 32\n};\nasync function fetchIcon({ icon, scale }) {\n const size = scaleToPx[scale];\n const name = normalizeIconName(icon);\n const filled = name.charAt(name.length - 1) === \"F\";\n const iconName = filled ? name.substring(0, name.length - 1) : name;\n const id = `${iconName}${size}${filled ? \"F\" : \"\"}`;\n if (iconCache[id]) {\n return iconCache[id];\n }\n if (!requestCache[id]) {\n requestCache[id] = fetch(getAssetPath(`./assets/icon/${id}.json`))\n .then((resp) => resp.json())\n .catch(() => {\n console.error(`\"${id}\" is not a valid calcite-ui-icon name`);\n return \"\";\n });\n }\n const path = await requestCache[id];\n iconCache[id] = path;\n return path;\n}\n/**\n * Normalize the icon name to match the path data module exports.\n * Exported for testing purposes.\n *\n * @param name\n * @private\n */\nfunction normalizeIconName(name) {\n const numberLeadingName = !isNaN(Number(name.charAt(0)));\n const parts = name.split(\"-\");\n if (parts.length === 1) {\n return numberLeadingName ? `i${name}` : name;\n }\n return parts\n .map((part, index) => {\n if (index === 0) {\n return numberLeadingName ? `i${part.toUpperCase()}` : part;\n }\n return part.charAt(0).toUpperCase() + part.slice(1);\n })\n .join(\"\");\n}\n\nconst iconCss = \"@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{display:inline-flex;color:var(--calcite-ui-icon-color)}:host([scale=s]){block-size:1rem;inline-size:1rem;min-inline-size:1rem;min-block-size:1rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem;min-inline-size:1.5rem;min-block-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem;min-inline-size:2rem;min-block-size:2rem}.flip-rtl{transform:scaleX(-1)}.svg{display:block}\";\n\nconst Icon = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n //--------------------------------------------------------------------------\n //\n // Properties\n //\n //--------------------------------------------------------------------------\n /**\n * The name of the icon to display. The value of this property must match the icon name from https://esri.github.io/calcite-ui-icons/.\n */\n this.icon = null;\n /**\n * When true, the icon will be flipped when the element direction is 'rtl'.\n */\n this.flipRtl = false;\n /**\n * Icon scale.\n */\n this.scale = \"m\";\n this.visible = false;\n }\n //--------------------------------------------------------------------------\n //\n // Lifecycle\n //\n //--------------------------------------------------------------------------\n connectedCallback() {\n this.waitUntilVisible(() => {\n this.visible = true;\n this.loadIconPathData();\n });\n }\n disconnectedCallback() {\n var _a;\n (_a = this.intersectionObserver) === null || _a === void 0 ? void 0 : _a.disconnect();\n this.intersectionObserver = null;\n }\n async componentWillLoad() {\n this.loadIconPathData();\n }\n render() {\n const { el, flipRtl, pathData, scale, textLabel } = this;\n const dir = getElementDir(el);\n const size = scaleToPx[scale];\n const semantic = !!textLabel;\n const paths = [].concat(pathData || \"\");\n return (h(Host, { \"aria-hidden\": toAriaBoolean(!semantic), \"aria-label\": semantic ? textLabel : null, role: semantic ? \"img\" : null }, h(\"svg\", { class: {\n [CSS.flipRtl]: dir === \"rtl\" && flipRtl,\n svg: true\n }, fill: \"currentColor\", height: \"100%\", viewBox: `0 0 ${size} ${size}`, width: \"100%\", xmlns: \"http://www.w3.org/2000/svg\" }, paths.map((path) => typeof path === \"string\" ? (h(\"path\", { d: path })) : (h(\"path\", { d: path.d, opacity: \"opacity\" in path ? path.opacity : 1 }))))));\n }\n //--------------------------------------------------------------------------\n //\n // Private Methods\n //\n //--------------------------------------------------------------------------\n async loadIconPathData() {\n const { icon, scale, visible } = this;\n if (!Build.isBrowser || !icon || !visible) {\n return;\n }\n this.pathData = await fetchIcon({ icon, scale });\n }\n waitUntilVisible(callback) {\n this.intersectionObserver = createObserver(\"intersection\", (entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n this.intersectionObserver.disconnect();\n this.intersectionObserver = null;\n callback();\n }\n });\n }, { rootMargin: \"50px\" });\n if (!this.intersectionObserver) {\n callback();\n return;\n }\n this.intersectionObserver.observe(this.el);\n }\n static get assetsDirs() { return [\"assets\"]; }\n get el() { return this; }\n static get watchers() { return {\n \"icon\": [\"loadIconPathData\"],\n \"scale\": [\"loadIconPathData\"]\n }; }\n static get style() { return iconCss; }\n}, [1, \"calcite-icon\", {\n \"icon\": [513],\n \"flipRtl\": [516, \"flip-rtl\"],\n \"scale\": [513],\n \"textLabel\": [1, \"text-label\"],\n \"pathData\": [32],\n \"visible\": [32]\n }]);\nfunction defineCustomElement() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"calcite-icon\"];\n components.forEach(tagName => { switch (tagName) {\n case \"calcite-icon\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, Icon);\n }\n break;\n } });\n}\ndefineCustomElement();\n\nexport { Icon as I, defineCustomElement as d };\n"],"sourceRoot":""}