def METHOD_NAME(prefix: str, elements: Iterable[Element]) -> Tuple[List[str],
                                                                          List[str],
                                                                          List[str],
                                                                          Dict[str, str],
                                                                          List[str]]:
    done_libraries: Set[str] = set()
    done_components: Set[str] = set()
    vue_scripts: List[str] = []
    vue_html: List[str] = []
    vue_styles: List[str] = []
    js_imports: List[str] = []
    imports: Dict[str, str] = {}
    # build the importmap structure for exposed libraries
    for key, library in libraries.items():
        if key not in done_libraries and library.expose:
            imports[library.name] = f'{prefix}/_nicegui/{__version__}/libraries/{key}'
            done_libraries.add(key)
    # build the none-optimized component (i.e. the Vue component)
    for key, vue_component in vue_components.items():
        if key not in done_components:
            vue_html.append(vue_component.html)
            vue_scripts.append(vue_component.script.replace(f"Vue.component('{vue_component.name}',",
                                                            f"app.component('{vue_component.tag}',", 1))
            vue_styles.append(vue_component.style)
            done_components.add(key)
    # build the resources associated with the elements
    for element in elements:
        for library in element.libraries:
            if library.key not in done_libraries:
                if not library.expose:
                    url = f'{prefix}/_nicegui/{__version__}/libraries/{library.key}'
                    js_imports.append(f'import "{url}";')
                done_libraries.add(library.key)
        if element.component:
            js_component = element.component
            if js_component.key not in done_components and js_component.path.suffix.lower() == '.js':
                url = f'{prefix}/_nicegui/{__version__}/components/{js_component.key}'
                js_imports.append(f'import {{ default as {js_component.name} }} from "{url}";')
                js_imports.append(f'app.component("{js_component.tag}", {js_component.name});')
                done_components.add(js_component.key)
    return vue_html, vue_styles, vue_scripts, imports, js_imports