{"version":3,"file":"intersection.mjs","sources":["../../../../node_modules/ramda/es/intersection.js"],"sourcesContent":["import _includes from \"./internal/_includes.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _filter from \"./internal/_filter.js\";\nimport flip from \"./flip.js\";\nimport uniq from \"./uniq.js\";\n/**\n * Combines two lists into a set (i.e. no duplicates) composed of those\n * elements common to both lists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The list of elements found in both `list1` and `list2`.\n * @see R.innerJoin\n * @example\n *\n *      R.intersection([1,2,3,4], [7,6,5,4,3]); //=> [4, 3]\n */\n\nvar intersection =\n/*#__PURE__*/\n_curry2(function intersection(list1, list2) {\n  var lookupList, filteredList;\n\n  if (list1.length > list2.length) {\n    lookupList = list1;\n    filteredList = list2;\n  } else {\n    lookupList = list2;\n    filteredList = list1;\n  }\n\n  return uniq(_filter(flip(_includes)(lookupList), filteredList));\n});\n\nexport default intersection;"],"names":[],"mappings":";;;;;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEG,IAAC,YAAY;AAChB;AACA,OAAO,CAAC,SAAS,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE;AAC5C,EAAE,IAAI,UAAU,EAAE,YAAY;;AAE9B,EAAE,IAAI,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE;AACnC,IAAI,UAAU,GAAG,KAAK;AACtB,IAAI,YAAY,GAAG,KAAK;AACxB,EAAE,CAAC,MAAM;AACT,IAAI,UAAU,GAAG,KAAK;AACtB,IAAI,YAAY,GAAG,KAAK;AACxB,EAAE;;AAEF,EAAE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,CAAC;AACjE,CAAC;;;;","x_google_ignoreList":[0]}