(rawValue = '')
| 659 | } |
| 660 | |
| 661 | function normalizeHotmailLocalBaseUrl(rawValue = '') { |
| 662 | const value = String(rawValue || '').trim(); |
| 663 | if (!value) return DEFAULT_HOTMAIL_LOCAL_BASE_URL; |
| 664 | |
| 665 | try { |
| 666 | const parsed = new URL(value); |
| 667 | if (!['http:', 'https:'].includes(parsed.protocol)) { |
| 668 | return DEFAULT_HOTMAIL_LOCAL_BASE_URL; |
| 669 | } |
| 670 | |
| 671 | if (['/messages', '/code', '/clear', '/token'].includes(parsed.pathname)) { |
| 672 | parsed.pathname = ''; |
| 673 | parsed.search = ''; |
| 674 | parsed.hash = ''; |
| 675 | } |
| 676 | |
| 677 | return parsed.toString().replace(/\/$/, ''); |
| 678 | } catch { |
| 679 | return DEFAULT_HOTMAIL_LOCAL_BASE_URL; |
| 680 | } |
| 681 | } |
| 682 | |
| 683 | function normalizeAccountRunHistoryHelperBaseUrl(rawValue = '') { |
| 684 | const value = String(rawValue || '').trim(); |
no outgoing calls
no test coverage detected