mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
1 line
14 KiB
JSON
1 line
14 KiB
JSON
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\n/* eslint react/prefer-stateless-function: 0 */\n\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, warnOnce, tagPropType } from './utils';\nvar propTypes = {\n children: PropTypes.node,\n type: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n bsSize: PropTypes.string,\n valid: PropTypes.bool,\n invalid: PropTypes.bool,\n tag: tagPropType,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),\n plaintext: PropTypes.bool,\n addon: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object\n};\nvar defaultProps = {\n type: 'text'\n};\n\nvar Input = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Input, _React$Component);\n\n function Input(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));\n _this.focus = _this.focus.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = Input.prototype;\n\n _proto.getRef = function getRef(ref) {\n if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n this.ref = ref;\n };\n\n _proto.focus = function focus() {\n if (this.ref) {\n this.ref.focus();\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n cssModule = _this$props.cssModule,\n type = _this$props.type,\n bsSize = _this$props.bsSize,\n valid = _this$props.valid,\n invalid = _this$props.invalid,\n tag = _this$props.tag,\n addon = _this$props.addon,\n plaintext = _this$props.plaintext,\n innerRef = _this$props.innerRef,\n attributes = _objectWithoutPropertiesLoose(_this$props, [\"className\", \"cssModule\", \"type\", \"bsSize\", \"valid\", \"invalid\", \"tag\", \"addon\", \"plaintext\", \"innerRef\"]);\n\n var checkInput = ['radio', 'checkbox'].indexOf(type) > -1;\n var isNotaNumber = new RegExp('\\\\D', 'g');\n var fileInput = type === 'file';\n var textareaInput = type === 'textarea';\n var selectInput = type === 'select';\n var rangeInput = type === 'range';\n var Tag = tag || (selectInput || textareaInput ? type : 'input');\n var formControlClass = 'form-control';\n\n if (plaintext) {\n formControlClass = formControlClass + \"-plaintext\";\n Tag = tag || 'input';\n } else if (fileInput) {\n formControlClass = formControlClass + \"-file\";\n } else if (rangeInput) {\n formControlClass = formControlClass + \"-range\";\n } else if (checkInput) {\n if (addon) {\n formControlClass = null;\n } else {\n formControlClass = 'form-check-input';\n }\n }\n\n if (attributes.size && isNotaNumber.test(attributes.size)) {\n warnOnce('Please use the prop \"bsSize\" instead of the \"size\" to bootstrap\\'s input sizing.');\n bsSize = attributes.size;\n delete attributes.size;\n }\n\n var classes = mapToCssModules(classNames(className, invalid && 'is-invalid', valid && 'is-valid', bsSize ? \"form-control-\" + bsSize : false, formControlClass), cssModule);\n\n if (Tag === 'input' || tag && typeof tag === 'function') {\n attributes.type = type;\n }\n\n if (attributes.children && !(plaintext || type === 'select' || typeof Tag !== 'string' || Tag === 'select')) {\n warnOnce(\"Input with a type of \\\"\" + type + \"\\\" cannot have children. Please use \\\"value\\\"/\\\"defaultValue\\\" instead.\");\n delete attributes.children;\n }\n\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n ref: innerRef,\n className: classes,\n \"aria-invalid\": invalid\n }));\n };\n\n return Input;\n}(React.Component);\n\nInput.propTypes = propTypes;\nInput.defaultProps = defaultProps;\nexport default Input;","map":{"version":3,"sources":["/app/node_modules/reactstrap/es/Input.js"],"names":["_extends","_objectWithoutPropertiesLoose","_assertThisInitialized","_inheritsLoose","React","PropTypes","classNames","mapToCssModules","warnOnce","tagPropType","propTypes","children","node","type","string","size","oneOfType","number","bsSize","valid","bool","invalid","tag","innerRef","object","func","plaintext","addon","className","cssModule","defaultProps","Input","_React$Component","props","_this","call","getRef","bind","focus","_proto","prototype","ref","render","_this$props","attributes","checkInput","indexOf","isNotaNumber","RegExp","fileInput","textareaInput","selectInput","rangeInput","Tag","formControlClass","test","classes","createElement","Component"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,6BAAP,MAA0C,yDAA1C;AACA,OAAOC,sBAAP,MAAmC,kDAAnC;AACA,OAAOC,cAAP,MAA2B,0CAA3B;AAEA;;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAASC,eAAT,EAA0BC,QAA1B,EAAoCC,WAApC,QAAuD,SAAvD;AACA,IAAIC,SAAS,GAAG;AACdC,EAAAA,QAAQ,EAAEN,SAAS,CAACO,IADN;AAEdC,EAAAA,IAAI,EAAER,SAAS,CAACS,MAFF;AAGdC,EAAAA,IAAI,EAAEV,SAAS,CAACW,SAAV,CAAoB,CAACX,SAAS,CAACY,MAAX,EAAmBZ,SAAS,CAACS,MAA7B,CAApB,CAHQ;AAIdI,EAAAA,MAAM,EAAEb,SAAS,CAACS,MAJJ;AAKdK,EAAAA,KAAK,EAAEd,SAAS,CAACe,IALH;AAMdC,EAAAA,OAAO,EAAEhB,SAAS,CAACe,IANL;AAOdE,EAAAA,GAAG,EAAEb,WAPS;AAQdc,EAAAA,QAAQ,EAAElB,SAAS,CAACW,SAAV,CAAoB,CAACX,SAAS,CAACmB,MAAX,EAAmBnB,SAAS,CAACoB,IAA7B,EAAmCpB,SAAS,CAACS,MAA7C,CAApB,CARI;AASdY,EAAAA,SAAS,EAAErB,SAAS,CAACe,IATP;AAUdO,EAAAA,KAAK,EAAEtB,SAAS,CAACe,IAVH;AAWdQ,EAAAA,SAAS,EAAEvB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qD,aAAN,CAAoBJ,GAApB,EAAyBrD,QAAQ,CAAC,EAAD,EAAK4C,UAAL,EAAiB;AACpEH,MAAAA,GAAG,EAAElB,QAD+D;AAEpEK,MAAAA,SAAS,EAAE4B,OAFyD;AAGpE,sBAAgBnC;AAHoD,KAAjB,CAAjC,CAApB;AAKD,GA5DD;;AA8DA,SAAOU,KAAP;AACD,CA3FwB,CA2FvB3B,KAAK,CAACsD,SA3FiB,CAAzB;;AA6FA3B,KAAK,CAACrB,SAAN,GAAkBA,SAAlB;AACAqB,KAAK,CAACD,YAAN,GAAqBA,YAArB;AACA,eAAeC,KAAf","sourcesContent":["import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\n\n/* eslint react/prefer-stateless-function: 0 */\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, warnOnce, tagPropType } from './utils';\nvar propTypes = {\n children: PropTypes.node,\n type: PropTypes.string,\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n bsSize: PropTypes.string,\n valid: PropTypes.bool,\n invalid: PropTypes.bool,\n tag: tagPropType,\n innerRef: PropTypes.oneOfType([PropTypes.object, PropTypes.func, PropTypes.string]),\n plaintext: PropTypes.bool,\n addon: PropTypes.bool,\n className: PropTypes.string,\n cssModule: PropTypes.object\n};\nvar defaultProps = {\n type: 'text'\n};\n\nvar Input = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Input, _React$Component);\n\n function Input(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.getRef = _this.getRef.bind(_assertThisInitialized(_this));\n _this.focus = _this.focus.bind(_assertThisInitialized(_this));\n return _this;\n }\n\n var _proto = Input.prototype;\n\n _proto.getRef = function getRef(ref) {\n if (this.props.innerRef) {\n this.props.innerRef(ref);\n }\n\n this.ref = ref;\n };\n\n _proto.focus = function focus() {\n if (this.ref) {\n this.ref.focus();\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n className = _this$props.className,\n cssModule = _this$props.cssModule,\n type = _this$props.type,\n bsSize = _this$props.bsSize,\n valid = _this$props.valid,\n invalid = _this$props.invalid,\n tag = _this$props.tag,\n addon = _this$props.addon,\n plaintext = _this$props.plaintext,\n innerRef = _this$props.innerRef,\n attributes = _objectWithoutPropertiesLoose(_this$props, [\"className\", \"cssModule\", \"type\", \"bsSize\", \"valid\", \"invalid\", \"tag\", \"addon\", \"plaintext\", \"innerRef\"]);\n\n var checkInput = ['radio', 'checkbox'].indexOf(type) > -1;\n var isNotaNumber = new RegExp('\\\\D', 'g');\n var fileInput = type === 'file';\n var textareaInput = type === 'textarea';\n var selectInput = type === 'select';\n var rangeInput = type === 'range';\n var Tag = tag || (selectInput || textareaInput ? type : 'input');\n var formControlClass = 'form-control';\n\n if (plaintext) {\n formControlClass = formControlClass + \"-plaintext\";\n Tag = tag || 'input';\n } else if (fileInput) {\n formControlClass = formControlClass + \"-file\";\n } else if (rangeInput) {\n formControlClass = formControlClass + \"-range\";\n } else if (checkInput) {\n if (addon) {\n formControlClass = null;\n } else {\n formControlClass = 'form-check-input';\n }\n }\n\n if (attributes.size && isNotaNumber.test(attributes.size)) {\n warnOnce('Please use the prop \"bsSize\" instead of the \"size\" to bootstrap\\'s input sizing.');\n bsSize = attributes.size;\n delete attributes.size;\n }\n\n var classes = mapToCssModules(classNames(className, invalid && 'is-invalid', valid && 'is-valid', bsSize ? \"form-control-\" + bsSize : false, formControlClass), cssModule);\n\n if (Tag === 'input' || tag && typeof tag === 'function') {\n attributes.type = type;\n }\n\n if (attributes.children && !(plaintext || type === 'select' || typeof Tag !== 'string' || Tag === 'select')) {\n warnOnce(\"Input with a type of \\\"\" + type + \"\\\" cannot have children. Please use \\\"value\\\"/\\\"defaultValue\\\" instead.\");\n delete attributes.children;\n }\n\n return /*#__PURE__*/React.createElement(Tag, _extends({}, attributes, {\n ref: innerRef,\n className: classes,\n \"aria-invalid\": invalid\n }));\n };\n\n return Input;\n}(React.Component);\n\nInput.propTypes = propTypes;\nInput.defaultProps = defaultProps;\nexport default Input;"]},"metadata":{},"sourceType":"module"} |