(function () {
    function getBasePath() {
        const scripts = document.getElementsByTagName('script');
        const current = document.currentScript || scripts[scripts.length - 1];
        if (!current || !current.src) {
            return '';
        }
        const url = current.src;
        return url.replace(/icons\.js(?:\?.*)?$/, '');
    }

    const base = getBasePath();

    window.griffinformsBlockIcons = {
        block: base + 'assets/icons/block.svg',
        edit: base + 'assets/icons/edit.svg',
        builder: base + 'assets/icons/builder.svg',
    };
})();
