drupalSettings value is undefined
I am guessing that you need to set your heritage_ui/heritage_ui_library library to have a dependency on core/drupalSettings.

Note that looking at your code, you should also add a dependency upon core/jquery.once, and spend a bit of time learning how to use $.once(). This is because Drupal.behaviors is called often, so your code will be run multiple times unnecessarily (and potentially with problems). You can read more here: https://www.drupal.org/docs/8/api/javascript-api/javascript-api-overview