()
| 130 | } |
| 131 | } |
| 132 | let _btoa = () => { |
| 133 | throw new Error('Unsupported environment: `btoa` or `Buffer` should be supported.'); |
| 134 | }; |
| 135 | if (typeof Buffer === 'function') { |
| 136 | _btoa = (str) => Buffer.from(str, 'utf-8').toString('base64'); |
| 137 | } else if (typeof btoa === 'function') { |