{"version":3,"sources":["webpack:///./node_modules/@ionic/vue/node_modules/@ionic/core/dist/esm-es5/ion-range-ios.entry.js","webpack:///./node_modules/@ionic/vue/node_modules/@ionic/core/dist/esm-es5/theme-18cbe2cc.js"],"names":["Range","class_1","hostRef","_this","this","noUpdate","hasFocus","ratioA","ratioB","debounce","name","dualKnobs","min","max","pin","snaps","step","ticks","disabled","value","clampBounds","ensureValueInBounds","lower","upper","handleKeyboard","knob","isIncrease","updateValue","onBlur","ionBlur","emit","emitStyle","onFocus","ionFocus","ionChange","ionStyle","prototype","debounceChanged","minChanged","updateRatio","maxChanged","disabledChanged","gesture","setDisabled","valueChanged","connectedCallback","disconnectedCallback","destroy","undefined","componentDidLoad","rangeSlider","_a","_b","label","sent","createGesture","el","gestureName","gesturePriority","threshold","onStart","ev","onMove","onEnd","getValue","detail","rect","getBoundingClientRect","currentX","ratio","left","width","document","dir","pressedKnob","Math","abs","setFocus","update","valueToRatio","ratioToValue","Object","defineProperty","get","enumerable","configurable","valA","valB","shadowRoot","knobEl","querySelector","focus","render","_c","ratioLower","ratioUpper","mode","barStart","barEnd","doc","isRTL","start","end","tickStyle","tick","barStyle","active","push","JSON","stringify","onFocusin","onFocusout","class","assign","color","ref","rangeEl","map","style","role","renderKnob","pressed","knobStyle","onKeyDown","key","preventDefault","stopPropagation","tabindex","round","hostContext","selector","closest","createColorClasses","length","getClassList","classes","array","Array","isArray","split","filter","c","trim","getClassMap","forEach","SCHEME","openURL","url","direction","router","test"],"mappings":"kHAAA,iHAKIA,EAAuB,WACvB,SAASC,EAAQC,GACb,IAAIC,EAAQC,KACZ,eAAiBA,KAAMF,GACvBE,KAAKC,UAAW,EAChBD,KAAKE,UAAW,EAChBF,KAAKG,OAAS,EACdH,KAAKI,OAAS,EAKdJ,KAAKK,SAAW,EAIhBL,KAAKM,KAAO,GAIZN,KAAKO,WAAY,EAIjBP,KAAKQ,IAAM,EAIXR,KAAKS,IAAM,IAKXT,KAAKU,KAAM,EAKXV,KAAKW,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GACrC,OAAO,eAAM,GAAIM,EAAQP,IAAQC,EAAMD,GAAM,K,oCC7ajD,wJACIqH,EAAc,SAAUC,EAAU1E,GAClC,OAAgC,OAAzBA,EAAG2E,QAAQD,IAKlBE,EAAqB,SAAUlB,GAC/B,IAAI/D,EACJ,MAAyB,kBAAV+D,GAAsBA,EAAMmB,OAAS,GAAMlF,EAAK,CACvD,aAAa,GAEjBA,EAAG,aAAe+D,IAAS,EAC3B/D,QAAMH,GAEVsF,EAAe,SAAUC,GACzB,QAAgBvF,IAAZuF,EAAuB,CACvB,IAAIC,EAAQC,MAAMC,QAAQH,GAAWA,EAAUA,EAAQI,MAAM,KAC7D,OAAOH,EACFI,QAAO,SAAUC,GAAK,OAAY,MAALA,KAC7BxB,KAAI,SAAUwB,GAAK,OAAOA,EAAEC,UAC5BF,QAAO,SAAUC,GAAK,MAAa,KAANA,KAEtC,MAAO,IAEPE,EAAc,SAAUR,GACxB,IAAIlB,EAAM,GAEV,OADAiB,EAAaC,GAASS,SAAQ,SAAUH,GAAK,OAAOxB,EAAIwB,IAAK,KACtDxB,GAEP4B,EAAS,uBACTC,EAAU,SAAUC,EAAKtF,EAAIuF,GAAa,OAAO,oBAAU,OAAQ,OAAQ,GAAQ,WACnF,IAAIC,EACJ,OAAO,eAAYjJ,MAAM,SAAU+C,GAC/B,OAAW,MAAPgG,GAA0B,MAAXA,EAAI,KAAeF,EAAOK,KAAKH,KAC9CE,EAAS7E,SAASkB,cAAc,cAC5B2D,IACU,MAANxF,GACAA,EAAGgE,iBAEA,CAAC,EAAcwB,EAAO1C,KAAKwC,EAAKC,KAGxC,CAAC,GAAc","file":"js/chunk-32cdbffc.a0a61307.js","sourcesContent":["import { __awaiter, __generator } from \"tslib\";\nimport { r as registerInstance, d as createEvent, c as getIonMode, h, H as Host, e as getElement } from './core-feeeff0d.js';\nimport './config-3c7f3790.js';\nimport { c as clamp, d as debounceEvent, a as renderHiddenInput } from './helpers-46f4a262.js';\nimport { c as createColorClasses, h as hostContext } from './theme-18cbe2cc.js';\nvar Range = /** @class */ (function () {\n function class_1(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n this.noUpdate = false;\n this.hasFocus = false;\n this.ratioA = 0;\n this.ratioB = 0;\n /**\n * How long, in milliseconds, to wait to trigger the\n * `ionChange` event after each change in the range value.\n */\n this.debounce = 0;\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = '';\n /**\n * Show two knobs.\n */\n this.dualKnobs = false;\n /**\n * Minimum integer value of the range.\n */\n this.min = 0;\n /**\n * Maximum integer value of the range.\n */\n this.max = 100;\n /**\n * If `true`, a pin with integer value is shown when the knob\n * is pressed.\n */\n this.pin = false;\n /**\n * If `true`, the knob snaps to tick marks evenly spaced based\n * on the step property value.\n */\n this.snaps = false;\n /**\n * Specifies the value granularity.\n */\n this.step = 1;\n /**\n * If `true`, tick marks are displayed based on the step value.\n * Only applies when `snaps` is `true`.\n */\n this.ticks = true;\n /**\n * If `true`, the user cannot interact with the range.\n */\n this.disabled = false;\n /**\n * the value of the range.\n */\n this.value = 0;\n this.clampBounds = function (value) {\n return clamp(_this.min, value, _this.max);\n };\n this.ensureValueInBounds = function (value) {\n if (_this.dualKnobs) {\n return {\n lower: _this.clampBounds(value.lower),\n upper: _this.clampBounds(value.upper)\n };\n }\n else {\n return _this.clampBounds(value);\n }\n };\n this.handleKeyboard = function (knob, isIncrease) {\n var step = _this.step;\n step = step > 0 ? step : 1;\n step = step / (_this.max - _this.min);\n if (!isIncrease) {\n step *= -1;\n }\n if (knob === 'A') {\n _this.ratioA = clamp(0, _this.ratioA + step, 1);\n }\n else {\n _this.ratioB = clamp(0, _this.ratioB + step, 1);\n }\n _this.updateValue();\n };\n this.onBlur = function () {\n if (_this.hasFocus) {\n _this.hasFocus = false;\n _this.ionBlur.emit();\n _this.emitStyle();\n }\n };\n this.onFocus = function () {\n if (!_this.hasFocus) {\n _this.hasFocus = true;\n _this.ionFocus.emit();\n _this.emitStyle();\n }\n };\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n }\n class_1.prototype.debounceChanged = function () {\n this.ionChange = debounceEvent(this.ionChange, this.debounce);\n };\n class_1.prototype.minChanged = function () {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n };\n class_1.prototype.maxChanged = function () {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n };\n class_1.prototype.disabledChanged = function () {\n if (this.gesture) {\n this.gesture.setDisabled(this.disabled);\n }\n this.emitStyle();\n };\n class_1.prototype.valueChanged = function (value) {\n if (!this.noUpdate) {\n this.updateRatio();\n }\n value = this.ensureValueInBounds(value);\n this.ionChange.emit({ value: value });\n };\n class_1.prototype.connectedCallback = function () {\n this.updateRatio();\n this.debounceChanged();\n this.disabledChanged();\n };\n class_1.prototype.disconnectedCallback = function () {\n if (this.gesture) {\n this.gesture.destroy();\n this.gesture = undefined;\n }\n };\n class_1.prototype.componentDidLoad = function () {\n return __awaiter(this, void 0, void 0, function () {\n var rangeSlider, _a;\n var _this = this;\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n rangeSlider = this.rangeSlider;\n if (!rangeSlider) return [3 /*break*/, 2];\n _a = this;\n return [4 /*yield*/, import('./index-624eea58.js')];\n case 1:\n _a.gesture = (_b.sent()).createGesture({\n el: rangeSlider,\n gestureName: 'range',\n gesturePriority: 100,\n threshold: 0,\n onStart: function (ev) { return _this.onStart(ev); },\n onMove: function (ev) { return _this.onMove(ev); },\n onEnd: function (ev) { return _this.onEnd(ev); },\n });\n this.gesture.setDisabled(this.disabled);\n _b.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n });\n };\n class_1.prototype.getValue = function () {\n var value = this.value || 0;\n if (this.dualKnobs) {\n if (typeof value === 'object') {\n return value;\n }\n return {\n lower: 0,\n upper: value\n };\n }\n else {\n if (typeof value === 'object') {\n return value.upper;\n }\n return value;\n }\n };\n class_1.prototype.emitStyle = function () {\n this.ionStyle.emit({\n 'interactive': true,\n 'interactive-disabled': this.disabled\n });\n };\n class_1.prototype.onStart = function (detail) {\n var rect = this.rect = this.rangeSlider.getBoundingClientRect();\n var currentX = detail.currentX;\n // figure out which knob they started closer to\n var ratio = clamp(0, (currentX - rect.left) / rect.width, 1);\n if (document.dir === 'rtl') {\n ratio = 1 - ratio;\n }\n this.pressedKnob =\n !this.dualKnobs ||\n Math.abs(this.ratioA - ratio) < Math.abs(this.ratioB - ratio)\n ? 'A'\n : 'B';\n this.setFocus(this.pressedKnob);\n // update the active knob's position\n this.update(currentX);\n };\n class_1.prototype.onMove = function (detail) {\n this.update(detail.currentX);\n };\n class_1.prototype.onEnd = function (detail) {\n this.update(detail.currentX);\n this.pressedKnob = undefined;\n };\n class_1.prototype.update = function (currentX) {\n // figure out where the pointer is currently at\n // update the knob being interacted with\n var rect = this.rect;\n var ratio = clamp(0, (currentX - rect.left) / rect.width, 1);\n if (document.dir === 'rtl') {\n ratio = 1 - ratio;\n }\n if (this.snaps) {\n // snaps the ratio to the current value\n ratio = valueToRatio(ratioToValue(ratio, this.min, this.max, this.step), this.min, this.max);\n }\n // update which knob is pressed\n if (this.pressedKnob === 'A') {\n this.ratioA = ratio;\n }\n else {\n this.ratioB = ratio;\n }\n // Update input value\n this.updateValue();\n };\n Object.defineProperty(class_1.prototype, \"valA\", {\n get: function () {\n return ratioToValue(this.ratioA, this.min, this.max, this.step);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1.prototype, \"valB\", {\n get: function () {\n return ratioToValue(this.ratioB, this.min, this.max, this.step);\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1.prototype, \"ratioLower\", {\n get: function () {\n if (this.dualKnobs) {\n return Math.min(this.ratioA, this.ratioB);\n }\n return 0;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1.prototype, \"ratioUpper\", {\n get: function () {\n if (this.dualKnobs) {\n return Math.max(this.ratioA, this.ratioB);\n }\n return this.ratioA;\n },\n enumerable: true,\n configurable: true\n });\n class_1.prototype.updateRatio = function () {\n var value = this.getValue();\n var _a = this, min = _a.min, max = _a.max;\n if (this.dualKnobs) {\n this.ratioA = valueToRatio(value.lower, min, max);\n this.ratioB = valueToRatio(value.upper, min, max);\n }\n else {\n this.ratioA = valueToRatio(value, min, max);\n }\n };\n class_1.prototype.updateValue = function () {\n this.noUpdate = true;\n var _a = this, valA = _a.valA, valB = _a.valB;\n this.value = !this.dualKnobs\n ? valA\n : {\n lower: Math.min(valA, valB),\n upper: Math.max(valA, valB)\n };\n this.noUpdate = false;\n };\n class_1.prototype.setFocus = function (knob) {\n if (this.el.shadowRoot) {\n var knobEl = this.el.shadowRoot.querySelector(knob === 'A' ? '.range-knob-a' : '.range-knob-b');\n if (knobEl) {\n knobEl.focus();\n }\n }\n };\n class_1.prototype.render = function () {\n var _a, _b;\n var _this = this;\n var _c = this, min = _c.min, max = _c.max, step = _c.step, el = _c.el, handleKeyboard = _c.handleKeyboard, pressedKnob = _c.pressedKnob, disabled = _c.disabled, pin = _c.pin, ratioLower = _c.ratioLower, ratioUpper = _c.ratioUpper;\n var mode = getIonMode(this);\n var barStart = ratioLower * 100 + \"%\";\n var barEnd = 100 - ratioUpper * 100 + \"%\";\n var doc = document;\n var isRTL = doc.dir === 'rtl';\n var start = isRTL ? 'right' : 'left';\n var end = isRTL ? 'left' : 'right';\n var tickStyle = function (tick) {\n var _a;\n return _a = {},\n _a[start] = tick[start],\n _a;\n };\n var barStyle = (_a = {},\n _a[start] = barStart,\n _a[end] = barEnd,\n _a);\n var ticks = [];\n if (this.snaps && this.ticks) {\n for (var value = min; value <= max; value += step) {\n var ratio = valueToRatio(value, min, max);\n var tick = {\n ratio: ratio,\n active: ratio >= ratioLower && ratio <= ratioUpper,\n };\n tick[start] = ratio * 100 + \"%\";\n ticks.push(tick);\n }\n }\n renderHiddenInput(true, el, this.name, JSON.stringify(this.getValue()), disabled);\n return (h(Host, { onFocusin: this.onFocus, onFocusout: this.onBlur, class: Object.assign(Object.assign({}, createColorClasses(this.color)), (_b = {}, _b[mode] = true, _b['in-item'] = hostContext('ion-item', el), _b['range-disabled'] = disabled, _b['range-pressed'] = pressedKnob !== undefined, _b['range-has-pin'] = pin, _b)) }, h(\"slot\", { name: \"start\" }), h(\"div\", { class: \"range-slider\", ref: function (rangeEl) { return _this.rangeSlider = rangeEl; } }, ticks.map(function (tick) { return (h(\"div\", { style: tickStyle(tick), role: \"presentation\", class: {\n 'range-tick': true,\n 'range-tick-active': tick.active\n } })); }), h(\"div\", { class: \"range-bar\", role: \"presentation\" }), h(\"div\", { class: \"range-bar range-bar-active\", role: \"presentation\", style: barStyle }), renderKnob(isRTL, {\n knob: 'A',\n pressed: pressedKnob === 'A',\n value: this.valA,\n ratio: this.ratioA,\n pin: pin,\n disabled: disabled,\n handleKeyboard: handleKeyboard,\n min: min,\n max: max\n }), this.dualKnobs && renderKnob(isRTL, {\n knob: 'B',\n pressed: pressedKnob === 'B',\n value: this.valB,\n ratio: this.ratioB,\n pin: pin,\n disabled: disabled,\n handleKeyboard: handleKeyboard,\n min: min,\n max: max\n })), h(\"slot\", { name: \"end\" })));\n };\n Object.defineProperty(class_1.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1, \"watchers\", {\n get: function () {\n return {\n \"debounce\": [\"debounceChanged\"],\n \"min\": [\"minChanged\"],\n \"max\": [\"maxChanged\"],\n \"disabled\": [\"disabledChanged\"],\n \"value\": [\"valueChanged\"]\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(class_1, \"style\", {\n get: function () { return \":host{--knob-handle-size:calc(var(--knob-size) * 2);display:-ms-flexbox;display:flex;position:relative;-ms-flex:3;flex:3;-ms-flex-align:center;align-items:center;font-family:var(--ion-font-family,inherit);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.range-disabled){pointer-events:none}::slotted(ion-label){-ms-flex:initial;flex:initial}::slotted(ion-icon[slot]){font-size:24px}.range-slider{position:relative;-ms-flex:1;flex:1;width:100%;height:var(--height);contain:size layout style;cursor:-webkit-grab;cursor:grab;-ms-touch-action:pan-y;touch-action:pan-y}:host(.range-pressed) .range-slider{cursor:-webkit-grabbing;cursor:grabbing}.range-pin{position:absolute;background:var(--ion-color-base);color:var(--ion-color-contrast);-webkit-box-sizing:border-box;box-sizing:border-box}.range-knob-handle{left:0;top:calc((var(--height) - var(--knob-handle-size)) / 2);margin-left:calc(0px - var(--knob-handle-size) / 2);position:absolute;width:var(--knob-handle-size);height:var(--knob-handle-size);text-align:center}:host-context([dir=rtl]) .range-knob-handle,[dir=rtl] .range-knob-handle{right:unset;right:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.range-knob-handle{margin-left:unset;-webkit-margin-start:calc(0px - var(--knob-handle-size) / 2);margin-inline-start:calc(0px - var(--knob-handle-size) / 2)}}:host-context([dir=rtl]) .range-knob-handle,[dir=rtl] .range-knob-handle{left:unset}.range-knob-handle:active,.range-knob-handle:focus{outline:none}.range-bar{border-radius:var(--bar-border-radius);left:0;top:calc((var(--height) - var(--bar-height)) / 2);position:absolute;width:100%;height:var(--bar-height);background:var(--bar-background);pointer-events:none}:host-context([dir=rtl]) .range-bar,[dir=rtl] .range-bar{right:unset;right:0;left:unset}.range-knob{border-radius:var(--knob-border-radius);left:calc(50% - var(--knob-size) / 2);top:calc(50% - var(--knob-size) / 2);position:absolute;width:var(--knob-size);height:var(--knob-size);background:var(--knob-background);-webkit-box-shadow:var(--knob-box-shadow);box-shadow:var(--knob-box-shadow);z-index:2;pointer-events:none}:host-context([dir=rtl]) .range-knob,[dir=rtl] .range-knob{right:unset;right:calc(50% - var(--knob-size) / 2);left:unset}:host(.range-pressed) .range-bar-active{will-change:left,right}:host(.in-item){width:100%}:host(.in-item) ::slotted(ion-label){-ms-flex-item-align:center;align-self:center}:host{--knob-border-radius:50%;--knob-background:#fff;--knob-box-shadow:0 3px 1px rgba(0,0,0,0.1),0 4px 8px rgba(0,0,0,0.13),0 0 0 1px rgba(0,0,0,0.02);--knob-size:28px;--bar-height:2px;--bar-background:rgba(var(--ion-text-color-rgb,0,0,0),0.1);--bar-background-active:var(--ion-color-primary,#3880ff);--bar-border-radius:0;--height:42px;padding-left:16px;padding-right:16px;padding-top:8px;padding-bottom:8px}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host(.ion-color) .range-bar-active,:host(.ion-color) .range-tick-active{background:var(--ion-color-base)}::slotted([slot=start]){margin-left:0;margin-right:16px;margin-top:0;margin-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted([slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:0;margin-inline-start:0;-webkit-margin-end:16px;margin-inline-end:16px}}::slotted([slot=end]){margin-left:16px;margin-right:0;margin-top:0;margin-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){::slotted([slot=end]){margin-left:unset;margin-right:unset;-webkit-margin-start:16px;margin-inline-start:16px;-webkit-margin-end:0;margin-inline-end:0}}:host(.range-has-pin){padding-top:20px}.range-bar-active{bottom:0;width:auto;background:var(--bar-background-active)}.range-tick{margin-left:-1px;border-radius:0;position:absolute;top:18px;width:2px;height:8px;background:rgba(var(--ion-text-color-rgb,0,0,0),.1);pointer-events:none}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.range-tick{margin-left:unset;-webkit-margin-start:-1px;margin-inline-start:-1px}}.range-tick-active{background:var(--bar-background-active)}.range-pin{-webkit-transform:translate3d(0,28px,0) scale(.01);transform:translate3d(0,28px,0) scale(.01);padding-left:8px;padding-right:8px;padding-top:8px;padding-bottom:8px;display:inline-block;position:relative;top:-20px;min-width:28px;-webkit-transition:-webkit-transform .12s ease;transition:-webkit-transform .12s ease;transition:transform .12s ease;transition:transform .12s ease,-webkit-transform .12s ease;background:transparent;color:var(--ion-text-color,#000);font-size:12px;text-align:center}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.range-pin{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.range-knob-pressed .range-pin{-webkit-transform:translateZ(0) scale(1);transform:translateZ(0) scale(1)}:host(.range-disabled){opacity:.5}\"; },\n enumerable: true,\n configurable: true\n });\n return class_1;\n}());\nvar renderKnob = function (isRTL, _a) {\n var knob = _a.knob, value = _a.value, ratio = _a.ratio, min = _a.min, max = _a.max, disabled = _a.disabled, pressed = _a.pressed, pin = _a.pin, handleKeyboard = _a.handleKeyboard;\n var start = isRTL ? 'right' : 'left';\n var knobStyle = function () {\n var style = {};\n style[start] = ratio * 100 + \"%\";\n return style;\n };\n return (h(\"div\", { onKeyDown: function (ev) {\n var key = ev.key;\n if (key === 'ArrowLeft' || key === 'ArrowDown') {\n handleKeyboard(knob, false);\n ev.preventDefault();\n ev.stopPropagation();\n }\n else if (key === 'ArrowRight' || key === 'ArrowUp') {\n handleKeyboard(knob, true);\n ev.preventDefault();\n ev.stopPropagation();\n }\n }, class: {\n 'range-knob-handle': true,\n 'range-knob-a': knob === 'A',\n 'range-knob-b': knob === 'B',\n 'range-knob-pressed': pressed,\n 'range-knob-min': value === min,\n 'range-knob-max': value === max\n }, style: knobStyle(), role: \"slider\", tabindex: disabled ? -1 : 0, \"aria-valuemin\": min, \"aria-valuemax\": max, \"aria-disabled\": disabled ? 'true' : null, \"aria-valuenow\": value }, pin && h(\"div\", { class: \"range-pin\", role: \"presentation\" }, Math.round(value)), h(\"div\", { class: \"range-knob\", role: \"presentation\" })));\n};\nvar ratioToValue = function (ratio, min, max, step) {\n var value = (max - min) * ratio;\n if (step > 0) {\n value = Math.round(value / step) * step + min;\n }\n return clamp(min, value, max);\n};\nvar valueToRatio = function (value, min, max) {\n return clamp(0, (value - min) / (max - min), 1);\n};\nexport { Range as ion_range };\n","import { __awaiter, __generator } from \"tslib\";\nvar hostContext = function (selector, el) {\n return el.closest(selector) !== null;\n};\n/**\n * Create the mode and color classes for the component based on the classes passed in\n */\nvar createColorClasses = function (color) {\n var _a;\n return (typeof color === 'string' && color.length > 0) ? (_a = {\n 'ion-color': true\n },\n _a[\"ion-color-\" + color] = true,\n _a) : undefined;\n};\nvar getClassList = function (classes) {\n if (classes !== undefined) {\n var array = Array.isArray(classes) ? classes : classes.split(' ');\n return array\n .filter(function (c) { return c != null; })\n .map(function (c) { return c.trim(); })\n .filter(function (c) { return c !== ''; });\n }\n return [];\n};\nvar getClassMap = function (classes) {\n var map = {};\n getClassList(classes).forEach(function (c) { return map[c] = true; });\n return map;\n};\nvar SCHEME = /^[a-z][a-z0-9+\\-.]*:/;\nvar openURL = function (url, ev, direction) { return __awaiter(void 0, void 0, void 0, function () {\n var router;\n return __generator(this, function (_a) {\n if (url != null && url[0] !== '#' && !SCHEME.test(url)) {\n router = document.querySelector('ion-router');\n if (router) {\n if (ev != null) {\n ev.preventDefault();\n }\n return [2 /*return*/, router.push(url, direction)];\n }\n }\n return [2 /*return*/, false];\n });\n}); };\nexport { createColorClasses as c, getClassMap as g, hostContext as h, openURL as o };\n"],"sourceRoot":""}