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AIpB,GAAKA,EAETL,EAAOf,QAAUwC","sources":["webpack://assr-alfaleasing/./node_modules/@alfa-bank/site-helpers-common/src/browser/change-history.ts","webpack://assr-alfaleasing/./node_modules/@alfa-bank/site-named-container/src/named-container/utils.ts","webpack://assr-alfaleasing/./node_modules/@alfa-bank/site-tabs/src/components/config.ts","webpack://assr-alfaleasing/./node_modules/@alfa-bank/site-tabs/src/components/tabs/styles/tabs.css?7028","webpack://assr-alfaleasing/./node_modules/@alfa-bank/site-tabs/src/components/tabs/tabs.tsx","webpack://assr-alfaleasing/./node_modules/querystringify/index.js","webpack://assr-alfaleasing/./node_modules/requires-port/index.js","webpack://assr-alfaleasing/./node_modules/url-parse/index.js"],"sourcesContent":["import UrlParse from 'url-parse';\n\nexport const changeHistory = (queryName: string, queryValue?: string | number) => {\n const urlParse = UrlParse(window.location.href, true);\n\n let query;\n\n if (queryValue) {\n query = {\n ...urlParse.query,\n [queryName]: queryValue,\n };\n } else {\n delete urlParse.query[queryName];\n\n // Объявленная переменная с присваиванием, линтер не выйдет пофиксить\n // eslint-disable-next-line prefer-destructuring\n query = urlParse.query;\n }\n\n const { href, origin } = urlParse.set('query', query);\n\n const path = href.replace(origin, '');\n\n // Непонятны назначение и работоспособность второго аргумента https://github.com/whatwg/html/issues/2174\n window.history.replaceState(null, '', path);\n};\n","import type { ReactElement, ReactNode } from 'react';\nimport React, { useMemo } from 'react';\n\nimport type { INamedContainerProps } from '../models';\n\nexport interface INamedContainers {\n [key: string]: ReactNode;\n}\n\ninterface INamedContainersWithChildren extends INamedContainers {\n children: ReactNode[];\n}\n\nexport function isNamedContainer(node: ReactNode): node is ReactElement {\n return Boolean(\n typeof node === 'object' &&\n node !== null &&\n (node as ReactElement).props.is === 'NamedContainer' &&\n (node as ReactElement).props.name\n );\n}\n\n/**\n * Функция собирает из children слоты и оставляет отфильтрованный список детей\n * @param children\n */\nexport function getNamedContainersWithChildren(children: ReactNode) {\n return React.Children.toArray(children).reduce(\n (nodes: INamedContainersWithChildren, node) => {\n if (!isNamedContainer(node)) {\n nodes.children.push(node);\n } else if (node.props.name !== 'children') {\n return {\n ...nodes,\n [node.props.name]: node.props.children,\n };\n }\n\n return nodes;\n },\n { children: [] }\n );\n}\n\n/**\n * Функция собирает из children только слоты\n * @param children\n */\nexport function getNamedContainers(children: ReactNode) {\n return React.Children.toArray(children).reduce((nodes: INamedContainers, node) => {\n if (isNamedContainer(node)) {\n return {\n ...nodes,\n [node.props.name]: node.props.children,\n };\n }\n\n return nodes;\n }, {});\n}\n\nexport function useNamedContainersWithChildren(children: ReactNode): INamedContainersWithChildren {\n return useMemo(() => getNamedContainersWithChildren(children), [children]);\n}\n\nexport function useNamedContainers(children: ReactNode) {\n return useMemo(() => getNamedContainers(children), [children]);\n}\n","export const DEFAULT_BROWSER = {\n mobile: false,\n};\n","// extracted by mini-css-extract-plugin\nexport default {\"tabs\":\"a35zw\"};","import cn from 'classnames';\nimport type { FC, ReactElement } from 'react';\nimport React, { Children, cloneElement, useCallback, useState, useEffect } from 'react';\nimport { changeHistory } from '@alfa-bank/site-helpers-common/browser/change-history';\nimport { useNamedContainersWithChildren } from '@alfa-bank/site-named-container/utils';\n\nimport { DEFAULT_BROWSER } from '../config';\nimport type { IChildTab } from '../tab/models';\nimport type { IOnChangeCallback } from '../../models';\n\nimport type { TTabs } from './models';\nimport styles from './styles/tabs.css';\n\nexport const Tabs: FC> = ({\n TabsList,\n align = 'left',\n browser = DEFAULT_BROWSER,\n className = '',\n keepMounted = false,\n inline = true,\n mobile = false,\n onChange = () => {},\n selectedID,\n children,\n scroll = true,\n tabNamesStyler,\n tabNamesClassName,\n theme,\n forwardedRef,\n writeValueToQuery,\n ...tabListProps\n}) => {\n const { background, children: otherChildren } = useNamedContainersWithChildren(children);\n const childrenArray = Children.toArray(otherChildren) as Array>;\n const [tabID, setTabID] = useState(selectedID || childrenArray[0]?.props?.id);\n\n useEffect(() => {\n if (!selectedID || selectedID === tabID) return;\n setTabID(selectedID);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedID]);\n\n useEffect(() => {\n if (writeValueToQuery) {\n changeHistory(writeValueToQuery, tabID);\n }\n }, [tabID, writeValueToQuery]);\n\n /** Обрабатывает переключение Табы. */\n const handleOnChange = useCallback(\n ({ event, id }: IOnChangeCallback) => {\n setTabID(id);\n onChange({ event, id });\n },\n [onChange]\n );\n\n if (!childrenArray.length) return null;\n\n /** Генерирует заголовки Таб. */\n const headerTitles = childrenArray.map(({ props }) => ({\n id: props.id,\n title: props.title,\n iconSrc: props.iconSrc,\n dataLayer: props.dataLayer,\n }));\n\n let childrenFiltered = childrenArray;\n\n if (!keepMounted) {\n childrenFiltered = childrenArray.filter(\n ({ props }) => props.keepMounted || props.id === tabID\n );\n }\n\n const List = (\n \n );\n\n return (\n
\n {background ? cloneElement(background as ReactElement, { children: List }) : List}\n
\n {childrenFiltered.map(child =>\n cloneElement(child, {\n hidden: child.props.id !== tabID,\n })\n )}\n
\n
\n );\n};\n","'use strict';\n\nvar has = Object.prototype.hasOwnProperty\n , undef;\n\n/**\n * Decode a URI encoded string.\n *\n * @param {String} input The URI encoded string.\n * @returns {String|Null} The decoded string.\n * @api private\n */\nfunction decode(input) {\n try {\n return decodeURIComponent(input.replace(/\\+/g, ' '));\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Attempts to encode a given input.\n *\n * @param {String} input The string that needs to be encoded.\n * @returns {String|Null} The encoded string.\n * @api private\n */\nfunction encode(input) {\n try {\n return encodeURIComponent(input);\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Simple query string parser.\n *\n * @param {String} query The query string that needs to be parsed.\n * @returns {Object}\n * @api public\n */\nfunction querystring(query) {\n var parser = /([^=?#&]+)=?([^&]*)/g\n , result = {}\n , part;\n\n while (part = parser.exec(query)) {\n var key = decode(part[1])\n , value = decode(part[2]);\n\n //\n // Prevent overriding of existing properties. This ensures that build-in\n // methods like `toString` or __proto__ are not overriden by malicious\n // querystrings.\n //\n // In the case if failed decoding, we want to omit the key/value pairs\n // from the result.\n //\n if (key === null || value === null || key in result) continue;\n result[key] = value;\n }\n\n return result;\n}\n\n/**\n * Transform a query string to an object.\n *\n * @param {Object} obj Object that should be transformed.\n * @param {String} prefix Optional prefix.\n * @returns {String}\n * @api public\n */\nfunction querystringify(obj, prefix) {\n prefix = prefix || '';\n\n var pairs = []\n , value\n , key;\n\n //\n // Optionally prefix with a '?' if needed\n //\n if ('string' !== typeof prefix) prefix = '?';\n\n for (key in obj) {\n if (has.call(obj, key)) {\n value = obj[key];\n\n //\n // Edge cases where we actually want to encode the value to an empty\n // string instead of the stringified value.\n //\n if (!value && (value === null || value === undef || isNaN(value))) {\n value = '';\n }\n\n key = encode(key);\n value = encode(value);\n\n //\n // If we failed to encode the strings, we should bail out as we don't\n // want to add invalid strings to the query.\n //\n if (key === null || value === null) continue;\n pairs.push(key +'='+ value);\n }\n }\n\n return pairs.length ? prefix + pairs.join('&') : '';\n}\n\n//\n// Expose the module.\n//\nexports.stringify = querystringify;\nexports.parse = querystring;\n","'use strict';\n\n/**\n * Check if we're required to add a port number.\n *\n * @see https://url.spec.whatwg.org/#default-port\n * @param {Number|String} port Port number we need to check\n * @param {String} protocol Protocol we need to check against.\n * @returns {Boolean} Is it a default port for the given protocol\n * @api private\n */\nmodule.exports = function required(port, protocol) {\n protocol = protocol.split(':')[0];\n port = +port;\n\n if (!port) return false;\n\n switch (protocol) {\n case 'http':\n case 'ws':\n return port !== 80;\n\n case 'https':\n case 'wss':\n return port !== 443;\n\n case 'ftp':\n return port !== 21;\n\n case 'gopher':\n return port !== 70;\n\n case 'file':\n return false;\n }\n\n return port !== 0;\n};\n","'use strict';\n\nvar required = require('requires-port')\n , qs = require('querystringify')\n , slashes = /^[A-Za-z][A-Za-z0-9+-.]*:\\/\\//\n , protocolre = /^([a-z][a-z0-9.+-]*:)?(\\/\\/)?([\\S\\s]*)/i\n , whitespace = '[\\\\x09\\\\x0A\\\\x0B\\\\x0C\\\\x0D\\\\x20\\\\xA0\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\\\\u2028\\\\u2029\\\\uFEFF]'\n , left = new RegExp('^'+ whitespace +'+');\n\n/**\n * Trim a given string.\n *\n * @param {String} str String to trim.\n * @public\n */\nfunction trimLeft(str) {\n return (str ? str : '').toString().replace(left, '');\n}\n\n/**\n * These are the parse rules for the URL parser, it informs the parser\n * about:\n *\n * 0. The char it Needs to parse, if it's a string it should be done using\n * indexOf, RegExp using exec and NaN means set as current value.\n * 1. The property we should set when parsing this value.\n * 2. Indication if it's backwards or forward parsing, when set as number it's\n * the value of extra chars that should be split off.\n * 3. Inherit from location if non existing in the parser.\n * 4. `toLowerCase` the resulting value.\n */\nvar rules = [\n ['#', 'hash'], // Extract from the back.\n ['?', 'query'], // Extract from the back.\n function sanitize(address) { // Sanitize what is left of the address\n return address.replace('\\\\', '/');\n },\n ['/', 'pathname'], // Extract from the back.\n ['@', 'auth', 1], // Extract from the front.\n [NaN, 'host', undefined, 1, 1], // Set left over value.\n [/:(\\d+)$/, 'port', undefined, 1], // RegExp the back.\n [NaN, 'hostname', undefined, 1, 1] // Set left over.\n];\n\n/**\n * These properties should not be copied or inherited from. This is only needed\n * for all non blob URL's as a blob URL does not include a hash, only the\n * origin.\n *\n * @type {Object}\n * @private\n */\nvar ignore = { hash: 1, query: 1 };\n\n/**\n * The location object differs when your code is loaded through a normal page,\n * Worker or through a worker using a blob. And with the blobble begins the\n * trouble as the location object will contain the URL of the blob, not the\n * location of the page where our code is loaded in. The actual origin is\n * encoded in the `pathname` so we can thankfully generate a good \"default\"\n * location from it so we can generate proper relative URL's again.\n *\n * @param {Object|String} loc Optional default location object.\n * @returns {Object} lolcation object.\n * @public\n */\nfunction lolcation(loc) {\n var globalVar;\n\n if (typeof window !== 'undefined') globalVar = window;\n else if (typeof global !== 'undefined') globalVar = global;\n else if (typeof self !== 'undefined') globalVar = self;\n else globalVar = {};\n\n var location = globalVar.location || {};\n loc = loc || location;\n\n var finaldestination = {}\n , type = typeof loc\n , key;\n\n if ('blob:' === loc.protocol) {\n finaldestination = new Url(unescape(loc.pathname), {});\n } else if ('string' === type) {\n finaldestination = new Url(loc, {});\n for (key in ignore) delete finaldestination[key];\n } else if ('object' === type) {\n for (key in loc) {\n if (key in ignore) continue;\n finaldestination[key] = loc[key];\n }\n\n if (finaldestination.slashes === undefined) {\n finaldestination.slashes = slashes.test(loc.href);\n }\n }\n\n return finaldestination;\n}\n\n/**\n * @typedef ProtocolExtract\n * @type Object\n * @property {String} protocol Protocol matched in the URL, in lowercase.\n * @property {Boolean} slashes `true` if protocol is followed by \"//\", else `false`.\n * @property {String} rest Rest of the URL that is not part of the protocol.\n */\n\n/**\n * Extract protocol information from a URL with/without double slash (\"//\").\n *\n * @param {String} address URL we want to extract from.\n * @return {ProtocolExtract} Extracted information.\n * @private\n */\nfunction extractProtocol(address) {\n address = trimLeft(address);\n var match = protocolre.exec(address);\n\n return {\n protocol: match[1] ? match[1].toLowerCase() : '',\n slashes: !!match[2],\n rest: match[3]\n };\n}\n\n/**\n * Resolve a relative URL pathname against a base URL pathname.\n *\n * @param {String} relative Pathname of the relative URL.\n * @param {String} base Pathname of the base URL.\n * @return {String} Resolved pathname.\n * @private\n */\nfunction resolve(relative, base) {\n if (relative === '') return base;\n\n var path = (base || '/').split('/').slice(0, -1).concat(relative.split('/'))\n , i = path.length\n , last = path[i - 1]\n , unshift = false\n , up = 0;\n\n while (i--) {\n if (path[i] === '.') {\n path.splice(i, 1);\n } else if (path[i] === '..') {\n path.splice(i, 1);\n up++;\n } else if (up) {\n if (i === 0) unshift = true;\n path.splice(i, 1);\n up--;\n }\n }\n\n if (unshift) path.unshift('');\n if (last === '.' || last === '..') path.push('');\n\n return path.join('/');\n}\n\n/**\n * The actual URL instance. Instead of returning an object we've opted-in to\n * create an actual constructor as it's much more memory efficient and\n * faster and it pleases my OCD.\n *\n * It is worth noting that we should not use `URL` as class name to prevent\n * clashes with the global URL instance that got introduced in browsers.\n *\n * @constructor\n * @param {String} address URL we want to parse.\n * @param {Object|String} [location] Location defaults for relative paths.\n * @param {Boolean|Function} [parser] Parser for the query string.\n * @private\n */\nfunction Url(address, location, parser) {\n address = trimLeft(address);\n\n if (!(this instanceof Url)) {\n return new Url(address, location, parser);\n }\n\n var relative, extracted, parse, instruction, index, key\n , instructions = rules.slice()\n , type = typeof location\n , url = this\n , i = 0;\n\n //\n // The following if statements allows this module two have compatibility with\n // 2 different API:\n //\n // 1. Node.js's `url.parse` api which accepts a URL, boolean as arguments\n // where the boolean indicates that the query string should also be parsed.\n //\n // 2. The `URL` interface of the browser which accepts a URL, object as\n // arguments. The supplied object will be used as default values / fall-back\n // for relative paths.\n //\n if ('object' !== type && 'string' !== type) {\n parser = location;\n location = null;\n }\n\n if (parser && 'function' !== typeof parser) parser = qs.parse;\n\n location = lolcation(location);\n\n //\n // Extract protocol information before running the instructions.\n //\n extracted = extractProtocol(address || '');\n relative = !extracted.protocol && !extracted.slashes;\n url.slashes = extracted.slashes || relative && location.slashes;\n url.protocol = extracted.protocol || location.protocol || '';\n address = extracted.rest;\n\n //\n // When the authority component is absent the URL starts with a path\n // component.\n //\n if (!extracted.slashes) instructions[3] = [/(.*)/, 'pathname'];\n\n for (; i < instructions.length; i++) {\n instruction = instructions[i];\n\n if (typeof instruction === 'function') {\n address = instruction(address);\n continue;\n }\n\n parse = instruction[0];\n key = instruction[1];\n\n if (parse !== parse) {\n url[key] = address;\n } else if ('string' === typeof parse) {\n if (~(index = address.indexOf(parse))) {\n if ('number' === typeof instruction[2]) {\n url[key] = address.slice(0, index);\n address = address.slice(index + instruction[2]);\n } else {\n url[key] = address.slice(index);\n address = address.slice(0, index);\n }\n }\n } else if ((index = parse.exec(address))) {\n url[key] = index[1];\n address = address.slice(0, index.index);\n }\n\n url[key] = url[key] || (\n relative && instruction[3] ? location[key] || '' : ''\n );\n\n //\n // Hostname, host and protocol should be lowercased so they can be used to\n // create a proper `origin`.\n //\n if (instruction[4]) url[key] = url[key].toLowerCase();\n }\n\n //\n // Also parse the supplied query string in to an object. If we're supplied\n // with a custom parser as function use that instead of the default build-in\n // parser.\n //\n if (parser) url.query = parser(url.query);\n\n //\n // If the URL is relative, resolve the pathname against the base URL.\n //\n if (\n relative\n && location.slashes\n && url.pathname.charAt(0) !== '/'\n && (url.pathname !== '' || location.pathname !== '')\n ) {\n url.pathname = resolve(url.pathname, location.pathname);\n }\n\n //\n // We should not add port numbers if they are already the default port number\n // for a given protocol. As the host also contains the port number we're going\n // override it with the hostname which contains no port number.\n //\n if (!required(url.port, url.protocol)) {\n url.host = url.hostname;\n url.port = '';\n }\n\n //\n // Parse down the `auth` for the username and password.\n //\n url.username = url.password = '';\n if (url.auth) {\n instruction = url.auth.split(':');\n url.username = instruction[0] || '';\n url.password = instruction[1] || '';\n }\n\n url.origin = url.protocol && url.host && url.protocol !== 'file:'\n ? url.protocol +'//'+ url.host\n : 'null';\n\n //\n // The href is just the compiled result.\n //\n url.href = url.toString();\n}\n\n/**\n * This is convenience method for changing properties in the URL instance to\n * insure that they all propagate correctly.\n *\n * @param {String} part Property we need to adjust.\n * @param {Mixed} value The newly assigned value.\n * @param {Boolean|Function} fn When setting the query, it will be the function\n * used to parse the query.\n * When setting the protocol, double slash will be\n * removed from the final url if it is true.\n * @returns {URL} URL instance for chaining.\n * @public\n */\nfunction set(part, value, fn) {\n var url = this;\n\n switch (part) {\n case 'query':\n if ('string' === typeof value && value.length) {\n value = (fn || qs.parse)(value);\n }\n\n url[part] = value;\n break;\n\n case 'port':\n url[part] = value;\n\n if (!required(value, url.protocol)) {\n url.host = url.hostname;\n url[part] = '';\n } else if (value) {\n url.host = url.hostname +':'+ value;\n }\n\n break;\n\n case 'hostname':\n url[part] = value;\n\n if (url.port) value += ':'+ url.port;\n url.host = value;\n break;\n\n case 'host':\n url[part] = value;\n\n if (/:\\d+$/.test(value)) {\n value = value.split(':');\n url.port = value.pop();\n url.hostname = value.join(':');\n } else {\n url.hostname = value;\n url.port = '';\n }\n\n break;\n\n case 'protocol':\n url.protocol = value.toLowerCase();\n url.slashes = !fn;\n break;\n\n case 'pathname':\n case 'hash':\n if (value) {\n var char = part === 'pathname' ? '/' : '#';\n url[part] = value.charAt(0) !== char ? char + value : value;\n } else {\n url[part] = value;\n }\n break;\n\n default:\n url[part] = value;\n }\n\n for (var i = 0; i < rules.length; i++) {\n var ins = rules[i];\n\n if (ins[4]) url[ins[1]] = url[ins[1]].toLowerCase();\n }\n\n url.origin = url.protocol && url.host && url.protocol !== 'file:'\n ? url.protocol +'//'+ url.host\n : 'null';\n\n url.href = url.toString();\n\n return url;\n}\n\n/**\n * Transform the properties back in to a valid and full URL string.\n *\n * @param {Function} stringify Optional query stringify function.\n * @returns {String} Compiled version of the URL.\n * @public\n */\nfunction toString(stringify) {\n if (!stringify || 'function' !== typeof stringify) stringify = qs.stringify;\n\n var query\n , url = this\n , protocol = url.protocol;\n\n if (protocol && protocol.charAt(protocol.length - 1) !== ':') protocol += ':';\n\n var result = protocol + (url.slashes ? '//' : '');\n\n if (url.username) {\n result += url.username;\n if (url.password) result += ':'+ url.password;\n result += '@';\n }\n\n result += url.host + url.pathname;\n\n query = 'object' === typeof url.query ? stringify(url.query) : url.query;\n if (query) result += '?' !== query.charAt(0) ? '?'+ query : query;\n\n if (url.hash) result += url.hash;\n\n return result;\n}\n\nUrl.prototype = { set: set, toString: toString };\n\n//\n// Expose the URL parser and some additional properties that might be useful for\n// others or testing.\n//\nUrl.extractProtocol = extractProtocol;\nUrl.location = lolcation;\nUrl.trimLeft = trimLeft;\nUrl.qs = qs;\n\nmodule.exports = Url;\n"],"names":["changeHistory","queryName","queryValue","query","urlParse","UrlParse","window","location","href","set","origin","path","replace","history","replaceState","isNamedContainer","node","Boolean","props","is","name","getNamedContainersWithChildren","children","React","reduce","nodes","push","getNamedContainers","useNamedContainersWithChildren","useMemo","useNamedContainers","DEFAULT_BROWSER","mobile","Tabs","TabsList","align","browser","className","keepMounted","inline","onChange","selectedID","scroll","tabNamesStyler","tabNamesClassName","theme","forwardedRef","writeValueToQuery","tabListProps","background","otherChildren","childrenArray","Children","useState","id","tabID","setTabID","useEffect","handleOnChange","useCallback","event","length","headerTitles","map","title","iconSrc","dataLayer","childrenFiltered","filter","List","styler","titles","ref","cn","styles","cloneElement","child","hidden","has","Object","prototype","hasOwnProperty","decode","input","decodeURIComponent","e","encode","encodeURIComponent","exports","stringify","obj","prefix","value","key","pairs","call","isNaN","join","parse","part","parser","result","exec","module","port","protocol","split","required","qs","slashes","protocolre","left","RegExp","trimLeft","str","toString","rules","address","NaN","undefined","ignore","hash","lolcation","loc","g","self","finaldestination","type","Url","unescape","pathname","test","extractProtocol","match","toLowerCase","rest","this","relative","extracted","instruction","index","instructions","slice","url","i","indexOf","charAt","base","concat","last","unshift","up","splice","resolve","host","hostname","username","password","auth","fn","pop","char","ins"],"sourceRoot":""}