{"version":3,"sources":["webpack:///./node_modules/@ionic/core/dist/esm-es5/ion-radio_2-ios.entry.js","webpack:///./node_modules/@ionic/core/dist/esm-es5/theme-18cbe2cc.js","webpack:///./node_modules/@ionic/core/dist/esm-es5/watch-options-2af96011.js"],"names":["Radio","hostRef","_this","this","inputId","radioButtonIds","name","disabled","checked","onFocus","ionFocus","emit","onBlur","ionBlur","onClick","ionDeselect","ionStyle","ionSelect","prototype","colorChanged","emitStyle","checkedChanged","isChecked","value","disabledChanged","componentWillLoad","undefined","render","_a","_b","color","el","mode","labelId","label","id","role","class","Object","assign","type","defineProperty","get","enumerable","configurable","RadioGroup","class_1","radioGroupIds","allowEmptySelection","onSelect","ev","selectedRadio","target","onDeselect","ionChange","valueChanged","updateRadios","connectedCallback","header","radio","querySelector","componentOnReady","sent","mutationO","newOption","then","disconnectedCallback","disconnect","radios","hasChecked","_i","radios_1","getRadios","length","Promise","all","Array","from","querySelectorAll","map","r","onIonSelect","onIonDeselect","hostContext","selector","closest","createColorClasses","getClassList","classes","array","isArray","split","filter","c","trim","getClassMap","forEach","SCHEME","openURL","url","direction","router","test","document","preventDefault","push","watchForOptions","containerEl","tagName","onChange","mutation","MutationObserver","mutationList","getSelectedOption","observe","childList","subtree","mut","i","addedNodes","findCheckedOption","nodeType","options","toUpperCase","find","o"],"mappings":"kHAAA,6KAMIA,EAAuB,WACvB,SAASA,EAAMC,GACX,IAAIC,EAAQC,KACZ,eAAiBA,KAAMF,GACvBE,KAAKC,QAAU,UAAYC,IAI3BF,KAAKG,KAAOH,KAAKC,QAIjBD,KAAKI,UAAW,EAIhBJ,KAAKK,SAAU,EACfL,KAAKM,QAAU,WACXP,EAAMQ,SAASC,QAEnBR,KAAKS,OAAS,WACVV,EAAMW,QAAQF,QAElBR,KAAKW,QAAU,WACPZ,EAAMM,QACNN,EAAMa,YAAYJ,OAGlBT,EAAMM,SAAU,GAGxBL,KAAKa,SAAW,eAAYb,KAAM,WAAY,GAC9CA,KAAKc,UAAY,eA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,EAAS,uBACTC,EAAU,SAAUC,EAAKjD,EAAIkD,GAAa,OAAO,oBAAU,OAAQ,OAAQ,GAAQ,WACnF,IAAIC,EACJ,OAAO,eAAYlG,MAAM,SAAUyB,GAC/B,OAAW,MAAPuE,GAA0B,MAAXA,EAAI,KAAeF,EAAOK,KAAKH,KAC9CE,EAASE,SAAS3C,cAAc,cAC5ByC,IACU,MAANnD,GACAA,EAAGsD,iBAEA,CAAC,EAAcH,EAAOI,KAAKN,EAAKC,KAGxC,CAAC,GAAc,W,kCC3C9B,wEAAIM,EAAkB,SAAUC,EAAaC,EAASC,GAClD,IAAIC,EAAW,IAAIC,kBAAiB,SAAUC,GAC1CH,EAASI,EAAkBD,EAAcJ,OAM7C,OAJAE,EAASI,QAAQP,EAAa,CAC1BQ,WAAW,EACXC,SAAS,IAENN,GAEPG,EAAoB,SAAUD,EAAcJ,GAC5C,IAAI5C,EAOJ,OANAgD,EAAahB,SAAQ,SAAUqB,GAE3B,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAIE,WAAW9C,OAAQ6C,IACvCtD,EAAYwD,EAAkBH,EAAIE,WAAWD,GAAIV,IAAY5C,KAG9DA,GAEPwD,EAAoB,SAAUzF,EAAI6E,GAClC,GAAoB,IAAhB7E,EAAG0F,SAAP,CAGA,IAAIC,EAAW3F,EAAG6E,UAAYA,EAAQe,cAChC,CAAC5F,GACD6C,MAAMC,KAAK9C,EAAG+C,iBAAiB8B,IACrC,OAAOc,EAAQE,MAAK,SAAUC,GAAK,OAAqB,IAAdA,EAAErH","file":"js/chunk-19749bdc.d8de385a.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 { f as findItemLabel } from './helpers-46f4a262.js';\nimport { c as createColorClasses, h as hostContext } from './theme-18cbe2cc.js';\nimport { f as findCheckedOption, w as watchForOptions } from './watch-options-2af96011.js';\nvar Radio = /** @class */ (function () {\n function Radio(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n this.inputId = \"ion-rb-\" + radioButtonIds++;\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n /**\n * If `true`, the user cannot interact with the radio.\n */\n this.disabled = false;\n /**\n * If `true`, the radio is selected.\n */\n this.checked = false;\n this.onFocus = function () {\n _this.ionFocus.emit();\n };\n this.onBlur = function () {\n _this.ionBlur.emit();\n };\n this.onClick = function () {\n if (_this.checked) {\n _this.ionDeselect.emit();\n }\n else {\n _this.checked = true;\n }\n };\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.ionSelect = createEvent(this, \"ionSelect\", 7);\n this.ionDeselect = createEvent(this, \"ionDeselect\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n }\n Radio.prototype.colorChanged = function () {\n this.emitStyle();\n };\n Radio.prototype.checkedChanged = function (isChecked) {\n if (isChecked) {\n this.ionSelect.emit({\n checked: true,\n value: this.value\n });\n }\n this.emitStyle();\n };\n Radio.prototype.disabledChanged = function () {\n this.emitStyle();\n };\n Radio.prototype.componentWillLoad = function () {\n if (this.value === undefined) {\n this.value = this.inputId;\n }\n this.emitStyle();\n };\n Radio.prototype.emitStyle = function () {\n this.ionStyle.emit({\n 'radio-checked': this.checked,\n 'interactive-disabled': this.disabled,\n });\n };\n Radio.prototype.render = function () {\n var _a;\n var _b = this, inputId = _b.inputId, disabled = _b.disabled, checked = _b.checked, color = _b.color, el = _b.el;\n var mode = getIonMode(this);\n var labelId = inputId + '-lbl';\n var label = findItemLabel(el);\n if (label) {\n label.id = labelId;\n }\n return (h(Host, { onClick: this.onClick, role: \"radio\", \"aria-disabled\": disabled ? 'true' : null, \"aria-checked\": \"\" + checked, \"aria-labelledby\": labelId, class: Object.assign(Object.assign({}, createColorClasses(color)), (_a = {}, _a[mode] = true, _a['in-item'] = hostContext('ion-item', el), _a['interactive'] = true, _a['radio-checked'] = checked, _a['radio-disabled'] = disabled, _a)) }, h(\"div\", { class: \"radio-icon\" }, h(\"div\", { class: \"radio-inner\" })), h(\"button\", { type: \"button\", onFocus: this.onFocus, onBlur: this.onBlur, disabled: disabled })));\n };\n Object.defineProperty(Radio.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Radio, \"watchers\", {\n get: function () {\n return {\n \"color\": [\"colorChanged\"],\n \"checked\": [\"checkedChanged\"],\n \"disabled\": [\"disabledChanged\"]\n };\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(Radio, \"style\", {\n get: function () { return \":host{display:inline-block;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:2}:host(.radio-disabled){pointer-events:none}.radio-icon{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;contain:layout size style}.radio-icon,button{width:100%;height:100%}button{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}:host-context([dir=rtl]) button,[dir=rtl] button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.radio-icon,.radio-inner{-webkit-box-sizing:border-box;box-sizing:border-box}:host{--color-checked:var(--ion-color-primary,#3880ff);width:15px;height:24px}:host(.ion-color.radio-checked) .radio-inner{border-color:var(--ion-color-base)}.item-radio.item-ios ion-label{margin-left:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.item-radio.item-ios ion-label{margin-left:unset;-webkit-margin-start:0;margin-inline-start:0}}.radio-inner{width:33%;height:50%}:host(.radio-checked) .radio-inner{-webkit-transform:rotate(45deg);transform:rotate(45deg);border-width:2px;border-top-width:0;border-left-width:0;border-style:solid;border-color:var(--color-checked)}:host(.radio-disabled){opacity:.3}:host(.ion-focused) .radio-icon:after{border-radius:50%;left:-9px;top:-8px;display:block;position:absolute;width:36px;height:36px;background:var(--ion-color-primary-tint,#4c8dff);content:\\\"\\\";opacity:.2}:host-context([dir=rtl]).ion-focused .radio-icon:after,:host-context([dir=rtl]):host(.ion-focused) .radio-icon:after{left:unset;right:unset;right:-9px}:host(.in-item){margin-left:8px;margin-right:11px;margin-top:8px;margin-bottom:8px;display:block;position:static}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host(.in-item){margin-left:unset;margin-right:unset;-webkit-margin-start:8px;margin-inline-start:8px;-webkit-margin-end:11px;margin-inline-end:11px}}:host(.in-item[slot=start]){margin-left:3px;margin-right:21px;margin-top:8px;margin-bottom:8px}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){:host(.in-item[slot=start]){margin-left:unset;margin-right:unset;-webkit-margin-start:3px;margin-inline-start:3px;-webkit-margin-end:21px;margin-inline-end:21px}}\"; },\n enumerable: true,\n configurable: true\n });\n return Radio;\n}());\nvar radioButtonIds = 0;\nvar RadioGroup = /** @class */ (function () {\n function class_1(hostRef) {\n var _this = this;\n registerInstance(this, hostRef);\n this.inputId = \"ion-rg-\" + radioGroupIds++;\n this.labelId = this.inputId + \"-lbl\";\n /**\n * If `true`, the radios can be deselected.\n */\n this.allowEmptySelection = false;\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n this.onSelect = function (ev) {\n var selectedRadio = ev.target;\n if (selectedRadio) {\n _this.value = selectedRadio.value;\n }\n };\n this.onDeselect = function (ev) {\n var selectedRadio = ev.target;\n if (selectedRadio) {\n selectedRadio.checked = false;\n _this.value = undefined;\n }\n };\n this.ionChange = createEvent(this, \"ionChange\", 7);\n }\n class_1.prototype.valueChanged = function (value) {\n this.updateRadios();\n this.ionChange.emit({ value: value });\n };\n class_1.prototype.connectedCallback = function () {\n return __awaiter(this, void 0, void 0, function () {\n var el, header, label, radio;\n var _this = this;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n el = this.el;\n header = el.querySelector('ion-list-header') || el.querySelector('ion-item-divider');\n if (header) {\n label = header.querySelector('ion-label');\n if (label) {\n this.labelId = label.id = this.name + '-lbl';\n }\n }\n if (!(this.value === undefined)) return [3 /*break*/, 2];\n radio = findCheckedOption(el, 'ion-radio');\n if (!(radio !== undefined)) return [3 /*break*/, 2];\n return [4 /*yield*/, radio.componentOnReady()];\n case 1:\n _a.sent();\n if (this.value === undefined) {\n this.value = radio.value;\n }\n _a.label = 2;\n case 2:\n this.mutationO = watchForOptions(el, 'ion-radio', function (newOption) {\n if (newOption !== undefined) {\n newOption.componentOnReady().then(function () {\n _this.value = newOption.value;\n });\n }\n else {\n _this.updateRadios();\n }\n });\n this.updateRadios();\n return [2 /*return*/];\n }\n });\n });\n };\n class_1.prototype.disconnectedCallback = function () {\n if (this.mutationO) {\n this.mutationO.disconnect();\n this.mutationO = undefined;\n }\n };\n class_1.prototype.updateRadios = function () {\n return __awaiter(this, void 0, void 0, function () {\n var radios, value, hasChecked, _i, radios_1, radio;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0: return [4 /*yield*/, this.getRadios()];\n case 1:\n radios = _a.sent();\n value = this.value;\n hasChecked = false;\n // Walk the DOM in reverse order, since the last selected one wins!\n for (_i = 0, radios_1 = radios; _i < radios_1.length; _i++) {\n radio = radios_1[_i];\n if (!hasChecked && radio.value === value) {\n // correct value for this radio\n // but this radio isn't checked yet\n // and we haven't found a checked yet\n hasChecked = true;\n radio.checked = true;\n }\n else {\n // this radio doesn't have the correct value\n // or the radio group has been already checked\n radio.checked = false;\n }\n }\n // Reset value if\n if (!hasChecked) {\n this.value = undefined;\n }\n return [2 /*return*/];\n }\n });\n });\n };\n class_1.prototype.getRadios = function () {\n return Promise.all(Array\n .from(this.el.querySelectorAll('ion-radio'))\n .map(function (r) { return r.componentOnReady(); }));\n };\n class_1.prototype.render = function () {\n return (h(Host, { role: \"radiogroup\", \"aria-labelledby\": this.labelId, onIonSelect: this.onSelect, onIonDeselect: this.allowEmptySelection ? this.onDeselect : undefined, class: getIonMode(this) }));\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 \"value\": [\"valueChanged\"]\n };\n },\n enumerable: true,\n configurable: true\n });\n return class_1;\n}());\nvar radioGroupIds = 0;\nexport { Radio as ion_radio, RadioGroup as ion_radio_group };\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","var watchForOptions = function (containerEl, tagName, onChange) {\n var mutation = new MutationObserver(function (mutationList) {\n onChange(getSelectedOption(mutationList, tagName));\n });\n mutation.observe(containerEl, {\n childList: true,\n subtree: true\n });\n return mutation;\n};\nvar getSelectedOption = function (mutationList, tagName) {\n var newOption;\n mutationList.forEach(function (mut) {\n // tslint:disable-next-line: prefer-for-of\n for (var i = 0; i < mut.addedNodes.length; i++) {\n newOption = findCheckedOption(mut.addedNodes[i], tagName) || newOption;\n }\n });\n return newOption;\n};\nvar findCheckedOption = function (el, tagName) {\n if (el.nodeType !== 1) {\n return undefined;\n }\n var options = (el.tagName === tagName.toUpperCase())\n ? [el]\n : Array.from(el.querySelectorAll(tagName));\n return options.find(function (o) { return o.checked === true; });\n};\nexport { findCheckedOption as f, watchForOptions as w };\n"],"sourceRoot":""}