{"version":3,"sources":["jsdelivr-header.js","/npm/seattle-boundaries-data@5.0.3/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ACNA,IAAI,KAAO,QAAQ,QACf,QAAU,QAAQ,kBAClB,KAAO,QAAQ,UAEnB,OAAO,QAAU,SAAqB,GACpC,IAAI,EAAU,EAAQ,QAClB,EAAO,EAAQ,KACf,EAAM,EAAQ,IAEd,EAAQ,KAAK,MAAM,CAAC,EAAM,IAE1B,EAAa,CACf,KAAM,oBACN,SAAU,IAsBZ,OAnBA,EAAW,SAAW,QAAQ,OAAO,KAAK,MAAM,KAAI,SAAU,GAC5D,OAAO,KAAK,GAAK,SACd,QAAO,SAAU,GAChB,OAAI,EACE,GAAO,EAAgB,OAA3B,EAEO,CAEX,IACC,QAAO,SAAU,GAChB,OAAO,KAAK,OAAO,EAAO,EAC5B,IACC,KAAI,SAAU,GAGb,OAFA,EAAS,WAAa,EAAS,YAAc,CAAC,EAC9C,EAAS,WAAW,QAAU,EACvB,CACT,GACJ,KAEO,CACT","file":"/npm/seattle-boundaries-data@5.0.3/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/seattle-boundaries-data@5.0.3/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","var turf = require('turf')\nvar flatten = require('lodash.flatten')\nvar data = require('./data')\n\nmodule.exports = function boundaries (options) {\n  var dataset = options.dataset\n  var long = options.long\n  var lat = options.lat\n\n  var point = turf.point([long, lat])\n\n  var collection = {\n    type: 'FeatureCollection',\n    features: []\n  }\n\n  collection.features = flatten(Object.keys(data).map(function (key) {\n    return data[key].features\n      .filter(function (boundary) {\n        if (dataset) {\n          if (key == dataset) return boundary\n        } else {\n          return boundary\n        }\n      })\n      .filter(function (boundary) {\n        return turf.inside(point, boundary)\n      })\n      .map(function (boundary) {\n        boundary.properties = boundary.properties || {}\n        boundary.properties.dataset = key\n        return boundary\n      })\n  }))\n\n  return collection\n}\n"]}