{"version":3,"sources":["../node_modules/@esri/calcite-components/dist/components/calcite-flow.js","../node_modules/@esri/calcite-components/dist/components/observers.js"],"names":["CSS","Flow","proxyCustomElement","__registerHost","__attachShadow","flowDirection","itemCount","items","itemMutationObserver","createObserver","updateFlowProps","getFlowDirection","oldFlowItemCount","newFlowItemCount","el","newItems","Array","from","querySelectorAll","filter","flowItem","matches","oldItemCount","length","newItemCount","activeItem","previousItem","forEach","itemNode","showBackButton","hidden","menuOpen","a","this","lastItem","beforeBack","Promise","resolve","call","then","remove","_a","observe","childList","subtree","disconnect","back","frameDirectionClasses","h","class","HTMLElement","defineCustomElement$1","customElements","tagName","get","define","CalciteFlow","defineCustomElement","type","callback","options","Build","isBrowser","Observer","ExtendedMutationObserver","observedEntry","target","push","newObservedEntries","observed","window","MutationObserver","IntersectionObserver","ResizeObserver","getObserver"],"mappings":";kTAQMA,EACG,QADHA,EAEY,mBAFZA,EAGa,oBAKbC,EAAqBC,YAAkB,kDAC3C,aAAc,MAsCV,OAtCU,qBACZ,gBACKC,iBACL,EAAKC,iBACL,EAAKC,cAAgB,KACrB,EAAKC,UAAY,EACjB,EAAKC,MAAQ,GACb,EAAKC,qBAAuBC,YAAe,YAAY,kBAAM,EAAKC,qBAClE,EAAKC,iBAAmB,SAACC,EAAkBC,GAGzC,OADgCD,GAAoBC,EAAmB,GADtCD,EAAmB,EAK7CC,EAAmBD,EAAmB,aAAe,YAFnD,MAIX,EAAKF,gBAAkB,WACrB,qBAAQI,EAAE,EAAFA,GAAIP,EAAK,EAALA,MACNQ,EAAWC,MAAMC,KAAKH,EAAGI,iBAAiB,qCAAqCC,QAAO,SAACC,GAAQ,OAAMA,EAASC,QAAQ,uEACtHC,EAAef,EAAMgB,OACrBC,EAAeT,EAASQ,OACxBE,EAAaV,EAASS,EAAe,GACrCE,EAAeX,EAASS,EAAe,GAW7C,GAVIA,GAAgBC,GAClBV,EAASY,SAAQ,SAACC,GAChBA,EAASC,eAAiBD,IAAaH,GAAcD,EAAe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CAAC,gBACTzB,SAAQ,SAAA0B,GAAa,GACzB,iBADiCA,EAE/BD,eAAeE,IAAID,IACtBD,eAAeG,OAAOF,EAASpD,OAKvCkD,IAEA,IAAMK,EAAcvD,EACdwD,EAAsBN,G,4HC7H5B,SAAS1C,EAAeiD,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,OADA3B,KAAKgC,cAAcE,KAAK,CAAED,SAAQN,YAC3B,+DAAcM,EAAQN,KAC9B,uBACD,SAAUM,GAAQ,WACVE,EAAqBnC,KAAKgC,cAAc9C,QAAO,SAACkD,GAAQ,OAAKA,EAASH,SAAWA,KACvFjC,KAAKgC,cAAgB,GACrBhC,KAAK0B,SAAS,oEAAqB1B,MACnCA,KAAKY,aACLuB,EAAmBzC,SAAQ,SAAC0C,GAAQ,OAAK,EAAK3B,QAAQ2B,EAASH,OAAQG,EAAST,gBACjF,EAhB2B,CAASU,OAAOC,kBAkB9C,MACmB,iBAATb,EACJY,OAAOE,qBACE,aAATd,EACEM,EACAM,OAAOG,eA5BEC,CAAYhB,GAC7B,OAAO,IAAIK,EAASJ,EAAUC","file":"static/js/124.c4413502.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 { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client/index.js';\nimport { c as createObserver } from './observers.js';\n\nconst CSS = {\n frame: \"frame\",\n frameAdvancing: \"frame--advancing\",\n frameRetreating: \"frame--retreating\"\n};\n\nconst flowCss = \"@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}}:host{box-sizing:border-box;background-color:var(--calcite-ui-foreground-1);color:var(--calcite-ui-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;overflow:hidden;background-color:transparent}:host .frame{position:relative;margin:0px;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:0px}:host ::slotted(calcite-flow-item),:host ::slotted(calcite-panel){block-size:100%}:host ::slotted(.calcite-match-height:last-child){display:flex;flex:1 1 auto;overflow:hidden}:host .frame--advancing{animation:calcite-frame-advance var(--calcite-animation-timing)}:host .frame--retreating{animation:calcite-frame-retreat var(--calcite-animation-timing)}@keyframes calcite-frame-advance{0%{--tw-bg-opacity:0.5;transform:translate3d(50px, 0, 0)}100%{--tw-bg-opacity:1;transform:translate3d(0, 0, 0)}}@keyframes calcite-frame-retreat{0%{--tw-bg-opacity:0.5;transform:translate3d(-50px, 0, 0)}100%{--tw-bg-opacity:1;transform:translate3d(0, 0, 0)}}\";\n\nconst Flow = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n this.flowDirection = null;\n this.itemCount = 0;\n this.items = [];\n this.itemMutationObserver = createObserver(\"mutation\", () => this.updateFlowProps());\n this.getFlowDirection = (oldFlowItemCount, newFlowItemCount) => {\n const allowRetreatingDirection = oldFlowItemCount > 1;\n const allowAdvancingDirection = oldFlowItemCount && newFlowItemCount > 1;\n if (!allowAdvancingDirection && !allowRetreatingDirection) {\n return null;\n }\n return newFlowItemCount < oldFlowItemCount ? \"retreating\" : \"advancing\";\n };\n this.updateFlowProps = () => {\n const { el, items } = this;\n const newItems = Array.from(el.querySelectorAll(\"calcite-flow-item, calcite-panel\")).filter((flowItem) => !flowItem.matches(\"calcite-flow-item calcite-flow-item, calcite-panel calcite-panel\"));\n const oldItemCount = items.length;\n const newItemCount = newItems.length;\n const activeItem = newItems[newItemCount - 1];\n const previousItem = newItems[newItemCount - 2];\n if (newItemCount && activeItem) {\n newItems.forEach((itemNode) => {\n itemNode.showBackButton = itemNode === activeItem && newItemCount > 1;\n itemNode.hidden = itemNode !== activeItem;\n });\n }\n if (previousItem) {\n previousItem.menuOpen = false;\n }\n this.items = newItems;\n if (oldItemCount !== newItemCount) {\n const flowDirection = this.getFlowDirection(oldItemCount, newItemCount);\n this.itemCount = newItemCount;\n this.flowDirection = flowDirection;\n }\n };\n }\n // --------------------------------------------------------------------------\n //\n // Public Methods\n //\n // --------------------------------------------------------------------------\n /**\n * Removes the currently active `calcite-flow-item` or `calcite-panel`.\n */\n async back() {\n const { items } = this;\n const lastItem = items[items.length - 1];\n if (!lastItem) {\n return;\n }\n const beforeBack = lastItem.beforeBack\n ? lastItem.beforeBack\n : () => Promise.resolve();\n return beforeBack.call(lastItem).then(() => {\n lastItem.remove();\n return lastItem;\n });\n }\n // --------------------------------------------------------------------------\n //\n // Lifecycle\n //\n // --------------------------------------------------------------------------\n connectedCallback() {\n var _a;\n (_a = this.itemMutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true, subtree: true });\n this.updateFlowProps();\n }\n disconnectedCallback() {\n var _a;\n (_a = this.itemMutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();\n }\n // --------------------------------------------------------------------------\n //\n // Private Methods\n //\n // --------------------------------------------------------------------------\n handleItemBackClick() {\n this.back();\n }\n // --------------------------------------------------------------------------\n //\n // Render Methods\n //\n // --------------------------------------------------------------------------\n render() {\n const { flowDirection } = this;\n const frameDirectionClasses = {\n [CSS.frame]: true,\n [CSS.frameAdvancing]: flowDirection === \"advancing\",\n [CSS.frameRetreating]: flowDirection === \"retreating\"\n };\n return (h(\"div\", { class: frameDirectionClasses }, h(\"slot\", null)));\n }\n get el() { return this; }\n static get style() { return flowCss; }\n}, [1, \"calcite-flow\", {\n \"flowDirection\": [32],\n \"itemCount\": [32],\n \"items\": [32],\n \"back\": [64]\n }, [[0, \"calciteFlowItemBackClick\", \"handleItemBackClick\"], [0, \"calcitePanelBackClick\", \"handleItemBackClick\"]]]);\nfunction defineCustomElement$1() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"calcite-flow\"];\n components.forEach(tagName => { switch (tagName) {\n case \"calcite-flow\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, Flow);\n }\n break;\n } });\n}\ndefineCustomElement$1();\n\nconst CalciteFlow = Flow;\nconst defineCustomElement = defineCustomElement$1;\n\nexport { CalciteFlow, 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"],"sourceRoot":""}