{"version":3,"sources":["webpack:////home/jenkins/agent/workspace/rAlWnROk32481EutLuZS/node_modules/json2mq/index.js","webpack:////home/jenkins/agent/workspace/rAlWnROk32481EutLuZS/node_modules/string-convert/camel2hyphen.js","webpack:////home/jenkins/agent/workspace/rAlWnROk32481EutLuZS/node_modules/react-media/esm/react-media.js"],"names":["camel2hyphen","obj2mq","obj","mq","features","Object","keys","forEach","feature","index","value","test","isDimension","length","module","exports","query","Array","q","str","replace","match","toLowerCase","MediaQueryListener","targetWindow","listener","_this","this","nativeMediaQueryList","matchMedia","active","cancellableListener","matches","apply","arguments","addListener","prototype","cancel","removeListener","queryType","oneOfType","string","object","arrayOf","isRequired","Media","_React$Component","props","call","queryObject","queryNames","__DEFAULT__","unwrapSingleQuery","queries","reduce","acc","_ref","_extends2","name","mqListener","newMatches","getMatches","setState","onChange","undefined","defaultMatches","window","key","_extends3","state","initialize","_proto","_this2","map","qs","updateMatches","componentDidMount","componentWillUnmount","_ref2","render","_this$props","children","isAnyMatches","some","isArray","Children","only","type","cloneElement","Component","bool","objectOf","func","node"],"mappings":"+EAAA,IAAIA,EAAe,EAAQ,MAOvBC,EAAS,SAAUC,GACrB,IAAIC,EAAK,GACLC,EAAWC,OAAOC,KAAKJ,GAmB3B,OAlBAE,EAASG,SAAQ,SAAUC,EAASC,GAClC,IAAIC,EAAQR,EAAIM,IATF,SAAUA,GAE1B,MADS,kBACCG,KAAKH,IAUTI,CAFJJ,EAAUR,EAAaQ,KAEsB,iBAAVE,IACjCA,GAAgB,MAGhBP,IADY,IAAVO,EACIF,GACa,IAAVE,EACH,OAASF,EAET,IAAMA,EAAU,KAAOE,EAAQ,IAEnCD,EAAQL,EAASS,OAAO,IAC1BV,GAAM,YAGHA,GAsBTW,EAAOC,QAnBO,SAAUC,GACtB,IAAIb,EAAK,GACT,MAAqB,iBAAVa,EACFA,EAGLA,aAAiBC,OACnBD,EAAMT,SAAQ,SAAUW,EAAGT,GACzBN,GAAMF,EAAOiB,GACTT,EAAQ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0C,KAAMA,EACNC,WAHe,IAAIpC,EAAmBC,EAAckD,EAAIF,EAAOG,oBAQrEJ,EAAOK,kBAAoB,WACzBjD,KAAK2C,kBAI6BN,IAA9BrC,KAAKoB,MAAMkB,gBACbtC,KAAKgD,iBAITJ,EAAOR,SAAW,WAChB,IAAIA,EAAWpC,KAAKoB,MAAMgB,SAEtBA,GACFA,EAASpC,KAAK0C,MAAMrC,UAIxBuC,EAAOM,qBAAuB,WAC5BlD,KAAK0B,QAAQ9C,SAAQ,SAAUuE,GAE7B,OADiBA,EAAMnB,WACLtB,aAItBkC,EAAOQ,OAAS,WACd,IAAIC,EAAcrD,KAAKoB,MACnBkC,EAAWD,EAAYC,SACvBF,EAASC,EAAYD,OACrB/C,EAAUL,KAAK0C,MAAMrC,QACrBkD,EAAkC,iBAAZlD,EAAuB3B,OAAOC,KAAK0B,GAASmD,MAAK,SAAUhB,GACnF,OAAOnC,EAAQmC,MACZnC,EACL,OAAO+C,EAASG,EAAeH,EAAO/C,GAAW,KAAOiD,EAA+B,mBAAbA,EAA0BA,EAASjD,KAAYf,MAAMmE,QAAQH,IAAaA,EAASpE,SAC3JqE,EAEF,IAAMG,SAASC,KAAKL,IAA2D,iBAAvC,IAAMI,SAASC,KAAKL,GAAUM,KAAoB,IAAMF,SAASC,KAAKL,GAAY,IAAMO,aAAa,IAAMH,SAASC,KAAKL,GAAW,CAC1KjD,QAASA,IACC,KAAO,MAGda,EAtIT,CAuIE,IAAM4C,WASR,YAAgB5C,EAAO,YAAa,CAClCoB,eAAgB,IAAUzB,UAAU,CAAC,IAAUkD,KAAM,IAAUC,SAAS,IAAUD,QAClF1E,MAAOuB,EACPc,QAAS,IAAUsC,SAASpD,GAC5BwC,OAAQ,IAAUa,KAClBX,SAAU,IAAUzC,UAAU,CAAC,IAAUqD,KAAM,IAAUD,OACzDpE,aAAc,IAAUkB,OACxBqB,SAAU,IAAU6B,OAuBP","file":"default~blockedContactList~contact-list~guest~more-funnel~request-page~request-preview~request-succe~cbc9b2e5.esm.js","sourcesContent":["var camel2hyphen = require('string-convert/camel2hyphen');\n\nvar isDimension = function (feature) {\n var re = /[height|width]$/;\n return re.test(feature);\n};\n\nvar obj2mq = function (obj) {\n var mq = '';\n var features = Object.keys(obj);\n features.forEach(function (feature, index) {\n var value = obj[feature];\n feature = camel2hyphen(feature);\n // Add px to dimension features\n if (isDimension(feature) && typeof value === 'number') {\n value = value + 'px';\n }\n if (value === true) {\n mq += feature;\n } else if (value === false) {\n mq += 'not ' + feature;\n } else {\n mq += '(' + feature + ': ' + value + ')';\n }\n if (index < features.length-1) {\n mq += ' and '\n }\n });\n return mq;\n};\n\nvar json2mq = function (query) {\n var mq = '';\n if (typeof query === 'string') {\n return query;\n }\n // Handling array of media queries\n if (query instanceof Array) {\n query.forEach(function (q, index) {\n mq += obj2mq(q);\n if (index < query.length-1) {\n mq += ', '\n }\n });\n return mq;\n }\n // Handling single media query\n return obj2mq(query);\n};\n\nmodule.exports = json2mq;","var camel2hyphen = function (str) {\n return str\n .replace(/[A-Z]/g, function (match) {\n return '-' + match.toLowerCase();\n })\n .toLowerCase();\n};\n\nmodule.exports = camel2hyphen;","import _extends from '@babel/runtime/helpers/esm/extends';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _defineProperty from '@babel/runtime/helpers/esm/defineProperty';\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport invariant from 'invariant';\nimport json2mq from 'json2mq';\n\nvar MediaQueryListener =\n/*#__PURE__*/\nfunction () {\n function MediaQueryListener(targetWindow, query, listener) {\n var _this = this;\n\n this.nativeMediaQueryList = targetWindow.matchMedia(query);\n this.active = true; // Safari doesn't clear up listener with removeListener\n // when the listener is already waiting in the event queue.\n // Having an active flag to make sure the listener is not called\n // after we removeListener.\n\n this.cancellableListener = function () {\n _this.matches = _this.nativeMediaQueryList.matches;\n\n if (_this.active) {\n listener.apply(void 0, arguments);\n }\n };\n\n this.nativeMediaQueryList.addListener(this.cancellableListener);\n this.matches = this.nativeMediaQueryList.matches;\n }\n\n var _proto = MediaQueryListener.prototype;\n\n _proto.cancel = function cancel() {\n this.active = false;\n this.nativeMediaQueryList.removeListener(this.cancellableListener);\n };\n\n return MediaQueryListener;\n}();\n\nvar queryType = PropTypes.oneOfType([PropTypes.string, PropTypes.object, PropTypes.arrayOf(PropTypes.object.isRequired)]);\n/**\n * Conditionally renders based on whether or not a media query matches.\n */\n\nvar Media =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(Media, _React$Component);\n\n function Media(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"queries\", []);\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"getMatches\", function () {\n var result = _this.queries.reduce(function (acc, _ref) {\n var _extends2;\n\n var name = _ref.name,\n mqListener = _ref.mqListener;\n return _extends({}, acc, (_extends2 = {}, _extends2[name] = mqListener.matches, _extends2));\n }, {}); // return result;\n\n\n return unwrapSingleQuery(result);\n });\n\n _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), \"updateMatches\", function () {\n var newMatches = _this.getMatches();\n\n _this.setState(function () {\n return {\n matches: newMatches\n };\n }, _this.onChange);\n });\n\n !(!(!props.query && !props.queries) || props.query && props.queries) ? process.env.NODE_ENV !== \"production\" ? invariant(false, ' must be supplied with either \"query\" or \"queries\"') : invariant(false) : void 0;\n !(props.defaultMatches === undefined || !props.query || typeof props.defaultMatches === \"boolean\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" when query is set, defaultMatches must be a boolean, received \" + typeof props.defaultMatches) : invariant(false) : void 0;\n !(props.defaultMatches === undefined || !props.queries || typeof props.defaultMatches === \"object\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" when queries is set, defaultMatches must be a object of booleans, received \" + typeof props.defaultMatches) : invariant(false) : void 0;\n\n if (typeof window !== \"object\") {\n // In case we're rendering on the server, apply the default matches\n var matches;\n\n if (props.defaultMatches !== undefined) {\n matches = props.defaultMatches;\n } else if (props.query) {\n matches = true;\n }\n /* if (props.queries) */\n else {\n matches = Object.keys(_this.props.queries).reduce(function (acc, key) {\n var _extends3;\n\n return _extends({}, acc, (_extends3 = {}, _extends3[key] = true, _extends3));\n }, {});\n }\n\n _this.state = {\n matches: matches\n };\n return _assertThisInitialized(_this);\n }\n\n _this.initialize(); // Instead of calling this.updateMatches, we manually set the initial state to prevent\n // calling setState, which could trigger an unnecessary second render\n\n\n _this.state = {\n matches: _this.props.defaultMatches !== undefined ? _this.props.defaultMatches : _this.getMatches()\n };\n\n _this.onChange();\n\n return _this;\n }\n\n var _proto = Media.prototype;\n\n _proto.initialize = function initialize() {\n var _this2 = this;\n\n var targetWindow = this.props.targetWindow || window;\n !(typeof targetWindow.matchMedia === \"function\") ? process.env.NODE_ENV !== \"production\" ? invariant(false, \" does not support `matchMedia`.\") : invariant(false) : void 0;\n var queries = this.props.queries || wrapInQueryObject(this.props.query);\n this.queries = Object.keys(queries).map(function (name) {\n var query = queries[name];\n var qs = typeof query !== \"string\" ? json2mq(query) : query;\n var mqListener = new MediaQueryListener(targetWindow, qs, _this2.updateMatches);\n return {\n name: name,\n mqListener: mqListener\n };\n });\n };\n\n _proto.componentDidMount = function componentDidMount() {\n this.initialize(); // If props.defaultMatches has been set, ensure we trigger a two-pass render.\n // This is useful for SSR with mismatching defaultMatches vs actual matches from window.matchMedia\n // Details: https://github.com/ReactTraining/react-media/issues/81\n\n if (this.props.defaultMatches !== undefined) {\n this.updateMatches();\n }\n };\n\n _proto.onChange = function onChange() {\n var onChange = this.props.onChange;\n\n if (onChange) {\n onChange(this.state.matches);\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.queries.forEach(function (_ref2) {\n var mqListener = _ref2.mqListener;\n return mqListener.cancel();\n });\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n children = _this$props.children,\n render = _this$props.render;\n var matches = this.state.matches;\n var isAnyMatches = typeof matches === \"object\" ? Object.keys(matches).some(function (key) {\n return matches[key];\n }) : matches;\n return render ? isAnyMatches ? render(matches) : null : children ? typeof children === \"function\" ? children(matches) : !Array.isArray(children) || children.length // Preact defaults to empty children array\n ? isAnyMatches ? // We have to check whether child is a composite component or not to decide should we\n // provide `matches` as a prop or not\n React.Children.only(children) && typeof React.Children.only(children).type === \"string\" ? React.Children.only(children) : React.cloneElement(React.Children.only(children), {\n matches: matches\n }) : null : null : null;\n };\n\n return Media;\n}(React.Component);\n/**\n * Wraps a single query in an object. This is used to provide backward compatibility with\n * the old `query` prop (as opposed to `queries`). If only a single query is passed, the object\n * will be unpacked down the line, but this allows our internals to assume an object of queries\n * at all times.\n */\n\n\n_defineProperty(Media, \"propTypes\", {\n defaultMatches: PropTypes.oneOfType([PropTypes.bool, PropTypes.objectOf(PropTypes.bool)]),\n query: queryType,\n queries: PropTypes.objectOf(queryType),\n render: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),\n targetWindow: PropTypes.object,\n onChange: PropTypes.func\n});\n\nfunction wrapInQueryObject(query) {\n return {\n __DEFAULT__: query\n };\n}\n/**\n * Unwraps an object of queries, if it was originally passed as a single query.\n */\n\n\nfunction unwrapSingleQuery(queryObject) {\n var queryNames = Object.keys(queryObject);\n\n if (queryNames.length === 1 && queryNames[0] === \"__DEFAULT__\") {\n return queryObject.__DEFAULT__;\n }\n\n return queryObject;\n}\n\nexport default Media;\n"],"sourceRoot":""}