Create the final config with, in that priority order, the config passed to the viewer, the custom config saved in the local storage, the default config,
the object representing the config of the viewer
the config passed to the viewer
the main key to get the config from the local storage
the backup name to get the config from the local storage
Create the final config with, in that priority order, the config passed to the viewer, the custom config saved in the local storage, the default config,