| 120 | } |
| 121 | |
| 122 | function isRemoteSourceId(sourceId) { |
| 123 | const id = String(sourceId || '').trim(); |
| 124 | if (!id) return false; |
| 125 | let type = ''; |
| 126 | try { |
| 127 | if (typeof window.__frGetSourceTypeById === 'function') { |
| 128 | type = String(window.__frGetSourceTypeById(id) || ''); |
| 129 | } |
| 130 | } catch (e) { /* ignore */ } |
| 131 | if (!type) { |
| 132 | const sel = document.getElementById('sourceSelector'); |
| 133 | if (sel) { |
| 134 | const opt = Array.from(sel.options).find(o => o.value === id); |
| 135 | if (opt) type = String(opt.dataset?.sourceType || ''); |
| 136 | } |
| 137 | } |
| 138 | type = type.toLowerCase(); |
| 139 | return type !== '' && type !== 'local'; |
| 140 | } |
| 141 | |
| 142 | function showEditorLoading(fileName, seq) { |
| 143 | if (!editorLoadingEl) { |