element-web-synapse01pim.gr.jp

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

785.js.map (63176B)


      1 {"version":3,"file":"bundles/12c8185ea2689492c07b/785.js","mappings":"inDAoCKA,EAAuB,SAAvBA,GAAuB,OAAvBA,EAAuB,UAAvBA,EAAuB,wBAAvBA,CAAuB,EAAvBA,GAAuB,IAMvBC,EAAK,SAALA,GAAK,OAALA,EAAK,kBAALA,EAAK,uBAALA,EAAK,4CAALA,EAAK,wBAALA,EAAK,uCAALA,EAAK,mBAALA,EAAK,kBAALA,EAAK,gBAALA,EAAK,2BAALA,CAAK,EAALA,GAAK,IAyCK,MAAMC,UAAkCC,EAAAA,cAQ5CC,WAAAA,CAAYC,GACfC,MAAMD,IAAOE,EAAAA,EAAAA,GAAAC,KAAA,uBAAAD,EAAAA,EAAAA,GAAAC,KAAA,mBAJSC,EAAAA,EAAAA,eAAwBF,EAAAA,EAAAA,GAAAC,KAAA,mBACxBC,EAAAA,EAAAA,eAAkBF,EAAAA,EAAAA,GAAAC,KAAA,wBAiCXE,IAC7BF,KAAKG,SAAS,CACVC,sBAAuBF,EAAEG,OAAOC,WAEvCP,EAAAA,EAAAA,GAAAC,KAAA,kCAEyCO,UAClCP,KAAKQ,MAAMJ,wBAA0BZ,EAAwBiB,KAC7DT,KAAKU,kBAAoBC,EAAAA,EAAgBC,UAAUC,YAAaC,kCAChEd,KAAKG,SAAS,CACVY,QAAQ,EACRC,YAAY,EACZC,eAAe,EACfC,MAAOzB,EAAM0B,WAGjBnB,KAAKG,SAAS,CACVY,QAAQ,EACRC,YAAY,EACZE,MAAOzB,EAAM2B,gBAGxBrB,EAAAA,EAAAA,GAAAC,KAAA,cAEqB,MACCqB,EAAAA,EAAAA,IAASrB,KAAKsB,gBAAgBC,UAE7CvB,KAAKG,SAAS,CACVY,QAAQ,OAGnBhB,EAAAA,EAAAA,GAAAC,KAAA,kBAEyB,KACtB,IAAKA,KAAKU,YAAa,OACvB,MAAMc,EAAO,IAAIC,KA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,EAAMM,EAAMlN,EAAMuN,GASnC,IANAA,EAAQA,GAASH,KAAK,GAAI,aAExBG,EAAMO,SAAShM,MACfyL,EAAMO,SAAS9L,KAAKyN,UAAY,kBAGd,iBAAT7C,EAAmB,OAAOK,EAASL,EAAMM,EAAMlN,GAThB,IAWtC0O,EAAsB,6BAAd9B,EAAKnL,KACbkN,EAAW,eAAezD,KAAKgD,EAAQwB,cAAgBxB,EAAQyB,OAC/Db,EAAc,eAAe5D,KAAKmD,UAAUC,WAEhD,IAAKQ,GAAgBJ,GAASC,GAAa9B,IAAyC,oBAAf+C,WAA4B,CAE/F,IAAIC,EAAS,IAAID,WACjBC,EAAOC,UAAY,WACjB,IAAIjD,EAAMgD,EAAOzK,OACjByH,EAAMiC,EAAcjC,EAAMA,EAAIkD,QAAQ,eAAgB,yBAClDxC,EAAOA,EAAM6B,SAASF,KAAOrC,EAC5BuC,SAAWvC,EAChBU,EAAQ,IACT,EACDsC,EAAOG,cAAcpD,EACtB,KAAM,KACDqD,EAAM/B,EAAQU,KAAOV,EAAQW,UAC7BqB,EAAMD,EAAIZ,gBAAgBzC,GAC1BW,EAAOA,EAAM6B,SAAWc,EACvBd,SAASF,KAAOgB,EACrB3C,EAAQ,KACR+B,WAAW,WAAcW,EAAIV,gBAAgBW,EAAM,EAAE,IACtD,CACF,GAGHhC,EAAQK,OAAShB,EAAOgB,OAAShB,EAG/B4C,EAAOC,QAAU7C","sources":["webpack://element-web/./src/async-components/views/dialogs/security/CreateSecretStorageDialog.tsx","webpack://element-web/./src/components/views/auth/PassphraseConfirmField.tsx","webpack://element-web/./src/components/views/auth/PassphraseField.tsx","webpack://element-web/../node_modules/.pnpm/file-saver@2.0.5/node_modules/file-saver/src/FileSaver.js"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\nCopyright 2019, 2020 , 2023 The Matrix.org Foundation C.I.C.\nCopyright 2018, 2019 New Vector Ltd\n\nSPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { type JSX, createRef } from \"react\";\nimport FileSaver from \"file-saver\";\nimport { logger } from \"matrix-js-sdk/src/logger\";\nimport { type AuthDict } from \"matrix-js-sdk/src/matrix\";\nimport { type GeneratedSecretStorageKey } from \"matrix-js-sdk/src/crypto-api\";\nimport classNames from \"classnames\";\nimport CheckmarkIcon from \"@vector-im/compound-design-tokens/assets/web/icons/check\";\n\nimport { MatrixClientPeg } from \"../../../../MatrixClientPeg\";\nimport { _t, _td } from \"../../../../languageHandler\";\nimport Modal from \"../../../../Modal\";\nimport { copyNode } from \"../../../../utils/strings\";\nimport { SSOAuthEntry } from \"../../../../components/views/auth/InteractiveAuthEntryComponents\";\nimport PassphraseField from \"../../../../components/views/auth/PassphraseField\";\nimport StyledRadioButton from \"../../../../components/views/elements/StyledRadioButton\";\nimport AccessibleButton from \"../../../../components/views/elements/AccessibleButton\";\nimport DialogButtons from \"../../../../components/views/elements/DialogButtons\";\nimport InlineSpinner from \"../../../../components/views/elements/InlineSpinner\";\nimport { ModuleRunner } from \"../../../../modules/ModuleRunner\";\nimport type Field from \"../../../../components/views/elements/Field\";\nimport BaseDialog from \"../../../../components/views/dialogs/BaseDialog\";\nimport Spinner from \"../../../../components/views/elements/Spinner\";\nimport InteractiveAuthDialog from \"../../../../components/views/dialogs/InteractiveAuthDialog\";\nimport { type IValidationResult } from \"../../../../components/views/elements/Validation\";\nimport PassphraseConfirmField from \"../../../../components/views/auth/PassphraseConfirmField\";\nimport { initialiseDehydrationIfEnabled } from \"../../../../utils/device/dehydration\";\n\nenum SecureBackupSetupMethod {\n    Key = \"key\",\n    Passphrase = \"passphrase\",\n}\n\n// I made a mistake while converting this and it has to be fixed!\nenum Phase {\n    Loading = \"loading\",\n    LoadError = \"load_error\",\n    ChooseKeyPassphrase = \"choose_key_passphrase\",\n    Passphrase = \"passphrase\",\n    PassphraseConfirm = \"passphrase_confirm\",\n    ShowKey = \"show_key\",\n    Storing = \"storing\",\n    Stored = \"stored\",\n    ConfirmSkip = \"confirm_skip\",\n}\n\nconst PASSWORD_MIN_SCORE = 4; // So secure, many characters, much complex, wow, etc, etc.\n\ninterface IProps {\n    forceReset?: boolean;\n    onFinished(ok?: boolean): void;\n}\n\ninterface IState {\n    phase: Phase;\n    passPhrase: string;\n    passPhraseValid: boolean;\n    passPhraseConfirm: string;\n    copied: boolean;\n    downloaded: boolean;\n    setPassphrase: boolean;\n\n    passPhraseKeySelected: string;\n    error?: boolean;\n}\n\n/**\n * Walks the user through the process of creating a 4S passphrase and bootstrapping secret storage.\n *\n * If the user already has a key backup, follows a \"migration\" flow (aka \"Upgrade your encryption\") which\n * prompts the user to enter their backup decryption password (a Curve25519 private key, possibly derived\n * from a passphrase), and uses that as the (AES) 4S encryption key.\n *\n * @deprecated send the user to EncryptionUserSettingsTab instead\n */\nexport default class CreateSecretStorageDialog extends React.PureComponent<IProps, IState> {\n    public static defaultProps: Partial<IProps> = {\n        forceReset: false,\n    };\n    private recoveryKey?: GeneratedSecretStorageKey;\n    private recoveryKeyNode = createRef<HTMLElement>();\n    private passphraseField = createRef<Field>();\n\n    public constructor(props: IProps) {\n        super(props);\n\n        const keyFromCustomisations = ModuleRunner.instance.extensions.cryptoSetup.createSecretStorageKey();\n        const phase = keyFromCustomisations ? Phase.Loading : Phase.ChooseKeyPassphrase;\n\n        this.state = {\n            phase,\n            passPhrase: \"\",\n            passPhraseValid: false,\n            passPhraseConfirm: \"\",\n            copied: false,\n            downloaded: false,\n            setPassphrase: false,\n            passPhraseKeySelected: SecureBackupSetupMethod.Key,\n        };\n    }\n\n    public componentDidMount(): void {\n        const keyFromCustomisations = ModuleRunner.instance.extensions.cryptoSetup.createSecretStorageKey();\n        if (keyFromCustomisations) this.initExtension(keyFromCustomisations);\n    }\n\n    private initExtension(keyFromCustomisations: Uint8Array<ArrayBuffer>): void {\n        logger.log(\"CryptoSetupExtension: Created key via extension, jumping to bootstrap step\");\n        this.recoveryKey = {\n            privateKey: keyFromCustomisations,\n        };\n        this.bootstrapSecretStorage();\n    }\n\n    private onKeyPassphraseChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n        this.setState({\n            passPhraseKeySelected: e.target.value,\n        });\n    };\n\n    private onChooseKeyPassphraseFormSubmit = async (): Promise<void> => {\n        if (this.state.passPhraseKeySelected === SecureBackupSetupMethod.Key) {\n            this.recoveryKey = await MatrixClientPeg.safeGet().getCrypto()!.createRecoveryKeyFromPassphrase();\n            this.setState({\n                copied: false,\n                downloaded: false,\n                setPassphrase: false,\n                phase: Phase.ShowKey,\n            });\n        } else {\n            this.setState({\n                copied: false,\n                downloaded: false,\n                phase: Phase.Passphrase,\n            });\n        }\n    };\n\n    private onCopyClick = (): void => {\n        const successful = copyNode(this.recoveryKeyNode.current);\n        if (successful) {\n            this.setState({\n                copied: true,\n            });\n        }\n    };\n\n    private onDownloadClick = (): void => {\n        if (!this.recoveryKey) return;\n        const blob = new Blob([this.recoveryKey.encodedPrivateKey!], {\n            type: \"text/plain;charset=us-ascii\",\n        });\n        FileSaver.saveAs(blob, \"security-key.txt\");\n\n        this.setState({\n            downloaded: true,\n        });\n    };\n\n    private doBootstrapUIAuth = async (makeRequest: (authData: AuthDict) => Promise<void>): Promise<void> => {\n        const dialogAesthetics = {\n            [SSOAuthEntry.PHASE_PREAUTH]: {\n                title: _t(\"auth|uia|sso_title\"),\n                body: _t(\"auth|uia|sso_preauth_body\"),\n                continueText: _t(\"auth|sso\"),\n                continueKind: \"primary\",\n            },\n            [SSOAuthEntry.PHASE_POSTAUTH]: {\n                title: _t(\"encryption|confirm_encryption_setup_title\"),\n                body: _t(\"encryption|confirm_encryption_setup_body\"),\n                continueText: _t(\"action|confirm\"),\n                continueKind: \"primary\",\n            },\n        };\n\n        const { finished } = Modal.createDialog(InteractiveAuthDialog, {\n            title: _t(\"encryption|bootstrap_title\"),\n            matrixClient: MatrixClientPeg.safeGet(),\n            makeRequest,\n            aestheticsForStagePhases: {\n                [SSOAuthEntry.LOGIN_TYPE]: dialogAesthetics,\n                [SSOAuthEntry.UNSTABLE_LOGIN_TYPE]: dialogAesthetics,\n            },\n        });\n        const [confirmed] = await finished;\n        if (!confirmed) {\n            throw new Error(\"Cross-signing key upload auth canceled\");\n        }\n    };\n\n    private bootstrapSecretStorage = async (): Promise<void> => {\n        const cli = MatrixClientPeg.safeGet();\n        const crypto = cli.getCrypto()!;\n        const { forceReset } = this.props;\n\n        let backupInfo;\n        // First, unless we know we want to do a reset, we see if there is an existing key backup\n        if (!forceReset) {\n            try {\n                this.setState({ phase: Phase.Loading });\n                backupInfo = await crypto.getKeyBackupInfo();\n            } catch (e) {\n                logger.error(\"Error fetching backup data from server\", e);\n                this.setState({ phase: Phase.LoadError });\n                return;\n            }\n        }\n\n        this.setState({\n            phase: Phase.Storing,\n            error: undefined,\n        });\n\n        try {\n            if (forceReset) {\n                /* Resetting cross-signing requires secret storage to be reset\n                 * (otherwise it will try to store the cross-signing keys in the\n                 * old secret storage, and may prompt for the old key, which is\n                 * probably not available), and resetting key backup requires\n                 * cross-signing to be reset (so that the new backup can be\n                 * signed by the new cross-signing key).  So we reset secret\n                 * storage first, then cross-signing, then key backup.\n                 */\n                logger.log(\"Forcing secret storage reset\");\n                await crypto.bootstrapSecretStorage({\n                    createSecretStorageKey: async () => this.recoveryKey!,\n                    setupNewSecretStorage: true,\n                });\n                logger.log(\"Resetting key backup\");\n                await crypto.resetKeyBackup();\n            } else {\n                // For password authentication users after 2020-09, this cross-signing\n                // step will be a no-op since it is now setup during registration or login\n                // when needed. We should keep this here to cover other cases such as:\n                //   * Users with existing sessions prior to 2020-09 changes\n                //   * SSO authentication users which require interactive auth to upload\n                //     keys (and also happen to skip all post-authentication flows at the\n                //     moment via token login)\n                await crypto.bootstrapCrossSigning({\n                    authUploadDeviceSigningKeys: this.doBootstrapUIAuth,\n                });\n                await crypto.bootstrapSecretStorage({\n                    createSecretStorageKey: async () => this.recoveryKey!,\n                    setupNewKeyBackup: !backupInfo,\n                });\n            }\n            await initialiseDehydrationIfEnabled(cli, { createNewKey: true });\n\n            this.setState({\n                phase: Phase.Stored,\n            });\n        } catch (e) {\n            this.setState({ error: true });\n            logger.error(\"Error bootstrapping secret storage\", e);\n        }\n    };\n\n    private onCancel = (): void => {\n        this.props.onFinished(false);\n    };\n\n    private onLoadRetryClick = (): void => {\n        this.bootstrapSecretStorage();\n    };\n\n    private onShowKeyContinueClick = (): void => {\n        this.bootstrapSecretStorage();\n    };\n\n    private onCancelClick = (): void => {\n        this.setState({ phase: Phase.ConfirmSkip });\n    };\n\n    private onGoBackClick = (): void => {\n        this.setState({ phase: Phase.ChooseKeyPassphrase });\n    };\n\n    private onPassPhraseNextClick = async (e: React.FormEvent): Promise<void> => {\n        e.preventDefault();\n        if (!this.passphraseField.current) return; // unmounting\n\n        await this.passphraseField.current.validate({ allowEmpty: false });\n        if (!this.passphraseField.current.state.valid) {\n            this.passphraseField.current.focus();\n            this.passphraseField.current.validate({ allowEmpty: false, focused: true });\n            return;\n        }\n\n        this.setState({ phase: Phase.PassphraseConfirm });\n    };\n\n    private onPassPhraseConfirmNextClick = async (e: React.FormEvent): Promise<void> => {\n        e.preventDefault();\n\n        if (this.state.passPhrase !== this.state.passPhraseConfirm) return;\n\n        this.recoveryKey = await MatrixClientPeg.safeGet()\n            .getCrypto()!\n            .createRecoveryKeyFromPassphrase(this.state.passPhrase);\n        this.setState({\n            copied: false,\n            downloaded: false,\n            setPassphrase: true,\n            phase: Phase.ShowKey,\n        });\n    };\n\n    private onSetAgainClick = (): void => {\n        this.setState({\n            passPhrase: \"\",\n            passPhraseValid: false,\n            passPhraseConfirm: \"\",\n            phase: Phase.Passphrase,\n        });\n    };\n\n    private onPassPhraseValidate = (result: IValidationResult): void => {\n        this.setState({\n            passPhraseValid: !!result.valid,\n        });\n    };\n\n    private onPassPhraseChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n        this.setState({\n            passPhrase: e.target.value,\n        });\n    };\n\n    private onPassPhraseConfirmChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n        this.setState({\n            passPhraseConfirm: e.target.value,\n        });\n    };\n\n    private renderOptionKey(): JSX.Element {\n        return (\n            <StyledRadioButton\n                key={SecureBackupSetupMethod.Key}\n                value={SecureBackupSetupMethod.Key}\n                name=\"keyPassphrase\"\n                checked={this.state.passPhraseKeySelected === SecureBackupSetupMethod.Key}\n                onChange={this.onKeyPassphraseChange}\n                outlined\n            >\n                <div className=\"mx_CreateSecretStorageDialog_optionTitle\">\n                    {_t(\"settings|key_backup|setup_secure_backup|generate_security_key_title\")}\n                </div>\n                <div>{_t(\"settings|key_backup|setup_secure_backup|generate_security_key_description\")}</div>\n            </StyledRadioButton>\n        );\n    }\n\n    private renderOptionPassphrase(): JSX.Element {\n        return (\n            <StyledRadioButton\n                key={SecureBackupSetupMethod.Passphrase}\n                value={SecureBackupSetupMethod.Passphrase}\n                name=\"keyPassphrase\"\n                checked={this.state.passPhraseKeySelected === SecureBackupSetupMethod.Passphrase}\n                onChange={this.onKeyPassphraseChange}\n                outlined\n            >\n                <div className=\"mx_CreateSecretStorageDialog_optionTitle\">\n                    {_t(\"settings|key_backup|setup_secure_backup|enter_phrase_title\")}\n                </div>\n                <div>{_t(\"settings|key_backup|setup_secure_backup|use_phrase_only_you_know\")}</div>\n            </StyledRadioButton>\n        );\n    }\n\n    private renderPhaseChooseKeyPassphrase(): JSX.Element {\n        const optionKey = this.renderOptionKey();\n        const optionPassphrase = this.renderOptionPassphrase();\n\n        return (\n            <form onSubmit={this.onChooseKeyPassphraseFormSubmit}>\n                <p className=\"mx_CreateSecretStorageDialog_centeredBody\">\n                    {_t(\"settings|key_backup|setup_secure_backup|description\")}\n                </p>\n                <div className=\"mx_CreateSecretStorageDialog_primaryContainer\" role=\"radiogroup\">\n                    {optionKey}\n                    {optionPassphrase}\n                </div>\n                <DialogButtons\n                    primaryButton={_t(\"action|continue\")}\n                    onPrimaryButtonClick={this.onChooseKeyPassphraseFormSubmit}\n                    onCancel={this.onCancelClick}\n                />\n            </form>\n        );\n    }\n\n    private renderPhasePassPhrase(): JSX.Element {\n        return (\n            <form onSubmit={this.onPassPhraseNextClick}>\n                <p>{_t(\"settings|key_backup|setup_secure_backup|enter_phrase_description\")}</p>\n\n                <div className=\"mx_CreateSecretStorageDialog_passPhraseContainer\">\n                    <PassphraseField\n                        id=\"mx_passPhraseInput\"\n                        className=\"mx_CreateSecretStorageDialog_passPhraseField\"\n                        onChange={this.onPassPhraseChange}\n                        minScore={PASSWORD_MIN_SCORE}\n                        value={this.state.passPhrase}\n                        onValidate={this.onPassPhraseValidate}\n                        fieldRef={this.passphraseField}\n                        autoFocus={true}\n                        label={_td(\"settings|key_backup|setup_secure_backup|enter_phrase_title\")}\n                        labelEnterPassword={_td(\"settings|key_backup|setup_secure_backup|enter_phrase_title\")}\n                        labelStrongPassword={_td(\"settings|key_backup|setup_secure_backup|phrase_strong_enough\")}\n                        labelAllowedButUnsafe={_td(\"settings|key_backup|setup_secure_backup|phrase_strong_enough\")}\n                    />\n                </div>\n\n                <DialogButtons\n                    primaryButton={_t(\"action|continue\")}\n                    onPrimaryButtonClick={this.onPassPhraseNextClick}\n                    hasCancel={false}\n                    disabled={!this.state.passPhraseValid}\n                >\n                    <button type=\"button\" onClick={this.onCancelClick} className=\"danger\">\n                        {_t(\"action|cancel\")}\n                    </button>\n                </DialogButtons>\n            </form>\n        );\n    }\n\n    private renderPhasePassPhraseConfirm(): JSX.Element {\n        let matchText;\n        let changeText;\n        if (this.state.passPhraseConfirm === this.state.passPhrase) {\n            matchText = _t(\"settings|key_backup|setup_secure_backup|pass_phrase_match_success\");\n            changeText = _t(\"settings|key_backup|setup_secure_backup|use_different_passphrase\");\n        } else if (!this.state.passPhrase.startsWith(this.state.passPhraseConfirm)) {\n            // only tell them they're wrong if they've actually gone wrong.\n            // Security conscious readers will note that if you left element-web unattended\n            // on this screen, this would make it easy for a malicious person to guess\n            // your passphrase one letter at a time, but they could get this faster by\n            // just opening the browser's developer tools and reading it.\n            // Note that not having typed anything at all will not hit this clause and\n            // fall through so empty box === no hint.\n            matchText = _t(\"settings|key_backup|setup_secure_backup|pass_phrase_match_failed\");\n            changeText = _t(\"settings|key_backup|setup_secure_backup|set_phrase_again\");\n        }\n\n        let passPhraseMatch: JSX.Element | undefined;\n        if (matchText) {\n            passPhraseMatch = (\n                <div>\n                    <div>{matchText}</div>\n                    <AccessibleButton kind=\"link\" onClick={this.onSetAgainClick}>\n                        {changeText}\n                    </AccessibleButton>\n                </div>\n            );\n        }\n        return (\n            <form onSubmit={this.onPassPhraseConfirmNextClick}>\n                <p>{_t(\"settings|key_backup|setup_secure_backup|enter_phrase_to_confirm\")}</p>\n                <div className=\"mx_CreateSecretStorageDialog_passPhraseContainer\">\n                    <PassphraseConfirmField\n                        id=\"mx_passPhraseInput\"\n                        onChange={this.onPassPhraseConfirmChange}\n                        value={this.state.passPhraseConfirm}\n                        className=\"mx_CreateSecretStorageDialog_passPhraseField\"\n                        label={_td(\"settings|key_backup|setup_secure_backup|confirm_security_phrase\")}\n                        labelRequired={_td(\"settings|key_backup|setup_secure_backup|confirm_security_phrase\")}\n                        labelInvalid={_td(\"settings|key_backup|setup_secure_backup|pass_phrase_match_failed\")}\n                        autoFocus={true}\n                        password={this.state.passPhrase}\n                    />\n                    <div className=\"mx_CreateSecretStorageDialog_passPhraseMatch\">{passPhraseMatch}</div>\n                </div>\n                <DialogButtons\n                    primaryButton={_t(\"action|continue\")}\n                    onPrimaryButtonClick={this.onPassPhraseConfirmNextClick}\n                    hasCancel={false}\n                    disabled={this.state.passPhrase !== this.state.passPhraseConfirm}\n                >\n                    <button type=\"button\" onClick={this.onCancelClick} className=\"danger\">\n                        {_t(\"action|skip\")}\n                    </button>\n                </DialogButtons>\n            </form>\n        );\n    }\n\n    private renderPhaseShowKey(): JSX.Element {\n        let continueButton: JSX.Element;\n        if (this.state.phase === Phase.ShowKey) {\n            continueButton = (\n                <DialogButtons\n                    primaryButton={_t(\"action|continue\")}\n                    disabled={!this.state.downloaded && !this.state.copied && !this.state.setPassphrase}\n                    onPrimaryButtonClick={this.onShowKeyContinueClick}\n                    hasCancel={false}\n                />\n            );\n        } else {\n            continueButton = (\n                <div className=\"mx_CreateSecretStorageDialog_continueSpinner\">\n                    <InlineSpinner />\n                </div>\n            );\n        }\n\n        return (\n            <div>\n                <p>{_t(\"settings|key_backup|setup_secure_backup|security_key_safety_reminder\")}</p>\n                <div className=\"mx_CreateSecretStorageDialog_primaryContainer mx_CreateSecretStorageDialog_recoveryKeyPrimarycontainer\">\n                    <div className=\"mx_CreateSecretStorageDialog_recoveryKeyContainer\">\n                        <div className=\"mx_CreateSecretStorageDialog_recoveryKey\">\n                            <code ref={this.recoveryKeyNode}>{this.recoveryKey?.encodedPrivateKey}</code>\n                        </div>\n                        <div className=\"mx_CreateSecretStorageDialog_recoveryKeyButtons\">\n                            <AccessibleButton\n                                kind=\"primary\"\n                                className=\"mx_Dialog_primary\"\n                                onClick={this.onDownloadClick}\n                                disabled={this.state.phase === Phase.Storing}\n                            >\n                                {_t(\"action|download\")}\n                            </AccessibleButton>\n                            <span>\n                                {_t(\"settings|key_backup|setup_secure_backup|download_or_copy\", {\n                                    downloadButton: \"\",\n                                    copyButton: \"\",\n                                })}\n                            </span>\n                            <AccessibleButton\n                                kind=\"primary\"\n                                className=\"mx_Dialog_primary mx_CreateSecretStorageDialog_recoveryKeyButtons_copyBtn\"\n                                onClick={this.onCopyClick}\n                                disabled={this.state.phase === Phase.Storing}\n                            >\n                                {this.state.copied ? _t(\"common|copied\") : _t(\"action|copy\")}\n                            </AccessibleButton>\n                        </div>\n                    </div>\n                </div>\n                {continueButton}\n            </div>\n        );\n    }\n\n    private renderBusyPhase(): JSX.Element {\n        return (\n            <div>\n                <Spinner />\n            </div>\n        );\n    }\n\n    private renderStoredPhase(): JSX.Element {\n        return (\n            <>\n                <p className=\"mx_Dialog_content\">\n                    {_t(\"settings|key_backup|setup_secure_backup|backup_setup_success_description\")}\n                </p>\n                <DialogButtons\n                    primaryButton={_t(\"action|done\")}\n                    onPrimaryButtonClick={() => this.props.onFinished(true)}\n                    hasCancel={false}\n                />\n            </>\n        );\n    }\n\n    private renderPhaseLoadError(): JSX.Element {\n        return (\n            <div>\n                <p>{_t(\"settings|key_backup|setup_secure_backup|secret_storage_query_failure\")}</p>\n                <div className=\"mx_Dialog_buttons\">\n                    <DialogButtons\n                        primaryButton={_t(\"action|retry\")}\n                        onPrimaryButtonClick={this.onLoadRetryClick}\n                        onCancel={this.onCancel}\n                    />\n                </div>\n            </div>\n        );\n    }\n\n    private renderPhaseSkipConfirm(): JSX.Element {\n        return (\n            <div>\n                <p>{_t(\"settings|key_backup|setup_secure_backup|cancel_warning\")}</p>\n                <p>{_t(\"settings|key_backup|setup_secure_backup|settings_reminder\")}</p>\n                <DialogButtons\n                    primaryButton={_t(\"action|go_back\")}\n                    onPrimaryButtonClick={this.onGoBackClick}\n                    hasCancel={false}\n                >\n                    <button type=\"button\" className=\"danger\" onClick={this.onCancel}>\n                        {_t(\"action|cancel\")}\n                    </button>\n                </DialogButtons>\n            </div>\n        );\n    }\n\n    private titleForPhase(phase: Phase): string {\n        switch (phase) {\n            case Phase.ChooseKeyPassphrase:\n                return _t(\"encryption|set_up_toast_title\");\n            case Phase.Passphrase:\n                return _t(\"settings|key_backup|setup_secure_backup|title_set_phrase\");\n            case Phase.PassphraseConfirm:\n                return _t(\"settings|key_backup|setup_secure_backup|title_confirm_phrase\");\n            case Phase.ConfirmSkip:\n                return _t(\"common|are_you_sure\");\n            case Phase.ShowKey:\n                return _t(\"settings|key_backup|setup_secure_backup|title_save_key\");\n            case Phase.Storing:\n                return _t(\"encryption|bootstrap_title\");\n            case Phase.Stored:\n                return _t(\"settings|key_backup|setup_secure_backup|backup_setup_success_title\");\n            default:\n                return \"\";\n        }\n    }\n\n    private get topComponent(): React.ReactNode | null {\n        if (this.state.phase === Phase.Stored) {\n            return <CheckmarkIcon className=\"mx_Icon mx_Icon_circle-40 mx_Icon_accent mx_Icon_bg-accent-light\" />;\n        }\n\n        return null;\n    }\n\n    private get classNames(): string {\n        return classNames(\"mx_CreateSecretStorageDialog\", {\n            mx_SuccessDialog: this.state.phase === Phase.Stored,\n        });\n    }\n\n    public render(): React.ReactNode {\n        let content;\n        if (this.state.error) {\n            content = (\n                <div>\n                    <p>{_t(\"settings|key_backup|setup_secure_backup|unable_to_setup\")}</p>\n                    <div className=\"mx_Dialog_buttons\">\n                        <DialogButtons\n                            primaryButton={_t(\"action|retry\")}\n                            onPrimaryButtonClick={this.bootstrapSecretStorage}\n                            onCancel={this.onCancel}\n                        />\n                    </div>\n                </div>\n            );\n        } else {\n            switch (this.state.phase) {\n                case Phase.Loading:\n                    content = this.renderBusyPhase();\n                    break;\n                case Phase.LoadError:\n                    content = this.renderPhaseLoadError();\n                    break;\n                case Phase.ChooseKeyPassphrase:\n                    content = this.renderPhaseChooseKeyPassphrase();\n                    break;\n                case Phase.Passphrase:\n                    content = this.renderPhasePassPhrase();\n                    break;\n                case Phase.PassphraseConfirm:\n                    content = this.renderPhasePassPhraseConfirm();\n                    break;\n                case Phase.ShowKey:\n                    content = this.renderPhaseShowKey();\n                    break;\n                case Phase.Storing:\n                    content = this.renderBusyPhase();\n                    break;\n                case Phase.Stored:\n                    content = this.renderStoredPhase();\n                    break;\n                case Phase.ConfirmSkip:\n                    content = this.renderPhaseSkipConfirm();\n                    break;\n            }\n        }\n\n        let titleClass: string | string[] | undefined;\n        switch (this.state.phase) {\n            case Phase.ChooseKeyPassphrase:\n                titleClass = \"mx_CreateSecretStorageDialog_centeredTitle\";\n                break;\n        }\n\n        return (\n            <BaseDialog\n                className={this.classNames}\n                onFinished={this.props.onFinished}\n                top={this.topComponent}\n                title={this.titleForPhase(this.state.phase)}\n                titleClass={titleClass}\n                hasCancel={false}\n                fixedWidth={false}\n            >\n                <div>{content}</div>\n            </BaseDialog>\n        );\n    }\n}\n","/*\nCopyright 2024 New Vector Ltd.\nCopyright 2021 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { type ComponentProps, PureComponent, type Ref } from \"react\";\n\nimport Field, { type IInputProps } from \"../elements/Field\";\nimport withValidation, { type IFieldState, type IValidationResult } from \"../elements/Validation\";\nimport { _t, _td } from \"../../../languageHandler\";\n\ninterface IProps extends Omit<IInputProps, \"onValidate\" | \"label\" | \"element\"> {\n    id?: string;\n    fieldRef?: Ref<Field>;\n    autoComplete?: string;\n    value: string;\n    password: string; // The password we're confirming\n\n    label: TranslationKey;\n    labelRequired: TranslationKey;\n    labelInvalid: TranslationKey;\n    tooltipAlignment?: ComponentProps<typeof Field>[\"tooltipAlignment\"];\n    onChange(ev: React.FormEvent<HTMLElement>): void;\n    onValidate?(result: IValidationResult): void;\n}\n\nclass PassphraseConfirmField extends PureComponent<IProps> {\n    public static defaultProps = {\n        label: _td(\"auth|change_password_confirm_label\"),\n        labelRequired: _td(\"auth|change_password_confirm_label\"),\n        labelInvalid: _td(\"auth|change_password_confirm_invalid\"),\n    };\n\n    private validate = withValidation({\n        rules: [\n            {\n                key: \"required\",\n                test: ({ value, allowEmpty }) => allowEmpty || !!value,\n                invalid: () => _t(this.props.labelRequired),\n            },\n            {\n                key: \"match\",\n                test: ({ value }) => !value || value === this.props.password,\n                invalid: () => _t(this.props.labelInvalid),\n            },\n        ],\n    });\n\n    private onValidate = async (fieldState: IFieldState): Promise<IValidationResult> => {\n        const result = await this.validate(fieldState);\n        if (this.props.onValidate) {\n            this.props.onValidate(result);\n        }\n\n        return result;\n    };\n\n    public render(): React.ReactNode {\n        return (\n            <Field\n                id={this.props.id}\n                ref={this.props.fieldRef}\n                type=\"password\"\n                label={_t(this.props.label)}\n                autoComplete={this.props.autoComplete}\n                value={this.props.value}\n                onChange={this.props.onChange}\n                onValidate={this.onValidate}\n                autoFocus={this.props.autoFocus}\n                tooltipAlignment={this.props.tooltipAlignment}\n            />\n        );\n    }\n}\n\nexport default PassphraseConfirmField;\n","/*\nCopyright 2024 New Vector Ltd.\nCopyright 2020 The Matrix.org Foundation C.I.C.\n\nSPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { type ComponentProps, PureComponent, type Ref } from \"react\";\nimport classNames from \"classnames\";\n\nimport type { ZxcvbnResult } from \"@zxcvbn-ts/core\";\nimport SdkConfig from \"../../../SdkConfig\";\nimport withValidation, { type IFieldState, type IValidationResult } from \"../elements/Validation\";\nimport { _t, _td } from \"../../../languageHandler\";\nimport Field, { type IInputProps } from \"../elements/Field\";\nimport { MatrixClientPeg } from \"../../../MatrixClientPeg\";\n\ninterface IProps extends Omit<IInputProps, \"onValidate\" | \"element\"> {\n    autoFocus?: boolean;\n    id?: string;\n    className?: string;\n    minScore: 0 | 1 | 2 | 3 | 4;\n    value: string;\n    fieldRef?: Ref<Field>;\n    // Additional strings such as a username used to catch bad passwords\n    userInputs?: string[];\n\n    label: TranslationKey;\n    labelEnterPassword: TranslationKey;\n    labelStrongPassword: TranslationKey;\n    labelAllowedButUnsafe: TranslationKey;\n    tooltipAlignment?: ComponentProps<typeof Field>[\"tooltipAlignment\"];\n\n    onChange(ev: React.FormEvent<HTMLElement>): void;\n    onValidate?(result: IValidationResult): void;\n}\n\nclass PassphraseField extends PureComponent<IProps> {\n    public static defaultProps = {\n        label: _td(\"common|password\"),\n        labelEnterPassword: _td(\"auth|password_field_label\"),\n        labelStrongPassword: _td(\"auth|password_field_strong_label\"),\n        labelAllowedButUnsafe: _td(\"auth|password_field_weak_label\"),\n    };\n\n    public readonly validate = withValidation<this, ZxcvbnResult | null>({\n        description: function (complexity) {\n            const score = complexity ? complexity.score : 0;\n            return <progress className=\"mx_PassphraseField_progress\" max={4} value={score} />;\n        },\n        deriveData: async ({ value }): Promise<ZxcvbnResult | null> => {\n            if (!value) return null;\n            const { scorePassword } = await import(\"../../../utils/PasswordScorer\");\n            return scorePassword(MatrixClientPeg.get(), value, this.props.userInputs);\n        },\n        rules: [\n            {\n                key: \"required\",\n                test: ({ value, allowEmpty }) => allowEmpty || !!value,\n                invalid: () => _t(this.props.labelEnterPassword),\n            },\n            {\n                key: \"complexity\",\n                test: async function ({ value }, complexity): Promise<boolean> {\n                    if (!value || !complexity) {\n                        return false;\n                    }\n                    const safe = complexity.score >= this.props.minScore;\n                    const allowUnsafe = SdkConfig.get(\"dangerously_allow_unsafe_and_insecure_passwords\");\n                    return allowUnsafe || safe;\n                },\n                valid: function (complexity) {\n                    // Unsafe passwords that are valid are only possible through a\n                    // configuration flag. We'll print some helper text to signal\n                    // to the user that their password is allowed, but unsafe.\n                    if (complexity && complexity.score >= this.props.minScore) {\n                        return _t(this.props.labelStrongPassword);\n                    }\n                    return _t(this.props.labelAllowedButUnsafe);\n                },\n                invalid: function (complexity) {\n                    if (!complexity) {\n                        return null;\n                    }\n                    const { feedback } = complexity;\n                    return feedback.warning || feedback.suggestions[0] || _t(\"auth|password_field_keep_going_prompt\");\n                },\n            },\n        ],\n        memoize: true,\n    });\n\n    public onValidate = async (fieldState: IFieldState): Promise<IValidationResult> => {\n        const result = await this.validate(fieldState);\n        if (this.props.onValidate) {\n            this.props.onValidate(result);\n        }\n        return result;\n    };\n\n    public render(): React.ReactNode {\n        return (\n            <Field\n                id={this.props.id}\n                autoFocus={this.props.autoFocus}\n                className={classNames(\"mx_PassphraseField\", this.props.className)}\n                ref={this.props.fieldRef}\n                type=\"password\"\n                autoComplete=\"new-password\"\n                label={_t(this.props.label)}\n                value={this.props.value}\n                onChange={this.props.onChange}\n                onValidate={this.onValidate}\n                tooltipAlignment={this.props.tooltipAlignment}\n            />\n        );\n    }\n}\n\nexport default PassphraseField;\n","/*\n* FileSaver.js\n* A saveAs() FileSaver implementation.\n*\n* By Eli Grey, http://eligrey.com\n*\n* License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)\n* source  : http://purl.eligrey.com/github/FileSaver.js\n*/\n\n// The one and only way of getting global scope in all environments\n// https://stackoverflow.com/q/3277182/1008999\nvar _global = typeof window === 'object' && window.window === window\n  ? window : typeof self === 'object' && self.self === self\n  ? self : typeof global === 'object' && global.global === global\n  ? global\n  : this\n\nfunction bom (blob, opts) {\n  if (typeof opts === 'undefined') opts = { autoBom: false }\n  else if (typeof opts !== 'object') {\n    console.warn('Deprecated: Expected third argument to be a object')\n    opts = { autoBom: !opts }\n  }\n\n  // prepend BOM for UTF-8 XML and text/* types (including HTML)\n  // note: your browser will automatically convert UTF-16 U+FEFF to EF BB BF\n  if (opts.autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n    return new Blob([String.fromCharCode(0xFEFF), blob], { type: blob.type })\n  }\n  return blob\n}\n\nfunction download (url, name, opts) {\n  var xhr = new XMLHttpRequest()\n  xhr.open('GET', url)\n  xhr.responseType = 'blob'\n  xhr.onload = function () {\n    saveAs(xhr.response, name, opts)\n  }\n  xhr.onerror = function () {\n    console.error('could not download file')\n  }\n  xhr.send()\n}\n\nfunction corsEnabled (url) {\n  var xhr = new XMLHttpRequest()\n  // use sync to avoid popup blocker\n  xhr.open('HEAD', url, false)\n  try {\n    xhr.send()\n  } catch (e) {}\n  return xhr.status >= 200 && xhr.status <= 299\n}\n\n// `a.click()` doesn't work for all browsers (#465)\nfunction click (node) {\n  try {\n    node.dispatchEvent(new MouseEvent('click'))\n  } catch (e) {\n    var evt = document.createEvent('MouseEvents')\n    evt.initMouseEvent('click', true, true, window, 0, 0, 0, 80,\n                          20, false, false, false, false, 0, null)\n    node.dispatchEvent(evt)\n  }\n}\n\n// Detect WebView inside a native macOS app by ruling out all browsers\n// We just need to check for 'Safari' because all other browsers (besides Firefox) include that too\n// https://www.whatismybrowser.com/guides/the-latest-user-agent/macos\nvar isMacOSWebView = _global.navigator && /Macintosh/.test(navigator.userAgent) && /AppleWebKit/.test(navigator.userAgent) && !/Safari/.test(navigator.userAgent)\n\nvar saveAs = _global.saveAs || (\n  // probably in some web worker\n  (typeof window !== 'object' || window !== _global)\n    ? function saveAs () { /* noop */ }\n\n  // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView\n  : ('download' in HTMLAnchorElement.prototype && !isMacOSWebView)\n  ? function saveAs (blob, name, opts) {\n    var URL = _global.URL || _global.webkitURL\n    var a = document.createElement('a')\n    name = name || blob.name || 'download'\n\n    a.download = name\n    a.rel = 'noopener' // tabnabbing\n\n    // TODO: detect chrome extensions & packaged apps\n    // a.target = '_blank'\n\n    if (typeof blob === 'string') {\n      // Support regular links\n      a.href = blob\n      if (a.origin !== location.origin) {\n        corsEnabled(a.href)\n          ? download(blob, name, opts)\n          : click(a, a.target = '_blank')\n      } else {\n        click(a)\n      }\n    } else {\n      // Support blobs\n      a.href = URL.createObjectURL(blob)\n      setTimeout(function () { URL.revokeObjectURL(a.href) }, 4E4) // 40s\n      setTimeout(function () { click(a) }, 0)\n    }\n  }\n\n  // Use msSaveOrOpenBlob as a second approach\n  : 'msSaveOrOpenBlob' in navigator\n  ? function saveAs (blob, name, opts) {\n    name = name || blob.name || 'download'\n\n    if (typeof blob === 'string') {\n      if (corsEnabled(blob)) {\n        download(blob, name, opts)\n      } else {\n        var a = document.createElement('a')\n        a.href = blob\n        a.target = '_blank'\n        setTimeout(function () { click(a) })\n      }\n    } else {\n      navigator.msSaveOrOpenBlob(bom(blob, opts), name)\n    }\n  }\n\n  // Fallback to using FileReader and a popup\n  : function saveAs (blob, name, opts, popup) {\n    // Open a popup immediately do go around popup blocker\n    // Mostly only available on user interaction and the fileReader is async so...\n    popup = popup || open('', '_blank')\n    if (popup) {\n      popup.document.title =\n      popup.document.body.innerText = 'downloading...'\n    }\n\n    if (typeof blob === 'string') return download(blob, name, opts)\n\n    var force = blob.type === 'application/octet-stream'\n    var isSafari = /constructor/i.test(_global.HTMLElement) || _global.safari\n    var isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent)\n\n    if ((isChromeIOS || (force && isSafari) || isMacOSWebView) && typeof FileReader !== 'undefined') {\n      // Safari doesn't allow downloading of blob URLs\n      var reader = new FileReader()\n      reader.onloadend = function () {\n        var url = reader.result\n        url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, 'data:attachment/file;')\n        if (popup) popup.location.href = url\n        else location = url\n        popup = null // reverse-tabnabbing #460\n      }\n      reader.readAsDataURL(blob)\n    } else {\n      var URL = _global.URL || _global.webkitURL\n      var url = URL.createObjectURL(blob)\n      if (popup) popup.location = url\n      else location.href = url\n      popup = null // reverse-tabnabbing #460\n      setTimeout(function () { URL.revokeObjectURL(url) }, 4E4) // 40s\n    }\n  }\n)\n\n_global.saveAs = saveAs.saveAs = saveAs\n\nif (typeof module !== 'undefined') {\n  module.exports = saveAs;\n}\n"],"names":["SecureBackupSetupMethod","Phase","CreateSecretStorageDialog","React","constructor","props","super","_defineProperty","this","createRef","e","setState","passPhraseKeySelected","target","value","async","state","Key","recoveryKey","MatrixClientPeg","safeGet","getCrypto","createRecoveryKeyFromPassphrase","copied","downloaded","setPassphrase","phase","ShowKey","Passphrase","copyNode","recoveryKeyNode","current","blob","Blob","encodedPrivateKey","type","FileSaver","dialogAesthetics","SSOAuthEntry","PHASE_PREAUTH","title","_t","body","continueText","continueKind","PHASE_POSTAUTH","finished","Modal","createDialog","InteractiveAuthDialog","matrixClient","makeRequest","aestheticsForStagePhases","LOGIN_TYPE","UNSTABLE_LOGIN_TYPE","confirmed","Error","cli","crypto","forceReset","backupInfo","Loading","getKeyBackupInfo","logger","error","LoadError","Storing","undefined","log","bootstrapSecretStorage","createSecretStorageKey","setupNewSecretStorage","resetKeyBackup","bootstrapCrossSigning","authUploadDeviceSigningKeys","doBootstrapUIAuth","setupNewKeyBackup","initialiseDehydrationIfEnabled","createNewKey","Stored","onFinished","ConfirmSkip","ChooseKeyPassphrase","preventDefault","passphraseField","validate","allowEmpty","valid","focus","focused","PassphraseConfirm","passPhrase","passPhraseConfirm","passPhraseValid","result","ModuleRunner","instance","extensions","cryptoSetup","componentDidMount","keyFromCustomisations","initExtension","privateKey","renderOptionKey","StyledRadioButton","key","name","checked","onChange","onKeyPassphraseChange","outlined","className","renderOptionPassphrase","renderPhaseChooseKeyPassphrase","optionKey","optionPassphrase","onSubmit","onChooseKeyPassphraseFormSubmit","role","DialogButtons","primaryButton","onPrimaryButtonClick","onCancel","onCancelClick","renderPhasePassPhrase","onPassPhraseNextClick","PassphraseField","id","onPassPhraseChange","minScore","onValidate","onPassPhraseValidate","fieldRef","autoFocus","label","_td","labelEnterPassword","labelStrongPassword","labelAllowedButUnsafe","hasCancel","disabled","onClick","renderPhasePassPhraseConfirm","matchText","changeText","passPhraseMatch","startsWith","AccessibleButton","kind","onSetAgainClick","onPassPhraseConfirmNextClick","PassphraseConfirmField","onPassPhraseConfirmChange","labelRequired","labelInvalid","password","renderPhaseShowKey","_this$recoveryKey","continueButton","onShowKeyContinueClick","InlineSpinner","ref","onDownloadClick","downloadButton","copyButton","onCopyClick","renderBusyPhase","Spinner","renderStoredPhase","renderPhaseLoadError","onLoadRetryClick","renderPhaseSkipConfirm","onGoBackClick","titleForPhase","topComponent","CheckmarkIcon","classNames","mx_SuccessDialog","render","content","titleClass","BaseDialog","top","fixedWidth","PureComponent","args","withValidation","rules","test","invalid","fieldState","Field","autoComplete","tooltipAlignment","__WEBPACK_DEFAULT_EXPORT__","description","complexity","score","max","deriveData","scorePassword","Promise","all","__webpack_require__","then","bind","get","userInputs","safe","SdkConfig","feedback","warning","suggestions","memoize","b","a","autoBom","console","warn","c","d","XMLHttpRequest","open","responseType","onload","g","response","onerror","send","status","dispatchEvent","MouseEvent","document","createEvent","initMouseEvent","window","f","self","global","navigator","userAgent","saveAs","HTMLAnchorElement","prototype","h","i","URL","webkitURL","j","createElement","download","rel","href","origin","location","createObjectURL","setTimeout","revokeObjectURL","msSaveOrOpenBlob","innerText","HTMLElement","safari","FileReader","k","onloadend","replace","readAsDataURL","l","m","module","exports"],"sourceRoot":""}